diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bee4995 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +Client/spiderbasic.js +Client/SpiderBasic_Compilation0.html +Server/kumos.db +/Server/blobs +/Server/apps +/Server/tmp diff --git a/Client/Default Apps/AppManager.sbi b/Client/Default Apps/AppManager.sbi new file mode 100644 index 0000000..560c4c1 --- /dev/null +++ b/Client/Default Apps/AppManager.sbi @@ -0,0 +1,411 @@ +DeclareModule AppManager + Declare Open() +EndDeclareModule + +Module AppManager + EnableExplicit + + ;- Layout + #Win_W = 520 + #Win_H = 380 + #Toolbar_H = 40 + #Statusbar_H = 26 + #List_Row_H = 48 + + ;- Colors + Global Color_Bg = RGB( 22, 22, 34) + Global Color_Row_Odd = RGB( 28, 28, 42) + Global Color_Row_Even = RGB( 22, 22, 34) + Global Color_Sel = RGB( 52, 52, 72) + Global Color_Accent = RGB(100, 120, 255) + Global Color_Text = RGB(200, 200, 215) + Global Color_Dim = RGB(110, 110, 135) + Global Color_Sep = RGB( 48, 48, 65) + + Global Font_UI = LoadFont(#PB_Any, "sans-serif", 13) + Global Font_Small = LoadFont(#PB_Any, "sans-serif", 11) + + ;- App list + Structure InstalledApp + ID.s + Name.s + Manifest.s + Permissions.s + EndStructure + + Global NewList _Apps.InstalledApp() + + ;- State + Global Window = 0 + Global _Canvas + Global _StatusLabel + Global _InstallBtn + Global _LaunchBtn + Global _UninstallBtn + Global _Hover = -1 + Global _Selected = -1 + Global _PendingUninstall.s = "" + + ;- Install dialog + Global _InputWin = 0 + Global _URLField + Global _OKBtn + Global _CancelBtn + + ;- Private declarations + Declare _Refresh() + Declare _DrawList() + Declare _UpdateButtons() + Declare _Status(Msg.s) + Declare _OpenInstallDialog() + Declare _CloseInstallDialog() + Declare _ListCallback(Success, DataString.s) + Declare _InstallCallback(Success, DataString.s) + Declare _UninstallCallback(Success, DataString.s) + Declare _DoUninstall(Result) + Declare Handler_Close() + Declare Handler_Canvas() + Declare Handler_Install() + Declare Handler_Launch() + Declare Handler_Uninstall() + Declare Handler_InputOK() + Declare Handler_InputCancel() + Declare Handler_Resize() + + ;- Public + Procedure Open() + If IsWindow(Window) + SetActiveWindow(Window) : ProcedureReturn + EndIf + + Window = OpenWindow(#PB_Any, 160, 100, #Win_W, #Win_H, "App Manager", + #PB_Window_TitleBar | #PB_Window_SizeGadget | #PB_Window_SystemMenu) + SetWindowColor(Window, Color_Bg) + + _InstallBtn = ButtonGadget(#PB_Any, 4, 6, 100, #Toolbar_H - 12, "+ Install") + _LaunchBtn = ButtonGadget(#PB_Any, 112, 6, 80, #Toolbar_H - 12, "Launch") + _UninstallBtn = ButtonGadget(#PB_Any, 200, 6, 90, #Toolbar_H - 12, "Uninstall") + + _Canvas = CanvasGadget(#PB_Any, 0, #Toolbar_H, + #Win_W, #Win_H - #Toolbar_H - #Statusbar_H) + + _StatusLabel = TextGadget(#PB_Any, 4, #Win_H - #Statusbar_H + 4, + #Win_W - 8, #Statusbar_H - 8, "") + SetGadgetColor(_StatusLabel, #PB_Gadget_FrontColor, Color_Dim) + SetGadgetColor(_StatusLabel, #PB_Gadget_BackColor, Color_Bg) + + BindGadgetEvent(_InstallBtn, @Handler_Install()) + BindGadgetEvent(_LaunchBtn, @Handler_Launch()) + BindGadgetEvent(_UninstallBtn, @Handler_Uninstall()) + BindGadgetEvent(_Canvas, @Handler_Canvas()) + BindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Window) + BindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + + Desktop::Register("App Manager", Window, "📦") + _UpdateButtons() + _Refresh() + EndProcedure + + ;- Private + Procedure _Refresh() + _Status("Loading...") + ClearList(_Apps()) + _Selected = -1 + _DrawList() + HTTPRequest(#PB_HTTP_Get, "/api/apps/list", "", @_ListCallback()) + EndProcedure + + Procedure _DrawList() + If Not IsGadget(_Canvas) : ProcedureReturn : EndIf + If Not StartDrawing(CanvasOutput(_Canvas)) : ProcedureReturn : EndIf + + Protected W = OutputWidth() + Protected H = OutputHeight() + + Box(0, 0, W, H, Color_Bg) + + If IsFont(Font_UI) : DrawingFont(FontID(Font_UI)) : EndIf + Protected TH = TextHeight("A") + + ForEach _Apps() + Protected i = ListIndex(_Apps()) + Protected Y = i * #List_Row_H + If Y + #List_Row_H > H : Break : EndIf + + Protected RowBg + If i = _Selected + RowBg = Color_Sel + ElseIf i = _Hover + RowBg = RGB(40, 40, 58) + ElseIf i % 2 = 0 + RowBg = Color_Row_Even + Else + RowBg = Color_Row_Odd + EndIf + + Box(0, Y, W, #List_Row_H, RowBg) + If i = _Selected : Box(0, Y, 3, #List_Row_H, Color_Accent) : EndIf + + DrawingMode(#PB_2DDrawing_Transparent) + DrawText(14, Y + (#List_Row_H / 2) - TH - 1, _Apps()\Name, Color_Text) + + If IsFont(Font_Small) : DrawingFont(FontID(Font_Small)) : EndIf + DrawText(14, Y + (#List_Row_H / 2) + 2, _Apps()\ID, Color_Dim) + If IsFont(Font_UI) : DrawingFont(FontID(Font_UI)) : EndIf + + Box(0, Y + #List_Row_H - 1, W, 1, Color_Sep) + Next + + If ListSize(_Apps()) = 0 + DrawingMode(#PB_2DDrawing_Transparent) + If IsFont(Font_UI) : DrawingFont(FontID(Font_UI)) : EndIf + DrawText((W - TextWidth("No apps installed")) / 2, + (H - TH) / 2, "No apps installed", Color_Dim) + EndIf + + StopDrawing() + EndProcedure + + Procedure _UpdateButtons() + DisableGadget(_LaunchBtn, Bool(_Selected < 0)) + DisableGadget(_UninstallBtn, Bool(_Selected < 0)) + EndProcedure + + Procedure _Status(Msg.s) + If IsGadget(_StatusLabel) : SetGadgetText(_StatusLabel, Msg) : EndIf + EndProcedure + + Procedure _OpenInstallDialog() + If IsWindow(_InputWin) : ProcedureReturn : EndIf + + Protected X = WindowX(Window) + (#Win_W / 2) - 170 + Protected Y = WindowY(Window) + (#Win_H / 2) - 50 + + _InputWin = OpenWindow(#PB_Any, X, Y, 340, 100, "Install App from URL", + #PB_Window_TitleBar | #PB_Window_SystemMenu) + TextGadget(#PB_Any, 10, 14, 320, 18, "Package URL (.zip):") + _URLField = StringGadget(#PB_Any, 10, 34, 320, 26, "") + _OKBtn = ButtonGadget(#PB_Any, 10, 68, 150, 24, "Install") + _CancelBtn = ButtonGadget(#PB_Any, 170, 68, 160, 24, "Cancel") + SetActiveGadget(_URLField) + + BindGadgetEvent(_OKBtn, @Handler_InputOK()) + BindGadgetEvent(_CancelBtn, @Handler_InputCancel()) + BindEvent(#PB_Event_CloseWindow, @Handler_InputCancel(), _InputWin) + EndProcedure + + Procedure _CloseInstallDialog() + If Not IsWindow(_InputWin) : ProcedureReturn : EndIf + UnbindGadgetEvent(_OKBtn, @Handler_InputOK()) + UnbindGadgetEvent(_CancelBtn, @Handler_InputCancel()) + UnbindEvent(#PB_Event_CloseWindow, @Handler_InputCancel(), _InputWin) + CloseWindow(_InputWin) + _InputWin = 0 + EndProcedure + + ;- HTTP callbacks + Procedure _ListCallback(Success, DataString.s) + If Not IsWindow(Window) : ProcedureReturn : EndIf + + ClearList(_Apps()) + _Selected = -1 + + If Success And ParseJSON(0, DataString) + Protected Root = JSONValue(0) + Protected Total = JSONArraySize(Root) + Protected i + + For i = 0 To Total - 1 + Protected Item = GetJSONElement(Root, i) + Protected ManiNode = GetJSONMember(Item, "manifest") + + AddElement(_Apps()) + _Apps()\ID = GetJSONString(GetJSONMember(Item, "app_id")) + + Protected N.s = GetJSONString(GetJSONMember(ManiNode, "name")) + If N <> "" + _Apps()\Name = N + Else + _Apps()\Name = _Apps()\ID + EndIf + + ; Re-serialise manifest to a JSON string + Protected Icon.s = GetJSONString(GetJSONMember(ManiNode, "icon")) + _Apps()\Manifest = "{" + + ~"\"id\":\"" + GetJSONString(GetJSONMember(ManiNode, "id")) + ~"\"," + + ~"\"name\":\"" + GetJSONString(GetJSONMember(ManiNode, "name")) + ~"\"," + + ~"\"version\":\"" + GetJSONString(GetJSONMember(ManiNode, "version")) + ~"\"," + + ~"\"icon\":\"" + ReplaceString(Icon, ~"\"", ~"\\\"") + ~"\"," + + ~"\"entry\":\"" + GetJSONString(GetJSONMember(ManiNode, "entry")) + ~"\"}" + + ; Re-serialise permissions array to a JSON string + Protected PermNode = GetJSONMember(Item, "permissions") + Protected PermCount = JSONArraySize(PermNode) + Protected j, Perms.s = "[" + For j = 0 To PermCount - 1 + If j > 0 : Perms + "," : EndIf + Perms + ~"\"" + GetJSONString(GetJSONElement(PermNode, j)) + ~"\"" + Next + _Apps()\Permissions = Perms + "]" + + ; Sync with the desktop start menu + Desktop::InstallThirdPartyApp(_Apps()\ID, _Apps()\Manifest, + _Apps()\Permissions, Icon) + Next + FreeJSON(0) + + Protected Count = ListSize(_Apps()) + If Count = 1 + _Status("1 app installed") + Else + _Status(Str(Count) + " apps installed") + EndIf + Else + _Status("Failed to load app list.") + EndIf + + _DrawList() + _UpdateButtons() + EndProcedure + + Procedure _InstallCallback(Success, DataString.s) + If Not IsWindow(Window) : ProcedureReturn : EndIf + DisableGadget(_InstallBtn, #False) + + If Success And ParseJSON(0, DataString) + Protected Root = JSONValue(0) + If GetJSONBoolean(GetJSONMember(Root, "success")) + Protected AppID.s = GetJSONString(GetJSONMember(Root, "app_id")) + FreeJSON(0) + Notify::Toast("Installed: " + AppID, Notify::#Success) + _Refresh() + ProcedureReturn + EndIf + Protected Err.s = GetJSONString(GetJSONMember(Root, "error")) + FreeJSON(0) + Notify::Toast(Err, Notify::#Error) + Else + Notify::Toast("Install failed.", Notify::#Error) + EndIf + _Status("Ready.") + EndProcedure + + Procedure _UninstallCallback(Success, DataString.s) + If Not IsWindow(Window) : ProcedureReturn : EndIf + If Success And ParseJSON(0, DataString) + If GetJSONBoolean(GetJSONMember(JSONValue(0), "success")) + FreeJSON(0) + Notify::Toast("App uninstalled.", Notify::#Success) + Desktop::UninstallThirdPartyApp(_PendingUninstall) + _PendingUninstall = "" + _Refresh() + ProcedureReturn + EndIf + FreeJSON(0) + EndIf + Notify::Toast("Uninstall failed.", Notify::#Error) + _PendingUninstall = "" + _Status("Ready.") + EndProcedure + + ;- Event handlers + Procedure Handler_Canvas() + Protected EType = EventType() + Protected MY = GetGadgetAttribute(_Canvas, #PB_Canvas_MouseY) + Protected Row = MY / #List_Row_H + + Select EType + Case #PB_EventType_MouseMove + If Row >= ListSize(_Apps()) : Row = -1 : EndIf + If Row <> _Hover + _Hover = Row : _DrawList() + EndIf + + Case #PB_EventType_MouseLeave + If _Hover <> -1 : _Hover = -1 : _DrawList() : EndIf + + Case #PB_EventType_LeftButtonUp + If Row >= 0 And Row < ListSize(_Apps()) + _Selected = Row : _DrawList() : _UpdateButtons() + EndIf + + Case #PB_EventType_LeftDoubleClick + If Row >= 0 And Row < ListSize(_Apps()) + _Selected = Row + Handler_Launch() + EndIf + EndSelect + EndProcedure + + Procedure Handler_Install() + _OpenInstallDialog() + EndProcedure + + Procedure Handler_Launch() + If _Selected < 0 Or Not SelectElement(_Apps(), _Selected) : ProcedureReturn : EndIf + AppRuntime::Launch(_Apps()\ID, _Apps()\Manifest, _Apps()\Permissions) + EndProcedure + + Procedure Handler_Uninstall() + If _Selected < 0 Or Not SelectElement(_Apps(), _Selected) : ProcedureReturn : EndIf + Notify::Confirm("Uninstall " + _Apps()\Name, + "Remove this app? Private storage will also be deleted.", + @_DoUninstall()) + EndProcedure + + Procedure _DoUninstall(Result) + If Not Result Or _Selected < 0 : ProcedureReturn : EndIf + If Not SelectElement(_Apps(), _Selected) : ProcedureReturn : EndIf + _PendingUninstall = _Apps()\ID + _Status("Uninstalling " + _Apps()\ID + "...") + HTTPRequest(#PB_HTTP_Post, "/api/apps/uninstall", + "app_id=" + URLEncoder(_Apps()\ID, #PB_UTF8) + "&keep_data=0", + @_UninstallCallback()) + EndProcedure + + Procedure Handler_InputOK() + Protected URL.s = Trim(GetGadgetText(_URLField)) + If URL = "" : ProcedureReturn : EndIf + _CloseInstallDialog() + _Status("Installing...") + DisableGadget(_InstallBtn, #True) + HTTPRequest(#PB_HTTP_Post, "/api/apps/install", + "url=" + URLEncoder(URL, #PB_UTF8), @_InstallCallback()) + EndProcedure + + Procedure Handler_InputCancel() + _CloseInstallDialog() + EndProcedure + + Procedure Handler_Resize() + Protected W = WindowWidth(Window) + Protected H = WindowHeight(Window) + ResizeGadget(_Canvas, 0, #Toolbar_H, W, H - #Toolbar_H - #Statusbar_H) + ResizeGadget(_StatusLabel, 4, H - #Statusbar_H + 4, W - 8, #Statusbar_H - 8) + _DrawList() + EndProcedure + + Procedure Handler_Close() + _CloseInstallDialog() + UnbindGadgetEvent(_InstallBtn, @Handler_Install()) + UnbindGadgetEvent(_LaunchBtn, @Handler_Launch()) + UnbindGadgetEvent(_UninstallBtn, @Handler_Uninstall()) + UnbindGadgetEvent(_Canvas, @Handler_Canvas()) + UnbindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Window) + UnbindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + Desktop::Unregister(Window) + Window = 0 + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 4 +; FirstLine = 30 +; Folding = DAA5 +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Default Apps/FileExplorer.sbi b/Client/Default Apps/FileExplorer.sbi new file mode 100644 index 0000000..e29fe51 --- /dev/null +++ b/Client/Default Apps/FileExplorer.sbi @@ -0,0 +1,301 @@ +DeclareModule FileExplorer + Declare Open() +EndDeclareModule + +Module FileExplorer + EnableExplicit + + ; Layout constants + #Toolbar_Height = 35 + #Statusbar_Height = 24 + #Window_W = 480 + #Window_H = 400 + #Max_Entries = 512 + + ; Gadgets + Global Window + Global UpButton + Global PathLabel + Global NewFolderButton + Global NewFileButton + Global ListView + Global StatusLabel + + ; Navigation state + Global CurrentPath.s = "/" + Global Dim PathStack.s(64) + Global StackDepth = 0 + + ; Entry cache (populated on each listing) + Global Dim EntryIDs.s(#Max_Entries) + Global Dim EntryNames.s(#Max_Entries) + Global Dim EntryIsDir(#Max_Entries) + Global EntryCount = 0 + + ; Input window state + Global InputWindow = 0 + Global InputField + Global InputMode ; 0 = new folder, 1 = new file + Global ButtonNew + Global CancelBtn + + ; Private declarations + Declare _Load(Path.s) + Declare _ListCallback(Success.i, DataString.s) + Declare _MkdirCallback(Success.i, DataString.s) + Declare _CreateFileCallback(Success.i, DataString.s) + Declare _OpenInputWindow(Mode.i) + Declare _CloseInputWindow() + Declare Handler_Resize() + Declare Handler_Up() + Declare Handler_NewFolder() + Declare Handler_NewFile() + Declare Handler_ListView() + Declare Handler_Close() + Declare Handler_InputConfirm() + Declare Handler_InputCancel() + + ; Public procedures + + Procedure Open() + If IsWindow(Window) + SetActiveWindow(Window) + ProcedureReturn + EndIf + + Window = OpenWindow(#PB_Any, 150, 80, #Window_W, #Window_H, "File Explorer", + #PB_Window_TitleBar | #PB_Window_SizeGadget | #PB_Window_SystemMenu) + + ; Toolbar + UpButton = ButtonGadget(#PB_Any, 2, 4, 30, #Toolbar_Height - 8, "↑") + PathLabel = TextGadget (#PB_Any, 36, 4, #Window_W - 200, #Toolbar_Height - 8, "/") + NewFolderButton= ButtonGadget(#PB_Any, #Window_W - 162, 4, 80, #Toolbar_Height - 8, "+ Folder") + NewFileButton = ButtonGadget(#PB_Any, #Window_W - 78, 4, 74, #Toolbar_Height - 8, "+ File") + + ; File list + ListView = ListViewGadget(#PB_Any, 0, #Toolbar_Height, + #Window_W, #Window_H - #Toolbar_Height - #Statusbar_Height) + + ; Status bar + StatusLabel = TextGadget(#PB_Any, 4, #Window_H - #Statusbar_Height + 4, + #Window_W - 8, #Statusbar_Height - 8, "") + + BindGadgetEvent(UpButton, @Handler_Up()) + BindGadgetEvent(NewFolderButton, @Handler_NewFolder()) + BindGadgetEvent(NewFileButton, @Handler_NewFile()) + BindGadgetEvent(ListView, @Handler_ListView()) + BindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Window) + BindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + + Desktop::Register("File Explorer", Window, "📁") + + CurrentPath = "/" + StackDepth = 0 + _Load("/") + EndProcedure + + ; Private procedures + + Procedure _Load(Path.s) + CurrentPath = Path + SetGadgetText(PathLabel, Path) + SetGadgetText(StatusLabel, "Loading...") + ClearGadgetItems(ListView) + EntryCount = 0 + FS::List(Path, @_ListCallback()) + EndProcedure + + Procedure _ListCallback(Success.i, DataString.s) + If Not Success Or Not IsWindow(Window) + Notify::Toast("Failed to load directory.", Notify::#Error) + ProcedureReturn + EndIf + + If Not ParseJSON(0, DataString) + Notify::Toast("Could not read directory.", Notify::#Error) + ProcedureReturn + EndIf + + Protected Root.i = JSONValue(0) + Protected Count.i = JSONArraySize(Root) + Protected i.i, Item.i + + ClearGadgetItems(ListView) + EntryCount = 0 + + For i = 0 To Count - 1 + If EntryCount >= #Max_Entries : Break : EndIf + Item = GetJSONElement(Root, i) + + EntryIDs(EntryCount) = Str(GetJSONInteger(GetJSONMember(Item, "id"))) + EntryNames(EntryCount) = GetJSONString(GetJSONMember(Item, "name")) + EntryIsDir(EntryCount) = GetJSONInteger(GetJSONMember(Item, "is_dir")) + + Protected Prefix.s = "[F] " + If EntryIsDir(EntryCount) : Prefix = "[D] " : EndIf + AddGadgetItem(ListView, -1, Prefix + EntryNames(EntryCount)) + EntryCount + 1 + Next + + FreeJSON(0) + + Protected Status.s = Str(EntryCount) + " item" + If EntryCount <> 1 : Status + "s" : EndIf + SetGadgetText(StatusLabel, Status) + EndProcedure + + Procedure _MkdirCallback(Success.i, DataString.s) + If Not IsWindow(Window) : ProcedureReturn : EndIf + _Load(CurrentPath) ; refresh regardless — server may have created it + EndProcedure + + Procedure _CreateFileCallback(Success.i, DataString.s) + If Not IsWindow(Window) : ProcedureReturn : EndIf + If Success And ParseJSON(0, DataString) + Protected Root.i = JSONValue(0) + If GetJSONBoolean(GetJSONMember(Root, "success")) + Protected ID.s = Str(GetJSONInteger(GetJSONMember(Root, "id"))) + Protected Path.s = CurrentPath + If Right(Path, 1) <> "/" : Path + "/" : EndIf + Path + EntryNames(0) ; name was stored in EntryNames(0) temporarily + FreeJSON(0) + _Load(CurrentPath) + TextEditor::Open(ID, Path) + ProcedureReturn + EndIf + FreeJSON(0) + EndIf + _Load(CurrentPath) + EndProcedure + + Procedure _OpenInputWindow(Mode.i) + If IsWindow(InputWindow) : ProcedureReturn : EndIf + InputMode = Mode + + Protected Title.s = "New Folder" + If Mode = 1 : Title = "New File" : EndIf + + Protected X.i = WindowX(Window) + (#Window_W / 2) - 150 + Protected Y.i = WindowY(Window) + (#Window_H / 2) - 45 + + InputWindow = OpenWindow(#PB_Any, X, Y, 300, 90, Title, + #PB_Window_TitleBar | #PB_Window_SystemMenu) + TextGadget (#PB_Any, 10, 12, 280, 20, "Name:") + InputField = StringGadget(#PB_Any, 10, 32, 280, 24, "") + ButtonNew = ButtonGadget(#PB_Any, 10, 62, 130, 24, "OK") ; EventGadget index 2 + CancelBtn = ButtonGadget(#PB_Any, 150, 62, 140, 24, "Cancel") + + SetActiveGadget(InputField) + BindGadgetEvent(ButtonNew, @Handler_InputConfirm()) + BindGadgetEvent(CancelBtn, @Handler_InputCancel()) + BindEvent(#PB_Event_CloseWindow, @Handler_InputCancel(), InputWindow) + EndProcedure + + Procedure _CloseInputWindow() + If IsWindow(InputWindow) + CloseWindow(InputWindow) + EndIf + EndProcedure + + ; Event handlers + + Procedure Handler_Resize() + Protected W.i = WindowWidth(Window) + Protected H.i = WindowHeight(Window) + ResizeGadget(PathLabel, 36, 4, W - 200, #Toolbar_Height - 8) + ResizeGadget(NewFolderButton, W - 162, 4, 80, #Toolbar_Height - 8) + ResizeGadget(NewFileButton, W - 78, 4, 74, #Toolbar_Height - 8) + ResizeGadget(ListView, 0, #Toolbar_Height, W, H - #Toolbar_Height - #Statusbar_Height) + ResizeGadget(StatusLabel, 4, H - #Statusbar_Height + 4, W - 8, #Statusbar_Height - 8) + EndProcedure + + Procedure Handler_Up() + If StackDepth > 0 + StackDepth - 1 + _Load(PathStack(StackDepth)) + EndIf + EndProcedure + + Procedure Handler_NewFolder() + _OpenInputWindow(0) + EndProcedure + + Procedure Handler_NewFile() + _OpenInputWindow(1) + EndProcedure + + Procedure Handler_ListView() + If EventType() <> #PB_EventType_LeftDoubleClick : ProcedureReturn : EndIf + + Protected Index.i = GetGadgetState(ListView) + If Index < 0 Or Index >= EntryCount : ProcedureReturn : EndIf + + If EntryIsDir(Index) + ; Push current path, navigate in + PathStack(StackDepth) = CurrentPath + StackDepth + 1 + Protected NewPath.s = CurrentPath + If Right(NewPath, 1) <> "/" : NewPath + "/" : EndIf + NewPath + EntryNames(Index) + _Load(NewPath) + Else + ; Open in text editor + Protected Path.s = CurrentPath + If Right(Path, 1) <> "/" : Path + "/" : EndIf + Path + EntryNames(Index) + TextEditor::Open(EntryIDs(Index), Path) + EndIf + EndProcedure + + Procedure Handler_Close() + If IsWindow(InputWindow) + UnbindEvent(#PB_Event_CloseWindow, @Handler_InputCancel(), InputWindow) + UnbindGadgetEvent(ButtonNew, @Handler_InputConfirm()) + UnbindGadgetEvent(CancelBtn, @Handler_InputCancel()) + _CloseInputWindow() + EndIf + + UnbindGadgetEvent(UpButton, @Handler_Up()) + UnbindGadgetEvent(NewFolderButton, @Handler_NewFolder()) + UnbindGadgetEvent(NewFileButton, @Handler_NewFile()) + UnbindGadgetEvent(ListView, @Handler_ListView()) + UnbindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Window) + UnbindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + Desktop::Unregister(Window) + InputWindow = 0 + Window = 0 + EndProcedure + + Procedure Handler_InputConfirm() + Protected Name.s = Trim(GetGadgetText(InputField)) + If Name = "" : ProcedureReturn : EndIf + + Protected Path.s = CurrentPath + If Right(Path, 1) <> "/" : Path + "/" : EndIf + Path + Name + + _CloseInputWindow() + + If InputMode = 0 + FS::Mkdir(Path, @_MkdirCallback()) + Else + ; Stash name temporarily for the callback to build the full path + EntryNames(0) = Name + FS::Write("", Path, "", @_CreateFileCallback()) + EndIf + EndProcedure + + Procedure Handler_InputCancel() + _CloseInputWindow() + EndProcedure + +EndModule +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 96 +; Folding = CAg +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Default Apps/Settings.sbi b/Client/Default Apps/Settings.sbi new file mode 100644 index 0000000..b2f5a7e --- /dev/null +++ b/Client/Default Apps/Settings.sbi @@ -0,0 +1,256 @@ +DeclareModule Settings + Declare Open() +EndDeclareModule + +Module Settings + EnableExplicit + + #Win_W = 500 + #Win_H = 290 + #Panel_W = 140 + #Row_H = 44 + #Pad = 20 + + Global Color_Panel_Bg = RGB( 22, 22, 34) + Global Color_Sel = RGB( 52, 52, 72) + Global Color_Hover = RGB( 40, 40, 58) + Global Color_Accent = RGB(100, 120, 255) + Global Color_Content_Bg = RGB( 36, 36, 52) + Global Color_Sep = RGB( 48, 48, 65) + Global Color_Text = RGB(200, 200, 215) + Global Color_Dim = RGB(110, 110, 135) + + Global PanelFont = LoadFont(#PB_Any, "sans-serif", 13) + + ; To add a section: add its name below, create its gadgets in Open(), And add a Case to _ShowSection() / _HideSection(). + Enumeration + #Section_Account + ; #Section_Appearance + ; #Section_About + + #Section_Count ; keep in last place + EndEnumeration + + Global Dim _SectionNames.s(#Section_Count) + + ; State + Global Window + Global _PanelCanvas + Global _CurrentSection + Global _PanelHover = -1 + + ; Account section gadgets + Global _LblCurrent, _InCurrent + Global _LblNew, _InNew + Global _LblConfirm, _InConfirm + Global _BtnSave + + ; Private declarations + Declare _DrawPanel() + Declare _HideSection(Section) + Declare _ShowSection(Section) + Declare Handler_Close() + Declare Handler_PanelCanvas() + Declare Handler_Save() + Declare _SaveCallback(Success, DataString.s) + + ; Public procedures + Procedure Open() + If IsWindow(Window) + SetActiveWindow(Window) + ProcedureReturn + EndIf + + _SectionNames(#Section_Account) = "Account" + + Window = OpenWindow(#PB_Any, 200, 150, #Win_W, #Win_H, "Settings", + #PB_Window_TitleBar | #PB_Window_SystemMenu) + SetWindowColor(Window, Color_Content_Bg) + + _PanelCanvas = CanvasGadget(#PB_Any, 0, 0, #Panel_W, #Win_H) + + ; Account section gadgets + Protected CX = #Panel_W + 1 + #Pad + Protected CW = #Win_W - #Panel_W - 1 - #Pad * 2 + Protected Y = 20 + + _LblCurrent = TextGadget (#PB_Any, CX, Y, CW, 18, "Current password") + _InCurrent = StringGadget(#PB_Any, CX, Y + 22, CW, 26, "", #PB_String_Password) + Y + 66 + + _LblNew = TextGadget (#PB_Any, CX, Y, CW, 18, "New password") + _InNew = StringGadget(#PB_Any, CX, Y + 22, CW, 26, "", #PB_String_Password) + Y + 66 + + _LblConfirm = TextGadget (#PB_Any, CX, Y, CW, 18, "Confirm new password") + _InConfirm = StringGadget(#PB_Any, CX, Y + 22, CW, 26, "", #PB_String_Password) + Y + 58 + + _BtnSave = ButtonGadget(#PB_Any, CX, Y, CW, 30, "Change password") + + ; Label colors + SetGadgetColor(_LblCurrent, #PB_Gadget_FrontColor, Color_Text) + SetGadgetColor(_LblNew, #PB_Gadget_FrontColor, Color_Text) + SetGadgetColor(_LblConfirm, #PB_Gadget_FrontColor, Color_Text) + SetGadgetColor(_LblCurrent, #PB_Gadget_BackColor, Color_Content_Bg) + SetGadgetColor(_LblNew, #PB_Gadget_BackColor, Color_Content_Bg) + SetGadgetColor(_LblConfirm, #PB_Gadget_BackColor, Color_Content_Bg) + + BindGadgetEvent(_BtnSave, @Handler_Save()) + BindGadgetEvent(_PanelCanvas, @Handler_PanelCanvas()) + BindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + + Desktop::Register("Settings", Window, "⚙") + _DrawPanel() + EndProcedure + + ; Private procedures + Procedure _DrawPanel() + If Not IsGadget(_PanelCanvas) : ProcedureReturn : EndIf + If Not StartDrawing(CanvasOutput(_PanelCanvas)) : ProcedureReturn : EndIf + + Protected W = OutputWidth() + Protected H = OutputHeight() + Protected i, Y, TH + + Box(0, 0, W, H, Color_Panel_Bg) + Box(W - 1, 0, 1, H, Color_Sep) ; right-edge separator + + If IsFont(PanelFont) : DrawingFont(FontID(PanelFont)) : EndIf + TH = TextHeight("A") + + For i = 0 To #Section_Count - 1 + Y = i * #Row_H + If i = _CurrentSection + Box(0, Y, W - 1, #Row_H, Color_Sel) + Box(0, Y, 3, #Row_H, Color_Accent) + ElseIf i = _PanelHover + Box(0, Y, W - 1, #Row_H, Color_Hover) + EndIf + DrawingMode(#PB_2DDrawing_Transparent) + DrawText(14, Y + (#Row_H - TH) / 2, _SectionNames(i), Color_Text) + Next + + StopDrawing() + EndProcedure + + Procedure _HideSection(Section) + Select Section + Case #Section_Account + HideGadget(_LblCurrent, #True) + HideGadget(_InCurrent, #True) + HideGadget(_LblNew, #True) + HideGadget(_InNew, #True) + HideGadget(_LblConfirm, #True) + HideGadget(_InConfirm, #True) + HideGadget(_BtnSave, #True) + EndSelect + EndProcedure + + Procedure _ShowSection(Section) + _HideSection(_CurrentSection) + _CurrentSection = Section + Select Section + Case #Section_Account + HideGadget(_LblCurrent, #False) + HideGadget(_InCurrent, #False) + HideGadget(_LblNew, #False) + HideGadget(_InNew, #False) + HideGadget(_LblConfirm, #False) + HideGadget(_InConfirm, #False) + HideGadget(_BtnSave, #False) + EndSelect + _DrawPanel() + EndProcedure + + ; Event handlers + Procedure Handler_PanelCanvas() + Protected EType = EventType() + Protected MY = GetGadgetAttribute(_PanelCanvas, #PB_Canvas_MouseY) + Protected Row = MY / #Row_H + + Select EType + Case #PB_EventType_MouseMove + If Row < #Section_Count And Row <> _PanelHover + _PanelHover = Row + _DrawPanel() + EndIf + + Case #PB_EventType_MouseLeave + _PanelHover = -1 + _DrawPanel() + + Case #PB_EventType_LeftButtonUp + If Row >= 0 And Row < #Section_Count And Row <> _CurrentSection + _ShowSection(Row) + EndIf + EndSelect + EndProcedure + + Procedure Handler_Save() + Protected Current.s = GetGadgetText(_InCurrent) + Protected New_.s = GetGadgetText(_InNew) + Protected Confirm.s = GetGadgetText(_InConfirm) + + If Current = "" Or New_ = "" Or Confirm = "" + Notify::Toast("Please fill in all fields.", Notify::#Warning) + ProcedureReturn + EndIf + If New_ <> Confirm + Notify::Toast("New passwords do not match.", Notify::#Warning) + ProcedureReturn + EndIf + If Len(New_) < 8 + Notify::Toast("Password must be at least 8 characters.", Notify::#Warning) + ProcedureReturn + EndIf + + DisableGadget(_BtnSave, #True) + HTTPRequest(#PB_HTTP_Post, "/api/auth/password", + "current_password=" + URLEncoder(Current, #PB_UTF8) + + "&new_password=" + URLEncoder(New_, #PB_UTF8), + @_SaveCallback()) + EndProcedure + + Procedure _SaveCallback(Success, DataString.s) + DisableGadget(_BtnSave, #False) + + If Not Success + Notify::Toast("Connection error.", Notify::#Error) + ProcedureReturn + EndIf + + If ParseJSON(0, DataString) + Protected Root = JSONValue(0) + If GetJSONBoolean(GetJSONMember(Root, "success")) + SetGadgetText(_InCurrent, "") + SetGadgetText(_InNew, "") + SetGadgetText(_InConfirm, "") + Notify::Toast("Password changed successfully.", Notify::#Success) + Else + Notify::Toast(GetJSONString(GetJSONMember(Root, "error")), Notify::#Error) + EndIf + FreeJSON(0) + Else + Notify::Toast("Unexpected server response.", Notify::#Error) + EndIf + EndProcedure + + Procedure Handler_Close() + UnbindGadgetEvent(_PanelCanvas, @Handler_PanelCanvas()) + UnbindGadgetEvent(_BtnSave, @Handler_Save()) + UnbindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + Desktop::Unregister(Window) + Window = 0 + EndProcedure + +EndModule +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 10 +; Folding = Dw +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Default Apps/TextEditor.sbi b/Client/Default Apps/TextEditor.sbi new file mode 100644 index 0000000..608c745 --- /dev/null +++ b/Client/Default Apps/TextEditor.sbi @@ -0,0 +1,217 @@ +DeclareModule TextEditor + Declare Open(FileID.s, Path.s) +EndDeclareModule + +Module TextEditor + EnableExplicit + + #MaxEditors = 16 + #ToolbarHeight = 35 + + Global Dim _Windows.i(#MaxEditors) + Global Dim _Editors.i(#MaxEditors) + Global Dim _SaveBtns.i(#MaxEditors) + Global Dim _FileIDs.s(#MaxEditors) + Global Dim _Paths.s(#MaxEditors) + Global Dim _Dirty.i(#MaxEditors) + Global Dim _Saving.i(#MaxEditors) + Global _Count.i = 0 + Global _Loading_Slot.i = -1 + Global _ClosingSlot.i = -1 ; slot awaiting confirm-close callback + + Declare _FindByWindow(Window.i) + Declare _FindByEditor(Editor.i) + Declare _SetDirty(Slot.i, Dirty.i) + Declare _Save(Slot.i) + Declare _Remove(Slot.i) + Declare _ConfirmCloseCallback(Result.i) + Declare _ReadCallback(Success.i, DataString.s) + Declare _SaveCallback(Success.i, DataString.s) + Declare Handler_Resize() + Declare Handler_Save() + Declare Handler_Change() + Declare Handler_Close() + + Procedure Open(FileID.s, Path.s) + If _Count >= #MaxEditors + Notify::Toast("Too many editors open.", Notify::#Warning) + ProcedureReturn + EndIf + + Protected Slot.i = _Count + Protected W.i = 600 + Protected H.i = 400 + Protected Win.i = OpenWindow(#PB_Any, 120 + Slot * 20, 60 + Slot * 20, W, H, + FS::GetFilePart(Path), + #PB_Window_TitleBar | #PB_Window_SizeGadget | #PB_Window_SystemMenu) + + Protected SaveBtn.i = ButtonGadget(#PB_Any, 5, 3, 80, #ToolbarHeight - 6, "Save") + Protected Editor.i = EditorGadget(#PB_Any, 0, #ToolbarHeight, W, H - #ToolbarHeight) + + _Windows(Slot) = Win + _Editors(Slot) = Editor + _SaveBtns(Slot) = SaveBtn + _FileIDs(Slot) = FileID + _Paths(Slot) = Path + _Dirty(Slot) = #False + _Count + 1 + + BindGadgetEvent(SaveBtn, @Handler_Save()) + BindGadgetEvent(Editor, @Handler_Change()) + BindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Win) + BindEvent(#PB_Event_CloseWindow, @Handler_Close(), Win) + + Desktop::Register(FS::GetFilePart(Path), Win, "📄") + + _Loading_Slot = Slot + FS::Read_(FileID, Path, @_ReadCallback()) + EndProcedure + + ; Private procedures + Procedure.i _FindByWindow(Window.i) + Protected i.i + For i = 0 To _Count - 1 + If _Windows(i) = Window : ProcedureReturn i : EndIf + Next + ProcedureReturn -1 + EndProcedure + + Procedure.i _FindByEditor(Editor.i) + Protected i.i + For i = 0 To _Count - 1 + If _Editors(i) = Editor : ProcedureReturn i : EndIf + Next + ProcedureReturn -1 + EndProcedure + + Procedure _SetDirty(Slot.i, Dirty.i) + _Dirty(Slot) = Dirty + Protected Title.s = FS::GetFilePart(_Paths(Slot)) + If Dirty : Title = "* " + Title : EndIf + SetWindowTitle(_Windows(Slot), Title) + EndProcedure + + Procedure _Save(Slot.i) + If Not IsWindow(_Windows(Slot)) : ProcedureReturn : EndIf + If _Saving(Slot) : ProcedureReturn : EndIf + Protected Content.s = GetGadgetText(_Editors(Slot)) + _Saving(Slot) = #True + DisableGadget(_SaveBtns(Slot), #True) + FS::Write(_FileIDs(Slot), _Paths(Slot), Content, @_SaveCallback()) + EndProcedure + + Procedure _Remove(Slot.i) + UnbindGadgetEvent(_SaveBtns(Slot), @Handler_Save()) + UnbindGadgetEvent(_Editors(Slot), @Handler_Change()) + UnbindEvent(#PB_Event_SizeWindow, @Handler_Resize(), _Windows(Slot)) + UnbindEvent(#PB_Event_CloseWindow, @Handler_Close(), _Windows(Slot)) + Desktop::Unregister(_Windows(Slot)) + + Protected i.i + For i = Slot To _Count - 2 + _Windows(i) = _Windows(i + 1) + _Editors(i) = _Editors(i + 1) + _SaveBtns(i) = _SaveBtns(i + 1) + _FileIDs(i) = _FileIDs(i + 1) + _Paths(i) = _Paths(i + 1) + _Dirty(i) = _Dirty(i + 1) + _Saving(i) = _Saving(i + 1) + Next + _Windows(_Count - 1) = 0 + _Editors(_Count - 1) = 0 + _SaveBtns(_Count - 1) = 0 + _FileIDs(_Count - 1) = "" + _Paths(_Count - 1) = "" + _Dirty(_Count - 1) = #False + _Saving(_Count - 1) = #False + _Count - 1 + + If _Loading_Slot = Slot : _Loading_Slot = -1 : EndIf + If _ClosingSlot = Slot : _ClosingSlot = -1 : EndIf + EndProcedure + + ; Called by Notify::Confirm — Result=1 means discard and close, 0 means cancel. + Procedure _ConfirmCloseCallback(Result.i) + If Result And _ClosingSlot >= 0 + _Remove(_ClosingSlot) + EndIf + _ClosingSlot = -1 + EndProcedure + + ; Callbacks + Procedure _ReadCallback(Success.i, DataString.s) + If _Loading_Slot < 0 : ProcedureReturn : EndIf + Protected Slot.i = _Loading_Slot + _Loading_Slot = -1 + If Not IsWindow(_Windows(Slot)) : ProcedureReturn : EndIf + If Success + SetGadgetText(_Editors(Slot), DataString) + _SetDirty(Slot, #False) + Else + SetGadgetText(_Editors(Slot), "") + _SetDirty(Slot, #True) + EndIf + EndProcedure + + Procedure _SaveCallback(Success.i, DataString.s) + Protected i.i + For i = 0 To _Count - 1 + If _Saving(i) + _Saving(i) = #False + DisableGadget(_SaveBtns(i), #False) + If Success + _SetDirty(i, #False) + Else + Notify::Toast("Save failed — " + FS::GetFilePart(_Paths(i)), Notify::#Error) + EndIf + Break + EndIf + Next + EndProcedure + + ; Event handlers + Procedure Handler_Resize() + Protected Win.i = EventWindow() + Protected Slot.i = _FindByWindow(Win) + If Slot < 0 : ProcedureReturn : EndIf + ResizeGadget(_Editors(Slot), 0, #ToolbarHeight, + WindowWidth(Win), WindowHeight(Win) - #ToolbarHeight) + EndProcedure + + Procedure Handler_Save() + Protected Slot.i = _FindByWindow(EventWindow()) + If Slot >= 0 : _Save(Slot) : EndIf + EndProcedure + + Procedure Handler_Change() + Protected Slot.i = _FindByEditor(EventGadget()) + If Slot >= 0 And Not _Dirty(Slot) + _SetDirty(Slot, #True) + EndIf + EndProcedure + + Procedure Handler_Close() + Protected Win.i = EventWindow() + Protected Slot.i = _FindByWindow(Win) + If Slot < 0 : ProcedureReturn : EndIf + + If _Dirty(Slot) + _ClosingSlot = Slot + Notify::Confirm("Unsaved changes", + "Close " + Chr(34) + FS::GetFilePart(_Paths(Slot)) + Chr(34) + " without saving?", + @_ConfirmCloseCallback()) + Else + _Remove(Slot) + EndIf + EndProcedure + +EndModule +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 69 +; Folding = DA5 +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Default Apps/WebBrowser.sbi b/Client/Default Apps/WebBrowser.sbi new file mode 100644 index 0000000..b853c95 --- /dev/null +++ b/Client/Default Apps/WebBrowser.sbi @@ -0,0 +1,73 @@ +DeclareModule WebBrowser + Declare Open() +EndDeclareModule + +Module WebBrowser + EnableExplicit + + #Toolbar_Height = 35 + #Window_W = 800 + #Window_H = 600 + + Global Window.i = 0 + Global UrlBar.i + Global WebView.i + + Declare Handler_Resize() + Declare Handler_Navigate() + Declare Handler_Close() + + Procedure Open() + If IsWindow(Window) + SetActiveWindow(Window) + ProcedureReturn + EndIf + + Window = OpenWindow(#PB_Any, 100, 60, #Window_W, #Window_H, "Web Browser", + #PB_Window_TitleBar | #PB_Window_SizeGadget | #PB_Window_SystemMenu) + + UrlBar = StringGadget(#PB_Any, 4, 5, #Window_W - 8, #Toolbar_Height - 10, "https://lastlife.net") + WebView = WebGadget(#PB_Any, 0, #Toolbar_Height, #Window_W, #Window_H - #Toolbar_Height, "https://lastlife.net") + + BindGadgetEvent(UrlBar, @Handler_Navigate()) + BindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Window) + BindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + + Desktop::Register("Web Browser", Window, "🌐") + EndProcedure + + Procedure Handler_Navigate() +; Protected URL.s = Trim(GetGadgetText(UrlBar)) +; If URL = "" : ProcedureReturn : EndIf +; If Left(URL, 4) <> "http" +; URL = "https://" + URL +; SetGadgetText(UrlBar, URL) +; EndIf +; SetGadgetAttribute(WebView, #PB_Web_URL, URL) + EndProcedure + + Procedure Handler_Resize() + Protected W.i = WindowWidth(Window) + Protected H.i = WindowHeight(Window) + ResizeGadget(UrlBar, 4, 5, W - 8, #Toolbar_Height - 10) + ResizeGadget(WebView, 0, #Toolbar_Height, W, H - #Toolbar_Height) + EndProcedure + + Procedure Handler_Close() + UnbindGadgetEvent(UrlBar, @Handler_Navigate()) + UnbindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Window) + UnbindEvent(#PB_Event_CloseWindow, @Handler_Close(), Window) + Desktop::Unregister(Window) + Window = 0 + EndProcedure + +EndModule +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 29 +; Folding = -- +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/AppRuntime.sbi b/Client/Includes/AppRuntime.sbi new file mode 100644 index 0000000..1358cd1 --- /dev/null +++ b/Client/Includes/AppRuntime.sbi @@ -0,0 +1,409 @@ +Module AppRuntime + EnableExplicit + + ;- Instance structure + Structure Instance + InstanceID.i ; stable unique ID — used as the JS↔SB bridge key + Window.i + View.i + AppID.s + Perms.s + EndStructure + + Global NewList Instances.Instance() + Global _NextID = 1 ; auto-incrementing ID counter + + ;- Pending async operations + ; One pending op of each type at a time (JS is single-threaded). + + Global _PL_ID = -1 : Global _PL_KMID.s = "" ; list + Global _PS_ID = -1 : Global _PS_KMID.s = "" ; stat (standalone) + Global _PSR_ID = -1 : Global _PSR_KMID.s = "" ; stat-before-read/delete + Global _PR_ID = -1 : Global _PR_KMID.s = "" ; read + Global _PW_ID = -1 : Global _PW_KMID.s = "" ; write / mkdir / delete + Global _PC_ID = -1 : Global _PC_KMID.s = "" ; confirm dialog + + ;- Private declarations + Declare _FindByID(ID) + Declare _FindByWindow(Win) + Declare _HasPerm(ID, Token.s) + Declare _SendResponse(ID, KMID.s, Success, DataString.s) + Declare.s _StoragePath(ID, RelPath.s) + Declare _Remove(ID) + Declare _CloseByID(ID) + Declare _Dispatch(ID, RawMsg.s) + Declare _DoList(ID, KMID.s, Path.s) + Declare _DoStat(ID, KMID.s, Path.s) + Declare _DoStatForRead(ID, KMID.s, Path.s) + Declare _DoRead(ID, KMID.s, FileID) + Declare _DoWrite(ID, KMID.s, Path.s, Content.s) + Declare _DoMkdir(ID, KMID.s, Path.s) + Declare _DoDelete(ID, KMID.s, Path.s) + Declare _ListCallback(Success, DataString.s) + Declare _StatCallback(Success, DataString.s) + Declare _StatForReadCallback(Success, DataString.s) + Declare _ReadCallback(Success, DataString.s) + Declare _WriteCallback(Success, DataString.s) + Declare _ConfirmCallback(Result) + Declare Handler_Resize() + Declare Handler_Close() + + ;- Public procedures + + ; Call once from Desktop::Open. + Procedure Init() + !window._kumos_rt = { instances: {} }; + !window.addEventListener('message', function(e) { + ! var inst; + ! for (var id in window._kumos_rt.instances) { + ! inst = window._kumos_rt.instances[id]; + ! if (inst && inst.frameEl && inst.frameEl.contentWindow === e.source) { + ! if (typeof e.data === 'string') { + ! appruntime$f__dispatch(inst.id, e.data); + ! } + ! return; + ! } + ! } + !}); + EndProcedure + + ; Open a new sandboxed app window. + Procedure Launch(AppID.s, ManifestJSON.s, Permissions.s) + Protected Count, W, H, Win, View, ID + Protected AppName.s, N.s, Src.s + + AppName = AppID + If ParseJSON(0, ManifestJSON) + N = GetJSONString(GetJSONMember(JSONValue(0), "name")) + If N <> "" : AppName = N : EndIf + FreeJSON(0) + EndIf + + Count = ListSize(Instances()) + W = 640 + H = 480 + Win = OpenWindow(#PB_Any, 80 + (Count % 8) * 24, 80 + (Count % 8) * 24, W, H, AppName, #PB_Window_TitleBar | #PB_Window_SizeGadget | #PB_Window_SystemMenu) + View = WebGadget(#PB_Any, 0, 0, W, H, "about:blank") + Src = "/api/apps/" + AppID + "/index.html" + ID = _NextID + _NextID + 1 + + !(function(){ + ! var frames = document.querySelectorAll('iframe[src="about:blank"]:not([data-kumos-instance])'); + ! var f = frames[frames.length - 1]; + ! if (!f) return; + ! f.setAttribute('data-kumos-instance', String(v_id)); + ! // No allow-same-origin -> cross-origin isolation even from same host. + ! f.setAttribute('sandbox', 'allow-scripts allow-forms allow-modals allow-downloads allow-pointer-lock'); + ! window._kumos_rt.instances[v_id] = { id: v_id, frameEl: f, appId: v_appid }; + ! f.src = v_src; + !})(); + + AddElement(Instances()) + Instances()\InstanceID = ID + Instances()\Window = Win + Instances()\View = View + Instances()\AppID = AppID + Instances()\Perms = Permissions + + BindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Win) + BindEvent(#PB_Event_CloseWindow, @Handler_Close(), Win) + + Desktop::Register(AppName, Win, "📦") + EndProcedure + + ;- Private procedures + ; Leaves list cursor on the found element. Returns #True if found. + Procedure _FindByID(ID) + ForEach Instances() + If Instances()\InstanceID = ID : ProcedureReturn #True : EndIf + Next + ProcedureReturn #False + EndProcedure + + Procedure _FindByWindow(Win) + ForEach Instances() + If Instances()\Window = Win : ProcedureReturn #True : EndIf + Next + ProcedureReturn #False + EndProcedure + + Procedure _HasPerm(ID, Token.s) + If Not _FindByID(ID) : ProcedureReturn #False : EndIf + ProcedureReturn Bool(FindString(Instances()\Perms, ~"\"" + Token + ~"\"") > 0) + EndProcedure + + Procedure _SendResponse(ID, KMID.s, Success, DataString.s) + !var inst = window._kumos_rt.instances[v_id]; + !if (!inst || !inst.frameEl) return; + !var resp = { kmid: v_kmid, success: !!v_success }; + !if (v_success) { + ! try { resp.data = JSON.parse(v_datastring); } + ! catch(e) { resp.data = v_datastring || null; } + !} else { + ! resp.error = v_datastring || 'Error'; + !} + !try { inst.frameEl.contentWindow.postMessage(JSON.stringify(resp), '*'); } catch(e) {} + EndProcedure + + Procedure.s _StoragePath(ID, RelPath.s) + Protected Base.s + If Not _FindByID(ID) : ProcedureReturn "" : EndIf + Base = "/.apps/" + Instances()\AppID + "/" + If RelPath = "" Or RelPath = "/" : ProcedureReturn Base : EndIf + If Left(RelPath, 1) = "/" : RelPath = Mid(RelPath, 2) : EndIf + ProcedureReturn Base + RelPath + EndProcedure + + Procedure _Remove(ID) + If Not _FindByID(ID) : ProcedureReturn : EndIf + !delete window._kumos_rt.instances[v_id]; + UnbindEvent(#PB_Event_SizeWindow, @Handler_Resize(), Instances()\Window) + UnbindEvent(#PB_Event_CloseWindow, @Handler_Close(), Instances()\Window) + Desktop::Unregister(Instances()\Window) + DeleteElement(Instances()) + EndProcedure + + Procedure _CloseByID(ID) + _Remove(ID) + EndProcedure + + ;- Message dispatcher + Procedure _Dispatch(ID, RawMsg.s) + Protected Root, Args, TType + Protected KMID.s, Action.s, Path.s, Content.s, Title_.s, Msg.s, MsgType.s + + If Not _FindByID(ID) : ProcedureReturn : EndIf + If Not ParseJSON(0, RawMsg) : ProcedureReturn : EndIf + + Root = JSONValue(0) + KMID = GetJSONString(GetJSONMember(Root, "kmid")) + Action = GetJSONString(GetJSONMember(Root, "action")) + Args = GetJSONMember(Root, "args") + + If KMID = "" : FreeJSON(0) : ProcedureReturn : EndIf + + Path = GetJSONString(GetJSONMember(Args, "path")) + Content = GetJSONString(GetJSONMember(Args, "content")) + Title_ = GetJSONString(GetJSONMember(Args, "title")) + Msg = GetJSONString(GetJSONMember(Args, "message")) + MsgType = GetJSONString(GetJSONMember(Args, "type")) + FreeJSON(0) + + Select Action + + Case "window.ready" + _FindByID(ID) + _SendResponse(ID, KMID, #True, ~"{\"app_id\":\"" + ReplaceString(Instances()\AppID, ~"\"", ~"\\\"") + ~"\"}") + + Case "window.setTitle" + _FindByID(ID) + SetWindowTitle(Instances()\Window, Title_) + _SendResponse(ID, KMID, #True, "") + + Case "window.close" + _SendResponse(ID, KMID, #True, "") + !setTimeout(function(){ appruntime$f__closebyid(v_id); }, 50); + + Case "notify.toast" + If Not _HasPerm(ID, "notify") : _SendResponse(ID, KMID, #False, "Permission denied: notify") : ProcedureReturn : EndIf + TType = Notify::#Info + If MsgType = "success" : TType = Notify::#Success + ElseIf MsgType = "warning" : TType = Notify::#Warning + ElseIf MsgType = "error" : TType = Notify::#Error + EndIf + Notify::Toast(Msg, TType) + _SendResponse(ID, KMID, #True, "") + + Case "notify.confirm" + If Not _HasPerm(ID, "notify") : _SendResponse(ID, KMID, #False, "Permission denied: notify") : ProcedureReturn : EndIf + If _PC_ID >= 0 : _SendResponse(ID, KMID, #False, "A dialog is already open") : ProcedureReturn : EndIf + _PC_ID = ID : _PC_KMID = KMID + Notify::Confirm(Title_, Msg, @_ConfirmCallback()) + + Case "storage.list" : _DoList(ID, KMID, _StoragePath(ID, Path)) + Case "storage.stat" : _DoStat(ID, KMID, _StoragePath(ID, Path)) + Case "storage.read" : _DoStatForRead(ID, KMID, _StoragePath(ID, Path)) + Case "storage.write" : _DoWrite(ID, KMID, _StoragePath(ID, Path), Content) + Case "storage.mkdir" : _DoMkdir(ID, KMID, _StoragePath(ID, Path)) + Case "storage.delete" : _DoDelete(ID, KMID, _StoragePath(ID, Path)) + + Case "fs.list" + If Not _HasPerm(ID, "fs.read") : _SendResponse(ID, KMID, #False, "Permission denied: fs.read") : ProcedureReturn : EndIf + _DoList(ID, KMID, Path) + + Case "fs.stat" + If Not _HasPerm(ID, "fs.read") : _SendResponse(ID, KMID, #False, "Permission denied: fs.read") : ProcedureReturn : EndIf + _DoStat(ID, KMID, Path) + + Case "fs.read" + If Not _HasPerm(ID, "fs.read") : _SendResponse(ID, KMID, #False, "Permission denied: fs.read") : ProcedureReturn : EndIf + _DoStatForRead(ID, KMID, Path) + + Case "fs.write" + If Not _HasPerm(ID, "fs.write") : _SendResponse(ID, KMID, #False, "Permission denied: fs.write") : ProcedureReturn : EndIf + _DoWrite(ID, KMID, Path, Content) + + Default + _SendResponse(ID, KMID, #False, "Unknown action: " + Action) + + EndSelect + EndProcedure + + ;- Async FS helpers + Procedure _DoList(ID, KMID.s, Path.s) + If _PL_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PL_ID = ID : _PL_KMID = KMID + HTTPRequest(#PB_HTTP_Get, "/api/fs/list?path=" + URLEncoder(Path, #PB_UTF8), "", @_ListCallback()) + EndProcedure + + Procedure _DoStat(ID, KMID.s, Path.s) + If _PS_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PS_ID = ID : _PS_KMID = KMID + HTTPRequest(#PB_HTTP_Get, "/api/fs/stat?path=" + URLEncoder(Path, #PB_UTF8), "", @_StatCallback()) + EndProcedure + + Procedure _DoStatForRead(ID, KMID.s, Path.s) + If _PSR_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PSR_ID = ID : _PSR_KMID = KMID + HTTPRequest(#PB_HTTP_Get, "/api/fs/stat?path=" + URLEncoder(Path, #PB_UTF8), "", @_StatForReadCallback()) + EndProcedure + + Procedure _DoRead(ID, KMID.s, FileID) + If _PR_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PR_ID = ID : _PR_KMID = KMID + HTTPRequest(#PB_HTTP_Get, "/api/fs/read?id=" + FileID, "", @_ReadCallback()) + EndProcedure + + Procedure _DoWrite(ID, KMID.s, Path.s, Content.s) + If _PW_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PW_ID = ID : _PW_KMID = KMID + HTTPRequest(#PB_HTTP_Post, "/api/fs/write", "path=" + URLEncoder(Path, #PB_UTF8) + "&content=" + URLEncoder(Content, #PB_UTF8), @_WriteCallback()) + EndProcedure + + Procedure _DoMkdir(ID, KMID.s, Path.s) + If _PW_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PW_ID = ID : _PW_KMID = KMID + HTTPRequest(#PB_HTTP_Post, "/api/fs/mkdir", "path=" + URLEncoder(Path, #PB_UTF8), @_WriteCallback()) + EndProcedure + + Procedure _DoDelete(ID, KMID.s, Path.s) + If _PSR_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PSR_ID = ID : _PSR_KMID = "DEL:" + KMID + HTTPRequest(#PB_HTTP_Get, "/api/fs/stat?path=" + URLEncoder(Path, #PB_UTF8), "", @_StatForReadCallback()) + EndProcedure + + ;- Callbacks + Procedure _ListCallback(Success, DataString.s) + Protected ID + Protected KMID.s + If _PL_ID < 0 : ProcedureReturn : EndIf + ID = _PL_ID : KMID = _PL_KMID + _PL_ID = -1 : _PL_KMID = "" + _SendResponse(ID, KMID, Success, DataString) + EndProcedure + + Procedure _StatCallback(Success, DataString.s) + Protected ID + Protected KMID.s + If _PS_ID < 0 : ProcedureReturn : EndIf + ID = _PS_ID : KMID = _PS_KMID + _PS_ID = -1 : _PS_KMID = "" + _SendResponse(ID, KMID, Success, DataString) + EndProcedure + + Procedure _StatForReadCallback(Success, DataString.s) + Protected ID, IsDelete, IsDir, FileID, Root + Protected Tag.s, KMID.s + + If _PSR_ID < 0 : ProcedureReturn : EndIf + ID = _PSR_ID + Tag = _PSR_KMID + _PSR_ID = -1 : _PSR_KMID = "" + + IsDelete = Bool(Left(Tag, 4) = "DEL:") + If IsDelete : KMID = Mid(Tag, 5) : Else : KMID = Tag : EndIf + + If Not Success : _SendResponse(ID, KMID, #False, "Not found") : ProcedureReturn : EndIf + If Not ParseJSON(0, DataString) : _SendResponse(ID, KMID, #False, "Bad stat response") : ProcedureReturn : EndIf + + Root = JSONValue(0) + IsDir = GetJSONInteger(GetJSONMember(Root, "is_dir")) + FileID = GetJSONInteger(GetJSONMember(Root, "id")) + FreeJSON(0) + + If FileID <= 0 : _SendResponse(ID, KMID, #False, "Not found") : ProcedureReturn : EndIf + + If IsDelete + If _PW_ID >= 0 : _SendResponse(ID, KMID, #False, "Busy") : ProcedureReturn : EndIf + _PW_ID = ID : _PW_KMID = KMID + HTTPRequest(#PB_HTTP_Post, "/api/fs/delete", "id=" + FileID, @_WriteCallback()) + Else + If IsDir : _SendResponse(ID, KMID, #False, "Is a directory") : ProcedureReturn : EndIf + _DoRead(ID, KMID, FileID) + EndIf + EndProcedure + + Procedure _ReadCallback(Success, DataString.s) + Protected ID + Protected KMID.s + If _PR_ID < 0 : ProcedureReturn : EndIf + ID = _PR_ID : KMID = _PR_KMID + _PR_ID = -1 : _PR_KMID = "" + _SendResponse(ID, KMID, Success, DataString) + EndProcedure + + Procedure _WriteCallback(Success, DataString.s) + Protected ID, OK + Protected KMID.s + + If _PW_ID < 0 : ProcedureReturn : EndIf + ID = _PW_ID : KMID = _PW_KMID + _PW_ID = -1 : _PW_KMID = "" + + If Not Success : _SendResponse(ID, KMID, #False, "Request failed") : ProcedureReturn : EndIf + + If ParseJSON(0, DataString) + OK = GetJSONBoolean(GetJSONMember(JSONValue(0), "success")) + FreeJSON(0) + _SendResponse(ID, KMID, OK, "") + Else + _SendResponse(ID, KMID, #False, "Bad server response") + EndIf + EndProcedure + + Procedure _ConfirmCallback(Result) + Protected ID + Protected KMID.s, BoolStr.s + + If _PC_ID < 0 : ProcedureReturn : EndIf + ID = _PC_ID : KMID = _PC_KMID + _PC_ID = -1 : _PC_KMID = "" + + BoolStr = "false" + If Result : BoolStr = "true" : EndIf + _SendResponse(ID, KMID, #True, BoolStr) + EndProcedure + + ;- Window event handlers + Procedure Handler_Resize() + If Not _FindByWindow(EventWindow()) : ProcedureReturn : EndIf + ResizeGadget(Instances()\View, 0, 0, WindowWidth(Instances()\Window), WindowHeight(Instances()\Window)) + EndProcedure + + Procedure Handler_Close() + If Not _FindByWindow(EventWindow()) : ProcedureReturn : EndIf + _Remove(Instances()\InstanceID) + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 2 +; Folding = BAAA9 +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/Desktop.sbi b/Client/Includes/Desktop.sbi new file mode 100644 index 0000000..6b23a51 --- /dev/null +++ b/Client/Includes/Desktop.sbi @@ -0,0 +1,603 @@ +Module Desktop + EnableExplicit + + ;- Constants + #Timer_Clock = 0 + #Taskbar_Width = 72 + #Taskbar_ItemHeight = 40 + #Icon_Size = 28 + #Menu_W = 240 + #Menu_Rail_W = 52 + #Menu_Header_H = 32 + #Menu_Row_H = 44 + #Menu_Icon_Size = 22 + + ; Hit-test return values for the start menu + Enumeration + #Hit_None = -1 + #Hit_Settings = -2 + #Hit_Logout = -3 + EndEnumeration + + ;- Globals + ; Colors + Global Color_Bar_Bg = RGB( 28, 28, 40) + Global Color_Bar_Active = RGB( 52, 52, 72) + Global Color_Accent = RGB(100, 120, 255) + Global Color_Icon = RGBA(220, 220, 220, 255) + Global Color_Menu_Bg = RGB( 36, 36, 52) + Global Color_Menu_Rail = RGB( 22, 22, 34) + Global Color_Menu_Header = RGB( 22, 22, 34) + Global Color_Menu_Hover = RGB( 55, 55, 78) + Global Color_Menu_Sep = RGB( 48, 48, 65) + Global Color_Menu_Text = RGB(200, 200, 215) + Global Color_Menu_Dim = RGB(110, 110, 135) + Global Color_Logout_Hover = RGB( 65, 30, 35) + Global Color_Logout_Icon = RGBA(200, 90, 90, 255) + + Global IconFont = LoadFont(#PB_Any, "sans-serif", 18) + Global MenuFont = LoadFont(#PB_Any, "sans-serif", 13) + + ; Desktop windows + Global TaskBarWindow + Global ClockLabel + Global StartButton + Global StartMenuWindow + + ; App registry + Structure App + Name.s + IconImg.i + Proc.i + ID.s + EndStructure + #MaxInstalledApps = 32 + Global Dim AppRegistry.App(#MaxInstalledApps) + Global _AppCount + Global _MenuCanvas + Global _MenuHover = #Hit_None + + ; System shortcut icons (created in Open) + Global _IconSettings + Global _IconLogout + + ; Window manager state + Structure Window + Window.i + Button.i + Name.s + Icon.i + EndStructure + Global _ActiveWindow + Global NewList WindowManager.Window() + + ;- Private declarations + Declare _MakeIconImage(Label.s, Size = #Icon_Size, Color = 0) + Declare _MenuHeight() + Declare _HitTest(MX, MY) + Declare _RebuildMenu() + Declare _DrawMenu() + Declare _CloseMenu() + Declare _FindByWindow(Win) + Declare _FindByButton(Btn) + Declare _DrawButton() + Declare _SetActiveButton() + Declare _RebuildButtons() + Declare _LoadInstalledAppsCallback(Success, DataString.s) + Declare Handler_Logout() + Declare LogoutCallback(Success, Response.s) + Declare Handler_Resize() + Declare Handler_Clock() + Declare Handler_StartButton() + Declare Handler_StartMenu_Focus() + Declare Handler_MenuCanvas() + Declare Handler_TaskbarButton() + Declare Handler_AppClose() + Declare Handler_AppActivate() + + ;- Public procedures + Procedure Open(Username.s) + Protected Width, Height + Protected *AppProc + + Width = DesktopWidth(0) + Height = DesktopHeight(0) + + ; System shortcut icons — pass explicit colors at creation time + _IconSettings = _MakeIconImage("⚙", #Menu_Icon_Size, Color_Logout_Icon) + _IconLogout = _MakeIconImage("⏻", #Menu_Icon_Size, Color_Logout_Icon) + + TaskBarWindow = OpenWindow(#PB_Any, 0, 0, #Taskbar_Width, Height, "", #PB_Window_BorderLess) + BindEvent(#PB_Event_ActivateWindow, @Handler_AppActivate(), TaskBarWindow) + StickyWindow(TaskBarWindow, #True) + SetWindowColor(TaskBarWindow, Color_Bar_Bg) + + StartButton = ButtonGadget(#PB_Any, 0, 0, #Taskbar_Width, #Taskbar_ItemHeight, "≡") + BindGadgetEvent(StartButton, @Handler_StartButton()) + + ClockLabel = TextGadget(#PB_Any, 0, Height - #Taskbar_ItemHeight, #Taskbar_Width, #Taskbar_ItemHeight, "", #PB_Text_Center | #PB_Text_VerticalCenter) + SetGadgetColor(ClockLabel, #PB_Gadget_FrontColor, Color_Menu_Text) + Handler_Clock() + AddWindowTimer(TaskBarWindow, #Timer_Clock, 1000) + BindEvent(#PB_Event_Timer, @Handler_Clock(), TaskBarWindow) + + StartMenuWindow = OpenWindow(#PB_Any, #Taskbar_Width + 4, 0, #Menu_W, 100, "", #PB_Window_BorderLess | #PB_Window_Invisible) + StickyWindow(StartMenuWindow, #True) + _MenuCanvas = CanvasGadget(#PB_Any, 0, 0, #Menu_W, 100) + BindGadgetEvent(_MenuCanvas, @Handler_MenuCanvas()) + + BindEvent(#PB_Event_SizeDesktop, @Handler_Resize()) + BindEvent(#PB_Event_DeactivateWindow, @Handler_StartMenu_Focus(), StartMenuWindow) + + AppRuntime::Init() + !p_appproc = fileexplorer$f_open; + InstallApp("File Explorer", *AppProc, "📁") + !p_appproc = webbrowser$f_open; + InstallApp("Web Browser", *AppProc, "🌐") + !p_appproc = appmanager$f_open; + InstallApp("App Manager", *AppProc, "📦") + Handler_Resize() + + HTTPRequest(#PB_HTTP_Get, "/api/apps/list", "", @_LoadInstalledAppsCallback()) + EndProcedure + + Procedure InstallApp(AppName.s, *LaunchProc, Icon.s = "") + Protected Slot + Protected Label.s + + If _AppCount >= #MaxInstalledApps : ProcedureReturn : EndIf + + Slot = _AppCount + Label = Icon + If Label = "" : Label = Left(AppName, 2) : EndIf + + AppRegistry(Slot)\Name = AppName + AppRegistry(Slot)\Proc = *LaunchProc + AppRegistry(Slot)\IconImg = _MakeIconImage(Label, #Menu_Icon_Size) + + _AppCount + 1 + _RebuildMenu() + EndProcedure + + Procedure Register(AppName.s, Win, Icon.s = "") + Protected Y, GadgetList, Btn + Protected Label.s + + AddElement(WindowManager()) + WindowManager()\Window = Win + WindowManager()\Name = AppName + + Label = Icon + If Label = "" : Label = Left(AppName, 2) : EndIf + WindowManager()\Icon = _MakeIconImage(Label) + + Y = #Taskbar_ItemHeight + (ListIndex(WindowManager()) * #Taskbar_ItemHeight) + GadgetList = UseGadgetList(WindowID(TaskBarWindow)) + Btn = CanvasGadget(#PB_Any, 0, Y, #Taskbar_Width, #Taskbar_ItemHeight) + UseGadgetList(GadgetList) + + WindowManager()\Button = Btn + SetGadgetData(Btn, Win) + SetWindowData(Win, Btn) + + BindGadgetEvent(Btn, @Handler_TaskbarButton()) + BindEvent(#PB_Event_CloseWindow, @Handler_AppClose(), Win) + BindEvent(#PB_Event_ActivateWindow, @Handler_AppActivate(), Win) + + _ActiveWindow = Win + _SetActiveButton() + EndProcedure + + Procedure Unregister(Win) + If Not _FindByWindow(Win) : ProcedureReturn : EndIf + UnbindEvent(#PB_Event_CloseWindow, @Handler_AppClose(), Win) + UnbindEvent(#PB_Event_ActivateWindow, @Handler_AppActivate(), Win) + UnbindGadgetEvent(WindowManager()\Button, @Handler_TaskbarButton()) + FreeGadget(WindowManager()\Button) + CloseWindow(Win) + DeleteElement(WindowManager()) + If _ActiveWindow = Win : _ActiveWindow = GetActiveWindow() : EndIf + _RebuildButtons() + EndProcedure + + Procedure InstallThirdPartyApp(AppID.s, ManifestJSON.s, Permissions.s, Icon.s = "") + Protected Slot, i + Protected AppName.s, Label.s, N.s + + Slot = -1 + For i = 0 To _AppCount - 1 + If AppRegistry(i)\ID = AppID : Slot = i : Break : EndIf + Next + + If Slot < 0 + If _AppCount >= #MaxInstalledApps : ProcedureReturn : EndIf + Slot = _AppCount + _AppCount + 1 + Else + If IsImage(AppRegistry(Slot)\IconImg) : FreeImage(AppRegistry(Slot)\IconImg) : EndIf + EndIf + + AppName = AppID + If ParseJSON(0, ManifestJSON) + N = GetJSONString(GetJSONMember(JSONValue(0), "name")) + If N <> "" : AppName = N : EndIf + FreeJSON(0) + EndIf + + AppRegistry(Slot)\Name = AppName + AppRegistry(Slot)\ID = AppID + + !(function() { + ! var _id = v_appid, _m = v_manifestjson, _p = v_permissions; + ! desktop$a_AppRegistry.array[v_slot]._Proc = function() { + ! appruntime$f_launch(_id, _m, _p); + ! }; + !})(); + + Label = Icon + If Label = "" : Label = "📦" : EndIf + AppRegistry(Slot)\IconImg = _MakeIconImage(Label, #Menu_Icon_Size) + + _RebuildMenu() + EndProcedure + + Procedure UninstallThirdPartyApp(AppID.s) + Protected i, j + For i = 0 To _AppCount - 1 + If AppRegistry(i)\ID = AppID + If IsImage(AppRegistry(i)\IconImg) : FreeImage(AppRegistry(i)\IconImg) : EndIf + ; Compact the registry + For j = i To _AppCount - 2 + AppRegistry(j)\Name = AppRegistry(j + 1)\Name + AppRegistry(j)\ID = AppRegistry(j + 1)\ID + AppRegistry(j)\IconImg = AppRegistry(j + 1)\IconImg + AppRegistry(j)\Proc = AppRegistry(j + 1)\Proc + !desktop$a_AppRegistry.array[v_j]._Proc = desktop$a_AppRegistry.array[v_j + 1]._Proc; + Next + AppRegistry(_AppCount - 1)\Name = "" + AppRegistry(_AppCount - 1)\ID = "" + AppRegistry(_AppCount - 1)\IconImg = 0 + AppRegistry(_AppCount - 1)\Proc = 0 + !desktop$a_AppRegistry.array[desktop$g__appcount]._Proc = 0; + _AppCount - 1 + _RebuildMenu() + ProcedureReturn + EndIf + Next + EndProcedure + + ;- Private procedures + Procedure _MakeIconImage(Label.s, Size = #Icon_Size, Color = 0) + Protected Img + + Img = CreateImage(#PB_Any, Size, Size, 32, RGBA(0, 0, 0, 0)) + If Not IsImage(Img) : ProcedureReturn 0 : EndIf + If StartVectorDrawing(ImageVectorOutput(Img)) + VectorFont(IconFont, Size * 0.65) + If Color = 0 + VectorSourceColor(Color_Icon) + Else + VectorSourceColor(Color) + EndIf + + ;MovePathCursor((Size - VectorTextWidth(Label)) / 2, (Size - VectorTextHeight(Label)) / 2) + ;In 3.20 DrawVectorText() draws vertically centered? + MovePathCursor((Size - VectorTextWidth(Label)) / 2, Size - (VectorTextHeight(Label) / 2)) + DrawVectorText(Label) + StopVectorDrawing() + EndIf + ProcedureReturn Img + EndProcedure + + Procedure _MenuHeight() + Protected RightH = #Menu_Header_H + _AppCount * #Menu_Row_H + 8 + Protected MinH = 2 * #Menu_Row_H + 16 ; always room for both rail shortcuts + If RightH < MinH : ProcedureReturn MinH : EndIf + ProcedureReturn RightH + EndProcedure + + ; Returns app index (>=0), #Hit_Settings, #Hit_Logout, or #Hit_None. + Procedure _HitTest(MX, MY) + Protected H, LogoutY, SettingsY, RY + + H = _MenuHeight() + If MX < #Menu_Rail_W + ; Left rail — system shortcuts are bottom-anchored + LogoutY = H - #Menu_Row_H + SettingsY = H - 2 * #Menu_Row_H + If MY >= SettingsY And MY < LogoutY + ProcedureReturn #Hit_Settings + ElseIf MY >= LogoutY And MY < H + ProcedureReturn #Hit_Logout + EndIf + Else + ; Right panel — app rows below header + RY = MY - #Menu_Header_H + If RY >= 0 And RY < _AppCount * #Menu_Row_H + ProcedureReturn RY / #Menu_Row_H + EndIf + EndIf + ProcedureReturn #Hit_None + EndProcedure + + Procedure _RebuildMenu() + Protected H = _MenuHeight() + If IsWindow(StartMenuWindow) : ResizeWindow(StartMenuWindow, #PB_Ignore, #PB_Ignore, #Menu_W, H) : EndIf + If IsGadget(_MenuCanvas) : ResizeGadget(_MenuCanvas, 0, 0, #Menu_W, H) : EndIf + _DrawMenu() + EndProcedure + + Procedure _DrawMenu() + If Not IsGadget(_MenuCanvas) : ProcedureReturn : EndIf + If Not StartDrawing(CanvasOutput(_MenuCanvas)) : ProcedureReturn : EndIf + + Protected W = OutputWidth() + Protected H = OutputHeight() + Protected TH, IX, IY, i, Y + + ; ── Left rail ──────────────────────────────────────────────────────── + Box(0, 0, #Menu_Rail_W, H, Color_Menu_Rail) + + Protected SettingsY = H - 2 * #Menu_Row_H + Protected LogoutY = H - #Menu_Row_H + + If _MenuHover = #Hit_Settings + Box(0, SettingsY, #Menu_Rail_W, #Menu_Row_H, Color_Menu_Hover) + EndIf + If _MenuHover = #Hit_Logout + Box(0, LogoutY, #Menu_Rail_W, #Menu_Row_H, Color_Logout_Hover) + EndIf + + If IsImage(_IconSettings) + IX = (#Menu_Rail_W - #Menu_Icon_Size) / 2 + IY = SettingsY + (#Menu_Row_H - #Menu_Icon_Size) / 2 + DrawAlphaImage(ImageID(_IconSettings), IX, IY) + EndIf + If IsImage(_IconLogout) + IX = (#Menu_Rail_W - #Menu_Icon_Size) / 2 + IY = LogoutY + (#Menu_Row_H - #Menu_Icon_Size) / 2 + DrawAlphaImage(ImageID(_IconLogout), IX, IY) + EndIf + + ; Separator between rail and right panel + Box(#Menu_Rail_W, 0, 1, H, Color_Menu_Sep) + + ; ── Right panel ────────────────────────────────────────────────────── + Box(#Menu_Rail_W + 1, 0, W - #Menu_Rail_W - 1, H, Color_Menu_Bg) + + ; Header + Box(#Menu_Rail_W + 1, 0, W - #Menu_Rail_W - 1, #Menu_Header_H, Color_Menu_Header) + DrawingMode(#PB_2DDrawing_Transparent) + If IsFont(MenuFont) : DrawingFont(FontID(MenuFont)) : EndIf + TH = TextHeight("A") + DrawText(#Menu_Rail_W + 14, (#Menu_Header_H - TH) / 2, "Apps", Color_Menu_Dim) + + ; App rows + Y = #Menu_Header_H + For i = 0 To _AppCount - 1 + If _MenuHover = i + DrawingMode(#PB_2DDrawing_Default) + Box(#Menu_Rail_W + 1, Y, W - #Menu_Rail_W - 1, #Menu_Row_H, Color_Menu_Hover) + EndIf + If IsImage(AppRegistry(i)\IconImg) + IX = #Menu_Rail_W + 12 + IY = Y + (#Menu_Row_H - #Menu_Icon_Size) / 2 + DrawAlphaImage(ImageID(AppRegistry(i)\IconImg), IX, IY) + EndIf + DrawingMode(#PB_2DDrawing_Transparent) + TH = TextHeight("A") + DrawText(#Menu_Rail_W + 12 + #Menu_Icon_Size + 8, + Y + (#Menu_Row_H - TH) / 2, + AppRegistry(i)\Name, Color_Menu_Text) + Y + #Menu_Row_H + Next + + StopDrawing() + EndProcedure + + Procedure _CloseMenu() + HideWindow(StartMenuWindow, #True) + _MenuHover = #Hit_None + _DrawMenu() + EndProcedure + + Procedure _FindByWindow(Win) + ForEach WindowManager() + If WindowManager()\Window = Win : ProcedureReturn #True : EndIf + Next + EndProcedure + + Procedure _FindByButton(Btn) + ForEach WindowManager() + If WindowManager()\Button = Btn : ProcedureReturn #True : EndIf + Next + EndProcedure + + Procedure _DrawButton() + Protected Active, W, H + + Active = Bool(WindowManager()\Window = _ActiveWindow And _ActiveWindow <> 0) + If Not IsGadget(WindowManager()\Button) : ProcedureReturn : EndIf + If StartDrawing(CanvasOutput(WindowManager()\Button)) + W = OutputWidth() + H = OutputHeight() + If Active + Box(0, 0, W, H, Color_Bar_Active) + Box(0, H / 4, 3, H / 2, Color_Accent) + Else + Box(0, 0, W, H, Color_Bar_Bg) + EndIf + If IsImage(WindowManager()\Icon) + DrawAlphaImage(ImageID(WindowManager()\Icon), (W - #Icon_Size) / 2, (H - #Icon_Size) / 2) + EndIf + StopDrawing() + EndIf + EndProcedure + + Procedure _SetActiveButton() + ForEach WindowManager() + _DrawButton() + Next + EndProcedure + + Procedure _RebuildButtons() + ForEach WindowManager() + ResizeGadget(WindowManager()\Button, 0, #Taskbar_ItemHeight + (ListIndex(WindowManager()) * #Taskbar_ItemHeight), #Taskbar_Width, #Taskbar_ItemHeight) + _DrawButton() + Next + EndProcedure + + Procedure _LoadInstalledAppsCallback(Success, DataString.s) + Protected Root, Total, Item, ManiNode, PermNode, PermCount, i, j + Protected AppID.s, Icon.s, Perms.s, ManiStr.s + + If Not Success Or Not ParseJSON(0, DataString) : ProcedureReturn : EndIf + Root = JSONValue(0) + Total = JSONArraySize(Root) + + For i = 0 To Total - 1 + Item = GetJSONElement(Root, i) + ManiNode = GetJSONMember(Item, "manifest") + AppID = GetJSONString(GetJSONMember(Item, "app_id")) + Icon = GetJSONString(GetJSONMember(ManiNode, "icon")) + + PermNode = GetJSONMember(Item, "permissions") + PermCount = JSONArraySize(PermNode) + Perms = "[" + For j = 0 To PermCount - 1 + If j > 0 : Perms + "," : EndIf + Perms + ~"\"" + GetJSONString(GetJSONElement(PermNode, j)) + ~"\"" + Next + Perms + "]" + + ; Re-serialise the manifest object to a JSON string for InstallThirdPartyApp + ManiStr = "{" + + ~"\"id\":\"" + GetJSONString(GetJSONMember(ManiNode, "id")) + ~"\"," + + ~"\"name\":\"" + GetJSONString(GetJSONMember(ManiNode, "name")) + ~"\"," + + ~"\"version\":\"" + GetJSONString(GetJSONMember(ManiNode, "version")) + ~"\"," + + ~"\"icon\":\"" + ReplaceString(Icon, ~"\"", ~"\\\"") + ~"\"," + + ~"\"entry\":\"" + GetJSONString(GetJSONMember(ManiNode, "entry")) + ~"\"}" + + InstallThirdPartyApp(AppID, ManiStr, Perms, Icon) + Next + FreeJSON(0) + EndProcedure + + ;- Event handlers + Procedure Handler_Resize() + Protected Width = DesktopWidth(0) + Protected Height = DesktopHeight(0) + ResizeWindow(TaskBarWindow, 0, 0, #Taskbar_Width, Height) + ResizeGadget(ClockLabel, 0, Height - #Taskbar_ItemHeight, #Taskbar_Width, #Taskbar_ItemHeight) + EndProcedure + + Procedure Handler_Clock() + SetGadgetText(ClockLabel, FormatDate("%hh:%ii:%ss", Date())) + EndProcedure + + Procedure Handler_StartButton() + HideWindow(StartMenuWindow, #False) + SetActiveWindow(StartMenuWindow) + EndProcedure + + Procedure Handler_StartMenu_Focus() + _CloseMenu() + EndProcedure + + Procedure Handler_Logout() + HTTPRequest(#PB_HTTP_Post, "/api/auth/logout", "", @LogoutCallback()) + EndProcedure + + Procedure LogoutCallback(Success, Response.s) + !location.reload() + EndProcedure + + Procedure Handler_MenuCanvas() + Protected EType, MX, MY, Hit + + EType = EventType() + MX = GetGadgetAttribute(_MenuCanvas, #PB_Canvas_MouseX) + MY = GetGadgetAttribute(_MenuCanvas, #PB_Canvas_MouseY) + Hit = _HitTest(MX, MY) + + Select EType + Case #PB_EventType_MouseMove + If Hit <> _MenuHover + _MenuHover = Hit + _DrawMenu() + EndIf + + Case #PB_EventType_MouseLeave + If _MenuHover <> #Hit_None + _MenuHover = #Hit_None + _DrawMenu() + EndIf + + Case #PB_EventType_LeftButtonUp + Select Hit + Case #Hit_Settings + _CloseMenu() + !settings$f_open(); + + Case #Hit_Logout + _CloseMenu() + Handler_Logout() + + Default + If Hit >= 0 And Hit < _AppCount And AppRegistry(Hit)\Proc <> 0 + _CloseMenu() + !desktop$a_AppRegistry.array[v_hit]._Proc(); + EndIf + EndSelect + EndSelect + EndProcedure + + Procedure Handler_TaskbarButton() + Protected Btn, Win + If EventType() <> #PB_EventType_LeftButtonUp : ProcedureReturn : EndIf + Btn = EventGadget() + Win = GetGadgetData(Btn) + If Not IsWindow(Win) : ProcedureReturn : EndIf + If _ActiveWindow = Win + HideWindow(Win, #True) + _ActiveWindow = 0 + Else + HideWindow(Win, #False) + SetActiveWindow(Win) + _ActiveWindow = Win + EndIf + _SetActiveButton() + EndProcedure + + Procedure Handler_AppClose() + Protected Win = EventWindow() + If Not _FindByWindow(Win) : ProcedureReturn : EndIf + UnbindEvent(#PB_Event_CloseWindow, @Handler_AppClose(), Win) + UnbindEvent(#PB_Event_ActivateWindow, @Handler_AppActivate(), Win) + UnbindGadgetEvent(WindowManager()\Button, @Handler_TaskbarButton()) + FreeGadget(WindowManager()\Button) + DeleteElement(WindowManager()) + If _ActiveWindow = Win : _ActiveWindow = GetActiveWindow() : EndIf + _RebuildButtons() + CloseWindow(Win) + EndProcedure + + Procedure Handler_AppActivate() + Protected Win = EventWindow() + If Win = TaskBarWindow : ProcedureReturn : EndIf + _ActiveWindow = Win + _SetActiveButton() + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 95 +; FirstLine = 82 +; Folding = BAAAg +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/FS.sbi b/Client/Includes/FS.sbi new file mode 100644 index 0000000..ea94391 --- /dev/null +++ b/Client/Includes/FS.sbi @@ -0,0 +1,251 @@ +Module FS + EnableExplicit + + ;- Globals + ; Pending operation state + ; Safe because JS is single-threaded — one Read_ and one Write in flight at most. + Global _R_ID.s, _R_Path.s, _R_Content.s, *_R_Cb + Global _W_ID.s, _W_Path.s, _W_Content.s, *_W_Cb + + ;- Private declarations + Declare _FindLastSlash(Path.s) + Declare _ReadExistsCallback(Success, DataString.s) + Declare _ReadCachedCallback(Success, DataString.s) + Declare _ReadServerCallback(Success, DataString.s) + Declare _ReadCacheStoreCallback(Success, DataString.s) + Declare _WriteCacheCallback(Success, DataString.s) + Declare _WriteServerCallback(Success, DataString.s) + + ;- Public procedures + + ; List directory contents. + ; DataString = JSON array of {id, name, is_dir, mime_type, size, modified_at} + Procedure List(Path.s, *Callback) + HTTPRequest(#PB_HTTP_Get, "/api/fs/list?path=" + URLEncoder(Path, #PB_UTF8), "", *Callback) + EndProcedure + + ; Stat a single node. + ; DataString = JSON object with id, name, is_dir, size, etc. or error. + Procedure Stat(Path.s, *Callback) + HTTPRequest(#PB_HTTP_Get, "/api/fs/stat?path=" + URLEncoder(Path, #PB_UTF8), "", *Callback) + EndProcedure + + ; Read file content. Cache-first: if the file is in IndexedDB, returns it + ; immediately without a server round-trip. Otherwise fetches from server + ; and populates the cache for next time. + ; FileID = string form of the numeric node id (from Stat or List). + ; Path = virtual path, stored in cache meta for Sync to use later. + Procedure Read_(FileID.s, Path.s, *Callback) + _R_ID = FileID + _R_Path = Path + *_R_Cb = *Callback + FileCache::Exists(FileID, @_ReadExistsCallback()) + EndProcedure + + ; Write content. Hits the cache immediately (dirty), fires the callback, + ; then syncs to the server best-effort in the background. + ; If the server write fails the file stays dirty — Sync() will retry it. + Procedure Write(FileID.s, Path.s, Content.s, *Callback) + _W_ID = FileID + _W_Path = Path + _W_Content = Content + *_W_Cb = *Callback + FileCache::Write(FileID, Content, @_WriteCacheCallback()) + EndProcedure + + ; Create a directory. + ; DataString = JSON {success:true, id:N} or error. + Procedure Mkdir(Path.s, *Callback) + HTTPRequest(#PB_HTTP_Post, "/api/fs/mkdir", "path=" + URLEncoder(Path, #PB_UTF8), *Callback) + EndProcedure + + ; Delete a node by ID. Evicts from cache too. + ; DataString = JSON {success:true} or error. + Procedure Delete_(FileID.s, *Callback) + FileCache::Evict(FileID, #Null) ; best-effort, don't wait + HTTPRequest(#PB_HTTP_Post, "/api/fs/delete", "id=" + FileID, *Callback) + EndProcedure + + ; Move/rename a node by ID. + ; DataString = JSON {success:true} or error. + Procedure Move(FileID.s, NewParentID.s, NewName.s, *Callback) + HTTPRequest(#PB_HTTP_Post, "/api/fs/move", "id=" + FileID + "&to_parent_id=" + NewParentID + "&name=" + URLEncoder(NewName, #PB_UTF8), *Callback) + EndProcedure + + ; Push all dirty cached files to the server sequentially. + Procedure Sync(*Callback) + !var _cb = p_callback; + !var _db = window._kumos_idb; + !if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + ! + !// Collect dirty entries from file_meta + !var tx = _db.transaction(['file_meta'], 'readonly'); + !var store = tx.objectStore('file_meta'); + !var req = store.openCursor(); + !var dirty = []; + ! + !req.onsuccess = function(ev) { + ! var cursor = ev.target.result; + ! if (cursor) { + ! try { + ! var meta = JSON.parse(cursor.value); + ! if (meta.dirty) dirty.push({ id: String(cursor.key), path: meta.path }); + ! } catch(e) {} + ! cursor.continue(); + ! } + !}; + ! + !tx.oncomplete = function() { + ! if (dirty.length === 0) { + ! if (_cb) _cb(1, JSON.stringify({ synced: 0, failed: 0 })); + ! return; + ! } + ! + ! var synced = 0, failed = 0, total = dirty.length; + ! + ! function markClean(id, onDone) { + ! var wtx = _db.transaction(['file_meta'], 'readwrite'); + ! var ws = wtx.objectStore('file_meta'); + ! var gr = ws.get(id); + ! gr.onsuccess = function(ev) { + ! var m = {}; + ! try { m = JSON.parse(ev.target.result || '{}'); } catch(e) {} + ! m.dirty = false; + ! ws.put(JSON.stringify(m), id); + ! }; + ! wtx.oncomplete = onDone; + ! wtx.onerror = onDone; + ! } + ! + ! function syncNext(i) { + ! if (i >= total) { + ! if (_cb) _cb(failed === 0 ? 1 : 0, + ! JSON.stringify({ synced: synced, failed: failed })); + ! return; + ! } + ! var entry = dirty[i]; + ! + ! // Read content from IDB + ! var rtx = _db.transaction(['file_content'], 'readonly'); + ! var rreq = rtx.objectStore('file_content').get(entry.id); + ! + ! rreq.onsuccess = function(ev) { + ! var content = ev.target.result !== undefined ? String(ev.target.result) : ''; + ! + ! // POST to server + ! fetch('/api/fs/write', { + ! method: 'POST', + ! headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + ! body: 'path=' + encodeURIComponent(entry.path) + + ! '&content=' + encodeURIComponent(content) + ! }) + ! .then(function(r) { return r.json(); }) + ! .then(function(json) { + ! if (json.success) { + ! markClean(entry.id, function() { synced++; syncNext(i + 1); }); + ! } else { + ! failed++; syncNext(i + 1); + ! } + ! }) + ! .catch(function() { failed++; syncNext(i + 1); }); + ! }; + ! + ! rreq.onerror = function() { failed++; syncNext(i + 1); }; + ! } + ! + ! syncNext(0); + !}; + ! + !tx.onerror = function(e) { + ! if (_cb) _cb(0, e.target.error ? e.target.error.message : 'sync scan failed'); + !}; + EndProcedure + + Procedure.s GetFilePart(Path.s) + Protected Last = _FindLastSlash(Path) + If Last = 0 : ProcedureReturn Path : EndIf + ProcedureReturn Mid(Path, Last + 1) + EndProcedure + + Procedure.s GetPathPart(Path.s) + Protected Last = _FindLastSlash(Path) + If Last = 0 : ProcedureReturn "/" : EndIf ; no slash — return root + ProcedureReturn Left(Path, Last) ; includes the trailing slash + EndProcedure + + ;- Private procedures + + Procedure _FindLastSlash(Path.s) + Protected Pos, Last + Pos = FindString(Path, "/") + While Pos > 0 + Last = Pos + Pos = FindString(Path, "/", Pos + 1) + Wend + ProcedureReturn Last + EndProcedure + + Procedure _ReadExistsCallback(Success, DataString.s) + Debug "Exists → Success=" + Success + " Data=" + DataString + If Success And DataString = "1" + ; Cache hit — return directly + FileCache::Read_(_R_ID, @_ReadCachedCallback()) + Else + ; Cache miss — fetch from server + HTTPRequest(#PB_HTTP_Get, "/api/fs/read?id=" + _R_ID, "", @_ReadServerCallback()) + EndIf + EndProcedure + + Procedure _ReadCachedCallback(Success, DataString.s) + If *_R_Cb + !fs$g__r_cb(v_success, v_datastring); + EndIf + EndProcedure + + Procedure _ReadServerCallback(Success, DataString.s) + If Success + _R_Content = DataString + FileCache::Cache(_R_ID, _R_Path, DataString, @_ReadCacheStoreCallback()) + Else + !fs$g__r_cb(0, v_datastring); + EndIf + EndProcedure + + Procedure _ReadCacheStoreCallback(Success, DataString.s) + Protected Content.s = _R_Content + If *_R_Cb + !fs$g__r_cb(1, v_content); + EndIf + EndProcedure + + Procedure _WriteCacheCallback(Success, DataString.s) + If *_W_Cb + !fs$g__w_cb(v_success, v_datastring); + EndIf + If Success + HTTPRequest(#PB_HTTP_Post, "/api/fs/write", "path=" + URLEncoder(_W_Path, #PB_UTF8) + "&content=" + URLEncoder(_W_Content, #PB_UTF8), @_WriteServerCallback()) + EndIf + EndProcedure + + Procedure _WriteServerCallback(Success, DataString.s) + If Success + If ParseJSON(0, DataString) + If GetJSONBoolean(GetJSONMember(JSONValue(0), "success")) + FileCache::MarkClean(_W_ID, #Null) + EndIf + FreeJSON(0) + EndIf + EndIf + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 21 +; Folding = BAA- +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/FileCache.sbi b/Client/Includes/FileCache.sbi new file mode 100644 index 0000000..7c387f2 --- /dev/null +++ b/Client/Includes/FileCache.sbi @@ -0,0 +1,166 @@ +Module FileCache + EnableExplicit + + ;- Constants + ; Store names (also used in IDB::Init in General.sbi) + #Store_Content = "file_content" + #Store_Meta = "file_meta" + + ; Metadata JSON shape: + ; { "path": "/home/alice/doc.txt", "dirty": false, "cached_at": 1234567890, "size": 42 } + + ;- Public procedures + + ; Store a file fetched from the server into the cache. + ; Writes content and meta atomically in one transaction. + Procedure Cache(FileID.s, Path.s, Content.s, *Callback) + !var _cb = p_callback; + !var _id = v_fileid; + !var _path = v_path; + !var _content = v_content; + !var _db = window._kumos_idb; + !if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + ! + !var tx = _db.transaction(['file_content','file_meta'], 'readwrite'); + !var contentStore = tx.objectStore('file_content'); + !var metaStore = tx.objectStore('file_meta'); + ! + !var meta = JSON.stringify({ + ! path: _path, + ! dirty: false, + ! cached_at: Date.now(), + ! size: _content.length + !}); + ! + !contentStore.put(_content, _id).onerror = function(e) { tx.abort(); }; + !metaStore.put(meta, _id).onerror = function(e) { tx.abort(); }; + ! + !tx.oncomplete = function() { if (_cb) _cb(1, ''); }; + !tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'cache failed'); }; + !tx.onabort = function(e) { if (_cb) _cb(0, 'cache aborted'); }; + EndProcedure + + ; Read cached content. Data = raw file content string. + ; Data = "" if file is not in cache (Success is still #True). + Procedure Read_(FileID.s, *Callback) + IDB::Get(#Store_Content, FileID, *Callback) + EndProcedure + + ; Write updated content to the cache and mark the file dirty. + ; Patches meta without replacing path or other fields. + Procedure Write(FileID.s, Content.s, *Callback) + !var _cb = p_callback; + !var _id = v_fileid; + !var _content = v_content; + !var _db = window._kumos_idb; + !if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + ! + !var tx = _db.transaction(['file_content','file_meta'], 'readwrite'); + !var contentStore = tx.objectStore('file_content'); + !var metaStore = tx.objectStore('file_meta'); + ! + !contentStore.put(_content, _id); + ! + !var getReq = metaStore.get(_id); + !getReq.onsuccess = function(ev) { + ! var meta = {}; + ! try { meta = JSON.parse(ev.target.result || '{}'); } catch(e) {} + ! meta.dirty = true; + ! meta.size = _content.length; + ! meta.cached_at = Date.now(); + ! metaStore.put(JSON.stringify(meta), _id); + !}; + ! + !tx.oncomplete = function() { if (_cb) _cb(1, ''); }; + !tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'write failed'); }; + EndProcedure + + ; Get the metadata JSON string for a cached file. + Procedure GetMeta(FileID.s, *Callback) + IDB::Get(#Store_Meta, FileID, *Callback) + EndProcedure + + ; Mark a cached file as clean after a successful sync to the server. + Procedure MarkClean(FileID.s, *Callback) + !var _cb = p_callback; + !var _id = v_fileid; + !var _db = window._kumos_idb; + !if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + ! + !var tx = _db.transaction(['file_meta'], 'readwrite'); + !var store = tx.objectStore('file_meta'); + !var req = store.get(_id); + !req.onsuccess = function(ev) { + ! var meta = {}; + ! try { meta = JSON.parse(ev.target.result || '{}'); } catch(e) {} + ! meta.dirty = false; + ! store.put(JSON.stringify(meta), _id); + !}; + ! + !tx.oncomplete = function() { if (_cb) _cb(1, ''); }; + !tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'markclean failed'); }; + EndProcedure + + ; Remove a file from the cache entirely (both content and meta). + Procedure Evict(FileID.s, *Callback) + !var _cb = p_callback; + !var _id = v_fileid; + !var _db = window._kumos_idb; + !if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + ! + !var tx = _db.transaction(['file_content','file_meta'], 'readwrite'); + !tx.objectStore('file_content').delete(_id); + !tx.objectStore('file_meta').delete(_id); + ! + !tx.oncomplete = function() { if (_cb) _cb(1, ''); }; + !tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'evict failed'); }; + EndProcedure + + ; Return all cached file IDs as a JSON array. + Procedure ListCached(*Callback) + IDB::GetAllKeys(#Store_Meta, *Callback) + EndProcedure + + ; Return only the dirty file IDs as a JSON array. + ; These are files that have been written locally but not yet synced. + Procedure ListDirty(*Callback) + !var _cb = p_callback; + !var _db = window._kumos_idb; + !if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + ! + !var tx = _db.transaction(['file_meta'], 'readonly'); + !var store = tx.objectStore('file_meta'); + !var req = store.openCursor(); + !var dirty = []; + ! + !req.onsuccess = function(ev) { + ! var cursor = ev.target.result; + ! if (cursor) { + ! try { + ! var meta = JSON.parse(cursor.value); + ! if (meta.dirty) dirty.push(String(cursor.key)); + ! } catch(e) {} + ! cursor.continue(); + ! } + !}; + ! + !tx.oncomplete = function() { if (_cb) _cb(1, JSON.stringify(dirty)); }; + !tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'listdirty failed'); }; + EndProcedure + + ; Returns "1" if the file is in the cache, "0" if not. + Procedure Exists(FileID.s, *Callback) + IDB::Exists(#Store_Meta, FileID, *Callback) + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 156 +; Folding = Bw +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/General.sbi b/Client/Includes/General.sbi new file mode 100644 index 0000000..00e4d34 --- /dev/null +++ b/Client/Includes/General.sbi @@ -0,0 +1,48 @@ +Module General + EnableExplicit + + Procedure CheckCallback(Success, Response.s) + Protected Authenticated, Root + Protected Username.s + + If Success + If ParseJSON(0, Response) + Root = JSONValue(0) + Authenticated = GetJSONBoolean(GetJSONMember(Root, "authenticated")) + If Authenticated + Username = GetJSONString(GetJSONMember(Root, "username")) + EndIf + FreeJSON(0) + EndIf + EndIf + + If Authenticated And Username <> "" + Desktop::Open(Username) + Else + Login::Open() + EndIf + EndProcedure + + Procedure IDBCallback(Success, DataString.s) + If Success + HTTPRequest(#PB_HTTP_Get, "/api/auth/check", "", @CheckCallback()) + Else + Debug "IDB Init failed: " + DataString + EndIf + EndProcedure + + Procedure Init() + IDB::Init("kumos", 1, "file_content,file_meta", @IDBCallback()) + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 38 +; Folding = - +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/Login.sbi b/Client/Includes/Login.sbi new file mode 100644 index 0000000..f5e752a --- /dev/null +++ b/Client/Includes/Login.sbi @@ -0,0 +1,85 @@ +Module Login + EnableExplicit + + ;- Private constants + #Window_Width = 400 + #Window_Height = 165 + + ;- Private variables + Global Window + Global UsernameLabel, UsernameInput, PasswordLabel, PasswordInput, ConnectButton + + ;- Private declarations + Declare Handler_BrowserResize() + Declare Handler_ConnectButton() + Declare Handler_Login(Success, Result.s, UserData) + + ;- Public procedures + Procedure Open() + Window = OpenWindow(#PB_Any, 0, 0, #Window_Width, #Window_Height, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess) + + UsernameLabel = TextGadget(#PB_Any, 30, 33, 100, 20, "Username: ") + UsernameInput = StringGadget(#PB_Any, 120, 30, 250, 20, "") + PasswordLabel = TextGadget(#PB_Any, 30, 73, 100, 20, "Password: ") + PasswordInput = StringGadget(#PB_Any, 120, 70, 250, 20, "", #PB_String_Password) + ConnectButton = ButtonGadget(#PB_Any, 30, 110, #Window_Width - 60, 25, "Connect") + SetActiveGadget(UsernameInput) + + BindGadgetEvent(ConnectButton, @Handler_ConnectButton()) + BindEvent(#PB_Event_SizeDesktop, @Handler_BrowserResize()) + EndProcedure + + ;- Private procedures + Procedure Handler_BrowserResize() + Protected _Width = DesktopWidth(0) + Protected _Height = DesktopHeight(0) + ResizeWindow(Window, (_Width - #Window_Width) * 0.5, (_Height - #Window_Height) * 0.5, #PB_Ignore, #PB_Ignore) + EndProcedure + + Procedure Handler_ConnectButton() + Protected Username.s = GetGadgetText(UsernameInput) + Protected Password.s = GetGadgetText(PasswordInput) + + If Username = "" Or Password = "" + Notify::Toast("Invalid username or password.", Notify::#Error) + ProcedureReturn + EndIf + + HTTPRequest(#PB_HTTP_Post, "/api/auth/login", "username=" + URLEncoder(Username, #PB_UTF8) + "&password=" + URLEncoder(Password, #PB_UTF8), @Handler_Login()) + EndProcedure + + Procedure Handler_Login(Success, Result.s, UserData) + Protected Root, OK + Protected Username.s + + If Success + If ParseJSON(0, Result) + Root = JSONValue(0) + OK = GetJSONBoolean(GetJSONMember(Root, "success")) + If OK + Username = GetJSONString(GetJSONMember(Root, "username")) + UnbindGadgetEvent(ConnectButton, @Handler_ConnectButton()) + UnbindEvent(#PB_Event_SizeDesktop, @Handler_BrowserResize()) + CloseWindow(Window) + Desktop::Open(Username) + Else + Notify::Toast("Invalid username or password.", Notify::#Error) + EndIf + FreeJSON(0) + EndIf + Else + Notify::Toast("Connection failed. Try again.", Notify::#Error) + EndIf + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 51 +; Folding = h +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/Modules.sbi b/Client/Includes/Modules.sbi new file mode 100644 index 0000000..e5089ea --- /dev/null +++ b/Client/Includes/Modules.sbi @@ -0,0 +1,69 @@ +DeclareModule General + Declare Init() +EndDeclareModule + +DeclareModule FileCache + Declare Cache(FileID.s, Path.s, Content.s, *Callback) + Declare Read_(FileID.s, *Callback) + Declare Write(FileID.s, Content.s, *Callback) + Declare GetMeta(FileID.s, *Callback) + Declare MarkClean(FileID.s, *Callback) + Declare Evict(FileID.s, *Callback) + Declare ListCached(*Callback) + Declare ListDirty(*Callback) + Declare Exists(FileID.s, *Callback) +EndDeclareModule + +DeclareModule FS + Declare List(Path.s, *Callback) + Declare Stat(Path.s, *Callback) + Declare Read_(FileID.s, Path.s, *Callback) + Declare Write(FileID.s, Path.s, Content.s, *Callback) + Declare Mkdir(Path.s, *Callback) + Declare Delete_(FileID.s, *Callback) + Declare Move(FileID.s, NewParentID.s, NewName.s, *Callback) + Declare Sync(*Callback) + + Declare.s GetFilePart(Path.s) + Declare.s GetPathPart(Path.s) +EndDeclareModule + +DeclareModule Login + Declare Open() +EndDeclareModule + +DeclareModule Desktop + Declare Open(Username.s) + Declare InstallApp(AppName.s, *LaunchProc, Icon.s = "") + Declare Register(AppName.s, Win, Icon.s = "") + Declare Unregister(Win) + Declare InstallThirdPartyApp(AppID.s, ManifestJSON.s, Permissions.s, Icon.s = "") + Declare UninstallThirdPartyApp(AppID.s) +EndDeclareModule + +DeclareModule Notify + Enumeration + #Info + #Success + #Warning + #Error + EndEnumeration + + Declare Toast(Message.s, Type = #Info, Duration = 4000) + Declare Confirm(Title.s, Message.s, *Callback) +EndDeclareModule + +DeclareModule AppRuntime + Declare Init() + Declare Launch(AppID.s, ManifestJSON.s, Permissions.s) +EndDeclareModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 59 +; Folding = -- +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Includes/Notify.sbi b/Client/Includes/Notify.sbi new file mode 100644 index 0000000..5da8eb0 --- /dev/null +++ b/Client/Includes/Notify.sbi @@ -0,0 +1,241 @@ +Module Notify + EnableExplicit + + ;- Toast constants + #Toast_W = 300 + #Toast_H = 60 + #Toast_Margin = 10 + #Accent_W = 4 + #Toast_Timer = 0 + #MaxToasts = 5 + + ;- Globals + Global _Font = LoadFont(#PB_Any, "sans-serif", 12) + + ; Toast state + Global Dim _Wins.i(#MaxToasts) + Global Dim _Canvases.i(#MaxToasts) + Global Dim _Types.i(#MaxToasts) + Global Dim _Messages.s(#MaxToasts) + Global _Count + + ; Confirm state + Global _ConfirmWin + Global _ConfirmOkBtn + Global _ConfirmCancelBtn + Global *_ConfirmCb + + ;- Private declarations + Declare _TypeColor(Type) + Declare _DrawToast(Slot) + Declare _Dismiss(Slot) + Declare _Reposition() + Declare _FindByWindow(Win) + Declare _FindByCanvas(Canvas) + Declare _CloseConfirm() + Declare _FireConfirm(Result) + Declare Handler_ToastTimer() + Declare Handler_ToastClick() + Declare Handler_ConfirmOK() + Declare Handler_ConfirmCancel() + Declare Handler_ConfirmClose() + + ;- Public procedures + + ; Show a toast in the bottom-right corner. Dismisses after Duration ms or on click. + Procedure Toast(Message.s, Type = #Info, Duration = 4000) + Protected Slot, DW, DH, X, Y, Win, Canvas + + If _Count >= #MaxToasts : ProcedureReturn : EndIf + + Slot = _Count + DW = DesktopWidth(0) + DH = DesktopHeight(0) + X = DW - #Toast_W - #Toast_Margin + Y = DH - (Slot + 1) * (#Toast_H + #Toast_Margin) + Win = OpenWindow(#PB_Any, X, Y, #Toast_W, #Toast_H, "", #PB_Window_BorderLess) + StickyWindow(Win, #True) + Canvas = CanvasGadget(#PB_Any, 0, 0, #Toast_W, #Toast_H) + + _Wins(Slot) = Win + _Canvases(Slot) = Canvas + _Types(Slot) = Type + _Messages(Slot) = Message + _Count + 1 + + _DrawToast(Slot) + + BindGadgetEvent(Canvas, @Handler_ToastClick()) + AddWindowTimer(Win, #Toast_Timer, Duration) + BindEvent(#PB_Event_Timer, @Handler_ToastTimer(), Win) + EndProcedure + + ; Show a modal confirm dialog. *Callback(Result) is called with 1 for OK, 0 for Cancel. + ; Only one confirm can be open at a time — subsequent calls are ignored. + Procedure Confirm(Title.s, Message.s, *Callback) + Protected W, H, DW, DH + + If IsWindow(_ConfirmWin) : ProcedureReturn : EndIf + + W = 340 + H = 130 + DW = DesktopWidth(0) + DH = DesktopHeight(0) + + _ConfirmWin = OpenWindow(#PB_Any, (DW - W) / 2, (DH - H) / 2, W, H, Title, #PB_Window_TitleBar | #PB_Window_SystemMenu) + StickyWindow(_ConfirmWin, #True) + *_ConfirmCb = *Callback + + TextGadget(#PB_Any, 20, 20, W - 40, 50, Message) + _ConfirmOkBtn = ButtonGadget(#PB_Any, W - 190, H - 45, 80, 30, "OK") + _ConfirmCancelBtn = ButtonGadget(#PB_Any, W - 100, H - 45, 80, 30, "Cancel") + + BindGadgetEvent(_ConfirmOkBtn, @Handler_ConfirmOK()) + BindGadgetEvent(_ConfirmCancelBtn, @Handler_ConfirmCancel()) + BindEvent(#PB_Event_CloseWindow, @Handler_ConfirmClose(), _ConfirmWin) + EndProcedure + + ;- Private procedures + + Procedure _TypeColor(Type) + Select Type + Case #Success : ProcedureReturn RGB( 60, 180, 100) + Case #Warning : ProcedureReturn RGB(220, 160, 40) + Case #Error : ProcedureReturn RGB(210, 65, 65) + Default : ProcedureReturn RGB( 50, 130, 220) ; #Info + EndSelect + EndProcedure + + Procedure _DrawToast(Slot) + Protected W, H, MaxW + Protected Msg.s + + If Not IsGadget(_Canvases(Slot)) : ProcedureReturn : EndIf + If Not StartDrawing(CanvasOutput(_Canvases(Slot))) : ProcedureReturn : EndIf + + W = OutputWidth() + H = OutputHeight() + + ; Background + Box(0, 0, W, H, RGB(38, 38, 54)) + + ; Accent bar + Box(0, 0, #Accent_W, H, _TypeColor(_Types(Slot))) + + ; Message — truncate with ellipsis if too wide + DrawingMode(#PB_2DDrawing_Transparent) + If IsFont(_Font) : DrawingFont(FontID(_Font)) : EndIf + + Msg = _Messages(Slot) + MaxW = W - #Accent_W - 24 + While Len(Msg) > 3 And TextWidth(Msg) > MaxW + Msg = Left(Msg, Len(Msg) - 4) + "..." + Wend + + DrawText(#Accent_W + 14, (H - TextHeight("A")) / 2, Msg, RGB(220, 220, 220)) + StopDrawing() + EndProcedure + + Procedure _Dismiss(Slot) + Protected i + + If Not IsWindow(_Wins(Slot)) : ProcedureReturn : EndIf + + UnbindEvent(#PB_Event_Timer, @Handler_ToastTimer(), _Wins(Slot)) + UnbindGadgetEvent(_Canvases(Slot), @Handler_ToastClick()) + CloseWindow(_Wins(Slot)) + + For i = Slot To _Count - 2 + _Wins(i) = _Wins(i + 1) + _Canvases(i) = _Canvases(i + 1) + _Types(i) = _Types(i + 1) + _Messages(i) = _Messages(i + 1) + Next + _Wins(_Count - 1) = 0 + _Canvases(_Count - 1) = 0 + _Types(_Count - 1) = 0 + _Messages(_Count - 1) = "" + _Count - 1 + + _Reposition() + EndProcedure + + Procedure _Reposition() + Protected DW, DH, i + + DW = DesktopWidth(0) + DH = DesktopHeight(0) + For i = 0 To _Count - 1 + ResizeWindow(_Wins(i), DW - #Toast_W - #Toast_Margin, DH - (i + 1) * (#Toast_H + #Toast_Margin), #PB_Ignore, #PB_Ignore) + Next + EndProcedure + + Procedure _FindByWindow(Win) + Protected i + For i = 0 To _Count - 1 + If _Wins(i) = Win : ProcedureReturn i : EndIf + Next + ProcedureReturn -1 + EndProcedure + + Procedure _FindByCanvas(Canvas) + Protected i + For i = 0 To _Count - 1 + If _Canvases(i) = Canvas : ProcedureReturn i : EndIf + Next + ProcedureReturn -1 + EndProcedure + + Procedure _CloseConfirm() + UnbindGadgetEvent(_ConfirmOkBtn, @Handler_ConfirmOK()) + UnbindGadgetEvent(_ConfirmCancelBtn, @Handler_ConfirmCancel()) + UnbindEvent(#PB_Event_CloseWindow, @Handler_ConfirmClose(), _ConfirmWin) + CloseWindow(_ConfirmWin) + _ConfirmWin = 0 + EndProcedure + + Procedure _FireConfirm(Result) + _CloseConfirm() + If *_ConfirmCb + !notify$g__confirmcb(v_result); + *_ConfirmCb = 0 + EndIf + EndProcedure + + ;- Event handlers + + Procedure Handler_ToastTimer() + Protected Slot = _FindByWindow(EventWindow()) + If Slot >= 0 : _Dismiss(Slot) : EndIf + EndProcedure + + Procedure Handler_ToastClick() + Protected Slot + If EventType() <> #PB_EventType_LeftButtonUp : ProcedureReturn : EndIf + Slot = _FindByCanvas(EventGadget()) + If Slot >= 0 : _Dismiss(Slot) : EndIf + EndProcedure + + Procedure Handler_ConfirmOK() + _FireConfirm(1) + EndProcedure + + Procedure Handler_ConfirmCancel() + _FireConfirm(0) + EndProcedure + + Procedure Handler_ConfirmClose() + _FireConfirm(0) + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 13 +; Folding = BAw +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/KUMOS.sbp b/Client/KUMOS.sbp new file mode 100644 index 0000000..5099282 --- /dev/null +++ b/Client/KUMOS.sbp @@ -0,0 +1,85 @@ + + + +
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
diff --git a/Client/Libraries/IDB.sbi b/Client/Libraries/IDB.sbi new file mode 100644 index 0000000..6d3b549 --- /dev/null +++ b/Client/Libraries/IDB.sbi @@ -0,0 +1,165 @@ +DeclareModule IDB + Declare Init(DBName.s, Version.i, Stores.s, *Callback) + Declare Put(Store.s, Key.s, Value.s, *Callback) + Declare Get(Store.s, Key.s, *Callback) + Declare Exists(Store.s, Key.s, *Callback) + Declare Delete(Store.s, Key.s, *Callback) + Declare GetAllKeys(Store.s, *Callback) + Declare GetAll(Store.s, *Callback) + Declare Clear(Store.s, *Callback) + Declare Count(Store.s, *Callback) +EndDeclareModule + +Module IDB + EnableExplicit + + !window._kumos_idb = null; + + Procedure Init(DBName.s, Version.i, Stores.s, *Callback) + !var _cb = p_callback; + !var _dbname = v_dbname; + !var _ver = v_version; + !var _stores = v_stores; + ! + !var req = indexedDB.open(_dbname, _ver); + ! + !req.onupgradeneeded = function(ev) { + ! var db = ev.target.result; + ! _stores.split(',').forEach(function(name) { + ! name = name.trim(); + ! if (name && !db.objectStoreNames.contains(name)) { + ! db.createObjectStore(name); + ! } + ! }); + !}; + !req.onsuccess = function(ev) { + ! window._kumos_idb = ev.target.result; + ! if (_cb) _cb(1, ''); + !}; + !req.onerror = function(ev) { + ! var msg = ev.target.error ? ev.target.error.message : 'open failed'; + ! if (_cb) _cb(0, msg); + !}; + !req.onblocked = function() { + ! if (_cb) _cb(0, 'IDB blocked - close other tabs using this app'); + !}; + EndProcedure + + Procedure Put(Store.s, Key.s, Value.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !var _key = v_key; + !var _val = v_value; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readwrite'); + !var st = tx.objectStore(_store); + !var req = st.put(_val, _key); + !req.onsuccess = function() { if (_cb) _cb(1, ''); }; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'put failed'); }; + EndProcedure + + Procedure Get(Store.s, Key.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !var _key = v_key; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readonly'); + !var st = tx.objectStore(_store); + !var req = st.get(_key); + !req.onsuccess = function(ev) { + ! var v = ev.target.result; + ! if (_cb) _cb(1, v !== undefined ? String(v) : ''); + !}; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'get failed'); }; + EndProcedure + + Procedure Exists(Store.s, Key.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !var _key = v_key; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readonly'); + !var st = tx.objectStore(_store); + !var req = st.getKey(_key); + !req.onsuccess = function(ev) { + ! if (_cb) _cb(1, ev.target.result !== undefined ? '1' : '0'); + !}; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'exists failed'); }; + EndProcedure + + Procedure Delete(Store.s, Key.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !var _key = v_key; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readwrite'); + !var st = tx.objectStore(_store); + !var req = st.delete(_key); + !req.onsuccess = function() { if (_cb) _cb(1, ''); }; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'delete failed'); }; + EndProcedure + + Procedure GetAllKeys(Store.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readonly'); + !var st = tx.objectStore(_store); + !var req = st.getAllKeys(); + !req.onsuccess = function(ev) { if (_cb) _cb(1, JSON.stringify(ev.target.result || [])); }; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'getAllKeys failed'); }; + EndProcedure + + Procedure GetAll(Store.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readonly'); + !var st = tx.objectStore(_store); + !var keysReq = st.getAllKeys(); + !keysReq.onsuccess = function(ev) { + ! var keys = ev.target.result; + ! var valsReq = st.getAll(); + ! valsReq.onsuccess = function(ev2) { + ! var vals = ev2.target.result; + ! var out = {}; + ! for (var i = 0; i < keys.length; i++) out[String(keys[i])] = String(vals[i]); + ! if (_cb) _cb(1, JSON.stringify(out)); + ! }; + ! valsReq.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'getAll/vals failed'); }; + !}; + !keysReq.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'getAll/keys failed'); }; + EndProcedure + + Procedure Clear(Store.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readwrite'); + !var st = tx.objectStore(_store); + !var req = st.clear(); + !req.onsuccess = function() { if (_cb) _cb(1, ''); }; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'clear failed'); }; + EndProcedure + + Procedure Count(Store.s, *Callback) + !var _cb = p_callback; + !var _store = v_store; + !if (!window._kumos_idb) { if (_cb) _cb(0, 'IDB not open'); return; } + !var tx = window._kumos_idb.transaction([_store], 'readonly'); + !var st = tx.objectStore(_store); + !var req = st.count(); + !req.onsuccess = function(ev) { if (_cb) _cb(1, String(ev.target.result)); }; + !req.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'count failed'); }; + EndProcedure + +EndModule +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 15 +; Folding = Dg +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/Main.sb b/Client/Main.sb new file mode 100644 index 0000000..082c964 --- /dev/null +++ b/Client/Main.sb @@ -0,0 +1,37 @@ +IncludePath "Libraries" +IncludeFile "IDB.sbi" + + +IncludePath "Includes" +IncludeFile "Modules.sbi" +IncludeFile "General.sbi" + +; System +IncludeFile "FileCache.sbi" +IncludeFile "FS.sbi" + +; UI +IncludeFile "Notify.sbi" +IncludeFile "Desktop.sbi" +IncludeFile "Login.sbi" + +; Appstore +IncludeFile "AppRuntime.sbi" + +IncludePath "Default Apps" +IncludeFile "TextEditor.sbi" +IncludeFile "FileExplorer.sbi" +IncludeFile "Settings.sbi" +IncludeFile "WebBrowser.sbi" +IncludeFile "AppManager.sbi" + +General::Init() + +; IDE Options = SpiderBasic 3.10 (Windows - x86) +; CursorPosition = 25 +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Client/kumos.js b/Client/kumos.js new file mode 100644 index 0000000..e2569e8 --- /dev/null +++ b/Client/kumos.js @@ -0,0 +1,124 @@ +/** + * KUMO.S App SDK — include in your app with: + * + * + * All methods return Promises. Call KUMOS.ready() first. + * + * Permissions required per namespace: + * storage.* — always available (private app namespace) + * fs.* — requires "fs.read" or "fs.write" grant + * notify.* — requires "notify" grant + * window.* — always available + */ +(function (global) { + 'use strict'; + + var _pending = {}; // kmid → { resolve, reject, timer } + + // ── Internal helpers ────────────────────────────────────────────────────── + + function _uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0; + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); + }); + } + + function _send(action, args) { + return new Promise(function (resolve, reject) { + var kmid = _uuid(); + var timer = setTimeout(function () { + if (_pending[kmid]) { + delete _pending[kmid]; + reject(new Error('KUMOS timeout: ' + action)); + } + }, 15000); + _pending[kmid] = { resolve: resolve, reject: reject, timer: timer }; + window.parent.postMessage( + JSON.stringify({ kmid: kmid, action: action, args: args || {} }), + '*' + ); + }); + } + + // Incoming responses from the shell + window.addEventListener('message', function (e) { + if (e.source !== window.parent) return; + var msg; + try { msg = JSON.parse(e.data); } catch (err) { return; } + if (!msg || !msg.kmid) return; + var p = _pending[msg.kmid]; + if (!p) return; + clearTimeout(p.timer); + delete _pending[msg.kmid]; + if (msg.success) { + p.resolve(msg.data !== undefined ? msg.data : null); + } else { + p.reject(new Error(msg.error || 'Unknown error')); + } + }); + + // ── Public API ──────────────────────────────────────────────────────────── + + var KUMOS = { + + /** + * Handshake with the shell. Resolves with { app_id }. + * Always call this first and await it before using any other APIs. + */ + ready: function () { + return _send('window.ready', {}); + }, + + // ── Private app storage (no extra permission required) ─────────────── + + storage: { + /** Read a file. Resolves with the content string. */ + read: function (path) { return _send('storage.read', { path: path }); }, + /** Write content to a file. Creates it if it does not exist. */ + write: function (path, content) { return _send('storage.write', { path: path, content: content }); }, + /** List a directory. Resolves with an array of entry objects. */ + list: function (path) { return _send('storage.list', { path: path || '/' }); }, + /** Stat a path. */ + stat: function (path) { return _send('storage.stat', { path: path }); }, + /** Create a directory. */ + mkdir: function (path) { return _send('storage.mkdir', { path: path }); }, + /** Delete a file. */ + delete: function (path) { return _send('storage.delete', { path: path }); } + }, + + // ── User filesystem (requires fs.read / fs.write permission) ───────── + + fs: { + /** Read a file from the user's filesystem. */ + read: function (path) { return _send('fs.read', { path: path }); }, + /** Write content to a file in the user's filesystem. */ + write: function (path, content) { return _send('fs.write', { path: path, content: content }); }, + /** List a directory. */ + list: function (path) { return _send('fs.list', { path: path || '/' }); }, + /** Stat a path. */ + stat: function (path) { return _send('fs.stat', { path: path }); } + }, + + // ── Notifications (requires notify permission) ──────────────────────── + + notify: { + /** Show a toast. type: 'info' | 'success' | 'warning' | 'error' */ + toast: function (message, type) { return _send('notify.toast', { message: message, type: type || 'info' }); }, + /** Show a confirm dialog. Resolves with true (OK) or false (Cancel). */ + confirm: function (title, message) { return _send('notify.confirm', { title: title, message: message }); } + }, + + // ── Window control ──────────────────────────────────────────────────── + + window: { + /** Update the host window title. */ + setTitle: function (title) { return _send('window.setTitle', { title: title }); }, + /** Close this app instance. */ + close: function () { return _send('window.close', {}); } + } + }; + + global.KUMOS = KUMOS; + +}(window)); diff --git a/SDK/JS/helloworld.zip b/SDK/JS/helloworld.zip new file mode 100644 index 0000000..af48632 Binary files /dev/null and b/SDK/JS/helloworld.zip differ diff --git a/SDK/JS/kumos.js b/SDK/JS/kumos.js new file mode 100644 index 0000000..e2569e8 --- /dev/null +++ b/SDK/JS/kumos.js @@ -0,0 +1,124 @@ +/** + * KUMO.S App SDK — include in your app with: + * + * + * All methods return Promises. Call KUMOS.ready() first. + * + * Permissions required per namespace: + * storage.* — always available (private app namespace) + * fs.* — requires "fs.read" or "fs.write" grant + * notify.* — requires "notify" grant + * window.* — always available + */ +(function (global) { + 'use strict'; + + var _pending = {}; // kmid → { resolve, reject, timer } + + // ── Internal helpers ────────────────────────────────────────────────────── + + function _uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0; + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); + }); + } + + function _send(action, args) { + return new Promise(function (resolve, reject) { + var kmid = _uuid(); + var timer = setTimeout(function () { + if (_pending[kmid]) { + delete _pending[kmid]; + reject(new Error('KUMOS timeout: ' + action)); + } + }, 15000); + _pending[kmid] = { resolve: resolve, reject: reject, timer: timer }; + window.parent.postMessage( + JSON.stringify({ kmid: kmid, action: action, args: args || {} }), + '*' + ); + }); + } + + // Incoming responses from the shell + window.addEventListener('message', function (e) { + if (e.source !== window.parent) return; + var msg; + try { msg = JSON.parse(e.data); } catch (err) { return; } + if (!msg || !msg.kmid) return; + var p = _pending[msg.kmid]; + if (!p) return; + clearTimeout(p.timer); + delete _pending[msg.kmid]; + if (msg.success) { + p.resolve(msg.data !== undefined ? msg.data : null); + } else { + p.reject(new Error(msg.error || 'Unknown error')); + } + }); + + // ── Public API ──────────────────────────────────────────────────────────── + + var KUMOS = { + + /** + * Handshake with the shell. Resolves with { app_id }. + * Always call this first and await it before using any other APIs. + */ + ready: function () { + return _send('window.ready', {}); + }, + + // ── Private app storage (no extra permission required) ─────────────── + + storage: { + /** Read a file. Resolves with the content string. */ + read: function (path) { return _send('storage.read', { path: path }); }, + /** Write content to a file. Creates it if it does not exist. */ + write: function (path, content) { return _send('storage.write', { path: path, content: content }); }, + /** List a directory. Resolves with an array of entry objects. */ + list: function (path) { return _send('storage.list', { path: path || '/' }); }, + /** Stat a path. */ + stat: function (path) { return _send('storage.stat', { path: path }); }, + /** Create a directory. */ + mkdir: function (path) { return _send('storage.mkdir', { path: path }); }, + /** Delete a file. */ + delete: function (path) { return _send('storage.delete', { path: path }); } + }, + + // ── User filesystem (requires fs.read / fs.write permission) ───────── + + fs: { + /** Read a file from the user's filesystem. */ + read: function (path) { return _send('fs.read', { path: path }); }, + /** Write content to a file in the user's filesystem. */ + write: function (path, content) { return _send('fs.write', { path: path, content: content }); }, + /** List a directory. */ + list: function (path) { return _send('fs.list', { path: path || '/' }); }, + /** Stat a path. */ + stat: function (path) { return _send('fs.stat', { path: path }); } + }, + + // ── Notifications (requires notify permission) ──────────────────────── + + notify: { + /** Show a toast. type: 'info' | 'success' | 'warning' | 'error' */ + toast: function (message, type) { return _send('notify.toast', { message: message, type: type || 'info' }); }, + /** Show a confirm dialog. Resolves with true (OK) or false (Cancel). */ + confirm: function (title, message) { return _send('notify.confirm', { title: title, message: message }); } + }, + + // ── Window control ──────────────────────────────────────────────────── + + window: { + /** Update the host window title. */ + setTitle: function (title) { return _send('window.setTitle', { title: title }); }, + /** Close this app instance. */ + close: function () { return _send('window.close', {}); } + } + }; + + global.KUMOS = KUMOS; + +}(window)); diff --git a/SDK/SpiderBasic/KUMOS.sbi b/SDK/SpiderBasic/KUMOS.sbi new file mode 100644 index 0000000..d0526f7 --- /dev/null +++ b/SDK/SpiderBasic/KUMOS.sbi @@ -0,0 +1,229 @@ +; ════════════════════════════════════════════════════════════════════════════ +; KUMOS.sbi — SpiderBasic SDK for KUMOS third-party apps +; +; Usage: +; IncludeFile "KUMOS.sbi" +; KUMOS::Init() ; call once at startup, before anything else +; +; All async procedures accept a *Callback procedure pointer. +; Callbacks always have the signature: Procedure Cb(Success.i, Data.s) +; Exception: KUMOS::Notify_Confirm uses: Procedure Cb(Result.i) +; +; The "storage.*" namespace is always available. +; "fs.*" requires the "fs.read" / "fs.write" permission in manifest.json. +; "notify.*" requires the "notify" permission in manifest.json. +; ════════════════════════════════════════════════════════════════════════════ + +DeclareModule KUMOS + ; Toast types — pass to Notify_Toast() + Enumeration + #Info + #Success + #Warning + #Error + EndEnumeration + + ; ── Lifecycle ────────────────────────────────────────────────────────── + Declare Init() + Declare Ready(*Callback) ; Cb(Success, Data) — Data: '{"app_id":"..."}' + Declare Window_SetTitle(Title.s) + Declare Window_Close() + + ; ── Private storage (always available) ──────────────────────────────── + Declare Storage_Read (Path.s, *Callback) ; Cb(Success, Content.s) + Declare Storage_Write (Path.s, Content.s, *Callback); Cb(Success, "") + Declare Storage_List (Path.s, *Callback) ; Cb(Success, JSON array) + Declare Storage_Stat (Path.s, *Callback) ; Cb(Success, JSON object) + Declare Storage_Mkdir (Path.s, *Callback) ; Cb(Success, "") + Declare Storage_Delete(Path.s, *Callback) ; Cb(Success, "") + + ; ── User filesystem (requires fs.read / fs.write) ───────────────────── + Declare FS_Read (Path.s, *Callback) ; Cb(Success, Content.s) + Declare FS_Write (Path.s, Content.s, *Callback) ; Cb(Success, "") + Declare FS_List (Path.s, *Callback) ; Cb(Success, JSON array) + Declare FS_Stat (Path.s, *Callback) ; Cb(Success, JSON object) + + ; ── Notifications (requires notify) ─────────────────────────────────── + Declare Notify_Toast (Message.s, Type.i = #Info) ; fire-and-forget + Declare Notify_Confirm (Title_.s, Message.s, *Callback) ; Cb(Result.i) +EndDeclareModule + +Module KUMOS + EnableExplicit + + ; Inject the JS runtime once, guarded so multiple IncludeFile calls are safe. + Procedure Init() + !if (window._kumos_sb) { return; } + !window._kumos_sb = { + ! pending: {}, + ! uuid: function() { + ! return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + ! var r = Math.random() * 16 | 0; + ! return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); + ! }); + ! }, + ! send: function(action, args, onSuccess, onError) { + ! var kmid = window._kumos_sb.uuid(); + ! var timer = setTimeout(function() { + ! var p = window._kumos_sb.pending[kmid]; + ! if (p) { delete window._kumos_sb.pending[kmid]; p.onError('Timeout: ' + action); } + ! }, 15000); + ! window._kumos_sb.pending[kmid] = { onSuccess: onSuccess, onError: onError, timer: timer }; + ! window.parent.postMessage( + ! JSON.stringify({ kmid: kmid, action: action, args: args || {} }), '*' + ! ); + ! } + !}; + !window.addEventListener('message', function(e) { + ! if (e.source !== window.parent) { return; } + ! var msg; + ! try { msg = JSON.parse(e.data); } catch(ex) { return; } + ! if (!msg || !msg.kmid) { return; } + ! var p = window._kumos_sb.pending[msg.kmid]; + ! if (!p) { return; } + ! clearTimeout(p.timer); + ! delete window._kumos_sb.pending[msg.kmid]; + ! if (msg.success) { + ! var data = msg.data; + ! if (data === null || data === undefined) { data = ''; } + ! else if (typeof data === 'object') { data = JSON.stringify(data); } + ! else if (typeof data === 'boolean') { data = data ? 'true' : 'false'; } + ! else { data = String(data); } + ! p.onSuccess(data); + ! } else { + ! p.onError(msg.error || 'Error'); + ! } + !}); + EndProcedure + + ; ── Internal send helper ────────────────────────────────────────────────── + ; *Callback must be Procedure Cb(Success.i, Data.s) + ; *ConfirmCallback must be Procedure Cb(Result.i) [used only for confirm] + + Procedure _Send(Action.s, ArgsJSON.s, *Callback) + ! var cb = p_callback; + !window._kumos_sb.send( + ! v_action, + ! (v_argsjson ? JSON.parse(v_argsjson) : {}), + ! function(data) { cb(1, data); }, + ! function(err) { cb(0, err); } + !); + EndProcedure + + ; ── Args builders ───────────────────────────────────────────────────────── + + Procedure.s _PathArgs(Path.s) + ProcedureReturn ~"{\"path\":\"" + ReplaceString(Path, ~"\"", ~"\\\"") + ~"\"}" + EndProcedure + + Procedure.s _PathContentArgs(Path.s, Content.s) + ProcedureReturn ~"{\"path\":\"" + ReplaceString(Path, ~"\"", ~"\\\"") + ~"\"," + + ~"\"content\":\"" + ReplaceString(Content, ~"\"", ~"\\\"") + ~"\"}" + EndProcedure + + Procedure.s _TitleMsgArgs(Title_.s, Message.s) + ProcedureReturn ~"{\"title\":\"" + ReplaceString(Title_, ~"\"", ~"\\\"") + ~"\"," + + ~"\"message\":\"" + ReplaceString(Message, ~"\"", ~"\\\"") + ~"\"}" + EndProcedure + + Procedure.s _TypeStr(Type.i) + Select Type + Case #Success : ProcedureReturn "success" + Case #Warning : ProcedureReturn "warning" + Case #Error : ProcedureReturn "error" + Default : ProcedureReturn "info" + EndSelect + EndProcedure + + ; ── Lifecycle ───────────────────────────────────────────────────────────── + + Procedure Ready(*Callback) + _Send("window.ready", "{}", *Callback) + EndProcedure + + Procedure Window_SetTitle(Title.s) + ; Fire-and-forget — no callback needed + ! window._kumos_sb.send('window.setTitle', + ! { title: v_title }, function(){}, function(){}); + EndProcedure + + Procedure Window_Close() + ! window._kumos_sb.send('window.close', {}, function(){}, function(){}); + EndProcedure + + ; ── Storage ─────────────────────────────────────────────────────────────── + + Procedure Storage_Read(Path.s, *Callback) + _Send("storage.read", _PathArgs(Path), *Callback) + EndProcedure + + Procedure Storage_Write(Path.s, Content.s, *Callback) + _Send("storage.write", _PathContentArgs(Path, Content), *Callback) + EndProcedure + + Procedure Storage_List(Path.s, *Callback) + _Send("storage.list", _PathArgs(Path), *Callback) + EndProcedure + + Procedure Storage_Stat(Path.s, *Callback) + _Send("storage.stat", _PathArgs(Path), *Callback) + EndProcedure + + Procedure Storage_Mkdir(Path.s, *Callback) + _Send("storage.mkdir", _PathArgs(Path), *Callback) + EndProcedure + + Procedure Storage_Delete(Path.s, *Callback) + _Send("storage.delete", _PathArgs(Path), *Callback) + EndProcedure + + ; ── User filesystem ─────────────────────────────────────────────────────── + + Procedure FS_Read(Path.s, *Callback) + _Send("fs.read", _PathArgs(Path), *Callback) + EndProcedure + + Procedure FS_Write(Path.s, Content.s, *Callback) + _Send("fs.write", _PathContentArgs(Path, Content), *Callback) + EndProcedure + + Procedure FS_List(Path.s, *Callback) + _Send("fs.list", _PathArgs(Path), *Callback) + EndProcedure + + Procedure FS_Stat(Path.s, *Callback) + _Send("fs.stat", _PathArgs(Path), *Callback) + EndProcedure + + ; ── Notifications ───────────────────────────────────────────────────────── + + Procedure Notify_Toast(Message.s, Type.i = #Info) + Protected Args.s = ~"{\"message\":\"" + ReplaceString(Message, ~"\"", ~"\\\"") + ~"\"," + + ~"\"type\":\"" + _TypeStr(Type) + ~"\"}" + ! window._kumos_sb.send('notify.toast', + ! JSON.parse(v_args), function(){}, function(){}); + EndProcedure + + ; *Callback must be Procedure Cb(Result.i) — 1 = OK, 0 = Cancel + Procedure Notify_Confirm(Title_.s, Message.s, *Callback) + Protected Args.s = _TitleMsgArgs(Title_, Message) + ! var cb = p_callback; + !window._kumos_sb.send( + ! 'notify.confirm', + ! JSON.parse(v_args), + ! function(data) { cb(data === 'true' ? 1 : 0); }, + ! function() { cb(0); } + !); + EndProcedure + +EndModule + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 1 +; Folding = ---- +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/SDK/SpiderBasic/Template.sb b/SDK/SpiderBasic/Template.sb new file mode 100644 index 0000000..679eb54 --- /dev/null +++ b/SDK/SpiderBasic/Template.sb @@ -0,0 +1,123 @@ +; ════════════════════════════════════════════════════════════════════════════ +; KUMOS App Template +; +; 1. Copy this file and KUMOS.sbi into a new folder. +; 2. Edit manifest.json (also in this folder) with your app's details. +; 3. Compile with SpiderBasic — output: index.html +; 4. Zip index.html + manifest.json → yourapp.zip +; 5. Install via App Manager. +; +; Checklist before shipping: +; ☐ Unique reverse-domain id in manifest.json e.g. com.yourname.yourapp +; ☐ Only request permissions you actually use +; ☐ Call KUMOS::Init() before KUMOS::Ready() +; ☐ All KUMOS calls must happen AFTER Ready() resolves +; ════════════════════════════════════════════════════════════════════════════ + +IncludeFile "KUMOS.sbi" + +; ── State (your app's data goes here) ──────────────────────────────────────── + +Global Count.i = 0 + +; ── UI ─────────────────────────────────────────────────────────────────────── + +OpenWindow(0, 0, 0, 400, 300, "Loading…", + #PB_Window_BorderLess | #PB_Window_ScreenCentered) +SetWindowColor(0, RGB(22, 22, 34)) + +Global Label_Count.i = TextGadget(#PB_Any, + 0, 100, 400, 40, "…", + #PB_Text_Center | #PB_Text_Border) +SetGadgetColor(Label_Count, #PB_Gadget_FrontColor, RGB(100, 120, 255)) +SetGadgetColor(Label_Count, #PB_Gadget_BackColor, RGB(22, 22, 34)) +SetGadgetFont(Label_Count, LoadFont(#PB_Any, "sans-serif", 28)) + +Global Btn_Click.i = ButtonGadget(#PB_Any, 150, 160, 100, 32, "Click me") +Global Btn_Toast.i = ButtonGadget(#PB_Any, 50, 210, 130, 28, "Toast") +Global Btn_Confirm.i= ButtonGadget(#PB_Any, 220, 210, 130, 28, "Confirm") + +; ── Helpers ─────────────────────────────────────────────────────────────────── + +Procedure UpdateUI() + SetGadgetText(Label_Count, Str(Count)) +EndProcedure + +; ── Storage callbacks ───────────────────────────────────────────────────────── + +Procedure OnSaved(Success.i, Data.s) + If Not Success + KUMOS::Notify_Toast("Save failed: " + Data, KUMOS::#Warning) + EndIf +EndProcedure + +Procedure OnLoaded(Success.i, Data.s) + If Success + Protected N.i = Val(Data) + If N > 0 : Count = N : UpdateUI() : EndIf + EndIf + ; File missing on first launch is normal — just start from zero. +EndProcedure + +Procedure SaveCount() + KUMOS::Storage_Write("/count.txt", Str(Count), @OnSaved()) +EndProcedure + +; ── Button events ───────────────────────────────────────────────────────────── + +Procedure OnConfirmResult(Result.i) + If Result + KUMOS::Notify_Toast("You clicked OK!", KUMOS::#Success) + Else + KUMOS::Notify_Toast("You clicked Cancel.", KUMOS::#Info) + EndIf +EndProcedure + +BindGadgetEvent(Btn_Click, @Clicked()) +Procedure Clicked() + Count + 1 + UpdateUI() + SaveCount() +EndProcedure + +BindGadgetEvent(Btn_Toast, @ToastClicked()) +Procedure ToastClicked() + KUMOS::Notify_Toast("Hello from SpiderBasic!", KUMOS::#Success) +EndProcedure + +BindGadgetEvent(Btn_Confirm, @ConfirmClicked()) +Procedure ConfirmClicked() + KUMOS::Notify_Confirm("Are you sure?", "This is a confirm dialog.", @OnConfirmResult()) +EndProcedure + +; ── Boot: always KUMOS::Init() then KUMOS::Ready() ──────────────────────────── + +Procedure OnReady(Success.i, Data.s) + If Not Success + ; Running outside KUMO.S — useful for testing in a plain browser + SetWindowTitle(0, "Template App (standalone)") + UpdateUI() + ProcedureReturn + EndIf + + ; Set the window title via the shell + KUMOS::Window_SetTitle("Template App") + + ; Load persisted state + KUMOS::Storage_Read("/count.txt", @OnLoaded()) + + UpdateUI() +EndProcedure + +KUMOS::Init() +KUMOS::Ready(@OnReady()) + +; IDE Options = SpiderBasic 3.20 (Windows - x86) +; CursorPosition = 1 +; Folding = -- +; iOSAppOrientation = 0 +; AndroidAppCode = 0 +; AndroidAppOrientation = 0 +; EnableXP +; DPIAware +; CompileSourceDirectory \ No newline at end of file diff --git a/Server/Includes/AppStore.pbi b/Server/Includes/AppStore.pbi new file mode 100644 index 0000000..f82cd77 --- /dev/null +++ b/Server/Includes/AppStore.pbi @@ -0,0 +1,408 @@ +Module AppStore + EnableExplicit + + ; Constants + #AppsDir = "apps/" + #TempDir = "tmp/" + #ValidPermCount = 4 + + ; Variables + Global Dim _ValidPerms.s(#ValidPermCount - 1) + + _ValidPerms(0) = "storage" + _ValidPerms(1) = "fs.read" + _ValidPerms(2) = "fs.write" + _ValidPerms(3) = "notify" + + ;- Private declarations + Declare _IsValidAppID(AppID.s) + Declare _IsValidPermission(Perm.s) + Declare _IsValidFilePath(Path.s) + Declare.s _BundleDir(UserID, AppID.s) + Declare _EnsureDir(Path.s) + Declare _DeleteDirRecursive(Path.s) + Declare _WipeBundle(UserID, AppID.s) + Declare _WipeStorage(UserID, AppID.s) + Declare _ExtractZip(ZipFile.s, DestDir.s) + Declare.s _ReadManifestFromZip(ZipFile.s) + Declare.s _ValidateManifest(JSON.s, *OutAppID.String, *OutPerms.String) + + ;- Public procedures + Procedure Init() + If FileSize(#AppsDir) <> -2 : CreateDirectory(#AppsDir) : EndIf + If FileSize(#TempDir) <> -2 : CreateDirectory(#TempDir) : EndIf + EndProcedure + + ; GET /api/apps/list + Procedure HandleList(*Request) + Protected Username.s = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + General::RespondJSON(*Request, Database::AppList(Database::FindUser(Username))) + EndProcedure + + ; POST /api/apps/install body: url= + Procedure HandleInstall(*Request) + Protected UserID, HiddenDir, Home, AppsRoot + Protected Username.s, URL.s, TempZip.s, ManifestJSON.s, ErrMsg.s, AppID.s, BundleDir.s, Perms.s + Protected OutAppID.String, OutPerms.String + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + + URL = General::GetPostField(*Request, "url") + If URL = "" + General::RespondJSON(*Request, ~"{\"error\":\"Missing url\"}") + ProcedureReturn + EndIf + If Left(URL, 7) <> "http://" And Left(URL, 8) <> "https://" + General::RespondJSON(*Request, ~"{\"error\":\"URL must begin with http:// or https://\"}") + ProcedureReturn + EndIf + + TempZip = #TempDir + "pkg_" + UserID + "_" + ElapsedMilliseconds() + ".zip" + + If Not ReceiveHTTPFile(URL, TempZip) + General::RespondJSON(*Request, ~"{\"error\":\"Failed to download package from URL\"}") + ProcedureReturn + EndIf + + ; Read and validate manifest before touching anything + ManifestJSON = _ReadManifestFromZip(TempZip) + If ManifestJSON = "" + DeleteFile(TempZip) + General::RespondJSON(*Request, ~"{\"error\":\"manifest.json not found or unreadable in package\"}") + ProcedureReturn + EndIf + + ErrMsg = _ValidateManifest(ManifestJSON, @OutAppID, @OutPerms) + If ErrMsg <> "" + DeleteFile(TempZip) + General::RespondJSON(*Request, ~"{\"error\":\"" + ReplaceString(ErrMsg, ~"\"", ~"\\\"") + ~"\"}") + ProcedureReturn + EndIf + + AppID = OutAppID\s + Perms = OutPerms\s + + If Database::AppExists(UserID, AppID) + _WipeBundle(UserID, AppID) + Database::AppUninstall(UserID, AppID) + EndIf + + BundleDir = _BundleDir(UserID, AppID) + If Not _EnsureDir(BundleDir) + DeleteFile(TempZip) + General::RespondJSON(*Request, ~"{\"error\":\"Could not create app directory\"}") + ProcedureReturn + EndIf + + If Not _ExtractZip(TempZip, BundleDir) + DeleteFile(TempZip) + _WipeBundle(UserID, AppID) + General::RespondJSON(*Request, ~"{\"error\":\"Failed to extract package\"}") + ProcedureReturn + EndIf + + DeleteFile(TempZip) + + If Not Database::AppInstall(UserID, AppID, ManifestJSON, Perms) + _WipeBundle(UserID, AppID) + General::RespondJSON(*Request, ~"{\"error\":\"Failed to register app in database\"}") + ProcedureReturn + EndIf + + HiddenDir = Database::FSResolve(UserID, "/.apps/" + AppID) + If HiddenDir = 0 + AppsRoot = Database::FSResolve(UserID, "/.apps") + If AppsRoot = 0 + Home = Database::FSGetOrCreateHome(UserID) + AppsRoot = Database::FSMkdir(UserID, Home, ".apps") + EndIf + If AppsRoot > 0 + Database::FSMkdir(UserID, AppsRoot, AppID) + EndIf + EndIf + + General::RespondJSON(*Request, ~"{\"success\":true,\"app_id\":\"" + ReplaceString(AppID, ~"\"", ~"\\\"") + ~"\"}") + EndProcedure + + ; POST /api/apps/uninstall body: app_id=... [&keep_data=1] + Procedure HandleUninstall(*Request) + Protected UserID, KeepData + Protected Username.s, AppID.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + + AppID = General::GetPostField(*Request, "app_id") + KeepData = Val(General::GetPostField(*Request, "keep_data")) + + If AppID = "" Or Not _IsValidAppID(AppID) + General::RespondJSON(*Request, ~"{\"error\":\"Invalid or missing app_id\"}") + ProcedureReturn + EndIf + If Not Database::AppExists(UserID, AppID) + General::RespondJSON(*Request, ~"{\"error\":\"App not installed\"}", "404 Not Found") + ProcedureReturn + EndIf + + Database::AppUninstall(UserID, AppID) + _WipeBundle(UserID, AppID) + + If Not KeepData : _WipeStorage(UserID, AppID) : EndIf + + General::RespondJSON(*Request, ~"{\"success\":true}") + EndProcedure + + ; GET /api/apps/{app_id}/{filepath} + Procedure HandleServeFile(*Request, AppID.s, FilePath.s) + Protected UserID + Protected Username.s, FullPath.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + + If Not _IsValidAppID(AppID) + General::RespondJSON(*Request, ~"{\"error\":\"Bad Request\"}", "400 Bad Request") + ProcedureReturn + EndIf + + If Not _IsValidFilePath(FilePath) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + UserID = Database::FindUser(Username) + If Not Database::AppExists(UserID, AppID) + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + + FullPath = _BundleDir(UserID, AppID) + FilePath + If FileSize(FullPath) < 0 + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + + If Not FastCGI::RespondFile(*Request, FullPath) + General::RespondJSON(*Request, ~"{\"error\":\"Read error\"}", "500 Internal Server Error") + EndIf + EndProcedure + + ;- Private procedures + Procedure _IsValidAppID(AppID.s) + Protected Length, i + Protected c.s + + Length = Len(AppID) + If Length = 0 Or Length > 64 : ProcedureReturn #False : EndIf + For i = 1 To Length + c = Mid(AppID, i, 1) + If Not ((c >= "a" And c <= "z") Or (c >= "A" And c <= "Z") Or (c >= "0" And c <= "9") Or c = "." Or c = "-" Or c = "_") + ProcedureReturn #False + EndIf + Next + ProcedureReturn #True + EndProcedure + + Procedure _IsValidPermission(Perm.s) + Protected i + For i = 0 To #ValidPermCount - 1 + If _ValidPerms(i) = Perm : ProcedureReturn #True : EndIf + Next + ProcedureReturn #False + EndProcedure + + Procedure _IsValidFilePath(Path.s) + If Path = "" : ProcedureReturn #False : EndIf + If Left(Path, 1) = "/" Or Left(Path, 1) = "\" : ProcedureReturn #False : EndIf + If FindString(Path, "..") : ProcedureReturn #False : EndIf + If FindString(Path, "//") Or FindString(Path, "\\") : ProcedureReturn #False : EndIf + ProcedureReturn #True + EndProcedure + + Procedure.s _BundleDir(UserID, AppID.s) + ProcedureReturn #AppsDir + UserID + "/" + AppID + "/" + EndProcedure + + Procedure _EnsureDir(Path.s) + Protected Parts, i + Protected Current.s, Seg.s, Probe.s + + Path = ReplaceString(Path, "\", "/") + If Right(Path, 1) <> "/" : Path + "/" : EndIf + + Parts = CountString(Path, "/") + For i = 1 To Parts + Seg = StringField(Path, i, "/") + If Seg = "" : Continue : EndIf + Current + Seg + "/" + Probe = Left(Current, Len(Current) - 1) + If FileSize(Probe) <> -2 + If Not CreateDirectory(Probe) : ProcedureReturn #False : EndIf + EndIf + Next + ProcedureReturn #True + EndProcedure + + ; Built-in DeleteDirectory with #PB_FileSystem_Recursive handles the walk for us + Procedure _DeleteDirRecursive(Path.s) + If Right(Path, 1) = "/" : Path = Left(Path, Len(Path) - 1) : EndIf + DeleteDirectory(Path, "", #PB_FileSystem_Recursive) + EndProcedure + + Procedure _WipeBundle(UserID, AppID.s) + _DeleteDirRecursive(_BundleDir(UserID, AppID)) + EndProcedure + + Procedure _WipeStorage(UserID, AppID.s) + Protected NodeID + Protected VPath.s = "/.apps/" + AppID + NodeID = Database::FSResolve(UserID, VPath) + If NodeID > 0 : Database::FSDelete(NodeID) : EndIf + EndProcedure + + Procedure _ExtractZip(ZipFile.s, DestDir.s) + Protected OK, LastSlash, Pos + Protected EntryName.s + + If Not OpenPack(0, ZipFile, #PB_PackerPlugin_Zip) : ProcedureReturn #False : EndIf + If Not ExaminePack(0) : ClosePack(0) : ProcedureReturn #False : EndIf + + OK = #True + While NextPackEntry(0) + EntryName = PackEntryName(0) + + If Not _IsValidFilePath(EntryName) : OK = #False : Break : EndIf + + ; Directory entry — just ensure it exists + If Right(EntryName, 1) = "/" + _EnsureDir(DestDir + EntryName) + Continue + EndIf + + ; Ensure parent directory exists + LastSlash = 0 + Pos = FindString(EntryName, "/") + While Pos > 0 + LastSlash = Pos + Pos = FindString(EntryName, "/", Pos + 1) + Wend + If LastSlash > 0 : _EnsureDir(DestDir + Left(EntryName, LastSlash)) : EndIf + + If Not UncompressPackFile(0, DestDir + EntryName, EntryName) + OK = #False : Break + EndIf + Wend + + ClosePack(0) + ProcedureReturn OK + EndProcedure + + Procedure.s _ReadManifestFromZip(ZipFile.s) + Protected Found, Size, FileID, *Buf + Protected TempPath.s, Result.s + + If Not OpenPack(0, ZipFile, #PB_PackerPlugin_Zip) : ProcedureReturn "" : EndIf + + TempPath = #TempDir + "manifest_" + ElapsedMilliseconds() + ".json" + + If ExaminePack(0) + While NextPackEntry(0) + If PackEntryName(0) = "manifest.json" + Found = Bool(UncompressPackFile(0, TempPath, "manifest.json")) + Break + EndIf + Wend + EndIf + ClosePack(0) + + If Not Found : ProcedureReturn "" : EndIf + + Size = FileSize(TempPath) + If Size > 0 And Size < 65536 ; sanity cap: 64 KB + FileID = ReadFile(#PB_Any, TempPath, #PB_File_SharedRead) + If FileID + *Buf = AllocateMemory(Size + 1) + If *Buf + ReadData(FileID, *Buf, Size) + PokeB(*Buf + Size, 0) + Result = PeekS(*Buf, -1, #PB_UTF8) + FreeMemory(*Buf) + EndIf + CloseFile(FileID) + EndIf + EndIf + + DeleteFile(TempPath) + ProcedureReturn Result + EndProcedure + + Procedure.s _ValidateManifest(JSON.s, *OutAppID.String, *OutPerms.String) + Protected Root, PermsNode, PermCount, i + Protected AppID.s, Name_.s, Entry.s, PermsJSON.s, Perm.s + + If Not ParseJSON(0, JSON) : ProcedureReturn "Invalid JSON in manifest" : EndIf + + Root = JSONValue(0) + AppID = GetJSONString(GetJSONMember(Root, "id")) + Name_ = GetJSONString(GetJSONMember(Root, "name")) + Entry = GetJSONString(GetJSONMember(Root, "entry")) + + If AppID = "" Or Name_ = "" Or Entry = "" + FreeJSON(0) + ProcedureReturn "manifest.json missing required field(s): id, name, entry" + EndIf + + If Not _IsValidAppID(AppID) + FreeJSON(0) + ProcedureReturn "Invalid app id '" + AppID + "' (use reverse-domain format)" + EndIf + + If Not _IsValidFilePath(Entry) + FreeJSON(0) + ProcedureReturn "Invalid entry path" + EndIf + + PermsNode = GetJSONMember(Root, "permissions") + PermCount = JSONArraySize(PermsNode) + PermsJSON = ~"[\"storage\"" + + For i = 0 To PermCount - 1 + Perm = GetJSONString(GetJSONElement(PermsNode, i)) + If Perm = "" Or Perm = "storage" : Continue : EndIf + If Not _IsValidPermission(Perm) + FreeJSON(0) + ProcedureReturn "Unknown permission '" + Perm + "'" + EndIf + PermsJSON + ~",\"" + Perm + ~"\"" + Next + PermsJSON + "]" + + *OutAppID\s = AppID + *OutPerms\s = PermsJSON + + FreeJSON(0) + ProcedureReturn "" + EndProcedure + +EndModule +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 402 +; Folding = BAg +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Includes/Auth.pbi b/Server/Includes/Auth.pbi new file mode 100644 index 0000000..c54a63d --- /dev/null +++ b/Server/Includes/Auth.pbi @@ -0,0 +1,121 @@ +Module Auth + EnableExplicit + + ;- Private helpers + Procedure.s GetFormField(PostData.s, Field.s) + ; Parse a single field from application/x-www-form-urlencoded body + Protected Count = CountString(PostData, "&") + 1, i + Protected Pair.s, Key.s + + For i = 1 To Count + Pair = StringField(PostData, i, "&") + Key = StringField(Pair, 1, "=") + If Key = Field + ProcedureReturn URLDecoder(StringField(Pair, 2, "=")) + EndIf + Next + ProcedureReturn "" + EndProcedure + + Procedure SetSessionCookie(*Request, Token.s) + FastCGI::WriteResponseHeader(*Request, "Set-Cookie", + #SESSION_COOKIE + "=" + Token + + "; Path=/; HttpOnly; SameSite=Strict; Max-Age=" + #SESSION_MAX_AGE) + EndProcedure + + Procedure ClearSessionCookie(*Request) + FastCGI::WriteResponseHeader(*Request, "Set-Cookie", + #SESSION_COOKIE + "=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0") + EndProcedure + + ;- Public handlers + Procedure HandleLogin(*Request) + Protected PostData.s = FastCGI::GetPostData(*Request) + Protected Username.s = GetFormField(PostData, "username") + Protected Password.s = GetFormField(PostData, "password") + + If Username = "" Or Password = "" + General::RespondJSON(*Request, ~"{\"success\":false,\"error\":\"Missing credentials\"}") + ProcedureReturn + EndIf + + Protected ValidUser.s = Database::ValidateCredentials(Username, Password) + + If ValidUser <> "" + Protected UserID.i = Database::FindUser(ValidUser) + Protected Token.s = Database::CreateSession(UserID, ValidUser) + SetSessionCookie(*Request, Token) + FastCGI::WriteResponseHeader(*Request, "Content-Type", "application/json; charset=utf-8") + FastCGI::WriteResponseHeader(*Request, "Cache-Control", "no-cache, no-store") + FastCGI::WriteResponseString(*Request, ~"{\"success\":true,\"username\":\"" + ValidUser + ~"\"}") + FastCGI::FinishResponse(*Request) + Else + ; Uniform error - don't reveal which field was wrong + General::RespondJSON(*Request, ~"{\"success\":false,\"error\":\"Invalid username or password\"}") + EndIf + EndProcedure + + Procedure HandleLogout(*Request) + Protected Token.s = FastCGI::GetCookie(*Request, #SESSION_COOKIE) + If Token <> "" + Database::DeleteSession(Token) + EndIf + ClearSessionCookie(*Request) + General::RespondJSON(*Request, ~"{\"success\":true}") + EndProcedure + + Procedure HandleCheck(*Request) + Protected Token.s = FastCGI::GetCookie(*Request, #SESSION_COOKIE) + Protected Username.s = "" + + If Token <> "" + Username = Database::ValidateSession(Token) + EndIf + + If Username <> "" + General::RespondJSON(*Request, ~"{\"authenticated\":true,\"username\":\"" + Username + ~"\"}") + Else + General::RespondJSON(*Request, ~"{\"authenticated\":false}") + EndIf + EndProcedure + + Procedure.s GetSessionUser(*Request) + Protected Token.s = FastCGI::GetCookie(*Request, #SESSION_COOKIE) + If Token <> "" + ProcedureReturn Database::ValidateSession(Token) + EndIf + ProcedureReturn "" + EndProcedure + + Procedure HandleChangePassword(*Request) + Protected Username.s = GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + + Protected CurrentPwd.s = General::GetPostField(*Request, "current_password") + Protected NewPwd.s = General::GetPostField(*Request, "new_password") + + If CurrentPwd = "" Or NewPwd = "" + General::RespondJSON(*Request, ~"{\"error\":\"Missing fields\"}") + ProcedureReturn + EndIf + + If Database::ValidateCredentials(Username, CurrentPwd) = "" + General::RespondJSON(*Request, ~"{\"error\":\"Current password is incorrect\"}") + ProcedureReturn + EndIf + + Protected UserID.i = Database::FindUser(Username) + Database::ChangePassword(UserID, NewPwd) + General::RespondJSON(*Request, ~"{\"success\":true}") + EndProcedure + +EndModule + +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 29 +; Folding = B5 +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Includes/Database.pbi b/Server/Includes/Database.pbi new file mode 100644 index 0000000..c7f2035 --- /dev/null +++ b/Server/Includes/Database.pbi @@ -0,0 +1,420 @@ +Module Database + EnableExplicit + + UseSQLiteDatabase() + + ; Private constants + #DB = 0 + + ; Private procedures + Procedure.s SHA256(text.s) + Protected *Buf, Len.i, Hash.s + Len = StringByteLength(text, #PB_UTF8) + If Len = 0 : ProcedureReturn "" : EndIf + *Buf = AllocateMemory(Len) + If *Buf + PokeS(*Buf, text, -1, #PB_UTF8 | #PB_String_NoZero) + Hash = LCase(Fingerprint(*Buf, Len, #PB_Cipher_SHA2, 256)) + FreeMemory(*Buf) + EndIf + ProcedureReturn Hash + EndProcedure + + Procedure.s GenerateHex(Bytes.i) + Protected Token.s, i + For i = 1 To Bytes + Token + RSet(Hex(Random(255)), 2, "0") + Next + ProcedureReturn LCase(Token) + EndProcedure + + Procedure.s JSONEscape(s.s) + s = ReplaceString(s, "\", "\\") + s = ReplaceString(s, ~"\"", ~"\\\"") + s = ReplaceString(s, ~"\n", ~"\\n") + s = ReplaceString(s, ~"\r", ~"\\r") + s = ReplaceString(s, ~"\t", ~"\\t") + ProcedureReturn s + EndProcedure + + ;- Public procedures + Procedure Init(Path.s) + Protected TempFile.i + + If FileSize(Path) = -1 + TempFile = CreateFile(#PB_Any, Path) + CloseFile(TempFile) + EndIf + + If Not OpenDatabase(#DB, Path, "", "", #PB_Database_SQLite) + ProcedureReturn #False + EndIf + + DatabaseUpdate(#DB, "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL COLLATE NOCASE, password_hash TEXT NOT NULL, salt TEXT NOT NULL, created_at INTEGER NOT NULL)") + DatabaseUpdate(#DB, "CREATE TABLE IF NOT EXISTS sessions (token TEXT PRIMARY KEY, user_id INTEGER NOT NULL, username TEXT NOT NULL, created_at INTEGER NOT NULL, expires_at INTEGER NOT NULL)") + DatabaseUpdate(#DB, "CREATE TABLE IF NOT EXISTS installed_apps (id INTEGER PRIMARY KEY, user_id INTEGER NOT NULL, app_id TEXT NOT NULL, manifest TEXT NOT NULL, permissions TEXT NOT NULL, installed_at INTEGER NOT NULL, UNIQUE(user_id, app_id))") + + ProcedureReturn #True + EndProcedure + + Procedure Close() + If IsDatabase(#DB) + CloseDatabase(#DB) + EndIf + EndProcedure + + ; User management + Procedure UserCount() + Protected Count = 0 + If DatabaseQuery(#DB, "SELECT COUNT(*) FROM users") + If NextDatabaseRow(#DB) : Count = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn Count + EndProcedure + + Procedure FindUser(Username.s) + Protected ID = 0 + SetDatabaseString(#DB, 0, Username) + If DatabaseQuery(#DB, "SELECT id FROM users WHERE username = ? COLLATE NOCASE") + If NextDatabaseRow(#DB) : ID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn ID + EndProcedure + + Procedure CreateUser(Username.s, Password.s) + Protected Salt.s = GenerateHex(16) + Protected Hash.s = SHA256(Password + Salt) + SetDatabaseString(#DB, 0, Username) + SetDatabaseString(#DB, 1, Hash) + SetDatabaseString(#DB, 2, Salt) + SetDatabaseLong(#DB, 3, Date()) + ProcedureReturn DatabaseUpdate(#DB, "INSERT INTO users (username, password_hash, salt, created_at) VALUES (?, ?, ?, ?)") + EndProcedure + + Procedure ChangePassword(UserID.i, NewPassword.s) + Protected Salt.s = GenerateHex(16) + Protected Hash.s = SHA256(NewPassword + Salt) + SetDatabaseString(#DB, 0, Hash) + SetDatabaseString(#DB, 1, Salt) + SetDatabaseLong(#DB, 2, UserID) + DatabaseUpdate(#DB, "UPDATE users SET password_hash = ?, salt = ? WHERE id = ?") + EndProcedure + + Procedure.s ValidateCredentials(Username.s, Password.s) + Protected StoredUser.s, Hash.s, Salt.s + SetDatabaseString(#DB, 0, Username) + If DatabaseQuery(#DB, "SELECT username, password_hash, salt FROM users WHERE username = ? COLLATE NOCASE") + If NextDatabaseRow(#DB) + StoredUser = GetDatabaseString(#DB, 0) + Hash = GetDatabaseString(#DB, 1) + Salt = GetDatabaseString(#DB, 2) + EndIf + FinishDatabaseQuery(#DB) + EndIf + If StoredUser = "" : ProcedureReturn "" : EndIf + If SHA256(Password + Salt) = Hash : ProcedureReturn StoredUser : EndIf + ProcedureReturn "" + EndProcedure + + Procedure.s CreateSession(UserID.i, Username.s) + Protected Token.s = GenerateHex(32) + Protected Now.i = Date() + SetDatabaseString(#DB, 0, Token) + SetDatabaseLong(#DB, 1, UserID) + SetDatabaseString(#DB, 2, Username) + SetDatabaseLong(#DB, 3, Now) + SetDatabaseLong(#DB, 4, Now + #SESSION_DURATION) + DatabaseUpdate(#DB, "INSERT OR REPLACE INTO sessions (token, user_id, username, created_at, expires_at) VALUES (?, ?, ?, ?, ?)") + ProcedureReturn Token + EndProcedure + + Procedure.s ValidateSession(Token.s) + Protected Username.s = "" + If Len(Token) <> 64 : ProcedureReturn "" : EndIf + SetDatabaseString(#DB, 0, Token) + SetDatabaseLong(#DB, 1, Date()) + If DatabaseQuery(#DB, "SELECT username FROM sessions WHERE token = ? AND expires_at > ?") + If NextDatabaseRow(#DB) : Username = GetDatabaseString(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn Username + EndProcedure + + Procedure DeleteSession(Token.s) + SetDatabaseString(#DB, 0, Token) + DatabaseUpdate(#DB, "DELETE FROM sessions WHERE token = ?") + EndProcedure + + Procedure CleanExpiredSessions() + SetDatabaseLong(#DB, 0, Date()) + DatabaseUpdate(#DB, "DELETE FROM sessions WHERE expires_at <= ?") + EndProcedure + + ;- File system + Procedure.i FSInit() + Protected Now.i = Date() + DatabaseUpdate(#DB, "CREATE TABLE IF NOT EXISTS fs_nodes (id INTEGER PRIMARY KEY AUTOINCREMENT, owner_id INTEGER NOT NULL, parent_id INTEGER, name TEXT NOT NULL COLLATE NOCASE, is_dir INTEGER NOT NULL DEFAULT 0, mime_type TEXT NOT NULL DEFAULT 'application/octet-stream', size INTEGER NOT NULL DEFAULT 0, created_at INTEGER NOT NULL, modified_at INTEGER NOT NULL)") + DatabaseUpdate(#DB, "CREATE UNIQUE INDEX IF NOT EXISTS idx_fs_unique ON fs_nodes(parent_id, name)") + DatabaseUpdate(#DB, "CREATE INDEX IF NOT EXISTS idx_fs_owner ON fs_nodes(owner_id)") + + ; Shared root - owner_id 0, one row, idempotent + SetDatabaseLong(#DB, 0, Now) + SetDatabaseLong(#DB, 1, Now) + DatabaseUpdate(#DB, "INSERT OR IGNORE INTO fs_nodes (owner_id, parent_id, name, is_dir, created_at, modified_at) VALUES (0, NULL, 'shared', 1, ?, ?)") + + ProcedureReturn #True + EndProcedure + + Procedure.i FSGetOrCreateHome(UserID.i) + Protected ID.i = 0, Now.i + SetDatabaseLong(#DB, 0, UserID) + If DatabaseQuery(#DB, "SELECT id FROM fs_nodes WHERE owner_id = ? AND parent_id IS NULL") + If NextDatabaseRow(#DB) : ID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + If ID = 0 + Now = Date() + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseLong(#DB, 1, Now) + SetDatabaseLong(#DB, 2, Now) + DatabaseUpdate(#DB, "INSERT INTO fs_nodes (owner_id, parent_id, name, is_dir, created_at, modified_at) VALUES (?, NULL, 'home', 1, ?, ?)") + If DatabaseQuery(#DB, "SELECT last_insert_rowid()") + If NextDatabaseRow(#DB) : ID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + EndIf + ProcedureReturn ID + EndProcedure + + Procedure.i FSResolve(UserID.i, Path.s) + Protected CurrentID.i, SegCount.i, i.i, Seg.s, CandID.i + + While Left(Path, 1) = "/" : Path = Mid(Path, 2) : Wend + While Right(Path, 1) = "/" : Path = Left(Path, Len(Path) - 1) : Wend + + If Path = "shared" Or Left(Path, 7) = "shared/" + If DatabaseQuery(#DB, "SELECT id FROM fs_nodes WHERE owner_id = 0 AND parent_id IS NULL") + If NextDatabaseRow(#DB) : CurrentID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + If Path = "shared" : ProcedureReturn CurrentID : EndIf + Path = Mid(Path, 8) ; strip "shared/" + Else + CurrentID = FSGetOrCreateHome(UserID) + If Path = "" : ProcedureReturn CurrentID : EndIf + EndIf + + If CurrentID = 0 : ProcedureReturn 0 : EndIf + + SegCount = CountString(Path, "/") + 1 + For i = 1 To SegCount + Seg = StringField(Path, i, "/") + If Seg = "" : Continue : EndIf + CandID = 0 + SetDatabaseLong(#DB, 0, CurrentID) + SetDatabaseString(#DB, 1, Seg) + If DatabaseQuery(#DB, "SELECT id FROM fs_nodes WHERE parent_id = ? AND name = ?") + If NextDatabaseRow(#DB) : CandID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + If CandID = 0 : ProcedureReturn 0 : EndIf + CurrentID = CandID + Next + + ProcedureReturn CurrentID + EndProcedure + + Procedure.s FSList(NodeID.i) + Protected JSON.s = "[", First.i = #True + SetDatabaseLong(#DB, 0, NodeID) + If DatabaseQuery(#DB, "SELECT id, name, is_dir, mime_type, size, modified_at FROM fs_nodes WHERE parent_id = ? ORDER BY is_dir DESC, name") + While NextDatabaseRow(#DB) + If Not First : JSON + "," : EndIf + JSON + ~"{\"id\":" + GetDatabaseLong(#DB, 0) + + ~",\"name\":\"" + JSONEscape(GetDatabaseString(#DB, 1)) + ~"\"" + + ~",\"is_dir\":" + GetDatabaseLong(#DB, 2) + + ~",\"mime_type\":\"" + JSONEscape(GetDatabaseString(#DB, 3)) + ~"\"" + + ~",\"size\":" + GetDatabaseLong(#DB, 4) + + ~",\"modified_at\":" + GetDatabaseLong(#DB, 5) + "}" + First = #False + Wend + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn JSON + "]" + EndProcedure + + Procedure.s FSStat(NodeID.i) + Protected JSON.s = "" + SetDatabaseLong(#DB, 0, NodeID) + If DatabaseQuery(#DB, "SELECT id, owner_id, parent_id, name, is_dir, mime_type, size, created_at, modified_at FROM fs_nodes WHERE id = ?") + If NextDatabaseRow(#DB) + JSON = ~"{\"id\":" + GetDatabaseLong(#DB, 0) + + ~",\"owner_id\":" + GetDatabaseLong(#DB, 1) + + ~",\"parent_id\":" + GetDatabaseLong(#DB, 2) + + ~",\"name\":\"" + JSONEscape(GetDatabaseString(#DB, 3)) + ~"\"" + + ~",\"is_dir\":" + GetDatabaseLong(#DB, 4) + + ~",\"mime_type\":\"" + JSONEscape(GetDatabaseString(#DB, 5)) + ~"\"" + + ~",\"size\":" + GetDatabaseLong(#DB, 6) + + ~",\"created_at\":" + GetDatabaseLong(#DB, 7) + + ~",\"modified_at\":" + GetDatabaseLong(#DB, 8) + "}" + EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn JSON + EndProcedure + + Procedure.i FSGetOwner(NodeID.i, *IsDir.Integer = 0) + Protected OwnerID.i = -1 + SetDatabaseLong(#DB, 0, NodeID) + If DatabaseQuery(#DB, "SELECT owner_id, is_dir FROM fs_nodes WHERE id = ?") + If NextDatabaseRow(#DB) + OwnerID = GetDatabaseLong(#DB, 0) + If *IsDir : *IsDir\i = GetDatabaseLong(#DB, 1) : EndIf + EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn OwnerID + EndProcedure + + Procedure.i FSMkdir(UserID.i, ParentID.i, Name.s) + Protected Now.i = Date(), ID.i = 0 + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseLong(#DB, 1, ParentID) + SetDatabaseString(#DB, 2, Name) + SetDatabaseLong(#DB, 3, Now) + SetDatabaseLong(#DB, 4, Now) + DatabaseUpdate(#DB, "INSERT OR IGNORE INTO fs_nodes (owner_id, parent_id, name, is_dir, created_at, modified_at) VALUES (?, ?, ?, 1, ?, ?)") + SetDatabaseLong(#DB, 0, ParentID) + SetDatabaseString(#DB, 1, Name) + If DatabaseQuery(#DB, "SELECT id FROM fs_nodes WHERE parent_id = ? AND name = ?") + If NextDatabaseRow(#DB) : ID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn ID + EndProcedure + + Procedure.i FSCreateFile(UserID.i, ParentID.i, Name.s, MimeType.s) + Protected Now.i = Date(), ID.i = 0 + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseLong(#DB, 1, ParentID) + SetDatabaseString(#DB, 2, Name) + SetDatabaseString(#DB, 3, MimeType) + SetDatabaseLong(#DB, 4, Now) + SetDatabaseLong(#DB, 5, Now) + DatabaseUpdate(#DB, "INSERT OR IGNORE INTO fs_nodes (owner_id, parent_id, name, is_dir, mime_type, created_at, modified_at) VALUES (?, ?, ?, 0, ?, ?, ?)") + SetDatabaseLong(#DB, 0, ParentID) + SetDatabaseString(#DB, 1, Name) + If DatabaseQuery(#DB, "SELECT id FROM fs_nodes WHERE parent_id = ? AND name = ?") + If NextDatabaseRow(#DB) : ID = GetDatabaseLong(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn ID + EndProcedure + + Procedure FSUpdateFile(NodeID.i, Size.i) + SetDatabaseLong(#DB, 0, Size) + SetDatabaseLong(#DB, 1, Date()) + SetDatabaseLong(#DB, 2, NodeID) + DatabaseUpdate(#DB, "UPDATE fs_nodes SET size = ?, modified_at = ? WHERE id = ?") + EndProcedure + + Procedure FSDelete(NodeID.i) + Protected NewList ChildIDs.i() + SetDatabaseLong(#DB, 0, NodeID) + If DatabaseQuery(#DB, "SELECT id FROM fs_nodes WHERE parent_id = ?") + While NextDatabaseRow(#DB) + AddElement(ChildIDs()) : ChildIDs() = GetDatabaseLong(#DB, 0) + Wend + FinishDatabaseQuery(#DB) + EndIf + ForEach ChildIDs() + FSDelete(ChildIDs()) + Next + SetDatabaseLong(#DB, 0, NodeID) + DatabaseUpdate(#DB, "DELETE FROM fs_nodes WHERE id = ?") + EndProcedure + + Procedure FSMove(NodeID.i, NewParentID.i, NewName.s) + SetDatabaseLong(#DB, 0, NewParentID) + SetDatabaseString(#DB, 1, NewName) + SetDatabaseLong(#DB, 2, Date()) + SetDatabaseLong(#DB, 3, NodeID) + DatabaseUpdate(#DB, "UPDATE fs_nodes SET parent_id = ?, name = ?, modified_at = ? WHERE id = ?") + EndProcedure + + ;- Applications + Procedure.i AppInstall(UserID.i, AppID.s, Manifest.s, Permissions.s) + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseString(#DB, 1, AppID) + SetDatabaseString(#DB, 2, Manifest) + SetDatabaseString(#DB, 3, Permissions) + SetDatabaseLong(#DB, 4, Date()) + ProcedureReturn DatabaseUpdate(#DB, "INSERT OR REPLACE INTO installed_apps (user_id, app_id, manifest, permissions, installed_at) VALUES (?, ?, ?, ?, ?)") + EndProcedure + + Procedure AppUninstall(UserID.i, AppID.s) + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseString(#DB, 1, AppID) + DatabaseUpdate(#DB, "DELETE FROM installed_apps WHERE user_id = ? AND app_id = ?") + EndProcedure + + Procedure.i AppExists(UserID.i, AppID.s) + Protected Exists.i = #False + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseString(#DB, 1, AppID) + If DatabaseQuery(#DB, "SELECT id FROM installed_apps WHERE user_id = ? AND app_id = ?") + Exists = Bool(NextDatabaseRow(#DB)) + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn Exists + EndProcedure + + Procedure.s AppGetPermissions(UserID.i, AppID.s) + Protected Result.s = "" + SetDatabaseLong(#DB, 0, UserID) + SetDatabaseString(#DB, 1, AppID) + If DatabaseQuery(#DB, "SELECT permissions FROM installed_apps WHERE user_id = ? AND app_id = ?") + If NextDatabaseRow(#DB) : Result = GetDatabaseString(#DB, 0) : EndIf + FinishDatabaseQuery(#DB) + EndIf + ProcedureReturn Result + EndProcedure + + Procedure.s AppList(UserID.i) + Protected JSON.s = "[", First.i = #True + Protected AppID.s, Manifest.s, Perms.s, InstalledAt.i + + SetDatabaseLong(#DB, 0, UserID) + If Not DatabaseQuery(#DB, "SELECT app_id, manifest, permissions, installed_at FROM installed_apps WHERE user_id = ? ORDER BY installed_at ASC") + ProcedureReturn "[]" + EndIf + + While NextDatabaseRow(#DB) + AppID = GetDatabaseString(#DB, 0) + Manifest = GetDatabaseString(#DB, 1) + Perms = GetDatabaseString(#DB, 2) + InstalledAt = GetDatabaseLong(#DB, 3) + + If Not First : JSON + "," : EndIf + First = #False + + ; Manifest and permissions are inlined as-is (already valid JSON) + JSON + ~"{\"app_id\":\"" + JSONEscape(AppID) + ~"\"" + + ~",\"manifest\":" + Manifest + + ~",\"permissions\":" + Perms + + ~",\"installed_at\":" + InstalledAt + "}" + Wend + + FinishDatabaseQuery(#DB) + ProcedureReturn JSON + "]" + EndProcedure + +EndModule + +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 37 +; Folding = BAAAA+ +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Includes/FileSystem.pbi b/Server/Includes/FileSystem.pbi new file mode 100644 index 0000000..4008a7f --- /dev/null +++ b/Server/Includes/FileSystem.pbi @@ -0,0 +1,299 @@ +Module FileSystem + EnableExplicit + + ; Private constants + #BlobsDir = "blobs/" + + ;- Helpers + Procedure CanAccess(UserID, NodeID) + Protected OwnerID = Database::FSGetOwner(NodeID) + ProcedureReturn Bool(OwnerID = UserID Or OwnerID = 0) + EndProcedure + + Procedure ResolveFromQuery(*Request, UserID) + Protected IDStr.s = General::GetQueryField(*Request, "id") + If IDStr <> "" : ProcedureReturn Val(IDStr) : EndIf + ProcedureReturn Database::FSResolve(UserID, General::GetQueryField(*Request, "path")) + EndProcedure + + Procedure ResolveFromPost(*Request, UserID) + Protected IDStr.s = General::GetPostField(*Request, "id") + If IDStr <> "" : ProcedureReturn Val(IDStr) : EndIf + ProcedureReturn Database::FSResolve(UserID, General::GetPostField(*Request, "path")) + EndProcedure + + Procedure ResolveParent(UserID, Path.s) + While Right(Path, 1) = "/" : Path = Left(Path, Len(Path) - 1) : Wend + ProcedureReturn Database::FSResolve(UserID, Path) + EndProcedure + + ;- Public procedures + + ; GET /api/fs/list?path=... or ?id=... + Procedure HandleList(*Request) + Protected UserID, NodeID + Protected Username.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + NodeID = ResolveFromQuery(*Request, UserID) + + If NodeID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + If Not CanAccess(UserID, NodeID) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + General::RespondJSON(*Request, Database::FSList(NodeID)) + EndProcedure + + ; GET /api/fs/stat?path=... or ?id=... + Procedure HandleStat(*Request) + Protected UserID, NodeID + Protected Username.s, Stat.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + NodeID = ResolveFromQuery(*Request, UserID) + + If NodeID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + If Not CanAccess(UserID, NodeID) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + Stat = Database::FSStat(NodeID) + If Stat = "" + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + Else + General::RespondJSON(*Request, Stat) + EndIf + EndProcedure + + ; GET /api/fs/read?path=... or ?id=... + Procedure HandleRead(*Request) + Protected UserID, NodeID + Protected IsDir.Integer + Protected Username.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + NodeID = ResolveFromQuery(*Request, UserID) + + If NodeID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + If Not CanAccess(UserID, NodeID) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + Database::FSGetOwner(NodeID, @IsDir) + If IsDir\i + General::RespondJSON(*Request, ~"{\"error\":\"Is a directory\"}", "400 Bad Request") + ProcedureReturn + EndIf + + If Not FastCGI::RespondFile(*Request, #BlobsDir + NodeID) + General::RespondJSON(*Request, ~"{\"error\":\"Blob missing\"}", "404 Not Found") + EndIf + EndProcedure + + ; POST /api/fs/write body: path=...&content=... [&mime_type=...] + Procedure HandleWrite(*Request) + Protected UserID, ParentID, NodeID, FileID, BufLen, Size, *Buf + Protected Username.s, Path.s, Content.s, MimeType.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + Path = General::GetPostField(*Request, "path") + Content = General::GetPostField(*Request, "content") + MimeType = General::GetPostField(*Request, "mime_type") + + If Path = "" + General::RespondJSON(*Request, ~"{\"error\":\"Missing path\"}") + ProcedureReturn + EndIf + If MimeType = "" : MimeType = "text/plain" : EndIf + + ParentID = ResolveParent(UserID, GetPathPart(Path)) + If ParentID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Parent directory not found\"}", "404 Not Found") + ProcedureReturn + EndIf + If Not CanAccess(UserID, ParentID) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + NodeID = Database::FSResolve(UserID, Path) + If NodeID = 0 + NodeID = Database::FSCreateFile(UserID, ParentID, GetFilePart(Path), MimeType) + EndIf + If NodeID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Could not create node\"}", "500 Internal Server Error") + ProcedureReturn + EndIf + + FileID = CreateFile(#PB_Any, #BlobsDir + NodeID) + If FileID + BufLen = StringByteLength(Content, #PB_UTF8) + If BufLen > 0 + *Buf = AllocateMemory(BufLen) + If *Buf + PokeS(*Buf, Content, -1, #PB_UTF8 | #PB_String_NoZero) + WriteData(FileID, *Buf, BufLen) + FreeMemory(*Buf) + EndIf + EndIf + Size = Lof(FileID) + CloseFile(FileID) + Database::FSUpdateFile(NodeID, Size) + General::RespondJSON(*Request, ~"{\"success\":true,\"id\":" + NodeID + "}") + Else + General::RespondJSON(*Request, ~"{\"error\":\"Could not write blob\"}", "500 Internal Server Error") + EndIf + EndProcedure + + ; POST /api/fs/mkdir body: path=... + Procedure HandleMkdir(*Request) + Protected UserID, ParentID, DirID + Protected Username.s, Path.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + Path = General::GetPostField(*Request, "path") + + If Path = "" + General::RespondJSON(*Request, ~"{\"error\":\"Missing path\"}") + ProcedureReturn + EndIf + + ParentID = ResolveParent(UserID, GetPathPart(Path)) + If ParentID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Parent not found\"}", "404 Not Found") + ProcedureReturn + EndIf + If Not CanAccess(UserID, ParentID) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + DirID = Database::FSMkdir(UserID, ParentID, GetFilePart(Path)) + If DirID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Already exists or could not create\"}", "409 Conflict") + Else + General::RespondJSON(*Request, ~"{\"success\":true,\"id\":" + DirID + "}") + EndIf + EndProcedure + + ; POST /api/fs/delete body: path=... or id=... + Procedure HandleDelete(*Request) + Protected UserID, NodeID, OwnerID + Protected IsDir.Integer + Protected Username.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + NodeID = ResolveFromPost(*Request, UserID) + + If NodeID = 0 + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + + OwnerID = Database::FSGetOwner(NodeID, @IsDir) + If OwnerID <> UserID + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + If Not IsDir\i : DeleteFile(#BlobsDir + NodeID) : EndIf + + Database::FSDelete(NodeID) + General::RespondJSON(*Request, ~"{\"success\":true}") + EndProcedure + + ; POST /api/fs/move body: path=...&to=... or id=...&to_parent_id=...&name=... + Procedure HandleMove(*Request) + Protected UserID, NodeID, NewParentID, OwnerID + Protected IsDir.Integer + Protected Username.s, IDStr.s, NewName.s, FromPath.s, ToPath.s + + Username = Auth::GetSessionUser(*Request) + If Username = "" + General::RespondJSON(*Request, ~"{\"error\":\"Unauthorized\"}", "401 Unauthorized") + ProcedureReturn + EndIf + UserID = Database::FindUser(Username) + IDStr = General::GetPostField(*Request, "id") + + If IDStr <> "" + NodeID = Val(IDStr) + NewParentID = Val(General::GetPostField(*Request, "to_parent_id")) + NewName = General::GetPostField(*Request, "name") + Else + FromPath = General::GetPostField(*Request, "path") + ToPath = General::GetPostField(*Request, "to") + NodeID = Database::FSResolve(UserID, FromPath) + NewParentID = ResolveParent(UserID, GetPathPart(ToPath)) + NewName = GetFilePart(ToPath) + EndIf + + If NodeID = 0 Or NewParentID = 0 Or NewName = "" + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + ProcedureReturn + EndIf + + OwnerID = Database::FSGetOwner(NodeID, @IsDir) + If OwnerID <> UserID + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + If Not CanAccess(UserID, NewParentID) + General::RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + Database::FSMove(NodeID, NewParentID, NewName) + General::RespondJSON(*Request, ~"{\"success\":true}") + EndProcedure + +EndModule + +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 2 +; Folding = BA- +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Includes/General.pbi b/Server/Includes/General.pbi new file mode 100644 index 0000000..960c19d --- /dev/null +++ b/Server/Includes/General.pbi @@ -0,0 +1,68 @@ +Module General + EnableExplicit + + Procedure RespondJSON(*Request, JSON.s, Status.s = "200 OK") + FastCGI::WriteResponseHeader(*Request, "Status", Status) + FastCGI::WriteResponseHeader(*Request, "Content-Type", "application/json; charset=utf-8") + FastCGI::WriteResponseHeader(*Request, "Cache-Control", "no-cache, no-store, must-revalidate") + FastCGI::WriteResponseString(*Request, JSON) + FastCGI::FinishResponse(*Request) + EndProcedure + + Procedure.s GetPostField(*Request, Field.s) + Protected PostData.s = FastCGI::GetPostData(*Request) + Protected Count.i = CountString(PostData, "&") + 1 + Protected i.i, Pair.s, Key.s + For i = 1 To Count + Pair = StringField(PostData, i, "&") + Key = StringField(Pair, 1, "=") + If Key = Field + ProcedureReturn URLDecoder(StringField(Pair, 2, "=")) + EndIf + Next + ProcedureReturn "" + EndProcedure + + Procedure.s GetQueryField(*Request, Field.s) + Protected QS.s = FastCGI::GetParameter(*Request, "QUERY_STRING") + Protected Count.i = CountString(QS, "&") + 1 + Protected i.i, Pair.s, Key.s + For i = 1 To Count + Pair = StringField(QS, i, "&") + Key = StringField(Pair, 1, "=") + If Key = Field + ProcedureReturn URLDecoder(StringField(Pair, 2, "=")) + EndIf + Next + ProcedureReturn "" + EndProcedure + + Procedure ServeStatic(*Request, URI.s) + Protected File.s + + If FindString(URI, "..") Or FindString(URI, "//") + RespondJSON(*Request, ~"{\"error\":\"Forbidden\"}", "403 Forbidden") + ProcedureReturn + EndIf + + If URI = "/" Or URI = "" + File = "www/index.html" + Else + File = "www" + URI + EndIf + + If FileSize(File) >= 0 + If Not FastCGI::RespondFile(*Request, File) + RespondJSON(*Request, ~"{\"error\":\"Read error\"}", "500 Internal Server Error") + EndIf + Else + RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + EndIf + EndProcedure + +EndModule +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 24 +; Folding = h +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Includes/Modules.pbi b/Server/Includes/Modules.pbi new file mode 100644 index 0000000..83e4a7d --- /dev/null +++ b/Server/Includes/Modules.pbi @@ -0,0 +1,87 @@ +DeclareModule Database + ; Public Constants + #SESSION_DURATION = 86400 ; 24 hours + + ; Public procedure declarations + Declare.i Init(Path.s) + Declare Close() + Declare.i UserCount() + Declare.i FindUser(Username.s) + Declare.i CreateUser(Username.s, Password.s) + Declare ChangePassword(UserID.i, NewPassword.s) + Declare.s ValidateCredentials(Username.s, Password.s) + Declare.s CreateSession(UserID.i, Username.s) + Declare.s ValidateSession(Token.s) + Declare DeleteSession(Token.s) + Declare CleanExpiredSessions() + + Declare.i FSInit() + Declare.i FSGetOrCreateHome(UserID.i) + Declare.i FSResolve(UserID.i, Path.s) + Declare.s FSList(NodeID.i) + Declare.s FSStat(NodeID.i) + Declare.i FSGetOwner(NodeID.i, *IsDir.Integer = 0) + Declare.i FSMkdir(UserID.i, ParentID.i, Name.s) + Declare.i FSCreateFile(UserID.i, ParentID.i, Name.s, MimeType.s) + Declare FSUpdateFile(NodeID.i, Size.i) + Declare FSDelete(NodeID.i) + Declare FSMove(NodeID.i, NewParentID.i, NewName.s) + + Declare.i AppInstall(UserID.i, AppID.s, Manifest.s, Permissions.s) + Declare AppUninstall(UserID.i, AppID.s) + Declare.i AppExists(UserID.i, AppID.s) + Declare.s AppGetPermissions(UserID.i, AppID.s) + Declare.s AppList(UserID.i) +EndDeclareModule + +DeclareModule General + ; Public procedure declarations + Declare RespondJSON(*Request, JSON.s, Status.s = "200 OK") + Declare ServeStatic(*Request, URI.s) + Declare.s GetPostField(*Request, Field.s) + Declare.s GetQueryField(*Request, Field.s) +EndDeclareModule + +DeclareModule Auth + ; Public Constants + #SESSION_COOKIE = "kumos_session" + #SESSION_MAX_AGE = "86400" + + ; Public procedure declarations + Declare HandleLogin(*Request) + Declare HandleLogout(*Request) + Declare HandleCheck(*Request) + Declare.s GetSessionUser(*Request) + Declare HandleChangePassword(*Request) +EndDeclareModule + +DeclareModule Router + ; Public procedure declarations + Declare Route(*Request) +EndDeclareModule + +DeclareModule FileSystem + ; Public procedure declarations + Declare HandleList(*Request) + Declare HandleStat(*Request) + Declare HandleRead(*Request) + Declare HandleWrite(*Request) + Declare HandleMkdir(*Request) + Declare HandleDelete(*Request) + Declare HandleMove(*Request) +EndDeclareModule + +DeclareModule AppStore + ; Public procedure declarations + Declare Init() + Declare HandleList(*Request) + Declare HandleInstall(*Request) + Declare HandleUninstall(*Request) + Declare HandleServeFile(*Request, AppID.s, FilePath.s) +EndDeclareModule +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 23 +; FirstLine = 4 +; Folding = -- +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Includes/Router.pbi b/Server/Includes/Router.pbi new file mode 100644 index 0000000..0320327 --- /dev/null +++ b/Server/Includes/Router.pbi @@ -0,0 +1,117 @@ +Module Router + EnableExplicit + + Procedure _MethodNotAllowed(*Request) + General::RespondJSON(*Request, ~"{\"error\":\"Method not allowed\"}", "405 Method Not Allowed") + EndProcedure + + Procedure Route(*Request) + Protected URI.s = FastCGI::GetParameter(*Request, "REQUEST_URI") + Protected Method.s = FastCGI::GetParameter(*Request, "REQUEST_METHOD") + + Protected QPos.i = FindString(URI, "?") + If QPos > 0 : URI = Left(URI, QPos - 1) : EndIf + + If Left(URI, 5) <> "/api/" + General::ServeStatic(*Request, URI) + ProcedureReturn + EndIf + + If Left(URI, 10) = "/api/apps/" And + URI <> "/api/apps/list" And + URI <> "/api/apps/install" And + URI <> "/api/apps/uninstall" + + ; URI looks like /api/apps// + Protected AppSegment.s = Mid(URI, 11) + Protected SlashPos.i = FindString(AppSegment, "/") + + If SlashPos > 1 + Protected AppID.s = Left(AppSegment, SlashPos - 1) + Protected FilePath.s = Mid(AppSegment, SlashPos + 1) + If FilePath <> "" And Method = "GET" + AppStore::HandleServeFile(*Request, AppID, FilePath) + Else + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + EndIf + Else + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + EndIf + + ProcedureReturn + EndIf + + + Select URI + + ; Auth + Case "/api/auth/login" + If Method = "POST" : Auth::HandleLogin(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/auth/logout" + If Method = "POST" : Auth::HandleLogout(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/auth/check" + Auth::HandleCheck(*Request) + + Case "/api/auth/password" + If Method = "POST" : Auth::HandleChangePassword(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + ; Filesystem + Case "/api/fs/list" + If Method = "GET" : FileSystem::HandleList(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/fs/stat" + If Method = "GET" : FileSystem::HandleStat(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/fs/read" + If Method = "GET" : FileSystem::HandleRead(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/fs/write" + If Method = "POST" : FileSystem::HandleWrite(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/fs/mkdir" + If Method = "POST" : FileSystem::HandleMkdir(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/fs/delete" + If Method = "POST" : FileSystem::HandleDelete(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/fs/move" + If Method = "POST" : FileSystem::HandleMove(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + ; App store + Case "/api/apps/list" + If Method = "GET" : AppStore::HandleList(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/apps/install" + If Method = "POST" : AppStore::HandleInstall(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Case "/api/apps/uninstall" + If Method = "POST" : AppStore::HandleUninstall(*Request) + Else : _MethodNotAllowed(*Request) : EndIf + + Default + General::RespondJSON(*Request, ~"{\"error\":\"Not found\"}", "404 Not Found") + + EndSelect + EndProcedure + +EndModule + +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 111 +; Folding = 6 +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/KUMOS Server.pbp b/Server/KUMOS Server.pbp new file mode 100644 index 0000000..0bcc06b --- /dev/null +++ b/Server/KUMOS Server.pbp @@ -0,0 +1,63 @@ + + + +
+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
diff --git a/Server/Libraries/FastCGI.pbi b/Server/Libraries/FastCGI.pbi new file mode 100644 index 0000000..47d5eb2 --- /dev/null +++ b/Server/Libraries/FastCGI.pbi @@ -0,0 +1,793 @@ +DeclareModule FastCGI + ; Server + Declare Open(Port, *Callback, BindedIP.s = "") ; Create a FCGI Application on the given port. Return a Server object if succeed or 0 otherwise. Callback format : Callback(Request) + Declare Close(*Server) ; Close the given Server. + + ; Request + Declare FinishResponse(*Request) ; Send the response and close connection + Declare.s GetCookie(*Request, Cookie.s) ; Return the value of the given cookie + Declare.s GetParameter(*Request, Parameter.s) ; Return the value of the given parameter if it exists. + Declare.s GetPostData(*Request) ; Return raw POST data + Declare WriteResponseHeader(*Request, Header.s, Value.s) ; Write a header to the response + Declare WriteResponseData(*Request, *Buffer, Length) ; Add data to the response + Declare WriteResponseString(*Request, String.s, Format = #PB_UTF8) ; Add a string to the response + Declare WriteResponseContentType(*Request, File.s) ; Write the MIME type based on file extension + Declare RespondFile(*Request, File.s) ; Automatically send a file as a response +EndDeclareModule + +Module FastCGI + EnableExplicit + + Global NewMap MIMETypes.s() + + ;{ Constants + #FCGI_VERSION = 1 + + ; Record types + #FCGI_BEGIN_REQUEST = 1 + #FCGI_ABORT_REQUEST = 2 + #FCGI_END_REQUEST = 3 + #FCGI_PARAMS = 4 + #FCGI_STDIN = 5 + #FCGI_STDOUT = 6 + #FCGI_STDERR = 7 + #FCGI_DATA = 8 + #FCGI_GET_VALUES = 9 + #FCGI_GET_VALUES_RESULT = 10 + #FCGI_UNKNOWN_TYPE = 11 + + ; Roles + #FCGI_RESPONDER = 1 + #FCGI_AUTHORIZER = 2 + #FCGI_FILTER = 3 + + ; Flags + #FCGI_KEEP_CONN = 1 + + ; Protocol status + #FCGI_REQUEST_COMPLETE = 0 + #FCGI_CANT_MPX_CONN = 1 + #FCGI_OVERLOADED = 2 + #FCGI_UNKNOWN_ROLE = 3 + + #HEADER_SIZE = 8 + #MAX_CONTENT_LENGTH = 65535 + #MAX_RECORD_SIZE = 65528 ; 65535 - 8 (aligned to 8 bytes) + ;} + + ;{ Structures + Structure FCGI_Header + version.a + type.a + requestIdB1.a + requestIdB0.a + contentLengthB1.a + contentLengthB0.a + paddingLength.a + reserved.a + EndStructure + + Structure FCGI_BeginRequestBody + roleB1.a + roleB0.a + flags.a + reserved.a[5] + EndStructure + + Structure FCGI_EndRequestBody + appStatusB3.a + appStatusB2.a + appStatusB1.a + appStatusB0.a + protocolStatus.a + reserved.a[3] + EndStructure + + Structure Server + ServerID.i + Thread.i + Stop.i + *Callback + Mutex.i + EndStructure + + Structure Request + ClientID.i + RequestID.u + KeepConnection.a + Role.u + ParamsComplete.a + StdinComplete.a + Map Parameters.s() + Map ResponseHeaders.s() + List Cookies.s() + List ResponseData.i() + PostData.s + *PostDataBuffer + PostDataLength.i + EndStructure + ;} + + ;{ Private procedure declarations + Declare ServerThread(*Server) + Declare ProcessNameValuePairs(*Data, *Request.Request, Length) + Declare ReceiveAllData(ClientID, *Buffer, Length) + Declare SendAllData(ClientID, *Buffer, Length) + Declare BuildHeader(*Header.FCGI_Header, Type.a, RequestID.u, ContentLength.u, PaddingLength.a) + Declare SendRecord(ClientID, Type.a, RequestID.u, *Content, ContentLength) + Declare SendEndRequest(ClientID, RequestID.u, AppStatus.l, ProtocolStatus.a) + ;} + + ;{ Helper procedures + ; Receive exactly 'Length' bytes, blocking until complete or error + Procedure ReceiveAllData(ClientID, *Buffer, Length) + Protected Received = 0, Result + + While Received < Length + Result = ReceiveNetworkData(ClientID, *Buffer + Received, Length - Received) + If Result <= 0 + ProcedureReturn -1 ; Connection closed or error + EndIf + Received + Result + Wend + + ProcedureReturn Received + EndProcedure + + ; Send all data, blocking until complete + Procedure SendAllData(ClientID, *Buffer, Length) + Protected Sent = 0, Result + + While Sent < Length + Result = SendNetworkData(ClientID, *Buffer + Sent, Length - Sent) + If Result <= 0 + ProcedureReturn -1 + EndIf + Sent + Result + Wend + + ProcedureReturn Sent + EndProcedure + + ; Build a FastCGI header + Procedure BuildHeader(*Header.FCGI_Header, Type.a, RequestID.u, ContentLength.u, PaddingLength.a) + *Header\version = #FCGI_VERSION + *Header\type = Type + *Header\requestIdB1 = (RequestID >> 8) & $FF + *Header\requestIdB0 = RequestID & $FF + *Header\contentLengthB1 = (ContentLength >> 8) & $FF + *Header\contentLengthB0 = ContentLength & $FF + *Header\paddingLength = PaddingLength + *Header\reserved = 0 + EndProcedure + + ; Send a complete FastCGI record + Procedure SendRecord(ClientID, Type.a, RequestID.u, *Content, ContentLength) + Protected *Packet, PacketSize, PaddingLength.a, Result + + ; Calculate padding to align to 8 bytes + PaddingLength = (8 - (ContentLength % 8)) % 8 + PacketSize = #HEADER_SIZE + ContentLength + PaddingLength + + *Packet = AllocateMemory(PacketSize, #PB_Memory_NoClear) + If Not *Packet + ProcedureReturn #False + EndIf + + ; Build header + BuildHeader(*Packet, Type, RequestID, ContentLength, PaddingLength) + + ; Copy content if any + If *Content And ContentLength > 0 + CopyMemory(*Content, *Packet + #HEADER_SIZE, ContentLength) + EndIf + + ; Zero padding + If PaddingLength > 0 + FillMemory(*Packet + #HEADER_SIZE + ContentLength, PaddingLength, 0) + EndIf + + ; Send + Result = SendAllData(ClientID, *Packet, PacketSize) + FreeMemory(*Packet) + + ProcedureReturn Bool(Result > 0) + EndProcedure + + ; Send FCGI_END_REQUEST record + Procedure SendEndRequest(ClientID, RequestID.u, AppStatus.l, ProtocolStatus.a) + Protected Body.FCGI_EndRequestBody + + Body\appStatusB3 = (AppStatus >> 24) & $FF + Body\appStatusB2 = (AppStatus >> 16) & $FF + Body\appStatusB1 = (AppStatus >> 8) & $FF + Body\appStatusB0 = AppStatus & $FF + Body\protocolStatus = ProtocolStatus + + ProcedureReturn SendRecord(ClientID, #FCGI_END_REQUEST, RequestID, @Body, SizeOf(FCGI_EndRequestBody)) + EndProcedure + + ; Parse name-value pairs from FCGI_PARAMS + Procedure ProcessNameValuePairs(*Data, *Request.Request, Length) + Protected Offset = 0 + Protected NameLength.l, ValueLength.l + Protected Name.s, Value.s + + While Offset < Length + ; Read name length + NameLength = PeekA(*Data + Offset) + If NameLength & $80 ; High bit set = 4-byte length + If Offset + 4 > Length : Break : EndIf + NameLength = ((PeekA(*Data + Offset) & $7F) << 24) | + (PeekA(*Data + Offset + 1) << 16) | + (PeekA(*Data + Offset + 2) << 8) | + PeekA(*Data + Offset + 3) + Offset + 4 + Else + Offset + 1 + EndIf + + ; Read value length + If Offset >= Length : Break : EndIf + ValueLength = PeekA(*Data + Offset) + If ValueLength & $80 ; High bit set = 4-byte length + If Offset + 4 > Length : Break : EndIf + ValueLength = ((PeekA(*Data + Offset) & $7F) << 24) | + (PeekA(*Data + Offset + 1) << 16) | + (PeekA(*Data + Offset + 2) << 8) | + PeekA(*Data + Offset + 3) + Offset + 4 + Else + Offset + 1 + EndIf + + ; Bounds check + If Offset + NameLength + ValueLength > Length + Break + EndIf + + ; Read name and value + If NameLength > 0 + Name = PeekS(*Data + Offset, NameLength, #PB_Ascii) + Offset + NameLength + + If ValueLength > 0 + Value = PeekS(*Data + Offset, ValueLength, #PB_Ascii) + Offset + ValueLength + Else + Value = "" + EndIf + + *Request\Parameters(Name) = Value + Else + Offset + ValueLength + EndIf + Wend + EndProcedure + ;} + + ;{ Public procedures - Server + Procedure Close(*Server.Server) + If *Server + *Server\Stop = #True + ; Wait for thread to finish + If IsThread(*Server\Thread) + WaitThread(*Server\Thread, 5000) + If IsThread(*Server\Thread) + KillThread(*Server\Thread) + EndIf + EndIf + If *Server\Mutex + FreeMutex(*Server\Mutex) + EndIf + FreeMemory(*Server) + EndIf + EndProcedure + + Procedure Open(Port, *Callback, BindedIP.s = "") + Protected ServerID, *Server.Server + + If Not *Callback + ProcedureReturn #Null + EndIf + + ServerID = CreateNetworkServer(#PB_Any, Port, #PB_Network_TCP, BindedIP) + + If ServerID + *Server = AllocateMemory(SizeOf(Server)) + If *Server + *Server\ServerID = ServerID + *Server\Callback = *Callback + *Server\Mutex = CreateMutex() + *Server\Thread = CreateThread(@ServerThread(), *Server) + + If Not *Server\Thread + CloseNetworkServer(ServerID) + If *Server\Mutex : FreeMutex(*Server\Mutex) : EndIf + FreeMemory(*Server) + *Server = #Null + EndIf + Else + CloseNetworkServer(ServerID) + EndIf + EndIf + + ProcedureReturn *Server + EndProcedure + ;} + + ;{ Public procedures - Request + Procedure FinishResponse(*Request.Request) + Protected HeaderString.s, *HeaderData, HeaderLength + Protected *ContentData, ContentLength, TotalLength + Protected Offset, ChunkSize, Result + + If Not *Request + ProcedureReturn + EndIf + + ; Build HTTP headers string + ForEach *Request\ResponseHeaders() + HeaderString + MapKey(*Request\ResponseHeaders()) + ": " + *Request\ResponseHeaders() + #CRLF$ + Next + + ForEach *Request\Cookies() + HeaderString + "Set-Cookie: " + *Request\Cookies() + #CRLF$ + Next + + HeaderString + #CRLF$ ; End of headers + + ; Calculate total response size + HeaderLength = StringByteLength(HeaderString, #PB_Ascii) + ContentLength = 0 + ForEach *Request\ResponseData() + ContentLength + MemorySize(*Request\ResponseData()) + Next + TotalLength = HeaderLength + ContentLength + + ; Allocate combined buffer + *ContentData = AllocateMemory(TotalLength, #PB_Memory_NoClear) + If Not *ContentData + ProcedureReturn + EndIf + + ; Copy headers + PokeS(*ContentData, HeaderString, -1, #PB_Ascii | #PB_String_NoZero) + Offset = HeaderLength + + ; Copy response data + ForEach *Request\ResponseData() + CopyMemory(*Request\ResponseData(), *ContentData + Offset, MemorySize(*Request\ResponseData())) + Offset + MemorySize(*Request\ResponseData()) + FreeMemory(*Request\ResponseData()) + Next + ClearList(*Request\ResponseData()) + + ; Send STDOUT records (split if necessary) + Offset = 0 + While Offset < TotalLength + ChunkSize = TotalLength - Offset + If ChunkSize > #MAX_RECORD_SIZE + ChunkSize = #MAX_RECORD_SIZE + EndIf + + Result = SendRecord(*Request\ClientID, #FCGI_STDOUT, *Request\RequestID, *ContentData + Offset, ChunkSize) + If Not Result + Break + EndIf + Offset + ChunkSize + Wend + + FreeMemory(*ContentData) + + ; Send empty STDOUT to signal end of output + SendRecord(*Request\ClientID, #FCGI_STDOUT, *Request\RequestID, #Null, 0) + + ; Send END_REQUEST + SendEndRequest(*Request\ClientID, *Request\RequestID, 0, #FCGI_REQUEST_COMPLETE) + + ; Close connection if not keep-alive + If Not *Request\KeepConnection + CloseNetworkConnection(*Request\ClientID) + EndIf + + ; Clean up POST data buffer if allocated + If *Request\PostDataBuffer + FreeMemory(*Request\PostDataBuffer) + *Request\PostDataBuffer = #Null + EndIf + EndProcedure + + Procedure.s GetCookie(*Request.Request, Cookie.s) + Protected CookieHeader.s, Result.s + Protected SearchStr.s, StartPos, EndPos + + If Not *Request + ProcedureReturn "" + EndIf + + CookieHeader = *Request\Parameters("HTTP_COOKIE") + If CookieHeader = "" + ProcedureReturn "" + EndIf + + SearchStr = Cookie + "=" + StartPos = FindString(CookieHeader, SearchStr) + + If StartPos + StartPos + Len(SearchStr) + EndPos = FindString(CookieHeader, ";", StartPos) + + If EndPos = 0 + EndPos = Len(CookieHeader) + 1 + EndIf + + Result = Trim(Mid(CookieHeader, StartPos, EndPos - StartPos)) + EndIf + + ProcedureReturn Result + EndProcedure + + Procedure.s GetParameter(*Request.Request, Parameter.s) + If *Request + ProcedureReturn *Request\Parameters(Parameter) + EndIf + ProcedureReturn "" + EndProcedure + + Procedure.s GetPostData(*Request.Request) + If *Request + ProcedureReturn *Request\PostData + EndIf + ProcedureReturn "" + EndProcedure + + Procedure WriteResponseHeader(*Request.Request, Header.s, Value.s) + If *Request + If LCase(Header) = "set-cookie" Or Header = #PB_CGI_HeaderSetCookie + AddElement(*Request\Cookies()) + *Request\Cookies() = Value + Else + *Request\ResponseHeaders(Header) = Value + EndIf + EndIf + EndProcedure + + Procedure WriteResponseString(*Request.Request, String.s, Format = #PB_UTF8) + Protected *Buffer, Length + + If *Request And String <> "" + Length = StringByteLength(String, Format) + *Buffer = AllocateMemory(Length, #PB_Memory_NoClear) + If *Buffer + PokeS(*Buffer, String, -1, Format | #PB_String_NoZero) + AddElement(*Request\ResponseData()) + *Request\ResponseData() = *Buffer + EndIf + EndIf + EndProcedure + + Procedure WriteResponseData(*Request.Request, *Buffer, Length) + Protected *Copy + + If *Request And *Buffer And Length > 0 + *Copy = AllocateMemory(Length, #PB_Memory_NoClear) + If *Copy + CopyMemory(*Buffer, *Copy, Length) + AddElement(*Request\ResponseData()) + *Request\ResponseData() = *Copy + EndIf + EndIf + EndProcedure + + Procedure WriteResponseContentType(*Request.Request, File.s) + Protected Extension.s, MIMEType.s + + If *Request + Extension = LCase(GetExtensionPart(File)) + If FindMapElement(MIMETypes(), Extension) + MIMEType = MIMETypes() + Else + MIMEType = "application/octet-stream" + EndIf + *Request\ResponseHeaders("Content-Type") = MIMEType + EndIf + EndProcedure + + Procedure RespondFile(*Request.Request, File.s) + Protected Result = #False + Protected FileID, FileSize, *FileData + + If Not *Request + ProcedureReturn #False + EndIf + + FileID = ReadFile(#PB_Any, File, #PB_File_SharedRead) + If FileID + FileSize = Lof(FileID) + If FileSize > 0 + *FileData = AllocateMemory(FileSize, #PB_Memory_NoClear) + If *FileData + ReadData(FileID, *FileData, FileSize) + WriteResponseContentType(*Request, File) + WriteResponseData(*Request, *FileData, FileSize) + FreeMemory(*FileData) + Result = #True + EndIf + EndIf + CloseFile(FileID) + + If Result + FinishResponse(*Request) + EndIf + EndIf + + ProcedureReturn Result + EndProcedure + ;} + + ;{ Server thread + Procedure ServerThread(*Server.Server) + Protected Header.FCGI_Header + Protected BeginBody.FCGI_BeginRequestBody + Protected ContentLength, PaddingLength + Protected *ContentBuffer, *PaddingBuffer + Protected Event, ClientID + Protected NewMap Requests.Request() + Protected *Request.Request + Protected RequestKey.s + + *ContentBuffer = AllocateMemory(#MAX_CONTENT_LENGTH) + *PaddingBuffer = AllocateMemory(256) + + If Not *ContentBuffer Or Not *PaddingBuffer + If *ContentBuffer : FreeMemory(*ContentBuffer) : EndIf + If *PaddingBuffer : FreeMemory(*PaddingBuffer) : EndIf + ProcedureReturn + EndIf + + Repeat + Event = NetworkServerEvent(*Server\ServerID) + + Select Event + Case #PB_NetworkEvent_None + Delay(1) + + Case #PB_NetworkEvent_Connect + ClientID = EventClient() + ; New connection - request will be created on BEGIN_REQUEST + + Case #PB_NetworkEvent_Data + ClientID = EventClient() + RequestKey = Str(ClientID) + + ; Read header + If ReceiveAllData(ClientID, @Header, #HEADER_SIZE) = #HEADER_SIZE + ContentLength = (Header\contentLengthB1 << 8) | Header\contentLengthB0 + PaddingLength = Header\paddingLength + + ; Read content + If ContentLength > 0 + If ReceiveAllData(ClientID, *ContentBuffer, ContentLength) <> ContentLength + Continue + EndIf + EndIf + + ; Read padding + If PaddingLength > 0 + ReceiveAllData(ClientID, *PaddingBuffer, PaddingLength) + EndIf + + ; Process based on record type + Select Header\type + Case #FCGI_BEGIN_REQUEST + ; Create new request + *Request = AddMapElement(Requests(), RequestKey) + If *Request + *Request\ClientID = ClientID + *Request\RequestID = (Header\requestIdB1 << 8) | Header\requestIdB0 + + If ContentLength >= SizeOf(FCGI_BeginRequestBody) + CopyMemory(*ContentBuffer, @BeginBody, SizeOf(FCGI_BeginRequestBody)) + *Request\Role = (BeginBody\roleB1 << 8) | BeginBody\roleB0 + *Request\KeepConnection = Bool(BeginBody\flags & #FCGI_KEEP_CONN) + EndIf + EndIf + + Case #FCGI_PARAMS + *Request = FindMapElement(Requests(), RequestKey) + If *Request + If ContentLength > 0 + ProcessNameValuePairs(*ContentBuffer, *Request, ContentLength) + Else + ; Empty PARAMS record signals end of parameters + *Request\ParamsComplete = #True + EndIf + EndIf + + Case #FCGI_STDIN + *Request = FindMapElement(Requests(), RequestKey) + If *Request + If ContentLength > 0 + ; Accumulate POST data + Protected *NewBuffer, NewLength + NewLength = *Request\PostDataLength + ContentLength + *NewBuffer = AllocateMemory(NewLength) + If *NewBuffer + If *Request\PostDataBuffer + CopyMemory(*Request\PostDataBuffer, *NewBuffer, *Request\PostDataLength) + FreeMemory(*Request\PostDataBuffer) + EndIf + CopyMemory(*ContentBuffer, *NewBuffer + *Request\PostDataLength, ContentLength) + *Request\PostDataBuffer = *NewBuffer + *Request\PostDataLength = NewLength + EndIf + Else + ; Empty STDIN record signals end of input + *Request\StdinComplete = #True + + ; Convert POST data to string + If *Request\PostDataBuffer And *Request\PostDataLength > 0 + *Request\PostData = PeekS(*Request\PostDataBuffer, *Request\PostDataLength, #PB_UTF8 | #PB_ByteLength) + EndIf + + ; Request is complete - call handler + If *Request\ParamsComplete + Protected Callback.i = *Server\Callback + If Callback + CallFunctionFast(Callback, *Request) + EndIf + + ; Clean up request from map after response + DeleteMapElement(Requests(), RequestKey) + EndIf + EndIf + EndIf + + Case #FCGI_ABORT_REQUEST + *Request = FindMapElement(Requests(), RequestKey) + If *Request + If *Request\PostDataBuffer + FreeMemory(*Request\PostDataBuffer) + EndIf + ForEach *Request\ResponseData() + FreeMemory(*Request\ResponseData()) + Next + DeleteMapElement(Requests(), RequestKey) + EndIf + + EndSelect + EndIf + + Case #PB_NetworkEvent_Disconnect + ClientID = EventClient() + RequestKey = Str(ClientID) + + ; Clean up any pending request + *Request = FindMapElement(Requests(), RequestKey) + If *Request + If *Request\PostDataBuffer + FreeMemory(*Request\PostDataBuffer) + EndIf + ForEach *Request\ResponseData() + FreeMemory(*Request\ResponseData()) + Next + DeleteMapElement(Requests(), RequestKey) + EndIf + + EndSelect + + Until *Server\Stop + + ; Cleanup + FreeMemory(*ContentBuffer) + FreeMemory(*PaddingBuffer) + + ; Clean up remaining requests + ForEach Requests() + If Requests()\PostDataBuffer + FreeMemory(Requests()\PostDataBuffer) + EndIf + ForEach Requests()\ResponseData() + FreeMemory(Requests()\ResponseData()) + Next + Next + + CloseNetworkServer(*Server\ServerID) + EndProcedure + ;} + + ;{ MIME Types + Procedure LoadMimeTypes() + Protected.s Ext, Type + Restore MimeData + Read.s Ext + While Ext <> "END" + Read.s Type + MIMETypes(Ext) = Type + Read.s Ext + Wend + EndProcedure + + LoadMimeTypes() + + DataSection + MimeData: + Data.s "aac", "audio/aac", "abw", "application/x-abiword", "apng", "image/apng", "avi", "video/x-msvideo", "bin", "application/octet-stream", "bmp", "image/bmp" + Data.s "css", "text/css", "csv", "text/csv", "doc", "application/msword", "gif", "image/gif", "htm", "text/html", "html", "text/html", "ico", "image/x-icon" + Data.s "jpeg", "image/jpeg", "jpg", "image/jpeg", "js", "text/javascript", "json", "application/json", "mp3", "audio/mpeg", "mp4", "video/mp4", "mpeg", "video/mpeg" + Data.s "otf", "font/otf", "png", "image/png", "pdf", "application/pdf", "php", "application/x-httpd-php", "svg", "image/svg+xml", "txt", "text/plain" + Data.s "wav", "audio/wav", "webm", "video/webm", "webp", "image/webp", "woff", "font/woff", "woff2", "font/woff2", "xml", "application/xml", "zip", "application/zip" + Data.s "END" + EndDataSection + ;} +EndModule + +;{ Test/Demo code +CompilerIf #PB_Compiler_IsMainFile + + Global *ImageData + Global ImageSize + + ; Load test image + If ReadFile(0, #PB_Compiler_Home + "examples/sources/Data/Map.bmp") + ImageSize = Lof(0) + *ImageData = AllocateMemory(ImageSize) + ReadData(0, *ImageData, ImageSize) + CloseFile(0) + Else + ; Create a simple test response if image not found + *ImageData = #Null + ImageSize = 0 + EndIf + + Procedure RequestHandler(*Request) + Protected URI.s + + URI = FastCGI::GetParameter(*Request, "REQUEST_URI") + + Debug "Request received: " + URI + Debug "Method: " + FastCGI::GetParameter(*Request, "REQUEST_METHOD") + Debug "Query: " + FastCGI::GetParameter(*Request, "QUERY_STRING") + + If *ImageData And ImageSize > 0 + FastCGI::WriteResponseContentType(*Request, "test.bmp") + FastCGI::WriteResponseData(*Request, *ImageData, ImageSize) + Else + FastCGI::WriteResponseHeader(*Request, "Content-Type", "text/html") + FastCGI::WriteResponseString(*Request, "

FastCGI Test

Request URI: " + URI + "

") + EndIf + + FastCGI::FinishResponse(*Request) + EndProcedure + + OpenConsole("FastCGI Demo") + PrintN("Starting FastCGI server on port 5600...") + PrintN("Press Enter to stop") + + Global Server = FastCGI::Open(5600, @RequestHandler()) + + If Server + PrintN("Server started successfully") + Input() + FastCGI::Close(Server) + PrintN("Server closed") + Else + PrintN("Failed to start server!") + EndIf + + If *ImageData + FreeMemory(*ImageData) + EndIf + + PrintN("Press Enter to exit") + Input() +CompilerEndIf +;} + +; IDE Options = PureBasic 6.30 (Windows - x64) +; ExecutableFormat = Console +; CursorPosition = 55 +; Folding = GAAAA9 +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Libraries/WebServer.pbi b/Server/Libraries/WebServer.pbi new file mode 100644 index 0000000..50ecf63 --- /dev/null +++ b/Server/Libraries/WebServer.pbi @@ -0,0 +1,734 @@ +; ============================================================ +; WebServer.pbi: Simple HTTP / FastCGI gateway for services +; development. +; +; Routing: +; - Path matching a registered FCGI prefix -> forward to FCGI +; - Otherwise: try local file, fall back to FCGI on miss +; ============================================================ + +DeclareModule WebServer + Declare Open(Port, WebRoot.s, FcgiHost.s = "127.0.0.1", FcgiPort = 5600) + Declare Close(*Server) + Declare AddFcgiPrefix(*Server, Prefix.s) +EndDeclareModule + +Module WebServer + EnableExplicit + + ;{ Structures + Structure Server + ServerID.i + Thread.i + Stop.i + Port.i + WebRoot.s + FcgiHost.s + FcgiPort.l + List Prefixes.s() + EndStructure + + Structure HttpConn + *Buffer + AllocSize.i + Received.i + HeadersEnd.i ; byte AFTER \r\n\r\n; 0 means not yet found + ContentLength.i ; -1 = not yet parsed + EndStructure + + Structure FCGI_Header + version.a + type.a + requestIdB1.a + requestIdB0.a + contentLengthB1.a + contentLengthB0.a + paddingLength.a + reserved.a + EndStructure + + Structure FCGI_BeginRequestBody + roleB1.a + roleB0.a + flags.a + reserved.a[5] + EndStructure + ;} + + ;{ Constants + #FCGI_VERSION = 1 + #FCGI_BEGIN_REQUEST = 1 + #FCGI_END_REQUEST = 3 + #FCGI_PARAMS = 4 + #FCGI_STDIN = 5 + #FCGI_STDOUT = 6 + #FCGI_RESPONDER = 1 + #FCGI_HEADER_SIZE = 8 + #FCGI_MAX_RECORD = 65528 + ;} + + ;{ MIME Types + Global NewMap MIMETypes.s() + + Procedure LoadMimeTypes() + Protected.s Ext, Type + Restore MimeData + Read.s Ext + While Ext <> "END" + Read.s Type + MIMETypes(Ext) = Type + Read.s Ext + Wend + EndProcedure + + LoadMimeTypes() + + DataSection + MimeData: + Data.s "aac", "audio/aac", "abw", "application/x-abiword", "apng", "image/apng", "avi", "video/x-msvideo", "bin", "application/octet-stream", "bmp", "image/bmp" + Data.s "css", "text/css", "csv", "text/csv", "doc", "application/msword", "gif", "image/gif", "htm", "text/html", "html", "text/html", "ico", "image/x-icon" + Data.s "jpeg", "image/jpeg", "jpg", "image/jpeg", "js", "text/javascript", "json", "application/json", "mp3", "audio/mpeg", "mp4", "video/mp4", "mpeg", "video/mpeg" + Data.s "otf", "font/otf", "png", "image/png", "pdf", "application/pdf", "php", "application/x-httpd-php", "svg", "image/svg+xml", "txt", "text/plain" + Data.s "wav", "audio/wav", "webm", "video/webm", "webp", "image/webp", "woff", "font/woff", "woff2", "font/woff2", "xml", "application/xml", "zip", "application/zip" + Data.s "END" + EndDataSection + ;} + + ;- Private declarations + Declare ServerThread(*Server.Server) + Declare HandleRequest(*Server.Server, ClientID, *Data, DataLen) + Declare ForwardToFcgi(*Server.Server, ClientID, Method.s, FullURI.s, Path.s, QueryString.s, Map ReqHdrs.s(), *Body, BodyLen) + Declare FcgiBuildAndSendParams(FcgiConn, *Server.Server, ReqID.u, Method.s, FullURI.s, Path.s, QueryString.s, Map ReqHdrs.s(), BodyLen) + Declare FcgiSendBody(FcgiConn, ReqID.u, *Body, BodyLen) + Declare FcgiReadResponse(FcgiConn, *OutLen) + Declare FcgiSendHttpResponse(ClientID, *RespBuf, RespLen) + Declare ServeStaticFile(ClientID, FilePath.s) + Declare SendErrorResponse(ClientID, Code, Reason.s) + Declare SendRawHttpResponse(ClientID, StatusLine.s, Headers.s, *Body, BodyLen) + Declare ReceiveAll(ConnID, *Buffer, Length) + Declare SendAll(ConnID, *Buffer, Length) + Declare SendFcgiRecord(ConnID, Type.a, RequestID.u, *Content, ContentLen) + Declare AppendNVP(*Buffer, Offset, Name.s, Value.s) + Declare.s GetMime(FilePath.s) + Declare.s GetHeaderCI(Map H.s(), Name.s) + + ;- Public API + Procedure Open(Port, WebRoot.s, FcgiHost.s = "127.0.0.1", FcgiPort = 5600) + Protected ServerID = CreateNetworkServer(#PB_Any, Port, #PB_Network_TCP, "") + Protected *Server.Server + If Not ServerID : ProcedureReturn #Null : EndIf + + *Server = AllocateMemory(SizeOf(Server)) + If *Server + InitializeStructure(*Server, Server) + *Server\ServerID = ServerID + *Server\Port = Port + *Server\WebRoot = WebRoot + *Server\FcgiHost = FcgiHost + *Server\FcgiPort = FcgiPort + *Server\Thread = CreateThread(@ServerThread(), *Server) + If Not *Server\Thread + CloseNetworkServer(ServerID) + FreeStructure(*Server) + *Server = #Null + EndIf + Else + CloseNetworkServer(ServerID) + EndIf + ProcedureReturn *Server + EndProcedure + + Procedure Close(*Server.Server) + If *Server + *Server\Stop = #True + If IsThread(*Server\Thread) + WaitThread(*Server\Thread, 5000) + If IsThread(*Server\Thread) : KillThread(*Server\Thread) : EndIf + EndIf + FreeMemory(*Server) + EndIf + EndProcedure + + Procedure AddFcgiPrefix(*Server.Server, Prefix.s) + If *Server + AddElement(*Server\Prefixes()) + *Server\Prefixes() = Prefix + EndIf + EndProcedure + + ;- Private procedures + ; Helpers + Procedure.s GetHeaderCI(Map H.s(), Name.s) + ; Case-insensitive header lookup so we don't depend on which capitalisation + ; the browser used (Chrome and Firefox usually send "Content-Type:" but + ; HTTP/2 frontends and some proxies will lowercase headers). + Protected Lower.s = LCase(Name) + ForEach H() + If LCase(MapKey(H())) = Lower + ProcedureReturn H() + EndIf + Next + ProcedureReturn "" + EndProcedure + + Procedure.s GetMime(FilePath.s) + If FindMapElement(MimeTypes(), LCase(GetExtensionPart(FilePath))) + ProcedureReturn MimeTypes() + EndIf + ProcedureReturn "application/octet-stream" + EndProcedure + + ; Network helpers + Procedure ReceiveAll(ConnID, *Buffer, Length) + Protected Received = 0, Got + While Received < Length + Got = ReceiveNetworkData(ConnID, *Buffer + Received, Length - Received) + If Got <= 0 + Received = -1 + Break + EndIf + Received + Got + Wend + ProcedureReturn Received + EndProcedure + + Procedure SendAll(ConnID, *Buffer, Length) + Protected Sent = 0, Chunk + While Sent < Length + Chunk = SendNetworkData(ConnID, *Buffer + Sent, Length - Sent) + If Chunk <= 0 + Sent = -1 + Break + EndIf + Sent + Chunk + Wend + ProcedureReturn Sent + EndProcedure + + ; FCGI helpers + Procedure SendFcgiRecord(ConnID, Type.a, RequestID.u, *Content, ContentLen) + Protected Result = #False + Protected Padding = (8 - (ContentLen % 8)) % 8 + Protected PktSize = #FCGI_HEADER_SIZE + ContentLen + Padding + Protected *Pkt = AllocateMemory(PktSize, #PB_Memory_NoClear) + + If *Pkt + PokeA(*Pkt, #FCGI_VERSION) + PokeA(*Pkt + 1, Type) + PokeA(*Pkt + 2, (RequestID >> 8) & $FF) + PokeA(*Pkt + 3, RequestID & $FF) + PokeA(*Pkt + 4, (ContentLen >> 8) & $FF) + PokeA(*Pkt + 5, ContentLen & $FF) + PokeA(*Pkt + 6, Padding) + PokeA(*Pkt + 7, 0) + + If *Content And ContentLen > 0 + CopyMemory(*Content, *Pkt + #FCGI_HEADER_SIZE, ContentLen) + EndIf + If Padding > 0 + FillMemory(*Pkt + #FCGI_HEADER_SIZE + ContentLen, Padding, 0) + EndIf + + Result = Bool(SendAll(ConnID, *Pkt, PktSize) > 0) + FreeMemory(*Pkt) + EndIf + + ProcedureReturn Result + EndProcedure + + Procedure AppendNVP(*Buffer, Offset, Name.s, Value.s) + Protected NameLen = StringByteLength(Name, #PB_Ascii) + Protected ValueLen = StringByteLength(Value, #PB_UTF8) + + If NameLen < 128 + PokeA(*Buffer + Offset, NameLen) : Offset + 1 + Else + PokeA(*Buffer + Offset, ((NameLen >> 24) & $7F) | $80) + PokeA(*Buffer + Offset + 1, (NameLen >> 16) & $FF) + PokeA(*Buffer + Offset + 2, (NameLen >> 8) & $FF) + PokeA(*Buffer + Offset + 3, NameLen & $FF) + Offset + 4 + EndIf + + If ValueLen < 128 + PokeA(*Buffer + Offset, ValueLen) : Offset + 1 + Else + PokeA(*Buffer + Offset, ((ValueLen >> 24) & $7F) | $80) + PokeA(*Buffer + Offset + 1, (ValueLen >> 16) & $FF) + PokeA(*Buffer + Offset + 2, (ValueLen >> 8) & $FF) + PokeA(*Buffer + Offset + 3, ValueLen & $FF) + Offset + 4 + EndIf + + If NameLen > 0 + PokeS(*Buffer + Offset, Name, -1, #PB_Ascii | #PB_String_NoZero) + Offset + NameLen + EndIf + If ValueLen > 0 + PokeS(*Buffer + Offset, Value, -1, #PB_UTF8 | #PB_String_NoZero) + Offset + ValueLen + EndIf + + ProcedureReturn Offset + EndProcedure + + ; HTTP response helpers + Procedure SendRawHttpResponse(ClientID, StatusLine.s, Headers.s, *Body, BodyLen) + ; FIX: ensure Headers ends with CRLF so the appended CRLF below produces + ; the CRLFCRLF that terminates the header block. Without this, FCGI-forwarded + ; responses (whose CgiHdrs has no trailing CRLF after PeekS) produced output + ; with only one CRLF between headers and body - some browsers (notably Chrome + ; on POST) refused to display the result. + If Headers <> "" And Right(Headers, 2) <> #CRLF$ + Headers + #CRLF$ + EndIf + + Protected Hdr.s = StatusLine + #CRLF$ + "Connection: close" + #CRLF$ + Headers + #CRLF$ + Protected HdrLen = StringByteLength(Hdr, #PB_Ascii) + Protected *HdrBuf = AllocateMemory(HdrLen, #PB_Memory_NoClear) + If *HdrBuf + PokeS(*HdrBuf, Hdr, -1, #PB_Ascii | #PB_String_NoZero) + SendAll(ClientID, *HdrBuf, HdrLen) + FreeMemory(*HdrBuf) + EndIf + + If *Body And BodyLen > 0 + SendAll(ClientID, *Body, BodyLen) + EndIf + CloseNetworkConnection(ClientID) + EndProcedure + + Procedure SendErrorResponse(ClientID, Code, Reason.s) + Protected Body.s = "

" + Str(Code) + " " + Reason + "

" + Protected BodyLen = StringByteLength(Body, #PB_Ascii) + Protected *B = AllocateMemory(BodyLen, #PB_Memory_NoClear) + If *B + PokeS(*B, Body, -1, #PB_Ascii | #PB_String_NoZero) + SendRawHttpResponse(ClientID, "HTTP/1.1 " + Str(Code) + " " + Reason, + "Content-Type: text/html" + #CRLF$ + "Content-Length: " + Str(BodyLen) + #CRLF$, + *B, BodyLen) + FreeMemory(*B) + EndIf + EndProcedure + + Procedure ServeStaticFile(ClientID, FilePath.s) + Protected Result, FileSize, FileID = ReadFile(#PB_Any, FilePath, #PB_File_SharedRead) + Protected *FileData + + If FileID + FileSize = Lof(FileID) + *FileData = AllocateMemory(FileSize, #PB_Memory_NoClear) + If *FileData + ReadData(FileID, *FileData, FileSize) + SendRawHttpResponse(ClientID, "HTTP/1.1 200 OK", + "Content-Type: " + GetMime(FilePath) + #CRLF$ + "Content-Length: " + Str(FileSize) + #CRLF$, + *FileData, FileSize) + FreeMemory(*FileData) + EndIf + Result = #True + CloseFile(FileID) + EndIf + + ProcedureReturn Result + EndProcedure + + ; FCGI gateway + Procedure FcgiBuildAndSendParams(FcgiConn, *Server.Server, ReqID.u, Method.s, FullURI.s, Path.s, QueryString.s, Map ReqHdrs.s(), BodyLen) + Protected *Params, PO, PSent, PChunk, Result + Protected HName.s, HLower.s, CType.s + + *Params = AllocateMemory(65536) + If Not *Params : ProcedureReturn #False : EndIf + + PO = AppendNVP(*Params, PO, "GATEWAY_INTERFACE", "CGI/1.1") + PO = AppendNVP(*Params, PO, "SERVER_PROTOCOL", "HTTP/1.1") + PO = AppendNVP(*Params, PO, "SERVER_SOFTWARE", "KUMO.S/1.0") + PO = AppendNVP(*Params, PO, "SERVER_NAME", "localhost") + PO = AppendNVP(*Params, PO, "SERVER_PORT", Str(*Server\Port)) + PO = AppendNVP(*Params, PO, "REQUEST_METHOD", Method) + PO = AppendNVP(*Params, PO, "REQUEST_URI", FullURI) + PO = AppendNVP(*Params, PO, "SCRIPT_NAME", Path) + PO = AppendNVP(*Params, PO, "PATH_INFO", Path) + PO = AppendNVP(*Params, PO, "QUERY_STRING", QueryString) + PO = AppendNVP(*Params, PO, "DOCUMENT_ROOT", *Server\WebRoot) + PO = AppendNVP(*Params, PO, "SCRIPT_FILENAME", *Server\WebRoot + Path) + PO = AppendNVP(*Params, PO, "CONTENT_LENGTH", Str(BodyLen)) + PO = AppendNVP(*Params, PO, "REMOTE_ADDR", "127.0.0.1") + PO = AppendNVP(*Params, PO, "REMOTE_PORT", "0") + + ; FIX: case-insensitive lookup + CType = GetHeaderCI(ReqHdrs(), "Content-Type") + If CType <> "" + PO = AppendNVP(*Params, PO, "CONTENT_TYPE", CType) + EndIf + + ForEach ReqHdrs() + HName = MapKey(ReqHdrs()) + HLower = LCase(HName) + If HLower <> "content-type" And HLower <> "content-length" + PO = AppendNVP(*Params, PO, "HTTP_" + UCase(ReplaceString(HName, "-", "_")), ReqHdrs()) + EndIf + Next + + While PSent < PO + PChunk = PO - PSent + If PChunk > #FCGI_MAX_RECORD : PChunk = #FCGI_MAX_RECORD : EndIf + If Not SendFcgiRecord(FcgiConn, #FCGI_PARAMS, ReqID, *Params + PSent, PChunk) : Break : EndIf + PSent + PChunk + Wend + FreeMemory(*Params) + + Result = Bool(Bool(PSent >= PO) And SendFcgiRecord(FcgiConn, #FCGI_PARAMS, ReqID, #Null, 0)) + ProcedureReturn Result + EndProcedure + + Procedure FcgiSendBody(FcgiConn, ReqID.u, *Body, BodyLen) + Protected SSent, SChunk, Result = #True + + If *Body And BodyLen > 0 + While SSent < BodyLen And Result + SChunk = BodyLen - SSent + If SChunk > #FCGI_MAX_RECORD : SChunk = #FCGI_MAX_RECORD : EndIf + Result = SendFcgiRecord(FcgiConn, #FCGI_STDIN, ReqID, *Body + SSent, SChunk) + SSent + SChunk + Wend + EndIf + If Result + Result = SendFcgiRecord(FcgiConn, #FCGI_STDIN, ReqID, #Null, 0) + EndIf + + ProcedureReturn Result + EndProcedure + + Procedure FcgiReadResponse(FcgiConn, *OutLen) + Protected FcgiHdr.FCGI_Header, PadBuf.q + Protected *RecBuf, *RespBuf, *Grown + Protected RecLen, RecPad, RespLen, RespAlloced = 65536 + + *RespBuf = AllocateMemory(RespAlloced) + *RecBuf = AllocateMemory(65536) + If Not *RespBuf Or Not *RecBuf + If *RespBuf : FreeMemory(*RespBuf) : EndIf + If *RecBuf : FreeMemory(*RecBuf) : EndIf + ProcedureReturn 0 + EndIf + + Repeat + If ReceiveAll(FcgiConn, @FcgiHdr, #FCGI_HEADER_SIZE) <> #FCGI_HEADER_SIZE : Break : EndIf + RecLen = (FcgiHdr\contentLengthB1 << 8) | FcgiHdr\contentLengthB0 + RecPad = FcgiHdr\paddingLength + + If RecLen > 0 And ReceiveAll(FcgiConn, *RecBuf, RecLen) <> RecLen : Break : EndIf + If RecPad > 0 : ReceiveAll(FcgiConn, @PadBuf, RecPad) : EndIf + + Select FcgiHdr\type + Case #FCGI_STDOUT + If RecLen > 0 + While RespLen + RecLen > RespAlloced + RespAlloced * 2 + *Grown = ReAllocateMemory(*RespBuf, RespAlloced) + If Not *Grown : FreeMemory(*RespBuf) : FreeMemory(*RecBuf) : ProcedureReturn 0 : EndIf + *RespBuf = *Grown + Wend + CopyMemory(*RecBuf, *RespBuf + RespLen, RecLen) + RespLen + RecLen + EndIf + + Case #FCGI_END_REQUEST + FreeMemory(*RecBuf) + PokeI(*OutLen, RespLen) + ProcedureReturn *RespBuf + EndSelect + ForEver + + FreeMemory(*RecBuf) + FreeMemory(*RespBuf) + ProcedureReturn 0 + EndProcedure + + Procedure FcgiSendHttpResponse(ClientID, *RespBuf, RespLen) + Protected k, SepPos = -1, BodyOff, CgiBodyLen, StatusCode = 200, StatusPos, SEnd, SpPos + Protected.s CgiHdrs, ExtraHdrs, StatusText = "OK", SVal + + For k = 0 To RespLen - 4 + If PeekA(*RespBuf + k) = $0D And PeekA(*RespBuf + k + 1) = $0A And + PeekA(*RespBuf + k + 2) = $0D And PeekA(*RespBuf + k + 3) = $0A + SepPos = k : Break + EndIf + Next + + If SepPos >= 0 + CgiHdrs = PeekS(*RespBuf, SepPos, #PB_Ascii) + BodyOff = SepPos + 4 + CgiBodyLen = RespLen - BodyOff + Else + BodyOff = 0 : CgiBodyLen = RespLen + EndIf + + StatusPos = FindString(CgiHdrs, "Status:", 1, #PB_String_NoCase) + If StatusPos + SEnd = FindString(CgiHdrs, #CRLF$, StatusPos) + If SEnd = 0 : SEnd = Len(CgiHdrs) + 1 : EndIf + SVal = Trim(Mid(CgiHdrs, StatusPos + 7, SEnd - StatusPos - 7)) + StatusCode = Val(SVal) + SpPos = FindString(SVal, " ") + If SpPos : StatusText = Trim(Mid(SVal, SpPos + 1)) : EndIf + CgiHdrs = Left(CgiHdrs, StatusPos - 1) + Mid(CgiHdrs, SEnd + 2) + EndIf + + If FindString(CgiHdrs, "Content-Length:", 1, #PB_String_NoCase) = 0 + ExtraHdrs = "Content-Length: " + Str(CgiBodyLen) + #CRLF$ + EndIf + + ; CgiHdrs from PeekS does NOT end with CRLF; SendRawHttpResponse normalises that. + SendRawHttpResponse(ClientID, "HTTP/1.1 " + Str(StatusCode) + " " + StatusText, + ExtraHdrs + CgiHdrs, *RespBuf + BodyOff, CgiBodyLen) + EndProcedure + + Procedure ForwardToFcgi(*Server.Server, ClientID, Method.s, FullURI.s, Path.s, QueryString.s, Map ReqHdrs.s(), *Body, BodyLen) + Protected FcgiConn, ReqID.u = 1, RespLen, *RespBuf + Protected BeginBody.FCGI_BeginRequestBody + + FcgiConn = OpenNetworkConnection(*Server\FcgiHost, *Server\FcgiPort) + If Not FcgiConn + SendErrorResponse(ClientID, 502, "Bad Gateway") : ProcedureReturn + EndIf + + FillMemory(@BeginBody, SizeOf(FCGI_BeginRequestBody), 0) + BeginBody\roleB0 = #FCGI_RESPONDER + + ; FIX: actually check that BEGIN_REQUEST went through + If Not SendFcgiRecord(FcgiConn, #FCGI_BEGIN_REQUEST, ReqID, @BeginBody, SizeOf(FCGI_BeginRequestBody)) + CloseNetworkConnection(FcgiConn) + SendErrorResponse(ClientID, 502, "Bad Gateway") : ProcedureReturn + EndIf + + If Not FcgiBuildAndSendParams(FcgiConn, *Server, ReqID, Method, FullURI, Path, QueryString, ReqHdrs(), BodyLen) Or + Not FcgiSendBody(FcgiConn, ReqID, *Body, BodyLen) + CloseNetworkConnection(FcgiConn) + SendErrorResponse(ClientID, 502, "Bad Gateway") : ProcedureReturn + EndIf + + *RespBuf = FcgiReadResponse(FcgiConn, @RespLen) + CloseNetworkConnection(FcgiConn) + + If *RespBuf + FcgiSendHttpResponse(ClientID, *RespBuf, RespLen) + FreeMemory(*RespBuf) + Else + SendErrorResponse(ClientID, 502, "Bad Gateway") + EndIf + EndProcedure + + Procedure HandleRequest(*Server.Server, ClientID, *Data, DataLen) + Protected LineEnd = -1, i, Sp1, Sp2, QPos, HdrStart, HdrEnd, NLines, j, ColPos, BodyStart, BodyLen, GoFcgi + Protected *Body + Protected.s ReqLine, Method, FullURI, Path, QueryStr, HdrStr, Line, FilePath + Protected NewMap ReqHdrs.s() + + For i = 0 To DataLen - 2 + If PeekA(*Data + i) = $0D And PeekA(*Data + i + 1) = $0A + LineEnd = i : Break + EndIf + Next + If LineEnd < 0 : SendErrorResponse(ClientID, 400, "Bad Request") : ProcedureReturn : EndIf + + ReqLine = PeekS(*Data, LineEnd, #PB_Ascii) + Sp1 = FindString(ReqLine, " ") + Sp2 = FindString(ReqLine, " ", Sp1 + 1) + If Sp1 = 0 Or Sp2 = 0 : SendErrorResponse(ClientID, 400, "Bad Request") : ProcedureReturn : EndIf + + Method = Left(ReqLine, Sp1 - 1) + FullURI = Mid(ReqLine, Sp1 + 1, Sp2 - Sp1 - 1) + + If Method <> "GET" And Method <> "POST" + SendErrorResponse(ClientID, 405, "Method Not Allowed") : ProcedureReturn + EndIf + + QPos = FindString(FullURI, "?") + If QPos + Path = URLDecoder(Left(FullURI, QPos - 1)) + QueryStr = Mid(FullURI, QPos + 1) + Else + Path = URLDecoder(FullURI) + QueryStr = "" + EndIf + + If FindString(Path, "..") : Path = "/" : EndIf + + HdrStart = LineEnd + 2 + For i = HdrStart To DataLen - 4 + If PeekA(*Data + i) = $0D And PeekA(*Data + i + 1) = $0A And + PeekA(*Data + i + 2) = $0D And PeekA(*Data + i + 3) = $0A + HdrEnd = i : Break + EndIf + Next + If HdrEnd = 0 : HdrEnd = DataLen : EndIf + + HdrStr = PeekS(*Data + HdrStart, HdrEnd - HdrStart, #PB_Ascii) + NLines = CountString(HdrStr, #CRLF$) + 1 + For j = 1 To NLines + Line.s = StringField(HdrStr, j, #CRLF$) + ColPos = FindString(Line, ":") + If ColPos > 1 + ReqHdrs(Trim(Left(Line, ColPos - 1))) = Trim(Mid(Line, ColPos + 1)) + EndIf + Next + + BodyStart = HdrEnd + 4 + If BodyStart < DataLen + *Body = *Data + BodyStart + BodyLen = DataLen - BodyStart + EndIf + + ForEach *Server\Prefixes() + If Left(Path, Len(*Server\Prefixes())) = *Server\Prefixes() + GoFcgi = #True : Break + EndIf + Next + + If GoFcgi + ForwardToFcgi(*Server, ClientID, Method, FullURI, Path, QueryStr, ReqHdrs(), *Body, BodyLen) + ProcedureReturn + EndIf + + FilePath.s = *Server\WebRoot + Path + If Right(FilePath, 1) = "/" : FilePath + "index.html" : EndIf + + If FileSize(FilePath) >= 0 + If Not ServeStaticFile(ClientID, FilePath) + SendErrorResponse(ClientID, 500, "Internal Server Error") + EndIf + Else + ForwardToFcgi(*Server, ClientID, Method, FullURI, Path, QueryStr, ReqHdrs(), *Body, BodyLen) + EndIf + EndProcedure + + Procedure ServerThread(*Server.Server) + Protected NewMap Conns.HttpConn() + Protected Got, si, CLPos, CLEnd, ReallocFailed, Event, SearchFrom, ClientID, Key.s, HBlock.s, *Grown, *Conn.HttpConn, *ChunkBuf + + *ChunkBuf = AllocateMemory(8192) + If Not *ChunkBuf : ProcedureReturn : EndIf + + Repeat + Event = NetworkServerEvent(*Server\ServerID) + If Event = #PB_NetworkEvent_None + Delay(1) + Else + ClientID = EventClient() + Key = Str(ClientID) + Select Event + Case #PB_NetworkEvent_Connect + *Conn = AddMapElement(Conns(), Key) + *Conn\AllocSize = 8192 + *Conn\Buffer = AllocateMemory(*Conn\AllocSize) + *Conn\ContentLength = -1 + If Not *Conn\Buffer + DeleteMapElement(Conns(), Key) + CloseNetworkConnection(ClientID) + EndIf + + Case #PB_NetworkEvent_Data + *Conn = FindMapElement(Conns(), Key) + If Not *Conn : Continue : EndIf + + Got = ReceiveNetworkData(ClientID, *ChunkBuf, 8192) + If Got <= 0 : Continue : EndIf + + ReallocFailed = #False + While *Conn\Received + Got > *Conn\AllocSize + *Conn\AllocSize * 2 + *Grown = ReAllocateMemory(*Conn\Buffer, *Conn\AllocSize) + If *Grown + *Conn\Buffer = *Grown + Else + FreeMemory(*Conn\Buffer) + DeleteMapElement(Conns(), Key) + CloseNetworkConnection(ClientID) + ReallocFailed = #True : Break + EndIf + Wend + If ReallocFailed : Continue : EndIf + + CopyMemory(*ChunkBuf, *Conn\Buffer + *Conn\Received, Got) + *Conn\Received + Got + + If *Conn\HeadersEnd = 0 And *Conn\Received >= 4 + SearchFrom = *Conn\Received - Got - 3 + If SearchFrom < 0 : SearchFrom = 0 : EndIf + For si = SearchFrom To *Conn\Received - 4 + If PeekA(*Conn\Buffer + si) = $0D And PeekA(*Conn\Buffer + si + 1) = $0A And + PeekA(*Conn\Buffer + si + 2) = $0D And PeekA(*Conn\Buffer + si + 3) = $0A + *Conn\HeadersEnd = si + 4 : Break + EndIf + Next + EndIf + + If *Conn\HeadersEnd > 0 And *Conn\ContentLength < 0 + ; FIX: removed duplicate PeekS call from your version + HBlock = PeekS(*Conn\Buffer, *Conn\HeadersEnd - 4, #PB_Ascii) + CLPos = FindString(HBlock, "Content-Length:", 1, #PB_String_NoCase) + If CLPos + CLEnd = FindString(HBlock, #CRLF$, CLPos) + If CLEnd = 0 : CLEnd = Len(HBlock) + 1 : EndIf + *Conn\ContentLength = Val(Trim(Mid(HBlock, CLPos + 15, CLEnd - CLPos - 15))) + Else + *Conn\ContentLength = 0 + EndIf + EndIf + + If *Conn\HeadersEnd > 0 And *Conn\ContentLength >= 0 + If *Conn\Received >= *Conn\HeadersEnd + *Conn\ContentLength + HandleRequest(*Server, ClientID, *Conn\Buffer, *Conn\Received) + FreeMemory(*Conn\Buffer) + DeleteMapElement(Conns(), Key) + EndIf + EndIf + + Case #PB_NetworkEvent_Disconnect + *Conn = FindMapElement(Conns(), Key) + If *Conn + If *Conn\Buffer : FreeMemory(*Conn\Buffer) : EndIf + DeleteMapElement(Conns(), Key) + EndIf + EndSelect + EndIf + Until *Server\Stop + + FreeMemory(*ChunkBuf) + ForEach Conns() + If Conns()\Buffer : FreeMemory(Conns()\Buffer) : EndIf + Next + CloseNetworkServer(*Server\ServerID) + EndProcedure + +EndModule + +CompilerIf #PB_Compiler_IsMainFile + OpenConsole("KUMO.S WebServer") + + Define Port = 8080 + Define WebRoot.s = "C:\KUMOS\www" + + Define *Srv = WebServer::Open(Port, WebRoot) + If *Srv + WebServer::AddFcgiPrefix(*Srv, "/api/") + PrintN("WebServer running on :" + Str(Port)) + PrintN(" Static root : " + WebRoot) + PrintN(" FCGI backend: 127.0.0.1:5600 (prefix: /api/)") + PrintN("Press Enter to stop.") + Input() + WebServer::Close(*Srv) + PrintN("Server stopped.") + Else + PrintN("ERROR: could not bind to port " + Str(Port)) + EndIf + Input() +CompilerEndIf + +; IDE Options = PureBasic 6.30 (Windows - x64) +; CursorPosition = 17 +; Folding = jAAA9 +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/Main.pb b/Server/Main.pb new file mode 100644 index 0000000..2f6d7eb --- /dev/null +++ b/Server/Main.pb @@ -0,0 +1,98 @@ +UseZipPacker() ; must be at the top — compiler directive + +IncludePath "Libraries" +IncludeFile "FastCGI.pbi" +CompilerIf #PB_Compiler_Debugger + IncludeFile "WebServer.pbi" +CompilerEndIf + +IncludePath "Includes" +IncludeFile "Modules.pbi" +IncludeFile "Database.pbi" +IncludeFile "General.pbi" +IncludeFile "Auth.pbi" +IncludeFile "FileSystem.pbi" +IncludeFile "AppStore.pbi" +IncludeFile "Router.pbi" + +#FCGI_PORT = 9683 +#DB_PATH = "kumos.db" + +Procedure RequestHandler(*Request) + Router::Route(*Request) +EndProcedure + +OpenConsole("KUMO.S Server") +UseSHA2Fingerprint() + +If Not Database::Init(#DB_PATH) + PrintN("[ERROR] Cannot open database: " + #DB_PATH) + Input() : End 1 +EndIf +PrintN("[ OK] Database ready: " + #DB_PATH) + +If Database::UserCount() = 0 + Database::CreateUser("admin", "admin") + PrintN("[INFO] Created default account: admin / admin") + PrintN("[WARN] Change this password immediately after first login!") +EndIf + +Database::FSInit() +PrintN("[ OK] Filesystem tables ready") + +If FileSize("blobs") = -1 + CreateDirectory("blobs") + PrintN("[ OK] Created blobs directory") +EndIf + +AppStore::Init() ; creates apps/ and tmp/ dirs, runs AppInit() DB migration +PrintN("[ OK] App store ready") + +Global *Server = FastCGI::Open(#FCGI_PORT, @RequestHandler(), "127.0.0.1") + +If Not *Server + PrintN("[ERROR] Failed to start FastCGI server on port " + Str(#FCGI_PORT)) + Database::Close() + Input() : End 1 +EndIf + +PrintN("[ OK] FastCGI listening on port " + Str(#FCGI_PORT)) + +CompilerIf #PB_Compiler_Debugger + PrintN("Debug mode. Start a HTTP server on port 8080") + *HTTP_Srv = WebServer::Open(8080, "./www", "127.0.0.1", 9683) + If *HTTP_Srv + WebServer::AddFcgiPrefix(*HTTP_Srv, "/api/") + PrintN("[ OK] HTTP server ready. Visit http://localhost:8080/") + Else + PrintN("[ERROR] Failed to start HTTP server. Port 8080 already in use?") + EndIf +CompilerEndIf + + +PrintN("") +PrintN("Press Enter to stop.") +PrintN("") + +LastClean.i = Date() +Repeat + Delay(100) + If Date() - LastClean > 60 + Database::CleanExpiredSessions() + LastClean = Date() + EndIf +Until Inkey() = Chr(13) + +PrintN("Shutting down...") +FastCGI::Close(*Server) +Database::Close() +PrintN("Done. Press Enter to exit.") +Input() + +; IDE Options = PureBasic 6.30 (Windows - x64) +; ExecutableFormat = Console +; CursorPosition = 89 +; FirstLine = 14 +; Folding = - +; EnableXP +; DPIAware \ No newline at end of file diff --git a/Server/www/index.html b/Server/www/index.html new file mode 100644 index 0000000..024254d --- /dev/null +++ b/Server/www/index.html @@ -0,0 +1,50 @@ + + + + + + + + +KUMO.S. + + + + + + + + + + + + + + + + + + + + + diff --git a/Server/www/js.js b/Server/www/js.js new file mode 100644 index 0000000..cd12ae6 --- /dev/null +++ b/Server/www/js.js @@ -0,0 +1,5803 @@ +if (typeof spider === 'undefined') { var spider = {}; } +spider.windowTheme = "flat"; +spider.gadgetTheme = "flat"; +spider.dpiAware = 1; +function spider_InitJSON_DEBUG(){return spider_InitJSON()}function spider_FreeJSON_DEBUG(a){return spider_FreeJSON(a)}function spider_IsJSON_DEBUG(a){return spider_IsJSON(a)}function spider_JSON_Parse_DEBUG(a,b){return spider_JSON_Parse(a,b)}function spider_JSON_GetValue_DEBUG(a){return spider_JSON_GetValue(a)}function spider_JSON_SetValue_DEBUG(a,b){return spider_JSON_SetValue(a,b)}function spider_CreateJSON_DEBUG(a,b){return spider_CreateJSON(a,b)} +function spider_JSONValue_DEBUG(a){return spider_JSONValue(a)}function spider_JSONType_DEBUG(a){return spider_JSONType(a)}function spider_ComposeJSON_DEBUG(a,b){return spider_ComposeJSON(a,b)}function spider_ParseJSON_DEBUG(a,b,c){return spider_ParseJSON(a,b,c)}function spider_LoadJSON_DEBUG(a,b,c){return spider_LoadJSON(a,b,c)}function spider_AddJSONMember_DEBUG(a,b){return spider_AddJSONMember(a,b)}function spider_AddJSONElement_DEBUG(a,b){return spider_AddJSONElement(a,b)} +function spider_ClearJSONElements_DEBUG(a){return spider_ClearJSONElements(a)}function spider_ClearJSONMembers_DEBUG(a){return spider_ClearJSONMembers(a)}function spider_InsertJSONArray_DEBUG(a,b,c){return spider_InsertJSONArray(a,b,c)}function spider_InsertJSONList_DEBUG(a,b,c){return spider_InsertJSONList(a,b,c)}function spider_InsertJSONMap_DEBUG(a,b,c){return spider_InsertJSONMap(a,b,c)}function spider_InsertJSONStructure_DEBUG(a,b,c){return spider_InsertJSONStructure(a,b,c)} +function spider_JSON_ExtractStructure_DEBUG(a,b){return spider_JSON_ExtractStructure(a,b)}function spider_JSON_ExtractNativeElement_DEBUG(a,b){return spider_JSON_ExtractNativeElement(a,b)}function spider_JSON_ExtractArray_DEBUG(a,b){return spider_JSON_ExtractArray(a,b)}function spider_JSON_ExtractList_DEBUG(a,b){return spider_JSON_ExtractList(a,b)}function spider_JSON_ExtractMap_DEBUG(a,b){return spider_JSON_ExtractMap(a,b)} +function spider_ExtractJSONArray_DEBUG(a,b,c){return spider_ExtractJSONArray(a,b,c)}function spider_ExtractJSONList_DEBUG(a,b,c){return spider_ExtractJSONList(a,b,c)}function spider_ExtractJSONMap_DEBUG(a,b,c){return spider_ExtractJSONMap(a,b,c)}function spider_ExtractJSONStructure_DEBUG(a,b,c){return spider_ExtractJSONStructure(a,b,c)}function spider_ExportJSON_DEBUG(a,b,c){return spider_ExportJSON(a,b,c)}function spider_ExamineJSONMembers_DEBUG(a){return spider_ExamineJSONMembers(a)} +function spider_NextJSONMember_DEBUG(a){return spider_NextJSONMember(a)}function spider_JSONMemberKey_DEBUG(a){return spider_JSONMemberKey(a)}function spider_JSONMemberValue_DEBUG(a){return spider_JSONMemberValue(a)}function spider_SetJSONArray_DEBUG(a){return spider_SetJSONArray(a)}function spider_SetJSONObject_DEBUG(a){return spider_SetJSONObject(a)}function spider_SetJSONBoolean_DEBUG(a,b){return spider_SetJSONBoolean(a,b)} +function spider_SetJSONString_DEBUG(a,b){return spider_SetJSONString(a,b)}function spider_SetJSONInteger_DEBUG(a,b){return spider_SetJSONInteger(a,b)}function spider_SetJSONQuad_DEBUG(a,b){return spider_SetJSONQuad(a,b)}function spider_SetJSONFloat_DEBUG(a,b){return spider_SetJSONFloat(a,b)}function spider_SetJSONDouble_DEBUG(a,b){return spider_SetJSONDouble(a,b)}function spider_SetJSONNull_DEBUG(a){return spider_SetJSONNull(a)} +function spider_JSONArraySize_DEBUG(a){return spider_JSONArraySize(a)}function spider_JSONObjectSize_DEBUG(a){return spider_JSONObjectSize(a)}function spider_GetJSONElement_DEBUG(a,b){return spider_GetJSONElement(a,b)}function spider_GetJSONMember_DEBUG(a,b){return spider_GetJSONMember(a,b)}function spider_RemoveJSONElement_DEBUG(a,b){return spider_RemoveJSONElement(a,b)}function spider_RemoveJSONMember_DEBUG(a,b){return spider_RemoveJSONMember(a,b)} +function spider_ResizeJSONElements_DEBUG(a,b){return spider_ResizeJSONElements(a,b)}function spider_GetJSONQuad_DEBUG(a){return spider_GetJSONQuad(a)}function spider_GetJSONInteger_DEBUG(a){return spider_GetJSONInteger(a)}function spider_GetJSONDouble_DEBUG(a){return spider_GetJSONDouble(a)}function spider_GetJSONFloat_DEBUG(a){return spider_GetJSONFloat(a)}function spider_GetJSONBoolean_DEBUG(a){return spider_GetJSONBoolean(a)} +function spider_GetJSONString_DEBUG(a){return spider_GetJSONString(a)}function spider_JSONErrorMessage_DEBUG(){return spider_JSONErrorMessage()}function spider_JSONErrorLine_DEBUG(){return spider_JSONErrorLine()}function spider_JSONErrorPosition_DEBUG(){return spider_JSONErrorPosition()}; + +function spider_HTTPRequest_DEBUG(a,b,c,d,e,f){return spider_HTTPRequest(a,b,c,d,e,f)}function spider_URLEncoder_DEBUG(a){return spider_URLEncoder(a)}function spider_URLDecoder_DEBUG(a){return spider_URLDecoder(a)}; + +function spider_gadget_CheckId(a){spider.debug.CheckId(spider_gadget_CheckId.caller.name,"Gadget",a)}function spider_gadget_CheckObject(a){spider.debug.CheckObject(spider_gadget_CheckObject.caller.name,"Gadget",spider_IsGadget(a))}function spider_InitGadget_DEBUG(){return spider_InitGadget()}function spider_FreeGadget_DEBUG(a){-1!==a&&spider_gadget_CheckObject(a);return spider_FreeGadget(a)} +function spider_ButtonGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_ButtonGadget(a,b,c,d,e,f,g)}function spider_ButtonImageGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_ButtonImageGadget(a,b,c,d,e,f,g)}function spider_CalendarGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_CalendarGadget(a,b,c,d,e,f,g)}function spider_CanvasGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_CanvasGadget(a,b,c,d,e,f)} +function spider_CheckBoxGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_CheckBoxGadget(a,b,c,d,e,f,g)}function spider_ComboBoxGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_ComboBoxGadget(a,b,c,d,e,f)}function spider_ContainerGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_ContainerGadget(a,b,c,d,e,f)}function spider_DateGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_DateGadget(a,b,c,d,e,f,g,h)} +function spider_EditorGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_EditorGadget(a,b,c,d,e,f)}function spider_FrameGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_FrameGadget(a,b,c,d,e,f,g)}function spider_HyperLinkGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_HyperLinkGadget(a,b,c,d,e,f,g,h)}function spider_ImageGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_ImageGadget(a,b,c,d,e,f,g)} +function spider_ListViewGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_ListViewGadget(a,b,c,d,e,f)}function spider_ListIconGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_ListIconGadget(a,b,c,d,e,f,g,h)}function spider_OptionGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_OptionGadget(a,b,c,d,e,f)}function spider_PanelGadget_DEBUG(a,b,c,d,e){spider_gadget_CheckId(a);return spider_PanelGadget(a,b,c,d,e)} +function spider_ProgressBarGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_ProgressBarGadget(a,b,c,d,e,f,g,h)}function spider_ScrollAreaGadget_DEBUG(a,b,c,d,e,f,g,h,k){spider_gadget_CheckId(a);return spider_ScrollAreaGadget(a,b,c,d,e,f,g,h,k)}function spider_ScrollBarGadget_DEBUG(a,b,c,d,e,f,g,h,k){spider_gadget_CheckId(a);return spider_ScrollBarGadget(a,b,c,d,e,f,g,h,k)} +function spider_SpinGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_SpinGadget(a,b,c,d,e,f,g,h)}function spider_SplitterGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_SplitterGadget(a,b,c,d,e,f,g,h)}function spider_StringGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_StringGadget(a,b,c,d,e,f,g)}function spider_TextGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_TextGadget(a,b,c,d,e,f,g)} +function spider_TrackBarGadget_DEBUG(a,b,c,d,e,f,g,h){spider_gadget_CheckId(a);return spider_TrackBarGadget(a,b,c,d,e,f,g,h)}function spider_TreeGadget_DEBUG(a,b,c,d,e,f){spider_gadget_CheckId(a);return spider_TreeGadget(a,b,c,d,e,f)}function spider_WebGadget_DEBUG(a,b,c,d,e,f,g){spider_gadget_CheckId(a);return spider_WebGadget(a,b,c,d,e,f,g)}function spider_CanvasOutput_DEBUG(a){spider_gadget_CheckObject(a);return spider_CanvasOutput(a)} +function spider_CanvasVectorOutput_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_CanvasVectorOutput(a,b)}function spider_AddGadgetItem_DEBUG(a,b,c,d,e){spider_gadget_CheckObject(a);return spider_AddGadgetItem(a,b,c,d,e)}function spider_RemoveGadgetItem_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_RemoveGadgetItem(a,b)}function spider_ClearGadgetItems_DEBUG(a){spider_gadget_CheckObject(a);return spider_ClearGadgetItems(a)} +function spider_CountGadgetItems_DEBUG(a){spider_gadget_CheckObject(a);return spider_CountGadgetItems(a)}function spider_AddGadgetColumn_DEBUG(a,b,c,d){spider_gadget_CheckObject(a);return spider_AddGadgetColumn(a,b,c,d)}function spider_RemoveGadgetColumn_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_RemoveGadgetColumn(a,b)}function spider_DisableGadget_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_DisableGadget(a,b)} +function spider_BindGadgetEvent_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_BindGadgetEvent(a,b,c)}function spider_UnbindGadgetEvent_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_UnbindGadgetEvent(a,b,c)}function spider_UseGadgetList_DEBUG(a){return spider_UseGadgetList(a)}function spider_OpenGadgetList_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_OpenGadgetList(a,b)}function spider_CloseGadgetList_DEBUG(){return spider_CloseGadgetList()} +function spider_GetActiveGadget_DEBUG(){return spider_GetActiveGadget()}function spider_SetActiveGadget_DEBUG(a){spider_gadget_CheckObject(a);return spider_SetActiveGadget(a)}function spider_GetGadgetState_DEBUG(a){spider_gadget_CheckObject(a);return spider_GetGadgetState(a)}function spider_SetGadgetState_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_SetGadgetState(a,b)}function spider_GetGadgetAttribute_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetAttribute(a,b)} +function spider_SetGadgetAttribute_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetAttribute(a,b,c)}function spider_GetGadgetData_DEBUG(a){spider_gadget_CheckObject(a);return spider_GetGadgetData(a)}function spider_SetGadgetData_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_SetGadgetData(a,b)}function spider_GetGadgetText_DEBUG(a){spider_gadget_CheckObject(a);return spider_GetGadgetText(a)} +function spider_SetGadgetText_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_SetGadgetText(a,b)}function spider_GetGadgetColor_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetColor(a,b)}function spider_SetGadgetColor_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetColor(a,b,c)}function spider_GetGadgetItemState_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetItemState(a,b)} +function spider_SetGadgetItemState_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetItemState(a,b,c)}function spider_GetGadgetItemData_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GetGadgetItemData(a,b)}function spider_SetGadgetItemData_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetItemData(a,b,c)}function spider_GetGadgetItemText_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_GetGadgetItemText(a,b,c)} +function spider_SetGadgetItemText_DEBUG(a,b,c,d){spider_gadget_CheckObject(a);return spider_SetGadgetItemText(a,b,c,d)}function spider_GetGadgetItemAttribute_DEBUG(a,b,c,d){spider_gadget_CheckObject(a);return spider_GetGadgetItemAttribute(a,b,c,d)}function spider_SetGadgetItemAttribute_DEBUG(a,b,c,d,e){spider_gadget_CheckObject(a);return spider_SetGadgetItemAttribute(a,b,c,d,e)}function spider_SetGadgetItemImage_DEBUG(a,b,c){spider_gadget_CheckObject(a);return spider_SetGadgetItemImage(a,b,c)} +function spider_SetGadgetFont_DEBUG(a,b){-1!==a&&spider_gadget_CheckObject(a);return spider_SetGadgetFont(a,b)}function spider_HideGadget_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_HideGadget(a,b)}function spider_ResizeGadget_DEBUG(a,b,c,d,e){spider_gadget_CheckObject(a);return spider_ResizeGadget(a,b,c,d,e)}function spider_GadgetType_DEBUG(a){spider_gadget_CheckObject(a);return spider_GadgetType(a)} +function spider_GadgetHeight_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetHeight(a,b)}function spider_GadgetWidth_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetWidth(a,b)}function spider_GadgetToolTip_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetToolTip(a,b)}function spider_GadgetX_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetX(a,b)}function spider_GadgetY_DEBUG(a,b){spider_gadget_CheckObject(a);return spider_GadgetY(a,b)} +function spider_GadgetID_DEBUG(a){spider_gadget_CheckObject(a);return spider_GadgetID(a)}function spider_IsGadget_DEBUG(a){return spider_IsGadget(a)}; + +function spider_ResetPath_DEBUG(){return spider_ResetPath()}function spider_SaveVectorState_DEBUG(){return spider_SaveVectorState()}function spider_RestoreVectorState_DEBUG(){return spider_RestoreVectorState()}function spider_StartVectorDrawing_DEBUG(a){return spider_StartVectorDrawing(a)}function spider_StopVectorDrawing_DEBUG(){return spider_StopVectorDrawing()}function spider_IsPathEmpty_DEBUG(){return spider_IsPathEmpty()} +function spider_ConvertCoordinateX_DEBUG(a,b,c,d){return spider_ConvertCoordinateX(a,b,c,d)}function spider_ConvertCoordinateY_DEBUG(a,b,c,d){return spider_ConvertCoordinateY(a,b,c,d)}function spider_MovePathCursor_DEBUG(a,b,c){return spider_MovePathCursor(a,b,c)}function spider_AddPathEllipse_DEBUG(a,b,c,d,e,f,g){return spider_AddPathEllipse(a,b,c,d,e,f,g)}function spider_AddPathCurve_DEBUG(a,b,c,d,e,f,g){return spider_AddPathCurve(a,b,c,d,e,f,g)} +function spider_AddPathArc_DEBUG(a,b,c,d,e,f){return spider_AddPathArc(a,b,c,d,e,f)}function spider_AddPathCircle_DEBUG(a,b,c,d,e,f,g){return spider_AddPathCircle(a,b,c,d,e,f,g)}function spider_AddPathLine_DEBUG(a,b,c){return spider_AddPathLine(a,b,c)}function spider_AddPathBox_DEBUG(a,b,c,d,e){return spider_AddPathBox(a,b,c,d,e)}function spider_AddPathText_DEBUG(a){return spider_AddPathText(a)}function spider_ClipPath_DEBUG(a){return spider_ClipPath(a)} +function spider_VectorSourceImage_DEBUG(a,b,c,d,e){return spider_VectorSourceImage(a,b,c,d,e)}function spider_VectorSourceColor_DEBUG(a){return spider_VectorSourceColor(a)}function spider_VectorSourceLinearGradient_DEBUG(a,b,c,d){return spider_VectorSourceLinearGradient(a,b,c,d)}function spider_VectorSourceCircularGradient_DEBUG(a,b,c,d,e){return spider_VectorSourceCircularGradient(a,b,c,d,e)}function spider_VectorSourceGradientColor_DEBUG(a,b){return spider_VectorSourceGradientColor(a,b)} +function spider_ClosePath_DEBUG(){return spider_ClosePath()}function spider_StrokePath_DEBUG(a,b){return spider_StrokePath(a,b)}function spider_CustomDashPath_DEBUG(a,b,c,d){return spider_CustomDashPath(a,b,c,d)}function spider_DashPath_DEBUG(a,b,c,d){return spider_DashPath(a,b,c,d)}function spider_DotPath_DEBUG(a,b,c,d){return spider_DotPath(a,b,c,d)}function spider_AddPathSegments_DEBUG(a,b){return spider_AddPathSegments(a,b)}function spider_PathSegments_DEBUG(){return spider_PathSegments()} +function spider_FillPath_DEBUG(a){return spider_FillPath(a)}function spider_BeginVectorLayer_DEBUG(a){return spider_BeginVectorLayer(a)}function spider_EndVectorLayer_DEBUG(){return spider_EndVectorLayer()}function spider_FillVectorOutput_DEBUG(){return spider_FillVectorOutput()}function spider_IsInsidePath_DEBUG(a,b,c){return spider_IsInsidePath(a,b,c)}function spider_IsInsideStroke_DEBUG(a,b,c,d){return spider_IsInsideStroke(a,b,c,d)} +function spider_PathBoundsX_DEBUG(){return spider_PathBoundsX()}function spider_PathBoundsY_DEBUG(){return spider_PathBoundsY()}function spider_PathBoundsWidth_DEBUG(){return spider_PathBoundsWidth()}function spider_PathBoundsHeight_DEBUG(){return spider_PathBoundsHeight()}function spider_PathLength_DEBUG(){return spider_PathLength()}function spider_PathPointX_DEBUG(a){return spider_PathPointX(a)}function spider_PathPointY_DEBUG(a){return spider_PathPointY(a)} +function spider_PathPointAngle_DEBUG(a){return spider_PathPointAngle(a)}function spider_VectorFont_DEBUG(a,b){return spider_VectorFont(a,b)}function spider_DrawVectorText_DEBUG(a){return spider_DrawVectorText(a)}function spider_DrawVectorParagraph_DEBUG(a,b,c,d){return spider_DrawVectorParagraph(a,b,c,d)}function spider_VectorTextWidth_DEBUG(a,b){return spider_VectorTextWidth(a,b)}function spider_VectorTextHeight_DEBUG(a,b){return spider_VectorTextHeight(a,b)} +function spider_VectorUnit_DEBUG(){return spider_VectorUnit()}function spider_DrawVectorImage_DEBUG(a,b,c,d){return spider_DrawVectorImage(a,b,c,d)}function spider_PathCursorX_DEBUG(){return spider_PathCursorX()}function spider_PathCursorY_DEBUG(){return spider_PathCursorY()}function spider_FlipCoordinatesX_DEBUG(a,b){return spider_FlipCoordinatesX(a,b)}function spider_FlipCoordinatesY_DEBUG(a,b){return spider_FlipCoordinatesY(a,b)} +function spider_ResetCoordinates_DEBUG(){return spider_ResetCoordinates()}function spider_RotateCoordinates_DEBUG(a,b,c,d){return spider_RotateCoordinates(a,b,c,d)}function spider_ScaleCoordinates_DEBUG(a,b,c){return spider_ScaleCoordinates(a,b,c)}function spider_TranslateCoordinates_DEBUG(a,b,c){return spider_TranslateCoordinates(a,b,c)}function spider_SkewCoordinates_DEBUG(a,b,c){return spider_SkewCoordinates(a,b,c)}function spider_VectorOutputWidth_DEBUG(){return spider_VectorOutputWidth()} +function spider_VectorOutputHeight_DEBUG(){return spider_VectorOutputHeight()}function spider_VectorResolutionX_DEBUG(){return spider_VectorResolutionX()}function spider_VectorResolutionY_DEBUG(){return spider_VectorResolutionY()}function spider_NewVectorPage_DEBUG(){return spider_NewVectorPage()}; + +function spider_Random_DEBUG(b,a){"undefined"===typeof a&&(a=0);0>a&&spider.debug.Error("'Min' can't be negative.");0>b&&spider.debug.Error("'Max' can't be negative.");a>b&&spider.debug.Error("'Min' value can't be superior to 'Max' value.");return spider_Random(b,a)}; + +function spider_InitList_DEBUG(){return spider_InitList()}function spider_AddElement_DEBUG(a){return spider_AddElement(a)}function spider_InsertElement_DEBUG(a){return spider_InsertElement(a)}function spider_ListIndex_DEBUG(a){return spider_ListIndex(a)}function spider_LastElement_DEBUG(a){return spider_LastElement(a)}function spider_MergeLists_DEBUG(a,b,c){return spider_MergeLists(a,b,c)}function spider_MoveElement_DEBUG(a,b,c){return spider_MoveElement(a,b,c)} +function spider_NextElement_DEBUG(a){return spider_NextElement(a)}function spider_PushListPosition_DEBUG(a){return spider_PushListPosition(a)}function spider_PopListPosition_DEBUG(a){return spider_PopListPosition(a)}function spider_PreviousElement_DEBUG(a){return spider_PreviousElement(a)}function spider_ResetList_DEBUG(a){return spider_ResetList(a)}function spider_ListSize_DEBUG(a){return spider_ListSize(a)}function spider_ChangeCurrentElement_DEBUG(a,b){return spider_ChangeCurrentElement(a,b)} +function spider_CopyList_DEBUG(a,b,c,d){return spider_CopyList(a,b,c,d)}function spider_ClearList_DEBUG(a){return spider_ClearList(a)}function spider_DeleteElement_DEBUG(a,b){return spider_DeleteElement(a,b)}function spider_FreeList_DEBUG(a){return spider_FreeList(a)}function spider_FirstElement_DEBUG(a){return spider_FirstElement(a)}function spider_SelectElement_DEBUG(a,b){return spider_SelectElement(a,b)}function spider_SplitList_DEBUG(a,b,c){return spider_SplitList(a,b,c)} +function spider_SwapElements_DEBUG(a,b,c){return spider_SwapElements(a,b,c)}; + +function spider_window_CheckId(a){spider.debug.CheckId(spider_window_CheckId.caller.name,"Window",a)}function spider_window_CheckObject(a){spider.debug.CheckObject(spider_window_CheckObject.caller.name,"Window",spider_IsWindow(a))}function spider_CloseWindow_DEBUG(a){-1!==a&&spider_window_CheckObject(a);return spider_CloseWindow(a)} +function spider_OpenWindow_DEBUG(a,b,c,d,e,h,f,g){"undefined"===typeof f&&(f=16);"undefined"===typeof g&&(g=null);spider_window_CheckId(a);return spider_OpenWindow(a,b,c,d,e,h,f,g)}function spider_AddKeyboardShortcut_DEBUG(a,b,c){spider_window_CheckObject(a);return spider_AddKeyboardShortcut(a,b,c)}function spider_RemoveKeyboardShortcut_DEBUG(a,b){spider_window_CheckObject(a);return spider_RemoveKeyboardShortcut(a,b)} +function spider_AddWindowTimer_DEBUG(a,b,c){spider_window_CheckObject(a);return spider_AddWindowTimer(a,b,c)}function spider_RemoveWindowTimer_DEBUG(a,b){spider_window_CheckObject(a);return spider_RemoveWindowTimer(a,b)}function spider_DisableWindow_DEBUG(a,b){spider_window_CheckObject(a);return spider_DisableWindow(a,b)} +function spider_HideWindow_DEBUG(a,b,c){"undefined"===typeof c&&(c=0);spider_window_CheckObject(a);spider.debug.CheckCombinationFlags("Flags",c,[2048,1,2]);return spider_HideWindow(a,b,c)}function spider_GetWindowTitle_DEBUG(a){spider_window_CheckObject(a);return spider_GetWindowTitle(a)}function spider_SetWindowTitle_DEBUG(a,b){spider_window_CheckObject(a);return spider_SetWindowTitle(a,b)}function spider_GetWindowColor_DEBUG(a){spider_window_CheckObject(a);return spider_GetWindowColor(a)} +function spider_SetWindowColor_DEBUG(a,b){spider_window_CheckObject(a);return spider_SetWindowColor(a,b)}function spider_GetWindowData_DEBUG(a){spider_window_CheckObject(a);return spider_GetWindowData(a)}function spider_SetWindowData_DEBUG(a,b){spider_window_CheckObject(a);return spider_SetWindowData(a,b)}function spider_GetActiveWindow_DEBUG(){return spider_GetActiveWindow()}function spider_SetActiveWindow_DEBUG(a){spider_window_CheckObject(a);return spider_SetActiveWindow(a)} +function spider_StickyWindow_DEBUG(a,b){spider_window_CheckObject(a);return spider_StickyWindow(a,b)}function spider_ResizeWindow_DEBUG(a,b,c,d,e){spider_window_CheckObject(a);return spider_ResizeWindow(a,b,c,d,e)}function spider_WindowBounds_DEBUG(a,b,c,d,e){spider_window_CheckObject(a);return spider_WindowBounds(a,b,c,d,e)}function spider_WindowX_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowX(a,b)} +function spider_WindowY_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowY(a,b)}function spider_WindowWidth_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowWidth(a,b)} +function spider_WindowHeight_DEBUG(a,b){"undefined"===typeof b&&(b=1);spider_window_CheckObject(a);spider.debug.CheckSingleFlags("Mode",b,[1,0]);return spider_WindowHeight(a,b)}function spider_WindowMouseX_DEBUG(a){spider_window_CheckObject(a);return spider_WindowMouseX(a)}function spider_WindowMouseY_DEBUG(a){spider_window_CheckObject(a);return spider_WindowMouseY(a)}function spider_WindowOpacity_DEBUG(a,b){spider_window_CheckObject(a);return spider_WindowOpacity(a,b)} +function spider_WindowID_DEBUG(a){spider_window_CheckObject(a);return spider_WindowID(a)}function spider_IsWindow_DEBUG(a){return spider_IsWindow(a)}; + +function spider_font_CheckId(a){spider.debug.CheckId(spider_font_CheckId.caller.name,"Font",a)}function spider_font_CheckObject(a){spider.debug.CheckObject(spider_font_CheckObject.caller.name,"Font",spider_IsFont(a))}function spider_InitFont_DEBUG(){return spider_InitFont_DEBUG()}function spider_FreeFont_DEBUG(a){-1!==a&&spider_font_CheckObject(a);return spider_FreeFont(a)}function spider_LoadFont_DEBUG(a,b,c,d){spider_font_CheckId(a);return spider_LoadFont(a,b,c,d)} +function spider_FontID_DEBUG(a){spider_font_CheckObject(a);return spider_FontID(a)}function spider_IsFont_DEBUG(a){return spider_IsFont(a)}; + +function spider_BindEvent_DEBUG(a,b,c,d,e){return spider_BindEvent(a,b,c,d,e)}function spider_UnbindEvent_DEBUG(a,b,c,d,e){return spider_UnbindEvent(a,b,c,d,e)}function spider_PostEvent_DEBUG(a,b,c,d,e,f){return spider_PostEvent(a,b,c,d,e,f)}function spider_Event_DEBUG(){return spider_Event()}function spider_EventWindow_DEBUG(){return spider_EventWindow()}function spider_EventMenu_DEBUG(){return spider_EventMenu()}function spider_EventGadget_DEBUG(){return spider_EventGadget()} +function spider_EventTimer_DEBUG(){return spider_EventTimer()}function spider_EventWebSocket_DEBUG(){return spider_EventWebSocket()}function spider_EventMobile_DEBUG(){return spider_EventMobile()}function spider_EventType_DEBUG(){return spider_EventType()}function spider_EventData_DEBUG(){return spider_EventData()}function spider_EventString_DEBUG(){return spider_EventString()}function spider_EventNotification_DEBUG(){return spider_EventNotification()}; + +function spider_DesktopWidth_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopWidth(a)}function spider_DesktopHeight_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopHeight(a)}function spider_DesktopFrequency_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopFrequency(a)}function spider_DesktopMouseX_DEBUG(){return spider_DesktopMouseX()}function spider_DesktopMouseY_DEBUG(){return spider_DesktopMouseY()} +function spider_DesktopX_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopX(a)}function spider_DesktopY_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopY(a)}function spider_ExamineDesktops_DEBUG(){return spider_ExamineDesktops()}function spider_DesktopDepth_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopDepth(a)} +function spider_DesktopName_DEBUG(a){0!==a&&spider.debug.Error("Invalid #Desktop.");return spider_DesktopName(a)}; + + + +function spider_2ddrawing_CheckCurrent(){null==spider.drawing.output&&spider.debug.Error("StartDrawing() must be called before using a 2D drawing command.",spider_2ddrawing_CheckCurrent.caller.name)}function spider_StartDrawing_DEBUG(a){return spider_StartDrawing(a)}function spider_Box_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Box(a,b,c,d,e)} +function spider_DrawAlphaImage_DEBUG(a,b,c,d){"undefined"===typeof d&&(d=255);spider_2ddrawing_CheckCurrent();return spider_DrawAlphaImage(a,b,c,d)}function spider_DrawImage_DEBUG(a,b,c,d,e){spider_2ddrawing_CheckCurrent();return spider_DrawImage(a,b,c,d,e)}function spider_Plot_DEBUG(a,b,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Plot(a,b,c)}function spider_Point_DEBUG(a,b){spider_2ddrawing_CheckCurrent();return spider_Point(a,b)} +function spider_OutputDepth_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_OutputDepth()}function spider_OutputWidth_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_OutputWidth()}function spider_OutputHeight_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_OutputHeight()}function spider_Line_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Line(a,b,c,d,e)} +function spider_LineXY_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_LineXY(a,b,c,d,e)}function spider_DrawText_DEBUG(a,b,c,d,e){"undefined"===typeof d&&(d=spider.drawing.frontColor);"undefined"===typeof e&&(e=spider.drawing.backColor);spider_2ddrawing_CheckCurrent();return spider_DrawText(a,b,c,d,e)} +function spider_Circle_DEBUG(a,b,c,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Circle(a,b,c,d)}function spider_Ellipse_DEBUG(a,b,c,d,e){"undefined"===typeof e&&(e=spider.drawing.frontColor);spider_2ddrawing_CheckCurrent();return spider_Ellipse(a,b,c,d,e)}function spider_DrawingFont_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_DrawingFont(a)} +function spider_DrawingMode_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_DrawingMode(a)}function spider_StopDrawing_DEBUG(){spider_2ddrawing_CheckCurrent();return spider_StopDrawing()}function spider_RoundBox_DEBUG(a,b,c,d,e,f,g){spider_2ddrawing_CheckCurrent();return spider_RoundBox(a,b,c,d,e,f,g)}function spider_RGB_DEBUG(a,b,c){return spider_RGB(a,b,c)}function spider_RGBA_DEBUG(a,b,c,d){return spider_RGBA(a,b,c,d)}function spider_Red_DEBUG(a){return spider_Red(a)} +function spider_Green_DEBUG(a){return spider_Green(a)}function spider_Blue_DEBUG(a){return spider_Blue(a)}function spider_Alpha_DEBUG(a){return spider_Alpha(a)}function spider_BackColor_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_BackColor(a)}function spider_FrontColor_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_FrontColor(a)}function spider_TextHeight_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_TextHeight(a)} +function spider_TextWidth_DEBUG(a){spider_2ddrawing_CheckCurrent();return spider_TextWidth(a)}; + +function spider_image_CheckId(a){spider.debug.CheckId(spider_image_CheckId.caller.name,"Image",a)}function spider_image_CheckObject(a){spider.debug.CheckObject(spider_image_CheckObject.caller.name,"Image",spider_IsImage(a))}function spider_InitImage_DEBUG(){return spider_InitImage()}function spider_FreeImage_DEBUG(a){-1!==a&&spider_image_CheckObject(a);return spider_FreeImage(a)}function spider_LoadImage_DEBUG(a,b,c){spider_image_CheckId(a);return spider_LoadImage(a,b,c)} +function spider_CopyImage_DEBUG(a,b){spider_image_CheckObject(a);spider_image_CheckId(b);return spider_CopyImage(a,b)}function spider_CreateImage_DEBUG(a,b,c,d,e){spider_image_CheckId(a);0>=b?spider.debug.Error("'With' is too small, must be greater than 0."):0>=c&&spider.debug.Error("'Height' is too small, must be greater than 0.");return spider_CreateImage(a,b,c,d,e)} +function spider_GrabImage_DEBUG(a,b,c,d,e,f){spider_image_CheckObject(a);spider_image_CheckId(b);0>c?spider.debug.Error("'x' can't be negative."):0>d?spider.debug.Error("'y' can't be negative."):0>f?spider.debug.Error("'Height' can't be negative."):0>e&&spider.debug.Error("'Width' can't be negative.");return spider_GrabImage(a,b,c,d,e,f)}function spider_ImageOutput_DEBUG(a){spider_image_CheckObject(a);return spider_ImageOutput(a)} +function spider_ImageVectorOutput_DEBUG(a,b){spider_image_CheckObject(a);return spider_ImageVectorOutput(a,b)}function spider_EncodeImage_DEBUG(a,b,c){spider_image_CheckObject(a);return spider_EncodeImage(a,b,c)}function spider_ExportImage_DEBUG(a,b,c){spider_image_CheckObject(a);return spider_ExportImage(a,b,c)}function spider_ImageDepth_DEBUG(a){spider_image_CheckObject(a);return spider_ImageDepth(a)}function spider_ImageFormat_DEBUG(a){spider_image_CheckObject(a);return spider_ImageFormat(a)} +function spider_ImageWidth_DEBUG(a){spider_image_CheckObject(a);return spider_ImageWidth(a)}function spider_ImageHeight_DEBUG(a){spider_image_CheckObject(a);return spider_ImageHeight(a)}function spider_ResizeImage_DEBUG(a,b,c,d){spider_image_CheckObject(a);return spider_ResizeImage(a,b,c,d)}function spider_ImageID_DEBUG(a){spider_image_CheckObject(a);return spider_ImageID(a)}function spider_IsImage_DEBUG(a){return spider_IsImage(a)}; + +function spider_InitImageDecoder_DEBUG(){return spider_InitImageDecoder()}; + +function spider_FinishDirectory_DEBUG(a){return spider_FinishDirectory(a)}function spider_RequestFileSystem_DEBUG(a,b,c){return spider_RequestFileSystem(a,b,c)}function spider_ExamineDirectory_DEBUG(a,b,c,d){return spider_ExamineDirectory(a,b,c,d)}function spider_GetExtensionPart_DEBUG(a){return spider_GetExtensionPart(a)}; + +function spider_AddDate_DEBUG(b,a,c){spider.debug.CheckSingleFlags("Type",a,[0,1,2,3,4,5,6]);return spider_AddDate(b,a,c)}; + +function spider_Bin_DEBUG(a,b){return spider_Bin(a,b)}function spider_Chr_DEBUG(a){return spider_Chr(a)}function spider_FindString_DEBUG(a,b,c,d){return spider_FindString(a,b,c,d)}function spider_Space_DEBUG(a){return spider_Space(a)}function spider_Str_DEBUG(a){return spider_Str(a)}function spider_StrD_DEBUG(a,b){return spider_StrD(a,b)}function spider_StrF_DEBUG(a,b){return spider_StrF(a,b)}function spider_StrU_DEBUG(a,b){return spider_StrU(a,b)} +function spider_LTrim_DEBUG(a,b){return spider_LTrim(a,b)}function spider_RTrim_DEBUG(a,b){return spider_RTrim(a,b)}function spider_Trim_DEBUG(a,b){return spider_Trim(a,b)}function spider_ReplaceString_DEBUG(a,b,c,d,e,f){return spider_ReplaceString(a,b,c,d,e,f)}function spider_RemoveString_DEBUG(a,b,c,d,e){return spider_RemoveString(a,b,c,d,e)}function spider_Hex_DEBUG(a,b){return spider_Hex(a,b)}function spider_StringField_DEBUG(a,b,c){return spider_StringField(a,b,c)} +function spider_StringByteLength_DEBUG(a){return spider_StringByteLength(a)}; + +function spider_PeekB_DEBUG(a,b){return spider_PeekB(a,b)}function spider_PeekA_DEBUG(a,b){return spider_PeekA(a,b)}function spider_PeekW_DEBUG(a,b){return spider_PeekW(a,b)}function spider_PeekU_DEBUG(a,b){return spider_PeekU(a,b)}function spider_PeekC_DEBUG(a,b){return spider_PeekC(a,b)}function spider_PeekL_DEBUG(a,b){return spider_PeekL(a,b)}function spider_PeekF_DEBUG(a,b){return spider_PeekF(a,b)}function spider_PeekD_DEBUG(a,b){return spider_PeekD(a,b)} +function spider_PeekS_DEBUG(a,b,c,d){return spider_PeekS(a,b,c,d)}function spider_PokeB_DEBUG(a,b,c){return spider_PokeB(a,b,c)}function spider_PokeA_DEBUG(a,b,c){return spider_PokeA(a,b,c)}function spider_PokeW_DEBUG(a,b,c){return spider_PokeW(a,b,c)}function spider_PokeU_DEBUG(a,b,c){return spider_PokeU(a,b,c)}function spider_PokeC_DEBUG(a,b,c){return spider_PokeC(a,b,c)}function spider_PokeL_DEBUG(a,b,c){return spider_PokeL(a,b,c)}function spider_PokeF_DEBUG(a,b,c){return spider_PokeF(a,b,c)} +function spider_PokeD_DEBUG(a,b,c){return spider_PokeD(a,b,c)}function spider_PokeS_DEBUG(a,b,c,d,e){return spider_PokeS(a,b,c,d,e)}function spider_AllocateMemory_DEBUG(a,b){return spider_AllocateMemory(a,b)}function spider_ReAllocateMemory_DEBUG(a,b,c){return spider_ReAllocateMemory(a,b,c)}function spider_FreeMemory_DEBUG(a){return spider_FreeMemory(a)}function spider_CompareMemory_DEBUG(a,b,c,d,e){return spider_CompareMemory(a,b,c,d,e)} +function spider_MemorySize_DEBUG(a){return spider_MemorySize(a)}function spider_AllocateStructure_DEBUG(a,b){return spider_AllocateStructure(a,b)}function spider_FreeStructure_DEBUG(a){return spider_FreeStructure(a)}function spider_ClearStructure_DEBUG(a,b){return spider_ClearStructure(a,b)}function spider_CopyStructure_DEBUG(a,b,c){return spider_CopyStructure(a,b,c)}; + +function spider_InitMap_DEBUG(){return spider_InitMap()}function spider_AddMapElement_DEBUG(a,b){return spider_AddMapElement(a,b)}function spider_GetMapElement_DEBUG(a,b){return spider_GetMapElement(a,b)}function spider_ResetMap_DEBUG(a){return spider_ResetMap(a)}function spider_NextMapElement_DEBUG(a){return spider_NextMapElement(a)}function spider_MapKey_DEBUG(a){return spider_MapKey(a)}function spider_MapSize_DEBUG(a){return spider_MapSize(a)} +function spider_DeleteMapElement_DEBUG(a,b){return spider_DeleteMapElement(a,b)}function spider_FindMapElement_DEBUG(a,b){return spider_FindMapElement(a,b)}function spider_CopyMap_DEBUG(a,b,c,d){return spider_CopyMap(a,b,c,d)}function spider_ClearMap_DEBUG(a){return spider_ClearMap(a)}function spider_FreeMap_DEBUG(a){return spider_FreeMap(a)}function spider_PushMapPosition_DEBUG(a){return spider_PushMapPosition(a)}function spider_PopMapPosition_DEBUG(a){return spider_PopMapPosition(a)}; + + + +var _S165="Installed: "; +var _S3=""; +var _S24="/api/fs/write"; +var _S127="+ Folder"; +var _S84="window.ready"; +var _S69="username="; +var _S11="/api/fs/stat?path="; +var _S102="fs.read"; +var _S130="Failed to load directory."; +var _S50="\""; +var _S49=","; +var _S19="/"; +var _S22="1"; +var _S169="Uninstall failed."; +var _S81="title"; +var _S146="New passwords do not match."; +var _S140="Settings"; +var _S132="[F] "; +var _S48="["; +var _S137="New File"; +var _S51="]"; +var _S31="A"; +var _S79="path"; +var _S55="\",\"version\":\""; +var _S162="1 app installed"; +var _S44="manifest"; +var _S60="entry"; +var _S135="s"; +var _S77="action"; +var _S67="Invalid username or password."; +var _S115="Bad server response"; +var _S35="File Explorer"; +var _S47="permissions"; +var _S54="\",\"name\":\""; +var _S39="App Manager"; +var _S95="storage.list"; +var _S12="/api/fs/mkdir"; +var _S80="content"; +var _S172="Uninstalling "; +var _S30="..."; +var _S94="A dialog is already open"; +var _S59="\",\"entry\":\""; +var _S128="+ File"; +var _S15="id="; +var _S173="/api/apps/uninstall"; +var _S98="storage.write"; +var _S43="Apps"; +var _S73="/api/apps/"; +var _S87="window.close"; +var _S61="\"}"; +var _S36="📁"; +var _S120="📄"; +var _S155="+ Install"; +var _S46="icon"; +var _S29="Cancel"; +var _S40="📦"; +var _S154="https://lastlife.net"; +var _S106="Permission denied: fs.write"; +var _S41="/api/apps/list"; +var _S13="path="; +var _S64="Username: "; +var _S150="&new_password="; +var _S176="Installing..."; +var _S42="name"; +var _S18="&name="; +var _S56="version"; +var _S100="storage.delete"; +var _S103="Permission denied: fs.read"; +var _S133="[D] "; +var _S99="storage.mkdir"; +var _S157="Uninstall"; +var _S151="Connection error."; +var _S66="Connect"; +var _S126="↑"; +var _S104="fs.stat"; +var _S74="/index.html"; +var _S8="file_content"; +var _S131="Could not read directory."; +var _S4="/api/auth/check"; +var _S9="file_meta"; +var _S122="Save failed — "; +var _S178="url="; +var _S125="\" without saving?"; +var _S175="&keep_data=0"; +var _S164="Failed to load app list."; +var _S78="args"; +var _S85="{\"app_id\":\""; +var _S10="/api/fs/list?path="; +var _S2="username"; +var _S143="Confirm new password"; +var _S177="/api/apps/install"; +var _S72="about:blank"; +var _S138="Name:"; +var _S23="/api/fs/read?id="; +var _S90="Permission denied: notify"; +var _S116="false"; +var _S52="{\"id\":\""; +var _S93="notify.confirm"; +var _S25="&content="; +var _S20="Exists → Success="; +var _S101="fs.list"; +var _S167="Ready."; +var _S144="Change password"; +var _S136="New Folder"; +var _S114="Request failed"; +var _S134=" item"; +var _S34="≡"; +var _S53="id"; +var _S65="Password: "; +var _S88="notify.toast"; +var _S147="Password must be at least 8 characters."; +var _S68="/api/auth/login"; +var _S168="App uninstalled."; +var _S107="Unknown action: "; +var _S152="Password changed successfully."; +var _S113="Is a directory"; +var _S32="⚙"; +var _S6="kumos"; +var _S171="Remove this app? Private storage will also be deleted."; +var _S163=" apps installed"; +var _S63="/api/auth/logout"; +var _S121="* "; +var _S83="type"; +var _S153="Unexpected server response."; +var _S174="app_id="; +var _S97="storage.read"; +var _S89="notify"; +var _S17="&to_parent_id="; +var _S16="/api/fs/move"; +var _S158="No apps installed"; +var _S86="window.setTitle"; +var _S5="IDB Init failed: "; +var _S142="New password"; +var _S91="warning"; +var _S105="fs.write"; +var _S58="\\\""; +var _S7="file_content,file_meta"; +var _S161="Install"; +var _S75="/.apps/"; +var _S118="Too many editors open."; +var _S70="&password="; +var _S71="Connection failed. Try again."; +var _S149="current_password="; +var _S159="Install App from URL"; +var _S119="Save"; +var _S145="Please fill in all fields."; +var _S141="Current password"; +var _S117="true"; +var _S111="Bad stat response"; +var _S38="🌐"; +var _S21=" Data="; +var _S110="Not found"; +var _S57="\",\"icon\":\""; +var _S170="Uninstall "; +var _S148="/api/auth/password"; +var _S27="sans-serif"; +var _S14="/api/fs/delete"; +var _S109="DEL:"; +var _S160="Package URL (.zip):"; +var _S156="Launch"; +var _S62="%hh:%ii:%ss"; +var _S123="Unsaved changes"; +var _S129="Loading..."; +var _S124="Close \""; +var _S26="success"; +var _S82="message"; +var _S92="error"; +var _S166="Install failed."; +var _S28="OK"; +var _S33="⏻"; +var _S112="is_dir"; +var _S108="Busy"; +var _S96="storage.stat"; +var _S139="Account"; +var _S1="authenticated"; +var _S45="app_id"; +var _S37="Web Browser"; +var _S76="kmid"; +function appmanager$installedapp() { +this._ID=""; +this._Name=""; +this._Manifest=""; +this._Permissions=""; +this.copy = function(dest) { var k; +dest._ID=this._ID; +dest._Name=this._Name; +dest._Manifest=this._Manifest; +dest._Permissions=this._Permissions; +}; +} +function appruntime$instance() { +this._InstanceID=0; +this._Window=0; +this._View=0; +this._AppID=""; +this._Perms=""; +this.copy = function(dest) { var k; +dest._InstanceID=this._InstanceID; +dest._Window=this._Window; +dest._View=this._View; +dest._AppID=this._AppID; +dest._Perms=this._Perms; +}; +} +function desktop$app() { +this._Name=""; +this._IconImg=0; +this._Proc=0; +this._ID=""; +this.copy = function(dest) { var k; +dest._Name=this._Name; +dest._IconImg=this._IconImg; +dest._Proc=this._Proc; +dest._ID=this._ID; +}; +} +function desktop$window() { +this._Window=0; +this._Button=0; +this._Name=""; +this._Icon=0; +this.copy = function(dest) { var k; +dest._Window=this._Window; +dest._Button=this._Button; +dest._Name=this._Name; +dest._Icon=this._Icon; +}; +} +var settings$a__SectionNames=new spider_SysArray(); +var texteditor$a__Windows=new spider_SysArray(); +var texteditor$a__Editors=new spider_SysArray(); +var texteditor$a__SaveBtns=new spider_SysArray(); +var texteditor$a__FileIDs=new spider_SysArray(); +var texteditor$a__Paths=new spider_SysArray(); +var texteditor$a__Dirty=new spider_SysArray(); +var texteditor$a__Saving=new spider_SysArray(); +var notify$a__Wins=new spider_SysArray(); +var notify$a__Canvases=new spider_SysArray(); +var notify$a__Types=new spider_SysArray(); +var notify$a__Messages=new spider_SysArray(); +var fileexplorer$a_PathStack=new spider_SysArray(); +var fileexplorer$a_EntryIDs=new spider_SysArray(); +var fileexplorer$a_EntryNames=new spider_SysArray(); +var fileexplorer$a_EntryIsDir=new spider_SysArray(); +var desktop$a_AppRegistry=new spider_SysArray(); +var appmanager$t__Apps; +var appruntime$t_Instances; +var desktop$t_WindowManager; +var settings$g_color_text=0; +var settings$g__lblcurrent=0; +var settings$g__lblnew=0; +var settings$g_color_accent=0; +var settings$g__btnsave=0; +var settings$g_color_sel=0; +var settings$g_color_sep=0; +var settings$g__incurrent=0; +var settings$g_color_panel_bg=0; +var settings$g_color_hover=0; +var settings$g__panelhover=0; +var settings$g_color_content_bg=0; +var settings$g_color_dim=0; +var settings$g__innew=0; +var settings$g__currentsection=0; +var settings$g__lblconfirm=0; +var settings$g_panelfont=0; +var settings$g__panelcanvas=0; +var settings$g_window=0; +var settings$g__inconfirm=0; +var appmanager$g_color_text=0; +var appmanager$g_color_row_odd=0; +var appmanager$g__hover=0; +var appmanager$g_color_bg=0; +var appmanager$g_color_accent=0; +var appmanager$g__inputwin=0; +var appmanager$g_font_small=0; +var appmanager$g_color_sel=0; +var appmanager$g_color_sep=0; +var appmanager$g_color_row_even=0; +var appmanager$g_color_dim=0; +var appmanager$g__selected=0; +var appmanager$g__canvas=0; +var appmanager$g_font_ui=0; +var appmanager$g__urlfield=0; +var appmanager$g__cancelbtn=0; +var appmanager$g__statuslabel=0; +var appmanager$g__launchbtn=0; +var appmanager$g__pendinguninstall=""; +var appmanager$g__uninstallbtn=0; +var appmanager$g_window=0; +var appmanager$g__okbtn=0; +var appmanager$g__installbtn=0; +var appruntime$g__psr_kmid=""; +var appruntime$g__pr_kmid=""; +var appruntime$g__psr_id=0; +var appruntime$g__pl_kmid=""; +var appruntime$g__ps_kmid=""; +var appruntime$g__pl_id=0; +var appruntime$g__pc_kmid=""; +var appruntime$g__pw_id=0; +var appruntime$g__pr_id=0; +var appruntime$g__nextid=0; +var appruntime$g__pw_kmid=""; +var appruntime$g__ps_id=0; +var appruntime$g__pc_id=0; +var fs$g__r_path=""; +var fs$g__w_content=""; +var fs$g__w_path=""; +var fs$g__w_cb=0; +var fs$g__r_cb=0; +var fs$g__w_id=""; +var fs$g__r_content=""; +var fs$g__r_id=""; +var texteditor$g__loading_slot=0; +var texteditor$g__closingslot=0; +var texteditor$g__count=0; +var login$g_connectbutton=0; +var login$g_usernameinput=0; +var login$g_passwordlabel=0; +var login$g_usernamelabel=0; +var login$g_passwordinput=0; +var login$g_window=0; +var notify$g__confirmwin=0; +var notify$g__confirmcb=0; +var notify$g__confirmcancelbtn=0; +var notify$g__confirmokbtn=0; +var notify$g__font=0; +var notify$g__count=0; +var webbrowser$g_urlbar=0; +var webbrowser$g_webview=0; +var webbrowser$g_window=0; +var fileexplorer$g_buttonnew=0; +var fileexplorer$g_newfolderbutton=0; +var fileexplorer$g_currentpath=""; +var fileexplorer$g_stackdepth=0; +var fileexplorer$g_cancelbtn=0; +var fileexplorer$g_inputfield=0; +var fileexplorer$g_newfilebutton=0; +var fileexplorer$g_pathlabel=0; +var fileexplorer$g_upbutton=0; +var fileexplorer$g_entrycount=0; +var fileexplorer$g_inputmode=0; +var fileexplorer$g_inputwindow=0; +var fileexplorer$g_statuslabel=0; +var fileexplorer$g_window=0; +var fileexplorer$g_listview=0; +var desktop$g_color_menu_bg=0; +var desktop$g_color_logout_hover=0; +var desktop$g__appcount=0; +var desktop$g__activewindow=0; +var desktop$g_color_menu_text=0; +var desktop$g_color_accent=0; +var desktop$g__iconlogout=0; +var desktop$g__menucanvas=0; +var desktop$g_color_menu_rail=0; +var desktop$g_color_menu_header=0; +var desktop$g_clocklabel=0; +var desktop$g__menuhover=0; +var desktop$g__iconsettings=0; +var desktop$g_color_icon=0; +var desktop$g_color_menu_hover=0; +var desktop$g_color_logout_icon=0; +var desktop$g_startbutton=0; +var desktop$g_taskbarwindow=0; +var desktop$g_color_bar_bg=0; +var desktop$g_color_menu_sep=0; +var desktop$g_menufont=0; +var desktop$g_color_bar_active=0; +var desktop$g_startmenuwindow=0; +var desktop$g_color_menu_dim=0; +var desktop$g_iconfont=0; +if("undefined"==typeof Spider)var Spider={};spider.systembase={localFiles:null,getLocalFile:function(a){for(var b=0;bc?(a[b]=c,1):2048>c?(a[b]=192|c>>6,a[b+1]=128|c&63,2):55296>c||57344<=c?(a[b]=224|c>>12,a[b+1]=128|c>>6&63,a[b+2]=128|c&63,3):0} +function spider_Memory_WriteCharacter(a,b,c,d){switch(d){case 24:return a[b]=c,1;case 25:return a[b]=c,a[b+1]=c>>8,2;default:return spider_Memory_WriteUTF8Character(a,b,c)}}function spider_PokeS(a,b,c,d,e){"undefined"===typeof e&&(e=2);"undefined"===typeof d&&(d=-1);var f=c.length;if(-1==d||d>f)d=f;var f=b,g=e&31;0===g&&(g=25);for(var h=0;h=b.length)return a.length+1;for(var c=0,d=0,e=b.length;;)if(d=a.indexOf(b,d),0<=d)c++,d+=e;else break;return c}function spider_FindString(a,b,c,d){"undefined"===typeof c&&(c=1);"undefined"===typeof d&&(d=0);return a&&b&&""!==a&&""!==b?0===d?a.indexOf(b,c-1)+1:a.toUpperCase().indexOf(b.toUpperCase(),c-1)+1:0} +function spider_FormatNumber(a,b,c,d){"undefined"===typeof b&&(b=2);"undefined"===typeof c&&(c=".");"undefined"===typeof d&&(d=",");if(0<=b){var e=b;a=Number(Math.round(Number(a+"e"+e))+"e"+-1*e)}for(var e=Math.abs(a).toString(),g=e.includes(".")?e.split(".")[0]:e,f="",k=1,h=g.length-1;0<=h;h--)f=g[h]+f,0===k%3&&0!==k&&0!==h&&(f=d+f),k++;0a?"-"+f:f} +function spider_InsertString(a,b,c){1>c?c=1:c>a.length+1&&(c=a.length+1);return a.substr(0,c-1)+b+a.substr(c-1)}function spider_Space(a){if(0>=a)return"";for(var b=a/2,c=" ";c.length<=b;)c+=c;return c+c.substring(0,a-c.length)}function spider_Str(a){return""+a}function spider_StrD(a,b){var c;c="undefined"===typeof b?a.toString():a.toFixed(b);"Infinity"==c&&(c="+Infinity");return c}function spider_StrF(a,b){return spider_StrD(a,b)} +function spider_StrU(a,b){"undefined"===typeof b&&(b=13);switch(b){case 1:case 24:a&=255;break;case 3:case 25:a&=65535}return a.toString(10)}function spider_Val(a){for(var b=0,c=a.length-1,d=0;d<=c&&(" "==a.charAt(d)||"t"==a.charAt(d));)d++;c=a.charAt(d);"-"==c&&(d++,b=1,c=a.charAt(d));a="%"==c?parseInt(spider_Right(a,a.length-d-1),2):"$"==c?parseInt(spider_Right(a,a.length-d-1),16):parseInt(spider_Right(a,a.length-d),10);isNaN(a)&&(a=0);return b?-a:a} +function spider_ValF(a){a=parseFloat(a,10);isNaN(a)&&(a=0);return a}function spider_ValD(a){a=parseFloat(a,10);isNaN(a)&&(a=0);return a}function spider_Right(a,b){var c=a.length;return a.substring(c-b,c)}function spider_Left(a,b){return a.substring(0,b)}function spider_Mid(a,b,c){"undefined"===typeof c&&(c=a.length);1>b&&(b=1);return a.substring(b-1,b+c-1)}function spider_LTrim(a,b){"undefined"===typeof b&&(b=" ");for(var c=0,d=a.length-1;c<=d&&a.charAt(c)==b;)c++;return a.substr(c)} +function spider_RTrim(a,b){"undefined"===typeof b&&(b=" ");for(var c=a.length-1;0c&&a.charAt(d)==b;)d--;return a.substr(c,d-c+1)}function spider_Len(a){return a.length} +function spider_Hex(a,b){"undefined"===typeof b&&(b=13);switch(b){case 1:case 24:a&=255;break;case 3:case 25:a&=65535;break;case 5:a&=4294967295}return a.toString(16).toUpperCase()}function spider_ReplaceString(a,b,c,d,e,g){"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e=1);"undefined"===typeof g&&(g=-1);if(a&&b)for(e-=1,1==d&&(b=b.toUpperCase());g;){e=1==d?a.toUpperCase().indexOf(b,e):a.indexOf(b,e);if(-1==e)break;a=a.substring(0,e)+c+a.substring(e+b.length);e+=c.length;g--}return a} +function spider_RemoveString(a,b,c,d,e){return spider_ReplaceString(a,b,"",c,d,e)}function spider_ReverseString(a){var b="",c;for(c=a.length-1;0<=c;c--)b+=a.charAt(c);return b}function spider_RSet(a,b,c){"undefined"===typeof c&&(c=" ");var d=b-a.length;if(a.length>b)return a.substring(0,b);if(0b)return a.substring(0,b);if(0=b)?a[b-1]:""}function spider_StringByteLength(a){return 0n[u+3]&&(h=h*n[u+3]/250);B+=h*n[u];C+=h*n[u+1];D+=h*n[u+2];v+=h}s[w]=B/v;s[w+1]=C/v;s[w+2]=D/v;s[w+3]=E/A}!0===d?(a.width=b,a.height=c):r.clearRect(0,0,e,f);r.putImageData(t,0,0)}}; +function spider_LoadImage(a,b,c){"undefined"===typeof c&&(c=0);var d=spider.image.objects.Allocate(a),e=document.createElement("canvas");d.image=e;spider.image.div.appendChild(e);var f=new Image;$(f).on({load:function(){e.width=f.width;e.height=f.height;e.getContext("2d").drawImage(f,0,0);var a=spider_GetExtensionPart(b).toLowerCase();"jpg"==a||"jpeg"==a?d.originalFormat=1195724874:"png"==a?d.originalFormat=4673104:"bmp"==a&&(d.originalFormat=5262658);spider.event.SendLoading(18,1,b,d.id)},error:function(){spider.event.SendLoading(19, +1,b,d.id)}});c&65536?(a=spider.systembase.getLocalFile(b))?(c=new FileReader,$(c).on({load:function(a){f.src=a.target.result},error:function(){spider.event.SendLoading(19,1,b,d.id)}}),c.readAsDataURL(a)):spider.event.SendLoading(19,1,b,d.id):f.src=c&2?"data:image/jpeg;base64,"+b:c&1?"data:image/png;base64,"+b:b;return d.resultId} +function spider_CopyImage(a,b){var c,d=spider.image.objects.Allocate(b);if(c=spider.image.objects.Get(a)){var e=document.createElement("canvas");e.width=c.image.width;e.height=c.image.height;d.image=e;spider.image.div.appendChild(e);e.getContext("2d").drawImage(c.image,0,0)}return d.resultId} +function spider_CreateImage(a,b,c,d,e){"undefined"===typeof e&&(e=4278190080);a=spider.image.objects.Allocate(a);d=document.createElement("canvas");d.width=b;d.height=c;a.image=d;spider.image.div.appendChild(d);d=d.getContext("2d");d.fillStyle=spider_helper_ColorToHtml(e,1);d.fillRect(0,0,b,c);return a.resultId} +function spider_GrabImage(a,b,c,d,e,f){b=spider.image.objects.Allocate(b);if(a=spider.image.objects.Get(a)){var g=document.createElement("canvas");g.width=e;g.height=f;b.image=g;spider.image.div.appendChild(g);g.getContext("2d").drawImage(a.image,c,d,e,f,0,0,e,f)}return b.resultId}function spider_ImageOutput(a){return(a=spider.image.objects.Get(a))?(a.image.css=!1,a.image.grayedCss=!1,{image:a,canvas:a.image,context:a.image.getContext("2d"),stopDrawingCallback:null}):0} +function spider_ImageVectorOutput(a,b){"undefined"===typeof b&&(b=1);var c;return(c=spider.image.objects.Get(a))?(c.image.css=!1,c.image.grayedCss=!1,{image:c,canvas:c.image,width:c.image.width,height:c.image.height,inputUnit:1,outputUnit:b,stopDrawingCallback:null}):0}function spider_EncodeImage(a,b,c){"undefined"===typeof b&&(b=4673104);"undefined"===typeof c&&(c=7);var d;return(d=spider.image.objects.Get(a))?1195724874==b?d.image.toDataURL("image/jpeg",c/10):d.image.toDataURL("image/png"):""} +function spider_ExportImage(a,b,c){"undefined"===typeof c&&(c=4673104);return(a=spider.image.objects.Get(a))?(a.image.toBlob(function(a){saveAs(a,b)},1195724874==c?"image/jpeg":"image/png"),1):0}function spider_ImageDepth(a){return spider.image.objects.Get(a)?32:0}function spider_ImageFormat(a){var b;return(b=spider.image.objects.Get(a))?b.originalFormat?b.originalFormat:0:0}function spider_ImageWidth(a){var b;return(b=spider.image.objects.Get(a))?b.image.width:0} +function spider_ImageHeight(a){var b;return(b=spider.image.objects.Get(a))?b.image.height:0} +function spider_ResizeImage(a,b,c,d){"undefined"===typeof d&&(d=0);if(a=spider.image.objects.Get(a)){var e=document.createElement("canvas");-65535==b&&(b=a.image.width);-65535==c&&(c=a.image.height);e.width=b;e.height=c;a.image.css=!1;a.image.grayedCss=!1;var f=e.getContext("2d");if(1==d)if(f.webkitImageSmoothingEnabled||f.mozImageSmoothingEnabled||f.imageSmoothingEnabled)f.webkitImageSmoothingEnabled=!1,f.mozImageSmoothingEnabled=!1,f.imageSmoothingEnabled=!1,f.drawImage(a.image,0,0,a.image.width, +a.image.height,0,0,b,c);else{var g=a.image.getContext("2d");d=a.image.width;for(var l=a.image.height,p=g.getImageData(0,0,d,l),g=f.createImageData(b,c),p=p.data,m=g.data,r=d/b,l=l/c,n=0;n>24&255;return 0===b&&0===f?"rgb("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+")":"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+b/255+")"} +function spider_2ddrawing_getTextHeight(a){a=$("Hg").css("font",a);var f=$('
'),b=$("
");b.append(a,f);$("body").append(b);var c={};try{f.css({verticalAlign:"baseline"}),c.ascent=Math.ceil(f.offset().top-a.offset().top),f.css({verticalAlign:"bottom"}),c.height=Math.ceil(f.offset().top-a.offset().top),c.descent=Math.ceil(c.height-c.ascent)}finally{b.remove()}return c} +function spider_StartDrawing(a){spider.drawing.output=a;spider.drawing.context=a.context;spider.drawing.stopDrawingCallback=a.stopDrawingCallback;spider.drawing.frontColor=0;spider.drawing.backColor=16777215;spider.drawing.mode=0;spider.drawing.context.lineWidth=1;spider.drawing.context.font="12pt arial";return a.context} +function spider_Box(a,f,b,c,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);var e=spider.drawing.context;4==spider.drawing.mode?(e.beginPath(),e.strokeStyle=spider_helper_ColorToHtml(d),e.strokeRect(a,f,b,c)):(e.fillStyle=spider_helper_ColorToHtml(d),e.fillRect(a,f,b,c))}function spider_DrawAlphaImage(a,f,b,c){"undefined"===typeof c&&(c=255);var d=spider.drawing.context,e=d.globalAlpha;d.globalAlpha=c/255;d.drawImage(a,f,b);d.globalAlpha=e} +function spider_DrawImage(a,f,b,c,d){var e=spider.drawing.context;"undefined"===typeof c?e.drawImage(a,f,b):e.drawImage(a,0,0,a.width,a.height,f,b,c,d)}function spider_Plot(a,f,b){"undefined"===typeof b&&(b=spider.drawing.frontColor);var c=spider.drawing.context;c.fillStyle=spider_helper_ColorToHtml(b);c.fillRect(a,f,1,1)}function spider_Point(a,f){var b=spider.drawing.context.getImageData(a,f,1,1).data;return b[0]|b[1]<<8|b[2]<<16|b[3]<<24}function spider_OutputDepth(){return 32} +function spider_OutputWidth(){return spider.drawing.context.canvas.width}function spider_OutputHeight(){return spider.drawing.context.canvas.height}function spider_Line(a,f,b,c,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);var e=spider.drawing.context;e.beginPath();e.moveTo(a+0.5,f+0.5);e.lineTo(a+0.5+b-1,f+c-1+0.5);e.strokeStyle=spider_helper_ColorToHtml(d);e.stroke()} +function spider_LineXY(a,f,b,c,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);var e=spider.drawing.context;e.beginPath();e.moveTo(a+0.5,f+0.5);e.lineTo(b+0.5,c+0.5);e.strokeStyle=spider_helper_ColorToHtml(d);e.stroke()} +function spider_DrawText(a,f,b,c,d){"undefined"===typeof c&&(c=spider.drawing.frontColor);"undefined"===typeof d&&(d=spider.drawing.backColor);var e=spider.drawing.context,g=Math.ceil(e.measureText(b).width);if(!(spider.drawing.mode&1)){var h=spider_TextHeight(b);e.fillStyle=spider_helper_ColorToHtml(d);e.fillRect(a,f,g,h)}e.fillStyle=spider_helper_ColorToHtml(c);e.fillText(b,a,f+spider_2ddrawing_getTextHeight(spider.drawing.context.font).ascent);return a+g} +function spider_Circle(a,f,b,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var d=spider.drawing.context;4==spider.drawing.mode?(d.beginPath(),d.arc(a,f,b-1,0,2*Math.PI,!1),d.strokeStyle=spider_helper_ColorToHtml(c),d.stroke()):(d.beginPath(),d.arc(a,f,b,0,2*Math.PI,!1),d.fillStyle=spider_helper_ColorToHtml(c),d.fill())} +function spider_Ellipse(a,f,b,c,d){function e(a,b,f,c,d){var e=c/2*0.5522848,k=d/2*0.5522848,g=b+c,l=f+d;c=b+c/2;d=f+d/2;a.beginPath();a.moveTo(b,d);a.bezierCurveTo(b,d-k,c-e,f,c,f);a.bezierCurveTo(c+e,f,g,d-k,g,d);a.bezierCurveTo(g,d+k,c+e,l,c,l);a.bezierCurveTo(c-e,l,b,d+k,b,d);a.closePath()}"undefined"===typeof d&&(d=spider.drawing.frontColor);var g=spider.drawing.context;4==spider.drawing.mode?(e(g,a-b,f-c,2*b,2*c),g.strokeStyle=spider_helper_ColorToHtml(d),g.stroke()):(e(g,a-b,f-c,2*b,2*c),g.fillStyle= +spider_helper_ColorToHtml(d),g.fill())}function spider_DrawingFont(a){spider.drawing.context.font=a.name}function spider_DrawingMode(a){spider.drawing.mode=a}function spider_StopDrawing(){spider.drawing.stopDrawingCallback&&spider.drawing.stopDrawingCallback(spider.drawing.output);spider.drawing.output=null} +function spider_RoundBox(a,f,b,c,d,e,g){function h(a,b,c,d,f,e){"undefined"===typeof e&&(e=5);a.beginPath();a.moveTo(b+e,c);a.lineTo(b+d-e,c);a.quadraticCurveTo(b+d,c,b+d,c+e);a.lineTo(b+d,c+f-e);a.quadraticCurveTo(b+d,c+f,b+d-e,c+f);a.lineTo(b+e,c+f);a.quadraticCurveTo(b,c+f,b,c+f-e);a.lineTo(b,c+e);a.quadraticCurveTo(b,c,b+e,c);a.closePath()}e=spider.drawing.context;4==spider.drawing.mode?(h(e,a+0.5,f+0.5,b,c,d),e.strokeStyle=spider_helper_ColorToHtml(g),e.stroke()):(h(e,a+0.5,f+0.5,b,c,d),e.fillStyle= +spider_helper_ColorToHtml(g),e.fill())}function spider_RGB(a,f,b){return b<<16|f<<8|a}function spider_RGBA(a,f,b,c){return(c<<24|b<<16|f<<8|a)>>>0}function spider_Red(a){return a&255}function spider_Green(a){return a>>8&255}function spider_Blue(a){return a>>16&255}function spider_Alpha(a){return a>>24&255}function spider_BackColor(a){return spider.drawing.backColor=a}function spider_FrontColor(a){return spider.drawing.frontColor=a} +function spider_TextHeight(a){a=spider_2ddrawing_getTextHeight(spider.drawing.context.font);return a.ascent+a.descent}function spider_TextWidth(a){return Math.ceil(spider.drawing.context.measureText(a).width)}; + +if("undefined"==typeof Spider)var Spider={};if("undefined"==typeof $)var $={};function spider_InitArray(){}function spider_Array_UpdateDimensions(a){a.dimensions[0]=a.array.length-1;for(var b=a.array,c=1;ca.dimensions[0])for(c=a.dimensions[0]+1;c<=b;c++)a.array[c]=8==a.type?"":a.structure?new a.structure:0;a.dimensions[0]=b}else a.dimensions[a.nbDimensions-1]=b;return a.array}; + +spider.desktop={mouseX:-1,mouseY:-1};function spider_DesktopWidth(a){return $(window).width()}function spider_DesktopHeight(a){return $(window).height()}function spider_DesktopFrequency(a){return 0}function spider_DesktopResolutionX(){return 1===spider.dpiAware?window.devicePixelRatio:1}function spider_DesktopResolutionY(){return 1===spider.dpiAware?window.devicePixelRatio:1}function spider_DesktopScaledX(a){return 1===spider.dpiAware?a*window.devicePixelRatio|0:a} +function spider_DesktopScaledY(a){return 1===spider.dpiAware?a*window.devicePixelRatio|0:a}function spider_DesktopUnscaledX(a){return 1===spider.dpiAware?a/window.devicePixelRatio|0:a}function spider_DesktopUnscaledY(a){return 1===spider.dpiAware?a/window.devicePixelRatio|0:a} +function spider_InitDesktop(){$(document).on({mouseout:function(a){spider.desktop.mouseX=-1;spider.desktop.mouseY=-1},mouseenter:function(a){spider.desktop.mouseX=a.clientX;spider.desktop.mouseY=a.clientY},mousemove:function(a){spider.desktop.mouseX=a.clientX;spider.desktop.mouseY=a.clientY}})}function spider_DesktopMouseX(){return spider.desktop.mouseX}function spider_DesktopMouseY(){return spider.desktop.mouseY}function spider_DesktopX(a){return 0}function spider_DesktopY(a){return 0} +function spider_ExamineDesktops(){return 1}function spider_DesktopDepth(a){return screen.colorDepth}function spider_DesktopName(a){return navigator.userAgent}; + +if("undefined"===typeof spider)var spider={};function spider_Event_Init(){$(window).resize(function(){spider.event.Send(21)})} +spider.event={map:{},event:0,eventWindow:0,eventObject:0,eventType:0,eventData:0,eventString:"",MakeKey:function(a,c,b,d){return a.toString()+"_"+c.toString()+"_"+b.toString()+"_"+d.toString()},SendGeneric:function(a,c,b,d){a=spider.event.MakeKey(a,c,b,d);if(a=spider.event.map[a])for(var e in a)a[e]()},SendLoading:function(a,c,b,d){a=spider.event.MakeKey(a,-1,-1,-1);if(a=spider.event.map[a])for(var e in a)a[e](c,b,d)},Send:function(a,c,b,d){"undefined"===typeof c&&(c=0);"undefined"===typeof b&&(b= +0);"undefined"===typeof d&&(d=0);this.event=a;this.eventWindow=c;this.eventObject=b;this.eventType=d;this.SendGeneric(a,c,b,d);this.SendGeneric(a,c,b,-1);this.SendGeneric(a,c,-1,-1);this.SendGeneric(a,-1,-1,-1)}};function spider_BindEvent(a,c,b,d,e){"undefined"===typeof b&&(b=-1);"undefined"===typeof d&&(d=-1);"undefined"===typeof e&&(e=-1);a=spider.event.MakeKey(a,b,d,e);spider.event.map[a]||(spider.event.map[a]={});spider.event.map[a][c]=c} +function spider_UnbindEvent(a,c,b,d,e){"undefined"===typeof b&&(b=-1);"undefined"===typeof d&&(d=-1);"undefined"===typeof e&&(e=-1);a=spider.event.MakeKey(a,b,d,e);if(a=spider.event.map[a])for(var f in a)f==c&&delete a[c]}function spider_PostEvent(a,c,b,d,e,f){"undefined"===typeof c&&(c=-2);"undefined"===typeof b&&(b=-2);"undefined"===typeof d&&(d=-2);"undefined"===typeof e&&(e=0);"undefined"===typeof f&&(f="");spider.event.eventData=e;spider.event.eventString=f;spider.event.Send(a,c,b,d)} +function spider_Event(){return spider.event.event}function spider_EventWindow(){return spider.event.eventWindow}function spider_EventMenu(){return spider.event.eventObject}function spider_EventGadget(){return spider.event.eventObject}function spider_EventTimer(){return spider.event.eventObject}function spider_EventWebSocket(){return spider.event.eventObject}function spider_EventMobile(){return spider.event.eventObject}function spider_EventNotification(){return spider.event.eventObject} +function spider_EventType(){return spider.event.eventType}function spider_EventData(){return spider.event.eventData}function spider_EventString(){return spider.event.eventString}; + +function spider_InitFont(){}function spider_FreeFont(a){-1==a?spider.font.objects.CleanAll():spider.font.objects.Get(a)&&spider.font.objects.Remove(a)}spider.font={objects:new spider.object(spider_FreeFont)};function spider_LoadFont(a,b,d,c){a=spider.font.objects.Allocate(a);a.name="";a.style="normal";a.weight="normal";c&4&&(a.name+="italic ",a.style="italic");c&2&&(a.name+="bold ",a.weight="bold");a.name+=d+"px "+b;a.family=b;a.size=d+"px";a.flags=c;return a.resultId} +function spider_FontID(a){var b;return(b=spider.font.objects.Get(a))?b:null}function spider_IsFont(a){return spider.font.objects.Is(a)}; + +(function(){function B(b){var a;if(-1==b)spider.window.objects.CleanAll();else if((a=spider.window.objects.Get(b))&&(!spider.debug||spider.debug.window!=b)){for(var c in a.timers)clearInterval(a.timers[c]);spider.gadget.freeWindowGadgets(b);a.id==spider.window.activeWindow&&(spider.window.activeWindow=-1);null!==a.parentId?s(a.parentId):-1!==a.previousActiveWindowId&&s(a.previousActiveWindowId);a.closeScreen&&a.closeScreen();a.window.parentNode.removeChild(a.window);spider.window.objects.Remove(b)}} +function C(b){var a="";b&131072&&(a+="ctrl+");b&65536&&(a+="shift+");b&262144&&(a+="alt+");b&524288&&(a+="mod+");switch(b){case 8:a+="backspace";break;case 9:a+="tab";break;case 13:a+="enter";break;case 0:a+="capslock";break;case 27:a+="escape";break;case 32:a+="space";break;case 33:a+="pageup";break;case 34:a+="pagedown";break;case 4:a+="end";break;case 1:a+="home";break;case 37:a+="left";break;case 38:a+="up";break;case 39:a+="right";break;case 40:a+="down";break;case 5:a+="ins";break;case 127:a+= +"del";break;case 43:a+="plus";break;default:a=201<=b&&212>=b?a+("f"+(b-201+1)):a+spider_Chr(b&-983041)}return a}function k(b){w()==b.id&&(Mousetrap.reset(),b=Object.keys(b.shortcuts),Mousetrap.bindGlobal(b,D))}function D(b,a){var c,e=w();if(-1!=e&&(c=spider.window.objects.Get(e)))return spider.event.Send(2,c.id,c.shortcuts[a]),!1}function w(){return spider.window.activeWindow}function s(b){if(b=spider.window.objects.Get(b))b.flags&4096?(spider.window.activeWindow=b.id,k(b)):b.element.style.zIndex!= +spider.window.globalZIndex&&(b.sticky?(b.element.style.zIndex=spider.window.globalStickyZIndex,spider.window.globalStickyZIndex++):(b.element.style.zIndex=spider.window.globalZIndex,spider.window.globalZIndex++),spider.window.activeWindow=b.id,k(b))}function p(b){return b.flags&4608?0:$(b.contentFrame).cssValue("marginRight")+$(b.contentFrame).cssValue("marginLeft")+$(b.contentFrame).cssValue("borderRightWidth")+$(b.contentFrame).cssValue("borderLeftWidth")}function m(b){return b.flags&4608?0:$(b.contentFrame).cssValue("marginTop")+ +$(b.contentFrame).cssValue("marginBottom")+$(b.contentFrame).cssValue("borderTopWidth")+$(b.contentFrame).cssValue("borderBottomWidth")}function x(b,a,c,e,t){if(b=spider.window.objects.Get(b))-65535!=a&&(b.element.style.left=a+"px"),-65535!=c&&(b.element.style.top=c+"px"),-65535!=e&&$(b.element).width(e+p(b)),-65535!=t&&$(b.element).height(t+m(b)),-65535==e&&-65535==t||b.AdjustContent()}function E(b,a){var c,e;if(e=spider.window.objects.Get(b))a&1?(c=spider_DesktopWidth(0)/2-y(b,0)/2,e=spider_DesktopHeight(0)/ +2-z(b,0)/2,x(b,c,e,-65535,-65535)):a&2&&null!==e.parentId&&(c=F(e.parentId)+(y(e.parentId,0)-y(b,0))/2,e=G(e.parentId)+(z(e.parentId,0)-z(b,0))/2,x(b,c,e,-65535,-65535))}function F(b){var a;return(a=spider.window.objects.Get(b))?a.element.getBoundingClientRect().left|0:0}function G(b){var a;return(a=spider.window.objects.Get(b))?a.element.getBoundingClientRect().top|0:0}function y(b,a){"undefined"===typeof a&&(a=1);var c;return(c=spider.window.objects.Get(b))?c.flags&4608?$(c.element).width():1== +a?$(c.element).width()-p(c):$(c.element).width()+2:0}function z(b,a){"undefined"===typeof a&&(a=1);var c;return(c=spider.window.objects.Get(b))?c.flags&4608?$(c.element).height()-$(c.content).cssValue("top"):1==a?$(c.element).height()-m(c):$(c.element).height()-m(c)+$(c.title).height()+9:0}var A;spider.nbModules++;require(["interact.min","mousetrap.min"],function(b){A=b;require(["mousetrap-global-bind.min"],function(){spider.nbLoadedModules++;SpiderMain()})});spider.window={objects:new spider.object(B), +activeWindow:-1,globalZIndex:100,globalStickyZIndex:500,currentWindowId:-1,gadgetList:null};spider.window.GadgetList=function(){return{panel:null,stackIndex:0,stack:{},get:function(){return this.panel},set:function(b){this.panel=b},push:function(b,a){this.stack[this.stackIndex]={panel:this.panel,windowId:spider.window.currentWindowId};this.stackIndex++;this.panel=b;spider.window.currentWindowId=a},pop:function(){this.stackIndex--;this.panel=this.stack[this.stackIndex].panel;spider.window.currentWindowId= +this.stack[this.stackIndex].windowId}}};spider.window.gadgetList=new spider.window.GadgetList;window.spider_InitWindow=function(){};window.spider_CloseWindow=B;window.spider_DisableWindow=function(b,a){var c;if(c=spider.window.objects.Get(b))a?c.disabled||($(c.window).find("*").prop("disabled",!0),$(c.contentFrame).block({message:null,overlayCSS:{opacity:0.2,cursor:"default"}}),c.disabled=1):c.disabled&&($(c.window).find("*").prop("disabled",!1),$(c.contentFrame).unblock(),c.disabled=0)};window.spider_OpenWindow= +function(b,a,c,e,t,h,g,q){"undefined"===typeof g&&(g=16);"undefined"===typeof q&&(q=null);var d=spider.window.objects.Allocate(b);d.mouseX=-1;d.mouseY=-1;d.color=-1;d.userData=0;d.shortcuts=[];d.timers=[];d.parentId=q?q.id:null;d.previousActiveWindowId=w();b=document.getElementById("spiderbody");q=document.createElement("div");var f=document.createElement("div"),u=document.createElement("div"),m=document.createElement("div"),v;g&256&&(f.style.visibility="hidden");var r=" sbNoSelect";g&8192&&(r=""); +g&4096?(c=a=0,e=spider_DesktopWidth(0),t=spider_DesktopHeight(0),document.title=h,f.style.zIndex=80,f.className="spiderwindow-background"+r,g&=-49,$(window).resize(function(){x(d.id,0,0,spider_DesktopWidth(0),spider_DesktopHeight(0));spider.event.Send(7,d.id,0,0)})):g&512?(f.className="spiderwindow-background"+r,g&=-49):(f.className="spiderwindow"+r,m.innerHTML=h,m.className="spiderwindow-title",u.appendChild(m),g&16&&(v=document.createElement("div"),v.className="spiderwindow-closebutton",$(v).on("click touchend", +function(){spider.event.Send(4,d.id,0,0)}),u.appendChild(v)));var n=document.createElement("div");n.className="spiderwindow-content";$(n).on({mouseover:function(a){var b=n.getBoundingClientRect();d.mouseX=a.clientX-b.left|0;d.mouseY=a.clientY-b.top|0},mouseout:function(a){d.mouseX=-1;d.mouseY=-1},mousemove:function(a){var b=n.getBoundingClientRect();d.mouseX=a.clientX-b.left|0;d.mouseY=a.clientY-b.top|0},click:function(){spider.event.Send(14,spider.window.activeWindow)},dblclick:function(){spider.event.Send(15, +spider.window.activeWindow)},mouseup:function(a){3===a.which&&spider.event.Send(13,spider.window.activeWindow)}});var k=document.createElement("div");k.className="spiderwindow-menubar";var p=document.createElement("div"),l=document.createElement("div"),r=document.createElement("div");d.window=q;d.element=f;d.contentFrame=n;d.content=l;d.menu=k;d.toolBar=p;d.statusBar=r;d.title=u;d.titleText=m;d.titleString=h;d.flags=g;s(d.id);q.appendChild(f);f.appendChild(u);f.appendChild(n);$(f).css("touch-action", +"none");$(u).css("touch-action","none");l.style.position="absolute";l.style.top="0px";l.style.left="0px";$(l).css("overflow","hidden");$(l).css("width","100%");$(l).css("height","100%");l.window=d;n.appendChild(k);n.appendChild(p);n.appendChild(l);n.appendChild(r);f.style.position="absolute";b.appendChild(q);g&32&&($(f).resizable({handles:"n, e, s, w, ne, se, sw, nw",containment:"body",ghost:!1,resize:function(a,b){spider.event.Send(7,d.id,0,0)},start:function(){$(".sbWebGadget").each(function(a){$(this).css("pointer-events", +"none")})},stop:function(){$(".sbWebGadget").each(function(a){$(this).css("pointer-events","auto")})}}),$(".ui-icon-gripsmall-diagonal-se").css("background-image","url('')"),g&16&&($(f).resizable("option","minWidth",80),$(f).resizable("option","minHeight",40)));g&20992||(A(u).draggable({listeners:{move:function(a){var b=f.getBoundingClientRect().left+a.dx;a=f.getBoundingClientRect().top+a.dy;f.style.left=b+"px";f.style.top=a+"px";spider.event.Send(6,d.id,0,0)}}}).styleCursor(!1),v&&A(v).draggable(!0).styleCursor(!1)); +$(f).on("mousedown",function(){spider.window.activeWindow!=d.id&&(-1!=spider.window.activeWindow&&spider.event.Send(16,spider.window.activeWindow,0,0),document.activeElement.blur(),spider.event.Send(8,d.id,0,0),s(d.id))});d.AdjustContent=function(){$(l).css("top",$(k).height()+$(p).height())};x(d.id,a,c,e,t);E(d.id,g);0===(g&1024)&&spider.window.gadgetList.set(l);spider.window.currentWindowId=d.id;return d.resultId};window.spider_AddKeyboardShortcut=function(b,a,c){var e;if(e=spider.window.objects.Get(b))if(a= +C(a))e.shortcuts[a]=c,w()==b&&Mousetrap.bindGlobal(a,D)};window.spider_RemoveKeyboardShortcut=function(b,a){var c;if(c=spider.window.objects.Get(b))if(-1==a)c.shortcuts=[],k(c);else if(a=C(a))delete c.shortcuts[a],k(c)};window.spider_AddWindowTimer=function(b,a,c){var e;if(e=spider.window.objects.Get(b))e.timers[""+a]=setInterval(function(){spider.event.Send(12,e.id,a,0)},c)};window.spider_RemoveWindowTimer=function(b,a){var c;if(c=spider.window.objects.Get(b)){var e=""+a;c.timers[e]&&(clearInterval(c.timers[e]), +delete c.timers[e])}};window.spider_HideWindow=function(b,a,c){if(b=spider.window.objects.Get(b))b.element.style.visibility=0===a?"visible":"hidden"};window.spider_GetWindowTitle=function(b){var a;return(a=spider.window.objects.Get(b))?a.titleString:""};window.spider_SetWindowTitle=function(b,a){var c;if(c=spider.window.objects.Get(b))c.titleString=a,c.flags&4096?document.title=a:c.titleText&&(c.titleText.innerHTML=a)};window.spider_GetWindowData=function(b){var a;return(a=spider.window.objects.Get(b))? +a.userData:0};window.spider_SetWindowData=function(b,a){var c;if(c=spider.window.objects.Get(b))c.userData=a};window.spider_GetActiveWindow=w;window.spider_SetActiveWindow=s;window.spider_GetWindowColor=function(b){var a;return(a=spider.window.objects.Get(b))?a.color:-1};window.spider_SetWindowColor=function(b,a){var c;if(c=spider.window.objects.Get(b))-1==a?c.color=-1:(c.color=a,$(c.content).css("background-color",spider_helper_ColorToHtml(a)))};window.spider_StickyWindow=function(b,a){var c;if(c= +spider.window.objects.Get(b))c.sticky=a,s(c.id)};window.spider_ResizeWindow=x;window.spider_WindowBounds=function(b,a,c,e,k){var h;(h=spider.window.objects.Get(b))&&h.flags&32&&(-65535!=a&&$(h.element).resizable("option","minWidth",a+p(h)),-65535!=c&&$(h.element).resizable("option","minHeight",c+m(h)),-65535!=e&&$(h.element).resizable("option","maxWidth",e+p(h)),-65535!=k&&$(h.element).resizable("option","maxHeight",k+m(h)))};window.spider_WindowX=F;window.spider_WindowY=G;window.spider_WindowWidth= +y;window.spider_WindowHeight=z;window.spider_WindowMouseX=function(b){var a;return(a=spider.window.objects.Get(b))?a.mouseX:0};window.spider_WindowMouseY=function(b){var a;return(a=spider.window.objects.Get(b))?a.mouseY:0};window.spider_WindowID=function(b){var a;return(a=spider.window.objects.Get(b))?a:null};window.spider_WindowOpacity=function(b,a){var c;if(c=spider.window.objects.Get(b))c.element.style.opacity=a/100};window.spider_IsWindow=function(b){return spider.window.objects.Is(b)};window.spider_window_Center= +E})(); + +function spider_InitList(){}function spider_NewList(a,b,c){var d=new spider_SysList;d.current=0;d.first=0;d.last=0;d.type=a;d.field=b;d.isNative=c;return d} +function spider_AddElement(a){var b=new a.type;a.nbElements++;if(a.current){b.previous=a.current;if(b.next=a.current.next)a.current.next.previous=b;a.current.next=b;a.current=b;a.index++}else a.first&&(a.first.previous=b),a.current=b,b.next=a.first,b.previous=0,a.index=0,a.isIndexInvalid=!1;a.current.previous||(a.first=a.current);a.current.next||(a.last=a.current);return b} +function spider_InsertElement(a){var b=new a.type;a.nbElements++;if(a.current){b.next=a.current;if(b.previous=a.current.previous)a.current.previous.next=b;a.current.previous=b;a.current=b}else a.first&&(a.first.previous=b),a.current=b,a.current.next=a.first,a.current.previous=0,a.index=0,a.isIndexInvalid=!1;a.current.previous||(a.first=a.current);a.current.next||(a.last=a.current);return b} +function spider_ListIndex(a){if(a.isIndexInvalid){var b=-1,c=a.current;if(c){for(;c;)b++,c=c.previous;a.index=b;a.isIndexInvalid=!1}return b}return a.index}function spider_LastElement(a){a.current=a.last;return a.current?(a.isIndexInvalid=!1,a.index=a.nbElements-1,a.current):0} +function spider_MergeLists(a,b,c){"undefined"===typeof c&&(c=2);if(a.first){3!=c||b.current&&b.current!=b.first?4!=c||b.current&&b.current!=b.last||(c=2):c=1;if(b.first)switch(c){case 3:a.first.previous=b.current.previous;b.current.previous.next=a.first;b.current.previous=a.last;a.last.next=b.current;b.isIndexInvalid=!0;break;case 4:b.current.next.previous=a.last;a.last.next=b.current.next;a.first.previous=b.current;b.current.next=a.first;break;case 1:a.last.next=b.first;b.first.previous=a.last;b.first= +a.first;b.isIndexInvalid=!0;break;default:a.first.previous=b.last,b.last.next=a.first,b.last=a.last}else b.first=a.first,b.last=a.last;b.nbElements+=a.nbElements;a.current=0;a.first=0;a.last=0;a.nbElements=0;a.isIndexInvalid=!0}} +function spider_MoveElement(a,b,c){function d(a){a.current.previous&&(a.current.previous.next=a.current.next);a.current.next&&(a.current.next.previous=a.current.previous);a.current==a.first&&(a.first=a.current.next);a.current==a.last&&(a.last=a.current.previous)}var e;if(e=a.current)switch(b){case 1:e!=a.first&&(d(a),e.previous=0,e.next=a.first,a.first.previous=e,a.first=e,a.index=0,a.isIndexInvalid=0);break;case 2:e!=a.last&&(d(a),e.previous=a.last,e.next=0,a.last.next=e,a.last=e,a.index=a.nbElements- +1,a.isIndexInvalid=0);break;case 3:c&&e!=c&&(d(a),e.next=c,e.previous=c.previous,c.previous=e,e.previous&&(e.previous.next=e),c==a.first&&(a.first=e),a.isIndexInvalid=1);break;case 4:c&&e!=c&&(d(a),e.previous=c,e.next=c.next,c.next=e,e.next&&(e.next.previous=e),c==a.last&&(a.last=e),a.isIndexInvalid=1)}}function spider_NextElement(a){var b;if(a.current){if(b=a.current.next)a.current=b,a.index++}else b=a.first,a.current=b,a.index=0;return b?b:0} +function spider_PushListPosition(a){a.stack||(a.stack=[]);a.stack.push(a.current)}function spider_PopListPosition(a){a.stack&&0b||b>=a.nbElements)c=0;else if(a.isIndexInvalid)if(bd)if(c=a.current,b-da?-1:1:0}function spider_Sin(a){return Math.sin(a)}function spider_SinH(a){return(Math.exp(a)-Math.exp(-a))/2} +function spider_Tan(a){return Math.tan(a)}function spider_TanH(a){return(Math.exp(a)-Math.exp(-a))/(Math.exp(a)+Math.exp(-a))}function spider_Pow(a,b){return Math.pow(a,b)}function spider_Int(a){return a|0}function spider_IntQ(a){return 0<=a?Math.floor(a):Math.ceil(a)}function spider_IsNAN(a){return isNaN(a)?1:0}function spider_Random(a,b){"undefined"===typeof b&&(b=0);return b+Math.floor(Math.random()*(a-b+1))}function spider_RandomSeed(a){Math.seedrandom(a)}; + +spider.vectordrawing={output:null,isPathEmpty:1,sourceColor:0,x:0,y:0,context2d:null,useStrokeText:0,strokeText:"",strokeTextX:0,strokeTextY:0,states:[],path:null,layers:[],layerAlpha:[]}; +function spider_vectordrawing_Reset(){spider.vectordrawing.AddPathArc=0;spider.vectordrawing.AddPathBox=0;spider.vectordrawing.AddPathCircle=0;spider.vectordrawing.AddPathCurve=0;spider.vectordrawing.AddPathEllipse=0;spider.vectordrawing.AddPathLine=0;spider.vectordrawing.AddPathText=0;spider.vectordrawing.BeginVectorLayer=0;spider.vectordrawing.ClipPath=0;spider.vectordrawing.ClosePath=0;spider.vectordrawing.ConvertCoordinateX=0;spider.vectordrawing.ConvertCoordinateY=0;spider.vectordrawing.CustomDashPath= +0;spider.vectordrawing.DashPath=0;spider.vectordrawing.DotPath=0;spider.vectordrawing.DrawVectorImage=0;spider.vectordrawing.DrawVectorText=0;spider.vectordrawing.EndVectorLayer=0;spider.vectordrawing.FillPath=0;spider.vectordrawing.FillVectorOutput=0;spider.vectordrawing.FlipCoordinatesX=0;spider.vectordrawing.FlipCoordinatesY=0;spider.vectordrawing.IsInsidePath=0;spider.vectordrawing.IsInsideStroke=0;spider.vectordrawing.MovePathCursor=0;spider.vectordrawing.PathBoundsHeight=0;spider.vectordrawing.PathBoundsWidth= +0;spider.vectordrawing.PathBoundsX=0;spider.vectordrawing.PathBoundsY=0;spider.vectordrawing.PathCursorX=0;spider.vectordrawing.PathCursorY=0;spider.vectordrawing.PathLength=0;spider.vectordrawing.PathPointAngle=0;spider.vectordrawing.PathPointX=0;spider.vectordrawing.PathPointY=0;spider.vectordrawing.PathSegments=0;spider.vectordrawing.ResetCoordinates=0;spider.vectordrawing.ResetPath=0;spider.vectordrawing.RestoreVectorState=0;spider.vectordrawing.RotateCoordinates=0;spider.vectordrawing.SaveVectorState= +0;spider.vectordrawing.ScaleCoordinates=0;spider.vectordrawing.SkewCoordinates=0;spider.vectordrawing.StartVectorDrawing=0;spider.vectordrawing.StopVectorDrawing=0;spider.vectordrawing.StrokePath=0;spider.vectordrawing.TranslateCoordinates=0;spider.vectordrawing.VectorFont=0;spider.vectordrawing.VectorOutputHeight=0;spider.vectordrawing.VectorOutputWidth=0;spider.vectordrawing.VectorResolutionX=0;spider.vectordrawing.VectorResolutionY=0;spider.vectordrawing.VectorSourceCircularGradient=0;spider.vectordrawing.VectorSourceColor= +0;spider.vectordrawing.VectorSourceGradientColor=0;spider.vectordrawing.VectorSourceImage=0;spider.vectordrawing.VectorSourceLinearGradient=0;spider.vectordrawing.VectorTextHeight=0;spider.vectordrawing.VectorTextWidth=0;spider.vectordrawing.VectorUnit=0;spider.vectordrawing.NewVectorPage=0;spider.vectordrawing.DrawVectorParagraph=0} +function spider_ResetPath(){spider.vectordrawing.ResetPath?spider.vectordrawing.ResetPath():(spider.vectordrawing.context2d.beginPath(),spider.vectordrawing.isPathEmpty=1)}function spider_SaveVectorState(){spider.vectordrawing.SaveVectorState?spider.vectordrawing.SaveVectorState():spider.vectordrawing.context2d.save()}function spider_RestoreVectorState(){spider.vectordrawing.RestoreVectorState?spider.vectordrawing.RestoreVectorState():spider.vectordrawing.context2d.restore()} +function spider_StartVectorDrawing(a){if(spider.vectordrawing.StartVectorDrawing)return spider.vectordrawing.StartVectorDrawing(a);a&&(spider.vectordrawing.output=a,spider.vectordrawing.context2d=a.canvas.getContext("2d"),spider.vectordrawing.context2d.save(),spider_ResetPath());return a}function spider_StopVectorDrawing(){spider.vectordrawing.StopVectorDrawing?spider.vectordrawing.StopVectorDrawing():(spider_FillPath(0),spider.vectordrawing.context2d.restore())} +function spider_IsPathEmpty(){return spider.vectordrawing.IsPathEmpty?spider.vectordrawing.IsPathEmpty():spider.vectordrawing.isPathEmpty}function spider_ConvertCoordinateX(a,b,c,d){return 0}function spider_ConvertCoordinateY(a,b,c,d){return 0} +function spider_MovePathCursor(a,b,c){"undefined"===typeof c&&(c=0);spider.vectordrawing.MovePathCursor?spider.vectordrawing.MovePathCursor(a,b,c):(c&1?(spider.vectordrawing.x+=a,spider.vectordrawing.y+=b):(spider.vectordrawing.x=a,spider.vectordrawing.y=b),spider.vectordrawing.context2d.moveTo(spider.vectordrawing.x,spider.vectordrawing.y))} +function spider_AddPathEllipse(a,b,c,d,e,g,h){"undefined"===typeof e&&(e=0);"undefined"===typeof g&&(g=359.9999999);"undefined"===typeof h&&(h=0);spider.vectordrawing.AddPathEllipse?spider.vectordrawing.AddPathEllipse(a,b,c,d,e,g,h):(h&1&&(a+=spider.vectordrawing.x,b+=spider.vectordrawing.y),e=spider_Radian(e),g=spider_Radian(g),spider.vectordrawing.context2d.save(),spider.vectordrawing.context2d.translate(a,b),spider.vectordrawing.context2d.scale(c,d),spider.vectordrawing.context2d.moveTo(Math.cos(e), +Math.sin(e)),spider.vectordrawing.context2d.arc(0,0,1,e,g),spider.vectordrawing.context2d.translate(-a,-b),spider.vectordrawing.context2d.restore(),spider.vectordrawing.isPathEmpty=0)} +function spider_AddPathText(a){spider.vectordrawing.AddPathText?spider.vectordrawing.AddPathText(a):(spider.vectordrawing.useStrokeText=1,spider.vectordrawing.strokeText=a,spider.vectordrawing.strokeTextX=spider.vectordrawing.x,spider.vectordrawing.strokeTextY=spider.vectordrawing.y,spider.vectordrawing.x+=spider_VectorTextWidth(a),spider.vectordrawing.y+=spider_VectorTextHeight(a),spider.vectordrawing.isPathEmpty=0)} +function spider_AddPathCurve(a,b,c,d,e,g,h){"undefined"===typeof h&&(h=0);spider.vectordrawing.AddPathCurve?spider.vectordrawing.AddPathCurve(a,b,c,d,e,g,h):(h&1&&(a+=spider.vectordrawing.x,b+=spider.vectordrawing.y,c+=spider.vectordrawing.x,d+=spider.vectordrawing.y,e+=spider.vectordrawing.x,g+=spider.vectordrawing.y),spider.vectordrawing.context2d.bezierCurveTo(a,b,c,d,e,g),spider.vectordrawing.isPathEmpty=0)} +function spider_AddPathArc(a,b,c,d,e,g){"undefined"===typeof g&&(g=0);spider.vectordrawing.AddPathArc?spider.vectordrawing.AddPathArc(a,b,c,d,e,g):(g&1&&(a+=spider.vectordrawing.x,b+=spider.vectordrawing.y,c+=spider.vectordrawing.x,d+=spider.vectordrawing.y),spider.vectordrawing.context2d.arcTo(a,b,c,d,e),spider.vectordrawing.isPathEmpty=0)} +function spider_AddPathCircle(a,b,c,d,e,g,h){"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e=359.9);"undefined"===typeof g&&(g=0);spider.vectordrawing.AddPathCircle?spider.vectordrawing.AddPathCircle(a,b,c,d,e,g,h):(g&4&&(h=e,e=d+360,d=h),d=spider_Radian(d),e=spider_Radian(e),g&2?spider.vectordrawing.context2d.lineTo(a+c*Math.cos(d),b+c*Math.sin(d)):spider.vectordrawing.context2d.moveTo(a+c*Math.cos(d),b+c*Math.sin(d)),spider.vectordrawing.context2d.arc(a,b,c,d,e),spider.vectordrawing.isPathEmpty= +0)}function spider_AddPathLine(a,b,c){"undefined"===typeof c&&(c=0);spider.vectordrawing.AddPathLine?spider.vectordrawing.AddPathLine(a,b,c):(c&1&&(a+=spider.vectordrawing.x,b+=spider.vectordrawing.y),spider.vectordrawing.context2d.lineTo(a,b),spider.vectordrawing.x=a,spider.vectordrawing.y=b,spider.vectordrawing.isPathEmpty=0)} +function spider_AddPathBox(a,b,c,d,e){"undefined"===typeof e&&(e=0);spider.vectordrawing.AddPathBox?spider.vectordrawing.AddPathBox(a,b,c,d,e):e&2?(spider_AddPathLine(a,b,e),spider_AddPathLine(c,0,e|1),spider_AddPathLine(0,d,e|1),spider_AddPathLine(-c,0,e|1),spider_AddPathLine(0,-d,e|1)):spider.vectordrawing.context2d.rect(a,b,c,d)} +function spider_VectorSourceColor(a){spider.vectordrawing.VectorSourceColor?spider.vectordrawing.VectorSourceColor(a):(a=spider_helper_ColorToHtml(a,1),spider.vectordrawing.context2d.fillStyle=a,spider.vectordrawing.context2d.strokeStyle=a)}function spider_VectorSourceLinearGradient(a,b,c,d){spider.vectordrawing.VectorSourceLinearGradient?spider.vectordrawing.VectorSourceLinearGradient(a,b,c,d):spider.vectordrawing.context2d.fillStyle=spider.vectordrawing.context2d.createLinearGradient(a,b,c,d)} +function spider_VectorSourceCircularGradient(a,b,c,d,e){"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e=0);spider.vectordrawing.VectorSourceCircularGradient?spider.vectordrawing.VectorSourceCircularGradient(a,b,c,d,e):spider.vectordrawing.context2d.fillStyle=spider.vectordrawing.context2d.createRadialGradient(a+d,b+e,0,a,b,c)}function spider_VectorSourceGradientColor(a,b){var c=spider_helper_ColorToHtml(a,1);spider.vectordrawing.context2d.fillStyle.addColorStop(b,c)} +function spider_ClosePath(){spider.vectordrawing.ClosePath?spider.vectordrawing.ClosePath():spider.vectordrawing.context2d.closePath()} +function spider_VectorDrawing_GenericStrokePath(a,b){"undefined"===typeof b&&(b=0);spider.vectordrawing.context2d.lineWidth=a;spider.vectordrawing.context2d.lineCap=b&16?"round":b&32?"square":"butt";spider.vectordrawing.context2d.lineJoin=b&64?"round":b&128?"bevel":"miter";spider.vectordrawing.useStrokeText?(spider.vectordrawing.context2d.strokeText(spider.vectordrawing.strokeText,spider.vectordrawing.strokeTextX,spider.vectordrawing.strokeTextY),spider.vectordrawing.useStrokeText=0):spider.vectordrawing.context2d.stroke(); +0===(b&8)&&spider_ResetPath()}function spider_StrokePath(a,b){"undefined"===typeof b&&(b=0);spider.vectordrawing.StrokePath?spider.vectordrawing.StrokePath(a,b):spider_VectorDrawing_GenericStrokePath(a,b)} +function spider_CustomDashPath(a,b,c,d){"undefined"===typeof c&&(c=0);"undefined"===typeof d&&(d=0);if(spider.vectordrawing.CustomDashPath)spider.vectordrawing.CustomDashPath(a,b,c,d);else{b=b.array.slice(0);for(var e=0;e=a}function d(){return parseFloat(m[n++])}function e(a){if(!c(2))return!1;var b=d(),e=d();a&&(b+=f.currentX,e+=f.currentY);spider_MovePathCursor(b,e,0);f.currentX=b;for(f.currentY=e;c(2);)b=d(),e=d(),a&&(b+=f.currentX,e+=f.currentY),spider_AddPathLine(b,e),f.currentX=b,f.currentY=e;return!0}function g(b){if(!c(2))return!1;do{var a=d(),e=d();b&&(a+=f.currentX,e+=f.currentY);spider_AddPathLine(a, +e);f.currentX=a;f.currentY=e}while(c(2));return!0}function h(a){if(!c(1))return!1;do{var b=d();a&&(b+=f.currentX);spider_AddPathLine(b,f.currentY);f.currentX=b}while(c(1));return!0}function l(b){if(!c(1))return!1;do{var a=d();b&&(a+=f.currentY);spider_AddPathLine(f.currentX,a);f.currentY=a}while(c(1));return!0}function q(a){if(!c(6))return!1;do{var b=d(),e=d(),g=d(),p=d(),h=d(),k=d();a&&(b+=f.currentX,e+=f.currentY,g+=f.currentX,p+=f.currentY,h+=f.currentX,k+=f.currentY);spider_AddPathCurve(b,e,g, +p,h,k,0);f.controlX=g;f.controlY=p;f.currentX=h;f.currentY=k}while(c(6));return!0}function r(b){if(!c(4))return!1;do{var a=d(),e=d(),g=d(),h=d(),k,l;"C"===f.lastCommand||"c"===f.lastCommand||"S"===f.lastCommand||"s"===f.lastCommand?(k=2*f.currentX-f.controlX,l=2*f.currentY-f.controlY):(k=f.currentX,l=f.currentY);b&&(a+=f.currentX,e+=f.currentY,g+=f.currentX,h+=f.currentY);spider_AddPathCurve(k,l,a,e,g,h,0);f.controlX=a;f.controlY=e;f.currentX=g;f.currentY=h}while(c(4));return!0}function s(a){if(!c(4))return!1; +do{var b=d(),e=d(),g=d(),h=d();a&&(b+=f.currentX,e+=f.currentY,g+=f.currentX,h+=f.currentY);spider_AddPathCurve(f.currentX+2/3*(b-f.currentX),f.currentY+2/3*(e-f.currentY),g+2/3*(b-g),h+2/3*(e-h),g,h,0);f.controlX=b;f.controlY=e;f.currentX=g;f.currentY=h}while(c(4));return!0}function t(b){if(!c(2))return!1;do{var a=d(),e=d(),g,h;"Q"===f.lastCommand||"q"===f.lastCommand||"T"===f.lastCommand||"t"===f.lastCommand?(g=2*f.currentX-f.controlX,h=2*f.currentY-f.controlY):(g=f.currentX,h=f.currentY);b&&(a+= +f.currentX,e+=f.currentY);spider_AddPathCurve(f.currentX+2/3*(g-f.currentX),f.currentY+2/3*(h-f.currentY),a+2/3*(g-a),e+2/3*(h-e),a,e,0);f.controlX=g;f.controlY=h;f.currentX=a;f.currentY=e}while(c(2));return!0}"undefined"===typeof b&&(b=0);var m=a.replace(","," ").split(" ").filter(function(a){return 0=e.min&&c<=e.max)}return!0},onChange:function(){n(b,9)}}),k=document.createElement("div");$(k).css("overflow","hidden");k.spiderId=b.id;k.appendChild(a.domNode);b.Disable=function(c){b.isDisabled= +c;a._populateGrid()};b.GetState=function(){var b=a.get("value");return c(b)};b.SetState=function(b){a.set("value",e(b))};b.GetAttribute=function(b){switch(b){case 1:return c(a.attr("constraints").min);case 2:return c(a.attr("constraints").max)}return 0};b.SetAttribute=function(b,c){var d=a.attr("constraints");switch(b){case 1:d.min=e(c);a.attr("constraints",d);a._populateGrid();break;case 2:d.max=e(c),a.attr("constraints",d),a._populateGrid()}};b.SetActive=function(){var a=A(k,"span","dijitDownArrowButton"); +spider.DigitFocus.focus(a)};b.GetRequiredSize=function(){var a=$(k).find("table").first(),a={width:a.get(0).clientWidth+6,height:a.get(0).clientHeight},b=$(k).find(".dijitCalendarMonthContainer").first();a.height+=b.get(0).clientHeight;b=$(k).find(".dijitCalendarYearContainer").first();a.height+=b.get(0).clientHeight;return a};b.Resize=function(b,c,e,d){var f=u(a.domNode);t(k,b,c,e,d);x(a,0,0,e-f.x,d-f.y)};spider.gadget.register(b,20,k,a);b.Resize(f,g,l,p);b.SetState(m);a._populateGrid();return b.resultId}; +window.spider_CanvasGadget=function(d,f,g,l,p,m){function h(a){k(a,!1);n(b,65539)}function e(a){k(a,!1);0===a.button?(n(b,65541),b.buttons&=-2):1===a.button?(n(b,65545),b.buttons&=-5):2===a.button&&(n(b,1),n(b,65543),b.buttons&=-3);window.removeEventListener("mouseup",e);window.removeEventListener("mousemove",h)}"undefined"===typeof m&&(m=0);var c=!1,b=spider.gadget.objects.Allocate(d),a=document.createElement("canvas");b.canvas=a;b.mouseX=0;b.mouseY=0;b.mouseWheelDelta=0;b.buttons=0;b.lastKey=0; +b.lastInput=0;b.modifiers=0;b.resolutionX=spider_DesktopResolutionX();"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(a){n(b,15)})).observe(a);m&4&&a.setAttribute("tabindex","0");var k=function(c,e){var d=a.getBoundingClientRect();if(e){if(0>=c.touches.length)return;b.mouseX=c.touches[0].clientX-d.left|0;b.mouseY=c.touches[0].clientY-d.top|0}else b.mouseX=c.clientX-d.left,b.mouseY=c.clientY-d.top;0>b.mouseX&&(b.mouseX=0);0>b.mouseY&&(b.mouseY=0);b.mouseX>=(a.width/b.resolutionX| +0)&&(b.mouseX=(a.width/b.resolutionX|0)-1);b.mouseY>=(a.height/b.resolutionX|0)&&(b.mouseY=(a.height/b.resolutionX|0)-1)};$(a).on({click:function(){n(b,0)},dblclick:function(){n(b,2)},mouseover:function(a){n(b,65537)},touchstart:function(a){k(a,!0);n(b,65537);b.buttons|=1;n(b,65540);c=!0},mouseout:function(a){n(b,65538)},"touchend touchcancel touchleave":function(a){k(a,!0);b.buttons&=-2;n(b,65541);n(b,65538)},touchmove:function(a){k(a,!0);n(b,65539)},mousemove:function(a){k(a,!1);n(b,65539)},mousedown:function(a){if(!c){var d; +k(a,!1);0===a.button?(d=65540,b.buttons|=1):1===a.button?(d=65544,b.buttons|=4):2===a.button&&(d=65542,b.buttons|=2);n(b,d);a.preventDefault();window.addEventListener("mouseup",e);window.addEventListener("mousemove",h);if(1===a.button)return!1}},focus:function(){n(b,7)},blur:function(){n(b,8)},wheel:function(a){a=a.originalEvent;b.mouseWheelDelta=0>a.deltaY?1:-1;n(b,65546);return!1},keydown:function(a){b.lastKey=a.keyCode;65<=b.lastKey&&90>=b.lastKey&&(b.lastKey+=32);16==a.keyCode&&(b.modifiers|= +1);17==a.keyCode&&(b.modifiers|=4);18==a.keyCode&&(b.modifiers|=2);n(b,65547)},keyup:function(a){b.lastKey=a.keyCode;65<=b.lastKey&&90>=b.lastKey&&(b.lastKey+=32);16==a.keyCode&&(b.modifiers&=-2);17==a.keyCode&&(b.modifiers&=-5);18==a.keyCode&&(b.modifiers&=-3);n(b,65548)},keypress:function(a){b.lastInput=a.which;b.lastInput&&n(b,65549)}});var r=document.createElement("div");r.appendChild(a);m&1&&$(r).addClass("sbCanvasBorder");b.Disable=function(a){b.isDisabled=a};b.GetAttribute=function(c){switch(c){case 1:return a; +case 4:return b.buttons;case 2:return b.mouseX*b.resolutionX|0;case 3:return b.mouseY*b.resolutionX|0;case 8:return b.mouseWheelDelta;case 5:return b.lastKey;case 9:return b.lastInput;case 6:return b.modifiers}};b.SetAttribute=function(c,e){switch(c){case 1:a.getContext("2d").drawImage(e,0,0);break;case 7:switch(b.cursor=e,e){case 0:a.style.cursor="default";b.cursor=-1;break;case 3:a.style.cursor="pointer";break;case 1:a.style.cursor="crosshair";break;case 2:a.style.cursor="text";break;case 4:a.style.cursor= +"wait";break;case 5:a.style.cursor="no-drop";break;case 6:a.style.cursor="move";break;case 7:a.style.cursor="w-resize";break;case 6:a.style.cursor="s-resize";break;case 8:a.style.cursor="se-resize";break;case 9:a.style.cursor="sw-resize";break;case 10:a.style.cursor="none"}}};b.SetActive=function(){$(a).focus()};b.Resize=function(c,e,d,k){var f=u(r);if(a.width!=(d*b.resolutionX|0)-f.x||a.height!=(k*b.resolutionX|0)-f.y)if(a.width=(d*b.resolutionX|0)-f.x,a.height=(k*b.resolutionX|0)-f.y,0===(m&16)){var g= +a.getContext("2d");g.fillStyle="#FFF";g.fillRect(0,0,a.width,a.height)}a.style.width=d+"px";a.style.height=k+"px";t(r,c,e,d-f.x,k-f.y)};spider.gadget.register(b,33,r,a);m&32&&spider.window.gadgetList.push(r,spider.window.currentWindowId);b.Resize(f,g,l,p);return b.resultId};window.spider_CanvasOutput=function(d){var f;return(f=spider.gadget.objects.Get(d))?{gadget:f,canvas:f.canvas,context:f.canvas.getContext("2d"),stopDrawingCallback:null}:0};window.spider_CanvasVectorOutput=function(d,f){"undefined"=== +typeof f&&(f=1);var g;return(g=spider.gadget.objects.Get(d))?{gadget:g,canvas:g.canvas,width:g.canvas.width,height:g.canvas.height,inputUnit:1,outputUnit:f,stopDrawingCallback:null}:0};window.spider_CheckBoxGadget=function(d,f,g,l,p,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d);d="spidercheckbox_"+e.id;var c=new dijit.form.CheckBox({id:d,onClick:function(){n(e,0)}}),b=document.createElement("div"),a=document.createElement("span");a.className="sbVerticalCenter";b.appendChild(a); +a.appendChild(c.domNode);var k=put(a,"label",{htmlFor:d});$(k).css("padding-left","5px");$(k).css("display","inline-block");c.label=k;h&1?$(k).css("text-align","right"):h&2&&$(k).css("text-align","center");e.Disable=function(a){$(k).css("color",a?"gray":"");c.set("disabled",a?!0:!1)};e.GetState=function(){return c.get("checked")?1:0};e.SetState=function(a){-1==a?c.set("value","mixed"):c.set("checked",a)};e.GetText=function(){return k.innerHTML};e.SetText=function(b){k.innerHTML=b;""===b?a.removeChild(k): +a.appendChild(k)};e.GetRequiredSize=function(){var a=$(b).css("fontSize")+" "+$(b).css("fontFamily"),a=z(e,a,e.GetText());a.width+=28;a.height+=6;return a};e.Resize=function(e,d,f,g){t(b,e,d,f,g);$(a).width(f);$(a).height(g);$(k).width(f-$(c.domNode).outerWidth(!0)-5)};spider.gadget.register(e,4,b,c);c.startup();e.SetText(m);e.Resize(f,g,l,p);return e.resultId};window.spider_ClearGadgetItems=function(d){var f;(f=spider.gadget.objects.Get(d))&&f.ClearItems&&f.ClearItems()};window.spider_CloseGadgetList= +function(){spider.window.gadgetList.pop()};window.spider_ComboBoxGadget=function(d,f,g,l,p,m){"undefined"===typeof m&&(m=0);var h=spider.gadget.objects.Allocate(d),e=0,c=spider_NewList(function(){return{id:null,text:null}}),b=new spider.StoreMemory,a=new dijit.form.ComboBox({store:b,onChange:function(){n(h,9)},onFocus:function(){spider.DigitFocus.focus(a.focusNode);n(h,7)},onBlur:function(){n(h,8)}});m&1||$(a.focusNode).attr("readOnly",!0);var k=document.createElement("div");k.appendChild(a.domNode); +$(a._buttonNode).css("height","100%");var r=-1,q=function(){b=new spider.StoreMemory;e=0;spider_ResetList(c);for(var d;d=spider_NextElement(c);)b.add({name:d.text,id:e}),e++;a.set("store",b)};a.watch("item",function(a,b,c){c&&(r=c.id)});h.GetState=function(){return r};h.SetState=function(c){b.get(c)?(a.set("value",b.get(c).name),r=c):(a.set("value",""),r=-1)};h.GetText=function(){return a.get("value")};h.SetText=function(b){a.set("value",b);r=-1};h.AddItem=function(a,d,k,f){-1==a&&(a=spider_ListSize(c)); +0>=a?spider_ResetList(c):spider_SelectElement(c,a-1);a=spider_AddElement(c);a.id=e;a.text=d;a.imageId=k;b.add({name:"",id:e});d=spider_ListIndex(c);do b.put({name:a.text},b.get(d)),d++;while(a=spider_NextElement(c));e++};h.RemoveItem=function(a){spider_ListSize(c)>a&&0<=a&&(spider_SelectElement(c,a),spider_DeleteElement(c),q(),r==a&&h.SetState(a))};h.ClearItems=function(){spider_ClearList(c);q();a.set("value","");r=-1};h.CountItems=function(){return spider_ListSize(c)};h.SetColor=function(b,c){C(h, +a.focusNode.parentNode,a.focusNode,b,c)};h.GetItemData=function(a){var b;return(b=spider_SelectElement(c,a))?b.data?b.data:0:0};h.SetItemData=function(a,b){var d;if(d=spider_SelectElement(c,a))d.data=b};h.GetItemText=function(a,b){var d;return(d=spider_SelectElement(c,a))?d.text:""};h.SetItemText=function(a,d,e){if(e=spider_SelectElement(c,a))e.text=d,a=b.get(a),a.name=d,b.put(a)};h.GetRequiredSize=function(){var a=$(k).css("fontSize")+" "+$(k).css("fontFamily"),a=z(h,a,"Hg");a.width=50;a.height+= +5;return a};h.Resize=function(b,c,d,e){t(k,b,c,d,e);b=u(a.domNode);x(a,0,0,d-b.x,e-b.y);"claro"==spider.gadgetTheme?$(a.focusNode).height(e-b.y-2):$(a.focusNode).height(e-b.y)};spider.gadget.register(h,8,k,a);h.Resize(f,g,l,p);return h.resultId};window.spider_ContainerGadget=function(d,f,g,l,p,m){var h=spider.gadget.objects.Allocate(d);"undefined"===typeof m&&(m=0);var e=new dijit.layout.ContentPane({style:"overflow: hidden; padding: 0px;",content:""}),c=document.createElement("div");e.placeAt(c); +m&1?$(c).addClass("sbContainerBorder"):m&4?$(c).addClass("sbContainerBorderSingle"):m&2?$(c).addClass("sbContainerBorderRaised"):m&8&&$(c).addClass("sbContainerBorderDouble");h.GetColor=function(b){return 2==b?h.backColor?h.backColor:-1:-1};h.SetColor=function(b,a){2==b&&($(c).css("background-color",spider_helper_ColorToHtml(a)),h.backColor=a)};h.GetHeight=function(b){return 1==b?B(h.id).width:c.clientHeight};h.GetWidth=function(b){return 1==b?B(h.id).width:c.clientWidth};h.Resize=function(b,a,d, +f){var g=u(c);t(c,b,a,d,f);x(e,0,0,d-g.x,f-g.y);e.resize()};spider.gadget.register(h,11,c,e);spider.window.gadgetList.push(e.domNode,spider.window.currentWindowId);h.Resize(f,g,l,p);spider.DojoAspect.after(e,"resize",function(b,a){n(h,15)});return h.resultId};window.spider_CountGadgetItems=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.CountItems?f.CountItems():0};window.spider_DateGadget=function(d,f,g,l,p,m,h,e){function c(a){a=spider_ReplaceString(a,"%yyyy","yyyy");a=spider_ReplaceString(a, +"%mm","MM");return a=spider_ReplaceString(a,"%dd","dd")}function b(a){return new Date(spider_Year(a),spider_Month(a)-1,spider_Day(a))}function a(a){return spider_Date(a.getFullYear(),a.getMonth()+1,a.getDate(),0,0,0)}"undefined"===typeof m&&(m="%yyyy/%mm/%dd");"undefined"===typeof h&&(h=spider_Date());"undefined"===typeof e&&(e=0);var k=spider.gadget.objects.Allocate(d),r,q=new dijit.form.DateTextBox({constraints:{min:new Date(1601,0,0),max:new Date(9999,0,0),datePattern:c(m)},onChange:function(){n(k, +9)}});$(q._buttonNode).css("height","100%");var w=document.createElement("div"),s=0;e&2&&(r=new dijit.form.CheckBox({onClick:function(){r.get("checked")?k.SetState(q.get("value")):k.SetState(0)}}),w.appendChild(r.domNode),s=21,$(q.domNode).css("margin-left",s));w.appendChild(q.domNode);k.Disable=function(a){E(k,q.focusNode.parentNode,q.focusNode,a)};k.GetText=function(){return e&2&&!1===r.get("checked")?"":q.get("displayedValue")};k.SetText=function(a){var b=q.get("value");q.attr("constraints").datePattern= +c(a);q.set("value",b)};k.GetState=function(){return e&2&&!1===r.get("checked")?0:a(q.get("value"))};k.SetState=function(a){if(e&2){var c=0===a;k.Disable(c);r.set("checked",!c)}0!==(e&2)&&0===a||q.set("value",b(a))};k.GetAttribute=function(b){switch(b){case 1:return a(q.attr("constraints").min);case 2:return a(q.attr("constraints").max)}return 0};k.SetAttribute=function(a,c){var d=q.attr("constraints");switch(a){case 1:d.min=b(c);q.attr("constraints",d);break;case 2:d.max=b(c),q.attr("constraints", +d)}};k.GetColor=function(a){switch(a){case 2:return k.backColor?k.backColor:-1;case 1:return k.frontColor?k.frontColor:-1}return-1};k.SetColor=function(a,b){C(k,q.focusNode.parentNode,q.focusNode,a,b)};k.GetRequiredSize=function(){var a=$(w).css("fontSize")+" "+$(w).css("fontFamily"),a=z(k,a,"Hg");a.width=60;a.height+=5;return a};k.Resize=function(a,b,c,d){t(w,a,b,c,d);a=u(q._popupStateNode);x(q,0,0,c-a.x-s,d-a.y);$(q.domNode).height(d-a.y);"claro"==spider.gadgetTheme?$(q.focusNode).height(d-a.y- +2):$(q.focusNode).height(d-a.y)};spider.gadget.register(k,21,w,q);k.SetState(h);k.Resize(f,g,l,p);return k.resultId};window.spider_DisableGadget=function(d,f){var g;if(g=spider.gadget.objects.Get(d))g.Disable?g.Disable(f):g.gadget instanceof dijit._WidgetBase&&g.gadget.set("disabled",f?!0:!1)};window.spider_EditorGadget=function(d,f,g,l,p,m){"undefined"===typeof m&&(m=0);var h=spider.gadget.objects.Allocate(d),e=new dijit.form.SimpleTextarea({style:"overflow: auto; resize: none;",intermediateChanges:!0, +onChange:function(){n(h,9)},onFocus:function(){spider.DigitFocus.focus(e.focusNode);n(h,7)},onBlur:function(){n(h,8)}});d=e.domNode;var c=document.createElement("div");c.appendChild(d);h.editor=e;m&2||$(e.focusNode).attr("wrap","off");m&1&&$(e.focusNode).attr("readOnly",!0);h.Disable=function(b){E(h,e.focusNode,e.focusNode,b)};h.GetText=function(){return e.get("value")};h.SetText=function(b){e.set("value","");e.set("value",b);e.textbox.scrollTop=e.textbox.scrollHeight};h.GetAttribute=function(b){switch(b){case 2:return"off"== +$(e.focusNode).attr("wrap")?0:1;case 1:return $(e.focusNode).attr("readOnly")?1:0}return 0};h.SetAttribute=function(b,a){switch(b){case 2:$(e.focusNode).attr("wrap",a?"":"off");break;case 1:$(e.focusNode).attr("readOnly",a?!0:!1)}};h.GetColor=function(b){switch(b){case 2:return h.backColor?h.backColor:-1;case 1:return h.frontColor?h.frontColor:-1}return-1};h.SetColor=function(b,a){C(h,e.focusNode,e.focusNode,b,a)};h.SetFont=function(b){G(e.focusNode,b)};h.Resize=function(b,a,d,f){t(c,b,a,d,f);b=u(e.focusNode); +x(e,0,0,d-b.x,f-b.y)};spider.gadget.register(h,22,c,e);h.Resize(f,g,l,p);return h.resultId};window.spider_FrameGadget=function(d,f,g,l,p,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d),c=document.createElement("fieldset");$(c).css("margin",0);$(c).addClass("sbFrameBorder");var b=document.createElement("div");b.appendChild(c);var a=document.createElement("legend");e.legend=a;e.GetText=function(){return a.innerHTML};e.SetText=function(b){a.innerHTML=b;""===b?c.hasChildNodes()&& +c.removeChild(a):c.appendChild(a)};e.SetFont=function(a){var c=u(b),d=parseInt($(e.div).css("left"),10),f=parseInt($(e.div).css("top"),10),g=$(b).width()+c.x,c=$(b).height()+c.y;G(b,a);e.Resize(d,f,g,c)};e.GetRequiredSize=function(){var a={width:0,height:0};$.each($(b).children(),function(b,c){a.width+=$(c).outerWidth(!0);a.height+=$(c).outerHeight(!0)});var d=u(c);a.width-=d.x;a.height-=d.y;return a};e.Resize=function(a,d,e,f){t(b,a,d,e,f);a=u(c);t(c,0,0,e-a.x,f-a.y)};e.SetText(m);spider.gadget.register(e, +7,b,c);e.Resize(f,g,l,p);return e.resultId};window.spider_FreeGadget=F;window.spider_GadgetHeight=L;window.spider_GadgetID=function(d){var f;return(f=spider.gadget.objects.Get(d))?f:null};window.spider_GadgetToolTip=function(d,f){var g;if(g=spider.gadget.objects.Get(d))g.tooltip||(g.tooltip=new dijit.Tooltip({connectId:g.div})),g.tooltip.set("label",f)};window.spider_GadgetType=function(d){if(d=spider.gadget.objects.Get(d))return d.type};window.spider_GadgetWidth=M;window.spider_GadgetX=N;window.spider_GadgetY= +O;window.spider_GetActiveGadget=function(){var d=-1,f;f=spider.DigitFocus.curNode;for(var g;!g&&f;)f.hasOwnProperty("spiderId")?g=f:(g=spider.DigitRegistry.byNode(f),f=f.parentElement?f.parentElement:null,g&&!g.hasOwnProperty("spiderId")&&(g=null));(f=g)&&f.hasOwnProperty("spiderId")&&(d=f.spiderId);return d};window.spider_GetGadgetAttribute=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&&g.GetAttribute?g.GetAttribute(f):0};window.spider_GetGadgetColor=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&& +g.GetColor?g.GetColor(f):0};window.spider_GetGadgetData=function(d){var f;return(f=spider.gadget.objects.Get(d))?f.userData:0};window.spider_GetGadgetItemAttribute=function(d,f,g,l){"undefined"===typeof l&&(l=-1);var p;return(p=spider.gadget.objects.Get(d))&&p.GetItemAttribute?p.GetItemAttribute(f,g,l):0};window.spider_GetGadgetItemData=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&&g.GetItemData?g.GetItemData(f):0};window.spider_GetGadgetItemState=function(d,f){var g;return(g=spider.gadget.objects.Get(d))&& +g.GetItemState?g.GetItemState(f):0};window.spider_GetGadgetItemText=function(d,f,g){"undefined"===typeof g&&(g=-1);var l;return(l=spider.gadget.objects.Get(d))&&l.GetItemText?l.GetItemText(f,g):""};window.spider_GetGadgetState=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.GetState?f.GetState():0};window.spider_GetGadgetText=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.GetText?f.GetText():""};window.spider_HideGadget=function(d,f){var g;(g=spider.gadget.objects.Get(d))&& +$(g.div).css("display",f?"none":"block")};window.spider_HyperLinkGadget=function(d,f,g,l,p,m,h,e){"undefined"===typeof e&&(e=0);var c=spider.gadget.objects.Allocate(d),b=document.createElement("a");b.innerHTML=m;b.href="";0===(e&1)&&$(b).css("text-decoration","none");$(b).hover(function(a){$(this).css("color",spider_helper_ColorToHtml("mouseenter"===a.type?h:c.frontColor))});$(b).on("click",function(a){a.preventDefault();a.stopPropagation();n(c,0)});var a=document.createElement("div"),k=document.createElement("span"); +k.className="sbVerticalCenter";a.appendChild(k);k.appendChild(b);c.GetText=function(){return b.innerHTML};c.SetText=function(a){b.innerHTML=a};c.GetColor=function(a){switch(a){case 2:return c.backColor?c.backColor:-1;case 1:return c.frontColor?c.frontColor:-1}return-1};c.SetColor=function(d,e){switch(d){case 2:$(a).css("background-color",spider_helper_ColorToHtml(e));c.backColor=e;break;case 1:b.style.color=spider_helper_ColorToHtml(e),c.frontColor=e}};c.GetRequiredSize=function(){var b=$(a).css("fontSize")+ +" "+$(a).css("fontFamily"),b=z(c,b,c.GetText());b.width+=16;b.height+=8;return b};c.Resize=function(b,c,d,e){t(a,b,c,d,e);$(k).width(d);$(k).height(e)};c.SetColor(1,0);spider.gadget.register(c,10,a,b);c.Resize(f,g,l,p);return c.resultId};window.spider_ImageGadget=function(d,f,g,l,p,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d),c=document.createElement("div"),b=document.createElement("canvas");b.style.width=l+"px";b.style.height=p+"px";put(c,b);h&2&&$(c).addClass("sbImageBorder"); +$(c).on({click:function(){n(e,0)},dblclick:function(){n(e,2)},mouseup:function(a){3===a.which&&1===a.originalEvent.detail&&n(e,1)}});e.GetState=function(){return e.image};e.SetState=function(a){a?(b.width!=a.width&&(b.width=a.width),b.height!=a.height&&(b.height=a.height),b.getContext("2d").drawImage(a,0,0)):(b.width=0,b.height=0);e.image=a};e.Resize=function(a,d,e,f){var g=u(c);b.style.width=e+"px";b.style.height=f+"px";t(c,a,d,e-g.x,f-g.y)};e.Free=function(){$(b).remove();b=null;c.parentNode&&$(c).remove()}; +spider.gadget.register(e,9,c,c);e.Resize(f,g,l,p);e.SetState(m);return e.resultId};window.spider_IsGadget=function(d){var f;return(f=spider.gadget.objects.Get(d))&&f.div.parentNode?1:0};window.spider_ListIconGadget=function(d,f,g,l,p,m,h,e){function c(a,b){for(var c=a;c<=b;c++)q.put({id:c})}function b(){for(var a=0;a=b?spider_ResetList(k):spider_SelectElement(k,b-1);b=spider_AddElement(k);b.text= +d;w&1&&(b.checkBox=new dijit.form.CheckBox({onClick:function(){n(a,9)}}));e&&(b.image=e);d=spider_ListIndex(k);q.add({id:spider_ListSize(k)-1});c(d,spider_ListSize(k)-1)};a.RemoveItem=function(b){var d=spider_ListSize(k);if(d>b&&0<=b){var e=a.GetState();e>b&&a.SetState(e-1);spider_SelectElement(k,b);spider_DeleteElement(k);q.remove(d-1);c(b,d-2)}};a.ClearItems=function(){spider_ClearList(k);q=new r;s.set("collection",q)};a.CountItems=function(){return spider_ListSize(k)};a.AddColumn=function(a,c, +d){v.splice(a,0,{field:"",index:0,label:c,width:d,sortable:!1,renderCell:function(a,b,c,d){b=spider_SelectElement(k,a.id);a=put("div");e&4||$(c).css("border","none");0===this.index&&(b.checkBox&&(c=put("div"),$(c).css("float","left"),$(c).css("padding-right","8px"),put(c,b.checkBox.domNode),a.appendChild(c)),b.image&&(c=put("div"),$(c).css("float","left"),$(c).css("padding-right","8px"),c.className=spider.image.GetCSS(b.image),a.appendChild(c)));c=put("div",spider_StringField(b.text,this.index+1, +spider_Chr(10)));$(c).css("white-space","nowrap");a.appendChild(c);return a}});b()};a.RemoveColumn=function(a){v.splice(a,1);b()};a.GetState=function(){var b=-1;if(a.previousSelection)b=a.previousSelection;else for(var c in s.selection){b=c;break}return+b};a.SetState=function(a){s.clearSelection();0<=a&&a=b?spider_ResetList(a):spider_SelectElement(a,b-1);spider_AddElement(a).text=c;b=spider_ListIndex(a);k.add({id:spider_ListSize(a)-1});e(b,spider_ListSize(a)-1)};c.RemoveItem=function(b){var d=spider_ListSize(a); +if(d>b&&0<=b){var f=c.GetState();f>b&&c.SetState(f-1);spider_SelectElement(a,b);spider_DeleteElement(a);k.remove(d-1);e(b,d-2)}};c.ClearItems=function(){h()};c.CountItems=function(){return spider_ListSize(a)};c.GetState=function(){var a=-1;if(c.previousSelection)a=c.previousSelection;else for(var b in r.selection){a=b;break}return+a};c.SetState=function(b){r.clearSelection();0<=b&&bc.oldValue?n(c,4):aa.get("maximum")?b=a.get("maximum"):b=d?spider_ResetList(c):spider_SelectElement(c,d-1);d=spider_AddElement(c);d.id=a;d.text=e;d.subLevel=g;f&&(d.image=f);f="";var h;spider_ListIndex(c);if(0a&&0<=a&&(a=spider_SelectElement(c,a),spider_DeleteElement(c),b.remove(a.id),q.set("selectedItems", +[]),s())};e.ClearItems=function(){for(var a=spider_ListSize(c),b=0;b=0 && v_row<1 && v_row!=settings$g__currentsection) { +spiderLine=12583096; +settings$f__showsection(v_row); +} +spiderLine=12583097; +} +spiderLine=12583099; +return 0; +} +function settings$f_handler_save() { +var v_confirm=""; +var v_current=""; +var v_new_=""; +spiderLine=12583101; +spiderLine=12583102; +v_current=spider_GetGadgetText_DEBUG(settings$g__incurrent); +spiderLine=12583103; +v_new_=spider_GetGadgetText_DEBUG(settings$g__innew); +spiderLine=12583104; +v_confirm=spider_GetGadgetText_DEBUG(settings$g__inconfirm); +spiderLine=12583106; +if (v_current==_S3 || v_new_==_S3 || v_confirm==_S3) { +spiderLine=12583107; +notify$f_toast(_S145,2,4000); +spiderLine=12583108; +if (1) return 0; +} +spiderLine=12583109; +spiderLine=12583110; +if (v_new_!=v_confirm) { +spiderLine=12583111; +notify$f_toast(_S146,2,4000); +spiderLine=12583112; +if (1) return 0; +} +spiderLine=12583113; +spiderLine=12583114; +if (spider_Len(v_new_)<8) { +spiderLine=12583115; +notify$f_toast(_S147,2,4000); +spiderLine=12583116; +if (1) return 0; +} +spiderLine=12583117; +spiderLine=12583119; +spider_DisableGadget_DEBUG(settings$g__btnsave,1); +spiderLine=12583123; +spider_HTTPRequest(1,_S148,_S149+spider_URLEncoder_DEBUG(v_current,2)+_S150+spider_URLEncoder_DEBUG(v_new_,2),settings$f__savecallback); +spiderLine=12583124; +return 0; +} +function settings$f__showsection(v_section) { +spiderLine=12583061; +spiderLine=12583062; +settings$f__hidesection(settings$g__currentsection); +spiderLine=12583063; +settings$g__currentsection=v_section; +spiderLine=12583064; +var sb_select6=v_section; +spiderLine=12583065; +if (sb_select6==0) { +spiderLine=12583066; +spider_HideGadget_DEBUG(settings$g__lblcurrent,0); +spiderLine=12583067; +spider_HideGadget_DEBUG(settings$g__incurrent,0); +spiderLine=12583068; +spider_HideGadget_DEBUG(settings$g__lblnew,0); +spiderLine=12583069; +spider_HideGadget_DEBUG(settings$g__innew,0); +spiderLine=12583070; +spider_HideGadget_DEBUG(settings$g__lblconfirm,0); +spiderLine=12583071; +spider_HideGadget_DEBUG(settings$g__inconfirm,0); +spiderLine=12583072; +spider_HideGadget_DEBUG(settings$g__btnsave,0); +} +spiderLine=12583074; +settings$f__drawpanel(); +spiderLine=12583075; +return 0; +} +function settings$f__hidesection(v_section) { +spiderLine=12583048; +spiderLine=12583049; +var sb_select5=v_section; +spiderLine=12583050; +if (sb_select5==0) { +spiderLine=12583051; +spider_HideGadget_DEBUG(settings$g__lblcurrent,1); +spiderLine=12583052; +spider_HideGadget_DEBUG(settings$g__incurrent,1); +spiderLine=12583053; +spider_HideGadget_DEBUG(settings$g__lblnew,1); +spiderLine=12583054; +spider_HideGadget_DEBUG(settings$g__innew,1); +spiderLine=12583055; +spider_HideGadget_DEBUG(settings$g__lblconfirm,1); +spiderLine=12583056; +spider_HideGadget_DEBUG(settings$g__inconfirm,1); +spiderLine=12583057; +spider_HideGadget_DEBUG(settings$g__btnsave,1); +} +spiderLine=12583059; +return 0; +} +function settings$f__drawpanel() { +var v_h=0; +var v_i=0; +var v_w=0; +var v_y=0; +var v_th=0; +spiderLine=12583019; +spiderLine=12583020; +if (!(spider_IsGadget_DEBUG(settings$g__panelcanvas))) { +spiderLine=12583020; +if (1) return 0; +} +spiderLine=12583020; +spiderLine=12583021; +if (!(spider_StartDrawing_DEBUG(spider_CanvasOutput_DEBUG(settings$g__panelcanvas)))) { +spiderLine=12583021; +if (1) return 0; +} +spiderLine=12583021; +spiderLine=12583023; +v_w=spider_OutputWidth_DEBUG(); +spiderLine=12583024; +v_h=spider_OutputHeight_DEBUG();;;; +spiderLine=12583027; +spider_Box_DEBUG(0,0,v_w,v_h,settings$g_color_panel_bg); +spiderLine=12583028; +spider_Box_DEBUG((v_w+-1),0,1,v_h,settings$g_color_sep); +spiderLine=12583030; +if (spider_IsFont_DEBUG(settings$g_panelfont)) { +spiderLine=12583030; +spider_DrawingFont_DEBUG(spider_FontID_DEBUG(settings$g_panelfont)); +} +spiderLine=12583030; +spiderLine=12583031; +v_th=spider_BankerRound(spider_TextHeight_DEBUG(_S31)); +spiderLine=12583033; +v_i=0; +for (;0>=v_i;v_i+=1) { +spiderLine=12583034; +v_y=(v_i*44); +spiderLine=12583035; +if (v_i==settings$g__currentsection) { +spiderLine=12583036; +spider_Box_DEBUG(0,v_y,(v_w+-1),44,settings$g_color_sel); +spiderLine=12583037; +spider_Box_DEBUG(0,v_y,3,44,settings$g_color_accent); +spiderLine=12583038; +} else if (v_i==settings$g__panelhover) { +spiderLine=12583039; +spider_Box_DEBUG(0,v_y,(v_w+-1),44,settings$g_color_hover); +} +spiderLine=12583040; +spiderLine=12583041; +spider_DrawingMode_DEBUG(1); +spiderLine=12583042; +spider_DrawText_DEBUG(14,(v_y+(((((-(v_th))+44))/2))),settings$a__SectionNames.array[v_i],settings$g_color_text); +spiderLine=12583043; +} +spiderLine=12583045; +spider_StopDrawing_DEBUG(); +spiderLine=12583046; +return 0; +} +function appmanager$f__closeinstalldialog() { +spiderLine=14680260; +spiderLine=14680261; +if (!(spider_IsWindow_DEBUG(appmanager$g__inputwin))) { +spiderLine=14680261; +if (1) return 0; +} +spiderLine=14680261; +spiderLine=14680262; +spider_UnbindGadgetEvent_DEBUG(appmanager$g__okbtn,appmanager$f_handler_inputok); +spiderLine=14680263; +spider_UnbindGadgetEvent_DEBUG(appmanager$g__cancelbtn,appmanager$f_handler_inputcancel); +spiderLine=14680264; +spider_UnbindEvent(4,appmanager$f_handler_inputcancel,appmanager$g__inputwin); +spiderLine=14680265; +spider_CloseWindow_DEBUG(appmanager$g__inputwin); +spiderLine=14680266; +appmanager$g__inputwin=0; +spiderLine=14680267; +return 0; +} +function appmanager$f__openinstalldialog() { +var v_x=0; +var v_y=0; +spiderLine=14680241; +spiderLine=14680242; +if (spider_IsWindow_DEBUG(appmanager$g__inputwin)) { +spiderLine=14680242; +if (1) return 0; +} +spiderLine=14680242; +spiderLine=14680244; +v_x=(spider_WindowX_DEBUG(appmanager$g_window)+90); +spiderLine=14680245; +v_y=(spider_WindowY_DEBUG(appmanager$g_window)+140); +spiderLine=14680248; +appmanager$g__inputwin=spider_OpenWindow_DEBUG(-1,v_x,v_y,340,100,_S159,24); +spiderLine=14680249; +spider_TextGadget_DEBUG(-1,10,14,320,18,_S160); +spiderLine=14680250; +appmanager$g__urlfield=spider_StringGadget_DEBUG(-1,10,34,320,26,_S3); +spiderLine=14680251; +appmanager$g__okbtn=spider_ButtonGadget_DEBUG(-1,10,68,150,24,_S161); +spiderLine=14680252; +appmanager$g__cancelbtn=spider_ButtonGadget_DEBUG(-1,170,68,160,24,_S29); +spiderLine=14680253; +spider_SetActiveGadget_DEBUG(appmanager$g__urlfield); +spiderLine=14680255; +spider_BindGadgetEvent_DEBUG(appmanager$g__okbtn,appmanager$f_handler_inputok); +spiderLine=14680256; +spider_BindGadgetEvent_DEBUG(appmanager$g__cancelbtn,appmanager$f_handler_inputcancel); +spiderLine=14680257; +spider_BindEvent_DEBUG(4,appmanager$f_handler_inputcancel,appmanager$g__inputwin); +spiderLine=14680258; +return 0; +} +function appmanager$f_open() { +spiderLine=14680139; +spiderLine=14680140; +if (spider_IsWindow_DEBUG(appmanager$g_window)) { +spiderLine=14680141; +spider_SetActiveWindow_DEBUG(appmanager$g_window); +spiderLine=14680141; +if (1) return 0; +} +spiderLine=14680142; +spiderLine=14680145; +appmanager$g_window=spider_OpenWindow_DEBUG(-1,160,100,520,380,_S39,56); +spiderLine=14680146; +spider_SetWindowColor_DEBUG(appmanager$g_window,appmanager$g_color_bg); +spiderLine=14680148; +appmanager$g__installbtn=spider_ButtonGadget_DEBUG(-1,4,6,100,28,_S155); +spiderLine=14680149; +appmanager$g__launchbtn=spider_ButtonGadget_DEBUG(-1,112,6,80,28,_S156); +spiderLine=14680150; +appmanager$g__uninstallbtn=spider_ButtonGadget_DEBUG(-1,200,6,90,28,_S157); +spiderLine=14680153; +appmanager$g__canvas=spider_CanvasGadget_DEBUG(-1,0,40,520,314); +spiderLine=14680156; +appmanager$g__statuslabel=spider_TextGadget_DEBUG(-1,4,358,512,18,_S3); +spiderLine=14680157; +spider_SetGadgetColor_DEBUG(appmanager$g__statuslabel,1,appmanager$g_color_dim); +spiderLine=14680158; +spider_SetGadgetColor_DEBUG(appmanager$g__statuslabel,2,appmanager$g_color_bg); +spiderLine=14680160; +spider_BindGadgetEvent_DEBUG(appmanager$g__installbtn,appmanager$f_handler_install); +spiderLine=14680161; +spider_BindGadgetEvent_DEBUG(appmanager$g__launchbtn,appmanager$f_handler_launch); +spiderLine=14680162; +spider_BindGadgetEvent_DEBUG(appmanager$g__uninstallbtn,appmanager$f_handler_uninstall); +spiderLine=14680163; +spider_BindGadgetEvent_DEBUG(appmanager$g__canvas,appmanager$f_handler_canvas); +spiderLine=14680164; +spider_BindEvent_DEBUG(7,appmanager$f_handler_resize,appmanager$g_window); +spiderLine=14680165; +spider_BindEvent_DEBUG(4,appmanager$f_handler_close,appmanager$g_window); +spiderLine=14680167; +desktop$f_register(_S39,appmanager$g_window,_S40); +spiderLine=14680168; +appmanager$f__updatebuttons(); +spiderLine=14680169; +appmanager$f__refresh(); +spiderLine=14680170; +return 0; +} +function appmanager$f_handler_launch() { +spiderLine=14680407; +spiderLine=14680408; +if (appmanager$g__selected<0 || !(spider_SelectElement_DEBUG(appmanager$t__Apps,appmanager$g__selected))) { +spiderLine=14680408; +if (1) return 0; +} +spiderLine=14680408; +spiderLine=14680409; +appruntime$f_launch(appmanager$t__Apps.current._ID,appmanager$t__Apps.current._Manifest,appmanager$t__Apps.current._Permissions); +spiderLine=14680410; +return 0; +} +function appmanager$f_handler_close() { +spiderLine=14680451; +spiderLine=14680452; +appmanager$f__closeinstalldialog(); +spiderLine=14680453; +spider_UnbindGadgetEvent_DEBUG(appmanager$g__installbtn,appmanager$f_handler_install); +spiderLine=14680454; +spider_UnbindGadgetEvent_DEBUG(appmanager$g__launchbtn,appmanager$f_handler_launch); +spiderLine=14680455; +spider_UnbindGadgetEvent_DEBUG(appmanager$g__uninstallbtn,appmanager$f_handler_uninstall); +spiderLine=14680456; +spider_UnbindGadgetEvent_DEBUG(appmanager$g__canvas,appmanager$f_handler_canvas); +spiderLine=14680457; +spider_UnbindEvent(7,appmanager$f_handler_resize,appmanager$g_window); +spiderLine=14680458; +spider_UnbindEvent(4,appmanager$f_handler_close,appmanager$g_window); +spiderLine=14680459; +desktop$f_unregister(appmanager$g_window); +spiderLine=14680460; +appmanager$g_window=0; +spiderLine=14680461; +return 0; +} +function appmanager$f__updatebuttons() { +spiderLine=14680232; +spiderLine=14680233; +spider_DisableGadget_DEBUG(appmanager$g__launchbtn,(appmanager$g__selected<0?1:0)); +spiderLine=14680234; +spider_DisableGadget_DEBUG(appmanager$g__uninstallbtn,(appmanager$g__selected<0?1:0)); +spiderLine=14680235; +return 0; +} +function appmanager$f__listcallback(v_success,v_datastring) { +var v_permcount=0; +var v_icon=""; +var v_i=0; +var v_j=0; +var v_n=""; +var v_maninode=0; +var v_root=0; +var v_permnode=0; +var v_item=0; +var v_count=0; +var v_total=0; +var v_perms=""; +spiderLine=14680270; +spiderLine=14680271; +if (!(spider_IsWindow_DEBUG(appmanager$g_window))) { +spiderLine=14680271; +if (1) return 0; +} +spiderLine=14680271; +spiderLine=14680273; +spider_ClearList_DEBUG(appmanager$t__Apps); +spiderLine=14680274; +appmanager$g__selected=-1; +spiderLine=14680276; +if (v_success && spider_ParseJSON_DEBUG(0,v_datastring)) { +spiderLine=14680277; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=14680278; +v_total=spider_JSONArraySize_DEBUG(v_root);; +spiderLine=14680281; +v_i=0; +for (;(v_total+-1)>=v_i;v_i+=1) { +spiderLine=14680282; +v_item=spider_GetJSONElement_DEBUG(v_root,v_i); +spiderLine=14680283; +v_maninode=spider_GetJSONMember_DEBUG(v_item,_S44); +spiderLine=14680285; +spider_AddElement_DEBUG(appmanager$t__Apps); +spiderLine=14680286; +appmanager$t__Apps.current._ID=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_item,_S45)); +spiderLine=14680288; +v_n=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S42)); +spiderLine=14680289; +if (v_n!=_S3) { +spiderLine=14680290; +appmanager$t__Apps.current._Name=v_n; +spiderLine=14680291; +} else { +spiderLine=14680291; +spiderLine=14680292; +appmanager$t__Apps.current._Name=appmanager$t__Apps.current._ID; +} +spiderLine=14680293; +spiderLine=14680296; +v_icon=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S46)); +spiderLine=14680302; +appmanager$t__Apps.current._Manifest=_S52+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S53))+_S54+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S42))+_S55+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S56))+_S57+spider_ReplaceString_DEBUG(v_icon,_S50,_S58)+_S59+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S60))+_S61; +spiderLine=14680305; +v_permnode=spider_GetJSONMember_DEBUG(v_item,_S47); +spiderLine=14680306; +v_permcount=spider_JSONArraySize_DEBUG(v_permnode);; +spiderLine=14680307; +v_perms=_S48; +spiderLine=14680308; +v_j=0; +for (;(v_permcount+-1)>=v_j;v_j+=1) { +spiderLine=14680309; +if (v_j>0) { +spiderLine=14680309; +v_perms=v_perms+_S49; +} +spiderLine=14680309; +spiderLine=14680310; +v_perms=v_perms+_S50+spider_GetJSONString_DEBUG(spider_GetJSONElement_DEBUG(v_permnode,v_j))+_S50; +spiderLine=14680311; +} +spiderLine=14680312; +appmanager$t__Apps.current._Permissions=v_perms+_S51; +spiderLine=14680316; +desktop$f_installthirdpartyapp(appmanager$t__Apps.current._ID,appmanager$t__Apps.current._Manifest,appmanager$t__Apps.current._Permissions,v_icon); +spiderLine=14680317; +} +spiderLine=14680318; +spider_FreeJSON_DEBUG(0); +spiderLine=14680320; +v_count=spider_ListSize_DEBUG(appmanager$t__Apps); +spiderLine=14680321; +if (v_count==1) { +spiderLine=14680322; +appmanager$f__status(_S162); +spiderLine=14680323; +} else { +spiderLine=14680323; +spiderLine=14680324; +appmanager$f__status(spider_Str(v_count)+_S163); +} +spiderLine=14680325; +spiderLine=14680326; +} else { +spiderLine=14680326; +spiderLine=14680327; +appmanager$f__status(_S164); +} +spiderLine=14680328; +spiderLine=14680330; +appmanager$f__drawlist(); +spiderLine=14680331; +appmanager$f__updatebuttons(); +spiderLine=14680332; +return 0; +} +function appmanager$f__installcallback(v_success,v_datastring) { +var v_err=""; +var v_root=0; +var v_appid=""; +spiderLine=14680334; +spiderLine=14680335; +if (!(spider_IsWindow_DEBUG(appmanager$g_window))) { +spiderLine=14680335; +if (1) return 0; +} +spiderLine=14680335; +spiderLine=14680336; +spider_DisableGadget_DEBUG(appmanager$g__installbtn,0); +spiderLine=14680338; +if (v_success && spider_ParseJSON_DEBUG(0,v_datastring)) { +spiderLine=14680339; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=14680340; +if (spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S26))) { +spiderLine=14680341; +v_appid=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S45)); +spiderLine=14680342; +spider_FreeJSON_DEBUG(0); +spiderLine=14680343; +notify$f_toast(_S165+v_appid,1,4000); +spiderLine=14680344; +appmanager$f__refresh(); +spiderLine=14680345; +if (1) return 0; +} +spiderLine=14680346; +spiderLine=14680347; +v_err=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S92)); +spiderLine=14680348; +spider_FreeJSON_DEBUG(0); +spiderLine=14680349; +notify$f_toast(v_err,3,4000); +spiderLine=14680350; +} else { +spiderLine=14680350; +spiderLine=14680351; +notify$f_toast(_S166,3,4000); +} +spiderLine=14680352; +spiderLine=14680353; +appmanager$f__status(_S167); +spiderLine=14680354; +return 0; +} +function appmanager$f__uninstallcallback(v_success,v_datastring) { +spiderLine=14680356; +spiderLine=14680357; +if (!(spider_IsWindow_DEBUG(appmanager$g_window))) { +spiderLine=14680357; +if (1) return 0; +} +spiderLine=14680357; +spiderLine=14680358; +if (v_success && spider_ParseJSON_DEBUG(0,v_datastring)) { +spiderLine=14680359; +if (spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(spider_JSONValue_DEBUG(0),_S26))) { +spiderLine=14680360; +spider_FreeJSON_DEBUG(0); +spiderLine=14680361; +notify$f_toast(_S168,1,4000); +spiderLine=14680362; +desktop$f_uninstallthirdpartyapp(appmanager$g__pendinguninstall); +spiderLine=14680363; +appmanager$g__pendinguninstall=_S3; +spiderLine=14680364; +appmanager$f__refresh(); +spiderLine=14680365; +if (1) return 0; +} +spiderLine=14680366; +spiderLine=14680367; +spider_FreeJSON_DEBUG(0); +} +spiderLine=14680368; +spiderLine=14680369; +notify$f_toast(_S169,3,4000); +spiderLine=14680370; +appmanager$g__pendinguninstall=_S3; +spiderLine=14680371; +appmanager$f__status(_S167); +spiderLine=14680372; +return 0; +} +function appmanager$f__status(v_msg) { +spiderLine=14680237; +spiderLine=14680238; +if (spider_IsGadget_DEBUG(appmanager$g__statuslabel)) { +spiderLine=14680238; +spider_SetGadgetText_DEBUG(appmanager$g__statuslabel,v_msg); +} +spiderLine=14680238; +spiderLine=14680239; +return 0; +} +function appmanager$f_handler_inputok() { +var v_url=""; +spiderLine=14680429; +spiderLine=14680430; +v_url=spider_Trim_DEBUG(spider_GetGadgetText_DEBUG(appmanager$g__urlfield)); +spiderLine=14680431; +if (v_url==_S3) { +spiderLine=14680431; +if (1) return 0; +} +spiderLine=14680431; +spiderLine=14680432; +appmanager$f__closeinstalldialog(); +spiderLine=14680433; +appmanager$f__status(_S176); +spiderLine=14680434; +spider_DisableGadget_DEBUG(appmanager$g__installbtn,1); +spiderLine=14680436; +spider_HTTPRequest(1,_S177,_S178+spider_URLEncoder_DEBUG(v_url,2),appmanager$f__installcallback); +spiderLine=14680437; +return 0; +} +function appmanager$f__douninstall(v_result) { +spiderLine=14680419; +spiderLine=14680420; +if (!(v_result) || appmanager$g__selected<0) { +spiderLine=14680420; +if (1) return 0; +} +spiderLine=14680420; +spiderLine=14680421; +if (!(spider_SelectElement_DEBUG(appmanager$t__Apps,appmanager$g__selected))) { +spiderLine=14680421; +if (1) return 0; +} +spiderLine=14680421; +spiderLine=14680422; +appmanager$g__pendinguninstall=appmanager$t__Apps.current._ID; +spiderLine=14680423; +appmanager$f__status(_S172+appmanager$t__Apps.current._ID+_S30); +spiderLine=14680426; +spider_HTTPRequest(1,_S173,_S174+spider_URLEncoder_DEBUG(appmanager$t__Apps.current._ID,2)+_S175,appmanager$f__uninstallcallback); +spiderLine=14680427; +return 0; +} +function appmanager$f__drawlist() { +var v_h=0; +var v_i=0; +var v_w=0; +var v_y=0; +var v_th=0; +var v_rowbg=0; +spiderLine=14680181; +spiderLine=14680182; +if (!(spider_IsGadget_DEBUG(appmanager$g__canvas))) { +spiderLine=14680182; +if (1) return 0; +} +spiderLine=14680182; +spiderLine=14680183; +if (!(spider_StartDrawing_DEBUG(spider_CanvasOutput_DEBUG(appmanager$g__canvas)))) { +spiderLine=14680183; +if (1) return 0; +} +spiderLine=14680183; +spiderLine=14680185; +v_w=spider_OutputWidth_DEBUG(); +spiderLine=14680186; +v_h=spider_OutputHeight_DEBUG(); +spiderLine=14680188; +spider_Box_DEBUG(0,0,v_w,v_h,appmanager$g_color_bg); +spiderLine=14680190; +if (spider_IsFont_DEBUG(appmanager$g_font_ui)) { +spiderLine=14680190; +spider_DrawingFont_DEBUG(spider_FontID_DEBUG(appmanager$g_font_ui)); +} +spiderLine=14680190; +spiderLine=14680191; +v_th=spider_BankerRound(spider_TextHeight_DEBUG(_S31)); +spiderLine=14680193; +spider_ResetList(appmanager$t__Apps); while (spider_NextElement(appmanager$t__Apps)) { +spiderLine=14680193; +spiderLine=14680194; +v_i=spider_ListIndex_DEBUG(appmanager$t__Apps); +spiderLine=14680195; +v_y=(v_i*48); +spiderLine=14680196; +if ((v_y+48)>v_h) { +spiderLine=14680196; +break; +} +spiderLine=14680196;; +spiderLine=14680199; +if (v_i==appmanager$g__selected) { +spiderLine=14680200; +v_rowbg=appmanager$g_color_sel; +spiderLine=14680201; +} else if (v_i==appmanager$g__hover) { +spiderLine=14680202; +v_rowbg=spider_RGB_DEBUG(40,40,58); +spiderLine=14680203; +} else if ((v_i%2)==0) { +spiderLine=14680204; +v_rowbg=appmanager$g_color_row_even; +spiderLine=14680205; +} else { +spiderLine=14680205; +spiderLine=14680206; +v_rowbg=appmanager$g_color_row_odd; +} +spiderLine=14680207; +spiderLine=14680209; +spider_Box_DEBUG(0,v_y,v_w,48,v_rowbg); +spiderLine=14680210; +if (v_i==appmanager$g__selected) { +spiderLine=14680210; +spider_Box_DEBUG(0,v_y,3,48,appmanager$g_color_accent); +} +spiderLine=14680210; +spiderLine=14680212; +spider_DrawingMode_DEBUG(1); +spiderLine=14680213; +spider_DrawText_DEBUG(14,((v_y-v_th)+23),appmanager$t__Apps.current._Name,appmanager$g_color_text); +spiderLine=14680215; +if (spider_IsFont_DEBUG(appmanager$g_font_small)) { +spiderLine=14680215; +spider_DrawingFont_DEBUG(spider_FontID_DEBUG(appmanager$g_font_small)); +} +spiderLine=14680215; +spiderLine=14680216; +spider_DrawText_DEBUG(14,(v_y+26),appmanager$t__Apps.current._ID,appmanager$g_color_dim); +spiderLine=14680217; +if (spider_IsFont_DEBUG(appmanager$g_font_ui)) { +spiderLine=14680217; +spider_DrawingFont_DEBUG(spider_FontID_DEBUG(appmanager$g_font_ui)); +} +spiderLine=14680217; +spiderLine=14680219; +spider_Box_DEBUG(0,(v_y+47),v_w,1,appmanager$g_color_sep); +spiderLine=14680220; +} +spiderLine=14680222; +if (spider_ListSize_DEBUG(appmanager$t__Apps)==0) { +spiderLine=14680223; +spider_DrawingMode_DEBUG(1); +spiderLine=14680224; +if (spider_IsFont_DEBUG(appmanager$g_font_ui)) { +spiderLine=14680224; +spider_DrawingFont_DEBUG(spider_FontID_DEBUG(appmanager$g_font_ui)); +} +spiderLine=14680224; +spiderLine=14680226; +spider_DrawText_DEBUG(((((v_w-spider_TextWidth_DEBUG(_S158)))/2)),((((v_h-v_th))/2)),_S158,appmanager$g_color_dim); +} +spiderLine=14680227; +spiderLine=14680229; +spider_StopDrawing_DEBUG(); +spiderLine=14680230; +return 0; +} +function appmanager$f_handler_inputcancel() { +spiderLine=14680439; +spiderLine=14680440; +appmanager$f__closeinstalldialog(); +spiderLine=14680441; +return 0; +} +function appmanager$f_handler_install() { +spiderLine=14680403; +spiderLine=14680404; +appmanager$f__openinstalldialog(); +spiderLine=14680405; +return 0; +} +function appmanager$f_handler_resize() { +var v_h=0; +var v_w=0; +spiderLine=14680443; +spiderLine=14680444; +v_w=spider_WindowWidth_DEBUG(appmanager$g_window); +spiderLine=14680445; +v_h=spider_WindowHeight_DEBUG(appmanager$g_window); +spiderLine=14680446; +spider_ResizeGadget_DEBUG(appmanager$g__canvas,0,40,v_w,(v_h+-66)); +spiderLine=14680447; +spider_ResizeGadget_DEBUG(appmanager$g__statuslabel,4,(v_h+-22),(v_w+-8),18); +spiderLine=14680448; +appmanager$f__drawlist(); +spiderLine=14680449; +return 0; +} +function appmanager$f__refresh() { +spiderLine=14680173; +spiderLine=14680174; +appmanager$f__status(_S129); +spiderLine=14680175; +spider_ClearList_DEBUG(appmanager$t__Apps); +spiderLine=14680176; +appmanager$g__selected=-1; +spiderLine=14680177; +appmanager$f__drawlist(); +spiderLine=14680178; +spider_HTTPRequest(0,_S41,_S3,appmanager$f__listcallback); +spiderLine=14680179; +return 0; +} +function appmanager$f_handler_uninstall() { +spiderLine=14680412; +spiderLine=14680413; +if (appmanager$g__selected<0 || !(spider_SelectElement_DEBUG(appmanager$t__Apps,appmanager$g__selected))) { +spiderLine=14680413; +if (1) return 0; +} +spiderLine=14680413; +spiderLine=14680416; +notify$f_confirm(_S170+appmanager$t__Apps.current._Name,_S171,appmanager$f__douninstall); +spiderLine=14680417; +return 0; +} +function appmanager$f_handler_canvas() { +var v_my=0; +var v_row=0; +var v_etype=0; +spiderLine=14680375; +spiderLine=14680376; +v_etype=spider_EventType(); +spiderLine=14680377; +v_my=spider_GetGadgetAttribute_DEBUG(appmanager$g__canvas,3); +spiderLine=14680378; +v_row=((v_my/48)|0); +spiderLine=14680380; +var sb_select8=v_etype; +spiderLine=14680381; +if (sb_select8==65539) { +spiderLine=14680382; +if (v_row>=spider_ListSize_DEBUG(appmanager$t__Apps)) { +spiderLine=14680382; +v_row=-1; +} +spiderLine=14680382; +spiderLine=14680383; +if (v_row!=appmanager$g__hover) { +spiderLine=14680384; +appmanager$g__hover=v_row; +spiderLine=14680384; +appmanager$f__drawlist(); +} +spiderLine=14680385; +spiderLine=14680387; +} else if (sb_select8==65538) { +spiderLine=14680388; +if (appmanager$g__hover!=-1) { +spiderLine=14680388; +appmanager$g__hover=-1; +spiderLine=14680388; +appmanager$f__drawlist(); +} +spiderLine=14680388; +spiderLine=14680390; +} else if (sb_select8==65541) { +spiderLine=14680391; +if (v_row>=0 && v_row=0 && v_row=0) { +spiderLine=9437444; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437444; +if (1) return 0; +} +spiderLine=9437444; +spiderLine=9437445; +appruntime$g__ps_id=v_id; +spiderLine=9437445; +appruntime$g__ps_kmid=v_kmid; +spiderLine=9437446; +spider_HTTPRequest(0,_S11+spider_URLEncoder_DEBUG(v_path,2),_S3,appruntime$f__statcallback); +spiderLine=9437447; +return 0; +} +function appruntime$f_handler_close() { +spiderLine=9437577; +spiderLine=9437578; +if (!(appruntime$f__findbywindow(spider_EventWindow_DEBUG()))) { +spiderLine=9437578; +if (1) return 0; +} +spiderLine=9437578; +spiderLine=9437579; +appruntime$f__remove(appruntime$t_Instances.current._InstanceID); +spiderLine=9437580; +return 0; +} +function appruntime$f__listcallback(v_success,v_datastring) { +var v_kmid=""; +var v_id=0; +spiderLine=9437480;;; +spiderLine=9437483; +if (appruntime$g__pl_id<0) { +spiderLine=9437483; +if (1) return 0; +} +spiderLine=9437483; +spiderLine=9437484; +v_id=appruntime$g__pl_id; +spiderLine=9437484; +v_kmid=appruntime$g__pl_kmid; +spiderLine=9437485; +appruntime$g__pl_id=-1; +spiderLine=9437485; +appruntime$g__pl_kmid=_S3; +spiderLine=9437486; +appruntime$f__sendresponse(v_id,v_kmid,v_success,v_datastring); +spiderLine=9437487; +return 0; +} +function appruntime$f__dolist(v_id,v_kmid,v_path) { +spiderLine=9437437; +spiderLine=9437438; +if (appruntime$g__pl_id>=0) { +spiderLine=9437438; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437438; +if (1) return 0; +} +spiderLine=9437438; +spiderLine=9437439; +appruntime$g__pl_id=v_id; +spiderLine=9437439; +appruntime$g__pl_kmid=v_kmid; +spiderLine=9437440; +spider_HTTPRequest(0,_S10+spider_URLEncoder_DEBUG(v_path,2),_S3,appruntime$f__listcallback); +spiderLine=9437441; +return 0; +} +function appruntime$f__confirmcallback(v_result) { +var v_kmid=""; +var v_id=0; +var v_boolstr=""; +spiderLine=9437558;;;; +spiderLine=9437562; +if (appruntime$g__pc_id<0) { +spiderLine=9437562; +if (1) return 0; +} +spiderLine=9437562; +spiderLine=9437563; +v_id=appruntime$g__pc_id; +spiderLine=9437563; +v_kmid=appruntime$g__pc_kmid; +spiderLine=9437564; +appruntime$g__pc_id=-1; +spiderLine=9437564; +appruntime$g__pc_kmid=_S3; +spiderLine=9437566; +v_boolstr=_S116; +spiderLine=9437567; +if (v_result) { +spiderLine=9437567; +v_boolstr=_S117; +} +spiderLine=9437567; +spiderLine=9437568; +appruntime$f__sendresponse(v_id,v_kmid,1,v_boolstr); +spiderLine=9437569; +return 0; +} +function appruntime$f__dowrite(v_id,v_kmid,v_path,v_content) { +spiderLine=9437461; +spiderLine=9437462; +if (appruntime$g__pw_id>=0) { +spiderLine=9437462; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437462; +if (1) return 0; +} +spiderLine=9437462; +spiderLine=9437463; +appruntime$g__pw_id=v_id; +spiderLine=9437463; +appruntime$g__pw_kmid=v_kmid; +spiderLine=9437464; +spider_HTTPRequest(1,_S24,_S13+spider_URLEncoder_DEBUG(v_path,2)+_S25+spider_URLEncoder_DEBUG(v_content,2),appruntime$f__writecallback); +spiderLine=9437465; +return 0; +} +function appruntime$f_init() { +spiderLine=9437237; +window._kumos_rt = { instances: {} }; +window.addEventListener('message', function(e) { + var inst; + for (var id in window._kumos_rt.instances) { + inst = window._kumos_rt.instances[id]; + if (inst && inst.frameEl && inst.frameEl.contentWindow === e.source) { + if (typeof e.data === 'string') { + appruntime$f__dispatch(inst.id, e.data); + } + return; + } + } +}); +spiderLine=9437251; +return 0; +} +function appruntime$f__writecallback(v_success,v_datastring) { +var v_kmid=""; +var v_id=0; +var v_ok=0; +spiderLine=9437539;;;; +spiderLine=9437543; +if (appruntime$g__pw_id<0) { +spiderLine=9437543; +if (1) return 0; +} +spiderLine=9437543; +spiderLine=9437544; +v_id=appruntime$g__pw_id; +spiderLine=9437544; +v_kmid=appruntime$g__pw_kmid; +spiderLine=9437545; +appruntime$g__pw_id=-1; +spiderLine=9437545; +appruntime$g__pw_kmid=_S3; +spiderLine=9437547; +if (!(v_success)) { +spiderLine=9437547; +appruntime$f__sendresponse(v_id,v_kmid,0,_S114); +spiderLine=9437547; +if (1) return 0; +} +spiderLine=9437547; +spiderLine=9437549; +if (spider_ParseJSON_DEBUG(0,v_datastring)) { +spiderLine=9437550; +v_ok=spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(spider_JSONValue_DEBUG(0),_S26)); +spiderLine=9437551; +spider_FreeJSON_DEBUG(0); +spiderLine=9437552; +appruntime$f__sendresponse(v_id,v_kmid,v_ok,_S3); +spiderLine=9437553; +} else { +spiderLine=9437553; +spiderLine=9437554; +appruntime$f__sendresponse(v_id,v_kmid,0,_S115); +} +spiderLine=9437555; +spiderLine=9437556; +return 0; +} +function appruntime$f__dodelete(v_id,v_kmid,v_path) { +spiderLine=9437473; +spiderLine=9437474; +if (appruntime$g__psr_id>=0) { +spiderLine=9437474; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437474; +if (1) return 0; +} +spiderLine=9437474; +spiderLine=9437475; +appruntime$g__psr_id=v_id; +spiderLine=9437475; +appruntime$g__psr_kmid=_S109+v_kmid; +spiderLine=9437476; +spider_HTTPRequest(0,_S11+spider_URLEncoder_DEBUG(v_path,2),_S3,appruntime$f__statforreadcallback); +spiderLine=9437477; +return 0; +} +function appruntime$f__domkdir(v_id,v_kmid,v_path) { +spiderLine=9437467; +spiderLine=9437468; +if (appruntime$g__pw_id>=0) { +spiderLine=9437468; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437468; +if (1) return 0; +} +spiderLine=9437468; +spiderLine=9437469; +appruntime$g__pw_id=v_id; +spiderLine=9437469; +appruntime$g__pw_kmid=v_kmid; +spiderLine=9437470; +spider_HTTPRequest(1,_S12,_S13+spider_URLEncoder_DEBUG(v_path,2),appruntime$f__writecallback); +spiderLine=9437471; +return 0; +} +function appruntime$f__hasperm(v_id,v_token) { +spiderLine=9437314; +spiderLine=9437315; +if (!(appruntime$f__findbyid(v_id))) { +spiderLine=9437315; +if (1) return 0; +} +spiderLine=9437315; +spiderLine=9437316; +if (1) return (spider_FindString_DEBUG(appruntime$t_Instances.current._Perms,_S50+v_token+_S50)>0?1:0); +spiderLine=9437317; +return 0; +} +function appruntime$f__findbywindow(v_win) { +spiderLine=9437307; +spiderLine=9437308; +spider_ResetList(appruntime$t_Instances); while (spider_NextElement(appruntime$t_Instances)) { +spiderLine=9437308; +spiderLine=9437309; +if (appruntime$t_Instances.current._Window==v_win) { +spiderLine=9437309; +if (1) return 1; +} +spiderLine=9437309; +spiderLine=9437310; +} +spiderLine=9437311; +if (1) return 0; +spiderLine=9437312; +return 0; +} +function appruntime$f__storagepath(v_id,v_relpath) { +var v_base=""; +spiderLine=9437332;; +spiderLine=9437334; +if (!(appruntime$f__findbyid(v_id))) { +spiderLine=9437334; +if (1) return _S3; +} +spiderLine=9437334; +spiderLine=9437335; +v_base=_S75+appruntime$t_Instances.current._AppID+_S19; +spiderLine=9437336; +if (v_relpath==_S3 || v_relpath==_S19) { +spiderLine=9437336; +if (1) return v_base; +} +spiderLine=9437336; +spiderLine=9437337; +if (spider_Left(v_relpath,1)==_S19) { +spiderLine=9437337; +v_relpath=spider_Mid(v_relpath,2); +} +spiderLine=9437337; +spiderLine=9437338; +if (1) return v_base+v_relpath; +spiderLine=9437339; +return ""; +} +function appruntime$f_handler_resize() { +spiderLine=9437572; +spiderLine=9437573; +if (!(appruntime$f__findbywindow(spider_EventWindow_DEBUG()))) { +spiderLine=9437573; +if (1) return 0; +} +spiderLine=9437573; +spiderLine=9437574; +spider_ResizeGadget_DEBUG(appruntime$t_Instances.current._View,0,0,spider_WindowWidth_DEBUG(appruntime$t_Instances.current._Window),spider_WindowHeight_DEBUG(appruntime$t_Instances.current._Window)); +spiderLine=9437575; +return 0; +} +function appruntime$f__remove(v_id) { +spiderLine=9437341; +spiderLine=9437342; +if (!(appruntime$f__findbyid(v_id))) { +spiderLine=9437342; +if (1) return 0; +} +spiderLine=9437342; +delete window._kumos_rt.instances[v_id]; +spiderLine=9437344; +spider_UnbindEvent(7,appruntime$f_handler_resize,appruntime$t_Instances.current._Window); +spiderLine=9437345; +spider_UnbindEvent(4,appruntime$f_handler_close,appruntime$t_Instances.current._Window); +spiderLine=9437346; +desktop$f_unregister(appruntime$t_Instances.current._Window); +spiderLine=9437347; +spider_DeleteElement_DEBUG(appruntime$t_Instances); +spiderLine=9437348; +return 0; +} +function appruntime$f__readcallback(v_success,v_datastring) { +var v_kmid=""; +var v_id=0; +spiderLine=9437530;;; +spiderLine=9437533; +if (appruntime$g__pr_id<0) { +spiderLine=9437533; +if (1) return 0; +} +spiderLine=9437533; +spiderLine=9437534; +v_id=appruntime$g__pr_id; +spiderLine=9437534; +v_kmid=appruntime$g__pr_kmid; +spiderLine=9437535; +appruntime$g__pr_id=-1; +spiderLine=9437535; +appruntime$g__pr_kmid=_S3; +spiderLine=9437536; +appruntime$f__sendresponse(v_id,v_kmid,v_success,v_datastring); +spiderLine=9437537; +return 0; +} +function appruntime$f__doread(v_id,v_kmid,v_fileid) { +spiderLine=9437455; +spiderLine=9437456; +if (appruntime$g__pr_id>=0) { +spiderLine=9437456; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437456; +if (1) return 0; +} +spiderLine=9437456; +spiderLine=9437457; +appruntime$g__pr_id=v_id; +spiderLine=9437457; +appruntime$g__pr_kmid=v_kmid; +spiderLine=9437458; +spider_HTTPRequest(0,_S23+spider_Str(v_fileid),_S3,appruntime$f__readcallback); +spiderLine=9437459; +return 0; +} +function appruntime$f__sendresponse(v_id,v_kmid,v_success,v_datastring) { +spiderLine=9437319; +var inst = window._kumos_rt.instances[v_id]; +if (!inst || !inst.frameEl) return; +var resp = { kmid: v_kmid, success: !!v_success }; +if (v_success) { + try { resp.data = JSON.parse(v_datastring); } + catch(e) { resp.data = v_datastring || null; } +} else { + resp.error = v_datastring || 'Error'; +} +try { inst.frameEl.contentWindow.postMessage(JSON.stringify(resp), '*'); } catch(e) {} +spiderLine=9437330; +return 0; +} +function appruntime$f__statforreadcallback(v_success,v_datastring) { +var v_kmid=""; +var v_id=0; +var v_fileid=0; +var v_tag=""; +var v_root=0; +var v_isdelete=0; +var v_isdir=0; +spiderLine=9437498;;;;;;;; +spiderLine=9437502; +if (appruntime$g__psr_id<0) { +spiderLine=9437502; +if (1) return 0; +} +spiderLine=9437502; +spiderLine=9437503; +v_id=appruntime$g__psr_id; +spiderLine=9437504; +v_tag=appruntime$g__psr_kmid; +spiderLine=9437505; +appruntime$g__psr_id=-1; +spiderLine=9437505; +appruntime$g__psr_kmid=_S3; +spiderLine=9437507; +v_isdelete=(spider_Left(v_tag,4)==_S109?1:0); +spiderLine=9437508; +if (v_isdelete) { +spiderLine=9437508; +v_kmid=spider_Mid(v_tag,5); +spiderLine=9437508; +} else { +spiderLine=9437508; +spiderLine=9437508; +v_kmid=v_tag; +} +spiderLine=9437508; +spiderLine=9437510; +if (!(v_success)) { +spiderLine=9437510; +appruntime$f__sendresponse(v_id,v_kmid,0,_S110); +spiderLine=9437510; +if (1) return 0; +} +spiderLine=9437510; +spiderLine=9437511; +if (!(spider_ParseJSON_DEBUG(0,v_datastring))) { +spiderLine=9437511; +appruntime$f__sendresponse(v_id,v_kmid,0,_S111); +spiderLine=9437511; +if (1) return 0; +} +spiderLine=9437511; +spiderLine=9437513; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=9437514; +v_isdir=spider_GetJSONInteger_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S112)); +spiderLine=9437515; +v_fileid=spider_GetJSONInteger_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S53)); +spiderLine=9437516; +spider_FreeJSON_DEBUG(0); +spiderLine=9437518; +if (v_fileid<=0) { +spiderLine=9437518; +appruntime$f__sendresponse(v_id,v_kmid,0,_S110); +spiderLine=9437518; +if (1) return 0; +} +spiderLine=9437518; +spiderLine=9437520; +if (v_isdelete) { +spiderLine=9437521; +if (appruntime$g__pw_id>=0) { +spiderLine=9437521; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437521; +if (1) return 0; +} +spiderLine=9437521; +spiderLine=9437522; +appruntime$g__pw_id=v_id; +spiderLine=9437522; +appruntime$g__pw_kmid=v_kmid; +spiderLine=9437523; +spider_HTTPRequest(1,_S14,_S15+spider_Str(v_fileid),appruntime$f__writecallback); +spiderLine=9437524; +} else { +spiderLine=9437524; +spiderLine=9437525; +if (v_isdir) { +spiderLine=9437525; +appruntime$f__sendresponse(v_id,v_kmid,0,_S113); +spiderLine=9437525; +if (1) return 0; +} +spiderLine=9437525; +spiderLine=9437526; +appruntime$f__doread(v_id,v_kmid,v_fileid); +} +spiderLine=9437527; +spiderLine=9437528; +return 0; +} +function appruntime$f__dispatch(v_id,v_rawmsg) { +var v_kmid=""; +var v_title_=""; +var v_path=""; +var v_msg=""; +var v_args=0; +var v_root=0; +var v_action=""; +var v_msgtype=""; +var v_content=""; +var v_ttype=0; +spiderLine=9437355;;;;;;;;;;; +spiderLine=9437359; +if (!(appruntime$f__findbyid(v_id))) { +spiderLine=9437359; +if (1) return 0; +} +spiderLine=9437359; +spiderLine=9437360; +if (!(spider_ParseJSON_DEBUG(0,v_rawmsg))) { +spiderLine=9437360; +if (1) return 0; +} +spiderLine=9437360; +spiderLine=9437362; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=9437363; +v_kmid=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S76)); +spiderLine=9437364; +v_action=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S77)); +spiderLine=9437365; +v_args=spider_GetJSONMember_DEBUG(v_root,_S78); +spiderLine=9437367; +if (v_kmid==_S3) { +spiderLine=9437367; +spider_FreeJSON_DEBUG(0); +spiderLine=9437367; +if (1) return 0; +} +spiderLine=9437367; +spiderLine=9437369; +v_path=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_args,_S79)); +spiderLine=9437370; +v_content=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_args,_S80)); +spiderLine=9437371; +v_title_=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_args,_S81)); +spiderLine=9437372; +v_msg=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_args,_S82)); +spiderLine=9437373; +v_msgtype=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_args,_S83)); +spiderLine=9437374; +spider_FreeJSON_DEBUG(0); +spiderLine=9437376; +var sb_select4=v_action; +spiderLine=9437378; +if (sb_select4==_S84) { +spiderLine=9437379; +appruntime$f__findbyid(v_id); +spiderLine=9437380; +appruntime$f__sendresponse(v_id,v_kmid,1,_S85+spider_ReplaceString_DEBUG(appruntime$t_Instances.current._AppID,_S50,_S58)+_S61); +spiderLine=9437382; +} else if (sb_select4==_S86) { +spiderLine=9437383; +appruntime$f__findbyid(v_id); +spiderLine=9437384; +spider_SetWindowTitle_DEBUG(appruntime$t_Instances.current._Window,v_title_); +spiderLine=9437385; +appruntime$f__sendresponse(v_id,v_kmid,1,_S3); +spiderLine=9437387; +} else if (sb_select4==_S87) { +spiderLine=9437388; +appruntime$f__sendresponse(v_id,v_kmid,1,_S3); +setTimeout(function(){ appruntime$f__closebyid(v_id); }, 50); +spiderLine=9437391; +} else if (sb_select4==_S88) { +spiderLine=9437392; +if (!(appruntime$f__hasperm(v_id,_S89))) { +spiderLine=9437392; +appruntime$f__sendresponse(v_id,v_kmid,0,_S90); +spiderLine=9437392; +if (1) return 0; +} +spiderLine=9437392; +spiderLine=9437393; +v_ttype=0; +spiderLine=9437394; +if (v_msgtype==_S26) { +spiderLine=9437394; +v_ttype=1; +spiderLine=9437395; +} else if (v_msgtype==_S91) { +spiderLine=9437395; +v_ttype=2; +spiderLine=9437396; +} else if (v_msgtype==_S92) { +spiderLine=9437396; +v_ttype=3; +} +spiderLine=9437397; +spiderLine=9437398; +notify$f_toast(v_msg,v_ttype,4000); +spiderLine=9437399; +appruntime$f__sendresponse(v_id,v_kmid,1,_S3); +spiderLine=9437401; +} else if (sb_select4==_S93) { +spiderLine=9437402; +if (!(appruntime$f__hasperm(v_id,_S89))) { +spiderLine=9437402; +appruntime$f__sendresponse(v_id,v_kmid,0,_S90); +spiderLine=9437402; +if (1) return 0; +} +spiderLine=9437402; +spiderLine=9437403; +if (appruntime$g__pc_id>=0) { +spiderLine=9437403; +appruntime$f__sendresponse(v_id,v_kmid,0,_S94); +spiderLine=9437403; +if (1) return 0; +} +spiderLine=9437403; +spiderLine=9437404; +appruntime$g__pc_id=v_id; +spiderLine=9437404; +appruntime$g__pc_kmid=v_kmid; +spiderLine=9437405; +notify$f_confirm(v_title_,v_msg,appruntime$f__confirmcallback); +spiderLine=9437407; +} else if (sb_select4==_S95) { +spiderLine=9437407; +appruntime$f__dolist(v_id,v_kmid,appruntime$f__storagepath(v_id,v_path)); +spiderLine=9437408; +} else if (sb_select4==_S96) { +spiderLine=9437408; +appruntime$f__dostat(v_id,v_kmid,appruntime$f__storagepath(v_id,v_path)); +spiderLine=9437409; +} else if (sb_select4==_S97) { +spiderLine=9437409; +appruntime$f__dostatforread(v_id,v_kmid,appruntime$f__storagepath(v_id,v_path)); +spiderLine=9437410; +} else if (sb_select4==_S98) { +spiderLine=9437410; +appruntime$f__dowrite(v_id,v_kmid,appruntime$f__storagepath(v_id,v_path),v_content); +spiderLine=9437411; +} else if (sb_select4==_S99) { +spiderLine=9437411; +appruntime$f__domkdir(v_id,v_kmid,appruntime$f__storagepath(v_id,v_path)); +spiderLine=9437412; +} else if (sb_select4==_S100) { +spiderLine=9437412; +appruntime$f__dodelete(v_id,v_kmid,appruntime$f__storagepath(v_id,v_path)); +spiderLine=9437414; +} else if (sb_select4==_S101) { +spiderLine=9437415; +if (!(appruntime$f__hasperm(v_id,_S102))) { +spiderLine=9437415; +appruntime$f__sendresponse(v_id,v_kmid,0,_S103); +spiderLine=9437415; +if (1) return 0; +} +spiderLine=9437415; +spiderLine=9437416; +appruntime$f__dolist(v_id,v_kmid,v_path); +spiderLine=9437418; +} else if (sb_select4==_S104) { +spiderLine=9437419; +if (!(appruntime$f__hasperm(v_id,_S102))) { +spiderLine=9437419; +appruntime$f__sendresponse(v_id,v_kmid,0,_S103); +spiderLine=9437419; +if (1) return 0; +} +spiderLine=9437419; +spiderLine=9437420; +appruntime$f__dostat(v_id,v_kmid,v_path); +spiderLine=9437422; +} else if (sb_select4==_S102) { +spiderLine=9437423; +if (!(appruntime$f__hasperm(v_id,_S102))) { +spiderLine=9437423; +appruntime$f__sendresponse(v_id,v_kmid,0,_S103); +spiderLine=9437423; +if (1) return 0; +} +spiderLine=9437423; +spiderLine=9437424; +appruntime$f__dostatforread(v_id,v_kmid,v_path); +spiderLine=9437426; +} else if (sb_select4==_S105) { +spiderLine=9437427; +if (!(appruntime$f__hasperm(v_id,_S105))) { +spiderLine=9437427; +appruntime$f__sendresponse(v_id,v_kmid,0,_S106); +spiderLine=9437427; +if (1) return 0; +} +spiderLine=9437427; +spiderLine=9437428; +appruntime$f__dowrite(v_id,v_kmid,v_path,v_content); +spiderLine=9437430; +} else { +spiderLine=9437430; +spiderLine=9437431; +appruntime$f__sendresponse(v_id,v_kmid,0,_S107+v_action); +} +spiderLine=9437434; +return 0; +} +function appruntime$f__dostatforread(v_id,v_kmid,v_path) { +spiderLine=9437449; +spiderLine=9437450; +if (appruntime$g__psr_id>=0) { +spiderLine=9437450; +appruntime$f__sendresponse(v_id,v_kmid,0,_S108); +spiderLine=9437450; +if (1) return 0; +} +spiderLine=9437450; +spiderLine=9437451; +appruntime$g__psr_id=v_id; +spiderLine=9437451; +appruntime$g__psr_kmid=v_kmid; +spiderLine=9437452; +spider_HTTPRequest(0,_S11+spider_URLEncoder_DEBUG(v_path,2),_S3,appruntime$f__statforreadcallback); +spiderLine=9437453; +return 0; +} +function appruntime$f_launch(v_appid,v_manifestjson,v_permissions) { +var v_id=0; +var v_h=0; +var v_view=0; +var v_n=""; +var v_w=0; +var v_win=0; +var v_src=""; +var v_count=0; +var v_appname=""; +spiderLine=9437254;;;;;;;;;; +spiderLine=9437258; +v_appname=v_appid; +spiderLine=9437259; +if (spider_ParseJSON_DEBUG(0,v_manifestjson)) { +spiderLine=9437260; +v_n=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(spider_JSONValue_DEBUG(0),_S42)); +spiderLine=9437261; +if (v_n!=_S3) { +spiderLine=9437261; +v_appname=v_n; +} +spiderLine=9437261; +spiderLine=9437262; +spider_FreeJSON_DEBUG(0); +} +spiderLine=9437263; +spiderLine=9437265; +v_count=spider_ListSize_DEBUG(appruntime$t_Instances); +spiderLine=9437266; +v_w=640; +spiderLine=9437267; +v_h=480; +spiderLine=9437268; +v_win=spider_OpenWindow_DEBUG(-1,((((v_count%8))*24)+80),((((v_count%8))*24)+80),v_w,v_h,v_appname,56); +spiderLine=9437269; +v_view=spider_WebGadget_DEBUG(-1,0,0,v_w,v_h,_S72); +spiderLine=9437270; +v_src=_S73+v_appid+_S74; +spiderLine=9437271; +v_id=appruntime$g__nextid; +spiderLine=9437272; +appruntime$g__nextid=(appruntime$g__nextid+1); +(function(){ + var frames = document.querySelectorAll('iframe[src="about:blank"]:not([data-kumos-instance])'); + var f = frames[frames.length - 1]; + if (!f) return; + f.setAttribute('data-kumos-instance', String(v_id)); + // No allow-same-origin -> cross-origin isolation even from same host. + f.setAttribute('sandbox', 'allow-scripts allow-forms allow-modals allow-downloads allow-pointer-lock'); + window._kumos_rt.instances[v_id] = { id: v_id, frameEl: f, appId: v_appid }; + f.src = v_src; +})(); +spiderLine=9437285; +spider_AddElement_DEBUG(appruntime$t_Instances); +spiderLine=9437286; +appruntime$t_Instances.current._InstanceID=v_id; +spiderLine=9437287; +appruntime$t_Instances.current._Window=v_win; +spiderLine=9437288; +appruntime$t_Instances.current._View=v_view; +spiderLine=9437289; +appruntime$t_Instances.current._AppID=v_appid; +spiderLine=9437290; +appruntime$t_Instances.current._Perms=v_permissions; +spiderLine=9437292; +spider_BindEvent_DEBUG(7,appruntime$f_handler_resize,v_win); +spiderLine=9437293; +spider_BindEvent_DEBUG(4,appruntime$f_handler_close,v_win); +spiderLine=9437295; +desktop$f_register(v_appname,v_win,_S40); +spiderLine=9437296; +return 0; +} +function general$f_init() { +spiderLine=3145761; +spiderLine=3145762; +idb$f_init(_S6,1,_S7,general$f_idbcallback); +spiderLine=3145763; +return 0; +} +function general$f_checkcallback(v_success,v_response) { +var v_authenticated=0; +var v_username=""; +var v_root=0; +spiderLine=3145731;;;; +spiderLine=3145735; +if (v_success) { +spiderLine=3145736; +if (spider_ParseJSON_DEBUG(0,v_response)) { +spiderLine=3145737; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=3145738; +v_authenticated=spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S1)); +spiderLine=3145739; +if (v_authenticated) { +spiderLine=3145740; +v_username=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S2)); +} +spiderLine=3145741; +spiderLine=3145742; +spider_FreeJSON_DEBUG(0); +} +spiderLine=3145743; +} +spiderLine=3145744; +spiderLine=3145746; +if (v_authenticated && v_username!=_S3) { +spiderLine=3145747; +desktop$f_open(v_username); +spiderLine=3145748; +} else { +spiderLine=3145748; +spiderLine=3145749; +login$f_open(); +} +spiderLine=3145750; +spiderLine=3145751; +return 0; +} +function general$f_idbcallback(v_success,v_datastring) { +spiderLine=3145753; +spiderLine=3145754; +if (v_success) { +spiderLine=3145755; +spider_HTTPRequest(0,_S4,_S3,general$f_checkcallback); +spiderLine=3145756; +} else { +spiderLine=3145756; +spiderLine=3145757; +spider.debug.Print(_S5+v_datastring); +} +spiderLine=3145758; +spiderLine=3145759; +return 0; +} +function fs$f__readservercallback(v_success,v_datastring) { +spiderLine=5243084; +spiderLine=5243085; +if (v_success) { +spiderLine=5243086; +fs$g__r_content=v_datastring; +spiderLine=5243087; +filecache$f_cache(fs$g__r_id,fs$g__r_path,v_datastring,fs$f__readcachestorecallback); +spiderLine=5243088; +} else { +spiderLine=5243088; +fs$g__r_cb(0, v_datastring); +} +spiderLine=5243090; +spiderLine=5243091; +return 0; +} +function fs$f__readexistscallback(v_success,v_datastring) { +spiderLine=5243067; +spiderLine=5243068; +spider.debug.Print(_S20+spider_Str(v_success)+_S21+v_datastring); +spiderLine=5243069; +if (v_success && v_datastring==_S22) { +spiderLine=5243071; +filecache$f_read_(fs$g__r_id,fs$f__readcachedcallback); +spiderLine=5243072; +} else { +spiderLine=5243072; +spiderLine=5243074; +spider_HTTPRequest(0,_S23+fs$g__r_id,_S3,fs$f__readservercallback); +} +spiderLine=5243075; +spiderLine=5243076; +return 0; +} +function fs$f_stat(v_path,p_callback) { +spiderLine=5242908; +spiderLine=5242909; +spider_HTTPRequest(0,_S11+spider_URLEncoder_DEBUG(v_path,2),_S3,p_callback); +spiderLine=5242910; +return 0; +} +function fs$f_getfilepart(v_path) { +var v_last=0; +spiderLine=5243043; +spiderLine=5243044; +v_last=fs$f__findlastslash(v_path); +spiderLine=5243045; +if (v_last==0) { +spiderLine=5243045; +if (1) return v_path; +} +spiderLine=5243045; +spiderLine=5243046; +if (1) return spider_Mid(v_path,(v_last+1)); +spiderLine=5243047; +return ""; +} +function fs$f_sync(p_callback) { +spiderLine=5242955; +var _cb = p_callback; +var _db = window._kumos_idb; +if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + +// Collect dirty entries from file_meta +var tx = _db.transaction(['file_meta'], 'readonly'); +var store = tx.objectStore('file_meta'); +var req = store.openCursor(); +var dirty = []; + +req.onsuccess = function(ev) { + var cursor = ev.target.result; + if (cursor) { + try { + var meta = JSON.parse(cursor.value); + if (meta.dirty) dirty.push({ id: String(cursor.key), path: meta.path }); + } catch(e) {} + cursor.continue(); + } +}; + +tx.oncomplete = function() { + if (dirty.length === 0) { + if (_cb) _cb(1, JSON.stringify({ synced: 0, failed: 0 })); + return; + } + + var synced = 0, failed = 0, total = dirty.length; + + function markClean(id, onDone) { + var wtx = _db.transaction(['file_meta'], 'readwrite'); + var ws = wtx.objectStore('file_meta'); + var gr = ws.get(id); + gr.onsuccess = function(ev) { + var m = {}; + try { m = JSON.parse(ev.target.result || '{}'); } catch(e) {} + m.dirty = false; + ws.put(JSON.stringify(m), id); + }; + wtx.oncomplete = onDone; + wtx.onerror = onDone; + } + + function syncNext(i) { + if (i >= total) { + if (_cb) _cb(failed === 0 ? 1 : 0, + JSON.stringify({ synced: synced, failed: failed })); + return; + } + var entry = dirty[i]; + + // Read content from IDB + var rtx = _db.transaction(['file_content'], 'readonly'); + var rreq = rtx.objectStore('file_content').get(entry.id); + + rreq.onsuccess = function(ev) { + var content = ev.target.result !== undefined ? String(ev.target.result) : ''; + + // POST to server + fetch('/api/fs/write', { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + body: 'path=' + encodeURIComponent(entry.path) + + '&content=' + encodeURIComponent(content) + }) + .then(function(r) { return r.json(); }) + .then(function(json) { + if (json.success) { + markClean(entry.id, function() { synced++; syncNext(i + 1); }); + } else { + failed++; syncNext(i + 1); + } + }) + .catch(function() { failed++; syncNext(i + 1); }); + }; + + rreq.onerror = function() { failed++; syncNext(i + 1); }; + } + + syncNext(0); +}; + +tx.onerror = function(e) { + if (_cb) _cb(0, e.target.error ? e.target.error.message : 'sync scan failed'); +}; +spiderLine=5243041; +return 0; +} +function fs$f_list(v_path,p_callback) { +spiderLine=5242902; +spiderLine=5242903; +spider_HTTPRequest(0,_S10+spider_URLEncoder_DEBUG(v_path,2),_S3,p_callback); +spiderLine=5242904; +return 0; +} +function fs$f__writecachecallback(v_success,v_datastring) { +spiderLine=5243100; +spiderLine=5243101; +if (fs$g__w_cb) { +fs$g__w_cb(v_success, v_datastring); +} +spiderLine=5243103; +spiderLine=5243104; +if (v_success) { +spiderLine=5243105; +spider_HTTPRequest(1,_S24,_S13+spider_URLEncoder_DEBUG(fs$g__w_path,2)+_S25+spider_URLEncoder_DEBUG(fs$g__w_content,2),fs$f__writeservercallback); +} +spiderLine=5243106; +spiderLine=5243107; +return 0; +} +function fs$f_getpathpart(v_path) { +var v_last=0; +spiderLine=5243049; +spiderLine=5243050; +v_last=fs$f__findlastslash(v_path); +spiderLine=5243051; +if (v_last==0) { +spiderLine=5243051; +if (1) return _S19; +} +spiderLine=5243051; +spiderLine=5243052; +if (1) return spider_Left(v_path,v_last); +spiderLine=5243053; +return ""; +} +function fs$f__readcachestorecallback(v_success,v_datastring) { +var v_content=""; +spiderLine=5243093; +spiderLine=5243094; +v_content=fs$g__r_content; +spiderLine=5243095; +if (fs$g__r_cb) { +fs$g__r_cb(1, v_content); +} +spiderLine=5243097; +spiderLine=5243098; +return 0; +} +function fs$f__readcachedcallback(v_success,v_datastring) { +spiderLine=5243078; +spiderLine=5243079; +if (fs$g__r_cb) { +fs$g__r_cb(v_success, v_datastring); +} +spiderLine=5243081; +spiderLine=5243082; +return 0; +} +function fs$f__findlastslash(v_path) { +var v_last=0; +var v_pos=0; +spiderLine=5243057;;; +spiderLine=5243059; +v_pos=spider_FindString_DEBUG(v_path,_S19); +while (v_pos>0) { +spiderLine=5243061; +v_last=v_pos; +spiderLine=5243062; +v_pos=spider_FindString_DEBUG(v_path,_S19,(v_pos+1)); +spiderLine=5243063; +} +il_wend17:; +spiderLine=5243064; +if (1) return v_last; +spiderLine=5243065; +return 0; +} +function fs$f_read_(v_fileid,v_path,p_callback) { +spiderLine=5242917; +spiderLine=5242918; +fs$g__r_id=v_fileid; +spiderLine=5242919; +fs$g__r_path=v_path; +spiderLine=5242920; +fs$g__r_cb=p_callback; +spiderLine=5242921; +filecache$f_exists(v_fileid,fs$f__readexistscallback); +spiderLine=5242922; +return 0; +} +function fs$f__writeservercallback(v_success,v_datastring) { +spiderLine=5243109; +spiderLine=5243110; +if (v_success) { +spiderLine=5243111; +if (spider_ParseJSON_DEBUG(0,v_datastring)) { +spiderLine=5243112; +if (spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(spider_JSONValue_DEBUG(0),_S26))) { +spiderLine=5243113; +filecache$f_markclean(fs$g__w_id,0); +} +spiderLine=5243114; +spiderLine=5243115; +spider_FreeJSON_DEBUG(0); +} +spiderLine=5243116; +} +spiderLine=5243117; +spiderLine=5243118; +return 0; +} +function fs$f_write(v_fileid,v_path,v_content,p_callback) { +spiderLine=5242927; +spiderLine=5242928; +fs$g__w_id=v_fileid; +spiderLine=5242929; +fs$g__w_path=v_path; +spiderLine=5242930; +fs$g__w_content=v_content; +spiderLine=5242931; +fs$g__w_cb=p_callback; +spiderLine=5242932; +filecache$f_write(v_fileid,v_content,fs$f__writecachecallback); +spiderLine=5242933; +return 0; +} +function fs$f_move(v_fileid,v_newparentid,v_newname,p_callback) { +spiderLine=5242950; +spiderLine=5242951; +spider_HTTPRequest(1,_S16,_S15+v_fileid+_S17+v_newparentid+_S18+spider_URLEncoder_DEBUG(v_newname,2),p_callback); +spiderLine=5242952; +return 0; +} +function fs$f_delete_(v_fileid,p_callback) { +spiderLine=5242943; +spiderLine=5242944; +filecache$f_evict(v_fileid,0); +spiderLine=5242945; +spider_HTTPRequest(1,_S14,_S15+v_fileid,p_callback); +spiderLine=5242946; +return 0; +} +function fs$f_mkdir(v_path,p_callback) { +spiderLine=5242937; +spiderLine=5242938; +spider_HTTPRequest(1,_S12,_S13+spider_URLEncoder_DEBUG(v_path,2),p_callback); +spiderLine=5242939; +return 0; +} +function texteditor$f__confirmclosecallback(v_result) { +spiderLine=10485893; +spiderLine=10485894; +if (v_result && texteditor$g__closingslot>=0) { +spiderLine=10485895; +texteditor$f__remove(texteditor$g__closingslot); +} +spiderLine=10485896; +spiderLine=10485897; +texteditor$g__closingslot=-1; +spiderLine=10485898; +return 0; +} +function texteditor$f__save(v_slot) { +var v_content=""; +spiderLine=10485853; +spiderLine=10485854; +if (!(spider_IsWindow_DEBUG(texteditor$a__Windows.array[v_slot]))) { +spiderLine=10485854; +if (1) return 0; +} +spiderLine=10485854; +spiderLine=10485855; +if (texteditor$a__Saving.array[v_slot]) { +spiderLine=10485855; +if (1) return 0; +} +spiderLine=10485855; +spiderLine=10485856; +v_content=spider_GetGadgetText_DEBUG(texteditor$a__Editors.array[v_slot]); +spiderLine=10485857; +texteditor$a__Saving.array[v_slot]=1; +spiderLine=10485858; +spider_DisableGadget_DEBUG(texteditor$a__SaveBtns.array[v_slot],1); +spiderLine=10485859; +fs$f_write(texteditor$a__FileIDs.array[v_slot],texteditor$a__Paths.array[v_slot],v_content,texteditor$f__savecallback); +spiderLine=10485860; +return 0; +} +function texteditor$f_open(v_fileid,v_path) { +var v_slot=0; +var v_editor=0; +var v_h=0; +var v_w=0; +var v_savebtn=0; +var v_win=0; +spiderLine=10485794; +spiderLine=10485795; +if (texteditor$g__count>=16) { +spiderLine=10485796; +notify$f_toast(_S118,2,4000); +spiderLine=10485797; +if (1) return 0; +} +spiderLine=10485798; +spiderLine=10485800; +v_slot=texteditor$g__count; +spiderLine=10485801; +v_w=600; +spiderLine=10485802; +v_h=400; +spiderLine=10485805; +v_win=spider_OpenWindow_DEBUG(-1,((v_slot*20)+120),((v_slot*20)+60),v_w,v_h,fs$f_getfilepart(v_path),56); +spiderLine=10485807; +v_savebtn=spider_ButtonGadget_DEBUG(-1,5,3,80,29,_S119); +spiderLine=10485808; +v_editor=spider_EditorGadget_DEBUG(-1,0,35,v_w,(v_h+-35)); +spiderLine=10485810; +texteditor$a__Windows.array[v_slot]=v_win; +spiderLine=10485811; +texteditor$a__Editors.array[v_slot]=v_editor; +spiderLine=10485812; +texteditor$a__SaveBtns.array[v_slot]=v_savebtn; +spiderLine=10485813; +texteditor$a__FileIDs.array[v_slot]=v_fileid; +spiderLine=10485814; +texteditor$a__Paths.array[v_slot]=v_path; +spiderLine=10485815; +texteditor$a__Dirty.array[v_slot]=0; +spiderLine=10485816; +texteditor$g__count=(texteditor$g__count+1); +spiderLine=10485818; +spider_BindGadgetEvent_DEBUG(v_savebtn,texteditor$f_handler_save); +spiderLine=10485819; +spider_BindGadgetEvent_DEBUG(v_editor,texteditor$f_handler_change); +spiderLine=10485820; +spider_BindEvent_DEBUG(7,texteditor$f_handler_resize,v_win); +spiderLine=10485821; +spider_BindEvent_DEBUG(4,texteditor$f_handler_close,v_win); +spiderLine=10485823; +desktop$f_register(fs$f_getfilepart(v_path),v_win,_S120); +spiderLine=10485825; +texteditor$g__loading_slot=v_slot; +spiderLine=10485826; +fs$f_read_(v_fileid,v_path,texteditor$f__readcallback); +spiderLine=10485827; +return 0; +} +function texteditor$f_handler_change() { +var v_slot=0; +spiderLine=10485945; +spiderLine=10485946; +v_slot=texteditor$f__findbyeditor(spider_EventGadget_DEBUG()); +spiderLine=10485947; +if (v_slot>=0 && !(texteditor$a__Dirty.array[v_slot])) { +spiderLine=10485948; +texteditor$f__setdirty(v_slot,1); +} +spiderLine=10485949; +spiderLine=10485950; +return 0; +} +function texteditor$f__savecallback(v_success,v_datastring) { +var v_i=0; +spiderLine=10485915;; +spiderLine=10485917; +v_i=0; +for (;(texteditor$g__count+-1)>=v_i;v_i+=1) { +spiderLine=10485918; +if (texteditor$a__Saving.array[v_i]) { +spiderLine=10485919; +texteditor$a__Saving.array[v_i]=0; +spiderLine=10485920; +spider_DisableGadget_DEBUG(texteditor$a__SaveBtns.array[v_i],0); +spiderLine=10485921; +if (v_success) { +spiderLine=10485922; +texteditor$f__setdirty(v_i,0); +spiderLine=10485923; +} else { +spiderLine=10485923; +spiderLine=10485924; +notify$f_toast(_S122+fs$f_getfilepart(texteditor$a__Paths.array[v_i]),3,4000); +} +spiderLine=10485925; +spiderLine=10485926; +break; +} +spiderLine=10485927; +spiderLine=10485928; +} +spiderLine=10485929; +return 0; +} +function texteditor$f_handler_close() { +var v_slot=0; +var v_win=0; +spiderLine=10485952; +spiderLine=10485953; +v_win=spider_EventWindow_DEBUG(); +spiderLine=10485954; +v_slot=texteditor$f__findbywindow(v_win); +spiderLine=10485955; +if (v_slot<0) { +spiderLine=10485955; +if (1) return 0; +} +spiderLine=10485955; +spiderLine=10485957; +if (texteditor$a__Dirty.array[v_slot]) { +spiderLine=10485958; +texteditor$g__closingslot=v_slot; +spiderLine=10485961; +notify$f_confirm(_S123,_S124+fs$f_getfilepart(texteditor$a__Paths.array[v_slot])+_S125,texteditor$f__confirmclosecallback); +spiderLine=10485962; +} else { +spiderLine=10485962; +spiderLine=10485963; +texteditor$f__remove(v_slot); +} +spiderLine=10485964; +spiderLine=10485965; +return 0; +} +function texteditor$f__findbyeditor(v_editor) { +var v_i=0; +spiderLine=10485838;; +spiderLine=10485840; +v_i=0; +for (;(texteditor$g__count+-1)>=v_i;v_i+=1) { +spiderLine=10485841; +if (texteditor$a__Editors.array[v_i]==v_editor) { +spiderLine=10485841; +if (1) return v_i; +} +spiderLine=10485841; +spiderLine=10485842; +} +spiderLine=10485843; +if (1) return -1; +spiderLine=10485844; +return 0; +} +function texteditor$f__findbywindow(v_window) { +var v_i=0; +spiderLine=10485830;; +spiderLine=10485832; +v_i=0; +for (;(texteditor$g__count+-1)>=v_i;v_i+=1) { +spiderLine=10485833; +if (texteditor$a__Windows.array[v_i]==v_window) { +spiderLine=10485833; +if (1) return v_i; +} +spiderLine=10485833; +spiderLine=10485834; +} +spiderLine=10485835; +if (1) return -1; +spiderLine=10485836; +return 0; +} +function texteditor$f_handler_resize() { +var v_slot=0; +var v_win=0; +spiderLine=10485932; +spiderLine=10485933; +v_win=spider_EventWindow_DEBUG(); +spiderLine=10485934; +v_slot=texteditor$f__findbywindow(v_win); +spiderLine=10485935; +if (v_slot<0) { +spiderLine=10485935; +if (1) return 0; +} +spiderLine=10485935; +spiderLine=10485937; +spider_ResizeGadget_DEBUG(texteditor$a__Editors.array[v_slot],0,35,spider_WindowWidth_DEBUG(v_win),(spider_WindowHeight_DEBUG(v_win)+-35)); +spiderLine=10485938; +return 0; +} +function texteditor$f_handler_save() { +var v_slot=0; +spiderLine=10485940; +spiderLine=10485941; +v_slot=texteditor$f__findbywindow(spider_EventWindow_DEBUG()); +spiderLine=10485942; +if (v_slot>=0) { +spiderLine=10485942; +texteditor$f__save(v_slot); +} +spiderLine=10485942; +spiderLine=10485943; +return 0; +} +function texteditor$f__remove(v_slot) { +var v_i=0; +spiderLine=10485862; +spiderLine=10485863; +spider_UnbindGadgetEvent_DEBUG(texteditor$a__SaveBtns.array[v_slot],texteditor$f_handler_save); +spiderLine=10485864; +spider_UnbindGadgetEvent_DEBUG(texteditor$a__Editors.array[v_slot],texteditor$f_handler_change); +spiderLine=10485865; +spider_UnbindEvent(7,texteditor$f_handler_resize,texteditor$a__Windows.array[v_slot]); +spiderLine=10485866; +spider_UnbindEvent(4,texteditor$f_handler_close,texteditor$a__Windows.array[v_slot]); +spiderLine=10485867; +desktop$f_unregister(texteditor$a__Windows.array[v_slot]);; +spiderLine=10485870; +v_i=v_slot; +for (;(texteditor$g__count+-2)>=v_i;v_i+=1) { +spiderLine=10485871; +texteditor$a__Windows.array[v_i]=texteditor$a__Windows.array[(v_i+1)]; +spiderLine=10485872; +texteditor$a__Editors.array[v_i]=texteditor$a__Editors.array[(v_i+1)]; +spiderLine=10485873; +texteditor$a__SaveBtns.array[v_i]=texteditor$a__SaveBtns.array[(v_i+1)]; +spiderLine=10485874; +texteditor$a__FileIDs.array[v_i]=texteditor$a__FileIDs.array[(v_i+1)]; +spiderLine=10485875; +texteditor$a__Paths.array[v_i]=texteditor$a__Paths.array[(v_i+1)]; +spiderLine=10485876; +texteditor$a__Dirty.array[v_i]=texteditor$a__Dirty.array[(v_i+1)]; +spiderLine=10485877; +texteditor$a__Saving.array[v_i]=texteditor$a__Saving.array[(v_i+1)]; +spiderLine=10485878; +} +spiderLine=10485879; +texteditor$a__Windows.array[(texteditor$g__count+-1)]=0; +spiderLine=10485880; +texteditor$a__Editors.array[(texteditor$g__count+-1)]=0; +spiderLine=10485881; +texteditor$a__SaveBtns.array[(texteditor$g__count+-1)]=0; +spiderLine=10485882; +texteditor$a__FileIDs.array[(texteditor$g__count+-1)]=_S3; +spiderLine=10485883; +texteditor$a__Paths.array[(texteditor$g__count+-1)]=_S3; +spiderLine=10485884; +texteditor$a__Dirty.array[(texteditor$g__count+-1)]=0; +spiderLine=10485885; +texteditor$a__Saving.array[(texteditor$g__count+-1)]=0; +spiderLine=10485886; +texteditor$g__count=(texteditor$g__count+-1); +spiderLine=10485888; +if (texteditor$g__loading_slot==v_slot) { +spiderLine=10485888; +texteditor$g__loading_slot=-1; +} +spiderLine=10485888; +spiderLine=10485889; +if (texteditor$g__closingslot==v_slot) { +spiderLine=10485889; +texteditor$g__closingslot=-1; +} +spiderLine=10485889; +spiderLine=10485890; +return 0; +} +function texteditor$f__readcallback(v_success,v_datastring) { +var v_slot=0; +spiderLine=10485901; +spiderLine=10485902; +if (texteditor$g__loading_slot<0) { +spiderLine=10485902; +if (1) return 0; +} +spiderLine=10485902; +spiderLine=10485903; +v_slot=texteditor$g__loading_slot; +spiderLine=10485904; +texteditor$g__loading_slot=-1; +spiderLine=10485905; +if (!(spider_IsWindow_DEBUG(texteditor$a__Windows.array[v_slot]))) { +spiderLine=10485905; +if (1) return 0; +} +spiderLine=10485905; +spiderLine=10485906; +if (v_success) { +spiderLine=10485907; +spider_SetGadgetText_DEBUG(texteditor$a__Editors.array[v_slot],v_datastring); +spiderLine=10485908; +texteditor$f__setdirty(v_slot,0); +spiderLine=10485909; +} else { +spiderLine=10485909; +spiderLine=10485910; +spider_SetGadgetText_DEBUG(texteditor$a__Editors.array[v_slot],_S3); +spiderLine=10485911; +texteditor$f__setdirty(v_slot,1); +} +spiderLine=10485912; +spiderLine=10485913; +return 0; +} +function texteditor$f__setdirty(v_slot,v_dirty) { +var v_title=""; +spiderLine=10485846; +spiderLine=10485847; +texteditor$a__Dirty.array[v_slot]=v_dirty; +spiderLine=10485848; +v_title=fs$f_getfilepart(texteditor$a__Paths.array[v_slot]); +spiderLine=10485849; +if (v_dirty) { +spiderLine=10485849; +v_title=_S121+v_title; +} +spiderLine=10485849; +spiderLine=10485850; +spider_SetWindowTitle_DEBUG(texteditor$a__Windows.array[v_slot],v_title); +spiderLine=10485851; +return 0; +} +function login$f_handler_connectbutton() { +var v_password=""; +var v_username=""; +spiderLine=8388646; +spiderLine=8388647; +v_username=spider_GetGadgetText_DEBUG(login$g_usernameinput); +spiderLine=8388648; +v_password=spider_GetGadgetText_DEBUG(login$g_passwordinput); +spiderLine=8388650; +if (v_username==_S3 || v_password==_S3) { +spiderLine=8388651; +notify$f_toast(_S67,3,4000); +spiderLine=8388652; +if (1) return 0; +} +spiderLine=8388653; +spiderLine=8388655; +spider_HTTPRequest(1,_S68,_S69+spider_URLEncoder_DEBUG(v_username,2)+_S70+spider_URLEncoder_DEBUG(v_password,2),login$f_handler_login); +spiderLine=8388656; +return 0; +} +function login$f_open() { +spiderLine=8388625; +spiderLine=8388626; +login$g_window=spider_OpenWindow_DEBUG(-1,0,0,400,165,_S3,513); +spiderLine=8388628; +login$g_usernamelabel=spider_TextGadget_DEBUG(-1,30,33,100,20,_S64); +spiderLine=8388629; +login$g_usernameinput=spider_StringGadget_DEBUG(-1,120,30,250,20,_S3); +spiderLine=8388630; +login$g_passwordlabel=spider_TextGadget_DEBUG(-1,30,73,100,20,_S65); +spiderLine=8388631; +login$g_passwordinput=spider_StringGadget_DEBUG(-1,120,70,250,20,_S3,1); +spiderLine=8388632; +login$g_connectbutton=spider_ButtonGadget_DEBUG(-1,30,110,340,25,_S66); +spiderLine=8388633; +spider_SetActiveGadget_DEBUG(login$g_usernameinput); +spiderLine=8388635; +spider_BindGadgetEvent_DEBUG(login$g_connectbutton,login$f_handler_connectbutton); +spiderLine=8388636; +spider_BindEvent_DEBUG(21,login$f_handler_browserresize); +spiderLine=8388637; +return 0; +} +function login$f_handler_browserresize() { +var v__height=0; +var v__width=0; +spiderLine=8388640; +spiderLine=8388641; +v__width=spider_DesktopWidth_DEBUG(0); +spiderLine=8388642; +v__height=spider_DesktopHeight_DEBUG(0); +spiderLine=8388643; +spider_ResizeWindow_DEBUG(login$g_window,spider_BankerRound((((v__width+-400))*0.5)),spider_BankerRound((((v__height+-165))*0.5)),-65535,-65535); +spiderLine=8388644; +return 0; +} +function login$f_handler_login(v_success,v_result,v_userdata) { +var v_username=""; +var v_ok=0; +var v_root=0; +spiderLine=8388658;;;; +spiderLine=8388662; +if (v_success) { +spiderLine=8388663; +if (spider_ParseJSON_DEBUG(0,v_result)) { +spiderLine=8388664; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=8388665; +v_ok=spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S26)); +spiderLine=8388666; +if (v_ok) { +spiderLine=8388667; +v_username=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S2)); +spiderLine=8388668; +spider_UnbindGadgetEvent_DEBUG(login$g_connectbutton,login$f_handler_connectbutton); +spiderLine=8388669; +spider_UnbindEvent(21,login$f_handler_browserresize); +spiderLine=8388670; +spider_CloseWindow_DEBUG(login$g_window); +spiderLine=8388671; +desktop$f_open(v_username); +spiderLine=8388672; +} else { +spiderLine=8388672; +spiderLine=8388673; +notify$f_toast(_S67,3,4000); +} +spiderLine=8388674; +spiderLine=8388675; +spider_FreeJSON_DEBUG(0); +} +spiderLine=8388676; +spiderLine=8388677; +} else { +spiderLine=8388677; +spiderLine=8388678; +notify$f_toast(_S71,3,4000); +} +spiderLine=8388679; +spiderLine=8388680; +return 0; +} +function notify$f__fireconfirm(v_result) { +spiderLine=6291652; +spiderLine=6291653; +notify$f__closeconfirm(); +spiderLine=6291654; +if (notify$g__confirmcb) { +notify$g__confirmcb(v_result); +spiderLine=6291656; +notify$g__confirmcb=0; +} +spiderLine=6291657; +spiderLine=6291658; +return 0; +} +function notify$f_handler_confirmclose() { +spiderLine=6291682; +spiderLine=6291683; +notify$f__fireconfirm(0); +spiderLine=6291684; +return 0; +} +function notify$f_confirm(v_title,v_message,p_callback) { +var v_h=0; +var v_w=0; +var v_dh=0; +var v_dw=0; +spiderLine=6291530;;;;; +spiderLine=6291533; +if (spider_IsWindow_DEBUG(notify$g__confirmwin)) { +spiderLine=6291533; +if (1) return 0; +} +spiderLine=6291533; +spiderLine=6291535; +v_w=340; +spiderLine=6291536; +v_h=130; +spiderLine=6291537; +v_dw=spider_DesktopWidth_DEBUG(0); +spiderLine=6291538; +v_dh=spider_DesktopHeight_DEBUG(0); +spiderLine=6291540; +notify$g__confirmwin=spider_OpenWindow_DEBUG(-1,((((v_dw-v_w))/2)|0),((((v_dh-v_h))/2)|0),v_w,v_h,v_title,24); +spiderLine=6291541; +spider_StickyWindow_DEBUG(notify$g__confirmwin,1); +spiderLine=6291542; +notify$g__confirmcb=p_callback; +spiderLine=6291544; +spider_TextGadget_DEBUG(-1,20,20,(v_w+-40),50,v_message); +spiderLine=6291545; +notify$g__confirmokbtn=spider_ButtonGadget_DEBUG(-1,(v_w+-190),(v_h+-45),80,30,_S28); +spiderLine=6291546; +notify$g__confirmcancelbtn=spider_ButtonGadget_DEBUG(-1,(v_w+-100),(v_h+-45),80,30,_S29); +spiderLine=6291548; +spider_BindGadgetEvent_DEBUG(notify$g__confirmokbtn,notify$f_handler_confirmok); +spiderLine=6291549; +spider_BindGadgetEvent_DEBUG(notify$g__confirmcancelbtn,notify$f_handler_confirmcancel); +spiderLine=6291550; +spider_BindEvent_DEBUG(4,notify$f_handler_confirmclose,notify$g__confirmwin); +spiderLine=6291551; +return 0; +} +function notify$f_handler_confirmcancel() { +spiderLine=6291678; +spiderLine=6291679; +notify$f__fireconfirm(0); +spiderLine=6291680; +return 0; +} +function notify$f__findbycanvas(v_canvas) { +var v_i=0; +spiderLine=6291636;; +spiderLine=6291638; +v_i=0; +for (;(notify$g__count+-1)>=v_i;v_i+=1) { +spiderLine=6291639; +if (notify$a__Canvases.array[v_i]==v_canvas) { +spiderLine=6291639; +if (1) return v_i; +} +spiderLine=6291639; +spiderLine=6291640; +} +spiderLine=6291641; +if (1) return -1; +spiderLine=6291642; +return 0; +} +function notify$f__typecolor(v_type) { +spiderLine=6291555; +spiderLine=6291556; +var sb_select1=v_type; +spiderLine=6291557; +if (sb_select1==1) { +spiderLine=6291557; +if (1) return spider_RGB_DEBUG(60,180,100); +spiderLine=6291558; +} else if (sb_select1==2) { +spiderLine=6291558; +if (1) return spider_RGB_DEBUG(220,160,40); +spiderLine=6291559; +} else if (sb_select1==3) { +spiderLine=6291559; +if (1) return spider_RGB_DEBUG(210,65,65); +spiderLine=6291560; +} else { +spiderLine=6291560; +spiderLine=6291560; +if (1) return spider_RGB_DEBUG(50,130,220); +} +spiderLine=6291562; +return 0; +} +function notify$f__dismiss(v_slot) { +var v_i=0; +spiderLine=6291594;; +spiderLine=6291597; +if (!(spider_IsWindow_DEBUG(notify$a__Wins.array[v_slot]))) { +spiderLine=6291597; +if (1) return 0; +} +spiderLine=6291597; +spiderLine=6291599; +spider_UnbindEvent(12,notify$f_handler_toasttimer,notify$a__Wins.array[v_slot]); +spiderLine=6291600; +spider_UnbindGadgetEvent_DEBUG(notify$a__Canvases.array[v_slot],notify$f_handler_toastclick); +spiderLine=6291601; +spider_CloseWindow_DEBUG(notify$a__Wins.array[v_slot]); +spiderLine=6291603; +v_i=v_slot; +for (;(notify$g__count+-2)>=v_i;v_i+=1) { +spiderLine=6291604; +notify$a__Wins.array[v_i]=notify$a__Wins.array[(v_i+1)]; +spiderLine=6291605; +notify$a__Canvases.array[v_i]=notify$a__Canvases.array[(v_i+1)]; +spiderLine=6291606; +notify$a__Types.array[v_i]=notify$a__Types.array[(v_i+1)]; +spiderLine=6291607; +notify$a__Messages.array[v_i]=notify$a__Messages.array[(v_i+1)]; +spiderLine=6291608; +} +spiderLine=6291609; +notify$a__Wins.array[(notify$g__count+-1)]=0; +spiderLine=6291610; +notify$a__Canvases.array[(notify$g__count+-1)]=0; +spiderLine=6291611; +notify$a__Types.array[(notify$g__count+-1)]=0; +spiderLine=6291612; +notify$a__Messages.array[(notify$g__count+-1)]=_S3; +spiderLine=6291613; +notify$g__count=(notify$g__count+-1); +spiderLine=6291615; +notify$f__reposition(); +spiderLine=6291616; +return 0; +} +function notify$f__findbywindow(v_win) { +var v_i=0; +spiderLine=6291628;; +spiderLine=6291630; +v_i=0; +for (;(notify$g__count+-1)>=v_i;v_i+=1) { +spiderLine=6291631; +if (notify$a__Wins.array[v_i]==v_win) { +spiderLine=6291631; +if (1) return v_i; +} +spiderLine=6291631; +spiderLine=6291632; +} +spiderLine=6291633; +if (1) return -1; +spiderLine=6291634; +return 0; +} +function notify$f__closeconfirm() { +spiderLine=6291644; +spiderLine=6291645; +spider_UnbindGadgetEvent_DEBUG(notify$g__confirmokbtn,notify$f_handler_confirmok); +spiderLine=6291646; +spider_UnbindGadgetEvent_DEBUG(notify$g__confirmcancelbtn,notify$f_handler_confirmcancel); +spiderLine=6291647; +spider_UnbindEvent(4,notify$f_handler_confirmclose,notify$g__confirmwin); +spiderLine=6291648; +spider_CloseWindow_DEBUG(notify$g__confirmwin); +spiderLine=6291649; +notify$g__confirmwin=0; +spiderLine=6291650; +return 0; +} +function notify$f_handler_toasttimer() { +var v_slot=0; +spiderLine=6291662; +spiderLine=6291663; +v_slot=notify$f__findbywindow(spider_EventWindow_DEBUG()); +spiderLine=6291664; +if (v_slot>=0) { +spiderLine=6291664; +notify$f__dismiss(v_slot); +} +spiderLine=6291664; +spiderLine=6291665; +return 0; +} +function notify$f_handler_confirmok() { +spiderLine=6291674; +spiderLine=6291675; +notify$f__fireconfirm(1); +spiderLine=6291676; +return 0; +} +function notify$f__reposition() { +var v_i=0; +var v_dh=0; +var v_dw=0; +spiderLine=6291618;;;; +spiderLine=6291621; +v_dw=spider_DesktopWidth_DEBUG(0); +spiderLine=6291622; +v_dh=spider_DesktopHeight_DEBUG(0); +spiderLine=6291623; +v_i=0; +for (;(notify$g__count+-1)>=v_i;v_i+=1) { +spiderLine=6291624; +spider_ResizeWindow_DEBUG(notify$a__Wins.array[v_i],(v_dw+-310),(v_dh-(((v_i+1))*(70))),-65535,-65535); +spiderLine=6291625; +} +spiderLine=6291626; +return 0; +} +function notify$f_handler_toastclick() { +var v_slot=0; +spiderLine=6291667;; +spiderLine=6291669; +if (spider_EventType()!=65541) { +spiderLine=6291669; +if (1) return 0; +} +spiderLine=6291669; +spiderLine=6291670; +v_slot=notify$f__findbycanvas(spider_EventGadget_DEBUG()); +spiderLine=6291671; +if (v_slot>=0) { +spiderLine=6291671; +notify$f__dismiss(v_slot); +} +spiderLine=6291671; +spiderLine=6291672; +return 0; +} +function notify$f__drawtoast(v_slot) { +var v_h=0; +var v_w=0; +var v_msg=""; +var v_maxw=0; +spiderLine=6291564;;;;; +spiderLine=6291568; +if (!(spider_IsGadget_DEBUG(notify$a__Canvases.array[v_slot]))) { +spiderLine=6291568; +if (1) return 0; +} +spiderLine=6291568; +spiderLine=6291569; +if (!(spider_StartDrawing_DEBUG(spider_CanvasOutput_DEBUG(notify$a__Canvases.array[v_slot])))) { +spiderLine=6291569; +if (1) return 0; +} +spiderLine=6291569; +spiderLine=6291571; +v_w=spider_OutputWidth_DEBUG(); +spiderLine=6291572; +v_h=spider_OutputHeight_DEBUG(); +spiderLine=6291575; +spider_Box_DEBUG(0,0,v_w,v_h,spider_RGB_DEBUG(38,38,54)); +spiderLine=6291578; +spider_Box_DEBUG(0,0,4,v_h,notify$f__typecolor(notify$a__Types.array[v_slot])); +spiderLine=6291581; +spider_DrawingMode_DEBUG(1); +spiderLine=6291582; +if (spider_IsFont_DEBUG(notify$g__font)) { +spiderLine=6291582; +spider_DrawingFont_DEBUG(spider_FontID_DEBUG(notify$g__font)); +} +spiderLine=6291582; +spiderLine=6291584; +v_msg=notify$a__Messages.array[v_slot]; +spiderLine=6291585; +v_maxw=(v_w+-28); +while (spider_Len(v_msg)>3 && spider_TextWidth_DEBUG(v_msg)>v_maxw) { +spiderLine=6291587; +v_msg=spider_Left(v_msg,(spider_Len(v_msg)+-4))+_S30; +spiderLine=6291588; +} +il_wend48:; +spiderLine=6291590; +spider_DrawText_DEBUG(18,((((v_h-spider_TextHeight_DEBUG(_S31)))/2)),v_msg,spider_RGB_DEBUG(220,220,220)); +spiderLine=6291591; +spider_StopDrawing_DEBUG(); +spiderLine=6291592; +return 0; +} +function notify$f_toast(v_message,v_type,v_duration) { +var v_slot=0; +var v_canvas=0; +var v_x=0; +var v_y=0; +var v_win=0; +var v_dh=0; +var v_dw=0; +spiderLine=6291501;;;;;;;; +spiderLine=6291504; +if (notify$g__count>=5) { +spiderLine=6291504; +if (1) return 0; +} +spiderLine=6291504; +spiderLine=6291506; +v_slot=notify$g__count; +spiderLine=6291507; +v_dw=spider_DesktopWidth_DEBUG(0); +spiderLine=6291508; +v_dh=spider_DesktopHeight_DEBUG(0); +spiderLine=6291509; +v_x=(v_dw+-310); +spiderLine=6291510; +v_y=(v_dh-(((v_slot+1))*(70))); +spiderLine=6291511; +v_win=spider_OpenWindow_DEBUG(-1,v_x,v_y,300,60,_S3,512); +spiderLine=6291512; +spider_StickyWindow_DEBUG(v_win,1); +spiderLine=6291513; +v_canvas=spider_CanvasGadget_DEBUG(-1,0,0,300,60); +spiderLine=6291515; +notify$a__Wins.array[v_slot]=v_win; +spiderLine=6291516; +notify$a__Canvases.array[v_slot]=v_canvas; +spiderLine=6291517; +notify$a__Types.array[v_slot]=v_type; +spiderLine=6291518; +notify$a__Messages.array[v_slot]=v_message; +spiderLine=6291519; +notify$g__count=(notify$g__count+1); +spiderLine=6291521; +notify$f__drawtoast(v_slot); +spiderLine=6291523; +spider_BindGadgetEvent_DEBUG(v_canvas,notify$f_handler_toastclick); +spiderLine=6291524; +spider_AddWindowTimer_DEBUG(v_win,0,v_duration); +spiderLine=6291525; +spider_BindEvent_DEBUG(12,notify$f_handler_toasttimer,v_win); +spiderLine=6291526; +return 0; +} +function filecache$f_evict(v_fileid,p_callback) { +spiderLine=4194408; +var _cb = p_callback; +var _id = v_fileid; +var _db = window._kumos_idb; +if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + +var tx = _db.transaction(['file_content','file_meta'], 'readwrite'); +tx.objectStore('file_content').delete(_id); +tx.objectStore('file_meta').delete(_id); + +tx.oncomplete = function() { if (_cb) _cb(1, ''); }; +tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'evict failed'); }; +spiderLine=4194420; +return 0; +} +function filecache$f_getmeta(v_fileid,p_callback) { +spiderLine=4194382; +spiderLine=4194383; +idb$f_get(_S9,v_fileid,p_callback); +spiderLine=4194384; +return 0; +} +function filecache$f_exists(v_fileid,p_callback) { +spiderLine=4194455; +spiderLine=4194456; +idb$f_exists(_S9,v_fileid,p_callback); +spiderLine=4194457; +return 0; +} +function filecache$f_listcached(p_callback) { +spiderLine=4194423; +spiderLine=4194424; +idb$f_getallkeys(_S9,p_callback); +spiderLine=4194425; +return 0; +} +function filecache$f_cache(v_fileid,v_path,v_content,p_callback) { +spiderLine=4194319; +var _cb = p_callback; +var _id = v_fileid; +var _path = v_path; +var _content = v_content; +var _db = window._kumos_idb; +if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + +var tx = _db.transaction(['file_content','file_meta'], 'readwrite'); +var contentStore = tx.objectStore('file_content'); +var metaStore = tx.objectStore('file_meta'); + +var meta = JSON.stringify({ + path: _path, + dirty: false, + cached_at: Date.now(), + size: _content.length +}); + +contentStore.put(_content, _id).onerror = function(e) { tx.abort(); }; +metaStore.put(meta, _id).onerror = function(e) { tx.abort(); }; + +tx.oncomplete = function() { if (_cb) _cb(1, ''); }; +tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'cache failed'); }; +tx.onabort = function(e) { if (_cb) _cb(0, 'cache aborted'); }; +spiderLine=4194344; +return 0; +} +function filecache$f_read_(v_fileid,p_callback) { +spiderLine=4194348; +spiderLine=4194349; +idb$f_get(_S8,v_fileid,p_callback); +spiderLine=4194350; +return 0; +} +function filecache$f_markclean(v_fileid,p_callback) { +spiderLine=4194387; +var _cb = p_callback; +var _id = v_fileid; +var _db = window._kumos_idb; +if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + +var tx = _db.transaction(['file_meta'], 'readwrite'); +var store = tx.objectStore('file_meta'); +var req = store.get(_id); +req.onsuccess = function(ev) { + var meta = {}; + try { meta = JSON.parse(ev.target.result || '{}'); } catch(e) {} + meta.dirty = false; + store.put(JSON.stringify(meta), _id); +}; + +tx.oncomplete = function() { if (_cb) _cb(1, ''); }; +tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'markclean failed'); }; +spiderLine=4194405; +return 0; +} +function filecache$f_write(v_fileid,v_content,p_callback) { +spiderLine=4194354; +var _cb = p_callback; +var _id = v_fileid; +var _content = v_content; +var _db = window._kumos_idb; +if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + +var tx = _db.transaction(['file_content','file_meta'], 'readwrite'); +var contentStore = tx.objectStore('file_content'); +var metaStore = tx.objectStore('file_meta'); + +contentStore.put(_content, _id); + +var getReq = metaStore.get(_id); +getReq.onsuccess = function(ev) { + var meta = {}; + try { meta = JSON.parse(ev.target.result || '{}'); } catch(e) {} + meta.dirty = true; + meta.size = _content.length; + meta.cached_at = Date.now(); + metaStore.put(JSON.stringify(meta), _id); +}; + +tx.oncomplete = function() { if (_cb) _cb(1, ''); }; +tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'write failed'); }; +spiderLine=4194379; +return 0; +} +function filecache$f_listdirty(p_callback) { +spiderLine=4194429; +var _cb = p_callback; +var _db = window._kumos_idb; +if (!_db) { if (_cb) _cb(0, 'IDB not open'); return; } + +var tx = _db.transaction(['file_meta'], 'readonly'); +var store = tx.objectStore('file_meta'); +var req = store.openCursor(); +var dirty = []; + +req.onsuccess = function(ev) { + var cursor = ev.target.result; + if (cursor) { + try { + var meta = JSON.parse(cursor.value); + if (meta.dirty) dirty.push(String(cursor.key)); + } catch(e) {} + cursor.continue(); + } +}; + +tx.oncomplete = function() { if (_cb) _cb(1, JSON.stringify(dirty)); }; +tx.onerror = function(e) { if (_cb) _cb(0, e.target.error ? e.target.error.message : 'listdirty failed'); }; +spiderLine=4194452; +return 0; +} +function webbrowser$f_open() { +spiderLine=13631507; +spiderLine=13631508; +if (spider_IsWindow_DEBUG(webbrowser$g_window)) { +spiderLine=13631509; +spider_SetActiveWindow_DEBUG(webbrowser$g_window); +spiderLine=13631510; +if (1) return 0; +} +spiderLine=13631511; +spiderLine=13631514; +webbrowser$g_window=spider_OpenWindow_DEBUG(-1,100,60,800,600,_S37,56); +spiderLine=13631516; +webbrowser$g_urlbar=spider_StringGadget_DEBUG(-1,4,5,792,25,_S154); +spiderLine=13631517; +webbrowser$g_webview=spider_WebGadget_DEBUG(-1,0,35,800,565,_S154); +spiderLine=13631519; +spider_BindGadgetEvent_DEBUG(webbrowser$g_urlbar,webbrowser$f_handler_navigate); +spiderLine=13631520; +spider_BindEvent_DEBUG(7,webbrowser$f_handler_resize,webbrowser$g_window); +spiderLine=13631521; +spider_BindEvent_DEBUG(4,webbrowser$f_handler_close,webbrowser$g_window); +spiderLine=13631523; +desktop$f_register(_S37,webbrowser$g_window,_S38); +spiderLine=13631524; +return 0; +} +function webbrowser$f_handler_close() { +spiderLine=13631543; +spiderLine=13631544; +spider_UnbindGadgetEvent_DEBUG(webbrowser$g_urlbar,webbrowser$f_handler_navigate); +spiderLine=13631545; +spider_UnbindEvent(7,webbrowser$f_handler_resize,webbrowser$g_window); +spiderLine=13631546; +spider_UnbindEvent(4,webbrowser$f_handler_close,webbrowser$g_window); +spiderLine=13631547; +desktop$f_unregister(webbrowser$g_window); +spiderLine=13631548; +webbrowser$g_window=0; +spiderLine=13631549; +return 0; +} +function webbrowser$f_handler_navigate() { +spiderLine=13631526; +spiderLine=13631534; +return 0; +} +function webbrowser$f_handler_resize() { +var v_h=0; +var v_w=0; +spiderLine=13631536; +spiderLine=13631537; +v_w=spider_WindowWidth_DEBUG(webbrowser$g_window); +spiderLine=13631538; +v_h=spider_WindowHeight_DEBUG(webbrowser$g_window); +spiderLine=13631539; +spider_ResizeGadget_DEBUG(webbrowser$g_urlbar,4,5,(v_w+-8),25); +spiderLine=13631540; +spider_ResizeGadget_DEBUG(webbrowser$g_webview,0,35,v_w,(v_h+-35)); +spiderLine=13631541; +return 0; +} +function fileexplorer$f_open() { +spiderLine=11534395; +spiderLine=11534396; +if (spider_IsWindow_DEBUG(fileexplorer$g_window)) { +spiderLine=11534397; +spider_SetActiveWindow_DEBUG(fileexplorer$g_window); +spiderLine=11534398; +if (1) return 0; +} +spiderLine=11534399; +spiderLine=11534402; +fileexplorer$g_window=spider_OpenWindow_DEBUG(-1,150,80,480,400,_S35,56); +spiderLine=11534405; +fileexplorer$g_upbutton=spider_ButtonGadget_DEBUG(-1,2,4,30,27,_S126); +spiderLine=11534406; +fileexplorer$g_pathlabel=spider_TextGadget_DEBUG(-1,36,4,280,27,_S19); +spiderLine=11534407; +fileexplorer$g_newfolderbutton=spider_ButtonGadget_DEBUG(-1,318,4,80,27,_S127); +spiderLine=11534408; +fileexplorer$g_newfilebutton=spider_ButtonGadget_DEBUG(-1,402,4,74,27,_S128); +spiderLine=11534412; +fileexplorer$g_listview=spider_ListViewGadget_DEBUG(-1,0,35,480,341); +spiderLine=11534416; +fileexplorer$g_statuslabel=spider_TextGadget_DEBUG(-1,4,380,472,16,_S3); +spiderLine=11534418; +spider_BindGadgetEvent_DEBUG(fileexplorer$g_upbutton,fileexplorer$f_handler_up); +spiderLine=11534419; +spider_BindGadgetEvent_DEBUG(fileexplorer$g_newfolderbutton,fileexplorer$f_handler_newfolder); +spiderLine=11534420; +spider_BindGadgetEvent_DEBUG(fileexplorer$g_newfilebutton,fileexplorer$f_handler_newfile); +spiderLine=11534421; +spider_BindGadgetEvent_DEBUG(fileexplorer$g_listview,fileexplorer$f_handler_listview); +spiderLine=11534422; +spider_BindEvent_DEBUG(7,fileexplorer$f_handler_resize,fileexplorer$g_window); +spiderLine=11534423; +spider_BindEvent_DEBUG(4,fileexplorer$f_handler_close,fileexplorer$g_window); +spiderLine=11534425; +desktop$f_register(_S35,fileexplorer$g_window,_S36); +spiderLine=11534427; +fileexplorer$g_currentpath=_S19; +spiderLine=11534428; +fileexplorer$g_stackdepth=0; +spiderLine=11534429; +fileexplorer$f__load(_S19); +spiderLine=11534430; +return 0; +} +function fileexplorer$f_handler_close() { +spiderLine=11534585; +spiderLine=11534586; +if (spider_IsWindow_DEBUG(fileexplorer$g_inputwindow)) { +spiderLine=11534587; +spider_UnbindEvent(4,fileexplorer$f_handler_inputcancel,fileexplorer$g_inputwindow); +spiderLine=11534588; +spider_UnbindGadgetEvent_DEBUG(fileexplorer$g_buttonnew,fileexplorer$f_handler_inputconfirm); +spiderLine=11534589; +spider_UnbindGadgetEvent_DEBUG(fileexplorer$g_cancelbtn,fileexplorer$f_handler_inputcancel); +spiderLine=11534590; +fileexplorer$f__closeinputwindow(); +} +spiderLine=11534591; +spiderLine=11534593; +spider_UnbindGadgetEvent_DEBUG(fileexplorer$g_upbutton,fileexplorer$f_handler_up); +spiderLine=11534594; +spider_UnbindGadgetEvent_DEBUG(fileexplorer$g_newfolderbutton,fileexplorer$f_handler_newfolder); +spiderLine=11534595; +spider_UnbindGadgetEvent_DEBUG(fileexplorer$g_newfilebutton,fileexplorer$f_handler_newfile); +spiderLine=11534596; +spider_UnbindGadgetEvent_DEBUG(fileexplorer$g_listview,fileexplorer$f_handler_listview); +spiderLine=11534597; +spider_UnbindEvent(7,fileexplorer$f_handler_resize,fileexplorer$g_window); +spiderLine=11534598; +spider_UnbindEvent(4,fileexplorer$f_handler_close,fileexplorer$g_window); +spiderLine=11534599; +desktop$f_unregister(fileexplorer$g_window); +spiderLine=11534600; +fileexplorer$g_inputwindow=0; +spiderLine=11534601; +fileexplorer$g_window=0; +spiderLine=11534602; +return 0; +} +function fileexplorer$f__listcallback(v_success,v_datastring) { +var v_i=0; +var v_root=0; +var v_status=""; +var v_item=0; +var v_count=0; +var v_prefix=""; +spiderLine=11534443; +spiderLine=11534444; +if (!(v_success) || !(spider_IsWindow_DEBUG(fileexplorer$g_window))) { +spiderLine=11534445; +notify$f_toast(_S130,3,4000); +spiderLine=11534446; +if (1) return 0; +} +spiderLine=11534447; +spiderLine=11534449; +if (!(spider_ParseJSON_DEBUG(0,v_datastring))) { +spiderLine=11534450; +notify$f_toast(_S131,3,4000); +spiderLine=11534451; +if (1) return 0; +} +spiderLine=11534452; +spiderLine=11534454; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=11534455; +v_count=spider_JSONArraySize_DEBUG(v_root);;; +spiderLine=11534458; +spider_ClearGadgetItems_DEBUG(fileexplorer$g_listview); +spiderLine=11534459; +fileexplorer$g_entrycount=0; +spiderLine=11534461; +v_i=0; +for (;(v_count+-1)>=v_i;v_i+=1) { +spiderLine=11534462; +if (fileexplorer$g_entrycount>=512) { +spiderLine=11534462; +break; +} +spiderLine=11534462; +spiderLine=11534463; +v_item=spider_GetJSONElement_DEBUG(v_root,v_i); +spiderLine=11534465; +fileexplorer$a_EntryIDs.array[fileexplorer$g_entrycount]=spider_Str(spider_GetJSONInteger_DEBUG(spider_GetJSONMember_DEBUG(v_item,_S53))); +spiderLine=11534466; +fileexplorer$a_EntryNames.array[fileexplorer$g_entrycount]=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_item,_S42)); +spiderLine=11534467; +fileexplorer$a_EntryIsDir.array[fileexplorer$g_entrycount]=spider_GetJSONInteger_DEBUG(spider_GetJSONMember_DEBUG(v_item,_S112)); +spiderLine=11534469; +v_prefix=_S132; +spiderLine=11534470; +if (fileexplorer$a_EntryIsDir.array[fileexplorer$g_entrycount]) { +spiderLine=11534470; +v_prefix=_S133; +} +spiderLine=11534470; +spiderLine=11534471; +spider_AddGadgetItem_DEBUG(fileexplorer$g_listview,-1,v_prefix+fileexplorer$a_EntryNames.array[fileexplorer$g_entrycount]); +spiderLine=11534472; +fileexplorer$g_entrycount=(fileexplorer$g_entrycount+1); +spiderLine=11534473; +} +spiderLine=11534475; +spider_FreeJSON_DEBUG(0); +spiderLine=11534477; +v_status=spider_Str(fileexplorer$g_entrycount)+_S134; +spiderLine=11534478; +if (fileexplorer$g_entrycount!=1) { +spiderLine=11534478; +v_status=v_status+_S135; +} +spiderLine=11534478; +spiderLine=11534479; +spider_SetGadgetText_DEBUG(fileexplorer$g_statuslabel,v_status); +spiderLine=11534480; +return 0; +} +function fileexplorer$f_handler_inputconfirm() { +var v_path=""; +var v_name=""; +spiderLine=11534604; +spiderLine=11534605; +v_name=spider_Trim_DEBUG(spider_GetGadgetText_DEBUG(fileexplorer$g_inputfield)); +spiderLine=11534606; +if (v_name==_S3) { +spiderLine=11534606; +if (1) return 0; +} +spiderLine=11534606; +spiderLine=11534608; +v_path=fileexplorer$g_currentpath; +spiderLine=11534609; +if (spider_Right(v_path,1)!=_S19) { +spiderLine=11534609; +v_path=v_path+_S19; +} +spiderLine=11534609; +spiderLine=11534610; +v_path=v_path+v_name; +spiderLine=11534612; +fileexplorer$f__closeinputwindow(); +spiderLine=11534614; +if (fileexplorer$g_inputmode==0) { +spiderLine=11534615; +fs$f_mkdir(v_path,fileexplorer$f__mkdircallback); +spiderLine=11534616; +} else { +spiderLine=11534616; +spiderLine=11534618; +fileexplorer$a_EntryNames.array[0]=v_name; +spiderLine=11534619; +fs$f_write(_S3,v_path,_S3,fileexplorer$f__createfilecallback); +} +spiderLine=11534620; +spiderLine=11534621; +return 0; +} +function fileexplorer$f_handler_newfile() { +spiderLine=11534558; +spiderLine=11534559; +fileexplorer$f__openinputwindow(1); +spiderLine=11534560; +return 0; +} +function fileexplorer$f_handler_newfolder() { +spiderLine=11534554; +spiderLine=11534555; +fileexplorer$f__openinputwindow(0); +spiderLine=11534556; +return 0; +} +function fileexplorer$f_handler_inputcancel() { +spiderLine=11534623; +spiderLine=11534624; +fileexplorer$f__closeinputwindow(); +spiderLine=11534625; +return 0; +} +function fileexplorer$f__createfilecallback(v_success,v_datastring) { +var v_id=""; +var v_path=""; +var v_root=0; +spiderLine=11534487; +spiderLine=11534488; +if (!(spider_IsWindow_DEBUG(fileexplorer$g_window))) { +spiderLine=11534488; +if (1) return 0; +} +spiderLine=11534488; +spiderLine=11534489; +if (v_success && spider_ParseJSON_DEBUG(0,v_datastring)) { +spiderLine=11534490; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=11534491; +if (spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S26))) { +spiderLine=11534492; +v_id=spider_Str(spider_GetJSONInteger_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S53))); +spiderLine=11534493; +v_path=fileexplorer$g_currentpath; +spiderLine=11534494; +if (spider_Right(v_path,1)!=_S19) { +spiderLine=11534494; +v_path=v_path+_S19; +} +spiderLine=11534494; +spiderLine=11534495; +v_path=v_path+fileexplorer$a_EntryNames.array[0]; +spiderLine=11534496; +spider_FreeJSON_DEBUG(0); +spiderLine=11534497; +fileexplorer$f__load(fileexplorer$g_currentpath); +spiderLine=11534498; +texteditor$f_open(v_id,v_path); +spiderLine=11534499; +if (1) return 0; +} +spiderLine=11534500; +spiderLine=11534501; +spider_FreeJSON_DEBUG(0); +} +spiderLine=11534502; +spiderLine=11534503; +fileexplorer$f__load(fileexplorer$g_currentpath); +spiderLine=11534504; +return 0; +} +function fileexplorer$f__mkdircallback(v_success,v_datastring) { +spiderLine=11534482; +spiderLine=11534483; +if (!(spider_IsWindow_DEBUG(fileexplorer$g_window))) { +spiderLine=11534483; +if (1) return 0; +} +spiderLine=11534483; +spiderLine=11534484; +fileexplorer$f__load(fileexplorer$g_currentpath); +spiderLine=11534485; +return 0; +} +function fileexplorer$f__closeinputwindow() { +spiderLine=11534529; +spiderLine=11534530; +if (spider_IsWindow_DEBUG(fileexplorer$g_inputwindow)) { +spiderLine=11534531; +spider_CloseWindow_DEBUG(fileexplorer$g_inputwindow); +} +spiderLine=11534532; +spiderLine=11534533; +return 0; +} +function fileexplorer$f_handler_resize() { +var v_h=0; +var v_w=0; +spiderLine=11534537; +spiderLine=11534538; +v_w=spider_WindowWidth_DEBUG(fileexplorer$g_window); +spiderLine=11534539; +v_h=spider_WindowHeight_DEBUG(fileexplorer$g_window); +spiderLine=11534540; +spider_ResizeGadget_DEBUG(fileexplorer$g_pathlabel,36,4,(v_w+-200),27); +spiderLine=11534541; +spider_ResizeGadget_DEBUG(fileexplorer$g_newfolderbutton,(v_w+-162),4,80,27); +spiderLine=11534542; +spider_ResizeGadget_DEBUG(fileexplorer$g_newfilebutton,(v_w+-78),4,74,27); +spiderLine=11534543; +spider_ResizeGadget_DEBUG(fileexplorer$g_listview,0,35,v_w,(v_h+-59)); +spiderLine=11534544; +spider_ResizeGadget_DEBUG(fileexplorer$g_statuslabel,4,(v_h+-20),(v_w+-8),16); +spiderLine=11534545; +return 0; +} +function fileexplorer$f__openinputwindow(v_mode) { +var v_title=""; +var v_x=0; +var v_y=0; +spiderLine=11534506; +spiderLine=11534507; +if (spider_IsWindow_DEBUG(fileexplorer$g_inputwindow)) { +spiderLine=11534507; +if (1) return 0; +} +spiderLine=11534507; +spiderLine=11534508; +fileexplorer$g_inputmode=v_mode; +spiderLine=11534510; +v_title=_S136; +spiderLine=11534511; +if (v_mode==1) { +spiderLine=11534511; +v_title=_S137; +} +spiderLine=11534511; +spiderLine=11534513; +v_x=(spider_WindowX_DEBUG(fileexplorer$g_window)+90); +spiderLine=11534514; +v_y=(spider_WindowY_DEBUG(fileexplorer$g_window)+155); +spiderLine=11534517; +fileexplorer$g_inputwindow=spider_OpenWindow_DEBUG(-1,v_x,v_y,300,90,v_title,24); +spiderLine=11534518; +spider_TextGadget_DEBUG(-1,10,12,280,20,_S138); +spiderLine=11534519; +fileexplorer$g_inputfield=spider_StringGadget_DEBUG(-1,10,32,280,24,_S3); +spiderLine=11534520; +fileexplorer$g_buttonnew=spider_ButtonGadget_DEBUG(-1,10,62,130,24,_S28); +spiderLine=11534521; +fileexplorer$g_cancelbtn=spider_ButtonGadget_DEBUG(-1,150,62,140,24,_S29); +spiderLine=11534523; +spider_SetActiveGadget_DEBUG(fileexplorer$g_inputfield); +spiderLine=11534524; +spider_BindGadgetEvent_DEBUG(fileexplorer$g_buttonnew,fileexplorer$f_handler_inputconfirm); +spiderLine=11534525; +spider_BindGadgetEvent_DEBUG(fileexplorer$g_cancelbtn,fileexplorer$f_handler_inputcancel); +spiderLine=11534526; +spider_BindEvent_DEBUG(4,fileexplorer$f_handler_inputcancel,fileexplorer$g_inputwindow); +spiderLine=11534527; +return 0; +} +function fileexplorer$f__load(v_path) { +spiderLine=11534434; +spiderLine=11534435; +fileexplorer$g_currentpath=v_path; +spiderLine=11534436; +spider_SetGadgetText_DEBUG(fileexplorer$g_pathlabel,v_path); +spiderLine=11534437; +spider_SetGadgetText_DEBUG(fileexplorer$g_statuslabel,_S129); +spiderLine=11534438; +spider_ClearGadgetItems_DEBUG(fileexplorer$g_listview); +spiderLine=11534439; +fileexplorer$g_entrycount=0; +spiderLine=11534440; +fs$f_list(v_path,fileexplorer$f__listcallback); +spiderLine=11534441; +return 0; +} +function fileexplorer$f_handler_listview() { +var v_path=""; +var v_newpath=""; +var v_index=0; +spiderLine=11534562; +spiderLine=11534563; +if (spider_EventType()!=2) { +spiderLine=11534563; +if (1) return 0; +} +spiderLine=11534563; +spiderLine=11534565; +v_index=spider_GetGadgetState_DEBUG(fileexplorer$g_listview); +spiderLine=11534566; +if (v_index<0 || v_index>=fileexplorer$g_entrycount) { +spiderLine=11534566; +if (1) return 0; +} +spiderLine=11534566; +spiderLine=11534568; +if (fileexplorer$a_EntryIsDir.array[v_index]) { +spiderLine=11534570; +fileexplorer$a_PathStack.array[fileexplorer$g_stackdepth]=fileexplorer$g_currentpath; +spiderLine=11534571; +fileexplorer$g_stackdepth=(fileexplorer$g_stackdepth+1); +spiderLine=11534572; +v_newpath=fileexplorer$g_currentpath; +spiderLine=11534573; +if (spider_Right(v_newpath,1)!=_S19) { +spiderLine=11534573; +v_newpath=v_newpath+_S19; +} +spiderLine=11534573; +spiderLine=11534574; +v_newpath=v_newpath+fileexplorer$a_EntryNames.array[v_index]; +spiderLine=11534575; +fileexplorer$f__load(v_newpath); +spiderLine=11534576; +} else { +spiderLine=11534576; +spiderLine=11534578; +v_path=fileexplorer$g_currentpath; +spiderLine=11534579; +if (spider_Right(v_path,1)!=_S19) { +spiderLine=11534579; +v_path=v_path+_S19; +} +spiderLine=11534579; +spiderLine=11534580; +v_path=v_path+fileexplorer$a_EntryNames.array[v_index]; +spiderLine=11534581; +texteditor$f_open(fileexplorer$a_EntryIDs.array[v_index],v_path); +} +spiderLine=11534582; +spiderLine=11534583; +return 0; +} +function fileexplorer$f_handler_up() { +spiderLine=11534547; +spiderLine=11534548; +if (fileexplorer$g_stackdepth>0) { +spiderLine=11534549; +fileexplorer$g_stackdepth=(fileexplorer$g_stackdepth+-1); +spiderLine=11534550; +fileexplorer$f__load(fileexplorer$a_PathStack.array[fileexplorer$g_stackdepth]); +} +spiderLine=11534551; +spiderLine=11534552; +return 0; +} +function desktop$f_handler_logout() { +spiderLine=7340546; +spiderLine=7340547; +spider_HTTPRequest(1,_S63,_S3,desktop$f_logoutcallback); +spiderLine=7340548; +return 0; +} +function desktop$f_installthirdpartyapp(v_appid,v_manifestjson,v_permissions,v_icon) { +var v_slot=0; +var v_i=0; +var v_n=""; +var v_label=""; +var v_appname=""; +spiderLine=7340234;;;;;; +spiderLine=7340238; +v_slot=-1; +spiderLine=7340239; +v_i=0; +for (;(desktop$g__appcount+-1)>=v_i;v_i+=1) { +spiderLine=7340240; +if (desktop$a_AppRegistry.array[v_i]._ID==v_appid) { +spiderLine=7340240; +v_slot=v_i; +spiderLine=7340240; +break; +} +spiderLine=7340240; +spiderLine=7340241; +} +spiderLine=7340243; +if (v_slot<0) { +spiderLine=7340244; +if (desktop$g__appcount>=32) { +spiderLine=7340244; +if (1) return 0; +} +spiderLine=7340244; +spiderLine=7340245; +v_slot=desktop$g__appcount; +spiderLine=7340246; +desktop$g__appcount=(desktop$g__appcount+1); +spiderLine=7340247; +} else { +spiderLine=7340247; +spiderLine=7340248; +if (spider_IsImage_DEBUG(desktop$a_AppRegistry.array[v_slot]._IconImg)) { +spiderLine=7340248; +spider_FreeImage_DEBUG(desktop$a_AppRegistry.array[v_slot]._IconImg); +} +spiderLine=7340248; +} +spiderLine=7340249; +spiderLine=7340251; +v_appname=v_appid; +spiderLine=7340252; +if (spider_ParseJSON_DEBUG(0,v_manifestjson)) { +spiderLine=7340253; +v_n=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(spider_JSONValue_DEBUG(0),_S42)); +spiderLine=7340254; +if (v_n!=_S3) { +spiderLine=7340254; +v_appname=v_n; +} +spiderLine=7340254; +spiderLine=7340255; +spider_FreeJSON_DEBUG(0); +} +spiderLine=7340256; +spiderLine=7340258; +desktop$a_AppRegistry.array[v_slot]._Name=v_appname; +spiderLine=7340259; +desktop$a_AppRegistry.array[v_slot]._ID=v_appid; +(function() { + var _id = v_appid, _m = v_manifestjson, _p = v_permissions; + desktop$a_AppRegistry.array[v_slot]._Proc = function() { + appruntime$f_launch(_id, _m, _p); + }; +})(); +spiderLine=7340268; +v_label=v_icon; +spiderLine=7340269; +if (v_label==_S3) { +spiderLine=7340269; +v_label=_S40; +} +spiderLine=7340269; +spiderLine=7340270; +desktop$a_AppRegistry.array[v_slot]._IconImg=desktop$f__makeiconimage(v_label,22,0); +spiderLine=7340272; +desktop$f__rebuildmenu(); +spiderLine=7340273; +return 0; +} +function desktop$f__rebuildmenu() { +var v_h=0; +spiderLine=7340362; +spiderLine=7340363; +v_h=desktop$f__menuheight(); +spiderLine=7340364; +if (spider_IsWindow_DEBUG(desktop$g_startmenuwindow)) { +spiderLine=7340364; +spider_ResizeWindow_DEBUG(desktop$g_startmenuwindow,-65535,-65535,240,v_h); +} +spiderLine=7340364; +spiderLine=7340365; +if (spider_IsGadget_DEBUG(desktop$g__menucanvas)) { +spiderLine=7340365; +spider_ResizeGadget_DEBUG(desktop$g__menucanvas,0,0,240,v_h); +} +spiderLine=7340365; +spiderLine=7340366; +desktop$f__drawmenu(); +spiderLine=7340367; +return 0; +} +function desktop$f_unregister(v_win) { +spiderLine=7340222; +spiderLine=7340223; +if (!(desktop$f__findbywindow(v_win))) { +spiderLine=7340223; +if (1) return 0; +} +spiderLine=7340223; +spiderLine=7340224; +spider_UnbindEvent(4,desktop$f_handler_appclose,v_win); +spiderLine=7340225; +spider_UnbindEvent(8,desktop$f_handler_appactivate,v_win); +spiderLine=7340226; +spider_UnbindGadgetEvent_DEBUG(desktop$t_WindowManager.current._Button,desktop$f_handler_taskbarbutton); +spiderLine=7340227; +spider_FreeGadget_DEBUG(desktop$t_WindowManager.current._Button); +spiderLine=7340228; +spider_CloseWindow_DEBUG(v_win); +spiderLine=7340229; +spider_DeleteElement_DEBUG(desktop$t_WindowManager); +spiderLine=7340230; +if (desktop$g__activewindow==v_win) { +spiderLine=7340230; +desktop$g__activewindow=spider_GetActiveWindow_DEBUG(); +} +spiderLine=7340230; +spiderLine=7340231; +desktop$f__rebuildbuttons(); +spiderLine=7340232; +return 0; +} +function desktop$f_open(v_username) { +var v_width=0; +var v_height=0; +var p_appproc=0; +spiderLine=7340130;;;; +spiderLine=7340134; +v_width=spider_DesktopWidth_DEBUG(0); +spiderLine=7340135; +v_height=spider_DesktopHeight_DEBUG(0); +spiderLine=7340138; +desktop$g__iconsettings=desktop$f__makeiconimage(_S32,22,desktop$g_color_logout_icon); +spiderLine=7340139; +desktop$g__iconlogout=desktop$f__makeiconimage(_S33,22,desktop$g_color_logout_icon); +spiderLine=7340141; +desktop$g_taskbarwindow=spider_OpenWindow_DEBUG(-1,0,0,72,v_height,_S3,512); +spiderLine=7340142; +spider_BindEvent_DEBUG(8,desktop$f_handler_appactivate,desktop$g_taskbarwindow); +spiderLine=7340143; +spider_StickyWindow_DEBUG(desktop$g_taskbarwindow,1); +spiderLine=7340144; +spider_SetWindowColor_DEBUG(desktop$g_taskbarwindow,desktop$g_color_bar_bg); +spiderLine=7340146; +desktop$g_startbutton=spider_ButtonGadget_DEBUG(-1,0,0,72,40,_S34); +spiderLine=7340147; +spider_BindGadgetEvent_DEBUG(desktop$g_startbutton,desktop$f_handler_startbutton); +spiderLine=7340149; +desktop$g_clocklabel=spider_TextGadget_DEBUG(-1,0,(v_height+-40),72,40,_S3,9); +spiderLine=7340150; +spider_SetGadgetColor_DEBUG(desktop$g_clocklabel,1,desktop$g_color_menu_text); +spiderLine=7340151; +desktop$f_handler_clock(); +spiderLine=7340152; +spider_AddWindowTimer_DEBUG(desktop$g_taskbarwindow,0,1000); +spiderLine=7340153; +spider_BindEvent_DEBUG(12,desktop$f_handler_clock,desktop$g_taskbarwindow); +spiderLine=7340155; +desktop$g_startmenuwindow=spider_OpenWindow_DEBUG(-1,76,0,240,100,_S3,768); +spiderLine=7340156; +spider_StickyWindow_DEBUG(desktop$g_startmenuwindow,1); +spiderLine=7340157; +desktop$g__menucanvas=spider_CanvasGadget_DEBUG(-1,0,0,240,100); +spiderLine=7340158; +spider_BindGadgetEvent_DEBUG(desktop$g__menucanvas,desktop$f_handler_menucanvas); +spiderLine=7340160; +spider_BindEvent_DEBUG(21,desktop$f_handler_resize); +spiderLine=7340161; +spider_BindEvent_DEBUG(16,desktop$f_handler_startmenu_focus,desktop$g_startmenuwindow); +spiderLine=7340163; +appruntime$f_init(); +p_appproc = fileexplorer$f_open; +spiderLine=7340165; +desktop$f_installapp(_S35,p_appproc,_S36); +p_appproc = webbrowser$f_open; +spiderLine=7340167; +desktop$f_installapp(_S37,p_appproc,_S38); +p_appproc = appmanager$f_open; +spiderLine=7340169; +desktop$f_installapp(_S39,p_appproc,_S40); +spiderLine=7340170; +desktop$f_handler_resize(); +spiderLine=7340172; +spider_HTTPRequest(0,_S41,_S3,desktop$f__loadinstalledappscallback); +spiderLine=7340173; +return 0; +} +function desktop$f__makeiconimage(v_label,v_size,v_color) { +var v_img=0; +var v_th=0; +var v_tw=0; +spiderLine=7340301;;;; +spiderLine=7340305; +v_img=spider_CreateImage_DEBUG(-1,v_size,v_size,32,spider_RGBA_DEBUG(0,0,0,0)); +spiderLine=7340306; +if (!(spider_IsImage_DEBUG(v_img))) { +spiderLine=7340306; +if (1) return 0; +} +spiderLine=7340306; +spiderLine=7340307; +if (spider_StartVectorDrawing_DEBUG(spider_ImageVectorOutput_DEBUG(v_img))) { +spiderLine=7340308; +spider_VectorFont_DEBUG(desktop$g_iconfont,(v_size*0.65000000000000002220446049250313080847263336181640625)); +spiderLine=7340309; +if (v_color==0) { +spiderLine=7340310; +spider_VectorSourceColor_DEBUG(desktop$g_color_icon); +spiderLine=7340311; +} else { +spiderLine=7340311; +spiderLine=7340312; +spider_VectorSourceColor_DEBUG(v_color); +} +spiderLine=7340313; +spiderLine=7340314; +v_tw=spider_VectorTextWidth_DEBUG(v_label); +spiderLine=7340315; +v_th=spider_VectorTextHeight_DEBUG(v_label); +spiderLine=7340324; +spider_MovePathCursor_DEBUG(((((v_size-v_tw))/2)),(v_size-(((v_th/2))))); +spiderLine=7340325; +spider_DrawVectorText_DEBUG(v_label); +spiderLine=7340326; +spider_StopVectorDrawing_DEBUG(); +} +spiderLine=7340327; +spiderLine=7340328; +if (1) return v_img; +spiderLine=7340329; +return 0; +} +function desktop$f_handler_startbutton() { +spiderLine=7340537; +spiderLine=7340538; +spider_HideWindow_DEBUG(desktop$g_startmenuwindow,0); +spiderLine=7340539; +spider_SetActiveWindow_DEBUG(desktop$g_startmenuwindow); +spiderLine=7340540; +return 0; +} +function desktop$f_uninstallthirdpartyapp(v_appid) { +var v_i=0; +var v_j=0; +spiderLine=7340275;;; +spiderLine=7340277; +v_i=0; +for (;(desktop$g__appcount+-1)>=v_i;v_i+=1) { +spiderLine=7340278; +if (desktop$a_AppRegistry.array[v_i]._ID==v_appid) { +spiderLine=7340279; +if (spider_IsImage_DEBUG(desktop$a_AppRegistry.array[v_i]._IconImg)) { +spiderLine=7340279; +spider_FreeImage_DEBUG(desktop$a_AppRegistry.array[v_i]._IconImg); +} +spiderLine=7340279; +spiderLine=7340281; +v_j=v_i; +for (;(desktop$g__appcount+-2)>=v_j;v_j+=1) { +spiderLine=7340282; +desktop$a_AppRegistry.array[v_j]._Name=desktop$a_AppRegistry.array[(v_j+1)]._Name; +spiderLine=7340283; +desktop$a_AppRegistry.array[v_j]._ID=desktop$a_AppRegistry.array[(v_j+1)]._ID; +spiderLine=7340284; +desktop$a_AppRegistry.array[v_j]._IconImg=desktop$a_AppRegistry.array[(v_j+1)]._IconImg; +spiderLine=7340285; +desktop$a_AppRegistry.array[v_j]._Proc=desktop$a_AppRegistry.array[(v_j+1)]._Proc; +desktop$a_AppRegistry.array[v_j]._Proc = desktop$a_AppRegistry.array[v_j + 1]._Proc; +spiderLine=7340287; +} +spiderLine=7340288; +desktop$a_AppRegistry.array[(desktop$g__appcount+-1)]._Name=_S3; +spiderLine=7340289; +desktop$a_AppRegistry.array[(desktop$g__appcount+-1)]._ID=_S3; +spiderLine=7340290; +desktop$a_AppRegistry.array[(desktop$g__appcount+-1)]._IconImg=0; +spiderLine=7340291; +desktop$a_AppRegistry.array[(desktop$g__appcount+-1)]._Proc=0; +desktop$a_AppRegistry.array[desktop$g__appcount]._Proc = 0; +spiderLine=7340293; +desktop$g__appcount=(desktop$g__appcount+-1); +spiderLine=7340294; +desktop$f__rebuildmenu(); +spiderLine=7340295; +if (1) return 0; +} +spiderLine=7340296; +spiderLine=7340297; +} +spiderLine=7340298; +return 0; +} +function desktop$f_handler_appactivate() { +var v_win=0; +spiderLine=7340624; +spiderLine=7340625; +v_win=spider_EventWindow_DEBUG(); +spiderLine=7340626; +if (v_win==desktop$g_taskbarwindow) { +spiderLine=7340626; +if (1) return 0; +} +spiderLine=7340626; +spiderLine=7340627; +desktop$g__activewindow=v_win; +spiderLine=7340628; +desktop$f__setactivebutton(); +spiderLine=7340629; +return 0; +} +function desktop$f_handler_taskbarbutton() { +var v_win=0; +var v_btn=0; +spiderLine=7340594;;; +spiderLine=7340596; +if (spider_EventType()!=65541) { +spiderLine=7340596; +if (1) return 0; +} +spiderLine=7340596; +spiderLine=7340597; +v_btn=spider_EventGadget_DEBUG(); +spiderLine=7340598; +v_win=spider_GetGadgetData_DEBUG(v_btn); +spiderLine=7340599; +if (!(spider_IsWindow_DEBUG(v_win))) { +spiderLine=7340599; +if (1) return 0; +} +spiderLine=7340599; +spiderLine=7340600; +if (desktop$g__activewindow==v_win) { +spiderLine=7340601; +spider_HideWindow_DEBUG(v_win,1); +spiderLine=7340602; +desktop$g__activewindow=0; +spiderLine=7340603; +} else { +spiderLine=7340603; +spiderLine=7340604; +spider_HideWindow_DEBUG(v_win,0); +spiderLine=7340605; +spider_SetActiveWindow_DEBUG(v_win); +spiderLine=7340606; +desktop$g__activewindow=v_win; +} +spiderLine=7340607; +spiderLine=7340608; +desktop$f__setactivebutton(); +spiderLine=7340609; +return 0; +} +function desktop$f__loadinstalledappscallback(v_success,v_datastring) { +var v_permcount=0; +var v_icon=""; +var v_i=0; +var v_j=0; +var v_manistr=""; +var v_maninode=0; +var v_root=0; +var v_permnode=0; +var v_item=0; +var v_appid=""; +var v_total=0; +var v_perms=""; +spiderLine=7340489;;;;;;;;;;;;; +spiderLine=7340493; +if (!(v_success) || !(spider_ParseJSON_DEBUG(0,v_datastring))) { +spiderLine=7340493; +if (1) return 0; +} +spiderLine=7340493; +spiderLine=7340494; +v_root=spider_JSONValue_DEBUG(0); +spiderLine=7340495; +v_total=spider_JSONArraySize_DEBUG(v_root); +spiderLine=7340497; +v_i=0; +for (;(v_total+-1)>=v_i;v_i+=1) { +spiderLine=7340498; +v_item=spider_GetJSONElement_DEBUG(v_root,v_i); +spiderLine=7340499; +v_maninode=spider_GetJSONMember_DEBUG(v_item,_S44); +spiderLine=7340500; +v_appid=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_item,_S45)); +spiderLine=7340501; +v_icon=spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S46)); +spiderLine=7340503; +v_permnode=spider_GetJSONMember_DEBUG(v_item,_S47); +spiderLine=7340504; +v_permcount=spider_JSONArraySize_DEBUG(v_permnode); +spiderLine=7340505; +v_perms=_S48; +spiderLine=7340506; +v_j=0; +for (;(v_permcount+-1)>=v_j;v_j+=1) { +spiderLine=7340507; +if (v_j>0) { +spiderLine=7340507; +v_perms=v_perms+_S49; +} +spiderLine=7340507; +spiderLine=7340508; +v_perms=v_perms+_S50+spider_GetJSONString_DEBUG(spider_GetJSONElement_DEBUG(v_permnode,v_j))+_S50; +spiderLine=7340509; +} +spiderLine=7340510; +v_perms=v_perms+_S51; +spiderLine=7340518; +v_manistr=_S52+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S53))+_S54+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S42))+_S55+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S56))+_S57+spider_ReplaceString_DEBUG(v_icon,_S50,_S58)+_S59+spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_maninode,_S60))+_S61; +spiderLine=7340520; +desktop$f_installthirdpartyapp(v_appid,v_manistr,v_perms,v_icon); +spiderLine=7340521; +} +spiderLine=7340522; +spider_FreeJSON_DEBUG(0); +spiderLine=7340523; +return 0; +} +function desktop$f_handler_clock() { +spiderLine=7340533; +spiderLine=7340534; +spider_SetGadgetText_DEBUG(desktop$g_clocklabel,spider_FormatDate(_S62,spider_Date())); +spiderLine=7340535; +return 0; +} +function desktop$f__findbybutton(v_btn) { +spiderLine=7340449; +spiderLine=7340450; +spider_ResetList(desktop$t_WindowManager); while (spider_NextElement(desktop$t_WindowManager)) { +spiderLine=7340450; +spiderLine=7340451; +if (desktop$t_WindowManager.current._Button==v_btn) { +spiderLine=7340451; +if (1) return 1; +} +spiderLine=7340451; +spiderLine=7340452; +} +spiderLine=7340453; +return 0; +} +function desktop$f_register(v_appname,v_win,v_icon) { +var v_y=0; +var v_label=""; +var v_btn=0; +var v_gadgetlist=0; +spiderLine=7340193;;;;; +spiderLine=7340197; +spider_AddElement_DEBUG(desktop$t_WindowManager); +spiderLine=7340198; +desktop$t_WindowManager.current._Window=v_win; +spiderLine=7340199; +desktop$t_WindowManager.current._Name=v_appname; +spiderLine=7340201; +v_label=v_icon; +spiderLine=7340202; +if (v_label==_S3) { +spiderLine=7340202; +v_label=spider_Left(v_appname,2); +} +spiderLine=7340202; +spiderLine=7340203; +desktop$t_WindowManager.current._Icon=desktop$f__makeiconimage(v_label,28,0); +spiderLine=7340205; +v_y=(((spider_ListIndex_DEBUG(desktop$t_WindowManager)*40))+40); +spiderLine=7340206; +v_gadgetlist=spider_UseGadgetList_DEBUG(spider_WindowID_DEBUG(desktop$g_taskbarwindow)); +spiderLine=7340207; +v_btn=spider_CanvasGadget_DEBUG(-1,0,v_y,72,40); +spiderLine=7340208; +spider_UseGadgetList_DEBUG(v_gadgetlist); +spiderLine=7340210; +desktop$t_WindowManager.current._Button=v_btn; +spiderLine=7340211; +spider_SetGadgetData_DEBUG(v_btn,v_win); +spiderLine=7340212; +spider_SetWindowData_DEBUG(v_win,v_btn); +spiderLine=7340214; +spider_BindGadgetEvent_DEBUG(v_btn,desktop$f_handler_taskbarbutton); +spiderLine=7340215; +spider_BindEvent_DEBUG(4,desktop$f_handler_appclose,v_win); +spiderLine=7340216; +spider_BindEvent_DEBUG(8,desktop$f_handler_appactivate,v_win); +spiderLine=7340218; +desktop$g__activewindow=v_win; +spiderLine=7340219; +desktop$f__setactivebutton(); +spiderLine=7340220; +return 0; +} +function desktop$f_handler_startmenu_focus() { +spiderLine=7340542; +spiderLine=7340543; +desktop$f__closemenu(); +spiderLine=7340544; +return 0; +} +function desktop$f_installapp(v_appname,p_launchproc,v_icon) { +var v_slot=0; +var v_label=""; +spiderLine=7340175;;; +spiderLine=7340179; +if (desktop$g__appcount>=32) { +spiderLine=7340179; +if (1) return 0; +} +spiderLine=7340179; +spiderLine=7340181; +v_slot=desktop$g__appcount; +spiderLine=7340182; +v_label=v_icon; +spiderLine=7340183; +if (v_label==_S3) { +spiderLine=7340183; +v_label=spider_Left(v_appname,2); +} +spiderLine=7340183; +spiderLine=7340185; +desktop$a_AppRegistry.array[v_slot]._Name=v_appname; +spiderLine=7340186; +desktop$a_AppRegistry.array[v_slot]._Proc=p_launchproc; +spiderLine=7340187; +desktop$a_AppRegistry.array[v_slot]._IconImg=desktop$f__makeiconimage(v_label,22,0); +spiderLine=7340189; +desktop$g__appcount=(desktop$g__appcount+1); +spiderLine=7340190; +desktop$f__rebuildmenu(); +spiderLine=7340191; +return 0; +} +function desktop$f__menuheight() { +var v_minh=0; +var v_righth=0; +spiderLine=7340331; +spiderLine=7340332; +v_righth=((desktop$g__appcount*44)+40); +spiderLine=7340333; +v_minh=104; +spiderLine=7340334; +if (v_righth=v_settingsy && v_my=v_logouty && v_my=0 && v_ry<(desktop$g__appcount*44)) { +spiderLine=7340356; +if (1) return ((v_ry/44)|0); +} +spiderLine=7340357; +} +spiderLine=7340358; +spiderLine=7340359; +if (1) return -1; +spiderLine=7340360; +return 0; +} +function desktop$f__findbywindow(v_win) { +spiderLine=7340443; +spiderLine=7340444; +spider_ResetList(desktop$t_WindowManager); while (spider_NextElement(desktop$t_WindowManager)) { +spiderLine=7340444; +spiderLine=7340445; +if (desktop$t_WindowManager.current._Window==v_win) { +spiderLine=7340445; +if (1) return 1; +} +spiderLine=7340445; +spiderLine=7340446; +} +spiderLine=7340447; +return 0; +} +function desktop$f_handler_resize() { +var v_width=0; +var v_height=0; +spiderLine=7340526; +spiderLine=7340527; +v_width=spider_DesktopWidth_DEBUG(0); +spiderLine=7340528; +v_height=spider_DesktopHeight_DEBUG(0); +spiderLine=7340529; +spider_ResizeWindow_DEBUG(desktop$g_taskbarwindow,0,0,72,v_height); +spiderLine=7340530; +spider_ResizeGadget_DEBUG(desktop$g_clocklabel,0,(v_height+-40),72,40); +spiderLine=7340531; +return 0; +} +function desktop$f_handler_menucanvas() { +var v_mx=0; +var v_my=0; +var v_hit=0; +var v_etype=0; +spiderLine=7340554;;;;; +spiderLine=7340557; +v_etype=spider_EventType(); +spiderLine=7340558; +v_mx=spider_GetGadgetAttribute_DEBUG(desktop$g__menucanvas,2); +spiderLine=7340559; +v_my=spider_GetGadgetAttribute_DEBUG(desktop$g__menucanvas,3); +spiderLine=7340560; +v_hit=desktop$f__hittest(v_mx,v_my); +spiderLine=7340562; +var sb_select2=v_etype; +spiderLine=7340563; +if (sb_select2==65539) { +spiderLine=7340564; +if (v_hit!=desktop$g__menuhover) { +spiderLine=7340565; +desktop$g__menuhover=v_hit; +spiderLine=7340566; +desktop$f__drawmenu(); +} +spiderLine=7340567; +spiderLine=7340569; +} else if (sb_select2==65538) { +spiderLine=7340570; +if (desktop$g__menuhover!=-1) { +spiderLine=7340571; +desktop$g__menuhover=-1; +spiderLine=7340572; +desktop$f__drawmenu(); +} +spiderLine=7340573; +spiderLine=7340575; +} else if (sb_select2==65541) { +spiderLine=7340576; +var sb_select3=v_hit; +spiderLine=7340577; +if (sb_select3==-2) { +spiderLine=7340578; +desktop$f__closemenu(); +settings$f_open(); +spiderLine=7340581; +} else if (sb_select3==-3) { +spiderLine=7340582; +desktop$f__closemenu(); +spiderLine=7340583; +desktop$f_handler_logout(); +spiderLine=7340585; +} else { +spiderLine=7340585; +spiderLine=7340586; +if (v_hit>=0 && v_hit=v_i;v_i+=1) { +spiderLine=7340417; +if (desktop$g__menuhover==v_i) { +spiderLine=7340418; +spider_DrawingMode_DEBUG(0); +spiderLine=7340419; +spider_Box_DEBUG(53,v_y,(v_w+-53),44,desktop$g_color_menu_hover); +} +spiderLine=7340420; +spiderLine=7340421; +if (spider_IsImage_DEBUG(desktop$a_AppRegistry.array[v_i]._IconImg)) { +spiderLine=7340422; +v_ix=64; +spiderLine=7340423; +v_iy=(v_y+11); +spiderLine=7340424; +spider_DrawAlphaImage_DEBUG(spider_ImageID_DEBUG(desktop$a_AppRegistry.array[v_i]._IconImg),v_ix,v_iy); +} +spiderLine=7340425; +spiderLine=7340426; +spider_DrawingMode_DEBUG(1); +spiderLine=7340427; +v_th=spider_BankerRound(spider_TextHeight_DEBUG(_S31)); +spiderLine=7340430; +spider_DrawText_DEBUG(94,(v_y+(((((-(v_th))+44))/2))),desktop$a_AppRegistry.array[v_i]._Name,desktop$g_color_menu_text); +spiderLine=7340431; +v_y=(v_y+44); +spiderLine=7340432; +} +spiderLine=7340434; +spider_StopDrawing_DEBUG(); +spiderLine=7340435; +return 0; +} +function desktop$f_logoutcallback(v_success,v_response) { +spiderLine=7340550; +location.reload() +spiderLine=7340552; +return 0; +} +function desktop$f__closemenu() { +spiderLine=7340437; +spiderLine=7340438; +spider_HideWindow_DEBUG(desktop$g_startmenuwindow,1); +spiderLine=7340439; +desktop$g__menuhover=-1; +spiderLine=7340440; +desktop$f__drawmenu(); +spiderLine=7340441; +return 0; +} +function desktop$f_handler_appclose() { +var v_win=0; +spiderLine=7340611; +spiderLine=7340612; +v_win=spider_EventWindow_DEBUG(); +spiderLine=7340613; +if (!(desktop$f__findbywindow(v_win))) { +spiderLine=7340613; +if (1) return 0; +} +spiderLine=7340613; +spiderLine=7340614; +spider_UnbindEvent(4,desktop$f_handler_appclose,v_win); +spiderLine=7340615; +spider_UnbindEvent(8,desktop$f_handler_appactivate,v_win); +spiderLine=7340616; +spider_UnbindGadgetEvent_DEBUG(desktop$t_WindowManager.current._Button,desktop$f_handler_taskbarbutton); +spiderLine=7340617; +spider_FreeGadget_DEBUG(desktop$t_WindowManager.current._Button); +spiderLine=7340618; +spider_DeleteElement_DEBUG(desktop$t_WindowManager); +spiderLine=7340619; +if (desktop$g__activewindow==v_win) { +spiderLine=7340619; +desktop$g__activewindow=spider_GetActiveWindow_DEBUG(); +} +spiderLine=7340619; +spiderLine=7340620; +desktop$f__rebuildbuttons(); +spiderLine=7340621; +spider_CloseWindow_DEBUG(v_win); +spiderLine=7340622; +return 0; +} +// +SpiderLaunch = function() { + spider.debug.Init(); + spider_InitFunctions(); +spiderLine=1048576; +window._kumos_idb = null; +spiderLine=1048732; +spiderLine=2097152; +spiderLine=2097212; +spiderLine=3145728; +spiderLine=3145767; +spiderLine=4194304; +spiderLine=4194461; +spiderLine=5242880;;;;;;;;; +spiderLine=5243122; +spiderLine=6291456; +spiderLine=6291468; +notify$g__font=spider_LoadFont_DEBUG(-1,_S27,12); +spiderLine=6291471; +spider_Dim(notify$a__Wins,21,[5],null);; +spiderLine=6291472; +spider_Dim(notify$a__Canvases,21,[5],null);; +spiderLine=6291473; +spider_Dim(notify$a__Types,21,[5],null);; +spiderLine=6291474; +spider_Dim(notify$a__Messages,8,[5],null);;;;;;; +spiderLine=6291688; +spiderLine=7340032; +spiderLine=7340055; +desktop$g_color_bar_bg=spider_RGB_DEBUG(28,28,40); +spiderLine=7340056; +desktop$g_color_bar_active=spider_RGB_DEBUG(52,52,72); +spiderLine=7340057; +desktop$g_color_accent=spider_RGB_DEBUG(100,120,255); +spiderLine=7340058; +desktop$g_color_icon=spider_RGBA_DEBUG(220,220,220,255); +spiderLine=7340059; +desktop$g_color_menu_bg=spider_RGB_DEBUG(36,36,52); +spiderLine=7340060; +desktop$g_color_menu_rail=spider_RGB_DEBUG(22,22,34); +spiderLine=7340061; +desktop$g_color_menu_header=spider_RGB_DEBUG(22,22,34); +spiderLine=7340062; +desktop$g_color_menu_hover=spider_RGB_DEBUG(55,55,78); +spiderLine=7340063; +desktop$g_color_menu_sep=spider_RGB_DEBUG(48,48,65); +spiderLine=7340064; +desktop$g_color_menu_text=spider_RGB_DEBUG(200,200,215); +spiderLine=7340065; +desktop$g_color_menu_dim=spider_RGB_DEBUG(110,110,135); +spiderLine=7340066; +desktop$g_color_logout_hover=spider_RGB_DEBUG(65,30,35); +spiderLine=7340067; +desktop$g_color_logout_icon=spider_RGBA_DEBUG(200,90,90,255); +spiderLine=7340069; +desktop$g_iconfont=spider_LoadFont_DEBUG(-1,_S27,18); +spiderLine=7340070; +desktop$g_menufont=spider_LoadFont_DEBUG(-1,_S27,13);;;;; +spiderLine=7340086; +spider_Dim(desktop$a_AppRegistry,7,[32],desktop$app);;;; +spiderLine=7340089; +desktop$g__menuhover=-1;;;; +spiderLine=7340103; +desktop$t_WindowManager=spider_NewList(desktop$window,"object",false);; +spiderLine=7340633; +spiderLine=8388608;;;;;;; +spiderLine=8388684; +spiderLine=9437184; +spiderLine=9437196; +appruntime$t_Instances=spider_NewList(appruntime$instance,"object",false);; +spiderLine=9437197; +appruntime$g__nextid=1; +spiderLine=9437202; +appruntime$g__pl_id=-1; +spiderLine=9437202; +appruntime$g__pl_kmid=_S3; +spiderLine=9437203; +appruntime$g__ps_id=-1; +spiderLine=9437203; +appruntime$g__ps_kmid=_S3; +spiderLine=9437204; +appruntime$g__psr_id=-1; +spiderLine=9437204; +appruntime$g__psr_kmid=_S3; +spiderLine=9437205; +appruntime$g__pr_id=-1; +spiderLine=9437205; +appruntime$g__pr_kmid=_S3; +spiderLine=9437206; +appruntime$g__pw_id=-1; +spiderLine=9437206; +appruntime$g__pw_kmid=_S3; +spiderLine=9437207; +appruntime$g__pc_id=-1; +spiderLine=9437207; +appruntime$g__pc_kmid=_S3; +spiderLine=9437584; +spiderLine=10485760; +spiderLine=10485770; +spider_Dim(texteditor$a__Windows,21,[16],null);; +spiderLine=10485771; +spider_Dim(texteditor$a__Editors,21,[16],null);; +spiderLine=10485772; +spider_Dim(texteditor$a__SaveBtns,21,[16],null);; +spiderLine=10485773; +spider_Dim(texteditor$a__FileIDs,8,[16],null);; +spiderLine=10485774; +spider_Dim(texteditor$a__Paths,8,[16],null);; +spiderLine=10485775; +spider_Dim(texteditor$a__Dirty,21,[16],null);; +spiderLine=10485776; +spider_Dim(texteditor$a__Saving,21,[16],null);; +spiderLine=10485777; +texteditor$g__count=0; +spiderLine=10485778; +texteditor$g__loading_slot=-1; +spiderLine=10485779; +texteditor$g__closingslot=-1; +spiderLine=10485968; +spiderLine=11534336;;;;;;;; +spiderLine=11534360; +fileexplorer$g_currentpath=_S19; +spiderLine=11534361; +spider_Dim(fileexplorer$a_PathStack,8,[64],null);; +spiderLine=11534362; +fileexplorer$g_stackdepth=0; +spiderLine=11534365; +spider_Dim(fileexplorer$a_EntryIDs,8,[512],null);; +spiderLine=11534366; +spider_Dim(fileexplorer$a_EntryNames,8,[512],null);; +spiderLine=11534367; +spider_Dim(fileexplorer$a_EntryIsDir,21,[512],null);; +spiderLine=11534368; +fileexplorer$g_entrycount=0; +spiderLine=11534371; +fileexplorer$g_inputwindow=0;;;;; +spiderLine=11534628; +spiderLine=12582912; +spiderLine=12582925; +settings$g_color_panel_bg=spider_RGB_DEBUG(22,22,34); +spiderLine=12582926; +settings$g_color_sel=spider_RGB_DEBUG(52,52,72); +spiderLine=12582927; +settings$g_color_hover=spider_RGB_DEBUG(40,40,58); +spiderLine=12582928; +settings$g_color_accent=spider_RGB_DEBUG(100,120,255); +spiderLine=12582929; +settings$g_color_content_bg=spider_RGB_DEBUG(36,36,52); +spiderLine=12582930; +settings$g_color_sep=spider_RGB_DEBUG(48,48,65); +spiderLine=12582931; +settings$g_color_text=spider_RGB_DEBUG(200,200,215); +spiderLine=12582932; +settings$g_color_dim=spider_RGB_DEBUG(110,110,135); +spiderLine=12582934; +settings$g_panelfont=spider_LoadFont_DEBUG(-1,_S27,13); +spiderLine=12582945; +spider_Dim(settings$a__SectionNames,8,[1],null);;;;; +spiderLine=12582951; +settings$g__panelhover=-1;;;;;;;; +spiderLine=12583159; +spiderLine=13631488; +spiderLine=13631499; +webbrowser$g_window=0;;; +spiderLine=13631552; +spiderLine=14680064; +spiderLine=14680079; +appmanager$g_color_bg=spider_RGB_DEBUG(22,22,34); +spiderLine=14680080; +appmanager$g_color_row_odd=spider_RGB_DEBUG(28,28,42); +spiderLine=14680081; +appmanager$g_color_row_even=spider_RGB_DEBUG(22,22,34); +spiderLine=14680082; +appmanager$g_color_sel=spider_RGB_DEBUG(52,52,72); +spiderLine=14680083; +appmanager$g_color_accent=spider_RGB_DEBUG(100,120,255); +spiderLine=14680084; +appmanager$g_color_text=spider_RGB_DEBUG(200,200,215); +spiderLine=14680085; +appmanager$g_color_dim=spider_RGB_DEBUG(110,110,135); +spiderLine=14680086; +appmanager$g_color_sep=spider_RGB_DEBUG(48,48,65); +spiderLine=14680088; +appmanager$g_font_ui=spider_LoadFont_DEBUG(-1,_S27,13); +spiderLine=14680089; +appmanager$g_font_small=spider_LoadFont_DEBUG(-1,_S27,11); +spiderLine=14680099; +appmanager$t__Apps=spider_NewList(appmanager$installedapp,"object",false);; +spiderLine=14680102; +appmanager$g_window=0;;;;;; +spiderLine=14680108; +appmanager$g__hover=-1; +spiderLine=14680109; +appmanager$g__selected=-1; +spiderLine=14680110; +appmanager$g__pendinguninstall=_S3; +spiderLine=14680113; +appmanager$g__inputwin=0;;;; +spiderLine=14680465; +spiderLine=27; +general$f_init(); +spiderLine=29; + +} + + +function spider_InitFunctions() { +spider_InitMap(); +spider_InitImageDecoder(); +spider_InitImage(); +spider_Init2DDrawing(); +spider_InitArray(); +spider_InitDesktop(); +spider_Event_Init(); +spider_InitFont(); +spider_InitWindow(); +spider_InitList(); +spider_InitGadget(); +spider_InitJSON(); +} + + +spider.nbLoadedModules++ + + diff --git a/Server/www/kumos.js b/Server/www/kumos.js new file mode 100644 index 0000000..e2569e8 --- /dev/null +++ b/Server/www/kumos.js @@ -0,0 +1,124 @@ +/** + * KUMO.S App SDK — include in your app with: + * + * + * All methods return Promises. Call KUMOS.ready() first. + * + * Permissions required per namespace: + * storage.* — always available (private app namespace) + * fs.* — requires "fs.read" or "fs.write" grant + * notify.* — requires "notify" grant + * window.* — always available + */ +(function (global) { + 'use strict'; + + var _pending = {}; // kmid → { resolve, reject, timer } + + // ── Internal helpers ────────────────────────────────────────────────────── + + function _uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0; + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); + }); + } + + function _send(action, args) { + return new Promise(function (resolve, reject) { + var kmid = _uuid(); + var timer = setTimeout(function () { + if (_pending[kmid]) { + delete _pending[kmid]; + reject(new Error('KUMOS timeout: ' + action)); + } + }, 15000); + _pending[kmid] = { resolve: resolve, reject: reject, timer: timer }; + window.parent.postMessage( + JSON.stringify({ kmid: kmid, action: action, args: args || {} }), + '*' + ); + }); + } + + // Incoming responses from the shell + window.addEventListener('message', function (e) { + if (e.source !== window.parent) return; + var msg; + try { msg = JSON.parse(e.data); } catch (err) { return; } + if (!msg || !msg.kmid) return; + var p = _pending[msg.kmid]; + if (!p) return; + clearTimeout(p.timer); + delete _pending[msg.kmid]; + if (msg.success) { + p.resolve(msg.data !== undefined ? msg.data : null); + } else { + p.reject(new Error(msg.error || 'Unknown error')); + } + }); + + // ── Public API ──────────────────────────────────────────────────────────── + + var KUMOS = { + + /** + * Handshake with the shell. Resolves with { app_id }. + * Always call this first and await it before using any other APIs. + */ + ready: function () { + return _send('window.ready', {}); + }, + + // ── Private app storage (no extra permission required) ─────────────── + + storage: { + /** Read a file. Resolves with the content string. */ + read: function (path) { return _send('storage.read', { path: path }); }, + /** Write content to a file. Creates it if it does not exist. */ + write: function (path, content) { return _send('storage.write', { path: path, content: content }); }, + /** List a directory. Resolves with an array of entry objects. */ + list: function (path) { return _send('storage.list', { path: path || '/' }); }, + /** Stat a path. */ + stat: function (path) { return _send('storage.stat', { path: path }); }, + /** Create a directory. */ + mkdir: function (path) { return _send('storage.mkdir', { path: path }); }, + /** Delete a file. */ + delete: function (path) { return _send('storage.delete', { path: path }); } + }, + + // ── User filesystem (requires fs.read / fs.write permission) ───────── + + fs: { + /** Read a file from the user's filesystem. */ + read: function (path) { return _send('fs.read', { path: path }); }, + /** Write content to a file in the user's filesystem. */ + write: function (path, content) { return _send('fs.write', { path: path, content: content }); }, + /** List a directory. */ + list: function (path) { return _send('fs.list', { path: path || '/' }); }, + /** Stat a path. */ + stat: function (path) { return _send('fs.stat', { path: path }); } + }, + + // ── Notifications (requires notify permission) ──────────────────────── + + notify: { + /** Show a toast. type: 'info' | 'success' | 'warning' | 'error' */ + toast: function (message, type) { return _send('notify.toast', { message: message, type: type || 'info' }); }, + /** Show a confirm dialog. Resolves with true (OK) or false (Cancel). */ + confirm: function (title, message) { return _send('notify.confirm', { title: title, message: message }); } + }, + + // ── Window control ──────────────────────────────────────────────────── + + window: { + /** Update the host window title. */ + setTitle: function (title) { return _send('window.setTitle', { title: title }); }, + /** Close this app instance. */ + close: function () { return _send('window.close', {}); } + } + }; + + global.KUMOS = KUMOS; + +}(window)); diff --git a/Server/www/spiderbasic/canvas-toBlob.min.js b/Server/www/spiderbasic/canvas-toBlob.min.js new file mode 100644 index 0000000..6f9dd30 --- /dev/null +++ b/Server/www/spiderbasic/canvas-toBlob.min.js @@ -0,0 +1,3 @@ +(function(a){var l=a.Uint8Array,d=(a=a.HTMLCanvasElement)&&a.prototype,t=/\s*;\s*base64\s*(?:;|$)/i,n="toDataURL",s;l&&(s=new l([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51]));a&&!d.toBlob&&(d.toBlob=function(a,g){g||(g="image/png");if(this.mozGetAsFile)a(this.mozGetAsFile("canvas",g));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(g))a(this.msToBlob()); +else{var e=Array.prototype.slice.call(arguments,1),b=this[n].apply(this,e),f=b.indexOf(","),e=b.substring(f+1),b=t.test(b.substring(0,f)),c;if(Blob.fake)c=new Blob,c.encoding=b?"base64":"URI",c.data=e,c.size=e.length;else if(l)if(b){c=Blob;for(var b=e.length,f=new l(b/4*3|0),d=0,p=0,h=[0,0],q=0,k=0,m,r;b--;)r=e.charCodeAt(d++),m=s[r-43],255!==m&&void 0!==m&&(h[1]=h[0],h[0]=r,k=k<<6|m,q++,4===q&&(f[p++]=k>>>16,61!==h[1]&&(f[p++]=k>>>8),61!==h[0]&&(f[p++]=k),q=0));c=new c([f],{type:g})}else c=new Blob([decodeURIComponent(e)], +{type:g});a(c)}},d.toBlobHD=d.toDataURLHD?function(){n="toDataURLHD";var a=this.toBlob();n="toDataURL";return a}:d.toBlob)})("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content||this); diff --git a/Server/www/spiderbasic/canvas2svg.js b/Server/www/spiderbasic/canvas2svg.js new file mode 100644 index 0000000..f71d359 --- /dev/null +++ b/Server/www/spiderbasic/canvas2svg.js @@ -0,0 +1,1214 @@ +/*!! + * Canvas 2 Svg v1.0.19 + * A low level canvas to SVG converter. Uses a mock canvas context to build an SVG document. + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * Author: + * Kerry Liu + * + * Copyright (c) 2014 Gliffy Inc. + */ + +;(function () { + "use strict"; + + var STYLES, ctx, CanvasGradient, CanvasPattern, namedEntities; + + //helper function to format a string + function format(str, args) { + var keys = Object.keys(args), i; + for (i=0; i 1) { + options = defaultOptions; + options.width = arguments[0]; + options.height = arguments[1]; + } else if ( !o ) { + options = defaultOptions; + } else { + options = o; + } + + if (!(this instanceof ctx)) { + //did someone call this without new? + return new ctx(options); + } + + //setup options + this.width = options.width || defaultOptions.width; + this.height = options.height || defaultOptions.height; + this.enableMirroring = options.enableMirroring !== undefined ? options.enableMirroring : defaultOptions.enableMirroring; + + this.canvas = this; ///point back to this instance! + this.__document = options.document || document; + + // allow passing in an existing context to wrap around + // if a context is passed in, we know a canvas already exist + if (options.ctx) { + this.__ctx = options.ctx; + } else { + this.__canvas = this.__document.createElement("canvas"); + this.__ctx = this.__canvas.getContext("2d"); + } + + this.__setDefaultStyles(); + this.__stack = [this.__getStyleState()]; + this.__groupStack = []; + + //the root svg element + this.__root = this.__document.createElementNS("http://www.w3.org/2000/svg", "svg"); + this.__root.setAttribute("version", 1.1); + this.__root.setAttribute("xmlns", "http://www.w3.org/2000/svg"); + this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); + this.__root.setAttribute("width", this.width); + this.__root.setAttribute("height", this.height); + + //make sure we don't generate the same ids in defs + this.__ids = {}; + + //defs tag + this.__defs = this.__document.createElementNS("http://www.w3.org/2000/svg", "defs"); + this.__root.appendChild(this.__defs); + + //also add a group child. the svg element can't use the transform attribute + this.__currentElement = this.__document.createElementNS("http://www.w3.org/2000/svg", "g"); + this.__root.appendChild(this.__currentElement); + }; + + + /** + * Creates the specified svg element + * @private + */ + ctx.prototype.__createElement = function (elementName, properties, resetFill) { + if (typeof properties === "undefined") { + properties = {}; + } + + var element = this.__document.createElementNS("http://www.w3.org/2000/svg", elementName), + keys = Object.keys(properties), i, key; + if (resetFill) { + //if fill or stroke is not specified, the svg element should not display. By default SVG's fill is black. + element.setAttribute("fill", "none"); + element.setAttribute("stroke", "none"); + } + for (i=0; i 0) { + if (this.__currentElement.nodeName === "path") { + if (!this.__currentElementsToStyle) this.__currentElementsToStyle = {element: parent, children: []}; + this.__currentElementsToStyle.children.push(this.__currentElement) + this.__applyCurrentDefaultPath(); + } + + var group = this.__createElement("g"); + parent.appendChild(group); + this.__currentElement = group; + } + + var transform = this.__currentElement.getAttribute("transform"); + if (transform) { + transform += " "; + } else { + transform = ""; + } + transform += t; + this.__currentElement.setAttribute("transform", transform); + }; + + /** + * scales the current element + */ + ctx.prototype.scale = function (x, y) { + if (y === undefined) { + y = x; + } + this.__addTransform(format("scale({x},{y})", {x:x, y:y})); + }; + + /** + * rotates the current element + */ + ctx.prototype.rotate = function (angle) { + var degrees = (angle * 180 / Math.PI); + this.__addTransform(format("rotate({angle},{cx},{cy})", {angle:degrees, cx:0, cy:0})); + }; + + /** + * translates the current element + */ + ctx.prototype.translate = function (x, y) { + this.__addTransform(format("translate({x},{y})", {x:x,y:y})); + }; + + /** + * applies a transform to the current element + */ + ctx.prototype.transform = function (a, b, c, d, e, f) { + this.__addTransform(format("matrix({a},{b},{c},{d},{e},{f})", {a:a, b:b, c:c, d:d, e:e, f:f})); + }; + + /** + * Create a new Path Element + */ + ctx.prototype.beginPath = function () { + var path, parent; + + // Note that there is only one current default path, it is not part of the drawing state. + // See also: https://html.spec.whatwg.org/multipage/scripting.html#current-default-path + this.__currentDefaultPath = ""; + this.__currentPosition = {}; + + path = this.__createElement("path", {}, true); + parent = this.__closestGroupOrSvg(); + parent.appendChild(path); + this.__currentElement = path; + }; + + /** + * Helper function to apply currentDefaultPath to current path element + * @private + */ + ctx.prototype.__applyCurrentDefaultPath = function () { + var currentElement = this.__currentElement; + if (currentElement.nodeName === "path") { + currentElement.setAttribute("d", this.__currentDefaultPath); + } else { + console.error("Attempted to apply path command to node", currentElement.nodeName); + } + }; + + /** + * Helper function to add path command + * @private + */ + ctx.prototype.__addPathCommand = function (command) { + this.__currentDefaultPath += " "; + this.__currentDefaultPath += command; + }; + + /** + * Adds the move command to the current path element, + * if the currentPathElement is not empty create a new path element + */ + ctx.prototype.moveTo = function (x,y) { + if (this.__currentElement.nodeName !== "path") { + this.beginPath(); + } + + // creates a new subpath with the given point + this.__currentPosition = {x: x, y: y}; + this.__addPathCommand(format("M {x} {y}", {x:x, y:y})); + }; + + /** + * Closes the current path + */ + ctx.prototype.closePath = function () { + if (this.__currentDefaultPath) { + this.__addPathCommand("Z"); + } + }; + + /** + * Adds a line to command + */ + ctx.prototype.lineTo = function (x, y) { + this.__currentPosition = {x: x, y: y}; + if (this.__currentDefaultPath.indexOf('M') > -1) { + this.__addPathCommand(format("L {x} {y}", {x:x, y:y})); + } else { + this.__addPathCommand(format("M {x} {y}", {x:x, y:y})); + } + }; + + /** + * Add a bezier command + */ + ctx.prototype.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) { + this.__currentPosition = {x: x, y: y}; + this.__addPathCommand(format("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}", + {cp1x:cp1x, cp1y:cp1y, cp2x:cp2x, cp2y:cp2y, x:x, y:y})); + }; + + /** + * Adds a quadratic curve to command + */ + ctx.prototype.quadraticCurveTo = function (cpx, cpy, x, y) { + this.__currentPosition = {x: x, y: y}; + this.__addPathCommand(format("Q {cpx} {cpy} {x} {y}", {cpx:cpx, cpy:cpy, x:x, y:y})); + }; + + + /** + * Return a new normalized vector of given vector + */ + var normalize = function (vector) { + var len = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); + return [vector[0] / len, vector[1] / len]; + }; + + /** + * Adds the arcTo to the current path + * + * @see http://www.w3.org/TR/2015/WD-2dcontext-20150514/#dom-context-2d-arcto + */ + ctx.prototype.arcTo = function (x1, y1, x2, y2, radius) { + // Let the point (x0, y0) be the last point in the subpath. + var x0 = this.__currentPosition && this.__currentPosition.x; + var y0 = this.__currentPosition && this.__currentPosition.y; + + // First ensure there is a subpath for (x1, y1). + if (typeof x0 == "undefined" || typeof y0 == "undefined") { + return; + } + + // Negative values for radius must cause the implementation to throw an IndexSizeError exception. + if (radius < 0) { + throw new Error("IndexSizeError: The radius provided (" + radius + ") is negative."); + } + + // If the point (x0, y0) is equal to the point (x1, y1), + // or if the point (x1, y1) is equal to the point (x2, y2), + // or if the radius radius is zero, + // then the method must add the point (x1, y1) to the subpath, + // and connect that point to the previous point (x0, y0) by a straight line. + if (((x0 === x1) && (y0 === y1)) + || ((x1 === x2) && (y1 === y2)) + || (radius === 0)) { + this.lineTo(x1, y1); + return; + } + + // Otherwise, if the points (x0, y0), (x1, y1), and (x2, y2) all lie on a single straight line, + // then the method must add the point (x1, y1) to the subpath, + // and connect that point to the previous point (x0, y0) by a straight line. + var unit_vec_p1_p0 = normalize([x0 - x1, y0 - y1]); + var unit_vec_p1_p2 = normalize([x2 - x1, y2 - y1]); + if (unit_vec_p1_p0[0] * unit_vec_p1_p2[1] === unit_vec_p1_p0[1] * unit_vec_p1_p2[0]) { + this.lineTo(x1, y1); + return; + } + + // Otherwise, let The Arc be the shortest arc given by circumference of the circle that has radius radius, + // and that has one point tangent to the half-infinite line that crosses the point (x0, y0) and ends at the point (x1, y1), + // and that has a different point tangent to the half-infinite line that ends at the point (x1, y1), and crosses the point (x2, y2). + // The points at which this circle touches these two lines are called the start and end tangent points respectively. + + // note that both vectors are unit vectors, so the length is 1 + var cos = (unit_vec_p1_p0[0] * unit_vec_p1_p2[0] + unit_vec_p1_p0[1] * unit_vec_p1_p2[1]); + var theta = Math.acos(Math.abs(cos)); + + // Calculate origin + var unit_vec_p1_origin = normalize([ + unit_vec_p1_p0[0] + unit_vec_p1_p2[0], + unit_vec_p1_p0[1] + unit_vec_p1_p2[1] + ]); + var len_p1_origin = radius / Math.sin(theta / 2); + var x = x1 + len_p1_origin * unit_vec_p1_origin[0]; + var y = y1 + len_p1_origin * unit_vec_p1_origin[1]; + + // Calculate start angle and end angle + // rotate 90deg clockwise (note that y axis points to its down) + var unit_vec_origin_start_tangent = [ + -unit_vec_p1_p0[1], + unit_vec_p1_p0[0] + ]; + // rotate 90deg counter clockwise (note that y axis points to its down) + var unit_vec_origin_end_tangent = [ + unit_vec_p1_p2[1], + -unit_vec_p1_p2[0] + ]; + var getAngle = function (vector) { + // get angle (clockwise) between vector and (1, 0) + var x = vector[0]; + var y = vector[1]; + if (y >= 0) { // note that y axis points to its down + return Math.acos(x); + } else { + return -Math.acos(x); + } + }; + var startAngle = getAngle(unit_vec_origin_start_tangent); + var endAngle = getAngle(unit_vec_origin_end_tangent); + + // Connect the point (x0, y0) to the start tangent point by a straight line + this.lineTo(x + unit_vec_origin_start_tangent[0] * radius, + y + unit_vec_origin_start_tangent[1] * radius); + + // Connect the start tangent point to the end tangent point by arc + // and adding the end tangent point to the subpath. + this.arc(x, y, radius, startAngle, endAngle); + }; + + /** + * Sets the stroke property on the current element + */ + ctx.prototype.stroke = function () { + if (this.__currentElement.nodeName === "path") { + this.__currentElement.setAttribute("paint-order", "fill stroke markers"); + } + this.__applyCurrentDefaultPath(); + this.__applyStyleToCurrentElement("stroke"); + }; + + /** + * Sets fill properties on the current element + */ + ctx.prototype.fill = function () { + if (this.__currentElement.nodeName === "path") { + this.__currentElement.setAttribute("paint-order", "stroke fill markers"); + } + this.__applyCurrentDefaultPath(); + this.__applyStyleToCurrentElement("fill"); + }; + + /** + * Adds a rectangle to the path. + */ + ctx.prototype.rect = function (x, y, width, height) { + if (this.__currentElement.nodeName !== "path") { + this.beginPath(); + } + this.moveTo(x, y); + this.lineTo(x+width, y); + this.lineTo(x+width, y+height); + this.lineTo(x, y+height); + this.lineTo(x, y); + this.closePath(); + }; + + + /** + * adds a rectangle element + */ + ctx.prototype.fillRect = function (x, y, width, height) { + var rect, parent; + rect = this.__createElement("rect", { + x : x, + y : y, + width : width, + height : height + }, true); + parent = this.__closestGroupOrSvg(); + parent.appendChild(rect); + this.__currentElement = rect; + this.__applyStyleToCurrentElement("fill"); + }; + + /** + * Draws a rectangle with no fill + * @param x + * @param y + * @param width + * @param height + */ + ctx.prototype.strokeRect = function (x, y, width, height) { + var rect, parent; + rect = this.__createElement("rect", { + x : x, + y : y, + width : width, + height : height + }, true); + parent = this.__closestGroupOrSvg(); + parent.appendChild(rect); + this.__currentElement = rect; + this.__applyStyleToCurrentElement("stroke"); + }; + + + /** + * Clear entire canvas: + * 1. save current transforms + * 2. remove all the childNodes of the root g element + */ + ctx.prototype.__clearCanvas = function () { + var current = this.__closestGroupOrSvg(), + transform = current.getAttribute("transform"); + var rootGroup = this.__root.childNodes[1]; + var childNodes = rootGroup.childNodes; + for (var i = childNodes.length - 1; i >= 0; i--) { + if (childNodes[i]) { + rootGroup.removeChild(childNodes[i]); + } + } + this.__currentElement = rootGroup; + //reset __groupStack as all the child group nodes are all removed. + this.__groupStack = []; + if (transform) { + this.__addTransform(transform); + } + }; + + /** + * "Clears" a canvas by just drawing a white rectangle in the current group. + */ + ctx.prototype.clearRect = function (x, y, width, height) { + //clear entire canvas + if (x === 0 && y === 0 && width === this.width && height === this.height) { + this.__clearCanvas(); + return; + } + var rect, parent = this.__closestGroupOrSvg(); + rect = this.__createElement("rect", { + x : x, + y : y, + width : width, + height : height, + fill : "#FFFFFF" + }, true); + parent.appendChild(rect); + }; + + /** + * Adds a linear gradient to a defs tag. + * Returns a canvas gradient object that has a reference to it's parent def + */ + ctx.prototype.createLinearGradient = function (x1, y1, x2, y2) { + var grad = this.__createElement("linearGradient", { + id : randomString(this.__ids), + x1 : x1+"px", + x2 : x2+"px", + y1 : y1+"px", + y2 : y2+"px", + "gradientUnits" : "userSpaceOnUse" + }, false); + this.__defs.appendChild(grad); + return new CanvasGradient(grad, this); + }; + + /** + * Adds a radial gradient to a defs tag. + * Returns a canvas gradient object that has a reference to it's parent def + */ + ctx.prototype.createRadialGradient = function (x0, y0, r0, x1, y1, r1) { + var grad = this.__createElement("radialGradient", { + id : randomString(this.__ids), + cx : x1+"px", + cy : y1+"px", + r : r1+"px", + fx : x0+"px", + fy : y0+"px", + "gradientUnits" : "userSpaceOnUse" + }, false); + this.__defs.appendChild(grad); + return new CanvasGradient(grad, this); + + }; + + /** + * Parses the font string and returns svg mapping + * @private + */ + ctx.prototype.__parseFont = function () { + var regex = /^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\'\"\sa-z0-9]+?)\s*$/i; + var fontPart = regex.exec( this.font ); + var data = { + style : fontPart[1] || 'normal', + size : fontPart[4] || '10px', + family : fontPart[6] || 'sans-serif', + weight: fontPart[3] || 'normal', + decoration : fontPart[2] || 'normal', + href : null + }; + + //canvas doesn't support underline natively, but we can pass this attribute + if (this.__fontUnderline === "underline") { + data.decoration = "underline"; + } + + //canvas also doesn't support linking, but we can pass this as well + if (this.__fontHref) { + data.href = this.__fontHref; + } + + return data; + }; + + /** + * Helper to link text fragments + * @param font + * @param element + * @return {*} + * @private + */ + ctx.prototype.__wrapTextLink = function (font, element) { + if (font.href) { + var a = this.__createElement("a"); + a.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", font.href); + a.appendChild(element); + return a; + } + return element; + }; + + /** + * Fills or strokes text + * @param text + * @param x + * @param y + * @param action - stroke or fill + * @private + */ + ctx.prototype.__applyText = function (text, x, y, action) { + var font = this.__parseFont(), + parent = this.__closestGroupOrSvg(), + textElement = this.__createElement("text", { + "font-family" : font.family, + "font-size" : font.size, + "font-style" : font.style, + "font-weight" : font.weight, + "text-decoration" : font.decoration, + "x" : x, + "y" : y, + "text-anchor": getTextAnchor(this.textAlign), + "dominant-baseline": getDominantBaseline(this.textBaseline) + }, true); + + textElement.appendChild(this.__document.createTextNode(text)); + this.__currentElement = textElement; + this.__applyStyleToCurrentElement(action); + parent.appendChild(this.__wrapTextLink(font,textElement)); + }; + + /** + * Creates a text element + * @param text + * @param x + * @param y + */ + ctx.prototype.fillText = function (text, x, y) { + this.__applyText(text, x, y, "fill"); + }; + + /** + * Strokes text + * @param text + * @param x + * @param y + */ + ctx.prototype.strokeText = function (text, x, y) { + this.__applyText(text, x, y, "stroke"); + }; + + /** + * No need to implement this for svg. + * @param text + * @return {TextMetrics} + */ + ctx.prototype.measureText = function (text) { + this.__ctx.font = this.font; + return this.__ctx.measureText(text); + }; + + /** + * Arc command! + */ + ctx.prototype.arc = function (x, y, radius, startAngle, endAngle, counterClockwise) { + // in canvas no circle is drawn if no angle is provided. + if (startAngle === endAngle) { + return; + } + startAngle = startAngle % (2*Math.PI); + endAngle = endAngle % (2*Math.PI); + if (startAngle === endAngle) { + //circle time! subtract some of the angle so svg is happy (svg elliptical arc can't draw a full circle) + endAngle = ((endAngle + (2*Math.PI)) - 0.001 * (counterClockwise ? -1 : 1)) % (2*Math.PI); + } + var endX = x+radius*Math.cos(endAngle), + endY = y+radius*Math.sin(endAngle), + startX = x+radius*Math.cos(startAngle), + startY = y+radius*Math.sin(startAngle), + sweepFlag = counterClockwise ? 0 : 1, + largeArcFlag = 0, + diff = endAngle - startAngle; + + // https://github.com/gliffy/canvas2svg/issues/4 + if (diff < 0) { + diff += 2*Math.PI; + } + + if (counterClockwise) { + largeArcFlag = diff > Math.PI ? 0 : 1; + } else { + largeArcFlag = diff > Math.PI ? 1 : 0; + } + + this.lineTo(startX, startY); + this.__addPathCommand(format("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}", + {rx:radius, ry:radius, xAxisRotation:0, largeArcFlag:largeArcFlag, sweepFlag:sweepFlag, endX:endX, endY:endY})); + + this.__currentPosition = {x: endX, y: endY}; + }; + + /** + * Generates a ClipPath from the clip command. + */ + ctx.prototype.clip = function () { + var group = this.__closestGroupOrSvg(), + clipPath = this.__createElement("clipPath"), + id = randomString(this.__ids), + newGroup = this.__createElement("g"); + + this.__applyCurrentDefaultPath(); + group.removeChild(this.__currentElement); + clipPath.setAttribute("id", id); + clipPath.appendChild(this.__currentElement); + + this.__defs.appendChild(clipPath); + + //set the clip path to this group + group.setAttribute("clip-path", format("url(#{id})", {id:id})); + + //clip paths can be scaled and transformed, we need to add another wrapper group to avoid later transformations + // to this path + group.appendChild(newGroup); + + this.__currentElement = newGroup; + + }; + + /** + * Draws a canvas, image or mock context to this canvas. + * Note that all svg dom manipulation uses node.childNodes rather than node.children for IE support. + * http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage + */ + ctx.prototype.drawImage = function () { + //convert arguments to a real array + var args = Array.prototype.slice.call(arguments), + image=args[0], + dx, dy, dw, dh, sx=0, sy=0, sw, sh, parent, svg, defs, group, + currentElement, svgImage, canvas, context, id; + + if (args.length === 3) { + dx = args[1]; + dy = args[2]; + sw = image.width; + sh = image.height; + dw = sw; + dh = sh; + } else if (args.length === 5) { + dx = args[1]; + dy = args[2]; + dw = args[3]; + dh = args[4]; + sw = image.width; + sh = image.height; + } else if (args.length === 9) { + sx = args[1]; + sy = args[2]; + sw = args[3]; + sh = args[4]; + dx = args[5]; + dy = args[6]; + dw = args[7]; + dh = args[8]; + } else { + throw new Error("Invalid number of arguments passed to drawImage: " + arguments.length); + } + + parent = this.__closestGroupOrSvg(); + currentElement = this.__currentElement; + var translateDirective = "translate(" + dx + ", " + dy + ")"; + if (image instanceof ctx) { + //canvas2svg mock canvas context. In the future we may want to clone nodes instead. + //also I'm currently ignoring dw, dh, sw, sh, sx, sy for a mock context. + svg = image.getSvg().cloneNode(true); + if (svg.childNodes && svg.childNodes.length > 1) { + defs = svg.childNodes[0]; + while(defs.childNodes.length) { + id = defs.childNodes[0].getAttribute("id"); + this.__ids[id] = id; + this.__defs.appendChild(defs.childNodes[0]); + } + group = svg.childNodes[1]; + if (group) { + //save original transform + var originTransform = group.getAttribute("transform"); + var transformDirective; + if (originTransform) { + transformDirective = originTransform+" "+translateDirective; + } else { + transformDirective = translateDirective; + } + group.setAttribute("transform", transformDirective); + parent.appendChild(group); + } + } + } else if (image.nodeName === "CANVAS" || image.nodeName === "IMG") { + //canvas or image + svgImage = this.__createElement("image"); + svgImage.setAttribute("width", dw); + svgImage.setAttribute("height", dh); + svgImage.setAttribute("preserveAspectRatio", "none"); + + if (sx || sy || sw !== image.width || sh !== image.height) { + //crop the image using a temporary canvas + canvas = this.__document.createElement("canvas"); + canvas.width = dw; + canvas.height = dh; + context = canvas.getContext("2d"); + context.drawImage(image, sx, sy, sw, sh, 0, 0, dw, dh); + image = canvas; + } + svgImage.setAttribute("transform", translateDirective); + svgImage.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", + image.nodeName === "CANVAS" ? image.toDataURL() : image.getAttribute("src")); + parent.appendChild(svgImage); + } + }; + + /** + * Generates a pattern tag + */ + ctx.prototype.createPattern = function (image, repetition) { + var pattern = this.__document.createElementNS("http://www.w3.org/2000/svg", "pattern"), id = randomString(this.__ids), + img; + pattern.setAttribute("id", id); + pattern.setAttribute("width", image.width); + pattern.setAttribute("height", image.height); + if (image.nodeName === "CANVAS" || image.nodeName === "IMG") { + img = this.__document.createElementNS("http://www.w3.org/2000/svg", "image"); + img.setAttribute("width", image.width); + img.setAttribute("height", image.height); + img.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", + image.nodeName === "CANVAS" ? image.toDataURL() : image.getAttribute("src")); + pattern.appendChild(img); + this.__defs.appendChild(pattern); + } else if (image instanceof ctx) { + pattern.appendChild(image.__root.childNodes[1]); + this.__defs.appendChild(pattern); + } + return new CanvasPattern(pattern, this); + }; + + ctx.prototype.setLineDash = function (dashArray) { + if (dashArray && dashArray.length > 0) { + this.lineDash = dashArray.join(","); + } else { + this.lineDash = null; + } + }; + + /** + * Not yet implemented + */ + ctx.prototype.drawFocusRing = function () {}; + ctx.prototype.createImageData = function () {}; + ctx.prototype.getImageData = function () {}; + ctx.prototype.putImageData = function () {}; + ctx.prototype.globalCompositeOperation = function () {}; + ctx.prototype.setTransform = function () {}; + + //add options for alternative namespace + if (typeof window === "object") { + window.C2S = ctx; + } + + // CommonJS/Browserify + if (typeof module === "object" && typeof module.exports === "object") { + module.exports = ctx; + } + +}()); diff --git a/Server/www/spiderbasic/cipher/crc.js b/Server/www/spiderbasic/cipher/crc.js new file mode 100644 index 0000000..26dba67 --- /dev/null +++ b/Server/www/spiderbasic/cipher/crc.js @@ -0,0 +1,109 @@ +/* + * js-crc v0.1.0 + * https://github.com/emn178/js-crc + * + * Copyright 2015, emn178@gmail.com + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ +;(function(root, undefined) { + 'use strict'; + + var NODE_JS = typeof(module) != 'undefined'; + if(NODE_JS) { + root = global; + } + var HEX_CHARS = '0123456789abcdef'.split(''); + + var Modules = [ + { + name: 'crc32', + polynom: 0xEDB88320, + initValue: -1, + bytes: 4 + }, + { + name: 'crc16', + polynom: 0xA001, + initValue: 0, + bytes: 2 + } + ]; + + var i, j, k, b; + for(i = 0;i < Modules.length;++i) { + var m = Modules[i]; + m.method = (function(m) { + // SpiderBasic hack + return function(message, initValue) { + return crc(message, m, initValue); + }; + })(m); + m.table = []; + for(j = 0;j < 256;++j) { + b = j; + for(k = 0;k < 8;++k) { + b = b & 1 ? m.polynom ^ (b >>> 1) : b >>> 1; + } + m.table[j] = b >>> 0; + } + } + + var crc = function(message, module, initValue) { + var notString = typeof(message) != 'string'; + if(notString && message.constructor == ArrayBuffer) { + message = new Uint8Array(message); + } + + // SpiderBasic hack + var crc = initValue ^ 0xffffffff, code, i, length = message.length, table = module.table; + if(notString) { + for(i = 0;i < length;++i) { + crc = table[(crc ^ message[i]) & 0xFF] ^ (crc >>> 8); + } + } else { + for(i = 0;i < length;++i) { + code = message.charCodeAt(i); + if (code < 0x80) { + crc = table[(crc ^ code) & 0xFF] ^ (crc >>> 8); + } else if (code < 0x800) { + crc = table[(crc ^ (0xc0 | (code >> 6))) & 0xFF] ^ (crc >>> 8); + crc = table[(crc ^ (0x80 | (code & 0x3f))) & 0xFF] ^ (crc >>> 8); + } else if (code < 0xd800 || code >= 0xe000) { + crc = table[(crc ^ (0xe0 | (code >> 12))) & 0xFF] ^ (crc >>> 8); + crc = table[(crc ^ (0x80 | ((code >> 6) & 0x3f))) & 0xFF] ^ (crc >>> 8); + crc = table[(crc ^ (0x80 | (code & 0x3f))) & 0xFF] ^ (crc >>> 8); + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++i) & 0x3ff)); + crc = table[(crc ^ (0xf0 | (code >> 18))) & 0xFF] ^ (crc >>> 8); + crc = table[(crc ^ (0x80 | ((code >> 12) & 0x3f))) & 0xFF] ^ (crc >>> 8); + crc = table[(crc ^ (0x80 | ((code >> 6) & 0x3f))) & 0xFF] ^ (crc >>> 8); + crc = table[(crc ^ (0x80 | (code & 0x3f))) & 0xFF] ^ (crc >>> 8); + } + } + } + // SpiderBasic hack + crc ^= 0xffffffff; + + var hex = ''; + if(module.bytes > 2) { + hex += HEX_CHARS[(crc >> 28) & 0x0F] + HEX_CHARS[(crc >> 24) & 0x0F] + + HEX_CHARS[(crc >> 20) & 0x0F] + HEX_CHARS[(crc >> 16) & 0x0F]; + } + hex += HEX_CHARS[(crc >> 12) & 0x0F] + HEX_CHARS[(crc >> 8) & 0x0F] + + HEX_CHARS[(crc >> 4) & 0x0F] + HEX_CHARS[crc & 0x0F]; + return hex; + }; + + var exports; + if(!root.HI_CRC32_TEST && NODE_JS) { + exports = module.exports = {}; + } else if(root) { + exports = root; + } + for(i = 0;i < Modules.length;++i) { + var m = Modules[i]; + exports[m.name] = m.method; + } +}(this)); diff --git a/Server/www/spiderbasic/cipher/md5.js b/Server/www/spiderbasic/cipher/md5.js new file mode 100644 index 0000000..916b2ab --- /dev/null +++ b/Server/www/spiderbasic/cipher/md5.js @@ -0,0 +1 @@ +(function(factory){if(typeof exports==="object"){module.exports=factory()}else if(typeof define==="function"&&define.amd){define(factory)}else{var glob;try{glob=window}catch(e){glob=self}glob.SparkMD5=factory()}})(function(undefined){"use strict";var add32=function(a,b){return a+b&4294967295},hex_chr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function cmn(q,a,b,x,s,t){a=add32(add32(a,q),add32(x,t));return add32(a<>>32-s,b)}function ff(a,b,c,d,x,s,t){return cmn(b&c|~b&d,a,b,x,s,t)}function gg(a,b,c,d,x,s,t){return cmn(b&d|c&~d,a,b,x,s,t)}function hh(a,b,c,d,x,s,t){return cmn(b^c^d,a,b,x,s,t)}function ii(a,b,c,d,x,s,t){return cmn(c^(b|~d),a,b,x,s,t)}function md5cycle(x,k){var a=x[0],b=x[1],c=x[2],d=x[3];a=ff(a,b,c,d,k[0],7,-680876936);d=ff(d,a,b,c,k[1],12,-389564586);c=ff(c,d,a,b,k[2],17,606105819);b=ff(b,c,d,a,k[3],22,-1044525330);a=ff(a,b,c,d,k[4],7,-176418897);d=ff(d,a,b,c,k[5],12,1200080426);c=ff(c,d,a,b,k[6],17,-1473231341);b=ff(b,c,d,a,k[7],22,-45705983);a=ff(a,b,c,d,k[8],7,1770035416);d=ff(d,a,b,c,k[9],12,-1958414417);c=ff(c,d,a,b,k[10],17,-42063);b=ff(b,c,d,a,k[11],22,-1990404162);a=ff(a,b,c,d,k[12],7,1804603682);d=ff(d,a,b,c,k[13],12,-40341101);c=ff(c,d,a,b,k[14],17,-1502002290);b=ff(b,c,d,a,k[15],22,1236535329);a=gg(a,b,c,d,k[1],5,-165796510);d=gg(d,a,b,c,k[6],9,-1069501632);c=gg(c,d,a,b,k[11],14,643717713);b=gg(b,c,d,a,k[0],20,-373897302);a=gg(a,b,c,d,k[5],5,-701558691);d=gg(d,a,b,c,k[10],9,38016083);c=gg(c,d,a,b,k[15],14,-660478335);b=gg(b,c,d,a,k[4],20,-405537848);a=gg(a,b,c,d,k[9],5,568446438);d=gg(d,a,b,c,k[14],9,-1019803690);c=gg(c,d,a,b,k[3],14,-187363961);b=gg(b,c,d,a,k[8],20,1163531501);a=gg(a,b,c,d,k[13],5,-1444681467);d=gg(d,a,b,c,k[2],9,-51403784);c=gg(c,d,a,b,k[7],14,1735328473);b=gg(b,c,d,a,k[12],20,-1926607734);a=hh(a,b,c,d,k[5],4,-378558);d=hh(d,a,b,c,k[8],11,-2022574463);c=hh(c,d,a,b,k[11],16,1839030562);b=hh(b,c,d,a,k[14],23,-35309556);a=hh(a,b,c,d,k[1],4,-1530992060);d=hh(d,a,b,c,k[4],11,1272893353);c=hh(c,d,a,b,k[7],16,-155497632);b=hh(b,c,d,a,k[10],23,-1094730640);a=hh(a,b,c,d,k[13],4,681279174);d=hh(d,a,b,c,k[0],11,-358537222);c=hh(c,d,a,b,k[3],16,-722521979);b=hh(b,c,d,a,k[6],23,76029189);a=hh(a,b,c,d,k[9],4,-640364487);d=hh(d,a,b,c,k[12],11,-421815835);c=hh(c,d,a,b,k[15],16,530742520);b=hh(b,c,d,a,k[2],23,-995338651);a=ii(a,b,c,d,k[0],6,-198630844);d=ii(d,a,b,c,k[7],10,1126891415);c=ii(c,d,a,b,k[14],15,-1416354905);b=ii(b,c,d,a,k[5],21,-57434055);a=ii(a,b,c,d,k[12],6,1700485571);d=ii(d,a,b,c,k[3],10,-1894986606);c=ii(c,d,a,b,k[10],15,-1051523);b=ii(b,c,d,a,k[1],21,-2054922799);a=ii(a,b,c,d,k[8],6,1873313359);d=ii(d,a,b,c,k[15],10,-30611744);c=ii(c,d,a,b,k[6],15,-1560198380);b=ii(b,c,d,a,k[13],21,1309151649);a=ii(a,b,c,d,k[4],6,-145523070);d=ii(d,a,b,c,k[11],10,-1120210379);c=ii(c,d,a,b,k[2],15,718787259);b=ii(b,c,d,a,k[9],21,-343485551);x[0]=add32(a,x[0]);x[1]=add32(b,x[1]);x[2]=add32(c,x[2]);x[3]=add32(d,x[3])}function md5blk(s){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=s.charCodeAt(i)+(s.charCodeAt(i+1)<<8)+(s.charCodeAt(i+2)<<16)+(s.charCodeAt(i+3)<<24)}return md5blks}function md5blk_array(a){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=a[i]+(a[i+1]<<8)+(a[i+2]<<16)+(a[i+3]<<24)}return md5blks}function md51(s){var n=s.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk(s.substring(i-64,i)))}s=s.substring(i-64);length=s.length;tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i>2]|=s.charCodeAt(i)<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function md51_array(a){var n=a.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk_array(a.subarray(i-64,i)))}a=i-64>2]|=a[i]<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function rhex(n){var s="",j;for(j=0;j<4;j+=1){s+=hex_chr[n>>j*8+4&15]+hex_chr[n>>j*8&15]}return s}function hex(x){var i;for(i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}}if(typeof ArrayBuffer!=="undefined"&&!ArrayBuffer.prototype.slice){(function(){function clamp(val,length){val=val|0||0;if(val<0){return Math.max(val+length,0)}return Math.min(val,length)}ArrayBuffer.prototype.slice=function(from,to){var length=this.byteLength,begin=clamp(from,length),end=length,num,target,targetArray,sourceArray;if(to!==undefined){end=clamp(to,length)}if(begin>end){return new ArrayBuffer(0)}num=end-begin;target=new ArrayBuffer(num);targetArray=new Uint8Array(target);sourceArray=new Uint8Array(this,begin,num);targetArray.set(sourceArray);return target}})()}function toUtf8(str){if(/[\u0080-\uFFFF]/.test(str)){str=unescape(encodeURIComponent(str))}return str}function utf8Str2ArrayBuffer(str,returnUInt8Array){var length=str.length,buff=new ArrayBuffer(length),arr=new Uint8Array(buff),i;for(i=0;i>2]|=buff.charCodeAt(i)<<(i%4<<3)}this._finish(tail,length);ret=hex(this._hash);if(raw){ret=hexToBinaryString(ret)}this.reset();return ret};SparkMD5.prototype.reset=function(){this._buff="";this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}};SparkMD5.prototype.setState=function(state){this._buff=state.buff;this._length=state.length;this._hash=state.hash;return this};SparkMD5.prototype.destroy=function(){delete this._hash;delete this._buff;delete this._length};SparkMD5.prototype._finish=function(tail,length){var i=length,tmp,lo,hi;tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(this._hash,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=this._length*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(this._hash,tail)};SparkMD5.hash=function(str,raw){return SparkMD5.hashBinary(toUtf8(str),raw)};SparkMD5.hashBinary=function(content,raw){var hash=md51(content),ret=hex(hash);return raw?hexToBinaryString(ret):ret};SparkMD5.ArrayBuffer=function(){this.reset()};SparkMD5.ArrayBuffer.prototype.append=function(arr){var buff=concatenateArrayBuffers(this._buff.buffer,arr,true),length=buff.length,i;this._length+=arr.byteLength;for(i=64;i<=length;i+=64){md5cycle(this._hash,md5blk_array(buff.subarray(i-64,i)))}this._buff=i-64>2]|=buff[i]<<(i%4<<3)}this._finish(tail,length);ret=hex(this._hash);if(raw){ret=hexToBinaryString(ret)}this.reset();return ret};SparkMD5.ArrayBuffer.prototype.reset=function(){this._buff=new Uint8Array(0);this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.ArrayBuffer.prototype.getState=function(){var state=SparkMD5.prototype.getState.call(this);state.buff=arrayBuffer2Utf8Str(state.buff);return state};SparkMD5.ArrayBuffer.prototype.setState=function(state){state.buff=utf8Str2ArrayBuffer(state.buff,true);return SparkMD5.prototype.setState.call(this,state)};SparkMD5.ArrayBuffer.prototype.destroy=SparkMD5.prototype.destroy;SparkMD5.ArrayBuffer.prototype._finish=SparkMD5.prototype._finish;SparkMD5.ArrayBuffer.hash=function(arr,raw){var hash=md51_array(new Uint8Array(arr)),ret=hex(hash);return raw?hexToBinaryString(ret):ret};return SparkMD5}); diff --git a/Server/www/spiderbasic/cipher/sha3.js b/Server/www/spiderbasic/cipher/sha3.js new file mode 100644 index 0000000..f74f7cf --- /dev/null +++ b/Server/www/spiderbasic/cipher/sha3.js @@ -0,0 +1,23 @@ +/* + * js-sha3 v0.5.1 + * https://github.com/emn178/js-sha3 + * + * Copyright 2015, emn178@gmail.com + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ +(function(r,ma){function n(a,b,c){this.blocks=[];this.s=[];this.padding=b;this.outputBits=c;this.reset=!0;this.start=this.block=0;this.blockCount=1600-(a<<1)>>5;this.byteCount=this.blockCount<<2;this.outputBlocks=c>>5;this.extraBytes=(c&31)>>3;for(a=0;50>a;++a)this.s[a]=0}var ga="undefined"!=typeof module;ga&&(r=global,r.JS_SHA3_TEST&&(r.navigator={userAgent:"Chrome"}));for(var l="0123456789abcdef".split(""),p=[0,8,16,24],ha=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0, +2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],t=[224,256,384,512],w=["hex","buffer","array"],ia=function(a,b,c){return function(e){return(new n(a,b,a)).update(e)[c]()}},ja=function(a,b,c){return function(e,g){return(new n(a,b,g)).update(e)[c]()}},q=function(a,b){var c=ia(a, +b,"hex");c.create=function(){return new n(a,b,a)};c.update=function(a){return c.create().update(a)};for(var e=0;e>2]|=a[h]<m?e[d>>2]|=m<m?e[d>>2]|=(192|m>>6)<m||57344<=m?e[d>>2]|=(224|m>>12)<>2]|=(240|m>>18)<>2]|=(128|m>>12&63)<>2]|=(128|m>>6&63)<>2]|=(128|m&63)<=g){this.start=d-g;this.block=e[k];for(d=0;d>2]|=this.padding[b&3];if(this.lastByteIndex==this.byteCount)for(a[0]=a[c],b=1;b>4&15]+l[f&15]+l[f>>12&15]+l[f>>8&15]+l[f>> +20&15]+l[f>>16&15]+l[f>>28&15]+l[f>>24&15];0==k%a&&v(b)}e&&(f=b[g],0>4&15]+l[f&15]),1>12&15]+l[f>>8&15]),2>20&15]+l[f>>16&15]));return h};n.prototype.buffer=function(){this.finalize();var a=this.blockCount,b=this.s,c=this.outputBlocks,e=this.extraBytes,g=0,k=0,h=this.outputBits>>3,f;f=e?new ArrayBuffer(c+1<<2):new ArrayBuffer(h);for(var d=new Uint32Array(f);k>8&255,h[f+2]=d>>16&255,h[f+3]=d>>24&255;0==k%a&&v(b)}e&&(f=k<<2,d=b[g],0>8&255),2>16&255));return h};var v=function(a){var b,c,e,g,k,h,f,d,m,l,n,p,q,r,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,aa,ba,ca,da;for(e=0;48>e;e+=2)g=a[0]^ +a[10]^a[20]^a[30]^a[40],k=a[1]^a[11]^a[21]^a[31]^a[41],h=a[2]^a[12]^a[22]^a[32]^a[42],f=a[3]^a[13]^a[23]^a[33]^a[43],d=a[4]^a[14]^a[24]^a[34]^a[44],m=a[5]^a[15]^a[25]^a[35]^a[45],l=a[6]^a[16]^a[26]^a[36]^a[46],n=a[7]^a[17]^a[27]^a[37]^a[47],p=a[8]^a[18]^a[28]^a[38]^a[48],q=a[9]^a[19]^a[29]^a[39]^a[49],b=p^(h<<1|f>>>31),c=q^(f<<1|h>>>31),a[0]^=b,a[1]^=c,a[10]^=b,a[11]^=c,a[20]^=b,a[21]^=c,a[30]^=b,a[31]^=c,a[40]^=b,a[41]^=c,b=g^(d<<1|m>>>31),c=k^(m<<1|d>>>31),a[2]^=b,a[3]^=c,a[12]^=b,a[13]^=c,a[22]^= +b,a[23]^=c,a[32]^=b,a[33]^=c,a[42]^=b,a[43]^=c,b=h^(l<<1|n>>>31),c=f^(n<<1|l>>>31),a[4]^=b,a[5]^=c,a[14]^=b,a[15]^=c,a[24]^=b,a[25]^=c,a[34]^=b,a[35]^=c,a[44]^=b,a[45]^=c,b=d^(p<<1|q>>>31),c=m^(q<<1|p>>>31),a[6]^=b,a[7]^=c,a[16]^=b,a[17]^=c,a[26]^=b,a[27]^=c,a[36]^=b,a[37]^=c,a[46]^=b,a[47]^=c,b=l^(g<<1|k>>>31),c=n^(k<<1|g>>>31),a[8]^=b,a[9]^=c,a[18]^=b,a[19]^=c,a[28]^=b,a[29]^=c,a[38]^=b,a[39]^=c,a[48]^=b,a[49]^=c,b=a[0],c=a[1],M=a[11]<<4|a[10]>>>28,N=a[10]<<4|a[11]>>>28,u=a[20]<<3|a[21]>>>29,v= +a[21]<<3|a[20]>>>29,aa=a[31]<<9|a[30]>>>23,ba=a[30]<<9|a[31]>>>23,I=a[40]<<18|a[41]>>>14,J=a[41]<<18|a[40]>>>14,A=a[2]<<1|a[3]>>>31,B=a[3]<<1|a[2]>>>31,g=a[13]<<12|a[12]>>>20,k=a[12]<<12|a[13]>>>20,O=a[22]<<10|a[23]>>>22,P=a[23]<<10|a[22]>>>22,w=a[33]<<13|a[32]>>>19,x=a[32]<<13|a[33]>>>19,ca=a[42]<<2|a[43]>>>30,da=a[43]<<2|a[42]>>>30,U=a[5]<<30|a[4]>>>2,V=a[4]<<30|a[5]>>>2,C=a[14]<<6|a[15]>>>26,D=a[15]<<6|a[14]>>>26,h=a[25]<<11|a[24]>>>21,f=a[24]<<11|a[25]>>>21,Q=a[34]<<15|a[35]>>>17,R=a[35]<<15| +a[34]>>>17,y=a[45]<<29|a[44]>>>3,z=a[44]<<29|a[45]>>>3,p=a[6]<<28|a[7]>>>4,q=a[7]<<28|a[6]>>>4,W=a[17]<<23|a[16]>>>9,X=a[16]<<23|a[17]>>>9,E=a[26]<<25|a[27]>>>7,F=a[27]<<25|a[26]>>>7,d=a[36]<<21|a[37]>>>11,m=a[37]<<21|a[36]>>>11,S=a[47]<<24|a[46]>>>8,T=a[46]<<24|a[47]>>>8,K=a[8]<<27|a[9]>>>5,L=a[9]<<27|a[8]>>>5,r=a[18]<<20|a[19]>>>12,t=a[19]<<20|a[18]>>>12,Y=a[29]<<7|a[28]>>>25,Z=a[28]<<7|a[29]>>>25,G=a[38]<<8|a[39]>>>24,H=a[39]<<8|a[38]>>>24,l=a[48]<<14|a[49]>>>18,n=a[49]<<14|a[48]>>>18,a[0]=b^~g& +h,a[1]=c^~k&f,a[10]=p^~r&u,a[11]=q^~t&v,a[20]=A^~C&E,a[21]=B^~D&F,a[30]=K^~M&O,a[31]=L^~N&P,a[40]=U^~W&Y,a[41]=V^~X&Z,a[2]=g^~h&d,a[3]=k^~f&m,a[12]=r^~u&w,a[13]=t^~v&x,a[22]=C^~E&G,a[23]=D^~F&H,a[32]=M^~O&Q,a[33]=N^~P&R,a[42]=W^~Y&aa,a[43]=X^~Z&ba,a[4]=h^~d&l,a[5]=f^~m&n,a[14]=u^~w&y,a[15]=v^~x&z,a[24]=E^~G&I,a[25]=F^~H&J,a[34]=O^~Q&S,a[35]=P^~R&T,a[44]=Y^~aa&ca,a[45]=Z^~ba&da,a[6]=d^~l&b,a[7]=m^~n&c,a[16]=w^~y&p,a[17]=x^~z&q,a[26]=G^~I&A,a[27]=H^~J&B,a[36]=Q^~S&K,a[37]=R^~T&L,a[46]=aa^~ca&U,a[47]= +ba^~da&V,a[8]=l^~b&g,a[9]=n^~c&k,a[18]=y^~p&r,a[19]=z^~q&t,a[28]=I^~A&C,a[29]=J^~B&D,a[38]=S^~K&M,a[39]=T^~L&N,a[48]=ca^~U&W,a[49]=da^~V&X,a[0]^=ha[e],a[1]^=ha[e+1]};if(!r.JS_SHA3_TEST&&ga)module.exports=x;else if(r)for(var ka in x)r[ka]=x[ka]})(this); diff --git a/Server/www/spiderbasic/debug.js b/Server/www/spiderbasic/debug.js new file mode 100644 index 0000000..3a665ff --- /dev/null +++ b/Server/www/spiderbasic/debug.js @@ -0,0 +1,211 @@ + +spider.debug = { + y : 0, + window : null, + editorGadget : null, + disabled: false, + fatalError: false, + Init : function() { + + // A webview is attached, don't display the built-in debug window + if (window.spiderDebug) + { + return; + } + + this.window = spider_OpenWindow(-1, 0, 0, 350, 150, "SpiderBasic - Debug output", (1 << 4) | (1 << 5)); + + this.editorGadget = spider_EditorGadget(-1, 5, 5, spider_WindowWidth(spider.debug.window) - 10, spider_WindowHeight(spider.debug.window) - 10, (1 << 0)); + spider_StickyWindow(this.window, 1); + + // Position the window in the top/right corner + spider_ResizeWindow(this.window, spider_DesktopWidth() - spider_WindowWidth(this.window, 1)-10, 10, -0xFFFF , -0xFFFF) + + spider_BindEvent(4, // PB_Event_CloseWindow + function() { + spider_CloseWindow(spider.debug.window); + spider.debug.disabled = true; + }, + this.window); + + spider_BindEvent(7, // PB_Event_SizeWindow + function() { + spider_ResizeGadget(spider.debug.editorGadget, 5, 5, spider_WindowWidth(spider.debug.window) - 10, spider_WindowHeight(spider.debug.window) - 10); + }, + this.window); + }, + + RawPrint : function(text) { + + if (this.editorGadget && !this.disabled) + { + spider_SetGadgetText(this.editorGadget, spider_GetGadgetText(this.editorGadget)+text+"\n"); + + var editorTextArea = spider_GadgetID(this.editorGadget).gadget.domNode; + + // Use jquery animate to scroll down automatically + $(editorTextArea).animate({ + scrollTop:$(editorTextArea)[0].scrollHeight - $(editorTextArea).height() + },0); + } + }, + + Print : function(text) { + + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + // log in browser console first, just in case the GUI text doesn't work + console.log(text); + + // A webview is attached, forward the debug to the IDE debug output + if (window.spiderDebug) + { + window.spiderDebug({"command": 5, "text": ""+text }); + } + else + { + this.RawPrint(text); + } + }, + + CheckSingleFlags : function(parameter, flags, allowedFlags) + { + var callerName = spider.debug.CheckSingleFlags.caller.name; + var functionName = callerName.substring(7, callerName.length - 6); // remove 'spider_' and '_DEBUG' + + if (allowedFlags.indexOf(flags) === -1) + throw new Error(functionName+"(): : invalid value specified for parameter '"+parameter+"'.", { cause: "spider" }); + }, + + CheckCombinationFlags : function(parameter, flags, allowedFlags) + { + var callerName = spider.debug.CheckCombinationFlags.caller.name; + var functionName = callerName.substring(7, callerName.length - 6); // remove 'spider_' and '_DEBUG' + + var allFlags = 0; + for (var k = 0; k < allowedFlags.length; k++) + { + allFlags |= allowedFlags[k]; + } + + if ((allFlags & flags) !== flags) // Something is wrong is the specified value doesn't fit in the flags + throw new Error(functionName+"(): : invalid value specified for parameter '"+parameter+"'.", { cause: "spider" }); + }, + + Error : function(text, callerName) + { + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + if (typeof callerName === "undefined") + { + callerName = spider.debug.Error.caller.name; + } + + functionName = callerName.substring(7, callerName.length - 6); // remove 'spider_' and '_DEBUG' + + throw new Error(functionName+"(): "+text, { cause: "spider" }); + }, + + CheckId : function(callerName, ObjectName, id) + { + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + var functionName = callerName.substring(7, callerName.length - 6); // remove 'spider_' and '_DEBUG' + + if (id < -1) + throw new Error(functionName+"(): #"+ObjectName+" object number can't be negative (value: "+id+").", { cause: "spider" }); + else if (id >= 10000) + throw new Error(functionName+"(): #"+ObjectName+" object number is very high (over 10000), are you sure of that ?", { cause: "spider" }); + }, + + CheckObject : function(callerName, ObjectName, isObject) + { + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + var functionName = callerName.substring(7, callerName.length - 6); // remove 'spider_' and '_DEBUG' + + if (isObject === 0) + throw new Error(functionName+"(): The specified #"+ObjectName+" is not initialised.", { cause: "spider" }); + }, + + ThrowError : function(functionName, text) + { + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + throw new Error(functionName+"(): "+ text, { cause: "spider" }); + }, + + DebuggerLineGetLine : function(a) + { + return ((a) & ((1 << 20)-1)); + }, + + DebuggerLineGetFile : function(a) + { + return (((a) >> 20) & ((1 << (32-20))-1)); + }, + + DisplayError : function(text) + { + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + // A webview is attached + if (window.spiderDebug) + { + window.spiderDebug( { "command": 8, "lineId": spiderLine, "text": text } ); + } + else + { + var line = spider.debug.DebuggerLineGetLine(spiderLine)+1; + var fileIndex = spider.debug.DebuggerLineGetFile(spiderLine); + var filename = spider.debugFilename; + + if (fileIndex > 0) // It's an include file + { + filename = spider.debugIncludes[fileIndex-1]; + } + + spider.debug.Print(filename+":"+line+" "+text); + } + } +}; + + +// temporary Shortcut +spider.Debug = function(text) { + spider.debug.Print(text); +}; + +// temporary Shortcut +function debug(text) { + spider.debug.Print(text); +} + +// global error handler +window.addEventListener("error", (event) => { + + if (spider.debug.fatalError) // Don't do anything if the program has already crash + return; + + var text; + if (event.error.cause == "spider") // It's a SpiderBasic exception + { + text = event.error.message; + } + else + { + // Not a SpiderBasic exception, put the full details + text = `${event.type}: ${event.message} (${event.filename}, line: ${event.lineno})`; + } + + spider.debug.DisplayError(text); + + spider.debug.fatalError = true; +}); + diff --git a/Server/www/spiderbasic/dojo/cbtree/errors/CBTErrors.json b/Server/www/spiderbasic/dojo/cbtree/errors/CBTErrors.json new file mode 100644 index 0000000..db21b3f --- /dev/null +++ b/Server/www/spiderbasic/dojo/cbtree/errors/CBTErrors.json @@ -0,0 +1,25 @@ +[ + {"AbstractOnlyError": {"text":"method is abstract only and requires implementation"} }, + {"AccessError": {"text":"requested or required access is not allowed"} }, + {"ItemExistError": {"text":"object with specified ID already exist"} }, + {"InvalidAccessError": {"text":"operation or parameter is not allowed"} }, + {"InvalidDataError": {"text":"store data must be an array of objects"} }, + {"InvalidParameterError": {"text":"Invalid parameter specified"} }, + {"InvalidPropertyError": {"text":"invalid property or type specified"} }, + {"InvalidObjectError": {"text":"item is not an a valid store object"} }, + {"InvalidPathError": {"text":"invalid path"} }, + {"InvalidResponseError": {"text":"function returned an invalid or unexpected response"} }, + {"InvalidTypeError": {"text":"parameter or property type is invalid"} }, + {"InvalidVersionError": {"text":"invalid dojo or dijit version"} }, + {"InvalidWidgetError": {"text":"invalid widget"} }, + {"MethodMissingError": {"text":"a required function is missing"} }, + {"NotFoundError": {"text":"the object can not be found here."} }, + {"ParameterMissingError": {"text":"required parameter is missing"} }, + {"PropertyMissingError": {"text":"required property is missing"} }, + {"ReadOnlyError": {"text":"property is READ-ONLY"} }, + {"RequestCancelError": {"text":"request was canceled"} }, + {"RequestError": {"text":"XHR request failed"} }, + {"RequestPendingError": {"text":"another request is still pending"} }, + {"UnknownVersionError": {"text":"unknown dojo and/or dijit version"} } +] + diff --git a/Server/www/spiderbasic/dojo/cbtree/icons/fileIconsMS.css b/Server/www/spiderbasic/dojo/cbtree/icons/fileIconsMS.css new file mode 100644 index 0000000..018d29d --- /dev/null +++ b/Server/www/spiderbasic/dojo/cbtree/icons/fileIconsMS.css @@ -0,0 +1 @@ +.fileIcon {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -990px; width: 18px;}.fileIcon.fileIconCollapsed {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -36px; width: 18px;}.fileIcon.fileIconExpanded {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -54px; width: 18px;}.fileIconDIR.fileIconDIRCollapsed {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -36px; width: 18px;}.fileIconDIR.fileIconDIRExpanded {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -54px; width: 18px;}.fileIconMsi {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -90px; width: 18px;}.fileIconExe, .fileIconCgi {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -108px; width: 18px;}.fileIconDll, .fileIconSo {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -144px; width: 18px;}.fileIconBat, .fileIconSh, .fileIconShar, .fileIconCsh, .fileIconKsh, .fileIconTcl {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -162px; width: 18px;}.fileIconBin, .fileIconObj, .fileIconO {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -180px; width: 18px;}.fileIconConf {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -198px; width: 18px;}.fileIconIni, .fileIconInf {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -216px; width: 18px;}.fileIconReg {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -234px; width: 18px;}.fileIconAsm {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -270px; width: 18px;}.fileIconC {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -288px; width: 18px;}.fileIconCpp {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -306px; width: 18px;}.fileIconCs {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -324px; width: 18px;}.fileIconH, .fileIconHpp {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -342px; width: 18px;}.fileIconJs {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -360px; width: 18px;}.fileIconPhp {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -378px; width: 18px;}.fileIconPl {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -396px; width: 18px;}.fileIconPm {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -414px; width: 18px;}.fileIconPy {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -432px; width: 18px;}.fileIconVb {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -450px; width: 18px;}.fileIconVbs {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -468px; width: 18px;}.fileIconSnippet {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -486px; width: 18px;}.fileIconCsproj {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -630px; width: 18px;}.fileIconVbproj {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -648px; width: 18px;}.fileIconVcproj {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -666px; width: 18px;}.fileIconVsmacro {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -684px; width: 18px;}.fileIconSln {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -702px; width: 18px;}.fileIconSuo {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -720px; width: 18px;}.fileIconExp {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -738px; width: 18px;}.fileIconLib {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -756px; width: 18px;}.fileIconLib {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -756px; width: 18px;}.fileIconPdb {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -774px; width: 18px;}.fileIconMk {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -792px; width: 18px;}.fileIconIdb {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -810px; width: 18px;}.fileIconIlk {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -828px; width: 18px;}.fileIconRc {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -846px; width: 18px;}.fileIconRct {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -864px; width: 18px;}.fileIconRes {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -864px; width: 18px;}.fileIconUnknown {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -990px; width: 18px;}.fileIconHtm, .fileIconHtml, .fileIconShtml {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -972px; width: 18px;}.fileIconDoc {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1026px; width: 18px;}.fileIconDocx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1044px; width: 18px;}.fileIconDotx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1062px; width: 18px;}.fileIconPpt {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1080px; width: 18px;}.fileIconPptx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1098px; width: 18px;}.fileIconPotx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1116px; width: 18px;}.fileIconXls, .fileIconCsv {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1134px; width: 18px;}.fileIconXlsx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1152px; width: 18px;}.fileIconXlts {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1170px; width: 18px;}.fileIconVsd, .fileIconVsdx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1188px; width: 18px;}.fileIconPst {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1242px; width: 18px;}.fileIconMsg {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1260px; width: 18px;}.fileIconPip {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1278px; width: 18px;}.fileIconBmp, .fileIconIco, .fileIconTif, .fileIconTiff {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1350px; width: 18px;}.fileIconGif {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1368px; width: 18px;}.fileIconJpg, .fileIconJpeg {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1386px; width: 18px;}.fileIconPng {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1404px; width: 18px;}.fileIconAif, .fileIconAifc, .fileIconAiff, .fileIconMid, .fileIconMidi, .fileIconMp2, .fileIconMp3, .fileIconMpa, .fileIconMpe, .fileIconMpg, .fileIconMpeg, .fileIconVoc, .fileIconWav {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1422px; width: 18px;}.fileIconMp4 {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1440px; width: 18px;}.fileIconAsf, .fileIconAsr, .fileIconAsx, .fileIconAvi, .fileIconMov, .fileIconMovie, .fileIconQt, .fileIconVdo, .fileIconViv, .fileIconVivo, .fileIconWmv, .fileIconWmx, .fileIconWvx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1458px; width: 18px;}.fileIconPdf {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1710px; width: 18px;}.fileIconPs, .fileIconAi {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1728px; width: 18px;}.fileIconCss, .fileIconJava, .fileIconJson, .fileIconMd, .fileIconTxt, .fileIconXml {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1746px; width: 18px;}.fileIconWmf {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1800px; width: 18px;}.fileIconWxs {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1818px; width: 18px;}.fileIconXsd {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1836px; width: 18px;}.fileIconXsl {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1854px; width: 18px;}.fileIconXslt {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1872px; width: 18px;}.fileIconJar {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1908px; width: 18px;}.fileIconGz, .fileIconTar, .fileIconTgz, .fileIconZ, .fileIconZip {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1926px; width: 18px;}.fileIconPs1 {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1980px; width: 18px;}.fileIconThmx {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -1998px; width: 18px;}.fileIconKmz {background-image: url('images/fileIconsMS.gif'); background-repeat: no-repeat; background-position: -2016px; width: 18px;} \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/cbtree/themes/claro/claro.css b/Server/www/spiderbasic/dojo/cbtree/themes/claro/claro.css new file mode 100644 index 0000000..caad399 --- /dev/null +++ b/Server/www/spiderbasic/dojo/cbtree/themes/claro/claro.css @@ -0,0 +1 @@ +.claro .cbtreeCheckBox {background-image: url('images/spriteCheckbox.gif'); background-repeat: no-repeat; width: 16px; height: 16px; margin: 0; padding: 0;}.claro .cbtreeCheckBox {background-position: -16px;}.claro .cbtreeCheckBoxChecked {background-position: 0px;}.claro .cbtreeCheckBoxMixed {background-position: -32px;}.claro .cbtreeCheckBoxDisabled {background-position: -64px;}.claro .cbtreeCheckBoxCheckedDisabled {background-position: -48px;}.claro .cbtreeCheckBoxMixedDisabled {background-position: -80px;}.claro .cbtreeCheckBoxReadOnly {background-position: -64px;}.claro .cbtreeCheckBoxCheckedReadOnly {background-position: -48px;}.claro .cbtreeCheckBoxMixedReadOnly {background-position: -80px;}.claro .cbtreeCheckBoxHover {background-position: -112px;}.claro .cbtreeCheckBoxCheckedHover {background-position: -96px;}.claro .cbtreeCheckBoxMixedHover {background-position: -128px;} \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/dgrid/css/dgrid.css b/Server/www/spiderbasic/dojo/dgrid/css/dgrid.css new file mode 100644 index 0000000..a0b173a --- /dev/null +++ b/Server/www/spiderbasic/dojo/dgrid/css/dgrid.css @@ -0,0 +1 @@ +.dgrid {overflow: hidden; border: 1px solid #ddd; display: block;}.dgrid-header {background-color: #eee;}.dgrid-header-row {position: absolute; right: 17px; left: 0;}.dgrid-header-scroll {position: absolute; top: 0; right: 0;}.dgrid-footer {position: absolute; bottom: 0; width: 100%;}.dgrid-header-hidden {font-size: 0; height: 0 !important; border-top: none !important; border-bottom: none !important; margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;}.dgrid-footer-hidden {display: none;}.dgrid-sortable {cursor: pointer;}.dgrid-header,.dgrid-header-row,.dgrid-footer {overflow: hidden; background-color: #eee;}.dgrid-row-table {border-collapse: collapse; border: none; table-layout: fixed; empty-cells: show; width: 100%; height: 100%;}.dgrid-cell {padding: 3px; text-align: left; overflow: hidden; vertical-align: top; border: 1px solid #ddd; border-top-style: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}.dgrid-content {position: relative; height: 99%;}.dgrid-scroller {overflow-x: auto; overflow-y: scroll; position: absolute; top: 0px; margin-top: 25px; bottom: 0px; width: 100%; background: white;}.dgrid-preload {font-size: 0; line-height: 0;}.dgrid-loading {position: relative; height: 100%;}.dgrid-above {position: absolute; bottom: 0;}.ui-icon {width: 16px; height: 16px; background-image: url("images/ui-icons_222222_256x240.png");}.dgrid-sort-arrow {background-position: -64px -16px; display: block; float: right; margin: 0 4px 0 5px; height: 12px;}.dgrid-sort-up .dgrid-sort-arrow {background-position: 0px -16px;}.dgrid-selected {background-color: #BFD6EB;}.dgrid-input {width: 99%;}html.has-mozilla .dgrid .dgrid-row:focus,html.has-mozilla .dgrid .dgrid-cell:focus {outline: 1px dotted;}html.has-mozilla .dgrid-focus {outline-offset: -1px;}.dgrid-scrollbar-measure {width: 100px; height: 100px; overflow: scroll; position: absolute; top: -9999px;}.dgrid-autoheight {height: auto;}.dgrid-autoheight .dgrid-scroller {position: relative; overflow-y: hidden;}.dgrid-autoheight .dgrid-header-scroll {display: none;}.dgrid-autoheight .dgrid-header {right: 0;}.dgrid-column-set {overflow: hidden; width: 100%; position: relative; height: 100%; -ms-touch-action: pan-y; touch-action: pan-y;}.dgrid-column-set-cell {vertical-align: top; height: 100%;}.dgrid-column-set-scroller-container {font-size: 0; position: absolute; bottom: 0;}.dgrid-autoheight .dgrid-column-set-scroller-container {position: relative;}.dgrid-column-set-scroller {display: inline-block; overflow-x: auto; overflow-y: hidden;}.dgrid-column-set-scroller-content {height: 1px;}.ui-icon-triangle-1-e {background-position: -32px -16px;}.ui-icon-triangle-1-se {background-position: -48px -16px;}.dgrid-expando-icon {width: 16px; height: 16px;}.dgrid-tree-container {-webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; -o-transition-duration: 0.3s; -ms-transition-duration: 0.3s; transition-duration: 0.3s; overflow: hidden;}.dgrid-tree-container.dgrid-tree-resetting {-webkit-transition-duration: 0; -moz-transition-duration: 0; -o-transition-duration: 0; -ms-transition-duration: 0; transition-duration: 0;}.dgrid-hider-toggle {background-position: 0 -192px; background-color: transparent; border: none; cursor: pointer; position: absolute; right: 0; top: 0;}.dgrid-rtl-swap .dgrid-hider-toggle {right: auto; left: 0;}.dgrid-hider-menu {position: absolute; top: 0; right: 17px; width: 184px; background-color: #fff; border: 1px solid #000; z-index: 99999; padding: 4px; overflow-x: hidden; overflow-y: auto;}.dgrid-rtl-swap .dgrid-hider-menu {right: auto; left: 17px;}.dgrid-hider-menu-row {position: relative; padding: 2px;}.dgrid-hider-menu-check {position: absolute; top: 2px; left: 2px; padding: 0;}.dgrid-hider-menu-label {display: block; padding-left: 20px;}.dgrid-header .dojoDndTarget .dgrid-cell {display: table-cell;}.dgrid-header .dojoDndItemBefore {border-left: 2px dotted #000 !important;}.dgrid-header .dojoDndItemAfter {border-right: 2px dotted #000 !important;}.dgrid-column-resizer {cursor: col-resize; position: absolute; width: 2px; background-color: #666; z-index: 1000;}.dgrid-resize-handle {height: 100px; width: 0; position: absolute; right: -4px; top: -4px; cursor: col-resize; z-index: 999; border-left: 5px solid transparent; outline: none;}.dgrid-resize-header-container {height: 100%;}.dgrid-resize-guard {cursor: col-resize; position: absolute; bottom: 0; left: 0; right: 0; top: 0;}html.has-touch .dgrid-resize-handle {border-left: 20px solid transparent;}html.has-touch .dgrid-column-resizer {width: 2px;}.dgrid-resize-header-container {position: relative;}.dgrid-header .dgrid-cell {overflow: hidden;}.dgrid-spacer-row {height: 0;}.dgrid-spacer-row th {padding-top: 0; padding-bottom: 0; border-top: none; border-bottom: none;}.dgrid-status {padding: 2px;}.dgrid-pagination .dgrid-status {float: left;}.dgrid-pagination .dgrid-navigation,.dgrid-pagination .dgrid-page-size {float: right;}.dgrid-navigation .dgrid-page-link {cursor: pointer; font-weight: bold; text-decoration: none; color: inherit; padding: 0 4px;}.dgrid-first,.dgrid-last,.dgrid-next,.dgrid-previous {font-size: 130%;}.dgrid-pagination .dgrid-page-disabled {color: #aaa; cursor: default;}.dgrid-page-input {margin-top: 1px; width: 2em; text-align: center;}.dgrid-page-size {margin: 1px 4px 0 4px;}.dgrid-rtl-swap .dgrid-header-row {right: 0; left: 17px;}.dgrid-rtl-swap .dgrid-header-scroll {left: 0px; right: auto;}.dgrid-rtl .dgrid-cell {text-align: right;}.dgrid-rtl .dgrid-sort-arrow {float: left; margin: 0 5px 0 4px;}.dgrid-rtl .ui-icon-triangle-1-e {background-position: -96px -16px;}.dgrid-rtl .ui-icon-triangle-1-se {background-position: -80px -16px;}.dgrid-rtl .dgrid-pagination .dgrid-status {float: right;}.dgrid-rtl .dgrid-pagination .dgrid-page-size {float: right;}.dgrid-rtl .dgrid-pagination .dgrid-navigation {float: left;}.dgrid-rtl.dgrid-autoheight .dgrid-header {left: 0;} \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/dgrid/css/images/ui-icons_222222_256x240.png b/Server/www/spiderbasic/dojo/dgrid/css/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..b273ff1 Binary files /dev/null and b/Server/www/spiderbasic/dojo/dgrid/css/images/ui-icons_222222_256x240.png differ diff --git a/Server/www/spiderbasic/dojo/dgrid/css/images/ui-icons_ffffff_256x240.png b/Server/www/spiderbasic/dojo/dgrid/css/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..5c386cf Binary files /dev/null and b/Server/www/spiderbasic/dojo/dgrid/css/images/ui-icons_ffffff_256x240.png differ diff --git a/Server/www/spiderbasic/dojo/dojo.js b/Server/www/spiderbasic/dojo/dojo.js new file mode 100644 index 0000000..6ed6314 --- /dev/null +++ b/Server/www/spiderbasic/dojo/dojo.js @@ -0,0 +1,1122 @@ +//>>built +(function(f,p){var k,n=function(){},e=function(a){for(var c in a)return 0;return 1},h={}.toString,q=function(a){return"[object Function]"==h.call(a)},d=function(a){return"[object String]"==h.call(a)},b=function(a){return"[object Array]"==h.call(a)},a=function(a,c){if(a)for(var b=0;bk;)try{if(G=Q[k++],new ActiveXObject(G))break}catch(J){}H=function(){return new ActiveXObject(G)}}r.getXhr=H;u.add("dojo-gettext-api", +1);r.getText=function(a,c,b){var g=H();g.open("GET",oa(a),!1);g.send(null);if(200==g.status||!location.host&&!g.status)b&&b(g.responseText,c);else throw l("xhrFailed",g.status);return g.responseText};var F=u("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");r.eval=function(a,b){return F(a+"\r\n//# sourceURL\x3d"+b)};var D={},C=r.signal=function(c,g){var l=D[c];a(l&&l.slice(0),function(a){a.apply(null,b(g)?g:[g])})},P=r.on=function(a,b){var c=D[a]||(D[a]=[]);c.push(b);return{remove:function(){for(var a= +0;aq("ie")&&this.defer(function(){try{var a=k.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;aq("ie")&&(d.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0s.clientHeight)&&(a+=s.clientLeft);return 8>l||g?a+s.clientWidth-s.scrollWidth:-a}return a};d.position=function(a,b){a=k.byId(a);var l=p.body(a.ownerDocument),g=a.getBoundingClientRect(),g={x:g.left,y:g.top,w:g.right-g.left,h:g.bottom-g.top};9>f("ie")&&(g.x-=f("quirks")?l.clientLeft+l.offsetLeft:0,g.y-=f("quirks")?l.clientTop+l.offsetTop:0);b&&(l=d.docScroll(a.ownerDocument),g.x+=l.x,g.y+=l.y);return g};d.getMarginSize=function(a, +b){a=k.byId(a);var l=d.getMarginExtents(a,b||n.getComputedStyle(a)),g=a.getBoundingClientRect();return{w:g.right-g.left+l.w,h:g.bottom-g.top+l.h}};d.normalizeEvent=function(a){"layerX"in a||(a.layerX=a.offsetX,a.layerY=a.offsetY);if(!("pageX"in a)){var b=a.target,b=b&&b.ownerDocument||document,l=f("quirks")?b.body:b.documentElement;a.pageX=a.clientX+d.fixIeBiDiScrollLeft(l.scrollLeft||0,b);a.pageY=a.clientY+(l.scrollTop||0)}};return d})},"dijit/_base/scroll":function(){define(["dojo/window","../main"], +function(f,p){p.scrollIntoView=function(k,n){f.scrollIntoView(k,n)}})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(f,p,k,n,e,h,q,d){var b=p("dijit._TemplatedMixin",d,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var b=this.declaredClass,l=this;return q.substitute(a,this,function(a,s){"!"==s.charAt(0)&&(a=n.getObject(s.substr(1), +!1,l));if("undefined"==typeof a)throw Error(b+" template:"+s);return null==a?"":"!"==s.charAt(0)?a:this._escapeValue(""+a)},this)},_escapeValue:function(a){return a.replace(/["'<>&]/g,function(a){return{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[a]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=f(this.templatePath,{sanitize:!0}));var a=b.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument), +c;if(n.isString(a)){if(c=k.toDom(this._stringRepl(a),this.ownerDocument),1!=c.nodeType)throw Error("Invalid template: "+a);}else c=a.cloneNode(!0);this.domNode=c}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)}});b._templateCache={};b.getCachedTemplate=function(a,c,l){var g=b._templateCache,s=a,r=g[s];if(r){try{if(!r.ownerDocument||r.ownerDocument== +(l||document))return r}catch(m){}k.destroy(r)}a=q.trim(a);if(c||a.match(/\$\{([^\}]+)\}/g))return g[s]=a;c=k.toDom(a,l);if(1!=c.nodeType)throw Error("Invalid template: "+a);return g[s]=c};h("ie")&&e(window,"unload",function(){var a=b._templateCache,c;for(c in a){var l=a[c];"object"==typeof l&&k.destroy(l);delete a[c]}});return b})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(f,p,k){var n=window,e={addOnWindowUnload:function(e,q){f.windowUnloaded||k(n,"unload",f.windowUnloaded= +function(){});k(n,"unload",p.hitch(e,q))},addOnUnload:function(e,q){k(n,"beforeunload",p.hitch(e,q))}};f.addOnWindowUnload=e.addOnWindowUnload;f.addOnUnload=e.addOnUnload;return e})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),function(f,p,k,n,e,h,q,d,b,a,c,l){p=p("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments); +f.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(a){this.watch(a,h.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",!0);this._set("active",this._mouseDown); +break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(c){b=b.concat(f.map(b,function(a){return a+c}),"dijit"+c)}var b=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");var c= +"mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(c);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var c=this.stateNode||this.domNode,m={};f.forEach(c.className.split(" "),function(a){m[a]=!0});"_stateClasses"in this&&f.forEach(this._stateClasses,function(a){delete m[a]});f.forEach(b,function(a){m[a]=!0});var l= +[],d;for(d in m)l.push(d);c.className=l.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,b,c){function m(c){n.toggle(a,b+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":case "MSPointerOver":case "pointerover":n.toggle(a,b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":n.toggle(a,b+"Hover",!1);m(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":m(!0);break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":m(!1); +break;case "focus":case "focusin":n.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":n.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});d(function(){function g(a,b,c){if(!c||!k.isDescendant(c,b))for(;b&&b!=c;b=b.parentNode)if(b._cssState){var g=l.getEnclosingWidget(b);g&&(b==g.domNode?g._cssMouseEvent(a):g._subnodeCssMouseEvent(b,b._cssState,a))}}var s=a.body(),r;q(s,b.over,function(a){g(a,a.target,a.relatedTarget)});q(s,b.out,function(a){g(a,a.target,a.relatedTarget)}); +q(s,c.press,function(a){r=a.target;g(a,r)});q(s,c.release,function(a){g(a,r);r=null});q(s,"focusin, focusout",function(a){var b=a.target;if(b._cssState&&!b.getAttribute("widgetId")){var c=l.getEnclosingWidget(b);c&&c._subnodeCssMouseEvent(b,b._cssState,a)}})});return p})},"dojo/selector/_loader":function(){define(["../has","require"],function(f,p){if("undefined"!==typeof document){var k=document.createElement("div");f.add("dom-qsa2.1",!!k.querySelectorAll);f.add("dom-qsa3",function(){try{return k.innerHTML= +"\x3cp class\x3d'TEST'\x3e\x3c/p\x3e",1==k.querySelectorAll(".TEST:empty").length}catch(e){}})}var n;return{load:function(e,h,q,d){if(d&&d.isBuild)q();else{d=p;e="default"==e?f("config-selectorEngine")||"css3":e;e="css2"==e||"lite"==e?"./lite":"css2.1"==e?f("dom-qsa2.1")?"./lite":"./acme":"css3"==e?f("dom-qsa3")?"./lite":"./acme":"acme"==e?"./acme":(d=h)&&e;if("?"==e.charAt(e.length-1)){e=e.substring(0,e.length-1);var b=!0}if(b&&(f("dom-compliant-qsa")||n))return q(n);d([e],function(a){"./lite"!= +e&&(n=a);q(a)})}}}})},"dijit/layout/ScrollingTabController":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/_base/lang dojo/on dojo/query dojo/sniff ../registry dojo/text!./templates/ScrollingTabController.html dojo/text!./templates/_ScrollingTabControllerButton.html ./TabController ./utils ../_WidgetsInTemplateMixin ../Menu ../MenuItem ../form/Button ../_HasDropDown dojo/NodeList-dom ../a11yclick".split(" "),function(f,p,k, +n,e,h,q,d,b,a,c,l,g,s,r,m,t,w,u,v){l=p("dijit.layout.ScrollingTabController",[s,m],{baseClass:"dijitTabController dijitScrollingTabController",templateString:l,useMenu:!0,useSlider:!0,tabStripClass:"",_minScroll:5,_setClassAttr:{node:"containerNode",type:"class"},buildRendering:function(){this.inherited(arguments);var a=this.domNode;this.scrollNode=this.tablistWrapper;this._initButtons();this.tabStripClass||(this.tabStripClass="dijitTabContainer"+this.tabPosition.charAt(0).toUpperCase()+this.tabPosition.substr(1).replace(/-.*/, +"")+"None",k.add(a,"tabStrip-disabled"));k.add(this.tablistWrapper,this.tabStripClass)},onStartup:function(){this.inherited(arguments);e.set(this.domNode,"visibility","");this._postStartup=!0;this.own(d(this.containerNode,"attrmodified-label, attrmodified-iconclass",q.hitch(this,function(a){this._dim&&this.resize(this._dim)})))},onAddChild:function(a,b){this.inherited(arguments);e.set(this.containerNode,"width",e.get(this.containerNode,"width")+200+"px")},onRemoveChild:function(a,b){var c=this.pane2button(a.id); +this._selectedTab===c.domNode&&(this._selectedTab=null);this.inherited(arguments)},_initButtons:function(){this._btnWidth=0;this._buttons=b("\x3e .tabStripButton",this.domNode).filter(function(a){if(this.useMenu&&a==this._menuBtn.domNode||this.useSlider&&(a==this._rightBtn.domNode||a==this._leftBtn.domNode))return this._btnWidth+=n.getMarginSize(a).w,!0;e.set(a,"display","none");return!1},this)},_getTabsWidth:function(){var a=this.getChildren();if(a.length){var b=a[this.isLeftToRight()?0:a.length- +1].domNode,a=a[this.isLeftToRight()?a.length-1:0].domNode;return a.offsetLeft+a.offsetWidth-b.offsetLeft}return 0},_enableBtn:function(a){var b=this._getTabsWidth();a=a||e.get(this.scrollNode,"width");return 0a("ie")||a("trident")&&a("quirks")||a("webkit")?this.scrollNode.scrollLeft:e.get(this.containerNode,"width")-e.get(this.scrollNode,"width")+(a("trident")||a("edge")?-1:1)*this.scrollNode.scrollLeft},_convertToScrollLeft:function(b){if(this.isLeftToRight()||8>a("ie")||a("trident")&&a("quirks")||a("webkit"))return b;var c=e.get(this.containerNode,"width")-e.get(this.scrollNode,"width");return(a("trident")||a("edge")?-1:1)*(b-c)},onSelectChild:function(a, +b){var c=this.pane2button(a.id);if(c){var g=c.domNode;if(g!=this._selectedTab&&(this._selectedTab=g,this._postResize)){var m=this._getScroll();m>g.offsetLeft||m+e.get(this.scrollNode,"width")b)return{min:this.isLeftToRight()? +0:a[a.length-1].domNode.offsetLeft,max:this.isLeftToRight()?a[a.length-1].domNode.offsetLeft+a[a.length-1].domNode.offsetWidth-b:c};a=this.isLeftToRight()?0:c;return{min:a,max:a}},_getScrollForSelectedTab:function(){var a=this._selectedTab,b=e.get(this.scrollNode,"width"),c=this._getScrollBounds(),a=a.offsetLeft+e.get(a,"width")/2-b/2;return a=Math.min(Math.max(a,c.min),c.max)},createSmoothScroll:function(a){if(0=b.max)}});g=p("dijit.layout._ScrollingTabControllerButtonMixin",null,{baseClass:"dijitTab tabStripButton",templateString:g, +tabIndex:"",isFocusable:function(){return!1}});p("dijit.layout._ScrollingTabControllerButton",[u,g]);p("dijit.layout._ScrollingTabControllerMenuButton",[u,v,g],{containerId:"",tabIndex:"-1",isLoaded:function(){return!1},loadDropDown:function(a){this.dropDown=new t({id:this.containerId+"_menu",ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir});var b=c.byId(this.containerId);f.forEach(b.getChildren(),function(a){var c=new w({id:a.id+"_stcMi",label:a.title,iconClass:a.iconClass, +disabled:a.disabled,ownerDocument:this.ownerDocument,dir:a.dir,lang:a.lang,textDir:a.textDir||b.textDir,onClick:function(){b.selectChild(a)}});this.dropDown.addChild(c)},this);a()},closeDropDown:function(a){this.inherited(arguments);this.dropDown&&(this._popupStateNode.removeAttribute("aria-owns"),this.dropDown.destroyRecursive(),delete this.dropDown)}});return l})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "), +function(f,p,k,n,e,h,q){function d(a,b,l,g){var s=h.getEffectiveBox(a.ownerDocument);(!a.parentNode||"body"!=String(a.parentNode.tagName).toLowerCase())&&e.body(a.ownerDocument).appendChild(a);var r=null;f.some(b,function(b){var c=b.corner,m=b.pos,d=0,t={w:{L:s.l+s.w-m.x,R:m.x-s.l,M:s.w}[c.charAt(1)],h:{T:s.t+s.h-m.y,B:m.y-s.t,M:s.h}[c.charAt(0)]},e=a.style;e.left=e.right="auto";l&&(d=l(a,b.aroundCorner,c,t,g),d="undefined"==typeof d?0:d);var h=a.style,q=h.display,f=h.visibility;"none"==h.display&& +(h.visibility="hidden",h.display="");e=p.position(a);h.display=q;h.visibility=f;q={L:m.x,R:m.x-e.w,M:Math.max(s.l,Math.min(s.l+s.w,m.x+(e.w>>1))-e.w)}[c.charAt(1)];f={T:m.y,B:m.y-e.h,M:Math.max(s.t,Math.min(s.t+s.h,m.y+(e.h>>1))-e.h)}[c.charAt(0)];m=Math.max(s.l,q);h=Math.max(s.t,f);q=Math.min(s.l+s.w,q+e.w);f=Math.min(s.t+s.h,f+e.h);q-=m;f-=h;d+=e.w-q+(e.h-f);if(null==r||d>1)}[a.charAt(1)],y:{T:y,B:y+B,M:y+(B>>1)}[a.charAt(0)]}})}var m;if("string"==typeof b||"offsetWidth"in b||"ownerSVGElement"in b){if(m=p.position(b,!0),/^(above|below)/.test(l[0])){var t=p.getBorderExtents(b),e=b.firstChild?p.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0},h=p.getBorderExtents(a),q=a.firstChild?p.getBorderExtents(a.firstChild):{t:0,l:0,b:0,r:0};m.y+=Math.min(t.t+e.t,h.t+q.t);m.h-= +Math.min(t.t+e.t,h.t+q.t)+Math.min(t.b+e.b,h.b+q.b)}}else m=b;if(b.parentNode){t="absolute"==k.getComputedStyle(b).position;for(b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){e=p.position(b,!0);h=k.getComputedStyle(b);/relative|absolute/.test(h.position)&&(t=!1);if(!t&&/hidden|auto|scroll/.test(h.overflow)){var q=Math.min(m.y+m.h,e.y+e.h),x=Math.min(m.x+m.w,e.x+e.w);m.x=Math.max(m.x,e.x);m.y=Math.max(m.y,e.y);m.h=q-m.y;m.w=x-m.x}"absolute"==h.position&&(t=!0);b=b.parentNode}}var z=m.x,y=m.y, +A="w"in m?m.w:m.w=m.width,B="h"in m?m.h:(n.deprecated("place.around: dijit/place.__Rectangle: { x:"+z+", y:"+y+", height:"+m.height+", width:"+A+" } has been deprecated. Please use { x:"+z+", y:"+y+", h:"+m.height+", w:"+A+" }","","2.0"),m.h=m.height),E=[];f.forEach(l,function(a){var b=g;switch(a){case "above-centered":r("TM","BM");break;case "below-centered":r("BM","TM");break;case "after-centered":b=!b;case "before-centered":r(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":r(b? +"TL":"TR",b?"TR":"TL");r(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":r(b?"BL":"BR",b?"TL":"TR");r(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":r(b?"TL":"TR",b?"BL":"BR");r(b?"TR":"TL",b?"BR":"BL");break;default:r(a.aroundCorner,a.corner)}});a=d(a,E,s,{w:A,h:B});a.aroundNodePos=m;return a}}})},"dijit/_HasDropDown":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on dojo/touch ./registry ./focus ./popup ./_FocusMixin".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m){return f("dijit._HasDropDown",m,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:-1,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(b){!this.disabled&&!this.readOnly&&("MSPointerDown"!=b.type&&"pointerdown"!=b.type&&b.preventDefault(),this.own(c.once(this.ownerDocument,l.release,a.hitch(this,"_onDropDownMouseUp"))),this.toggleDropDown())}, +_onDropDownMouseUp:function(a){var b=this.dropDown,c=!1;if(a&&this._opened){var m=h.position(this._buttonNode,!0);if(!(a.pageX>=m.x&&a.pageX<=m.x+m.w)||!(a.pageY>=m.y&&a.pageY<=m.y+m.h)){for(m=a.target;m&&!c;)e.contains(m,"dijitPopup")?c=!0:m=m.parentNode;if(c){m=a.target;if(b.onItemClick){for(var l;m&&!(l=g.byNode(m));)m=m.parentNode;if(l&&l.onClick&&l.getParent)l.getParent().onItemClick(l,a)}return}}}if(this._opened){if(b.focus&&(!1!==b.autoFocus||"mouseup"==a.type&&!this.hovering))this._focusDropDownTimer= +this.defer(function(){b.focus();delete this._focusDropDownTimer})}else this.focus&&this.defer("focus")},_onDropDownClick:function(a){this._stopClickEvents&&(a.stopPropagation(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down", +left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";e.add(this._arrowWrapperNode||this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);var b=this.focusNode||this.domNode;this.own(c(this._buttonNode,l.press,a.hitch(this,"_onDropDownMouseDown")),c(this._buttonNode,"click",a.hitch(this,"_onDropDownClick")),c(b,"keydown",a.hitch(this,"_onKey")),c(b,"keyup",a.hitch(this,"_onKeyUp")))},destroy:function(){this._opened&&this.closeDropDown(!0); +this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&!this.readOnly){var c=this.dropDown,g=a.target;if(c&&(this._opened&&c.handleKey)&&!1===c.handleKey(a))a.stopPropagation(),a.preventDefault();else if(c&&this._opened&&a.keyCode==b.ESCAPE)this.closeDropDown(),a.stopPropagation(),a.preventDefault();else if(!this._opened&&(a.keyCode==b.DOWN_ARROW||(a.keyCode==b.ENTER||a.keyCode==b.SPACE&&(!this._searchTimer|| +a.ctrlKey||a.altKey||a.metaKey))&&("input"!==(g.tagName||"").toLowerCase()||g.type&&"text"!==g.type.toLowerCase())))this._toggleOnKeyUp=!0,a.stopPropagation(),a.preventDefault()}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var b=this.dropDown;b&&b.focus&&this.defer(a.hitch(b,"focus"),1)}},_onBlur:function(){this.closeDropDown(!1);this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},loadAndOpenDropDown:function(){var b= +new p,c=a.hitch(this,function(){this.openDropDown();b.resolve(this.dropDown)});this.isLoaded()?c():this.loadDropDown(c);return b},toggleDropDown:function(){!this.disabled&&!this.readOnly&&(this._opened?this.closeDropDown(!0):this.loadAndOpenDropDown())},openDropDown:function(){var b=this.dropDown,c=b.domNode,g=this._aroundNode||this.domNode,m=this,l=r.open({parent:this,popup:b,around:g,orient:this.dropDownPosition,maxHeight:this.maxHeight,onExecute:function(){m.closeDropDown(!0)},onCancel:function(){m.closeDropDown(!0)}, +onClose:function(){n.set(m._popupStateNode,"popupActive",!1);e.remove(m._popupStateNode,"dijitHasDropDownOpen");m._set("_opened",!1)}});if(this.forceWidth||this.autoWidth&&g.offsetWidth>b._popupWrapper.offsetWidth){var g=g.offsetWidth-b._popupWrapper.offsetWidth,s={w:b.domNode.offsetWidth+g};this._origStyle=c.style.cssText;a.isFunction(b.resize)?b.resize(s):h.setMarginBox(c,s);"R"==l.corner[1]&&(b._popupWrapper.style.left=b._popupWrapper.style.left.replace("px","")-g+"px")}n.set(this._popupStateNode, +"popupActive","true");e.add(this._popupStateNode,"dijitHasDropDownOpen");this._set("_opened",!0);this._popupStateNode.setAttribute("aria-expanded","true");this._popupStateNode.setAttribute("aria-owns",b.id);"presentation"!==c.getAttribute("role")&&!c.getAttribute("aria-labelledby")&&c.setAttribute("aria-labelledby",this.id);return l},closeDropDown:function(a){this._focusDropDownTimer&&(this._focusDropDownTimer.remove(),delete this._focusDropDownTimer);this._opened&&(this._popupStateNode.setAttribute("aria-expanded", +"false"),a&&this.focus&&this.focus(),r.close(this.dropDown),this._opened=!1);this._origStyle&&(this.dropDown.domNode.style.cssText=this._origStyle,delete this._origStyle)}})})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(f,p,k,n){return k("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(e){n.mixin(this, +e);this.connects=[];e=this.store;if(!e.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");e.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([p.after(e,"onNew",n.hitch(this,"onNewItem"),!0),p.after(e,"onDelete",n.hitch(this,"onDeleteItem"),!0),p.after(e,"onSet",n.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var e;e=this.connects.pop();)e.remove()},getRoot:function(e,h){this.root?e(this.root): +this.store.fetch({query:this.query,onComplete:n.hitch(this,function(h){if(1!=h.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+h.length+" items, but must return exactly one");this.root=h[0];e(this.root)}),onError:h})},mayHaveChildren:function(e){return f.some(this.childrenAttrs,function(h){return this.store.hasAttribute(e,h)},this)},getChildren:function(e,h,q){var d=this.store;if(d.isItemLoaded(e)){for(var b=[],a=0;athis.passivePopupDelay&&(this.passive_hover_timer&&this.passive_hover_timer.remove(),this.passive_hover_timer=this.defer(function(){this.onItemClick(a,{type:"click"})},this.passivePopupDelay));this._hoveredChild=a;a._set("hovering",!0)},_onChildDeselect:function(a){this._stopPopupTimer();this.currentPopupItem==a&&(this._stopPendingCloseTimer(),this._pendingClose_timer=this.defer(function(){this.currentPopupItem= +this._pendingClose_timer=null;a._closePopup()},this.popupDelay))},onItemUnhover:function(a){this._hoveredChild==a&&(this._hoveredChild=null);this.passive_hover_timer&&(this.passive_hover_timer.remove(),this.passive_hover_timer=null);a._set("hovering",!1)},_stopPopupTimer:function(){this.hover_timer&&(this.hover_timer=this.hover_timer.remove())},_stopPendingCloseTimer:function(){this._pendingClose_timer&&(this._pendingClose_timer=this._pendingClose_timer.remove())},_getTopMenu:function(){for(var a= +this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,b){this.passive_hover_timer&&this.passive_hover_timer.remove();this.focusChild(a);if(a.disabled)return!1;if(a.popup){this.set("selected",a);this.set("activated",!0);var c=/^key/.test(b._origType||b.type)||0==b.clientX&&0==b.clientY;this._openItemPopup(a,c)}else this.onExecute(),a._onClick?a._onClick(b):a.onClick(b)},_openItemPopup:function(a,b){if(a!=this.currentPopupItem){this.currentPopupItem&&(this._stopPendingCloseTimer(),this.currentPopupItem._closePopup()); +this._stopPopupTimer();var c=a.popup;c.parentMenu=this;this.own(this._mouseoverHandle=d.once(c.domNode,"mouseover",h.hitch(this,"_onPopupHover")));var g=this;a._openPopup({parent:this,orient:this._orient||["after","before"],onCancel:function(){b&&g.focusChild(a);g._cleanUp()},onExecute:h.hitch(this,"_cleanUp",!0),onClose:function(){g._mouseoverHandle&&(g._mouseoverHandle.remove(),delete g._mouseoverHandle)}},b);this.currentPopupItem=a}},onOpen:function(){this.isShowingNow=!0;this.set("activated", +!0)},onClose:function(){this.set("activated",!1);this.set("selected",null);this.isShowingNow=!1;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();this.currentPopupItem&&(this.focused&&(n.set(this.selected.focusNode,"tabIndex",this.tabIndex),this.selected.focusNode.focus()),this.currentPopupItem._closePopup(),this.currentPopupItem=null)},_onItemFocus:function(a){if(this._hoveredChild&&this._hoveredChild!=a)this.onItemUnhover(this._hoveredChild);this.set("selected",a)},_onBlur:function(){this._cleanUp(!0); +this.inherited(arguments)},_cleanUp:function(a){this._closeChild();"undefined"==typeof this.isShowingNow&&this.set("activated",!1);a&&this.set("selected",null)}})})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(f,p,k,n,e,h,q,d){function b(a){var c="";a=a.childNodes;for(var l=0,m;m=a[l];l++)8!=m.nodeType&&(c=1==m.nodeType?c+b(m):c+m.nodeValue);return c}var a={},c=1,l=p._scopeName+"attrid";k.add("dom-textContent", +function(a,b,c){return"textContent"in c});f.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};f.get=function(a,c){a=e.byId(a);var l=c.toLowerCase(),l=f.names[l]||c;return"textContent"==l&&!k("dom-textContent")?b(a):a[l]};f.set=function(b,s,r){b=e.byId(b);if(2==arguments.length&&"string"!=typeof s){for(var m in s)f.set(b,m,s[m]);return b}m=s.toLowerCase(); +m=f.names[m]||s;if("style"==m&&"string"!=typeof r)return h.set(b,r),b;if("innerHTML"==m)return k("ie")&&b.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(q.empty(b),b.appendChild(q.toDom(r,b.ownerDocument))):b[m]=r,b;if("textContent"==m&&!k("dom-textContent"))return q.empty(b),b.appendChild(b.ownerDocument.createTextNode(r)),b;if(n.isFunction(r)){var t=b[l];t||(t=c++,b[l]=t);a[t]||(a[t]={});var w=a[t][m];if(w)d.disconnect(w);else try{delete b[m]}catch(u){}r? +a[t][m]=d.connect(b,m,r):b[m]=null;return b}b[m]=r;return b}})},"dojo/errors/CancelError":function(){define(["./create"],function(f){return f("CancelError",null,null,{dojoType:"cancel"})})},"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m){f._xhrObj=r._create;var t=f.config;f.objectToQuery=n.objectToQuery; +f.queryToObject=n.queryToObject;f.fieldToObject=h.fieldToObject;f.formToObject=h.toObject;f.formToQuery=h.toQuery;f.formToJson=h.toJson;f._blockAsync=!1;var w=f._contentHandlers=f.contentHandlers={text:function(a){return a.responseText},json:function(a){return b.fromJson(a.responseText||null)},"json-comment-filtered":function(a){a=a.responseText;var c=a.indexOf("/*"),g=a.lastIndexOf("*/");if(-1==c||-1==g)throw Error("JSON was not comment filtered");return b.fromJson(a.substring(c+2,g))},javascript:function(a){return f.eval(a.responseText)}, +xml:function(a){var b=a.responseXML;b&&(p("dom-qsa2.1")&&!b.querySelectorAll&&p("dom-parser"))&&(b=(new DOMParser).parseFromString(a.responseText,"application/xml"));if(p("ie")&&(!b||!b.documentElement)){var g=function(a){return"MSXML"+a+".DOMDocument"},g=["Microsoft.XMLDOM",g(6),g(4),g(3),g(2)];c.some(g,function(c){try{var g=new ActiveXObject(c);g.async=!1;g.loadXML(a.responseText);b=g}catch(l){return!1}return!0})}return b},"json-comment-optional":function(a){return a.responseText&&/^[^{\[]*\/\*/.test(a.responseText)? +w["json-comment-filtered"](a):w.json(a)}};f._ioSetArgs=function(b,c,g,l){var m={args:b,url:b.url},d=null;if(b.form){var d=e.byId(b.form),s=d.getAttributeNode("action");m.url=m.url||(s?s.value:f.doc?f.doc.URL:null);d=h.toObject(d)}s=[{}];d&&s.push(d);b.content&&s.push(b.content);b.preventCache&&s.push({"dojo.preventCache":(new Date).valueOf()});m.query=n.objectToQuery(a.mixin.apply(null,s));m.handleAs=b.handleAs||"text";var r=new q(function(a){a.canceled=!0;c&&c(a);var b=a.ioArgs.error;b||(b=Error("request cancelled"), +b.dojoType="cancel",a.ioArgs.error=b);return b});r.addCallback(g);var u=b.load;u&&a.isFunction(u)&&r.addCallback(function(a){return u.call(b,a,m)});var w=b.error;w&&a.isFunction(w)&&r.addErrback(function(a){return w.call(b,a,m)});var k=b.handle;k&&a.isFunction(k)&&r.addBoth(function(a){return k.call(b,a,m)});r.addErrback(function(a){return l(a,r)});t.ioPublish&&(f.publish&&!1!==m.args.ioPublish)&&(r.addCallbacks(function(a){f.publish("/dojo/io/load",[r,a]);return a},function(a){f.publish("/dojo/io/error", +[r,a]);return a}),r.addBoth(function(a){f.publish("/dojo/io/done",[r,a]);return a}));r.ioArgs=m;return r};var u=function(a){a=w[a.ioArgs.handleAs](a.ioArgs.xhr);return void 0===a?null:a},v=function(a,b){b.ioArgs.args.failOk||console.error(a);return a},x=function(a){0>=z&&(z=0,t.ioPublish&&(f.publish&&(!a||a&&!1!==a.ioArgs.args.ioPublish))&&f.publish("/dojo/io/stop"))},z=0;g.after(s,"_onAction",function(){z-=1});g.after(s,"_onInFlight",x);f._ioCancelAll=s.cancelAll;f._ioNotifyStart=function(a){t.ioPublish&& +(f.publish&&!1!==a.ioArgs.args.ioPublish)&&(z||f.publish("/dojo/io/start"),z+=1,f.publish("/dojo/io/send",[a]))};f._ioWatch=function(b,c,g,m){b.ioArgs.options=b.ioArgs.args;a.mixin(b,{response:b.ioArgs,isValid:function(a){return c(b)},isReady:function(a){return g(b)},handleResponse:function(a){return m(b)}});s(b);x(b)};f._ioAddQueryToUrl=function(a){a.query.length&&(a.url+=(-1==a.url.indexOf("?")?"?":"\x26")+a.query,a.query=null)};f.xhr=function(a,b,c){var g,m=f._ioSetArgs(b,function(a){g&&g.cancel()}, +u,v),l=m.ioArgs;"postData"in b?l.query=b.postData:"putData"in b?l.query=b.putData:"rawBody"in b?l.query=b.rawBody:(2e.total&&d.count==e.length&&(a=!0):d.count==e.length&&(a=!0);this.nextButton.style.display=a?"":"none";k.set(this.nextButton,"id",this.id+"_next")},clearResultList:function(){for(var e=this.containerNode;2m.total)l=m.total;m.nextPage=function(g){c.direction=g=!1!==g;c.count=l;g?(c.start+=m.length,c.start>=m.total&&(c.count=0)):(c.start-=l,0>c.start&&(c.count=Math.max(l+c.start,0),c.start=0));0>=c.count?(m.length=0,b.onSearch(m,a,c)):s()};b.onSearch(m,a,c)})},function(a){b._fetchHandle=null;b._cancelingQuery|| +console.error(b.declaredClass+" "+a.toString())})};k.mixin(c,this.fetchProperties);this.store._oldAPI?g=l:(g=this._patternToRegExp(l),g.toString=function(){return l});this._lastQuery=a[this.searchAttr]=g;this._queryDeferHandle=this.defer(s,this.searchDelay)},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store){var d=this.list;d&&(this.store=q.byId(d))}this.inherited(arguments)}})})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m){function t(a){return eval("("+a+")")}function w(a){var b=a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt.*$/,""),x=n.map(q.split(/\s+/),function(a){var b=a.toLowerCase();return{name:a,value:"LI"==m.nodeName&&"value"==a||"enctype"==b?m.getAttribute(b):m.getAttributeNode(b).value}})); +var J=e.scope||p._scopeName;q="data-"+J+"-";var F={};"dojo"!==J&&(F[q+"props"]="data-dojo-props",F[q+"type"]="data-dojo-type",F[q+"mixins"]="data-dojo-mixins",F[J+"type"]="dojotype",F[q+"id"]="data-dojo-id");for(var D=0,C,J=[],P,N;C=x[D++];){var K=C.name,R=K.toLowerCase();C=C.value;switch(F[R]||R){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":N=C;break;case "data-dojo-id":case "jsid":P=C;break;case "data-dojo-attach-point":case "dojoattachpoint":v.dojoAttachPoint= +C;break;case "data-dojo-attach-event":case "dojoattachevent":v.dojoAttachEvent=C;break;case "class":v["class"]=m.className;break;case "style":v.style=m.style&&m.style.cssText;break;default:if(K in u||(K=w(a)[R]||K),K in u)switch(typeof u[K]){case "string":v[K]=C;break;case "number":v[K]=C.length?Number(C):NaN;break;case "boolean":v[K]="false"!=C.toLowerCase();break;case "function":""===C||-1!=C.search(/[^\w\.]+/i)?v[K]=new Function(C):v[K]=k.getObject(C,!1)||new Function(C);J.push(K);break;default:R= +u[K],v[K]=R&&"length"in R?C?C.split(/\s*,\s*/):[]:R instanceof Date?""==C?new Date(""):"now"==C?new Date:c.fromISOString(C):R instanceof d?p.baseUrl+C:t(C)}else v[K]=C}}for(x=0;xh[0]&&q.setFullYear(h[0]||1970);var d=0,b=h[7]&&h[7].charAt(0);"Z"!=b&&(d=60*(h[8]||0)+(Number(h[9])||0),"-"!=b&&(d*=-1));b&&(d-=q.getTimezoneOffset());d&&q.setTime(q.getTime()+6E4*d)}return q};k.toISOString=function(f,e){var h=function(a){return 10>a?"0"+a:a};e=e||{};var q=[],d=e.zulu?"getUTC":"get",b="";"time"!=e.selector&&(b=f[d+"FullYear"](),b=["0000".substr((b+"").length)+b,h(f[d+"Month"]()+ +1),h(f[d+"Date"]())].join("-"));q.push(b);if("date"!=e.selector){b=[h(f[d+"Hours"]()),h(f[d+"Minutes"]()),h(f[d+"Seconds"]())].join(":");d=f[d+"Milliseconds"]();e.milliseconds&&(b+="."+(100>d?"0":"")+h(d));if(e.zulu)b+="Z";else if("time"!=e.selector)var d=f.getTimezoneOffset(),a=Math.abs(d),b=b+((0q.max&&(c=q.max);a&&c>>0;if("function"!=typeof f)throw new TypeError; +for(var e=0;e>>0;if("function"!=typeof f)throw new TypeError;for(var e=[],h=0;h>>0; +if("[object Function]"!=={}.toString.call(f))throw new TypeError(f+" is not a function");p&&(k=p);for(n=0;n>>0;if(0===k)return-1;var n=0;1=k)return-1;for(n=0<= +n?n:Math.max(k-Math.abs(n),0);n>>0;if(0===k)return-1;var n=k;1>>0;if("[object Function]"!={}.toString.call(f))throw new TypeError(f+" is not a function");p&&(k=p);n=Array(q);for(e=0;e>>0;if("function"!=typeof f)throw new TypeError;for(var e=0;ee){a.splice(d+1,0,{start:b,count:g-b});return}g>=m&&(b=Math.min(b,m),g=Math.max(g,e),a.splice(d,1))}a.unshift({start:b,count:g-b})}var b=0,a={track:function(){function a(){return function(){var a=this,b=this.inherited(arguments); +n(b,function(b){b=a._results=b.slice();a._partialResults&&(a._partialResults=null);a._ranges=[];d(a._ranges,0,b.length)});return b}}function l(){return function(a){var b=this,c=a.start,g=a.end,l=this.inherited(arguments);this._results||n(l,function(a){return n(a.totalLength,function(l){var m=b._partialResults||(b._partialResults=[]);g=Math.min(g,c+a.length);m.length=l;l=[c,g-c].concat(a);m.splice.apply(m,l);d(b._ranges,c,g);return a})});return l}}function g(a,c){b++;var g=c.target;c=f.delegate(c, +v[a]);n(w._results||w._partialResults,function(b){if(b){var l,d,m,r=w._ranges,t,q="id"in c?c.id:e.getIdentity(g),f=-1,n=-1,k=-1,p=-1;if("delete"===a||"update"===a)for(l=0;-1===f&&l=Math.max(0,t.start-1)&&f<=t.start+t.count?f:e.defaultNewToStart?0:n.length),n.splice(d,0,g),q=h.indexOf(u(n),g),N=t.start+q,0===q&&0!==t.start?m=l-1:q>=n.length-1&&N=m)c.splice(g,1);else{l.start=b;l.count=m-l.start;break a}else if(ad){c.splice(g,1,{start:d,count:a-d},{start:b,count:m-b});break a}else l.count=a-l.start}for(c=a;cc.value.length&&(c.value=b,a.selectInputText(c,d))):(c.value=b,a.selectInputText(c))},_openResultList:function(a,b,c){var d=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();!a.length&&0==c.start?this.closeDropDown():(this._nextSearch=this.dropDown.onPage=e.hitch(this,function(b){a.nextPage(-1!== +b);this.focus()}),this.dropDown.createOptions(a,c,e.hitch(this,"_getMenuLabelFromItem")),this._showResultList(),"direction"in c?(c.direction?this.dropDown.highlightFirstOption():c.direction||this.dropDown.highlightLastOption(),d&&this._announceOption(this.dropDown.getHighlightedOption())):this.autoComplete&&(!this._prev_key_backspace&&!/^[*]+$/.test(b[this.searchAttr].toString()))&&this._announceOption(this.dropDown.containerNode.firstChild.nextSibling))},_showResultList:function(){this.closeDropDown(!0); +this.openDropDown();this.domNode.setAttribute("aria-expanded","true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),this.domNode.setAttribute("aria-expanded","false"))},_setBlurValue:function(){var a=this.get("displayedValue"),b=this.dropDown;b&&(a==b._messages.previousMessage||a==b._messages.nextMessage)?this._setValueAttr(this._lastValueReported,!0):"undefined"==typeof this.item? +(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&this._handleOnChange(this.value,!0),this._refreshState());this.focusNode.removeAttribute("aria-activedescendant")},_setItemAttr:function(a,b,c){var d="";a&&(c||(c=this.store._oldAPI?this.store.getValue(a,this.searchAttr):a[this.searchAttr]),d=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):c);this.set("value",d,b,c,a)},_announceOption:function(a){if(a){var b;if(a==this.dropDown.nextButton||a==this.dropDown.previousButton)b= +a.innerHTML,this.item=void 0,this.value="";else{var c=this.dropDown.items[a.getAttribute("item")];b=(this.store._oldAPI?this.store.getValue(c,this.searchAttr):c[this.searchAttr]).toString();this.set("item",c,!1,b)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",k.get(a,"id"));this._autoCompleteText(b)}},_selectOption:function(a){this.closeDropDown();a&&this._announceOption(a);this._setCaretPos(this.focusNode,this.focusNode.value.length); +this._handleOnChange(this.value,!0);this.focusNode.removeAttribute("aria-activedescendant")},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this.item=void 0;this.inherited(arguments)},_startSearch:function(a){if(!this.dropDown){var b=this.id+"_popup";this.dropDown=new (e.isString(this.dropDownClass)?e.getObject(this.dropDownClass,!1):this.dropDownClass)({onChange:e.hitch(this,this._selectOption),id:b,dir:this.dir,textDir:this.textDir})}this._lastInput=a;this.inherited(arguments)}, +_getValueField:function(){return this.searchAttr},postMixInProperties:function(){this.inherited(arguments);if(!this.store&&this.srcNodeRef&&(this.store=new b({},this.srcNodeRef),!("value"in this.params))){var a=this.item=this.store.fetchSelectedItem();if(a){var c=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(a,c):a[c]}}},postCreate:function(){var a=h('label[for\x3d"'+this.id+'"]');a.length&&(a[0].id||(a[0].id=this.id+"_label"),this.domNode.setAttribute("aria-labelledby", +a[0].id));this.inherited(arguments);f.after(this,"onSearch",e.hitch(this,"_openResultList"),!0)},_getMenuLabelFromItem:function(a){a=this.labelFunc(a,this.store);var b=this.labelType;"none"!=this.highlightMatch&&("text"==this.labelType&&this._lastInput)&&(a=this.doHighlight(a,this._lastInput),b="html");return{html:"html"==b,label:a}},doHighlight:function(a,b){var c=(this.ignoreCase?"i":"")+("all"==this.highlightMatch?"g":""),d=this.queryExpr.indexOf("${0}");b=q.escapeString(b);return this._escapeHtml(a.replace(RegExp((0== +d?"^":"")+"("+b+")"+(d==this.queryExpr.length-4?"$":""),c),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,'\x3cspan class\x3d"dijitComboBoxHighlightMatch"\x3e$1\x3c/span\x3e')},_escapeHtml:function(a){return a=String(a).replace(/&/gm,"\x26amp;").replace(//gm,"\x26gt;").replace(/"/gm,"\x26quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,b){return(b._oldAPI?b.getValue(a,this.labelAttr||this.searchAttr):a[this.labelAttr||this.searchAttr]).toString()}, +_setValueAttr:function(a,b,c,d){this._set("item",d||null);null==a&&(a="");this.inherited(arguments)}});d("dojo-bidi")&&p.extend({_setTextDirAttr:function(a){this.inherited(arguments);this.dropDown&&this.dropDown._set("textDir",a)}});return p})},"dijit/form/MappedTextBox":function(){define(["dojo/_base/declare","dojo/sniff","dojo/dom-construct","./ValidationTextBox"],function(f,p,k,n){return f("dijit.form.MappedTextBox",n,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting= +""},_setNameAttr:"valueNode",serialize:function(e){return e.toString?e.toString():""},toString:function(){var e=this.filter(this.get("value"));return null!=e?"string"==typeof e?e:this.serialize(e,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=k.place("\x3cinput type\x3d'hidden'"+(this.name&&!p("msapp")?' name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"")+"/\x3e", +this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}})})},"cbtree/store/Hierarchy":function(){define("module dojo/_base/declare dojo/_base/lang dojo/store/util/QueryResults ./Natural ../errors/createError!../errors/CBTErrors.json".split(" "),function(f,p,k,n,e,h){var q=h(f.id);return p([e],{indexChildren:!0,multiParented:"auto",parentProperty:"parent",hierarchical:!0,_indexParent:{},_indexChild:{},constructor:function(){this.indexChildren=this._indexStore?this.indexChildren: +!1},destroy:function(){this._indexParent={};this._indexChild={};this.inherited(arguments)},_getParentArray:function(d){d=d[this.parentProperty];return void 0!=d?this.multiParented?d:[d]:[]},_getParentIds:function(d,b){var a=[];b&&(b=b instanceof Array?b:[b],b.forEach(function(b){switch(typeof b){case "object":b=this.getIdentity(b);case "string":case "number":void 0!=b&&b!=d&&-1==a.indexOf(b)&&a.push(b);break;default:throw new q("InvalidType","_getParentId");}},this));return a},_loadData:function(d){this._indexParent= +{};this._indexChild={};d instanceof Array&&"auto"==this.multiParented&&(this.multiParented=d.some(function(b){return b[this.parentProperty]instanceof Array},this));this.inherited(arguments)},_parentIdsChanged:function(d,b){return d.length==b.length?!b.every(function(a){return-1!=d.indexOf(a)}):!0},_setParentType:function(d){!0===this.multiParented?d instanceof Array||(d=d?[d]:[]):!1===this.multiParented?d instanceof Array&&(d=d.length?d[0]:void 0):"auto"===this.multiParented&&(this.multiParented= +d instanceof Array);return d},_updateHierarchy:function(d,b,a){if(this.indexChildren){a=this.getIdentity(d);var c=this._indexParent[a]||[],l=this._getParentArray(d),g=this._parentIdsChanged(l,c);g&&c.forEach(function(a){if(-1==l.indexOf(a)){var b=this._indexChild[a],c=b.indexOf(d);-1=b||48<=b&&57>=b||b==e.SPACE)return;b=!1;for(var l in e)if(e[l]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&& +90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==e.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}var g={faux:!0},d;for(d in a)/^(layer[XY]|returnValue|keyLocation)$/.test(d)||(l=a[d],"function"!=typeof l&&"undefined"!=typeof l&&(g[d]=l));h.mixin(g,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){g._wasConsumed=!0;a.preventDefault()}, +stopPropagation:function(){a.stopPropagation()}});this._lastInputProducingEvent=g;!1===this.onInput(g)&&(g.preventDefault(),g.stopPropagation());if(!g._wasConsumed&&9>=n("ie"))switch(a.keyCode){case e.TAB:case e.ESCAPE:case e.DOWN_ARROW:case e.UP_ARROW:case e.LEFT_ARROW:case e.RIGHT_ARROW:break;default:if(a.keyCode==e.ENTER&&"textarea"!=this.textbox.tagName.toLowerCase())break;this.defer(function(){this.textbox.value!==this._lastInputEventValue&&q.emit(this.textbox,"input",{bubbles:!0})})}})),q(this.textbox, +"input",h.hitch(this,"_onInput")),q(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=h.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled|| +(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=q.once(this.domNode,"mouseup, touchend",h.hitch(this,function(a){this._isTextSelected()||b.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle= +null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});n("dojo-bidi")&&(b=p("dijit.form._TextBoxMixin",b,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));b._setSelectionRange=d._setSelectionRange=function(a,b, +l){a.setSelectionRange&&a.setSelectionRange(b,l)};b.selectInputText=d.selectInputText=function(a,c,l){a=k.byId(a);isNaN(c)&&(c=0);isNaN(l)&&(l=a.value?a.value.length:0);try{a.focus(),b._setSelectionRange(a,c,l)}catch(g){}};return b})},"dojo/Evented":function(){define(["./aspect","./on"],function(f,p){function k(){}var n=f.after;k.prototype={on:function(e,h){return p.parse(this,e,h,function(e,d){return n(e,"on"+d,h,!0)})},emit:function(e,h){var q=[this];q.push.apply(q,arguments);return p.emit.apply(p, +q)}};return k})},"dijit/form/SimpleTextarea":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/sniff","./TextBox"],function(f,p,k,n){return f("dijit.form.SimpleTextarea",n,{baseClass:"dijitTextBox dijitTextArea",rows:"3",cols:"20",templateString:"\x3ctextarea ${!nameAttrSetting} data-dojo-attach-point\x3d'focusNode,containerNode,textbox' autocomplete\x3d'off'\x3e\x3c/textarea\x3e",postMixInProperties:function(){!this.value&&this.srcNodeRef&&(this.value=this.srcNodeRef.value);this.inherited(arguments)}, +buildRendering:function(){this.inherited(arguments);k("ie")&&this.cols&&p.add(this.textbox,"dijitTextAreaCols")},filter:function(e){e&&(e=e.replace(/\r/g,""));return this.inherited(arguments)},_onInput:function(e){if(this.maxLength){var h=parseInt(this.maxLength),q=this.textbox.value.replace(/\r/g,""),h=q.length-h;if(0=e("ie")?d.outerHTML="":q.body().removeChild(d)}}); +h(function(){e("highcontrast")&&k.add(q.body(),"dj_a11y")});return e})},"dijit/form/RadioButton":function(){define(["dojo/_base/declare","./CheckBox","./_RadioButtonMixin"],function(f,p,k){return f("dijit.form.RadioButton",[p,k],{baseClass:"dijitRadio"})})},"dojo/aspect":function(){define([],function(){function f(e,d,b,a){var c=e[d],l="around"==d,g;if(l){var s=b(function(){return c.advice(this,arguments)});g={remove:function(){s&&(s=e=b=null)},advice:function(a,b){return s?s.apply(a,b):c.advice(a, +b)}}}else g={remove:function(){if(g.advice){var a=g.previous,c=g.next;!c&&!a?delete e[d]:(a?a.next=c:e[d]=c,c&&(c.previous=a));e=b=g.advice=null}},id:e.nextId++,advice:b,receiveArguments:a};if(c&&!l)if("after"==d){for(;c.next&&(c=c.next););c.next=g;g.previous=c}else"before"==d&&(e[d]=g,g.next=c,c.previous=g);else e[d]=g;return g}function p(e){return function(d,b,a,c){var l=d[b],g;if(!l||l.target!=d)d[b]=g=function(){for(var a=g.nextId,b=arguments,c=g.before;c;)c.advice&&(b=c.advice.apply(this,b)|| +b),c=c.next;if(g.around)var l=g.around.advice(this,b);for(c=g.after;c&&c.idh},gte:function(e,h){return e>=h},match:function(e,h,f){return h.test(e,f)},contains:function(e, +h,f,d){var b=this;return p.every(h.data||h,function(a){if("object"===typeof a&&a.type){var c=b._getFilterComparator(a.type);return p.some(e,function(l){return c.call(b,l,a.args[1],f,d)})}return-1c&&null!==c)?-1:1}if(0!==c)return c}return 0});return f}}})})},"dojo/errors/create":function(){define(["../_base/lang"],function(f){return function(p,k,n,e){n=n||Error;var h=function(e){if(n===Error){Error.captureStackTrace&&Error.captureStackTrace(this,h);var d=Error.call(this,e),b;for(b in d)d.hasOwnProperty(b)&&(this[b]=d[b]);this.message=e;this.stack=d.stack}else n.apply(this,arguments);k&&k.apply(this,arguments)};h.prototype=f.delegate(n.prototype, +e);h.prototype.name=p;return h.prototype.constructor=h}})},"dstore/Promised":function(){define(["dojo/_base/declare","dojo/Deferred","./QueryResults","dojo/when"],function(f,p,k,n){function e(e,f){return function(){var d=new p;try{d.resolve(this[e].apply(this,arguments))}catch(b){d.reject(b)}return f?(d=new k(d.promise),d.totalLength=n(d.totalLength),d):d.promise}}return f(null,{get:e("getSync"),put:e("putSync"),add:e("addSync"),remove:e("removeSync"),fetch:e("fetchSync",!0),fetchRange:e("fetchRangeSync", +!0)})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),function(f,p,k,n,e,h){f=n("dijit._OnDijitClickMixin",null,{connect:function(e,d,b){return this.inherited(arguments,[e,"ondijitclick"==d?h:d,b])}});f.a11yclick=h;return f})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),function(f,p,k,n,e,h){var q={};f.setObject("dojo.dnd.autoscroll", +q);q.getViewport=h.getBox;q.V_TRIGGER_AUTOSCROLL=32;q.H_TRIGGER_AUTOSCROLL=32;q.V_AUTOSCROLL_VALUE=16;q.H_AUTOSCROLL_VALUE=16;var d,b=k.doc,a=Infinity,c=Infinity;q.autoScrollStart=function(l){b=l;d=h.getBox(b);l=k.body(b).parentNode;a=Math.max(l.scrollHeight-d.h,0);c=Math.max(l.scrollWidth-d.w,0)};q.autoScroll=function(l){var g=d||h.getBox(b),e=k.body(b).parentNode,r=0,m=0;l.clientXg.w-q.H_TRIGGER_AUTOSCROLL&&(r=Math.min(q.H_AUTOSCROLL_VALUE, +c-e.scrollLeft));l.clientYg.h-q.V_TRIGGER_AUTOSCROLL&&(m=Math.min(q.V_AUTOSCROLL_VALUE,a-e.scrollTop));window.scrollBy(r,m)};q._validNodes={div:1,p:1,td:1};q._validOverflow={auto:1,scroll:1};q.autoScrollNodes=function(a){for(var b,c,d,m,h,f,u=0,v=0,x=a.target;x;){if(1==x.nodeType&&x.tagName.toLowerCase()in q._validNodes){d=e.getComputedStyle(x);m=d.overflow.toLowerCase()in q._validOverflow;h=d.overflowX.toLowerCase()in q._validOverflow;f=d.overflowY.toLowerCase()in +q._validOverflow;if(m||h||f)b=n.getContentBox(x,d),c=n.position(x,!0);if(m||h){d=Math.min(q.H_TRIGGER_AUTOSCROLL,b.w/2);h=a.pageX-c.x;if(p("webkit")||p("opera"))h+=k.body().scrollLeft;u=0;0b.w-d&&(u=d),x.scrollLeft+=u)}if(m||f){m=Math.min(q.V_TRIGGER_AUTOSCROLL,b.h/2);f=a.pageY-c.y;if(p("webkit")||p("opera"))f+=k.body().scrollTop;v=0;0b.h-m&&(v=m),x.scrollTop+=v)}if(u||v)return}try{x=x.parentNode}catch(z){x=null}}q.autoScroll(a)};return q})},"dijit/form/_RadioButtonMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/_base/lang dojo/query!css2 ../registry".split(" "), +function(f,p,k,n,e,h){return p("dijit.form._RadioButtonMixin",null,{type:"radio",_getRelatedWidgets:function(){var f=[];e("input[type\x3dradio]",this.focusNode.form||this.ownerDocument).forEach(n.hitch(this,function(d){d.name==this.name&&d.form==this.focusNode.form&&(d=h.getEnclosingWidget(d))&&f.push(d)}));return f},_setCheckedAttr:function(e){this.inherited(arguments);this._created&&e&&f.forEach(this._getRelatedWidgets(),n.hitch(this,function(d){d!=this&&d.checked&&d.set("checked",!1)}))},_getSubmitValue:function(e){return null== +e?"on":e},_onClick:function(e){if(this.checked||this.disabled)return e.stopPropagation(),e.preventDefault(),!1;if(this.readOnly)return e.stopPropagation(),e.preventDefault(),f.forEach(this._getRelatedWidgets(),n.hitch(this,function(a){k.set(this.focusNode||this.domNode,"checked",a.checked)})),!1;var d=!1,b;f.some(this._getRelatedWidgets(),function(a){return a.checked?(b=a,!0):!1});this.checked=!0;b&&(b.checked=!1);if(!1===this.onClick(e)||e.defaultPrevented)d=!0;this.checked=!1;b&&(b.checked=!0); +d?e.preventDefault():this.set("checked",!0);return!d}})})},"dojo/data/ItemFileWriteStore":function(){define("../_base/lang ../_base/declare ../_base/array ../_base/json ../_base/kernel ./ItemFileReadStore ../date/stamp".split(" "),function(f,p,k,n,e,h,q){return p("dojo.data.ItemFileWriteStore",h,{constructor:function(d){this._features["dojo.data.api.Write"]=!0;this._features["dojo.data.api.Notification"]=!0;this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};this._datatypeMap.Date.serialize|| +(this._datatypeMap.Date.serialize=function(b){return q.toISOString(b,{zulu:!0})});d&&!1===d.referenceIntegrity&&(this.referenceIntegrity=!1);this._saveInProgress=!1},referenceIntegrity:!0,_assert:function(d){if(!d)throw Error("assertion failed in ItemFileWriteStore");},_getIdentifierAttribute:function(){return this.getFeatures()["dojo.data.api.Identity"]},newItem:function(d,b){this._assert(!this._saveInProgress);this._loadFinished||this._forceLoad();if("object"!=typeof d&&"undefined"!=typeof d)throw Error("newItem() was passed something other than an object"); +var a=null,c=this._getIdentifierAttribute();if(c===Number)a=this._arrayOfAllItems.length;else{a=d[c];if("undefined"===typeof a)throw Error("newItem() was not passed an identity for the new item");if(f.isArray(a))throw Error("newItem() was not passed an single-valued identity");}this._itemsByIdentity&&this._assert("undefined"===typeof this._itemsByIdentity[a]);this._assert("undefined"===typeof this._pending._newItems[a]);this._assert("undefined"===typeof this._pending._deletedItems[a]);var l={};l[this._storeRefPropName]= +this;l[this._itemNumPropName]=this._arrayOfAllItems.length;this._itemsByIdentity&&(this._itemsByIdentity[a]=l,l[c]=[a]);this._arrayOfAllItems.push(l);c=null;if(b&&b.parent&&b.attribute){var c={item:b.parent,attribute:b.attribute,oldValue:void 0},g=this.getValues(b.parent,b.attribute);if(g&&0w.indexOf(p))){q=p;k=s;(r||!a)&&g.splice(s,1);break}}}if(r){if(a&&(r.matches?r.matches(a):r([a]).length))s=-1c.indexOf(" "+e+" ")&&(c+=e+" ");lthis._cancelDrag&&(this._isDragging=!1),this._cancelDrag= +null);this._hoveredNode=h;this.onHover(h);this._isDragging&&this._setSelectedAttr(h,!1)}})})},"cbtree/model/_base/Prologue":function(){define([],function(){return function(f,p){if(p&&p.parent&&!0!==this.hierarchical){var k=this.parentProperty,n=this.getIdentity(f),e=p.parent,h,q=[],d;if(e instanceof Array)for(d=0;dn.attributes.length);k.clearElement=function(e){e.innerHTML="";return e};k.normalize=function(e,h){var f=e.match(/[\?:]|[^:\?]*/g),d=0,b=function(a){var c=f[d++];if(":"==c)return 0;if("?"==f[d++]){if(!a&&k(c))return b();b(!0);return b(a)}return c||0};return(e=b())&&h(e)};k.load=function(e,h,f){e?h([e],f):f()};return k})},"dojo/cookie":function(){define(["./_base/kernel", +"./regexp"],function(f,p){f.cookie=function(f,n,e){var h=document.cookie,q;if(1==arguments.length)q=(q=h.match(RegExp("(?:^|; )"+p.escapeString(f)+"\x3d([^;]*)")))?decodeURIComponent(q[1]):void 0;else{e=e||{};h=e.expires;if("number"==typeof h){var d=new Date;d.setTime(d.getTime()+864E5*h);h=e.expires=d}h&&h.toUTCString&&(e.expires=h.toUTCString());n=encodeURIComponent(n);var h=f+"\x3d"+n,b;for(b in e)h+="; "+b,d=e[b],!0!==d&&(h+="\x3d"+d);document.cookie=h}return q};f.cookie.isSupported=function(){"cookieEnabled"in +navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};return f.cookie})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(f){return f.cache})},"dijit/ProgressBar":function(){define("require dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/number ./_Widget ./_TemplatedMixin dojo/text!./templates/ProgressBar.html".split(" "), +function(f,p,k,n,e,h,q,d){return p("dijit.ProgressBar",[h,q],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:d,_indeterminateHighContrastImagePath:f.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);this.params&&"value"in this.params||(this.value=this.indeterminate?Infinity:this.progress)},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString()); +this.update()},_setDirAttr:function(b){var a="rtl"==b.toLowerCase();k.toggle(this.domNode,"dijitProgressBarRtl",a);k.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&a);this.inherited(arguments)},update:function(b){n.mixin(this,b||{});b=this.internalProgress;var a=this.domNode,c=1;this.indeterminate?a.removeAttribute("aria-valuenow"):(-1!=String(this.progress).indexOf("%")?(c=Math.min(parseFloat(this.progress)/100,1),this.progress=c*this.maximum):(this.progress=Math.min(this.progress, +this.maximum),c=this.maximum?this.progress/this.maximum:0),a.setAttribute("aria-valuenow",this.progress));a.setAttribute("aria-labelledby",this.labelNode.id);a.setAttribute("aria-valuemin",0);a.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(c);k.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);k.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&!this.isLeftToRight());b.style.width=100*c+"%";this.onChange()},_setValueAttr:function(b){this._set("value", +b);Infinity==b?this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:b})},_setLabelAttr:function(b){this._set("label",b);this.update()},_setIndeterminateAttr:function(b){this._set("indeterminate",b);this.update()},report:function(b){return this.label?this.label:this.indeterminate?"\x26#160;":e.format(b,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}})})},"dijit/_base/popup":function(){define(["dojo/dom-class","dojo/_base/window","../popup","../BackgroundIframe"], +function(f,p,k){var n=k._createWrapper;k._createWrapper=function(e){e.declaredClass||(e={_popupWrapper:e.parentNode&&f.contains(e.parentNode,"dijitPopup")?e.parentNode:null,domNode:e,destroy:function(){},ownerDocument:e.ownerDocument,ownerDocumentBody:p.body(e.ownerDocument)});return n.call(this,e)};var e=k.open;k.open=function(h){if(h.orient&&"string"!=typeof h.orient&&!("length"in h.orient)){var f=[],d;for(d in h.orient)f.push({aroundCorner:d,corner:h.orient[d]});h.orient=f}return e.call(this,h)}; +return k})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise".split(" "),function(f,p,k,n,e,h,q,d){function b(a){return c(a)}function a(a){return void 0!==a.data?a.data:a.text}f.deepCopy=function(a,b){for(var c in b){var d=a[c],e=b[c];d!==e&&(d&&"object"===typeof d&&e&&"object"===typeof e?f.deepCopy(d,e):a[c]=e)}return a};f.deepCreate=function(a,b){b=b||{};var c=q.delegate(a),d,e;for(d in a)(e= +a[d])&&"object"===typeof e&&(c[d]=f.deepCreate(e,b[d]));return f.deepCopy(c,b)};var c=Object.freeze||function(a){return a};f.deferred=function(l,g,e,r,m,h){var w=new n(function(a){g&&g(w,l);return!a||!(a instanceof p)&&!(a instanceof k)?new k("Request canceled",l):a});w.response=l;w.isValid=e;w.isReady=r;w.handleResponse=m;e=w.then(b).otherwise(function(a){a.response=l;throw a;});f.notify&&e.then(q.hitch(f.notify,"emit","load"),q.hitch(f.notify,"emit","error"));r=e.then(a);m=new d;for(var u in r)r.hasOwnProperty(u)&& +(m[u]=r[u]);m.response=e;c(m);h&&w.then(function(a){h.call(w,a)},function(a){h.call(w,l,a)});w.promise=m;w.then=m.then;return w};f.addCommonMethods=function(a,b){h.forEach(b||["GET","POST","PUT","DELETE"],function(b){a[("DELETE"===b?"DEL":b).toLowerCase()]=function(c,g){g=q.delegate(g||{});g.method=b;return a(c,g)}})};f.parseArgs=function(a,b,c){var d=b.data,m=b.query;if(d&&!c&&"object"===typeof d&&!(d instanceof ArrayBuffer||d instanceof Blob))b.data=e.objectToQuery(d);m?("object"===typeof m&&(m= +e.objectToQuery(m)),b.preventCache&&(m+=(m?"\x26":"")+"request.preventCache\x3d"+ +new Date)):b.preventCache&&(m="request.preventCache\x3d"+ +new Date);a&&m&&(a+=(~a.indexOf("?")?"\x26":"?")+m);return{url:a,options:b,getHeader:function(a){return null}}};f.checkStatus=function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||!a}})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(f,p,k){var n=f.some;return function(e){var h,f;e instanceof Array?f=e:e&&"object"=== +typeof e&&(h=e);var d,b=[];if(h){f=[];for(var a in h)Object.hasOwnProperty.call(h,a)&&(b.push(a),f.push(h[a]));d={}}else f&&(d=[]);if(!f||!f.length)return(new p).resolve(d);var c=new p;c.promise.always(function(){d=b=null});var l=f.length;n(f,function(a,e){h||b.push(e);k(a,function(a){c.isFulfilled()||(d[b[e]]=a,0===--l&&c.resolve(d))},c.reject);return c.isFulfilled()});return c.promise}})},"dijit/form/NumberTextBox":function(){define("dojo/_base/declare dojo/_base/lang dojo/i18n dojo/string dojo/number ./RangeBoundTextBox".split(" "), +function(f,p,k,n,e,h){var q=function(b){b=b||{};var a=k.getLocalization("dojo.cldr","number",k.normalizeLocale(b.locale)),c=b.pattern?b.pattern:a[(b.type||"decimal")+"Format"];b="number"==typeof b.places?b.places:"string"===typeof b.places&&0c,e=-1!=this.textbox.value.indexOf(this._decimalInfo.sep), +r=(this.maxLength||20)-this.textbox.value.length,m=e?this.textbox.value.split(this._decimalInfo.sep)[1].replace(/[^0-9]/g,""):"",d=e?d+"."+m:d+"",r=n.rep("9",r),e=c;g?e=Number(d+r):c=Number(d+r);return!(b&&cthis.constraints.max)}});f=f("dijit.form.NumberTextBox",[h,d],{baseClass:"dijitTextBox dijitNumberTextBox"});f.Mixin=d;return f})},"dojo/_base/url":function(){define(["./kernel"],function(f){var p=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,k=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/, +n=function(){for(var e=arguments,h=[e[0]],f=1;f/im, +"");var b=a.match(/]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}else a="";return a},d={},b={};f.cache=function(a,b,d){var g;"string"==typeof a?/\//.test(a)?(g=a,d=b):g=p.toUrl(a.replace(/\./g,"/")+(b?"/"+b:"")):(g=a+"",d=b);a=void 0!=d&&"string"!=typeof d?d.value:d;d=d&&d.sanitize;if("string"==typeof a)return h[g]=a,d?q(a):a;if(null===a)return delete h[g],null;g in h||e(g,!0,function(a){h[g]=a});return d?q(h[g]):h[g]};return{dynamic:!0,normalize:function(a,b){var d=a.split("!"),g=d[0];return(/^\./.test(g)? +b(g):g)+(d[1]?"!"+d[1]:"")},load:function(a,c,l){a=a.split("!");var g=1=f("ie"))try{document.execCommand("BackgroundImageCache", +!1,!0)}catch(n){}var e={};f("ie")?e.byId=function(e,d){if("string"!=typeof e)return e;var b=d||p.doc,a=e&&b.getElementById(e);if(a&&(a.attributes.id.value==e||a.id==e))return a;b=b.all[e];if(!b||b.nodeName)b=[b];for(var c=0;a=b[c++];)if(a.attributes&&a.attributes.id&&a.attributes.id.value==e||a.id==e)return a}:e.byId=function(e,d){return("string"==typeof e?(d||p.doc).getElementById(e):e)||null};k=k.global.document||null;f.add("dom-contains",!(!k||!k.contains));e.isDescendant=f("dom-contains")?function(h, +d){return!(!(d=e.byId(d))||!d.contains(e.byId(h)))}:function(h,d){try{h=e.byId(h);for(d=e.byId(d);h;){if(h==d)return!0;h=h.parentNode}}catch(b){}return!1};f.add("css-user-select",function(e,d,b){if(!b)return!1;e=b.style;d=["Khtml","O","Moz","Webkit"];b=d.length;var a="userSelect";do if("undefined"!==typeof e[a])return a;while(b--&&(a=d[b]+"UserSelect"));return!1});var h=f("css-user-select");e.setSelectable=h?function(f,d){e.byId(f).style[h]=d?"":"none"}:function(h,d){h=e.byId(h);var b=h.getElementsByTagName("*"), +a=b.length;if(d)for(h.removeAttribute("unselectable");a--;)b[a].removeAttribute("unselectable");else for(h.setAttribute("unselectable","on");a--;)b[a].setAttribute("unselectable","on")};return e})},"dijit/layout/LayoutContainer":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-style dojo/_base/lang ../_WidgetBase ./_LayoutWidget ./utils".split(" "),function(f,p,k,n,e,h,q,d){p=p("dijit.layout.LayoutContainer",q,{design:"headline",baseClass:"dijitLayoutContainer",startup:function(){this._started|| +(f.forEach(this.getChildren(),this._setupChild,this),this.inherited(arguments))},_setupChild:function(b){this.inherited(arguments);b.region&&k.add(b.domNode,this.baseClass+"Pane")},_getOrderedChildren:function(){var b=f.map(this.getChildren(),function(a,b){return{pane:a,weight:["center"==a.region?Infinity:0,a.layoutPriority,("sidebar"==this.design?1:-1)*(/top|bottom/.test(a.region)?1:-1),b]}},this);b.sort(function(a,b){for(var d=a.weight,g=b.weight,e=0;e=g)){var l=b.columns[c],m;if(l&&(m={grid:b,columnId:c,width:g,bubbles:!0,cancelable:!0},d&&(m.parentType=d),!b._resizedColumns||k.emit(b.headerNode,"dgrid-columnresize",m)))return"auto"===g?delete l.width:(l.width=g,g+="px"),(d=b._columnSizes[c])?d.set("width",g):d=a.addCssRule("#"+a.escapeCssIdentifier(b.domNode.id)+" .dgrid-column-"+a.escapeCssIdentifier(c,"-"),"width: "+g+";"),b._columnSizes[c]=d,!1!==e&&b.resize(),!0}}var s,r,m=0,t={create:function(){s= +q.create("div",{className:"dgrid-column-resizer"});r=q.create("div",{className:"dgrid-resize-guard"})},destroy:function(){q.destroy(s);q.destroy(r);s=r=null},show:function(a){var b=d.position(a.domNode,!0);s.style.top=b.y+"px";s.style.height=b.h+"px";document.body.appendChild(s);a.domNode.appendChild(r)},move:function(a){s.style.left=a+"px"},hide:function(){s.parentNode.removeChild(s);r.parentNode.removeChild(r)}};return f(null,{resizeNode:null,minWidth:40,adjustLastColumn:!0,_resizedColumns:!1,buildRendering:function(){this.inherited(arguments); +m||t.create();m++},destroy:function(){this.inherited(arguments);for(var a in this._columnSizes)this._columnSizes[a].remove();--m||t.destroy()},resizeColumnWidth:function(a,b){return g(this,a,b)},configStructure:function(){var a=this._oldColumnSizes=e.mixin({},this._columnSizes),b;this._resizedColumns=!1;this._columnSizes={};this.inherited(arguments);for(b in a)b in this._columnSizes||a[b].remove();delete this._oldColumnSizes},_configColumn:function(b){this.inherited(arguments);var c=b.id,g;"width"in +b&&((g=this._oldColumnSizes[c])?g.set("width",b.width+"px"):g=a.addCssRule("#"+a.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-"+a.escapeCssIdentifier(c,"-"),"width: "+b.width+"px;"),this._columnSizes[c]=g)},renderHeader:function(){this.inherited(arguments);var c=this,g;if(this.columnSets&&this.columnSets.length)for(var d=this.columnSets.length;d--;)g=e.mixin(g||{},l(this.columnSets[d]));else this.subRows&&1>1)-h.y+"px",this.connectorNode.style.left=""):"M"==h.corner.charAt(1)&&"M"==h.aroundCorner.charAt(1)?this.connectorNode.style.left=s.x+(s.w-this.connectorNode.offsetWidth>> +1)-h.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");q.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b;this.onMouseEnter=m||u;this.onMouseLeave=r||u}},orient:function(a,b,g,d,e){this.connectorNode.style.top="";var l=d.h;d=d.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft", +"BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[b+"-"+g];this.domNode.style.width="auto";var m=h.position(this.domNode);if(c("ie")||c("trident"))m.w+=2;var r=Math.min(Math.max(d,1),m.w);h.setMarginBox(this.domNode,{w:r});"B"==g.charAt(0)&&"B"==b.charAt(0)?(a=h.position(a),b=this.connectorNode.offsetHeight,a.h>l?(this.connectorNode.style.top=l-(e.h+b>>1)+"px",this.connectorNode.style.bottom=""): +(this.connectorNode.style.bottom=Math.min(Math.max(e.h/2-b/2,0),a.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,m.w-d)},_onShow:function(){c("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=u},_onHide:function(){this.domNode.style.cssText= +"";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});c("dojo-bidi")&&v.extend({_setAutoTextDir:function(a){this.applyTextDir(a);f.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});w.showTooltip=function(a,b,c,g,d,e,l){c&&(c=f.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]|| +a}));x._masterTT||(w._masterTT=x._masterTT=new v);return x._masterTT.show(a,b,c,g,d,e,l)};w.hideTooltip=function(a){return x._masterTT&&x._masterTT.hide(a)};var x=p("dijit.Tooltip",s,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(c){f.forEach(this._connections||[],function(a){f.forEach(a,function(a){a.remove()})},this);this._connectIds=f.filter(d.isArrayLike(c)?c:c?[c]:[],function(a){return n.byId(a,this.ownerDocument)},this);this._connections= +f.map(this._connectIds,function(c){c=n.byId(c,this.ownerDocument);var g=this.selector,e=g?function(b){return a.selector(g,b)}:function(a){return a},l=this;return[a(c,e(b.enter),function(){l._onHover(this)}),a(c,e("focusin"),function(){l._onHover(this)}),a(c,e(b.leave),d.hitch(l,"_onUnHover")),a(c,e("focusout"),d.hitch(l,"set","state","DORMANT"))]},this);this._set("connectId",c)},addTarget:function(a){a=a.id||a;-1==f.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a= +f.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);e.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;f.forEach(d.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||this.domNode.innerHTML},state:"DORMANT",_setStateAttr:function(a){if(!(this.state==a||"SHOW TIMER"==a&&"SHOWING"==this.state||"HIDE TIMER"== +a&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(a){case "DORMANT":this._connectNode&&(x.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state","SHOWING")},this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT"); +return}x.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,d.hitch(this,"set","state","SHOWING"),d.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",a)}},_onHover:function(a){this._connectNode&&a!=this._connectNode&&this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOW TIMER")},_onUnHover:function(a){this.set("state", +"HIDE TIMER")},open:function(a){this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");f.forEach(this._connections||[],function(a){f.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});x._MasterTooltip=v;x.show=w.showTooltip;x.hide=w.hideTooltip;x.defaultPosition=["after-centered","before-centered"];return x})},"dojo/string":function(){define(["./_base/kernel", +"./_base/lang"],function(f,p){var k=/[&<>'"\/]/g,n={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},e={};p.setObject("dojo.string",e);e.escape=function(e){return!e?"":e.replace(k,function(e){return n[e]})};e.rep=function(e,f){if(0>=f||!e)return"";for(var d=[];;){f&1&&d.push(e);if(!(f>>=1))break;e+=e}return d.join("")};e.pad=function(h,f,d,b){d||(d="0");h=String(h);f=e.rep(d,Math.ceil((f-h.length)/d.length));return b?h+f:f+h};e.substitute=function(e, +n,d,b){b=b||f.global;d=d?p.hitch(b,d):function(a){return a};return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,function(a,c,e){if(""==c)return"$";a=p.getObject(c,!1,n);e&&(a=p.getObject(e,!1,b).call(b,a,c));return d(a,c).toString()})};e.trim=String.prototype.trim?p.trim:function(e){e=e.replace(/^\s+/,"");for(var f=e.length-1;0<=f;f--)if(/\S/.test(e.charAt(f))){e=e.substring(0,f+1);break}return e};return e})},"dijit/form/VerticalSlider":function(){define(["dojo/_base/declare","./HorizontalSlider", +"dojo/text!./templates/VerticalSlider.html"],function(f,p,k){return f("dijit.form.VerticalSlider",p,{templateString:k,_mousePixelCoord:"pageY",_pixelCount:"h",_startingPixelCoord:"y",_handleOffsetCoord:"top",_progressPixelSize:"height",_descending:!0,_isReversed:function(){return this._descending}})})},"dijit/dijit":function(){define("./main ./_base dojo/parser ./_Widget ./_TemplatedMixin ./_Container ./layout/_LayoutWidget ./form/_FormWidget ./form/_FormValueWidget".split(" "),function(f){return f})}, +"dijit/form/DropDownButton":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/query ../registry ../popup ./Button ../_Container ../_HasDropDown dojo/text!./templates/DropDownButton.html ../a11yclick".split(" "),function(f,p,k,n,e,h,q,d,b,a){return f("dijit.form.DropDownButton",[q,d,b],{baseClass:"dijitDropDownButton",templateString:a,_fillContent:function(){var a=this.srcNodeRef,b=this.containerNode;if(a&&b)for(;a.hasChildNodes();){var g=a.firstChild;g.hasAttribute&&(g.hasAttribute("data-dojo-type")|| +g.hasAttribute("dojoType")||g.hasAttribute("data-"+p._scopeName+"-type")||g.hasAttribute(p._scopeName+"Type"))?(this.dropDownContainer=this.ownerDocument.createElement("div"),this.dropDownContainer.appendChild(g)):b.appendChild(g)}},startup:function(){this._started||(!this.dropDown&&this.dropDownContainer&&(this.dropDown=e.byNode(this.dropDownContainer.firstChild),delete this.dropDownContainer),this.dropDown&&h.hide(this.dropDown),this.inherited(arguments))},isLoaded:function(){var a=this.dropDown; +return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(a){var b=this.dropDown,g=b.on("load",k.hitch(this,function(){g.remove();a()}));b.refresh()},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}})})},"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on ./_FormWidgetMixin".split(" "),function(f,p,k,n,e,h){return f("dijit.form._FormValueMixin",h,{readOnly:!1,_setReadOnlyAttr:function(e){p.set(this.focusNode,"readOnly", +e);this._set("readOnly",e)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(e,d){this._handleOnChange(e,d)},_handleOnChange:function(e,d){this._set("value",e);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)}})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "), +function(f,p,k,n,e,h,q,d,b,a){return p("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(b){this._set("disabled",b);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?k.set(this.focusNode,"disabled",b):this.focusNode.setAttribute("aria-disabled",b?"true":"false");this.valueNode&& +k.set(this.valueNode,"disabled",b);b?(this._set("hovering",!1),this._set("active",!1),b="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",f.forEach(e.isArray(b)?b:[b],function(b){b=this[b];d("webkit")||a.hasDefaultTabStop(b)?b.setAttribute("tabIndex","-1"):b.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(a){if("mouse"==a&&this.isFocusable())var l=this.own(q(this.focusNode, +"focus",function(){h.remove();l.remove()}))[0],g=d("pointer-events")?"pointerup":d("MSPointer")?"MSPointerUp":d("touch-events")?"touchend, mouseup":"mouseup",h=this.own(q(this.ownerDocumentBody,g,e.hitch(this,function(a){h.remove();l.remove();this.focused&&("touchend"==a.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){b.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=n.get(this.domNode, +"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},compare:function(a,b){return"number"==typeof a&&"number"==typeof b?isNaN(a)&&isNaN(b)?0:a-b:a>b?1:ae)?-1:1;return 0}),e.sort(l));if(a&&(a.start||a.count))l=e.length,e=e.slice(a.start||0,(a.start||0)+(a.count||Infinity)),e.total=l;return e}var l=a&&!!a.ignoreCase,g=function(){},s=!1;switch(typeof b){case "undefined":case "object":s=e(b);g=function(a){var c,g,d;for(c in b)if(d= +b[c],g=s?n(c,a):a[c],!h(g,d,l)&&!("function"==typeof d&&d(g,c,a)))return!1;return!0};break;case "string":if(!this[b]||"function"!=typeof this[b])throw new d("MethodMissing","QueryEngine","No filter function "+b+" was found in store");g=this[b];break;case "function":g=b;break;default:throw new d("InvalidType","QueryEngine","Can not query with a "+typeof b);}c.matches=g;return c}})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../selector/_loader"], +function(f,p,k,n){function e(b){var d=a[b.options.handleAs];b.data=d?d(b):b.data||b.text;return b}n.add("activex","undefined"!==typeof ActiveXObject);n.add("dom-parser",function(a){return"DOMParser"in a});var h;if(n("activex")){var q=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"],d;h=function(a){function b(a){try{var c=new ActiveXObject(a);c.async=!1;c.loadXML(e);g=c;d=a}catch(l){return!1}return!0}var g=a.data,e=a.text;g&&(n("dom-qsa2.1")&&!g.querySelectorAll&& +n("dom-parser"))&&(g=(new DOMParser).parseFromString(e,"application/xml"));if(!g||!g.documentElement)(!d||!b(d))&&k.some(q,b);return g}}var b=function(a){return!n("native-xhr2-blob")&&"blob"===a.options.handleAs&&"undefined"!==typeof Blob?new Blob([a.xhr.response],{type:a.xhr.getResponseHeader("Content-Type")}):a.xhr.response},a={javascript:function(a){return p.eval(a.text||"")},json:function(a){return f.parse(a.text||null)},xml:h,blob:b,arraybuffer:b,document:b};e.register=function(b,d){a[b]=d}; +return e})},"dojo/date":function(){define(["./has","./_base/lang"],function(f,p){var k={getDaysInMonth:function(f){var e=f.getMonth();return 1==e&&k.isLeapYear(f)?29:[31,28,31,30,31,30,31,31,30,31,30,31][e]},isLeapYear:function(f){f=f.getFullYear();return!(f%400)||!(f%4)&&!!(f%100)},getTimezoneName:function(f){var e=f.toString(),h="",k=e.indexOf("(");if(-1e?1:fh&&(l=-1);c+=e;if(0==c||6==c)l=0q)switch(!0){case 6==a:b=0;break;case 0==a:b=1;break;case 6==e:b=2;break;case 0==e:b=1;break;case 0>f+d:b=2}q=q+b-2*h}d=q;break;case "year":d=q;break;case "month":d=e.getMonth()-f.getMonth()+12*q;break; +case "week":d=parseInt(k.difference(f,e,"day")/7);break;case "day":d/=24;case "hour":d/=60;case "minute":d/=60;case "second":d/=1E3;case "millisecond":d*=e.getTime()-f.getTime()}return Math.round(d)}};p.mixin(p.getObject("dojo.date",!0),k);return k})},"dijit/tree/ObjectStoreModel":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/when ../Destroyable".split(" "),function(f,p,k,n,e,h,q){return k("dijit.tree.ObjectStoreModel",q,{store:null,labelAttr:"name", +labelType:"text",root:null,query:null,constructor:function(d){e.mixin(this,d);this.childrenCache={}},getRoot:function(d,b){if(this.root)d(this.root);else{var a=this.store.query(this.query);a.then&&this.own(a);h(a,e.hitch(this,function(b){if(1!=b.length)throw Error("dijit.tree.ObjectStoreModel: root query returned "+b.length+" items, but must return exactly one");this.root=b[0];d(this.root);a.observe&&a.observe(e.hitch(this,function(a){this.onChange(a)}),!0)}),b)}},mayHaveChildren:function(){return!0}, +getChildren:function(d,b,a){var c=this.store.getIdentity(d);if(this.childrenCache[c])h(this.childrenCache[c],b,a);else{var l=this.childrenCache[c]=this.store.getChildren(d);l.then&&this.own(l);l.observe&&this.own(l.observe(e.hitch(this,function(a,b,c){this.onChange(a);b!=c&&h(l,e.hitch(this,"onChildrenChange",d))}),!0));h(l,b,a)}},isItem:function(){return!0},getIdentity:function(d){return this.store.getIdentity(d)},getLabel:function(d){return d[this.labelAttr]},newItem:function(d,b,a,c){return this.store.put(d, +{parent:b,before:c})},pasteItem:function(d,b,a,c,l,g){var h=new n;if(b===a&&!c&&!g)return h.resolve(!0),h;b&&!c?this.getChildren(b,e.hitch(this,function(c){c=[].concat(c);var e=f.indexOf(c,d);c.splice(e,1);this.onChildrenChange(b,c);h.resolve(this.store.put(d,{overwrite:!0,parent:a,oldParent:b,before:g}))})):h.resolve(this.store.put(d,{overwrite:!0,parent:a,oldParent:b,before:g}));return h},onChange:function(){},onChildrenChange:function(){},onDelete:function(){}})})},"dijit/Destroyable":function(){define(["dojo/_base/array", +"dojo/aspect","dojo/_base/declare"],function(f,p,k){return k("dijit.Destroyable",null,{destroy:function(f){this._destroyed=!0},own:function(){var k=["destroyRecursive","destroy","remove"];f.forEach(arguments,function(e){function h(){d.remove();f.forEach(b,function(a){a.remove()})}var q,d=p.before(this,"destroy",function(a){e[q](a)}),b=[];e.then?(q="cancel",e.then(h,h)):f.forEach(k,function(a){"function"===typeof e[a]&&(q||(q=a),b.push(p.after(e,a,h,!0)))})},this);return arguments}})})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/query ../registry ../Viewport ./utils".split(" "), +function(f,p,k,n,e,h,q,d,b,a){return p("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isLayoutContainer:!0,startup:function(){if(!this._started){var a=this.getParent();this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(b.on("resize",h.hitch(this,"resize")))}},_checkIfSingleChild:function(){if(this.doLayout){var a=[],b=!1;q("\x3e *",this.containerNode).some(function(g){var e= +d.byNode(g);e&&e.resize?a.push(e):!/script|link|style/i.test(g.nodeName)&&g.offsetHeight&&(b=!0)});this._singleChild=1==a.length&&!b?a[0]:null;k.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)}},resize:function(a,b){this._resizeCalled=!0;this._scheduleLayout(a,b)},_scheduleLayout:function(a,b){this._isShown()?this._layout(a,b):(this._needLayout=!0,this._changeSize=a,this._resultSize=b)},_layout:function(b,d){delete this._needLayout;!this._wasShown&&!1!==this.open&&this._onShow(); +b&&n.setMarginBox(this.domNode,b);var g=this.containerNode;if(g===this.domNode){var e=d||{};h.mixin(e,b||{});if(!("h"in e)||!("w"in e))e=h.mixin(n.getMarginBox(g),e);this._contentBox=a.marginBox2contentBox(g,e)}else this._contentBox=n.getContentBox(g);this._layoutChildren()},_layoutChildren:function(){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||n.getContentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else for(var a=this.getChildren(), +b,g=0;b=a[g++];)b.resize&&b.resize()},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var a=this.domNode,b=this.domNode.parentNode;return"none"!=a.style.display&&"hidden"!=a.style.visibility&&!k.contains(a,"dijitHidden")&&b&&b.style&&"none"!=b.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dijit/WidgetSet":function(){define(["dojo/_base/array", +"dojo/_base/declare","dojo/_base/kernel","./registry"],function(f,p,k,n){var e=p("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(e){if(this._hash[e.id])throw Error("Tried to register widget with id\x3d\x3d"+e.id+" but that id is already registered");this._hash[e.id]=e;this.length++},remove:function(e){this._hash[e]&&(delete this._hash[e],this.length--)},forEach:function(e,f){f=f||k.global;var d=0,b;for(b in this._hash)e.call(f,this._hash[b],d++,this._hash); +return this},filter:function(h,f){f=f||k.global;var d=new e,b=0,a;for(a in this._hash){var c=this._hash[a];h.call(f,c,b++,this._hash)&&d.add(c)}return d},byId:function(e){return this._hash[e]},byClass:function(h){var f=new e,d,b;for(d in this._hash)b=this._hash[d],b.declaredClass==h&&f.add(b);return f},toArray:function(){var e=[],f;for(f in this._hash)e.push(this._hash[f]);return e},map:function(e,k){return f.map(this.toArray(),e,k)},every:function(e,f){f=f||k.global;var d=0,b;for(b in this._hash)if(!e.call(f, +this._hash[b],d++,this._hash))return!1;return!0},some:function(e,f){f=f||k.global;var d=0,b;for(b in this._hash)if(e.call(f,this._hash[b],d++,this._hash))return!0;return!1}});f.forEach("forEach filter byClass map every some".split(" "),function(f){n[f]=e.prototype[f]});return e})},"dijit/form/RangeBoundTextBox":function(){define(["dojo/_base/declare","dojo/i18n","./MappedTextBox","dojo/i18n!./nls/validate"],function(f,p,k){return f("dijit.form.RangeBoundTextBox",k,{rangeMessage:"",rangeCheck:function(f, +e){return("min"in e?0<=this.compare(f,e.min):!0)&&("max"in e?0>=this.compare(f,e.max):!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var f=this.get("value");if(null==f)return!1;var e=!1;"min"in this.constraints&&(e=this.constraints.min,e=0>this.compare(f,"number"==typeof e&&0<=e&&0!=f?0:e));!e&&"max"in this.constraints&&(e=this.constraints.max,e=0this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(b){if(!this.skip||!a.isFormElement(b))b.stopPropagation(), +b.preventDefault()},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){d.publish("/dnd/move/start",a);e.add(l.body(),"dojoMove");e.add(this.node,"dojoMoveItem")},onMoveStop:function(a){d.publish("/dnd/move/stop",a);e.remove(l.body(),"dojoMove");e.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},onMoved:function(){}})})},"dgrid/Grid":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/on dojo/has ./List ./util/misc dojo/_base/sniff".split(" "), +function(f,p,k,n,e,h,q,d){function b(a,b){b&&b.nodeType&&a.appendChild(b)}f=f(q,{columns:null,hasNeutralSort:!1,cellNavigation:!0,tabableHeader:!0,showHeader:!0,column:function(a){return"object"!==typeof a?this.columns[a]:this.cell(a).column},listType:"grid",cell:function(a,b){if(a.column&&a.element)return a;a.target&&a.target.nodeType&&(a=a.target);var d;if(a.nodeType){do{if(this._rowIdToObject[a.id])break;var g=a.columnId;if(g){b=g;d=a;break}a=a.parentNode}while(a&&a!==this.domNode)}if(!d&&"undefined"!== +typeof b){var e=this.row(a);if(g=e&&e.element)for(var g=g.getElementsByTagName("td"),r=0;rh("ie")?k.create("tbody",null,r):r,t,n,q,p,x,z,y,A,B,E;e=e||this.subRows;n=0;for(q=e.length;nb.offsetWidth)b.style.width=d+"px"},destroy:function(){this._destroyColumns();this._sortListener&& +this._sortListener.remove();this.inherited(arguments)},_setSort:function(){this.inherited(arguments);this.updateSortArrow(this.sort)},_findSortArrowParent:function(a){var b=this.columns,d;for(d in b){var g=b[d];if(g.field===a)return g.headerNode}},updateSortArrow:function(a,b){this._lastSortedArrow&&(n.remove(this._lastSortedArrow.parentNode,"dgrid-sort-up dgrid-sort-down"),k.destroy(this._lastSortedArrow),delete this._lastSortedArrow);b&&(this.sort=a);if(a[0]){var d=a[0].property,g=a[0].descending, +d=this._sortNode||this._findSortArrowParent(d);delete this._sortNode;d&&(d=d.contents||d,this._lastSortedArrow=k.create("div",{className:"dgrid-sort-arrow ui-icon",innerHTML:"\x26nbsp;",role:"presentation"},d,"first"),n.add(d,"dgrid-sort-"+(g?"down":"up")),this.resize())}},styleColumn:function(a,b){return this.addCssRule("#"+d.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-"+d.escapeCssIdentifier(a,"-"),b)},_configColumns:function(a,b){var e=[],g=b instanceof Array;d.each(b,function(d,r){"string"=== +typeof d&&(b[r]=d={label:d});!g&&!d.field&&(d.field=r);r=d.id=d.id||(isNaN(r)?r:a+r);this._configColumn&&(this._configColumn(d,b,a),r=d.id);g&&(this.columns[r]=d);d.grid=this;e.push(d)},this);return g?b:e},_destroyColumns:function(){this.cleanup()},configStructure:function(){var a=this.subRows,b=this._columns=this.columns;this.columns=!b||b instanceof Array?{}:b;if(a)for(b=0;b=q[r].priority;r++);q.splice(r,0,d);b()},c=f.config.addOnLoad;if(c)a[e.isArray(c)?"apply":"call"](f,c);f.config.parseOnLoad&&!f.isAsync&&a(99,function(){f.parser||(f.deprecated("Add explicit require(['dojo/parser']);","","2.0"),k(["dojo/parser"]))});n?n(p):p();return a})},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(f){return function(p,k){function n(e){e=f.filter(e,p);var n=k&&k.sort;n&&e.sort("function"== +typeof n?n:function(b,a){for(var c,d=0;c=n[d];d++){var g=b[c.attribute],e=a[c.attribute],g=null!=g?g.valueOf():g,e=null!=e?e.valueOf():e;if(g!=e)return!!c.descending==(null==g||g>e)?-1:1}return 0});if(k&&(k.start||k.count)){var d=e.length;e=e.slice(k.start||0,(k.start||0)+(k.count||Infinity));e.total=d}return e}switch(typeof p){default:throw Error("Can not query with a "+typeof p);case "object":case "undefined":var e=p;p=function(f){for(var k in e){var d=e[k];if(d&&d.test){if(!d.test(f[k],f))return!1}else if(d!= +f[k])return!1}return!0};break;case "string":if(!this[p])throw Error("No filter function "+p+" was found in store");p=this[p];case "function":}n.matches=p;return n}})},"dijit/form/_ExpandingTextAreaMixin":function(){define("dojo/_base/declare dojo/dom-construct dojo/has dojo/_base/lang dojo/on dojo/_base/window ../Viewport".split(" "),function(f,p,k,n,e,h,q){k.add("textarea-needs-help-shrinking",function(){var d=h.body(),b=p.create("textarea",{rows:"5",cols:"20",value:" ",style:{zoom:1,fontSize:"12px", +height:"96px",overflow:"hidden",visibility:"hidden",position:"absolute",border:"5px solid white",margin:"0",padding:"0",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"}},d,"last"),a=b.scrollHeight>=b.clientHeight;d.removeChild(b);return a});return f("dijit.form._ExpandingTextAreaMixin",null,{_setValueAttr:function(){this.inherited(arguments);this.resize()},postCreate:function(){this.inherited(arguments);var d=this.textbox;d.style.overflowY="hidden"; +this.own(e(d,"focus, resize",n.hitch(this,"_resizeLater")))},startup:function(){this.inherited(arguments);this.own(q.on("resize",n.hitch(this,"_resizeLater")));this._resizeLater()},_onInput:function(d){this.inherited(arguments);this.resize()},_estimateHeight:function(){var d=this.textbox;d.rows=(d.value.match(/\n/g)||[]).length+1},_resizeLater:function(){this.defer("resize")},resize:function(){function d(){var a=!1;""===b.value&&(b.value=" ",a=!0);var c=b.scrollHeight;a&&(b.value="");return c}var b= +this.textbox;"hidden"==b.style.overflowY&&(b.scrollTop=0);if(!this.busyResizing){this.busyResizing=!0;if(d()||b.offsetHeight){var a=d()+Math.max(b.offsetHeight-b.clientHeight,0),c=a+"px";c!=b.style.height&&(b.style.height=c,b.rows=1);if(k("textarea-needs-help-shrinking")){var e=d(),g=b.style.minHeight,f=4,r=b.scrollTop;b.style.minHeight=c;for(b.style.height="auto";0b.clientHeight?"auto":"hidden";"hidden"==b.style.overflowY&&(b.scrollTop=0)}else this._estimateHeight();this.busyResizing=!1}}})})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(f,p,k,n,e,h,q){var d=function(){},b=Object.freeze||function(){},a=f.Deferred=function(c){function l(a){if(r)throw Error("This deferred has already been resolved");f=a;r=!0;g()}function g(){for(var a;!a&& +v;){var b=v;v=v.next;if(a=b.progress==d)r=!1;var c=q?b.error:b.resolved;e("config-useDeferredInstrumentation")&&q&&p.instrumentRejected&&p.instrumentRejected(f,!!c);if(c)try{var g=c(f);g&&"function"===typeof g.then?g.then(h.hitch(b.deferred,"resolve"),h.hitch(b.deferred,"reject"),h.hitch(b.deferred,"progress")):(c=a&&void 0===g,a&&!c&&(q=g instanceof Error),b.deferred[c&&q?"reject":"resolve"](c?f:g))}catch(l){b.deferred.reject(l)}else q?b.deferred.reject(f):b.deferred.resolve(f)}}var f,r,m,t,q,u, +v,x=this.promise=new k;this.isResolved=x.isResolved=function(){return 0==t};this.isRejected=x.isRejected=function(){return 1==t};this.isFulfilled=x.isFulfilled=function(){return 0<=t};this.isCanceled=x.isCanceled=function(){return m};this.resolve=this.callback=function(a){this.fired=t=0;this.results=[a,null];l(a)};this.reject=this.errback=function(a){q=!0;this.fired=t=1;e("config-useDeferredInstrumentation")&&p.instrumentRejected&&p.instrumentRejected(a,!!v);l(a);this.results=[null,a]};this.progress= +function(a){for(var b=v;b;){var c=b.progress;c&&c(a);b=b.next}};this.addCallbacks=function(a,b){this.then(a,b,d);return this};x.then=this.then=function(b,c,e){var l=e==d?this:new a(x.cancel);b={resolved:b,error:c,progress:e,deferred:l};v?u=u.next=b:v=u=b;r&&g();return l.promise};var z=this;x.cancel=this.cancel=function(){if(!r){var a=c&&c(z);r||(a instanceof Error||(a=new n(a)),a.log=!1,z.reject(a))}m=!0};b(x)};h.extend(a,{addCallback:function(a){return this.addCallbacks(h.hitch.apply(f,arguments))}, +addErrback:function(a){return this.addCallbacks(null,h.hitch.apply(f,arguments))},addBoth:function(a){var b=h.hitch.apply(f,arguments);return this.addCallbacks(b,b)},fired:-1});a.when=f.when=q;return a})},"dijit/typematic":function(){define("dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/on dojo/sniff ./main".split(" "),function(f,p,k,n,e,h){var q=h.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(0> +this._currentTimeout?this._initialDelay:1e("ie")&&(q.trigger(f,b,d,a,d,c,l,g),setTimeout(k.hitch(this,q.stop),50))}))];return{remove:function(){f.forEach(h,function(a){a.remove()})}}},addListener:function(d,b,a,c,e,g,h,r){var m=[this.addKeyListener(b,a,c,e,g,h,r),this.addMouseListener(d,c,e,g,h,r)];return{remove:function(){f.forEach(m, +function(a){a.remove()})}}}};return q})},"dgrid/util/misc":function(){define(["dojo/has"],function(f){f.add("dom-contains",function(d,b,a){return!!a.contains});var p=[],k,n,e,h=/([^A-Za-z0-9_\u00A0-\uFFFF-])/g,q={defaultDelay:15,throttle:function(d,b,a){var c=!1;a=a||q.defaultDelay;return function(){c||(c=!0,d.apply(b,arguments),setTimeout(function(){c=!1},a))}},throttleDelayed:function(d,b,a){var c=!1;a=a||q.defaultDelay;return function(){if(!c){c=!0;var e=arguments;setTimeout(function(){c=!1;d.apply(b, +e)},a)}}},debounce:function(d,b,a){var c;a=a||q.defaultDelay;return function(){c&&(clearTimeout(c),c=null);var e=arguments;c=setTimeout(function(){d.apply(b,e)},a)}},each:function(d,b,a){var c,e;if(d)if("number"===typeof d.length){c=0;for(e=d.length;cb&&p[d]--}}}},escapeCssIdentifier:function(d,b){return"string"===typeof d?d.replace(h,b||"\\$1"):d}};return q})},"dijit/MenuItem":function(){define("dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/_base/kernel dojo/sniff dojo/_base/lang ./_Widget ./_TemplatedMixin ./_Contained ./_CssStateMixin dojo/text!./templates/MenuItem.html".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l){q=f("dijit.MenuItem"+(h("dojo-bidi")?"_NoBidi":""),[d,b,a,c],{templateString:l,baseClass:"dijitMenuItem",label:"",_setLabelAttr:function(a){this._set("label",a);var b="",c;c=a.search(/{\S}/);if(0<=c){var b=a.charAt(c+1),d=a.substr(0,c);a=a.substr(c+3);c=d+b+a;a=d+'\x3cspan class\x3d"dijitMenuItemShortcutKey"\x3e'+b+"\x3c/span\x3e"+a}else c=a;this.domNode.setAttribute("aria-label",c+" "+this.accelKey);this.containerNode.innerHTML=a;this._set("shortcutKey",b)},iconClass:"dijitNoIcon", +_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:!1,_fillContent:function(a){a&&!("label"in this.params)&&this._set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);k.set(this.containerNode,"id",this.id+"_text");this.accelKeyNode&&k.set(this.accelKeyNode,"id",this.id+"_accel");p.setSelectable(this.domNode,!1)},onClick:function(){},focus:function(){try{8==h("ie")&&this.containerNode.focus(),this.focusNode.focus()}catch(a){}},_setSelected:function(a){n.toggle(this.domNode, +"dijitMenuItemSelected",a)},setLabel:function(a){e.deprecated("dijit.MenuItem.setLabel() is deprecated. Use set('label', ...) instead.","","2.0");this.set("label",a)},setDisabled:function(a){e.deprecated("dijit.Menu.setDisabled() is deprecated. Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){this.focusNode.setAttribute("aria-disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode&&(this.accelKeyNode.style.display= +a?"":"none",this.accelKeyNode.innerHTML=a,k.set(this.containerNode,"colSpan",a?"1":"2"));this._set("accelKey",a)}});h("dojo-bidi")&&(q=f("dijit.MenuItem",q,{_setLabelAttr:function(a){this.inherited(arguments);"auto"===this.textDir&&this.applyTextDir(this.textDirNode)}}));return q})},"dijit/MenuBarItem":function(){define(["dojo/_base/declare","./MenuItem","dojo/text!./templates/MenuBarItem.html"],function(f,p,k){k=f("dijit._MenuBarItemMixin",null,{templateString:k,_setIconClassAttr:null});f=f("dijit.MenuBarItem", +[p,k],{});f._MenuBarItemMixin=k;return f})},"dijit/layout/TabController":function(){define("dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/has dojo/i18n dojo/_base/lang ./StackController ../registry ../Menu ../MenuItem dojo/text!./templates/_TabButton.html dojo/i18n!../nls/common".split(" "),function(f,p,k,n,e,h,q,d,b,a,c,l){l=f("dijit.layout._TabButton"+(e("dojo-bidi")?"_NoBidi":""),d.StackButton,{baseClass:"dijitTab",cssStateNodes:{closeNode:"dijitTabCloseButton"},templateString:l, +_setNameAttr:"focusNode",scrollOnFocus:!1,buildRendering:function(){this.inherited(arguments);p.setSelectable(this.containerNode,!1)},startup:function(){this.inherited(arguments);var a=this.domNode;this.defer(function(){a.className=a.className},1)},_setCloseButtonAttr:function(a){this._set("closeButton",a);n.toggle(this.domNode,"dijitClosable",a);this.closeNode.style.display=a?"":"none";a&&(a=h.getLocalization("dijit","common"),this.closeNode&&k.set(this.closeNode,"title",a.itemClose))},_setDisabledAttr:function(a){this.inherited(arguments); +if(this.closeNode)if(a)k.remove(this.closeNode,"title");else{var b=h.getLocalization("dijit","common");k.set(this.closeNode,"title",b.itemClose)}},_setLabelAttr:function(a){this.inherited(arguments);!this.showLabel&&!this.params.title&&(this.iconNode.alt=q.trim(this.containerNode.innerText||this.containerNode.textContent||""))}});e("dojo-bidi")&&(l=f("dijit.layout._TabButton",l,{_setLabelAttr:function(a){this.inherited(arguments);this.applyTextDir(this.iconNode,this.iconNode.alt)}}));f=f("dijit.layout.TabController", +d,{baseClass:"dijitTabController",templateString:"\x3cdiv role\x3d'tablist' data-dojo-attach-event\x3d'onkeydown:onkeydown'\x3e\x3c/div\x3e",tabPosition:"top",buttonWidget:l,buttonWidgetCloseClass:"dijitTabCloseButton",postCreate:function(){this.inherited(arguments);var d=new a({id:this.id+"_Menu",ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir,targetNodeIds:[this.domNode],selector:function(a){return n.contains(a,"dijitClosable")&&!n.contains(a,"dijitTabDisabled")}}); +this.own(d);var e=h.getLocalization("dijit","common"),l=this;d.addChild(new c({label:e.itemClose,ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir,onClick:function(a){a=b.byNode(this.getParent().currentTarget);l.onCloseButtonClick(a.page)}}))}});f.TabButton=l;return f})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(f,p){var k={};f.setObject("dojo.cldr.supplemental",k);k.getFirstDayOfWeek=function(f){f={bd:5,mv:5,ae:6,af:6,bh:6,dj:6, +dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,pr:0,py:0,sg:0,sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[k._region(f)];return void 0===f?1:f};k._region=function(f){f=p.normalizeLocale(f);f=f.split("-");var e=f[1];e?4==e.length&&(e=f[2]):e={aa:"et", +ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",fa:"ir",ff:"sn",fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb",ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",ik:"us","in":"id", +is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",mn:"mn",mo:"ro",mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no",no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",qu:"pe",rm:"ch", +rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",ur:"pk",uz:"uz",ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id",ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",bbc:"id", +bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",crk:"ca",csb:"pl",dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf",ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",gez:"et", +gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",khq:"ml",kht:"in",kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru",kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",lif:"np", +lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",nds:"de","new":"np",niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph",pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",saf:"gh", +sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",teo:"ug",tet:"tl",tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv",twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",wal:"et", +war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[f[0]];return e};k.getWeekend=function(f){var e=k._region(f);f={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[e];e={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[e];void 0===f&&(f=6);void 0===e&&(e=0);return{start:f,end:e}};return k})},"dijit/MenuBar":function(){define(["dojo/_base/declare","dojo/keys","./_MenuBase","dojo/text!./templates/MenuBar.html"], +function(f,p,k,n){return f("dijit.MenuBar",k,{templateString:n,baseClass:"dijitMenuBar",popupDelay:0,_isMenuBar:!0,_orient:["below"],_moveToPopup:function(e){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.onItemClick(this.focusedChild,e)},focusChild:function(e){this.inherited(arguments);this.activated&&(e.popup&&!e.disabled)&&this._openItemPopup(e,!0)},_onChildDeselect:function(e){this.currentPopupItem==e&&(this.currentPopupItem=null,e._closePopup());this.inherited(arguments)}, +_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()},_onDownArrow:function(e){this._moveToPopup(e)},_onUpArrow:function(){},onItemClick:function(e,f){e.popup&&e.popup.isShowingNow&&(!/^key/.test(f.type)||f.keyCode!==p.DOWN_ARROW)?(e.focusNode.focus(),this._cleanUp(!0)):this.inherited(arguments)}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(f,p,k,n){return f("dijit.ToolbarSeparator",[k,n], +{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);p.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/layout/_LayoutWidget":function(){define("dojo/_base/lang ../_Widget ../_Container ../_Contained ../Viewport dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style".split(" "),function(f,p,k,n,e,h,q,d,b){return h("dijit.layout._LayoutWidget",[p,k,n], +{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,_setTitleAttr:null,buildRendering:function(){this.inherited(arguments);q.add(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!a||!a.isLayoutContainer)this.resize(),this.own(e.on("resize",f.hitch(this,"resize")))}},resize:function(a,c){var e=this.domNode;a&&d.setMarginBox(e,a);var g=c||{};f.mixin(g,a||{});if(!("h"in g)||!("w"in g))g=f.mixin(d.getMarginBox(e), +g);var h=b.getComputedStyle(e),r=d.getMarginExtents(e,h),m=d.getBorderExtents(e,h),g=this._borderBox={w:g.w-(r.w+m.w),h:g.h-(r.h+m.h)},r=d.getPadExtents(e,h);this._contentBox={l:b.toPixelValue(e,h.paddingLeft),t:b.toPixelValue(e,h.paddingTop),w:g.w-r.w,h:g.h-r.h};this.layout()},layout:function(){},_setupChild:function(a){q.add(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a,b){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){q.remove(a.domNode, +this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}})})},"dojo/selector/lite":function(){define(["../has","../_base/kernel"],function(f,p){var k=document.createElement("div"),n=k.matches||k.webkitMatchesSelector||k.mozMatchesSelector||k.msMatchesSelector||k.oMatchesSelector,e=k.querySelectorAll,h=/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g;f.add("dom-matches-selector",!!n);f.add("dom-qsa",!!e);var q=function(c,l){if(a&&-1|.+\s+))([\w\-\*]+)(\S*$)/).exec(c);l=l||g;if(h){var r=8===f("ie")&&f("quirks")?l.nodeType===g.nodeType:null!==l.parentNode&&9!==l.nodeType&&l.parentNode===g;if(h[2]&&r){var m=p.byId?p.byId(h[2],g):g.getElementById(h[2]);if(!m||h[1]&&h[1]!=m.tagName.toLowerCase())return[];if(l!=g)for(g=m;g!=l;)if(g=g.parentNode,!g)return[];return h[3]?q(h[3],m):[m]}if(h[3]&&l.getElementsByClassName)return l.getElementsByClassName(h[4]); +if(h[5])if(m=l.getElementsByTagName(h[5]),h[4]||h[6])c=(h[4]||"")+h[6];else return m}if(e)return 1===l.nodeType&&"object"!==l.nodeName.toLowerCase()?d(l,c,l.querySelectorAll):l.querySelectorAll(c);m||(m=l.getElementsByTagName("*"));h=[];g=0;for(r=m.length;g ])\s*)|(#|\.)?((?:\\.|[\w-])+)|\[\s*([\w-]+)\s*(.?=)?\s*("(?:\\.|[^"])+"|'(?:\\.|[^'])+'|(?:\\.|[^\]])*)\s*\]/g,function(f,h,r,t,n,q,p){t?k=e(k,m[r||""](t.replace(/\\/g,""))):h?k=(" "==h?b:d)(k):n&&(k=e(k,a(n,p,q)));return""}))throw Error("Syntax error in query"); +if(!k)return!0;n[h]=k}return k(f,r)}}();if(!f("dom-qsa"))var a=function(a,b){for(var d=a.match(h),e=[],f=0;fH&&(L=d.getComputedStyle(k),d.set(E,{overflowY:"scroll",height:H+"px",border:L.borderLeftWidth+" "+L.borderLeftStyle+" "+L.borderLeftColor}),k._originalStyle=k.style.cssText,k.style.border="none");e.set(E,{id:B,style:{zIndex:this._beginZIndex+ +f.length},"class":"dijitPopup "+(h.baseClass||h["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:m.parent?m.parent.id:""});0==f.length&&A&&(this._firstAroundNode=A,this._firstAroundPosition=q.position(A,!0),this._aroundMoveListener=setTimeout(c.hitch(this,"_repositionAll"),50));b("config-bgIframe")&&!h.bgIframe&&(h.bgIframe=new s(E));B=h.orient?c.hitch(h,"orient"):null;t=A?g.around(E,A,t,p,B):g.at(E,m,"R"==t?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],m.padding,B);E.style.visibility="visible"; +k.style.visibility="visible";k=[];k.push(l(E,"keydown",c.hitch(this,function(b){if(b.keyCode==a.ESCAPE&&m.onCancel)b.stopPropagation(),b.preventDefault(),m.onCancel();else if(b.keyCode==a.TAB&&(b.stopPropagation(),b.preventDefault(),(b=this.getTopPopup())&&b.onCancel))b.onCancel()})));h.onCancel&&m.onCancel&&k.push(h.on("cancel",m.onCancel));k.push(h.on(h.onExecute?"execute":"change",c.hitch(this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()})));f.push({widget:h,wrapper:E,parent:m.parent, +onExecute:m.onExecute,onCancel:m.onCancel,onClose:m.onClose,handlers:k});if(h.onOpen)h.onOpen(t);return t},close:function(a){for(var b=this._stack;a&&f.some(b,function(b){return b.widget==a})||!a&&b.length;){var c=b.pop(),d=c.widget,e=c.onClose;d.bgIframe&&(d.bgIframe.destroy(),delete d.bgIframe);if(d.onClose)d.onClose();for(var g;g=c.handlers.pop();)g.remove();d&&d.domNode&&this.hide(d);e&&e()}0==b.length&&this._aroundMoveListener&&(clearTimeout(this._aroundMoveListener),this._firstAroundNode=this._firstAroundPosition= +this._aroundMoveListener=null)}});return m.popup=new k})},"dijit/_base/manager":function(){define(["dojo/_base/array","dojo/_base/config","dojo/_base/lang","../registry","../main"],function(f,p,k,n,e){var h={};f.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),function(e){h[e]=n[e]});k.mixin(h,{defaultDuration:p.defaultDuration||200});k.mixin(e,h);return e})},"dijit/layout/StackController":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/keys dojo/_base/lang dojo/on dojo/topic ../focus ../registry ../_Widget ../_TemplatedMixin ../_Container ../form/ToggleButton dojo/touch".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l,g,s){n=p("dijit.layout._StackButton",s,{tabIndex:"-1",closeButton:!1,_aria_attr:"aria-selected",buildRendering:function(a){this.inherited(arguments);(this.focusNode||this.domNode).setAttribute("role","tab")}});p=p("dijit.layout.StackController",[c,l,g],{baseClass:"dijitStackController",templateString:"\x3cspan role\x3d'tablist' data-dojo-attach-event\x3d'onkeydown'\x3e\x3c/span\x3e",containerId:"",buttonWidget:n,buttonWidgetCloseClass:"dijitStackCloseButton",pane2button:function(b){return a.byId(this.id+ +"_"+b)},postCreate:function(){this.inherited(arguments);this.own(d.subscribe(this.containerId+"-startup",h.hitch(this,"onStartup")),d.subscribe(this.containerId+"-addChild",h.hitch(this,"onAddChild")),d.subscribe(this.containerId+"-removeChild",h.hitch(this,"onRemoveChild")),d.subscribe(this.containerId+"-selectChild",h.hitch(this,"onSelectChild")),d.subscribe(this.containerId+"-containerKeyDown",h.hitch(this,"onContainerKeyDown")));this.containerNode.dojoClick=!0;this.own(q(this.containerNode,"click", +h.hitch(this,function(b){var c=a.getEnclosingWidget(b.target);if(c!=this.containerNode&&!c.disabled&&c.page)for(b=b.target;b!==this.containerNode;b=b.parentNode)if(k.contains(b,this.buttonWidgetCloseClass)){this.onCloseButtonClick(c.page);break}else if(b==c.domNode){this.onButtonClick(c.page);break}})))},onStartup:function(b){this.textDir=b.textDir;f.forEach(b.children,this.onAddChild,this);if(b.selected)this.onSelectChild(b.selected);var c=a.byId(this.containerId).containerNode,d=h.hitch(this,"pane2button"); +b={title:"label",showtitle:"showLabel",iconclass:"iconClass",closable:"closeButton",tooltip:"title",disabled:"disabled",textdir:"textdir"};var e=function(a,b){return q(c,"attrmodified-"+a,function(a){var c=d(a.detail&&a.detail.widget&&a.detail.widget.id);c&&c.set(b,a.detail.newValue)})},g;for(g in b)this.own(e(g,b[g]))},destroy:function(a){this.destroyDescendants(a);this.inherited(arguments)},onAddChild:function(a,b){var c=new (h.isString(this.buttonWidget)?h.getObject(this.buttonWidget):this.buttonWidget)({id:this.id+ +"_"+a.id,name:this.id+"_"+a.id,label:a.title,disabled:a.disabled,ownerDocument:this.ownerDocument,dir:a.dir,lang:a.lang,textDir:a.textDir||this.textDir,showLabel:a.showTitle,iconClass:a.iconClass,closeButton:a.closable,title:a.tooltip,page:a});this.addChild(c,b);a.controlButton=c;if(!this._currentChild)this.onSelectChild(a);c=a._wrapper.getAttribute("aria-labelledby")?a._wrapper.getAttribute("aria-labelledby")+" "+c.id:c.id;a._wrapper.removeAttribute("aria-label");a._wrapper.setAttribute("aria-labelledby", +c)},onRemoveChild:function(a){this._currentChild===a&&(this._currentChild=null);var b=this.pane2button(a.id);b&&(this.removeChild(b),b.destroy());delete a.controlButton},onSelectChild:function(b){if(b){if(this._currentChild){var c=this.pane2button(this._currentChild.id);c.set("checked",!1);c.focusNode.setAttribute("tabIndex","-1")}c=this.pane2button(b.id);c.set("checked",!0);this._currentChild=b;c.focusNode.setAttribute("tabIndex","0");a.byId(this.containerId)}},onButtonClick:function(c){var d=this.pane2button(c.id); +b.focus(d.focusNode);this._currentChild&&this._currentChild.id===c.id&&d.set("checked",!0);a.byId(this.containerId).selectChild(c)},onCloseButtonClick:function(c){a.byId(this.containerId).closeChild(c);this._currentChild&&(c=this.pane2button(this._currentChild.id))&&b.focus(c.focusNode||c.domNode)},adjacent:function(a){if(!this.isLeftToRight()&&(!this.tabPosition||/top|bottom/.test(this.tabPosition)))a=!a;var b=this.getChildren(),c=f.indexOf(b,this.pane2button(this._currentChild.id)),d=b[c],e;do c= +(c+(a?1:b.length-1))%b.length,e=b[c];while(e.disabled&&e!=d);return e},onkeydown:function(a,b){if(!this.disabled&&!a.altKey){var c=null;if(a.ctrlKey||!a._djpage){switch(a.keyCode){case e.LEFT_ARROW:case e.UP_ARROW:a._djpage||(c=!1);break;case e.PAGE_UP:a.ctrlKey&&(c=!1);break;case e.RIGHT_ARROW:case e.DOWN_ARROW:a._djpage||(c=!0);break;case e.PAGE_DOWN:a.ctrlKey&&(c=!0);break;case e.HOME:for(var d=this.getChildren(),g=0;gd("ie")?(b="\x3ciframe src\x3d'"+(k.dojoBlankHtmlUrl||f.toUrl("dojo/resources/blank.html")||'javascript:""')+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e",b=document.createElement(b)):(b=n.create("iframe"),b.src='javascript:""',b.className="dijitBackgroundIframe",b.setAttribute("role","presentation"),e.set(b,"opacity",0.1)), +b.tabIndex=-1);return b};this.push=function(b){b.style.display="none";a.push(b)}};p.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(d("config-bgIframe")){var c=this.iframe=b.pop();a.appendChild(c);7>d("ie")||d("quirks")?(this.resize(a),this._conn=q(a,"resize",h.hitch(this,"resize",a))):e.set(c,{width:"100%",height:"100%"})}};h.extend(p.BackgroundIframe,{resize:function(a){this.iframe&&e.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){this._conn&& +(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),b.push(this.iframe),delete this.iframe)}});return p.BackgroundIframe})},"dojo/dnd/Avatar":function(){define("../_base/declare ../_base/window ../dom ../dom-attr ../dom-class ../dom-construct ../hccss ../query".split(" "),function(f,p,k,n,e,h,q,d){return f("dojo.dnd.Avatar",null,{constructor:function(b){this.manager=b;this.construct()},construct:function(){var b=h.create("table",{"class":"dojoDndAvatar", +style:{position:"absolute",zIndex:"1999",margin:"0px"}}),a=this.manager.source,c,d=h.create("tbody",null,b),e=h.create("tr",null,d),f=h.create("td",null,e),r=Math.min(5,this.manager.nodes.length),m=0;q("highcontrast")&&h.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"\x3c"},f);h.create("span",{innerHTML:a.generateText?this._generateText():""},f);for(n.set(e,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});mm?(m=k+m,0>m&&(m=e)):m=m>=k?k+g:m;for(k&&"string"==typeof f&&(f=f.split(""));m!=n;m+=c)if(f[m]==h)return m;return-1}}var q={},d,b={every:e(!1),some:e(!0),indexOf:h(!0),lastIndexOf:h(!1),forEach:function(a,b,d){var e=0,f=a&&a.length||0;f&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=q[b]||n(b));if(d)for(;ek("jscript"))&&!k("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var d=a[b];if(!d||!d.listeners){var e=d,d=Function("event","var callee \x3d arguments.callee; for(var i \x3d 0; i\x3ccallee.listeners.length; i++){var listener \x3d _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");d.listeners=[];a[b]=d;d.global=this;e&&d.listeners.push(_dojoIEListeners_.push(e)-1)}d.listeners.push(a=d.global._dojoIEListeners_.push(c)- +1);return new m(a)}return f.after(a,b,c,!0)},u=function(){this.cancelBubble=!0},v=d._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0;this.returnValue=!1;this.modified=!0}}if(k("touch"))var x=function(){},z=window.orientation,y=function(a){return function(b){var c=b.corrected;if(!c){var d=b.type;try{delete b.type}catch(e){}if(b.type){if(k("touch-can-modify-event-delegate"))x.prototype=b,c=new x;else{var c={},g;for(g in b)c[g]= +b[g]}c.preventDefault=function(){b.preventDefault()};c.stopPropagation=function(){b.stopPropagation()}}else c=b,c.type=d;b.corrected=c;if("resize"==d){if(z==window.orientation)return null;z=window.orientation;c.type="orientationchange";return a.call(this,c)}"rotation"in c||(c.rotation=0,c.scale=1);var d=c.changedTouches[0],f;for(f in d)delete c[f],c[f]=d[f]}return a.call(this,c)}};return d})},"dijit/form/_CheckBoxMixin":function(){define(["dojo/_base/declare","dojo/dom-attr"],function(f,p){return f("dijit.form._CheckBoxMixin", +null,{type:"checkbox",value:"on",readOnly:!1,_aria_attr:"aria-checked",_setReadOnlyAttr:function(f){this._set("readOnly",f);p.set(this.focusNode,"readOnly",f)},_setLabelAttr:void 0,_getSubmitValue:function(f){return null==f||""===f?"on":f},_setValueAttr:function(f){f=this._getSubmitValue(f);this._set("value",f);p.set(this.focusNode,"value",f)},reset:function(){this.inherited(arguments);this._set("value",this._getSubmitValue(this.params.value));p.set(this.focusNode,"value",this.value)},_onClick:function(f){return this.readOnly? +(f.stopPropagation(),f.preventDefault(),!1):this.inherited(arguments)}})})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(f,p,k,n,e,h,q,d,b){var a=k.mixin,c={},l=c._Line=function(a,b){this.start=a;this.end=b};l.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var g=c.Animation=function(b){a(this,b);k.isArray(this.curve)&&(this.curve=new l(this.curve[0],this.curve[1]))};g.prototype= +new n;k.extend(g,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var a=this._percent,b=this.easing;return b?b(a):a},_fire:function(a,b){var c=b||[];if(this[a])if(p.debugAtAllCosts)this[a].apply(this,c);else try{this[a].apply(this,c)}catch(d){console.error("exception in animation handler for:",a),console.error(d)}return this},play:function(a,b){this._delayTimer&&this._clearTimer();if(b)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&& +!this._paused)return this;this._fire("beforeBegin",[this.node]);var c=a||this.delay,d=k.hitch(this,"_play",b);if(0this._percent?this._startTimer():(this._active=!1,0=s&&(clearInterval(r),r=null,s=0)}});var t=q("ie")?function(a){var c=a.style;!c.width.length&&"auto"==b.get(a,"width")&&(c.width="auto")}:function(){};c._fade=function(e){e.node=d.byId(e.node);var g=a({properties:{}},e);e=g.properties.opacity={};e.start=!("start"in g)?function(){return+b.get(g.node,"opacity")||0}:g.start;e.end=g.end;e=c.animateProperty(g);h.after(e,"beforeBegin",k.partial(t,g.node),!0);return e};c.fadeIn= +function(b){return c._fade(a({end:1},b))};c.fadeOut=function(b){return c._fade(a({end:0},b))};c._defaultEasing=function(a){return 0.5+Math.sin((a+1.5)*Math.PI)/2};var w=function(a){this._properties=a;for(var b in a){var c=a[b];c.start instanceof e&&(c.tempColor=new e)}};w.prototype.getValue=function(a){var b={},c;for(c in this._properties){var d=this._properties[c],g=d.start;g instanceof e?b[c]=e.blendColors(g,d.end,a,d.tempColor).toCss():k.isArray(g)||(b[c]=(d.end-g)*a+g+("opacity"!=c?d.units||"px": +0))}return b};c.animateProperty=function(c){var m=c.node=d.byId(c.node);c.easing||(c.easing=f._defaultEasing);c=new g(c);h.after(c,"beforeBegin",k.hitch(c,function(){var c={},d;for(d in this.properties){if("width"==d||"height"==d)this.node.display="block";var g=this.properties[d];k.isFunction(g)&&(g=g(m));g=c[d]=a({},k.isObject(g)?g:{end:g});k.isFunction(g.start)&&(g.start=g.start(m));k.isFunction(g.end)&&(g.end=g.end(m));var f=0<=d.toLowerCase().indexOf("color"),l=function(a,c){var d={height:a.offsetHeight, +width:a.offsetWidth}[c];if(void 0!==d)return d;d=b.get(a,c);return"opacity"==c?+d:f?d:parseFloat(d)};"end"in g?"start"in g||(g.start=l(m,d)):g.end=l(m,d);f?(g.start=new e(g.start),g.end=new e(g.end)):g.start="opacity"==d?+g.start:parseFloat(g.start)}this.curve=new w(c)}),!0);h.after(c,"onAnimate",k.hitch(b,"set",c.node),!0);return c};c.anim=function(a,b,d,e,f,m){return c.animateProperty({node:a,duration:d||g.prototype.duration,properties:b,easing:e,onEnd:f}).play(m||0)};a(f,c);f._Animation=g;return c})}, +"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when dojo/i18n!../nls/loading".split(" "),function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m){return b("dijit.layout.ContentPane",[k,n,e],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:f._scopeName,preventCache:!1, +preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(a,b,c){var d=new c(a,b);return!d.href&& +d._contentSetter&&d._contentSetter.parseDeferred&&!d._contentSetter.parseDeferred.isFulfilled()?d._contentSetter.parseDeferred.then(function(){return d}):d},create:function(a,b){if((!a||!a.template)&&b&&!("href"in a)&&!("content"in a)){b=c.byId(b);for(var d=b.ownerDocument.createDocumentFragment();b.firstChild;)d.appendChild(b.firstChild);a=p.delegate(a,{content:d})}this.inherited(arguments,[a,b])},postMixInProperties:function(){this.inherited(arguments);var a=r.getLocalization("dijit","loading", +this.lang);this.loadingMessage=h.substitute(this.loadingMessage,a);this.errorMessage=h.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&d.forEach(this._contentSetter.parseResults,function(a){!a._started&&(!a._destroyed&&p.isFunction(a.startup))&&(a.startup(),a._started=!0)},this)},_startChildren:function(){d.forEach(this.getChildren(), +function(a){!a._started&&(!a._destroyed&&p.isFunction(a.startup))&&(a.startup(),a._started=!0)});this._contentSetter&&d.forEach(this._contentSetter.parseResults,function(a){!a._started&&(!a._destroyed&&p.isFunction(a.startup))&&(a.startup(),a._started=!0)},this)},setHref:function(a){f.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(b){this.cancel();this.onLoadDeferred=new a(p.hitch(this,"cancel")); +this.onLoadDeferred.then(p.hitch(this,"onLoad"));this._set("href",b);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){f.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(b){this._set("href","");this.cancel();this.onLoadDeferred=new a(p.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(p.hitch(this,"onLoad")); +this._setContent(b||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged|| +this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new a(p.hitch(this,"cancel"));this.onLoadDeferred.then(p.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};p.isObject(this.ioArgs)&&p.mixin(b,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||s.get)(b),d;c.then(function(b){d=b;try{return a._isDownloaded= +!0,a._setContent(b,!1)}catch(c){a._onError("Content",c)}},function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return d});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(b){console.error("Error "+this.widgetId+" running custom onLoad code: "+b.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(a){console.error("Error "+ +this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var b=this._contentSetter;d.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});b&&(d.forEach(b.parseResults,function(b){b._destroyed||(b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0)}),delete b.parseResults);a||g.empty(this.containerNode);delete this._singleChild}, +_setContent:function(a,b){a=this.preprocessContent(a);this.destroyDescendants();var c=this._contentSetter;c&&c instanceof q._ContentSetter||(c=this._contentSetter=new q._ContentSetter({node:this.containerNode,_onError:p.hitch(this,this._onError),onContentError:p.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(b){console.error("Fatal "+this.id+" could not change content due to "+b.message,b)}})}));var d=p.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent, +parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),d=c.set(p.isObject(a)&&a.domNode?a.domNode:a,d),e=this;return m(d&&d.then?d:c.parseDeferred,function(){delete e._contentSetterParams;b||(e._started&&(e._startChildren(),e._scheduleLayout()),e._onLoadHandler(a))})},preprocessContent:function(a){return a},_onError:function(a,b,c){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this, +b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"cbtree/store/Natural":function(){define(["dojo/_base/declare","./Memory"],function(f,p){return f([p],{_insertBefore:function(f,n,e){var h=f.length;e&&(h=f.indexOf(e),-1!=h&&(e=f.indexOf(n),-1!=e&&(h=h>e?h-1:h,f.splice(e,1))));f.splice(h,0, +n);return h},_writeObject:function(f,n,e,h){if(h&&h.before){var q=this._anyToObject(h.before);if(!e||-1==e)this._applyDefaults(f,n),this.total++;this._insertBefore(this._data,n,q);this._indexData();return f}return this.inherited(arguments)},toString:function(){return"[object NaturalStore]"}})})},"dijit/_Contained":function(){define(["dojo/_base/declare","./registry"],function(f,p){return f("dijit._Contained",null,{_getSibling:function(f){var n=this.getParent();return n&&n._getSiblingOfChild&&n._getSiblingOfChild(this, +"previous"==f?-1:1)||null},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var f=this.getParent();return!f||!f.getIndexOfChild?-1:f.getIndexOfChild(this)}})})},"dijit/_KeyNavContainer":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/_base/kernel dojo/keys dojo/_base/lang ./registry ./_Container ./_FocusMixin ./_KeyNavMixin".split(" "),function(f,p,k,n,e,h,q,d,b,a){return p("dijit._KeyNavContainer", +[b,a,d],{connectKeyNavHandlers:function(a,b){var d=this._keyNavCodes={},k=h.hitch(this,"focusPrev"),r=h.hitch(this,"focusNext");f.forEach(a,function(a){d[a]=k});f.forEach(b,function(a){d[a]=r});d[e.HOME]=h.hitch(this,"focusFirstChild");d[e.END]=h.hitch(this,"focusLastChild")},startupKeyNavChildren:function(){n.deprecated("startupKeyNavChildren() call no longer needed","","2.0")},startup:function(){this.inherited(arguments);f.forEach(this.getChildren(),h.hitch(this,"_startupChild"))},addChild:function(a, +b){this.inherited(arguments);this._startupChild(a)},_startupChild:function(a){a.set("tabIndex","-1")},_getFirst:function(){var a=this.getChildren();return a.length?a[0]:null},_getLast:function(){var a=this.getChildren();return a.length?a[a.length-1]:null},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),!0)},childSelector:function(a){return(a=q.byNode(a))&&a.getParent()==this}})})}, +"dijit/layout/utils":function(){define(["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],function(f,p,k,n,e){function h(d,b){var a=d.resize?d.resize(b):k.setMarginBox(d.domNode,b);a?e.mixin(d,a):(e.mixin(d,k.getMarginBox(d.domNode)),e.mixin(d,b))}var q={marginBox2contentBox:function(d,b){var a=n.getComputedStyle(d),c=k.getMarginExtents(d,a),e=k.getPadBorderExtents(d,a);return{l:n.toPixelValue(d,a.paddingLeft),t:n.toPixelValue(d,a.paddingTop),w:b.w-(c.w+e.w), +h:b.h-(c.h+e.h)}},layoutChildren:function(d,b,a,c,l){b=e.mixin({},b);p.add(d,"dijitLayoutContainer");a=f.filter(a,function(a){return"center"!=a.region&&"client"!=a.layoutAlign}).concat(f.filter(a,function(a){return"center"==a.region||"client"==a.layoutAlign}));f.forEach(a,function(a){var d=a.domNode,e=a.region||a.layoutAlign;if(!e)throw Error("No region setting for "+a.id);var f=d.style;f.left=b.l+"px";f.top=b.t+"px";f.position="absolute";p.add(d,"dijitAlign"+(e.substring(0,1).toUpperCase()+e.substring(1))); +d={};c&&c==a.id&&(d["top"==a.region||"bottom"==a.region?"h":"w"]=l);"leading"==e&&(e=a.isLeftToRight()?"left":"right");"trailing"==e&&(e=a.isLeftToRight()?"right":"left");"top"==e||"bottom"==e?(d.w=b.w,h(a,d),b.h-=a.h,"top"==e?b.t+=a.h:f.top=b.t+b.h+"px"):"left"==e||"right"==e?(d.h=b.h,h(a,d),b.w-=a.w,"left"==e?b.l+=a.w:f.left=b.l+b.w+"px"):("client"==e||"center"==e)&&h(a,b)})}};e.setObject("dijit.layout.utils",q);return q})},"dgrid/List":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-class dojo/on dojo/has ./util/misc dojo/_base/sniff".split(" "), +function(f,p,k,n,e,h){function q(a,b){a.className="dgrid-scrollbar-measure";document.body.appendChild(a);var c=a["offset"+b]-a["client"+b];a.className="";a.parentNode&&document.body.removeChild(a);return c}function d(a){k.replace(this.domNode,a,this._class||"");this._class=a}function b(){return this._class}var a=[];e("mozilla")&&a.push("has-mozilla");e("touch")&&a.push("has-touch");k.add(document.documentElement,a);e.add("pointer",function(a){return"PointerEvent"in a?"pointer":"MSPointerEvent"in a? +"MSPointer":!1});var c,l;e.add("dom-scrollbar-width",function(a,b,c){return q(c,"Width")});e.add("dom-scrollbar-height",function(a,b,c){return q(c,"Height")});e.add("dom-rtl-scrollbar-left",function(a,b,c){a=document.createElement("div");c.className="dgrid-scrollbar-measure";c.setAttribute("dir","rtl");c.appendChild(a);document.body.appendChild(c);b=!!e("ie")||!!e("trident")||/\bEdge\//.test(navigator.userAgent)||a.offsetLeft>=e("dom-scrollbar-width");c.className="";c.parentNode&&document.body.removeChild(c); +p.destroy(a);c.removeAttribute("dir");return b});var g=0,s=function(){this._started&&this.resize()},r=f(null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,cleanAddedRules:!0,addUiClasses:!0,highlightDuration:250,postscript:function(a,b){var c=this;(this._Row=function(a,b,c){this.id=a;this.data=b;this.element=c}).prototype.remove=function(){c.removeRow(this.element)};b&&(this.srcNodeRef=b=b.nodeType?b:document.getElementById(b));this.create(a,b)},listType:"list",create:function(a, +b){var c=this.domNode=b||document.createElement("div"),e;a&&(this.params=a,f.safeMixin(this,a),e=a["class"]||a.className||c.className);this.sort=this.sort||[];this._listeners=[];this._rowIdToObject={};this.postMixInProperties&&this.postMixInProperties();this.id=c.id=c.id||this.id||r.autoIdPrefix+g++;this.buildRendering();e&&d.call(this,e);this.postCreate();delete this.srcNodeRef;this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var a=this.domNode,b=this.addUiClasses,c=this,d,g, +f;f=this.isRTL="rtl"===(document.body.dir||document.documentElement.dir||document.body.style.direction).toLowerCase();a.className="";a.setAttribute("role","grid");k.add(a,"dgrid dgrid-"+this.listType+(b?" ui-widget":""));d=this.headerNode=p.create("div",{className:"dgrid-header dgrid-header-row"+(b?" ui-widget-header":"")+(this.showHeader?"":" dgrid-header-hidden")},a);g=this.bodyNode=p.create("div",{className:"dgrid-scroller"},a);e("ff")&&(g.tabIndex=-1);this.headerScrollNode=p.create("div",{className:"dgrid-header dgrid-header-scroll dgrid-scrollbar-width"+ +(b?" ui-widget-header":"")},a);this.footerNode=p.create("div",{className:"dgrid-footer"+(this.showFooter?"":" dgrid-footer-hidden")},a);f&&(a.className+=" dgrid-rtl"+(e("dom-rtl-scrollbar-left")?" dgrid-rtl-swap":""));n(g,"scroll",function(b){c.showHeader&&(d.scrollLeft=b.scrollLeft||g.scrollLeft);b.stopPropagation();n.emit(a,"scroll",{scrollTarget:g})});this.configStructure();this.renderHeader();this.contentNode=this.touchNode=p.create("div",{className:"dgrid-content"+(b?" ui-widget-content":"")}, +this.bodyNode);this._listeners.push(this._resizeHandle=n(window,"resize",h.throttleDelayed(s,this)))},postCreate:function(){},startup:function(){this._started||(this.inherited(arguments),this._started=!0,this.resize(),this.set("sort",this.sort))},configStructure:function(){},resize:function(){var a=this.bodyNode,b=this.footerNode,b=this.showFooter?b.offsetHeight:0;this.headerScrollNode.style.height=a.style.marginTop=this.headerNode.offsetHeight+"px";a.style.marginBottom=b+"px";c||(c=e("dom-scrollbar-width"), +l=e("dom-scrollbar-height"),e("ie")&&(c++,l++),h.addCssRule(".dgrid-scrollbar-width","width: "+c+"px"),h.addCssRule(".dgrid-scrollbar-height","height: "+l+"px"),17!==c&&(h.addCssRule(".dgrid-header-row","right: "+c+"px"),h.addCssRule(".dgrid-rtl-swap .dgrid-header-row","left: "+c+"px")))},addCssRule:function(a,b){var c=h.addCssRule(a,b);this.cleanAddedRules&&this._listeners.push(c);return c},on:function(a,b){var c=n(this.domNode,a,b);e("dom-addeventlistener")||this._listeners.push(c);return c},cleanup:function(){for(var a in this._rowIdToObject)if(this._rowIdToObject[a]!== +this.columns){var b=document.getElementById(a);b&&this.removeRow(b,!0)}},destroy:function(){if(this._listeners){for(var a=this._listeners.length;a--;)this._listeners[a].remove();this._listeners=null}this._started=!1;this.cleanup();p.destroy(this.domNode)},refresh:function(){this.cleanup();this._rowIdToObject={};this._autoRowId=0;this.contentNode.innerHTML="";this.scrollTo({x:0,y:0})},highlightRow:function(a,b){var c="dgrid-highlight"+(this.addUiClasses?" ui-state-highlight":"");a=a.element||a;k.add(a, +c);setTimeout(function(){k.remove(a,c)},b||this.highlightDuration)},adjustRowIndices:function(a){var b=a.rowIndex;if(-1b?"previousSibling":"nextSibling"]){do if((e= +a)&&-1<(e.className+" ").indexOf(c+" ")){g=e;b+=0>b?1:-1;break}while(a=(!d||!e.hidden)&&e[0>b?"lastChild":"firstChild"])}else if(e=e.parentNode,!e||e===this.bodyNode||e===this.headerNode)break;while(b);return g},up:function(a,b,c){a.element||(a=this.row(a));return this.row(this._move(a,-(b||1),"dgrid-row",c))},down:function(a,b,c){a.element||(a=this.row(a));return this.row(this._move(a,b||1,"dgrid-row",c))},scrollTo:function(a){"undefined"!==typeof a.x&&(this.bodyNode.scrollLeft=a.x);"undefined"!== +typeof a.y&&(this.bodyNode.scrollTop=a.y)},getScrollPosition:function(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}},get:function(a){var b="_get"+a.charAt(0).toUpperCase()+a.slice(1);return"function"===typeof this[b]?this[b].apply(this,[].slice.call(arguments,1)):this[a]},set:function(a,b){if("object"===typeof a)for(var c in a)this.set(c,a[c]);else c="_set"+a.charAt(0).toUpperCase()+a.slice(1),"function"===typeof this[c]?this[c].apply(this,[].slice.call(arguments,1)):this[a]=b;return this}, +_getClass:b,_setClass:d,_getClassName:b,_setClassName:d,_setSort:function(a,b){this.sort="string"!==typeof a?a:[{property:a,descending:b}];this._applySort()},_applySort:function(){this.refresh();if(this._lastCollection){var a=this.sort;if(a&&0g!==c?1:-1})}this.renderArray(this._lastCollection)}},_setShowHeader:function(a){var b=this.headerNode; +this.showHeader=a;k.toggle(b,"dgrid-header-hidden",!a);this.renderHeader();this.resize();a&&(b.scrollLeft=this.getScrollPosition().x)},_setShowFooter:function(a){this.showFooter=a;k.toggle(this.footerNode,"dgrid-footer-hidden",!a);this.resize()}});r.autoIdPrefix="dgrid_";return r})},"dijit/form/DataList":function(){define("dojo/_base/declare dojo/dom dojo/_base/lang dojo/query dojo/store/Memory ../registry".split(" "),function(f,p,k,n,e,h){function q(d){return{id:d.value,value:d.value,name:k.trim(d.innerText|| +d.textContent||"")}}return f("dijit.form.DataList",e,{constructor:function(d,b){this.domNode=p.byId(b);k.mixin(this,d);this.id&&h.add(this);this.domNode.style.display="none";this.inherited(arguments,[{data:n("option",this.domNode).map(q)}])},destroy:function(){h.remove(this.id)},fetchSelectedItem:function(){var d=n("\x3e option[selected]",this.domNode)[0]||n("\x3e option",this.domNode)[0];return d&&q(d)}})})},"dojo/promise/tracer":function(){define(["../_base/lang","./Promise","../Evented"],function(f, +p,k){function n(f){setTimeout(function(){h.apply(e,f)},0)}var e=new k,h=e.emit;e.emit=null;p.prototype.trace=function(){var e=f._toArray(arguments);this.then(function(d){n(["resolved",d].concat(e))},function(d){n(["rejected",d].concat(e))},function(d){n(["progress",d].concat(e))});return this};p.prototype.traceRejected=function(){var e=f._toArray(arguments);this.otherwise(function(d){n(["rejected",d].concat(e))});return this};return e})},"dijit/form/CheckBox":function(){define("require dojo/_base/declare dojo/dom-attr dojo/has dojo/query dojo/ready ./ToggleButton ./_CheckBoxMixin dojo/text!./templates/CheckBox.html dojo/NodeList-dom ../a11yclick".split(" "), +function(f,p,k,n,e,h,q,d,b){n("dijit-legacy-requires")&&h(0,function(){f(["dijit/form/RadioButton"])});return p("dijit.form.CheckBox",[q,d],{templateString:b,baseClass:"dijitCheckBox",_setValueAttr:function(a,b){"string"==typeof a&&(this.inherited(arguments),a=!0);this._created&&this.set("checked",a,b)},_getValueAttr:function(){return this.checked&&this._get("value")},_setIconClassAttr:null,_setNameAttr:"focusNode",postMixInProperties:function(){this.inherited(arguments);this.checkedAttrSetting=""}, +_fillContent:function(){},_onFocus:function(){this.id&&e("label[for\x3d'"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&e("label[for\x3d'"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)}})})},"dojo/dom-style":function(){define(["./sniff","./dom"],function(f,p){function k(b,d,e){d=d.toLowerCase();if("auto"==e){if("height"==d)return b.offsetHeight;if("width"==d)return b.offsetWidth}if("fontweight"==d)switch(e){case 700:return"bold"; +default:return"normal"}d in a||(a[d]=c.test(d));return a[d]?h(b,e):e}var n,e={};n=f("webkit")?function(a){var b;if(1==a.nodeType){var c=a.ownerDocument.defaultView;b=c.getComputedStyle(a,null);!b&&a.style&&(a.style.display="",b=c.getComputedStyle(a,null))}return b||{}}:f("ie")&&(9>f("ie")||f("quirks"))?function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){return 1==a.nodeType?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};e.getComputedStyle=n;var h;h=f("ie")?function(a, +b){if(!b)return 0;if("medium"==b)return 4;if(b.slice&&"px"==b.slice(-2))return parseFloat(b);var c=a.style,d=a.runtimeStyle,e=c.left,f=d.left;d.left=a.currentStyle.left;try{c.left=b,b=c.pixelLeft}catch(l){b=0}c.left=e;d.left=f;return b}:function(a,b){return parseFloat(b)||0};e.toPixelValue=h;var q=function(a,b){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return b?{}:null}},d=9>f("ie")||10>f("ie")&&f("quirks")?function(a){try{return q(a).Opacity/100}catch(b){return 1}}:function(a){return n(a).opacity}, +b=9>f("ie")||10>f("ie")&&f("quirks")?function(a,c){""===c&&(c=1);var d=100*c;1===c?(a.style.zoom="",q(a)&&(a.style.filter=a.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,""))):(a.style.zoom=1,q(a)?q(a,1).Opacity=d:a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+d+")",q(a,1).Enabled=!0);if("tr"==a.tagName.toLowerCase())for(d=a.firstChild;d;d=d.nextSibling)"td"==d.tagName.toLowerCase()&&b(d,c);return c}:function(a,b){return a.style.opacity=b},a= +{left:!0,top:!0},c=/margin|padding|width|height|max|min|offset/,l={cssFloat:1,styleFloat:1,"float":1};e.get=function(a,b){var c=p.byId(a),f=arguments.length;if(2==f&&"opacity"==b)return d(c);b=l[b]?"cssFloat"in c.style?"cssFloat":"styleFloat":b;var h=e.getComputedStyle(c);return 1==f?h:k(c,b,h[b]||c.style[b])};e.set=function(a,c,d){var f=p.byId(a),h=arguments.length,k="opacity"==c;c=l[c]?"cssFloat"in f.style?"cssFloat":"styleFloat":c;if(3==h)return k?b(f,d):f.style[c]=d;for(var n in c)e.set(a,n,c[n]); +return e.getComputedStyle(f)};return e})},"dijit/tree/_dndSelector":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/dnd/common dojo/dom dojo/mouse dojo/on dojo/touch ../a11yclick ./_dndContainer".split(" "),function(f,p,k,n,e,h,q,d,b,a,c){return p("dijit.tree._dndSelector",c,{constructor:function(){this.selection={};this.anchor=null;this.events.push(d(this.tree.domNode,b.press,n.hitch(this,"onMouseDown")),d(this.tree.domNode,b.release,n.hitch(this,"onMouseUp")), +d(this.tree.domNode,b.move,n.hitch(this,"onMouseMove")),d(this.tree.domNode,a.press,n.hitch(this,"onClickPress")),d(this.tree.domNode,a.release,n.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var a=[],b=this.selection,c;for(c in b)a.push(b[c]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,b){this.setSelection(this.getSelectedTreeNodes().concat([a])); +b&&(this.anchor=a);return a},removeTreeNode:function(a){var b=f.filter(this.getSelectedTreeNodes(),function(b){return!h.isDescendant(b.domNode,a.domNode)});this.setSelection(b);return a},isTreeNodeSelected:function(a){return a.id&&!!this.selection[a.id]},setSelection:function(a){var b=this.getSelectedTreeNodes();f.forEach(this._setDifference(b,a),n.hitch(this,function(a){a.setSelected(!1);this.anchor==a&&delete this.anchor;delete this.selection[a.id]}));f.forEach(this._setDifference(a,b),n.hitch(this, +function(a){a.setSelected(!0);this.selection[a.id]=a}));this._updateSelectionProperties()},_setDifference:function(a,b){f.forEach(b,function(a){a.__exclude__=!0});var c=f.filter(a,function(a){return!a.__exclude__});f.forEach(b,function(a){delete a.__exclude__});return c},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),b=[],c=[];f.forEach(a,function(a){var d=a.getTreePath();c.push(a);b.push(d)},this);a=f.map(c,function(a){return a.item});this.tree._set("paths",b);this.tree._set("path", +b[0]||[]);this.tree._set("selectedNodes",c);this.tree._set("selectedNode",c[0]||null);this.tree._set("selectedItems",a);this.tree._set("selectedItem",a[0]||null)},onClickPress:function(a){if(!this.current||!this.current.isExpandable||!this.tree.isExpandoNode(a.target,this.current)){"mousedown"==a.type&&q.isLeft(a)&&a.preventDefault();var b="keydown"==a.type?this.tree.focusedChild:this.current;if(b){var c=e.getCopyKeyState(a),d=b.id;!this.singular&&!a.shiftKey&&this.selection[d]?this._doDeselect=!0: +(this._doDeselect=!1,this.userSelect(b,c,a.shiftKey))}}},onClickRelease:function(a){this._doDeselect&&(this._doDeselect=!1,this.userSelect("keyup"==a.type?this.tree.focusedChild:this.current,e.getCopyKeyState(a),a.shiftKey))},onMouseMove:function(){this._doDeselect=!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(a,b){if(a===b)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-b.sourceIndex;if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(b)& +2?1:-1;if(document.createRange){var c=doc.createRange();c.setStartBefore(a);var d=doc.createRange();d.setStartBefore(b);return c.compareBoundaryPoints(c.END_TO_END,d)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");},userSelect:function(a,b,c){if(this.singular)this.anchor==a&&b?this.selectNone():(this.setSelection([a]),this.anchor=a);else if(c&&this.anchor){b=this._compareNodes(this.anchor.rowNode,a.rowNode);c=this.anchor;0>b?b=c:(b=a,a=c);for(c= +[];b!=a;)c.push(b),b=this.tree._getNext(b);c.push(a);this.setSelection(c)}else this.selection[a.id]&&b?this.removeTreeNode(a):b?this.addTreeNode(a,!0):(this.setSelection([a]),this.anchor=a)},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},forInSelectedItems:function(a,b){b=b||k.global;for(var c in this.selection)a.call(b,this.getItem(c),c,this)}})})},"cbtree/store/ObjectStore":function(){define("module dojo/_base/declare dojo/_base/lang dojo/store/util/QueryResults ./Hierarchy ../Evented ../errors/createError!../errors/CBTErrors.json".split(" "), +function(f,p,k,n,e,h,q){var d=q(f.id);return p([e,h],{eventable:!0,add:function(b,a){var c=this.inherited(arguments);void 0!=c&&this.emit("new",{type:"new",detail:{item:b}});return c},put:function(b,a){var c=this._getObjectId(b,a),e=this._indexId[c],g,f=!1;if(0<=e){if(a&&!1===a.overwrite)throw new d("ItemExist","put");g=this._data[e];f=!0}c=this._writeObject(c,b,e,a);f?this.emit("change",{type:"change",detail:{item:b,oldItem:g}}):this.emit("new",{type:"new",detail:{item:b}});return c},remove:function(b){var a= +this.get(b);if(a){var c=this.inherited(arguments);c&&this.emit("delete",{type:"delete",detail:{item:a}});return c}return!1}})})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(f,p,k,n,e,h){function q(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)}function d(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(b){}for(var c;c=a.lastChild;)a.removeChild(c)}var b={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"], +tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},a=/<\s*([\w\:]+)/,c={},l=0,g="__"+p._scopeName+"ToDomId",s;for(s in b)b.hasOwnProperty(s)&&(p=b[s],p.pre="option"==s?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+p.join("\x3e\x3c")+"\x3e",p.post="\x3c/"+p.reverse().join("\x3e\x3c/")+"\x3e");var r;8>=k("ie")&&(r=function(a){a.__dojo_html5_tested="yes";var b=m("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e", +style:{visibility:"hidden"}},a.body);1!==b.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,function(b){a.createElement(b)});t(b)});f.toDom=function(d,e){e=e||n.doc;var f=e[g];f||(e[g]=f=++l+"",c[f]=e.createElement("div"));8>=k("ie")&&!e.__dojo_html5_tested&&e.body&&r(e);d+="";var m=d.match(a),h=m?m[1].toLowerCase():"",f=c[f];if(m&&b[h]){m=b[h];f.innerHTML=m.pre+d+m.post; +for(m=m.length;m;--m)f=f.firstChild}else f.innerHTML=d;if(1==f.childNodes.length)return f.removeChild(f.firstChild);for(h=e.createDocumentFragment();m=f.firstChild;)h.appendChild(m);return h};f.place=function(a,b,c){b=e.byId(b);"string"==typeof a&&(a=/^\s*c?0:c])}else switch(c){case "before":q(a,b);break;case "after":c=a;(d=b.parentNode)&&(d.lastChild==b?d.appendChild(c): +d.insertBefore(c,b.nextSibling));break;case "replace":b.parentNode.replaceChild(a,b);break;case "only":f.empty(b);b.appendChild(a);break;case "first":if(b.firstChild){q(a,b.firstChild);break}default:b.appendChild(a)}return a};var m=f.create=function(a,b,c,d){var g=n.doc;c&&(c=e.byId(c),g=c.ownerDocument);"string"==typeof a&&(a=g.createElement(a));b&&h.set(a,b);c&&f.place(a,c,d);return a};f.empty=function(a){d(e.byId(a))};var t=f.destroy=function(a){if(a=e.byId(a)){var b=a;a=a.parentNode;b.firstChild&& +d(b);a&&(k("ie")&&a.canHaveChildren&&"removeNode"in b?b.removeNode(!1):a.removeChild(b))}}})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],function(f,p,k,n){return p("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(e,f){var n=this.containerNode;if(0arguments.length&&(b=this==l.manager().target);if(b){if(this.copyOnly)return this.selfCopy}else return this.copyOnly;return!1},destroy:function(){g.superclass.destroy.call(this);f.forEach(this.topics,function(a){a.remove()});this.targetAnchor=null},onMouseMove:function(b){if(!(this.isDragging&&"Disabled"==this.targetState)){g.superclass.onMouseMove.call(this,b);var c=l.manager();if(!this.isDragging&&this.mouseDown&&this.isSource&&(Math.abs(b.pageX-this._lastX)>this.delay||Math.abs(b.pageY- +this._lastY)>this.delay)){var d=this.getSelectedNodes();d.length&&c.startDrag(this,d,this.copyState(a.getCopyKeyState(b),!0))}if(this.isDragging){d=!1;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current)this.targetBox=h.position(this.current,!0);d=this.horizontal?b.pageX-this.targetBox.x]+>|]*>[\s\S]*?<\/title>)/ig,"")},_emptyNode:h.empty,_setNodeContent:function(a,b){h.empty(a);if(b)if("number"==typeof b&&(b=b.toString()),"string"==typeof b&&(b=h.toDom(b,a.ownerDocument)),!b.nodeType&&p.isArrayLike(b))for(var d=b.length,e=0;e]*>\s*([\s\S]+)\s*<\/body>/im);c&&(a=c[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+a},onExecError:function(a){return"Error occurred executing scripts: "+ +a},_mixin:function(a){var b={},d;for(d in a)d in b||(this[d]=a[d])},_parse:function(){var a=this.node;try{var b={};k.forEach(["dir","lang","textDir"],function(a){this[a]&&(b[a]=this[a])},this);var d=this;this.parseDeferred=q.parse({rootNode:a,noStart:!this.startup,inherited:b,scope:this.parserScope}).then(function(a){return d.parseResults=a},function(a){d._onError("Content",a,"Error parsing in _ContentSetter#"+this.id)})}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}}, +_onError:function(a,c,d){a=this["on"+a+"Error"].call(this,c);d?console.error(d,c):a&&b._setNodeContent(this.node,a,!0)}}),set:function(a,c,d){void 0==c&&(c="");"number"==typeof c&&(c=c.toString());return d?(new b._ContentSetter(p.mixin(d,{content:c,node:a}))).set():b._setNodeContent(a,c,!0)}};p.setObject("dojo.html",b);return b})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "), +function(f,p,k,n,e,h,q){var d=f("dijit.form.ValidationTextBox",e,{templateString:q,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(b,a){a!=d.prototype[b]&&(p.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+b+"', ...) is deprecated. Use set('pattern', ...) instead.","","2.0"),this.set("pattern",a))},_setRegExpGenAttr:function(b){this._deprecateRegExp("regExpGen", +b);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(b){this._deprecateRegExp("regExp",b)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(b,a){return RegExp("^(?:"+this._computeRegexp(a)+")"+(this.required?"":"?")+"$").test(b)&&(!this.required||!this._isEmpty(b))&&(this._isEmpty(b)||void 0!==this.parse(b,a))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value, +this.get("constraints"))},_isEmpty:function(b){return(this.trim?/^\s*$/:/^$/).test(b)},getErrorMessage:function(){var b="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:!this.invalidMessage?this.promptMessage:this.invalidMessage,a="$_unset_$"==this.missingMessage?this.messages.missingMessage:!this.missingMessage?b:this.missingMessage;return this.required&&this._isEmpty(this.textbox.value)?a:b},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(b){var a= +"",c=this.disabled||this.isValid(b);c&&(this._maskValidSubsetError=!0);var d=this._isEmpty(this.textbox.value),e=!c&&b&&this._isValidSubset();this._set("state",c?"":((!this._hasBeenBlurred||b)&&d||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&b)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=b&&e,a=this.getErrorMessage(b)):"Incomplete"==this.state?(a=this.getPromptMessage(b),this._maskValidSubsetError= +!this._hasBeenBlurred||b):d&&(a=this.getPromptMessage(b));this.set("message",a);return c},displayMessage:function(b){b&&this.focused?h.show(b,this.domNode,this.tooltipPosition,!this.isLeftToRight()):h.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(b){this.constraints=k.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(b){!b.locale&& +this.lang&&(b.locale=this.lang);this._set("constraints",b);this._refreshState()},_setPatternAttr:function(b){this._set("pattern",b);this._refreshState()},_computeRegexp:function(b){var a=this.pattern;"function"==typeof a&&(a=a.call(this,b));if(a!=this._lastRegExp){var c="";this._lastRegExp=a;".*"!=a&&a.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=a;break;case ")":c+="|$)";break;default:c+= +"(?:"+a+"|$)"}});try{"".search(c)}catch(d){c=this.pattern}this._partialre="^(?:"+c+")$"}return a},postMixInProperties:function(){this.inherited(arguments);this.messages=n.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(b){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(b){this._set("required",b);this.focusNode.setAttribute("aria-required",b);this._refreshState()},_setMessageAttr:function(b){this._set("message", +b);this.displayMessage(b)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},destroy:function(){h.hide(this.domNode);this.inherited(arguments)}});return d})},"dijit/selection":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/sniff dojo/_base/window dijit/focus".split(" "),function(f,p,k,n,e,h){var q=function(b){var a=b.document;this.getType=function(){if(a.getSelection){var c="text",d;try{d= +b.getSelection()}catch(e){}d&&1==d.rangeCount&&(d=d.getRangeAt(0),d.startContainer==d.endContainer&&(1==d.endOffset-d.startOffset&&3!=d.startContainer.nodeType)&&(c="control"));return c}return a.selection.type.toLowerCase()};this.getSelectedText=function(){if(a.getSelection){var c=b.getSelection();return c?c.toString():""}return"control"==this.getType()?null:a.selection.createRange().text};this.getSelectedHtml=function(){if(a.getSelection){var c=b.getSelection();if(c&&c.rangeCount){var d,e="";for(d= +0;d=q||7==q&&m?!1:p("position-fixed-support")&&"fixed"==h.get(a,"position").toLowerCase()},x=this,z=function(a,b,c){"BODY"==a.tagName||"HTML"==a.tagName?x.get(a.ownerDocument).scrollBy(b,c):(b&&(a.scrollLeft+=b),c&&(a.scrollTop+=c))};if(!r(b))for(;v;){v==d&&(v=c);var y=e.position(v),A=r(v),B="rtl"==h.getComputedStyle(v).direction.toLowerCase();if(v==c){y.w=t;y.h=w;if(c==f&&(q||p("trident"))&& +B)y.x+=c.offsetWidth-y.w;y.x=0;y.y=0}else{var E=e.getPadBorderExtents(v);y.w-=E.w;y.h-=E.h;y.x+=E.l;y.y+=E.t;var H=v.clientWidth,L=y.w-H;0y.y&&(y.h+=y.y,y.y=0),0>y.x&&(y.w+=y.x,y.x=0),y.y+y.h>w&&(y.h=w-y.y),y.x+y.w>t&&(y.w=t-y.x));var M=u.x-y.x,Q=u.y-y.y,G=M+u.w-y.w,J=Q+u.h-y.h,F,D;if(0v.offsetHeight)){F=Math[0>M?"max":"min"](M,G);if(B&& +(8==q&&!m||5<=p("trident")))F=-F;D=v.scrollLeft;z(v,F,0);F=v.scrollLeft-D;u.x-=F}if(0v.offsetHeight))F=Math.ceil(Math[0>Q?"max":"min"](Q,J)),D=v.scrollTop,z(v,0,F),F=v.scrollTop-D,u.y-=F;v=v!=c&&!A&&v.parentNode}}}catch(C){console.error("scrollIntoView: "+C),b.scrollIntoView(!1)}}};f.setObject("dojo.window",d);return d})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(f,p,k,n,e){var h={}; +f.setObject("dojo.number",h);h.format=function(d,b){b=f.mixin({},b||{});var a=p.normalizeLocale(b.locale),a=p.getLocalization("dojo.cldr","number",a);b.customs=a;a=b.pattern||a[(b.type||"decimal")+"Format"];return isNaN(d)||Infinity==Math.abs(d)?null:h._applyPattern(d,a,b)};h._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;h._applyPattern=function(d,b,a){a=a||{};var c=a.customs.group,e=a.customs.decimal;b=b.split(";");var f=b[0];b=b[0>d?1:0]||"-"+f;if(-1!=b.indexOf("%"))d*=100;else if(-1!=b.indexOf("\u2030"))d*= +1E3;else if(-1!=b.indexOf("\u00a4"))c=a.customs.currencyGroup||c,e=a.customs.currencyDecimal||e,b=b.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(b,c,d,e){b=a[["symbol","currency","displayName"][d.length-1]]||a.currency||"";return!b?"":c+b+e});else if(-1!=b.indexOf("E"))throw Error("exponential notation not supported");var k=h._numberPatternRE,f=f.match(k);if(!f)throw Error("unable to find a number expression in pattern: "+b);!1===a.fractional&&(a.places=0);return b.replace(k,h._formatAbsolute(d, +f[0],{decimal:e,group:c,places:a.places,round:a.round}))};h.round=function(d,b,a){a=10/(a||10);return(a*+d).toFixed(b)/a};if(0==(0.9).toFixed()){var q=h.round;h.round=function(d,b,a){var c=Math.pow(10,-b||0),e=Math.abs(d);if(!d||e>=c)c=0;else if(e/=c,0.5>e||0.95<=e)c=0;return q(d,b,a)+(0a.round||(d=h.round(d,e,a.round));d=String(Math.abs(d)).split(".");var f=d[1]||"";b[1]||a.places?(c&&(a.places=a.places.substring(0,c)),c=void 0!==a.places?a.places:b[1]&&b[1].lastIndexOf("0")+1,c>f.length&&(d[1]=n.pad(f,c,"0",!0)),ed[0].length&&(d[0]=n.pad(d[0],c)),-1==e.indexOf("#")&&(d[0]=d[0].substr(d[0].length-c)));var e=b[0].lastIndexOf(","),k,r;-1!= +e&&(k=b[0].length-e-1,b=b[0].substr(0,e),e=b.lastIndexOf(","),-1!=e&&(r=b.length-e-1));b=[];for(e=d[0];e;)c=e.length-k,b.push(0d||90d||111d||192d||222e?e-48:!a.shiftKey&&65<=e&&90>=e?e+32:c[e]||e}d=g(a,{type:"keypress",faux:!0,charCode:e});b.call(a.currentTarget,d);if(q("ie"))try{a.keyCode=d.keyCode}catch(f){}}}),e=p(a,"keypress",function(a){var c=a.charCode;a=g(a,{charCode:32<=c?c:0,faux:!0});return b.call(this,a)});return{remove:function(){d.remove();e.remove()}}}: +q("opera")?function(a,b){return p(a,"keypress",function(a){var c=a.which;3==c&&(c=99);c=32>c&&!a.shiftKey?0:c;a.ctrlKey&&(!a.shiftKey&&65<=c&&90>=c)&&(c+=32);return b.call(this,g(a,{charCode:c}))})}:function(b,c){return p(b,"keypress",function(b){a(b);return c.call(this,b)})};var r={_keypress:s,connect:function(a,c,d,e,f){var g=arguments,h=[],l=0;h.push("string"==typeof g[0]?null:g[l++],g[l++]);var k=g[l+1];h.push("string"==typeof k||"function"==typeof k?g[l++]:null,g[l++]);for(k=g.length;ln("ff")?"-moz-none":"none";c&&"msUserSelect"!==c?f.style[c]=g:n("dom-selectstart")?!b&&!a._selectstartHandle?a._selectstartHandle=k(f,"selectstart",function(a){var b=a.target&&a.target.tagName;"INPUT"!==b&&"TEXTAREA"!==b&&a.preventDefault()}):b&&a._selectstartHandle&& +(a._selectstartHandle.remove(),delete a._selectstartHandle):(d(f,!b),!b&&!a._unselectableHandle?a._unselectableHandle=e.after(a,"renderRow",function(a){d(a,!0);return a}):b&&a._unselectableHandle&&(a._unselectableHandle.remove(),delete a._unselectableHandle))}n.add("dom-comparedocumentposition",function(a,b,c){return!!c.compareDocumentPosition});n.add("dom-selectstart","undefined"!==typeof document.onselectstart);var a=n("mac")?"metaKey":"ctrlKey",c=n("css-user-select"),l=(h=n("pointer"))&&"MS"=== +h.slice(0,2),g=h?h+(l?"Down":"down"):"mousedown",s=h?h+(l?"Up":"up"):"mouseup";"WebkitUserSelect"===c&&"undefined"!==typeof document.documentElement.style.msUserSelect&&(c=!1);return f(null,{selectionDelegate:".dgrid-row",selectionEvents:g+","+s+",dgrid-cellfocusin",selectionTouchEvents:n("touch")?q.tap:null,deselectOnRefresh:!0,allowSelectAll:!1,selection:{},selectionMode:"extended",allowTextSelection:void 0,_selectionTargetType:"rows",create:function(){this.selection={};return this.inherited(arguments)}, +postCreate:function(){this.inherited(arguments);this._initSelectionEvents();var a=this.selectionMode;this.selectionMode="";this._setSelectionMode(a)},destroy:function(){this.inherited(arguments);this._selectstartHandle&&this._selectstartHandle.remove();this._unselectableHandle&&this._unselectableHandle.remove();this._removeDeselectSignals&&this._removeDeselectSignals()},_setSelectionMode:function(a){a!==this.selectionMode&&(this.clearSelection(),this.selectionMode=a,this._selectionHandlerName="_"+ +a+"SelectionHandler",this._setAllowTextSelection(this.allowTextSelection))},_setAllowTextSelection:function(a){"undefined"!==typeof a?b(this,a):b(this,"none"===this.selectionMode);this.allowTextSelection=a},_handleSelect:function(a,b){if(this[this._selectionHandlerName]&&this.allowSelect(this.row(b))&&!("dgrid-cellfocusin"===a.type&&"mousedown"===a.parentType||a.type===s&&b!==this._waitForMouseUp)){this._waitForMouseUp=null;this._selectionTriggerEvent=a;if(!a.keyCode||!a.ctrlKey||32===a.keyCode)if(!a.shiftKey&& +a.type===g&&this.isSelected(b))this._waitForMouseUp=b;else this[this._selectionHandlerName](a,b);this._selectionTriggerEvent=null}},_singleSelectionHandler:function(b,c){var d=b.keyCode?b.ctrlKey:b[a];this._lastSelected===c?this.select(c,null,!d||!this.isSelected(c)):(this.clearSelection(),this.select(c),this._lastSelected=c)},_multipleSelectionHandler:function(b,c){var d=this._lastSelected,e=b.keyCode?b.ctrlKey:b[a],f;b.shiftKey||(f=e?null:!0,d=null);this.select(c,d,f);d||(this._lastSelected=c)}, +_extendedSelectionHandler:function(b,c){(2===b.button?!this.isSelected(c):!(b.keyCode?b.ctrlKey:b[a]))&&this.clearSelection(null,!0);this._multipleSelectionHandler(b,c)},_toggleSelectionHandler:function(a,b){this.select(b,null,null)},_initSelectionEvents:function(){var b=this,c=this.contentNode,d=this.selectionDelegate;this._selectionEventQueues={deselect:[],select:[]};n("touch")&&!n("pointer")&&this.selectionTouchEvents?(k(c,q.selector(d,this.selectionTouchEvents),function(a){b._handleSelect(a,this); +b._ignoreMouseSelect=this}),k(c,k.selector(d,this.selectionEvents),function(a){b._ignoreMouseSelect!==this?b._handleSelect(a,this):a.type===s&&(b._ignoreMouseSelect=null)})):k(c,k.selector(d,this.selectionEvents),function(a){b._handleSelect(a,this)});this.addKeyHandler&&this.addKeyHandler(32,function(a){b._handleSelect(a,a.target)});if(this.allowSelectAll)this.on("keydown",function(c){c[a]&&(65===c.keyCode&&!/\bdgrid-input\b/.test(c.target.className))&&(c.preventDefault(),b[b.allSelected?"clearSelection": +"selectAll"]())});this._setCollection&&e.before(this,"_setCollection",function(a){b._updateDeselectionAspect(a)});this._updateDeselectionAspect()},_updateDeselectionAspect:function(a){function b(a,d){var e=c.row(a);if(e&&c.selection[e.id])c[d](e)}var c=this,d;this._removeDeselectSignals&&this._removeDeselectSignals();d=a&&a.track&&this._observeCollection?[e.before(this,"_observeCollection",function(a){d.push(a.on("delete",function(a){"undefined"===typeof a.index&&b(a.id,"deselect")}))}),e.after(this, +"_observeCollection",function(a){d.push(a.on("update",function(c){"undefined"!==typeof c.index&&b(a.getIdentity(c.target),"select")}))},!0)]:[e.before(this,"removeRow",function(a,b){var c;b||(c=this.row(a))&&c.id in this.selection&&this.deselect(c)})];this._removeDeselectSignals=function(){for(var a=d.length;a--;)d[a].remove();d=[]}},allowSelect:function(){return!0},_fireSelectionEvent:function(a){var b=this._selectionEventQueues[a],c=this._selectionTriggerEvent,d;d={bubbles:!0,grid:this};c&&(d.parentType= +c.type);d[this._selectionTargetType]=b;this._selectionEventQueues[a]=[];k.emit(this.contentNode,"dgrid-"+a,d)},_fireSelectionEvents:function(){var a=this._selectionEventQueues,b;for(b in a)a[b].length&&this._fireSelectionEvent(b)},_select:function(a,b,c){var d,e,f;"undefined"===typeof c&&(c=!0);a.element||(a=this.row(a));if(!1===c||this.allowSelect(a))if(d=this.selection,e=!!d[a.id],null===c&&(c=!e),f=a.element,!c&&!this.allSelected?delete this.selection[a.id]:d[a.id]=c,f&&(c?p.add(f,"dgrid-selected"+ +(this.addUiClasses?" ui-state-active":"")):p.remove(f,"dgrid-selected ui-state-active")),c!==e&&f&&this._selectionEventQueues[(c?"":"de")+"select"].push(a),b)if(b.element||(b=this.row(b)),b){if(b=b.element){d=this._determineSelectionDirection(f,b);d||(b=document.getElementById(b.id),d=this._determineSelectionDirection(f,b));for(;a.element!==b&&(a=this[d](a));)this._select(a,null,c)}}else this._lastSelected=f},_determineSelectionDirection:n("dom-comparedocumentposition")?function(a,b){var c=b.compareDocumentPosition(a); +return c&1?!1:2===c?"down":"up"}:function(a,b){return 1>b.sourceIndex?!1:b.sourceIndex>a.sourceIndex?"down":"up"},select:function(a,b,c){this._select(a,b,c);this._fireSelectionEvents()},deselect:function(a,b){this.select(a,b,!1)},clearSelection:function(a,b){this.allSelected=!1;for(var c in this.selection)a!==c&&this._select(c,null,!1);b||(this._lastSelected=null);this._fireSelectionEvents()},selectAll:function(){this.allSelected=!0;this.selection={};for(var a in this._rowIdToObject){var b=this.row(this._rowIdToObject[a]); +this._select(b.id,null,!0)}this._fireSelectionEvents()},isSelected:function(a){if("undefined"===typeof a||null===a)return!1;a.element||(a=this.row(a));return a.id in this.selection?!!this.selection[a.id]:this.allSelected&&(!a.data||this.allowSelect(a))},refresh:function(){this.deselectOnRefresh&&this.clearSelection();this._lastSelected=null;return this.inherited(arguments)},renderArray:function(){var a=this.inherited(arguments),b=this.selection,c,d,e;for(c=0;cf.max)&&f.max--,h=f[m],h.parentNode===b&&e.removeRow(h,!1,d),f.splice(m,1),("delete"===a.type||"update"===a.type&&(m=f.min&&k<=f.max)){"max"in f&&(void 0===m||mf.max)&&f.max++;if(f.length){if(m=f[k],!m&&(m=f[k-1]))m=(m.connected||m).nextSibling}else m=e._getFirstRowSibling&&e._getFirstRowSibling(b);h&&(m&&h.id===m.id)&&(m=(m.connected||m).nextSibling);m&&!m.parentNode&&(m=document.getElementById(m.id));f.splice(k,0,void 0);h=e.insertRow(a.target,b,m,k,d);e.highlightRow(h)}h=null}),a.on("add, delete, update",function(b){var c="undefined"!==typeof b.previousIndex?b.previousIndex:Infinity, +d="undefined"!==typeof b.index?b.index:Infinity,h=Math.min(c,d);c!==d&&f[h]&&e.adjustRowIndices(f[h]);Infinity!==c&&(e._processScroll&&(f[c]||f[c-1]))&&e._processScroll();e._onNotification(f,b,a);a===e._renderedCollection&&"totalLength"in b&&(e._total=b.totalLength)})];return{remove:function(){for(;0n||null==f)e=1;return e};p.createSortFunction=function(f,n){function e(a,b,c,d){return function(e,f){var h=d.getValue(e,a),l=d.getValue(f,a);return b*c(h,l)}}for(var h=[],q,d=n.comparatorMap,b=p.basicComparator,a=0;aa?(h=n(p),p=""):(h=n(p.slice(0,a)),p=n(p.slice(a+1)));"string"==typeof e[h]&&(e[h]=[e[h]]);f.isArray(e[h])?e[h].push(p):e[h]=p}return e}}})},"dojo/_base/loader":function(){define("./kernel ../has require module ../json ./lang ./array".split(" "),function(f,p,k,n,e,h,q){var d=function(a){return a.replace(/\./g,"/")},b=/\/\/>>built/,a=[],c=[],l=function(b,d,e){a.push(e);q.forEach(b.split(","),function(a){a=M(a,d.module);c.push(a);Q(a)});g()},g=function(){var b,c;for(c in H)if(b= +H[c],void 0===b.noReqPluginCheck&&(b.noReqPluginCheck=/loadInit\!/.test(c)||/require\!/.test(c)?1:0),!b.executed&&!b.noReqPluginCheck&&b.injected==x)return;P(function(){var b=a;a=[];q.forEach(b,function(a){a(1)})})},s=function(a,b,c){var d=/\(|\)/g,e=1;for(d.lastIndex=b;(b=d.exec(a))&&!(e=")"==b[0]?e-1:e+1,0==e););if(0!=e)throw"unmatched paren around character "+d.lastIndex+" in: "+a;return[f.trim(a.substring(c,d.lastIndex))+";\n",d.lastIndex]},r=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,m=/(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg, +t=/(^|\s)(require|define)\s*\(/m,w=function(a,b){var c,d,e,f=[],g=[];c=[];for(b=b||a.replace(r,function(a){m.lastIndex=t.lastIndex=0;return m.test(a)||t.test(a)?"":a});c=m.exec(b);)d=m.lastIndex,e=d-c[0].length,d=s(b,d,e),"loadInit"==c[2]?f.push(d[0]):g.push(d[0]),m.lastIndex=d[1];c=f.concat(g);return c.length||!t.test(b)?[a.replace(/(^|\s)dojo\.loadInit\s*\(/g,"\n0 \x26\x26 dojo.loadInit("),c.join(""),c]:0},u=k.initSyncLoader(l,g,function(a,c){var d,f,g=[],h=[];if(b.test(c)||!(d=w(c)))return 0;f= +a.mid+"-*loadInit";for(var m in M("dojo",a).result.scopeMap)g.push(m),h.push('"'+m+'"');return"// xdomain rewrite of "+a.mid+"\ndefine('"+f+"',{\n\tnames:"+e.stringify(g)+",\n\tdef:function("+g.join(",")+"){"+d[1]+"}});\n\ndefine("+e.stringify(g.concat(["dojo/loadInit!"+f]))+", function("+g.join(",")+"){\n"+d[0]+"});"}),v=u.sync,x=u.requested,z=u.arrived,y=u.nonmodule,A=u.executing,B=u.executed,E=u.syncExecStack,H=u.modules,L=u.execQ,M=u.getModule,Q=u.injectModule,G=u.setArrived,J=u.signal,F=u.finishExec, +D=u.execModule,C=u.getLegacyMode,P=u.guardCheckComplete,l=u.dojoRequirePlugin;f.provide=function(a){var b=E[0],c=h.mixin(M(d(a),k.module),{executed:A,result:h.getObject(a,!0)});G(c);b&&(b.provides||(b.provides=[])).push(function(){c.result=h.getObject(a);delete c.provides;c.executed!==B&&F(c)});return c.result};p.add("config-publishRequireResult",1,0,0);f.require=function(a,b){var c=function(a,b){var c=M(d(a),k.module);if(E.length&&E[0].finish)E[0].finish.push(a);else{if(c.executed)return c.result; +b&&(c.result=y);var e=C();Q(c);e=C();c.executed!==B&&c.injected===z&&u.guardCheckComplete(function(){D(c)});if(c.executed)return c.result;e==v?c.cjs?L.unshift(c):E.length&&(E[0].finish=[a]):L.push(c)}}(a,b);p("config-publishRequireResult")&&(!h.exists(a)&&void 0!==c)&&h.setObject(a,c);return c};f.loadInit=function(a){a()};f.registerModulePath=function(a,b){var c={};c[a.replace(/\./g,"/")]=b;k({paths:c})};f.platformRequire=function(a){a=(a.common||[]).concat(a[f._name]||a["default"]||[]);for(var b;a.length;)h.isArray(b= +a.shift())?f.require.apply(f,b):f.require(b)};f.requireIf=f.requireAfterIf=function(a,b,c){a&&f.require(b,c)};f.requireLocalization=function(a,b,c){k(["../i18n"],function(d){d.getLocalization(a,b,c)})};return{extractLegacyApiApplications:w,require:l,loadInit:function(a,b,c){b([a],function(a){b(a.names,function(){for(var e="",g=[],h=0;he?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":f=a.getFullYear();switch(e){case 1:break;case 2:if(!c.fullYear){f=String(f);f=f.substr(f.length-2);break}default:h=!0}break;case "Q":case "q":f=Math.ceil((a.getMonth()+1)/3);h=!0;break;case "M":case "L":f=a.getMonth();3>e?(f+=1,h=!0):(l=["months","L"==l?"standAlone": +"format",k[e-3]].join("-"),f=b[l][f]);break;case "w":f=g._getWeekOfYear(a,0);h=!0;break;case "d":f=a.getDate();h=!0;break;case "D":f=g._getDayOfYear(a);h=!0;break;case "e":case "c":if(f=a.getDay(),2>e){f=(f-n.getFirstDayOfWeek(c.locale)+8)%7;break}case "E":f=a.getDay();3>e?(f+=1,h=!0):(l=["days","c"==l?"standAlone":"format",k[e-3]].join("-"),f=b[l][f]);break;case "a":l=12>a.getHours()?"am":"pm";f=c[l]||b["dayPeriods-format-wide-"+l];break;case "h":case "H":case "K":case "k":h=a.getHours();switch(l){case "h":f= +h%12||12;break;case "H":f=h;break;case "K":f=h%12;break;case "k":f=h||24}h=!0;break;case "m":f=a.getMinutes();h=!0;break;case "s":f=a.getSeconds();h=!0;break;case "S":f=Math.round(a.getMilliseconds()*Math.pow(10,e-3));h=!0;break;case "v":case "z":if(f=g._getZone(a,!0,c))break;e=4;case "Z":l=g._getZone(a,!1,c);l=[0>=l?"+":"-",q.pad(Math.floor(Math.abs(l)/60),2),q.pad(Math.abs(l)%60,2)];4==e&&(l.splice(0,0,"GMT"),l.splice(3,0,":"));f=l.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+ +d);}h&&(f=q.pad(f,e));return f})}function c(a,b,c,d){var e=function(a){return a};b=b||e;c=c||e;d=d||e;var f=a.match(/(''|[^'])+/g),g="'"==a.charAt(0);p.forEach(f,function(a,d){a?(f[d]=(g?c:b)(a.replace(/''/g,"'")),g=!g):f[d]=""});return d(f.join(""))}function l(a,b,c,d){d=h.escapeString(d);c.strict||(d=d.replace(" a"," ?a"));return d.replace(/([a-z])\1*/ig,function(d){var e;e=d.charAt(0);var f=d.length,g="",h="";c.strict?(1a)a=Number(a),d=""+(new Date).getFullYear(),g=100*d.substring(0,2),d=Math.min(Number(d.substring(2,4))+20,99),l[0]=ad?l[3]=d+12:"a"===n&&12==d&&(l[3]=0);d=new Date(l[0],l[1],l[2],l[3],l[4],l[5],l[6]);b.strict&&d.setFullYear(l[0]);var q=e.join(""),r=-1!=q.indexOf("d"), +q=-1!=q.indexOf("M");if(!c||q&&d.getMonth()>l[1]||r&&d.getDate()>l[2])return null;if(q&&d.getMonth()=c.start&&d<=c.end};g._getDayOfYear=function(a){return k.difference(new Date(a.getFullYear(),0,1,a.getHours()),a)+1};g._getWeekOfYear=function(a,b){1==arguments.length&&(b=0);var c=(new Date(a.getFullYear(),0,1)).getDay(),d=Math.floor((g._getDayOfYear(a)+ +(c-b+7)%7-1)/7);c==b&&d++;return d};return g})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(f,p,k,n,e,h){return p("dijit.tree._dndContainer",null,{constructor:function(p,d){this.tree=p;this.node=p.domNode;n.mixin(this,d);this.containerState="";k.add(this.node,"dojoDndContainer");this.events=[e(this.node,h.enter,n.hitch(this,"onOverEvent")),e(this.node,h.leave,n.hitch(this,"onOutEvent")),f.after(this.tree, +"_onNodeMouseEnter",n.hitch(this,"onMouseOver"),!0),f.after(this.tree,"_onNodeMouseLeave",n.hitch(this,"onMouseOut"),!0),e(this.node,"dragstart, selectstart",function(b){b.preventDefault()})]},destroy:function(){for(var e;e=this.events.pop();)e.remove();this.node=this.parent=null},onMouseOver:function(e){this.current=e},onMouseOut:function(){this.current=null},_changeState:function(e,d){var b="dojoDnd"+e,a=e.toLowerCase()+"State";k.replace(this.node,b+d,b+this[a]);this[a]=d},_addItemClass:function(e, +d){k.add(e,"dojoDndItem"+d)},_removeItemClass:function(e,d){k.remove(e,"dojoDndItem"+d)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"dijit/_base/wai":function(){define(["dojo/dom-attr","dojo/_base/lang","../main","../hccss"],function(f,p,k){p.mixin(k,{hasWaiRole:function(f,e){var h=this.getWaiRole(f);return e?-1b[g]?1:b[g]> +a[g]?-1:0})}e.onFetch&&(c=e.onFetch.call(this,c,e));f.forEach(c,function(a){this._addOptionForItem(a)},this);this._queryRes.observe&&(this._observeHandle=this._queryRes.observe(b.hitch(this,function(a,b,c){b==c?this._onSetItem(a):(-1!=b&&this._onDeleteItem(a),-1!=c&&this._onNewItem(a))}),!0));this._loadingStore=!1;this.set("value","_pendingValue"in this?this._pendingValue:d);delete this._pendingValue;this.loadChildrenOnOpen?this._pseudoLoadChildren(c):this._loadChildren();this.onLoadDeferred.resolve(!0); +this.onSetStore()}),b.hitch(this,function(a){console.error("dijit.form.Select: "+a.toString());this.onLoadDeferred.reject(a)})));return g},_setValueAttr:function(a,c){this._onChangeActive||(c=null);if(this._loadingStore)this._pendingValue=a;else if(null!=a){a=b.isArrayLike(a)?f.map(a,function(a){return b.isObject(a)?a:{value:a}}):b.isObject(a)?[a]:[{value:a}];a=f.filter(this.getOptions(a),function(a){return a&&a.value});var d=this.getOptions()||[];if(!this.multiple&&(!a[0]||!a[0].value)&&d.length)a[0]= +d[0];f.forEach(d,function(b){b.selected=f.some(a,function(a){return a.value===b.value})});d=f.map(a,function(a){return a.value});if(!("undefined"==typeof d||"undefined"==typeof d[0])){var e=f.map(a,function(a){return a.label});this._setDisplay(this.multiple?e:e[0]);this.inherited(arguments,[this.multiple?d:d[0],c]);this._updateSelection()}}},_getDisplayedValueAttr:function(){var a=f.map([].concat(this.get("selectedOptions")),function(a){return a&&"label"in a?a.label:a?a.value:null},this);return this.multiple? +a:a[0]},_setDisplayedValueAttr:function(a){this.set("value",this.getOptions("string"==typeof a?{label:a}:a))},_loadChildren:function(){this._loadingStore||(f.forEach(this._getChildren(),function(a){a.destroyRecursive()}),f.forEach(this.options,this._addOptionItem,this),this._updateSelection())},_updateSelection:function(){this.focusedChild=null;this._set("value",this._getValueFromOpts());var a=[].concat(this.value);if(a&&a[0]){var b=this;f.forEach(this._getChildren(),function(c){var d=f.some(a,function(a){return c.option&& +a===c.option.value});d&&!b.multiple&&(b.focusedChild=c);q.toggle(c.domNode,this.baseClass.replace(/\s+|$/g,"SelectedOption "),d);c.domNode.setAttribute("aria-selected",d?"true":"false")},this)}},_getValueFromOpts:function(){var a=this.getOptions()||[];if(!this.multiple&&a.length){var b=f.filter(a,function(a){return a.selected})[0];if(b&&b.value)return b.value;a[0].selected=!0;return a[0].value}return this.multiple?f.map(f.filter(a,function(a){return a.selected}),function(a){return a.value})||[]:""}, +_onNewItem:function(a,b){(!b||!b.parent)&&this._addOptionForItem(a)},_onDeleteItem:function(a){this.removeOption({value:this.store.getIdentity(a)})},_onSetItem:function(a){this.updateOption(this._getOptionObjForItem(a))},_getOptionObjForItem:function(a){var b=this.store,c=this.labelAttr&&this.labelAttr in a?a[this.labelAttr]:b.getLabel(a);return{value:c?b.getIdentity(a):null,label:c,item:a}},_addOptionForItem:function(a){var b=this.store;b.isItemLoaded&&!b.isItemLoaded(a)?b.loadItem({item:a,onItem:function(a){this._addOptionForItem(a)}, +scope:this}):(a=this._getOptionObjForItem(a),this.addOption(a))},constructor:function(a){this._oValue=(a||{}).value||null;this._notifyConnections=[]},buildRendering:function(){this.inherited(arguments);h.setSelectable(this.focusNode,!1)},_fillContent:function(){this.options||(this.options=this.srcNodeRef?a("\x3e *",this.srcNodeRef).map(function(a){return"separator"===a.getAttribute("type")?{value:"",label:"",selected:!1,disabled:!1}:{value:a.getAttribute("data-"+d._scopeName+"-value")||a.getAttribute("value"), +label:String(a.innerHTML),selected:a.getAttribute("selected")||!1,disabled:a.getAttribute("disabled")||!1}},this):[]);this.value?this.multiple&&"string"==typeof this.value&&this._set("value",this.value.split(",")):this._set("value",this._getValueFromOpts())},postCreate:function(){this.inherited(arguments);k.after(this,"onChange",b.hitch(this,"_updateSelection"));var a=this.store;if(a&&(a.getIdentity||a.getFeatures()["dojo.data.api.Identity"]))this.store=null,this._deprecatedSetStore(a,this._oValue, +{query:this.query,queryOptions:this.queryOptions});this._storeInitialized=!0},startup:function(){this._loadChildren();this.inherited(arguments)},destroy:function(){for(var a;a=this._notifyConnections.pop();)a.remove();this._queryRes&&this._queryRes.close&&this._queryRes.close();this._observeHandle&&this._observeHandle.remove&&(this._observeHandle.remove(),this._observeHandle=null);this.inherited(arguments)},_addOptionItem:function(){},_removeOptionItem:function(){},_setDisplay:function(){},_getChildren:function(){return[]}, +_getSelectedOptionsAttr:function(){return this.getOptions({selected:!0})},_pseudoLoadChildren:function(){},onSetStore:function(){}})})},"dijit/form/Select":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/sniff ./_FormSelectWidget ../_HasDropDown ../DropDownMenu ../MenuItem ../MenuSeparator ../Tooltip ../_KeyNavMixin ../registry dojo/text!./templates/Select.html dojo/i18n!./nls/validate".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m,t,w,u){function v(a){return function(b){this._isLoaded?this.inherited(a,arguments):this.loadDropDown(d.hitch(this,a,b))}}var x=p("dijit.form._SelectMenu",g,{autoFocus:!0,buildRendering:function(){this.inherited(arguments);this.domNode.setAttribute("role","listbox")},postCreate:function(){this.inherited(arguments);this.own(b(this.domNode,"selectstart",function(a){a.preventDefault();a.stopPropagation()}))},focus:function(){var a=!1,b=this.parentWidget.value; +d.isArray(b)&&(b=b[b.length-1]);b&&f.forEach(this.parentWidget._getChildren(),function(c){c.option&&b===c.option.value&&(a=!0,this.focusChild(c,!1))},this);a||this.inherited(arguments)}});e=p("dijit.form.Select"+(a("dojo-bidi")?"_NoBidi":""),[c,l,t],{baseClass:"dijitSelect dijitValidationTextBox",templateString:u,_buttonInputDisabled:a("ie")?"disabled":"",required:!1,state:"",message:"",tooltipPosition:[],emptyLabel:"\x26#160;",_isLoaded:!1,_childrenLoaded:!1,labelType:"html",_fillContent:function(){this.inherited(arguments); +if(this.options.length&&!this.value&&this.srcNodeRef){var a=this.srcNodeRef.selectedIndex||0;this._set("value",this.options[0<=a?a:0].value)}this.dropDown=new x({id:this.id+"_menu",parentWidget:this});n.add(this.dropDown.domNode,this.baseClass.replace(/\s+|$/g,"Menu "))},_getMenuItemForOption:function(a){if(!a.value&&!a.label)return new r({ownerDocument:this.ownerDocument});var b=d.hitch(this,"_setValueAttr",a);a=new s({option:a,label:("text"===this.labelType?(a.label||"").toString().replace(/&/g, +"\x26amp;").replace(/a?"previousSibling":"nextSibling"])&&"getAttribute"in b){var c=q.byNode(b);if(c)return c}return null}})})},"dijit/form/_ListBase":function(){define(["dojo/_base/declare","dojo/on","dojo/window"],function(f,p,k){return f("dijit.form._ListBase",null,{selected:null,_listConnect:function(f,e){var h=this;return h.own(p(h.containerNode,p.selector(function(e,d,b){return e.parentNode== +b},f),function(f){h[e](f,this)}))},selectFirstNode:function(){for(var f=this.containerNode.firstChild;f&&"none"==f.style.display;)f=f.nextSibling;this._setSelectedAttr(f,!0)},selectLastNode:function(){for(var f=this.containerNode.lastChild;f&&"none"==f.style.display;)f=f.previousSibling;this._setSelectedAttr(f,!0)},selectNextNode:function(){var f=this.selected;if(f){for(f=f.nextSibling;f&&"none"==f.style.display;)f=f.nextSibling;f?this._setSelectedAttr(f,!0):this.selectFirstNode()}else this.selectFirstNode()}, +selectPreviousNode:function(){var f=this.selected;if(f){for(f=f.previousSibling;f&&"none"==f.style.display;)f=f.previousSibling;f?this._setSelectedAttr(f,!0):this.selectLastNode()}else this.selectLastNode()},_setSelectedAttr:function(f,e){if(this.selected!=f){var h=this.selected;if(h)this.onDeselect(h);f&&(e&&k.scrollIntoView(f),this.onSelect(f));this._set("selected",f)}else if(f)this.onSelect(f)}})})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "), +function(f,p,k,n,e,h,q,d){p("dijit-legacy-requires")&&n(0,function(){require(["dijit/form/_FormValueWidget"])});return f("dijit.form._FormWidget",[e,q,h,d],{setDisabled:function(b){k.deprecated("setDisabled("+b+") is deprecated. Use set('disabled',"+b+") instead.","","2.0");this.set("disabled",b)},setValue:function(b){k.deprecated("dijit.form._FormWidget:setValue("+b+") is deprecated. Use set('value',"+b+") instead.","","2.0");this.set("value",b)},getValue:function(){k.deprecated(this.declaredClass+ +"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name&&!p("msapp")?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(f,p,k,n){var e=f.Color=function(e){e&&this.setColor(e)};e.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255, +0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:n.transparentColor||[0,0,0,0]};p.extend(e,{r:255,g:255,b:255,a:1,_set:function(e,f,d,b){this.r=e;this.g=f;this.b=d;this.a=b},setColor:function(f){p.isString(f)?e.fromString(f,this):p.isArray(f)?e.fromArray(f,this):(this._set(f.r,f.g,f.b,f.a),f instanceof e||this.sanitize());return this},sanitize:function(){return this}, +toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+k.map(["r","g","b"],function(e){e=this[e].toString(16);return 2>e.length?"0"+e:e},this).join("")},toCss:function(e){var f=this.r+", "+this.g+", "+this.b;return(e?"rgba("+f+", "+this.a:"rgb("+f)+")"},toString:function(){return this.toCss(!0)}});e.blendColors=f.blendColors=function(f,n,d,b){var a=b||new e;k.forEach(["r","g","b","a"],function(b){a[b]=f[b]+(n[b]-f[b])*d;"a"!= +b&&(a[b]=Math.round(a[b]))});return a.sanitize()};e.fromRgb=f.colorFromRgb=function(f,k){var d=f.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return d&&e.fromArray(d[1].split(/\s*,\s*/),k)};e.fromHex=f.colorFromHex=function(f,n){var d=n||new e,b=4==f.length?4:8,a=(1<>=b;d[c]=4==b?17*e:e});d.a=1;return d};e.fromArray=f.colorFromArray=function(f,k){var d=k||new e;d._set(Number(f[0]),Number(f[1]), +Number(f[2]),Number(f[3]));isNaN(d.a)&&(d.a=1);return d.sanitize()};e.fromString=f.colorFromString=function(f,k){var d=e.named[f];return d&&e.fromArray(d,k)||e.fromRgb(f,k)||e.fromHex(f,k)};return e})},"dstore/Store":function(){define("dojo/_base/lang dojo/_base/array dojo/aspect dojo/has dojo/when dojo/Deferred dojo/_base/declare ./QueryMethod ./Filter dojo/Evented".split(" "),function(f,p,k,n,e,h,q,d,b,a){function c(a){return function(b,c){var d=this;e(b,function(b){b={target:b};var e=c[1]||{}; +"beforeId"in e&&(b.beforeId=e.beforeId);d.emit(a,b)});return b}}n.add("object-proto",!!{}.__proto__&&!{}.watch);var l=n("object-proto");return q(a,{constructor:function(b){b&&q.safeMixin(this,b);this.Model&&this.Model.createSubclass&&(this.Model=this.Model.createSubclass([]).extend({_store:this}));this.storage=new a;var d=this;this.autoEmitEvents&&(k.after(this,"add",c("add")),k.after(this,"put",c("update")),k.after(this,"remove",function(a,b){e(a,function(){d.emit("delete",{id:b[0]})});return a}))}, +autoEmitEvents:!0,idProperty:"id",queryAccessors:!0,getIdentity:function(a){return a.get?a.get(this.idProperty):a[this.idProperty]},_setIdentity:function(a,b){a.set?a.set(this.idProperty,b):a[this.idProperty]=b},forEach:function(a,b){var c=this;return e(this.fetch(),function(d){for(var e=0,f;void 0!==(f=d[e]);e++)a.call(b,f,e,c);return d})},on:function(a,b){return this.storage.on(a,b)},emit:function(a,b){b=b||{};b.type=a;try{return this.storage.emit(a,b)}finally{return b.cancelable}},parse:null,stringify:null, +Model:null,_restore:function(a,b){var c=this.Model;if(c&&a){var d=c.prototype,e=d._restore;e?a=e.call(a,c,b):l&&b?a.__proto__=d:a=f.delegate(d,a)}return a},create:function(a){return new this.Model(a)},_createSubCollection:function(a){var b=f.delegate(this.constructor.prototype),c;for(c in this)this._includePropertyInSubCollection(c,b)&&(b[c]=this[c]);return q.safeMixin(b,a)},_includePropertyInSubCollection:function(a,b){return!(a in b)||b[a]!==this[a]},queryLog:[],filter:new d({type:"filter",normalizeArguments:function(a){var b= +this.Filter;return a instanceof b?[a]:[new b(a)]}}),Filter:b,sort:new d({type:"sort",normalizeArguments:function(a,b){var c;"function"===typeof a?c=[a]:(c=a instanceof Array?a.slice():"object"===typeof a?[].slice.call(arguments):[{property:a,descending:b}],c=p.map(c,function(a){a=f.mixin({},a);a.descending=!!a.descending;return a}),c=[c]);return c}}),select:new d({type:"select"}),_getQuerierFactory:function(a){return this["_create"+(a[0].toUpperCase()+a.substr(1))+"Querier"]}})})},"dojo/errors/RequestError":function(){define(["./create"], +function(f){return f("RequestError",function(f,k){this.response=k})})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(f,p,k,n){var e=k.getObject("dojo.dnd",!0);e.getCopyKeyState=function(e){return e[f("mac")?"metaKey":"ctrlKey"]};e._uniqueId=0;e.getUniqueId=function(){var f;do f=p._scopeName+"Unique"+ ++e._uniqueId;while(n.byId(f));return f};e._empty={};e.isFormElement=function(e){e=e.target;3==e.nodeType&&(e=e.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+ +e.tagName.toLowerCase()+" ")};return e})},"dijit/CalendarLite":function(){define("dojo/_base/array dojo/_base/declare dojo/cldr/supplemental dojo/date dojo/date/locale dojo/date/stamp dojo/dom dojo/dom-class dojo/_base/lang dojo/on dojo/sniff dojo/string ./_WidgetBase ./_TemplatedMixin dojo/text!./templates/Calendar.html ./a11yclick ./hccss".split(" "),function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r){var m=p("dijit.CalendarLite",[g,s],{templateString:r,dowTemplateString:'\x3cth class\x3d"dijitReset dijitCalendarDayLabelTemplate" role\x3d"columnheader" scope\x3d"col"\x3e\x3cspan class\x3d"dijitCalendarDayLabel"\x3e${d}\x3c/span\x3e\x3c/th\x3e', +dateTemplateString:'\x3ctd class\x3d"dijitReset" role\x3d"gridcell" data-dojo-attach-point\x3d"dateCells"\x3e\x3cspan class\x3d"dijitCalendarDateLabel" data-dojo-attach-point\x3d"dateLabels"\x3e\x3c/span\x3e\x3c/td\x3e',weekTemplateString:'\x3ctr class\x3d"dijitReset dijitCalendarWeekTemplate" role\x3d"row"\x3e${d}${d}${d}${d}${d}${d}${d}\x3c/tr\x3e',value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",dayOffset:-1,currentFocus:new Date,_setSummaryAttr:"gridNode",baseClass:"dijitCalendar dijitCalendarLite", +_isValidDate:function(a){return a&&!isNaN(a)&&"object"==typeof a&&a.toString()!=this.constructor.prototype.value.toString()},_getValueAttr:function(){var a=this._get("value");if(a&&!isNaN(a)){var b=new this.dateClassObj(a);b.setHours(0,0,0,0);b.getDate()b&&(g-=7);if(!this.summary){var h=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,a);this.gridNode.setAttribute("summary",h[a.getMonth()])}this._date2cell={};f.forEach(this.dateCells,function(f,h){var l=h+g,k=new this.dateClassObj(a),m="dijitCalendar",n=0;l=b+c?(l=l-b-c+1,n=1,m+="Next"):(l=l-b+1,m+="Current");n&&(k=this.dateModule.add(k,"month",n));k.setDate(l);this.dateModule.compare(k,e,"date")||(m="dijitCalendarCurrentDate "+m);this.isDisabledDate(k,this.lang)?(m="dijitCalendarDisabledDate "+m,f.setAttribute("aria-disabled","true")):(m="dijitCalendarEnabledDate "+m,f.removeAttribute("aria-disabled"),f.setAttribute("aria-selected","false"));(n=this.getClassForDate(k,this.lang))&&(m=n+" "+m);f.className=m+"Month dijitCalendarDateTemplate"; +m=k.valueOf();this._date2cell[m]=f;f.dijitDateValue=m;this._setText(this.dateLabels[h],k.getDateLocalized?k.getDateLocalized(this.lang):k.getDate())},this)},_populateControls:function(){var a=new this.dateClassObj(this.currentFocus);a.setDate(1);this.monthWidget.set("month",a);var b=a.getFullYear()-1,c=new this.dateClassObj;f.forEach(["previous","current","next"],function(a){c.setFullYear(b++);this._setText(this[a+"YearLabelNode"],this.dateLocaleModule.format(c,{selector:"year",locale:this.lang}))}, +this)},goToToday:function(){this.set("value",new this.dateClassObj)},constructor:function(a){this.dateModule=a.datePackage?b.getObject(a.datePackage,!1):n;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=a.datePackage?b.getObject(a.datePackage+".locale",!1):e},_createMonthWidget:function(){return m._MonthWidget({id:this.id+"_mddb",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode)},buildRendering:function(){var a=this.dowTemplateString,b=this.dateLocaleModule.getNames("days", +this.dayWidth,"standAlone",this.lang),c=0<=this.dayOffset?this.dayOffset:k.getFirstDayOfWeek(this.lang);this.dayCellsHtml=l.substitute([a,a,a,a,a,a,a].join(""),{d:""},function(){return b[c++%7]});a=l.substitute(this.weekTemplateString,{d:this.dateTemplateString});this.dateRowsHtml=[a,a,a,a,a,a].join("");this.dateCells=[];this.dateLabels=[];this.inherited(arguments);q.setSelectable(this.domNode,!1);a=new this.dateClassObj(this.currentFocus);this.monthWidget=this._createMonthWidget();this.set("currentFocus", +a,!1)},postCreate:function(){this.inherited(arguments);this._connectControls()},_connectControls:function(){var c=b.hitch(this,function(c,d,e){this[c].dojoClick=!0;return a(this[c],"click",b.hitch(this,function(){this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,d,e))}))});this.own(c("incrementMonth","month",1),c("decrementMonth","month",-1),c("nextYearLabelNode","year",1),c("previousYearLabelNode","year",-1))},_setCurrentFocusAttr:function(a,b){var d=this.currentFocus,e=this._getNodeByDate(d); +a=this._patchDate(a);this._set("currentFocus",a);if(!this._date2cell||0!=this.dateModule.difference(d,a,"month"))this._populateGrid(),this._populateControls(),this._markSelectedDates([this.value]);d=this._getNodeByDate(a);d.setAttribute("tabIndex",this.tabIndex);(this.focused||b)&&d.focus();e&&e!=d&&(c("webkit")?e.setAttribute("tabIndex","-1"):e.removeAttribute("tabIndex"))},focus:function(){this._setCurrentFocusAttr(this.currentFocus,!0)},_onDayClick:function(a){a.stopPropagation();a.preventDefault(); +for(a=a.target;a&&!a.dijitDateValue;a=a.parentNode);a&&!d.contains(a,"dijitCalendarDisabledDate")&&this.set("value",a.dijitDateValue)},_getNodeByDate:function(a){return(a=this._patchDate(a))&&this._date2cell?this._date2cell[a.valueOf()]:null},_markSelectedDates:function(a){function c(a,b){d.toggle(b,"dijitCalendarSelectedDate",a);b.setAttribute("aria-selected",a?"true":"false")}f.forEach(this._selectedCells||[],b.partial(c,!1));this._selectedCells=f.filter(f.map(a,this._getNodeByDate,this),function(a){return a}); +f.forEach(this._selectedCells,b.partial(c,!0))},onChange:function(){},isDisabledDate:function(){},getClassForDate:function(){}});m._MonthWidget=p("dijit.CalendarLite._MonthWidget",g,{_setMonthAttr:function(a){var b=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,a),d=6==c("ie")?"":"\x3cdiv class\x3d'dijitSpacer'\x3e"+f.map(b,function(a){return"\x3cdiv\x3e"+a+"\x3c/div\x3e"}).join("")+"\x3c/div\x3e";this.domNode.innerHTML=d+"\x3cdiv class\x3d'dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'\x3e"+ +b[a.getMonth()]+"\x3c/div\x3e"}});return m})},"dijit/Viewport":function(){define(["dojo/Evented","dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(f,p,k,n,e){var h=new f,q;k(function(){var d=e.getBox();h._rlh=p(window,"resize",function(){var a=e.getBox();d.h==a.h&&d.w==a.w||(d=a,h.emit("resize"))});if(8==n("ie")){var b=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=b&&(b=screen.deviceXDPI,h.emit("resize"))},500)}n("ios")&&(p(document,"focusin",function(a){q=a.target}),p(document, +"focusout",function(a){q=null}))});h.getEffectiveBox=function(d){d=e.getBox(d);var b=q&&q.tagName&&q.tagName.toLowerCase();if(n("ios")&&q&&!q.readOnly&&("textarea"==b||"input"==b&&/^(color|email|number|password|search|tel|text|url)$/.test(q.type)))d.h*=0==orientation||180==orientation?0.66:0.4,b=q.getBoundingClientRect(),d.h=Math.max(d.h,b.top+b.height);return d};return h})},"dojo/topic":function(){define(["./Evented"],function(f){var p=new f;return{publish:function(f,n){return p.emit.apply(p,arguments)}, +subscribe:function(f,n){return p.on.apply(p,arguments)}}})},"dijit/_base/place":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/window","../place","../main"],function(f,p,k,n,e){var h={getViewport:function(){return k.getBox()}};h.placeOnScreen=n.at;h.placeOnScreenAroundElement=function(e,d,b,a){var c;if(p.isArray(b))c=b;else{c=[];for(var f in b)c.push({aroundCorner:f,corner:b[f]})}return n.around(e,d,c,!0,a)};h.placeOnScreenAroundNode=h.placeOnScreenAroundElement;h.placeOnScreenAroundRectangle= +h.placeOnScreenAroundElement;h.getPopupAroundAlignment=function(e,d){var b={};f.forEach(e,function(a){var c=d;switch(a){case "after":b[d?"BR":"BL"]=d?"BL":"BR";break;case "before":b[d?"BL":"BR"]=d?"BR":"BL";break;case "below-alt":c=!c;case "below":b[c?"BL":"BR"]=c?"TL":"TR";b[c?"BR":"BL"]=c?"TR":"TL";break;case "above-alt":c=!c;default:b[c?"TL":"TR"]=c?"BL":"BR",b[c?"TR":"TL"]=c?"BR":"BL"}});return b};p.mixin(e,h);return e})},"dijit/MenuSeparator":function(){define("dojo/_base/declare dojo/dom ./_WidgetBase ./_TemplatedMixin ./_Contained dojo/text!./templates/MenuSeparator.html".split(" "), +function(f,p,k,n,e,h){return f("dijit.MenuSeparator",[k,n,e],{templateString:h,buildRendering:function(){this.inherited(arguments);p.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/form/_ComboBoxMenu":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-style dojo/keys ../_WidgetBase ../_TemplatedMixin ./_ComboBoxMenuMixin ./_ListMouseMixin".split(" "),function(f,p,k,n,e,h,q,d){return f("dijit.form._ComboBoxMenu",[e,h,d,q],{templateString:"\x3cdiv class\x3d'dijitReset dijitMenu' data-dojo-attach-point\x3d'containerNode' style\x3d'overflow: auto; overflow-x: hidden;' role\x3d'listbox'\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point\x3d'previousButton' role\x3d'option'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuNextButton' data-dojo-attach-point\x3d'nextButton' role\x3d'option'\x3e\x3c/div\x3e\x3c/div\x3e", +baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);this.isLeftToRight()||(p.add(this.previousButton,"dijitMenuItemRtl"),p.add(this.nextButton,"dijitMenuItemRtl"));this.containerNode.setAttribute("role","listbox")},_createMenuItem:function(){var b=this.ownerDocument.createElement("div");b.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");b.setAttribute("role","option");return b},onHover:function(b){p.add(b,"dijitMenuItemHover")},onUnhover:function(b){p.remove(b, +"dijitMenuItemHover")},onSelect:function(b){p.add(b,"dijitMenuItemSelected")},onDeselect:function(b){p.remove(b,"dijitMenuItemSelected")},_page:function(b){var a=0,c=this.domNode.scrollTop,d=k.get(this.domNode,"height");for(this.getHighlightedOption()||this.selectNextNode();ab&&(b=this.length+b);this[b]&&a.push(this[b])},this);return a._stash(this)}});var w=b(d,r);f.query=b(d,function(a){return r(a)});w.load=function(a,c,d){q.load(a,c,function(a){d(b(a,r))})};f._filterQueryResult=w._filterResult=function(a,b,c){return new r(w.filter(a, +b,c))};f.NodeList=w.NodeList=r;return w})},"dijit/_base/focus":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/topic dojo/_base/window ../focus ../selection ../main".split(" "),function(f,p,k,n,e,h,q,d){h.focus=function(b){if(b){var a="node"in b?b.node:b,c=b.bookmark;b=b.openedForWindow;var f=c?c.isCollapsed:!1;if(a){var g="iframe"==a.tagName.toLowerCase()?a.contentWindow:a;if(g&&g.focus)try{g.focus()}catch(k){}h._onFocusNode(a)}if(c&&e.withGlobal(b||e.global,d.isCollapsed)&&!f){b&& +b.focus();try{e.withGlobal(b||e.global,d.moveToBookmark,null,[c])}catch(n){}}}};h.watch("curNode",function(b,a,c){d._curFocus=c;d._prevFocus=a;c&&n.publish("focusNode",c)});h.watch("activeStack",function(b,a,c){d._activeStack=c});h.on("widget-blur",function(b,a){n.publish("widgetBlur",b,a)});h.on("widget-focus",function(b,a){n.publish("widgetFocus",b,a)});k.mixin(d,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return d.getBookmark().isCollapsed},getBookmark:function(){return(e.global==window? +q:new q.SelectionManager(e.global)).getBookmark()},moveToBookmark:function(b){return(e.global==window?q:new q.SelectionManager(e.global)).moveToBookmark(b)},getFocus:function(b,a){var c=!h.curNode||b&&p.isDescendant(h.curNode,b.domNode)?d._prevFocus:h.curNode;return{node:c,bookmark:c&&c==h.curNode&&e.withGlobal(a||e.global,d.getBookmark),openedForWindow:a}},_activeStack:[],registerIframe:function(b){return h.registerIframe(b)},unregisterIframe:function(b){b&&b.remove()},registerWin:function(b,a){return h.registerWin(b, +a)},unregisterWin:function(b){b&&b.remove()}});return d})},"dgrid/OnDemandList":function(){define("./List ./_StoreMixin dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/on dojo/when ./util/misc".split(" "),function(f,p,k,n,e,h,q,d){return k([f,p],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:Infinity,bufferRows:10,farOffRemoval:2E3,queryRowsOverlap:0,pagingMethod:"debounce",pagingDelay:d.defaultDelay,keepScrollPosition:!1,rowHeight:0,postCreate:function(){this.inherited(arguments); +var b=this;h(this.bodyNode,"scroll",d[this.pagingMethod](function(a){b._processScroll(a)},null,this.pagingDelay))},renderQuery:function(b,a){var c=this,d=a&&a.container||this.contentNode,f={query:b,count:0},h,k=this.preload,m={node:e.create("div",{className:"dgrid-preload",style:{height:"0"}},d),count:0,query:b,next:f};m.node.rowIndex=0;f.node=h=e.create("div",{className:"dgrid-preload"},d);f.previous=m;h.rowIndex=this.minRowsPerPage;k?((f.next=k.next)&&h.offsetTop>=k.node.offsetTop?f.previous=k: +(f.next=k,f.previous=k.previous),f.previous.next=f,f.next.previous=f):this.preload=f;var p=e.create("div",{className:"dgrid-loading"},h,"before");e.create("div",{className:"dgrid-below"},p).innerHTML=this.loadingMessage;a=n.mixin({start:0,count:this.minRowsPerPage},"level"in b?{queryLevel:b.level}:null);return this._trackError(function(){var d=b(a);return c.renderQueryResults(d,h,a).then(function(b){return d.totalLength.then(function(d){var l=b.length,k=h.parentNode;c._rows&&(c._rows.min=0,c._rows.max= +l===d?Infinity:l-1);e.destroy(p);"queryLevel"in a||(c._total=d);0===d&&k&&(c.noDataNode&&e.destroy(c.noDataNode),c._insertNoDataNode(k));c._calcAverageRowHeight(b);d-=l;f.count=d;h.rowIndex=l;d?h.style.height=Math.min(d*c.rowHeight,c.maxEmptySpace)+"px":h.style.display="none";c._previousScrollPosition&&(c.scrollTo(c._previousScrollPosition),delete c._previousScrollPosition);return q(c._processScroll()).then(function(){return b})})}).otherwise(function(a){e.destroy(p);throw a;})})},refresh:function(b){var a= +this,c=b&&b.keepScrollPosition;"undefined"===typeof c&&(c=this.keepScrollPosition);c&&(this._previousScrollPosition=this.getScrollPosition());this.inherited(arguments);if(this._renderedCollection)return this.renderQuery(function(b){return a._renderedCollection.fetchRange({start:b.start,end:b.start+b.count})}).then(function(){a._emitRefreshComplete()})},resize:function(){this.inherited(arguments);this.rowHeight||this._calcAverageRowHeight(this.contentNode.getElementsByClassName("dgrid-row"));this._processScroll()}, +cleanup:function(){this.inherited(arguments);this.preload=null},renderQueryResults:function(b){var a=this.inherited(arguments),c=this._renderedCollection;c&&c.releaseRange&&a.then(function(a){a[0]&&!a[0].parentNode.tagName&&b.totalLength.then(function(){c.releaseRange(a[0].rowIndex,a[a.length-1].rowIndex+1)})});return a},_getFirstRowSibling:function(b){return b.lastChild},_calcRowHeight:function(b){var a=b.nextSibling;return a&&!/\bdgrid-preload\b/.test(a.className)?a.offsetTop-b.offsetTop:b.offsetHeight}, +_calcAverageRowHeight:function(b){for(var a=b.length,c=0,d=0;d2*k){for(var m,n=l[d],p=0,q=0,r=[],s=n&&n.rowIndex,t;m=n;){var u=f._calcRowHeight(m);if(p+u+k>b||0>n.className.indexOf("dgrid-row")&&0>n.className.indexOf("dgrid-loading"))break;n=m[d];p+=u;q+=m.count||1;f.removeRow(m,!0);r.push(m);"rowIndex"in m&&(t=m.rowIndex)}f._renderedCollection.releaseRange&& +("number"===typeof s&&"number"===typeof t)&&(h?f._renderedCollection.releaseRange(t,s+1):f._renderedCollection.releaseRange(s,t+1),f._rows[h?"max":"min"]=t,f._rows.max>=f._total-1&&(f._rows.max=Infinity));a.count+=q;h?(l.rowIndex-=q,c(a)):l.style.height=l.offsetHeight+p+"px";var A=document.createElement("div");for(a=r.length;a--;)A.appendChild(r[a]);setTimeout(function(){e.destroy(A)},1)}}function c(a,b){a.node.style.height=Math.min(a.count*f.rowHeight,b?Infinity:f.maxEmptySpace)+"px"}function d(a, +b){do a=b?a.next:a.previous;while(a&&!a.node.offsetWidth);return a}if(this.rowHeight){var f=this,h=f.bodyNode;b=b&&b.scrollTop||this.getScrollPosition().y;var h=h.offsetHeight+b,k,m,n=f.preload,p=f.lastScrollTop,q=f.bufferRows*f.rowHeight,v=q-f.rowHeight,x,z=!0;for(f.lastScrollTop=b;n&&!n.node.offsetWidth;)n=n.previous;for(;n&&n!==k;){k=f.preload;f.preload=n;m=n.node;var y=m.offsetTop;if(h+1+vy+m.offsetHeight)n=d(n,z=!0);else{var y=((m.rowIndex?b-q:h)-y)/f.rowHeight,A= +(h-b+2*q)/f.rowHeight,B=Math.max(Math.min((b-p)*f.rowHeight,f.maxRowsPerPage/2),f.maxRowsPerPage/-2),A=A+Math.min(Math.abs(B),10);0===m.rowIndex&&(y-=A);y=Math.max(y,0);10>y&&(0b)&&n;if(M){var Q=n.previous;Q&&(a(Q,b-(Q.node.offsetTop+ +Q.node.offsetHeight),"nextSibling"),0f._total||0>E.count)){var G=e.create("div",{className:"dgrid-loading",style:{height:A*f.rowHeight+"px"}},H,"before");e.create("div",{className:"dgrid-"+(M?"below":"above"),innerHTML:f.loadingMessage},G);G.count=A;f._trackError(function(){(function(a,b,d){var h=n.query(E);x=f.renderQueryResults(h,a,E).then(function(k){var l=f._rows;l&&(!("queryLevel"in E)&&k.length)&&(b?(l.max<=l.min&&(l.min=k[0].rowIndex), +l.max=k[k.length-1].rowIndex):(l.max<=l.min&&(l.max=k[k.length-1].rowIndex),l.min=k[0].rowIndex));H=a.nextSibling;e.destroy(a);d&&(H&&H.offsetWidth)&&(l=f.getScrollPosition(),f.scrollTo({x:l.x,y:l.y+H.offsetTop-d,preserveMomentum:!0}));h.totalLength.then(function(a){"queryLevel"in E||(f._total=a,f._rows&&f._rows.max>=f._total-1&&(f._rows.max=Infinity));b&&(b.count=a-b.node.rowIndex,c(b))});f._processScroll();return k},function(b){e.destroy(a);throw b;})})(G,M,L)});n=n.previous}}}}return x}}})})}, +"dijit/a11y":function(){define("dojo/_base/array dojo/dom dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/sniff ./main".split(" "),function(f,p,k,n,e,h,q){var d={_isElementShown:function(b){var a=n.get(b);return"hidden"!=a.visibility&&"collapsed"!=a.visibility&&"none"!=a.display&&"hidden"!=k.get(b,"type")},hasDefaultTabStop:function(b){switch(b.nodeName.toLowerCase()){case "a":return k.has(b,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var a; +try{var c=b.contentDocument;if("designMode"in c&&"on"==c.designMode)return!0;a=c.body}catch(d){try{a=b.contentWindow.document.body}catch(e){return!1}}return a&&("true"==a.contentEditable||a.firstChild&&"true"==a.firstChild.contentEditable);default:return"true"==b.contentEditable}},effectiveTabIndex:function(b){return k.get(b,"disabled")?void 0:k.has(b,"tabIndex")?+k.get(b,"tabIndex"):d.hasDefaultTabStop(b)?0:void 0},isTabNavigable:function(b){return 0<=d.effectiveTabIndex(b)},isFocusable:function(b){return-1<= +d.effectiveTabIndex(b)},_getTabNavigable:function(b){function a(a){return a&&"input"==a.tagName.toLowerCase()&&a.type&&"radio"==a.type.toLowerCase()&&a.name&&a.name.toLowerCase()}var c,e,f,n,p,m,q={},w=d._isElementShown,u=d.effectiveTabIndex,v=function(b){for(b=b.firstChild;b;b=b.nextSibling)if(!(1!=b.nodeType||9>=h("ie")&&"HTML"!==b.scopeName||!w(b))){var d=u(b);if(0<=d){if(0==d)c||(c=b),e=b;else if(0=m)m=d,p=b}d=a(b);k.get(b,"checked")&&d&&(q[d]=b)}"SELECT"!=b.nodeName.toUpperCase()&& +v(b)}};w(b)&&v(b);return{first:q[a(c)]||c,last:q[a(e)]||e,lowest:q[a(f)]||f,highest:q[a(p)]||p}},getFirstInTabbingOrder:function(b,a){var c=d._getTabNavigable(p.byId(b,a));return c.lowest?c.lowest:c.first},getLastInTabbingOrder:function(b,a){var c=d._getTabNavigable(p.byId(b,a));return c.last?c.last:c.highest}};e.mixin(q,d);return d})},"cbtree/model/ForestStoreModel":function(){define("module dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/when ./_base/CheckedStoreModel ../errors/createError!../errors/CBTErrors.json".split(" "), +function(f,p,k,n,e,h,q){var d=q(f.id);return p([h],{rootId:"$root$",rootLabel:"ROOT",constructor:function(b){b={id:this.rootId,root:!0};var a=this.store;b[this.checkedAttr]=this.checkedState;b[this.labelAttr]=this.rootLabel||this.rootId;if(this._methods.queryEngine)this._rootQuery=a.queryEngine(this.query);else throw new d("MethodMissing","_createForestRoot","store has no query engine");this._forest=!0;this.root=b},getChildren:function(b,a,c){this._getChildren(b,function(a,b){return a==this.root? +this.store.query(this.query,this.options):this.store.getChildren(a,this.options)},a,c)},getParents:function(b){if(b&&b!=this.root){var a=this;return this.inherited(arguments).then(function(c){a.isChildOf(b,a.root)&&c.push(a.root);return c})}return(new n).resolve([])},mayHaveChildren:function(b){if(b&&b==this.root){var a=this.getIdentity(b);return!!this._childrenCache[a]}return this.inherited(arguments)},getIdentity:function(b){return b==this.root?this.root.id:this.store.getIdentity(b)},isChildOf:function(b, +a){return a&&b?a==this.root?this._rootQuery.matches?this._rootQuery.matches(b):!!this._rootQuery([b]).length:this.inherited(arguments):!1},_setValue:function(b,a,c){if(b[a]!==c)if(b==this.root){var d=k.mixin(null,b);b[a]=c;this._onChange(b,d)}else this.inherited(arguments);return c},_onSetItem:function(b,a,c,d){if(this.query&&a in this.query){var f=this;e(this._childrenCache[this.root.id],function(a){a=a?a.indexOf(b):-1;var c=f.isChildOf(b,f.root);if(c!=-1a?"0"+ +a:a});if(b.valueOf()!==b)return p(b.valueOf(),a,c);var g=h?a+h:"",n=h?" ":"",r=h?"\n":"";if(b instanceof Array){var n=b.length,m=[];for(c=0;cH+1E3)&&d.call(this,a)});return{remove:function(){e.remove();f.remove()}}}:function(b,c){return h(b,a,c)}}function l(a){do if(void 0!== +a.dojoClick)return a;while(a=a.parentNode)}function g(b,c,e){if(!d.isRight(b)){var f=l(b.target);if(u=!b.target.disabled&&f&&f.dojoClick)if(x=(v="useTarget"==u)?f:b.target,v&&b.preventDefault(),z=b.changedTouches?b.changedTouches[0].pageX-a.global.pageXOffset:b.clientX,y=b.changedTouches?b.changedTouches[0].pageY-a.global.pageYOffset:b.clientY,A=("object"==typeof u?u.x:"number"==typeof u?u:0)||4,B=("object"==typeof u?u.y:"number"==typeof u?u:0)||4,!w){w=!0;var g=function(b){u=v?k.isDescendant(a.doc.elementFromPoint(b.changedTouches? +b.changedTouches[0].pageX-a.global.pageXOffset:b.clientX,b.changedTouches?b.changedTouches[0].pageY-a.global.pageYOffset:b.clientY),x):u&&(b.changedTouches?b.changedTouches[0].target:b.target)==x&&Math.abs((b.changedTouches?b.changedTouches[0].pageX-a.global.pageXOffset:b.clientX)-z)<=A&&Math.abs((b.changedTouches?b.changedTouches[0].pageY-a.global.pageYOffset:b.clientY)-y)<=B};a.doc.addEventListener(c,function(a){d.isRight(a)||(g(a),v&&a.preventDefault())},!0);a.doc.addEventListener(e,function(a){if(!d.isRight(a)&& +(g(a),u)){E=(new Date).getTime();var b=v?x:a.target;"LABEL"===b.tagName&&(b=k.byId(b.getAttribute("for"))||b);var c=a.changedTouches?a.changedTouches[0]:a,e=function(b){var d=document.createEvent("MouseEvents");d._dojo_click=!0;d.initMouseEvent(b,!0,!0,a.view,a.detail,c.screenX,c.screenY,c.clientX,c.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null);return d},f=e("mousedown"),l=e("mouseup"),m=e("click");setTimeout(function(){h.emit(b,"mousedown",f);h.emit(b,"mouseup",l);h.emit(b,"click",m);E= +(new Date).getTime()},0)}},!0);b=function(b){a.doc.addEventListener(b,function(a){var c=a.target;u&&(!a._dojo_click&&(new Date).getTime()<=E+1E3&&!("INPUT"==c.tagName&&n.contains(c,"dijitOffScreen")))&&(a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),"click"==b&&(("INPUT"!=c.tagName||"radio"==c.type&&(n.contains(c,"dijitCheckBoxInput")||n.contains(c,"mblRadioButton"))||"checkbox"==c.type&&(n.contains(c,"dijitCheckBoxInput")||n.contains(c,"mblCheckBox")))&&"TEXTAREA"!= +c.tagName&&"AUDIO"!=c.tagName&&"VIDEO"!=c.tagName)&&a.preventDefault())},!0)};b("click");b("mousedown");b("mouseup")}}}var s=5>q("ios"),r=q("pointer-events")||q("MSPointer"),m=function(){var a={},b;for(b in{down:1,move:1,up:1,cancel:1,over:1,out:1})a[b]=q("MSPointer")?"MSPointer"+b.charAt(0).toUpperCase()+b.slice(1):"pointer"+b;return a}(),t=q("touch-events"),w,u,v=!1,x,z,y,A,B,E,H,L;q("touch")&&(r?b(function(){a.doc.addEventListener(m.down,function(a){g(a,m.move,m.up)},!0)}):b(function(){function b(a){var c= +e.delegate(a,{bubbles:!0});6<=q("ios")&&(c.touches=a.touches,c.altKey=a.altKey,c.changedTouches=a.changedTouches,c.ctrlKey=a.ctrlKey,c.metaKey=a.metaKey,c.shiftKey=a.shiftKey,c.targetTouches=a.targetTouches);return c}L=a.body();a.doc.addEventListener("touchstart",function(a){H=(new Date).getTime();var b=L;L=a.target;h.emit(b,"dojotouchout",{relatedTarget:L,bubbles:!0});h.emit(L,"dojotouchover",{relatedTarget:b,bubbles:!0});g(a,"touchmove","touchend")},!0);h(a.doc,"touchmove",function(c){H=(new Date).getTime(); +var d=a.doc.elementFromPoint(c.pageX-(s?0:a.global.pageXOffset),c.pageY-(s?0:a.global.pageYOffset));d&&(L!==d&&(h.emit(L,"dojotouchout",{relatedTarget:d,bubbles:!0}),h.emit(d,"dojotouchover",{relatedTarget:L,bubbles:!0}),L=d),h.emit(d,"dojotouchmove",b(c))||c.preventDefault())});h(a.doc,"touchend",function(c){H=(new Date).getTime();var d=a.doc.elementFromPoint(c.pageX-(s?0:a.global.pageXOffset),c.pageY-(s?0:a.global.pageYOffset))||a.body();h.emit(d,"dojotouchend",b(c))})}));p={press:c("mousedown", +"touchstart",m.down),move:c("mousemove","dojotouchmove",m.move),release:c("mouseup","dojotouchend",m.up),cancel:c(d.leave,"touchcancel",r?m.cancel:null),over:c("mouseover","dojotouchover",m.over),out:c("mouseout","dojotouchout",m.out),enter:d._eventHandler(c("mouseover","dojotouchover",m.over)),leave:d._eventHandler(c("mouseout","dojotouchout",m.out))};return f.touch=p})},"dojo/fx":function(){define("./_base/lang ./Evented ./_base/kernel ./_base/array ./aspect ./_base/fx ./dom ./dom-style ./dom-geometry ./ready require".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c){k.isAsync||a(0,function(){c(["./fx/Toggler"])});k=k.fx={};a={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}};var l=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;n.forEach(this._animations,function(a){a&&("undefined"!=typeof a.duration&&(this.duration+=a.duration),a.delay&&(this.duration+=a.delay))},this)};l.prototype=new p;f.extend(l,{_onAnimate:function(){this._fire("onAnimate", +arguments)},_onEnd:function(){this._onAnimateCtx.remove();this._onEndCtx.remove();this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=e.after(this._current,"onAnimate",f.hitch(this,"_onAnimate"),!0),this._onEndCtx=e.after(this._current,"onEnd",f.hitch(this,"_onEnd"),!0),this._current.play(0,!0))},play:function(a,b){this._current||(this._current=this._animations[this._index=0]);if(!b&&"playing"== +this._current.status())return this;var c=e.after(this._current,"beforeBegin",f.hitch(this,function(){this._fire("beforeBegin")}),!0),d=e.after(this._current,"onBegin",f.hitch(this,function(a){this._fire("onBegin",arguments)}),!0),g=e.after(this._current,"onPlay",f.hitch(this,function(a){this._fire("onPlay",arguments);c.remove();d.remove();g.remove()}));this._onAnimateCtx&&this._onAnimateCtx.remove();this._onAnimateCtx=e.after(this._current,"onAnimate",f.hitch(this,"_onAnimate"),!0);this._onEndCtx&& +this._onEndCtx.remove();this._onEndCtx=e.after(this._current,"onEnd",f.hitch(this,"_onEnd"),!0);this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=e.after(this._current,"onPause",f.hitch(this,function(b){this._fire("onPause",arguments);a.remove()}),!0);this._current.pause()}return this},gotoPercent:function(a,b){this.pause();var c=this.duration*a;this._current=null;n.some(this._animations,function(a,b){if(c<=a.duration)return this._current=a,this._index= +b,!0;c-=a.duration;return!1},this);this._current&&this._current.gotoPercent(c/this._current.duration);b&&this.play();return this},stop:function(a){if(this._current){if(a){for(;this._index+1this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a, +b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,b){var c=this.duration*a;n.forEach(this._animations,function(a){a.gotoPercent(a.duration"file|submit|image|reset|button".indexOf(l)&&!a.disabled){var g=k,n=c, +a=e.fieldToObject(a);if(null!==a){var r=g[n];"string"==typeof r?g[n]=[r,a]:f.isArray(r)?r.push(a):g[n]=a}"image"==l&&(k[c+".x"]=k[c+".y"]=k[c].x=k[c].y=0)}}return k},toQuery:function(f){return k.objectToQuery(e.toObject(f))},toJson:function(f,k){return n.stringify(e.toObject(f),null,k?4:0)}};return e})},"dojo/request":function(){define(["./request/default!"],function(f){return f})},"dijit/form/HorizontalSlider":function(){define("dojo/_base/array dojo/_base/declare dojo/dnd/move dojo/_base/fx dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/dnd/Moveable dojo/dnd/Mover dojo/query dojo/mouse dojo/on ../_base/manager ../focus ../typematic ./Button ./_FormValueWidget ../_Container dojo/text!./templates/HorizontalSlider.html".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m,t,w,u,v,x){var z=p("dijit.form._SliderMover",c,{onMouseMove:function(a){var b=this.widget,c=b._abspos;c||(c=b._abspos=e.position(b.sliderBarContainer,!0),b._setPixelValue_=d.hitch(b,"_setPixelValue"),b._isReversed_=b._isReversed());a=a[b._mousePixelCoord]-c[b._startingPixelCoord];b._setPixelValue_(b._isReversed_?c[b._pixelCount]-a:a,c[b._pixelCount],!1)},destroy:function(a){c.prototype.destroy.apply(this,arguments);var b=this.widget;b._abspos=null;b._setValueAttr(b.value, +!0)}});k=p("dijit.form.HorizontalSlider",[u,v],{templateString:x,value:0,showButtons:!0,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:!0,slideDuration:r.defaultDuration,_setIdAttr:"",_setNameAttr:"valueNode",baseClass:"dijitSlider",cssStateNodes:{incrementButton:"dijitSliderIncrementButton",decrementButton:"dijitSliderDecrementButton",focusNode:"dijitSliderThumb"},_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_handleOffsetCoord:"left",_progressPixelSize:"width", +_onKeyUp:function(a){!this.disabled&&(!this.readOnly&&!a.altKey&&!a.ctrlKey&&!a.metaKey)&&this._setValueAttr(this.value,!0)},_onKeyDown:function(a){if(!this.disabled&&!this.readOnly&&!a.altKey&&!a.ctrlKey&&!a.metaKey){switch(a.keyCode){case q.HOME:this._setValueAttr(this.minimum,!1);break;case q.END:this._setValueAttr(this.maximum,!1);break;case this._descending||this.isLeftToRight()?q.RIGHT_ARROW:q.LEFT_ARROW:case !1===this._descending?q.DOWN_ARROW:q.UP_ARROW:case !1===this._descending?q.PAGE_DOWN: +q.PAGE_UP:this.increment(a);break;case this._descending||this.isLeftToRight()?q.LEFT_ARROW:q.RIGHT_ARROW:case !1===this._descending?q.UP_ARROW:q.DOWN_ARROW:case !1===this._descending?q.PAGE_UP:q.PAGE_DOWN:this.decrement(a);break;default:return}a.stopPropagation();a.preventDefault()}},_onHandleClick:function(a){!this.disabled&&!this.readOnly&&(b("ie")||m.focus(this.sliderHandle),a.stopPropagation(),a.preventDefault())},_isReversed:function(){return!this.isLeftToRight()},_onBarClick:function(a){if(!this.disabled&& +!this.readOnly&&this.clickSelect){m.focus(this.sliderHandle);a.stopPropagation();a.preventDefault();var b=e.position(this.sliderBarContainer,!0),c=a[this._mousePixelCoord]-b[this._startingPixelCoord];this._setPixelValue(this._isReversed()?b[this._pixelCount]-c:c,b[this._pixelCount],!0);this._movable.onMouseDown(a)}},_setPixelValue:function(a,b,c){if(!this.disabled&&!this.readOnly){var d=this.discreteValues;if(1>=d||Infinity==d)d=b;d--;a=Math.round(a/(b/d));this._setValueAttr(Math.max(Math.min((this.maximum- +this.minimum)*a/d+this.minimum,this.maximum),this.minimum),c)}},_setValueAttr:function(a,b){this._set("value",a);this.valueNode.value=a;this.focusNode.setAttribute("aria-valuenow",a);this.inherited(arguments);var c=this.maximum>this.minimum?(a-this.minimum)/(this.maximum-this.minimum):0,d=!1===this._descending?this.remainingBar:this.progressBar,e=!1===this._descending?this.progressBar:this.remainingBar;this._inProgressAnim&&"stopped"!=this._inProgressAnim.status&&this._inProgressAnim.stop(!0);if(b&& +0k&&(k=0-k),g[this._progressPixelSize]={start:h,end:100*c,units:"%"},this._inProgressAnim=n.animateProperty({node:d,duration:k,onAnimate:function(a){e.style[f._progressPixelSize]=100-parseFloat(a[f._progressPixelSize])+"%"},onEnd:function(){delete f._inProgressAnim},properties:g}),this._inProgressAnim.play())}else d.style[this._progressPixelSize]= +100*c+"%",e.style[this._progressPixelSize]=100*(1-c)+"%"},_bumpValue:function(a,b){if(!this.disabled&&!(this.readOnly||this.maximum<=this.minimum)){var c=h.getComputedStyle(this.sliderBarContainer),d=e.getContentBox(this.sliderBarContainer,c),c=this.discreteValues;if(1>=c||Infinity==c)c=d[this._pixelCount];c--;d=Math.round((this.value-this.minimum)*c/(this.maximum-this.minimum))+a;0>d&&(d=0);d>c&&(d=c);d=d*(this.maximum-this.minimum)/c+this.minimum;this._setValueAttr(d,b)}},_onClkBumper:function(a){!this.disabled&& +(!this.readOnly&&this.clickSelect)&&this._setValueAttr(a,!0)},_onClkIncBumper:function(){this._onClkBumper(!1===this._descending?this.minimum:this.maximum)},_onClkDecBumper:function(){this._onClkBumper(!1===this._descending?this.maximum:this.minimum)},decrement:function(a){this._bumpValue(a.keyCode==q.PAGE_DOWN?-this.pageIncrement:-1)},increment:function(a){this._bumpValue(a.keyCode==q.PAGE_UP?this.pageIncrement:1)},_mouseWheeled:function(a){this.focused&&(a.stopPropagation(),a.preventDefault(),this._bumpValue(0> +a.wheelDelta?-1:1,!0))},startup:function(){this._started||(f.forEach(this.getChildren(),function(a){this[a.container]!=this.containerNode&&this[a.container].appendChild(a.domNode)},this),this.inherited(arguments))},_typematicCallback:function(a,b,c){if(-1==a)this._setValueAttr(this.value,!0);else this[b==(this._descending?this.incrementButton:this.decrementButton)?"decrement":"increment"](c)},buildRendering:function(){this.inherited(arguments);this.showButtons&&(this.incrementButton.style.display= +"",this.decrementButton.style.display="");var a=l('label[for\x3d"'+this.id+'"]');a.length&&(a[0].id||(a[0].id=this.id+"_label"),this.focusNode.setAttribute("aria-labelledby",a[0].id));this.focusNode.setAttribute("aria-valuemin",this.minimum);this.focusNode.setAttribute("aria-valuemax",this.maximum)},postCreate:function(){this.inherited(arguments);this.showButtons&&this.own(t.addMouseListener(this.decrementButton,this,"_typematicCallback",25,500),t.addMouseListener(this.incrementButton,this,"_typematicCallback", +25,500));this.own(s(this.domNode,g.wheel,d.hitch(this,"_mouseWheeled")));var b=p(z,{widget:this});this._movable=new a(this.sliderHandle,{mover:b});this._layoutHackIE7()},destroy:function(){this._movable.destroy();this._inProgressAnim&&"stopped"!=this._inProgressAnim.status&&this._inProgressAnim.stop(!0);this.inherited(arguments)}});k._Mover=z;return k})},"dijit/Tree":function(){define("dojo/_base/array dojo/aspect dojo/cookie dojo/_base/declare dojo/Deferred dojo/promise/all dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/errors/create dojo/fx dojo/has dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/topic dojo/touch dojo/when ./a11yclick ./focus ./registry ./_base/manager ./_Widget ./_TemplatedMixin ./_Container ./_Contained ./_CssStateMixin ./_KeyNavMixin dojo/text!./templates/TreeNode.html dojo/text!./templates/Tree.html ./tree/TreeStoreModel ./tree/ForestStoreModel ./tree/_dndSelector dojo/query!css2".split(" "), +function(f,p,k,n,e,h,q,d,b,a,c,l,g,s,r,m,t,w,u,v,x,z,y,A,B,E,H,L,M,Q,G,J,F,D,C){function P(a){return m.delegate(a.promise||a,{addCallback:function(a){this.then(a)},addErrback:function(a){this.otherwise(a)}})}var N=n("dijit._TreeNode",[B,E,H,L,M],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(a){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=a;this._set("label",a);g("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text", +isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:G,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&this.labelNode.setAttribute("aria-expanded",this.isExpanded);this.setSelected(!1)},_setIndentAttr:function(b){var c=Math.max(b,0)*this.tree._nodePixelIndent+"px";a.set(this.domNode, +"backgroundPosition",c+" 0px");a.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",c);f.forEach(this.getChildren(),function(a){a.set("indent",b+1)});this._set("indent",b)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(a){var b=this.tree,c=b.model;b._v10Compat&&a===c.root&&(a=null);this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a, +"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(b,c,e){var f="_"+c+"Class";c+="Node";var g=this[f];this[f]=this.tree["get"+e+"Class"](b,this.isExpanded);d.replace(this[c],this[f]||"",g||"");a.set(this[c],this.tree["get"+e+"Style"](b,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent(),a=!a||!a.rowNode||"none"==a.rowNode.style.display;d.toggle(this.domNode,"dijitTreeIsRoot",a);d.toggle(this.domNode,"dijitTreeIsLast",!a&&!this.getNextSibling())},_setExpando:function(a){var b= +["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;d.replace(this.expandoNode,b[a],b);this.expandoNodeText.innerHTML=["*","-","+","*"][a]},expand:function(){if(this._expandDeferred)return P(this._expandDeferred);this._collapseDeferred&&(this._collapseDeferred.cancel(),delete this._collapseDeferred);this.isExpanded=!0;this.labelNode.setAttribute("aria-expanded","true");(this.tree.showRoot||this!==this.tree.rootNode)&& +this.containerNode.setAttribute("role","group");d.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","true");var a=l.wipeIn({node:this.containerNode,duration:A.defaultDuration}),b=this._expandDeferred=new e(function(){a.stop()});p.after(a,"onEnd",function(){b.resolve(!0)},!0);a.play();return P(b)},collapse:function(){if(this._collapseDeferred)return P(this._collapseDeferred); +this._expandDeferred&&(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;this.labelNode.setAttribute("aria-expanded","false");this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","false");d.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var a=l.wipeOut({node:this.containerNode,duration:A.defaultDuration}),b=this._collapseDeferred=new e(function(){a.stop()});p.after(a,"onEnd", +function(){b.resolve(!0)},!0);a.play();return P(b)},indent:0,setChildItems:function(a){var b=this.tree,c=b.model,d=[],e=b.focusedChild,g=this.getChildren();f.forEach(g,function(a){H.prototype.removeChild.call(this,a)},this);this.defer(function(){f.forEach(g,function(a){if(!a._destroyed&&!a.getParent()){b.dndController.removeTreeNode(a);var d=function(a){var e=c.getIdentity(a.item),g=b._itemNodesMap[e];1==g.length?delete b._itemNodesMap[e]:(e=f.indexOf(g,a),-1!=e&&g.splice(e,1));f.forEach(a.getChildren(), +d)};d(a);if(b.persist){var g=f.map(a.getTreePath(),function(a){return b.model.getIdentity(a)}).join("/"),h;for(h in b._openedNodes)h.substr(0,g.length)==g&&delete b._openedNodes[h];b._saveExpandedNodes()}b.lastFocusedChild&&!q.isDescendant(b.lastFocusedChild,b.domNode)&&delete b.lastFocusedChild;e&&!q.isDescendant(e,b.domNode)&&b.focus();a.destroyRecursive()}})});this.state="Loaded";a&&0=this._outstandingPaintOperations&&(!this._adjustWidthsTimer&&this._started)&&(this._adjustWidthsTimer=this.defer("_adjustWidths"))});v(a,b,b)},_adjustWidths:function(){this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);this.containerNode.style.width="auto";this.containerNode.style.width=this.domNode.scrollWidth>this.domNode.offsetWidth?"auto":"100%"},_createTreeNode:function(a){return new N(a)},focus:function(){this.lastFocusedChild? +this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});g("dojo-bidi")&&K.extend({_setTextDirAttr:function(a){a&&this.textDir!=a&&(this._set("textDir",a),this.rootNode.set("textDir",a))}});K.PathError=c("TreePathError");K._TreeNode=N;return K})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(f,p,k,n){return f("dijit.form._FormValueWidget",[k,n],{_layoutHackIE7:function(){if(7==p("ie"))for(var e=this.domNode, +f=e.parentNode,k=e.firstChild||e,d=k.style.filter,b=this;f&&0==f.clientHeight;)(function(){var a=b.connect(f,"onscroll",function(){b.disconnect(a);k.style.filter=(new Date).getMilliseconds();b.defer(function(){k.style.filter=d})})})(),f=f.parentNode}})})},"dgrid/Keyboard":function(){define("dojo/_base/declare dojo/aspect dojo/dom-class dojo/on dojo/_base/lang dojo/has ./util/misc dojo/_base/sniff".split(" "),function(f,p,k,n,e,h,q){function d(a){a.preventDefault()}var b={checkbox:1,radio:1,button:1}, +a=/\bdgrid-cell\b/,c=/\bdgrid-row\b/,l=f(null,{pageSkip:10,tabIndex:0,keyMap:null,headerKeyMap:null,postMixInProperties:function(){this.inherited(arguments);this.keyMap||(this.keyMap=e.mixin({},l.defaultKeyMap));this.headerKeyMap||(this.headerKeyMap=e.mixin({},l.defaultHeaderKeyMap))},postCreate:function(){function d(a){var c=a.target;return c.type&&(!b[c.type]||32===a.keyCode)}function e(b){function g(){f._focusedHeaderNode&&(f._focusedHeaderNode.tabIndex=-1);if(f.showHeader){if(k)for(var a=f.headerNode.getElementsByTagName("th"), +b=0,c;c=a[b];++b){if(l.test(c.className)){f._focusedHeaderNode=q=c;break}}else f._focusedHeaderNode=q=f.headerNode;q&&(q.tabIndex=f.tabIndex)}}function h(){var a=f._focusedNode||q;if(!l.test(a.className)||!b.contains(a)){for(var c=b.getElementsByTagName("*"),d=0,e;e=c[d];++d)if(l.test(e.className)){a=f._focusedNode=e;break}q.tabIndex=-1;a.tabIndex=f.tabIndex}}var k=f.cellNavigation,l=k?a:c,m=b===f.headerNode,q=b;m?(g(),p.after(f,"renderHeader",g,!0)):(p.after(f,"renderArray",h,!0),p.after(f,"_onNotification", +function(a,c){0===c.totalLength?b.tabIndex=0:1===c.totalLength&&"add"===c.type&&h()},!0));f._listeners.push(n(b,"mousedown",function(a){d(a)||f._focusOnNode(a.target,m,a)}));f._listeners.push(n(b,"keydown",function(a){if(!a.metaKey&&!a.altKey){var b=f[m?"headerKeyMap":"keyMap"][a.keyCode];b&&!d(a)&&b.call(f,a)}}))}this.inherited(arguments);var f=this;this.tabableHeader&&(e(this.headerNode),n(this.headerNode,"dgrid-cellfocusin",function(){f.scrollTo({x:this.scrollLeft})}));e(this.contentNode);this._debouncedEnsureScroll= +q.debounce(this._ensureScroll,this)},removeRow:function(a){if(!this._focusedNode)return this.inherited(arguments);var b=this,c=document.activeElement===this._focusedNode,d=this[this.cellNavigation?"cell":"row"](this._focusedNode),e=d.row||d,f;a=a.element||a;if(a===e.element){f=this.down(e,!0);if(!f||f.element===a)f=this.up(e,!0);this._removedFocus={active:c,rowId:e.id,columnId:d.column&&d.column.id,siblingId:!f||f.element===a?void 0:f.id};setTimeout(function(){b._removedFocus&&b._restoreFocus(e.id)}, +0);this._focusedNode=null}this.inherited(arguments)},insertRow:function(){var a=this.inherited(arguments);this._removedFocus&&!this._removedFocus.wait&&this._restoreFocus(a);return a},_restoreFocus:function(a){var b=this._removedFocus,c;if((a=(a=a&&this.row(a))&&a.element&&a.id===b.rowId?a:"undefined"!==typeof b.siblingId&&this.row(b.siblingId))&&a.element){if(!a.element.parentNode.parentNode){b.wait=!0;return}"undefined"!==typeof b.columnId&&(c=this.cell(a,b.columnId))&&c.element&&(a=c);b.active&& +0!==a.element.offsetHeight?this._focusOnNode(a,!1,null):(k.add(a.element,"dgrid-focus"),a.element.tabIndex=this.tabIndex,this._focusedNode=a.element)}delete this._removedFocus},addKeyHandler:function(a,b,c){return p.after(this[c?"headerKeyMap":"keyMap"],a,b,!0)},_ensureRowScroll:function(a){var b=this.getScrollPosition().y;b>a.offsetTop?this.scrollTo({y:a.offsetTop}):b+this.contentNode.offsetHeightc)this.scrollTo({x:c});else{var d=this.bodyNode.clientWidth;a=a.offsetWidth;var e=c+a;b+da?e-d:c})}},_ensureScroll:function(a,b){this.cellNavigation&&((this.columnSets||1k.className.indexOf("dgrid-row");)k=k[(b?"next":"previous")+"Sibling"];if(!k)return}!g||1>d.offsetHeight?(c&&(k=this.cell(k,this.cell(a).column.id)),this._focusOnNode(k,!1,a)):(h("dom-addeventlistener")||(a=e.mixin({},a)),l=p.after(this,"renderArray",function(d){var e=d[b?0:d.length-1];c&&(e=this.cell(e,this.cell(a).column.id));this._focusOnNode(e,!1,a);l.remove();return d}))},y=l.moveFocusHome=function(a){z.call(this,a,!0)};l.defaultKeyMap= +{32:d,33:r,34:m,35:z,36:y,37:w,38:f,39:u,40:s};l.defaultHeaderKeyMap={32:d,35:v,36:x,37:w,39:u};return l})},"url:dijit/templates/Menu.html":'\x3ctable class\x3d"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role\x3d"menu" tabIndex\x3d"${tabIndex}"\n\t cellspacing\x3d"0"\x3e\n\t\x3ctbody class\x3d"dijitReset" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/tbody\x3e\n\x3c/table\x3e\n',"url:dijit/templates/TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"contentNode"\n\t\t\tclass\x3d"dijitTreeContent" role\x3d"presentation"\x3e\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem"\n\t\t\t\t tabindex\x3d"-1" aria-selected\x3d"false" id\x3d"${id}_label"\x3e\x3c/span\x3e\n\t\t\x3c/span\n\t\x3e\x3c/div\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation"\n\t\t style\x3d"display: none;" aria-labelledby\x3d"${id}_label"\x3e\x3c/div\x3e\n\x3c/div\x3e\n', +"url:dijit/form/templates/Spinner.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dijitReset dijitButtonNode dijitSpinnerButtonContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitSpinnerButtonInner" type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton"\n\t\t\tdata-dojo-attach-point\x3d"upArrowNode"\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9650; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\t\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton"\n\t\t\tdata-dojo-attach-point\x3d"downArrowNode"\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' data-dojo-attach-point\x3d"textbox,focusNode" type\x3d"${type}" data-dojo-attach-event\x3d"onkeydown:_onKeyDown"\n\t\t\trole\x3d"spinbutton" autocomplete\x3d"off" ${!nameAttrSetting}\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n', +"url:dijit/templates/MenuBar.html":'\x3cdiv class\x3d"dijitMenuBar dijitMenuPassive" data-dojo-attach-point\x3d"containerNode" role\x3d"menubar" tabIndex\x3d"${tabIndex}"\n\t \x3e\x3c/div\x3e\n',"url:dijit/templates/MenuSeparator.html":'\x3ctr class\x3d"dijitMenuSeparator" role\x3d"separator"\x3e\n\t\x3ctd class\x3d"dijitMenuSeparatorIconCell"\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorTop"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorBottom"\x3e\x3c/div\x3e\n\t\x3c/td\x3e\n\t\x3ctd colspan\x3d"3" class\x3d"dijitMenuSeparatorLabelCell"\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorTop dijitMenuSeparatorLabel"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorBottom"\x3e\x3c/div\x3e\n\t\x3c/td\x3e\n\x3c/tr\x3e\n', +"url:dijit/templates/ProgressBar.html":'\x3cdiv class\x3d"dijitProgressBar dijitProgressBarEmpty" role\x3d"progressbar"\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"internalProgress" class\x3d"dijitProgressBarFull"\n\t\t\x3e\x3cdiv class\x3d"dijitProgressBarTile" role\x3d"presentation"\x3e\x3c/div\n\t\t\x3e\x3cspan style\x3d"visibility:hidden"\x3e\x26#160;\x3c/span\n\t\x3e\x3c/div\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"labelNode" class\x3d"dijitProgressBarLabel" id\x3d"${id}_label"\x3e\x3c/div\n\t\x3e\x3cspan data-dojo-attach-point\x3d"indeterminateHighContrastImage"\n\t\t class\x3d"dijitInline dijitProgressBarIndeterminateHighContrastImage"\x3e\x3c/span\n\x3e\x3c/div\x3e\n', +"url:dijit/form/templates/DropDownButton.html":'\x3cspan class\x3d"dijit dijitReset dijitInline"\n\t\x3e\x3cspan class\x3d\'dijitReset dijitInline dijitButtonNode\'\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" data-dojo-attach-point\x3d"_buttonNode"\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"focusNode,titleNode,_arrowWrapperNode,_popupStateNode"\n\t\t\trole\x3d"button" aria-haspopup\x3d"true" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon"\n\t\t\t\tdata-dojo-attach-point\x3d"iconNode"\n\t\t\t\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\n\t\t\t\tid\x3d"${id}_label"\n\t\t\t\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonInner"\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonChar"\x3e\x26#9660;\x3c/span\n\t\t\x3e\x3c/span\n\t\x3e\x3c/span\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen" tabIndex\x3d"-1"\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick" data-dojo-attach-point\x3d"valueNode" aria-hidden\x3d"true"\n/\x3e\x3c/span\x3e\n', +"url:dijit/form/templates/DropDownBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}"\n\trole\x3d"combobox"\n\taria-haspopup\x3d"true"\n\tdata-dojo-attach-point\x3d"_popupStateNode"\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdata-dojo-attach-point\x3d"_buttonNode" role\x3d"presentation"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"button presentation" aria-hidden\x3d"true"\n\t\t\t${_buttonInputDisabled}\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' ${!nameAttrSetting} type\x3d"${type}" autocomplete\x3d"off"\n\t\t\tdata-dojo-attach-point\x3d"textbox,focusNode" role\x3d"textbox"\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n', +"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip" data-dojo-attach-event\x3d"mouseenter:onMouseEnter,mouseleave:onMouseLeave"\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\n\x3e\x3c/div\x3e\n',"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n', +"url:dijit/layout/templates/_ScrollingTabControllerButton.html":'\x3cdiv data-dojo-attach-event\x3d"ondijitclick:_onClick" class\x3d"dijitTabInnerDiv dijitTabContent dijitButtonContents" data-dojo-attach-point\x3d"focusNode" role\x3d"button"\x3e\n\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitTabStripIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\n\t\x3cspan data-dojo-attach-point\x3d"containerNode,titleNode" class\x3d"dijitButtonText"\x3e\x3c/span\x3e\n\x3c/div\x3e',"url:dijit/layout/templates/TabContainer.html":'\x3cdiv class\x3d"dijitTabContainer"\x3e\n\t\x3cdiv class\x3d"dijitTabListWrapper" data-dojo-attach-point\x3d"tablistNode"\x3e\x3c/div\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"tablistSpacer" class\x3d"dijitTabSpacer ${baseClass}-spacer"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"dijitTabPaneWrapper ${baseClass}-container" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e\n\x3c/div\x3e\n', +"url:dijit/templates/Tree.html":'\x3cdiv role\x3d"tree"\x3e\n\t\x3cdiv class\x3d"dijitInline dijitTreeIndent" style\x3d"position: absolute; top: -9999px" data-dojo-attach-point\x3d"indentDetector"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"dijitTreeExpando dijitTreeExpandoLoading" data-dojo-attach-point\x3d"rootLoadingIndicator"\x3e\x3c/div\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeContainer" role\x3d"presentation"\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n', +"url:dijit/form/templates/Select.html":'\x3ctable class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tdata-dojo-attach-point\x3d"_buttonNode,tableNode,focusNode,_popupStateNode" cellspacing\x3d\'0\' cellpadding\x3d\'0\'\n\trole\x3d"listbox" aria-haspopup\x3d"true"\n\t\x3e\x3ctbody role\x3d"presentation"\x3e\x3ctr role\x3d"presentation"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitStretch dijitButtonContents" role\x3d"presentation"\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitButtonText" data-dojo-attach-point\x3d"containerNode,textDirNode" role\x3d"presentation"\x3e\x3c/div\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitValidationContainer"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t/\x3e\x3c/div\n\t\t\t\x3e\x3cinput type\x3d"hidden" ${!nameAttrSetting} data-dojo-attach-point\x3d"valueNode" value\x3d"${value}" aria-hidden\x3d"true"\n\t\t/\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer"\n\t\t\tdata-dojo-attach-point\x3d"titleNode" role\x3d"presentation"\n\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t${_buttonInputDisabled}\n\t\t/\x3e\x3c/td\n\t\x3e\x3c/tr\x3e\x3c/tbody\n\x3e\x3c/table\x3e\n', +"url:dijit/templates/MenuItem.html":'\x3ctr class\x3d"dijitReset" data-dojo-attach-point\x3d"focusNode" role\x3d"menuitem" tabIndex\x3d"-1"\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemIconCell" role\x3d"presentation"\x3e\n\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitMenuItemIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\n\t\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemLabel" colspan\x3d"2" data-dojo-attach-point\x3d"containerNode,textDirNode"\n\t\trole\x3d"presentation"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemAccelKey" style\x3d"display: none" data-dojo-attach-point\x3d"accelKeyNode"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuArrowCell" role\x3d"presentation"\x3e\n\t\t\x3cspan data-dojo-attach-point\x3d"arrowWrapper" style\x3d"visibility: hidden"\x3e\n\t\t\t\x3cspan class\x3d"dijitInline dijitIcon dijitMenuExpand"\x3e\x3c/span\x3e\n\t\t\t\x3cspan class\x3d"dijitMenuExpandA11y"\x3e+\x3c/span\x3e\n\t\t\x3c/span\x3e\n\t\x3c/td\x3e\n\x3c/tr\x3e\n', +"url:dijit/templates/MenuBarItem.html":'\x3cdiv class\x3d"dijitReset dijitInline dijitMenuItem dijitMenuItemLabel" data-dojo-attach-point\x3d"focusNode"\n\t \trole\x3d"menuitem" tabIndex\x3d"-1"\x3e\n\t\x3cspan data-dojo-attach-point\x3d"containerNode,textDirNode"\x3e\x3c/span\x3e\n\x3c/div\x3e\n',"url:dijit/layout/templates/_TabButton.html":'\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"titleNode,innerDiv,tabContent" class\x3d"dijitTabInner dijitTabContent"\x3e\n\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTabButtonIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\n\t\x3cspan data-dojo-attach-point\x3d\'containerNode,focusNode\' class\x3d\'tabLabel\'\x3e\x3c/span\x3e\n\t\x3cspan class\x3d"dijitInline dijitTabCloseButton dijitTabCloseIcon" data-dojo-attach-point\x3d\'closeNode\'\n\t\t role\x3d"presentation"\x3e\n\t\t\x3cspan data-dojo-attach-point\x3d\'closeText\' class\x3d\'dijitTabCloseText\'\x3e[x]\x3c/span\n\t\t\t\t\x3e\x3c/span\x3e\n\x3c/div\x3e\n', +"url:dijit/form/templates/HorizontalSlider.html":'\x3ctable class\x3d"dijit dijitReset dijitSlider dijitSliderH" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"0" rules\x3d"none" data-dojo-attach-event\x3d"onkeydown:_onKeyDown, onkeyup:_onKeyUp"\n\trole\x3d"presentation"\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"topDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderDecrementIconH" style\x3d"display:none" data-dojo-attach-point\x3d"decrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e-\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper" data-dojo-attach-event\x3d"press:_onClkDecBumper"\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cinput data-dojo-attach-point\x3d"valueNode" type\x3d"hidden" ${!nameAttrSetting}\n\t\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitSliderBarContainerH" role\x3d"presentation" data-dojo-attach-point\x3d"sliderBarContainer"\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"progressBar" class\x3d"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH" data-dojo-attach-event\x3d"press:_onBarClick"\n\t\t\t\t\t\x3e\x3cdiv class\x3d"dijitSliderMoveable dijitSliderMoveableH"\n\t\t\t\t\t\t\x3e\x3cdiv data-dojo-attach-point\x3d"sliderHandle,focusNode" class\x3d"dijitSliderImageHandle dijitSliderImageHandleH" data-dojo-attach-event\x3d"press:_onHandleClick" role\x3d"slider"\x3e\x3c/div\n\t\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"remainingBar" class\x3d"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH" data-dojo-attach-event\x3d"press:_onBarClick"\x3e\x3c/div\n\t\t\t\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper" data-dojo-attach-event\x3d"press:_onClkIncBumper"\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderIncrementIconH" style\x3d"display:none" data-dojo-attach-point\x3d"incrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e+\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"containerNode,bottomDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\x3e\x3c/tr\n\x3e\x3c/table\x3e\n', +"url:dijit/form/templates/CheckBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\n\t\x3e\x3cinput\n\t \t${!nameAttrSetting} type\x3d"${type}" role\x3d"${type}" aria-checked\x3d"false" ${checkedAttrSetting}\n\t\tclass\x3d"dijitReset dijitCheckBoxInput"\n\t\tdata-dojo-attach-point\x3d"focusNode"\n\t \tdata-dojo-attach-event\x3d"ondijitclick:_onClick"\n/\x3e\x3c/div\x3e\n',"url:dijit/form/templates/VerticalSlider.html":'\x3ctable class\x3d"dijit dijitReset dijitSlider dijitSliderV" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"0" rules\x3d"none" data-dojo-attach-event\x3d"onkeydown:_onKeyDown,onkeyup:_onKeyUp"\n\trole\x3d"presentation"\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderIncrementIconV" style\x3d"display:none" data-dojo-attach-point\x3d"decrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e+\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3ccenter\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper" data-dojo-attach-event\x3d"press:_onClkIncBumper"\x3e\x3c/div\x3e\x3c/center\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"leftDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationL dijitSliderDecorationV"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderDecorationC" style\x3d"height:100%;"\n\t\t\t\x3e\x3cinput data-dojo-attach-point\x3d"valueNode" type\x3d"hidden" ${!nameAttrSetting}\n\t\t\t/\x3e\x3ccenter class\x3d"dijitReset dijitSliderBarContainerV" role\x3d"presentation" data-dojo-attach-point\x3d"sliderBarContainer"\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"remainingBar" class\x3d"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV" data-dojo-attach-event\x3d"press:_onBarClick"\x3e\x3c!--#5629--\x3e\x3c/div\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"progressBar" class\x3d"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV" data-dojo-attach-event\x3d"press:_onBarClick"\n\t\t\t\t\t\x3e\x3cdiv class\x3d"dijitSliderMoveable dijitSliderMoveableV" style\x3d"vertical-align:top;"\n\t\t\t\t\t\t\x3e\x3cdiv data-dojo-attach-point\x3d"sliderHandle,focusNode" class\x3d"dijitSliderImageHandle dijitSliderImageHandleV" data-dojo-attach-event\x3d"press:_onHandleClick" role\x3d"slider"\x3e\x3c/div\n\t\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3c/div\n\t\t\t\x3e\x3c/center\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"containerNode,rightDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationR dijitSliderDecorationV"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3ccenter\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper" data-dojo-attach-event\x3d"press:_onClkDecBumper"\x3e\x3c/div\x3e\x3c/center\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderDecrementIconV" style\x3d"display:none" data-dojo-attach-point\x3d"incrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e-\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\x3e\x3c/table\x3e\n', +"url:dijit/templates/Calendar.html":'\x3cdiv class\x3d"dijitCalendarContainer dijitInline" role\x3d"presentation" aria-labelledby\x3d"${id}_mddb ${id}_year"\x3e\n\t\x3cdiv class\x3d"dijitReset dijitCalendarMonthContainer" role\x3d"presentation"\x3e\n\t\t\x3cdiv class\x3d\'dijitReset dijitCalendarArrow dijitCalendarDecrementArrow\' data-dojo-attach-point\x3d"decrementMonth"\x3e\n\t\t\t\x3cimg src\x3d"${_blankGif}" alt\x3d"" class\x3d"dijitCalendarIncrementControl dijitCalendarDecrease" role\x3d"presentation"/\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"decreaseArrowNode" class\x3d"dijitA11ySideArrow"\x3e-\x3c/span\x3e\n\t\t\x3c/div\x3e\n\t\t\x3cdiv class\x3d\'dijitReset dijitCalendarArrow dijitCalendarIncrementArrow\' data-dojo-attach-point\x3d"incrementMonth"\x3e\n\t\t\t\x3cimg src\x3d"${_blankGif}" alt\x3d"" class\x3d"dijitCalendarIncrementControl dijitCalendarIncrease" role\x3d"presentation"/\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"increaseArrowNode" class\x3d"dijitA11ySideArrow"\x3e+\x3c/span\x3e\n\t\t\x3c/div\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"monthNode" class\x3d"dijitInline"\x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" role\x3d"grid" data-dojo-attach-point\x3d"gridNode"\x3e\n\t\t\x3cthead\x3e\n\t\t\t\x3ctr role\x3d"row"\x3e\n\t\t\t\t${!dayCellsHtml}\n\t\t\t\x3c/tr\x3e\n\t\t\x3c/thead\x3e\n\t\t\x3ctbody data-dojo-attach-point\x3d"dateRowsNode" data-dojo-attach-event\x3d"ondijitclick: _onDayClick" class\x3d"dijitReset dijitCalendarBodyContainer"\x3e\n\t\t\t\t${!dateRowsHtml}\n\t\t\x3c/tbody\x3e\n\t\x3c/table\x3e\n\t\x3cdiv class\x3d"dijitReset dijitCalendarYearContainer" role\x3d"presentation"\x3e\n\t\t\x3cdiv class\x3d"dijitCalendarYearLabel"\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"previousYearLabelNode" class\x3d"dijitInline dijitCalendarPreviousYear" role\x3d"button"\x3e\x3c/span\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"currentYearLabelNode" class\x3d"dijitInline dijitCalendarSelectedYear" role\x3d"button" id\x3d"${id}_year"\x3e\x3c/span\x3e\n\t\t\t\x3cspan data-dojo-attach-point\x3d"nextYearLabelNode" class\x3d"dijitInline dijitCalendarNextYear" role\x3d"button"\x3e\x3c/span\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n', +"url:dijit/layout/templates/ScrollingTabController.html":'\x3cdiv class\x3d"dijitTabListContainer-${tabPosition}" style\x3d"visibility:hidden"\x3e\n\t\x3cdiv data-dojo-type\x3d"dijit.layout._ScrollingTabControllerMenuButton"\n\t\t class\x3d"tabStripButton-${tabPosition}"\n\t\t id\x3d"${id}_menuBtn"\n\t\t data-dojo-props\x3d"containerId: \'${containerId}\', iconClass: \'dijitTabStripMenuIcon\',\n\t\t\t\t\tdropDownPosition: [\'below-alt\', \'above-alt\']"\n\t\t data-dojo-attach-point\x3d"_menuBtn" showLabel\x3d"false" title\x3d""\x3e\x26#9660;\x3c/div\x3e\n\t\x3cdiv data-dojo-type\x3d"dijit.layout._ScrollingTabControllerButton"\n\t\t class\x3d"tabStripButton-${tabPosition}"\n\t\t id\x3d"${id}_leftBtn"\n\t\t data-dojo-props\x3d"iconClass:\'dijitTabStripSlideLeftIcon\', showLabel:false, title:\'\'"\n\t\t data-dojo-attach-point\x3d"_leftBtn" data-dojo-attach-event\x3d"onClick: doSlideLeft"\x3e\x26#9664;\x3c/div\x3e\n\t\x3cdiv data-dojo-type\x3d"dijit.layout._ScrollingTabControllerButton"\n\t\t class\x3d"tabStripButton-${tabPosition}"\n\t\t id\x3d"${id}_rightBtn"\n\t\t data-dojo-props\x3d"iconClass:\'dijitTabStripSlideRightIcon\', showLabel:false, title:\'\'"\n\t\t data-dojo-attach-point\x3d"_rightBtn" data-dojo-attach-event\x3d"onClick: doSlideRight"\x3e\x26#9654;\x3c/div\x3e\n\t\x3cdiv class\x3d\'dijitTabListWrapper\' data-dojo-attach-point\x3d\'tablistWrapper\'\x3e\n\t\t\x3cdiv role\x3d\'tablist\' data-dojo-attach-event\x3d\'onkeydown:onkeydown\'\n\t\t\t data-dojo-attach-point\x3d\'containerNode\' class\x3d\'nowrapTabStrip\'\x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e', +"url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\n\t\t\t\tid\x3d"${id}_label"\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\n\t\t\t\x3e\x3c/span\n\t\t\x3e\x3c/span\n\t\x3e\x3c/span\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\n\t\ttabIndex\x3d"-1" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\n/\x3e\x3c/span\x3e\n', +"*now":function(f){f(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])}}});(function(){var f=this.require;f({cache:{}});!f.async&&f(["dojo"]);f.boot&&f.apply(null,f.boot)})(); +//# sourceMappingURL=dojo.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/colors.js b/Server/www/spiderbasic/dojo/nls/colors.js new file mode 100644 index 0000000..c722d34 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/colors.js @@ -0,0 +1,10 @@ +//>>built +define("dojo/nls/colors",{root:{aliceblue:"alice blue",antiquewhite:"antique white",aqua:"aqua",aquamarine:"aquamarine",azure:"azure",beige:"beige",bisque:"bisque",black:"black",blanchedalmond:"blanched almond",blue:"blue",blueviolet:"blue-violet",brown:"brown",burlywood:"burlywood",cadetblue:"cadet blue",chartreuse:"chartreuse",chocolate:"chocolate",coral:"coral",cornflowerblue:"cornflower blue",cornsilk:"cornsilk",crimson:"crimson",cyan:"cyan",darkblue:"dark blue",darkcyan:"dark cyan",darkgoldenrod:"dark goldenrod", +darkgray:"dark gray",darkgreen:"dark green",darkgrey:"dark gray",darkkhaki:"dark khaki",darkmagenta:"dark magenta",darkolivegreen:"dark olive green",darkorange:"dark orange",darkorchid:"dark orchid",darkred:"dark red",darksalmon:"dark salmon",darkseagreen:"dark sea green",darkslateblue:"dark slate blue",darkslategray:"dark slate gray",darkslategrey:"dark slate gray",darkturquoise:"dark turquoise",darkviolet:"dark violet",deeppink:"deep pink",deepskyblue:"deep sky blue",dimgray:"dim gray",dimgrey:"dim gray", +dodgerblue:"dodger blue",firebrick:"fire brick",floralwhite:"floral white",forestgreen:"forest green",fuchsia:"fuchsia",gainsboro:"gainsboro",ghostwhite:"ghost white",gold:"gold",goldenrod:"goldenrod",gray:"gray",green:"green",greenyellow:"green-yellow",grey:"gray",honeydew:"honeydew",hotpink:"hot pink",indianred:"indian red",indigo:"indigo",ivory:"ivory",khaki:"khaki",lavender:"lavender",lavenderblush:"lavender blush",lawngreen:"lawn green",lemonchiffon:"lemon chiffon",lightblue:"light blue",lightcoral:"light coral", +lightcyan:"light cyan",lightgoldenrodyellow:"light goldenrod yellow",lightgray:"light gray",lightgreen:"light green",lightgrey:"light gray",lightpink:"light pink",lightsalmon:"light salmon",lightseagreen:"light sea green",lightskyblue:"light sky blue",lightslategray:"light slate gray",lightslategrey:"light slate gray",lightsteelblue:"light steel blue",lightyellow:"light yellow",lime:"lime",limegreen:"lime green",linen:"linen",magenta:"magenta",maroon:"maroon",mediumaquamarine:"medium aquamarine", +mediumblue:"medium blue",mediumorchid:"medium orchid",mediumpurple:"medium purple",mediumseagreen:"medium sea green",mediumslateblue:"medium slate blue",mediumspringgreen:"medium spring green",mediumturquoise:"medium turquoise",mediumvioletred:"medium violet-red",midnightblue:"midnight blue",mintcream:"mint cream",mistyrose:"misty rose",moccasin:"moccasin",navajowhite:"navajo white",navy:"navy",oldlace:"old lace",olive:"olive",olivedrab:"olive drab",orange:"orange",orangered:"orange red",orchid:"orchid", +palegoldenrod:"pale goldenrod",palegreen:"pale green",paleturquoise:"pale turquoise",palevioletred:"pale violet-red",papayawhip:"papaya whip",peachpuff:"peach puff",peru:"peru",pink:"pink",plum:"plum",powderblue:"powder blue",purple:"purple",red:"red",rosybrown:"rosy brown",royalblue:"royal blue",saddlebrown:"saddle brown",salmon:"salmon",sandybrown:"sandy brown",seagreen:"sea green",seashell:"seashell",sienna:"sienna",silver:"silver",skyblue:"sky blue",slateblue:"slate blue",slategray:"slate gray", +slategrey:"slate gray",snow:"snow",springgreen:"spring green",steelblue:"steel blue",tan:"tan",teal:"teal",thistle:"thistle",tomato:"tomato",transparent:"transparent",turquoise:"turquoise",violet:"violet",wheat:"wheat",white:"white",whitesmoke:"white smoke",yellow:"yellow",yellowgreen:"yellow green"},bs:!0,mk:!0,sr:!0,zh:!0,"zh-tw":!0,uk:!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,id:!0,hu:!0,hr:!0,he:!0,fr:!0,fi:!0,eu:!0,es:!0,el:!0,de:!0, +da:!0,cs:!0,ca:!0,bg:!0,az:!0,ar:!0}); +//# sourceMappingURL=colors.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_ar.js b/Server/www/spiderbasic/dojo/nls/dojo_ar.js new file mode 100644 index 0000000..8d552f4 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_ar.js @@ -0,0 +1,27 @@ +//>>built +define("dojo/nls/dojo_ar",{"dijit/form/nls/validate":{invalidMessage:"\u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u062a\u064a \u062a\u0645 \u0627\u062f\u062e\u0627\u0644\u0647\u0627 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d\u0629.",rangeMessage:"\u0647\u0630\u0647 \u0627\u0644\u0642\u064a\u0645\u0629 \u0644\u064a\u0633 \u0628\u0627\u0644\u0645\u062f\u0649 \u0627\u0644\u0635\u062d\u064a\u062d.",_localized:{},missingMessage:"\u064a\u062c\u0628 \u0627\u062f\u062e\u0627\u0644 \u0647\u0630\u0647 \u0627\u0644\u0642\u064a\u0645\u0629."}, +"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"months-format-narrow":"\u064a\u0641\u0645\u0623\u0648\u0646\u0644\u063a\u0633\u0643\u0628\u062f".split(""),"field-second-relative+0":"\u0627\u0644\u0622\u0646", +"quarters-standAlone-narrow":["\u0661","\u0662","\u0663","\u0664"],"field-weekday":"\u0627\u0644\u064a\u0648\u0645","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E\u060c d/M/y","field-wed-relative+0":"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062d\u0627\u0644\u064a","field-wed-relative+1":"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062a\u0627\u0644\u064a","dateFormatItem-GyMMMEd":"E\u060c d MMM\u060c y G","dateFormatItem-MMMEd":"E\u060c d MMM",eraNarrow:["\u0642.\u0645", +"\u0645"],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0645\u0627\u0636\u064a","days-format-short":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}", +"dateFormat-long":"d MMMM\u060c y","field-fri-relative+-1":"\u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0645\u0627\u0636\u064a\u0629","field-wed-relative+-1":"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u0645\u0627\u0636\u064a","months-format-wide":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "), +"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u0645","dateFormat-full":"EEEE\u060c d MMMM\u060c y","field-thu-relative+-1":"\u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u0645\u0627\u0636\u064a","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d/M/y","field-era":"\u0627\u0644\u0639\u0635\u0631","dateFormatItem-yM":"M/y","months-standAlone-wide":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "), +"timeFormat-short":"h:mm a","quarters-format-wide":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"h:mm:ss a z","field-year":"\u0627\u0644\u0633\u0646\u0629","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}", +"field-hour":"\u0627\u0644\u0633\u0627\u0639\u0627\u062a","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "), +"field-sat-relative+0":"\u0627\u0644\u0633\u0628\u062a \u0627\u0644\u062d\u0627\u0644\u064a","field-sat-relative+1":"\u0627\u0644\u0633\u0628\u062a \u0627\u0644\u062a\u0627\u0644\u064a","timeFormat-full":"h:mm:ss a zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"\u0627\u0644\u064a\u0648\u0645","field-thu-relative+0":"\u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062d\u0627\u0644\u064a","field-day-relative+1":"\u063a\u062f\u064b\u0627","field-thu-relative+1":"\u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062a\u0627\u0644\u064a", +"dateFormatItem-GyMMMd":"d MMM\u060c y G","field-day-relative+2":"\u0628\u0639\u062f \u0627\u0644\u063a\u062f","dateFormatItem-H":"HH","months-standAlone-abbr":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "), +"quarters-format-abbr":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],"quarters-standAlone-wide":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b", +"\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"noon", +"timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u062d\u0627\u0644\u064a","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u062a\u0627\u0644\u064a","quarters-standAlone-abbr":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"], +eraAbbr:["\u0642.\u0645","\u0645"],"field-minute":"\u0627\u0644\u062f\u0642\u0627\u0626\u0642","field-dayperiod":"\u0635/\u0645","days-standAlone-abbr":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["\u0661", +"\u0662","\u0663","\u0664"],"field-day-relative+-1":"\u0623\u0645\u0633","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"\u0623\u0648\u0644 \u0623\u0645\u0633","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E\u060c d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u062d\u0627\u0644\u064a\u0629","field-fri-relative+1":"\u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629", +"dateFormatItem-yMMMM":"MMMM y","field-day":"\u064a\u0648\u0645","days-format-wide":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"field-zone":"\u0627\u0644\u062a\u0648\u0642\u064a\u062a","months-standAlone-narrow":"\u064a\u0641\u0645\u0623\u0648\u0646\u0644\u063a\u0633\u0643\u0628\u062f".split(""), +"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0645\u0627\u0636\u064a\u0629","field-month-relative+-1":"\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0645\u0627\u0636\u064a","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "), +eraNames:["\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f","\u0645\u064a\u0644\u0627\u062f\u064a"],"dateFormatItem-yMMMd":"d MMM\u060c y","days-format-narrow":"\u062d\u0646\u062b\u0631\u062e\u062c\u0633".split(""),"field-month":"\u0627\u0644\u0634\u0647\u0631","days-standAlone-narrow":"\u062d\u0646\u062b\u0631\u062e\u062c\u0633".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u062d\u0627\u0644\u064a","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})", +"field-tue-relative+1":"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u062a\u0627\u0644\u064a","dayPeriods-format-wide-am":"\u0635","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E\u060c d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062d\u0627\u0644\u064a","field-mon-relative+1":"\u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062a\u0627\u0644\u064a", +"dateFormat-short":"d/M/y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"\u0627\u0644\u062b\u0648\u0627\u0646\u064a","field-sat-relative+-1":"\u0627\u0644\u0633\u0628\u062a \u0627\u0644\u0645\u0627\u0636\u064a","dateFormatItem-yMMMEd":"E\u060c d MMM\u060c y","field-sun-relative+-1":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0645\u0627\u0636\u064a","field-month-relative+0":"\u0647\u0630\u0627 \u0627\u0644\u0634\u0647\u0631", +"field-month-relative+1":"\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062a\u0627\u0644\u064a","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E\u060c d","field-week":"\u0627\u0644\u0623\u0633\u0628\u0648\u0639","dateFormat-medium":"dd/MM/y","field-week-relative+-1":"\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0645\u0627\u0636\u064a","field-year-relative+0":"\u0647\u0630\u0647 \u0627\u0644\u0633\u0646\u0629","field-year-relative+1":"\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629", +"dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"\u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u0645\u0627\u0636\u064a","field-week-relative+0":"\u0647\u0630\u0627 \u0627\u0644\u0623\u0633\u0628\u0648\u0639","field-week-relative+1":"\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u062a\u0627\u0644\u064a"},"dijit/nls/loading":{_localized:{}, +loadingState:"\u062c\u0627\u0631\u064a \u0627\u0644\u062a\u062d\u0645\u064a\u0644...",errorState:"\u0639\u0641\u0648\u0627\u060c \u062d\u062f\u062b \u062e\u0637\u0623"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0\u062a\u0631\u0644\u064a\u0648","currencySpacing-afterCurrency-insertBetween":"\u00a0", +nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000 \u062a\u0631\u064a\u0644\u064a\u0648\u0646",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631\u0627\u062a \u0627\u0644\u0633\u0627\u0628\u0642\u0629", +_localized:{},nextMessage:"\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631\u0627\u062a"},"dijit/nls/common":{buttonOk:"\u062d\u0633\u0646\u0627",buttonCancel:"\u0627\u0644\u063a\u0627\u0621",_localized:{},buttonSave:"\u062d\u0641\u0638",itemClose:"\u0627\u063a\u0644\u0627\u0642"}}); +//# sourceMappingURL=dojo_ar.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_ca.js b/Server/www/spiderbasic/dojo/nls/dojo_ca.js new file mode 100644 index 0000000..0e701fb --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_ca.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_ca",{"dijit/form/nls/validate":{invalidMessage:"El valor introdu\u00eft no \u00e9s v\u00e0lid",rangeMessage:"Aquest valor \u00e9s fora de l'interval",_localized:{},missingMessage:"Aquest valor \u00e9s necessari"},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"dg. dl. dm. dc. dj. dv. ds.".split(" "),"months-format-narrow":"GN FB M\u00c7 AB MG JN JL AG ST OC NV DS".split(" "),"field-second-relative+0":"ara","quarters-standAlone-narrow":["1", +"2","3","4"],"field-weekday":"dia de la setmana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, d/M/y","field-wed-relative+0":"aquest dimecres","field-wed-relative+1":"dimecres que ve","dateFormatItem-GyMMMEd":"E, d MMM, y G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["aC","dC"],"field-tue-relative+-1":"dimarts passat","days-format-short":"dg. dl. dt. dc. dj. dv. ds.".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM 'de' y","field-fri-relative+-1":"divendres passat", +"field-wed-relative+-1":"dimecres passat","months-format-wide":"gener febrer mar\u00e7 abril maig juny juliol agost setembre octubre novembre desembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"p. m.","dateFormat-full":"EEEE, d MMMM 'de' y","field-thu-relative+-1":"dijous passat","dateFormatItem-Md":"d/M","dateFormatItem-GyMMMM":"LLLL 'de' y G",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon", +"dateFormatItem-yMd":"d/M/y","field-era":"era","dateFormatItem-yM":"M/y","months-standAlone-wide":"gener febrer mar\u00e7 abril maig juny juliol agost setembre octubre novembre desembre".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1r trimestre","2n trimestre","3r trimestre","4t trimestre"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"H:mm:ss z","field-year":"any","dateFormatItem-yMMM":"LLL y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"hora","months-format-abbr":"gen. feb. mar\u00e7 abr. maig juny jul. ag. set. oct. nov. des.".split(" "), +"field-sat-relative+0":"aquest dissabte","field-sat-relative+1":"dissabte que ve","timeFormat-full":"H:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"avui","field-thu-relative+0":"aquest dijous","field-day-relative+1":"dem\u00e0","field-thu-relative+1":"dijous que ve","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"dem\u00e0 passat","dateFormatItem-H":"H","months-standAlone-abbr":"gen. feb. mar\u00e7 abr. maig juny jul. ag. set. oct. nov. des.".split(" "), +"quarters-format-abbr":["1T","2T","3T","4T"],"quarters-standAlone-wide":["1r trimestre","2n trimestre","3r trimestre","4t trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"diumenge dilluns dimarts dimecres dijous divendres dissabte".split(" "),"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"aquest diumenge","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"diumenge que ve","quarters-standAlone-abbr":["1T", +"2T","3T","4T"],eraAbbr:["aC","dC"],"field-minute":"minut","field-dayperiod":"a. m./p. m.","days-standAlone-abbr":"dg. dl. dt. dc. dj. dv. ds.".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ahir","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a.m.","dateFormatItem-h":"h a","field-day-relative+-2":"abans-d'ahir","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}", +"field-fri-relative+0":"aquest divendres","field-fri-relative+1":"divendres que ve","dateFormatItem-yMMMM":"LLLL 'de' y","field-day":"dia","days-format-wide":"diumenge dilluns dimarts dimecres dijous divendres dissabte".split(" "),"field-zone":"zona","months-standAlone-narrow":"GN FB M\u00c7 AB MG JN JL AG ST OC NV DS".split(" "),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"l'any passat","field-month-relative+-1":"el mes passat","dateTimeFormats-appendItem-Year":"{1} {0}", +"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dg. dl. dt. dc. dj. dv. ds.".split(" "),eraNames:["abans de Crist","a. de la n. e.","despr\u00e9s de Crist","de la n. e."],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"dg dl dt dc dj dv ds".split(" "),"field-month":"mes","days-standAlone-narrow":"dg dl dt dc dj dv ds".split(" "),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"aquest dimarts","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})", +"field-tue-relative+1":"dimarts que ve","dayPeriods-format-wide-am":"a. m.","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E H:mm","field-mon-relative+0":"aquest dilluns","field-mon-relative+1":"dilluns que ve","dateFormat-short":"d/M/yy","dateFormatItem-EHms":"E H:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"segon","field-sat-relative+-1":"dissabte passat", +"dateFormatItem-yMMMEd":"E, d MMM, y","field-sun-relative+-1":"diumenge passat","field-month-relative+0":"aquest mes","field-month-relative+1":"el mes que ve","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"setmana","dateFormat-medium":"dd/MM/y","field-week-relative+-1":"la setmana passada","field-year-relative+0":"enguany","field-year-relative+1":"l'any que ve","dayPeriods-format-narrow-pm":"p.m.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss", +"dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"dilluns passat","field-week-relative+0":"aquesta setmana","field-week-relative+1":"la setmana que ve"},"dijit/nls/loading":{_localized:{},loadingState:"S'est\u00e0 carregant...",errorState:"Ens sap greu. S'ha produ\u00eft un error."},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%", +minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0B","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 bilions",decimalFormat:"#,##0.###",decimal:",", +"currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Opcions anteriors",_localized:{},nextMessage:"M\u00e9s opcions"},"dijit/nls/common":{buttonOk:"D'acord",buttonCancel:"Cancel\u00b7la",_localized:{},buttonSave:"Desa",itemClose:"Tanca"}}); +//# sourceMappingURL=dojo_ca.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_cs.js b/Server/www/spiderbasic/dojo/nls/dojo_cs.js new file mode 100644 index 0000000..1475fd4 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_cs.js @@ -0,0 +1,18 @@ +//>>built +define("dojo/nls/dojo_cs",{"dijit/form/nls/validate":{invalidMessage:"Zadan\u00e1 hodnota nen\u00ed platn\u00e1.",rangeMessage:"Tato hodnota je mimo rozsah.",_localized:{},missingMessage:"Tato hodnota je vy\u017eadov\u00e1na."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"nyn\u00ed","quarters-standAlone-narrow":["1","2","3", +"4"],"field-weekday":"Den v t\u00fddnu","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d. M. y","field-wed-relative+0":"tuto st\u0159edu","field-wed-relative+1":"p\u0159\u00ed\u0161t\u00ed st\u0159edu","dateFormatItem-GyMMMEd":"E d. M. y G","dateFormatItem-MMMEd":"E d. M.",eraNarrow:["p\u0159.n.l.","n.l."],"field-tue-relative+-1":"minul\u00e9 \u00fater\u00fd","days-format-short":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d. MMMM y", +"field-fri-relative+-1":"minul\u00fd p\u00e1tek","field-wed-relative+-1":"minulou st\u0159edu","months-format-wide":"ledna \u00fanora b\u0159ezna dubna kv\u011btna \u010dervna \u010dervence srpna z\u00e1\u0159\u00ed \u0159\u00edjna listopadu prosince".split(" "),"dateTimeFormat-medium":"{1} {0}","dateFormatItem-yMMMMd":"d. MMMM y","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d. MMMM y","field-thu-relative+-1":"minul\u00fd \u010dtvrtek","dateFormatItem-Md":"d. M.",_localized:{},"dayPeriods-format-abbr-am":"AM", +"dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d. M. y","field-era":"Letopo\u010det","dateFormatItem-yM":"M/y","months-standAlone-wide":"leden \u00fanor b\u0159ezen duben kv\u011bten \u010derven \u010dervenec srpen z\u00e1\u0159\u00ed \u0159\u00edjen listopad prosinec".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1. \u010dtvrtlet\u00ed","2. \u010dtvrtlet\u00ed","3. \u010dtvrtlet\u00ed","4. \u010dtvrtlet\u00ed"],"dateFormatItem-yQQQQ":"QQQQ y", +"timeFormat-long":"H:mm:ss z","field-year":"Rok","dateFormatItem-yMMM":"LLLL y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"Hodina","months-format-abbr":"led \u00fano b\u0159e dub kv\u011b \u010dvn \u010dvc srp z\u00e1\u0159 \u0159\u00edj lis pro".split(" "),"field-sat-relative+0":"tuto sobotu","field-sat-relative+1":"p\u0159\u00ed\u0161t\u00ed sobotu","timeFormat-full":"H:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"dnes","field-thu-relative+0":"tento \u010dtvrtek", +"field-day-relative+1":"z\u00edtra","field-thu-relative+1":"p\u0159\u00ed\u0161t\u00ed \u010dtvrtek","dateFormatItem-GyMMMd":"d. M. y G","field-day-relative+2":"poz\u00edt\u0159\u00ed","dateFormatItem-H":"H","months-standAlone-abbr":"led \u00fano b\u0159e dub kv\u011b \u010dvn \u010dvc srp z\u00e1\u0159 \u0159\u00edj lis pro".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. \u010dtvrtlet\u00ed","2. \u010dtvrtlet\u00ed","3. \u010dtvrtlet\u00ed","4. \u010dtvrtlet\u00ed"], +"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"ned\u011ble pond\u011bl\u00ed \u00fater\u00fd st\u0159eda \u010dtvrtek p\u00e1tek sobota".split(" "),"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-GyMMMMd":"d. MMMM y G","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"tuto ned\u011bli","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"p\u0159\u00ed\u0161t\u00ed ned\u011bli","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["p\u0159. n. l.", +"n. l."],"field-minute":"Minuta","field-dayperiod":"AM/PM","days-standAlone-abbr":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"v\u010dera","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM","dateFormatItem-h":"h a","field-day-relative+-2":"p\u0159edev\u010d\u00edrem","dateFormatItem-MMMd":"d. M.","dateFormatItem-MEd":"E d. M.","dateTimeFormat-full":"{1} {0}", +"field-fri-relative+0":"tento p\u00e1tek","field-fri-relative+1":"p\u0159\u00ed\u0161t\u00ed p\u00e1tek","dateFormatItem-yMMMM":"LLLL y","field-day":"Den","days-format-wide":"ned\u011ble pond\u011bl\u00ed \u00fater\u00fd st\u0159eda \u010dtvrtek p\u00e1tek sobota".split(" "),"field-zone":"\u010casov\u00e9 p\u00e1smo","months-standAlone-narrow":"l\u00fabdk\u010d\u010dsz\u0159lp".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"minul\u00fd rok", +"field-month-relative+-1":"minul\u00fd m\u011bs\u00edc","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),eraNames:["p\u0159. n. l.","n. l."],"dateFormatItem-yMMMd":"d. M. y","days-format-narrow":"NP\u00daS\u010cPS".split(""),"field-month":"M\u011bs\u00edc","days-standAlone-narrow":"NP\u00daS\u010cPS".split(""),"dateFormatItem-MMM":"LLL", +"field-tue-relative+0":"toto \u00fater\u00fd","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"p\u0159\u00ed\u0161t\u00ed \u00fater\u00fd","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-EHm":"E H:mm","field-mon-relative+0":"toto pond\u011bl\u00ed","field-mon-relative+1":"p\u0159\u00ed\u0161t\u00ed pond\u011bl\u00ed","dateFormat-short":"dd.MM.yy", +"dateFormatItem-EHms":"E H:mm:ss","dateFormatItem-yMMMMEd":"E d. MMMM y","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Sekunda","field-sat-relative+-1":"minulou sobotu","dateFormatItem-yMMMEd":"E d. M. y","field-sun-relative+-1":"minulou ned\u011bli","field-month-relative+0":"tento m\u011bs\u00edc","field-month-relative+1":"p\u0159\u00ed\u0161t\u00ed m\u011bs\u00edc","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d.","field-week":"T\u00fdden", +"dateFormat-medium":"d. M. y","field-week-relative+-1":"minul\u00fd t\u00fdden","field-year-relative+0":"tento rok","field-year-relative+1":"p\u0159\u00ed\u0161t\u00ed rok","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLLL y G","field-mon-relative+-1":"minul\u00e9 pond\u011bl\u00ed","dateFormatItem-GyMMMMEd":"E d. MMMM y G","field-week-relative+0":"tento t\u00fdden","field-week-relative+1":"p\u0159\u00ed\u0161t\u00ed t\u00fdden"}, +"dijit/nls/loading":{_localized:{},loadingState:"Prob\u00edh\u00e1 na\u010d\u00edt\u00e1n\u00ed...",errorState:"Omlouv\u00e1me se, do\u0161lo k chyb\u011b"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0bil'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0", +nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 bilion\u016f",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"P\u0159edchoz\u00ed volby",_localized:{},nextMessage:"Dal\u0161\u00ed volby"}, +"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Storno",_localized:{},buttonSave:"Ulo\u017eit",itemClose:"Zav\u0159\u00edt"}}); +//# sourceMappingURL=dojo_cs.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_da.js b/Server/www/spiderbasic/dojo/nls/dojo_da.js new file mode 100644 index 0000000..fdb3513 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_da.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_da",{"dijit/form/nls/validate":{invalidMessage:"Den angivne v\u00e6rdi er ugyldig.",rangeMessage:"V\u00e6rdien er uden for intervallet.",_localized:{},missingMessage:"V\u00e6rdien er p\u00e5kr\u00e6vet."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"s\u00f8 ma ti on to fr l\u00f8".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"nu","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Ugedag", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"denne onsdag","field-wed-relative+1":"n\u00e6ste onsdag","dateFormatItem-GyMMMEd":"E d. MMM y G","dateFormatItem-MMMEd":"E d. MMM",eraNarrow:["fKr","fvt","eKr","vt"],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"sidste tirsdag","days-format-short":"s\u00f8 ma ti on to fr l\u00f8".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d. MMM y","field-fri-relative+-1":"sidste fredag", +"field-wed-relative+-1":"sidste onsdag","months-format-wide":"januar februar marts april maj juni juli august september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE 'den' d. MMMM y","field-thu-relative+-1":"sidste torsdag","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"middag","dateFormatItem-yMd":"d/M/y", +"field-era":"\u00c6ra","dateFormatItem-yM":"M/y","months-standAlone-wide":"januar februar marts april maj juni juli august september oktober november december".split(" "),"timeFormat-short":"HH.mm","quarters-format-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH.mm.ss z","field-year":"\u00c5r","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"Time","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"jan. feb. mar. apr. maj jun. jul. aug. sep. okt. nov. dec.".split(" "), +"field-sat-relative+0":"denne l\u00f8rdag","field-sat-relative+1":"n\u00e6ste l\u00f8rdag","timeFormat-full":"HH.mm.ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"i dag","field-thu-relative+0":"denne torsdag","field-day-relative+1":"i morgen","field-thu-relative+1":"n\u00e6ste torsdag","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"i overmorgen","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mar apr maj jun jul aug sep okt nov dec".split(" "), +"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"M","days-standAlone-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"dayPeriods-format-abbr-noon":"middag","timeFormat-medium":"HH.mm.ss","field-sun-relative+0":"denne s\u00f8ndag","dateFormatItem-Hm":"HH.mm","field-sun-relative+1":"n\u00e6ste s\u00f8ndag","quarters-standAlone-abbr":["K1","K2","K3", +"K4"],eraAbbr:["f.Kr.","e.Kr."],"field-minute":"Minut","field-dayperiod":"AM/PM","days-standAlone-abbr":"s\u00f8n man tir ons tor fre l\u00f8r".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i g\u00e5r","dateTimeFormat-long":"{1} 'kl.' {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"i forg\u00e5rs","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} 'kl.' {0}", +"field-fri-relative+0":"denne fredag","field-fri-relative+1":"n\u00e6ste fredag","field-day":"Dag","days-format-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"field-zone":"Tidszone","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"sidste \u00e5r","field-month-relative+-1":"sidste m\u00e5ned","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h.mm a", +"dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"s\u00f8n. man. tir. ons. tor. fre. l\u00f8r.".split(" "),eraNames:["f.Kr.","f\u00f8r vesterlandsk tidsregning","e.Kr.","vesterlandsk tidsregning"],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMTOTFL".split(""),"field-month":"M\u00e5ned","days-standAlone-narrow":"SMTOTFL".split(""),"dateFormatItem-MMM":"MMM","field-tue-relative+0":"denne tirsdag","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})", +"field-tue-relative+1":"n\u00e6ste tirsdag","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-EHm":"E HH.mm","field-mon-relative+0":"denne mandag","field-mon-relative+1":"n\u00e6ste mandag","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E HH.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","dayPeriods-format-narrow-noon":"middag","field-second":"Sekund","field-sat-relative+-1":"sidste l\u00f8rdag", +"dateFormatItem-yMMMEd":"E d. MMM y","field-sun-relative+-1":"sidste s\u00f8ndag","field-month-relative+0":"denne m\u00e5ned","field-month-relative+1":"n\u00e6ste m\u00e5ned","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E 'd'. d.","field-week":"Uge","dateFormat-medium":"dd/MM/y","field-week-relative+-1":"sidste uge","field-year-relative+0":"i \u00e5r","field-year-relative+1":"n\u00e6ste \u00e5r","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH.mm.ss", +"dateFormatItem-hms":"h.mm.ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"sidste mandag","field-week-relative+0":"denne uge","field-week-relative+1":"n\u00e6ste uge"},"dijit/nls/loading":{_localized:{},loadingState:"Indl\u00e6ser...",errorState:"Der er opst\u00e5et en fejl"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]", +_localized:{},"decimalFormat-short":"000\u00a0bill","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 billioner",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Forrige valg", +_localized:{},nextMessage:"Flere valg"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Annull\u00e9r",_localized:{},buttonSave:"Gem",itemClose:"Luk"}}); +//# sourceMappingURL=dojo_da.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_de.js b/Server/www/spiderbasic/dojo/nls/dojo_de.js new file mode 100644 index 0000000..21df161 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_de.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_de",{"dijit/form/nls/validate":{invalidMessage:"Der eingegebene Wert ist ung\u00fcltig. ",rangeMessage:"Dieser Wert liegt au\u00dferhalb des g\u00fcltigen Bereichs. ",_localized:{},missingMessage:"Dieser Wert ist erforderlich."},"dojo/cldr/nls/gregorian":{"dateTimeFormats-appendItem-Year":"{1} {0}","field-tue-relative+-1":"Letzten Dienstag","field-year":"Jahr","dateFormatItem-Hm":"HH:mm","field-wed-relative+0":"Diesen Mittwoch","field-wed-relative+1":"N\u00e4chsten Mittwoch", +"dayPeriods-format-wide-night":"nachts","dateFormatItem-ms":"mm:ss","timeFormat-short":"HH:mm","field-minute":"Minute","dateTimeFormat-short":"{1} {0}","field-day-relative+0":"Heute","field-day-relative+1":"Morgen","field-day-relative+2":"\u00dcbermorgen","field-tue-relative+0":"Diesen Dienstag","field-tue-relative+1":"N\u00e4chsten Dienstag","dayPeriods-format-narrow-am":"a","dateFormatItem-MMMd":"d. MMM","dayPeriods-format-abbr-am":"AM","field-week-relative+0":"Diese Woche","field-month-relative+0":"Dieser Monat", +"field-week-relative+1":"N\u00e4chste Woche","field-month-relative+1":"N\u00e4chster Monat","timeFormat-medium":"HH:mm:ss","field-second-relative+0":"jetzt","dayPeriods-format-wide-afternoon":"nachmittags","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","months-standAlone-narrow":"JFMAMJJASOND".split(""),eraNames:["v. Chr.","n. Chr."],"dateFormatItem-GyMMMEd":"E, d. MMM y G","field-day":"Tag","field-year-relative+-1":"Letztes Jahr","dayPeriods-format-wide-am":"vorm.","field-wed-relative+-1":"Letzten Mittwoch", +"dateTimeFormat-medium":"{1} {0}","field-second":"Sekunde","days-standAlone-narrow":"SMDMDFS".split(""),"dateFormatItem-Ehms":"E, h:mm:ss a","dateFormat-long":"d. MMMM y","dateFormatItem-GyMMMd":"d. MMM y G","dateFormatItem-yMMMEd":"E, d. MMM y","quarters-standAlone-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"days-format-narrow":"SMDMDFS".split(""),"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-mon-relative+-1":"Letzten Montag","dateFormatItem-GyMMM":"MMM y G","field-month":"Monat", +"dateFormatItem-MMM":"LLL","field-dayperiod":"Tagesh\u00e4lfte","dayPeriods-format-narrow-pm":"p","dateFormat-medium":"dd.MM.y",eraAbbr:["v. Chr.","n. Chr."],"quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"dayPeriods-format-abbr-pm":"PM","dateFormatItem-MMd":"d.MM.","field-mon-relative+0":"Diesen Montag","field-mon-relative+1":"N\u00e4chsten Montag","months-format-narrow":"JFMAMJJASOND".split(""),"days-format-short":"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),"quarters-format-narrow":["1","2","3", +"4"],"dayPeriods-format-wide-pm":"nachm.","field-sat-relative+-1":"Letzten Samstag","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormat-long":"{1} {0}","dateFormatItem-Md":"d.M.","field-hour":"Stunde","dateFormatItem-yQQQQ":"QQQQ y","months-format-wide":"Januar Februar M\u00e4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),"dateFormat-full":"EEEE, d. MMMM y","field-month-relative+-1":"Letzter Monat","dayPeriods-format-wide-earlyMorning":"morgens","dateFormatItem-Hms":"HH:mm:ss", +"field-fri-relative+0":"Diesen Freitag","field-fri-relative+1":"N\u00e4chsten Freitag","dayPeriods-format-narrow-noon":"n","dayPeriods-format-wide-morning":"vormittags","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})",_localized:{},"field-week-relative+-1":"Letzte Woche","dateFormatItem-Ehm":"E h:mm a","months-format-abbr":"Jan. Feb. M\u00e4rz Apr. Mai Juni Juli Aug. Sep. Okt. Nov. Dez.".split(" "),"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"MMM y","dateFormat-short":"dd.MM.yy","days-standAlone-wide":"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "), +"dateTimeFormats-appendItem-Era":"{1} {0}","dateFormatItem-H":"HH 'Uhr'","dateFormatItem-M":"L","months-standAlone-wide":"Januar Februar M\u00e4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),"field-sun-relative+-1":"Letzten Sonntag","dateFormatItem-MMMMEd":"E, d. MMMM","days-standAlone-abbr":"So Mo Di Mi Do Fr Sa".split(" "),"dateTimeFormat-full":"{1} {0}","dateFormatItem-hm":"h:mm a","dateFormatItem-d":"d","field-weekday":"Wochentag","field-sat-relative+0":"Diesen Samstag", +"dateFormatItem-h":"h a","field-sat-relative+1":"N\u00e4chsten Samstag","months-standAlone-abbr":"Jan Feb M\u00e4r Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),"dateFormatItem-yMM":"MM.y","timeFormat-full":"HH:mm:ss zzzz","dateFormatItem-MEd":"E, d.M.","dateFormatItem-y":"y","field-thu-relative+0":"Diesen Donnerstag","field-thu-relative+1":"N\u00e4chsten Donnerstag","dateFormatItem-hms":"h:mm:ss a","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dayPeriods-format-abbr-noon":"noon","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})", +"field-thu-relative+-1":"Letzten Donnerstag","dateFormatItem-yMd":"d.M.y","field-week":"Woche","quarters-standAlone-narrow":["1","2","3","4"],"quarters-format-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"dateFormatItem-Ed":"E, d.","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","days-standAlone-short":"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),"dayPeriods-format-wide-evening":"abends","dateFormatItem-yMMdd":"dd.MM.y","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"field-year-relative+0":"Dieses Jahr", +"field-year-relative+1":"N\u00e4chstes Jahr","field-fri-relative+-1":"Letzten Freitag",eraNarrow:["v. Chr.","n. Chr."],"dayPeriods-format-wide-noon":"Mittag","dateFormatItem-yQQQ":"QQQ y","days-format-wide":"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),"dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-EHm":"E, HH:mm","field-zone":"Zeitzone","dateFormatItem-yM":"M.y","dateFormatItem-yMMMM":"MMMM y","dateFormatItem-MMMEd":"E, d. MMM","dateFormatItem-EHms":"E, HH:mm:ss", +"dateFormatItem-yMEd":"E, d.M.y","field-day-relative+-1":"Gestern","field-day-relative+-2":"Vorgestern","days-format-abbr":"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),"field-sun-relative+0":"Diesen Sonntag","dateFormatItem-MMdd":"dd.MM.","field-sun-relative+1":"N\u00e4chsten Sonntag","dateFormatItem-yMMMd":"d. MMM y","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-Gy":"y G","field-era":"Epoche"},"dijit/nls/loading":{_localized:{},loadingState:"Wird geladen...",errorState:"Es ist ein Fehler aufgetreten."}, +"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00b7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0Bio","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]", +perMille:"\u2030",group:".",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 Billionen",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Vorherige Auswahl",_localized:{},nextMessage:"Weitere Auswahlm\u00f6glichkeiten"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Abbrechen",_localized:{},buttonSave:"Speichern",itemClose:"Schlie\u00dfen"}}); +//# sourceMappingURL=dojo_de.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_el.js b/Server/www/spiderbasic/dojo/nls/dojo_el.js new file mode 100644 index 0000000..d502487 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_el.js @@ -0,0 +1,26 @@ +//>>built +define("dojo/nls/dojo_el",{"dijit/form/nls/validate":{invalidMessage:"\u0397 \u03c4\u03b9\u03bc\u03ae \u03c0\u03bf\u03c5 \u03ba\u03b1\u03c4\u03b1\u03c7\u03c9\u03c1\u03ae\u03c3\u03b1\u03c4\u03b5 \u03b4\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03ad\u03b3\u03ba\u03c5\u03c1\u03b7.",rangeMessage:"\u0397 \u03c4\u03b9\u03bc\u03ae \u03b1\u03c5\u03c4\u03ae \u03b4\u03b5\u03bd \u03b1\u03bd\u03ae\u03ba\u03b5\u03b9 \u03c3\u03c4\u03bf \u03b5\u03cd\u03c1\u03bf\u03c2 \u03ad\u03b3\u03ba\u03c5\u03c1\u03c9\u03bd \u03c4\u03b9\u03bc\u03ce\u03bd.", +_localized:{},missingMessage:"\u0397 \u03c4\u03b9\u03bc\u03ae \u03b1\u03c5\u03c4\u03ae \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03b1 \u03bd\u03b1 \u03ba\u03b1\u03b8\u03bf\u03c1\u03b9\u03c3\u03c4\u03b5\u03af."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u039a\u03c5 \u0394\u03b5 \u03a4\u03c1 \u03a4\u03b5 \u03a0\u03ad \u03a0\u03b1 \u03a3\u03ac".split(" "),"months-format-narrow":"\u0399\u03a6\u039c\u0391\u039c\u0399\u0399\u0391\u03a3\u039f\u039d\u0394".split(""), +"field-second-relative+0":"\u03c4\u03ce\u03c1\u03b1","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, d/M/y","field-wed-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","field-wed-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","dateFormatItem-GyMMMEd":"E, d MMM y G", +"dateFormatItem-MMMEd":"E, d MMM",eraNarrow:["\u03c0.\u03a7.","\u03bc.\u03a7."],"field-tue-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03a4\u03c1\u03af\u03c4\u03b7","days-format-short":"\u039a\u03c5 \u0394\u03b5 \u03a4\u03c1 \u03a4\u03b5 \u03a0\u03ad \u03a0\u03b1 \u03a3\u03ac".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y","field-fri-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae", +"field-wed-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","months-format-wide":"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5 \u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5 \u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5 \u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5 \u039c\u03b1\u0390\u03bf\u03c5 \u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5 \u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5 \u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5 \u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5 \u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5 \u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5 \u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split(" "), +"dateTimeFormat-medium":"{1} - {0}","dayPeriods-format-wide-pm":"\u03bc.\u03bc.","dateFormat-full":"EEEE, d MMMM y","field-thu-relative+-1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d/M/y","field-era":"\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2","dateFormatItem-yM":"M/y", +"months-standAlone-wide":"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2 \u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2 \u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2 \u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2 \u039c\u03ac\u03b9\u03bf\u03c2 \u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2 \u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2 \u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2 \u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2 \u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2 \u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2 \u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split(" "), +"timeFormat-short":"h:mm a","quarters-format-wide":["1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"h:mm:ss a z","field-year":"\u0388\u03c4\u03bf\u03c2","dateFormatItem-yMMM":"LLL y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"\u038f\u03c1\u03b1","months-format-abbr":"\u0399\u03b1\u03bd \u03a6\u03b5\u03b2 \u039c\u03b1\u03c1 \u0391\u03c0\u03c1 \u039c\u03b1\u0390 \u0399\u03bf\u03c5\u03bd \u0399\u03bf\u03c5\u03bb \u0391\u03c5\u03b3 \u03a3\u03b5\u03c0 \u039f\u03ba\u03c4 \u039d\u03bf\u03b5 \u0394\u03b5\u03ba".split(" "), +"field-sat-relative+0":"\u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","field-sat-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","timeFormat-full":"h:mm:ss a zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"\u03c3\u03ae\u03bc\u03b5\u03c1\u03b1","field-thu-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","field-day-relative+1":"\u03b1\u03cd\u03c1\u03b9\u03bf", +"field-thu-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"\u03bc\u03b5\u03b8\u03b1\u03cd\u03c1\u03b9\u03bf","dateFormatItem-H":"HH","months-standAlone-abbr":"\u0399\u03b1\u03bd \u03a6\u03b5\u03b2 \u039c\u03ac\u03c1 \u0391\u03c0\u03c1 \u039c\u03ac\u03b9 \u0399\u03bf\u03cd\u03bd \u0399\u03bf\u03cd\u03bb \u0391\u03cd\u03b3 \u03a3\u03b5\u03c0 \u039f\u03ba\u03c4 \u039d\u03bf\u03ad \u0394\u03b5\u03ba".split(" "), +"quarters-format-abbr":["\u03a41","\u03a42","\u03a43","\u03a44"],"quarters-standAlone-wide":["1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf"],"dateFormatItem-Gy":"y G","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1 \u03a4\u03c1\u03af\u03c4\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split(" "), +"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","quarters-standAlone-abbr":["\u03a41","\u03a42","\u03a43","\u03a44"],eraAbbr:["\u03c0.\u03a7.","\u03bc.\u03a7."],"field-minute":"\u039b\u03b5\u03c0\u03c4\u03cc", +"field-dayperiod":"\u03c0.\u03bc./\u03bc.\u03bc.","days-standAlone-abbr":"\u039a\u03c5\u03c1 \u0394\u03b5\u03c5 \u03a4\u03c1\u03af \u03a4\u03b5\u03c4 \u03a0\u03ad\u03bc \u03a0\u03b1\u03c1 \u03a3\u03ac\u03b2".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u03c7\u03b8\u03b5\u03c2","dateTimeFormat-long":"{1} - {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"\u03c0\u03c1\u03bf\u03c7\u03b8\u03ad\u03c2", +"dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d/M","dateTimeFormat-full":"{1} - {0}","field-fri-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","field-fri-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","dateFormatItem-yMMMM":"LLLL y","field-day":"\u0397\u03bc\u03ad\u03c1\u03b1","days-format-wide":"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1 \u03a4\u03c1\u03af\u03c4\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split(" "), +"field-zone":"\u0396\u03ce\u03bd\u03b7","months-standAlone-narrow":"\u0399\u03a6\u039c\u0391\u039c\u0399\u0399\u0391\u03a3\u039f\u039d\u0394".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03ad\u03c4\u03bf\u03c2","field-month-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2","dateTimeFormats-appendItem-Year":"{1} {0}", +"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u039a\u03c5\u03c1 \u0394\u03b5\u03c5 \u03a4\u03c1\u03af \u03a4\u03b5\u03c4 \u03a0\u03ad\u03bc \u03a0\u03b1\u03c1 \u03a3\u03ac\u03b2".split(" "),eraNames:["\u03c0.\u03a7.","\u03bc.\u03a7."],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"\u039a\u0394\u03a4\u03a4\u03a0\u03a0\u03a3".split(""),"field-month":"\u039c\u03ae\u03bd\u03b1\u03c2","days-standAlone-narrow":"\u039a\u0394\u03a4\u03a4\u03a0\u03a0\u03a3".split(""), +"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","field-tue-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a4\u03c1\u03af\u03c4\u03b7","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a4\u03c1\u03af\u03c4\u03b7","dayPeriods-format-wide-am":"\u03c0.\u03bc.","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E, d MMMM", +"dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7 \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","field-mon-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","dateFormat-short":"d/M/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf","field-sat-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf", +"dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","field-month-relative+0":"\u03c4\u03c1\u03ad\u03c7\u03c9\u03bd \u03bc\u03ae\u03bd\u03b1\u03c2","field-month-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1", +"dateFormat-medium":"d MMM y","field-week-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1","field-year-relative+0":"\u03c6\u03ad\u03c4\u03bf\u03c2","field-year-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u03ad\u03c4\u03bf\u03c2","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} - {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1", +"field-week-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1","field-week-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1"},"dijit/nls/loading":{_localized:{},loadingState:"\u03a6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7...",errorState:"\u03a3\u03b1\u03c2 \u03b6\u03b7\u03c4\u03bf\u03cd\u03bc\u03b5 \u03c3\u03c5\u03b3\u03bd\u03ce\u03bc\u03b7, \u03c0\u03b1\u03c1\u03bf\u03c5\u03c3\u03b9\u03ac\u03c3\u03c4\u03b7\u03ba\u03b5 \u03c3\u03c6\u03ac\u03bb\u03bc\u03b1"}, +"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0\u03c4\u03c1\u03b9\u03c3'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4", +"currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 \u03c4\u03c1\u03b9\u03c3\u03b5\u03ba\u03b1\u03c4\u03bf\u03bc\u03bc\u03cd\u03c1\u03b9\u03b1",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"e"},"dijit/form/nls/ComboBox":{previousMessage:"\u03a0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b5\u03c2 \u03b5\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2", +_localized:{},nextMessage:"\u03a0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03b5\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2"},"dijit/nls/common":{buttonOk:"\u039f\u039a",buttonCancel:"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7",_localized:{},buttonSave:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7",itemClose:"\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf"}}); +//# sourceMappingURL=dojo_el.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_en-gb.js b/Server/www/spiderbasic/dojo/nls/dojo_en-gb.js new file mode 100644 index 0000000..b46b556 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_en-gb.js @@ -0,0 +1,15 @@ +//>>built +define("dojo/nls/dojo_en-gb",{"dijit/form/nls/validate":{invalidMessage:"The value entered is not valid.",rangeMessage:"This value is out of range.",_localized:{},missingMessage:"This value is required."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"Su Mo Tu We Th Fr Sa".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"now","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y", +"dateFormatItem-yMEd":"E, dd/MM/y","field-wed-relative+0":"this Wednesday","field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["B","A"],"field-tue-relative+-1":"last Tuesday","days-format-short":"Su Mo Tu We Th Fr Sa".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday","months-format-wide":"January February March April May June July August September October November December".split(" "), +"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"pm","dateFormat-full":"EEEE, d MMMM y","field-thu-relative+-1":"last Thursday","dateFormatItem-Md":"dd/MM",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"dd/MM/y","field-era":"Era","dateFormatItem-yM":"MM/y","months-standAlone-wide":"January February March April May June July August September October November December".split(" "), +"timeFormat-short":"HH:mm","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"HH:mm:ss zzzz", +"dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"today","field-thu-relative+0":"this Thursday","field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday","dateFormatItem-GyMMMd":"d MMM y G","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"LL", +"days-standAlone-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"this Sunday","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"next Sunday","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BC","AD"],"field-minute":"Minute","field-dayperiod":"am/pm","days-standAlone-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"dateFormatItem-d":"d", +"dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"yesterday","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E dd/MM","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"this Friday","field-fri-relative+1":"next Friday","dateFormatItem-yMMMM":"MMMM y","field-day":"Day","days-format-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), +"field-zone":"Time Zone","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"last year","field-month-relative+-1":"last month","dateTimeFormats-appendItem-Year":"{0} {1}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),eraNames:["Before Christ","Anno Domini"],"dateFormatItem-yMMMd":"d MMM y", +"days-format-narrow":"SMTWTFS".split(""),"field-month":"Month","days-standAlone-narrow":"SMTWTFS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"this Tuesday","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"next Tuesday","dayPeriods-format-wide-am":"am","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"this Monday","field-mon-relative+1":"next Monday", +"dateFormat-short":"dd/MM/y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Second","field-sat-relative+-1":"last Saturday","dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"last Sunday","field-month-relative+0":"this month","field-month-relative+1":"next month","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"Week","dateFormat-medium":"d MMM y","field-week-relative+-1":"last week", +"field-year-relative+0":"this year","field-year-relative+1":"next year","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"last Monday","field-week-relative+0":"this week","field-week-relative+1":"next week"},"dijit/nls/loading":{_localized:{},loadingState:"Loading...",errorState:"Sorry, an error occurred"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]", +infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000 trillion", +decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Previous choices",_localized:{},nextMessage:"More choices"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Cancel",_localized:{},buttonSave:"Save",itemClose:"Close"}}); +//# sourceMappingURL=dojo_en-gb.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_en-us.js b/Server/www/spiderbasic/dojo/nls/dojo_en-us.js new file mode 100644 index 0000000..c44a9ed --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_en-us.js @@ -0,0 +1,15 @@ +//>>built +define("dojo/nls/dojo_en-us",{"dijit/form/nls/validate":{invalidMessage:"The value entered is not valid.",rangeMessage:"This value is out of range.",_localized:{},missingMessage:"This value is required."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"Su Mo Tu We Th Fr Sa".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"now","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y", +"dateFormatItem-yMEd":"E, M/d/y","field-wed-relative+0":"this Wednesday","field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"E, MMM d, y G","dateFormatItem-MMMEd":"E, MMM d",eraNarrow:["B","A"],"field-tue-relative+-1":"last Tuesday","days-format-short":"Su Mo Tu We Th Fr Sa".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"MMMM d, y","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday","months-format-wide":"January February March April May June July August September October November December".split(" "), +"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, MMMM d, y","field-thu-relative+-1":"last Thursday","dateFormatItem-Md":"M/d",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"M/d/y","field-era":"Era","dateFormatItem-yM":"M/y","months-standAlone-wide":"January February March April May June July August September October November December".split(" "), +"timeFormat-short":"h:mm a","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"h:mm:ss a z","field-year":"Year","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"h:mm:ss a zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})", +"field-day-relative+0":"today","field-thu-relative+0":"this Thursday","field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday","dateFormatItem-GyMMMd":"MMM d, y G","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), +"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"this Sunday","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"next Sunday","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BC","AD"],"field-minute":"Minute","field-dayperiod":"AM/PM","days-standAlone-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"yesterday","dateTimeFormat-long":"{1} 'at' {0}", +"dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M/d","dateTimeFormat-full":"{1} 'at' {0}","field-fri-relative+0":"this Friday","field-fri-relative+1":"next Friday","field-day":"Day","days-format-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"field-zone":"Time Zone","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"last year", +"field-month-relative+-1":"last month","dateTimeFormats-appendItem-Year":"{0} {1}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),eraNames:["Before Christ","Anno Domini"],"dateFormatItem-yMMMd":"MMM d, y","days-format-narrow":"SMTWTFS".split(""),"field-month":"Month","days-standAlone-narrow":"SMTWTFS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"this Tuesday", +"dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"next Tuesday","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"this Monday","field-mon-relative+1":"next Monday","dateFormat-short":"M/d/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Second","field-sat-relative+-1":"last Saturday", +"dateFormatItem-yMMMEd":"E, MMM d, y","field-sun-relative+-1":"last Sunday","field-month-relative+0":"this month","field-month-relative+1":"next month","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"d E","field-week":"Week","dateFormat-medium":"MMM d, y","field-week-relative+-1":"last week","field-year-relative+0":"this year","field-year-relative+1":"next year","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a", +"dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"last Monday","field-week-relative+0":"this week","field-week-relative+1":"next week"},"dijit/nls/loading":{_localized:{},loadingState:"Loading...",errorState:"Sorry, an error occurred"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{}, +"decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000 trillion",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Previous choices", +_localized:{},nextMessage:"More choices"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Cancel",_localized:{},buttonSave:"Save",itemClose:"Close"}}); +//# sourceMappingURL=dojo_en-us.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_es-es.js b/Server/www/spiderbasic/dojo/nls/dojo_es-es.js new file mode 100644 index 0000000..b3946e0 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_es-es.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_es-es",{"dijit/form/nls/validate":{invalidMessage:"El valor especificado no es v\u00e1lido.",rangeMessage:"Este valor est\u00e1 fuera del intervalo.",_localized:{},missingMessage:"Este valor es necesario."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E, h:mm a","days-standAlone-short":"DO LU MA MI JU VI SA".split(" "),"months-format-narrow":"EFMAMJJASOND".split(""),"field-second-relative+0":"ahora","quarters-standAlone-narrow":["1T","2T","3T","4T"],"field-weekday":"d\u00eda de la semana", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE, d/M/y","field-wed-relative+0":"este mi\u00e9rcoles","field-wed-relative+1":"el pr\u00f3ximo mi\u00e9rcoles","dateFormatItem-GyMMMEd":"E, d 'de' MMMM 'de' y G","dateFormatItem-MMMEd":"E d 'de' MMM",eraNarrow:["a. C.","d. C."],"dateFormatItem-yMM":"M/y","field-tue-relative+-1":"el martes pasado","dateFormatItem-MMMdd":"dd-MMM","days-format-short":"DO LU MA MI JU VI SA".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d 'de' MMMM 'de' y", +"field-fri-relative+-1":"el viernes pasado","field-wed-relative+-1":"el mi\u00e9rcoles pasado","months-format-wide":"enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"p. m.","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","field-thu-relative+-1":"el jueves pasado","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})", +"dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d/M/y","field-era":"era","dateFormatItem-yM":"M/y","months-standAlone-wide":"Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1.er trimestre","2.\u00ba trimestre","3.er trimestre","4.\u00ba trimestre"],"dateFormatItem-yQQQQ":"QQQQ 'de' y","timeFormat-long":"H:mm:ss z","field-year":"a\u00f1o","dateFormatItem-yMMM":"MMM 'de' y","dateTimeFormats-appendItem-Era":"{1} {0}", +"field-hour":"hora","dateFormatItem-MMdd":"d/M","months-format-abbr":"ene. feb. mar. abr. may. jun. jul. ago. sept. oct. nov. dic.".split(" "),"field-sat-relative+0":"este s\u00e1bado","field-sat-relative+1":"el pr\u00f3ximo s\u00e1bado","timeFormat-full":"H:mm:ss (zzzz)","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"hoy","field-thu-relative+0":"este jueves","field-day-relative+1":"ma\u00f1ana","field-thu-relative+1":"el pr\u00f3ximo jueves","dateFormatItem-GyMMMd":"d MMM 'de' y G", +"field-day-relative+2":"pasado ma\u00f1ana","dateFormatItem-H":"H","months-standAlone-abbr":"Ene. Feb. Mar. Abr. May. Jun. Jul. Ago. Sept. Oct. Nov. Dic.".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1.er trimestre","2.\u00ba trimestre","3.er trimestre","4.\u00ba trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Domingo Lunes Martes Mi\u00e9rcoles Jueves Viernes S\u00e1bado".split(" "),"dateFormatItem-MMMMd":"d 'de' MMMM", +"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"este domingo","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"el pr\u00f3ximo domingo","quarters-standAlone-abbr":["T1","T2","T3","T4"],eraAbbr:["a. C.","d. C."],"field-minute":"minuto","field-dayperiod":"periodo del d\u00eda","days-standAlone-abbr":"Dom. Lun. Mar. Mi\u00e9. Jue. Vie. S\u00e1b.".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1T","2T","3T","4T"],"field-day-relative+-1":"ayer", +"dateTimeFormat-long":"{1}, {0}","dayPeriods-format-narrow-am":"a.m.","dateFormatItem-h":"h a","field-day-relative+-2":"antes de ayer","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"E, d/M","dateTimeFormat-full":"{1}, {0}","field-fri-relative+0":"este viernes","field-fri-relative+1":"el pr\u00f3ximo viernes","dateFormatItem-yMMMM":"MMMM 'de' y","field-day":"d\u00eda","days-format-wide":"domingo lunes martes mi\u00e9rcoles jueves viernes s\u00e1bado".split(" "),"field-zone":"zona horaria", +"months-standAlone-narrow":"EFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"el a\u00f1o pasado","field-month-relative+-1":"el mes pasado","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dom. lun. mar. mi\u00e9. jue. vie. s\u00e1b.".split(" "),eraNames:["antes de Cristo","anno D\u00f3mini"],"dateFormatItem-yMMMd":"d 'de' MMM 'de' y", +"days-format-narrow":"DLMXJVS".split(""),"field-month":"mes","days-standAlone-narrow":"DLMXJVS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"este martes","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"el pr\u00f3ximo martes","dayPeriods-format-wide-am":"a. m.","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E, H:mm","field-mon-relative+0":"este lunes","field-mon-relative+1":"el pr\u00f3ximo lunes", +"dateFormat-short":"d/M/yy","dateFormatItem-MMd":"d/M","dateFormatItem-EHms":"E, H:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"segundo","field-sat-relative+-1":"el s\u00e1bado pasado","dateFormatItem-yMMMEd":"EEE, d 'de' MMMM 'de' y","field-sun-relative+-1":"el domingo pasado","field-month-relative+0":"este mes","field-month-relative+1":"el pr\u00f3ximo mes","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"semana", +"dateFormat-medium":"d/M/y","field-week-relative+-1":"la semana pasada","field-year-relative+0":"este a\u00f1o","field-year-relative+1":"el pr\u00f3ximo a\u00f1o","dayPeriods-format-narrow-pm":"p.m.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM 'de' y G","field-mon-relative+-1":"el lunes pasado","field-week-relative+0":"esta semana","field-week-relative+1":"la pr\u00f3xima semana"},"dijit/nls/loading":{_localized:{},loadingState:"Cargando...", +errorState:"Lo siento, se ha producido un error"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000B","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4", +"currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 billones",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Opciones anteriores",_localized:{},nextMessage:"M\u00e1s opciones"},"dijit/nls/common":{buttonOk:"Aceptar",buttonCancel:"Cancelar",_localized:{},buttonSave:"Guardar",itemClose:"Cerrar"}}); +//# sourceMappingURL=dojo_es-es.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_fi-fi.js b/Server/www/spiderbasic/dojo/nls/dojo_fi-fi.js new file mode 100644 index 0000000..c5a5fad --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_fi-fi.js @@ -0,0 +1,17 @@ +//>>built +define("dojo/nls/dojo_fi-fi",{"dijit/form/nls/validate":{invalidMessage:"Annettu arvo ei kelpaa.",rangeMessage:"T\u00e4m\u00e4 arvo on sallitun alueen ulkopuolella.",_localized:{},missingMessage:"T\u00e4m\u00e4 arvo on pakollinen."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"su ma ti ke to pe la".split(" "),"months-format-narrow":"THMHTKHESLMJ".split(""),"field-second-relative+0":"nyt","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"viikonp\u00e4iv\u00e4", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d.M.y","field-wed-relative+0":"t\u00e4n\u00e4 keskiviikkona","field-wed-relative+1":"ensi keskiviikkona","dateFormatItem-GyMMMEd":"E d. MMM y G","dateFormatItem-MMMEd":"ccc d. MMM",eraNarrow:["eK","jK"],"dateFormatItem-yMM":"M.y","field-tue-relative+-1":"viime tiistaina","days-format-short":"su ma ti ke to pe la".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d. MMMM y","field-fri-relative+-1":"viime perjantaina", +"field-wed-relative+-1":"viime keskiviikkona","months-format-wide":"tammikuuta helmikuuta maaliskuuta huhtikuuta toukokuuta kes\u00e4kuuta hein\u00e4kuuta elokuuta syyskuuta lokakuuta marraskuuta joulukuuta".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"ip.","dateFormat-full":"cccc d. MMMM y","field-thu-relative+-1":"viime torstaina","dateFormatItem-Md":"d.M.","dayPeriods-standAlone-wide-pm":"ip.",_localized:{},"dayPeriods-format-abbr-am":"ap.","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})", +"dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d.M.y","field-era":"aikakausi","dateFormatItem-yM":"L.y","months-standAlone-wide":"tammikuu helmikuu maaliskuu huhtikuu toukokuu kes\u00e4kuu hein\u00e4kuu elokuu syyskuu lokakuu marraskuu joulukuu".split(" "),"timeFormat-short":"H.mm","quarters-format-wide":["1. nelj\u00e4nnes","2. nelj\u00e4nnes","3. nelj\u00e4nnes","4. nelj\u00e4nnes"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"H.mm.ss z","field-year":"vuosi","dateFormatItem-yMMM":"LLL y", +"dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"tunti","months-format-abbr":"tammikuuta helmikuuta maaliskuuta huhtikuuta toukokuuta kes\u00e4kuuta hein\u00e4kuuta elokuuta syyskuuta lokakuuta marraskuuta joulukuuta".split(" "),"field-sat-relative+0":"t\u00e4n\u00e4 lauantaina","field-sat-relative+1":"ensi lauantaina","timeFormat-full":"H.mm.ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"t\u00e4n\u00e4\u00e4n","field-thu-relative+0":"t\u00e4n\u00e4 torstaina", +"field-day-relative+1":"huomenna","field-thu-relative+1":"ensi torstaina","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"ylihuomenna","dateFormatItem-H":"H","months-standAlone-abbr":"tammi helmi maalis huhti touko kes\u00e4 hein\u00e4 elo syys loka marras joulu".split(" "),"quarters-format-abbr":["1. nelj.","2. nelj.","3. nelj.","4. nelj."],"quarters-standAlone-wide":["1. nelj\u00e4nnes","2. nelj\u00e4nnes","3. nelj\u00e4nnes","4. nelj\u00e4nnes"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L", +"days-standAlone-wide":"sunnuntai maanantai tiistai keskiviikko torstai perjantai lauantai".split(" "),"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H.mm.ss","field-sun-relative+0":"t\u00e4n\u00e4 sunnuntaina","dateFormatItem-Hm":"H.mm","field-sun-relative+1":"ensi sunnuntaina","quarters-standAlone-abbr":["1. nelj.","2. nelj.","3. nelj.","4. nelj."],eraAbbr:["eKr.","jKr."],"field-minute":"minuutti","field-dayperiod":"vuorokaudenaika","days-standAlone-abbr":"su ma ti ke to pe la".split(" "), +"dateFormatItem-d":"d","dateFormatItem-ms":"m.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"eilen","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"ap.","dateFormatItem-h":"h a","field-day-relative+-2":"toissap\u00e4iv\u00e4n\u00e4","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E d.M.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"t\u00e4n\u00e4 perjantaina","field-fri-relative+1":"ensi perjantaina","dateFormatItem-yMMMM":"LLLL y","field-day":"p\u00e4iv\u00e4", +"dateFormatItem-yMMMMccccd":"cccc d. MMMM y","days-format-wide":"sunnuntaina maanantaina tiistaina keskiviikkona torstaina perjantaina lauantaina".split(" "),"field-zone":"aikavy\u00f6hyke","months-standAlone-narrow":"THMHTKHESLMJ".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"viime vuonna","field-month-relative+-1":"viime kuussa","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h.mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})", +"dayPeriods-format-abbr-pm":"ip.","days-format-abbr":"su ma ti ke to pe la".split(" "),eraNames:["ennen Kristuksen syntym\u00e4\u00e4","j\u00e4lkeen Kristuksen syntym\u00e4n"],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMTKTPL".split(""),"field-month":"kuukausi","days-standAlone-narrow":"SMTKTPL".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"t\u00e4n\u00e4 tiistaina","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"ensi tiistaina","dayPeriods-format-wide-am":"ap.", +"dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dayPeriods-standAlone-wide-am":"ap.","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E H.mm","field-mon-relative+0":"t\u00e4n\u00e4 maanantaina","field-mon-relative+1":"ensi maanantaina","dateFormat-short":"d.M.y","dateFormatItem-EHms":"E H.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","dayPeriods-format-narrow-noon":"n","field-second":"sekunti","field-sat-relative+-1":"viime lauantaina","dateFormatItem-yMMMEd":"E d. MMM y", +"field-sun-relative+-1":"viime sunnuntaina","field-month-relative+0":"t\u00e4ss\u00e4 kuussa","field-month-relative+1":"ensi kuussa","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d.","field-week":"viikko","dateFormat-medium":"d.M.y","field-week-relative+-1":"viime viikolla","field-year-relative+0":"t\u00e4n\u00e4 vuonna","field-year-relative+1":"ensi vuonna","dayPeriods-format-narrow-pm":"ip.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H.mm.ss","dateFormatItem-hms":"h.mm.ss a", +"dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"viime maanantaina","field-week-relative+0":"t\u00e4ll\u00e4 viikolla","field-week-relative+1":"ensi viikolla"},"dijit/nls/loading":{_localized:{},loadingState:"Lataus on meneill\u00e4\u00e4n...",errorState:"On ilmennyt virhe."},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"\u2212","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]", +_localized:{},"decimalFormat-short":"000\u00a0bilj'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"ep\u00e4luku",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 biljoonaa",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"}, +"dijit/form/nls/ComboBox":{previousMessage:"Edelliset valinnat",_localized:{},nextMessage:"Lis\u00e4\u00e4 valintoja"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Peruuta",_localized:{},buttonSave:"Tallenna",itemClose:"Sulje"}}); +//# sourceMappingURL=dojo_fi-fi.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_fr-fr.js b/Server/www/spiderbasic/dojo/nls/dojo_fr-fr.js new file mode 100644 index 0000000..b163edb --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_fr-fr.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_fr-fr",{"dijit/form/nls/validate":{invalidMessage:"La valeur indiqu\u00e9e n'est pas correcte.",rangeMessage:"Cette valeur n'est pas comprise dans la plage autoris\u00e9e.",_localized:{},missingMessage:"Cette valeur est requise."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"maintenant","quarters-standAlone-narrow":["1", +"2","3","4"],"field-weekday":"jour de la semaine","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"ce mercredi","field-wed-relative+1":"mercredi prochain","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["av. J.-C.","ap. J.-C."],"field-tue-relative+-1":"mardi dernier","dayPeriods-format-wide-morning":"matin","days-format-short":"di lu ma me je ve sa".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y", +"field-fri-relative+-1":"vendredi dernier","field-wed-relative+-1":"mercredi dernier","months-format-wide":"janvier f\u00e9vrier mars avril mai juin juillet ao\u00fbt septembre octobre novembre d\u00e9cembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"jeudi dernier","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"midi", +"dateFormatItem-yMd":"d/M/y","field-era":"\u00e8re","dateFormatItem-yM":"M/y","months-standAlone-wide":"janvier f\u00e9vrier mars avril mai juin juillet ao\u00fbt septembre octobre novembre d\u00e9cembre".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH:mm:ss z","field-year":"ann\u00e9e","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"heure", +"months-format-abbr":"janv. f\u00e9vr. mars avr. mai juin juil. ao\u00fbt sept. oct. nov. d\u00e9c.".split(" "),"field-sat-relative+0":"ce samedi","field-sat-relative+1":"samedi prochain","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"aujourd\u2019hui","dayPeriods-format-narrow-morning":"matin","field-thu-relative+0":"ce jeudi","field-day-relative+1":"demain","field-thu-relative+1":"jeudi prochain","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"apr\u00e8s-demain", +"dateFormatItem-H":"HH 'h'","months-standAlone-abbr":"janv. f\u00e9vr. mars avr. mai juin juil. ao\u00fbt sept. oct. nov. d\u00e9c.".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"ce dimanche", +"dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"dimanche prochain","quarters-standAlone-abbr":["T1","T2","T3","T4"],eraAbbr:["av. J.-C.","ap. J.-C."],"field-minute":"minute","field-dayperiod":"cadran","days-standAlone-abbr":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),"dayPeriods-format-wide-night":"soir","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"hier","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a", +"dateFormatItem-h":"h a","field-day-relative+-2":"avant-hier","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"ce vendredi","field-fri-relative+1":"vendredi prochain","dateFormatItem-yMMMM":"MMMM y","field-day":"jour","days-format-wide":"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),"field-zone":"fuseau horaire","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})", +"field-year-relative+-1":"l\u2019ann\u00e9e derni\u00e8re","dayPeriods-format-narrow-night":"soir","field-month-relative+-1":"le mois dernier","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),eraNames:["avant J\u00e9sus-Christ","apr\u00e8s J\u00e9sus-Christ"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"DLMMJVS".split(""), +"field-month":"mois","days-standAlone-narrow":"DLMMJVS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"ce mardi","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"mardi prochain","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"ce lundi","field-mon-relative+1":"lundi prochain","dateFormat-short":"dd/MM/y","dayPeriods-format-wide-afternoon":"apr\u00e8s-midi", +"dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"midi","field-second":"seconde","field-sat-relative+-1":"samedi dernier","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"dimanche dernier","field-month-relative+0":"ce mois-ci","field-month-relative+1":"le mois prochain","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"semaine","dateFormat-medium":"d MMM y","field-week-relative+-1":"la semaine derni\u00e8re", +"field-year-relative+0":"cette ann\u00e9e","field-year-relative+1":"l\u2019ann\u00e9e prochaine","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"lundi dernier","field-week-relative+0":"cette semaine","field-week-relative+1":"la semaine prochaine"},"dijit/nls/loading":{_localized:{},loadingState:"Chargement...",errorState:"Une erreur est survenue"},"dojo/cldr/nls/number":{scientificFormat:"#E0", +"currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0Bn","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]", +perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 billions",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Choix pr\u00e9c\u00e9dents",_localized:{},nextMessage:"Plus de choix"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Annuler",_localized:{},buttonSave:"Enregistrer",itemClose:"Fermer"}}); +//# sourceMappingURL=dojo_fr-fr.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_he-il.js b/Server/www/spiderbasic/dojo/nls/dojo_he-il.js new file mode 100644 index 0000000..ffbf0ae --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_he-il.js @@ -0,0 +1,25 @@ +//>>built +define("dojo/nls/dojo_he-il",{"dijit/form/nls/validate":{invalidMessage:"\u05d4\u05e2\u05e8\u05da \u05e9\u05e6\u05d5\u05d9\u05df \u05d0\u05d9\u05e0\u05d5 \u05d7\u05d5\u05e7\u05d9.",rangeMessage:"\u05d4\u05e2\u05e8\u05da \u05de\u05d7\u05d5\u05e5 \u05dc\u05d8\u05d5\u05d5\u05d7.",_localized:{},missingMessage:"\u05d6\u05d4\u05d5 \u05e2\u05e8\u05da \u05d3\u05e8\u05d5\u05e9."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "), +"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"\u05e2\u05db\u05e9\u05d9\u05d5","quarters-standAlone-narrow":["\u05e81","\u05e82","\u05e83","\u05e84"],"field-weekday":"\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, d/M/y","field-wed-relative+0":"\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9","field-wed-relative+1":"\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9 \u05d4\u05d1\u05d0","dateFormatItem-GyMMMEd":"E, d \u05d1MMM y G", +"dateFormatItem-MMMEd":"E, d \u05d1MMM",eraNarrow:["\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1","BCE","\u05dc\u05e1\u05d4\u05f4\u05e0","CE"],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9 \u05e9\u05e2\u05d1\u05e8","days-format-short":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d \u05d1MMMM y","field-fri-relative+-1":"\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9 \u05e9\u05e2\u05d1\u05e8", +"field-wed-relative+-1":"\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9 \u05e9\u05e2\u05d1\u05e8","months-format-wide":"\u05d9\u05e0\u05d5\u05d0\u05e8 \u05e4\u05d1\u05e8\u05d5\u05d0\u05e8 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05d9\u05dc \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05d5\u05e1\u05d8 \u05e1\u05e4\u05d8\u05de\u05d1\u05e8 \u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8 \u05e0\u05d5\u05d1\u05de\u05d1\u05e8 \u05d3\u05e6\u05de\u05d1\u05e8".split(" "), +"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"\u05d0\u05d7\u05d4\u05f4\u05e6","dateFormat-full":"EEEE, d \u05d1MMMM y","field-thu-relative+-1":"\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9 \u05e9\u05e2\u05d1\u05e8","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d.M.y","field-era":"\u05ea\u05e7\u05d5\u05e4\u05d4","dateFormatItem-yM":"M.y", +"months-standAlone-wide":"\u05d9\u05e0\u05d5\u05d0\u05e8 \u05e4\u05d1\u05e8\u05d5\u05d0\u05e8 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05d9\u05dc \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05d5\u05e1\u05d8 \u05e1\u05e4\u05d8\u05de\u05d1\u05e8 \u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8 \u05e0\u05d5\u05d1\u05de\u05d1\u05e8 \u05d3\u05e6\u05de\u05d1\u05e8".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2", +"\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"\u05e9\u05e0\u05d4","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"\u05e9\u05e2\u05d4","months-format-abbr":"\u05d9\u05e0\u05d5\u05f3 \u05e4\u05d1\u05e8\u05f3 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05f3 \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05f3 \u05e1\u05e4\u05d8\u05f3 \u05d0\u05d5\u05e7\u05f3 \u05e0\u05d5\u05d1\u05f3 \u05d3\u05e6\u05de\u05f3".split(" "), +"field-sat-relative+0":"\u05d4\u05e9\u05d1\u05ea \u05d4\u05d6\u05d0\u05ea","field-sat-relative+1":"\u05d4\u05e9\u05d1\u05ea \u05d4\u05d1\u05d0\u05d4","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"\u05d4\u05d9\u05d5\u05dd","field-thu-relative+0":"\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9","field-day-relative+1":"\u05de\u05d7\u05e8","field-thu-relative+1":"\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9 \u05d4\u05d1\u05d0","dateFormatItem-GyMMMd":"d \u05d1MMM y G", +"field-day-relative+2":"\u05de\u05d7\u05e8\u05ea\u05d9\u05d9\u05dd","dateFormatItem-H":"HH","months-standAlone-abbr":"\u05d9\u05e0\u05d5\u05f3 \u05e4\u05d1\u05e8\u05f3 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05f3 \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05f3 \u05e1\u05e4\u05d8\u05f3 \u05d0\u05d5\u05e7\u05f3 \u05e0\u05d5\u05d1\u05f3 \u05d3\u05e6\u05de\u05f3".split(" "),"quarters-format-abbr":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2", +"\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],"quarters-standAlone-wide":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2","\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df;\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9;\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9;\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea".split(";"), +"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d1\u05d0","quarters-standAlone-abbr":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2","\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],eraAbbr:["\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1","BCE","\u05dc\u05e1\u05d4\u05f4\u05e0", +"CE"],"field-minute":"\u05d3\u05e7\u05d4","field-dayperiod":"\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6","days-standAlone-abbr":"\u05d9\u05d5\u05dd \u05d0\u05f3;\u05d9\u05d5\u05dd \u05d1\u05f3;\u05d9\u05d5\u05dd \u05d2\u05f3;\u05d9\u05d5\u05dd \u05d3\u05f3;\u05d9\u05d5\u05dd \u05d4\u05f3;\u05d9\u05d5\u05dd \u05d5\u05f3;\u05e9\u05d1\u05ea".split(";"),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u05d0\u05ea\u05de\u05d5\u05dc", +"dateTimeFormat-long":"{1} \u05d1\u05e9\u05e2\u05d4 {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"\u05e9\u05dc\u05e9\u05d5\u05dd","dateFormatItem-MMMd":"d \u05d1MMM","dateFormatItem-MEd":"E, d/M","dateTimeFormat-full":"{1} \u05d1\u05e9\u05e2\u05d4 {0}","field-fri-relative+0":"\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9","field-fri-relative+1":"\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9 \u05d4\u05d1\u05d0","dateFormatItem-yMMMM":"MMMM y","field-day":"\u05d9\u05d5\u05dd", +"days-format-wide":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df;\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9;\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9;\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea".split(";"),"field-zone":"\u05d0\u05d6\u05d5\u05e8","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})", +"field-year-relative+-1":"\u05d4\u05e9\u05e0\u05d4 \u05e9\u05e2\u05d1\u05e8\u05d4","field-month-relative+-1":"\u05d4\u05d7\u05d5\u05d3\u05e9 \u05e9\u05e2\u05d1\u05e8","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u05d9\u05d5\u05dd \u05d0\u05f3;\u05d9\u05d5\u05dd \u05d1\u05f3;\u05d9\u05d5\u05dd \u05d2\u05f3;\u05d9\u05d5\u05dd \u05d3\u05f3;\u05d9\u05d5\u05dd \u05d4\u05f3;\u05d9\u05d5\u05dd \u05d5\u05f3;\u05e9\u05d1\u05ea".split(";"), +eraNames:["\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4","\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4","\u05dc\u05e1\u05d4\u05f4\u05e0","CE"],"dateFormatItem-yMMMd":"d \u05d1MMM y","days-format-narrow":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"field-month":"\u05d7\u05d5\u05d3\u05e9","days-standAlone-narrow":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"dateFormatItem-MMM":"LLL", +"field-tue-relative+0":"\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9 \u05d4\u05d1\u05d0","dayPeriods-format-wide-am":"\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E H:mm","field-mon-relative+0":"\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9 \u05d4\u05d6\u05d4", +"field-mon-relative+1":"\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9 \u05d4\u05d1\u05d0","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E H:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"\u05e9\u05e0\u05d9\u05d9\u05d4","field-sat-relative+-1":"\u05d4\u05e9\u05d1\u05ea \u05e9\u05e2\u05d1\u05e8\u05d4","dateFormatItem-yMMMEd":"E, d \u05d1MMM y","field-sun-relative+-1":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df \u05e9\u05e2\u05d1\u05e8","field-month-relative+0":"\u05d4\u05d7\u05d5\u05d3\u05e9", +"field-month-relative+1":"\u05d4\u05d7\u05d5\u05d3\u05e9 \u05d4\u05d1\u05d0","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E \u05d4-d","field-week":"\u05e9\u05d1\u05d5\u05e2","dateFormat-medium":"d \u05d1MMM y","field-week-relative+-1":"\u05d4\u05e9\u05d1\u05d5\u05e2 \u05e9\u05e2\u05d1\u05e8","field-year-relative+0":"\u05d4\u05e9\u05e0\u05d4","field-year-relative+1":"\u05d4\u05e9\u05e0\u05d4 \u05d4\u05d1\u05d0\u05d4","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1}, {0}", +"dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9 \u05e9\u05e2\u05d1\u05e8","field-week-relative+0":"\u05d4\u05e9\u05d1\u05d5\u05e2","field-week-relative+1":"\u05d4\u05e9\u05d1\u05d5\u05e2 \u05d4\u05d1\u05d0"},"dijit/nls/loading":{_localized:{},loadingState:"\u05d8\u05e2\u05d9\u05e0\u05d4...",errorState:"\u05d0\u05d9\u05e8\u05e2\u05d4 \u05e9\u05d2\u05d9\u05d0\u05d4"},"dojo/cldr/nls/number":{scientificFormat:"#E0", +"currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",", +percentFormat:"#,##0%","decimalFormat-long":"000 \u05d8\u05e8\u05d9\u05dc\u05d9\u05d5\u05df",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u05d4\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d4\u05e7\u05d5\u05d3\u05de\u05d5\u05ea",_localized:{},nextMessage:"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e0\u05d5\u05e1\u05e4\u05d5\u05ea"},"dijit/nls/common":{buttonOk:"\u05d0\u05d9\u05e9\u05d5\u05e8", +buttonCancel:"\u05d1\u05d9\u05d8\u05d5\u05dc",_localized:{},buttonSave:"\u05e9\u05de\u05d9\u05e8\u05d4",itemClose:"\u05e1\u05d2\u05d9\u05e8\u05d4"}}); +//# sourceMappingURL=dojo_he-il.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_hu.js b/Server/www/spiderbasic/dojo/nls/dojo_hu.js new file mode 100644 index 0000000..2033c6c --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_hu.js @@ -0,0 +1,17 @@ +//>>built +define("dojo/nls/dojo_hu",{"dijit/form/nls/validate":{invalidMessage:"A megadott \u00e9rt\u00e9k \u00e9rv\u00e9nytelen.",rangeMessage:"Az \u00e9rt\u00e9k k\u00edv\u00fcl van a megengedett tartom\u00e1nyon.",_localized:{},missingMessage:"Meg kell adni egy \u00e9rt\u00e9ket."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"V H K Sze Cs P Szo".split(" "),"months-format-narrow":"J F M \u00c1 M J J A Sz O N D".split(" "),"field-second-relative+0":"most","quarters-standAlone-narrow":["1.", +"2.","3.","4."],"field-weekday":"h\u00e9t napja","dateFormatItem-yQQQ":"y. QQQ","dateFormatItem-yMEd":"y. MM. dd., E","field-wed-relative+0":"ez a szerda","field-wed-relative+1":"k\u00f6vetkez\u0151 szerda","dateFormatItem-GyMMMEd":"G y. MMM d., E","dateFormatItem-MMMEd":"MMM d., E",eraNarrow:["ie.","isz."],"field-tue-relative+-1":"el\u0151z\u0151 kedd","days-format-short":"V H K Sze Cs P Szo".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y. MMMM d.","field-fri-relative+-1":"el\u0151z\u0151 p\u00e9ntek", +"field-wed-relative+-1":"el\u0151z\u0151 szerda","months-format-wide":"janu\u00e1r febru\u00e1r m\u00e1rcius \u00e1prilis m\u00e1jus j\u00fanius j\u00falius augusztus szeptember okt\u00f3ber november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"du.","dateFormat-full":"y. MMMM d., EEEE","field-thu-relative+-1":"el\u0151z\u0151 cs\u00fct\u00f6rt\u00f6k","dateFormatItem-Md":"M. d.",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})", +"dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"y. MM. dd.","field-era":"\u00e9ra","dateFormatItem-yM":"y. M.","months-standAlone-wide":"janu\u00e1r febru\u00e1r m\u00e1rcius \u00e1prilis m\u00e1jus j\u00fanius j\u00falius augusztus szeptember okt\u00f3ber november december".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["I. negyed\u00e9v","II. negyed\u00e9v","III. negyed\u00e9v","IV. negyed\u00e9v"],"dateFormatItem-yQQQQ":"y. QQQQ","timeFormat-long":"H:mm:ss z","field-year":"\u00e9v", +"dateFormatItem-yMMM":"y. MMM","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"\u00f3ra","months-format-abbr":"jan. febr. m\u00e1rc. \u00e1pr. m\u00e1j. j\u00fan. j\u00fal. aug. szept. okt. nov. dec.".split(" "),"field-sat-relative+0":"ez a szombat","field-sat-relative+1":"k\u00f6vetkez\u0151 szombat","timeFormat-full":"H:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"ma","field-thu-relative+0":"ez a cs\u00fct\u00f6rt\u00f6k","field-day-relative+1":"holnap", +"field-thu-relative+1":"k\u00f6vetkez\u0151 cs\u00fct\u00f6rt\u00f6k","dateFormatItem-GyMMMd":"G y. MMM d.","field-day-relative+2":"holnaput\u00e1n","dateFormatItem-H":"H","months-standAlone-abbr":"jan. febr. m\u00e1rc. \u00e1pr. m\u00e1j. j\u00fan. j\u00fal. aug. szept. okt. nov. dec.".split(" "),"quarters-format-abbr":["N1","N2","N3","N4"],"quarters-standAlone-wide":["1. negyed\u00e9v","2. negyed\u00e9v","3. negyed\u00e9v","4. negyed\u00e9v"],"dateFormatItem-Gy":"G y.","dateFormatItem-M":"L","days-standAlone-wide":"vas\u00e1rnap h\u00e9tf\u0151 kedd szerda cs\u00fct\u00f6rt\u00f6k p\u00e9ntek szombat".split(" "), +"dateFormatItem-MMMMd":"MMMM d.","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"ez a vas\u00e1rnap","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"k\u00f6vetkez\u0151 vas\u00e1rnap","quarters-standAlone-abbr":["N1","N2","N3","N4"],eraAbbr:["i. e.","i. sz."],"field-minute":"perc","field-dayperiod":"napszak","days-standAlone-abbr":"V H K Sze Cs P Szo".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1.","2.","3.", +"4."],"field-day-relative+-1":"tegnap","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"de.","dateFormatItem-h":"a h","field-day-relative+-2":"tegnapel\u0151tt","dateFormatItem-MMMd":"MMM d.","dateFormatItem-MEd":"M. d., E","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"ez a p\u00e9ntek","field-fri-relative+1":"k\u00f6vetkez\u0151 p\u00e9ntek","dateFormatItem-yMMMM":"y. MMMM","field-day":"nap","days-format-wide":"vas\u00e1rnap h\u00e9tf\u0151 kedd szerda cs\u00fct\u00f6rt\u00f6k p\u00e9ntek szombat".split(" "), +"field-zone":"id\u0151z\u00f3na","months-standAlone-narrow":"J F M \u00c1 M J J A Sz O N D".split(" "),"dateFormatItem-y":"y.","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"el\u0151z\u0151 \u00e9v","field-month-relative+-1":"el\u0151z\u0151 h\u00f3nap","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"a h:mm","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"V H K Sze Cs P Szo".split(" "),eraNames:["id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt", +"id\u0151sz\u00e1m\u00edt\u00e1sunk szerint"],"dateFormatItem-yMMMd":"y. MMM d.","days-format-narrow":"V H K Sz Cs P Sz".split(" "),"field-month":"h\u00f3nap","days-standAlone-narrow":"V H K Sz Cs P Sz".split(" "),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"ez a kedd","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"k\u00f6vetkez\u0151 kedd","dayPeriods-format-wide-am":"de.","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})", +"dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"ez a h\u00e9tf\u0151","field-mon-relative+1":"k\u00f6vetkez\u0151 h\u00e9tf\u0151","dateFormat-short":"y. MM. dd.","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"m\u00e1sodperc","field-sat-relative+-1":"el\u0151z\u0151 szombat","dateFormatItem-yMMMEd":"y. MMM d., E","field-sun-relative+-1":"el\u0151z\u0151 vas\u00e1rnap","field-month-relative+0":"ez a h\u00f3nap","field-month-relative+1":"k\u00f6vetkez\u0151 h\u00f3nap", +"dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"d., E","field-week":"h\u00e9t","dateFormat-medium":"y. MMM d.","field-week-relative+-1":"el\u0151z\u0151 h\u00e9t","field-year-relative+0":"ez az \u00e9v","field-year-relative+1":"k\u00f6vetkez\u0151 \u00e9v","dayPeriods-format-narrow-pm":"du.","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"a h:mm:ss","dateFormatItem-GyMMM":"G y. MMM","field-mon-relative+-1":"el\u0151z\u0151 h\u00e9tf\u0151", +"field-week-relative+0":"ez a h\u00e9t","field-week-relative+1":"k\u00f6vetkez\u0151 h\u00e9t"},"dijit/nls/loading":{_localized:{},loadingState:"Bet\u00f6lt\u00e9s...",errorState:"Sajn\u00e1lom, hiba t\u00f6rt\u00e9nt"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0B", +"currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0%","decimalFormat-long":"000 billi\u00f3",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"El\u0151z\u0151 men\u00fcpontok", +_localized:{},nextMessage:"Tov\u00e1bbi men\u00fcpontok"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"M\u00e9gse",_localized:{},buttonSave:"Ment\u00e9s",itemClose:"Bez\u00e1r\u00e1s"}}); +//# sourceMappingURL=dojo_hu.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_it-it.js b/Server/www/spiderbasic/dojo/nls/dojo_it-it.js new file mode 100644 index 0000000..8afa5e3 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_it-it.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_it-it",{"dijit/form/nls/validate":{invalidMessage:"Il valore immesso non \u00e8 valido.",rangeMessage:"Questo valore \u00e8 fuori dall'intervallo consentito.",_localized:{},missingMessage:"Questo valore \u00e8 obbligatorio."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"dom lun mar mer gio ven sab".split(" "),"months-format-narrow":"GFMAMGLASOND".split(""),"field-second-relative+0":"ora","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"giorno della settimana", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"questo mercoled\u00ec","field-wed-relative+1":"mercoled\u00ec prossimo","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["aC","BCE","dC","CE"],"field-tue-relative+-1":"marted\u00ec scorso","days-format-short":"dom lun mar mer gio ven sab".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"dd MMMM y","field-fri-relative+-1":"venerd\u00ec scorso","field-wed-relative+-1":"mercoled\u00ec scorso", +"months-format-wide":"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"gioved\u00ec scorso","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d/M/y","field-era":"era","dateFormatItem-yM":"M/y", +"months-standAlone-wide":"Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1\u00ba trimestre","2\u00ba trimestre","3\u00ba trimestre","4\u00ba trimestre"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH:mm:ss z","field-year":"anno","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"ora","months-format-abbr":"gen feb mar apr mag giu lug ago set ott nov dic".split(" "), +"field-sat-relative+0":"questo sabato","field-sat-relative+1":"sabato prossimo","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"oggi","field-thu-relative+0":"questo gioved\u00ec","field-day-relative+1":"domani","field-thu-relative+1":"gioved\u00ec prossimo","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"dopodomani","dateFormatItem-H":"HH","months-standAlone-abbr":"gen feb mar apr mag giu lug ago set ott nov dic".split(" "), +"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["Primo trimestre","Secondo trimestre","Terzo trimestre","Quarto trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Domenica Luned\u00ec Marted\u00ec Mercoled\u00ec Gioved\u00ec Venerd\u00ec Sabato".split(" "),"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"questa domenica","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"domenica prossima","quarters-standAlone-abbr":["T1", +"T2","T3","T4"],eraAbbr:["aC","BCE","dC","CE"],"field-minute":"minuto","field-dayperiod":"periodo del giorno","days-standAlone-abbr":"dom lun mar mer gio ven sab".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ieri","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"m.","dateFormatItem-h":"hh a","field-day-relative+-2":"l'altro ieri","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}", +"field-fri-relative+0":"questo venerd\u00ec","field-fri-relative+1":"venerd\u00ec prossimo","dateFormatItem-yMMMM":"MMMM y","field-day":"giorno","days-format-wide":"domenica luned\u00ec marted\u00ec mercoled\u00ec gioved\u00ec venerd\u00ec sabato".split(" "),"field-zone":"fuso orario","months-standAlone-narrow":"GFMAMGLASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"anno scorso","field-month-relative+-1":"mese scorso","dateTimeFormats-appendItem-Year":"{1} {0}", +"dateFormatItem-hm":"hh:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dom lun mar mer gio ven sab".split(" "),eraNames:["a.C.","BCE","d.C.","CE"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"DLMMGVS".split(""),"field-month":"mese","days-standAlone-narrow":"DLMMGVS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"questo marted\u00ec","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"marted\u00ec prossimo", +"dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH.mm","field-mon-relative+0":"questo luned\u00ec","field-mon-relative+1":"luned\u00ec prossimo","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"secondo","field-sat-relative+-1":"sabato scorso","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"domenica scorsa", +"field-month-relative+0":"questo mese","field-month-relative+1":"mese prossimo","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"settimana","dateFormat-medium":"dd/MMM/y","field-week-relative+-1":"settimana scorsa","field-year-relative+0":"quest'anno","field-year-relative+1":"anno prossimo","dayPeriods-format-narrow-pm":"p.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"hh:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"luned\u00ec scorso", +"field-week-relative+0":"questa settimana","field-week-relative+1":"settimana prossima"},"dijit/nls/loading":{_localized:{},loadingState:"Caricamento in corso...",errorState:"Si \u00e8 verificato un errore"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0Bln", +"currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 bilioni",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Scelte precedenti",_localized:{}, +nextMessage:"Scelte successive"},"dijit/nls/common":{buttonOk:"Ok",buttonCancel:"Annulla",_localized:{},buttonSave:"Salva",itemClose:"Chiudi"}}); +//# sourceMappingURL=dojo_it-it.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_ja-jp.js b/Server/www/spiderbasic/dojo/nls/dojo_ja-jp.js new file mode 100644 index 0000000..dc885ab --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_ja-jp.js @@ -0,0 +1,19 @@ +//>>built +define("dojo/nls/dojo_ja-jp",{"dijit/form/nls/validate":{invalidMessage:"\u5165\u529b\u3057\u305f\u5024\u306f\u7121\u52b9\u3067\u3059\u3002",rangeMessage:"\u3053\u306e\u5024\u306f\u7bc4\u56f2\u5916\u3067\u3059\u3002",_localized:{},missingMessage:"\u3053\u306e\u5024\u306f\u5fc5\u9808\u3067\u3059\u3002"},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"a K \u6642 mm \u5206 (E)","days-standAlone-short":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "), +"field-second-relative+0":"\u4eca\u3059\u3050","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u66dc\u65e5","dateFormatItem-yQQQ":"y/QQQ","dateFormatItem-yMEd":"y/M/d(E)","field-wed-relative+0":"\u4eca\u9031\u306e\u6c34\u66dc\u65e5","field-wed-relative+1":"\u6765\u9031\u306e\u6c34\u66dc\u65e5","dateFormatItem-GyMMMEd":"Gy\u5e74M\u6708d\u65e5(E)","dateFormatItem-MMMEd":"M\u6708d\u65e5(E)",eraNarrow:["BC","BCE","AD","CE"],"dateFormatItem-yMM":"y/MM","field-tue-relative+-1":"\u5148\u9031\u306e\u706b\u66dc\u65e5", +"days-format-short":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y\u5e74M\u6708d\u65e5","field-fri-relative+-1":"\u5148\u9031\u306e\u91d1\u66dc\u65e5","field-wed-relative+-1":"\u5148\u9031\u306e\u6c34\u66dc\u65e5","months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u5348\u5f8c", +"dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-thu-relative+-1":"\u5148\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-Md":"M/d",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"\u6b63\u5348","dateFormatItem-yMd":"y/M/d","field-era":"\u6642\u4ee3","dateFormatItem-yM":"y/M","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"timeFormat-short":"H:mm", +"quarters-format-wide":["\u7b2c1\u56db\u534a\u671f","\u7b2c2\u56db\u534a\u671f","\u7b2c3\u56db\u534a\u671f","\u7b2c4\u56db\u534a\u671f"],"dateFormatItem-MEEEEd":"M/dEEEE","dateFormatItem-yQQQQ":"yQQQQ","timeFormat-long":"H:mm:ss z","field-year":"\u5e74","dateFormatItem-yMMM":"y\u5e74M\u6708","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"\u6642","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-sat-relative+0":"\u4eca\u9031\u306e\u571f\u66dc\u65e5", +"field-sat-relative+1":"\u6765\u9031\u306e\u571f\u66dc\u65e5","timeFormat-full":"H\u6642mm\u5206ss\u79d2 zzzz","dateFormatItem-yMEEEEd":"y/M/dEEEE","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"\u4eca\u65e5","field-thu-relative+0":"\u4eca\u9031\u306e\u6728\u66dc\u65e5","field-day-relative+1":"\u660e\u65e5","field-thu-relative+1":"\u6765\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-GyMMMd":"Gy\u5e74M\u6708d\u65e5","field-day-relative+2":"\u660e\u5f8c\u65e5","dateFormatItem-H":"H\u6642", +"months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["\u7b2c1\u56db\u534a\u671f","\u7b2c2\u56db\u534a\u671f","\u7b2c3\u56db\u534a\u671f","\u7b2c4\u56db\u534a\u671f"],"dateFormatItem-Gy":"Gy\u5e74","dateFormatItem-M":"M\u6708","days-standAlone-wide":"\u65e5\u66dc\u65e5 \u6708\u66dc\u65e5 \u706b\u66dc\u65e5 \u6c34\u66dc\u65e5 \u6728\u66dc\u65e5 \u91d1\u66dc\u65e5 \u571f\u66dc\u65e5".split(" "), +"dateFormatItem-yMMMEEEEd":"y\u5e74M\u6708d\u65e5EEEE","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"\u4eca\u9031\u306e\u65e5\u66dc\u65e5","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"\u6765\u9031\u306e\u65e5\u66dc\u65e5","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["\u7d00\u5143\u524d","\u897f\u66a6"],"field-minute":"\u5206","field-dayperiod":"\u5348\u524d/\u5348\u5f8c","days-standAlone-abbr":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""), +"dateFormatItem-d":"d\u65e5","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u6628\u65e5","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"\u5348\u524d","dateFormatItem-h":"aK\u6642","field-day-relative+-2":"\u4e00\u6628\u65e5","dateFormatItem-MMMd":"M\u6708d\u65e5","dateFormatItem-EEEEd":"d\u65e5EEEE","dateFormatItem-MEd":"M/d(E)","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u4eca\u9031\u306e\u91d1\u66dc\u65e5","field-fri-relative+1":"\u6765\u9031\u306e\u91d1\u66dc\u65e5", +"field-day":"\u65e5","days-format-wide":"\u65e5\u66dc\u65e5 \u6708\u66dc\u65e5 \u706b\u66dc\u65e5 \u6c34\u66dc\u65e5 \u6728\u66dc\u65e5 \u91d1\u66dc\u65e5 \u571f\u66dc\u65e5".split(" "),"field-zone":"\u30bf\u30a4\u30e0\u30be\u30fc\u30f3","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"dateFormatItem-y":"y\u5e74","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"\u6628\u5e74","field-month-relative+-1":"\u5148\u6708","dateTimeFormats-appendItem-Year":"{1} {0}", +"dateFormatItem-hm":"aK:mm","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateFormatItem-GyMMMEEEEd":"Gy\u5e74M\u6708d\u65e5EEEE","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),eraNames:["\u7d00\u5143\u524d","\u897f\u66a6\u7d00\u5143\u524d","\u897f\u66a6"],"dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5","days-format-narrow":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-MMMEEEEd":"M\u6708d\u65e5EEEE","field-month":"\u6708", +"days-standAlone-narrow":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-MMM":"M\u6708","field-tue-relative+0":"\u4eca\u9031\u306e\u706b\u66dc\u65e5","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"\u6765\u9031\u306e\u706b\u66dc\u65e5","dayPeriods-format-wide-am":"\u5348\u524d","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"HH \u6642 mm \u5206 (E)","field-mon-relative+0":"\u4eca\u9031\u306e\u6708\u66dc\u65e5", +"field-mon-relative+1":"\u6765\u9031\u306e\u6708\u66dc\u65e5","dateFormat-short":"y/MM/dd","dateFormatItem-EHms":"HH \u6642 mm \u5206 ss \u79d2 (E)","dateFormatItem-Ehms":"a K \u6642 mm \u5206 ss \u79d2 (E)","dayPeriods-format-narrow-noon":"\u6b63\u5348","field-second":"\u79d2","field-sat-relative+-1":"\u5148\u9031\u306e\u571f\u66dc\u65e5","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5(E)","field-sun-relative+-1":"\u5148\u9031\u306e\u65e5\u66dc\u65e5","field-month-relative+0":"\u4eca\u6708","field-month-relative+1":"\u7fcc\u6708", +"dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"d\u65e5(E)","field-week":"\u9031","dateFormat-medium":"y/MM/dd","field-week-relative+-1":"\u5148\u9031","field-year-relative+0":"\u4eca\u5e74","field-year-relative+1":"\u7fcc\u5e74","dayPeriods-format-narrow-pm":"\u5348\u5f8c","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"aK:mm:ss","dateFormatItem-GyMMM":"Gy\u5e74M\u6708","field-mon-relative+-1":"\u5148\u9031\u306e\u6708\u66dc\u65e5","field-week-relative+0":"\u4eca\u9031", +"field-week-relative+1":"\u7fcc\u9031"},"dijit/nls/loading":{_localized:{},loadingState:"\u30ed\u30fc\u30c9\u4e2d...",errorState:"\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u5146","currencySpacing-afterCurrency-insertBetween":"\u00a0", +nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000\u5146",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u4ee5\u524d\u306e\u9078\u629e\u9805\u76ee",_localized:{},nextMessage:"\u8ffd\u52a0\u306e\u9078\u629e\u9805\u76ee"}, +"dijit/nls/common":{buttonOk:"OK",buttonCancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",_localized:{},buttonSave:"\u4fdd\u5b58",itemClose:"\u9589\u3058\u308b"}}); +//# sourceMappingURL=dojo_ja-jp.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_ko-kr.js b/Server/www/spiderbasic/dojo/nls/dojo_ko-kr.js new file mode 100644 index 0000000..f275237 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_ko-kr.js @@ -0,0 +1,19 @@ +//>>built +define("dojo/nls/dojo_ko-kr",{"dijit/form/nls/validate":{invalidMessage:"\uc785\ub825\ub41c \uac12\uc774 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.",rangeMessage:"\uc774 \uac12\uc740 \ubc94\uc704\ub97c \ubc97\uc5b4\ub0a9\ub2c8\ub2e4.",_localized:{},missingMessage:"\uc774 \uac12\uc740 \ud544\uc218\uc785\ub2c8\ub2e4."},"dojo/cldr/nls/gregorian":{"dateTimeFormats-appendItem-Year":"{1} {0}","field-tue-relative+-1":"\uc9c0\ub09c \ud654\uc694\uc77c","field-year":"\ub144","dateFormatItem-MEEEEd":"M. d. EEEE", +"dateFormatItem-Hm":"HH:mm","field-wed-relative+0":"\uc774\ubc88 \uc218\uc694\uc77c","field-wed-relative+1":"\ub2e4\uc74c \uc218\uc694\uc77c","dateFormatItem-ms":"mm:ss","timeFormat-short":"a h:mm","field-minute":"\ubd84","dateTimeFormat-short":"{1} {0}","field-day-relative+0":"\uc624\ub298","field-day-relative+1":"\ub0b4\uc77c","field-day-relative+2":"\ubaa8\ub808","field-tue-relative+0":"\uc774\ubc88 \ud654\uc694\uc77c","field-tue-relative+1":"\ub2e4\uc74c \ud654\uc694\uc77c","dayPeriods-format-narrow-am":"a", +"dateFormatItem-MMMd":"MMM d\uc77c","dayPeriods-format-abbr-am":"AM","field-week-relative+0":"\uc774\ubc88 \uc8fc","field-month-relative+0":"\uc774\ubc88 \ub2ec","field-week-relative+1":"\ub2e4\uc74c \uc8fc","field-month-relative+1":"\ub2e4\uc74c \ub2ec","timeFormat-medium":"a h:mm:ss","field-second-relative+0":"\uc9c0\uae08","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","months-standAlone-narrow":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "), +eraNames:["\uc11c\ub825\uae30\uc6d0\uc804","\uc11c\ub825\uae30\uc6d0"],"dateFormatItem-GyMMMEd":"G y\ub144 MMM d\uc77c (E)","field-day":"\uc77c","field-year-relative+-1":"\uc9c0\ub09c\ud574","dayPeriods-format-wide-am":"\uc624\uc804","field-wed-relative+-1":"\uc9c0\ub09c \uc218\uc694\uc77c","dateTimeFormat-medium":"{1} {0}","field-second":"\ucd08","days-standAlone-narrow":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-Ehms":"(E) a h:mm:ss","dateFormat-long":"y\ub144 M\uc6d4 d\uc77c", +"dateFormatItem-GyMMMd":"G y\ub144 MMM d\uc77c","dateFormatItem-yMMMEd":"y\ub144 MMM d\uc77c (E)","dateFormatItem-MMMEEEEd":"MMM d\uc77c EEEE","quarters-standAlone-wide":["\uc81c 1/4\ubd84\uae30","\uc81c 2/4\ubd84\uae30","\uc81c 3/4\ubd84\uae30","\uc81c 4/4\ubd84\uae30"],"days-format-narrow":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-mon-relative+-1":"\uc9c0\ub09c \uc6d4\uc694\uc77c","dateFormatItem-GyMMM":"G y\ub144 MMM","field-month":"\uc6d4", +"dateFormatItem-MMM":"LLL","field-dayperiod":"\uc624\uc804/\uc624\ud6c4","dayPeriods-format-narrow-pm":"p","dateFormat-medium":"y. M. d.","dateFormatItem-EEEEd":"d\uc77c EEEE",eraAbbr:["\uae30\uc6d0\uc804","\uc11c\uae30"],"quarters-standAlone-abbr":["1\ubd84\uae30","2\ubd84\uae30","3\ubd84\uae30","4\ubd84\uae30"],"dayPeriods-format-abbr-pm":"PM","field-mon-relative+0":"\uc774\ubc88 \uc6d4\uc694\uc77c","field-mon-relative+1":"\ub2e4\uc74c \uc6d4\uc694\uc77c","months-format-narrow":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "), +"days-format-short":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"quarters-format-narrow":["1","2","3","4"],"dayPeriods-format-wide-pm":"\uc624\ud6c4","field-sat-relative+-1":"\uc9c0\ub09c \ud1a0\uc694\uc77c","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormat-long":"{1} {0}","dateFormatItem-Md":"M. d.","field-hour":"\uc2dc","dateFormatItem-yQQQQ":"y\ub144 QQQQ","months-format-wide":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "), +"dateFormat-full":"y\ub144 M\uc6d4 d\uc77c EEEE","field-month-relative+-1":"\uc9c0\ub09c\ub2ec","dateFormatItem-Hms":"H\uc2dc m\ubd84 s\ucd08","field-fri-relative+0":"\uc774\ubc88 \uae08\uc694\uc77c","field-fri-relative+1":"\ub2e4\uc74c \uae08\uc694\uc77c","dayPeriods-format-narrow-noon":"n","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})",_localized:{},"field-week-relative+-1":"\uc9c0\ub09c\uc8fc","dateFormatItem-Ehm":"(E) a h:mm","months-format-abbr":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "), +"timeFormat-long":"a h\uc2dc m\ubd84 s\ucd08 z","dateFormatItem-yMMM":"y\ub144 MMM","dateFormat-short":"yy. M. d.","days-standAlone-wide":"\uc77c\uc694\uc77c \uc6d4\uc694\uc77c \ud654\uc694\uc77c \uc218\uc694\uc77c \ubaa9\uc694\uc77c \uae08\uc694\uc77c \ud1a0\uc694\uc77c".split(" "),"dateFormatItem-yMMMEEEEd":"y\ub144 MMM d\uc77c EEEE","dateTimeFormats-appendItem-Era":"{1} {0}","dateFormatItem-mmss":"mm:ss","dateFormatItem-H":"H\uc2dc","dateFormatItem-M":"M\uc6d4","months-standAlone-wide":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "), +"field-sun-relative+-1":"\uc9c0\ub09c \uc77c\uc694\uc77c","days-standAlone-abbr":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateTimeFormat-full":"{1} {0}","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-hm":"a h:mm","dateFormatItem-d":"d\uc77c","field-weekday":"\uc694\uc77c","field-sat-relative+0":"\uc774\ubc88 \ud1a0\uc694\uc77c","dateFormatItem-h":"a h\uc2dc","field-sat-relative+1":"\ub2e4\uc74c \ud1a0\uc694\uc77c","months-standAlone-abbr":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "), +"dateFormatItem-yMM":"y. M.","timeFormat-full":"a h\uc2dc m\ubd84 s\ucd08 zzzz","dateFormatItem-MEd":"M. d. (E)","dateFormatItem-y":"y\ub144","field-thu-relative+0":"\uc774\ubc88 \ubaa9\uc694\uc77c","field-thu-relative+1":"\ub2e4\uc74c \ubaa9\uc694\uc77c","dateFormatItem-hms":"a h:mm:ss","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dayPeriods-format-abbr-noon":"noon","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-thu-relative+-1":"\uc9c0\ub09c \ubaa9\uc694\uc77c","dateFormatItem-yMd":"y. M. d.", +"field-week":"\uc8fc","quarters-standAlone-narrow":["1","2","3","4"],"quarters-format-wide":["\uc81c 1/4\ubd84\uae30","\uc81c 2/4\ubd84\uae30","\uc81c 3/4\ubd84\uae30","\uc81c 4/4\ubd84\uae30"],"dateFormatItem-Ed":"d\uc77c (E)","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","days-standAlone-short":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"quarters-format-abbr":["1\ubd84\uae30","2\ubd84\uae30","3\ubd84\uae30","4\ubd84\uae30"],"field-year-relative+0":"\uc62c\ud574","field-year-relative+1":"\ub0b4\ub144", +"field-fri-relative+-1":"\uc9c0\ub09c \uae08\uc694\uc77c",eraNarrow:["\uae30\uc6d0\uc804","\uc11c\uae30"],"dayPeriods-format-wide-noon":"noon","dateFormatItem-yQQQ":"y\ub144 QQQ","days-format-wide":"\uc77c\uc694\uc77c \uc6d4\uc694\uc77c \ud654\uc694\uc77c \uc218\uc694\uc77c \ubaa9\uc694\uc77c \uae08\uc694\uc77c \ud1a0\uc694\uc77c".split(" "),"dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-EHm":"(E) HH:mm","dateFormatItem-GyMMMEEEEd":"G y\ub144 MMM d\uc77c EEEE","field-zone":"\uc2dc\uac04\ub300", +"dateFormatItem-yM":"y. M.","dateFormatItem-MMMEd":"MMM d\uc77c (E)","dateFormatItem-EHms":"(E) HH:mm:ss","dateFormatItem-yMEd":"y. M. d. (E)","field-day-relative+-1":"\uc5b4\uc81c","field-day-relative+-2":"\uadf8\uc800\uaed8","days-format-abbr":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"field-sun-relative+0":"\uc774\ubc88 \uc77c\uc694\uc77c","field-sun-relative+1":"\ub2e4\uc74c \uc77c\uc694\uc77c","dateFormatItem-yMMMd":"y\ub144 MMM d\uc77c","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})", +"dateFormatItem-Gy":"G y\ub144","field-era":"\uc5f0\ud638","dateFormatItem-yMEEEEd":"y. M. d. EEEE"},"dijit/nls/loading":{_localized:{},loadingState:"\ub85c\ub4dc \uc911...",errorState:"\uc8c4\uc1a1\ud569\ub2c8\ub2e4. \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4."},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]", +_localized:{},"decimalFormat-short":"000\uc870","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000\uc870",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\uc774\uc804 \uc120\ud0dd\uc0ac\ud56d", +_localized:{},nextMessage:"\uae30\ud0c0 \uc120\ud0dd\uc0ac\ud56d"},"dijit/nls/common":{buttonOk:"\ud655\uc778",buttonCancel:"\ucde8\uc18c",_localized:{},buttonSave:"\uc800\uc7a5",itemClose:"\ub2eb\uae30"}}); +//# sourceMappingURL=dojo_ko-kr.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_nb.js b/Server/www/spiderbasic/dojo/nls/dojo_nb.js new file mode 100644 index 0000000..191876a --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_nb.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_nb",{"dijit/form/nls/validate":{invalidMessage:"Den angitte verdien er ikke gyldig.",rangeMessage:"Denne verdien er utenfor gyldig omr\u00e5de.",_localized:{},missingMessage:"Denne verdien er obligatorisk."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"s\u00f8. ma. ti. on. to. fr. l\u00f8.".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"n\u00e5","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Ukedag", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d.MM.y","field-wed-relative+0":"onsdag denne uken","field-wed-relative+1":"onsdag neste uke","dateFormatItem-GyMMMEd":"E d. MMM y G","dateFormatItem-MMMEd":"E d. MMM",eraNarrow:["f.Kr.","fvt.","e.Kr.","vt"],"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"tirsdag sist uke","days-format-short":"s\u00f8. ma. ti. on. to. fr. l\u00f8.".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d. MMMM y","field-fri-relative+-1":"fredag sist uke", +"field-wed-relative+-1":"onsdag sist uke","months-format-wide":"januar februar mars april mai juni juli august september oktober november desember".split(" "),"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"p.m.","dateFormat-full":"EEEE d. MMMM y","field-thu-relative+-1":"torsdag sist uke","dateFormatItem-Md":"d.M.",_localized:{},"dayPeriods-format-abbr-am":"a.m.","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d.M.y", +"field-era":"Tidsalder","dateFormatItem-yM":"M.y","months-standAlone-wide":"januar februar mars april mai juni juli august september oktober november desember".split(" "),"timeFormat-short":"HH.mm","quarters-format-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH.mm.ss z","field-year":"\u00c5r","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"Time","dateFormatItem-MMdd":"d.M.","months-format-abbr":"jan. feb. mar. apr. mai jun. jul. aug. sep. okt. nov. des.".split(" "), +"field-sat-relative+0":"l\u00f8rdag denne uken","field-sat-relative+1":"l\u00f8rdag neste uke","timeFormat-full":"HH.mm.ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"i dag","field-thu-relative+0":"torsdag denne uken","field-day-relative+1":"i morgen","field-thu-relative+1":"torsdag neste uke","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"i overmorgen","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mar apr mai jun jul aug sep okt nov des".split(" "), +"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L.","days-standAlone-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH.mm.ss","field-sun-relative+0":"s\u00f8ndag denne uken","dateFormatItem-Hm":"HH.mm","field-sun-relative+1":"s\u00f8ndag neste uke","quarters-standAlone-abbr":["K1","K2", +"K3","K4"],eraAbbr:["f.Kr.","e.Kr."],"field-minute":"Minutt","field-dayperiod":"AM/PM","days-standAlone-abbr":"s\u00f8. ma. ti. on. to. fr. l\u00f8.".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i g\u00e5r","dateTimeFormat-long":"{1} 'kl.' {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"i forg\u00e5rs","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E d.M","dateTimeFormat-full":"{1} {0}", +"field-fri-relative+0":"fredag denne uken","field-fri-relative+1":"fredag neste uke","dateFormatItem-yMMMM":"MMMM y","field-day":"Dag","days-format-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"field-zone":"Tidssone","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"I fjor","field-month-relative+-1":"Sist m\u00e5ned","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h.mm a", +"dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"p.m.","days-format-abbr":"s\u00f8n. man. tir. ons. tor. fre. l\u00f8r.".split(" "),eraNames:["f.Kr.","e.Kr."],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMTOTFL".split(""),"field-month":"M\u00e5ned","days-standAlone-narrow":"SMTOTFL".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"tirsdag denne uken","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"tirsdag neste uke", +"dayPeriods-format-wide-am":"a.m.","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH.mm","field-mon-relative+0":"mandag denne uken","field-mon-relative+1":"mandag neste uke","dateFormat-short":"dd.MM.yy","dateFormatItem-EHms":"E HH.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","dayPeriods-format-narrow-noon":"n","field-second":"Sekund","field-sat-relative+-1":"l\u00f8rdag sist uke","dateFormatItem-yMMMEd":"E d. MMM y", +"field-sun-relative+-1":"s\u00f8ndag sist uke","field-month-relative+0":"Denne m\u00e5neden","field-month-relative+1":"Neste m\u00e5ned","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d.","field-week":"Uke","dateFormat-medium":"d. MMM y","field-week-relative+-1":"Sist uke","field-year-relative+0":"Dette \u00e5ret","field-year-relative+1":"Neste \u00e5r","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH.mm.ss","dateFormatItem-hms":"h.mm.ss a", +"dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"mandag sist uke","field-week-relative+0":"Denne uken","field-week-relative+1":"Neste uke"},"dijit/nls/loading":{_localized:{},loadingState:"Laster inn...",errorState:"Det oppsto en feil"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"\u2212","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]", +_localized:{},"decimalFormat-short":"000\u00a0bill","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4\u00a0#,##0.00","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 billioner",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Tidligere valg", +_localized:{},nextMessage:"Flere valg"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Avbryt",_localized:{},buttonSave:"Lagre",itemClose:"Lukk"}}); +//# sourceMappingURL=dojo_nb.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_nl-nl.js b/Server/www/spiderbasic/dojo/nls/dojo_nl-nl.js new file mode 100644 index 0000000..b63bf3b --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_nl-nl.js @@ -0,0 +1,15 @@ +//>>built +define("dojo/nls/dojo_nl-nl",{"dijit/form/nls/validate":{invalidMessage:"De opgegeven waarde is ongeldig.",rangeMessage:"Deze waarde is niet toegestaan.",_localized:{},missingMessage:"Deze waarde is verplicht."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"zo ma di wo do vr za".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"nu","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dag van de week","dateFormatItem-yQQQ":"QQQ y", +"dateFormatItem-yMEd":"E d-M-y","field-wed-relative+0":"deze woensdag","field-wed-relative+1":"volgende week woensdag","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["v.C.","vgj","n.C.","gj"],"field-tue-relative+-1":"afgelopen dinsdag","days-format-short":"zo ma di wo do vr za".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y","field-fri-relative+-1":"afgelopen vrijdag","field-wed-relative+-1":"afgelopen woensdag","months-format-wide":"januari februari maart april mei juni juli augustus september oktober november december".split(" "), +"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"afgelopen donderdag","dateFormatItem-Md":"d-M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"12 uur 's middags","dateFormatItem-yMd":"d-M-y","field-era":"Tijdperk","dateFormatItem-yM":"M-y","months-standAlone-wide":"januari februari maart april mei juni juli augustus september oktober november december".split(" "), +"timeFormat-short":"HH:mm","quarters-format-wide":["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH:mm:ss z","field-year":"Jaar","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"Uur","months-format-abbr":"jan. feb. mrt. apr. mei jun. jul. aug. sep. okt. nov. dec.".split(" "),"field-sat-relative+0":"deze zaterdag","field-sat-relative+1":"volgende week zaterdag","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})", +"field-day-relative+0":"vandaag","field-thu-relative+0":"deze donderdag","field-day-relative+1":"morgen","field-thu-relative+1":"volgende week donderdag","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"overmorgen","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L", +"days-standAlone-wide":"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"12 uur 's middags","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"deze zondag","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"volgende week zondag","quarters-standAlone-abbr":["K1","K2","K3","K4"],eraAbbr:["v.Chr.","n.Chr."],"field-minute":"Minuut","field-dayperiod":"AM/PM","days-standAlone-abbr":"zo ma di wo do vr za".split(" "), +"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"gisteren","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM","dateFormatItem-h":"h a","field-day-relative+-2":"eergisteren","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d-M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"deze vrijdag","field-fri-relative+1":"volgende week vrijdag","dateFormatItem-yMMMM":"MMMM y","field-day":"Dag","days-format-wide":"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "), +"field-zone":"Zone","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"vorig jaar","field-month-relative+-1":"vorige maand","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"zo ma di wo do vr za".split(" "),eraNames:["Voor Christus","v\u00f3\u00f3r gewone jaartelling","na Christus", +"gewone jaartelling"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"ZMDWDVZ".split(""),"field-month":"Maand","days-standAlone-narrow":"ZMDWDVZ".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"deze dinsdag","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"volgende week dinsdag","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"deze maandag", +"field-mon-relative+1":"volgende week maandag","dateFormat-short":"dd-MM-yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Seconde","field-sat-relative+-1":"afgelopen zaterdag","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"afgelopen zondag","field-month-relative+0":"deze maand","field-month-relative+1":"volgende maand","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"Week", +"dateFormat-medium":"d MMM y","field-week-relative+-1":"vorige week","field-year-relative+0":"dit jaar","field-year-relative+1":"volgend jaar","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"afgelopen maandag","field-week-relative+0":"deze week","field-week-relative+1":"volgende week"},"dijit/nls/loading":{_localized:{},loadingState:"Bezig met laden...",errorState:"Er is een fout opgetreden"}, +"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0bln'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4\u00a0#,##0.00;(\u00a4\u00a0#,##0.00)", +"currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 biljoen",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Eerdere opties",_localized:{},nextMessage:"Meer opties"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Annuleren",_localized:{},buttonSave:"Opslaan",itemClose:"Sluiten"}}); +//# sourceMappingURL=dojo_nl-nl.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_pl.js b/Server/www/spiderbasic/dojo/nls/dojo_pl.js new file mode 100644 index 0000000..3bb51e9 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_pl.js @@ -0,0 +1,17 @@ +//>>built +define("dojo/nls/dojo_pl",{"dijit/form/nls/validate":{invalidMessage:"Wprowadzona warto\u015b\u0107 jest nieprawid\u0142owa.",rangeMessage:"Ta warto\u015b\u0107 jest spoza zakresu.",_localized:{},missingMessage:"Ta warto\u015b\u0107 jest wymagana."},"dojo/cldr/nls/gregorian":{"dateTimeFormats-appendItem-Year":"{1} {0}","field-tue-relative+-1":"w zesz\u0142y wtorek","field-year":"rok","dateFormatItem-Hm":"HH:mm","field-wed-relative+0":"w t\u0119 \u015brod\u0119","field-wed-relative+1":"w przysz\u0142\u0105 \u015brod\u0119", +"dayPeriods-format-wide-night":"w nocy","dateFormatItem-ms":"mm:ss","timeFormat-short":"HH:mm","field-minute":"minuta","dateTimeFormat-short":"{1}, {0}","field-day-relative+0":"dzisiaj","field-day-relative+1":"jutro","field-day-relative+2":"pojutrze","field-tue-relative+0":"w ten wtorek","field-tue-relative+1":"w przysz\u0142y wtorek","dayPeriods-format-narrow-am":"a","dateFormatItem-MMMd":"d MMM","dayPeriods-format-abbr-am":"AM","field-week-relative+0":"w tym tygodniu","field-month-relative+0":"w tym miesi\u0105cu", +"field-week-relative+1":"w przysz\u0142ym tygodniu","field-month-relative+1":"w przysz\u0142ym miesi\u0105cu","timeFormat-medium":"HH:mm:ss","field-second-relative+0":"teraz","dayPeriods-format-wide-afternoon":"po po\u0142udniu","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","months-standAlone-narrow":"slmkmclswplg".split(""),eraNames:["p.n.e.","n.e."],"dateFormatItem-GyMMMEd":"E, d MMM y G","field-day":"dzie\u0144","field-year-relative+-1":"w zesz\u0142ym roku","dayPeriods-format-wide-am":"AM", +"field-wed-relative+-1":"w zesz\u0142\u0105 \u015brod\u0119","dateTimeFormat-medium":"{1}, {0}","field-second":"sekunda","days-standAlone-narrow":"NPW\u015aCPS".split(""),"dateFormatItem-Ehms":"E, h:mm:ss a","dateFormat-long":"d MMMM y","dateFormatItem-GyMMMd":"d MMM y G","dateFormatItem-yMMMEd":"E, d MMM y","quarters-standAlone-wide":["I kwarta\u0142","II kwarta\u0142","III kwarta\u0142","IV kwarta\u0142"],"days-format-narrow":"NPW\u015aCPS".split(""),"dateTimeFormats-appendItem-Timezone":"{0} {1}", +"field-mon-relative+-1":"w zesz\u0142y poniedzia\u0142ek","dateFormatItem-GyMMM":"MMM y G","field-month":"miesi\u0105c","dateFormatItem-MMM":"LLL","field-dayperiod":"rano / po po\u0142udniu / wieczorem","dayPeriods-format-narrow-pm":"p","dateFormat-medium":"d MMM y",eraAbbr:["p.n.e.","n.e."],"quarters-standAlone-abbr":["1 kw.","2 kw.","3 kw.","4 kw."],"dayPeriods-format-abbr-pm":"PM","field-mon-relative+0":"w ten poniedzia\u0142ek","field-mon-relative+1":"w przysz\u0142y poniedzia\u0142ek","months-format-narrow":"slmkmclswplg".split(""), +"days-format-short":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"quarters-format-narrow":["1","2","3","4"],"dayPeriods-format-wide-pm":"PM","field-sat-relative+-1":"w zesz\u0142\u0105 sobot\u0119","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormat-long":"{1} {0}","dateFormatItem-Md":"d.MM","field-hour":"godzina","dateFormatItem-yQQQQ":"QQQQ y","months-format-wide":"stycznia lutego marca kwietnia maja czerwca lipca sierpnia wrze\u015bnia pa\u017adziernika listopada grudnia".split(" "), +"dateFormat-full":"EEEE, d MMMM y","field-month-relative+-1":"w zesz\u0142ym miesi\u0105cu","dayPeriods-format-wide-earlyMorning":"nad ranem","dateFormatItem-Hms":"HH:mm:ss","field-fri-relative+0":"w ten pi\u0105tek","field-fri-relative+1":"w przysz\u0142y pi\u0105tek","dayPeriods-format-narrow-noon":"n","dayPeriods-format-wide-morning":"rano","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})",_localized:{},"field-week-relative+-1":"Zesz\u0142y tydzie\u0144","dateFormatItem-Ehm":"E, h:mm a","months-format-abbr":"sty lut mar kwi maj cze lip sie wrz pa\u017a lis gru".split(" "), +"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"LLL y","dateFormat-short":"dd.MM.y","days-standAlone-wide":"niedziela poniedzia\u0142ek wtorek \u015broda czwartek pi\u0105tek sobota".split(" "),"dateTimeFormats-appendItem-Era":"{1} {0}","dateFormatItem-MMMMd":"d MMMM","dateFormatItem-H":"HH","dateFormatItem-M":"L","months-standAlone-wide":"stycze\u0144 luty marzec kwiecie\u0144 maj czerwiec lipiec sierpie\u0144 wrzesie\u0144 pa\u017adziernik listopad grudzie\u0144".split(" "),"field-sun-relative+-1":"w zesz\u0142\u0105 niedziel\u0119", +"days-standAlone-abbr":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"dateTimeFormat-full":"{1} {0}","dateFormatItem-hm":"h:mm a","dateFormatItem-d":"d","field-weekday":"dzie\u0144 tygodnia","field-sat-relative+0":"w t\u0119 sobot\u0119","dateFormatItem-h":"h a","field-sat-relative+1":"w przysz\u0142\u0105 sobot\u0119","dayPeriods-format-wide-lateMorning":"przed po\u0142udniem","months-standAlone-abbr":"sty lut mar kwi maj cze lip sie wrz pa\u017a lis gru".split(" "),"dateFormatItem-yMM":"MM.y", +"timeFormat-full":"HH:mm:ss zzzz","dateFormatItem-MEd":"E, d.MM","dateFormatItem-y":"y","field-thu-relative+0":"w ten czwartek","field-thu-relative+1":"w przysz\u0142y czwartek","dateFormatItem-hms":"h:mm:ss a","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dayPeriods-format-abbr-noon":"noon","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-thu-relative+-1":"w zesz\u0142y czwartek","dateFormatItem-yMd":"d.MM.y","field-week":"tydzie\u0144","quarters-standAlone-narrow":["1","2","3","4"], +"quarters-format-wide":["I kwarta\u0142","II kwarta\u0142","III kwarta\u0142","IV kwarta\u0142"],"dateFormatItem-Ed":"E, d","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","days-standAlone-short":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"dayPeriods-format-wide-evening":"wieczorem","quarters-format-abbr":["K1","K2","K3","K4"],"field-year-relative+0":"w tym roku","field-year-relative+1":"w przysz\u0142ym roku","field-fri-relative+-1":"w zesz\u0142y pi\u0105tek",eraNarrow:["p.n.e.","n.e."], +"dayPeriods-format-wide-noon":"w po\u0142udnie","dateFormatItem-yQQQ":"QQQ y","days-format-wide":"niedziela poniedzia\u0142ek wtorek \u015broda czwartek pi\u0105tek sobota".split(" "),"dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-EHm":"E, HH:mm","field-zone":"strefa czasowa","dateFormatItem-yM":"MM.y","dateFormatItem-yMMMM":"LLLL y","dateFormatItem-MMMEd":"E, d MMM","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-yMEd":"E, d.MM.y","field-day-relative+-1":"wczoraj","field-day-relative+-2":"przedwczoraj", +"days-format-abbr":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"field-sun-relative+0":"w t\u0119 niedziel\u0119","dateFormatItem-MMdd":"d.MM","field-sun-relative+1":"w przysz\u0142\u0105 niedziel\u0119","dateFormatItem-yMMMd":"d MMM y","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-Gy":"y G","field-era":"era"},"dijit/nls/loading":{_localized:{},loadingState:"\u0141adowanie...",errorState:"Niestety, wyst\u0105pi\u0142 b\u0142\u0105d"},"dojo/cldr/nls/number":{scientificFormat:"#E0", +"currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0bln","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]", +perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0%","decimalFormat-long":"000 biliona",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Poprzednie wybory",_localized:{},nextMessage:"Wi\u0119cej wybor\u00f3w"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Anuluj",_localized:{},buttonSave:"Zapisz",itemClose:"Zamknij"}}); +//# sourceMappingURL=dojo_pl.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_pt-br.js b/Server/www/spiderbasic/dojo/nls/dojo_pt-br.js new file mode 100644 index 0000000..586bb83 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_pt-br.js @@ -0,0 +1,17 @@ +//>>built +define("dojo/nls/dojo_pt-br",{"dijit/form/nls/validate":{invalidMessage:"O valor inserido n\u00e3o \u00e9 v\u00e1lido.",rangeMessage:"Este valor est\u00e1 fora do intervalo. ",_localized:{},missingMessage:"Este valor \u00e9 necess\u00e1rio."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E, h:mm a","days-standAlone-short":"dom seg ter qua qui sex s\u00e1b".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"agora","quarters-standAlone-narrow":["1","2","3","4"], +"field-weekday":"Dia da semana","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, dd/MM/y","field-wed-relative+0":"esta quarta-feira","field-wed-relative+1":"pr\u00f3xima quarta-feira","dateFormatItem-GyMMMEd":"E, d 'de' MMM 'de' y G","dateFormatItem-MMMEd":"E, d 'de' MMM",eraNarrow:["a.C.","d.C."],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"ter\u00e7a-feira passada","dayPeriods-format-wide-morning":"manh\u00e3","days-format-short":"dom seg ter qua qui sex s\u00e1b".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}", +"dateFormat-long":"d 'de' MMMM 'de' y","field-fri-relative+-1":"sexta-feira passada","field-wed-relative+-1":"quarta-feira passada","months-format-wide":"janeiro fevereiro mar\u00e7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","field-thu-relative+-1":"quinta-feira passada","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})", +"dayPeriods-format-wide-noon":"meio-dia","dateFormatItem-yMd":"dd/MM/y","field-era":"Era","dateFormatItem-yM":"MM/y","months-standAlone-wide":"janeiro fevereiro mar\u00e7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1\u00ba trimestre","2\u00ba trimestre","3\u00ba trimestre","4\u00ba trimestre"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"Ano","dateFormatItem-yMMM":"MMM 'de' y","dateTimeFormats-appendItem-Era":"{1} {0}", +"field-hour":"Hora","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"jan fev mar abr mai jun jul ago set out nov dez".split(" "),"field-sat-relative+0":"este s\u00e1bado","field-sat-relative+1":"pr\u00f3ximo s\u00e1bado","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"hoje","field-thu-relative+0":"esta quinta-feira","field-day-relative+1":"amanh\u00e3","field-thu-relative+1":"pr\u00f3xima quinta-feira","dateFormatItem-GyMMMd":"d 'de' MMM 'de' y G", +"field-day-relative+2":"depois de amanh\u00e3","dateFormatItem-H":"HH","months-standAlone-abbr":"jan fev mar abr mai jun jul ago set out nov dez".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1\u00ba trimestre","2\u00ba trimestre","3\u00ba trimestre","4\u00ba trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "), +"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"este domingo","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"pr\u00f3ximo domingo","quarters-standAlone-abbr":["T1","T2","T3","T4"],eraAbbr:["a.C.","d.C."],"field-minute":"Minuto","field-dayperiod":"Per\u00edodo do dia","days-standAlone-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),"dayPeriods-format-wide-night":"noite","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1", +"2","3","4"],"field-day-relative+-1":"ontem","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"anteontem","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"E, dd/MM","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"esta sexta-feira","field-fri-relative+1":"pr\u00f3xima sexta-feira","field-day":"Dia","days-format-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "), +"field-zone":"Fuso","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"ano passado","field-month-relative+-1":"m\u00eas passado","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),eraNames:["Antes de Cristo","Ano do Senhor"],"dateFormatItem-yMMMd":"d 'de' MMM 'de' y", +"days-format-narrow":"DSTQQSS".split(""),"field-month":"M\u00eas","days-standAlone-narrow":"DSTQQSS".split(""),"dateFormatItem-MMM":"LLL","dateFormatItem-HHmm":"HH:mm","field-tue-relative+0":"esta ter\u00e7a-feira","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"pr\u00f3xima ter\u00e7a-feira","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E, HH:mm","field-mon-relative+0":"esta segunda-feira", +"field-mon-relative+1":"pr\u00f3xima segunda-feira","dateFormat-short":"dd/MM/yy","dayPeriods-format-wide-afternoon":"tarde","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Segundo","field-sat-relative+-1":"s\u00e1bado passado","dateFormatItem-yMMMEd":"E, d 'de' MMM 'de' y","field-sun-relative+-1":"domingo passado","field-month-relative+0":"este m\u00eas","field-month-relative+1":"pr\u00f3ximo m\u00eas","dateTimeFormats-appendItem-Timezone":"{0} {1}", +"dateFormatItem-Ed":"E, d","field-week":"Semana","dateFormat-medium":"dd/MM/y","field-week-relative+-1":"semana passada","field-year-relative+0":"este ano","field-year-relative+1":"pr\u00f3ximo ano","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM 'de' y G","field-mon-relative+-1":"segunda-feira passada","field-week-relative+0":"esta semana","field-week-relative+1":"pr\u00f3xima semana"}, +"dijit/nls/loading":{_localized:{},loadingState:"Carregando...",errorState:"Desculpe, ocorreu um erro"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0tri","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]", +currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 trilh\u00f5es",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Op\u00e7\u00f5es anteriores",_localized:{},nextMessage:"Mais op\u00e7\u00f5es"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Cancelar",_localized:{}, +buttonSave:"Salvar",itemClose:"Fechar"}}); +//# sourceMappingURL=dojo_pt-br.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_pt-pt.js b/Server/www/spiderbasic/dojo/nls/dojo_pt-pt.js new file mode 100644 index 0000000..9ecffca --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_pt-pt.js @@ -0,0 +1,17 @@ +//>>built +define("dojo/nls/dojo_pt-pt",{"dijit/form/nls/validate":{invalidMessage:"O valor introduzido n\u00e3o \u00e9 v\u00e1lido.",rangeMessage:"Este valor encontra-se fora do intervalo.",_localized:{},missingMessage:"Este valor \u00e9 requerido."},"dojo/cldr/nls/gregorian":{"dateTimeFormats-appendItem-Year":"{1} {0}","field-tue-relative+-1":"ter\u00e7a-feira passada","field-year":"Ano","dateFormatItem-Hm":"HH:mm","field-wed-relative+0":"esta quarta-feira","field-wed-relative+1":"pr\u00f3xima quarta-feira", +"dayPeriods-format-wide-night":"noite","dateFormatItem-ms":"mm:ss","timeFormat-short":"HH:mm","field-minute":"Minuto","dateTimeFormat-short":"{1}, {0}","field-day-relative+0":"hoje","field-day-relative+1":"amanh\u00e3","field-day-relative+2":"depois de amanh\u00e3","field-tue-relative+0":"esta ter\u00e7a-feira","field-tue-relative+1":"pr\u00f3xima ter\u00e7a-feira","dayPeriods-format-narrow-am":"a.m.","dateFormatItem-MMMd":"d/MM","dayPeriods-format-abbr-am":"a.m.","field-week-relative+0":"esta semana", +"field-month-relative+0":"este m\u00eas","field-week-relative+1":"pr\u00f3xima semana","field-month-relative+1":"pr\u00f3ximo m\u00eas","timeFormat-medium":"HH:mm:ss","field-second-relative+0":"agora","dayPeriods-format-wide-afternoon":"tarde","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","months-standAlone-narrow":"JFMAMJJASOND".split(""),eraNames:["a.C.","d.C."],"dayPeriods-standAlone-abbr-pm":"p.m.","dateFormatItem-GyMMMEd":"E, d 'de' MMM 'de' y G","field-day":"Dia","field-year-relative+-1":"ano passado", +"dayPeriods-format-wide-am":"da manh\u00e3","field-wed-relative+-1":"quarta-feira passada","dateTimeFormat-medium":"{1}, {0}","field-second":"Segundo","days-standAlone-narrow":"DSTQQSS".split(""),"dayPeriods-standAlone-wide-pm":"p.m.","dateFormatItem-Ehms":"E, h:mm:ss a","dateFormat-long":"d 'de' MMMM 'de' y","dateFormatItem-GyMMMd":"d 'de' MMM 'de' y G","dateFormatItem-yMMMEd":"E, d/MM/y","quarters-standAlone-wide":["1.\u00ba trimestre","2.\u00ba trimestre","3.\u00ba trimestre","4.\u00ba trimestre"], +"days-format-narrow":"DSTQQSS".split(""),"dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-HHmm":"HH:mm","field-mon-relative+-1":"segunda-feira passada","dateFormatItem-GyMMM":"MMM 'de' y G","field-month":"M\u00eas","dateFormatItem-MMM":"LLL","field-dayperiod":"Da manh\u00e3/da tarde","dayPeriods-format-narrow-pm":"p.m.","dateFormat-medium":"dd/MM/y",eraAbbr:["a.C.","d.C."],"quarters-standAlone-abbr":["T1","T2","T3","T4"],"dayPeriods-format-abbr-pm":"p.m.","field-mon-relative+0":"esta segunda-feira", +"field-mon-relative+1":"pr\u00f3xima segunda-feira","months-format-narrow":"JFMAMJJASOND".split(""),"days-format-short":"do sg te qu qi sx sb".split(" "),"quarters-format-narrow":["1","2","3","4"],"dayPeriods-format-wide-pm":"da tarde","field-sat-relative+-1":"s\u00e1bado passado","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormat-long":"{1} '\u00e0s' {0}","dateFormatItem-Md":"d/M","field-hour":"Hora","dateFormatItem-yQQQQ":"QQQQ 'de' y","months-format-wide":"Janeiro Fevereiro Mar\u00e7o Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro".split(" "), +"dateFormat-full":"EEEE, d 'de' MMMM 'de' y","field-month-relative+-1":"m\u00eas passado","dateFormatItem-Hms":"HH:mm:ss","field-fri-relative+0":"esta sexta-feira","field-fri-relative+1":"pr\u00f3xima sexta-feira","dayPeriods-format-narrow-noon":"n","dayPeriods-format-wide-morning":"manh\u00e3","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})",_localized:{},"field-week-relative+-1":"semana passada","dateFormatItem-Ehm":"E, h:mm a","months-format-abbr":"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "), +"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"MM/y","dateFormat-short":"dd/MM/yy","days-standAlone-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "),"dateTimeFormats-appendItem-Era":"{1} {0}","dateFormatItem-yMMMEEEEd":"EEEE, d/MM/y","dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-H":"HH","dateFormatItem-M":"L","months-standAlone-wide":"Janeiro Fevereiro Mar\u00e7o Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro".split(" "), +"dateFormatItem-yMMMMEd":"E, d 'de' MMMM 'de' y","field-sun-relative+-1":"domingo passado","days-standAlone-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),"dateFormatItem-MMMMEd":"E, d 'de' MMMM","dateTimeFormat-full":"{1} '\u00e0s' {0}","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-hm":"h:mm a","dateFormatItem-d":"d","field-weekday":"Dia da semana","field-sat-relative+0":"este s\u00e1bado","dateFormatItem-h":"h a","field-sat-relative+1":"pr\u00f3ximo s\u00e1bado","months-standAlone-abbr":"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "), +"dateFormatItem-yMM":"MM/y","timeFormat-full":"HH:mm:ss zzzz","dateFormatItem-MEd":"E, dd/MM","dateFormatItem-y":"y","field-thu-relative+0":"esta quinta-feira","field-thu-relative+1":"pr\u00f3xima quinta-feira","dateFormatItem-hms":"h:mm:ss a","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dayPeriods-format-abbr-noon":"noon","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-thu-relative+-1":"quinta-feira passada","dateFormatItem-yMd":"dd/MM/y","field-week":"Semana","quarters-standAlone-narrow":["1", +"2","3","4"],"quarters-format-wide":["1.\u00ba trimestre","2.\u00ba trimestre","3.\u00ba trimestre","4.\u00ba trimestre"],"dateFormatItem-Ed":"E, d","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","days-standAlone-short":"do sg te qu qi sx sb".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"field-year-relative+0":"este ano","field-year-relative+1":"pr\u00f3ximo ano","field-fri-relative+-1":"sexta-feira passada",eraNarrow:["a.C.","d.C."],"dayPeriods-format-wide-noon":"meio-dia","dateFormatItem-yQQQ":"QQQQ 'de' y", +"days-format-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "),"dateFormatItem-yMMMMd":"d 'de' MMMM 'de' y","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-EHm":"E, HH:mm","field-zone":"Fuso hor\u00e1rio","dateFormatItem-yM":"MM/y","dateFormatItem-yMMMM":"MMMM 'de' y","dateFormatItem-MMMEd":"E, d/MM","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-yMEd":"E, dd/MM/y","field-day-relative+-1":"ontem","dayPeriods-standAlone-abbr-am":"a.m.", +"field-day-relative+-2":"anteontem","days-format-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),"field-sun-relative+0":"este domingo","dateFormatItem-MMdd":"dd/MM","field-sun-relative+1":"pr\u00f3ximo domingo","dateFormatItem-yMMMd":"d/MM/y","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-Gy":"y G","field-era":"Era","dayPeriods-standAlone-wide-am":"a.m."},"dijit/nls/loading":{_localized:{},loadingState:"A carregar...",errorState:"Lamentamos, mas ocorreu um erro"},"dojo/cldr/nls/number":{scientificFormat:"#E0", +"currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0Bi","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]", +perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0%","decimalFormat-long":"000 bili\u00f5es",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Op\u00e7\u00f5es anteriores",_localized:{},nextMessage:"Mais op\u00e7\u00f5es"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Cancelar",_localized:{},buttonSave:"Guardar",itemClose:"Fechar"}}); +//# sourceMappingURL=dojo_pt-pt.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_ru.js b/Server/www/spiderbasic/dojo/nls/dojo_ru.js new file mode 100644 index 0000000..11ef836 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_ru.js @@ -0,0 +1,26 @@ +//>>built +define("dojo/nls/dojo_ru",{"dijit/form/nls/validate":{invalidMessage:"\u0423\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.",rangeMessage:"\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043d\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430.",_localized:{},missingMessage:"\u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435."}, +"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),"months-format-narrow":"\u042f\u0424\u041c\u0410\u041c\u0418\u0418\u0410\u0421\u041e\u041d\u0414".split(""),"field-second-relative+0":"\u0441\u0435\u0439\u0447\u0430\u0441","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438","dateFormatItem-yQQQ":"QQQ y '\u0433'.", +"dateFormatItem-yMEd":"ccc, d.MM.y '\u0433'.","field-wed-relative+0":"\u0432 \u044d\u0442\u0443 \u0441\u0440\u0435\u0434\u0443","field-wed-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0440\u0435\u0434\u0443","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-MMMEd":"ccc, d MMM",eraNarrow:["\u0434\u043e \u043d.\u044d.","\u043d.\u044d."],"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0432\u0442\u043e\u0440\u043d\u0438\u043a", +"days-format-short":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y '\u0433'.","field-fri-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u043f\u044f\u0442\u043d\u0438\u0446\u0443","field-wed-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0440\u0435\u0434\u0443","months-format-wide":"\u044f\u043d\u0432\u0430\u0440\u044f \u0444\u0435\u0432\u0440\u0430\u043b\u044f \u043c\u0430\u0440\u0442\u0430 \u0430\u043f\u0440\u0435\u043b\u044f \u043c\u0430\u044f \u0438\u044e\u043d\u044f \u0438\u044e\u043b\u044f \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f \u043e\u043a\u0442\u044f\u0431\u0440\u044f \u043d\u043e\u044f\u0431\u0440\u044f \u0434\u0435\u043a\u0430\u0431\u0440\u044f".split(" "), +"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d MMMM y '\u0433'.","field-thu-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u0433","dateFormatItem-Md":"dd.MM",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"dd.MM.y","field-era":"\u042d\u0440\u0430","dateFormatItem-yM":"MM.y","months-standAlone-wide":"\u042f\u043d\u0432\u0430\u0440\u044c \u0424\u0435\u0432\u0440\u0430\u043b\u044c \u041c\u0430\u0440\u0442 \u0410\u043f\u0440\u0435\u043b\u044c \u041c\u0430\u0439 \u0418\u044e\u043d\u044c \u0418\u044e\u043b\u044c \u0410\u0432\u0433\u0443\u0441\u0442 \u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c \u041e\u043a\u0442\u044f\u0431\u0440\u044c \u041d\u043e\u044f\u0431\u0440\u044c \u0414\u0435\u043a\u0430\u0431\u0440\u044c".split(" "), +"timeFormat-short":"H:mm","quarters-format-wide":["1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b"],"dateFormatItem-yQQQQ":"QQQQ y '\u0433'.","timeFormat-long":"H:mm:ss z","field-year":"\u0413\u043e\u0434","dateFormatItem-yMMM":"LLL y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"\u0427\u0430\u0441","dateFormatItem-MMdd":"dd.MM", +"months-format-abbr":"\u044f\u043d\u0432. \u0444\u0435\u0432\u0440. \u043c\u0430\u0440\u0442\u0430 \u0430\u043f\u0440. \u043c\u0430\u044f \u0438\u044e\u043d\u044f \u0438\u044e\u043b\u044f \u0430\u0432\u0433. \u0441\u0435\u043d\u0442. \u043e\u043a\u0442. \u043d\u043e\u044f\u0431. \u0434\u0435\u043a.".split(" "),"field-sat-relative+0":"\u0432 \u044d\u0442\u0443 \u0441\u0443\u0431\u0431\u043e\u0442\u0443","field-sat-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0443\u0431\u0431\u043e\u0442\u0443", +"timeFormat-full":"H:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"\u0441\u0435\u0433\u043e\u0434\u043d\u044f","dateFormatItem-E":"ccc","field-thu-relative+0":"\u0432 \u044d\u0442\u043e\u0442 \u0447\u0435\u0442\u0432\u0435\u0440\u0433","field-day-relative+1":"\u0437\u0430\u0432\u0442\u0440\u0430","field-thu-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u0433","dateFormatItem-GyMMMd":"d MMM y '\u0433'. G", +"field-day-relative+2":"\u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430","dateFormatItem-H":"H","months-standAlone-abbr":"\u042f\u043d\u0432. \u0424\u0435\u0432\u0440. \u041c\u0430\u0440\u0442 \u0410\u043f\u0440. \u041c\u0430\u0439 \u0418\u044e\u043d\u044c \u0418\u044e\u043b\u044c \u0410\u0432\u0433. \u0421\u0435\u043d\u0442. \u041e\u043a\u0442. \u041d\u043e\u044f\u0431. \u0414\u0435\u043a.".split(" "),"quarters-format-abbr":["1-\u0439 \u043a\u0432.","2-\u0439 \u043a\u0432.","3-\u0439 \u043a\u0432.", +"4-\u0439 \u043a\u0432."],"quarters-standAlone-wide":["1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435 \u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0412\u0442\u043e\u0440\u043d\u0438\u043a \u0421\u0440\u0435\u0434\u0430 \u0427\u0435\u0442\u0432\u0435\u0440\u0433 \u041f\u044f\u0442\u043d\u0438\u0446\u0430 \u0421\u0443\u0431\u0431\u043e\u0442\u0430".split(" "), +"dateFormatItem-yLLLL":"LLLL y","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"\u0432 \u044d\u0442\u043e \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","quarters-standAlone-abbr":["1-\u0439 \u043a\u0432.","2-\u0439 \u043a\u0432.","3-\u0439 \u043a\u0432.", +"4-\u0439 \u043a\u0432."],eraAbbr:["\u0434\u043e \u043d. \u044d.","\u043d. \u044d."],"field-minute":"\u041c\u0438\u043d\u0443\u0442\u0430","field-dayperiod":"\u0414\u041f/\u041f\u041f","days-standAlone-abbr":"\u0412\u0441 \u041f\u043d \u0412\u0442 \u0421\u0440 \u0427\u0442 \u041f\u0442 \u0421\u0431".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u0432\u0447\u0435\u0440\u0430","dateTimeFormat-long":"{1}, {0}","dayPeriods-format-narrow-am":"AM", +"dateFormatItem-h":"h a","field-day-relative+-2":"\u043f\u043e\u0437\u0430\u0432\u0447\u0435\u0440\u0430","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, dd.MM","dateTimeFormat-full":"{1}, {0}","field-fri-relative+0":"\u0432 \u044d\u0442\u0443 \u043f\u044f\u0442\u043d\u0438\u0446\u0443","field-fri-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u044f\u0442\u043d\u0438\u0446\u0443","dateFormatItem-yMMMM":"LLLL y","field-day":"\u0414\u0435\u043d\u044c","days-format-wide":"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0432\u0442\u043e\u0440\u043d\u0438\u043a \u0441\u0440\u0435\u0434\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0433 \u043f\u044f\u0442\u043d\u0438\u0446\u0430 \u0441\u0443\u0431\u0431\u043e\u0442\u0430".split(" "), +"field-zone":"\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441","months-standAlone-narrow":"\u042f\u0424\u041c\u0410\u041c\u0418\u0418\u0410\u0421\u041e\u041d\u0414".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443","field-month-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043c\u0435\u0441\u044f\u0446\u0435","dateTimeFormats-appendItem-Year":"{1} {0}", +"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),eraNames:["\u0434\u043e \u043d.\u044d.","\u043d.\u044d."],"dateFormatItem-yMMMd":"d MMM y '\u0433'.","days-format-narrow":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),"field-month":"\u041c\u0435\u0441\u044f\u0446", +"days-standAlone-narrow":"\u0412\u041f\u0412\u0421\u0427\u041f\u0421".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"\u0432 \u044d\u0442\u043e\u0442 \u0432\u0442\u043e\u0440\u043d\u0438\u043a","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0442\u043e\u0440\u043d\u0438\u043a","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})", +"dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u0432 \u044d\u0442\u043e\u0442 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","field-mon-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","dateFormat-short":"dd.MM.yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"\u0421\u0435\u043a\u0443\u043d\u0434\u0430", +"field-sat-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0443\u0431\u0431\u043e\u0442\u0443","dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0435 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","field-month-relative+0":"\u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u044f\u0446\u0435","field-month-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043c\u0435\u0441\u044f\u0446\u0435", +"dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"ccc, d","field-week":"\u041d\u0435\u0434\u0435\u043b\u044f","dateFormat-medium":"d MMM y '\u0433'.","field-week-relative+-1":"\u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435","field-year-relative+0":"\u0432 \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0434\u0443","field-year-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0433\u043e\u0434\u0443","dayPeriods-format-narrow-pm":"PM", +"dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","field-week-relative+0":"\u043d\u0430 \u044d\u0442\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435","field-week-relative+1":"\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0435"}, +"dijit/nls/loading":{_localized:{},loadingState:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",errorState:"\u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]", +_localized:{},"decimalFormat-short":"000\u00a0\u0442\u0440\u043b\u043d","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"\u043d\u0435\u00a0\u0447\u0438\u0441\u043b\u043e",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 \u0442\u0440\u0438\u043b\u043b\u0438\u043e\u043d\u0430",decimalFormat:"#,##0.###", +decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b",_localized:{},nextMessage:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"\u041e\u0442\u043c\u0435\u043d\u0430",_localized:{},buttonSave:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c", +itemClose:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c"}}); +//# sourceMappingURL=dojo_ru.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_sk.js b/Server/www/spiderbasic/dojo/nls/dojo_sk.js new file mode 100644 index 0000000..f9b99d3 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_sk.js @@ -0,0 +1,17 @@ +//>>built +define("dojo/nls/dojo_sk",{"dijit/form/nls/validate":{invalidMessage:"Zadan\u00e1 hodnota nie je platn\u00e1.",rangeMessage:"T\u00e1to hodnota je mimo rozsah.",_localized:{},missingMessage:"T\u00e1to hodnota je povinn\u00e1."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm","days-standAlone-short":"Ne Po Ut St \u0160t Pi So".split(" "),"months-format-narrow":"jfmamjjasond".split(""),"field-second-relative+0":"teraz","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"De\u0148 v t\u00fd\u017edni", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d. M. y","field-wed-relative+0":"T\u00fato stredu","field-wed-relative+1":"Bud\u00facu stredu","dateFormatItem-GyMMMEd":"E, d. MMM y G","dateFormatItem-MMMEd":"E, d. MMM.",eraNarrow:["pred n.l.","n.l."],"field-tue-relative+-1":"Minul\u00fd utorok","days-format-short":"Ne Po Ut St \u0160t Pi So".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d. MMMM y","field-fri-relative+-1":"Minul\u00fd piatok","field-wed-relative+-1":"Minul\u00fa stredu", +"months-format-wide":"janu\u00e1ra febru\u00e1ra marca apr\u00edla m\u00e1ja j\u00fana j\u00fala augusta septembra okt\u00f3bra novembra decembra".split(" "),"dateTimeFormat-medium":"{1} {0}","dateFormatItem-yMMMMd":"d. MMMM y","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d. MMMM y","field-thu-relative+-1":"Minul\u00fd \u0161tvrtok","dateFormatItem-Md":"d.M.",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon", +"dateFormatItem-yMd":"d.M.y","field-era":"\u00c9ra","dateFormatItem-yM":"M.y","months-standAlone-wide":"janu\u00e1r febru\u00e1r marec apr\u00edl m\u00e1j j\u00fan j\u00fal august september okt\u00f3ber november december".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1. \u0161tvr\u0165rok","2. \u0161tvr\u0165rok","3. \u0161tvr\u0165rok","4. \u0161tvr\u0165rok"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"H:mm:ss z","field-year":"Rok","dateFormatItem-yMMM":"LLL y","dateTimeFormats-appendItem-Era":"{1} {0}", +"field-hour":"Hodina","months-format-abbr":"jan feb mar apr m\u00e1j j\u00fan j\u00fal aug sep okt nov dec".split(" "),"field-sat-relative+0":"T\u00fato sobotu","field-sat-relative+1":"Bud\u00facu sobotu","timeFormat-full":"H:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"Dnes","field-thu-relative+0":"Tento \u0161tvrtok","field-day-relative+1":"Zajtra","field-thu-relative+1":"Bud\u00faci \u0161tvrtok","dateFormatItem-GyMMMd":"d.M.y G","field-day-relative+2":"Pozajtra", +"dateFormatItem-H":"H","months-standAlone-abbr":"jan feb mar apr m\u00e1j j\u00fan j\u00fal aug sep okt nov dec".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. \u0161tvr\u0165rok","2. \u0161tvr\u0165rok","3. \u0161tvr\u0165rok","4. \u0161tvr\u0165rok"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L.","days-standAlone-wide":"nede\u013ea pondelok utorok streda \u0161tvrtok piatok sobota".split(" "),"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-GyMMMMd":"d. MMMM y G", +"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"T\u00fato nede\u013eu","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"Bud\u00facu nede\u013eu","quarters-standAlone-abbr":["1Q","2Q","3Q","4Q"],eraAbbr:["pred n.l.","n.l."],"field-minute":"Min\u00fata","field-dayperiod":"\u010cas\u0165 d\u0148a","days-standAlone-abbr":"ne po ut st \u0161t pi so".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"V\u010dera", +"dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"Predv\u010derom","dateFormatItem-MMMd":"d. MMM.","dateFormatItem-MEd":"E, d.M.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"Tento piatok","field-fri-relative+1":"Bud\u00faci piatok","dateFormatItem-yMMMM":"LLLL y","field-day":"De\u0148","days-format-wide":"nede\u013ea pondelok utorok streda \u0161tvrtok piatok sobota".split(" "),"field-zone":"\u010casov\u00e9 p\u00e1smo", +"months-standAlone-narrow":"jfmamjjasond".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"Minul\u00fd rok","field-month-relative+-1":"Posledn\u00fd mesiac","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"ne po ut st \u0161t pi so".split(" "),eraNames:["pred n.l.","n.l."],"dateFormatItem-yMMMd":"d.M.y","days-format-narrow":"NPUS\u0160PS".split(""), +"field-month":"Mesiac","days-standAlone-narrow":"NPUS\u0160PS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"Tento utorok","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"Bud\u00faci utorok","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E, d. MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"Tento pondelok","field-mon-relative+1":"Bud\u00faci pondelok", +"dateFormat-short":"d.M.y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss","dayPeriods-format-narrow-noon":"n","field-second":"Sekunda","field-sat-relative+-1":"Minul\u00fa sobotu","dateFormatItem-yMMMEd":"E, d. MMM y","field-sun-relative+-1":"Minul\u00fa nede\u013eu","field-month-relative+0":"Tento mesiac","field-month-relative+1":"Bud\u00faci mesiac","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d.","field-week":"T\u00fd\u017ede\u0148","dateFormat-medium":"d.M.y", +"field-week-relative+-1":"Minul\u00fd t\u00fd\u017ede\u0148","field-year-relative+0":"Tento rok","field-year-relative+1":"Bud\u00faci rok","dayPeriods-format-narrow-pm":"p","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"Minul\u00fd pondelok","field-week-relative+0":"Tento t\u00fd\u017ede\u0148","field-week-relative+1":"Bud\u00faci t\u00fd\u017ede\u0148"},"dijit/nls/loading":{_localized:{}, +loadingState:"Zav\u00e1dza sa...",errorState:"\u013dutujeme, ale vyskytla sa chyba"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0bil'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]", +currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 bili\u00f3nov",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"Predch\u00e1dzaj\u00face mo\u017enosti",_localized:{},nextMessage:"Viac mo\u017enost\u00ed"},"dijit/nls/common":{buttonOk:"OK", +buttonCancel:"Zru\u0161i\u0165",_localized:{},buttonSave:"Ulo\u017ei\u0165",itemClose:"Zatvori\u0165"}}); +//# sourceMappingURL=dojo_sk.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_sl.js b/Server/www/spiderbasic/dojo/nls/dojo_sl.js new file mode 100644 index 0000000..c6735af --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_sl.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_sl",{"dijit/form/nls/validate":{invalidMessage:"Vnesena vrednost ni veljavna.",rangeMessage:"Ta vrednost je izven obmo\u010dja.",_localized:{},missingMessage:"Ta vrednost je zahtevana."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"ned. pon. tor. sre. \u010det. pet. sob.".split(" "),"months-format-narrow":"jfmamjjasond".split(""),"field-second-relative+0":"zdaj","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dan v tednu", +"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, d. M. y","field-wed-relative+0":"To sredo","field-wed-relative+1":"Naslednjo sredo","dateFormatItem-GyMMMEd":"E, d. MMM y G","dateFormatItem-MMMEd":"E, d. MMM",eraNarrow:["pr. n. \u0161t.","po Kr.","po n. \u0161t."],"field-tue-relative+-1":"Prej\u0161nji torek","days-format-short":"ned. pon. tor. sre. \u010det. pet. sob.".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"dd. MMMM y","field-fri-relative+-1":"Prej\u0161nji petek", +"field-wed-relative+-1":"Prej\u0161njo sredo","months-format-wide":"januar februar marec april maj junij julij avgust september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"pop.","dateFormat-full":"EEEE, dd. MMMM y","field-thu-relative+-1":"Prej\u0161nji \u010detrtek","dateFormatItem-Md":"d. M.",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d. M. y", +"field-era":"Doba","dateFormatItem-yM":"M/y","months-standAlone-wide":"januar februar marec april maj junij julij avgust september oktober november december".split(" "),"timeFormat-short":"HH.mm","quarters-format-wide":["1. \u010detrtletje","2. \u010detrtletje","3. \u010detrtletje","4. \u010detrtletje"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH.mm.ss z","field-year":"Leto","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"Ura","months-format-abbr":"jan. feb. mar. apr. maj jun. jul. avg. sep. okt. nov. dec.".split(" "), +"field-sat-relative+0":"To soboto","field-sat-relative+1":"Naslednjo soboto","timeFormat-full":"HH.mm.ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"Danes","field-thu-relative+0":"Ta \u010detrtek","field-day-relative+1":"Jutri","field-thu-relative+1":"Naslednji \u010detrtek","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"Pojutri\u0161njem","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mar apr maj jun jul avg sep okt nov dec".split(" "), +"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. \u010detrtletje","2. \u010detrtletje","3. \u010detrtletje","4. \u010detrtletje"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"nedelja ponedeljek torek sreda \u010detrtek petek sobota".split(" "),"dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH.mm.ss","field-sun-relative+0":"To nedeljo","dateFormatItem-Hm":"HH.mm","field-sun-relative+1":"Naslednjo nedeljo","quarters-standAlone-abbr":["Q1", +"Q2","Q3","Q4"],eraAbbr:["pr. n. \u0161t.","po Kr.","po n. \u0161t."],"field-minute":"Minuta","field-dayperiod":"\u010cas dneva","days-standAlone-abbr":"ned pon tor sre \u010det pet sob".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"V\u010deraj","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"Predv\u010deraj\u0161njim","dateFormatItem-MMMd":"d. MMM", +"dateFormatItem-MEd":"E, d. MM.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"Ta petek","field-fri-relative+1":"Naslednji petek","dateFormatItem-yMMMM":"MMMM y","field-day":"Dan","days-format-wide":"nedelja ponedeljek torek sreda \u010detrtek petek sobota".split(" "),"field-zone":"Obmo\u010dje","months-standAlone-narrow":"jfmamjjasond".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"Lani","field-month-relative+-1":"Prej\u0161nji mesec", +"dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h.mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"ned. pon. tor. sre. \u010det. pet. sob.".split(" "),"dateFormatItem-GyM":"M/y G",eraNames:["pred na\u0161im \u0161tetjem","na\u0161e \u0161tetje","po n. \u0161t."],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"npts\u010dps".split(""),"field-month":"Mesec","days-standAlone-narrow":"npts\u010dps".split(""),"dateFormatItem-MMM":"LLL", +"field-tue-relative+0":"Ta torek","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"Naslednji torek","dayPeriods-format-wide-am":"dop.","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH.mm","field-mon-relative+0":"Ta ponedeljek","field-mon-relative+1":"Naslednji ponedeljek","dateFormat-short":"d. MM. yy","dateFormatItem-EHms":"E HH.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","dayPeriods-format-narrow-noon":"n", +"field-second":"Sekunda","field-sat-relative+-1":"Prej\u0161njo soboto","dateFormatItem-yMMMEd":"E, d. MMM y","field-sun-relative+-1":"Prej\u0161njo nedeljo","field-month-relative+0":"Ta mesec","field-month-relative+1":"Naslednji mesec","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E, d.","field-week":"Teden","dateFormat-medium":"d. MMM y","field-week-relative+-1":"Prej\u0161nji teden","field-year-relative+0":"Letos","field-year-relative+1":"Naslednje leto","dayPeriods-format-narrow-pm":"p", +"dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH.mm.ss","dateFormatItem-hms":"h.mm.ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"Prej\u0161nji ponedeljek","field-week-relative+0":"Ta teden","field-week-relative+1":"Naslednji teden"},"dijit/nls/loading":{_localized:{},loadingState:"Nalaganje ...",errorState:"Oprostite, pri\u0161lo je do napake."},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7", +list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0bil'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"#,##0%","decimalFormat-long":"000 bilijonov",decimalFormat:"#,##0.###", +decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"e"},"dijit/form/nls/ComboBox":{previousMessage:"Prej\u0161nje izbire",_localized:{},nextMessage:"Dodatne izbire"},"dijit/nls/common":{buttonOk:"V redu",buttonCancel:"Prekli\u010di",_localized:{},buttonSave:"Shrani",itemClose:"Zapri"}}); +//# sourceMappingURL=dojo_sl.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_sv.js b/Server/www/spiderbasic/dojo/nls/dojo_sv.js new file mode 100644 index 0000000..e4c4665 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_sv.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_sv",{"dijit/form/nls/validate":{invalidMessage:"Angivet v\u00e4rde \u00e4r inte giltigt.",rangeMessage:"V\u00e4rdet ligger utanf\u00f6r intervallet.",_localized:{},missingMessage:"V\u00e4rdet kr\u00e4vs."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"S\u00f6 M\u00e5 Ti On To Fr L\u00f6".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"nu","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Veckodag", +"dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, y-MM-dd","field-wed-relative+0":"onsdag denna vecka","field-wed-relative+1":"onsdag n\u00e4sta vecka","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["f.Kr.","fvt","e.Kr.","vt"],"dateFormatItem-yMM":"y-MM","field-tue-relative+-1":"tisdag f\u00f6rra veckan","days-format-short":"s\u00f6 m\u00e5 ti on to fr l\u00f6".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y","field-fri-relative+-1":"fredag f\u00f6rra veckan", +"field-wed-relative+-1":"onsdag f\u00f6rra veckan","months-format-wide":"januari februari mars april maj juni juli augusti september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"em","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"torsdag f\u00f6rra veckan","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"FM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"y-MM-dd", +"field-era":"Era","dateFormatItem-yM":"y-MM","months-standAlone-wide":"Januari Februari Mars April Maj Juni Juli Augusti September Oktober November December".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"\u00c5r","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"timme","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"jan feb mar apr maj jun jul aug sep okt nov dec".split(" "), +"field-sat-relative+0":"l\u00f6rdag denna vecka","field-sat-relative+1":"l\u00f6rdag n\u00e4sta vecka","timeFormat-full":"'kl'. HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"i dag","field-thu-relative+0":"torsdag denna vecka","field-day-relative+1":"i morgon","field-thu-relative+1":"torsdag n\u00e4sta vecka","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"i \u00f6vermorgon","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Feb Mar Apr Maj Jun Jul Aug Sep Okt Nov Dec".split(" "), +"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"S\u00f6ndag M\u00e5ndag Tisdag Onsdag Torsdag Fredag L\u00f6rdag".split(" "),"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"s\u00f6ndag denna vecka","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"s\u00f6ndag n\u00e4sta vecka", +"quarters-standAlone-abbr":["K1","K2","K3","K4"],eraAbbr:["f.Kr.","e.Kr."],"field-minute":"Minut","field-dayperiod":"fm/em","days-standAlone-abbr":"S\u00f6n M\u00e5n Tis Ons Tor Fre L\u00f6r".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i g\u00e5r","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"f","dateFormatItem-h":"h a","field-day-relative+-2":"i f\u00f6rrg\u00e5r","dateFormatItem-MMMd":"d MMM", +"dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"fredag denna vecka","field-fri-relative+1":"fredag n\u00e4sta vecka","field-day":"Dag","days-format-wide":"s\u00f6ndag m\u00e5ndag tisdag onsdag torsdag fredag l\u00f6rdag".split(" "),"field-zone":"Tidszon","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"i fjol","field-month-relative+-1":"f\u00f6rra m\u00e5naden", +"dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"EM","days-format-abbr":"s\u00f6n m\u00e5n tis ons tors fre l\u00f6r".split(" "),eraNames:["f\u00f6re Kristus","f\u00f6re v\u00e4sterl\u00e4ndsk tider\u00e4kning","efter Kristus","v\u00e4sterl\u00e4ndsk tider\u00e4kning"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"SMTOTFL".split(""),"field-month":"M\u00e5nad","days-standAlone-narrow":"SMTOTFL".split(""), +"dateFormatItem-MMM":"LLL","field-tue-relative+0":"tisdag denna vecka","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"tisdag n\u00e4sta vecka","dayPeriods-format-wide-am":"fm","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"m\u00e5ndag denna vecka","field-mon-relative+1":"m\u00e5ndag n\u00e4sta vecka","dateFormat-short":"y-MM-dd", +"dateFormatItem-MMd":"d/M","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Sekund","field-sat-relative+-1":"l\u00f6rdag f\u00f6rra veckan","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"s\u00f6ndag f\u00f6rra veckan","field-month-relative+0":"denna m\u00e5nad","field-month-relative+1":"n\u00e4sta m\u00e5nad","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"Vecka","dateFormat-medium":"d MMM y", +"field-week-relative+-1":"f\u00f6rra veckan","field-year-relative+0":"i \u00e5r","field-year-relative+1":"n\u00e4sta \u00e5r","dayPeriods-format-narrow-pm":"e","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"m\u00e5ndag f\u00f6rra veckan","field-week-relative+0":"denna vecka","field-week-relative+1":"n\u00e4sta vecka"},"dijit/nls/loading":{_localized:{},loadingState:"L\u00e4ser in...",errorState:"Det har intr\u00e4ffat ett fel."}, +"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00b7",list:";",percentSign:"%",minusSign:"\u2212","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0bn","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"\u00a4\u00a4\u00a4",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]", +perMille:"\u2030",group:"\u00a0",percentFormat:"#,##0\u00a0%","decimalFormat-long":"000 biljoner",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"\u00d710^"},"dijit/form/nls/ComboBox":{previousMessage:"Tidigare val",_localized:{},nextMessage:"Fler val"},"dijit/nls/common":{buttonOk:"OK",buttonCancel:"Avbryt",_localized:{},buttonSave:"Spara",itemClose:"St\u00e4ng"}}); +//# sourceMappingURL=dojo_sv.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_th.js b/Server/www/spiderbasic/dojo/nls/dojo_th.js new file mode 100644 index 0000000..4c9714b --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_th.js @@ -0,0 +1,25 @@ +//>>built +define("dojo/nls/dojo_th",{"dijit/form/nls/validate":{invalidMessage:"\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e1b\u0e49\u0e2d\u0e19\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07",rangeMessage:"\u0e04\u0e48\u0e32\u0e19\u0e35\u0e49\u0e40\u0e01\u0e34\u0e19\u0e0a\u0e48\u0e27\u0e07",_localized:{},missingMessage:"\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35\u0e04\u0e48\u0e32\u0e19\u0e35\u0e49"},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "), +"months-format-narrow":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),"field-second-relative+0":"\u0e02\u0e13\u0e30\u0e19\u0e35\u0e49","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"\u0e1e\u0e38\u0e18\u0e19\u0e35\u0e49", +"field-wed-relative+1":"\u0e1e\u0e38\u0e18\u0e2b\u0e19\u0e49\u0e32","dateFormatItem-GyMMMEd":"E d MMM G y","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.","\u0e01.\u0e2a.\u0e28.","\u0e04.\u0e28.","\u0e2a.\u0e28."],"field-tue-relative+-1":"\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","days-format-short":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}", +"dateFormat-long":"d MMMM y","field-fri-relative+-1":"\u0e28\u0e38\u0e01\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-wed-relative+-1":"\u0e1e\u0e38\u0e18\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","months-format-wide":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e21\u0e35\u0e19\u0e32\u0e04\u0e21 \u0e40\u0e21\u0e29\u0e32\u0e22\u0e19 \u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21 \u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19 \u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21 \u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 \u0e15\u0e38\u0e25\u0e32\u0e04\u0e21 \u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19 \u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split(" "), +"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07","dateFormat-full":"EEEE\u0e17\u0e35\u0e48 d MMMM G y","field-thu-relative+-1":"\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","dateFormatItem-Md":"d/M",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"d/M/y","field-era":"\u0e2a\u0e21\u0e31\u0e22", +"dateFormatItem-yM":"M/y","months-standAlone-wide":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e21\u0e35\u0e19\u0e32\u0e04\u0e21 \u0e40\u0e21\u0e29\u0e32\u0e22\u0e19 \u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21 \u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19 \u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21 \u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 \u0e15\u0e38\u0e25\u0e32\u0e04\u0e21 \u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19 \u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split(" "), +"timeFormat-short":"HH:mm","quarters-format-wide":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 z","field-year":"\u0e1b\u0e35","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07", +"months-format-abbr":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),"field-sat-relative+0":"\u0e40\u0e2a\u0e32\u0e23\u0e4c\u0e19\u0e35\u0e49","field-sat-relative+1":"\u0e40\u0e2a\u0e32\u0e23\u0e4c\u0e2b\u0e19\u0e49\u0e32","timeFormat-full":"H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 zzzz", +"dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49","field-thu-relative+0":"\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e19\u0e35\u0e49","field-day-relative+1":"\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49","field-thu-relative+1":"\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e49\u0e32","dateFormatItem-GyMMMd":"d MMM G y","field-day-relative+2":"\u0e21\u0e30\u0e23\u0e37\u0e19\u0e19\u0e35\u0e49","dateFormatItem-H":"HH","months-standAlone-abbr":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "), +"quarters-format-abbr":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],"quarters-standAlone-wide":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],"dateFormatItem-Gy":"G y","dateFormatItem-M":"L","days-standAlone-wide":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c \u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23 \u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18 \u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35 \u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c".split(" "), +"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"noon","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e19\u0e35\u0e49","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e2b\u0e19\u0e49\u0e32","quarters-standAlone-abbr":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],eraAbbr:["\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.", +"\u0e04.\u0e28."],"field-minute":"\u0e19\u0e32\u0e17\u0e35","field-dayperiod":"\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19","days-standAlone-abbr":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-h":"h a","field-day-relative+-2":"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e0b\u0e37\u0e19", +"dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u0e28\u0e38\u0e01\u0e23\u0e4c\u0e19\u0e35\u0e49","field-fri-relative+1":"\u0e28\u0e38\u0e01\u0e23\u0e4c\u0e2b\u0e19\u0e49\u0e32","dateFormatItem-yMMMM":"MMMM y","field-day":"\u0e27\u0e31\u0e19","days-format-wide":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c \u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23 \u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18 \u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35 \u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c".split(" "), +"field-zone":"\u0e40\u0e02\u0e15\u0e40\u0e27\u0e25\u0e32","months-standAlone-narrow":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"\u0e1b\u0e35\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-month-relative+-1":"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27", +"dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),eraNames:["\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a","\u0e01\u0e48\u0e2d\u0e19\u0e2a\u0e32\u0e21\u0e31\u0e0d\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a","\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", +"\u0e2a\u0e32\u0e21\u0e31\u0e0d\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"\u0e2d\u0e32 \u0e08 \u0e2d \u0e1e \u0e1e\u0e24 \u0e28 \u0e2a".split(" "),"field-month":"\u0e40\u0e14\u0e37\u0e2d\u0e19","days-standAlone-narrow":"\u0e2d\u0e32 \u0e08 \u0e2d \u0e1e \u0e1e\u0e24 \u0e28 \u0e2a".split(" "),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e19\u0e35\u0e49","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})", +"field-tue-relative+1":"\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e2b\u0e19\u0e49\u0e32","dayPeriods-format-wide-am":"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e19\u0e35\u0e49","field-mon-relative+1":"\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e2b\u0e19\u0e49\u0e32", +"dateFormat-short":"d/M/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35","field-sat-relative+-1":"\u0e40\u0e2a\u0e32\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-month-relative+0":"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e19\u0e35\u0e49", +"field-month-relative+1":"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e2b\u0e19\u0e49\u0e32","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"E d","field-week":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c","dateFormat-medium":"d MMM y","field-week-relative+-1":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-year-relative+0":"\u0e1b\u0e35\u0e19\u0e35\u0e49","field-year-relative+1":"\u0e1b\u0e35\u0e2b\u0e19\u0e49\u0e32","dayPeriods-format-narrow-pm":"p", +"dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM G y","field-mon-relative+-1":"\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-week-relative+0":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c\u0e19\u0e35\u0e49","field-week-relative+1":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c\u0e2b\u0e19\u0e49\u0e32"},"dijit/nls/loading":{_localized:{},loadingState:"\u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14...", +errorState:"\u0e02\u0e2d\u0e2d\u0e20\u0e31\u0e22 \u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0\u0e25'.'\u0e25'.'","currencySpacing-afterCurrency-insertBetween":"\u00a0", +nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000 \u0e25\u0e49\u0e32\u0e19\u0e25\u0e49\u0e32\u0e19",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u0e01\u0e32\u0e23\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e01\u0e48\u0e2d\u0e19\u0e2b\u0e19\u0e49\u0e32", +_localized:{},nextMessage:"\u0e01\u0e32\u0e23\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"},"dijit/nls/common":{buttonOk:"\u0e15\u0e01\u0e25\u0e07",buttonCancel:"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01",_localized:{},buttonSave:"\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01",itemClose:"\u0e1b\u0e34\u0e14"}}); +//# sourceMappingURL=dojo_th.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_tr.js b/Server/www/spiderbasic/dojo/nls/dojo_tr.js new file mode 100644 index 0000000..443de84 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_tr.js @@ -0,0 +1,16 @@ +//>>built +define("dojo/nls/dojo_tr",{"dijit/form/nls/validate":{invalidMessage:"Girilen de\u011fer ge\u00e7ersiz.",rangeMessage:"Bu de\u011fer aral\u0131k d\u0131\u015f\u0131nda.",_localized:{},missingMessage:"Bu de\u011fer gerekli."},"dojo/cldr/nls/gregorian":{"dateFormatItem-Ehm":"E a h:mm","days-standAlone-short":"Pa Pt Sa \u00c7a Pe Cu Ct".split(" "),"months-format-narrow":"O\u015eMNMHTAEEKA".split(""),"field-second-relative+0":"\u015fimdi","quarters-standAlone-narrow":["1.","2.","3.","4."],"field-weekday":"Haftan\u0131n G\u00fcn\u00fc", +"dateFormatItem-yQQQ":"y/QQQ","dateFormatItem-yMEd":"dd.MM.y E","field-wed-relative+0":"bu \u00e7ar\u015famba","field-wed-relative+1":"gelecek \u00e7ar\u015famba","dateFormatItem-GyMMMEd":"G d MMM y E","dateFormatItem-MMMEd":"d MMMM E",eraNarrow:["M\u00d6","MS"],"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"ge\u00e7en sal\u0131","days-format-short":"Pa Pt Sa \u00c7a Pe Cu Ct".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"d MMMM y","field-fri-relative+-1":"ge\u00e7en cuma", +"field-wed-relative+-1":"ge\u00e7en \u00e7ar\u015famba","months-format-wide":"Ocak \u015eubat Mart Nisan May\u0131s Haziran Temmuz A\u011fustos Eyl\u00fcl Ekim Kas\u0131m Aral\u0131k".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u00d6S","dateFormat-full":"d MMMM y EEEE","field-thu-relative+-1":"ge\u00e7en per\u015fembe","dateFormatItem-Md":"dd/MM",_localized:{},"dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon", +"dateFormatItem-yMd":"dd.MM.y","field-era":"Miladi D\u00f6nem","dateFormatItem-yM":"MM/y","months-standAlone-wide":"Ocak \u015eubat Mart Nisan May\u0131s Haziran Temmuz A\u011fustos Eyl\u00fcl Ekim Kas\u0131m Aral\u0131k".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1. \u00e7eyrek","2. \u00e7eyrek","3. \u00e7eyrek","4. \u00e7eyrek"],"dateFormatItem-yQQQQ":"y/QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"Y\u0131l","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{1} {0}", +"field-hour":"Saat","months-format-abbr":"Oca \u015eub Mar Nis May Haz Tem A\u011fu Eyl Eki Kas Ara".split(" "),"field-sat-relative+0":"bu cumartesi","field-sat-relative+1":"gelecek cumartesi","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"bug\u00fcn","field-thu-relative+0":"bu per\u015fembe","field-day-relative+1":"yar\u0131n","field-thu-relative+1":"gelecek per\u015fembe","dateFormatItem-GyMMMd":"G dd MMM y","field-day-relative+2":"\u00f6b\u00fcr g\u00fcn", +"dateFormatItem-H":"HH","months-standAlone-abbr":"Oca \u015eub Mar Nis May Haz Tem A\u011fu Eyl Eki Kas Ara".split(" "),"quarters-format-abbr":["\u00c71","\u00c72","\u00c73","\u00c74"],"quarters-standAlone-wide":["1. \u00e7eyrek","2. \u00e7eyrek","3. \u00e7eyrek","4. \u00e7eyrek"],"dateFormatItem-Gy":"G y","dateFormatItem-M":"L","days-standAlone-wide":"Pazar Pazartesi Sal\u0131 \u00c7ar\u015famba Per\u015fembe Cuma Cumartesi".split(" "),"dateFormatItem-MMMMd":"dd MMMM","dayPeriods-format-abbr-noon":"noon", +"timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"bu pazar","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"gelecek pazar","quarters-standAlone-abbr":["\u00c71","\u00c72","\u00c73","\u00c74"],eraAbbr:["M\u00d6","MS"],"field-minute":"Dakika","field-dayperiod":"\u00d6\u00d6/\u00d6S","days-standAlone-abbr":"Paz Pzt Sal \u00c7ar Per Cum Cmt".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1.","2.","3.","4."],"field-day-relative+-1":"d\u00fcn","dateTimeFormat-long":"{1} {0}", +"dayPeriods-format-narrow-am":"a","dateFormatItem-h":"a h","field-day-relative+-2":"evvelsi g\u00fcn","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"dd/MM E","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"bu cuma","field-fri-relative+1":"gelecek cuma","dateFormatItem-yMMMM":"MMMM y","field-day":"G\u00fcn","days-format-wide":"Pazar Pazartesi Sal\u0131 \u00c7ar\u015famba Per\u015fembe Cuma Cumartesi".split(" "),"field-zone":"Saat Dilimi","months-standAlone-narrow":"O\u015eMNMHTAEEKA".split(""), +"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"ge\u00e7en y\u0131l","field-month-relative+-1":"ge\u00e7en ay","dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"a h:mm","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"Paz Pzt Sal \u00c7ar Per Cum Cmt".split(" "),eraNames:["Milattan \u00d6nce","Milattan Sonra"],"dateFormatItem-yMMMd":"dd MMM y","days-format-narrow":"PPS\u00c7PCC".split(""), +"field-month":"Ay","days-standAlone-narrow":"PPS\u00c7PCC".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"bu sal\u0131","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"gelecek sal\u0131","dayPeriods-format-wide-am":"\u00d6\u00d6","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-MMMMEd":"dd MMMM E","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"bu pazartesi","field-mon-relative+1":"gelecek pazartesi", +"dateFormat-short":"d.MM.y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E a h:mm:ss","dayPeriods-format-narrow-noon":"n","field-second":"Saniye","field-sat-relative+-1":"ge\u00e7en cumartesi","dateFormatItem-yMMMEd":"d MMM y E","field-sun-relative+-1":"ge\u00e7en pazar","field-month-relative+0":"bu ay","field-month-relative+1":"gelecek ay","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"d E","field-week":"Hafta","dateFormat-medium":"d MMM y","field-week-relative+-1":"ge\u00e7en hafta", +"field-year-relative+0":"bu y\u0131l","field-year-relative+1":"gelecek y\u0131l","dayPeriods-format-narrow-pm":"p","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"a h:mm:ss","dateFormatItem-GyMMM":"G MMM y","field-mon-relative+-1":"ge\u00e7en pazartesi","field-week-relative+0":"bu hafta","field-week-relative+1":"gelecek hafta"},"dijit/nls/loading":{_localized:{},loadingState:"Y\u00fckleniyor...",errorState:"\u00dczg\u00fcn\u00fcz, bir hata olu\u015ftu"}, +"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u00a0Tn","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)", +"currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:".",percentFormat:"%#,##0","decimalFormat-long":"000 trilyon",decimalFormat:"#,##0.###",decimal:",","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u00d6nceki se\u00e7enekler",_localized:{},nextMessage:"Di\u011fer se\u00e7enekler"},"dijit/nls/common":{buttonOk:"Tamam",buttonCancel:"\u0130ptal",_localized:{},buttonSave:"Kaydet",itemClose:"Kapat"}}); +//# sourceMappingURL=dojo_tr.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_zh-cn.js b/Server/www/spiderbasic/dojo/nls/dojo_zh-cn.js new file mode 100644 index 0000000..e11d5c2 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_zh-cn.js @@ -0,0 +1,20 @@ +//>>built +define("dojo/nls/dojo_zh-cn",{"dijit/form/nls/validate":{invalidMessage:"\u8f93\u5165\u7684\u503c\u65e0\u6548\u3002",rangeMessage:"\u6b64\u503c\u8d85\u51fa\u8303\u56f4\u3002",_localized:{},missingMessage:"\u8be5\u503c\u662f\u5fc5\u9700\u7684\u3002"},"dojo/cldr/nls/gregorian":{"dateTimeFormats-appendItem-Year":"{1} {0}","field-tue-relative+-1":"\u4e0a\u5468\u4e8c","field-year":"\u5e74","dayPeriods-format-wide-weeHours":"\u51cc\u6668","dateFormatItem-Hm":"HH:mm","field-wed-relative+0":"\u672c\u5468\u4e09", +"field-wed-relative+1":"\u4e0b\u5468\u4e09","dayPeriods-format-wide-night":"\u665a\u4e0a","dateFormatItem-ms":"mm:ss","timeFormat-short":"ah:mm","field-minute":"\u5206\u949f","dateTimeFormat-short":"{1} {0}","field-day-relative+0":"\u4eca\u5929","field-day-relative+1":"\u660e\u5929","field-day-relative+2":"\u540e\u5929","field-tue-relative+0":"\u672c\u5468\u4e8c","field-tue-relative+1":"\u4e0b\u5468\u4e8c","dayPeriods-format-narrow-am":"\u4e0a\u5348","dateFormatItem-MMMd":"M\u6708d\u65e5","dayPeriods-format-abbr-am":"AM", +"dayPeriods-format-narrow-earlyMorning":"\u6e05\u6668","field-week-relative+0":"\u672c\u5468","field-month-relative+0":"\u672c\u6708","field-week-relative+1":"\u4e0b\u5468","field-month-relative+1":"\u4e0b\u4e2a\u6708","timeFormat-medium":"ah:mm:ss","dateFormatItem-MMMMdd":"M\u6708dd\u65e5","field-second-relative+0":"\u73b0\u5728","dayPeriods-format-wide-afternoon":"\u4e0b\u5348","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "), +eraNames:["\u516c\u5143\u524d","\u516c\u5143"],"dateFormatItem-GyMMMEd":"Gy\u5e74M\u6708d\u65e5E","field-day":"\u65e5","field-year-relative+-1":"\u53bb\u5e74","dayPeriods-format-wide-am":"\u4e0a\u5348","dayPeriods-format-narrow-midDay":"\u4e2d\u5348","field-wed-relative+-1":"\u4e0a\u5468\u4e09","dateTimeFormat-medium":"{1} {0}","field-second":"\u79d2\u949f","days-standAlone-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateFormatItem-Ehms":"Eah:mm:ss","dateFormat-long":"y\u5e74M\u6708d\u65e5", +"dateFormatItem-GyMMMd":"Gy\u5e74M\u6708d\u65e5","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5E","quarters-standAlone-wide":["\u7b2c\u4e00\u5b63\u5ea6","\u7b2c\u4e8c\u5b63\u5ea6","\u7b2c\u4e09\u5b63\u5ea6","\u7b2c\u56db\u5b63\u5ea6"],"days-format-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateTimeFormats-appendItem-Timezone":"{1}{0}","field-mon-relative+-1":"\u4e0a\u5468\u4e00","dateFormatItem-GyMMM":"Gy\u5e74M\u6708","field-month":"\u6708","dateFormatItem-MMM":"LLL","field-dayperiod":"\u4e0a\u5348/\u4e0b\u5348", +"dayPeriods-format-narrow-pm":"\u4e0b\u5348","dateFormat-medium":"y\u5e74M\u6708d\u65e5",eraAbbr:["\u516c\u5143\u524d","\u516c\u5143"],"quarters-standAlone-abbr":["1\u5b63\u5ea6","2\u5b63\u5ea6","3\u5b63\u5ea6","4\u5b63\u5ea6"],"dayPeriods-format-abbr-pm":"PM","field-mon-relative+0":"\u672c\u5468\u4e00","field-mon-relative+1":"\u4e0b\u5468\u4e00","months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"days-format-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "), +"quarters-format-narrow":["1","2","3","4"],"dayPeriods-format-wide-pm":"\u4e0b\u5348","field-sat-relative+-1":"\u4e0a\u5468\u516d","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormat-long":"{1} {0}","dateFormatItem-Md":"M/d","field-hour":"\u5c0f\u65f6","dateFormatItem-yQQQQ":"y\u5e74\u7b2cQ\u5b63\u5ea6","months-format-wide":"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "), +"dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-month-relative+-1":"\u4e0a\u4e2a\u6708","dayPeriods-format-wide-earlyMorning":"\u6e05\u6668","dateFormatItem-Hms":"HH:mm:ss","field-fri-relative+0":"\u672c\u5468\u4e94","field-fri-relative+1":"\u4e0b\u5468\u4e94","dayPeriods-format-narrow-noon":"\u4e2d\u5348","dayPeriods-format-narrow-morning":"\u4e0a\u5348","dayPeriods-format-wide-morning":"\u4e0a\u5348","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})",_localized:{},"field-week-relative+-1":"\u4e0a\u5468", +"dateFormatItem-Ehm":"Eah:mm","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"timeFormat-long":"zah:mm:ss","dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormat-short":"yy/M/d","days-standAlone-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"dateTimeFormats-appendItem-Era":"{1} {0}","dateFormatItem-H":"H\u65f6", +"dateFormatItem-M":"M\u6708","months-standAlone-wide":"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),"field-sun-relative+-1":"\u4e0a\u5468\u65e5","days-standAlone-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"dateTimeFormat-full":"{1} {0}","dateFormatItem-hm":"ah:mm","dayPeriods-format-wide-midDay":"\u4e2d\u5348", +"dateFormatItem-d":"d\u65e5","field-weekday":"\u661f\u671f","field-sat-relative+0":"\u672c\u5468\u516d","dateFormatItem-h":"ah\u65f6","field-sat-relative+1":"\u4e0b\u5468\u516d","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"dateFormatItem-yMM":"y\u5e74M\u6708","timeFormat-full":"zzzzah:mm:ss","dateFormatItem-MEd":"M/dE","dateFormatItem-y":"y\u5e74","field-thu-relative+0":"\u672c\u5468\u56db","field-thu-relative+1":"\u4e0b\u5468\u56db", +"dateFormatItem-hms":"ah:mm:ss","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dayPeriods-format-abbr-noon":"noon","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-thu-relative+-1":"\u4e0a\u5468\u56db","dateFormatItem-yMd":"y/M/d","field-week":"\u5468","quarters-standAlone-narrow":["1","2","3","4"],"quarters-format-wide":["\u7b2c\u4e00\u5b63\u5ea6","\u7b2c\u4e8c\u5b63\u5ea6","\u7b2c\u4e09\u5b63\u5ea6","\u7b2c\u56db\u5b63\u5ea6"],"dayPeriods-format-narrow-weeHours":"\u51cc\u6668","dateFormatItem-Ed":"d\u65e5E", +"dayPeriods-format-narrow-afternoon":"\u4e0b\u5348","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","days-standAlone-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"quarters-format-abbr":["1\u5b63\u5ea6","2\u5b63\u5ea6","3\u5b63\u5ea6","4\u5b63\u5ea6"],"field-year-relative+0":"\u4eca\u5e74","field-year-relative+1":"\u660e\u5e74","field-fri-relative+-1":"\u4e0a\u5468\u4e94",eraNarrow:["\u516c\u5143\u524d","\u516c\u5143"],"dayPeriods-format-wide-noon":"\u4e2d\u5348", +"dateFormatItem-yQQQ":"y\u5e74\u7b2cQ\u5b63\u5ea6","days-format-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"dayPeriods-format-narrow-night":"\u665a\u4e0a","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateFormatItem-EHm":"EHH:mm","field-zone":"\u65f6\u533a","dateFormatItem-yM":"y/M","dateFormatItem-yMMMM":"y\u5e74M\u6708","dateFormatItem-MMMEd":"M\u6708d\u65e5E","dateFormatItem-EHms":"EHH:mm:ss", +"dateFormatItem-yMEd":"y/M/dE","field-day-relative+-1":"\u6628\u5929","field-day-relative+-2":"\u524d\u5929","days-format-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"field-sun-relative+0":"\u672c\u5468\u65e5","dateFormatItem-MMdd":"MM/dd","field-sun-relative+1":"\u4e0b\u5468\u65e5","dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-Gy":"Gy\u5e74","field-era":"\u7eaa\u5143"}, +"dijit/nls/loading":{_localized:{},loadingState:"\u6b63\u5728\u52a0\u8f7d...",errorState:"\u5bf9\u4e0d\u8d77\uff0c\u53d1\u751f\u4e86\u9519\u8bef"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",superscriptingExponent:"\u00d7",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000\u5146","currencySpacing-afterCurrency-insertBetween":"\u00a0", +nan:"NaN",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000\u5146",decimalFormat:"#,##0.###",decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u5148\u524d\u9009\u9879",_localized:{},nextMessage:"\u66f4\u591a\u9009\u9879"}, +"dijit/nls/common":{buttonOk:"\u786e\u5b9a",buttonCancel:"\u53d6\u6d88",_localized:{},buttonSave:"\u4fdd\u5b58",itemClose:"\u5173\u95ed"}}); +//# sourceMappingURL=dojo_zh-cn.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/nls/dojo_zh-tw.js b/Server/www/spiderbasic/dojo/nls/dojo_zh-tw.js new file mode 100644 index 0000000..63678f5 --- /dev/null +++ b/Server/www/spiderbasic/dojo/nls/dojo_zh-tw.js @@ -0,0 +1,19 @@ +//>>built +define("dojo/nls/dojo_zh-tw",{"dijit/form/nls/validate":{invalidMessage:"\u8f38\u5165\u7684\u503c\u7121\u6548\u3002",rangeMessage:"\u6b64\u503c\u8d85\u51fa\u7bc4\u570d\u3002",_localized:{},missingMessage:"\u5fc5\u9808\u63d0\u4f9b\u6b64\u503c\u3002"},"dojo/cldr/nls/gregorian":{"dateTimeFormats-appendItem-Year":"{1} {0}","field-tue-relative+-1":"\u4e0a\u9031\u4e8c","field-year":"\u5e74","dayPeriods-format-wide-weeHours":"\u51cc\u6668","dateFormatItem-Hm":"HH:mm","field-wed-relative+0":"\u672c\u9031\u4e09", +"field-wed-relative+1":"\u4e0b\u9031\u4e09","dayPeriods-format-wide-night":"\u665a\u4e0a","dateFormatItem-ms":"mm:ss","timeFormat-short":"ah:mm","field-minute":"\u5206\u9418","dateTimeFormat-short":"{1} {0}","field-day-relative+0":"\u4eca\u5929","field-day-relative+1":"\u660e\u5929","field-day-relative+2":"\u5f8c\u5929","field-tue-relative+0":"\u672c\u9031\u4e8c","field-tue-relative+1":"\u4e0b\u9031\u4e8c","dayPeriods-format-narrow-am":"\u4e0a\u5348","dateFormatItem-MMMd":"M\u6708d\u65e5","dayPeriods-format-abbr-am":"AM", +"dayPeriods-format-narrow-earlyMorning":"\u6e05\u6668","field-week-relative+0":"\u672c\u9031","field-month-relative+0":"\u672c\u6708","field-week-relative+1":"\u4e0b\u9031","field-month-relative+1":"\u4e0b\u500b\u6708","timeFormat-medium":"ah:mm:ss","dateFormatItem-MMMMdd":"M\u6708dd\u65e5","field-second-relative+0":"\u73fe\u5728","dayPeriods-format-wide-afternoon":"\u4e0b\u5348","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "), +eraNames:["\u897f\u5143\u524d","\u897f\u5143"],"dateFormatItem-GyMMMEd":"G y \u5e74 M \u6708 d \u65e5E","field-day":"\u65e5","field-year-relative+-1":"\u53bb\u5e74","dayPeriods-format-wide-am":"\u4e0a\u5348","dayPeriods-format-narrow-midDay":"\u4e2d\u5348","field-wed-relative+-1":"\u4e0a\u9031\u4e09","dateTimeFormat-medium":"{1} {0}","field-second":"\u79d2","days-standAlone-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateFormatItem-Ehms":"E a h:mm:ss","dateFormat-long":"y\u5e74M\u6708d\u65e5", +"dateFormatItem-GyMMMd":"G y \u5e74 M \u6708 d \u65e5","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5E",$locale:"zh-hant-tw","quarters-standAlone-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"days-format-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-mon-relative+-1":"\u4e0a\u9031\u4e00","dateFormatItem-GyMMM":"G y \u5e74 M \u6708","field-month":"\u6708","dateFormatItem-MMM":"LLL","field-dayperiod":"\u4e0a\u5348/\u4e0b\u5348", +"dayPeriods-format-narrow-pm":"\u4e0b\u5348","dateFormat-medium":"y\u5e74M\u6708d\u65e5",eraAbbr:["\u897f\u5143\u524d","\u897f\u5143"],"quarters-standAlone-abbr":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"dayPeriods-format-abbr-pm":"PM","field-mon-relative+0":"\u672c\u9031\u4e00","field-mon-relative+1":"\u4e0b\u9031\u4e00","months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"days-format-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "), +"quarters-format-narrow":["1","2","3","4"],"dayPeriods-format-wide-pm":"\u4e0b\u5348","field-sat-relative+-1":"\u4e0a\u9031\u516d","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormat-long":"{1} {0}","dateFormatItem-Md":"M/d","field-hour":"\u5c0f\u6642","dateFormatItem-yQQQQ":"y\u5e74QQQQ","months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-month-relative+-1":"\u4e0a\u500b\u6708", +"dayPeriods-format-wide-earlyMorning":"\u6e05\u6668","dateFormatItem-Hms":"HH:mm:ss","field-fri-relative+0":"\u672c\u9031\u4e94","field-fri-relative+1":"\u4e0b\u9031\u4e94","dayPeriods-format-narrow-noon":"\u4e2d\u5348","dayPeriods-format-narrow-morning":"\u4e0a\u5348","dayPeriods-format-wide-morning":"\u4e0a\u5348","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})",_localized:{},"field-week-relative+-1":"\u4e0a\u9031","dateFormatItem-Ehm":"E a h:mm","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "), +"timeFormat-long":"zah\u6642mm\u5206ss\u79d2","dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormat-short":"y/M/d","days-standAlone-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"dateTimeFormats-appendItem-Era":"{1} {0}","dateFormatItem-H":"H\u6642","dateFormatItem-M":"M\u6708","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "), +"field-sun-relative+-1":"\u4e0a\u9031\u65e5","days-standAlone-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"dateTimeFormat-full":"{1}{0}","dateFormatItem-hm":"ah:mm","dayPeriods-format-wide-midDay":"\u4e2d\u5348","dateFormatItem-d":"d\u65e5","field-weekday":"\u9031\u5929","field-sat-relative+0":"\u672c\u9031\u516d","dateFormatItem-h":"ah\u6642","field-sat-relative+1":"\u4e0b\u9031\u516d","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "), +"dateFormatItem-yMM":"y-MM","timeFormat-full":"zzzzah\u6642mm\u5206ss\u79d2","dateFormatItem-MEd":"M/d\uff08E\uff09","dateFormatItem-y":"y\u5e74","field-thu-relative+0":"\u672c\u9031\u56db","field-thu-relative+1":"\u4e0b\u9031\u56db","dateFormatItem-hms":"ah:mm:ss","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dayPeriods-format-abbr-noon":"noon","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-thu-relative+-1":"\u4e0a\u9031\u56db","dateFormatItem-yMd":"y/M/d","field-week":"\u9031","quarters-standAlone-narrow":["1", +"2","3","4"],"quarters-format-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"dayPeriods-format-narrow-weeHours":"\u51cc\u6668","dateFormatItem-Ed":"d\u65e5\uff08E\uff09","dayPeriods-format-narrow-afternoon":"\u4e0b\u5348","dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","days-standAlone-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"quarters-format-abbr":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"], +"field-year-relative+0":"\u4eca\u5e74","field-year-relative+1":"\u660e\u5e74","field-fri-relative+-1":"\u4e0a\u9031\u4e94",eraNarrow:["\u897f\u5143\u524d","\u897f\u5143"],"dayPeriods-format-wide-noon":"\u4e2d\u5348","dateFormatItem-yQQQ":"y\u5e74QQQ","days-format-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"dayPeriods-format-narrow-night":"\u665a\u4e0a","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})", +"dateFormatItem-EHm":"E HH:mm","field-zone":"\u6642\u5340","dateFormatItem-yM":"y/M","dateFormatItem-yMMMM":"y\u5e74M\u6708","dateFormatItem-MMMEd":"M\u6708d\u65e5E","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-yMEd":"y/M/d\uff08E\uff09","field-day-relative+-1":"\u6628\u5929","field-day-relative+-2":"\u524d\u5929","days-format-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"field-sun-relative+0":"\u672c\u9031\u65e5","dateFormatItem-MMdd":"MM/dd", +"field-sun-relative+1":"\u4e0b\u9031\u65e5","dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-Gy":"G y \u5e74","field-era":"\u5e74\u4ee3"},"dijit/nls/loading":{_localized:{},loadingState:"\u8f09\u5165\u4e2d...",errorState:"\u62b1\u6b49\uff0c\u767c\u751f\u932f\u8aa4"},"dojo/cldr/nls/number":{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:^S:]",infinity:"\u221e",$locale:"zh-hant-tw",superscriptingExponent:"\u00d7", +list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]",_localized:{},"decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"\u975e\u6578\u503c",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)","currencySpacing-beforeCurrency-currencyMatch":"[:^S:]",perMille:"\u2030",group:",",percentFormat:"#,##0%","decimalFormat-long":"000\u5146",decimalFormat:"#,##0.###", +decimal:".","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},"dijit/form/nls/ComboBox":{previousMessage:"\u524d\u4e00\u500b\u9078\u64c7\u9805",_localized:{},nextMessage:"\u5176\u4ed6\u9078\u64c7\u9805"},"dijit/nls/common":{buttonOk:"\u78ba\u5b9a",buttonCancel:"\u53d6\u6d88",_localized:{},buttonSave:"\u5132\u5b58",itemClose:"\u95dc\u9589"}}); +//# sourceMappingURL=dojo_zh-tw.js.map \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/resources/blank.gif b/Server/www/spiderbasic/dojo/resources/blank.gif new file mode 100644 index 0000000..e565824 Binary files /dev/null and b/Server/www/spiderbasic/dojo/resources/blank.gif differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/claro.css b/Server/www/spiderbasic/dojo/themes/claro/claro.css new file mode 100644 index 0000000..dde8cbd --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/claro.css @@ -0,0 +1 @@ +.dijitReset {margin:0; border:0; padding:0; font: inherit; line-height:normal; color: inherit;}.dj_a11y .dijitReset {-moz-appearance: none;}.dijitInline {display:inline-block; #zoom: 1; #display:inline; border:0; padding:0; vertical-align:middle; #vertical-align: auto;}table.dijitInline {display:inline-table; box-sizing: content-box; -moz-box-sizing: content-box;}.dijitHidden {display: none !important;}.dijitVisible {display: block !important; position: relative;}.dj_ie6 .dijitComboBox .dijitInputContainer,.dijitInputContainer {#zoom: 1; overflow: hidden; float: none !important; position: relative;}.dj_ie7 .dijitInputContainer {float: left !important; clear: left; display: inline-block !important;}.dj_ie .dijitSelect input,.dj_ie input.dijitTextBox,.dj_ie .dijitTextBox input {font-size: 100%;}.dijitSelect .dijitButtonText {float: left; vertical-align: top;}TABLE.dijitSelect {padding: 0 !important; border-collapse: separate;}.dijitTextBox .dijitSpinnerButtonContainer,.dijitTextBox .dijitArrowButtonContainer,.dijitValidationTextBox .dijitValidationContainer {float: right; text-align: center;}.dijitSelect input.dijitInputField,.dijitTextBox input.dijitInputField {padding-left: 0 !important; padding-right: 0 !important;}.dijitValidationTextBox .dijitValidationContainer {display: none;}.dijitTeeny {font-size:1px; line-height:1px;}.dijitOffScreen {position: absolute !important; left: -10000px !important; top: -10000px !important;}.dijitPopup {position: absolute; background-color: transparent; margin: 0; border: 0; padding: 0; -webkit-overflow-scrolling: touch;}.dijitPositionOnly {padding: 0 !important; border: 0 !important; background-color: transparent !important; background-image: none !important; height: auto !important; width: auto !important;}.dijitNonPositionOnly {float: none !important; position: static !important; margin: 0 0 0 0 !important; vertical-align: middle !important;}.dijitBackgroundIframe {position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -1; border: 0; padding: 0; margin: 0;}.dijitDisplayNone {display:none !important;}.dijitContainer {overflow: hidden;}.dj_a11y .dijitIcon,.dj_a11y div.dijitArrowButtonInner, .dj_a11y span.dijitArrowButtonInner,.dj_a11y img.dijitArrowButtonInner,.dj_a11y .dijitCalendarIncrementControl,.dj_a11y .dijitTreeExpando {display: none;}.dijitSpinner div.dijitArrowButtonInner {display: block;}.dj_a11y .dijitA11ySideArrow {display: inline !important; cursor: pointer;}.dj_a11y .dijitCalendarDateLabel {padding: 1px; border: 0px !important;}.dj_a11y .dijitCalendarSelectedDate .dijitCalendarDateLabel {border-style: solid !important; border-width: 1px !important; padding: 0;}.dj_a11y .dijitCalendarDateTemplate {padding-bottom: 0.1em !important; border: 0px !important;}.dj_a11y .dijitButtonNode {border: black outset medium !important; padding: 0 !important;}.dj_a11y .dijitArrowButton {padding: 0 !important;}.dj_a11y .dijitButtonContents {margin: 0.15em;}.dj_a11y .dijitTextBoxReadOnly .dijitInputField,.dj_a11y .dijitTextBoxReadOnly .dijitButtonNode {border-style: outset!important; border-width: medium!important; border-color: #999 !important; color:#999 !important;}.dijitButtonNode * {vertical-align: middle;}.dijitSelect .dijitArrowButtonInner,.dijitButtonNode .dijitArrowButtonInner {background: no-repeat center; width: 12px; height: 12px; direction: ltr;}.dijitLeft {background-position:left top; background-repeat:no-repeat;}.dijitStretch {white-space:nowrap; background-repeat:repeat-x;}.dijitRight {#display:inline; background-position:right top; background-repeat:no-repeat;}.dj_gecko .dj_a11y .dijitButtonDisabled .dijitButtonNode {opacity: 0.5;}.dijitToggleButton,.dijitButton,.dijitDropDownButton,.dijitComboButton {vertical-align: middle;}.dijitButtonContents {display: block;}td.dijitButtonContents {display: table-cell;}.dijitButtonNode img {vertical-align:middle;}.dijitToolbar .dijitComboButton {border-collapse: separate;}.dijitToolbar .dijitToggleButton,.dijitToolbar .dijitButton,.dijitToolbar .dijitDropDownButton,.dijitToolbar .dijitComboButton {margin: 0;}.dijitToolbar .dijitButtonContents {padding: 1px 2px;}.dj_webkit .dijitToolbar .dijitDropDownButton {padding-left: 0.3em;}.dj_gecko .dijitToolbar .dijitButtonNode::-moz-focus-inner {padding:0;}.dijitSelect {border:1px solid gray;}.dijitButtonNode {border:1px solid gray; margin:0; line-height:normal; vertical-align: middle; #vertical-align: auto; text-align:center; white-space: nowrap;}.dj_webkit .dijitSpinner .dijitSpinnerButtonContainer {line-height:inherit;}.dijitTextBox .dijitButtonNode {border-width: 0;}.dijitSelect,.dijitSelect *,.dijitButtonNode,.dijitButtonNode * {cursor: pointer; -webkit-tap-highlight-color: transparent;}.dj_ie .dijitButtonNode {zoom: 1;}.dj_ie .dijitButtonNode button {overflow: visible;}div.dijitArrowButton {float: right;}.dijitTextBox {border: solid black 1px; #overflow: hidden; width: 15em; vertical-align: middle;}.dijitTextBoxReadOnly,.dijitTextBoxDisabled {color: gray;}.dj_safari .dijitTextBoxDisabled input {color: #B0B0B0;}.dj_safari textarea.dijitTextAreaDisabled {color: #333;}.dj_gecko .dijitTextBoxReadOnly input.dijitInputField, .dj_gecko .dijitTextBoxDisabled input {-moz-user-input: none;}.dijitPlaceHolder {color: #AAAAAA; font-style: italic; position: absolute; top: 0; left: 0; #filter: "";}.dijitTimeTextBox {width: 8em;}.dijitTextBox input:focus {outline: none;}.dijitTextBoxFocused {outline: 5px -webkit-focus-ring-color;}.dijitSelect input,.dijitTextBox input {float: left;}.dj_ie6 input.dijitTextBox,.dj_ie6 .dijitTextBox input {float: none;}.dijitInputInner {border:0 !important; background-color:transparent !important; width:100% !important; padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important;}.dj_a11y .dijitTextBox input {margin: 0 !important;}.dijitValidationTextBoxError input.dijitValidationInner,.dijitSelect input,.dijitTextBox input.dijitArrowButtonInner {text-indent: -2em !important; direction: ltr !important; text-align: left !important; height: auto !important; #text-indent: 0 !important; #letter-spacing: -5em !important; #text-align: right !important;}.dj_ie .dijitSelect input,.dj_ie .dijitTextBox input,.dj_ie input.dijitTextBox {overflow-y: visible; line-height: normal;}.dijitSelect .dijitSelectLabel span {line-height: 100%;}.dj_ie .dijitSelect .dijitSelectLabel {line-height: normal;}.dj_ie6 .dijitSelect .dijitSelectLabel,.dj_ie7 .dijitSelect .dijitSelectLabel,.dj_ie8 .dijitSelect .dijitSelectLabel,.dj_iequirks .dijitSelect .dijitSelectLabel,.dijitSelect td,.dj_ie6 .dijitSelect input,.dj_iequirks .dijitSelect input,.dj_ie6 .dijitSelect .dijitValidationContainer,.dj_ie6 .dijitTextBox input,.dj_ie6 input.dijitTextBox,.dj_iequirks .dijitTextBox input.dijitValidationInner,.dj_iequirks .dijitTextBox input.dijitArrowButtonInner,.dj_iequirks .dijitTextBox input.dijitSpinnerButtonInner,.dj_iequirks .dijitTextBox input.dijitInputInner,.dj_iequirks input.dijitTextBox {line-height: 100%;}.dj_a11y input.dijitValidationInner,.dj_a11y input.dijitArrowButtonInner {text-indent: 0 !important; width: 1em !important; #text-align: left !important; color: black !important;}.dijitValidationTextBoxError .dijitValidationContainer {display: inline; cursor: default;}.dijitSpinner .dijitSpinnerButtonContainer,.dijitComboBox .dijitArrowButtonContainer {border-width: 0 0 0 1px !important;}.dj_a11y .dijitSelect .dijitArrowButtonContainer,.dijitToolbar .dijitComboBox .dijitArrowButtonContainer {border-width: 0 !important;}.dijitComboBoxMenu {list-style-type: none;}.dijitSpinner .dijitSpinnerButtonContainer .dijitButtonNode {border-width: 0;}.dj_ie .dj_a11y .dijitSpinner .dijitSpinnerButtonContainer .dijitButtonNode {clear: both;}.dj_ie .dijitToolbar .dijitComboBox {vertical-align: middle;}.dijitTextBox .dijitSpinnerButtonContainer {width: 1em; position: relative !important; overflow: hidden;}.dijitSpinner .dijitSpinnerButtonInner {width:1em; visibility:hidden !important; overflow-x:hidden;}.dijitComboBox .dijitButtonNode,.dijitSpinnerButtonContainer .dijitButtonNode {border-width: 0;}.dj_a11y .dijitSpinnerButtonContainer .dijitButtonNode {border-width: 0px !important; border-style: solid !important;}.dj_a11y .dijitTextBox .dijitSpinnerButtonContainer,.dj_a11y .dijitSpinner .dijitArrowButtonInner,.dj_a11y .dijitSpinnerButtonContainer input {width: 1em !important;}.dj_a11y .dijitSpinner .dijitArrowButtonInner {margin: 0 auto !important;}.dj_ie .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {padding-left: 0.3em !important; padding-right: 0.3em !important; margin-left: 0.3em !important; margin-right: 0.3em !important; width: 1.4em !important;}.dj_ie7 .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {padding-left: 0 !important; padding-right: 0 !important; width: 1em !important;}.dj_ie6 .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {margin-left: 0.1em !important; margin-right: 0.1em !important; width: 1em !important;}.dj_iequirks .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {margin-left: 0 !important; margin-right: 0 !important; width: 2em !important;}.dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {padding: 0; position: absolute !important; right: 0; float: none; height: 50%; width: 100%; bottom: auto; left: 0; right: auto;}.dj_iequirks .dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {width: auto;}.dj_a11y .dijitSpinnerButtonContainer .dijitArrowButton {overflow: visible !important;}.dijitSpinner .dijitSpinnerButtonContainer .dijitDownArrowButton {top: 50%; border-top-width: 1px !important;}.dijitSpinner .dijitSpinnerButtonContainer .dijitUpArrowButton {#bottom: 50%; top: 0;}.dijitSpinner .dijitArrowButtonInner {margin: auto; overflow-x: hidden; height: 100% !important;}.dj_iequirks .dijitSpinner .dijitArrowButtonInner {height: auto !important;}.dijitSpinner .dijitArrowButtonInner .dijitInputField {-moz-transform: scale(0.5); -moz-transform-origin: center top; -webkit-transform: scale(0.5); -webkit-transform-origin: center top; -o-transform: scale(0.5); -o-transform-origin: center top; transform: scale(0.5); transform-origin: left top; padding-top: 0; padding-bottom: 0; padding-left: 0 !important; padding-right: 0 !important; width: 100%; visibility: hidden;}.dj_ie .dijitSpinner .dijitArrowButtonInner .dijitInputField {zoom: 50%;}.dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButtonInner {overflow: hidden;}.dj_a11y .dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {width: 100%;}.dj_iequirks .dj_a11y .dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {width: 1em;}.dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {vertical-align:top; visibility: visible;}.dj_a11y .dijitSpinnerButtonContainer {width: 1em;}.dijitCheckBox,.dijitRadio,.dijitCheckBoxInput {padding: 0; border: 0; width: 16px; height: 16px; background-position:center center; background-repeat:no-repeat; overflow: hidden;}.dijitCheckBox input,.dijitRadio input {margin: 0; padding: 0; display: block;}.dijitCheckBoxInput {opacity: 0.01;}.dj_ie .dijitCheckBoxInput {filter: alpha(opacity=0);}.dj_a11y .dijitCheckBox,.dj_a11y .dijitRadio {width: auto !important; height: auto !important;}.dj_a11y .dijitCheckBoxInput {opacity: 1; filter: none; width: auto; height: auto;}.dj_a11y .dijitFocusedLabel {border: 1px dotted; outline: 0px !important;}.dijitProgressBar {z-index: 0;}.dijitProgressBarEmpty {position:relative;overflow:hidden; border:1px solid black; z-index:0;}.dijitProgressBarFull {position:absolute; overflow:hidden; z-index:-1; top:0; width:100%;}.dj_ie6 .dijitProgressBarFull {height:1.6em;}.dijitProgressBarTile {position:absolute; overflow:hidden; top:0; left:0; bottom:0; right:0; margin:0; padding:0; width: 100%; height:auto; background-color:#aaa; background-attachment: fixed;}.dj_a11y .dijitProgressBarTile {border-width:2px; border-style:solid; background-color:transparent !important;}.dj_ie6 .dijitProgressBarTile {position:static; height:1.6em;}.dijitProgressBarIndeterminate .dijitProgressBarTile {}.dijitProgressBarIndeterminateHighContrastImage {display:none;}.dj_a11y .dijitProgressBarIndeterminate .dijitProgressBarIndeterminateHighContrastImage {display:block; position:absolute; top:0; bottom:0; margin:0; padding:0; width:100%; height:auto;}.dijitProgressBarLabel {display:block; position:static; width:100%; text-align:center; background-color:transparent !important;}.dijitTooltip {position: absolute; z-index: 2000; display: block; left: 0; top: -10000px; overflow: visible;}.dijitTooltipContainer {border: solid black 2px; background: #b8b5b5; color: black; font-size: small;}.dijitTooltipFocusNode {padding: 2px 2px 2px 2px;}.dijitTooltipConnector {position: absolute;}.dj_a11y .dijitTooltipConnector {display: none;}.dijitTooltipData {display:none;}.dijitLayoutContainer {position: relative; display: block; overflow: hidden;}.dijitAlignTop,.dijitAlignBottom,.dijitAlignLeft,.dijitAlignRight {position: absolute; overflow: hidden;}body .dijitAlignClient {position: absolute;}.dijitBorderContainer, .dijitBorderContainerNoGutter {position:relative; overflow: hidden; z-index: 0;}.dijitBorderContainerPane,.dijitBorderContainerNoGutterPane {position: absolute !important; z-index: 2;}.dijitBorderContainer > .dijitTextArea {resize: none;}.dijitGutter {position: absolute; font-size: 1px;}.dijitSplitter {position: absolute; overflow: hidden; z-index: 10; background-color: #fff; border-color: gray; border-style: solid; border-width: 0;}.dj_ie .dijitSplitter {z-index: 1;}.dijitSplitterActive {z-index: 11 !important;}.dijitSplitterCover {position:absolute; z-index:-1; top:0; left:0; width:100%; height:100%;}.dijitSplitterCoverActive {z-index:3 !important;}.dj_ie .dijitSplitterCover {background: white; opacity: 0;}.dj_ie6 .dijitSplitterCover,.dj_ie7 .dijitSplitterCover,.dj_ie8 .dijitSplitterCover {filter: alpha(opacity=0);}.dijitSplitterH {height: 7px; border-top:1px; border-bottom:1px; cursor: row-resize; -webkit-tap-highlight-color: transparent;}.dijitSplitterV {width: 7px; border-left:1px; border-right:1px; cursor: col-resize; -webkit-tap-highlight-color: transparent;}.dijitSplitContainer {position: relative; overflow: hidden; display: block;}.dijitSplitPane {position: absolute;}.dijitSplitContainerSizerH,.dijitSplitContainerSizerV {position:absolute; font-size: 1px; background-color: ThreeDFace; border: 1px solid; border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; margin: 0;}.dijitSplitContainerSizerH .thumb, .dijitSplitterV .dijitSplitterThumb {overflow:hidden; position:absolute; top:49%;}.dijitSplitContainerSizerV .thumb, .dijitSplitterH .dijitSplitterThumb {position:absolute; left:49%;}.dijitSplitterShadow,.dijitSplitContainerVirtualSizerH,.dijitSplitContainerVirtualSizerV {font-size: 1px; background-color: ThreeDShadow; -moz-opacity: 0.5; opacity: 0.5; filter: Alpha(Opacity=50); margin: 0;}.dijitSplitContainerSizerH, .dijitSplitContainerVirtualSizerH {cursor: col-resize;}.dijitSplitContainerSizerV, .dijitSplitContainerVirtualSizerV {cursor: row-resize;}.dj_a11y .dijitSplitterH {border-top:1px solid #d3d3d3 !important; border-bottom:1px solid #d3d3d3 !important;}.dj_a11y .dijitSplitterV {border-left:1px solid #d3d3d3 !important; border-right:1px solid #d3d3d3 !important;}.dijitContentPane {display: block; overflow: auto; -webkit-overflow-scrolling: touch;}.dijitContentPaneSingleChild {overflow: hidden;}.dijitContentPaneLoading .dijitIconLoading,.dijitContentPaneError .dijitIconError {margin-right: 9px;}.dijitTitlePane {display: block; overflow: hidden;}.dijitFieldset {border: 1px solid gray;}.dijitTitlePaneTitle, .dijitFieldset legend {cursor: pointer; -webkit-tap-highlight-color: transparent;}.dijitFixedOpen, .dijitFixedClosed {cursor: default;}.dijitFixedOpen .dijitArrowNode, .dijitFixedOpen .dijitArrowNodeInner,.dijitFixedClosed .dijitArrowNode, .dijitFixedClosed .dijitArrowNodeInner{display: none;}.dijitTitlePaneTitle * {vertical-align: middle;}.dijitTitlePane .dijitArrowNodeInner, .dijitFieldset .dijitArrowNodeInner {display: none;}.dj_a11y .dijitTitlePane .dijitArrowNodeInner, .dj_a11y .dijitFieldset .dijitArrowNodeInner {display:inline !important; font-family: monospace;}.dj_a11y .dijitTitlePane .dijitArrowNode, .dj_a11y .dijitFieldset .dijitArrowNode {display:none;}.dj_ie6 .dijitTitlePaneContentOuter,.dj_ie6 .dijitTitlePane .dijitTitlePaneTitle {zoom: 1;}.dijitColorPalette {border: 1px solid #999; background: #fff; position: relative;}.dijitColorPalette .dijitPaletteTable {padding: 2px 3px 3px 3px; position: relative; overflow: hidden; outline: 0; border-collapse: separate;}.dj_ie6 .dijitColorPalette .dijitPaletteTable,.dj_ie7 .dijitColorPalette .dijitPaletteTable,.dj_iequirks .dijitColorPalette .dijitPaletteTable {padding: 0; margin: 2px 3px 3px 3px;}.dijitColorPalette .dijitPaletteCell {font-size: 1px; vertical-align: middle; text-align: center; background: none;}.dijitColorPalette .dijitPaletteImg {padding: 1px; border: 1px solid #999; margin: 2px 1px; cursor: default; font-size: 1px;}.dj_gecko .dijitColorPalette .dijitPaletteImg {padding-bottom: 0;}.dijitColorPalette .dijitColorPaletteSwatch {width: 14px; height: 12px;}.dijitPaletteTable td {padding: 0;}.dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg {border: 1px solid #000;}.dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg,.dijitColorPalette .dijitPaletteTable .dijitPaletteCellSelected .dijitPaletteImg {border: 2px solid #000; margin: 1px 0;}.dj_a11y .dijitColorPalette .dijitPaletteTable,.dj_a11y .dijitColorPalette .dijitPaletteTable * {background-color: transparent !important;}.dijitAccordionContainer {border:1px solid #b7b7b7; border-top:0 !important;}.dijitAccordionTitle {cursor: pointer; -webkit-tap-highlight-color: transparent;}.dijitAccordionTitleSelected {cursor: default;}.dijitAccordionTitle .arrowTextUp,.dijitAccordionTitle .arrowTextDown {display: none; font-size: 0.65em; font-weight: normal !important;}.dj_a11y .dijitAccordionTitle .arrowTextUp,.dj_a11y .dijitAccordionTitleSelected .arrowTextDown {display: inline;}.dj_a11y .dijitAccordionTitleSelected .arrowTextUp {display: none;}.dijitAccordionChildWrapper {overflow: hidden;}.dijitCalendarContainer {width: auto;}.dijitCalendarContainer th, .dijitCalendarContainer td {padding: 0; vertical-align: middle;}.dijitCalendarYearLabel {white-space: nowrap;}.dijitCalendarNextYear {margin:0 0 0 0.55em;}.dijitCalendarPreviousYear {margin:0 0.55em 0 0;}.dijitCalendarIncrementControl {vertical-align: middle;}.dijitCalendarIncrementControl,.dijitCalendarDateTemplate,.dijitCalendarMonthLabel,.dijitCalendarPreviousYear,.dijitCalendarNextYear {cursor: pointer; -webkit-tap-highlight-color: transparent;}.dijitCalendarDisabledDate {color: gray; text-decoration: line-through; cursor: default;}.dijitSpacer {position: relative; height: 1px; overflow: hidden; visibility: hidden;}.dijitCalendarMonthMenu .dijitCalendarMonthLabel {text-align:center;}.dijitMenu {border:1px solid black; background-color:white;}.dijitMenuTable {border-collapse:collapse; border-width:0; background-color:white;}.dj_webkit .dijitMenuTable td[colspan="2"]{border-right:hidden;}.dijitMenuItem {text-align: left; white-space: nowrap; padding:.1em .2em; cursor:pointer; -webkit-tap-highlight-color: transparent;}.dijitMenuItem:focus {outline: none}.dijitMenuPassive .dijitMenuItemHover,.dijitMenuItemSelected {background-color:black; color:white;}.dijitMenuItemIcon, .dijitMenuExpand {background-repeat: no-repeat;}.dijitMenuItemDisabled * {opacity:0.5; cursor:default;}.dj_ie .dj_a11y .dijitMenuItemDisabled,.dj_ie .dj_a11y .dijitMenuItemDisabled *,.dj_ie .dijitMenuItemDisabled * {color: gray; filter: alpha(opacity=35);}.dijitMenuItemLabel {position: relative; vertical-align: middle;}.dj_a11y .dijitMenuItemSelected {border: 1px dotted black !important;}.dj_a11y .dijitMenuItemSelected .dijitMenuItemLabel {border-width: 1px; border-style: solid;}.dj_ie8 .dj_a11y .dijitMenuItemLabel {position:static;}.dijitMenuExpandA11y {display: none;}.dj_a11y .dijitMenuExpandA11y {display: inline;}.dijitMenuSeparator td {border: 0; padding: 0;}.dijitMenuSeparatorTop {height: 50%; margin: 0; margin-top:3px; font-size: 1px;}.dijitMenuSeparatorBottom {height: 50%; margin: 0; margin-bottom:3px; font-size: 1px;}.dijitMenuItemIconChar {display: none; visibility: hidden;}.dj_a11y .dijitMenuItemIconChar {display: inline;}.dijitCheckedMenuItemChecked .dijitMenuItemIconChar,.dijitRadioMenuItemChecked .dijitMenuItemIconChar {visibility: visible;}.dj_ie .dj_a11y .dijitMenuBar .dijitMenuItem {margin: 0;}.dijitStackController .dijitToggleButtonChecked * {cursor: default;}.dijitTabContainer {z-index: 0; overflow: visible;}.dj_ie6 .dijitTabContainer {overflow: hidden;}.dijitTabContainerNoLayout {width: 100%;}.dijitTabContainerBottom-tabs,.dijitTabContainerTop-tabs,.dijitTabContainerLeft-tabs,.dijitTabContainerRight-tabs {z-index: 1; overflow: visible !important;}.dijitTabController {z-index: 1;}.dijitTabContainerBottom-container,.dijitTabContainerTop-container,.dijitTabContainerLeft-container,.dijitTabContainerRight-container {z-index:0; overflow: hidden; border: 1px solid black;}.nowrapTabStrip {width: 50000px; display: block; position: relative; text-align: left; z-index: 1;}.dijitTabListWrapper {overflow: hidden; z-index: 1;}.dj_a11y .tabStripButton img {display: none;}.dijitTabContainerTop-tabs {border-bottom: 1px solid black;}.dijitTabContainerTop-container {border-top: 0;}.dijitTabContainerLeft-tabs {border-right: 1px solid black; float: left;}.dijitTabContainerLeft-container {border-left: 0;}.dijitTabContainerBottom-tabs {border-top: 1px solid black;}.dijitTabContainerBottom-container {border-bottom: 0;}.dijitTabContainerRight-tabs {border-left: 1px solid black; float: left;}.dijitTabContainerRight-container {border-right: 0;}div.dijitTabDisabled, .dj_ie div.dijitTabDisabled {cursor: auto;}.dijitTab {position:relative; cursor:pointer; -webkit-tap-highlight-color: transparent; white-space:nowrap; z-index:3;}.dijitTab * {vertical-align: middle;}.dijitTabChecked {cursor: default;}.dijitTabContainerTop-tabs .dijitTab {top: 1px;}.dijitTabContainerBottom-tabs .dijitTab {top: -1px;}.dijitTabContainerLeft-tabs .dijitTab {left: 1px;}.dijitTabContainerRight-tabs .dijitTab {left: -1px;}.dijitTabContainerTop-tabs .dijitTab,.dijitTabContainerBottom-tabs .dijitTab {display:inline-block; #zoom: 1; #display:inline;}.tabStripButton {z-index: 12;}.dijitTabButtonDisabled .tabStripButton {display: none;}.dijitTabCloseButton {margin-left: 1em;}.dijitTabCloseText {display:none;}.dijitTab .tabLabel {min-height: 15px; display: inline-block;}.dijitNoIcon {display: none;}.dj_ie6 .dijitTab .dijitNoIcon {display: inline; height: 15px; width: 1px;}.dj_a11y .dijitTabCloseButton {background-image: none !important; width: auto !important; height: auto !important;}.dj_a11y .dijitTabCloseText {display: inline;}.dijitTabPane,.dijitStackContainer-child,.dijitAccordionContainer-child {border: none !important;}.dijitInlineEditBoxDisplayMode {border: 1px solid transparent; cursor: text;}.dj_a11y .dijitInlineEditBoxDisplayMode,.dj_ie6 .dijitInlineEditBoxDisplayMode {border: none;}.dijitInlineEditBoxDisplayModeHover,.dj_a11y .dijitInlineEditBoxDisplayModeHover,.dj_ie6 .dijitInlineEditBoxDisplayModeHover {background-color: #e2ebf2; border: solid 1px black;}.dijitInlineEditBoxDisplayModeDisabled {cursor: default;}.dijitTree {overflow: auto; -webkit-tap-highlight-color: transparent;}.dijitTreeContainer {float: left;}.dijitTreeIndent {width: 19px;}.dijitTreeRow, .dijitTreeContent {white-space: nowrap;}.dj_ie .dijitTreeLabel:focus {outline: 1px dotted black;}.dijitTreeRow img {vertical-align: middle;}.dijitTreeContent {cursor: default;}.dijitExpandoText {display: none;}.dj_a11y .dijitExpandoText {display: inline; padding-left: 10px; padding-right: 10px; font-family: monospace; border-style: solid; border-width: thin; cursor: pointer;}.dijitTreeLabel {margin: 0 4px;}.dijitDialog {position: absolute; z-index: 999; overflow: hidden;}.dijitDialogTitleBar {cursor: move;}.dijitDialogFixed .dijitDialogTitleBar {cursor:default;}.dijitDialogCloseIcon {cursor: pointer; -webkit-tap-highlight-color: transparent;}.dijitDialogPaneContent {-webkit-overflow-scrolling: touch;}.dijitDialogUnderlayWrapper {position: absolute; left: 0; top: 0; z-index: 998; display: none; background: transparent !important;}.dijitDialogUnderlay {background: #eee; opacity: 0.5;}.dj_ie .dijitDialogUnderlay {filter: alpha(opacity=50);}.dj_a11y .dijitSpinnerButtonContainer,.dj_a11y .dijitDialog {opacity: 1 !important; background-color: white !important;}.dijitDialog .closeText {display:none; position:absolute;}.dj_a11y .dijitDialog .closeText {display:inline;}.dijitSliderMoveable {z-index:99; position:absolute !important; display:block; vertical-align:middle;}.dijitSliderMoveableH {right:0;}.dijitSliderMoveableV {right:50%;}.dj_a11y div.dijitSliderImageHandle,.dijitSliderImageHandle {margin:0; padding:0; position:relative !important; border:8px solid gray; width:0; height:0; cursor: pointer; -webkit-tap-highlight-color: transparent;}.dj_iequirks .dj_a11y .dijitSliderImageHandle {font-size: 0;}.dj_ie7 .dijitSliderImageHandle {overflow: hidden;}.dj_ie7 .dj_a11y .dijitSliderImageHandle {overflow: visible;}.dj_a11y .dijitSliderFocused .dijitSliderImageHandle {border:4px solid #000; height:8px; width:8px;}.dijitSliderImageHandleV {top:-8px; right: -50%;}.dijitSliderImageHandleH {left:50%; top:-5px; vertical-align:top;}.dijitSliderBar {border-style:solid; border-color:black; cursor: pointer; -webkit-tap-highlight-color: transparent;}.dijitSliderBarContainerV {position:relative; height:100%; z-index:1;}.dijitSliderBarContainerH {position:relative; z-index:1;}.dijitSliderBarH {height:4px; border-width:1px 0;}.dijitSliderBarV {width:4px; border-width:0 1px;}.dijitSliderProgressBar {background-color:red; z-index:1;}.dijitSliderProgressBarV {position:static !important; height:0; vertical-align:top; text-align:left;}.dijitSliderProgressBarH {position:absolute !important; width:0; vertical-align:middle; overflow:visible;}.dijitSliderRemainingBar {overflow:hidden; background-color:transparent; z-index:1;}.dijitSliderRemainingBarV {height:100%; text-align:left;}.dijitSliderRemainingBarH {width:100% !important;}.dijitSliderBumper {overflow:hidden; z-index:1;}.dijitSliderBumperV {width:4px; height:8px; border-width:0 1px;}.dijitSliderBumperH {width:8px; height:4px; border-width:1px 0;}.dijitSliderBottomBumper,.dijitSliderLeftBumper {background-color:red;}.dijitSliderTopBumper,.dijitSliderRightBumper {background-color:transparent;}.dijitSliderDecoration {text-align:center;}.dijitSliderDecorationC,.dijitSliderDecorationV {position: relative;}.dijitSliderDecorationH {width: 100%;}.dijitSliderDecorationV {height: 100%; white-space: nowrap;}.dijitSliderButton {font-family:monospace; margin:0; padding:0; display:block;}.dj_a11y .dijitSliderButtonInner {visibility:visible !important;}.dijitSliderButtonContainer {text-align:center; height:0;}.dijitSliderButtonContainer * {cursor: pointer; -webkit-tap-highlight-color: transparent;}.dijitSlider .dijitButtonNode {padding:0; display:block;}.dijitRuleContainer {position:relative; overflow:visible;}.dijitRuleContainerV {height:100%; line-height:0; float:left; text-align:left;}.dj_opera .dijitRuleContainerV {line-height:2%;}.dj_ie .dijitRuleContainerV {line-height:normal;}.dj_gecko .dijitRuleContainerV {margin:0 0 1px 0;}.dijitRuleMark {position:absolute; border:1px solid black; line-height:0; height:100%;}.dijitRuleMarkH {width:0; border-top-width:0 !important; border-bottom-width:0 !important; border-left-width:0 !important;}.dijitRuleLabelContainer {position:absolute;}.dijitRuleLabelContainerH {text-align:center; display:inline-block;}.dijitRuleLabelH {position:relative; left:-50%;}.dijitRuleLabelV {text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}.dijitRuleMarkV {height:0; border-right-width:0 !important; border-bottom-width:0 !important; border-left-width:0 !important; width:100%; left:0;}.dj_ie .dijitRuleLabelContainerV {margin-top:-.55em;}.dj_a11y .dijitSliderReadOnly,.dj_a11y .dijitSliderDisabled {opacity:0.6;}.dj_ie .dj_a11y .dijitSliderReadOnly .dijitSliderBar,.dj_ie .dj_a11y .dijitSliderDisabled .dijitSliderBar {filter: alpha(opacity=40);}.dj_a11y .dijitSlider .dijitSliderButtonContainer div {font-family: monospace; font-size: 1em; line-height: 1em; height: auto; width: auto; margin: 0 4px;}.dj_a11y .dijitButtonContents .dijitButtonText,.dj_a11y .dijitTab .tabLabel {display: inline !important;}.dj_a11y .dijitSelect .dijitButtonText {display: inline-block !important;}.dijitTextArea {width:100%; overflow-y: auto;}.dijitTextArea[cols] {width:auto;}.dj_ie .dijitTextAreaCols {width:auto;}.dijitExpandingTextArea {resize: none;}.dijitToolbarSeparator {height: 18px; width: 5px; padding: 0 1px; margin: 0;}.dijitIEFixedToolbar {position:absolute; top: expression(eval((document.documentElement||document.body).scrollTop));}.dijitEditor {display: block;}.dijitEditorDisabled,.dijitEditorReadOnly {color: gray;}.dijitTimePicker {background-color: white;}.dijitTimePickerItem {cursor:pointer; -webkit-tap-highlight-color: transparent;}.dijitTimePickerItemHover {background-color:gray; color:white;}.dijitTimePickerItemSelected {font-weight:bold; color:#333; background-color:#b7cdee;}.dijitTimePickerItemDisabled {color:gray; text-decoration:line-through;}.dijitTimePickerItemInner {text-align:center; border:0; padding:2px 8px 2px 8px;}.dijitTimePickerTick,.dijitTimePickerMarker {border-bottom:1px solid gray;}.dijitTimePicker .dijitDownArrowButton {border-top: none !important;}.dijitTimePickerTick {color:#CCC;}.dijitTimePickerMarker {color:black; background-color:#CCC;}.dj_a11y .dijitTimePickerItemSelected .dijitTimePickerItemInner {border: solid 4px black;}.dj_a11y .dijitTimePickerItemHover .dijitTimePickerItemInner {border: dashed 4px black;}.dijitToggleButtonIconChar {display:none !important;}.dj_a11y .dijitToggleButton .dijitToggleButtonIconChar {display:inline !important; visibility:hidden;}.dj_ie6 .dijitToggleButtonIconChar, .dj_ie6 .tabStripButton .dijitButtonText {font-family: "Arial Unicode MS";}.dj_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {display: inline !important; visibility:visible !important;}.dijitArrowButtonChar {display:none !important;}.dj_a11y .dijitArrowButtonChar {display:inline !important;}.dj_a11y .dijitDropDownButton .dijitArrowButtonInner,.dj_a11y .dijitComboButton .dijitArrowButtonInner {display:none !important;}.dj_a11y .dijitSelect {border-collapse: separate !important; border-width: 1px; border-style: solid;}.dj_ie .dijitSelect {vertical-align: middle;}.dj_ie6 .dijitSelect .dijitValidationContainer,.dj_ie8 .dijitSelect .dijitButtonText {vertical-align: top;}.dj_ie6 .dijitTextBox .dijitInputContainer,.dj_iequirks .dijitTextBox .dijitInputContainer,.dj_ie6 .dijitTextBox .dijitArrowButtonInner,.dj_ie6 .dijitSpinner .dijitSpinnerButtonInner,.dijitSelect .dijitSelectLabel {vertical-align: baseline;}.dijitNumberTextBox {text-align: left; direction: ltr;}.dijitNumberTextBox .dijitInputInner {text-align: inherit;}.dijitToolbar .dijitSelect {margin: 0;}.dj_webkit .dijitToolbar .dijitSelect {padding-left: 0.3em;}.dijitSelect .dijitButtonContents {padding: 0; white-space: nowrap; text-align: left; border-style: none solid none none; border-width: 1px;}.dijitSelectFixedWidth .dijitButtonContents {width: 100%;}.dijitSelectMenu .dijitMenuItemIcon {display:none;}.dj_ie6 .dijitSelectMenu .dijitMenuItemLabel,.dj_ie7 .dijitSelectMenu .dijitMenuItemLabel {position: static;}.dijitSelectLabel *{vertical-align: baseline;}.dijitSelectSelectedOption * {font-weight: bold;}.dijitSelectMenu {border-width: 1px;}.dijitForceStatic {position: static !important;}.dijitReadOnly *,.dijitDisabled *,.dijitReadOnly,.dijitDisabled {cursor: default;}.dojoDndItem {padding: 2px; -webkit-touch-callout: none; -webkit-user-select: none;}.dojoDndHorizontal .dojoDndItem {#display: inline; display: inline-block;}.dojoDndItemBefore,.dojoDndItemAfter {border: 0px solid #369;}.dojoDndItemBefore {border-width: 2px 0 0 0; padding: 0 2px 2px 2px;}.dojoDndItemAfter {border-width: 0 0 2px 0; padding: 2px 2px 0 2px;}.dojoDndHorizontal .dojoDndItemBefore {border-width: 0 0 0 2px; padding: 2px 2px 2px 0;}.dojoDndHorizontal .dojoDndItemAfter {border-width: 0 2px 0 0; padding: 2px 0 2px 2px;}.dojoDndItemOver {cursor:pointer;}.dj_gecko .dijitArrowButtonInner INPUT,.dj_gecko INPUT.dijitArrowButtonInner {-moz-user-focus:ignore;}.dijitFocused .dijitMenuItemShortcutKey {text-decoration: underline;}.dijitIconSave,.dijitIconPrint,.dijitIconCut,.dijitIconCopy,.dijitIconClear,.dijitIconDelete,.dijitIconUndo,.dijitIconEdit,.dijitIconNewTask,.dijitIconEditTask,.dijitIconEditProperty,.dijitIconTask,.dijitIconFilter,.dijitIconConfigure,.dijitIconSearch,.dijitIconApplication,.dijitIconBookmark,.dijitIconChart,.dijitIconConnector,.dijitIconDatabase,.dijitIconDocuments,.dijitIconMail,.dijitLeaf,.dijitIconFile,.dijitIconFunction,.dijitIconKey,.dijitIconPackage,.dijitIconSample,.dijitIconTable,.dijitIconUsers,.dijitFolderClosed,.dijitIconFolderClosed,.dijitFolderOpened,.dijitIconFolderOpen,.dijitIconError {background-image: url("../../icons/images/commonIconsObjActEnabled.png"); width: 16px; height: 16px;}.dj_ie6 .dijitIconSave,.dj_ie6 .dijitIconPrint,.dj_ie6 .dijitIconCut,.dj_ie6 .dijitIconCopy,.dj_ie6 .dijitIconClear,.dj_ie6 .dijitIconDelete,.dj_ie6 .dijitIconUndo,.dj_ie6 .dijitIconEdit,.dj_ie6 .dijitIconNewTask,.dj_ie6 .dijitIconEditTask,.dj_ie6 .dijitIconEditProperty,.dj_ie6 .dijitIconTask,.dj_ie6 .dijitIconFilter,.dj_ie6 .dijitIconConfigure,.dj_ie6 .dijitIconSearch,.dj_ie6 .dijitIconApplication,.dj_ie6 .dijitIconBookmark,.dj_ie6 .dijitIconChart,.dj_ie6 .dijitIconConnector,.dj_ie6 .dijitIconDatabase,.dj_ie6 .dijitIconDocuments,.dj_ie6 .dijitIconMail,.dj_ie6 .dijitLeaf,.dj_ie6 .dijitIconFile,.dj_ie6 .dijitIconFunction,.dj_ie6 .dijitIconKey,.dj_ie6 .dijitIconPackage,.dj_ie6 .dijitIconSample,.dj_ie6 .dijitIconTable,.dj_ie6 .dijitIconUsers,.dj_ie6 .dijitFolderClosed,.dj_ie6 .dijitIconFolderClosed,.dj_ie6 .dijitFolderOpened,.dj_ie6 .dijitIconFolderOpen,.dj_ie6 .dijitIconError {background-image: url("../../icons/images/commonIconsObjActEnabled8bit.png");}.dijitDisabled .dijitIconSave,.dijitDisabled .dijitIconPrint,.dijitDisabled .dijitIconCut,.dijitDisabled .dijitIconCopy,.dijitDisabled .dijitIconClear,.dijitDisabled .dijitIconDelete,.dijitDisabled .dijitIconUndo,.dijitDisabled .dijitIconEdit,.dijitDisabled .dijitIconNewTask,.dijitDisabled .dijitIconEditTask,.dijitDisabled .dijitIconEditProperty,.dijitDisabled .dijitIconTask,.dijitDisabled .dijitIconFilter,.dijitDisabled .dijitIconConfigure,.dijitDisabled .dijitIconSearch,.dijitDisabled .dijitIconApplication,.dijitDisabled .dijitIconBookmark,.dijitDisabled .dijitIconChart,.dijitDisabled .dijitIconConnector,.dijitDisabled .dijitIconDatabase,.dijitDisabled .dijitIconDocuments,.dijitDisabled .dijitIconMail,.dijitDisabled .dijitLeaf,.dijitDisabled .dijitIconFile,.dijitDisabled .dijitIconFunction,.dijitDisabled .dijitIconKey,.dijitDisabled .dijitIconPackage,.dijitDisabled .dijitIconSample,.dijitDisabled .dijitIconTable,.dijitDisabled .dijitIconUsers,.dijitDisabled .dijitFolderClosed,.dijitDisabled .dijitIconFolderClosed,.dijitDisabled .dijitFolderOpened,.dijitDisabled .dijitIconFolderOpen,.dijitDisabled .dijitIconError {background-image: url("../../icons/images/commonIconsObjActDisabled.png");}.dijitIconSave {background-position: 0;}.dijitIconPrint {background-position: -16px;}.dijitIconCut {background-position: -32px;}.dijitIconCopy {background-position: -48px;}.dijitIconClear {background-position: -64px;}.dijitIconDelete {background-position: -80px;}.dijitIconUndo {background-position: -96px;}.dijitIconEdit {background-position: -112px;}.dijitIconNewTask {background-position: -128px;}.dijitIconEditTask {background-position: -144px;}.dijitIconEditProperty {background-position: -160px;}.dijitIconTask {background-position: -176px;}.dijitIconFilter {background-position: -192px;}.dijitIconConfigure {background-position: -208px;}.dijitIconSearch {background-position: -224px;}.dijitIconError {background-position: -496px;} .dijitIconApplication {background-position: -240px;}.dijitIconBookmark {background-position: -256px;}.dijitIconChart {background-position: -272px;}.dijitIconConnector {background-position: -288px;}.dijitIconDatabase {background-position: -304px;}.dijitIconDocuments {background-position: -320px;}.dijitIconMail {background-position: -336px;}.dijitIconFile, .dijitLeaf {background-position: -352px;}.dijitIconFunction {background-position: -368px;}.dijitIconKey {background-position: -384px;}.dijitIconPackage{background-position: -400px;}.dijitIconSample {background-position: -416px;}.dijitIconTable {background-position: -432px;}.dijitIconUsers {background-position: -448px;}.dijitIconFolderClosed, .dijitFolderClosed {background-position: -464px;}.dijitIconFolderOpen, .dijitFolderOpened {background-position: -480px;}.dijitIconLoading {background: url("../../icons/images/loadingAnimation.gif") no-repeat; height: 20px; width: 20px;}.claro .dijitPopup {-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);}.claro .dijitTooltipDialogPopup {-webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none;}.claro .dijitComboBoxHighlightMatch {background-color: #abd6ff;}.claro .dijitFocusedLabel {outline: 1px dotted #494949;}.claro .dojoDndItem {border-color: rgba(0, 0, 0, 0); -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; transition-duration: 0.25s; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color;}.claro .dojoDndItemOver {background-color: #abd6ff; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 1px; border: solid 1px #759dc0; color: #000000;}.claro .dojoDndItemAnchor,.claro .dojoDndItemSelected {background-color: #cfe5fa; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 1px; border: solid 1px #759dc0; color: #000000;}.claro .dojoDndItemBefore,.claro .dojoDndItemAfter {border-color: #759dc0;}.claro table.dojoDndAvatar {border: 1px solid #b5bcc7; border-collapse: collapse; background-color: #ffffff; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);}.claro .dojoDndAvatarHeader td {height: 20px; padding-left: 21px;}.claro.dojoDndMove .dojoDndAvatarHeader,.claro.dojoDndCopy .dojoDndAvatarHeader {background-image: url("images/dnd.png"); background-repeat: no-repeat; background-position: 2px -122px;}.claro .dojoDndAvatarItem td {padding: 5px;}.claro.dojoDndMove .dojoDndAvatarHeader {background-color: #f58383; background-position: 2px -103px;}.claro.dojoDndCopy .dojoDndAvatarHeader {background-color: #f58383; background-position: 2px -68px;}.claro.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-color: #97e68d; background-position: 2px -33px;}.claro.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader {background-color: #97e68d; background-position: 2px 2px;}.claro .dijitTextBox,.claro .dijitInputInner {color: #000000;}.claro .dijitValidationTextBoxError .dijitValidationContainer {background-color: #d46464; background-image: url("form/images/error.png"); background-position: top center; border: solid #d46464 0; width: 9px;}.claro .dijitTextBoxError .dijitValidationContainer {border-left-width: 1px;}.claro .dijitValidationTextBoxError .dijitValidationIcon {width: 0; background-color: transparent;}.claro .dijitTextArea,.claro .dijitInputField .dijitPlaceHolder {padding: 2px;}.claro .dijitSelect .dijitInputField,.claro .dijitTextBox .dijitInputField {padding: 1px 2px;}.dj_gecko .claro .dijitTextBox .dijitInputInner,.dj_webkit .claro .dijitTextBox .dijitInputInner {padding-left: 1px; padding-right: 1px;}.claro .dijitSelect,.claro .dijitSelect .dijitButtonContents,.claro .dijitTextBox,.claro .dijitTextBox .dijitButtonNode {border-color: #b5bcc7; -webkit-transition-property: background-color, border; -moz-transition-property: background-color, border; transition-property: background-color, border; -webkit-transition-duration: 0.35s; -moz-transition-duration: 0.35s; transition-duration: 0.35s;}.claro .dijitSelect,.claro .dijitTextBox {background-color: #ffffff;}.claro .dijitSelectHover,.claro .dijitSelectHover .dijitButtonContents,.claro .dijitTextBoxHover,.claro .dijitTextBoxHover .dijitButtonNode {border-color: #759dc0; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; transition-duration: 0.25s;}.claro .dijitTextBoxHover {background-color: #e5f2fe; background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);}.claro .dijitSelectError,.claro .dijitSelectError .dijitButtonContents,.claro .dijitTextBoxError,.claro .dijitTextBoxError .dijitButtonNode {border-color: #d46464;}.claro .dijitSelectFocused,.claro .dijitSelectFocused .dijitButtonContents,.claro .dijitTextBoxFocused,.claro .dijitTextBoxFocused .dijitButtonNode {border-color: #759dc0; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s;}.claro .dijitTextBoxFocused {background-color: #ffffff; background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);}.claro .dijitTextBoxFocused .dijitInputContainer {background: #ffffff;}.claro .dijitSelectErrorFocused,.claro .dijitSelectErrorFocused .dijitButtonContents,.claro .dijitTextBoxErrorFocused,.claro .dijitTextBoxErrorFocused .dijitButtonNode {border-color: #ce5050;}.claro .dijitSelectDisabled,.claro .dijitSelectDisabled .dijitButtonContents,.claro .dijitTextBoxDisabled,.claro .dijitTextBoxDisabled .dijitButtonNode {border-color: #d3d3d3;}.claro .dijitSelectDisabled,.claro .dijitTextBoxDisabled,.claro .dijitTextBoxDisabled .dijitInputContainer {background-color: #efefef; background-image: none;}.claro .dijitSelectDisabled,.claro .dijitTextBoxDisabled,.claro .dijitTextBoxDisabled .dijitInputInner {color: #818181;}.dj_webkit .claro .dijitDisabled input {color: #757575;}.dj_webkit .claro textarea.dijitTextAreaDisabled {color: #1b1b1b;}.claro .dijitSelect .dijitArrowButtonInner,.claro .dijitComboBox .dijitArrowButtonInner {background-image: url("form/images/commonFormArrows.png"); background-position: -35px 53%; background-repeat: no-repeat; margin: 0; width: 16px;}.claro .dijitComboBox .dijitArrowButtonInner {border: 1px solid #ffffff;}.claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {border: none;}.claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {border: none;}.claro .dijitSelectLabel,.claro .dijitTextBox .dijitInputInner,.claro .dijitValidationTextBox .dijitValidationContainer {padding: 0px 0;}.claro .dijitComboBox .dijitButtonNode {background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitComboBoxOpenOnClickHover .dijitButtonNode,.claro .dijitComboBox .dijitDownArrowButtonHover,.claro .dijitComboBoxFocused .dijitArrowButton {background-color: #abd6ff;}.claro .dijitComboBoxOpenOnClickHover .dijitArrowButtonInner,.claro .dijitComboBox .dijitDownArrowButtonHover .dijitArrowButtonInner {background-position: -70px 53%;}.claro .dijitComboBox .dijitHasDropDownOpen {background-color: #7dbdfa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 1px;}.dj_iequirks .claro .dijitComboBox .dijitHasDropDownOpen {padding: 1px 0;}.claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {background-position: -70px 53%; border: 0 none;}.claro div.dijitComboBoxDisabled .dijitArrowButtonInner {background-position: 0 50%; background-color: #efefef;}.dj_ff3 .claro .dijitInputField input[type="hidden"] {display: none; height: 0; width: 0;}.dj_borderbox .claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {width: 18px;}.dj_borderbox .claro .dijitComboBoxFocused .dijitHasDropDownOpen .dijitArrowButtonInner {width: 16px;}.claro .dijitButtonNode {-webkit-transition-property: background-color; -moz-transition-property: background-color; transition-property: background-color; -webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; transition-duration: 0.3s;}.claro .dijitButton .dijitButtonNode,.claro .dijitDropDownButton .dijitButtonNode,.claro .dijitComboButton .dijitButtonNode,.claro .dijitToggleButton .dijitButtonNode {border: 1px solid #759dc0; color: #000000; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); background-color: #bcd8f4; background-image: url("form/images/buttonEnabled.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); background-image: -webkit-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); background-image: -o-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); background-image: linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0) 3px, rgba(255, 255, 255, 0.75) 100%); _background-image: none;}.claro .dijitComboButton .dijitArrowButton {border-left-width: 0; padding: 4px 2px 4px 2px;}.claro .dijitArrowButtonInner {width: 15px; height: 15px; margin: 0 auto; background-image: url("form/images/buttonArrows.png"); background-repeat: no-repeat; background-position: -51px 53%;}.claro .dijitLeftArrowButton .dijitArrowButtonInner {background-position: -77px 53%;}.claro .dijitRightArrowButton .dijitArrowButtonInner {background-position: -26px 53%;}.claro .dijitUpArrowButton .dijitArrowButtonInner {background-position: 0 53%;}.claro .dijitDisabled .dijitArrowButtonInner {background-position: -151px 53%;}.claro .dijitDisabled .dijitLeftArrowButton .dijitArrowButtonInner {background-position: -177px 53%;}.claro .dijitDisabled .dijitRightArrowButton .dijitArrowButtonInner {background-position: -126px 53%;}.claro .dijitDisabled .dijitUpArrowButton .dijitArrowButtonInner {background-position: -100px 53%;}.claro .dijitButtonText {padding: 0 0.3em; text-align: center;}.claro .dijitButtonHover .dijitButtonNode,.claro .dijitDropDownButtonHover .dijitButtonNode,.claro .dijitComboButton .dijitButtonNodeHover,.claro .dijitComboButton .dijitDownArrowButtonHover,.claro .dijitToggleButtonHover .dijitButtonNode {background-color: #86bdf2; color: #000000; -webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s;}.claro .dijitButtonActive .dijitButtonNode,.claro .dijitDropDownButtonActive .dijitButtonNode,.claro .dijitComboButtonActive .dijitButtonNode,.claro .dijitToggleButtonActive .dijitButtonNode,.claro .dijitToggleButtonChecked .dijitButtonNode {background-color: #86bdf2; -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s;}.claro .dijitButtonDisabled,.claro .dijitDropDownButtonDisabled,.claro .dijitComboButtonDisabled,.claro .dijitToggleButtonDisabled {background-image: none; outline: none;}.claro .dijitButtonDisabled .dijitButtonNode,.claro .dijitDropDownButtonDisabled .dijitButtonNode,.claro .dijitComboButtonDisabled .dijitButtonNode,.claro .dijitToggleButtonDisabled .dijitButtonNode {background-color: #efefef; border: solid 1px #d3d3d3; color: #818181; -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0); -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0); box-shadow: 0 0 0 rgba(0, 0, 0, 0); background-image: url("form/images/buttonDisabled.png"); background-image: -moz-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%); background-image: -webkit-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%); background-image: -o-linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%); background-image: linear-gradient(#ffffff 0%, rgba(255, 255, 255, 0) 40%); _background-image: none;}.claro .dijitComboButtonDisabled .dijitArrowButton {border-left-width: 0;}.claro table.dijitComboButton {border-collapse: separate;}.claro .dijitComboButton .dijitStretch {-moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px;}.claro .dijitComboButton .dijitArrowButton {-moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;}.claro .dijitToggleButton .dijitCheckBoxIcon {background-image: url("images/checkmarkNoBorder.png");}.dj_ie6 .claro .dijitToggleButton .dijitCheckBoxIcon {background-image: url("images/checkmarkNoBorder.gif");}.claro .dijitCheckBox,.claro .dijitCheckBoxIcon {background-image: url("form/images/checkboxRadioButtonStates.png"); background-repeat: no-repeat; width: 15px; height: 16px; margin: 0 2px 0 0; padding: 0;}.dj_ie6 .claro .dijitCheckBox,.dj_ie6 .claro .dijitCheckBoxIcon {background-image: url("form/images/checkboxAndRadioButtons_IE6.png");}.claro .dijitCheckBox,.claro .dijitToggleButton .dijitCheckBoxIcon {background-position: -15px;}.claro .dijitCheckBoxChecked,.claro .dijitToggleButtonChecked .dijitCheckBoxIcon {background-position: 0;}.claro .dijitCheckBoxDisabled {background-position: -75px;}.claro .dijitCheckBoxCheckedDisabled {background-position: -60px;}.claro .dijitCheckBoxHover {background-position: -45px;}.claro .dijitCheckBoxCheckedHover {background-position: -30px;}.claro .dijitToggleButton .dijitRadio,.claro .dijitToggleButton .dijitRadioIcon {background-image: url("form/images/checkboxRadioButtonStates.png");}.dj_ie6 .claro .dijitToggleButton .dijitRadio,.dj_ie6 .claro .dijitToggleButton .dijitRadioIcon {background-image: url("form/images/checkboxAndRadioButtons_IE6.png");}.claro .dijitRadio,.claro .dijitRadioIcon {background-image: url("form/images/checkboxRadioButtonStates.png"); background-repeat: no-repeat; width: 15px; height: 15px; margin: 0 2px 0 0; padding: 0;}.dj_ie6 .claro .dijitRadio,.dj_ie6 .claro .dijitRadioIcon {background-image: url("form/images/checkboxAndRadioButtons_IE6.png");}.claro .dijitRadio {background-position: -105px;}.claro .dijitToggleButton .dijitRadioIcon {background-position: -107px;}.claro .dijitRadioDisabled {background-position: -165px;}.claro .dijitRadioHover {background-position: -135px;}.claro .dijitRadioChecked {background-position: -90px;}.claro .dijitToggleButtonChecked .dijitRadioIcon {background-position: -92px;}.claro .dijitRadioCheckedHover {background-position: -120px;}.claro .dijitRadioCheckedDisabled {background-position: -150px;}.claro .dijitSelect .dijitArrowButtonContainer {border: 1px solid #ffffff;}.claro .dijitSelect .dijitArrowButton {padding: 0; background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitSelect .dijitArrowButton .dijitArrowButtonInner {height: 16px;}.claro .dijitSelectHover {background-color: #e5f2fe; background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-repeat: repeat-x;}.claro .dijitSelectHover .dijitArrowButton {background-color: #abd6ff;}.claro .dijitSelectHover .dijitArrowButton .dijitArrowButtonInner {background-position: -70px 53%;}.claro .dijitSelectFocused .dijitArrowButton {background-color: #7dbefa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitSelectFocused .dijitArrowButton {border: none; padding: 1px;}.claro .dijitSelectFocused .dijitArrowButton .dijitArrowButtonInner {background-position: -70px 53%;}.claro .dijitSelectDisabled {border-color: #d3d3d3; background-color: #efefef; background-image: none; color: #818181;}.claro .dijitSelectDisabled .dijitArrowButton .dijitArrowButtonInner {background-position: 0 53%;}.claro .dijitSelectMenu td.dijitMenuItemIconCell,.claro .dijitSelectMenu td.dijitMenuArrowCell {display: none;}.claro .dijitSelectMenu td.dijitMenuItemLabel {padding: 2px;}.claro .dijitSelectMenu .dijitMenuSeparatorTop {border-bottom: 1px solid #759dc0;}.claro .dijitTabPaneWrapper {background: #ffffff;}.claro .dijitTabPaneWrapper,.claro .dijitTabContainerTop-tabs,.claro .dijitTabContainerBottom-tabs,.claro .dijitTabContainerLeft-tabs,.claro .dijitTabContainerRight-tabs {border-color: #b5bcc7;}.claro .dijitTabCloseButton {background: url("layout/images/tabClose.png") no-repeat; width: 14px; height: 14px; margin-left: 5px; margin-right: -5px;}.claro .dijitTabCloseButtonHover {background-position: -14px;}.claro .dijitTabCloseButtonActive {background-position: -28px;}.claro .dijitTabSpacer {display: none;}.claro .dijitTab {border: 1px solid #b5bcc7; background-color: #efefef; -webkit-transition-property: background-color, border; -moz-transition-property: background-color, border; transition-property: background-color, border; -webkit-transition-duration: 0.35s; -moz-transition-duration: 0.35s; transition-duration: 0.35s; color: #494949;}.claro .dijitTabHover {border-color: #759dc0; background-color: #abd6ff; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; transition-duration: 0.25s; color: #000000;}.claro .dijitTabActive {border-color: #759dc0; background-color: #7dbdfa; color: #000000; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s;}.claro .dijitTabChecked {border-color: #b5bcc7; background-color: #cfe5fa; color: #000000;}.claro .dijitTabDisabled {background-color: #d3d3d3;}.claro .tabStripButton {background-color: transparent; border: none;}.claro .dijitTabContainerTop-tabs .dijitTab {top: 1px; margin-right: 1px; padding: 3px 6px; border-bottom-width: 0; min-width: 60px; text-align: center; background-image: url("layout/images/tabTopUnselected.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); -webkit-box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.04); -moz-box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.04); box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.04);}.claro .dijitTabContainerTop-tabs .dijitTabChecked {padding-bottom: 4px; padding-top: 9px; background-image: url("layout/images/tabTopSelected.png"); background-image: -moz-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); background-image: -webkit-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); background-image: -o-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); background-image: linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); -webkit-box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.05);}.claro .dijitTabContainerBottom-tabs .dijitTab {top: -1px; margin-right: 1px; padding: 3px 6px; border-top-width: 0; min-width: 60px; text-align: center; background-image: url("layout/images/tabBottomUnselected.png"); background-repeat: repeat-x; background-position: bottom; background-image: -moz-linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);}.claro .dijitTabContainerBottom-tabs .dijitTabChecked {padding-bottom: 9px; padding-top: 4px; background-image: url("layout/images/tabBottomSelected.png"); background-image: -moz-linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); background-image: -webkit-linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); background-image: -o-linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); background-image: linear-gradient(bottom, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px, #ffffff 7px); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);}.claro .dijitTabContainerLeft-tabs .dijitTab {left: 1px; margin-bottom: 1px; padding: 3px 8px 4px 4px; background-image: url("layout/images/tabLeftUnselected.png"); background-repeat: repeat-y; background-image: -moz-linear-gradient(left, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(left, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(left, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(left, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%);}.claro .dijitTabContainerLeft-tabs .dijitTabChecked {border-right-width: 0; padding-right: 9px; background-image: url("layout/images/tabLeftSelected.png"); background-image: -moz-linear-gradient(left, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); background-image: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); background-image: -o-linear-gradient(left, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); background-image: linear-gradient(left, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); -webkit-box-shadow: -1px 0 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: -1px 0 2px rgba(0, 0, 0, 0.05); box-shadow: -1px 0 2px rgba(0, 0, 0, 0.05);}.claro .dijitTabContainerRight-tabs .dijitTab {left: -1px; margin-bottom: 1px; padding: 3px 8px 4px 4px; background-image: url("layout/images/tabRightUnselected.png"); background-repeat: repeat-y; background-position: right; background-image: -moz-linear-gradient(right, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(right, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(right, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(right, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.6) 7px, rgba(255, 255, 255, 0) 100%);}.claro .dijitTabContainerRight-tabs .dijitTabChecked {padding-left: 5px; border-left-width: 0; background-image: url("layout/images/tabRightSelected.png"); background-image: -moz-linear-gradient(right, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); background-image: -webkit-linear-gradient(right, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); background-image: -o-linear-gradient(right, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); background-image: linear-gradient(right, rgba(255, 255, 255, 0.5) 0px, #ffffff 30px); -webkit-box-shadow: 1px 0 2px rgba(0, 0, 0, 0.07); -moz-box-shadow: 1px 0 2px rgba(0, 0, 0, 0.07); box-shadow: 1px 0 2px rgba(0, 0, 0, 0.07);}.claro .dijitTabContainerTop-tabs .dijitTab {-moz-border-radius: 2px 2px 0 0; border-radius: 2px 2px 0 0;}.claro .dijitTabContainerBottom-tabs .dijitTab {-moz-border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;}.claro .dijitTabContainerLeft-tabs .dijitTab {-moz-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px;}.claro .dijitTabContainerRight-tabs .dijitTab {-moz-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}.claro .tabStripButton {background-color: #e5f2fe; border: 1px solid #b5bcc7;}.claro .dijitTabListContainer-top .tabStripButton {padding: 4px 3px; margin-top: 7px; background-image: -moz-linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%);}.claro .dijitTabListContainer-bottom .tabStripButton {padding: 4px 3px; margin-bottom: 7px; background-image: -moz-linear-gradient(bottom, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(bottom, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(bottom, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(bottom, #ffffff 0px, rgba(255, 255, 255, 0.1) 1px, rgba(255, 255, 255, 0.6) 6px, rgba(255, 255, 255, 0) 100%);}.claro .tabStripButtonHover {background-color: #abd6ff;}.claro .tabStripButtonActive {background-color: #7dbdfa;}.claro .dijitTabStripIcon {height: 15px; width: 15px; margin: 0 auto; background: url("form/images/buttonArrows.png") no-repeat -75px 50%; background-color: transparent;}.claro .dijitTabStripSlideRightIcon {background-position: -24px 50%;}.claro .dijitTabStripMenuIcon {background-position: -51px 50%;}.claro .dijitTabListContainer-top .tabStripButtonDisabled,.claro .dijitTabListContainer-bottom .tabStripButtonDisabled {background-color: #d3d3d3; border: 1px solid #b5bcc7;}.claro .tabStripButtonDisabled .dijitTabStripSlideLeftIcon {background-position: -175px 50%;}.claro .tabStripButtonDisabled .dijitTabStripSlideRightIcon {background-position: -124px 50%;}.claro .tabStripButtonDisabled .dijitTabStripMenuIcon {background-position: -151px 50%;}.claro .dijitTabContainerNested .dijitTabListWrapper {height: auto;}.claro .dijitTabContainerNested .dijitTabContainerTop-tabs {border-bottom: solid 1px #b5bcc7; padding: 2px 2px 4px;}.claro .dijitTabContainerTabListNested .dijitTab {background-color: rgba(255, 255, 255, 0); border: none; padding: 4px; border-color: rgba(118, 157, 192, 0); -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color; -webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; transition-duration: 0.3s; -moz-border-radius: 2px; border-radius: 2px; top: 0; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; background-image: url("layout/images/tabNested.png") repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.61) 0%, rgba(255, 255, 255, 0) 17%, rgba(255, 255, 255, 0) 83%, rgba(255, 255, 255, 0.61) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.61) 0%, rgba(255, 255, 255, 0) 17%, rgba(255, 255, 255, 0) 83%, rgba(255, 255, 255, 0.61) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.61) 0%, rgba(255, 255, 255, 0) 17%, rgba(255, 255, 255, 0) 83%, rgba(255, 255, 255, 0.61) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.61) 0%, rgba(255, 255, 255, 0) 17%, rgba(255, 255, 255, 0) 83%, rgba(255, 255, 255, 0.61) 100%);}.claro .dijitTabContainerTabListNested .dijitTabHover {background-color: #e5f2fe; border: solid 1px #cfe5fa; padding: 3px; -webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s;}.claro .dijitTabContainerTabListNested .dijitTabHover .tabLabel {text-decoration: none;}.claro .dijitTabContainerTabListNested .dijitTabActive {border: solid 1px #759dc0; padding: 3px; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s;}.claro .dijitTabContainerTabListNested .dijitTabChecked {padding: 3px; border: solid 1px #759dc0; background-color: #cfe5fa;}.claro .dijitTabContainerTabListNested .dijitTabChecked .tabLabel {text-decoration: none; background-image: none;}.claro .dijitTabPaneWrapperNested {border: none;}.claro .dijitTabContainer .dijitTab,.claro .dijitTabContainer .tabStripButton {_background-image: none;}.claro .dijitDialog {border: 1px solid #759dc0; -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);}.claro .dijitDialogPaneContent {background: #ffffff repeat-x top left; border-top: 1px solid #759dc0; padding: 10px 8px; position: relative;}.claro .dijitDialogPaneContentArea {margin: -10px -8px; padding: 10px 8px;}.claro .dijitDialogPaneActionBar {background-color: #efefef; padding: 3px 5px 2px 7px; text-align: right; border-top: 1px solid #d3d3d3; margin: 10px -8px -10px;}.claro .dijitTooltipDialog .dijitDialogPaneActionBar {-webkit-border-bottom-right-radius: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -moz-border-radius-bottomleft: 4px; margin: 10px -10px -8px;}.claro .dijitDialogPaneActionBar .dijitButton {float: none;}.claro .dijitDialogTitleBar {border: 1px solid #ffffff; border-top: none; background-color: #abd6ff; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 5px 7px 4px 7px;}.claro .dijitDialogTitle {padding: 0 1px; font-size: 1.091em; color: #000000;}.claro .dijitDialogCloseIcon {background: url("images/dialogCloseIcon.png"); background-repeat: no-repeat; position: absolute; right: 5px; height: 15px; width: 21px;}.dj_ie6 .claro .dijitDialogCloseIcon {background-image: url("images/dialogCloseIcon8bit.png");}.claro .dijitDialogCloseIconHover {background-position: -21px;}.claro .dijitDialogCloseIcon:active {background-position: -42px;}.claro .dijitTooltip,.claro .dijitTooltipDialog {background: transparent;}.dijitTooltipBelow {padding-top: 13px; padding-left: 3px; padding-right: 3px;}.dijitTooltipAbove {padding-bottom: 13px; padding-left: 3px; padding-right: 3px;}.claro .dijitTooltipContainer {background-color: #ffffff; background-image: -moz-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #ffffff 10px); background-image: -webkit-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #ffffff 10px); background-image: -o-linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #ffffff 10px); background-image: linear-gradient(bottom, rgba(207, 229, 250, 0.1) 0px, #ffffff 10px); background-position: bottom; border: 1px solid #759dc0; padding: 6px 8px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); font-size: 1em; color: #000000;}.claro .dijitTooltipConnector {border: 0; z-index: 2; background-image: url("images/tooltip.png"); background-repeat: no-repeat; width: 16px; height: 14px;}.dj_ie6 .claro .dijitTooltipConnector {background-image: url("images/tooltip8bit.png");}.claro .dijitTooltipBelow .dijitTooltipConnector {top: 0; left: 3px; background-position: -31px 0; width: 16px; height: 14px;}.claro .dijitTooltipAbove .dijitTooltipConnector {bottom: 0; left: 3px; background-position: -15px 0; width: 16px; height: 14px;}.dj_ie7 .claro .dijitTooltipAbove .dijitTooltipConnector,.dj_ie6 .claro .dijitTooltipAbove .dijitTooltipConnector {bottom: -1px;}.claro .dijitTooltipABRight .dijitTooltipConnector {left: auto; right: 3px;}.claro .dijitTooltipLeft {padding-right: 14px;}.claro .dijitTooltipLeft .dijitTooltipConnector {right: 0; background-position: 0 0; width: 16px; height: 14px;}.claro .dijitTooltipRight {padding-left: 14px;}.claro .dijitTooltipRight .dijitTooltipConnector {left: 0; background-position: -48px 0; width: 16px; height: 14px;}.claro .dijitDialogUnderlay {background: #ffffff;}.claro .dijitAccordionContainer {border: none;}.claro .dijitAccordionInnerContainer {background-color: #efefef; border: solid 1px #b5bcc7; margin-bottom: 1px; -webkit-transition-property: background-color, border; -moz-transition-property: background-color, border; transition-property: background-color, border; -webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; transition-duration: 0.3s; -webkit-transition-timing-function: linear; -moz-transition-timing-function: linear; transition-timing-function: linear;}.claro .dijitAccordionTitle {background-color: transparent; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 5px 7px 2px 7px; min-height: 17px; color: #494949;}.claro .dijitAccordionContainer .dijitAccordionChildWrapper {background-color: #ffffff; border: 1px solid #759dc0; margin: 0 2px 2px;}.claro .dijitAccordionContainer .dijitAccordionContainer-child {padding: 9px;}.claro .dijitAccordionInnerContainerHover {border: 1px solid #759dc0; background-color: #abd6ff; -webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s;}.claro .dijitAccordionInnerContainerHover .dijitAccordionTitle {color: #000000;}.claro .dijitAccordionInnerContainerActive {border: 1px solid #759dc0; background-color: #7dbdfa; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s;}.claro .dijitAccordionInnerContainerActive .dijitAccordionTitle {background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none; color: #000000;}.claro .dijitAccordionInnerContainerSelected {border-color: #759dc0; background-color: #cfe5fa;}.claro .dijitAccordionInnerContainerSelected .dijitAccordionTitle {color: #000000; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitContentPane {}.claro .dijitTabContainerTop-dijitContentPane,.claro .dijitTabContainerLeft-dijitContentPane,.claro .dijitTabContainerBottom-dijitContentPane,.claro .dijitTabContainerRight-dijitContentPane,.claro .dijitAccordionContainer-dijitContentPane {background-color: #ffffff;}.claro .dijitSplitContainer-dijitContentPane,.claro .dijitBorderContainer-dijitContentPane {background-color: #ffffff;}.claro .dijitCalendar {border: solid 1px #b5bcc7; border-collapse: separate; -moz-border-radius: 4px; border-radius: 4px; background-color: #cfe5fa; background-image: url("images/calendar.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(#ffffff 0px, rgba(255, 255, 255, 0.4) 2px, rgba(255, 255, 255, 0) 100%); text-align: center; padding: 6px 5px 3px 5px;}.dj_ie6 .claro .dijitCalendar {background-image: none;}.claro .dijitCalendar img {border: none;}.claro .dijitCalendarHover,.claro .dijitCalendar:hover,.claro .dijitCalendarActive {background-color: #abd6ff; border: solid 1px #759dc0;}.claro .dijitCalendarMonthContainer th {text-align: center; padding-bottom: 4px; vertical-align: middle;}.claro .dijitCalendarMonthLabel {color: #000000; font-size: 1.091em; padding: 0 4px;}.claro .dijitCalendarIncrementControl {width: 18px; height: 16px; background-image: url("images/calendarArrows.png"); background-repeat: no-repeat;}.dj_ie6 .claro .dijitCalendarIncrementControl {background-image: url("images/calendarArrows8bit.png");}.claro .dijitCalendarIncrease {background-position: -18px 0;}.claro .dijitCalendarArrowHover .dijitCalendarDecrease,.claro .dijitCalendarArrow:hover .dijitCalendarDecrease {background-position: -36px 0;}.claro .dijitCalendarArrowHover .dijitCalendarIncrease,.claro .dijitCalendarArrow:hover .dijitCalendarIncrease {background-position: -55px 0;}.claro .dijitCalendarArrowActive .dijitCalendarDecrease,.claro .dijitCalendarArrow:active .dijitCalendarDecrease {background-position: -72px 0;}.claro .dijitCalendarArrowActive .dijitCalendarIncrease,.claro .dijitCalendarArrow:active .dijitCalendarIncrease {background-position: -91px 0;}.claro .dijitA11ySideArrow {display: none;}.claro .dijitCalendarDayLabelTemplate {padding-bottom: 0; text-align: center; border-bottom: 1px solid #b5bcc7; padding: 0 3px 2px;}.claro .dijitCalendarDayLabel {padding: 0 4px 0 4px; font-weight: bold; font-size: 0.909em; text-align: center; color: #000000;}.claro .dijitCalendarDateTemplate {background-color: #ffffff; border-bottom: 1px solid #d3d3d3; padding-top: 0; font-size: 0.909em; font-family: Arial; font-weight: bold; letter-spacing: .05em; text-align: center; color: #000000;}.dj_ie6 .claro .dijitCalendarDateTemplate {background-image: none;}.claro .dijitCalendarPreviousMonth,.claro .dijitCalendarNextMonth {background-color: #e5f2fe; background-image: none; border-bottom: solid 1px #d3d3d3;}.claro .dijitCalendarDateTemplate .dijitCalendarDateLabel {text-decoration: none; display: block; padding: 3px 5px 3px 4px; border: solid 1px #ffffff; background-color: rgba(171, 212, 251, 0); -webkit-transition-property: background-color, border; -moz-transition-property: background-color, border; transition-property: background-color, border; -webkit-transition-duration: 0.35s; -moz-transition-duration: 0.35s; transition-duration: 0.35s;}.claro .dijitCalendarPreviousMonth .dijitCalendarDateLabel,.claro .dijitCalendarNextMonth .dijitCalendarDateLabel {color: #759dc0; border-color: #e5f2fe;}.claro .dijitCalendarYearContainer {vertical-align: middle;}.claro .dijitCalendarYearControl {padding: 1px 2px 2px 2px;}.claro .dijitCalendarYearLabel {padding: 2px 0 0 0; margin: 0; font-size: 1.17em;}.claro .dijitCalendarYearLabel span {vertical-align: middle;}.claro .dijitCalendarSelectedYear {padding: 0 3px;}.claro .dijitCalendarNextYear,.claro .dijitCalendarPreviousYear {padding: 1px 6px 1px 6px; font-size: 0.909em;}.claro .dijitCalendarSelectedYear {font-size: 1.091em; color: #000000;}.claro .dijitCalendarHoveredDate .dijitCalendarDateLabel,.claro .dijitCalendarEnabledDate:hover .dijitCalendarDateLabel {background-color: #abd6ff; border: solid 1px #759dc0; color: #000000; -webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s;}.claro .dijitCalendarNextYearHover,.claro .dijitCalendarNextYear:hover,.claro .dijitCalendarPreviousYearHover,.claro .dijitCalendarPreviousYear:hover {color: #000000; border: solid 1px #ffffff; padding: 0 5px 0 5px; background-color: #e5f2fe;}.claro .dijitCalendarNextYearActive,.claro .dijitCalendarNextYear:active .claro .dijitCalendarPreviousYearActive,.claro .dijitCalendarPreviousYear:active {border: solid 1px #759dc0; padding: 0 5px 0 5px; background-color: #7dbdfa;}.claro .dijitCalendarActiveDate .dijitCalendarDateLabel,.claro .dijitCalendarEnabledDate:active .dijitCalendarDateLabel {background-color: #7dbdfa; border: solid 1px #ffffff; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; transition-duration: 0.1s;}.dj_ie6 .claro .dijitCalendarActiveDate .dijitCalendarDateLabel {background-image: none;}.claro .dijitCalendarSelectedDate .dijitCalendarDateLabel {color: #000000; background-color: #abd6ff; border-color: #759dc0;}.claro .dijitCalendarDisabledDate .dijitCalendarDateLabel {color: #818181; text-decoration: line-through;}.claro .dijitCalendar .dijitDropDownButton {margin: 0;}.claro .dijitCalendar .dijitButtonText {padding: 1px 0 3px; margin-right: -4px;}.claro .dijitCalendar .dijitDropDownButton .dijitButtonNode {padding: 0 3px 0 2px; border: solid 1px #b5bcc7; -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0); -moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0); box-shadow: 0 0 0 rgba(0, 0, 0, 0); background-color: transparent; background-image: none;}.claro .dijitCalendar .dijitDropDownButtonHover .dijitButtonNode,.claro .dijitCalendar .dijitDropDownButton:hover .dijitButtonNode {background-color: #e5f2fe; border: solid 1px #ffffff;}.claro .dijitCalendarMonthMenu {border-color: #759dc0; background-color: #ffffff; text-align: center; background-image: none;}.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel {border-top: solid 1px #ffffff; border-bottom: solid 1px #ffffff; padding: 2px 0;}.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover,.claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel:hover {border-color: #759dc0; border-width: 1px 0; background-color: #abd6ff; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= #ffffff , endColorstr= #abd6ff );}.claro .dijitMenuBar {border: 1px solid #b5bcc7; margin: 0; padding: 0; background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitMenu {background-color: #ffffff; border: 1px solid #759dc0;}.claro .dijitMenuItem {color: #000000;}.claro .dijitMenuBar .dijitMenuItem {padding: 6px 10px 7px; margin: -1px;}.claro .dijitMenuBar .dijitMenuItemHover,.claro .dijitMenuBar .dijitMenuItemSelected {border: solid 1px #759dc0; padding: 5px 9px 6px;}.claro .dijitMenuTable {border-collapse: separate; border-spacing: 0 0; padding: 0;}.claro .dijitMenu .dijitMenuItem td,.claro .dijitComboBoxMenu .dijitMenuItem {padding: 2px 6px; border-width: 1px 0 1px 0; border-style: solid; border-color: #ffffff;}.claro .dijitMenu .dijitMenuItemHover td,.claro .dijitMenu .dijitMenuItemSelected td,.claro .dijitMenuItemHover,.claro .dijitComboBoxMenu .dijitMenuItemHover,.claro .dijitMenuItemSelected {border-color: #759dc0; background-color: #abd6ff; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitMenuItemActive {background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none;}.dj_ie .claro .dijitMenuActive .dijitMenuItemHover,.dj_ie .claro .dijitMenuActive .dijitMenuItemSelected,.dj_ie .claro .dijitMenuPassive .dijitMenuItemHover,.dj_ie .claro .dijitMenuPassive .dijitMenuItemSelected {padding-top: 6px; padding-bottom: 5px; margin-top: -3px;}.claro td.dijitMenuItemIconCell {padding: 2px; margin: 0 0 0 4px;}.claro td.dijitMenuItemLabel {padding-top: 5px; padding-bottom: 5px;}.claro .dijitMenuExpand {width: 7px; height: 7px; background-image: url("images/spriteArrows.png"); background-position: -14px 0; margin-right: 3px; margin-bottom: 4px;}.claro .dijitMenuItemDisabled .dijitMenuItemIconCell {opacity: 1;}.claro .dijitMenuSeparatorTop {height: auto; margin-top: 1px; border-bottom: 1px solid #b5bcc7;}.claro .dijitMenuSeparatorBottom {height: auto; margin-bottom: 1px;}.claro .dijitCheckedMenuItem .dijitMenuItemIcon,.claro .dijitRadioMenuItem .dijitMenuItemIcon {background-image: url("form/images/checkboxRadioButtonStates.png"); background-repeat: no-repeat; background-position: -15px 50%; width: 15px; height: 16px;}.dj_ie6 .claro .dijitCheckedMenuItem .dijitMenuItemIcon,.dj_ie6 .claro .dijitRadioMenuItem .dijitMenuItemIcon {background-image: url("form/images/checkboxAndRadioButtons_IE6.png");}.claro .dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon {background-position: 0 50%;}.claro .dijitRadioMenuItem .dijitMenuItemIcon {background-position: -105px 50%;}.claro .dijitRadioMenuItemChecked .dijitMenuItemIcon {background-position: -90px 50%;}.claro .dijitComboBoxMenu {margin-left: 0; background-image: none;}.claro .dijitMenu .dijitMenuItemSelected td,.claro .dijitComboBoxMenu .dijitMenuItemSelected {color: #000000; border-color: #759dc0; background-color: #abd6ff;}.claro .dijitComboBoxMenuActive .dijitMenuItemSelected {background-color: #7dbdfa;}.claro .dijitMenuPreviousButton,.claro .dijitMenuNextButton {font-style: italic;}.claro .dijitSliderBar {border-style: solid; outline: 1px;}.claro .dijitSliderFocused .dijitSliderBar {border-color: #759dc0;}.claro .dijitSliderHover .dijitSliderBar {border-color: #759dc0;}.claro .dijitSliderDisabled .dijitSliderBar {background-image: none; border-color: #d3d3d3;}.claro .dijitRuleLabelsContainer {color: #000000;}.claro .dijitRuleLabelsContainerH {padding: 2px 0;}.claro .dijitSlider .dijitSliderProgressBarH,.claro .dijitSlider .dijitSliderLeftBumper {border-color: #b5bcc7; background-color: #cfe5fa; background-image: -moz-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px); background-image: -webkit-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px); background-image: -o-linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px); background-image: linear-gradient(top, #ffffff 0px, #ffffff 1px, rgba(255, 255, 255, 0) 2px);}.claro .dijitSlider .dijitSliderRemainingBarH,.claro .dijitSlider .dijitSliderRightBumper {border-color: #b5bcc7; background-color: #ffffff;}.claro .dijitSliderRightBumper {border-right: solid 1px #b5bcc7;}.claro .dijitSliderLeftBumper {border-left: solid 1px #b5bcc7;}.claro .dijitSliderHover .dijitSliderProgressBarH,.claro .dijitSliderHover .dijitSliderLeftBumper {background-color: #abd6ff; border-color: #759dc0;}.claro .dijitSliderHover .dijitSliderRemainingBarH,.claro .dijitSliderHover .dijitSliderRightBumper {background-color: #ffffff; border-color: #759dc0;}.claro .dijitSliderFocused .dijitSliderProgressBarH,.claro .dijitSliderFocused .dijitSliderLeftBumper {background-color: #abd6ff; border-color: #759dc0; -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);}.claro .dijitSliderFocused .dijitSliderRemainingBarH,.claro .dijitSliderFocused .dijitSliderRightBumper {background-color: #ffffff; border-color: #759dc0; -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);}.claro .dijitSliderDisabled .dijitSliderProgressBarH,.claro .dijitSliderDisabled .dijitSliderLeftBumper {background-color: #d3d3d3; background-image: none;}.claro .dijitSliderDisabled .dijitSliderRemainingBarH,.claro .dijitSliderDisabled .dijitSliderRightBumper {background-color: #efefef;}.claro .dijitRuleLabelsContainerV {padding: 0 2px;}.claro .dijitSlider .dijitSliderProgressBarV,.claro .dijitSlider .dijitSliderBottomBumper {border-color: #b5bcc7; background-color: #cfe5fa; background-image: -moz-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px); background-image: -webkit-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px); background-image: -o-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px); background-image: linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 1px);}.claro .dijitSlider .dijitSliderRemainingBarV,.claro .dijitSlider .dijitSliderTopBumper {border-color: #b5bcc7; background-color: #ffffff;}.claro .dijitSliderBottomBumper {border-bottom: solid 1px #b5bcc7;}.claro .dijitSliderTopBumper {border-top: solid 1px #b5bcc7;}.claro .dijitSliderHover .dijitSliderProgressBarV,.claro .dijitSliderHover .dijitSliderBottomBumper {background-color: #abd6ff; border-color: #759dc0;}.claro .dijitSliderHover .dijitSliderRemainingBarV,.claro .dijitSliderHover .dijitSliderTopBumper {background-color: #ffffff; border-color: #759dc0;}.claro .dijitSliderFocused .dijitSliderProgressBarV,.claro .dijitSliderFocused .dijitSliderBottomBumper {background-color: #abd6ff; border-color: #759dc0; -webkit-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);}.claro .dijitSliderFocused .dijitSliderRemainingBarV,.claro .dijitSliderFocused .dijitSliderTopBumper {background-color: #ffffff; border-color: #759dc0; -webkit-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 1px 0px 1px rgba(0, 0, 0, 0.2);}.claro .dijitSliderDisabled .dijitSliderProgressBarV,.claro .dijitSliderDisabled .dijitSliderBottomBumper {background-color: #d3d3d3;}.claro .dijitSliderDisabled .dijitSliderRemainingBarV,.claro .dijitSliderDisabled .dijitSliderTopBumper {background-color: #efefef;}.claro .dijitSliderImageHandleH {border: 0; width: 18px; height: 16px; background-image: url("form/images/sliderThumbs.png"); background-repeat: no-repeat; background-position: 0 0;}.claro .dijitSliderHover .dijitSliderImageHandleH {background-position: -18px 0;}.claro .dijitSliderFocused .dijitSliderImageHandleH {background-position: -36px 0;}.claro .dijitSliderProgressBarH .dijitSliderThumbHover {background-position: -36px 0;}.claro .dijitSliderProgressBarH .dijitSliderThumbActive {background-position: -36px 0;}.claro .dijitSliderReadOnly .dijitSliderImageHandleH,.claro .dijitSliderDisabled .dijitSliderImageHandleH {background-position: -54px 0;}.claro .dijitSliderImageHandleV {border: 0; width: 18px; height: 16px; background-image: url("form/images/sliderThumbs.png"); background-repeat: no-repeat; background-position: -289px 0;}.claro .dijitSliderHover .dijitSliderImageHandleV {background-position: -307px 0;}.claro .dijitSliderFocused .dijitSliderImageHandleV {background-position: -325px 0;}.claro .dijitSliderProgressBarV .dijitSliderThumbHover {background-position: -325px 0;}.claro .dijitSliderProgressBarV .dijitSliderThumbActive {background-position: -325px 0;}.claro .dijitSliderReadOnly .dijitSliderImageHandleV,.claro .dijitSliderDisabled .dijitSliderImageHandleV {background-position: -343px 0;}.claro .dijitSliderButtonContainerH {padding: 1px 3px 1px 2px;}.claro .dijitSliderButtonContainerV {padding: 3px 1px 2px 1px;}.claro .dijitSliderDecrementIconH,.claro .dijitSliderIncrementIconH,.claro .dijitSliderDecrementIconV,.claro .dijitSliderIncrementIconV {background-image: url("form/images/commonFormArrows.png"); background-repeat: no-repeat; background-color: #efefef; -moz-border-radius: 2px; border-radius: 2px; border: solid 1px #b5bcc7; font-size: 1px;}.claro .dijitSliderDecrementIconH,.claro .dijitSliderIncrementIconH {height: 12px; width: 9px;}.claro .dijitSliderDecrementIconV,.claro .dijitSliderIncrementIconV {height: 9px; width: 12px;}.claro .dijitSliderActive .dijitSliderDecrementIconH,.claro .dijitSliderActive .dijitSliderIncrementIconH,.claro .dijitSliderActive .dijitSliderDecrementIconV,.claro .dijitSliderActive .dijitSliderIncrementIconV,.claro .dijitSliderHover .dijitSliderDecrementIconH,.claro .dijitSliderHover .dijitSliderIncrementIconH,.claro .dijitSliderHover .dijitSliderDecrementIconV,.claro .dijitSliderHover .dijitSliderIncrementIconV {border: solid 1px #759dc0; background-color: #ffffff;}.claro .dijitSliderDecrementIconH {background-position: -357px 50%;}.claro .dijitSliderActive .dijitSliderDecrementIconH .claro .dijitSliderHover .dijitSliderDecrementIconH {background-position: -393px 50%;}.claro .dijitSliderIncrementIconH {background-position: -251px 50%;}.claro .dijitSliderActive .dijitSliderIncrementIconH .claro .dijitSliderHover .dijitSliderIncrementIconH {background-position: -283px 50%;}.claro .dijitSliderDecrementIconV {background-position: -38px 50%;}.claro .dijitSliderActive .dijitSliderDecrementIconV .claro .dijitSliderHover .dijitSliderDecrementIconV {background-position: -73px 50%;}.claro .dijitSliderIncrementIconV {background-position: -143px 49%;}.claro .dijitSliderActive .dijitSliderIncrementIconV .claro .dijitSliderHover .dijitSliderIncrementIconV {background-position: -178px 49%;}.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonHover,.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonHover,.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonHover,.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonHover {background-color: #cfe5fa;}.claro .dijitSliderButtonContainerV .dijitSliderDecrementButtonActive,.claro .dijitSliderButtonContainerH .dijitSliderDecrementButtonActive,.claro .dijitSliderButtonContainerV .dijitSliderIncrementButtonActive,.claro .dijitSliderButtonContainerH .dijitSliderIncrementButtonActive {background-color: #abd6ff; border-color: #759dc0;}.claro .dijitSliderButtonInner {visibility: hidden;}.claro .dijitSliderDisabled .dijitSliderBar {border-color: #d3d3d3;}.claro .dijitSliderReadOnly *,.claro .dijitSliderDisabled * {border-color: #d3d3d3; color: #818181;}.claro .dijitSliderReadOnly .dijitSliderDecrementIconH,.claro .dijitSliderDisabled .dijitSliderDecrementIconH {background-position: -321px 50%; background-color: #efefef;}.claro .dijitSliderReadOnly .dijitSliderIncrementIconH,.claro .dijitSliderDisabled .dijitSliderIncrementIconH {background-position: -215px 50%; background-color: #efefef;}.claro .dijitSliderReadOnly .dijitSliderDecrementIconV,.claro .dijitSliderDisabled .dijitSliderDecrementIconV {background-position: -3px 49%; background-color: #efefef;}.claro .dijitSliderReadOnly .dijitSliderIncrementIconV,.claro .dijitSliderDisabled .dijitSliderIncrementIconV {background-position: -107px 49%; background-color: #efefef;}.claro .dijitColorPalette {border: 1px solid #b5bcc7; background: #ffffff; -moz-border-radius: 0; border-radius: 0;}.claro .dijitColorPalette .dijitPaletteImg {border: 1px solid #d3d3d3;}.claro .dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg {border: 1px solid #000000;}.claro .dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg,.claro .dijitColorPalette .dijitPaletteTable .dijitPaletteCellSelected .dijitPaletteImg {border: 2px solid #000000;}.claro .dijitInlineEditBoxDisplayMode {border: 1px solid transparent;}.claro .dijitInlineEditBoxDisplayModeHover {background-color: #e5f2fe; border: solid 1px #759dc0;}.dj_ie6 .claro .dijitInlineEditBoxDisplayMode {border: none;}.claro .dijitProgressBar {margin: 0;}.claro .dijitProgressBarEmpty {background-color: #ffffff; border-color: #759dc0;}.claro .dijitProgressBarTile {background-color: #abd6ff; background-image: url("images/progressBarFull.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.93) 0px, rgba(255, 255, 255, 0.41) 1px, rgba(255, 255, 255, 0.7) 2px, rgba(255, 255, 255, 0) 100%); background-attachment: scroll;}.dj_ie6 .claro .dijitProgressBarTile {background-image: none;}.claro .dijitProgressBarFull {border: 0px solid #759dc0; border-right-width: 1px; -webkit-transition-property: width; -moz-transition-property: width; transition-property: width; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; transition-duration: 0.25s; height:100%;}.claro .dijitProgressBarLabel {color: #000000;}.claro .dijitProgressBarIndeterminate .dijitProgressBarTile {background: #efefef url("images/progressBarAnim.gif") repeat-x top;}.claro .dijitTimePicker .dijitButtonNode {padding: 0 0; -moz-border-radius: 0; border-radius: 0;}.claro .dijitTimePicker {border: 1px #b5bcc7 solid; border-top: none; border-bottom: none; background-color: #fff;}.claro .dijitTimePickerItem {background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; border-top: solid 1px #b5bcc7; border-bottom: solid 1px #b5bcc7; margin-top: -1px;}.claro .dijitTimePickerTick {color: #818181; background-color: #efefef; font-size: 0.818em;}.claro .dijitTimePickerMarker {background-color: #e5f2fe; font-size: 1em; white-space: nowrap;}.claro .dijitTimePickerTickHover,.claro .dijitTimePickerMarkerHover,.claro .dijitTimePickerMarkerSelected,.claro .dijitTimePickerTickSelected {background-color: #7dbdfa; color: #000000;}.claro .dijitTimePickerMarkerSelected,.claro .dijitTimePickerTickSelected {font-size: 1em;}.claro .dijitTimePickerTick .dijitTimePickerItemInner {padding: 1px; margin: 0;}.claro .dijitTimePicker .dijitButtonNode {border-left: none; border-right: none; border-color: #b5bcc7; background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitTimePicker .dijitArrowButtonInner {height: 100%; background-image: url("form/images/commonFormArrows.png"); background-repeat: no-repeat; background-position: -140px 45%;}.claro .dijitTimePicker .dijitDownArrowButton .dijitArrowButtonInner {background-position: -35px 45%;}.claro .dijitTimePicker .dijitUpArrowHover,.claro .dijitTimePicker .dijitDownArrowHover {background-color: #abd6ff;}.claro .dijitTimePicker .dijitUpArrowHover .dijitArrowButtonInner {background-position: -175px 45%;}.claro .dijitTimePicker .dijitDownArrowHover .dijitArrowButtonInner {background-position: -70px 45%;}.claro .dijitBorderContainer {padding: 5px;}.claro .dijitSplitContainer-child,.claro .dijitBorderContainer-child {border: 1px #b5bcc7 solid;}.claro .dijitBorderContainer-dijitTabContainerTop,.claro .dijitBorderContainer-dijitTabContainerBottom,.claro .dijitBorderContainer-dijitTabContainerLeft,.claro .dijitBorderContainer-dijitTabContainerRight,.claro .dijitBorderContainer-dijitAccordionContainer {border: none;}.claro .dijitBorderContainer-dijitBorderContainer {border: 0; padding: 0;}.claro .dijitSplitterH,.claro .dijitGutterH {background: none; border: 0; height: 5px;}.dj_ios .claro .dijitSplitterH,.dj_android .claro .dijitSplitterH {height: 11px;}.claro .dijitSplitterH .dijitSplitterThumb {background: #b5bcc7 none; height: 1px; top: 2px; width: 19px;}.dj_ios .claro .dijitSplitterH .dijitSplitterThumb,.dj_android .claro .dijitSplitterH .dijitSplitterThumb {top: 5px;}.claro .dijitSplitterV,.claro .dijitGutterV {background: none; border: 0; width: 5px; margin: 0;}.dj_ios .claro .dijitSplitterV,.dj_android .claro .dijitSplitterV {width: 11px;}.claro .dijitSplitterV .dijitSplitterThumb {background: #b5bcc7 none; height: 19px; left: 2px; width: 1px; margin: 0;}.dj_ios .claro .dijitSplitterV .dijitSplitterThumb,.dj_android .claro .dijitSplitterV .dijitSplitterThumb {left: 5px;}.claro .dijitSplitterHHover,.claro .dijitSplitterVHover {font-size: 1px; background-color: #cfe5fa;}.claro .dijitSplitterHHover {background-image: -moz-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%); background-image: -webkit-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%); background-image: -o-linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%); background-image: linear-gradient(left, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%);}.claro .dijitSplitterVHover {background-image: -moz-linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%); background-image: -webkit-linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%); background-image: -o-linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%); background-image: linear-gradient(top, #ffffff 0px, rgba(255, 255, 255, 0) 50%, #ffffff 100%);}.claro .dijitSplitterHHover .dijitSplitterThumb,.claro .dijitSplitterVHover .dijitSplitterThumb {background: #759dc0 none;}.claro .dijitSplitterHActive,.claro .dijitSplitterVActive {font-size: 1px; background-color: #abd6ff; background-image: none;}.claro .dijitTreeNode {zoom: 1;}.claro .dijitTreeIsRoot {background-image: none;}.claro .dijitTreeRow,.claro .dijitTreeNode .dojoDndItemBefore,.claro .dijitTreeNode .dojoDndItemAfter {padding: 4px 0 2px 0; background-color: none; background-color: transparent; background-color: rgba(171, 214, 255, 0); background-position: 0 0; background-repeat: repeat-x; border: solid 0 transparent; color: #000000; -webkit-transition-property: background-color, border-color; -moz-transition-property: background-color, border-color; transition-property: background-color, border-color; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; transition-duration: 0.25s; -webkit-transition-timing-function: ease-out; -moz-transition-timing-function: ease-out; transition-timing-function: ease-out;}.claro .dijitTreeRowSelected {background-color: #cfe5fa; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 3px 0 1px; border-color: #759dc0; border-width: 1px 0; color: #000000;}.claro .dijitTreeRowHover {background-color: #abd6ff; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 3px 0 1px; border-color: #759dc0; border-width: 1px 0; color: #000000; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; transition-duration: 0.25s;}.claro .dijitTreeRowActive {background-color: #7dbdfa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 3px 0 1px; border-color: #759dc0; border-width: 1px 0; color: #000000;}.claro .dijitTreeRowFocused {background-repeat: repeat;}.claro .dijitTreeExpando {background-image: url("images/treeExpandImages.png"); width: 16px; height: 16px; background-position: -35px 0;}.dj_ie6 .claro .dijitTreeExpando {background-image: url("images/treeExpandImages8bit.png");}.claro .dijitTreeRowHover .dijitTreeExpandoOpened {background-position: -53px 0;}.claro .dijitTreeExpandoClosed {background-position: 1px 0;}.claro .dijitTreeRowHover .dijitTreeExpandoClosed {background-position: -17px 0;}.claro .dijitTreeExpandoLeaf,.dj_ie6 .claro .dijitTreeExpandoLeaf {background-image: none;}.claro .dijitTreeExpandoLoading {background-image: url("images/loadingAnimation.gif");}.claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {border-top: 2px solid #759dc0;}.claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {border-bottom: 2px solid #759dc0;} .claro .dijitToolbar {border-bottom: 1px solid #b5bcc7; background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 2px 0 2px 4px; zoom: 1;}.claro .dijitToolbar label {padding: 0 3px 0 6px;}.claro .dijitToolbar .dijitButton .dijitButtonNode,.claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,.claro .dijitToolbar .dijitComboButton .dijitButtonNode,.claro .dijitToolbar .dijitToggleButton .dijitButtonNode,.claro .dijitToolbar .dijitComboBox .dijitButtonNode {border-width: 0; padding: 2px; -moz-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition-property: background-color; -moz-transition-property: background-color; transition-property: background-color; -webkit-transition-duration: 0.3s; -moz-transition-duration: 0.3s; transition-duration: 0.3s; background-color: rgba(171, 214, 255, 0); background-image: none;}.dj_ie .claro .dijitToolbar .dijitButton .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitToggleButton .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitComboBox .dijitButtonNode {background-color: transparent;}.dj_ie .claro .dijitToolbar .dijitButtonHover .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNodeHover,.dj_ie .claro .dijitToolbar .dijitComboButton .dijitDownArrowButtonHover,.dj_ie .claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode {background-color: #abd6ff;}.dj_ie .claro .dijitToolbar .dijitButtonActive .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,.dj_ie .claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {background-color: #abd6ff;}.claro .dijitToolbar .dijitComboButton .dijitStretch {-moz-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px;}.claro .dijitToolbar .dijitComboButton .dijitArrowButton {-moz-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}.claro .dijitToolbar .dijitComboBox .dijitButtonNode {padding: 0;}.claro .dijitToolbar .dijitButtonHover .dijitButtonNode,.claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,.claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode,.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode {border-width: 1px; background-color: #abd6ff; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 1px;}.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode,.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {background-color: #f3ffff;}.claro .dijitToolbar .dijitComboButtonHover .dijitButtonNodeHover,.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButtonHover {background-color: #abd6ff;}.claro .dijitToolbar .dijitButtonActive .dijitButtonNode,.claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,.claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {border-width: 1px; background-color: #7dbdfa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none; padding: 1px;}.claro .dijitToolbar .dijitComboButtonActive {-webkit-transition-duration: 0.2s; -moz-transition-duration: 0.2s; transition-duration: 0.2s; border-width: 1px; padding: 0;}.claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {background-color: #f3ffff; padding: 2px;}.claro .dijitToolbar .dijitComboButtonActive .dijitButtonNodeActive {background-color: #7dbdfa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButtonActive {background-color: #7dbdfa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton,.claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {border-left-width: 0;}.claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {padding-left: 2px;}.claro .dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {margin: 0; border-width: 1px; border-style: solid; background-image: none; border-color: #759dc0; background-color: #ffffff; padding: 1px;}.claro .dijitToolbarSeparator {background: url("../../icons/images/editorIconsEnabled.png");}.claro .dijitDisabled .dijitToolbar {background: none; background-color: #efefef; border-bottom: 1px solid #d3d3d3;}.claro .dijitToolbar .dijitComboBoxDisabled .dijitArrowButtonInner {background-position: 0 50%;}.claro .dijitEditorIFrameContainer {padding: 3px 3px 1px 10px;}.claro .dijitEditorIFrame {background-color: #ffffff;}.claro .dijitEditor {border: 1px solid #b5bcc7;}.claro .dijitEditor .dijitEditorIFrameContainer {background-color: #ffffff; background-repeat: repeat-x;}.claro .dijitEditorHover .dijitEditorIFrameContainer,.claro .dijitEditorHover .dijitEditorIFrameContainer .dijitEditorIFrame {background-color: #e5f2fe;}.claro .dijitEditorFocused .dijitEditorIFrameContainer,.claro .dijitEditorFocused .dijitEditorIFrameContainer .dijitEditorIFrame {background-color: #ffffff;}.claro .dijitEditorHover .dijitEditorIFrameContainer,.claro .dijitEditorFocused .dijitEditorIFrameContainer {background-image: -moz-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -webkit-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: -o-linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px); background-image: linear-gradient(rgba(127, 127, 127, 0.2) 0%, rgba(127, 127, 127, 0) 2px);}.claro .dijitEditorDisabled {border: 1px solid #d3d3d3; color: #818181;}.claro .dijitDisabled .dijitEditorIFrame,.claro .dijitDisabled .dijitEditorIFrameContainer,.claro .dijitDisabled .dijitEditorIFrameContainer .dijitEditorIFrame {background-color: #efefef; background-image: none;}.dijitEditorIcon {background-image: url("../../icons/images/editorIconsEnabled.png"); background-repeat: no-repeat; width: 18px; height: 18px; text-align: center;}.dijitDisabled .dijitEditorIcon {background-image: url("../../icons/images/editorIconsDisabled.png");}.dijitEditorIconSep {background-position: 0;}.dijitEditorIconSave {background-position: -18px;}.dijitEditorIconPrint {background-position: -36px;}.dijitEditorIconCut {background-position: -54px;}.dijitEditorIconCopy {background-position: -72px;}.dijitEditorIconPaste {background-position: -90px;}.dijitEditorIconDelete {background-position: -108px;}.dijitEditorIconCancel {background-position: -126px;}.dijitEditorIconUndo {background-position: -144px;}.dijitEditorIconRedo {background-position: -162px;}.dijitEditorIconSelectAll {background-position: -180px;}.dijitEditorIconBold {background-position: -198px;}.dijitEditorIconItalic {background-position: -216px;}.dijitEditorIconUnderline {background-position: -234px;}.dijitEditorIconStrikethrough {background-position: -252px;}.dijitEditorIconSuperscript {background-position: -270px;}.dijitEditorIconSubscript {background-position: -288px;}.dijitEditorIconJustifyCenter {background-position: -306px;}.dijitEditorIconJustifyFull {background-position: -324px;}.dijitEditorIconJustifyLeft {background-position: -342px;}.dijitEditorIconJustifyRight {background-position: -360px;}.dijitEditorIconIndent {background-position: -378px;}.dijitEditorIconOutdent {background-position: -396px;}.dijitEditorIconListBulletIndent {background-position: -414px;}.dijitEditorIconListBulletOutdent {background-position: -432px;}.dijitEditorIconListNumIndent {background-position: -450px;}.dijitEditorIconListNumOutdent {background-position: -468px;}.dijitEditorIconTabIndent {background-position: -486px;}.dijitEditorIconLeftToRight {background-position: -504px;}.dijitEditorIconRightToLeft, .dijitEditorIconToggleDir {background-position: -522px;}.dijitEditorIconBackColor {background-position: -540px;}.dijitEditorIconForeColor {background-position: -558px;}.dijitEditorIconHiliteColor {background-position: -576px;}.dijitEditorIconNewPage {background-position: -594px;}.dijitEditorIconInsertImage {background-position: -612px;}.dijitEditorIconInsertTable {background-position: -630px;}.dijitEditorIconSpace {background-position: -648px;}.dijitEditorIconInsertHorizontalRule {background-position: -666px;}.dijitEditorIconInsertOrderedList {background-position: -684px;}.dijitEditorIconInsertUnorderedList {background-position: -702px;}.dijitEditorIconCreateLink {background-position: -720px;}.dijitEditorIconUnlink {background-position: -738px;}.dijitEditorIconViewSource {background-position: -756px;}.dijitEditorIconRemoveFormat {background-position: -774px;}.dijitEditorIconFullScreen {background-position: -792px;}.dijitEditorIconWikiword {background-position: -810px;} .claro .dijitTitlePaneTitle {background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; border: 1px solid #b5bcc7; padding: 0 7px 3px 7px; min-height: 17px; color: #494949;}.claro .dijitFieldset {-moz-border-radius: 4px; border-radius: 4px;}.claro .dijitTitlePaneTitleOpen,.claro .dijitTitlePaneTitleFixedOpen {background-color: #cfe5fa; color: #000000;}.claro .dijitTitlePaneTitleHover {background-color: #abd6ff; border-color: #759dc0;}.claro .dijitTitlePaneTitleActive {background-color: #7dbdfa; border-color: #759dc0; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitTitlePaneTitleFocus {margin-top: 3px; padding-bottom: 2px;}.claro .dijitTitlePane .dijitArrowNode,.claro .dijitFieldset .dijitArrowNode {background-image: url("images/spriteArrows.png"); background-repeat: no-repeat; height: 8px; width: 7px;}.claro .dijitTitlePaneTitleOpen .dijitArrowNode,.claro .dijitFieldsetTitleOpen .dijitArrowNode {background-position: 0 0;}.claro .dijitTitlePaneTitleClosed .dijitArrowNode,.claro .dijitFieldsetTitleClosed .dijitArrowNode {background-position: -14px 0;}.claro .dijitTitlePaneContentOuter {background: #ffffff; border: 1px solid #b5bcc7; border-top: none;}.claro .dijitTitlePaneContentInner {padding: 10px;}.claro .dijitFieldsetContentInner {padding: 4px;}.claro .dijitTitlePaneTextNode,.claro .dijitFieldsetLegendNode {margin-left: 4px; margin-right: 4px; vertical-align: text-top;}.claro .dijitSpinnerButtonContainer {overflow: hidden; position: relative; width: auto; padding: 0 2px;}.claro .dijitSpinnerButtonContainer .dijitSpinnerButtonInner {border-width: 1px 0; border-style: solid none;}.claro .dijitSpinner .dijitArrowButton {width: auto; background-color: #efefef; background-image: url("images/standardGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%); _background-image: none; overflow: hidden;}.dj_iequirks .claro .dijitSpinner .dijitArrowButton {overflow: visible;}.claro .dijitSpinner .dijitSpinnerButtonInner {width: 15px;}.claro .dijitSpinner .dijitArrowButtonInner {border: solid 1px #ffffff; border-bottom-width: 0; background-image: url("form/images/commonFormArrows.png"); background-repeat: no-repeat; height: 100%; width: 15px; padding-left: 1px; padding-right: 1px; background-position: -139px center; display: block; margin: -1px 0 -1px 0;}.dj_iequirks .claro .dijitSpinner .dijitArrowButtonInner,.dj_ie6 .claro .dijitSpinner .dijitArrowButtonInner,.dj_ie7 .claro .dijitSpinner .dijitArrowButtonInner,.dj_ie8 .claro .dijitSpinner .dijitArrowButtonInner {margin-top: 0;}.dj_iequirks .claro .dijitSpinner .dijitArrowButtonInner {width: 19px;}.claro .dijitSpinner .dijitDownArrowButton .dijitArrowButtonInner {background-position: -34px;}.claro .dijitSpinner .dijitArrowButtonInner .dijitInputField {padding: 0;}.claro .dijitUpArrowButtonActive,.claro .dijitDownArrowButtonActive {background-color: #abd6ff;}.claro .dijitSpinner .dijitUpArrowButtonHover,.claro .dijitSpinner .dijitDownArrowButtonHover,.claro .dijitSpinnerFocused .dijitArrowButton {background-color: #abd6ff;}.claro .dijitSpinner .dijitUpArrowButtonHover .dijitArrowButtonInner {background-position: -174px;}.claro .dijitSpinner .dijitDownArrowButtonHover .dijitArrowButtonInner {background-position: -69px;}.claro .dijitSpinnerFocused {background-color: #ffffff; background-image: none;}.claro .dijitSpinner .dijitDownArrowButtonActive,.claro .dijitSpinner .dijitUpArrowButtonActive {background-color: #7dbefa; background-image: url("images/activeGradient.png"); background-repeat: repeat-x; background-image: -moz-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -webkit-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: -o-linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); background-image: linear-gradient(rgba(190, 190, 190, 0.98) 0px, rgba(255, 255, 255, 0.65) 3px, rgba(255, 255, 255, 0) 100%); _background-image: none;}.claro .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner,.claro .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {border: 0; padding: 1px; margin-right: 2px; margin-bottom: 1px;}.claro .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner {background-position: -173px;}.claro .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {background-position: -68px;}.claro .dijitSpinnerDisabled .dijitArrowButtonInner {background-color: #efefef;}.claro .dijitSpinnerDisabled .dijitUpArrowButton .dijitArrowButtonInner {background-position: -104px;}.claro .dijitSpinnerDisabled .dijitDownArrowButton .dijitArrowButtonInner {background-position: 1px;}.dj_ie7 .claro .dijitSpinner {overflow: visible;}.dijitRtl .dijitOffScreen {left: auto !important; right: -10000px !important;}.dijitRtl .dijitPlaceHolder {left: auto; right: 0;}.dijitMenuItemRtl {text-align: right;}.dj_iequirks .dijitComboButtonRtl button {float:left;}.dj_ie .dijitTextBoxRtl .dijitInputContainer {clear: right;}.dijitTextBoxRtl .dijitValidationContainer,.dijitTextBoxRtl .dijitSpinnerButtonContainer,.dijitComboBoxRtl .dijitArrowButtonContainer {border-right-width: 1px !important; border-left-width: 0 !important;}.dijitSpinnerRtl .dijitSpinnerButtonContainer .dijitArrowButton {right: 0; left: auto;}.dijitSelectRtl .dijitButtonText {float: right;}.dijitTextBoxRtl .dijitSpinnerButtonContainer,.dijitValidationTextBoxRtl .dijitValidationContainer,.dijitTextBoxRtl .dijitArrowButtonContainer {float: left;}div.dijitNumberTextBoxRtl {text-align: right;}.dijitCalendarRtl .dijitCalendarNextYear {margin:0 0.55em 0 0;}.dijitCalendarRtl .dijitCalendarPreviousYear {margin:0 0 0 0.55em;}.dijitSliderRtl .dijitSliderImageHandleV {left:auto;}.dijitSliderRtl .dijitSliderImageHandleH {left:-50%;}.dijitSliderRtl .dijitSliderMoveableH {right:auto; left:0;}.dijitSliderRtl .dijitRuleContainerV {float:right;}.dj_ie .dijitSliderRtl .dijitRuleContainerV {text-align:right;}.dj_ie .dijitSliderRtl .dijitRuleLabelV {text-align:left;}.dj_ie .dijitSliderRtl .dijitRuleLabelH {zoom:1;}.dijitSliderRtl .dijitSliderProgressBarH {float:right; right:0; left:auto;}.dijitRtl .dijitContentPaneLoading .dijitIconLoading,.dijitRtl .dijitContentPaneError .dijitIconError {margin-right: 0; margin-left: 9px;}.dijitTabControllerRtl .nowrapTabStrip {text-align: right;}.dijitTabRtl .dijitTabCloseButton {margin-left: 0; margin-right: 1em;}.dj_ie6 .dijitTabRtl .tabLabel,.dj_ie6 .dijitTabContainerRight-tabs .dijitTabRtl,.dj_ie6 .dijitTabContainerLeft-tabs .dijitTabRtl,.dj_ie7 .dijitTabContainerRight-tabs .dijitTabRtl,.dj_ie7 .dijitTabContainerLeft-tabs .dijitTabRtl {zoom: 1;}.dj_ie6 .dijitTabContainerRight-tabs .dijitTabRtl,.dj_ie7 .dijitTabContainerRight-tabs .dijitTabRtl {left: 0;}.dj_ie6 .dijitTabContainerRightRtl .dijitTabContainerRight-tabs,.dj_ie6 .dijitTabContainerLeftRtl .dijitTabContainerLeft-tabs {width: 1%;}.dj_ie .dijitTimePickerRtl .dijitTimePickerItem {width:100%;}.dijitColorPaletteRtl .dijitColorPaletteUnder {left: auto; right: 0;}.dijitSelectRtl .dijitButtonContents {border-style: none none none solid; text-align: right;}.dijitTreeRtl .dijitTreeContainer {float: right;}.dijitRtl .dojoDndHorizontal .dojoDndItemBefore {border-width: 0 2px 0 0; padding: 2px 0 2px 2px;}.dijitRtl .dojoDndHorizontal .dojoDndItemAfter {border-width: 0 0 0 2px; padding: 2px 2px 2px 0;}.claro .dijitTextBoxRtlError .dijitValidationContainer {border-left-width: 0; border-right-width: 1px;}.claro .dijitComboButtonRtl .dijitStretch {-moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;}.claro .dijitComboButtonRtl .dijitArrowButton {-moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; padding: 3px 0 4px; border-left-width: 1px; border-right-width: 0;}.claro .dijitTabContainerTop-tabs .dijitTabRtl,.claro .dijitTabContainerBottom-tabs .dijitTabRtl {margin-right: 0; margin-left: 1px;}.claro .dijitSliderRtl .dijitSliderProgressBarH,.claro .dijitSliderRtl .dijitSliderRemainingBarH,.claro .dijitSliderRtl .dijitSliderLeftBumper,.claro .dijitSliderRtl .dijitSliderRightBumper,.claro .dijitSliderRtl .dijitSliderTopBumper {background-position: top right;}.claro .dijitSliderRtl .dijitSliderProgressBarV,.claro .dijitSliderRtl .dijitSliderRemainingBarV,.claro .dijitSliderRtl .dijitSliderBottomBumper {background-position: bottom right;}.claro .dijitSliderRtl .dijitSliderLeftBumper {border-left-width: 0; border-right-width: 1px;}.claro .dijitSliderRtl .dijitSliderRightBumper {border-left-width: 1px; border-right-width: 0;}.claro .dijitSliderRtl .dijitSliderIncrementIconH {background-position: -357px 50%;}.claro .dijitSliderRtl .dijitSliderDecrementIconH {background-position: -251px 50%;}.claro .dijitDialogRtl .dijitDialogCloseIcon {right: auto; left: 5px;}.claro .dijitDialogRtl .dijitDialogPaneActionBar {text-align: left; padding: 3px 7px 2px 5px;}.claro .dijitEditorRtl .dijitEditorIFrameContainer {padding: 3px 10px 1px 3px;}.dj_ie6 .claro .dijitEditorRtl .dijitEditorIFrameContainer,.dj_ie7 .claro .dijitEditorRtl .dijitEditorIFrameContainer,.dj_ie8 .claro .dijitEditorRtl .dijitEditorIFrameContainer {padding: 3px 0px 1px 10px; margin-right: 0px; border: 0px solid #d3d3d3;}.dijitEditorRtl .dijitEditorIcon {background-image: url("../../icons/images/editorIconsEnabled_rtl.png");}.dijitEditorRtlDisabled .dijitEditorIcon {background-image: url("../../icons/images/editorIconsDisabled_rtl.png");}.dijitToolbarRtl .dijitToolbarSeparator {background-image: url("../../icons/images/editorIconsEnabled_rtl.png");}.dijitRtl .dijitIconSave,.dijitRtl .dijitIconPrint,.dijitRtl .dijitIconCut,.dijitRtl .dijitIconCopy,.dijitRtl .dijitIconClear,.dijitRtl .dijitIconDelete,.dijitRtl .dijitIconUndo,.dijitRtl .dijitIconEdit,.dijitRtl .dijitIconNewTask,.dijitRtl .dijitIconEditTask,.dijitRtl .dijitIconEditProperty,.dijitRtl .dijitIconTask,.dijitRtl .dijitIconFilter,.dijitRtl .dijitIconConfigure,.dijitRtl .dijitIconSearch,.dijitRtl .dijitIconApplication,.dijitRtl .dijitIconBookmark,.dijitRtl .dijitIconChart,.dijitRtl .dijitIconConnector,.dijitRtl .dijitIconDatabase,.dijitRtl .dijitIconDocuments,.dijitRtl .dijitIconMail,.dijitRtl .dijitLeaf,.dijitRtl .dijitIconFile,.dijitRtl .dijitIconFunction,.dijitRtl .dijitIconKey,.dijitRtl .dijitIconPackage,.dijitRtl .dijitIconSample,.dijitRtl .dijitIconTable,.dijitRtl .dijitIconUsers,.dijitRtl .dijitFolderClosed,.dijitRtl .dijitIconFolderClosed,.dijitRtl .dijitFolderOpened,.dijitRtl .dijitIconFolderOpen,.dijitRtl .dijitIconError {background-image: url("../../icons/images/commonIconsObjActEnabled_rtl.png"); width: 16px; height: 16px;}.dj_ie6 .dijitRtl .dijitIconSave,.dj_ie6 .dijitRtl .dijitIconPrint,.dj_ie6 .dijitRtl .dijitIconCut,.dj_ie6 .dijitRtl .dijitIconCopy,.dj_ie6 .dijitRtl .dijitIconClear,.dj_ie6 .dijitRtl .dijitIconDelete,.dj_ie6 .dijitRtl .dijitIconUndo,.dj_ie6 .dijitRtl .dijitIconEdit,.dj_ie6 .dijitRtl .dijitIconNewTask,.dj_ie6 .dijitRtl .dijitIconEditTask,.dj_ie6 .dijitRtl .dijitIconEditProperty,.dj_ie6 .dijitRtl .dijitIconTask,.dj_ie6 .dijitRtl .dijitIconFilter,.dj_ie6 .dijitRtl .dijitIconConfigure,.dj_ie6 .dijitRtl .dijitIconSearch,.dj_ie6 .dijitRtl .dijitIconApplication,.dj_ie6 .dijitRtl .dijitIconBookmark,.dj_ie6 .dijitRtl .dijitIconChart,.dj_ie6 .dijitRtl .dijitIconConnector,.dj_ie6 .dijitRtl .dijitIconDatabase,.dj_ie6 .dijitRtl .dijitIconDocuments,.dj_ie6 .dijitRtl .dijitIconMail,.dj_ie6 .dijitRtl .dijitLeaf,.dj_ie6 .dijitRtl .dijitIconFile,.dj_ie6 .dijitRtl .dijitIconFunction,.dj_ie6 .dijitRtl .dijitIconKey,.dj_ie6 .dijitRtl .dijitIconPackage,.dj_ie6 .dijitRtl .dijitIconSample,.dj_ie6 .dijitRtl .dijitIconTable,.dj_ie6 .dijitRtl .dijitIconUsers,.dj_ie6 .dijitRtl .dijitFolderClosed,.dj_ie6 .dijitRtl .dijitIconFolderClosed,.dj_ie6 .dijitRtl .dijitFolderOpened,.dj_ie6 .dijitRtl .dijitIconFolderOpen,.dj_ie6 .dijitRtl .dijitIconError {background-image: url("../../icons/images/commonIconsObjActEnabled8bit_rtl.png");}.dijitRtl .dijitDisabled .dijitIconSave,.dijitRtl .dijitDisabled .dijitIconPrint,.dijitRtl .dijitDisabled .dijitIconCut,.dijitRtl .dijitDisabled .dijitIconCopy,.dijitRtl .dijitDisabled .dijitIconClear,.dijitRtl .dijitDisabled .dijitIconDelete,.dijitRtl .dijitDisabled .dijitIconUndo,.dijitRtl .dijitDisabled .dijitIconEdit,.dijitRtl .dijitDisabled .dijitIconNewTask,.dijitRtl .dijitDisabled .dijitIconEditTask,.dijitRtl .dijitDisabled .dijitIconEditProperty,.dijitRtl .dijitDisabled .dijitIconTask,.dijitRtl .dijitDisabled .dijitIconFilter,.dijitRtl .dijitDisabled .dijitIconConfigure,.dijitRtl .dijitDisabled .dijitIconSearch,.dijitRtl .dijitDisabled .dijitIconApplication,.dijitRtl .dijitDisabled .dijitIconBookmark,.dijitRtl .dijitDisabled .dijitIconChart,.dijitRtl .dijitDisabled .dijitIconConnector,.dijitRtl .dijitDisabled .dijitIconDatabase,.dijitRtl .dijitDisabled .dijitIconDocuments,.dijitRtl .dijitDisabled .dijitIconMail,.dijitRtl .dijitDisabled .dijitLeaf,.dijitRtl .dijitDisabled .dijitIconFile,.dijitRtl .dijitDisabled .dijitIconFunction,.dijitRtl .dijitDisabled .dijitIconKey,.dijitRtl .dijitDisabled .dijitIconPackage,.dijitRtl .dijitDisabled .dijitIconSample,.dijitRtl .dijitDisabled .dijitIconTable,.dijitRtl .dijitDisabled .dijitIconUsers,.dijitRtl .dijitDisabled .dijitFolderClosed,.dijitRtl .dijitDisabled .dijitIconFolderClosed,.dijitRtl .dijitDisabled .dijitFolderOpened,.dijitRtl .dijitDisabled .dijitIconFolderOpen,.dijitRtl .dijitDisabled .dijitIconError {background-image: url("../../icons/images/commonIconsObjActDisabled_rtl.png");}.dijitRtl .dijitIconLoading {background-image: url("../../icons/images/loadingAnimation_rtl.gif");}.claro .dijitTitlePaneRtl .dijitClosed .dijitArrowNode,.claro .dijitFieldsetRtl .dijitFieldsetTitleClosed .dijitArrowNode {background-position: -7px 0;}.claro .dijitMenuItemRtl .dijitMenuExpand {background-position: -7px 0; margin-right: 0; margin-left: 3px;}.claro .dijitMenuItemRtl .dijitMenuItemIcon {margin: 0 4px 0 0;}.claro .dijitCalendarRtl .dijitCalendarIncrease {background-position: 0 0;}.claro .dijitCalendarRtl .dijitCalendarDecrease {background-position: -18px 0;}.claro .dijitCalendarRtl .dijitCalendarArrowHover .dijitCalendarIncrease {background-position: -36px 0;}.claro .dijitCalendarRtl .dijitCalendarArrowHover .dijitCalendarDecrease {background-position: -55px 0;}.claro .dijitCalendarRtl .dijitCalendarArrowActive .dijitCalendarIncrease {background-position: -72px 0;}.claro .dijitCalendarRtl .dijitCalendarArrowActive .dijitCalendarDecrease {background-position: -91px 0;}.claro .dijitToolbar .dijitComboButtonRtl .dijitButtonNode {border-width: 0; padding: 2px;}.claro .dijitToolbar .dijitComboButtonRtlHover .dijitButtonNode,.claro .dijitToolbar .dijitComboButtonRtlActive .dijitButtonNode {border-width: 1px; padding: 1px;}.claro .dijitToolbar .dijitComboButtonRtl .dijitStretch {-moz-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}.claro .dijitToolbar .dijitComboButtonRtl .dijitArrowButton {-moz-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px;}.claro .dijitToolbar .dijitComboButtonRtlHover .dijitArrowButton,.claro .dijitToolbar .dijitComboButtonRtlActive .dijitArrowButton {border-left-width: 1px; border-right-width: 0; padding-left: 1px; padding-right: 2px;}.claro .dijitProgressBarRtl .dijitProgressBarFull {border-left-width: 1px; border-right-width: 0px;}.sbVerticalCenter {position:relative; display:table-cell; vertical-align:middle; top:0px; left:0px;}.sbNoSelect {-webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}.sbTextBorder {border: 1px solid #d0d0d0; padding: 5px;}.sbTreeBorder,.sbWebBorder,.sbCanvasBorder,.sbContainerBorder,.sbScrollAreaBorder,.sbImageBorder,.sbFrameBorder {border: 1px solid #d0d0d0;}.sbContainerBorderSingle {border: 1px inset #d0d0d0;}.sbContainerBorderRaised {border: 1px outset #d0d0d0;}.sbContainerBorderDouble {border: 2px inset #d0d0d0;} \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonArrows.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonArrows.png new file mode 100644 index 0000000..642eff3 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonArrows.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonDisabled.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonDisabled.png new file mode 100644 index 0000000..faf57ba Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonDisabled.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonDisabled.svg b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonDisabled.svg new file mode 100644 index 0000000..72a51a0 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonDisabled.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonEnabled.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonEnabled.png new file mode 100644 index 0000000..0932a99 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonEnabled.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonEnabled.svg b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonEnabled.svg new file mode 100644 index 0000000..d9e564a --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/form/images/buttonEnabled.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/checkboxAndRadioButtons_IE6.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/checkboxAndRadioButtons_IE6.png new file mode 100644 index 0000000..92d2221 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/checkboxAndRadioButtons_IE6.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/checkboxRadioButtonStates.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/checkboxRadioButtonStates.png new file mode 100644 index 0000000..2d06a82 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/checkboxRadioButtonStates.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/commonFormArrows.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/commonFormArrows.png new file mode 100644 index 0000000..6d04742 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/commonFormArrows.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/error.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/error.png new file mode 100644 index 0000000..46de1cd Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/error.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/form/images/sliderThumbs.png b/Server/www/spiderbasic/dojo/themes/claro/form/images/sliderThumbs.png new file mode 100644 index 0000000..70ab2fe Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/form/images/sliderThumbs.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/activeGradient.png b/Server/www/spiderbasic/dojo/themes/claro/images/activeGradient.png new file mode 100644 index 0000000..e70daaa Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/activeGradient.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/activeGradient.svg b/Server/www/spiderbasic/dojo/themes/claro/images/activeGradient.svg new file mode 100644 index 0000000..8ab6ce9 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/images/activeGradient.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/calendar.png b/Server/www/spiderbasic/dojo/themes/claro/images/calendar.png new file mode 100644 index 0000000..d892e49 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/calendar.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/calendarArrows.png b/Server/www/spiderbasic/dojo/themes/claro/images/calendarArrows.png new file mode 100644 index 0000000..73333ad Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/calendarArrows.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/calendarArrows8bit.png b/Server/www/spiderbasic/dojo/themes/claro/images/calendarArrows8bit.png new file mode 100644 index 0000000..c865260 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/calendarArrows8bit.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/checkmarkNoBorder.gif b/Server/www/spiderbasic/dojo/themes/claro/images/checkmarkNoBorder.gif new file mode 100644 index 0000000..324bfb3 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/checkmarkNoBorder.gif differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/checkmarkNoBorder.png b/Server/www/spiderbasic/dojo/themes/claro/images/checkmarkNoBorder.png new file mode 100644 index 0000000..ae3271a Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/checkmarkNoBorder.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/dialogCloseIcon.png b/Server/www/spiderbasic/dojo/themes/claro/images/dialogCloseIcon.png new file mode 100644 index 0000000..f69a1e7 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/dialogCloseIcon.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/dialogCloseIcon8bit.png b/Server/www/spiderbasic/dojo/themes/claro/images/dialogCloseIcon8bit.png new file mode 100644 index 0000000..200c0af Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/dialogCloseIcon8bit.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/dnd.png b/Server/www/spiderbasic/dojo/themes/claro/images/dnd.png new file mode 100644 index 0000000..6e1d899 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/dnd.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/loadingAnimation.gif b/Server/www/spiderbasic/dojo/themes/claro/images/loadingAnimation.gif new file mode 100644 index 0000000..694e2cb Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/loadingAnimation.gif differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/progressBarAnim.gif b/Server/www/spiderbasic/dojo/themes/claro/images/progressBarAnim.gif new file mode 100644 index 0000000..30c0d9d Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/progressBarAnim.gif differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/progressBarFull.png b/Server/www/spiderbasic/dojo/themes/claro/images/progressBarFull.png new file mode 100644 index 0000000..90c9eaa Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/progressBarFull.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/spriteArrows.png b/Server/www/spiderbasic/dojo/themes/claro/images/spriteArrows.png new file mode 100644 index 0000000..e9d99ab Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/spriteArrows.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/standardGradient.png b/Server/www/spiderbasic/dojo/themes/claro/images/standardGradient.png new file mode 100644 index 0000000..72241f1 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/standardGradient.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/standardGradient.svg b/Server/www/spiderbasic/dojo/themes/claro/images/standardGradient.svg new file mode 100644 index 0000000..807c3c7 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/images/standardGradient.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/tooltip.png b/Server/www/spiderbasic/dojo/themes/claro/images/tooltip.png new file mode 100644 index 0000000..9d279cd Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/tooltip.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/tooltip8bit.png b/Server/www/spiderbasic/dojo/themes/claro/images/tooltip8bit.png new file mode 100644 index 0000000..0035072 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/tooltip8bit.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/treeExpandImages.png b/Server/www/spiderbasic/dojo/themes/claro/images/treeExpandImages.png new file mode 100644 index 0000000..350a1dd Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/treeExpandImages.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/images/treeExpandImages8bit.png b/Server/www/spiderbasic/dojo/themes/claro/images/treeExpandImages8bit.png new file mode 100644 index 0000000..294ce7a Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/images/treeExpandImages8bit.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomSelected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomSelected.png new file mode 100644 index 0000000..f92b05f Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomSelected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomSelected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomSelected.svg new file mode 100644 index 0000000..4e6ff6d --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomSelected.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomUnselected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomUnselected.png new file mode 100644 index 0000000..7815d9c Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomUnselected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomUnselected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomUnselected.svg new file mode 100644 index 0000000..4193238 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabBottomUnselected.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabClose.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabClose.png new file mode 100644 index 0000000..f3b2363 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabClose.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftSelected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftSelected.png new file mode 100644 index 0000000..9700afb Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftSelected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftSelected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftSelected.svg new file mode 100644 index 0000000..12e7d8a --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftSelected.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftUnselected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftUnselected.png new file mode 100644 index 0000000..412390e Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftUnselected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftUnselected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftUnselected.svg new file mode 100644 index 0000000..e31c211 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabLeftUnselected.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabNested.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabNested.png new file mode 100644 index 0000000..0140cf4 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabNested.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightSelected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightSelected.png new file mode 100644 index 0000000..1a28434 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightSelected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightSelected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightSelected.svg new file mode 100644 index 0000000..d8d3d67 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightSelected.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightUnselected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightUnselected.png new file mode 100644 index 0000000..2bdd00e Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightUnselected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightUnselected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightUnselected.svg new file mode 100644 index 0000000..d1379a7 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabRightUnselected.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopSelected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopSelected.png new file mode 100644 index 0000000..f4d5772 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopSelected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopSelected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopSelected.svg new file mode 100644 index 0000000..d06e646 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopSelected.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopUnselected.png b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopUnselected.png new file mode 100644 index 0000000..8c34545 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopUnselected.png differ diff --git a/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopUnselected.svg b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopUnselected.svg new file mode 100644 index 0000000..c55e925 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/claro/layout/images/tabTopUnselected.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/flat/flat.css b/Server/www/spiderbasic/dojo/themes/flat/flat.css new file mode 100644 index 0000000..ff745ac --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/flat/flat.css @@ -0,0 +1,33 @@ +@font-face{font-family:'FontAwesome';src:url("font-awesome-4.5.0/fonts/fontawesome-webfont.eot?v=4.5.0");src:url("font-awesome-4.5.0/fonts/fontawesome-webfont.eot?#iefix&v=4.5.0") format('embedded-opentype'),url("font-awesome-4.5.0/fonts/fontawesome-webfont.woff2?v=4.5.0") format('woff2'),url("font-awesome-4.5.0/fonts/fontawesome-webfont.woff?v=4.5.0") format('woff'),url("font-awesome-4.5.0/fonts/fontawesome-webfont.ttf?v=4.5.0") format('truetype');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.dijitReset {margin:0; border:0; padding:0; font: inherit; color: inherit;}.dj_a11y .dijitReset {-moz-appearance: none;}.dijitInline {display:inline-block; #zoom: 1; #display:inline; border:0; padding:0; vertical-align:middle; #vertical-align: auto;}table.dijitInline {display:inline-table; box-sizing: content-box; -moz-box-sizing: content-box;}.dijitHidden {display: none !important;}.dijitVisible {display: block !important; position: relative;}.dj_ie6 .dijitComboBox .dijitInputContainer,.dijitInputContainer {#zoom: 1; overflow: hidden; float: none !important; position: relative;}.dj_ie7 .dijitInputContainer {float: left !important; clear: left; display: inline-block !important;}.dj_ie .dijitSelect input,.dj_ie input.dijitTextBox,.dj_ie .dijitTextBox input {font-size: 100%;}.dijitSelect .dijitButtonText {float: left; vertical-align: top;}TABLE.dijitSelect {padding: 0 !important;}.dijitTextBox .dijitSpinnerButtonContainer,.dijitTextBox .dijitArrowButtonContainer,.dijitValidationTextBox .dijitValidationContainer {float: right; text-align: center;}.dijitSelect input.dijitInputField,.dijitTextBox input.dijitInputField {padding-left: 0 !important; padding-right: 0 !important;}.dijitValidationTextBox .dijitValidationContainer {display: none;}.dijitTeeny {font-size:1px; line-height:1px;}.dijitOffScreen {position: absolute !important; left: 50% !important; top: -10000px !important;}.dijitPopup {position: absolute; background-color: transparent; margin: 0; border: 0; padding: 0;}.dijitPositionOnly {padding: 0 !important; border: 0 !important; background-color: transparent !important; background-image: none !important; height: auto !important; width: auto !important;}.dijitNonPositionOnly {float: none !important; position: static !important; margin: 0 0 0 0 !important; vertical-align: middle !important;}.dijitBackgroundIframe {position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -1; border: 0; padding: 0; margin: 0;}.dijitDisplayNone {display:none !important;}.dijitContainer {overflow: hidden;}.dj_a11y .dijitIcon,.dj_a11y div.dijitArrowButtonInner, .dj_a11y span.dijitArrowButtonInner,.dj_a11y img.dijitArrowButtonInner,.dj_a11y .dijitCalendarIncrementControl,.dj_a11y .dijitTreeExpando {display: none;}.dijitSpinner div.dijitArrowButtonInner {display: block;}.dj_a11y .dijitA11ySideArrow {display: inline !important; cursor: pointer;}.dj_a11y .dijitCalendarDateLabel {padding: 1px; border: 0px !important;}.dj_a11y .dijitCalendarSelectedDate .dijitCalendarDateLabel {border-style: solid !important; border-width: 1px !important; padding: 0;}.dj_a11y .dijitCalendarDateTemplate {padding-bottom: 0.1em !important; border: 0px !important;}.dj_a11y .dijitButtonNode {border: black outset medium !important; padding: 0 !important;}.dj_a11y .dijitArrowButton {padding: 0 !important;}.dj_a11y .dijitButtonContents {margin: 0.15em;}.dj_a11y .dijitTextBoxReadOnly .dijitInputField,.dj_a11y .dijitTextBoxReadOnly .dijitButtonNode {border-style: outset!important; border-width: medium!important; border-color: #999 !important; color:#999 !important;}.dijitButtonNode * {vertical-align: middle;}.dijitSelect .dijitArrowButtonInner,.dijitButtonNode .dijitArrowButtonInner {background: no-repeat center; direction: ltr;}.dijitLeft {background-position:left top; background-repeat:no-repeat;}.dijitStretch {white-space:nowrap; background-repeat:repeat-x;}.dijitRight {#display:inline; background-position:right top; background-repeat:no-repeat;}.dj_gecko .dj_a11y .dijitButtonDisabled .dijitButtonNode {opacity: 0.5;}.dijitToggleButton,.dijitButton,.dijitDropDownButton,.dijitComboButton {margin: 0px; vertical-align: middle;}.dijitButtonContents {display: block;}td.dijitButtonContents {display: table-cell;}.dijitButtonNode img {vertical-align:middle;}.dijitToolbar .dijitComboButton {border-collapse: separate;}.dijitToolbar .dijitToggleButton,.dijitToolbar .dijitButton,.dijitToolbar .dijitDropDownButton,.dijitToolbar .dijitComboButton {margin: 0;}.dijitToolbar .dijitButtonContents {padding: 1px 2px;}.dj_webkit .dijitToolbar .dijitDropDownButton {}.dj_gecko .dijitToolbar .dijitButtonNode::-moz-focus-inner {padding:0;}.dijitSelect {border:1px solid gray;}.dijitButtonNode {border:1px solid gray; margin:0; line-height:20px; vertical-align: middle; #vertical-align: auto; text-align:center; white-space: nowrap;}.dj_webkit .dijitSpinner .dijitSpinnerButtonContainer {line-height:inherit;}.dijitTextBox .dijitButtonNode {border-width: 0;}.dijitSelect,.dijitSelect *,.dijitButtonNode,.dijitButtonNode * {cursor: pointer;}.dj_ie .dijitButtonNode {zoom: 1;}.dj_ie .dijitButtonNode button {overflow: visible;}div.dijitArrowButton {float: right;}.dijitTextBox {border: solid black 1px; #overflow: hidden; width: 15em; vertical-align: middle;}.dijitTextBoxReadOnly,.dijitTextBoxDisabled {color: gray;}.dj_safari .dijitTextBoxDisabled input {color: #707070;}.dj_safari textarea.dijitTextAreaDisabled {color: #333;}.dj_gecko .dijitTextBoxReadOnly input.dijitInputField, .dj_gecko .dijitTextBoxDisabled input {-moz-user-input: none;}.dijitPlaceHolder {color: #999; position: absolute; top: 0; left: 0; #filter: "";}.dijitTimeTextBox {width: 8em;}.dijitTextBox input:focus {outline: none;}.dijitTextBoxFocused {outline: 5px -webkit-focus-ring-color;}.dijitSelect input,.dijitTextBox input {float: left;}.dj_ie6 input.dijitTextBox,.dj_ie6 .dijitTextBox input {float: none;}.dijitInputInner {border:0 !important; background-color:transparent !important; width:100% !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important;}.dj_a11y .dijitTextBox input {margin: 0 !important;}.dijitValidationTextBoxError input.dijitValidationInner,.dijitSelect input,.dijitTextBox input.dijitArrowButtonInner {text-indent: -2em !important; direction: ltr !important; text-align: left !important; #text-indent: 0 !important; #letter-spacing: -5em !important; #text-align: right !important;}.dj_ie .dijitSelect input,.dj_ie .dijitTextBox input,.dj_ie input.dijitTextBox {overflow-y: visible; line-height: 20px; height: 20px;}.dijitSelect .dijitSelectLabel span {line-height: 100%;}.dj_ie .dijitSelect .dijitSelectLabel {line-height: normal;}.dj_ie6 .dijitSelect .dijitSelectLabel,.dj_ie7 .dijitSelect .dijitSelectLabel,.dj_ie8 .dijitSelect .dijitSelectLabel,.dj_iequirks .dijitSelect .dijitSelectLabel,.dijitSelect td,.dj_ie6 .dijitSelect input,.dj_iequirks .dijitSelect input,.dj_ie6 .dijitSelect .dijitValidationContainer,.dj_ie6 .dijitTextBox input,.dj_ie6 input.dijitTextBox,.dj_iequirks .dijitTextBox input.dijitValidationInner,.dj_iequirks .dijitTextBox input.dijitArrowButtonInner,.dj_iequirks .dijitTextBox input.dijitSpinnerButtonInner,.dj_iequirks .dijitTextBox input.dijitInputInner,.dj_iequirks input.dijitTextBox {line-height: 100%;}.dj_a11y input.dijitValidationInner,.dj_a11y input.dijitArrowButtonInner {text-indent: 0 !important; width: 1em !important; text-align: left !important; color: black !important;}.dijitValidationTextBoxError .dijitValidationContainer {display: inline; cursor: default;}.dijitSpinner .dijitSpinnerButtonContainer,.dijitComboBox .dijitArrowButtonContainer,.bootstrap .dijitSelect .dijitArrowButton {border-width: 0 0 0 1px !important;}.dj_a11y .dijitSelect .dijitArrowButtonContainer,.dijitToolbar .dijitComboBox .dijitArrowButtonContainer {border-width: 0 !important;}.dijitComboBoxMenu {list-style-type: none;}.dijitSpinner .dijitSpinnerButtonContainer .dijitButtonNode {border-width: 0;}.dj_ie .dj_a11y .dijitSpinner .dijitSpinnerButtonContainer .dijitButtonNode {clear: both;}.dj_ie .dijitToolbar .dijitComboBox {vertical-align: middle;}.dijitTextBox .dijitSpinnerButtonContainer {width: 1em; position: relative !important; overflow: hidden;}.dijitSpinner .dijitSpinnerButtonInner {width:1em; visibility:hidden !important; overflow-x:hidden;}.dijitComboBox .dijitButtonNode,.dijitSpinnerButtonContainer .dijitButtonNode {border-width: 0;}.dj_a11y .dijitSpinnerButtonContainer .dijitButtonNode {border-width: 0px !important; border-style: solid !important;}.dj_a11y .dijitTextBox .dijitSpinnerButtonContainer,.dj_a11y .dijitSpinner .dijitArrowButtonInner,.dj_a11y .dijitSpinnerButtonContainer input {width: 1em !important;}.dj_a11y .dijitSpinner .dijitArrowButtonInner {margin: 0 auto !important;}.dj_ie .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {padding-left: 0.3em !important; padding-right: 0.3em !important; margin-left: 0.3em !important; margin-right: 0.3em !important; width: 1.4em !important;}.dj_ie7 .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {padding-left: 0 !important; padding-right: 0 !important; width: 1em !important;}.dj_ie6 .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {margin-left: 0.1em !important; margin-right: 0.1em !important; width: 1em !important;}.dj_iequirks .dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {margin-left: 0 !important; margin-right: 0 !important; width: 2em !important;}.dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {padding: 0; position: absolute !important; right: 0; float: none; height: 50%; width: 100%; bottom: auto; left: 0; right: auto;}.dj_iequirks .dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {width: auto;}.dj_a11y .dijitSpinnerButtonContainer .dijitArrowButton {overflow: visible !important;}.dijitSpinner .dijitSpinnerButtonContainer .dijitDownArrowButton {top: 50%; border-top-width: 1px !important;}.dijitSpinner .dijitSpinnerButtonContainer .dijitUpArrowButton {#bottom: 50%; top: 0;}.dijitSpinner .dijitArrowButtonInner {margin: auto; overflow-x: hidden;}.dj_iequirks .dijitSpinner .dijitArrowButtonInner {height: auto !important;}.dijitSpinner .dijitArrowButtonInner .dijitInputField {-moz-transform: scale(0.5); -moz-transform-origin: center top; -webkit-transform: scale(0.5); -webkit-transform-origin: center top; -o-transform: scale(0.5); -o-transform-origin: center top; transform: scale(0.5); transform-origin: left top; padding-top: 0; padding-bottom: 0; padding-left: 0 !important; padding-right: 0 !important; width: 100%; visibility: hidden;}.dj_ie .dijitSpinner .dijitArrowButtonInner .dijitInputField {display: none;}.dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButtonInner {overflow: hidden;}.dj_a11y .dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {width: 100%;}.dj_iequirks .dj_a11y .dijitSpinner .dijitSpinnerButtonContainer .dijitArrowButton {width: 1em;}.dj_a11y .dijitSpinner .dijitArrowButtonInner .dijitInputField {vertical-align:top; visibility: visible;}.dj_a11y .dijitSpinnerButtonContainer {width: 1em;}.dijitCheckBox,.dijitRadio,.dijitCheckBoxInput {padding: 0; border: 0; width: 16px; height: 16px; background-position:center center; background-repeat:no-repeat; overflow: hidden; cursor: pointer;}.dijitCheckBox input,.dijitRadio input {margin: 0; padding: 0; display: block;}.dijitCheckBoxInput {opacity: 0.01;}.dj_ie .dijitCheckBoxInput {filter: alpha(opacity=0);}.dj_a11y .dijitCheckBox,.dj_a11y .dijitRadio {width: auto !important; height: auto !important;}.dj_a11y .dijitCheckBoxInput {opacity: 1; filter: none; width: auto; height: auto;}.dj_a11y .dijitFocusedLabel {border: 1px dotted; outline: 0px !important;}.dijitProgressBar {z-index: 0;}.dijitProgressBarEmpty {position:relative;overflow:hidden; border:1px solid black; z-index:0;}.dijitProgressBarFull {position:absolute; overflow:hidden; z-index:-1; top:0; width:100%;}.dj_ie6 .dijitProgressBarFull {height:1.6em;}.dijitProgressBarTile {position:absolute; overflow:hidden; top:0; left:0; bottom:0; right:0; margin:0; padding:0; width: 100%; height:auto; background-color:#aaa;}.dj_a11y .dijitProgressBarTile {border-width:2px; border-style:solid; background-color:transparent !important;}.dj_ie6 .dijitProgressBarTile {position:static; height:1.6em;}.dijitProgressBarIndeterminate .dijitProgressBarTile {}.dijitProgressBarIndeterminateHighContrastImage {display:none;}.dj_a11y .dijitProgressBarIndeterminate .dijitProgressBarIndeterminateHighContrastImage {display:block; position:absolute; top:0; bottom:0; margin:0; padding:0; width:100%; height:auto;}.dijitProgressBarLabel {display:block; position:static; width:100%; text-align:center; background-color:transparent !important;}.dijitTooltip {position: absolute; z-index: 2000; display: block; left: 0; top: -10000px; overflow: visible;}.dijitTooltipContainer {border: solid black 2px; background: #b8b5b5; color: black; font-size: small;}.dijitTooltipFocusNode {padding: 2px 2px 2px 2px;}.dijitTooltipConnector {position: absolute;}.dj_a11y .dijitTooltipConnector {display: none;}.dijitTooltipData {display:none;}.dijitLayoutContainer {position: relative; display: block; overflow: hidden;}.dijitAlignTop,.dijitAlignBottom,.dijitAlignLeft,.dijitAlignRight {position: absolute; overflow: hidden;}body .dijitAlignClient {position: absolute;}.dijitBorderContainer, .dijitBorderContainerNoGutter {position:relative; overflow: hidden; z-index: 0;}.dijitBorderContainerPane,.dijitBorderContainerNoGutterPane {position: absolute !important; z-index: 2;}.dijitBorderContainer > .dijitTextArea {resize: none;}.dijitGutter {position: absolute; font-size: 1px;}.dijitSplitter {position: absolute; overflow: hidden; z-index: 10; background-color: #fff; border-color: gray; border-style: solid; border-width: 0;}.dj_ie .dijitSplitter {z-index: 1;}.dijitSplitterActive {z-index: 11 !important;}.dijitSplitterCover {position:absolute; z-index:-1; top:0; left:0; width:100%; height:100%;}.dijitSplitterCoverActive {z-index:3 !important;}.dj_ie .dijitSplitterCover {background: white; filter: alpha(opacity=0);}.dijitSplitterH {height: 7px; border-top:1px; border-bottom:1px; cursor: row-resize;}.dijitSplitterV {width: 7px; border-left:1px; border-right:1px; cursor: col-resize;}.dijitSplitContainer {position: relative; overflow: hidden; display: block;}.dijitSplitPane {position: absolute;}.dijitSplitContainerSizerH,.dijitSplitContainerSizerV {position:absolute; font-size: 1px; background-color: ThreeDFace; border: 1px solid; border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; margin: 0;}.dijitSplitContainerSizerH .thumb, .dijitSplitterV .dijitSplitterThumb {overflow:hidden; position:absolute; top:49%;}.dijitSplitContainerSizerV .thumb, .dijitSplitterH .dijitSplitterThumb {position:absolute; left:49%;}.dijitSplitterShadow,.dijitSplitContainerVirtualSizerH,.dijitSplitContainerVirtualSizerV {font-size: 1px; background-color: ThreeDShadow; -moz-opacity: 0.5; opacity: 0.5; filter: Alpha(Opacity=50); margin: 0;}.dijitSplitContainerSizerH, .dijitSplitContainerVirtualSizerH {cursor: col-resize;}.dijitSplitContainerSizerV, .dijitSplitContainerVirtualSizerV {cursor: row-resize;}.dj_a11y .dijitSplitterH {border-top:1px solid #d3d3d3 !important; border-bottom:1px solid #d3d3d3 !important;}.dj_a11y .dijitSplitterV {border-left:1px solid #d3d3d3 !important; border-right:1px solid #d3d3d3 !important;}.dijitContentPane {display: block; overflow: auto;}.dijitContentPaneSingleChild {overflow: hidden;}.dijitContentPaneLoading .dijitIconLoading,.dijitContentPaneError .dijitIconError {margin-right: 9px;}.dijitTitlePane {display: block; overflow: hidden;}.dijitTitlePaneTitle {cursor: pointer;}.dijitFixedOpen, .dijitFixedClosed {cursor: default;}.dijitFixedOpen .dijitArrowNode, .dijitFixedOpen .dijitArrowNodeInner,.dijitFixedClosed .dijitArrowNode, .dijitFixedClosed .dijitArrowNodeInner{display: none;}.dijitTitlePaneTitle * {vertical-align: middle;}.dijitTitlePane .dijitArrowNodeInner {display: none;}.dj_a11y .dijitTitlePane .dijitArrowNodeInner {display:inline !important; font-family: monospace;}.dj_a11y .dijitTitlePane .dijitArrowNode {display:none;}.dj_ie6 .dijitTitlePaneContentOuter,.dj_ie6 .dijitTitlePane .dijitTitlePaneTitle {zoom: 1;}.dijitColorPalette {border: 1px solid #999; background: #fff; position: relative;}.dijitColorPalette .dijitPaletteTable {padding: 2px 3px 3px 3px; position: relative; overflow: hidden; outline: 0; border-collapse: separate;}.dj_ie6 .dijitColorPalette .dijitPaletteTable,.dj_ie7 .dijitColorPalette .dijitPaletteTable,.dj_iequirks .dijitColorPalette .dijitPaletteTable {padding: 0; margin: 2px 3px 3px 3px;}.dijitColorPalette .dijitPaletteCell {font-size: 1px; vertical-align: middle; text-align: center; background: none;}.dijitColorPalette .dijitPaletteImg {padding: 1px; border: 1px solid #999; margin: 2px 1px; cursor: default; font-size: 1px;}.dj_gecko .dijitColorPalette .dijitPaletteImg {padding-bottom: 0;}.dijitColorPalette .dijitColorPaletteSwatch {width: 14px; height: 12px;}.dijitPaletteTable td {padding: 0;}.dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg {border: 1px solid #000;}.dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg,.dijitColorPalette .dijitPaletteTable .dijitPaletteCellSelected .dijitPaletteImg {border: 2px solid #000; margin: 1px 0;}.dj_a11y .dijitColorPalette .dijitPaletteTable,.dj_a11y .dijitColorPalette .dijitPaletteTable * {background-color: transparent !important;}.dijitAccordionContainer {border:1px solid #b7b7b7; border-top:0 !important;}.dijitAccordionTitle {cursor: pointer;}.dijitAccordionTitleSelected {cursor: default;}.dijitAccordionTitle .arrowTextUp,.dijitAccordionTitle .arrowTextDown {display: none;}.dj_a11y .dijitAccordionTitle .arrowTextUp,.dj_a11y .dijitAccordionTitleSelected .arrowTextDown {display: inline;}.dj_a11y .dijitAccordionTitleSelected .arrowTextUp {display: none;}.dijitAccordionChildWrapper {overflow: hidden;}.dijitCalendarContainer {width: auto;}.dijitCalendarContainer th, .dijitCalendarContainer td {padding: 1px 2px 2px; vertical-align: middle;}.dijitCalendarYearLabel {white-space: nowrap;}.dijitCalendarNextYear {margin:0 0 0 0.55em;}.dijitCalendarPreviousYear {margin:0 0.55em 0 0;}.dijitCalendarIncrementControl {vertical-align: middle;}.dijitCalendarIncrementControl,.dijitCalendarDateTemplate,.dijitCalendarMonthLabel,.dijitCalendarPreviousYear,.dijitCalendarNextYear {cursor: pointer;}.dijitCalendarDisabledDate {color: gray; text-decoration: line-through; cursor: default;}.dijitSpacer {position: relative; height: 1px; overflow: hidden; visibility: hidden;}.dijitCalendarMonthMenu .dijitCalendarMonthLabel {text-align:center;}.dijitMenu {border:1px solid black; background-color:white;}.dijitMenuTable {border-collapse:collapse; border-width:0; background-color:white;}.dj_webkit .dijitMenuTable td[colspan="2"]{border-right:hidden;}.dijitMenuItem {text-align: left; white-space: nowrap; padding:.1em .2em; cursor:pointer;font:normal 12px arial;}.dijitMenuItem:focus {outline: none}.dijitMenuPassive .dijitMenuItemHover,.dijitMenuItemSelected {background-color:black; color:white;}.dijitMenuItemIcon, .dijitMenuExpand {background-repeat: no-repeat;}.dijitMenuItemDisabled * {opacity:0.5; cursor:default;}.dj_ie .dj_a11y .dijitMenuItemDisabled,.dj_ie .dj_a11y .dijitMenuItemDisabled *,.dj_ie .dijitMenuItemDisabled * {color: gray; filter: alpha(opacity=35);}.dijitMenuItemLabel {position: relative; vertical-align: middle;}.dj_a11y .dijitMenuItemSelected {border: 1px dotted black !important;}.dj_a11y .dijitMenuItemSelected .dijitMenuItemLabel {border-width: 1px; border-style: solid;}.dj_ie8 .dj_a11y .dijitMenuItemLabel {position:static;}.dijitMenuExpandA11y {display: none;}.dj_a11y .dijitMenuExpandA11y {display: inline;}.dijitMenuSeparator td {border: 0; padding: 0;}.dijitMenuSeparatorTop {height: 50%; margin: 0; margin-top:3px; font-size: 1px;}.dijitMenuSeparatorBottom {height: 50%; margin: 0; margin-bottom:3px; font-size: 1px;}.dijitCheckedMenuItemIconChar {vertical-align: middle; visibility:hidden;}.dijitCheckedMenuItemChecked .dijitCheckedMenuItemIconChar {visibility: visible;}.dj_a11y .dijitCheckedMenuItemIconChar {display:inline !important;}.dj_a11y .dijitCheckedMenuItemIcon {display: none;}.dj_ie .dj_a11y .dijitMenuBar .dijitMenuItem {margin: 0;}.dijitStackController .dijitToggleButtonChecked * {cursor: default;}.dijitTabContainer {z-index: 0; overflow: visible;}.dj_ie6 .dijitTabContainer {overflow: hidden;}.dijitTabContainerNoLayout {width: 100%;}.dijitTabContainerBottom-tabs,.dijitTabContainerTop-tabs,.dijitTabContainerLeft-tabs,.dijitTabContainerRight-tabs {z-index: 1; overflow: visible !important;}.dijitTabController {z-index: 1;}.dijitTabContainerBottom-container,.dijitTabContainerTop-container,.dijitTabContainerLeft-container,.dijitTabContainerRight-container {z-index:0; overflow: hidden; border: 1px solid black;}.nowrapTabStrip {width: 50000px; display: block; position: relative; text-align: left; z-index: 1;}.dijitTabListWrapper {overflow: hidden; z-index: 1;}.dj_a11y .tabStripButton img {display: none;}.dijitTabContainerTop-tabs {border-bottom: 1px solid black;}.dijitTabContainerTop-container {border-top: 0;}.dijitTabContainerLeft-tabs {border-right: 1px solid black; float: left;}.dijitTabContainerLeft-container {border-left: 0;}.dijitTabContainerBottom-tabs {border-top: 1px solid black;}.dijitTabContainerBottom-container {border-bottom: 0;}.dijitTabContainerRight-tabs {border-left: 1px solid black; float: left;}.dijitTabContainerRight-container {border-right: 0;}div.dijitTabDisabled, .dj_ie div.dijitTabDisabled {cursor: auto;}.dijitTab {position:relative; cursor:pointer; white-space:nowrap; z-index:3;}.dijitTab * {vertical-align: middle;}.dijitTabChecked {cursor: default;}.dijitTabContainerTop-tabs .dijitTab {top: 1px;}.dijitTabContainerBottom-tabs .dijitTab {top: -1px;}.dijitTabContainerLeft-tabs .dijitTab {left: 1px;}.dijitTabContainerRight-tabs .dijitTab {left: -1px;}.dijitTabContainerTop-tabs .dijitTab,.dijitTabContainerBottom-tabs .dijitTab {display:inline-block; #zoom: 1; #display:inline;}.tabStripButton {z-index: 12;}.dijitTabButtonDisabled .tabStripButton {display: none;}.dijitTabCloseButton {margin-left: 1em;}.dijitTabCloseText {display:none;}.dijitTab .tabLabel {min-height: 15px; display: inline-block;}.dijitNoIcon {display: none;}.dj_ie6 .dijitTab .dijitNoIcon {display: inline; height: 15px; width: 1px;}.dj_a11y .dijitTabCloseButton {background-image: none !important; width: auto !important; height: auto !important;}.dj_a11y .dijitTabCloseText {display: inline;}.dijitTabPane,.dijitStackContainer-child,.dijitAccordionContainer-child {border: none !important;}.dijitInlineEditBoxDisplayMode {border: 1px solid transparent; cursor: text;}.dj_a11y .dijitInlineEditBoxDisplayMode,.dj_ie6 .dijitInlineEditBoxDisplayMode {border: none;}.dijitInlineEditBoxDisplayModeHover,.dj_a11y .dijitInlineEditBoxDisplayModeHover,.dj_ie6 .dijitInlineEditBoxDisplayModeHover {background-color: #e2ebf2; border: solid 1px black;}.dijitInlineEditBoxDisplayModeDisabled {cursor: default;}.dijitTree {overflow: auto; background: #FFF;}.dijitTreeContainer {float: left;}.dijitTreeIndent {width: 19px;}.dijitTreeRow, .dijitTreeContent {white-space: nowrap;}.dj_ie .dijitTreeLabel:focus {outline: 1px dotted black;}.dijitTreeRow img {vertical-align: middle;}.dijitTreeContent {cursor: default;}.dijitExpandoText {display: none;}.dj_a11y .dijitExpandoText {display: inline; padding-left: 10px; padding-right: 10px; font-family: monospace; border-style: solid; border-width: thin; cursor: pointer;}.dijitTreeLabel {margin: 0 4px;}.dijitDialog {position: absolute; z-index: 999; overflow: hidden;}.dijitDialogTitleBar {cursor: move;}.dijitDialogFixed .dijitDialogTitleBar {cursor:default;}.dijitDialogCloseIcon {cursor: pointer;}.dijitDialogPaneContent {-webkit-overflow-scrolling: touch;}.dijitDialogUnderlayWrapper {position: absolute; left: 0; top: 0; z-index: 998; display: none; background: transparent !important;}.dijitDialogUnderlay {background: #eee; opacity: 0.5;}.dj_ie .dijitDialogUnderlay {filter: alpha(opacity=50);}.dj_a11y .dijitSpinnerButtonContainer,.dj_a11y .dijitDialog {opacity: 1 !important; background-color: white !important;}.dijitDialog .closeText {font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; display: block; color: #000000; text-shadow: 0 1px 0 #FFFFFF; position:absolute;}.dj_a11y .dijitDialog .closeText {display:inline;}.dijitSliderMoveable {z-index:99; position:absolute !important; display:block; vertical-align:middle;}.dijitSliderMoveableH {right:0;}.dijitSliderMoveableV {right:50%;}.dj_a11y div.dijitSliderImageHandle,.dijitSliderImageHandle {margin:0; padding:0; position:relative !important; border:8px solid gray; width:0; height:0; cursor: pointer;}.dj_iequirks .dj_a11y .dijitSliderImageHandle {font-size: 0;}.dj_ie7 .dijitSliderImageHandle {overflow: hidden;}.dj_ie7 .dj_a11y .dijitSliderImageHandle {overflow: visible;}.dj_a11y .dijitSliderFocused .dijitSliderImageHandle {border:4px solid #000; height:8px; width:8px;}.dijitSliderImageHandleV {top:-8px; right: -50%;}.dijitSliderImageHandleH {left:50%; top:-5px; vertical-align:top;}.dijitSliderBar {border-style:solid; border-color:black; cursor: pointer;}.dijitSliderBarContainerV {position:relative; height:100%; z-index:1;}.dijitSliderBarContainerH {position:relative; z-index:1;}.dijitSliderBarH {height:4px; border-width:1px 0;}.dijitSliderBarV {width:4px; border-width:0 1px;}.dijitSliderProgressBar {background-color:red; z-index:1;}.dijitSliderProgressBarV {position:static !important; height:0; vertical-align:top; text-align:left;}.dijitSliderProgressBarH {position:absolute !important; width:0; vertical-align:middle; overflow:visible;}.dijitSliderRemainingBar {overflow:hidden; background-color:transparent; z-index:1;}.dijitSliderRemainingBarV {height:100%; text-align:left;}.dijitSliderRemainingBarH {width:100% !important;}.dijitSliderBumper {overflow:hidden; z-index:1;}.dijitSliderBumperV {width:4px; height:8px; border-width:0 1px;}.dijitSliderBumperH {width:8px; height:4px; border-width:1px 0;}.dijitSliderBottomBumper,.dijitSliderLeftBumper {background-color:red;}.dijitSliderTopBumper,.dijitSliderRightBumper {background-color:transparent;}.dijitSliderDecoration {text-align:center;}.dijitSliderDecorationC,.dijitSliderDecorationV {position: relative;}.dijitSliderDecorationH {width: 100%;}.dijitSliderDecorationV {height: 100%; white-space: nowrap;}.dijitSliderButton {font-family:monospace; margin:0; padding:0; display:block;}.dj_a11y .dijitSliderButtonInner {visibility:visible !important;}.dijitSliderButtonContainer {text-align:center; height:0;}.dijitSliderButtonContainer * {cursor: pointer;}.dijitSlider .dijitButtonNode {padding:0; display:block;}.dijitRuleContainer {position:relative; overflow:visible;}.dijitRuleContainerV {height:100%; line-height:0; float:left; text-align:left;}.dj_opera .dijitRuleContainerV {line-height:2%;}.dj_ie .dijitRuleContainerV {line-height:normal;}.dj_gecko .dijitRuleContainerV {margin:0 0 1px 0;}.dijitRuleMark {position:absolute; border:1px solid black; line-height:0; height:100%;}.dijitRuleMarkH {width:0; border-top-width:0 !important; border-bottom-width:0 !important;}.dijitRuleLabelContainer {position:absolute;}.dijitRuleLabelContainerH {text-align:center; display:inline-block;}.dijitRuleLabelH {position:relative; left:-50%;}.dijitRuleLabelV {text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}.dijitRuleMarkV {height:0; border-right-width:0 !important; border-left-width:0 !important; width:100%; left:0;}.dj_ie .dijitRuleLabelContainerV {margin-top:-.55em;}.dj_a11y .dijitSliderReadOnly,.dj_a11y .dijitSliderDisabled {opacity:0.6;}.dj_ie .dj_a11y .dijitSliderReadOnly .dijitSliderBar,.dj_ie .dj_a11y .dijitSliderDisabled .dijitSliderBar {filter: alpha(opacity=40);}.dj_a11y .dijitSlider .dijitSliderButtonContainer div {font-family: monospace; font-size: 1em; line-height: 1em; height: auto; width: auto; margin: 0 4px;}.dj_a11y .dijitButtonContents .dijitButtonText,.dj_a11y .dijitTab .tabLabel {display: inline !important;}.dj_a11y .dijitSelect .dijitButtonText {display: inline-block !important;}.dijitSelectError .dijitButtonContents .dijitButtonText {display: none !important;}.dijitTextArea {width:100%; overflow-y: auto;}.dijitTextArea[cols] {width:auto;}.dj_ie .dijitTextAreaCols {width:auto;}.dijitExpandingTextArea {resize: none;}.dijitToolbarSeparator {height: 18px; width: 5px; padding: 0 1px; margin: 0;}.dijitIEFixedToolbar {position:absolute; top: expression(eval((document.documentElement||document.body).scrollTop));}.dijitEditor {display: block;}.dijitEditorDisabled,.dijitEditorReadOnly {color: gray;}.dijitTimePickerItemInner {text-align:center; border:0; padding:2px 8px 2px 8px;}.dijitTimePickerTick,.dijitTimePickerMarker {border-bottom:1px solid gray;}.dijitTimePicker .dijitDownArrowButton {border-top: none !important;}.dijitTimePickerTick {color:#CCC;}.dijitTimePickerMarker {color:black; background-color:#CCC;}.dijitTimePickerItemSelected {font-weight:bold; color:#333; background-color:#b7cdee;}.dijitTimePickerItemHover {background-color:gray; color:white; cursor:pointer;}.dijitTimePickerItemDisabled {color:gray; text-decoration:line-through;}.dj_a11y .dijitTimePickerItemSelected .dijitTimePickerItemInner {border: solid 4px black;}.dj_a11y .dijitTimePickerItemHover .dijitTimePickerItemInner {border: dashed 4px black;}.dijitToggleButtonIconChar {display:none !important;}.dj_a11y .dijitToggleButton .dijitToggleButtonIconChar {display:inline !important; visibility:hidden;}.dj_ie6 .dijitToggleButtonIconChar, .dj_ie6 .tabStripButton .dijitButtonText {font-family: "Arial Unicode MS";}.dj_a11y .dijitToggleButtonChecked .dijitToggleButtonIconChar {display: inline !important; visibility:visible !important;}.dijitArrowButtonChar {display:none !important;}.dj_a11y .dijitArrowButtonChar {display:inline !important;}.dj_a11y .dijitDropDownButton .dijitArrowButtonInner,.dj_a11y .dijitComboButton .dijitArrowButtonInner {display:none !important;}.dj_a11y .dijitSelect {border-collapse: separate !important; border-width: 1px; border-style: solid;}.dj_ie .dijitSelect {vertical-align: middle;}.dj_ie6 .dijitSelect .dijitValidationContainer,.dj_ie8 .dijitSelect .dijitButtonText {vertical-align: top;}.dj_ie6 .dijitTextBox .dijitInputContainer,.dj_iequirks .dijitTextBox .dijitInputContainer,.dj_ie6 .dijitTextBox .dijitArrowButtonInner,.dj_ie6 .dijitSpinner .dijitSpinnerButtonInner,.dijitSelect .dijitSelectLabel {vertical-align: baseline;}.dijitNumberTextBox {text-align: left; direction: ltr;}.dijitNumberTextBox .dijitInputInner {text-align: inherit;}.dijitToolbar .dijitSelect {margin: 0;}.dj_webkit .dijitToolbar .dijitSelect {padding-left: 0.3em;}.dijitSelect .dijitButtonContents {padding: 0; white-space: nowrap; text-align: left; border-style: none solid none none; border-width: 0px;}.dijitSelectFixedWidth .dijitButtonContents {width: 100%;}.dijitSelectMenu .dijitMenuItemIcon {display:none;}.dj_ie6 .dijitSelectMenu .dijitMenuItemLabel,.dj_ie7 .dijitSelectMenu .dijitMenuItemLabel {position: static;}.dijitSelectLabel *{vertical-align: baseline;}.dijitSelectSelectedOption * {font-weight: normal;}.dijitSelectMenu {border-width: 1px;}.dijitSelectMenu .dijitMenuTable {margin: 0; background-color: transparent;}.dijitForceStatic {position: static !important;}.dijitReadOnly *,.dijitDisabled *,.dijitReadOnly,.dijitDisabled {cursor: default;}.dojoDndItem {padding: 2px; -webkit-touch-callout: none; -webkit-user-select: none;}.dojoDndHorizontal .dojoDndItem {#display: inline; display: inline-block;}.dojoDndItemBefore,.dojoDndItemAfter {border: 0px solid #369;}.dojoDndItemBefore {border-width: 2px 0 0 0; padding: 0 2px 2px 2px;}.dojoDndItemAfter {border-width: 0 0 2px 0; padding: 2px 2px 0 2px;}.dojoDndHorizontal .dojoDndItemBefore {border-width: 0 0 0 2px; padding: 2px 2px 2px 0;}.dojoDndHorizontal .dojoDndItemAfter {border-width: 0 2px 0 0; padding: 2px 0 2px 2px;}.dojoDndItemOver {cursor:pointer;}.dj_gecko .dijitArrowButtonInner INPUT,.dj_gecko INPUT.dijitArrowButtonInner {-moz-user-focus:ignore;}.dijitFocused .dijitMenuItemShortcutKey {text-decoration: underline;}.dijitTextBox {background: #fff; border: 1px solid #d0d0d0; -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1) inset; box-shadow: 0 1px 1px rgba(0,0,0,0.1) inset; -webkit-border-radius: 2px; border-radius: 2px; -webkit-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; -moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; -o-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; -ms-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s; transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;}.dijitTextArea {padding: 0px;}.dijitTextBox .dijitInputField {padding: 0px 4px; margin: 0px;}.dijitSelect.btn-primary,.dijitComboBox.btn-primary,.dijitSpinner.btn-primary {border-color: #007ac2;}.dijitSelect.btn-success,.dijitComboBox.btn-success,.dijitSpinner.btn-success {border-color: #35ac46;}.dijitSelect.btn-info,.dijitComboBox.btn-info,.dijitSpinner.btn-info {border-color: #00b9f2;}.dijitSelect.btn-warning,.dijitComboBox.btn-warning,.dijitSpinner.btn-warning {border-color: #f89927;}.dijitSelect.btn-danger,.dijitComboBox.btn-danger,.dijitSpinner.btn-danger {border-color: #da4d1e;}.dijitSelect.btn-inverse,.dijitComboBox.btn-inverse,.dijitSpinner.btn-inverse {border-color: #2b2e34;}.dijitTextBox .dijitInputInner,.dijitValidationTextBox .dijitValidationContainer,.dijitTextBox .dijitInputField .dijitPlaceHolder {padding: 0px;}.dijitTextBoxHover {border: 1px solid #007ac2; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; -o-transition-duration: 0.25s; -ms-transition-duration: 0.25s; transition-duration: 0.25s;}.dijitTextBoxFocused {border: 1px solid rgba(0,122,194,0.8); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.15) inset; box-shadow: 0 1px 2px rgba(0,0,0,0.15) inset; -webkit-transition-duration: 0.1s; -moz-transition-duration: 0.1s; -o-transition-duration: 0.1s; -ms-transition-duration: 0.1s; transition-duration: 0.1s;}.dijitTextBoxDisabled {background: #f5f5f5; -webkit-box-shadow: none; box-shadow: none; opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitTextBoxError,.dijitTextBoxError .dijitButtonNode {border: 1px solid #da4d1e;}.dijitTextBoxErrorFocused,.dijitTextBoxErrorFocused .dijitButtonNode {border: 1px solid #b94119;}.dijitValidationTextBoxError .dijitValidationContainer {color: #da4d1e; width: 16px; font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom;}.dijitValidationTextBoxError .dijitValidationContainer:before {content: "\f12a";}.dijitValidationTextBoxError .dijitValidationIcon {display: none;}.dj_gecko .dijitInputInner {height: 20px;}.dijitTextBoxRtlError .dijitValidationContainer {float: left;}.dijitButtonText {padding: 0 4px; text-align: center;}.dijitButton .dijitButtonNode,.dijitDropDownButton .dijitButtonNode,.dijitComboButton .dijitButtonNode,.dijitToggleButton .dijitButtonNode {border-style: solid; border-width: 1px; padding: 0px; -webkit-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: none; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border-color: #d0d0d0; background: #f5f5f5; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitButton.btn-alt .dijitButtonNode,.dijitDropDownButton.btn-alt .dijitButtonNode,.dijitComboButton.btn-alt .dijitButtonNode,.dijitToggleButton.btn-alt .dijitButtonNode,.dijitComboBox.btn-alt .dijitButtonNode,.dijitSelect.btn-alt .dijitButtonContents,.dijitSelect.btn-alt .dijitButtonNode,.dijitSpinner.btn-alt .dijitArrowButton,.btn-alt .esriSimpleSlider div,.btn-alt .esriAddBookmark,.btn-alt .esriButton .dijitButtonNode,.btn-alt .esriToggleButton .dijitButtonNode {color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.25);}.dijitButton.btn-primary .dijitButtonNode,.dijitDropDownButton.btn-primary .dijitButtonNode,.dijitComboButton.btn-primary .dijitButtonNode,.dijitToggleButton.btn-primary .dijitButtonNode,.dijitComboBox.btn-primary .dijitButtonNode,.dijitSelect.btn-primary .dijitButtonContents,.dijitSelect.btn-primary .dijitButtonNode,.dijitSpinner.btn-primary .dijitArrowButton,.btn-primary .esriSimpleSlider div,.btn-primary .esriAddBookmark,.btn-primary .esriButton .dijitButtonNode,.btn-primary .esriToggleButton .dijitButtonNode {border-color: #0068a5; background: #007ac2; background: -webkit-linear-gradient(#0080cb, #007ac2); background: -moz-linear-gradient(#0080cb, #007ac2); background: -o-linear-gradient(#0080cb, #007ac2); background: -ms-linear-gradient(#0080cb, #007ac2); background: linear-gradient(#0080cb, #007ac2);}.dijitButton.btn-success .dijitButtonNode,.dijitDropDownButton.btn-success .dijitButtonNode,.dijitComboButton.btn-success .dijitButtonNode,.dijitToggleButton.btn-success .dijitButtonNode,.dijitComboBox.btn-success .dijitButtonNode,.dijitSelect.btn-success .dijitButtonContents,.dijitSelect.btn-success .dijitButtonNode,.dijitSpinner.btn-success .dijitArrowButton,.btn-success .esriSimpleSlider div,.btn-success .esriAddBookmark,.btn-success .esriButton .dijitButtonNode,.btn-success .esriToggleButton .dijitButtonNode {border-color: #2d923c; background: #35ac46; background: -webkit-linear-gradient(#37b349, #35ac46); background: -moz-linear-gradient(#37b349, #35ac46); background: -o-linear-gradient(#37b349, #35ac46); background: -ms-linear-gradient(#37b349, #35ac46); background: linear-gradient(#37b349, #35ac46);}.dijitButton.btn-info .dijitButtonNode,.dijitDropDownButton.btn-info .dijitButtonNode,.dijitComboButton.btn-info .dijitButtonNode,.dijitToggleButton.btn-info .dijitButtonNode,.dijitComboBox.btn-info .dijitButtonNode,.dijitSelect.btn-info .dijitButtonContents,.dijitSelect.btn-info .dijitButtonNode,.dijitSpinner.btn-info .dijitArrowButton,.btn-info .esriSimpleSlider div,.btn-info .esriAddBookmark,.btn-info .esriButton .dijitButtonNode,.btn-info .esriToggleButton .dijitButtonNode {border-color: #009dce; background: #00b9f2; background: -webkit-linear-gradient(#00bffa, #00b9f2); background: -moz-linear-gradient(#00bffa, #00b9f2); background: -o-linear-gradient(#00bffa, #00b9f2); background: -ms-linear-gradient(#00bffa, #00b9f2); background: linear-gradient(#00bffa, #00b9f2);}.dijitButton.btn-warning .dijitButtonNode,.dijitDropDownButton.btn-warning .dijitButtonNode,.dijitComboButton.btn-warning .dijitButtonNode,.dijitToggleButton.btn-warning .dijitButtonNode,.dijitComboBox.btn-warning .dijitButtonNode,.dijitSelect.btn-warning .dijitButtonContents,.dijitSelect.btn-warning .dijitButtonNode,.dijitSpinner.btn-warning .dijitArrowButton,.btn-warning .esriSimpleSlider div,.btn-warning .esriAddBookmark,.btn-warning .esriButton .dijitButtonNode,.btn-warning .esriToggleButton .dijitButtonNode {border-color: #ec8408; background: #f89927; background: -webkit-linear-gradient(#f89c2d, #f89927); background: -moz-linear-gradient(#f89c2d, #f89927); background: -o-linear-gradient(#f89c2d, #f89927); background: -ms-linear-gradient(#f89c2d, #f89927); background: linear-gradient(#f89c2d, #f89927);}.dijitButton.btn-danger .dijitButtonNode,.dijitDropDownButton.btn-danger .dijitButtonNode,.dijitComboButton.btn-danger .dijitButtonNode,.dijitToggleButton.btn-danger .dijitButtonNode,.dijitComboBox.btn-danger .dijitButtonNode,.dijitSelect.btn-danger .dijitButtonContents,.dijitSelect.btn-danger .dijitButtonNode,.dijitSpinner.btn-danger .dijitArrowButton,.btn-danger .esriSimpleSlider div,.btn-danger .esriAddBookmark,.btn-danger .esriButton .dijitButtonNode,.btn-danger .esriToggleButton .dijitButtonNode {border-color: #b94119; background: #da4d1e; background: -webkit-linear-gradient(#e05020, #da4d1e); background: -moz-linear-gradient(#e05020, #da4d1e); background: -o-linear-gradient(#e05020, #da4d1e); background: -ms-linear-gradient(#e05020, #da4d1e); background: linear-gradient(#e05020, #da4d1e);}.dijitButton.btn-inverse .dijitButtonNode,.dijitDropDownButton.btn-inverse .dijitButtonNode,.dijitComboButton.btn-inverse .dijitButtonNode,.dijitToggleButton.btn-inverse .dijitButtonNode,.dijitComboBox.btn-inverse .dijitButtonNode,.dijitSelect.btn-inverse .dijitButtonContents,.dijitSelect.btn-inverse .dijitButtonNode,.dijitSpinner.btn-inverse .dijitArrowButton,.btn-inverse .esriSimpleSlider div,.btn-inverse .esriAddBookmark,.btn-inverse .esriButton .dijitButtonNode,.btn-inverse .esriToggleButton .dijitButtonNode {border-color: #25272c; background: #2b2e34; background: -webkit-linear-gradient(#31343b, #2b2e34); background: -moz-linear-gradient(#31343b, #2b2e34); background: -o-linear-gradient(#31343b, #2b2e34); background: -ms-linear-gradient(#31343b, #2b2e34); background: linear-gradient(#31343b, #2b2e34);}.dijitButtonHover .dijitButtonNode,.dijitDropDownButtonHover .dijitButtonNode,.dijitToggleButtonHover .dijitButtonNode {-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: 0 1px 1px rgba(0,0,0,0.2); -webkit-transition: all 0.1s; -moz-transition: all 0.1s; -o-transition: all 0.1s; -ms-transition: all 0.1s; transition: all 0.1s; background: #e1e1e1; background: -webkit-linear-gradient(#f6f6f6, #e1e1e1); background: -moz-linear-gradient(#f6f6f6, #e1e1e1); background: -o-linear-gradient(#f6f6f6, #e1e1e1); background: -ms-linear-gradient(#f6f6f6, #e1e1e1); background: linear-gradient(#f6f6f6, #e1e1e1);}.dijitComboButton .dijitButtonNodeHover,.dijitComboButton .dijitDownArrowButtonHover {-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: 0 1px 1px rgba(0,0,0,0.2); -webkit-transition: all 0.1s; -moz-transition: all 0.1s; -o-transition: all 0.1s; -ms-transition: all 0.1s; transition: all 0.1s; background: #e1e1e1; background: -webkit-linear-gradient(#f6f6f6, #e1e1e1); background: -moz-linear-gradient(#f6f6f6, #e1e1e1); background: -o-linear-gradient(#f6f6f6, #e1e1e1); background: -ms-linear-gradient(#f6f6f6, #e1e1e1); background: linear-gradient(#f6f6f6, #e1e1e1);}.dijitButtonHover.btn-primary .dijitButtonNode,.dijitDropDownButtonHover.btn-primary .dijitButtonNode,.dijitComboButton.btn-primary .dijitButtonNodeHover,.dijitToggleButtonHover.btn-primary .dijitButtonNode,.dijitComboBoxHover.btn-primary .dijitButtonNode,.dijitSelectHover.btn-primary .dijitButtonContents,.dijitSelectHover.btn-primary .dijitButtonNode,.dijitSelect.dijitSelectOpened.btn-primary .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-primary .dijitArrowButton,.dijitSpinner.btn-primary .dijitUpArrowButtonHover,.dijitSpinner.btn-primary .dijitDownArrowButtonHover,.btn-primary .esriSimpleSlider div:hover,.btn-primary .esriAddBookmark:hover,.btn-primary .esriButtonHover .dijitButtonNode,.btn-primary .esriToggleButtonHover .dijitButtonNode {background: #0070b2; background: -webkit-linear-gradient(#0084d2, #0070b2); background: -moz-linear-gradient(#0084d2, #0070b2); background: -o-linear-gradient(#0084d2, #0070b2); background: -ms-linear-gradient(#0084d2, #0070b2); background: linear-gradient(#0084d2, #0070b2);}.dijitButtonHover.btn-success .dijitButtonNode,.dijitDropDownButtonHover.btn-success .dijitButtonNode,.dijitComboButton.btn-success .dijitButtonNodeHover,.dijitToggleButtonHover.btn-success .dijitButtonNode,.dijitComboBoxHover.btn-success .dijitButtonNode,.dijitSelectHover.btn-success .dijitButtonContents,.dijitSelectHover.btn-success .dijitButtonNode,.dijitSelect.dijitSelectOpened.btn-success .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-success .dijitArrowButton,.dijitSpinner.btn-success .dijitUpArrowButtonHover,.dijitSpinner.btn-success .dijitDownArrowButtonHover,.btn-success .esriSimpleSlider div:hover,.btn-success .esriAddBookmark:hover,.btn-success .esriButtonHover .dijitButtonNode,.btn-success .esriToggleButtonHover .dijitButtonNode {background: #319e40; background: -webkit-linear-gradient(#38b74a, #319e40); background: -moz-linear-gradient(#38b74a, #319e40); background: -o-linear-gradient(#38b74a, #319e40); background: -ms-linear-gradient(#38b74a, #319e40); background: linear-gradient(#38b74a, #319e40);}.dijitButtonHover.btn-info .dijitButtonNode,.dijitDropDownButtonHover.btn-info .dijitButtonNode,.dijitComboButton.btn-info .dijitButtonNodeHover,.dijitToggleButtonHover.btn-info .dijitButtonNode,.dijitComboBoxHover.btn-info .dijitButtonNode,.dijitSelectHover.btn-info .dijitButtonContents,.dijitSelectHover.btn-info .dijitButtonNode,.dijitSelect.dijitSelectOpened.btn-info .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-info .dijitArrowButton,.dijitSpinner.btn-info .dijitUpArrowButtonHover,.dijitSpinner.btn-info .dijitDownArrowButtonHover,.btn-info .esriSimpleSlider div:hover,.btn-info .esriAddBookmark:hover,.btn-info .esriButtonHover .dijitButtonNode,.btn-info .esriToggleButtonHover .dijitButtonNode {background: #00aadf; background: -webkit-linear-gradient(#00c3ff, #00aadf); background: -moz-linear-gradient(#00c3ff, #00aadf); background: -o-linear-gradient(#00c3ff, #00aadf); background: -ms-linear-gradient(#00c3ff, #00aadf); background: linear-gradient(#00c3ff, #00aadf);}.dijitButtonHover.btn-warning .dijitButtonNode,.dijitDropDownButtonHover.btn-warning .dijitButtonNode,.dijitComboButton.btn-warning .dijitButtonNodeHover,.dijitToggleButtonHover.btn-warning .dijitButtonNode,.dijitComboBoxHover.btn-warning .dijitButtonNode,.dijitSelectHover.btn-warning .dijitButtonContents,.dijitSelectHover.btn-warning .dijitButtonNode,.dijitSelect.dijitSelectOpened.btn-warning .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-warning .dijitArrowButton,.dijitSpinner.btn-warning .dijitUpArrowButtonHover,.dijitSpinner.btn-warning .dijitDownArrowButtonHover,.btn-warning .esriSimpleSlider div:hover,.btn-warning .esriAddBookmark:hover,.btn-warning .esriButtonHover .dijitButtonNode,.btn-warning .esriToggleButtonHover .dijitButtonNode {background: #f78e11; background: -webkit-linear-gradient(#f89e32, #f78e11); background: -moz-linear-gradient(#f89e32, #f78e11); background: -o-linear-gradient(#f89e32, #f78e11); background: -ms-linear-gradient(#f89e32, #f78e11); background: linear-gradient(#f89e32, #f78e11);}.dijitButtonHover.btn-danger .dijitButtonNode,.dijitDropDownButtonHover.btn-danger .dijitButtonNode,.dijitComboButton.btn-danger .dijitButtonNodeHover,.dijitToggleButtonHover.btn-danger .dijitButtonNode,.dijitComboBoxHover.btn-danger .dijitButtonNode,.dijitSelectHover.btn-danger .dijitButtonContents,.dijitSelectHover.btn-danger .dijitButtonNode,.dijitSelect.dijitSelectOpened.btn-danger .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-danger .dijitArrowButton,.dijitSpinner.btn-danger .dijitUpArrowButtonHover,.dijitSpinner.btn-danger .dijitDownArrowButtonHover,.btn-danger .esriSimpleSlider div:hover,.btn-danger .esriAddBookmark:hover,.btn-danger .esriButtonHover .dijitButtonNode,.btn-danger .esriToggleButtonHover .dijitButtonNode {background: #c9471c; background: -webkit-linear-gradient(#e15324, #c9471c); background: -moz-linear-gradient(#e15324, #c9471c); background: -o-linear-gradient(#e15324, #c9471c); background: -ms-linear-gradient(#e15324, #c9471c); background: linear-gradient(#e15324, #c9471c);}.dijitButtonHover.btn-inverse .dijitButtonNode,.dijitDropDownButtonHover.btn-inverse .dijitButtonNode,.dijitComboButton.btn-inverse .dijitButtonNodeHover,.dijitToggleButtonHover.btn-inverse .dijitButtonNode,.dijitComboBoxHover.btn-inverse .dijitButtonNode,.dijitSelectHover.btn-inverse .dijitButtonContents,.dijitSelectHover.btn-inverse .dijitButtonNode,.dijitSelect.dijitSelectOpened.btn-inverse .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-inverse .dijitArrowButton,.dijitSpinner.btn-inverse .dijitUpArrowButtonHover,.dijitSpinner.btn-inverse .dijitDownArrowButtonHover,.btn-inverse .esriSimpleSlider div:hover,.btn-inverse .esriAddBookmark:hover,.btn-inverse .esriButtonHover .dijitButtonNode,.btn-inverse .esriToggleButtonHover .dijitButtonNode {background: #282a30; background: -webkit-linear-gradient(#34383f, #282a30); background: -moz-linear-gradient(#34383f, #282a30); background: -o-linear-gradient(#34383f, #282a30); background: -ms-linear-gradient(#34383f, #282a30); background: linear-gradient(#34383f, #282a30);}.dijitButtonActive .dijitButtonNode,.dijitDropDownButtonActive .dijitButtonNode,.dijitToggleButtonActive .dijitButtonNode,.dijitToggleButtonChecked .dijitButtonNode {-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; outline: none; background: #d0d0d0; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitComboButton .dijitButtonNodeActive,.dijitComboButton .dijitDownArrowButtonActive {-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; outline: none; background: #d0d0d0; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitButtonActive.btn-primary .dijitButtonNode,.dijitDropDownButtonActive.btn-primary .dijitButtonNode,.dijitComboButton.btn-primary .dijitButtonNodeActive,.dijitToggleButtonActive.btn-primary .dijitButtonNode,.dijitComboBoxActive.btn-primary .dijitButtonNode,.dijitSelectActive.btn-primary .dijitButtonContents,.dijitSelectActive.btn-primary .dijitArrowButton,.dijitSelect.dijitSelectOpened.btn-primary .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-primary .dijitArrowButton,.dijitComboBox.btn-primary .dijitButtonNode.dijitHasDropDownOpen,.dijitSpinner.btn-primary .dijitUpArrowButtonActive,.dijitSpinner.btn-primary .dijitDownArrowButtonActive,.btn-primary .esriSimpleSlider div:active,.btn-primary .esriAddBookmark:active,.btn-primary .esriButtonActive .dijitButtonNode,.btn-primary .esriButtonChecked .dijitButtonNode,.btn-primary .esriToggleButtonActive .dijitButtonNode {background: #0068a5; background: -webkit-linear-gradient(#007ac2, #007ac2); background: -moz-linear-gradient(#007ac2, #007ac2); background: -o-linear-gradient(#007ac2, #007ac2); background: -ms-linear-gradient(#007ac2, #007ac2); background: linear-gradient(#007ac2, #007ac2);}.dijitButtonActive.btn-success .dijitButtonNode,.dijitDropDownButtonActive.btn-success .dijitButtonNode,.dijitComboButton.btn-success .dijitButtonNodeActive,.dijitToggleButtonActive.btn-success .dijitButtonNode,.dijitComboBoxActive.btn-success .dijitButtonNode,.dijitSelectActive.btn-success .dijitButtonContents,.dijitSelectActive.btn-success .dijitArrowButton,.dijitSelect.dijitSelectOpened.btn-success .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-success .dijitArrowButton,.dijitComboBox.btn-success .dijitButtonNode.dijitHasDropDownOpen,.dijitSpinner.btn-success .dijitUpArrowButtonActive,.dijitSpinner.btn-success .dijitDownArrowButtonActive,.btn-success .esriSimpleSlider div:active,.btn-success .esriAddBookmark:active,.btn-success .esriButtonActive .dijitButtonNode,.btn-success .esriButtonChecked .dijitButtonNode,.btn-success .esriToggleButtonActive .dijitButtonNode {background: #2d923c; background: -webkit-linear-gradient(#35ac46, #35ac46); background: -moz-linear-gradient(#35ac46, #35ac46); background: -o-linear-gradient(#35ac46, #35ac46); background: -ms-linear-gradient(#35ac46, #35ac46); background: linear-gradient(#35ac46, #35ac46);}.dijitButtonActive.btn-info .dijitButtonNode,.dijitDropDownButtonActive.btn-info .dijitButtonNode,.dijitComboButton.btn-info .dijitButtonNodeActive,.dijitToggleButtonActive.btn-info .dijitButtonNode,.dijitComboBoxActive.btn-info .dijitButtonNode,.dijitSelectActive.btn-info .dijitButtonContents,.dijitSelectActive.btn-info .dijitArrowButton,.dijitSelect.dijitSelectOpened.btn-info .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-info .dijitArrowButton,.dijitComboBox.btn-info .dijitButtonNode.dijitHasDropDownOpen,.dijitSpinner.btn-info .dijitUpArrowButtonActive,.dijitSpinner.btn-info .dijitDownArrowButtonActive,.btn-info .esriSimpleSlider div:active,.btn-info .esriAddBookmark:active,.btn-info .esriButtonActive .dijitButtonNode,.btn-info .esriButtonChecked .dijitButtonNode,.btn-info .esriToggleButtonActive .dijitButtonNode {background: #009dce; background: -webkit-linear-gradient(#00b9f2, #00b9f2); background: -moz-linear-gradient(#00b9f2, #00b9f2); background: -o-linear-gradient(#00b9f2, #00b9f2); background: -ms-linear-gradient(#00b9f2, #00b9f2); background: linear-gradient(#00b9f2, #00b9f2);}.dijitButtonActive.btn-warning .dijitButtonNode,.dijitDropDownButtonActive.btn-warning .dijitButtonNode,.dijitComboButton.btn-warning .dijitButtonNodeActive,.dijitToggleButtonActive.btn-warning .dijitButtonNode,.dijitComboBoxActive.btn-warning .dijitButtonNode,.dijitSelectActive.btn-warning .dijitButtonContents,.dijitSelectActive.btn-warning .dijitArrowButton,.dijitSelect.dijitSelectOpened.btn-warning .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-warning .dijitArrowButton,.dijitComboBox.btn-warning .dijitButtonNode.dijitHasDropDownOpen,.dijitSpinner.btn-warning .dijitUpArrowButtonActive,.dijitSpinner.btn-warning .dijitDownArrowButtonActive,.btn-warning .esriSimpleSlider div:active,.btn-warning .esriAddBookmark:active,.btn-warning .esriButtonActive .dijitButtonNode,.btn-warning .esriButtonChecked .dijitButtonNode,.btn-warning .esriToggleButtonActive .dijitButtonNode {background: #ec8408; background: -webkit-linear-gradient(#f89927, #f89927); background: -moz-linear-gradient(#f89927, #f89927); background: -o-linear-gradient(#f89927, #f89927); background: -ms-linear-gradient(#f89927, #f89927); background: linear-gradient(#f89927, #f89927);}.dijitButtonActive.btn-danger .dijitButtonNode,.dijitDropDownButtonActive.btn-danger .dijitButtonNode,.dijitComboButton.btn-danger .dijitButtonNodeActive,.dijitToggleButtonActive.btn-danger .dijitButtonNode,.dijitComboBoxActive.btn-danger .dijitButtonNode,.dijitSelectActive.btn-danger .dijitButtonContents,.dijitSelectActive.btn-danger .dijitArrowButton,.dijitSelect.dijitSelectOpened.btn-danger .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-danger .dijitArrowButton,.dijitComboBox.btn-danger .dijitButtonNode.dijitHasDropDownOpen,.dijitSpinner.btn-danger .dijitUpArrowButtonActive,.dijitSpinner.btn-danger .dijitDownArrowButtonActive,.btn-danger .esriSimpleSlider div:active,.btn-danger .esriAddBookmark:active,.btn-danger .esriButtonActive .dijitButtonNode,.btn-danger .esriButtonChecked .dijitButtonNode,.btn-danger .esriToggleButtonActive .dijitButtonNode {background: #b94119; background: -webkit-linear-gradient(#da4d1e, #da4d1e); background: -moz-linear-gradient(#da4d1e, #da4d1e); background: -o-linear-gradient(#da4d1e, #da4d1e); background: -ms-linear-gradient(#da4d1e, #da4d1e); background: linear-gradient(#da4d1e, #da4d1e);}.dijitButtonActive.btn-inverse .dijitButtonNode,.dijitDropDownButtonActive.btn-inverse .dijitButtonNode,.dijitComboButton.btn-inverse .dijitButtonNodeActive,.dijitToggleButtonActive.btn-inverse .dijitButtonNode,.dijitComboBoxActive.btn-inverse .dijitButtonNode,.dijitSelectActive.btn-inverse .dijitButtonContents,.dijitSelectActive.btn-inverse .dijitArrowButton,.dijitSelect.dijitSelectOpened.btn-inverse .dijitButtonContents,.dijitSelect.dijitSelectOpened.btn-inverse .dijitArrowButton,.dijitComboBox.btn-inverse .dijitButtonNode.dijitHasDropDownOpen,.dijitSpinner.btn-inverse .dijitUpArrowButtonActive,.dijitSpinner.btn-inverse .dijitDownArrowButtonActive,.btn-inverse .esriSimpleSlider div:active,.btn-inverse .esriAddBookmark:active,.btn-inverse .esriButtonActive .dijitButtonNode,.btn-inverse .esriButtonChecked .dijitButtonNode,.btn-inverse .esriToggleButtonActive .dijitButtonNode {background: #25272c; background: -webkit-linear-gradient(#2b2e34, #2b2e34); background: -moz-linear-gradient(#2b2e34, #2b2e34); background: -o-linear-gradient(#2b2e34, #2b2e34); background: -ms-linear-gradient(#2b2e34, #2b2e34); background: linear-gradient(#2b2e34, #2b2e34);}.dijitButtonDisabled,.dijitDropDownButtonDisabled,.dijitComboButtonDisabled,.dijitToggleButtonDisabled {outline: none;}.dijitButtonDisabled .dijitButtonNode,.dijitDropDownButtonDisabled .dijitButtonNode,.dijitComboButtonDisabled .dijitButtonNode,.dijitToggleButtonDisabled .dijitButtonNode {cursor: default; opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitComboButtonDisabled .dijitArrowButton {border-left-width: 0;}table.dijitComboButton {border-collapse: separate;}table.dijitComboButton .dijitStretch {-webkit-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px;}table.dijitComboButton .dijitArrowButton {-webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0; border-left-width: 0;}.dijitToggleButton .dijitCheckBoxIcon {display: none;}.dijitToggleButtonChecked .dijitIcon {display: inline-block;}.dijitDropDownButton .dijitArrowButtonInner {margin-left: 12px; margin-right: 10px;}.dijitDropDownButton .dijitArrowButtonInner,.dijitArrowButton {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 12px; text-decoration: inherit; vertical-align: bottom;}.dijitDropDownButton .dijitArrowButtonInner:before,.dijitArrowButton:before {content: "\f0d7";}.dijitLeftArrowButton:before {content: "\f0d9";}.dijitRightArrowButton:before {content: "\f0da";}.dijitUpArrowButton:before {content: "\f0d8";}table.dijitComboButtonRtl .dijitStretch {-webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}table.dijitComboButtonRtl .dijitArrowButton {-webkit-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px; border-left-width: 1px; border-right-width: 0;}.dijitCheckBox {background-color: #f5f5f5; border: 1px solid #d0d0d0; width: 16px; height: 16px; line-height: 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-border-radius: 3px; border-radius: 3px; text-align: center; position: relative; overflow: visible;}.dijitCheckBox input {position: absolute; top: 0;}.dijitCheckBoxIcon:before,.dijitCheckBoxChecked:before,.dijitCheckBoxCheckedDisabled:before {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; content: "\f00c"; line-height: 16px; color: #fff;}.dijitCheckBoxIcon {padding: 0;}.dijitCheckBoxIcon:before {color: #007ac2;}.btn-alt .dijitCheckBoxIcon:before {color: #fff;}.dijitCheckBoxChecked {background-color: #007ac2; border: 1px solid #0068a5;}.dijitCheckBoxHover {background-color: #f5f5f5; border: 1px solid #007ac2;}.dijitCheckBoxCheckedHover {background-color: #12a7ff; border: 1px solid #0068a5;}.dijitCheckBoxDisabled,.dijitCheckBoxCheckedDisabled {opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitRadio,.dijitRadioIcon {width: 14px; height: 14px; border: 1px solid #007ac2; -webkit-border-radius: 50%; border-radius: 50%; position: relative; overflow: visible;}.dijitRadio:after,.dijitRadioIcon:after {content: " "; display: block; width: 0; height: 0; background: #007ac2; -webkit-border-radius: 50%; border-radius: 50%; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); margin: 7px; position: absolute; top: 0; left: 0; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; -ms-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out;}.dijitButtonNode .dijitRadioIcon {border: 1px solid #d0d0d0; position: relative; top: 2px;}.btn-alt .dijitButtonNode .dijitRadioIcon {border-color: #fff; border-color: rgba(255,255,255,0.85);}.btn-alt.dijitChecked .dijitRadioIcon:after {background: #fff;}.dijitRadioChecked:after,.dijitChecked .dijitRadioIcon:after {width: 8px; height: 8px; margin: 3px; opacity: 1; -ms-filter: none; filter: none;}.dijitRadioDisabled {opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitSelect .dijitArrowButtonInner,.dijitComboBox .dijitArrowButtonInner {margin: 0; width: 0; height: 0;}.dijitSelect {padding: 4px 12px; -webkit-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: none; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border: 1px solid #d0d0d0; background: #f5f5f5; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5); table-layout: fixed;}.dijitSelect .dijitButtonContents,.dijitSelect .dijitArrowButton {line-height: 20px; padding: 4px 12px; border: 0; -webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}.dijitSelect .dijitButtonContents {padding: 0; overflow: hidden; -o-text-overflow: ellipsis; text-overflow: ellipsis; -webkit-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px;}.dijitSelect .dijitInputField {padding: 0 0 0 12px;}.dijitSelect .dijitArrowButton {width: 10px;}.dijitSelectHover {-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: 0 1px 1px rgba(0,0,0,0.2); -webkit-transition: all 0.1s; -moz-transition: all 0.1s; -o-transition: all 0.1s; -ms-transition: all 0.1s; transition: all 0.1s; background: #e1e1e1; background: -webkit-linear-gradient(#f6f6f6, #e1e1e1); background: -moz-linear-gradient(#f6f6f6, #e1e1e1); background: -o-linear-gradient(#f6f6f6, #e1e1e1); background: -ms-linear-gradient(#f6f6f6, #e1e1e1); background: linear-gradient(#f6f6f6, #e1e1e1);}.dijitSelectActive {-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; outline: none; background: #d0d0d0; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitSelectFocused {border: 1px solid #d0d0d0;}.dijitSelectDisabled {cursor: default; opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitComboBox .dijitButtonNode {padding: 0px 6px; -webkit-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: none; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border: 1px solid #d0d0d0; background: #f5f5f5; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5); -webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}.dijitComboBoxOpenHover .dijitButtonNode,.dijitComboBox .dijitDownArrowButtonHover {-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: 0 1px 1px rgba(0,0,0,0.2); -webkit-transition: all 0.1s; -moz-transition: all 0.1s; -o-transition: all 0.1s; -ms-transition: all 0.1s; transition: all 0.1s; background: #e1e1e1; background: -webkit-linear-gradient(#f6f6f6, #e1e1e1); background: -moz-linear-gradient(#f6f6f6, #e1e1e1); background: -o-linear-gradient(#f6f6f6, #e1e1e1); background: -ms-linear-gradient(#f6f6f6, #e1e1e1); background: linear-gradient(#f6f6f6, #e1e1e1); -webkit-box-shadow: none; box-shadow: none;}.dijitComboBoxDisabled .dijitButtonNode {cursor: default; opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitToolbar .dijitComboBox .dijitArrowButtonInner {border: none;}.dijitDateTextBox .dijitArrowButton:before {content: "\f073";}select {padding: 4px 0; border: 1px solid #d0d0d0; -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1) inset; box-shadow: 0 1px 1px rgba(0,0,0,0.1) inset;}select option {padding: 4px 8px;}.dijitSelectMenu td.dijitMenuItemIconCell,.dijitSelectMenu td.dijitMenuArrowCell {display: none;}.dijitSlider {background: transparent; border: 0 none; -webkit-border-radius: 0; border-radius: 0; -webkit-box-shadow: none; box-shadow: none; padding: 0;}.dijitSliderBar {border-style: solid; outline: 1px;}.dijitRuleLabelsContainer {color: #2b2e34;}.dijitSliderDisabled {opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitRuleLabelsContainerH {padding: 0;}.dijitSliderBarH,.dijitSliderBumperH {height: 6px;}.dijitSlider .dijitSliderLeftBumper {-webkit-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px; border-width: 1px 0 1px 1px; margin-left: 4px;}.dijitSlider .dijitSliderRightBumper {-webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0; border-width: 1px 1px 1px 0; margin-left: -2px; margin-right: 4px;}.dijitSlider .dijitSliderProgressBarH,.dijitSlider .dijitSliderLeftBumper {border-color: #0068a5; background-color: #007ac2; background-image: -webkit-linear-gradient(#0080cb, #007ac2); background-image: -moz-linear-gradient(#0080cb, #007ac2); background-image: -o-linear-gradient(#0080cb, #007ac2); background-image: -ms-linear-gradient(#0080cb, #007ac2); background-image: linear-gradient(#0080cb, #007ac2);}.dijitSlider .dijitSliderRemainingBarH,.dijitSlider .dijitSliderRightBumper {border-color: #d0d0d0; background-color: #fff; -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.075) inset; box-shadow: 1px 1px 1px rgba(0,0,0,0.075) inset;}.dijitSliderHover .dijitSliderProgressBarH,.dijitSliderHover .dijitSliderLeftBumper {border-color: #005b92; background-color: #0070b2; background-image: -webkit-linear-gradient(#0084d2, #0070b2); background-image: -moz-linear-gradient(#0084d2, #0070b2); background-image: -o-linear-gradient(#0084d2, #0070b2); background-image: -ms-linear-gradient(#0084d2, #0070b2); background-image: linear-gradient(#0084d2, #0070b2);}.dijitSliderFocused .dijitSliderProgressBarH,.dijitSliderFocused .dijitSliderLeftBumper {border-color: #0068a5;}.dijitRuleLabelsContainerV {padding: 0;}.dijitSliderBarV,.dijitSliderBumperV {width: 6px;}.dijitSlider .dijitSliderTopBumper {-webkit-border-radius: 2px 2px 0 0; border-radius: 2px 2px 0 0; border-width: 1px 1px 0 1px; margin-top: 4px; margin-bottom: -2px;}.dijitSlider .dijitSliderBottomBumper {-webkit-border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px; border-width: 0 1px 1px 1px; margin-bottom: 4px;}.dijitSlider .dijitSliderProgressBarV,.dijitSlider .dijitSliderBottomBumper {border-color: #0068a5; background-color: #007ac2; background-image: -webkit-linear-gradient(left, #0080cb, #007ac2); background-image: -moz-linear-gradient(left, #0080cb, #007ac2); background-image: -o-linear-gradient(left, #0080cb, #007ac2); background-image: -ms-linear-gradient(left, #0080cb, #007ac2); background-image: linear-gradient(to right, #0080cb, #007ac2);}.dijitSlider .dijitSliderRemainingBarV,.dijitSlider .dijitSliderTopBumper {border-color: #d0d0d0; background-color: #fff; -webkit-box-shadow: 1px -1px 1px rgba(0,0,0,0.075) inset; box-shadow: 1px -1px 1px rgba(0,0,0,0.075) inset;}.dijitSliderHover .dijitSliderProgressBarV,.dijitSliderHover .dijitSliderBottomBumper {border-color: #005b92; background-color: #0070b2; background-image: -webkit-linear-gradient(left, #0084d2, #0070b2); background-image: -moz-linear-gradient(left, #0084d2, #0070b2); background-image: -o-linear-gradient(left, #0084d2, #0070b2); background-image: -ms-linear-gradient(left, #0084d2, #0070b2); background-image: linear-gradient(to right, #0084d2, #0070b2);}.dijitSliderFocused .dijitSliderProgressBarV,.dijitSliderFocused .dijitSliderBottomBumper {border-color: #0068a5;}.dijitSliderImageHandle {background: #f5f5f5; background: -webkit-linear-gradient(#fdfdfd 0%, #f5f5f5 100%); background: -moz-linear-gradient(#fdfdfd 0%, #f5f5f5 100%); background: -o-linear-gradient(#fdfdfd 0%, #f5f5f5 100%); background: -ms-linear-gradient(#fdfdfd 0%, #f5f5f5 100%); background: linear-gradient(#fdfdfd 0%, #f5f5f5 100%); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,0.5); box-shadow: 0 2px 3px rgba(0,0,0,0.5); -webkit-border-radius: 50%; border-radius: 50%; border: 1px solid #007ac2; width: 16px; height: 16px; margin-top: -1px; position: absolute;}.dijitSliderImageHandle:after {content: ""; display: block; background: #f5f5f5; background: -webkit-linear-gradient(#ddd, #fdfdfd 100%); background: -moz-linear-gradient(#ddd, #fdfdfd 100%); background: -o-linear-gradient(#ddd, #fdfdfd 100%); background: -ms-linear-gradient(#ddd, #fdfdfd 100%); background: linear-gradient(#ddd, #fdfdfd 100%); -webkit-border-radius: 50%; border-radius: 50%; height: 10px; width: 10px; left: 3px; top: 3px; position: absolute;}.dijitSliderHover .dijitSliderImageHandle:after,.dijitSliderFocused .dijitSliderImageHandle:after {background: #007ac2; background: -webkit-linear-gradient(#0082cf 0, #0073b6 100%); background: -moz-linear-gradient(#0082cf 0, #0073b6 100%); background: -o-linear-gradient(#0082cf 0, #0073b6 100%); background: -ms-linear-gradient(#0082cf 0, #0073b6 100%); background: linear-gradient(#0082cf 0, #0073b6 100%); height: 6px; width: 6px; border-width: 2px; border-style: solid; border-color: #ddd #f5f5f5 #fdfdfd;}.dijitSliderDisabled.dijitSliderFocused .dijitSliderImageHandle:after {display: none;}.dijitSliderDecrementIconH,.dijitSliderIncrementIconH,.dijitSliderDecrementIconV,.dijitSliderIncrementIconV {padding: 4px 12px; -webkit-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: none; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border: 1px solid #d0d0d0; background: #f5f5f5; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5); padding: 0; height: 20px; width: 20px;}.dijitSliderDecrementButtonHover,.dijitSliderIncrementButtonHover {-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: 0 1px 1px rgba(0,0,0,0.2); -webkit-transition: all 0.1s; -moz-transition: all 0.1s; -o-transition: all 0.1s; -ms-transition: all 0.1s; transition: all 0.1s; background: #e1e1e1; background: -webkit-linear-gradient(#f6f6f6, #e1e1e1); background: -moz-linear-gradient(#f6f6f6, #e1e1e1); background: -o-linear-gradient(#f6f6f6, #e1e1e1); background: -ms-linear-gradient(#f6f6f6, #e1e1e1); background: linear-gradient(#f6f6f6, #e1e1e1);}.dijitSliderDecrementButtonActive,.dijitSliderIncrementButtonActive {-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; outline: none; background: #d0d0d0; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitSliderReadOnly .dijitSliderDecrementIconH,.dijitSliderDisabled .dijitSliderDecrementIconH,.dijitSliderReadOnly .dijitSliderDecrementIconV,.dijitSliderDisabled .dijitSliderDecrementIconV,.dijitSliderReadOnly .dijitSliderIncrementIconH,.dijitSliderDisabled .dijitSliderIncrementIconH,.dijitSliderReadOnly .dijitSliderIncrementIconV,.dijitSliderDisabled .dijitSliderIncrementIconV {cursor: default; opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitSliderButtonInner {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; height: 14px; width: 14px; margin: 3px; font-size: 0;}.dijitSliderIncrementIconH .dijitSliderButtonInner:before,.dijitSliderIncrementIconV .dijitSliderButtonInner:before {content: "\f067"; font-size: 14px;}.dijitSliderDecrementIconH .dijitSliderButtonInner:before,.dijitSliderDecrementIconV .dijitSliderButtonInner:before {content: "\f068"; font-size: 14px;}.dijitRuleMarkH,.dijitRuleMarkV {border-left: 1px solid #9a9b9f; border-right: 1px solid #fff;}.dijitRuleMarkV {border-right: 0 none; border-bottom: 1px solid #fff;}.dijitRuleLabelContainerH {margin-top: 2px; margin-bottom: 2px;}.dijitRuleLabelContainerV {margin-left: 2px; margin-right: 2px;}.dijitSliderRtl .dijitSliderProgressBarH {float: right; right: 0; left: auto;}.dijitSliderRtl .dijitSliderLeftBumper {border-left-width: 0; border-right-width: 1px; margin-left: 0; margin-right: 4px; -webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;}.dijitSliderRtl .dijitSliderRightBumper {border-left-width: 1px; border-right-width: 0; margin-left: 4px; margin-right: -2px; -webkit-border-radius: 2px 0 0 2px; border-radius: 2px 0 0 2px;}.dijitSliderRtl .dijitSliderMoveableH {right: auto; left: 0;}.dijitSliderRtl .dijitSliderImageHandleV {left: auto;}.dijitSliderRtl .dijitSliderImageHandleH {left: -50%;}.dijitSliderRtl .dijitRuleContainerV {float: right;}.dijitSpinner .dijitSpinnerButtonContainer {overflow: hidden; position: relative; width: auto; padding: 0; border: 1px solid #d0d0d0;}.dijitSpinner .dijitSpinnerButtonInner {width: 28px; margin: 0;}.dijitSpinner .dijitArrowButton {padding: 4px 12px; -webkit-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: none; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border: 1px solid #d0d0d0; background: #f5f5f5; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5); -webkit-border-radius: 0; border-radius: 0; border: 0; width: auto; overflow: hidden; left: 0; right: 0; padding: 0;}.dijitSpinner .dijitArrowButton:before {content: none;}.dijitSpinner .dijitUpArrowButton {border-top-right-radius: 2px;}.dijitSpinner .dijitDownArrowButton {border-bottom-right-radius: 2px; border-top: 1px solid #d0d0d0;}.dijitSpinner .dijitUpArrowButtonHover,.dijitSpinner .dijitDownArrowButtonHover {-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: 0 1px 1px rgba(0,0,0,0.2); -webkit-transition: all 0.1s; -moz-transition: all 0.1s; -o-transition: all 0.1s; -ms-transition: all 0.1s; transition: all 0.1s; background: #e1e1e1; background: -webkit-linear-gradient(#f6f6f6, #e1e1e1); background: -moz-linear-gradient(#f6f6f6, #e1e1e1); background: -o-linear-gradient(#f6f6f6, #e1e1e1); background: -ms-linear-gradient(#f6f6f6, #e1e1e1); background: linear-gradient(#f6f6f6, #e1e1e1);}.dijitSpinner .dijitDownArrowButtonActive,.dijitSpinner .dijitUpArrowButtonActive {-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; outline: none; background: #d0d0d0; background: -webkit-linear-gradient(#f5f5f5, #f5f5f5); background: -moz-linear-gradient(#f5f5f5, #f5f5f5); background: -o-linear-gradient(#f5f5f5, #f5f5f5); background: -ms-linear-gradient(#f5f5f5, #f5f5f5); background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitSpinner .dijitArrowButtonInner {line-height: 14px; display: block;}.dijitSpinner .dijitArrowButtonInner .dijitInputField {padding: 0;}.dijitSpinner .dijitArrowButtonInner:before {content: "\f0d8";}.dijitSpinner .dijitDownArrowButton .dijitArrowButtonInner:before {content: "\f0d7";}.dijitSpinnerDisabled .dijitDownArrowButton,.dijitSpinnerDisabled .dijitUpArrowButton {cursor: default; opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.dijitContentPane {padding: 0;}.dijitTabContainerTop-dijitContentPane,.dijitTabContainerLeft-dijitContentPane,.dijitTabContainerBottom-dijitContentPane,.dijitTabContainerRight-dijitContentPane,.dijitAccordionContainer-dijitContentPane {background: #fff; padding: 0; left: 0 !important; top: 0 !important;}.dijitBorderContainer {padding: 5px;}.dijitSplitContainer-child,.dijitBorderContainer-child {border: 1px solid #d0d0d0;}.dijitBorderContainer-dijitTabContainerTop,.dijitBorderContainer-dijitTabContainerBottom,.dijitBorderContainer-dijitTabContainerLeft,.dijitBorderContainer-dijitTabContainerRight,.dijitBorderContainer-dijitAccordionContainer {border: none;}.dijitBorderContainer-dijitBorderContainer {border: 0; padding: 0;}.dijitSplitterH,.dijitGutterH {background: none; border: 0; height: 5px;}.dijitSplitterH .dijitSplitterThumb {background: #d0d0d0; height: 1px; top: 2px; width: 19px;}.dijitSplitterV,.dijitGutterV {background: none; border: 0; width: 5px; margin: 0;}.dijitSplitterV .dijitSplitterThumb {background: #d0d0d0; height: 19px; left: 2px; width: 1px; margin: 0;}.dijitSplitterHHover,.dijitSplitterVHover {font-size: 1px; background: #f5f5f5;}.dijitSplitterHHover .dijitSplitterThumb,.dijitSplitterVHover .dijitSplitterThumb {background: #b8b8b8;}.dijitSplitterHActive,.dijitSplitterVActive {font-size: 1px; background: #f5f5f5;}.dijitSplitterHActive .dijitSplitterThumb,.dijitSplitterVActive .dijitSplitterThumb {background: #b8b8b8;}.dijitTabContainer {border-radius: 2px;}.dijitTabPaneWrapper {background: #fff; border: 1px solid #d0d0d0; margin: 0; padding: 0; border-radius: 0 0 2px 2px;}.dijitTabContainerTop-tabs,.dijitTabContainerBottom-tabs,.dijitTabContainerLeft-tabs,.dijitTabContainerRight-tabs {border: 0;}.dijitTabSpacer {display: none;}.dijitTab {border: 1px solid #d0d0d0; background: #fff; text-align: center; border-radius: none; transition-property: background, padding, margin; transition-duration: 0.2s; transition-timing-function: ease; position: relative; z-index: 0;}.dijitTab:before {content: ""; display: block; position: absolute;}.dijitTabHover {background: #f5f5f5;}.dijitTabActive {background: #eee;}.dijitTabChecked {z-index: 1;}.dijitTabChecked.dijitTabHover,.dijitTabChecked.dijitTabActive {border: 1px solid #d0d0d0; background: #fff; color: #2b2e34;}.dijitTabDisabled {opacity: 0.65;}.tabStripButton {background-color: transparent; border: none;}.dijitTabCloseButton {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; width: 14px; height: 14px; line-height: 14px; vertical-align: middle; margin-left: 4px; border-radius: 2px; opacity: 0.35;}.dijitTabCloseButton:before {content: "\f00d";}.dijitTabCloseButtonHover {opacity: 0.75;}.dijitTabCloseButtonActive {opacity: 1;}.dijitTabContainerTop-tabs .dijitTab {top: 1px; margin-right: -1px; padding: 4px 16px; vertical-align: bottom;}.dijitTabContainerTop-tabs .dijitTabHover,.dijitTabContainerTop-tabs .dijitTabActive,.dijitTabContainerTop-tabs .dijitTabChecked {padding-bottom: 8px;}.dijitTabContainerTop-tabs .dijitTabChecked:before {height: 2px; background: #007ac2; top: -1px; left: -1px; right: -1px;}.dijitTabContainerTop-tabs .dijitTabChecked {border-bottom: 1px solid #fff;}.dijitTabListContainer-top {margin-top: 1px;}.dijitTabListContainer-top .dijitTab {top: 0;}.dijitTabPaneWrapper.dijitTabContainerBottom-container {border-radius: 2px 2px 0 0;}.dijitTabContainerBottom-tabs .dijitTab {top: -1px; margin-right: -1px; padding: 4px 16px; vertical-align: top;}.dijitTabContainerBottom-tabs .dijitTabHover,.dijitTabContainerBottom-tabs .dijitTabActive,.dijitTabContainerBottom-tabs .dijitTabChecked {padding-top: 8px;}.dijitTabContainerBottom-tabs .dijitTabChecked:before {height: 2px; background: #007ac2; bottom: -1px; left: -1px; right: -1px;}.dijitTabContainerBottom-tabs .dijitTabChecked {border-top: 1px solid #fff;}.dijitTabListContainer-bottom {margin-top: -1px;}.dijitTabListContainer-bottom .dijitTab {top: 0;}.dijitTabPaneWrapper.dijitTabContainerLeft-container {border-radius: 0 2px 2px 0;}.dijitTabContainerLeft-tabs .dijitTab {margin-bottom: -1px; margin-left: 4px; padding: 8px 12px; vertical-align: middle;}.dijitTabContainerLeft-tabs .dijitTabHover,.dijitTabContainerLeft-tabs .dijitTabActive,.dijitTabContainerLeft-tabs .dijitTabChecked {margin-left: 0; padding-right: 16px;}.dijitTabContainerLeft-tabs .dijitTabChecked:before {width: 2px; background: #007ac2; bottom: -1px; left: -1px; top: -1px;}.dijitTabContainerLeft-tabs .dijitTabChecked {border-right: 1px solid #fff;}.dijitTabPaneWrapper.dijitTabContainerRight-container {border-radius: 2px 0 0 2px;}.dijitTabContainerRight-tabs .dijitTab {margin-bottom: -1px; margin-right: 4px; padding: 8px 12px; text-align: center; vertical-align: middle;}.dijitTabContainerRight-tabs .dijitTabHover,.dijitTabContainerRight-tabs .dijitTabActive,.dijitTabContainerRight-tabs .dijitTabChecked {margin-right: 0; padding-left: 16px;}.dijitTabContainerRight-tabs .dijitTabChecked:before {width: 2px; background: #007ac2; bottom: -1px; right: -1px; top: -1px;}.dijitTabContainerRight-tabs .dijitTabChecked {border-left: 1px solid #fff;}.tabStripButton {background-color: transparent; border: 0; transition-property: background-color;}.dijitTabListContainer-top .tabStripButton,.dijitTabListContainer-bottom .tabStripButton {padding: 4px 8px; margin-left: -1px; margin-right: -1px;}.dijitTabListContainer-top .tabStripButton {margin-bottom: 1px;}.dijitTabListContainer-bottom .tabStripButton {margin-top: 1px;}.tabStripButtonHover {background: #f5f5f5;}.tabStripButtonActive {background: #eee;}.dijitTabStripIcon {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; color: #007ac2; vertical-align: middle;}.dijitTabStripIcon:before {content: "\f0d9";}.dijitTabStripSlideRightIcon:before {content: "\f0da";}.dijitTabStripMenuIcon:before {content: "\f0d7";}.dijitTabListContainer-top .tabStripButtonDisabled,.dijitTabListContainer-bottom .tabStripButtonDisabled {opacity: 0.65;}.dijitTabContainerNested .dijitTabListWrapper {height: auto;}.dijitTabContainerTabListNested .dijitTab {color: #007ac2; margin: 4px; padding: 4px 8px; border: 0 none; border-radius: 4px; transition-property: background-color, border-color; transition-duration: 0.3s;}.dijitTabContainerTabListNested .dijitTabHover {background: $nestedtab-background;}.dijitTabContainerTabListNested .dijitTabActive {color: #007ac2; background-color: $nestedtab-background;}.dijitTabContainerTabListNested .dijitTabChecked,.dijitTabContainerTabListNested .dijitTabChecked.dijitTabHover,.dijitTabContainerTabListNested .dijitTabChecked.dijitTabActive {color: #fff; background: #007ac2;}.dijitTabContainerTabListNested .dijitTabChecked:before,.dijitTabContainerTabListNested .dijitTabChecked.dijitTabHover:before,.dijitTabContainerTabListNested .dijitTabChecked.dijitTabActive:before {display: none;}.dijitTabContainerTabListNested.dijitTabContainerTop-tabs .dijitTab {margin-right: 4px;}.dijitTabContainerTabListNested.dijitTabContainerBottom-tabs .dijitTab {margin-right: 4px;}.dijitTabContainerTabListNested.dijitTabContainerLeft-tabs .dijitTab {margin-bottom: 4px;}.dijitTabContainerTabListNested.dijitTabContainerRight-tabs .dijitTab {margin-bottom: 4px;}.dijitTabPaneWrapperNested {border: none; box-shadow: none;}.dijitTabContainerTop-tabs .dijitTabRtl,.dijitTabContainerBottom-tabs .dijitTabRtl {margin-right: 0; margin-left: -1px;}.dijitAccordionContainer {border: 0 none; border-radius: 2px;}.dijitAccordionInnerContainer {background: transparent; border: 1px solid #d0d0d0; border-radius: 2px; transition-property: background-color, border; transition-duration: 0.3s; transition-timing-function: linear;}.dijitAccordionInnerContainer +.dijitAccordionInnerContainer {margin-top: 0px; position: relative;}.dijitAccordionTitle {padding: 4px 12px; border-radius: 2px; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border: 1px solid #d0d0d0; background: #f5f5f5; background: linear-gradient(#f5f5f5, #f5f5f5); border: 0 none; border-radius: 2px;}.dijitAccordionTitle .arrowTextUp,.dijitAccordionTitle .arrowTextDown {display: none; float: right; font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; text-align: center; font-size: 0px;}.dijitAccordionTitle .arrowTextUp:before,.dijitAccordionTitle .arrowTextDown:before {content: "\f078"; font-size: 12px;}.dijitAccordionTitle .arrowTextUp {display: block;}.dijitAccordionTitle .arrowTextUp:before {content: "\f077";}.dijitAccordionInnerContainerHover .dijitAccordionTitle {box-shadow: 0 1px 1px rgba(0,0,0,0.2); transition: all 0.1s; background: #e1e1e1; background: linear-gradient(#f6f6f6, #e1e1e1);}.dijitAccordionInnerContainerActive .dijitAccordionTitle {box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; transition: none; outline: none; background: #d0d0d0; background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitAccordionInnerContainerSelected {border: 0 none;}.dijitAccordionInnerContainerSelected .dijitAccordionTitle {color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.25); background: #007ac2; box-shadow: 0 1px 3px -2px rgba(0,0,0,0.3); border-radius: 2px 2px 0 0;}.dijitAccordionInnerContainerSelected .dijitAccordionTitle .arrowTextUp {display: none;}.dijitAccordionInnerContainerSelected .dijitAccordionTitle .arrowTextDown {display: block;}.dijitAccordionContainer .dijitAccordionChildWrapper {background-color: #fff; border: 1px solid #d0d0d0; border-top: 0 none; position: relative; z-index: 1; clear: both; border-radius: 0 0 2px 2px;}.dijitAccordionInnerContainer {border-radius: 0;}.dijitAccordionInnerContainer .dijitAccordionTitle {border-radius: 0;}.dijitAccordionInnerContainer:not(:last-child) .dijitAccordionChildWrapper {border-radius: 0;}.dijitAccordionInnerContainer +.dijitAccordionInnerContainer {border-top: 0 none;}.dijitAccordionInnerContainer +.dijitAccordionInnerContainerSelected:last-child .dijitAccordionTitle {border-radius: 0;}.dijitAccordionInnerContainer:first-child,.dijitAccordionInnerContainer:first-child .dijitAccordionTitle {border-radius: 2px 2px 0 0;}.dijitAccordionInnerContainer:last-child,.dijitAccordionInnerContainer:last-child .dijitAccordionTitle {border-radius: 0 0 2px 2px;}.dijitPopup {-webkit-border-radius: 2px; border-radius: 2px;}.dijitTooltipDialogPopup {-webkit-box-shadow: none; box-shadow: none;}.dojoDndItem {border: 1px solid transparent; cursor: pointer; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; -o-transition-duration: 0.25s; -ms-transition-duration: 0.25s; transition-duration: 0.25s; -webkit-transition-property: background-color, border-color, opacity; -moz-transition-property: background-color, border-color, opacity; -o-transition-property: background-color, border-color, opacity; -ms-transition-property: background-color, border-color, opacity; transition-property: background-color, border-color, opacity;}.dojoDndItemOver {background: #f5f5f5; -webkit-border-radius: 2px; border-radius: 2px;}.dojoDndItemAnchor {background: transparent; border: 1px dashed #007ac2; -webkit-border-radius: 2px; border-radius: 2px;}.dojoDndItemBefore {background: transparent; padding-top: 2px; border-top: 1px solid #007ac2;}.dojoDndItemAfter {background: transparent; padding-bottom: 2px; border-bottom: 1px solid #007ac2;}table.dojoDndAvatar {display: block;}.dojoDndAvatarHeader td {display: none;}.dojoDndAvatarHeader:before {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; display: table-cell;}.dojoDndMove .dojoDndAvatarHeader:before {color: #da4d1e; content: "\f05e";}.dojoDndCopy .dojoDndAvatarHeader:before {color: #da4d1e; content: "\f05e";}.dojoDndMove .dojoDndAvatarCanDrop .dojoDndAvatarHeader:before {color: #35ac46; content: "\f060";}.dojoDndCopy .dojoDndAvatarCanDrop .dojoDndAvatarHeader:before {color: #35ac46; content: "\f060";}.dojoDndAvatarItem {-webkit-border-radius: 2px; border-radius: 2px;}.dojoDndAvatarItem td {padding: 4px 8px;}.dojoDndAvatarItem td > * {background: #fff; -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.25); box-shadow: 0 3px 3px rgba(0,0,0,0.25);}.flat .dijitCalendar {background-color: #fff; text-align: center; padding: 0px; border: 1px solid #d0d0d0; border-collapse: separate;}.dijitCalendarMonthContainer th {text-align: center; line-height: 20px; vertical-align: middle; margin: 4px 0;}.dijitCalendarIncrementControl {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom;}.dijitCalendarDecrease:before {content: "\f0d9";}.dijitCalendarIncrease:before {content: "\f0da";}.flat .dijitCalendarArrow { + font-family: FontAwesome; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + font-size: 14px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + cursor: pointer; + border: 1px solid transparent; + padding: 4px; +} +.flat .dijitCalendarDecrease, +.flat .dijitCalendarIncrease { + display: none; +} +.flat .dijitCalendarDecrementArrow { + float: left; + padding-left: 2px; +} +.flat .dijitCalendarDecrementArrow:before { + content: "\f0d9"; +} +.flat .dijitCalendarIncrementArrow { + float: right; + padding-right: 2px; +} +.flat .dijitCalendarIncrementArrow:before { + content: "\f0da"; +}.flat .dijitCalendarArrowHover .dijitCalendarIncrementControl,.flat .dijitCalendarArrow:hover .dijitCalendarIncrementControl,.flat .dijitCalendarNextYearHover,.flat .dijitCalendarNextYear:hover,.flat .dijitCalendarPreviousYearHover,.flat .dijitCalendarPreviousYear:hover {border-style: solid; border-width: 1px; border-color: #9e9e9e; padding: 4px; border-radius: 3px; line-height: 20px; cursor: pointer; -webkit-transition: all 0.05s linear; -moz-transition: all 0.05s linear; -o-transition: all 0.05s linear; -ms-transition: all 0.05s linear; transition: all 0.05s linear; background: #fff; padding: 4px;}.flat .dijitCalendarArrowActive .dijitCalendarIncrementControl,.flat .dijitCalendarArrow:active .dijitCalendarIncrementControl,.flat .dijitCalendarNextYearActive,.flat .dijitCalendarNextYear:active,.flat .dijitCalendarPreviousYearActive,.flat .dijitCalendarPreviousYear:active {-webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; outline: none; -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.05); box-shadow: inset 0 3px 5px rgba(0,0,0,0.05); background: #e0e0e0; border-color: #b3b3b3;}.flat .dijitA11ySideArrow {display: none;}.flat .dijitCalendarContainer th,.flat .dijitCalendarContainer td {padding: 4px;}.flat .dijitCalendarDayLabelTemplate {text-align: center; border-bottom: #9e9e9e;}.flat .dijitCalendarDayLabel {font-weight: bold; text-align: center;}.flat .dijitCalendarDateTemplate {font-size: 0.9em; letter-spacing: 0.05em; text-align: center;}.flat .dijitCalendarDateTemplate .dijitCalendarDateLabel {text-decoration: none; display: block; padding: 2px 4px; border: 0 none; border-radius: 50%;}.flat .dijitCalendarPreviousMonth .dijitCalendarDateLabel,.flat .dijitCalendarNextMonth .dijitCalendarDateLabel {color: #c2c2c2;}.flat .dijitCalendarCurrentDate .dijitCalendarDateLabel {border-color: #2196f3;}.flat .dijitCalendarHoveredDate .dijitCalendarDateLabel,.flat .dijitCalendarEnabledDate:hover .dijitCalendarDateLabel {background-color: #f2f2f2;}.flat .dijitCalendarActiveDate .dijitCalendarDateLabel,.flat .dijitCalendarEnabledDate:active .dijitCalendarDateLabel {background-color: #e6e6e6;}.flat .dijitCalendarSelectedDate .dijitCalendarDateLabel,.flat .dijitCalendarSelectedDate.dijitCalendarHoveredDate .dijitCalendarDateLabel {color: #fff; background-color: #2196f3;}.flat .dijitCalendarDisabledDate .dijitCalendarDateLabel {opacity: 0.65; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)"; filter: alpha(opacity=65);}.flat .dijitCalendarYearContainer {vertical-align: middle;}.flat .dijitCalendarYearLabel {padding: 4px 0 0 0; margin: 0; font-size: 1.15em;}.flat .dijitCalendarYearLabel span {vertical-align: middle;}.flat .dijitCalendarSelectedYear,.flat .dijitCalendarNextYear,.flat .dijitCalendarPreviousYear {padding: 4px;}.flat .dijitCalendarSelectedYear {color: #2196f3;}.flat .dijitCalendarNextYear,.flat .dijitCalendarPreviousYear {color: #2196f3; font-size: 0.9em; line-height: 20px; border: 1px solid transparent;}.flat .dijitCalendarSelectedYear {padding: 0 4px;}.flat .dijitCalendar .dijitDropDownButton {margin: 0;}.flat .dijitCalendarMonthMenu {padding: 8px 0;}.flat .dijitCalendarMonthMenu .dijitCalendarMonthLabel {padding: 4px;}.flat .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover {color: #fff; background-color: #2196f3;}.dijitCalendarRtl .dijitCalendarDecrease:before {content: "\f0da";}.dijitCalendarRtl .dijitCalendarIncrease:before {content: "\f0d9";}.dijitColorPalette {border: 1px solid #d0d0d0; background: #fff; border-radius: 2px;}.dijitColorPalette .dijitPaletteTable {padding: 4px;}.dijitColorPalette .dijitColorPaletteSwatch {height: 15px; width: 15px; border-radius: 2px;}.dijitColorPalette .dijitPaletteImg {border: 1px solid transparent; line-height: normal;}.dijitColorPalette .dijitPaletteCell:hover .dijitPaletteImg {border: 1px solid #d0d0d0; box-shadow: 0 1px 1px rgba(0,0,0,0.25); border-radius: 2px; transform: scale(1.2);}.dijitColorPalette .dijitPaletteCell:active .dijitPaletteImg,.dijitColorPalette .dijitPaletteTable .dijitPaletteCellSelected .dijitPaletteImg {border: 1px solid #007ac2; box-shadow: 0 3px 3px rgba(0,0,0,0.25); border-radius: 2px; transform: scale(1.2);}.dijitDialog {background: #fff; border: 1px solid #d0d0d0; border-radius: 2px; box-shadow: 0 2px 3px rgba(0,0,0,0.15);}.dijitDialogPaneContent {background: #fff; border-radius: 0 0 2px 2px; padding: 8px; position: relative;}.dijitDialogPaneActionBar {padding-top: 8px; text-align: right; position: relative;}.dijitTooltipDialog .dijitDialogPaneActionBar {border-radius: 0 0 2px 2px; margin: 8px -8px -4px;}.dijitDialogPaneActionBar .dijitButton {float: none;}.dijitDialogTitleBar {border-bottom: 1px solid #efefef; padding: 8px 12px; border-radius: 2px 2px 0 0;}.dijitDialogTitle {font-size: 1.1em; font-weight: bold;}.dijitDialogCloseIcon {width: 20px; height: 20px; line-height: 20px; text-align: center; position: absolute; top: 8px; right: 12px; font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; opacity: 0.65;}.dijitDialogCloseIcon:before {content: "\f00d";}.dijitDialogCloseIcon .closeText {display: none;}.dijitDialogCloseIconHover,.dijitDialogCloseIconActive {opacity: 1;}.dijitDialogUnderlay {background: #000; opacity: 0.8;}.dijitTooltip,.dijitTooltipDialog {background: transparent;}.dijitTooltipContainer {background: #2b2e34; opacity: 0.8; padding: 4px 8px; border-radius: 2px;}.dijitTooltip .dijitTooltipContainer {color: #fff; border: 0 none;}.dijitTooltipConnector {z-index: 2; width: auto; height: auto; opacity: 0.8;}.dijitTooltipABRight .dijitTooltipConnector {left: auto !important; right: 8px;}.dijitTooltipBelow {padding-top: 4px;}.dijitTooltipBelow .dijitTooltipConnector {top: 0; left: 8px; border-bottom: 4px solid #2b2e34; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 0;}.dijitTooltipAbove {padding-bottom: 4px;}.dijitTooltipAbove .dijitTooltipConnector {bottom: 0; left: 8px; border-top: 4px solid #2b2e34; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 0;}.dijitTooltipLeft {padding-right: 4px;}.dijitTooltipLeft .dijitTooltipConnector {right: 0; border-left: 4px solid #2b2e34; border-bottom: 4px solid transparent; border-top: 4px solid transparent; border-right: 0;}.dijitTooltipRight {padding-left: 4px;}.dijitTooltipRight .dijitTooltipConnector {left: 0; border-bottom: 4px solid transparent; border-top: 4px solid transparent; border-right: 4px solid #2b2e34;}.dijitTooltipDialog .dijitTooltipContainer {background: #fff; border: 1px solid #d0d0d0; border-radius: 2px; box-shadow: 0 2px 3px rgba(0,0,0,0.15); opacity: 1;}.dijitTooltipDialog.dijitTooltipBelow {padding-top: 6px;}.dijitTooltipDialog.dijitTooltipAbove {padding-bottom: 6px;}.dijitTooltipDialog.dijitTooltipLeft {padding-right: 6px;}.dijitTooltipDialog.dijitTooltipRight {padding-left: 6px;}.dijitTooltipDialog .dijitTooltipConnector {height: 0; width: 0; position: absolute; z-index: 2; opacity: 1;}.dijitTooltipDialog .dijitTooltipConnector:after {content: ""; height: 0; width: 0; position: absolute;}.dijitTooltipDialog.dijitTooltipAbove .dijitTooltipConnector {border-color: #d0d0d0 transparent transparent; border-width: 7px 7px 0; border-style: solid;}.dijitTooltipDialog.dijitTooltipAbove .dijitTooltipConnector:after {border-color: #fff transparent transparent; border-width: 6px 6px 0; border-style: solid; left: -6px; top: -7px;}.dijitTooltipDialog.dijitTooltipBelow .dijitTooltipConnector {border-color: transparent transparent #d0d0d0; border-width: 0 7px 7px; border-style: solid;}.dijitTooltipDialog.dijitTooltipBelow .dijitTooltipConnector:after {border-color: transparent transparent #fff; border-width: 0 6px 6px; border-style: solid; left: -6px; bottom: -7px;}.dijitTooltipDialog.dijitTooltipLeft .dijitTooltipConnector {border-color: transparent transparent transparent #d0d0d0; border-width: 7px 0 7px 7px; border-style: solid;}.dijitTooltipDialog.dijitTooltipLeft .dijitTooltipConnector:after {border-color: transparent transparent transparent #fff; border-width: 6px 0 6px 6px; border-style: solid; top: -6px; left: -7px;}.dijitTooltipDialog.dijitTooltipRight .dijitTooltipConnector {border-color: transparent #d0d0d0 transparent transparent; border-width: 7px 7px 7px 0; border-style: solid;}.dijitTooltipDialog.dijitTooltipRight .dijitTooltipConnector:after {border-color: transparent #fff transparent transparent; border-width: 6px 6px 6px 0; border-style: solid; top: -6px; right: -7px;}.dijitDialogRtl .dijitDialogCloseIcon {right: auto; left: 12px;}.dijitDialogRtl .dijitDialogPaneActionBar {text-align: left;}.dijitEditor {background: #fff; border: 1px solid #d0d0d0; border-radius: 2px;}.dijitEditor .dijitEditorIFrameContainer {border: 1px solid transparent; border-top: 1px solid #d0d0d0; padding: 4px 8px; box-shadow: 0 1px 1px rgba(0,0,0,0.1) inset; transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;}.dijitEditorHover .dijitEditorIFrameContainer,.dijitEditorHover .dijitEditorIFrameContainer .dijitEditorIFrame {border: 1px solid #007ac2;}.dijitEditorFocused .dijitEditorIFrameContainer {border: 1px solid #007ac2; box-shadow: 0 1px 2px rgba(0,0,0,0.15) inset;}.dijitEditorFocused .dijitEditorIFrameContainer .dijitEditorIFrame {border: 1px solid #007ac2;}.dijitEditorDisabled {border: 1px solid #d0d0d0; color: #9a9b9f; opacity: 0.65;}.dijitEditorDisabled .dijitEditorIFrame,.dijitEditorDisabled .dijitEditorIFrameContainer,.dijitEditorDisabled .dijitEditorIFrameContainer .dijitEditorIFrame {background: #f5f5f5; border: 1px solid transparent; box-shadow: none;}.dijitEditorRtl .dijitEditorIFrameContainer {padding: 4px 8px;}.dijitInlineEditBoxDisplayMode {border: 1px dashed transparent; padding: 4px 8px; border-radius: 2px;}.dijitInlineEditBoxDisplayModeHover {background: transparent; border: 1px dashed #007ac2;}.dijitInlineEditBoxDisplayModeDisabled {opacity: 0.65;}.dijitMenu {background: #fff; border: 1px solid #d0d0d0; border-radius: 2px; margin: 0; box-shadow: 0 2px 3px rgba(0,0,0,0.15);}.dijitMenuTable,.dijitComboBoxMenu {padding: 2px 2px;}.dijitComboBoxMenu {margin-left: 0; background-image: none;}.dijitMenuTable {border-collapse: separate; border-spacing: 0 0;}.dijitMenuItem,.dijitMenuItem td {padding-left: 5px; padding-top: 1px; white-space: nowrap;}.dijitMenuItemHover td,.dijitMenuItemHover {color: #fff; background: #007ac2;}.dijitMenuItemActive td,.dijitMenuItemActive {color: #fff; background: #007ac2;}.dijitMenuItemSelected td,.dijitMenuItemSelected {color: #fff; background: #007ac2;}.dijitMenuSeparatorTop {height: auto; margin-top: 1px; border-bottom: 1px solid #d0d0d0;}.dijitMenuSeparatorBottom {height: auto; margin-bottom: 1px; border-top: 0 none;}td.dijitMenuItemIconCell {padding: 4px; margin: 0 0 0 4px;}.dijitMenuExpand {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom;}.dijitMenuExpand:before {content: "\f0da";}.dijitCheckedMenuItemIconChar {display: none;}.dijitCheckedMenuItemIcon {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom;}.dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon:before {content: "\f00c";}.dijitMenuPreviousButton,.dijitMenuNextButton {font-style: italic;}.dijitMenuBar {margin: 0px; padding: 0px;}.dijitMenuBar .dijitMenuItem {padding: 3px 8px; margin: 0px;}.dijitMenuBar .dijitMenuItemHover {background: #007ac2;}.dijitMenuBar .dijitMenuItemActive {background: #007ac2;}.dijitMenuBar .dijitMenuItemSelected,.dijitMenuBar .dijitMenuItemHover.dijitMenuItemSelected,.dijitMenuBar .dijitMenuItemActive.dijitMenuItemSelected {color: #fff; background: #007ac2;}.dijitMenuPopup {border-top-left-radius: 0; border-top-right-radius: 0;}.dijitMenuPopup .dijitMenu {border-top-left-radius: 0; border-top-right-radius: 0;}.dijitMenuPopup .dijitMenuItem,.dijitMenuPopup .dijitMenuItem td {padding:3px 2px 3px 8px;}.dijitMenuBarRtl {text-align: right;}.dijitMenuItemRtl .dijitMenuExpand:before {content: "\f0d9";}.dijitProgressBar {background: #e4e4e4; border: 0 none; -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); -webkit-border-radius: 2px; border-radius: 2px;}.dijitProgressBarTile {background: url("images/progressBarStrips.png") repeat-x top; -webkit-animation: progress-bar-stripes 2s linear infinite; -moz-animation: progress-bar-stripes 2s linear infinite; -o-animation: progress-bar-stripes 2s linear infinite; -ms-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite;}.dijitProgressBarFull {background: #007ac2; background: -webkit-linear-gradient(#0080cb, #007ac2); background: -moz-linear-gradient(#0080cb, #007ac2); background: -o-linear-gradient(#0080cb, #007ac2); background: -ms-linear-gradient(#0080cb, #007ac2); background: linear-gradient(#0080cb, #007ac2); -webkit-transition-property: width; -moz-transition-property: width; -o-transition-property: width; -ms-transition-property: width; transition-property: width; -webkit-transition-duration: 0.25s; -moz-transition-duration: 0.25s; -o-transition-duration: 0.25s; -ms-transition-duration: 0.25s; transition-duration: 0.25s; height:100%;}.dijitProgressBar.progress-bar-success .dijitProgressBarFull {background: #35ac46; background: -webkit-linear-gradient(#37b349, #35ac46); background: -moz-linear-gradient(#37b349, #35ac46); background: -o-linear-gradient(#37b349, #35ac46); background: -ms-linear-gradient(#37b349, #35ac46); background: linear-gradient(#37b349, #35ac46);}.dijitProgressBar.progress-bar-info .dijitProgressBarFull {background: #00b9f2; background: -webkit-linear-gradient(#00bffa, #00b9f2); background: -moz-linear-gradient(#00bffa, #00b9f2); background: -o-linear-gradient(#00bffa, #00b9f2); background: -ms-linear-gradient(#00bffa, #00b9f2); background: linear-gradient(#00bffa, #00b9f2);}.dijitProgressBar.progress-bar-warning .dijitProgressBarFull {background: #f89927; background: -webkit-linear-gradient(#f89c2d, #f89927); background: -moz-linear-gradient(#f89c2d, #f89927); background: -o-linear-gradient(#f89c2d, #f89927); background: -ms-linear-gradient(#f89c2d, #f89927); background: linear-gradient(#f89c2d, #f89927);}.dijitProgressBar.progress-bar-danger .dijitProgressBarFull {background: #da4d1e; background: -webkit-linear-gradient(#e05020, #da4d1e); background: -moz-linear-gradient(#e05020, #da4d1e); background: -o-linear-gradient(#e05020, #da4d1e); background: -ms-linear-gradient(#e05020, #da4d1e); background: linear-gradient(#e05020, #da4d1e);}.dijitProgressBarLabel {color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.25);}@-moz-keyframes progress-bar-stripes {from {background-position: 75px 0;} to {background-position: 0 0;}}@-webkit-keyframes progress-bar-stripes {from {background-position: 75px 0;} to {background-position: 0 0;}}@-o-keyframes progress-bar-stripes {from {background-position: 75px 0;} to {background-position: 0 0;}}@keyframes progress-bar-stripes {from {background-position: 75px 0;} to {background-position: 0 0;}}.dijitTimePickerPopup {box-shadow: 0 2px 3px rgba(0,0,0,0.15); height: 200px;}.dijitTimePicker {background: #fff; padding: 4px 0; border: 1px solid #d0d0d0; border-radius: 2px;}.dijitTimePickerItem {margin: 0;}.dijitTimePickerTick {color: #9a9b9f; border: 0;}.dijitTimePickerMarker {background: #f5f5f5; white-space: nowrap; border: 0;}.dijitTimePickerTickHover,.dijitTimePickerMarkerHover {background: #007ac2; color: #fff;}.dijitTimePickerMarkerSelected,.dijitTimePickerTickSelected {background: #007ac2; color: #fff;}.dijitTimePickerTick .dijitTimePickerItemInner,.dijitTimePickerMarker .dijitTimePickerItemInner {padding: 8px; margin: 0;}.dijitTitlePaneTitle {padding: 4px 12px; border-radius: 2px; box-shadow: none; line-height: 20px; text-shadow: 0 1px 1px rgba(255,255,255,0.75); cursor: pointer; border: 1px solid #d0d0d0; background: #f5f5f5; background: linear-gradient(#f5f5f5, #f5f5f5); border-radius: 2px 2px 0 0;}.dijitTitlePaneTitleHover {box-shadow: 0 1px 1px rgba(0,0,0,0.2); transition: all 0.1s; background: #e1e1e1; background: linear-gradient(#f6f6f6, #e1e1e1); box-shadow: none;}.dijitTitlePaneTitleActive {box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; transition: none; outline: none; background: #d0d0d0; background: linear-gradient(#f5f5f5, #f5f5f5);}.dijitTitlePane .dijitArrowNode {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; text-align: center;}.dijitTitlePane .dijitArrowNode:before {content: "\f078"; font-size: 12px;}.dijitTitlePane .dijitClosed {border-radius: 2px;}.dijitTitlePane .dijitClosed .dijitArrowNode:before {content: "\f077";}.dijitTitlePaneContentOuter {background: #fff; border: 1px solid #d0d0d0; border-top: none; border-radius: 0 0 2px 2px;}.dijitTitlePaneContentInner {padding: 8px;}.dijitTitlePaneTextNode {margin-left: 8px; margin-right: 8px; vertical-align: text-top;}.dijitTitlePaneRtl .dijitTitlePaneTitle {text-align: right;}.dijitToolbar {background: #f5f5f5; padding: 3px; zoom: 1;}.dijitToolbar label {padding: 8px;}.dijitToolbar .dijitToggleButton,.dijitToolbar .dijitButton,.dijitToolbar .dijitDropDownButton,.dijitToolbar .dijitComboButton {margin-right: 4px;}.dijitToolbar .dijitButton .dijitButtonNode,.dijitToolbar .dijitDropDownButton .dijitButtonNode,.dijitToolbar .dijitComboButton .dijitButtonNode,.dijitToolbar .dijitToggleButton .dijitButtonNode,.dijitToolbar .dijitComboBox .dijitButtonNode {border: 1px solid transparent; padding: 0px; background: transparent; border-radius: 2px; box-shadow: none; transition-property: background-color; transition-duration: 0.3s;}.dijitToolbar .dijitComboButton .dijitStretch {border-radius: 2px 0 0 2px;}.dijitToolbar .dijitComboButton .dijitArrowButton {border-radius: 0 2px 2px 0;}.dijitToolbar .dijitComboBox .dijitButtonNode {padding: 0 8px;}.dijitToolbar .dijitComboBox .dijitInputInner {padding: 0;}.dijitToolbar .dijitDropDownButton .dijitArrowButtonInner {margin-left: 4px;}.dijitToolbar .dijitButtonHover .dijitButtonNode,.dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,.dijitToolbar .dijitToggleButtonHover .dijitButtonNode,.dijitToolbar .dijitComboButtonHover .dijitButtonNode {box-shadow: 0 1px 1px rgba(0,0,0,0.2); transition: all 0.1s; background: #e1e1e1; background: linear-gradient(#f6f6f6, #e1e1e1); border: 1px solid #d0d0d0;}.dijitToolbar .dijitButtonActive .dijitButtonNode,.dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,.dijitToolbar .dijitToggleButtonActive .dijitButtonNode {box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; transition: none; outline: none; background: #d0d0d0; background: linear-gradient(#f5f5f5, #f5f5f5); border: 1px solid #d0d0d0;}.dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {box-shadow: 0 1px 3px rgba(0,0,0,0.25) inset; transition: none; outline: none; background: #d0d0d0; background: linear-gradient(#f5f5f5, #f5f5f5); border: 1px solid #d0d0d0;}.dijitToolbarSeparator {width: 1px; height: 20px; background: #d0d0d0; padding: 0; margin: 0 4px;}.dijitDisabled .dijitToolbar {background: $disabled-background-color; border-bottom: 1px solid #d0d0d0;}.dijitToolbar .dijitToggleButtonRtl,.dijitToolbar .dijitButtonRtl,.dijitToolbar .dijitDropDownButtonRtl,.dijitToolbar .dijitComboButtonRtl {margin-left: 4px; margin-right: auto;}.dijitToolbar .dijitDropDownButtonRtl .dijitArrowButtonInner {margin-left: auto; margin-right: 4px;}.dijitTreeIsRoot {background: transparent;}.dijitTreeRow,.dijitTreeNode .dojoDndItemBefore,.dijitTreeNode .dojoDndItemAfter {padding: 0px 0; border: 0 none; line-height: 20px; transition-property: background-color, border-color; transition-duration: 0.15s; transition-timing-function: ease-out;}.dijitTreeRowHover {background: #f5f5f5; border: 0 none; transition-duration: 0.15s;}.dijitTreeRowActive {background: #f5f5f5; border: 0 none;}.dijitTreeRowSelected,.dijitTreeRowHover.dijitTreeRowSelected,.dijitTreeRowActive.dijitTreeRowSelected {color: #fff; background: #007ac2; border: 0 none;}.dijitTreeExpando {font-family: FontAwesome; width: 16px; height: 16px; line-height: 16px; font-size: 12px; text-align: center; margin-left: 4px; margin-right: 4px;}.dijitTreeExpandoOpened:before {content: "\f078"; cursor: pointer;}.dijitTreeExpandoClosed:before {content: "\f054"; cursor: pointer;}.dijitTreeExpandoLoading:before {content: "\f021"; animation: spinning 2s linear infinite;}.dj_ie8 .dijitTreeExpandoLoading,.dj_ie9 .dijitTreeExpandoLoading {background: url("images/loadingAnimation.gif") no-repeat;}.dj_ie8 .dijitTreeExpandoLoading:before,.dj_ie9 .dijitTreeExpandoLoading:before {content: "";}@-moz-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@-webkit-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@-o-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@-ms-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}.dijitIconSave,.dijitIconPrint,.dijitIconCut,.dijitIconCopy,.dijitIconClear,.dijitIconDelete,.dijitIconUndo,.dijitIconEdit,.dijitIconNewTask,.dijitIconEditTask,.dijitIconEditProperty,.dijitIconTask,.dijitIconFilter,.dijitIconConfigure,.dijitIconSearch,.dijitIconApplication,.dijitIconBookmark,.dijitIconChart,.dijitIconConnector,.dijitIconDatabase,.dijitIconDocuments,.dijitIconMail,.dijitLeaf,.dijitIconFile,.dijitIconFunction,.dijitIconKey,.dijitIconPackage,.dijitIconSample,.dijitIconTable,.dijitIconUsers,.dijitFolderClosed,.dijitIconFolderClosed,.dijitFolderOpened,.dijitIconFolderOpen,.dijitIconError,.dijitIconLoading {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; width: 16px; height: 16px; line-height: 16px;}.dijitIconSave:before {content: "\f0c7";}.dijitIconPrint:before {content: "\f02f";}.dijitIconCut:before {content: "\f0c4";}.dijitIconCopy:before {content: "\f0c5";}.dijitIconClear:before {content: "\f12d";}.dijitIconDelete:before {content: "\f00d";}.dijitIconUndo:before {content: "\f0e2";}.dijitIconEdit:before {content: "\f044";}.dijitIconNewTask:before {content: "\f067";}.dijitIconEditTask:before {content: "\f044";}.dijitIconEditProperty:before {content: "\f044";}.dijitIconTask:before {content: "\f0f6";}.dijitIconFilter:before {content: "\f0b0";}.dijitIconConfigure:before {content: "\f013";}.dijitIconSearch:before {content: "\f002";}.dijitIconError:before {content: "\f06a";}.dijitIconApplication:before {content: "\f022";}.dijitIconBookmark:before {content: "\f02e";}.dijitIconChart:before {content: "\f080";}.dijitIconConnector:before {content: "\f0c1";}.dijitIconDatabase:before {content: "\f1c0";}.dijitIconDocuments:before {content: "\f02d";}.dijitIconMail:before {content: "\f003";}.dijitIconFile:before,.dijitLeaf:before {content: "\f15c";}.dijitIconFunction:before {content: "\f085";}.dijitIconKey:before {content: "\f084";}.dijitIconPackage:before {content: "\f1b2";}.dijitIconSample:before {content: "\f1b3";}.dijitIconTable:before {content: "\f0ce";}.dijitIconUsers:before {content: "\f0c0";}.dijitIconFolderClosed:before,.dijitFolderClosed:before {content: "\f07b";}.dijitIconFolderOpen:before,.dijitFolderOpened:before {content: "\f07c";}.dijitIconLoading:before {content: "\f021"; animation: spinning 2s linear infinite;}.dj_ie8 .dijitIconLoading,.dj_ie9 .dijitIconLoading {background: url("icons/images/loadingAnimation_rtl.gif") no-repeat; height: 20px; width: 20px;}.dj_ie8 .dijitIconLoading:before,.dj_ie9 .dijitIconLoading:before {content: "";}@-moz-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@-webkit-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@-o-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@-ms-keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}@keyframes spinning {0% {transform: rotate(0);} 100% {transform: rotate(360deg);}}.dijitEditorIcon {font-family: FontAwesome; font-style: normal; font-weight: normal; font-size: 14px; text-decoration: inherit; vertical-align: bottom; width: 18px; height: 18px; line-height: 18px; text-align: center;}.dijitEditorIconSave:before {content: "\f0c7";}.dijitEditorIconPrint:before {content: "\f02f";}.dijitEditorIconCut:before {content: "\f0c4";}.dijitEditorIconCopy:before {content: "\f0c5";}.dijitEditorIconPaste:before {content: "\f0ea";}.dijitEditorIconDelete:before {content: "\f00d";}.dijitEditorIconCancel:before {content: "\f00d";}.dijitEditorIconUndo:before {content: "\f0e2";}.dijitEditorIconRedo:before {content: "\f01e";}.dijitEditorIconSelectAll:before {content: "\f15c";}.dijitEditorIconBold:before {content: "\f032";}.dijitEditorIconItalic:before {content: "\f033";}.dijitEditorIconUnderline:before {content: "\f0cd";}.dijitEditorIconStrikethrough:before {content: "\f0cc";}.dijitEditorIconSuperscript:before {content: "\f12b";}.dijitEditorIconSubscript:before {content: "\f12c";}.dijitEditorIconJustifyCenter:before {content: "\f037";}.dijitEditorIconJustifyFull:before {content: "\f039";}.dijitEditorIconJustifyLeft:before {content: "\f036";}.dijitEditorIconJustifyRight:before {content: "\f038";}.dijitEditorIconIndent:before {content: "\f03c";}.dijitEditorIconOutdent:before {content: "\f03b";}.dijitEditorIconListBulletIndent:before {content: "\f03c";}.dijitEditorIconListBulletOutdent:before {content: "\f03b";}.dijitEditorIconListNumIndent:before {content: "\f03c";}.dijitEditorIconListNumOutdent:before {content: "\f03b";}.dijitEditorIconTabIndent:before {content: "\f061";}.dijitEditorIconLeftToRight:before {content: "\f0ec";}.dijitEditorIconRightToLeft:before,.dijitEditorIconToggleDir:before {content: "\f0ec";}.dijitEditorIconBackColor:before {content: "\f009";}.dijitEditorIconForeColor:before {content: "\f031";}.dijitEditorIconHiliteColor:before {content: "\f00a";}.dijitEditorIconNewPage:before {content: "\f016";}.dijitEditorIconInsertImage:before {content: "\f03e";}.dijitEditorIconInsertTable:before {content: "\f0ce";}.dijitEditorIconInsertHorizontalRule:before {content: "\f068";}.dijitEditorIconInsertOrderedList:before {content: "\f0cb";}.dijitEditorIconInsertUnorderedList:before {content: "\f0ca";}.dijitEditorIconCreateLink:before {content: "\f0c1";}.dijitEditorIconUnlink:before {content: "\f127";}.dijitEditorIconViewSource:before {content: "\f121";}.dijitEditorIconRemoveFormat:before {content: "\f12d";}.dijitEditorIconFullScreen:before {content: "\f0b2";}.dijitEditorIconWikiword:before {content: "\f044";}.dijitRtl .dijitEditorIconUndo:before {content: "\f01e";}.dijitRtl .dijitEditorIconRedo:before {content: "\f0e2";}.dijitRtl .dijitEditorIconTabIndent:before {content: "\f060";}.dijitRtl .dijitPlaceHolder {left: auto; right: 0;}.dijitMenuItemRtl {text-align: right;}.dijitTextBoxRtl .dijitValidationContainer,.dijitTextBoxRtl .dijitSpinnerButtonContainer,.dijitComboBoxRtl .dijitArrowButtonContainer {border-right-width: 1px !important; border-left-width: 0 !important;}.dijitComboBoxRtl .dijitArrowButtonContainer {border-radius: 2px 0 0 2px;}.dijitDropDownButtonRtl .dijitArrowButtonInner {margin-left: auto; margin-right: 12px;}.dijitSelectRtl .dijitButtonText {float: right; padding: 0 12px 0 0;}.dijitSelectRtl .dijitButtonContents {border-style: none none none solid; text-align: right;}.dijitTextBoxRtl .dijitSpinnerButtonContainer,.dijitValidationTextBoxRtl .dijitValidationContainer,.dijitTextBoxRtl .dijitArrowButtonContainer {float: left;}div.dijitNumberTextBoxRtl {text-align: right;}.dijitSpinnerRtl .dijitSpinnerButtonContainer .dijitArrowButton {right: 0; left: auto;}.dijitRtl .dijitContentPaneLoading .dijitIconLoading,.dijitRtl .dijitContentPaneError .dijitIconError {margin-right: 0; margin-left: 9px;}.dijitTabControllerRtl,.dijitTabControllerRtl .nowrapTabStrip {text-align: right;}.dijitTabRtl .dijitTabCloseButton {margin-left: 0; margin-right: 4px;}.dijitColorPaletteRtl .dijitColorPaletteUnder {left: auto; right: 0;}.dijitTreeRtl {text-align: right;}.dijitTreeRtl .dijitTreeContainer {float: right;}.dijitRtl .dojoDndHorizontal .dojoDndItemBefore {border-width: 0 2px 0 0; padding: 2px 0 2px 2px;}.dijitRtl .dojoDndHorizontal .dojoDndItemAfter {border-width: 0 0 0 2px; padding: 2px 2px 2px 0;}.dijitTextBoxRtlError .dijitValidationContainer {border-left-width: 0; border-right-width: 1px;}.sbVerticalCenter {position:relative; display:table-cell; vertical-align:middle; top:0px; left:0px;}.sbNoSelect {-webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}.sbTextBorder {border: 1px solid #d0d0d0; padding: 5px;}.sbTreeBorder,.sbWebBorder,.sbCanvasBorder,.sbContainerBorder,.sbScrollAreaBorder,.sbImageBorder,.sbFrameBorder {border: 1px solid #d0d0d0;}.sbContainerBorderSingle {border: 1px inset #d0d0d0;}.sbContainerBorderRaised {border: 1px outset #d0d0d0;}.sbContainerBorderDouble {border: 2px inset #d0d0d0;} \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/css/font-awesome.min.css b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/css/font-awesome.min.css new file mode 100644 index 0000000..5b98891 --- /dev/null +++ b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/css/font-awesome.min.css @@ -0,0 +1 @@ +@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"} \ No newline at end of file diff --git a/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/FontAwesome.otf b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/FontAwesome.otf new file mode 100644 index 0000000..3ed7f8b Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/FontAwesome.otf differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.eot b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..9b6afae Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.eot differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.ttf b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..26dea79 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.ttf differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.woff b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..dc35ce3 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.woff differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2 b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..500e517 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2 differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/images/images/loadingAnimation.gif b/Server/www/spiderbasic/dojo/themes/flat/images/images/loadingAnimation.gif new file mode 100644 index 0000000..d76e4cd Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/images/images/loadingAnimation.gif differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/images/images/progressBarStrips.png b/Server/www/spiderbasic/dojo/themes/flat/images/images/progressBarStrips.png new file mode 100644 index 0000000..c6d8c41 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/images/images/progressBarStrips.png differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/images/loadingAnimation.gif b/Server/www/spiderbasic/dojo/themes/flat/images/loadingAnimation.gif new file mode 100644 index 0000000..d76e4cd Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/images/loadingAnimation.gif differ diff --git a/Server/www/spiderbasic/dojo/themes/flat/images/progressBarStrips.png b/Server/www/spiderbasic/dojo/themes/flat/images/progressBarStrips.png new file mode 100644 index 0000000..c6d8c41 Binary files /dev/null and b/Server/www/spiderbasic/dojo/themes/flat/images/progressBarStrips.png differ diff --git a/Server/www/spiderbasic/dojo/util/touch.js b/Server/www/spiderbasic/dojo/util/touch.js new file mode 100644 index 0000000..142c2f0 --- /dev/null +++ b/Server/www/spiderbasic/dojo/util/touch.js @@ -0,0 +1,141 @@ +define([ + 'dojo/on', + 'dojo/query' +], function (on, query) { + // This module exposes useful functions for working with touch devices. + + var util = { + // Overridable defaults related to extension events defined below. + tapRadius: 10, + dbltapTime: 250, + + selector: function (selector, eventType, children) { + // summary: + // Reimplementation of on.selector, taking an iOS quirk into account + return function (target, listener) { + var bubble = eventType.bubble; + if (bubble) { + // the event type doesn't naturally bubble, but has a bubbling form, use that + eventType = bubble; + } + else if (children !== false) { + // for normal bubbling events we default to allowing children of the selector + children = true; + } + return on(target, eventType, function (event) { + var eventTarget = event.target; + + // iOS tends to report the text node an event was fired on, rather than + // the top-level element; this may end up causing errors in selector engines + if (eventTarget.nodeType === 3) { + eventTarget = eventTarget.parentNode; + } + + // there is a selector, so make sure it matches + while (!query.matches(eventTarget, selector, target)) { + if (eventTarget === target || !children || !(eventTarget = eventTarget.parentNode)) { + return; + } + } + return listener.call(eventTarget, event); + }); + }; + }, + + countCurrentTouches: function (evt, node) { + // summary: + // Given a touch event and a DOM node, counts how many current touches + // presently lie within that node. Useful in cases where an accurate + // count is needed but tracking changedTouches won't suffice because + // other handlers stop events from bubbling high enough. + + if (!('touches' in evt)) { + // Not a touch event (perhaps called from a mouse event on a + // platform supporting touch events) + return -1; + } + + var i, numTouches, touch; + for (i = 0, numTouches = 0; (touch = evt.touches[i]); ++i) { + if (node.contains(touch.target)) { + ++numTouches; + } + } + return numTouches; + } + }; + + function handleTapStart(target, listener, evt, prevent) { + // Common function for handling tap detection. + // The passed listener will only be fired when and if a touchend is fired + // which confirms the overall gesture resembled a tap. + + if (evt.targetTouches.length > 1) { + return; // ignore multitouch + } + + var start = evt.changedTouches[0], + startX = start.screenX, + startY = start.screenY; + + prevent && evt.preventDefault(); + + var endListener = on(target, 'touchend', function (evt) { + var end = evt.changedTouches[0]; + if (!evt.targetTouches.length) { + // only call listener if this really seems like a tap + if (Math.abs(end.screenX - startX) < util.tapRadius && + Math.abs(end.screenY - startY) < util.tapRadius) { + prevent && evt.preventDefault(); + listener.call(this, evt); + } + endListener.remove(); + } + }); + } + + function tap(target, listener) { + // Function usable by dojo/on as a synthetic tap event. + return on(target, 'touchstart', function (evt) { + handleTapStart(target, listener, evt); + }); + } + + function dbltap(target, listener) { + // Function usable by dojo/on as a synthetic double-tap event. + var first, timeout; + + return on(target, 'touchstart', function (evt) { + if (!first) { + // first potential tap: detect as usual, but with specific logic + handleTapStart(target, function (evt) { + first = evt.changedTouches[0]; + timeout = setTimeout(function () { + first = timeout = null; + }, util.dbltapTime); + }, evt); + } + else { + handleTapStart(target, function (evt) { + // bail out if first was cleared between 2nd touchstart and touchend + if (!first) { + return; + } + var second = evt.changedTouches[0]; + // only call listener if both taps occurred near the same place + if (Math.abs(second.screenX - first.screenX) < util.tapRadius && + Math.abs(second.screenY - first.screenY) < util.tapRadius) { + timeout && clearTimeout(timeout); + first = timeout = null; + listener.call(this, evt); + } + }, evt, true); + } + }); + } + + util.tap = tap; + util.dbltap = dbltap; + + return util; +}); \ No newline at end of file diff --git a/Server/www/spiderbasic/filesaver.min.js b/Server/www/spiderbasic/filesaver.min.js new file mode 100644 index 0000000..fc16a27 --- /dev/null +++ b/Server/www/spiderbasic/filesaver.min.js @@ -0,0 +1,7 @@ +var saveAs=saveAs||function(c){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var n=function(){return c.URL||c.webkitURL||c},m=c.document.createElementNS("http://www.w3.org/1999/xhtml","a"),z="download"in m,u=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),p=c.webkitRequestFileSystem,v=c.requestFileSystem||p||c.mozRequestFileSystem,A=function(a){(c.setImmediate||c.setTimeout)(function(){throw a;},0)},q=0,r=function(a){var e=function(){"string"===typeof a?n().revokeObjectURL(a): +a.remove()};c.chrome?e():setTimeout(e,500)},s=function(a,e,c){e=[].concat(e);for(var d=e.length;d--;){var b=a["on"+e[d]];if("function"===typeof b)try{b.call(a,c||a)}catch(f){A(f)}}},w=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},l=function(a,e,b){b||(a=w(a));var d=this;b=a.type;var l=!1,f,h,t=function(){s(d,["writestart","progress","write","writeend"])},g=function(){if(h&&u&&"undefined"!==typeof FileReader){var b= +new FileReader;b.onloadend=function(){var a=b.result;h.location.href="data:attachment/file"+a.slice(a.search(/[,;]/));d.readyState=d.DONE;t()};b.readAsDataURL(a);d.readyState=d.INIT}else{if(l||!f)f=n().createObjectURL(a);h?h.location.href=f:void 0==c.open(f,"_blank")&&u&&(c.location.href=f);d.readyState=d.DONE;t();r(f)}},k=function(a){return function(){if(d.readyState!==d.DONE)return a.apply(this,arguments)}},x={create:!0,exclusive:!1},y;d.readyState=d.INIT;e||(e="download");if(z)f=n().createObjectURL(a), +setTimeout(function(){m.href=f;m.download=e;var a=new MouseEvent("click");m.dispatchEvent(a);t();r(f);d.readyState=d.DONE});else{c.chrome&&b&&"application/octet-stream"!==b&&(y=a.slice||a.webkitSlice,a=y.call(a,0,a.size,"application/octet-stream"),l=!0);p&&"download"!==e&&(e+=".download");if("application/octet-stream"===b||p)h=c;v?(q+=a.size,v(c.TEMPORARY,q,k(function(b){b.root.getDirectory("saved",x,k(function(b){var c=function(){b.getFile(e,x,k(function(b){b.createWriter(k(function(c){c.onwriteend= +function(a){h.location.href=b.toURL();d.readyState=d.DONE;s(d,"writeend",a);r(b)};c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&g()};["writestart","progress","write","abort"].forEach(function(a){c["on"+a]=d["on"+a]});c.write(a);d.abort=function(){c.abort();d.readyState=d.DONE};d.readyState=d.WRITING}),g)}),g)};b.getFile(e,{create:!1},k(function(a){a.remove();c()}),k(function(a){a.code===a.NOT_FOUND_ERR?c():g()}))}),g)}),g)):g()}},b=l.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a, +b,c){c||(a=w(a));return navigator.msSaveOrOpenBlob(a,b||"download")};b.abort=function(){this.readyState=this.DONE;s(this,"abort")};b.readyState=b.INIT=0;b.WRITING=1;b.DONE=2;b.error=b.onwritestart=b.onprogress=b.onwrite=b.onabort=b.onerror=b.onwriteend=null;return function(a,b,c){return new l(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content); +"undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}); diff --git a/Server/www/spiderbasic/forge/aes.js b/Server/www/spiderbasic/forge/aes.js new file mode 100644 index 0000000..bd99bc2 --- /dev/null +++ b/Server/www/spiderbasic/forge/aes.js @@ -0,0 +1,967 @@ +/** + * Advanced Encryption Standard (AES) implementation. + * + * This implementation is based on the public domain library 'jscrypto' which + * was written by: + * + * Emily Stark (estark@stanford.edu) + * Mike Hamburg (mhamburg@stanford.edu) + * Dan Boneh (dabo@cs.stanford.edu) + * + * Parts of this code are based on the OpenSSL implementation of AES: + * http://www.openssl.org + * + * @author Dave Longley + * + * Copyright (c) 2010-2014 Digital Bazaar, Inc. + */ +(function() { +/* ########## Begin module implementation ########## */ +function initModule(forge) { + +/* AES API */ +forge.aes = forge.aes || {}; + +var ByteBuffer = forge.util.ByteBuffer; + +/** + * Creates a new AES cipher algorithm object. + * + * @param name the name of the algorithm. + * @param mode the mode factory function. + * + * @return the AES algorithm object. + */ +forge.aes.Algorithm = function(name, mode) { + if(!init) { + initialize(); + } + var self = this; + self.name = name; + self.mode = new mode({ + blockSize: 16, + cipher: { + encrypt: function(inBlock, outBlock) { + return _updateBlock(self._w, inBlock, outBlock, false); + }, + decrypt: function(inBlock, outBlock) { + return _updateBlock(self._w, inBlock, outBlock, true); + } + } + }); + self._init = false; +}; + +/** + * Initializes this AES algorithm by expanding its key. + * + * @param options the options to use. + * key the key, as a ByteBuffer, to use with this algorithm. + * decrypt true if the algorithm should be initialized for decryption, + * false for encryption. + */ +forge.aes.Algorithm.prototype.initialize = function(options) { + if(this._init) { + return; + } + + if(!(options.key instanceof ByteBuffer)) { + throw new TypeError('options.key must be a ByteBuffer.'); + } + + // convert key into 32-bit integer array + var key = []; + + // key lengths of 16, 24, 32 bytes allowed + var len = options.key.length(); + if(len !== 16 && len !== 24 && len !== 32) { + throw new Error( + 'options.key length must be 16 (AES-128), 24 (AES-192), ' + + 'or 32 (AES-256) bytes, got ' + len + ' bytes.'); + } + var buf = options.key.copy(); + len = len >>> 2; + for(var i = 0; i < len; ++i) { + key.push(buf.getInt32()); + } + + // encryption operation is always used for these modes + var mode = this.mode.name; + var encryptOp = (['CFB', 'OFB', 'CTR', 'GCM'].indexOf(mode) !== -1); + + // do key expansion + this._w = _expandKey(key, options.decrypt && !encryptOp); + this._init = true; +}; + +/** + * Expands a key. Typically only used for testing. + * + * @param key the symmetric key to expand, as an array of 32-bit words. + * @param decrypt true to expand for decryption, false for encryption. + * + * @return the expanded key. + */ +forge.aes._expandKey = function(key, decrypt) { + if(!init) { + initialize(); + } + return _expandKey(key, decrypt); +}; + +/** + * Updates a single block. Typically only used for testing. + * + * @param w the expanded key to use. + * @param input an array of block-size 32-bit words. + * @param output an array of block-size 32-bit words. + * @param decrypt true to decrypt, false to encrypt. + */ +forge.aes._updateBlock = _updateBlock; + + +/** Register AES algorithms **/ + +registerAlgorithm('AES-CBC', forge.cipher.modes.cbc); +registerAlgorithm('AES-CFB', forge.cipher.modes.cfb); +registerAlgorithm('AES-OFB', forge.cipher.modes.ofb); +registerAlgorithm('AES-CTR', forge.cipher.modes.ctr); +registerAlgorithm('AES-GCM', forge.cipher.modes.gcm); + +function registerAlgorithm(name, mode) { + var factory = function() { + return new forge.aes.Algorithm(name, mode); + }; + forge.cipher.registerAlgorithm(name, factory); +} + + +/** AES implementation **/ + +var init = false; // not yet initialized +var Nb = 4; // number of words comprising the state (AES = 4) +var sbox; // non-linear substitution table used in key expansion +var isbox; // inversion of sbox +var rcon; // round constant word array +var mix; // mix-columns table +var imix; // inverse mix-columns table + +/** + * Performs initialization, ie: precomputes tables to optimize for speed. + * + * One way to understand how AES works is to imagine that 'addition' and + * 'multiplication' are interfaces that require certain mathematical + * properties to hold true (ie: they are associative) but they might have + * different implementations and produce different kinds of results ... + * provided that their mathematical properties remain true. AES defines + * its own methods of addition and multiplication but keeps some important + * properties the same, ie: associativity and distributivity. The + * explanation below tries to shed some light on how AES defines addition + * and multiplication of bytes and 32-bit words in order to perform its + * encryption and decryption algorithms. + * + * The basics: + * + * The AES algorithm views bytes as binary representations of polynomials + * that have either 1 or 0 as the coefficients. It defines the addition + * or subtraction of two bytes as the XOR operation. It also defines the + * multiplication of two bytes as a finite field referred to as GF(2^8) + * (Note: 'GF' means "Galois Field" which is a field that contains a finite + * number of elements so GF(2^8) has 256 elements). + * + * This means that any two bytes can be represented as binary polynomials; + * when they multiplied together and modularly reduced by an irreducible + * polynomial of the 8th degree, the results are the field GF(2^8). The + * specific irreducible polynomial that AES uses in hexadecimal is 0x11b. + * This multiplication is associative with 0x01 as the identity: + * + * (b * 0x01 = GF(b, 0x01) = b). + * + * The operation GF(b, 0x02) can be performed at the byte level by left + * shifting b once and then XOR'ing it (to perform the modular reduction) + * with 0x11b if b is >= 128. Repeated application of the multiplication + * of 0x02 can be used to implement the multiplication of any two bytes. + * + * For instance, multiplying 0x57 and 0x13, denoted as GF(0x57, 0x13), can + * be performed by factoring 0x13 into 0x01, 0x02, and 0x10. Then these + * factors can each be multiplied by 0x57 and then added together. To do + * the multiplication, values for 0x57 multiplied by each of these 3 factors + * can be precomputed and stored in a table. To add them, the values from + * the table are XOR'd together. + * + * AES also defines addition and multiplication of words, that is 4-byte + * numbers represented as polynomials of 3 degrees where the coefficients + * are the values of the bytes. + * + * The word [a0, a1, a2, a3] is a polynomial a3x^3 + a2x^2 + a1x + a0. + * + * Addition is performed by XOR'ing like powers of x. Multiplication + * is performed in two steps, the first is an algebriac expansion as + * you would do normally (where addition is XOR). But the result is + * a polynomial larger than 3 degrees and thus it cannot fit in a word. So + * next the result is modularly reduced by an AES-specific polynomial of + * degree 4 which will always produce a polynomial of less than 4 degrees + * such that it will fit in a word. In AES, this polynomial is x^4 + 1. + * + * The modular product of two polynomials 'a' and 'b' is thus: + * + * d(x) = d3x^3 + d2x^2 + d1x + d0 + * with + * d0 = GF(a0, b0) ^ GF(a3, b1) ^ GF(a2, b2) ^ GF(a1, b3) + * d1 = GF(a1, b0) ^ GF(a0, b1) ^ GF(a3, b2) ^ GF(a2, b3) + * d2 = GF(a2, b0) ^ GF(a1, b1) ^ GF(a0, b2) ^ GF(a3, b3) + * d3 = GF(a3, b0) ^ GF(a2, b1) ^ GF(a1, b2) ^ GF(a0, b3) + * + * As a matrix: + * + * [d0] = [a0 a3 a2 a1][b0] + * [d1] [a1 a0 a3 a2][b1] + * [d2] [a2 a1 a0 a3][b2] + * [d3] [a3 a2 a1 a0][b3] + * + * Special polynomials defined by AES (0x02 == {02}): + * a(x) = {03}x^3 + {01}x^2 + {01}x + {02} + * a^-1(x) = {0b}x^3 + {0d}x^2 + {09}x + {0e}. + * + * These polynomials are used in the MixColumns() and InverseMixColumns() + * operations, respectively, to cause each element in the state to affect + * the output (referred to as diffusing). + * + * RotWord() uses: a0 = a1 = a2 = {00} and a3 = {01}, which is the + * polynomial x3. + * + * The ShiftRows() method modifies the last 3 rows in the state (where + * the state is 4 words with 4 bytes per word) by shifting bytes cyclically. + * The 1st byte in the second row is moved to the end of the row. The 1st + * and 2nd bytes in the third row are moved to the end of the row. The 1st, + * 2nd, and 3rd bytes are moved in the fourth row. + * + * More details on how AES arithmetic works: + * + * In the polynomial representation of binary numbers, XOR performs addition + * and subtraction and multiplication in GF(2^8) denoted as GF(a, b) + * corresponds with the multiplication of polynomials modulo an irreducible + * polynomial of degree 8. In other words, for AES, GF(a, b) will multiply + * polynomial 'a' with polynomial 'b' and then do a modular reduction by + * an AES-specific irreducible polynomial of degree 8. + * + * A polynomial is irreducible if its only divisors are one and itself. For + * the AES algorithm, this irreducible polynomial is: + * + * m(x) = x^8 + x^4 + x^3 + x + 1, + * + * or {01}{1b} in hexadecimal notation, where each coefficient is a bit: + * 100011011 = 283 = 0x11b. + * + * For example, GF(0x57, 0x83) = 0xc1 because + * + * 0x57 = 87 = 01010111 = x^6 + x^4 + x^2 + x + 1 + * 0x85 = 131 = 10000101 = x^7 + x + 1 + * + * (x^6 + x^4 + x^2 + x + 1) * (x^7 + x + 1) + * = x^13 + x^11 + x^9 + x^8 + x^7 + + * x^7 + x^5 + x^3 + x^2 + x + + * x^6 + x^4 + x^2 + x + 1 + * = x^13 + x^11 + x^9 + x^8 + x^6 + x^5 + x^4 + x^3 + 1 = y + * y modulo (x^8 + x^4 + x^3 + x + 1) + * = x^7 + x^6 + 1. + * + * The modular reduction by m(x) guarantees the result will be a binary + * polynomial of less than degree 8, so that it can fit in a byte. + * + * The operation to multiply a binary polynomial b with x (the polynomial + * x in binary representation is 00000010) is: + * + * b_7x^8 + b_6x^7 + b_5x^6 + b_4x^5 + b_3x^4 + b_2x^3 + b_1x^2 + b_0x^1 + * + * To get GF(b, x) we must reduce that by m(x). If b_7 is 0 (that is the + * most significant bit is 0 in b) then the result is already reduced. If + * it is 1, then we can reduce it by subtracting m(x) via an XOR. + * + * It follows that multiplication by x (00000010 or 0x02) can be implemented + * by performing a left shift followed by a conditional bitwise XOR with + * 0x1b. This operation on bytes is denoted by xtime(). Multiplication by + * higher powers of x can be implemented by repeated application of xtime(). + * + * By adding intermediate results, multiplication by any constant can be + * implemented. For instance: + * + * GF(0x57, 0x13) = 0xfe because: + * + * xtime(b) = (b & 128) ? (b << 1 ^ 0x11b) : (b << 1) + * + * Note: We XOR with 0x11b instead of 0x1b because in javascript our + * datatype for b can be larger than 1 byte, so a left shift will not + * automatically eliminate bits that overflow a byte ... by XOR'ing the + * overflow bit with 1 (the extra one from 0x11b) we zero it out. + * + * GF(0x57, 0x02) = xtime(0x57) = 0xae + * GF(0x57, 0x04) = xtime(0xae) = 0x47 + * GF(0x57, 0x08) = xtime(0x47) = 0x8e + * GF(0x57, 0x10) = xtime(0x8e) = 0x07 + * + * GF(0x57, 0x13) = GF(0x57, (0x01 ^ 0x02 ^ 0x10)) + * + * And by the distributive property (since XOR is addition and GF() is + * multiplication): + * + * = GF(0x57, 0x01) ^ GF(0x57, 0x02) ^ GF(0x57, 0x10) + * = 0x57 ^ 0xae ^ 0x07 + * = 0xfe. + */ +function initialize() { + init = true; + + /* Populate the Rcon table. These are the values given by + [x^(i-1),{00},{00},{00}] where x^(i-1) are powers of x (and x = 0x02) + in the field of GF(2^8), where i starts at 1. + + rcon[0] = [0x00, 0x00, 0x00, 0x00] + rcon[1] = [0x01, 0x00, 0x00, 0x00] 2^(1-1) = 2^0 = 1 + rcon[2] = [0x02, 0x00, 0x00, 0x00] 2^(2-1) = 2^1 = 2 + ... + rcon[9] = [0x1B, 0x00, 0x00, 0x00] 2^(9-1) = 2^8 = 0x1B + rcon[10] = [0x36, 0x00, 0x00, 0x00] 2^(10-1) = 2^9 = 0x36 + + We only store the first byte because it is the only one used. + */ + rcon = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36]; + + // compute xtime table which maps i onto GF(i, 0x02) + var xtime = new Array(256); + for(var i = 0; i < 128; ++i) { + xtime[i] = i << 1; + xtime[i + 128] = (i + 128) << 1 ^ 0x11B; + } + + // compute all other tables + sbox = new Array(256); + isbox = new Array(256); + mix = new Array(4); + imix = new Array(4); + for(var i = 0; i < 4; ++i) { + mix[i] = new Array(256); + imix[i] = new Array(256); + } + var e = 0, ei = 0, e2, e4, e8, sx, sx2, me, ime; + for(var i = 0; i < 256; ++i) { + /* We need to generate the SubBytes() sbox and isbox tables so that + we can perform byte substitutions. This requires us to traverse + all of the elements in GF, find their multiplicative inverses, + and apply to each the following affine transformation: + + bi' = bi ^ b(i + 4) mod 8 ^ b(i + 5) mod 8 ^ b(i + 6) mod 8 ^ + b(i + 7) mod 8 ^ ci + for 0 <= i < 8, where bi is the ith bit of the byte, and ci is the + ith bit of a byte c with the value {63} or {01100011}. + + It is possible to traverse every possible value in a Galois field + using what is referred to as a 'generator'. There are many + generators (128 out of 256): 3,5,6,9,11,82 to name a few. To fully + traverse GF we iterate 255 times, multiplying by our generator + each time. + + On each iteration we can determine the multiplicative inverse for + the current element. + + Suppose there is an element in GF 'e'. For a given generator 'g', + e = g^x. The multiplicative inverse of e is g^(255 - x). It turns + out that if use the inverse of a generator as another generator + it will produce all of the corresponding multiplicative inverses + at the same time. For this reason, we choose 5 as our inverse + generator because it only requires 2 multiplies and 1 add and its + inverse, 82, requires relatively few operations as well. + + In order to apply the affine transformation, the multiplicative + inverse 'ei' of 'e' can be repeatedly XOR'd (4 times) with a + bit-cycling of 'ei'. To do this 'ei' is first stored in 's' and + 'x'. Then 's' is left shifted and the high bit of 's' is made the + low bit. The resulting value is stored in 's'. Then 'x' is XOR'd + with 's' and stored in 'x'. On each subsequent iteration the same + operation is performed. When 4 iterations are complete, 'x' is + XOR'd with 'c' (0x63) and the transformed value is stored in 'x'. + For example: + + s = 01000001 + x = 01000001 + + iteration 1: s = 10000010, x ^= s + iteration 2: s = 00000101, x ^= s + iteration 3: s = 00001010, x ^= s + iteration 4: s = 00010100, x ^= s + x ^= 0x63 + + This can be done with a loop where s = (s << 1) | (s >> 7). However, + it can also be done by using a single 16-bit (in this case 32-bit) + number 'sx'. Since XOR is an associative operation, we can set 'sx' + to 'ei' and then XOR it with 'sx' left-shifted 1,2,3, and 4 times. + The most significant bits will flow into the high 8 bit positions + and be correctly XOR'd with one another. All that remains will be + to cycle the high 8 bits by XOR'ing them all with the lower 8 bits + afterwards. + + At the same time we're populating sbox and isbox we can precompute + the multiplication we'll need to do to do MixColumns() later. + */ + + // apply affine transformation + sx = ei ^ (ei << 1) ^ (ei << 2) ^ (ei << 3) ^ (ei << 4); + sx = (sx >> 8) ^ (sx & 255) ^ 0x63; + + // update tables + sbox[e] = sx; + isbox[sx] = e; + + /* Mixing columns is done using matrix multiplication. The columns + that are to be mixed are each a single word in the current state. + The state has Nb columns (4 columns). Therefore each column is a + 4 byte word. So to mix the columns in a single column 'c' where + its rows are r0, r1, r2, and r3, we use the following matrix + multiplication: + + [2 3 1 1]*[r0,c]=[r'0,c] + [1 2 3 1] [r1,c] [r'1,c] + [1 1 2 3] [r2,c] [r'2,c] + [3 1 1 2] [r3,c] [r'3,c] + + r0, r1, r2, and r3 are each 1 byte of one of the words in the + state (a column). To do matrix multiplication for each mixed + column c' we multiply the corresponding row from the left matrix + with the corresponding column from the right matrix. In total, we + get 4 equations: + + r0,c' = 2*r0,c + 3*r1,c + 1*r2,c + 1*r3,c + r1,c' = 1*r0,c + 2*r1,c + 3*r2,c + 1*r3,c + r2,c' = 1*r0,c + 1*r1,c + 2*r2,c + 3*r3,c + r3,c' = 3*r0,c + 1*r1,c + 1*r2,c + 2*r3,c + + As usual, the multiplication is as previously defined and the + addition is XOR. In order to optimize mixing columns we can store + the multiplication results in tables. If you think of the whole + column as a word (it might help to visualize by mentally rotating + the equations above by counterclockwise 90 degrees) then you can + see that it would be useful to map the multiplications performed on + each byte (r0, r1, r2, r3) onto a word as well. For instance, we + could map 2*r0,1*r0,1*r0,3*r0 onto a word by storing 2*r0 in the + highest 8 bits and 3*r0 in the lowest 8 bits (with the other two + respectively in the middle). This means that a table can be + constructed that uses r0 as an index to the word. We can do the + same with r1, r2, and r3, creating a total of 4 tables. + + To construct a full c', we can just look up each byte of c in + their respective tables and XOR the results together. + + Also, to build each table we only have to calculate the word + for 2,1,1,3 for every byte ... which we can do on each iteration + of this loop since we will iterate over every byte. After we have + calculated 2,1,1,3 we can get the results for the other tables + by cycling the byte at the end to the beginning. For instance + we can take the result of table 2,1,1,3 and produce table 3,2,1,1 + by moving the right most byte to the left most position just like + how you can imagine the 3 moved out of 2,1,1,3 and to the front + to produce 3,2,1,1. + + There is another optimization in that the same multiples of + the current element we need in order to advance our generator + to the next iteration can be reused in performing the 2,1,1,3 + calculation. We also calculate the inverse mix column tables, + with e,9,d,b being the inverse of 2,1,1,3. + + When we're done, and we need to actually mix columns, the first + byte of each state word should be put through mix[0] (2,1,1,3), + the second through mix[1] (3,2,1,1) and so forth. Then they should + be XOR'd together to produce the fully mixed column. + */ + + // calculate mix and imix table values + sx2 = xtime[sx]; + e2 = xtime[e]; + e4 = xtime[e2]; + e8 = xtime[e4]; + me = + (sx2 << 24) ^ // 2 + (sx << 16) ^ // 1 + (sx << 8) ^ // 1 + (sx ^ sx2); // 3 + ime = + (e2 ^ e4 ^ e8) << 24 ^ // E (14) + (e ^ e8) << 16 ^ // 9 + (e ^ e4 ^ e8) << 8 ^ // D (13) + (e ^ e2 ^ e8); // B (11) + // produce each of the mix tables by rotating the 2,1,1,3 value + for(var n = 0; n < 4; ++n) { + mix[n][e] = me; + imix[n][sx] = ime; + // cycle the right most byte to the left most position + // ie: 2,1,1,3 becomes 3,2,1,1 + me = me << 24 | me >>> 8; + ime = ime << 24 | ime >>> 8; + } + + // get next element and inverse + if(e === 0) { + // 1 is the inverse of 1 + e = ei = 1; + } else { + // e = 2e + 2*2*2*(10e)) = multiply e by 82 (chosen generator) + // ei = ei + 2*2*ei = multiply ei by 5 (inverse generator) + e = e2 ^ xtime[xtime[xtime[e2 ^ e8]]]; + ei ^= xtime[xtime[ei]]; + } + } +} + +/** + * Generates a key schedule using the AES key expansion algorithm. + * + * The AES algorithm takes the Cipher Key, K, and performs a Key Expansion + * routine to generate a key schedule. The Key Expansion generates a total + * of Nb*(Nr + 1) words: the algorithm requires an initial set of Nb words, + * and each of the Nr rounds requires Nb words of key data. The resulting + * key schedule consists of a linear array of 4-byte words, denoted [wi ], + * with i in the range 0 ≤ i < Nb(Nr + 1). + * + * KeyExpansion(byte key[4*Nk], word w[Nb*(Nr+1)], Nk) + * AES-128 (Nb=4, Nk=4, Nr=10) + * AES-192 (Nb=4, Nk=6, Nr=12) + * AES-256 (Nb=4, Nk=8, Nr=14) + * Note: Nr=Nk+6. + * + * Nb is the number of columns (32-bit words) comprising the State (or + * number of bytes in a block). For AES, Nb=4. + * + * @param key the key to schedule (as an array of 32-bit words). + * @param decrypt true to modify the key schedule to decrypt, false not to. + * + * @return the generated key schedule. + */ +function _expandKey(key, decrypt) { + // copy the key's words to initialize the key schedule + var w = key.slice(0); + + /* RotWord() will rotate a word, moving the first byte to the last + byte's position (shifting the other bytes left). + + We will be getting the value of Rcon at i / Nk. 'i' will iterate + from Nk to (Nb * Nr+1). Nk = 4 (4 byte key), Nb = 4 (4 words in + a block), Nr = Nk + 6 (10). Therefore 'i' will iterate from + 4 to 44 (exclusive). Each time we iterate 4 times, i / Nk will + increase by 1. We use a counter iNk to keep track of this. + */ + + // go through the rounds expanding the key + var temp, iNk = 1; + var Nk = w.length; + var Nr1 = Nk + 6 + 1; + var end = Nb * Nr1; + for(var i = Nk; i < end; ++i) { + temp = w[i - 1]; + if(i % Nk === 0) { + // temp = SubWord(RotWord(temp)) ^ Rcon[i / Nk] + temp = + sbox[temp >>> 16 & 255] << 24 ^ + sbox[temp >>> 8 & 255] << 16 ^ + sbox[temp & 255] << 8 ^ + sbox[temp >>> 24] ^ (rcon[iNk] << 24); + iNk++; + } else if(Nk > 6 && (i % Nk === 4)) { + // temp = SubWord(temp) + temp = + sbox[temp >>> 24] << 24 ^ + sbox[temp >>> 16 & 255] << 16 ^ + sbox[temp >>> 8 & 255] << 8 ^ + sbox[temp & 255]; + } + w[i] = w[i - Nk] ^ temp; + } + + /* When we are updating a cipher block we always use the code path for + encryption whether we are decrypting or not (to shorten code and + simplify the generation of look up tables). However, because there + are differences in the decryption algorithm, other than just swapping + in different look up tables, we must transform our key schedule to + account for these changes: + + 1. The decryption algorithm gets its key rounds in reverse order. + 2. The decryption algorithm adds the round key before mixing columns + instead of afterwards. + + We don't need to modify our key schedule to handle the first case, + we can just traverse the key schedule in reverse order when decrypting. + + The second case requires a little work. + + The tables we built for performing rounds will take an input and then + perform SubBytes() and MixColumns() or, for the decrypt version, + InvSubBytes() and InvMixColumns(). But the decrypt algorithm requires + us to AddRoundKey() before InvMixColumns(). This means we'll need to + apply some transformations to the round key to inverse-mix its columns + so they'll be correct for moving AddRoundKey() to after the state has + had its columns inverse-mixed. + + To inverse-mix the columns of the state when we're decrypting we use a + lookup table that will apply InvSubBytes() and InvMixColumns() at the + same time. However, the round key's bytes are not inverse-substituted + in the decryption algorithm. To get around this problem, we can first + substitute the bytes in the round key so that when we apply the + transformation via the InvSubBytes()+InvMixColumns() table, it will + undo our substitution leaving us with the original value that we + want -- and then inverse-mix that value. + + This change will correctly alter our key schedule so that we can XOR + each round key with our already transformed decryption state. This + allows us to use the same code path as the encryption algorithm. + + We make one more change to the decryption key. Since the decryption + algorithm runs in reverse from the encryption algorithm, we reverse + the order of the round keys to avoid having to iterate over the key + schedule backwards when running the encryption algorithm later in + decryption mode. In addition to reversing the order of the round keys, + we also swap each round key's 2nd and 4th rows. See the comments + section where rounds are performed for more details about why this is + done. These changes are done inline with the other substitution + described above. + */ + if(decrypt) { + var tmp; + var m0 = imix[0]; + var m1 = imix[1]; + var m2 = imix[2]; + var m3 = imix[3]; + var wnew = w.slice(0); + end = w.length; + for(var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) { + // do not sub the first or last round key (round keys are Nb + // words) as no column mixing is performed before they are added, + // but do change the key order + if(i === 0 || i === (end - Nb)) { + wnew[i] = w[wi]; + wnew[i + 1] = w[wi + 3]; + wnew[i + 2] = w[wi + 2]; + wnew[i + 3] = w[wi + 1]; + } else { + // substitute each round key byte because the inverse-mix + // table will inverse-substitute it (effectively cancel the + // substitution because round key bytes aren't sub'd in + // decryption mode) and swap indexes 3 and 1 + for(var n = 0; n < Nb; ++n) { + tmp = w[wi + n]; + wnew[i + (3&-n)] = + m0[sbox[tmp >>> 24]] ^ + m1[sbox[tmp >>> 16 & 255]] ^ + m2[sbox[tmp >>> 8 & 255]] ^ + m3[sbox[tmp & 255]]; + } + } + } + w = wnew; + } + + return w; +} + +/** + * Updates a single block (16 bytes) using AES. The update will either + * encrypt or decrypt the block. + * + * @param w the key schedule. + * @param input the input block (an array of 32-bit words). + * @param output the updated output block. + * @param decrypt true to decrypt the block, false to encrypt it. + */ +function _updateBlock(w, input, output, decrypt) { + /* + Cipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)]) + begin + byte state[4,Nb] + state = in + AddRoundKey(state, w[0, Nb-1]) + for round = 1 step 1 to Nr–1 + SubBytes(state) + ShiftRows(state) + MixColumns(state) + AddRoundKey(state, w[round*Nb, (round+1)*Nb-1]) + end for + SubBytes(state) + ShiftRows(state) + AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + out = state + end + + InvCipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)]) + begin + byte state[4,Nb] + state = in + AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + for round = Nr-1 step -1 downto 1 + InvShiftRows(state) + InvSubBytes(state) + AddRoundKey(state, w[round*Nb, (round+1)*Nb-1]) + InvMixColumns(state) + end for + InvShiftRows(state) + InvSubBytes(state) + AddRoundKey(state, w[0, Nb-1]) + out = state + end + */ + + // Encrypt: AddRoundKey(state, w[0, Nb-1]) + // Decrypt: AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + var Nr = w.length / 4 - 1; + var m0, m1, m2, m3, sub; + if(decrypt) { + m0 = imix[0]; + m1 = imix[1]; + m2 = imix[2]; + m3 = imix[3]; + sub = isbox; + } else { + m0 = mix[0]; + m1 = mix[1]; + m2 = mix[2]; + m3 = mix[3]; + sub = sbox; + } + var a, b, c, d, a2, b2, c2; + a = input[0] ^ w[0]; + b = input[decrypt ? 3 : 1] ^ w[1]; + c = input[2] ^ w[2]; + d = input[decrypt ? 1 : 3] ^ w[3]; + var i = 3; + + /* In order to share code we follow the encryption algorithm when both + encrypting and decrypting. To account for the changes required in the + decryption algorithm, we use different lookup tables when decrypting + and use a modified key schedule to account for the difference in the + order of transformations applied when performing rounds. We also get + key rounds in reverse order (relative to encryption). */ + for(var round = 1; round < Nr; ++round) { + /* As described above, we'll be using table lookups to perform the + column mixing. Each column is stored as a word in the state (the + array 'input' has one column as a word at each index). In order to + mix a column, we perform these transformations on each row in c, + which is 1 byte in each word. The new column for c0 is c'0: + + m0 m1 m2 m3 + r0,c'0 = 2*r0,c0 + 3*r1,c0 + 1*r2,c0 + 1*r3,c0 + r1,c'0 = 1*r0,c0 + 2*r1,c0 + 3*r2,c0 + 1*r3,c0 + r2,c'0 = 1*r0,c0 + 1*r1,c0 + 2*r2,c0 + 3*r3,c0 + r3,c'0 = 3*r0,c0 + 1*r1,c0 + 1*r2,c0 + 2*r3,c0 + + So using mix tables where c0 is a word with r0 being its upper + 8 bits and r3 being its lower 8 bits: + + m0[c0 >> 24] will yield this word: [2*r0,1*r0,1*r0,3*r0] + ... + m3[c0 & 255] will yield this word: [1*r3,1*r3,3*r3,2*r3] + + Therefore to mix the columns in each word in the state we + do the following (& 255 omitted for brevity): + c'0,r0 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + c'0,r1 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + c'0,r2 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + c'0,r3 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + + However, before mixing, the algorithm requires us to perform + ShiftRows(). The ShiftRows() transformation cyclically shifts the + last 3 rows of the state over different offsets. The first row + (r = 0) is not shifted. + + s'_r,c = s_r,(c + shift(r, Nb) mod Nb + for 0 < r < 4 and 0 <= c < Nb and + shift(1, 4) = 1 + shift(2, 4) = 2 + shift(3, 4) = 3. + + This causes the first byte in r = 1 to be moved to the end of + the row, the first 2 bytes in r = 2 to be moved to the end of + the row, the first 3 bytes in r = 3 to be moved to the end of + the row: + + r1: [c0 c1 c2 c3] => [c1 c2 c3 c0] + r2: [c0 c1 c2 c3] [c2 c3 c0 c1] + r3: [c0 c1 c2 c3] [c3 c0 c1 c2] + + We can make these substitutions inline with our column mixing to + generate an updated set of equations to produce each word in the + state (note the columns have changed positions): + + c0 c1 c2 c3 => c0 c1 c2 c3 + c0 c1 c2 c3 c1 c2 c3 c0 (cycled 1 byte) + c0 c1 c2 c3 c2 c3 c0 c1 (cycled 2 bytes) + c0 c1 c2 c3 c3 c0 c1 c2 (cycled 3 bytes) + + Therefore: + + c'0 = 2*r0,c0 + 3*r1,c1 + 1*r2,c2 + 1*r3,c3 + c'0 = 1*r0,c0 + 2*r1,c1 + 3*r2,c2 + 1*r3,c3 + c'0 = 1*r0,c0 + 1*r1,c1 + 2*r2,c2 + 3*r3,c3 + c'0 = 3*r0,c0 + 1*r1,c1 + 1*r2,c2 + 2*r3,c3 + + c'1 = 2*r0,c1 + 3*r1,c2 + 1*r2,c3 + 1*r3,c0 + c'1 = 1*r0,c1 + 2*r1,c2 + 3*r2,c3 + 1*r3,c0 + c'1 = 1*r0,c1 + 1*r1,c2 + 2*r2,c3 + 3*r3,c0 + c'1 = 3*r0,c1 + 1*r1,c2 + 1*r2,c3 + 2*r3,c0 + + ... and so forth for c'2 and c'3. The important distinction is + that the columns are cycling, with c0 being used with the m0 + map when calculating c0, but c1 being used with the m0 map when + calculating c1 ... and so forth. + + When performing the inverse we transform the mirror image and + skip the bottom row, instead of the top one, and move upwards: + + c3 c2 c1 c0 => c0 c3 c2 c1 (cycled 3 bytes) *same as encryption + c3 c2 c1 c0 c1 c0 c3 c2 (cycled 2 bytes) + c3 c2 c1 c0 c2 c1 c0 c3 (cycled 1 byte) *same as encryption + c3 c2 c1 c0 c3 c2 c1 c0 + + If you compare the resulting matrices for ShiftRows()+MixColumns() + and for InvShiftRows()+InvMixColumns() the 2nd and 4th columns are + different (in encrypt mode vs. decrypt mode). So in order to use + the same code to handle both encryption and decryption, we will + need to do some mapping. + + If in encryption mode we let a=c0, b=c1, c=c2, d=c3, and r be + a row number in the state, then the resulting matrix in encryption + mode for applying the above transformations would be: + + r1: a b c d + r2: b c d a + r3: c d a b + r4: d a b c + + If we did the same in decryption mode we would get: + + r1: a d c b + r2: b a d c + r3: c b a d + r4: d c b a + + If instead we swap d and b (set b=c3 and d=c1), then we get: + + r1: a b c d + r2: d a b c + r3: c d a b + r4: b c d a + + Now the 1st and 3rd rows are the same as the encryption matrix. All + we need to do then to make the mapping exactly the same is to swap + the 2nd and 4th rows when in decryption mode. To do this without + having to do it on each iteration, we swapped the 2nd and 4th rows + in the decryption key schedule. We also have to do the swap above + when we first pull in the input and when we set the final output. */ + a2 = + m0[a >>> 24] ^ + m1[b >>> 16 & 255] ^ + m2[c >>> 8 & 255] ^ + m3[d & 255] ^ w[++i]; + b2 = + m0[b >>> 24] ^ + m1[c >>> 16 & 255] ^ + m2[d >>> 8 & 255] ^ + m3[a & 255] ^ w[++i]; + c2 = + m0[c >>> 24] ^ + m1[d >>> 16 & 255] ^ + m2[a >>> 8 & 255] ^ + m3[b & 255] ^ w[++i]; + d = + m0[d >>> 24] ^ + m1[a >>> 16 & 255] ^ + m2[b >>> 8 & 255] ^ + m3[c & 255] ^ w[++i]; + a = a2; + b = b2; + c = c2; + } + + /* + Encrypt: + SubBytes(state) + ShiftRows(state) + AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + + Decrypt: + InvShiftRows(state) + InvSubBytes(state) + AddRoundKey(state, w[0, Nb-1]) + */ + // Note: rows are shifted inline + output[0] = + (sub[a >>> 24] << 24) ^ + (sub[b >>> 16 & 255] << 16) ^ + (sub[c >>> 8 & 255] << 8) ^ + (sub[d & 255]) ^ w[++i]; + output[decrypt ? 3 : 1] = + (sub[b >>> 24] << 24) ^ + (sub[c >>> 16 & 255] << 16) ^ + (sub[d >>> 8 & 255] << 8) ^ + (sub[a & 255]) ^ w[++i]; + output[2] = + (sub[c >>> 24] << 24) ^ + (sub[d >>> 16 & 255] << 16) ^ + (sub[a >>> 8 & 255] << 8) ^ + (sub[b & 255]) ^ w[++i]; + output[decrypt ? 1 : 3] = + (sub[d >>> 24] << 24) ^ + (sub[a >>> 16 & 255] << 16) ^ + (sub[b >>> 8 & 255] << 8) ^ + (sub[c & 255]) ^ w[++i]; +} + +} // end module implementation + +/* ########## Begin module wrapper ########## */ +var name = 'aes'; +if(typeof define !== 'function') { + // NodeJS -> AMD + if(typeof module === 'object' && module.exports) { + var nodeJS = true; + define = function(ids, factory) { + factory(require, module); + }; + } else { + // "; + var nW = globalObject.open(); + if (nW !== null) { + nW.document.write(htmlForNewWindow); + } + return nW; + } else { + throw new Error("The option pdfobjectnewwindow just works in a browser-environment."); + } + case "pdfjsnewwindow": + if (Object.prototype.toString.call(globalObject) === "[object Window]") { + var pdfJsUrl = options.pdfJsUrl || "examples/PDF.js/web/viewer.html"; + var htmlForPDFjsNewWindow = "" + "" + '' + ""; + var dataURLNewWindow = globalObject.open(); + if (dataURLNewWindow !== null) { + dataURLNewWindow.document.write(htmlForDataURLNewWindow); + dataURLNewWindow.document.title = options.filename; + } + if (dataURLNewWindow || typeof safari === "undefined") return dataURLNewWindow; + } else { + throw new Error("The option dataurlnewwindow just works in a browser-environment."); + } + break; + case "datauri": + case "dataurl": + return globalObject.document.location.href = this.output("datauristring", options); + default: + return null; + } + }); + + /** + * Used to see if a supplied hotfix was requested when the pdf instance was created. + * @param {string} hotfixName - The name of the hotfix to check. + * @returns {boolean} + */ + var hasHotfix = function hasHotfix(hotfixName) { + return Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1; + }; + switch (unit) { + case "pt": + scaleFactor = 1; + break; + case "mm": + scaleFactor = 72 / 25.4; + break; + case "cm": + scaleFactor = 72 / 2.54; + break; + case "in": + scaleFactor = 72; + break; + case "px": + if (hasHotfix("px_scaling") == true) { + scaleFactor = 72 / 96; + } else { + scaleFactor = 96 / 72; + } + break; + case "pc": + scaleFactor = 12; + break; + case "em": + scaleFactor = 12; + break; + case "ex": + scaleFactor = 6; + break; + default: + if (typeof unit === "number") { + scaleFactor = unit; + } else { + throw new Error("Invalid unit: " + unit); + } + } + var encryption = null; + setCreationDate(); + setFileId(); + var getEncryptor = function getEncryptor(objectId) { + if (encryptionOptions !== null) { + return encryption.encryptor(objectId, 0); + } + return function (data) { + return data; + }; + }; + + //--------------------------------------- + // Public API + + var getPageInfo = API.__private__.getPageInfo = API.getPageInfo = function (pageNumberOneBased) { + if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) { + throw new Error("Invalid argument passed to jsPDF.getPageInfo"); + } + var objId = pagesContext[pageNumberOneBased].objId; + return { + objId: objId, + pageNumber: pageNumberOneBased, + pageContext: pagesContext[pageNumberOneBased] + }; + }; + var getPageInfoByObjId = API.__private__.getPageInfoByObjId = function (objId) { + if (isNaN(objId) || objId % 1 !== 0) { + throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId"); + } + for (var pageNumber in pagesContext) { + if (pagesContext[pageNumber].objId === objId) { + break; + } + } + return getPageInfo(pageNumber); + }; + var getCurrentPageInfo = API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function () { + return { + objId: pagesContext[currentPage].objId, + pageNumber: currentPage, + pageContext: pagesContext[currentPage] + }; + }; + + /** + * Adds (and transfers the focus to) new page to the PDF document. + * @param format {String/Array} The format of the new page. Can be:
  • a0 - a10
  • b0 - b10
  • c0 - c10
  • dl
  • letter
  • government-letter
  • legal
  • junior-legal
  • ledger
  • tabloid
  • credit-card

+ * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89] + * @param orientation {string} Orientation of the new page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l"). + * @function + * @instance + * @returns {jsPDF} + * + * @memberof jsPDF# + * @name addPage + */ + API.addPage = function () { + _addPage.apply(this, arguments); + return this; + }; + /** + * Adds (and transfers the focus to) new page to the PDF document. + * @function + * @instance + * @returns {jsPDF} + * + * @memberof jsPDF# + * @name setPage + * @param {number} page Switch the active page to the page number specified (indexed starting at 1). + * @example + * doc = jsPDF() + * doc.addPage() + * doc.addPage() + * doc.text('I am on page 3', 10, 10) + * doc.setPage(1) + * doc.text('I am on page 1', 10, 10) + */ + API.setPage = function () { + _setPage.apply(this, arguments); + setOutputDestination.call(this, pages[currentPage]); + return this; + }; + + /** + * @name insertPage + * @memberof jsPDF# + * + * @function + * @instance + * @param {Object} beforePage + * @returns {jsPDF} + */ + API.insertPage = function (beforePage) { + this.addPage(); + this.movePage(currentPage, beforePage); + return this; + }; + + /** + * @name movePage + * @memberof jsPDF# + * @function + * @instance + * @param {number} targetPage + * @param {number} beforePage + * @returns {jsPDF} + */ + API.movePage = function (targetPage, beforePage) { + var tmpPages, tmpPagesContext; + if (targetPage > beforePage) { + tmpPages = pages[targetPage]; + tmpPagesContext = pagesContext[targetPage]; + for (var i = targetPage; i > beforePage; i--) { + pages[i] = pages[i - 1]; + pagesContext[i] = pagesContext[i - 1]; + } + pages[beforePage] = tmpPages; + pagesContext[beforePage] = tmpPagesContext; + this.setPage(beforePage); + } else if (targetPage < beforePage) { + tmpPages = pages[targetPage]; + tmpPagesContext = pagesContext[targetPage]; + for (var j = targetPage; j < beforePage; j++) { + pages[j] = pages[j + 1]; + pagesContext[j] = pagesContext[j + 1]; + } + pages[beforePage] = tmpPages; + pagesContext[beforePage] = tmpPagesContext; + this.setPage(beforePage); + } + return this; + }; + + /** + * Deletes a page from the PDF. + * @name deletePage + * @memberof jsPDF# + * @function + * @param {number} targetPage + * @instance + * @returns {jsPDF} + */ + API.deletePage = function () { + _deletePage.apply(this, arguments); + return this; + }; + + /** + * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings. + * + * @function + * @instance + * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call. + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page. + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page. + * @param {Object} [options] - Collection of settings signaling how the text must be encoded. + * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify. + * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging + * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree. + * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise. + * @param {number} [options.charSpace=0] - The space between each letter. + * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size. + * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line. + * @param {Object} [options.flags] - Flags for to8bitStream. + * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text. + * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text. + * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split. + * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping. + * @param {boolean} [options.isInputVisual] - Option for the BidiEngine + * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine + * @param {boolean} [options.isInputRtl] - Option for the BidiEngine + * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine + * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine + * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y. + * + * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing + * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this + * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a + * DIFFERENT result. A matrix is only allowed in "advanced" API mode. + * @returns {jsPDF} + * @memberof jsPDF# + * @name text + */ + API.__private__.text = API.text = function (text, x, y, options, transform) { + /* + * Inserts something like this into PDF + * BT + * /F1 16 Tf % Font name + size + * 16 TL % How many units down for next line in multiline text + * 0 g % color + * 28.35 813.54 Td % position + * (line one) Tj + * T* (line two) Tj + * T* (line three) Tj + * ET + */ + options = options || {}; + var scope = options.scope || this; + var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale; + + // Pre-August-2012 the order of arguments was function(x, y, text, flags) + // in effort to make all calls have similar signature like + // function(data, coordinates... , miscellaneous) + // this method had its args flipped. + // code below allows backward compatibility with old arg order. + if (typeof text === "number" && typeof x === "number" && (typeof y === "string" || Array.isArray(y))) { + var tmp = y; + y = x; + x = text; + text = tmp; + } + var transformationMatrix; + if (arguments[3] instanceof Matrix === false) { + flags = arguments[3]; + angle = arguments[4]; + align = arguments[5]; + if (_typeof(flags) !== "object" || flags === null) { + if (typeof angle === "string") { + align = angle; + angle = null; + } + if (typeof flags === "string") { + align = flags; + flags = null; + } + if (typeof flags === "number") { + angle = flags; + flags = null; + } + options = { + flags: flags, + angle: angle, + align: align + }; + } + } else { + advancedApiModeTrap("The transform parameter of text() with a Matrix value"); + transformationMatrix = transform; + } + if (isNaN(x) || isNaN(y) || typeof text === "undefined" || text === null) { + throw new Error("Invalid arguments passed to jsPDF.text"); + } + if (text.length === 0) { + return scope; + } + var xtra = ""; + var isHex = false; + var lineHeight = typeof options.lineHeightFactor === "number" ? options.lineHeightFactor : lineHeightFactor; + var scaleFactor = scope.internal.scaleFactor; + function ESC(s) { + s = s.split("\t").join(Array(options.TabLen || 9).join(" ")); + return pdfEscape(s, flags); + } + function transformTextToSpecialArray(text) { + //we don't want to destroy original text array, so cloning it + var sa = text.concat(); + var da = []; + var len = sa.length; + var curDa; + //we do array.join('text that must not be PDFescaped") + //thus, pdfEscape each component separately + while (len--) { + curDa = sa.shift(); + if (typeof curDa === "string") { + da.push(curDa); + } else { + if (Array.isArray(text) && (curDa.length === 1 || curDa[1] === undefined && curDa[2] === undefined)) { + da.push(curDa[0]); + } else { + da.push([curDa[0], curDa[1], curDa[2]]); + } + } + } + return da; + } + function processTextByFunction(text, processingFunction) { + var result; + if (typeof text === "string") { + result = processingFunction(text)[0]; + } else if (Array.isArray(text)) { + //we don't want to destroy original text array, so cloning it + var sa = text.concat(); + var da = []; + var len = sa.length; + var curDa; + var tmpResult; + //we do array.join('text that must not be PDFescaped") + //thus, pdfEscape each component separately + while (len--) { + curDa = sa.shift(); + if (typeof curDa === "string") { + da.push(processingFunction(curDa)[0]); + } else if (Array.isArray(curDa) && typeof curDa[0] === "string") { + tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]); + da.push([tmpResult[0], tmpResult[1], tmpResult[2]]); + } + } + result = da; + } + return result; + } + + //Check if text is of type String + var textIsOfTypeString = false; + var tmpTextIsOfTypeString = true; + if (typeof text === "string") { + textIsOfTypeString = true; + } else if (Array.isArray(text)) { + //we don't want to destroy original text array, so cloning it + var sa = text.concat(); + da = []; + var len = sa.length; + var curDa; + //we do array.join('text that must not be PDFescaped") + //thus, pdfEscape each component separately + while (len--) { + curDa = sa.shift(); + if (typeof curDa !== "string" || Array.isArray(curDa) && typeof curDa[0] !== "string") { + tmpTextIsOfTypeString = false; + } + } + textIsOfTypeString = tmpTextIsOfTypeString; + } + if (textIsOfTypeString === false) { + throw new Error('Type of text must be string or Array. "' + text + '" is not recognized.'); + } + + //If there are any newlines in text, we assume + //the user wanted to print multiple lines, so break the + //text up into an array. If the text is already an array, + //we assume the user knows what they are doing. + //Convert text into an array anyway to simplify + //later code. + + if (typeof text === "string") { + if (text.match(/[\r?\n]/)) { + text = text.split(/\r\n|\r|\n/g); + } else { + text = [text]; + } + } + + //baseline + var height = activeFontSize / scope.internal.scaleFactor; + var descent = height * (lineHeight - 1); + switch (options.baseline) { + case "bottom": + y -= descent; + break; + case "top": + y += height - descent; + break; + case "hanging": + y += height - 2 * descent; + break; + case "middle": + y += height / 2 - descent; + break; + } + + //multiline + maxWidth = options.maxWidth || 0; + if (maxWidth > 0) { + if (typeof text === "string") { + text = scope.splitTextToSize(text, maxWidth); + } else if (Object.prototype.toString.call(text) === "[object Array]") { + text = text.reduce(function (acc, textLine) { + return acc.concat(scope.splitTextToSize(textLine, maxWidth)); + }, []); + } + } + + //creating Payload-Object to make text byRef + payload = { + text: text, + x: x, + y: y, + options: options, + mutex: { + pdfEscape: pdfEscape, + activeFontKey: activeFontKey, + fonts: fonts, + activeFontSize: activeFontSize + } + }; + events.publish("preProcessText", payload); + text = payload.text; + options = payload.options; + + //angle + angle = options.angle; + if (transformationMatrix instanceof Matrix === false && angle && typeof angle === "number") { + angle *= Math.PI / 180; + if (options.rotationDirection === 0) { + angle = -angle; + } + if (apiMode === ApiMode.ADVANCED) { + angle = -angle; + } + var c = Math.cos(angle); + var s = Math.sin(angle); + transformationMatrix = new Matrix(c, s, -s, c, 0, 0); + } else if (angle && angle instanceof Matrix) { + transformationMatrix = angle; + } + if (apiMode === ApiMode.ADVANCED && !transformationMatrix) { + transformationMatrix = identityMatrix; + } + + //charSpace + + charSpace = options.charSpace || activeCharSpace; + if (typeof charSpace !== "undefined") { + xtra += hpf(scale(charSpace)) + " Tc\n"; + this.setCharSpace(this.getCharSpace() || 0); + } + horizontalScale = options.horizontalScale; + if (typeof horizontalScale !== "undefined") { + xtra += hpf(horizontalScale * 100) + " Tz\n"; + } + + //lang + + options.lang; + + //renderingMode + var renderingMode = -1; + var parmRenderingMode = typeof options.renderingMode !== "undefined" ? options.renderingMode : options.stroke; + var pageContext = scope.internal.getCurrentPageInfo().pageContext; + switch (parmRenderingMode) { + case 0: + case false: + case "fill": + renderingMode = 0; + break; + case 1: + case true: + case "stroke": + renderingMode = 1; + break; + case 2: + case "fillThenStroke": + renderingMode = 2; + break; + case 3: + case "invisible": + renderingMode = 3; + break; + case 4: + case "fillAndAddForClipping": + renderingMode = 4; + break; + case 5: + case "strokeAndAddPathForClipping": + renderingMode = 5; + break; + case 6: + case "fillThenStrokeAndAddToPathForClipping": + renderingMode = 6; + break; + case 7: + case "addToPathForClipping": + renderingMode = 7; + break; + } + var usedRenderingMode = typeof pageContext.usedRenderingMode !== "undefined" ? pageContext.usedRenderingMode : -1; + + //if the coder wrote it explicitly to use a specific + //renderingMode, then use it + if (renderingMode !== -1) { + xtra += renderingMode + " Tr\n"; + //otherwise check if we used the rendering Mode already + //if so then set the rendering Mode... + } else if (usedRenderingMode !== -1) { + xtra += "0 Tr\n"; + } + if (renderingMode !== -1) { + pageContext.usedRenderingMode = renderingMode; + } + + //align + align = options.align || "left"; + var leading = activeFontSize * lineHeight; + var pageWidth = scope.internal.pageSize.getWidth(); + var activeFont = fonts[activeFontKey]; + charSpace = options.charSpace || activeCharSpace; + maxWidth = options.maxWidth || 0; + var lineWidths; + flags = Object.assign({ + autoencode: true, + noBOM: true + }, options.flags); + var wordSpacingPerLine = []; + var findWidth = function findWidth(v) { + return scope.getStringUnitWidth(v, { + font: activeFont, + charSpace: charSpace, + fontSize: activeFontSize, + doKerning: false + }) * activeFontSize / scaleFactor; + }; + if (Object.prototype.toString.call(text) === "[object Array]") { + da = transformTextToSpecialArray(text); + var newY; + if (align !== "left") { + lineWidths = da.map(findWidth); + } + //The first line uses the "main" Td setting, + //and the subsequent lines are offset by the + //previous line's x coordinate. + var prevWidth = 0; + var newX; + if (align === "right") { + //The passed in x coordinate defines the + //rightmost point of the text. + x -= lineWidths[0]; + text = []; + len = da.length; + for (var i = 0; i < len; i++) { + if (i === 0) { + newX = getHorizontalCoordinate(x); + newY = getVerticalCoordinate(y); + } else { + newX = scale(prevWidth - lineWidths[i]); + newY = -leading; + } + text.push([da[i], newX, newY]); + prevWidth = lineWidths[i]; + } + } else if (align === "center") { + //The passed in x coordinate defines + //the center point. + x -= lineWidths[0] / 2; + text = []; + len = da.length; + for (var j = 0; j < len; j++) { + if (j === 0) { + newX = getHorizontalCoordinate(x); + newY = getVerticalCoordinate(y); + } else { + newX = scale((prevWidth - lineWidths[j]) / 2); + newY = -leading; + } + text.push([da[j], newX, newY]); + prevWidth = lineWidths[j]; + } + } else if (align === "left") { + text = []; + len = da.length; + for (var h = 0; h < len; h++) { + text.push(da[h]); + } + } else if (align === "justify" && activeFont.encoding === "Identity-H") { + // when using unicode fonts, wordSpacePerLine does not apply + text = []; + len = da.length; + maxWidth = maxWidth !== 0 ? maxWidth : pageWidth; + var backToStartX = 0; + for (var l = 0; l < len; l++) { + newY = l === 0 ? getVerticalCoordinate(y) : -leading; + newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX; + if (l < len - 1) { + var spacing = scale((maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1)); + var words = da[l].split(" "); + text.push([words[0] + " ", newX, newY]); + backToStartX = 0; // distance to reset back to the left + for (var _i = 1; _i < words.length; _i++) { + var shiftAmount = (findWidth(words[_i - 1] + " " + words[_i]) - findWidth(words[_i])) * scaleFactor + spacing; + if (_i == words.length - 1) text.push([words[_i], shiftAmount, 0]);else text.push([words[_i] + " ", shiftAmount, 0]); + backToStartX -= shiftAmount; + } + } else { + text.push([da[l], newX, newY]); + } + } + text.push(["", backToStartX, 0]); + } else if (align === "justify") { + text = []; + len = da.length; + maxWidth = maxWidth !== 0 ? maxWidth : pageWidth; + for (var l = 0; l < len; l++) { + newY = l === 0 ? getVerticalCoordinate(y) : -leading; + newX = l === 0 ? getHorizontalCoordinate(x) : 0; + var numSpaces = da[l].split(" ").length - 1; + var _spacing = numSpaces > 0 ? (maxWidth - lineWidths[l]) / numSpaces : 0; + if (l < len - 1) { + wordSpacingPerLine.push(hpf(scale(_spacing))); + } else { + wordSpacingPerLine.push(0); + } + text.push([da[l], newX, newY]); + } + } else { + throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".'); + } + } + + //R2L + var doReversing = typeof options.R2L === "boolean" ? options.R2L : R2L; + if (doReversing === true) { + text = processTextByFunction(text, function (text, posX, posY) { + return [text.split("").reverse().join(""), posX, posY]; + }); + } + + //creating Payload-Object to make text byRef + payload = { + text: text, + x: x, + y: y, + options: options, + mutex: { + pdfEscape: pdfEscape, + activeFontKey: activeFontKey, + fonts: fonts, + activeFontSize: activeFontSize + } + }; + events.publish("postProcessText", payload); + text = payload.text; + isHex = payload.mutex.isHex || false; + + //Escaping + var activeFontEncoding = fonts[activeFontKey].encoding; + if (activeFontEncoding === "WinAnsiEncoding" || activeFontEncoding === "StandardEncoding") { + text = processTextByFunction(text, function (text, posX, posY) { + return [ESC(text), posX, posY]; + }); + } + da = transformTextToSpecialArray(text); + text = []; + var STRING = 0; + var ARRAY = 1; + var variant = Array.isArray(da[0]) ? ARRAY : STRING; + var posX; + var posY; + var content; + var wordSpacing = ""; + var generatePosition = function generatePosition(parmPosX, parmPosY, parmTransformationMatrix) { + var position = ""; + if (parmTransformationMatrix instanceof Matrix) { + // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y + // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied + // in the coordinate system established by this matrix + if (typeof options.angle === "number") { + parmTransformationMatrix = matrixMult(parmTransformationMatrix, new Matrix(1, 0, 0, 1, parmPosX, parmPosY)); + } else { + parmTransformationMatrix = matrixMult(new Matrix(1, 0, 0, 1, parmPosX, parmPosY), parmTransformationMatrix); + } + if (apiMode === ApiMode.ADVANCED) { + parmTransformationMatrix = matrixMult(new Matrix(1, 0, 0, -1, 0, 0), parmTransformationMatrix); + } + position = parmTransformationMatrix.join(" ") + " Tm\n"; + } else { + position = hpf(parmPosX) + " " + hpf(parmPosY) + " Td\n"; + } + return position; + }; + for (var lineIndex = 0; lineIndex < da.length; lineIndex++) { + wordSpacing = ""; + switch (variant) { + case ARRAY: + content = (isHex ? "<" : "(") + da[lineIndex][0] + (isHex ? ">" : ")"); + posX = parseFloat(da[lineIndex][1]); + posY = parseFloat(da[lineIndex][2]); + break; + case STRING: + content = (isHex ? "<" : "(") + da[lineIndex] + (isHex ? ">" : ")"); + posX = getHorizontalCoordinate(x); + posY = getVerticalCoordinate(y); + break; + } + if (typeof wordSpacingPerLine !== "undefined" && typeof wordSpacingPerLine[lineIndex] !== "undefined") { + wordSpacing = wordSpacingPerLine[lineIndex] + " Tw\n"; + } + if (lineIndex === 0) { + text.push(wordSpacing + generatePosition(posX, posY, transformationMatrix) + content); + } else if (variant === STRING) { + text.push(wordSpacing + content); + } else if (variant === ARRAY) { + text.push(wordSpacing + generatePosition(posX, posY, transformationMatrix) + content); + } + } + text = variant === STRING ? text.join(" Tj\nT* ") : text.join(" Tj\n"); + text += " Tj\n"; + var result = "BT\n/"; + result += activeFontKey + " " + activeFontSize + " Tf\n"; // font face, style, size + result += hpf(activeFontSize * lineHeight) + " TL\n"; // line spacing + result += textColor + "\n"; + result += xtra; + result += text; + result += "ET"; + out(result); + usedFonts[activeFontKey] = true; + return scope; + }; + + // PDF supports these path painting and clip path operators: + // + // S - stroke + // s - close/stroke + // f (F) - fill non-zero + // f* - fill evenodd + // B - fill stroke nonzero + // B* - fill stroke evenodd + // b - close fill stroke nonzero + // b* - close fill stroke evenodd + // n - nothing (consume path) + // W - clip nonzero + // W* - clip evenodd + // + // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close() + // method. + /** + * + * @name clip + * @function + * @instance + * @param {string} rule Only possible value is 'evenodd' + * @returns {jsPDF} + * @memberof jsPDF# + * @description All .clip() after calling drawing ops with a style argument of null. + */ + var clip = API.__private__.clip = API.clip = function (rule) { + // Call .clip() after calling drawing ops with a style argument of null + // W is the PDF clipping op + if ("evenodd" === rule) { + out("W*"); + } else { + out("W"); + } + return this; + }; + + /** + * @name clipEvenOdd + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note + * that this will NOT consume the current path. In order to only use this path for clipping call + * {@link API.discardPath} afterwards. + */ + API.clipEvenOdd = function () { + return clip("evenodd"); + }; + + /** + * Consumes the current path without any effect. Mainly used in combination with {@link clip} or + * {@link clipEvenOdd}. The PDF "n" operator. + * @name discardPath + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.__private__.discardPath = API.discardPath = function () { + out("n"); + return this; + }; + var isValidStyle = API.__private__.isValidStyle = function (style) { + var validStyleVariants = [undefined, null, "S", "D", "F", "DF", "FD", "f", "f*", "B", "B*", "n"]; + var result = false; + if (validStyleVariants.indexOf(style) !== -1) { + result = true; + } + return result; + }; + API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function (operator) { + if (isValidStyle(operator)) { + defaultPathOperation = operator; + } + return this; + }; + var getStyle = API.__private__.getStyle = API.getStyle = function (style) { + // see path-painting operators in PDF spec + var op = defaultPathOperation; // stroke + + switch (style) { + case "D": + case "S": + op = "S"; // stroke + break; + case "F": + op = "f"; // fill + break; + case "FD": + case "DF": + op = "B"; + break; + case "f": + case "f*": + case "B": + case "B*": + /* + Allow direct use of these PDF path-painting operators: + - f fill using nonzero winding number rule + - f* fill using even-odd rule + - B fill then stroke with fill using non-zero winding number rule + - B* fill then stroke with fill using even-odd rule + */ + op = style; + break; + } + return op; + }; + + /** + * Close the current path. The PDF "h" operator. + * @name close + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + */ + var close = API.close = function () { + out("h"); + return this; + }; + + /** + * Stroke the path. The PDF "S" operator. + * @name stroke + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.stroke = function () { + out("S"); + return this; + }; + + /** + * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled + * with this pattern, otherwise with the current fill color. Equivalent to the PDF "f" operator. + * @name fill + * @function + * @instance + * @param {PatternData=} pattern If provided the path will be filled with this pattern + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.fill = function (pattern) { + fillWithOptionalPattern("f", pattern); + return this; + }; + + /** + * Fill the current path using the even-odd rule. The PDF f* operator. + * @see API.fill + * @name fillEvenOdd + * @function + * @instance + * @param {PatternData=} pattern If provided the path will be filled with this pattern + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.fillEvenOdd = function (pattern) { + fillWithOptionalPattern("f*", pattern); + return this; + }; + + /** + * Fill using the nonzero winding number rule and then stroke the current Path. The PDF "B" operator. + * @see API.fill + * @name fillStroke + * @function + * @instance + * @param {PatternData=} pattern If provided the path will be stroked with this pattern + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.fillStroke = function (pattern) { + fillWithOptionalPattern("B", pattern); + return this; + }; + + /** + * Fill using the even-odd rule and then stroke the current Path. The PDF "B" operator. + * @see API.fill + * @name fillStrokeEvenOdd + * @function + * @instance + * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.fillStrokeEvenOdd = function (pattern) { + fillWithOptionalPattern("B*", pattern); + return this; + }; + var fillWithOptionalPattern = function fillWithOptionalPattern(style, pattern) { + if (_typeof(pattern) === "object") { + fillWithPattern(pattern, style); + } else { + out(style); + } + }; + var putStyle = function putStyle(style) { + if (style === null || apiMode === ApiMode.ADVANCED && style === undefined) { + return; + } + style = getStyle(style); + + // stroking / filling / both the path + out(style); + }; + function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) { + var clone = new TilingPattern(boundingBox || this.boundingBox, xStep || this.xStep, yStep || this.yStep, this.gState, matrix || this.matrix); + clone.stream = this.stream; + var key = patternKey + "$$" + this.cloneIndex++ + "$$"; + addPattern(key, clone); + return clone; + } + var fillWithPattern = function fillWithPattern(patternData, style) { + var patternId = patternMap[patternData.key]; + var pattern = patterns[patternId]; + if (pattern instanceof ShadingPattern) { + out("q"); + out(clipRuleFromStyle(style)); + if (pattern.gState) { + API.setGState(pattern.gState); + } + out(patternData.matrix.toString() + " cm"); + out("/" + patternId + " sh"); + out("Q"); + } else if (pattern instanceof TilingPattern) { + // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation, + // so we must flip them + var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight()); + if (patternData.matrix) { + matrix = matrix.multiply(patternData.matrix || identityMatrix); + // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances + // for each use + patternId = cloneTilingPattern.call(pattern, patternData.key, patternData.boundingBox, patternData.xStep, patternData.yStep, matrix).id; + } + out("q"); + out("/Pattern cs"); + out("/" + patternId + " scn"); + if (pattern.gState) { + API.setGState(pattern.gState); + } + out(style); + out("Q"); + } + }; + var clipRuleFromStyle = function clipRuleFromStyle(style) { + switch (style) { + case "f": + case "F": + return "W n"; + case "f*": + return "W* n"; + case "B": + return "W S"; + case "B*": + return "W* S"; + + // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern + // and "n"/"S" as style would still fill/fill and stroke the path) + case "S": + return "W S"; + case "n": + return "W n"; + } + }; + + /** + * Begin a new subpath by moving the current point to coordinates (x, y). The PDF "m" operator. + * @param {number} x + * @param {number} y + * @name moveTo + * @function + * @instance + * @memberof jsPDF# + * @returns {jsPDF} + */ + var moveTo = API.moveTo = function (x, y) { + out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " m"); + return this; + }; + + /** + * Append a straight line segment from the current point to the point (x, y). The PDF "l" operator. + * @param {number} x + * @param {number} y + * @memberof jsPDF# + * @name lineTo + * @function + * @instance + * @memberof jsPDF# + * @returns {jsPDF} + */ + var lineTo = API.lineTo = function (x, y) { + out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " l"); + return this; + }; + + /** + * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point + * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3). + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {number} x3 + * @param {number} y3 + * @memberof jsPDF# + * @name curveTo + * @function + * @instance + * @memberof jsPDF# + * @returns {jsPDF} + */ + var curveTo = API.curveTo = function (x1, y1, x2, y2, x3, y3) { + out([hpf(scale(x1)), hpf(transformScaleY(y1)), hpf(scale(x2)), hpf(transformScaleY(y2)), hpf(scale(x3)), hpf(transformScaleY(y3)), "c"].join(" ")); + return this; + }; + + /** + * Draw a line on the current page. + * + * @name line + * @function + * @instance + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @param {string} style A string specifying the painting style or null. Valid styles include: 'S' [default] - stroke, 'F' - fill, and 'DF' (or 'FD') - fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S' + * @returns {jsPDF} + * @memberof jsPDF# + */ + API.__private__.line = API.line = function (x1, y1, x2, y2, style) { + if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || !isValidStyle(style)) { + throw new Error("Invalid arguments passed to jsPDF.line"); + } + if (apiMode === ApiMode.COMPAT) { + return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || "S"); + } else { + return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke(); + } + }; + + /** + * @typedef {Object} PatternData + * {Matrix|undefined} matrix + * {Number|undefined} xStep + * {Number|undefined} yStep + * {Array.|undefined} boundingBox + */ + + /** + * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates. + * All data points in `lines` are relative to last line origin. + * `x`, `y` become x1,y1 for first line / curve in the set. + * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point. + * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1. + * + * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line + * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves). + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction. + * @param {string=} style A string specifying the painting style or null. Valid styles include: + * 'S' [default] - stroke, + * 'F' - fill, + * and 'DF' (or 'FD') - fill then stroke. + * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple + * method calls. The last drawing method call used to define the shape should not have a null style argument. + * + * In "advanced" API mode this parameter is deprecated. + * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name lines + */ + API.__private__.lines = API.lines = function (lines, x, y, scale, style, closed) { + var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp; + + // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style) + // in effort to make all calls have similar signature like + // function(content, coordinateX, coordinateY , miscellaneous) + // this method had its args flipped. + // code below allows backward compatibility with old arg order. + if (typeof lines === "number") { + tmp = y; + y = x; + x = lines; + lines = tmp; + } + scale = scale || [1, 1]; + closed = closed || false; + if (isNaN(x) || isNaN(y) || !Array.isArray(lines) || !Array.isArray(scale) || !isValidStyle(style) || typeof closed !== "boolean") { + throw new Error("Invalid arguments passed to jsPDF.lines"); + } + + // starting point + moveTo(x, y); + scalex = scale[0]; + scaley = scale[1]; + l = lines.length; + //, x2, y2 // bezier only. In page default measurement "units", *after* scaling + //, x3, y3 // bezier only. In page default measurement "units", *after* scaling + // ending point for all, lines and bezier. . In page default measurement "units", *after* scaling + x4 = x; // last / ending point = starting point for first item. + y4 = y; // last / ending point = starting point for first item. + + for (i = 0; i < l; i++) { + leg = lines[i]; + if (leg.length === 2) { + // simple line + x4 = leg[0] * scalex + x4; // here last x4 was prior ending point + y4 = leg[1] * scaley + y4; // here last y4 was prior ending point + lineTo(x4, y4); + } else { + // bezier curve + x2 = leg[0] * scalex + x4; // here last x4 is prior ending point + y2 = leg[1] * scaley + y4; // here last y4 is prior ending point + x3 = leg[2] * scalex + x4; // here last x4 is prior ending point + y3 = leg[3] * scaley + y4; // here last y4 is prior ending point + x4 = leg[4] * scalex + x4; // here last x4 was prior ending point + y4 = leg[5] * scaley + y4; // here last y4 was prior ending point + curveTo(x2, y2, x3, y3, x4, y4); + } + } + if (closed) { + close(); + } + putStyle(style); + return this; + }; + + /** + * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative. + * @param {Array} lines An array of {op: operator, c: coordinates} object, where op is one of "m" (move to), "l" (line to) + * "c" (cubic bezier curve) and "h" (close (sub)path)). c is an array of coordinates. "m" and "l" expect two, "c" + * six and "h" an empty array (or undefined). + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name path + */ + API.path = function (lines) { + for (var i = 0; i < lines.length; i++) { + var leg = lines[i]; + var coords = leg.c; + switch (leg.op) { + case "m": + moveTo(coords[0], coords[1]); + break; + case "l": + lineTo(coords[0], coords[1]); + break; + case "c": + curveTo.apply(this, coords); + break; + case "h": + close(); + break; + } + } + return this; + }; + + /** + * Adds a rectangle to PDF. + * + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} w Width (in units declared at inception of PDF document) + * @param {number} h Height (in units declared at inception of PDF document) + * @param {string=} style A string specifying the painting style or null. Valid styles include: + * 'S' [default] - stroke, + * 'F' - fill, + * and 'DF' (or 'FD') - fill then stroke. + * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple + * method calls. The last drawing method call used to define the shape should not have a null style argument. + * + * In "advanced" API mode this parameter is deprecated. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name rect + */ + API.__private__.rect = API.rect = function (x, y, w, h, style) { + if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) { + throw new Error("Invalid arguments passed to jsPDF.rect"); + } + if (apiMode === ApiMode.COMPAT) { + h = -h; + } + out([hpf(scale(x)), hpf(transformScaleY(y)), hpf(scale(w)), hpf(scale(h)), "re"].join(" ")); + putStyle(style); + return this; + }; + + /** + * Adds a triangle to PDF. + * + * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {string=} style A string specifying the painting style or null. Valid styles include: + * 'S' [default] - stroke, + * 'F' - fill, + * and 'DF' (or 'FD') - fill then stroke. + * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple + * method calls. The last drawing method call used to define the shape should not have a null style argument. + * + * In "advanced" API mode this parameter is deprecated. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name triangle + */ + API.__private__.triangle = API.triangle = function (x1, y1, x2, y2, x3, y3, style) { + if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || isNaN(x3) || isNaN(y3) || !isValidStyle(style)) { + throw new Error("Invalid arguments passed to jsPDF.triangle"); + } + this.lines([[x2 - x1, y2 - y1], + // vector to point 2 + [x3 - x2, y3 - y2], + // vector to point 3 + [x1 - x3, y1 - y3] // closing vector back to point 1 + ], x1, y1, + // start of path + [1, 1], style, true); + return this; + }; + + /** + * Adds a rectangle with rounded corners to PDF. + * + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} w Width (in units declared at inception of PDF document) + * @param {number} h Height (in units declared at inception of PDF document) + * @param {number} rx Radius along x axis (in units declared at inception of PDF document) + * @param {number} ry Radius along y axis (in units declared at inception of PDF document) + * @param {string=} style A string specifying the painting style or null. Valid styles include: + * 'S' [default] - stroke, + * 'F' - fill, + * and 'DF' (or 'FD') - fill then stroke. + * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple + * method calls. The last drawing method call used to define the shape should not have a null style argument. + * + * In "advanced" API mode this parameter is deprecated. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name roundedRect + */ + API.__private__.roundedRect = API.roundedRect = function (x, y, w, h, rx, ry, style) { + if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || isNaN(rx) || isNaN(ry) || !isValidStyle(style)) { + throw new Error("Invalid arguments passed to jsPDF.roundedRect"); + } + var MyArc = 4 / 3 * (Math.SQRT2 - 1); + rx = Math.min(rx, w * 0.5); + ry = Math.min(ry, h * 0.5); + this.lines([[w - 2 * rx, 0], [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry], [0, h - 2 * ry], [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry], [-w + 2 * rx, 0], [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry], [0, -h + 2 * ry], [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]], x + rx, y, + // start of path + [1, 1], style, true); + return this; + }; + + /** + * Adds an ellipse to PDF. + * + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} rx Radius along x axis (in units declared at inception of PDF document) + * @param {number} ry Radius along y axis (in units declared at inception of PDF document) + * @param {string=} style A string specifying the painting style or null. Valid styles include: + * 'S' [default] - stroke, + * 'F' - fill, + * and 'DF' (or 'FD') - fill then stroke. + * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple + * method calls. The last drawing method call used to define the shape should not have a null style argument. + * + * In "advanced" API mode this parameter is deprecated. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name ellipse + */ + API.__private__.ellipse = API.ellipse = function (x, y, rx, ry, style) { + if (isNaN(x) || isNaN(y) || isNaN(rx) || isNaN(ry) || !isValidStyle(style)) { + throw new Error("Invalid arguments passed to jsPDF.ellipse"); + } + var lx = 4 / 3 * (Math.SQRT2 - 1) * rx, + ly = 4 / 3 * (Math.SQRT2 - 1) * ry; + moveTo(x + rx, y); + curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry); + curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y); + curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry); + curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y); + putStyle(style); + return this; + }; + + /** + * Adds an circle to PDF. + * + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} r Radius (in units declared at inception of PDF document) + * @param {string=} style A string specifying the painting style or null. Valid styles include: + * 'S' [default] - stroke, + * 'F' - fill, + * and 'DF' (or 'FD') - fill then stroke. + * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple + * method calls. The last drawing method call used to define the shape should not have a null style argument. + * + * In "advanced" API mode this parameter is deprecated. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name circle + */ + API.__private__.circle = API.circle = function (x, y, r, style) { + if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) { + throw new Error("Invalid arguments passed to jsPDF.circle"); + } + return this.ellipse(x, y, r, r, style); + }; + + /** + * Sets text font face, variant for upcoming text elements. + * See output of jsPDF.getFontList() for possible font names, styles. + * + * @param {string} fontName Font name or family. Example: "times". + * @param {string} fontStyle Font style or variant. Example: "italic". + * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400 + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setFont + */ + API.setFont = function (fontName, fontStyle, fontWeight) { + if (fontWeight) { + fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight); + } + activeFontKey = getFont(fontName, fontStyle, { + disableWarning: false + }); + return this; + }; + + /** + * Gets text font face, variant for upcoming text elements. + * + * @function + * @instance + * @returns {Object} + * @memberof jsPDF# + * @name getFont + */ + var getFontEntry = API.__private__.getFont = API.getFont = function () { + return fonts[getFont.apply(API, arguments)]; + }; + + /** + * Returns an object - a tree of fontName to fontStyle relationships available to + * active PDF document. + * + * @public + * @function + * @instance + * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... } + * @memberof jsPDF# + * @name getFontList + */ + API.__private__.getFontList = API.getFontList = function () { + var list = {}, + fontName, + fontStyle; + for (fontName in fontmap) { + if (fontmap.hasOwnProperty(fontName)) { + list[fontName] = []; + for (fontStyle in fontmap[fontName]) { + if (fontmap[fontName].hasOwnProperty(fontStyle)) { + list[fontName].push(fontStyle); + } + } + } + } + return list; + }; + + /** + * Add a custom font to the current instance. + * + * @param {string} postScriptName PDF specification full name for the font. + * @param {string} id PDF-document-instance-specific label assinged to the font. + * @param {string} fontStyle Style of the Font. + * @param {number | string} fontWeight Weight of the Font. + * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping. + * @function + * @instance + * @memberof jsPDF# + * @name addFont + * @returns {string} fontId + */ + API.addFont = function (postScriptName, fontName, fontStyle, fontWeight, encoding) { + var encodingOptions = ["StandardEncoding", "MacRomanEncoding", "Identity-H", "WinAnsiEncoding"]; + if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) { + //IE 11 fix + encoding = arguments[3]; + } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) { + fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight); + } + encoding = encoding || "Identity-H"; + return addFont.call(this, postScriptName, fontName, fontStyle, encoding); + }; + var lineWidth = options.lineWidth || 0.200025; // 2mm + /** + * Gets the line width, default: 0.200025. + * + * @function + * @instance + * @returns {number} lineWidth + * @memberof jsPDF# + * @name getLineWidth + */ + var getLineWidth = API.__private__.getLineWidth = API.getLineWidth = function () { + return lineWidth; + }; + + /** + * Sets line width for upcoming lines. + * + * @param {number} width Line width (in units declared at inception of PDF document). + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setLineWidth + */ + var setLineWidth = API.__private__.setLineWidth = API.setLineWidth = function (width) { + lineWidth = width; + out(hpf(scale(width)) + " w"); + return this; + }; + + /** + * Sets the dash pattern for upcoming lines. + * + * To reset the settings simply call the method without any parameters. + * @param {Array} dashArray An array containing 0-2 numbers. The first number sets the length of the + * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered + * to be as long as the dashes. An empty array means solid, unbroken lines. + * @param {number} dashPhase The phase lines start with. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setLineDashPattern + */ + API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function (dashArray, dashPhase) { + dashArray = dashArray || []; + dashPhase = dashPhase || 0; + if (isNaN(dashPhase) || !Array.isArray(dashArray)) { + throw new Error("Invalid arguments passed to jsPDF.setLineDash"); + } + dashArray = dashArray.map(function (x) { + return hpf(scale(x)); + }).join(" "); + dashPhase = hpf(scale(dashPhase)); + out("[" + dashArray + "] " + dashPhase + " d"); + return this; + }; + var lineHeightFactor; + var getLineHeight = API.__private__.getLineHeight = API.getLineHeight = function () { + return activeFontSize * lineHeightFactor; + }; + API.__private__.getLineHeight = API.getLineHeight = function () { + return activeFontSize * lineHeightFactor; + }; + + /** + * Sets the LineHeightFactor of proportion. + * + * @param {number} value LineHeightFactor value. Default: 1.15. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setLineHeightFactor + */ + var setLineHeightFactor = API.__private__.setLineHeightFactor = API.setLineHeightFactor = function (value) { + value = value || 1.15; + if (typeof value === "number") { + lineHeightFactor = value; + } + return this; + }; + + /** + * Gets the LineHeightFactor, default: 1.15. + * + * @function + * @instance + * @returns {number} lineHeightFactor + * @memberof jsPDF# + * @name getLineHeightFactor + */ + var getLineHeightFactor = API.__private__.getLineHeightFactor = API.getLineHeightFactor = function () { + return lineHeightFactor; + }; + setLineHeightFactor(options.lineHeight); + var getHorizontalCoordinate = API.__private__.getHorizontalCoordinate = function (value) { + return scale(value); + }; + var getVerticalCoordinate = API.__private__.getVerticalCoordinate = function (value) { + if (apiMode === ApiMode.ADVANCED) { + return value; + } else { + var pageHeight = pagesContext[currentPage].mediaBox.topRightY - pagesContext[currentPage].mediaBox.bottomLeftY; + return pageHeight - scale(value); + } + }; + var getHorizontalCoordinateString = API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function (value) { + return hpf(getHorizontalCoordinate(value)); + }; + var getVerticalCoordinateString = API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function (value) { + return hpf(getVerticalCoordinate(value)); + }; + var strokeColor = options.strokeColor || "0 G"; + + /** + * Gets the stroke color for upcoming elements. + * + * @function + * @instance + * @returns {string} colorAsHex + * @memberof jsPDF# + * @name getDrawColor + */ + API.__private__.getStrokeColor = API.getDrawColor = function () { + return decodeColorString(strokeColor); + }; + + /** + * Sets the stroke color for upcoming elements. + * + * Depending on the number of arguments given, Gray, RGB, or CMYK + * color space is implied. + * + * When only ch1 is given, "Gray" color space is implied and it + * must be a value in the range from 0.00 (solid black) to to 1.00 (white) + * if values are communicated as String types, or in range from 0 (black) + * to 255 (white) if communicated as Number type. + * The RGB-like 0-255 range is provided for backward compatibility. + * + * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each + * value must be in the range from 0.00 (minimum intensity) to to 1.00 + * (max intensity) if values are communicated as String types, or + * from 0 (min intensity) to to 255 (max intensity) if values are communicated + * as Number types. + * The RGB-like 0-255 range is provided for backward compatibility. + * + * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each + * value must be a in the range from 0.00 (0% concentration) to to + * 1.00 (100% concentration) + * + * Because JavaScript treats fixed point numbers badly (rounds to + * floating point nearest to binary representation) it is highly advised to + * communicate the fractional numbers as String types, not JavaScript Number type. + * + * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'. + * @param {Number} ch2 Color channel value. + * @param {Number} ch3 Color channel value. + * @param {Number} ch4 Color channel value. + * + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setDrawColor + */ + API.__private__.setStrokeColor = API.setDrawColor = function (ch1, ch2, ch3, ch4) { + var options = { + ch1: ch1, + ch2: ch2, + ch3: ch3, + ch4: ch4, + pdfColorType: "draw", + precision: 2 + }; + strokeColor = encodeColorString(options); + out(strokeColor); + return this; + }; + var fillColor = options.fillColor || "0 g"; + + /** + * Gets the fill color for upcoming elements. + * + * @function + * @instance + * @returns {string} colorAsHex + * @memberof jsPDF# + * @name getFillColor + */ + API.__private__.getFillColor = API.getFillColor = function () { + return decodeColorString(fillColor); + }; + + /** + * Sets the fill color for upcoming elements. + * + * Depending on the number of arguments given, Gray, RGB, or CMYK + * color space is implied. + * + * When only ch1 is given, "Gray" color space is implied and it + * must be a value in the range from 0.00 (solid black) to to 1.00 (white) + * if values are communicated as String types, or in range from 0 (black) + * to 255 (white) if communicated as Number type. + * The RGB-like 0-255 range is provided for backward compatibility. + * + * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each + * value must be in the range from 0.00 (minimum intensity) to to 1.00 + * (max intensity) if values are communicated as String types, or + * from 0 (min intensity) to to 255 (max intensity) if values are communicated + * as Number types. + * The RGB-like 0-255 range is provided for backward compatibility. + * + * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each + * value must be a in the range from 0.00 (0% concentration) to to + * 1.00 (100% concentration) + * + * Because JavaScript treats fixed point numbers badly (rounds to + * floating point nearest to binary representation) it is highly advised to + * communicate the fractional numbers as String types, not JavaScript Number type. + * + * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'. + * @param {Number} ch2 Color channel value. + * @param {Number} ch3 Color channel value. + * @param {Number} ch4 Color channel value. + * + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setFillColor + */ + API.__private__.setFillColor = API.setFillColor = function (ch1, ch2, ch3, ch4) { + var options = { + ch1: ch1, + ch2: ch2, + ch3: ch3, + ch4: ch4, + pdfColorType: "fill", + precision: 2 + }; + fillColor = encodeColorString(options); + out(fillColor); + return this; + }; + var textColor = options.textColor || "0 g"; + /** + * Gets the text color for upcoming elements. + * + * @function + * @instance + * @returns {string} colorAsHex + * @memberof jsPDF# + * @name getTextColor + */ + var getTextColor = API.__private__.getTextColor = API.getTextColor = function () { + return decodeColorString(textColor); + }; + /** + * Sets the text color for upcoming elements. + * + * Depending on the number of arguments given, Gray, RGB, or CMYK + * color space is implied. + * + * When only ch1 is given, "Gray" color space is implied and it + * must be a value in the range from 0.00 (solid black) to to 1.00 (white) + * if values are communicated as String types, or in range from 0 (black) + * to 255 (white) if communicated as Number type. + * The RGB-like 0-255 range is provided for backward compatibility. + * + * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each + * value must be in the range from 0.00 (minimum intensity) to to 1.00 + * (max intensity) if values are communicated as String types, or + * from 0 (min intensity) to to 255 (max intensity) if values are communicated + * as Number types. + * The RGB-like 0-255 range is provided for backward compatibility. + * + * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each + * value must be a in the range from 0.00 (0% concentration) to to + * 1.00 (100% concentration) + * + * Because JavaScript treats fixed point numbers badly (rounds to + * floating point nearest to binary representation) it is highly advised to + * communicate the fractional numbers as String types, not JavaScript Number type. + * + * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'. + * @param {Number} ch2 Color channel value. + * @param {Number} ch3 Color channel value. + * @param {Number} ch4 Color channel value. + * + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setTextColor + */ + API.__private__.setTextColor = API.setTextColor = function (ch1, ch2, ch3, ch4) { + var options = { + ch1: ch1, + ch2: ch2, + ch3: ch3, + ch4: ch4, + pdfColorType: "text", + precision: 3 + }; + textColor = encodeColorString(options); + return this; + }; + var activeCharSpace = options.charSpace; + + /** + * Get global value of CharSpace. + * + * @function + * @instance + * @returns {number} charSpace + * @memberof jsPDF# + * @name getCharSpace + */ + var getCharSpace = API.__private__.getCharSpace = API.getCharSpace = function () { + return parseFloat(activeCharSpace || 0); + }; + + /** + * Set global value of CharSpace. + * + * @param {number} charSpace + * @function + * @instance + * @returns {jsPDF} jsPDF-instance + * @memberof jsPDF# + * @name setCharSpace + */ + API.__private__.setCharSpace = API.setCharSpace = function (charSpace) { + if (isNaN(charSpace)) { + throw new Error("Invalid argument passed to jsPDF.setCharSpace"); + } + activeCharSpace = charSpace; + return this; + }; + var lineCapID = 0; + /** + * Is an Object providing a mapping from human-readable to + * integer flag values designating the varieties of line cap + * and join styles. + * + * @memberof jsPDF# + * @name CapJoinStyles + */ + API.CapJoinStyles = { + 0: 0, + butt: 0, + but: 0, + miter: 0, + 1: 1, + round: 1, + rounded: 1, + circle: 1, + 2: 2, + projecting: 2, + project: 2, + square: 2, + bevel: 2 + }; + + /** + * Sets the line cap styles. + * See {jsPDF.CapJoinStyles} for variants. + * + * @param {String|Number} style A string or number identifying the type of line cap. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setLineCap + */ + API.__private__.setLineCap = API.setLineCap = function (style) { + var id = API.CapJoinStyles[style]; + if (id === undefined) { + throw new Error("Line cap style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles"); + } + lineCapID = id; + out(id + " J"); + return this; + }; + var lineJoinID = 0; + /** + * Sets the line join styles. + * See {jsPDF.CapJoinStyles} for variants. + * + * @param {String|Number} style A string or number identifying the type of line join. + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setLineJoin + */ + API.__private__.setLineJoin = API.setLineJoin = function (style) { + var id = API.CapJoinStyles[style]; + if (id === undefined) { + throw new Error("Line join style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles"); + } + lineJoinID = id; + out(id + " j"); + return this; + }; + /** + * Sets the miterLimit property, which effects the maximum miter length. + * + * @param {number} length The length of the miter + * @function + * @instance + * @returns {jsPDF} + * @memberof jsPDF# + * @name setLineMiterLimit + */ + API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function (length) { + length = length || 0; + if (isNaN(length)) { + throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit"); + } + out(hpf(scale(length)) + " M"); + return this; + }; + + /** + * An object representing a pdf graphics state. + * @class GState + */ + + /** + * + * @param parameters A parameter object that contains all properties this graphics state wants to set. + * Supported are: opacity, stroke-opacity + * @constructor + */ + API.GState = GState; + + /** + * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}. + * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState + * it will be added before use. + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name setGState + */ + API.setGState = function (gState) { + if (typeof gState === "string") { + gState = gStates[gStatesMap[gState]]; + } else { + gState = addGState(null, gState); + } + if (!gState.equals(activeGState)) { + out("/" + gState.id + " gs"); + activeGState = gState; + } + }; + + /** + * Adds a new Graphics State. Duplicates are automatically eliminated. + * @param {String} key Might also be null, if no later reference to this gState is needed + * @param {Object} gState The gState object + */ + var addGState = function addGState(key, gState) { + // only add it if it is not already present (the keys provided by the user must be unique!) + if (key && gStatesMap[key]) return; + var duplicate = false; + for (var s in gStates) { + if (gStates.hasOwnProperty(s)) { + if (gStates[s].equals(gState)) { + duplicate = true; + break; + } + } + } + if (duplicate) { + gState = gStates[s]; + } else { + var gStateKey = "GS" + (Object.keys(gStates).length + 1).toString(10); + gStates[gStateKey] = gState; + gState.id = gStateKey; + } + + // several user keys may point to the same GState object + key && (gStatesMap[key] = gState.id); + events.publish("addGState", gState); + return gState; + }; + + /** + * Adds a new {@link GState} for later use. See {@link setGState}. + * @param {String} key + * @param {GState} gState + * @function + * @instance + * @returns {jsPDF} + * + * @memberof jsPDF# + * @name addGState + */ + API.addGState = function (key, gState) { + addGState(key, gState); + return this; + }; + + /** + * Saves the current graphics state ("pushes it on the stack"). It can be restored by {@link restoreGraphicsState} + * later. Here, the general pdf graphics state is meant, also including the current transformation matrix, + * fill and stroke colors etc. + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name saveGraphicsState + */ + API.saveGraphicsState = function () { + out("q"); + // as we cannot set font key and size independently we must keep track of both + fontStateStack.push({ + key: activeFontKey, + size: activeFontSize, + color: textColor + }); + return this; + }; + + /** + * Restores a previously saved graphics state saved by {@link saveGraphicsState} ("pops the stack"). + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name restoreGraphicsState + */ + API.restoreGraphicsState = function () { + out("Q"); + + // restore previous font state + var fontState = fontStateStack.pop(); + activeFontKey = fontState.key; + activeFontSize = fontState.size; + textColor = fontState.color; + activeGState = null; + return this; + }; + + /** + * Appends this matrix to the left of all previously applied matrices. + * + * @param {Matrix} matrix + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name setCurrentTransformationMatrix + */ + API.setCurrentTransformationMatrix = function (matrix) { + out(matrix.toString() + " cm"); + return this; + }; + + /** + * Inserts a debug comment into the generated pdf. + * @function + * @instance + * @param {String} text + * @returns {jsPDF} + * @memberof jsPDF# + * @name comment + */ + API.comment = function (text) { + out("#" + text); + return this; + }; + + /** + * Point + */ + var Point = function Point(x, y) { + var _x = x || 0; + Object.defineProperty(this, "x", { + enumerable: true, + get: function get() { + return _x; + }, + set: function set(value) { + if (!isNaN(value)) { + _x = parseFloat(value); + } + } + }); + var _y = y || 0; + Object.defineProperty(this, "y", { + enumerable: true, + get: function get() { + return _y; + }, + set: function set(value) { + if (!isNaN(value)) { + _y = parseFloat(value); + } + } + }); + var _type = "pt"; + Object.defineProperty(this, "type", { + enumerable: true, + get: function get() { + return _type; + }, + set: function set(value) { + _type = value.toString(); + } + }); + return this; + }; + + /** + * Rectangle + */ + var Rectangle = function Rectangle(x, y, w, h) { + Point.call(this, x, y); + this.type = "rect"; + var _w = w || 0; + Object.defineProperty(this, "w", { + enumerable: true, + get: function get() { + return _w; + }, + set: function set(value) { + if (!isNaN(value)) { + _w = parseFloat(value); + } + } + }); + var _h = h || 0; + Object.defineProperty(this, "h", { + enumerable: true, + get: function get() { + return _h; + }, + set: function set(value) { + if (!isNaN(value)) { + _h = parseFloat(value); + } + } + }); + return this; + }; + + /** + * FormObject/RenderTarget + */ + + var RenderTarget = function RenderTarget() { + this.page = page; + this.currentPage = currentPage; + this.pages = pages.slice(0); + this.pagesContext = pagesContext.slice(0); + this.x = pageX; + this.y = pageY; + this.matrix = pageMatrix; + this.width = getUnscaledPageWidth(currentPage); + this.height = getUnscaledPageHeight(currentPage); + this.outputDestination = outputDestination; + this.id = ""; // set by endFormObject() + this.objectNumber = -1; // will be set by putXObject() + }; + RenderTarget.prototype.restore = function () { + page = this.page; + currentPage = this.currentPage; + pagesContext = this.pagesContext; + pages = this.pages; + pageX = this.x; + pageY = this.y; + pageMatrix = this.matrix; + setPageWidthWithoutScaling(currentPage, this.width); + setPageHeightWithoutScaling(currentPage, this.height); + outputDestination = this.outputDestination; + }; + var beginNewRenderTarget = function beginNewRenderTarget(x, y, width, height, matrix) { + // save current state + renderTargetStack.push(new RenderTarget()); + + // clear pages + page = currentPage = 0; + pages = []; + pageX = x; + pageY = y; + pageMatrix = matrix; + beginPage([width, height]); + }; + var endFormObject = function endFormObject(key) { + // only add it if it is not already present (the keys provided by the user must be unique!) + if (renderTargetMap[key]) { + renderTargetStack.pop().restore(); + return; + } + + // save the created xObject + var newXObject = new RenderTarget(); + var xObjectId = "Xo" + (Object.keys(renderTargets).length + 1).toString(10); + newXObject.id = xObjectId; + renderTargetMap[key] = xObjectId; + renderTargets[xObjectId] = newXObject; + events.publish("addFormObject", newXObject); + + // restore state from stack + renderTargetStack.pop().restore(); + }; + + /** + * Starts a new pdf form object, which means that all consequent draw calls target a new independent object + * until {@link endFormObject} is called. The created object can be referenced and drawn later using + * {@link doFormObject}. Nested form objects are possible. + * x, y, width, height set the bounding box that is used to clip the content. + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to + * the parent's. + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name beginFormObject + */ + API.beginFormObject = function (x, y, width, height, matrix) { + // The user can set the output target to a new form object. Nested form objects are possible. + // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as + // the PDF-Spec states: + // "In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which + // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions, + // form XObjects may be independent of the content streams in which they appear, and this is strongly + // recommended although not required" + beginNewRenderTarget(x, y, width, height, matrix); + return this; + }; + + /** + * Completes and saves the form object. + * @param {String} key The key by which this form object can be referenced. + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name endFormObject + */ + API.endFormObject = function (key) { + endFormObject(key); + return this; + }; + + /** + * Draws the specified form object by referencing to the respective pdf XObject created with + * {@link API.beginFormObject} and {@link endFormObject}. + * The location is determined by matrix. + * + * @param {String} key The key to the form object. + * @param {Matrix} matrix The matrix applied before drawing the form object. + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name doFormObject + */ + API.doFormObject = function (key, matrix) { + var xObject = renderTargets[renderTargetMap[key]]; + out("q"); + out(matrix.toString() + " cm"); + out("/" + xObject.id + " Do"); + out("Q"); + return this; + }; + + /** + * Returns the form object specified by key. + * @param key {String} + * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}} + * @function + * @returns {jsPDF} + * @memberof jsPDF# + * @name getFormObject + */ + API.getFormObject = function (key) { + var xObject = renderTargets[renderTargetMap[key]]; + return { + x: xObject.x, + y: xObject.y, + width: xObject.width, + height: xObject.height, + matrix: xObject.matrix + }; + }; + + /** + * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf'). + * Uses FileSaver.js-method saveAs. + * + * @memberof jsPDF# + * @name save + * @function + * @instance + * @param {string} filename The filename including extension. + * @param {Object} options An Object with additional options, possible options: 'returnPromise'. + * @returns {jsPDF|Promise} jsPDF-instance */ + API.save = function (filename, options) { + filename = filename || "generated.pdf"; + options = options || {}; + options.returnPromise = options.returnPromise || false; + if (options.returnPromise === false) { + saveAs(getBlob(buildDocument()), filename); + if (typeof saveAs.unload === "function") { + if (globalObject.setTimeout) { + setTimeout(saveAs.unload, 911); + } + } + return this; + } else { + return new Promise(function (resolve, reject) { + try { + var result = saveAs(getBlob(buildDocument()), filename); + if (typeof saveAs.unload === "function") { + if (globalObject.setTimeout) { + setTimeout(saveAs.unload, 911); + } + } + resolve(result); + } catch (e) { + reject(e.message); + } + }); + } + }; + + // applying plugins (more methods) ON TOP of built-in API. + // this is intentional as we allow plugins to override + // built-ins + for (var plugin in jsPDF.API) { + if (jsPDF.API.hasOwnProperty(plugin)) { + if (plugin === "events" && jsPDF.API.events.length) { + (function (events, newEvents) { + // jsPDF.API.events is a JS Array of Arrays + // where each Array is a pair of event name, handler + // Events were added by plugins to the jsPDF instantiator. + // These are always added to the new instance and some ran + // during instantiation. + var eventname, handler_and_args, i; + for (i = newEvents.length - 1; i !== -1; i--) { + // subscribe takes 3 args: 'topic', function, runonce_flag + // if undefined, runonce is false. + // users can attach callback directly, + // or they can attach an array with [callback, runonce_flag] + // that's what the "apply" magic is for below. + eventname = newEvents[i][0]; + handler_and_args = newEvents[i][1]; + events.subscribe.apply(events, [eventname].concat(typeof handler_and_args === "function" ? [handler_and_args] : handler_and_args)); + } + })(events, jsPDF.API.events); + } else { + API[plugin] = jsPDF.API[plugin]; + } + } + } + function getUnscaledPageWidth(pageNumber) { + return pagesContext[pageNumber].mediaBox.topRightX - pagesContext[pageNumber].mediaBox.bottomLeftX; + } + function setPageWidthWithoutScaling(pageNumber, value) { + pagesContext[pageNumber].mediaBox.topRightX = value + pagesContext[pageNumber].mediaBox.bottomLeftX; + } + function getUnscaledPageHeight(pageNumber) { + return pagesContext[pageNumber].mediaBox.topRightY - pagesContext[pageNumber].mediaBox.bottomLeftY; + } + function setPageHeightWithoutScaling(pageNumber, value) { + pagesContext[pageNumber].mediaBox.topRightY = value + pagesContext[pageNumber].mediaBox.bottomLeftY; + } + var getPageWidth = API.getPageWidth = function (pageNumber) { + pageNumber = pageNumber || currentPage; + return getUnscaledPageWidth(pageNumber) / scaleFactor; + }; + var setPageWidth = API.setPageWidth = function (pageNumber, value) { + setPageWidthWithoutScaling(pageNumber, value * scaleFactor); + }; + var getPageHeight = API.getPageHeight = function (pageNumber) { + pageNumber = pageNumber || currentPage; + return getUnscaledPageHeight(pageNumber) / scaleFactor; + }; + var setPageHeight = API.setPageHeight = function (pageNumber, value) { + setPageHeightWithoutScaling(pageNumber, value * scaleFactor); + }; + + /** + * Object exposing internal API to plugins + * @public + * @ignore + */ + API.internal = { + pdfEscape: pdfEscape, + getStyle: getStyle, + getFont: getFontEntry, + getFontSize: getFontSize, + getCharSpace: getCharSpace, + getTextColor: getTextColor, + getLineHeight: getLineHeight, + getLineHeightFactor: getLineHeightFactor, + getLineWidth: getLineWidth, + write: write, + getHorizontalCoordinate: getHorizontalCoordinate, + getVerticalCoordinate: getVerticalCoordinate, + getCoordinateString: getHorizontalCoordinateString, + getVerticalCoordinateString: getVerticalCoordinateString, + collections: {}, + newObject: newObject, + newAdditionalObject: newAdditionalObject, + newObjectDeferred: newObjectDeferred, + newObjectDeferredBegin: newObjectDeferredBegin, + getFilters: getFilters, + putStream: putStream, + events: events, + scaleFactor: scaleFactor, + pageSize: { + getWidth: function getWidth() { + return getPageWidth(currentPage); + }, + setWidth: function setWidth(value) { + setPageWidth(currentPage, value); + }, + getHeight: function getHeight() { + return getPageHeight(currentPage); + }, + setHeight: function setHeight(value) { + setPageHeight(currentPage, value); + } + }, + encryptionOptions: encryptionOptions, + encryption: encryption, + getEncryptor: getEncryptor, + output: output, + getNumberOfPages: getNumberOfPages, + pages: pages, + out: out, + f2: f2, + f3: f3, + getPageInfo: getPageInfo, + getPageInfoByObjId: getPageInfoByObjId, + getCurrentPageInfo: getCurrentPageInfo, + getPDFVersion: getPdfVersion, + Point: Point, + Rectangle: Rectangle, + Matrix: Matrix, + hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them. + }; + Object.defineProperty(API.internal.pageSize, "width", { + get: function get() { + return getPageWidth(currentPage); + }, + set: function set(value) { + setPageWidth(currentPage, value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(API.internal.pageSize, "height", { + get: function get() { + return getPageHeight(currentPage); + }, + set: function set(value) { + setPageHeight(currentPage, value); + }, + enumerable: true, + configurable: true + }); + + ////////////////////////////////////////////////////// + // continuing initialization of jsPDF Document object + ////////////////////////////////////////////////////// + // Add the first page automatically + addFonts.call(API, standardFonts); + activeFontKey = "F1"; + _addPage(format, orientation); + events.publish("initialized"); + return API; + } + + /** + * jsPDF.API is a STATIC property of jsPDF class. + * jsPDF.API is an object you can add methods and properties to. + * The methods / properties you add will show up in new jsPDF objects. + * + * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics, + * callbacks to this object. These will be reassigned to all new instances of jsPDF. + * + * @static + * @public + * @memberof jsPDF# + * @name API + * + * @example + * jsPDF.API.mymethod = function(){ + * // 'this' will be ref to internal API object. see jsPDF source + * // , so you can refer to built-in methods like so: + * // this.line(....) + * // this.text(....) + * } + * var pdfdoc = new jsPDF() + * pdfdoc.mymethod() // <- !!!!!! + */ + jsPDF.API = { + events: [] + }; + /** + * The version of jsPDF. + * @name version + * @type {string} + * @memberof jsPDF# + */ + jsPDF.version = "3.0.3"; + + var jsPDFAPI = jsPDF.API; + var scaleFactor = 1; + var pdfEscape = function pdfEscape(value) { + return value.replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)"); + }; + var pdfUnescape = function pdfUnescape(value) { + return value.replace(/\\\\/g, "\\").replace(/\\\(/g, "(").replace(/\\\)/g, ")"); + }; + var f2 = function f2(number) { + return number.toFixed(2); // Ie, %.2f + }; + var f5 = function f5(number) { + return number.toFixed(5); // Ie, %.2f + }; + jsPDFAPI.__acroform__ = {}; + var inherit = function inherit(child, parent) { + child.prototype = Object.create(parent.prototype); + child.prototype.constructor = child; + }; + var scale = function scale(x) { + return x * scaleFactor; + }; + var createFormXObject = function createFormXObject(formObject) { + var xobj = new AcroFormXObject(); + var height = AcroFormAppearance.internal.getHeight(formObject) || 0; + var width = AcroFormAppearance.internal.getWidth(formObject) || 0; + xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))]; + return xobj; + }; + + /** + * Bit-Operations + */ + var setBit = jsPDFAPI.__acroform__.setBit = function (number, bitPosition) { + number = number || 0; + bitPosition = bitPosition || 0; + if (isNaN(number) || isNaN(bitPosition)) { + throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit"); + } + var bitMask = 1 << bitPosition; + number |= bitMask; + return number; + }; + var clearBit = jsPDFAPI.__acroform__.clearBit = function (number, bitPosition) { + number = number || 0; + bitPosition = bitPosition || 0; + if (isNaN(number) || isNaN(bitPosition)) { + throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit"); + } + var bitMask = 1 << bitPosition; + number &= ~bitMask; + return number; + }; + var getBit = jsPDFAPI.__acroform__.getBit = function (number, bitPosition) { + if (isNaN(number) || isNaN(bitPosition)) { + throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit"); + } + return (number & 1 << bitPosition) === 0 ? 0 : 1; + }; + + /* + * Ff starts counting the bit position at 1 and not like javascript at 0 + */ + var getBitForPdf = jsPDFAPI.__acroform__.getBitForPdf = function (number, bitPosition) { + if (isNaN(number) || isNaN(bitPosition)) { + throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf"); + } + return getBit(number, bitPosition - 1); + }; + var setBitForPdf = jsPDFAPI.__acroform__.setBitForPdf = function (number, bitPosition) { + if (isNaN(number) || isNaN(bitPosition)) { + throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf"); + } + return setBit(number, bitPosition - 1); + }; + var clearBitForPdf = jsPDFAPI.__acroform__.clearBitForPdf = function (number, bitPosition) { + if (isNaN(number) || isNaN(bitPosition)) { + throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf"); + } + return clearBit(number, bitPosition - 1); + }; + var calculateCoordinates = jsPDFAPI.__acroform__.calculateCoordinates = function (args, scope) { + var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate; + var getVerticalCoordinate = scope.internal.getVerticalCoordinate; + var x = args[0]; + var y = args[1]; + var w = args[2]; + var h = args[3]; + var coordinates = {}; + coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0; + coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0; + coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0; + coordinates.upperRight_Y = getVerticalCoordinate(y) || 0; + return [Number(f2(coordinates.lowerLeft_X)), Number(f2(coordinates.lowerLeft_Y)), Number(f2(coordinates.upperRight_X)), Number(f2(coordinates.upperRight_Y))]; + }; + var calculateAppearanceStream = function calculateAppearanceStream(formObject) { + if (formObject.appearanceStreamContent) { + return formObject.appearanceStreamContent; + } + if (!formObject.V && !formObject.DV) { + return; + } + + // else calculate it + + var stream = []; + var text = formObject._V || formObject.DV; + var calcRes = calculateX(formObject, text); + var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id; + + //PDF 32000-1:2008, page 444 + stream.push("/Tx BMC"); + stream.push("q"); + stream.push("BT"); // Begin Text + stream.push(formObject.scope.__private__.encodeColorString(formObject.color)); + stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf"); + stream.push("1 0 0 1 0 0 Tm"); // Transformation Matrix + stream.push(calcRes.text); + stream.push("ET"); // End Text + stream.push("Q"); + stream.push("EMC"); + var appearanceStreamContent = createFormXObject(formObject); + appearanceStreamContent.scope = formObject.scope; + appearanceStreamContent.stream = stream.join("\n"); + return appearanceStreamContent; + }; + var calculateX = function calculateX(formObject, text) { + var maxFontSize = formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize; + var returnValue = { + text: "", + fontSize: "" + }; + // Remove Brackets + text = text.substr(0, 1) == "(" ? text.substr(1) : text; + text = text.substr(text.length - 1) == ")" ? text.substr(0, text.length - 1) : text; + // split into array of words + var textSplit = text.split(" "); + if (formObject.multiline) { + textSplit = textSplit.map(function (word) { + return word.split("\n"); + }); + } else { + textSplit = textSplit.map(function (word) { + return [word]; + }); + } + var fontSize = maxFontSize; // The Starting fontSize (The Maximum) + var lineSpacing = 2; + var borderPadding = 2; + var height = AcroFormAppearance.internal.getHeight(formObject) || 0; + height = height < 0 ? -height : height; + var width = AcroFormAppearance.internal.getWidth(formObject) || 0; + width = width < 0 ? -width : width; + var isSmallerThanWidth = function isSmallerThanWidth(i, lastLine, fontSize) { + if (i + 1 < textSplit.length) { + var tmp = lastLine + " " + textSplit[i + 1][0]; + var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width; + var FieldWidth = width - 2 * borderPadding; + return TextWidth <= FieldWidth; + } else { + return false; + } + }; + fontSize++; + FontSize: while (fontSize > 0) { + text = ""; + fontSize--; + var textHeight = calculateFontSpace("3", formObject, fontSize).height; + var startY = formObject.multiline ? height - fontSize : (height - textHeight) / 2; + startY += lineSpacing; + var startX; + var lastY = startY; + var firstWordInLine = 0, + lastWordInLine = 0; + var lastLength; + var currWord = 0; + if (fontSize <= 0) { + // In case, the Text doesn't fit at all + fontSize = 12; + text = "(...) Tj\n"; + text += "% Width of Text: " + calculateFontSpace(text, formObject, fontSize).width + ", FieldWidth:" + width + "\n"; + break; + } + var lastLine = ""; + var lineCount = 0; + Line: for (var i = 0; i < textSplit.length; i++) { + if (textSplit.hasOwnProperty(i)) { + var isWithNewLine = false; + if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) { + if ((textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) { + continue FontSize; + } + lastLine += textSplit[i][currWord]; + isWithNewLine = true; + lastWordInLine = i; + i--; + } else { + lastLine += textSplit[i][currWord] + " "; + lastLine = lastLine.substr(lastLine.length - 1) == " " ? lastLine.substr(0, lastLine.length - 1) : lastLine; + var key = parseInt(i); + var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize); + var isLastWord = i >= textSplit.length - 1; + if (nextLineIsSmaller && !isLastWord) { + lastLine += " "; + currWord = 0; + continue; // Line + } else if (!nextLineIsSmaller && !isLastWord) { + if (!formObject.multiline) { + continue FontSize; + } else { + if ((textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) { + // If the Text is higher than the + // FieldObject + continue FontSize; + } + lastWordInLine = key; + // go on + } + } else if (isLastWord) { + lastWordInLine = key; + } else { + if (formObject.multiline && (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) { + // If the Text is higher than the FieldObject + continue FontSize; + } + } + } + // Remove last blank + + var line = ""; + for (var x = firstWordInLine; x <= lastWordInLine; x++) { + var currLine = textSplit[x]; + if (formObject.multiline) { + if (x === lastWordInLine) { + line += currLine[currWord] + " "; + currWord = (currWord + 1) % currLine.length; + continue; + } + if (x === firstWordInLine) { + line += currLine[currLine.length - 1] + " "; + continue; + } + } + line += currLine[0] + " "; + } + + // Remove last blank + line = line.substr(line.length - 1) == " " ? line.substr(0, line.length - 1) : line; + // lastLength -= blankSpace.width; + lastLength = calculateFontSpace(line, formObject, fontSize).width; + + // Calculate startX + switch (formObject.textAlign) { + case "right": + startX = width - lastLength - borderPadding; + break; + case "center": + startX = (width - lastLength) / 2; + break; + case "left": + default: + startX = borderPadding; + break; + } + text += f2(startX) + " " + f2(lastY) + " Td\n"; + text += "(" + pdfEscape(line) + ") Tj\n"; + // reset X in PDF + text += -f2(startX) + " 0 Td\n"; + + // After a Line, adjust y position + lastY = -(fontSize + lineSpacing); + + // Reset for next iteration step + lastLength = 0; + firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1; + lineCount++; + lastLine = ""; + continue Line; + } + } + break; + } + returnValue.text = text; + returnValue.fontSize = fontSize; + return returnValue; + }; + + /** + * Small workaround for calculating the TextMetric approximately. + * + * @param text + * @param fontsize + * @returns {TextMetrics} (Has Height and Width) + */ + var calculateFontSpace = function calculateFontSpace(text, formObject, fontSize) { + var font = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle); + var width = formObject.scope.getStringUnitWidth(text, { + font: font, + fontSize: parseFloat(fontSize), + charSpace: 0 + }) * parseFloat(fontSize); + var height = formObject.scope.getStringUnitWidth("3", { + font: font, + fontSize: parseFloat(fontSize), + charSpace: 0 + }) * parseFloat(fontSize) * 1.5; + return { + height: height, + width: width + }; + }; + var acroformPluginTemplate = { + fields: [], + xForms: [], + /** + * acroFormDictionaryRoot contains information about the AcroForm + * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has + * 1: The Object ID of the Root + */ + acroFormDictionaryRoot: null, + /** + * After the PDF gets evaluated, the reference to the root has to be + * reset, this indicates, whether the root has already been printed + * out + */ + printedOut: false, + internal: null, + isInitialized: false + }; + var annotReferenceCallback = function annotReferenceCallback(scope) { + //set objId to undefined and force it to get a new objId on buildDocument + scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined; + var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields; + for (var i in fields) { + if (fields.hasOwnProperty(i)) { + var formObject = fields[i]; + //set objId to undefined and force it to get a new objId on buildDocument + formObject.objId = undefined; + // add Annot Reference! + if (formObject.hasAnnotation) { + // If theres an Annotation Widget in the Form Object, put the + // Reference in the /Annot array + createAnnotationReference(formObject, scope); + } + } + } + }; + var putForm = function putForm(formObject) { + if (formObject.scope.internal.acroformPlugin.printedOut) { + formObject.scope.internal.acroformPlugin.printedOut = false; + formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null; + } + formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(formObject); + }; + /** + * Create the Reference to the widgetAnnotation, so that it gets referenced + * in the Annot[] int the+ (Requires the Annotation Plugin) + */ + var createAnnotationReference = function createAnnotationReference(object, scope) { + var options = { + type: "reference", + object: object + }; + var findEntry = function findEntry(entry) { + return entry.type === options.type && entry.object === options.object; + }; + if (scope.internal.getPageInfo(object.page).pageContext.annotations.find(findEntry) === undefined) { + scope.internal.getPageInfo(object.page).pageContext.annotations.push(options); + } + }; + + // Callbacks + + var putCatalogCallback = function putCatalogCallback(scope) { + // Put reference to AcroForm to DocumentCatalog + if (typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== "undefined") { + // for safety, shouldn't normally be the case + scope.internal.write("/AcroForm " + scope.internal.acroformPlugin.acroFormDictionaryRoot.objId + " " + 0 + " R"); + } else { + throw new Error("putCatalogCallback: Root missing."); + } + }; + + /** + * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm + * Dictionary + */ + var AcroFormDictionaryCallback = function AcroFormDictionaryCallback(scope) { + // Remove event + scope.internal.events.unsubscribe(scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID); + delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID; + scope.internal.acroformPlugin.printedOut = true; + }; + + /** + * Creates the single Fields and writes them into the Document + * + * If fieldArray is set, use the fields that are inside it instead of the + * fields from the AcroRoot (for the FormXObjects...) + */ + var createFieldCallback = function createFieldCallback(fieldArray, scope) { + var standardFields = !fieldArray; + if (!fieldArray) { + // in case there is no fieldArray specified, we want to print out + // the Fields of the AcroForm + // Print out Root + scope.internal.newObjectDeferredBegin(scope.internal.acroformPlugin.acroFormDictionaryRoot.objId, true); + scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream(); + } + fieldArray = fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids; + for (var i in fieldArray) { + if (fieldArray.hasOwnProperty(i)) { + var fieldObject = fieldArray[i]; + var keyValueList = []; + var oldRect = fieldObject.Rect; + if (fieldObject.Rect) { + fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope); + } + + // Start Writing the Object + scope.internal.newObjectDeferredBegin(fieldObject.objId, true); + fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(fieldObject); + if (_typeof(fieldObject) === "object" && typeof fieldObject.getKeyValueListForStream === "function") { + keyValueList = fieldObject.getKeyValueListForStream(); + } + fieldObject.Rect = oldRect; + if (fieldObject.hasAppearanceStream && !fieldObject.appearanceStreamContent) { + // Calculate Appearance + var appearance = calculateAppearanceStream(fieldObject); + keyValueList.push({ + key: "AP", + value: "<>" + }); + scope.internal.acroformPlugin.xForms.push(appearance); + } + + // Assume AppearanceStreamContent is a Array with N,R,D (at least + // one of them!) + if (fieldObject.appearanceStreamContent) { + var appearanceStreamString = ""; + // Iterate over N,R and D + for (var k in fieldObject.appearanceStreamContent) { + if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) { + var value = fieldObject.appearanceStreamContent[k]; + appearanceStreamString += "/" + k + " "; + appearanceStreamString += "<<"; + if (Object.keys(value).length >= 1 || Array.isArray(value)) { + // appearanceStream is an Array or Object! + for (var i in value) { + if (value.hasOwnProperty(i)) { + var obj = value[i]; + if (typeof obj === "function") { + // if Function is referenced, call it in order + // to get the FormXObject + obj = obj.call(scope, fieldObject); + } + appearanceStreamString += "/" + i + " " + obj + " "; + + // In case the XForm is already used, e.g. OffState + // of CheckBoxes, don't add it + if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0)) scope.internal.acroformPlugin.xForms.push(obj); + } + } + } else { + obj = value; + if (typeof obj === "function") { + // if Function is referenced, call it in order to + // get the FormXObject + obj = obj.call(scope, fieldObject); + } + appearanceStreamString += "/" + i + " " + obj; + if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0)) scope.internal.acroformPlugin.xForms.push(obj); + } + appearanceStreamString += ">>"; + } + } + + // appearance stream is a normal Object.. + keyValueList.push({ + key: "AP", + value: "<<\n" + appearanceStreamString + ">>" + }); + } + scope.internal.putStream({ + additionalKeyValues: keyValueList, + objectId: fieldObject.objId + }); + scope.internal.out("endobj"); + } + } + if (standardFields) { + createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope); + } + }; + var createXFormObjectCallback = function createXFormObjectCallback(fieldArray, scope) { + for (var i in fieldArray) { + if (fieldArray.hasOwnProperty(i)) { + var key = i; + var fieldObject = fieldArray[i]; + // Start Writing the Object + scope.internal.newObjectDeferredBegin(fieldObject.objId, true); + if (_typeof(fieldObject) === "object" && typeof fieldObject.putStream === "function") { + fieldObject.putStream(); + } + delete fieldArray[key]; + } + } + }; + var initializeAcroForm = function initializeAcroForm(scope, formObject) { + formObject.scope = scope; + if (scope.internal !== undefined && (scope.internal.acroformPlugin === undefined || scope.internal.acroformPlugin.isInitialized === false)) { + AcroFormField.FieldNum = 0; + scope.internal.acroformPlugin = JSON.parse(JSON.stringify(acroformPluginTemplate)); + if (scope.internal.acroformPlugin.acroFormDictionaryRoot) { + throw new Error("Exception while creating AcroformDictionary"); + } + scaleFactor = scope.internal.scaleFactor; + // The Object Number of the AcroForm Dictionary + scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary(); + scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope; + + // add Callback for creating the AcroForm Dictionary + scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe("postPutResources", function () { + AcroFormDictionaryCallback(scope); + }); + scope.internal.events.subscribe("buildDocument", function () { + annotReferenceCallback(scope); + }); // buildDocument + + // Register event, that is triggered when the DocumentCatalog is + // written, in order to add /AcroForm + + scope.internal.events.subscribe("putCatalog", function () { + putCatalogCallback(scope); + }); + + // Register event, that creates all Fields + scope.internal.events.subscribe("postPutPages", function (fieldArray) { + createFieldCallback(fieldArray, scope); + }); + scope.internal.acroformPlugin.isInitialized = true; + } + }; + + //PDF 32000-1:2008, page 26, 7.3.6 + var arrayToPdfArray = jsPDFAPI.__acroform__.arrayToPdfArray = function (array, objId, scope) { + var encryptor = function encryptor(data) { + return data; + }; + if (Array.isArray(array)) { + var content = "["; + for (var i = 0; i < array.length; i++) { + if (i !== 0) { + content += " "; + } + switch (_typeof(array[i])) { + case "boolean": + case "number": + case "object": + content += array[i].toString(); + break; + case "string": + if (array[i].substr(0, 1) !== "/") { + if (typeof objId !== "undefined" && scope) encryptor = scope.internal.getEncryptor(objId); + content += "(" + pdfEscape(encryptor(array[i].toString())) + ")"; + } else { + content += array[i].toString(); + } + break; + } + } + content += "]"; + return content; + } + throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray"); + }; + function getMatches(string, regex, index) { + index || (index = 1); // default to the first capturing group + var matches = []; + var match; + while (match = regex.exec(string)) { + matches.push(match[index]); + } + return matches; + } + var pdfArrayToStringArray = function pdfArrayToStringArray(array) { + var result = []; + if (typeof array === "string") { + result = getMatches(array, /\((.*?)\)/g); + } + return result; + }; + var toPdfString = function toPdfString(string, objId, scope) { + var encryptor = function encryptor(data) { + return data; + }; + if (typeof objId !== "undefined" && scope) encryptor = scope.internal.getEncryptor(objId); + string = string || ""; + string.toString(); + string = "(" + pdfEscape(encryptor(string)) + ")"; + return string; + }; + + // ########################## + // Classes + // ########################## + + /** + * @class AcroFormPDFObject + * @classdesc A AcroFormPDFObject + */ + var AcroFormPDFObject = function AcroFormPDFObject() { + this._objId = undefined; + this._scope = undefined; + + /** + * @name AcroFormPDFObject#objId + * @type {any} + */ + Object.defineProperty(this, "objId", { + get: function get() { + if (typeof this._objId === "undefined") { + if (typeof this.scope === "undefined") { + return undefined; + } + this._objId = this.scope.internal.newObjectDeferred(); + } + return this._objId; + }, + set: function set(value) { + this._objId = value; + } + }); + Object.defineProperty(this, "scope", { + value: this._scope, + writable: true + }); + }; + + /** + * @function AcroFormPDFObject.toString + */ + AcroFormPDFObject.prototype.toString = function () { + return this.objId + " 0 R"; + }; + AcroFormPDFObject.prototype.putStream = function () { + var keyValueList = this.getKeyValueListForStream(); + this.scope.internal.putStream({ + data: this.stream, + additionalKeyValues: keyValueList, + objectId: this.objId + }); + this.scope.internal.out("endobj"); + }; + + /** + * Returns an key-value-List of all non-configurable Variables from the Object + * + * @name getKeyValueListForStream + * @returns {string} + */ + AcroFormPDFObject.prototype.getKeyValueListForStream = function () { + var keyValueList = []; + var keys = Object.getOwnPropertyNames(this).filter(function (key) { + return key != "content" && key != "appearanceStreamContent" && key != "scope" && key != "objId" && key.substring(0, 1) != "_"; + }); + for (var i in keys) { + if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) { + var key = keys[i]; + var value = this[key]; + if (value) { + if (Array.isArray(value)) { + keyValueList.push({ + key: key, + value: arrayToPdfArray(value, this.objId, this.scope) + }); + } else if (value instanceof AcroFormPDFObject) { + // In case it is a reference to another PDFObject, + // take the reference number + value.scope = this.scope; + keyValueList.push({ + key: key, + value: value.objId + " 0 R" + }); + } else if (typeof value !== "function") { + keyValueList.push({ + key: key, + value: value + }); + } + } + } + } + return keyValueList; + }; + var AcroFormXObject = function AcroFormXObject() { + AcroFormPDFObject.call(this); + Object.defineProperty(this, "Type", { + value: "/XObject", + configurable: false, + writable: true + }); + Object.defineProperty(this, "Subtype", { + value: "/Form", + configurable: false, + writable: true + }); + Object.defineProperty(this, "FormType", { + value: 1, + configurable: false, + writable: true + }); + var _BBox = []; + Object.defineProperty(this, "BBox", { + configurable: false, + get: function get() { + return _BBox; + }, + set: function set(value) { + _BBox = value; + } + }); + Object.defineProperty(this, "Resources", { + value: "2 0 R", + configurable: false, + writable: true + }); + var _stream; + Object.defineProperty(this, "stream", { + enumerable: false, + configurable: true, + set: function set(value) { + _stream = value.trim(); + }, + get: function get() { + if (_stream) { + return _stream; + } else { + return null; + } + } + }); + }; + inherit(AcroFormXObject, AcroFormPDFObject); + var AcroFormDictionary = function AcroFormDictionary() { + AcroFormPDFObject.call(this); + var _Kids = []; + Object.defineProperty(this, "Kids", { + enumerable: false, + configurable: true, + get: function get() { + if (_Kids.length > 0) { + return _Kids; + } else { + return undefined; + } + } + }); + Object.defineProperty(this, "Fields", { + enumerable: false, + configurable: false, + get: function get() { + return _Kids; + } + }); + + // Default Appearance + var _DA; + Object.defineProperty(this, "DA", { + enumerable: false, + configurable: false, + get: function get() { + if (!_DA) { + return undefined; + } + var encryptor = function encryptor(data) { + return data; + }; + if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId); + return "(" + pdfEscape(encryptor(_DA)) + ")"; + }, + set: function set(value) { + _DA = value; + } + }); + }; + inherit(AcroFormDictionary, AcroFormPDFObject); + + /** + * The Field Object contains the Variables, that every Field needs + * + * @class AcroFormField + * @classdesc An AcroForm FieldObject + */ + var AcroFormField = function AcroFormField() { + AcroFormPDFObject.call(this); + + //Annotation-Flag See Table 165 + var _F = 4; + Object.defineProperty(this, "F", { + enumerable: false, + configurable: false, + get: function get() { + return _F; + }, + set: function set(value) { + if (!isNaN(value)) { + _F = value; + } else { + throw new Error('Invalid value "' + value + '" for attribute F supplied.'); + } + } + }); + + /** + * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen. + * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page. + * + * @name AcroFormField#showWhenPrinted + * @default true + * @type {boolean} + */ + Object.defineProperty(this, "showWhenPrinted", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(_F, 3)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.F = setBitForPdf(_F, 3); + } else { + this.F = clearBitForPdf(_F, 3); + } + } + }); + var _Ff = 0; + Object.defineProperty(this, "Ff", { + enumerable: false, + configurable: false, + get: function get() { + return _Ff; + }, + set: function set(value) { + if (!isNaN(value)) { + _Ff = value; + } else { + throw new Error('Invalid value "' + value + '" for attribute Ff supplied.'); + } + } + }); + var _Rect = []; + Object.defineProperty(this, "Rect", { + enumerable: false, + configurable: false, + get: function get() { + if (_Rect.length === 0) { + return undefined; + } + return _Rect; + }, + set: function set(value) { + if (typeof value !== "undefined") { + _Rect = value; + } else { + _Rect = []; + } + } + }); + + /** + * The x-position of the field. + * + * @name AcroFormField#x + * @default null + * @type {number} + */ + Object.defineProperty(this, "x", { + enumerable: true, + configurable: true, + get: function get() { + if (!_Rect || isNaN(_Rect[0])) { + return 0; + } + return _Rect[0]; + }, + set: function set(value) { + _Rect[0] = value; + } + }); + + /** + * The y-position of the field. + * + * @name AcroFormField#y + * @default null + * @type {number} + */ + Object.defineProperty(this, "y", { + enumerable: true, + configurable: true, + get: function get() { + if (!_Rect || isNaN(_Rect[1])) { + return 0; + } + return _Rect[1]; + }, + set: function set(value) { + _Rect[1] = value; + } + }); + + /** + * The width of the field. + * + * @name AcroFormField#width + * @default null + * @type {number} + */ + Object.defineProperty(this, "width", { + enumerable: true, + configurable: true, + get: function get() { + if (!_Rect || isNaN(_Rect[2])) { + return 0; + } + return _Rect[2]; + }, + set: function set(value) { + _Rect[2] = value; + } + }); + + /** + * The height of the field. + * + * @name AcroFormField#height + * @default null + * @type {number} + */ + Object.defineProperty(this, "height", { + enumerable: true, + configurable: true, + get: function get() { + if (!_Rect || isNaN(_Rect[3])) { + return 0; + } + return _Rect[3]; + }, + set: function set(value) { + _Rect[3] = value; + } + }); + var _FT = ""; + Object.defineProperty(this, "FT", { + enumerable: true, + configurable: false, + get: function get() { + return _FT; + }, + set: function set(value) { + switch (value) { + case "/Btn": + case "/Tx": + case "/Ch": + case "/Sig": + _FT = value; + break; + default: + throw new Error('Invalid value "' + value + '" for attribute FT supplied.'); + } + } + }); + var _T = null; + Object.defineProperty(this, "T", { + enumerable: true, + configurable: false, + get: function get() { + if (!_T || _T.length < 1) { + // In case of a Child from a Radio´Group, you don't need a FieldName + if (this instanceof AcroFormChildClass) { + return undefined; + } + _T = "FieldObject" + AcroFormField.FieldNum++; + } + var encryptor = function encryptor(data) { + return data; + }; + if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId); + return "(" + pdfEscape(encryptor(_T)) + ")"; + }, + set: function set(value) { + _T = value.toString(); + } + }); + + /** + * (Optional) The partial field name (see 12.7.3.2, “Field Names”). + * + * @name AcroFormField#fieldName + * @default null + * @type {string} + */ + Object.defineProperty(this, "fieldName", { + configurable: true, + enumerable: true, + get: function get() { + return _T; + }, + set: function set(value) { + _T = value; + } + }); + var _fontName = "helvetica"; + /** + * The fontName of the font to be used. + * + * @name AcroFormField#fontName + * @default 'helvetica' + * @type {string} + */ + Object.defineProperty(this, "fontName", { + enumerable: true, + configurable: true, + get: function get() { + return _fontName; + }, + set: function set(value) { + _fontName = value; + } + }); + var _fontStyle = "normal"; + /** + * The fontStyle of the font to be used. + * + * @name AcroFormField#fontStyle + * @default 'normal' + * @type {string} + */ + Object.defineProperty(this, "fontStyle", { + enumerable: true, + configurable: true, + get: function get() { + return _fontStyle; + }, + set: function set(value) { + _fontStyle = value; + } + }); + var _fontSize = 0; + /** + * The fontSize of the font to be used. + * + * @name AcroFormField#fontSize + * @default 0 (for auto) + * @type {number} + */ + Object.defineProperty(this, "fontSize", { + enumerable: true, + configurable: true, + get: function get() { + return _fontSize; + }, + set: function set(value) { + _fontSize = value; + } + }); + var _maxFontSize = undefined; + /** + * The maximum fontSize of the font to be used. + * + * @name AcroFormField#maxFontSize + * @default 0 (for auto) + * @type {number} + */ + Object.defineProperty(this, "maxFontSize", { + enumerable: true, + configurable: true, + get: function get() { + if (_maxFontSize === undefined) { + // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit) + // ("50" is transformed to the "user space" but then used in "pdf space") + return 50 / scaleFactor; + } else { + return _maxFontSize; + } + }, + set: function set(value) { + _maxFontSize = value; + } + }); + var _color = "black"; + /** + * The color of the text + * + * @name AcroFormField#color + * @default 'black' + * @type {string|rgba} + */ + Object.defineProperty(this, "color", { + enumerable: true, + configurable: true, + get: function get() { + return _color; + }, + set: function set(value) { + _color = value; + } + }); + var _DA = "/F1 0 Tf 0 g"; + // Defines the default appearance (Needed for variable Text) + Object.defineProperty(this, "DA", { + enumerable: true, + configurable: false, + get: function get() { + if (!_DA || this instanceof AcroFormChildClass || this instanceof AcroFormTextField) { + return undefined; + } + return toPdfString(_DA, this.objId, this.scope); + }, + set: function set(value) { + value = value.toString(); + _DA = value; + } + }); + var _DV = null; + Object.defineProperty(this, "DV", { + enumerable: false, + configurable: false, + get: function get() { + if (!_DV) { + return undefined; + } + if (this instanceof AcroFormButton === false) { + return toPdfString(_DV, this.objId, this.scope); + } + return _DV; + }, + set: function set(value) { + value = value.toString(); + if (this instanceof AcroFormButton === false) { + if (value.substr(0, 1) === "(") { + _DV = pdfUnescape(value.substr(1, value.length - 2)); + } else { + _DV = pdfUnescape(value); + } + } else { + _DV = value; + } + } + }); + + /** + * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value. + * + * @name AcroFormField#defaultValue + * @default null + * @type {any} + */ + Object.defineProperty(this, "defaultValue", { + enumerable: true, + configurable: true, + get: function get() { + if (this instanceof AcroFormButton === true) { + return pdfUnescape(_DV.substr(1, _DV.length - 1)); + } else { + return _DV; + } + }, + set: function set(value) { + value = value.toString(); + if (this instanceof AcroFormButton === true) { + _DV = "/" + value; + } else { + _DV = value; + } + } + }); + var _V = null; + Object.defineProperty(this, "_V", { + enumerable: false, + configurable: false, + get: function get() { + if (!_V) { + return undefined; + } + return _V; + }, + set: function set(value) { + this.V = value; + } + }); + Object.defineProperty(this, "V", { + enumerable: false, + configurable: false, + get: function get() { + if (!_V) { + return undefined; + } + if (this instanceof AcroFormButton === false) { + return toPdfString(_V, this.objId, this.scope); + } + return _V; + }, + set: function set(value) { + value = value.toString(); + if (this instanceof AcroFormButton === false) { + if (value.substr(0, 1) === "(") { + _V = pdfUnescape(value.substr(1, value.length - 2)); + } else { + _V = pdfUnescape(value); + } + } else { + _V = value; + } + } + }); + + /** + * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information. + * + * @name AcroFormField#value + * @default null + * @type {any} + */ + Object.defineProperty(this, "value", { + enumerable: true, + configurable: true, + get: function get() { + if (this instanceof AcroFormButton === true) { + return pdfUnescape(_V.substr(1, _V.length - 1)); + } else { + return _V; + } + }, + set: function set(value) { + value = value.toString(); + if (this instanceof AcroFormButton === true) { + _V = "/" + value; + } else { + _V = value; + } + } + }); + + /** + * Check if field has annotations + * + * @name AcroFormField#hasAnnotation + * @readonly + * @type {boolean} + */ + Object.defineProperty(this, "hasAnnotation", { + enumerable: true, + configurable: true, + get: function get() { + return this.Rect; + } + }); + Object.defineProperty(this, "Type", { + enumerable: true, + configurable: false, + get: function get() { + return this.hasAnnotation ? "/Annot" : null; + } + }); + Object.defineProperty(this, "Subtype", { + enumerable: true, + configurable: false, + get: function get() { + return this.hasAnnotation ? "/Widget" : null; + } + }); + var _hasAppearanceStream = false; + /** + * true if field has an appearanceStream + * + * @name AcroFormField#hasAppearanceStream + * @readonly + * @type {boolean} + */ + Object.defineProperty(this, "hasAppearanceStream", { + enumerable: true, + configurable: true, + get: function get() { + return _hasAppearanceStream; + }, + set: function set(value) { + value = Boolean(value); + _hasAppearanceStream = value; + } + }); + + /** + * The page on which the AcroFormField is placed + * + * @name AcroFormField#page + * @type {number} + */ + var _page; + Object.defineProperty(this, "page", { + enumerable: true, + configurable: true, + get: function get() { + if (!_page) { + return undefined; + } + return _page; + }, + set: function set(value) { + _page = value; + } + }); + + /** + * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database. + * + * @name AcroFormField#readOnly + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "readOnly", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 1)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 1); + } else { + this.Ff = clearBitForPdf(this.Ff, 1); + } + } + }); + + /** + * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”). + * + * @name AcroFormField#required + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "required", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 2)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 2); + } else { + this.Ff = clearBitForPdf(this.Ff, 2); + } + } + }); + + /** + * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”) + * + * @name AcroFormField#noExport + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "noExport", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 3)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 3); + } else { + this.Ff = clearBitForPdf(this.Ff, 3); + } + } + }); + var _Q = null; + Object.defineProperty(this, "Q", { + enumerable: true, + configurable: false, + get: function get() { + if (_Q === null) { + return undefined; + } + return _Q; + }, + set: function set(value) { + if ([0, 1, 2].indexOf(value) !== -1) { + _Q = value; + } else { + throw new Error('Invalid value "' + value + '" for attribute Q supplied.'); + } + } + }); + + /** + * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text: + * 'left', 'center', 'right' + * + * @name AcroFormField#textAlign + * @default 'left' + * @type {string} + */ + Object.defineProperty(this, "textAlign", { + get: function get() { + var result; + switch (_Q) { + case 0: + default: + result = "left"; + break; + case 1: + result = "center"; + break; + case 2: + result = "right"; + break; + } + return result; + }, + configurable: true, + enumerable: true, + set: function set(value) { + switch (value) { + case "right": + case 2: + _Q = 2; + break; + case "center": + case 1: + _Q = 1; + break; + case "left": + case 0: + default: + _Q = 0; + } + } + }); + }; + inherit(AcroFormField, AcroFormPDFObject); + + /** + * @class AcroFormChoiceField + * @extends AcroFormField + */ + var AcroFormChoiceField = function AcroFormChoiceField() { + AcroFormField.call(this); + // Field Type = Choice Field + this.FT = "/Ch"; + // options + this.V = "()"; + this.fontName = "zapfdingbats"; + // Top Index + var _TI = 0; + Object.defineProperty(this, "TI", { + enumerable: true, + configurable: false, + get: function get() { + return _TI; + }, + set: function set(value) { + _TI = value; + } + }); + + /** + * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0. + * + * @name AcroFormChoiceField#topIndex + * @default 0 + * @type {number} + */ + Object.defineProperty(this, "topIndex", { + enumerable: true, + configurable: true, + get: function get() { + return _TI; + }, + set: function set(value) { + _TI = value; + } + }); + var _Opt = []; + Object.defineProperty(this, "Opt", { + enumerable: true, + configurable: false, + get: function get() { + return arrayToPdfArray(_Opt, this.objId, this.scope); + }, + set: function set(value) { + _Opt = pdfArrayToStringArray(value); + } + }); + + /** + * @memberof AcroFormChoiceField + * @name getOptions + * @function + * @instance + * @returns {array} array of Options + */ + this.getOptions = function () { + return _Opt; + }; + + /** + * @memberof AcroFormChoiceField + * @name setOptions + * @function + * @instance + * @param {array} value + */ + this.setOptions = function (value) { + _Opt = value; + if (this.sort) { + _Opt.sort(); + } + }; + + /** + * @memberof AcroFormChoiceField + * @name addOption + * @function + * @instance + * @param {string} value + */ + this.addOption = function (value) { + value = value || ""; + value = value.toString(); + _Opt.push(value); + if (this.sort) { + _Opt.sort(); + } + }; + + /** + * @memberof AcroFormChoiceField + * @name removeOption + * @function + * @instance + * @param {string} value + * @param {boolean} allEntries (default: false) + */ + this.removeOption = function (value, allEntries) { + allEntries = allEntries || false; + value = value || ""; + value = value.toString(); + while (_Opt.indexOf(value) !== -1) { + _Opt.splice(_Opt.indexOf(value), 1); + if (allEntries === false) { + break; + } + } + }; + + /** + * If set, the field is a combo box; if clear, the field is a list box. + * + * @name AcroFormChoiceField#combo + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "combo", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 18)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 18); + } else { + this.Ff = clearBitForPdf(this.Ff, 18); + } + } + }); + + /** + * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set. + * + * @name AcroFormChoiceField#edit + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "edit", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 19)); + }, + set: function set(value) { + //PDF 32000-1:2008, page 444 + if (this.combo === true) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 19); + } else { + this.Ff = clearBitForPdf(this.Ff, 19); + } + } + } + }); + + /** + * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231). + * + * @name AcroFormChoiceField#sort + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "sort", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 20)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 20); + _Opt.sort(); + } else { + this.Ff = clearBitForPdf(this.Ff, 20); + } + } + }); + + /** + * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected + * + * @name AcroFormChoiceField#multiSelect + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "multiSelect", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 22)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 22); + } else { + this.Ff = clearBitForPdf(this.Ff, 22); + } + } + }); + + /** + * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set. + * + * @name AcroFormChoiceField#doNotSpellCheck + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "doNotSpellCheck", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 23)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 23); + } else { + this.Ff = clearBitForPdf(this.Ff, 23); + } + } + }); + + /** + * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step. + * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field. + * + * @name AcroFormChoiceField#commitOnSelChange + * @default false + * @type {boolean} + */ + Object.defineProperty(this, "commitOnSelChange", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 27)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 27); + } else { + this.Ff = clearBitForPdf(this.Ff, 27); + } + } + }); + this.hasAppearanceStream = false; + }; + inherit(AcroFormChoiceField, AcroFormField); + + /** + * @class AcroFormListBox + * @extends AcroFormChoiceField + * @extends AcroFormField + */ + var AcroFormListBox = function AcroFormListBox() { + AcroFormChoiceField.call(this); + this.fontName = "helvetica"; + + //PDF 32000-1:2008, page 444 + this.combo = false; + }; + inherit(AcroFormListBox, AcroFormChoiceField); + + /** + * @class AcroFormComboBox + * @extends AcroFormListBox + * @extends AcroFormChoiceField + * @extends AcroFormField + */ + var AcroFormComboBox = function AcroFormComboBox() { + AcroFormListBox.call(this); + this.combo = true; + }; + inherit(AcroFormComboBox, AcroFormListBox); + + /** + * @class AcroFormEditBox + * @extends AcroFormComboBox + * @extends AcroFormListBox + * @extends AcroFormChoiceField + * @extends AcroFormField + */ + var AcroFormEditBox = function AcroFormEditBox() { + AcroFormComboBox.call(this); + this.edit = true; + }; + inherit(AcroFormEditBox, AcroFormComboBox); + + /** + * @class AcroFormButton + * @extends AcroFormField + */ + var AcroFormButton = function AcroFormButton() { + AcroFormField.call(this); + this.FT = "/Btn"; + + /** + * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected. + * + * @name AcroFormButton#noToggleToOff + * @type {boolean} + */ + Object.defineProperty(this, "noToggleToOff", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 15)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 15); + } else { + this.Ff = clearBitForPdf(this.Ff, 15); + } + } + }); + + /** + * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear. + * + * @name AcroFormButton#radio + * @type {boolean} + */ + Object.defineProperty(this, "radio", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 16)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 16); + } else { + this.Ff = clearBitForPdf(this.Ff, 16); + } + } + }); + + /** + * If set, the field is a pushbutton that does not retain a permanent value. + * + * @name AcroFormButton#pushButton + * @type {boolean} + */ + Object.defineProperty(this, "pushButton", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 17)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 17); + } else { + this.Ff = clearBitForPdf(this.Ff, 17); + } + } + }); + + /** + * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons). + * + * @name AcroFormButton#radioIsUnison + * @type {boolean} + */ + Object.defineProperty(this, "radioIsUnison", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 26)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 26); + } else { + this.Ff = clearBitForPdf(this.Ff, 26); + } + } + }); + var _MK = {}; + Object.defineProperty(this, "MK", { + enumerable: false, + configurable: false, + get: function get() { + var encryptor = function encryptor(data) { + return data; + }; + if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId); + if (Object.keys(_MK).length !== 0) { + var result = []; + result.push("<<"); + var key; + for (key in _MK) { + result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")"); + } + result.push(">>"); + return result.join("\n"); + } + return undefined; + }, + set: function set(value) { + if (_typeof(value) === "object") { + _MK = value; + } + } + }); + + /** + * From the PDF reference: + * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user. + * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields"). + * + * - '8' = Cross, + * - 'l' = Circle, + * - '' = nothing + * @name AcroFormButton#caption + * @type {string} + */ + Object.defineProperty(this, "caption", { + enumerable: true, + configurable: true, + get: function get() { + return _MK.CA || ""; + }, + set: function set(value) { + if (typeof value === "string") { + _MK.CA = value; + } + } + }); + var _AS; + Object.defineProperty(this, "AS", { + enumerable: false, + configurable: false, + get: function get() { + return _AS; + }, + set: function set(value) { + _AS = value; + } + }); + + /** + * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams") + * + * @name AcroFormButton#appearanceState + * @type {any} + */ + Object.defineProperty(this, "appearanceState", { + enumerable: true, + configurable: true, + get: function get() { + return _AS.substr(1, _AS.length - 1); + }, + set: function set(value) { + _AS = "/" + value; + } + }); + }; + inherit(AcroFormButton, AcroFormField); + + /** + * @class AcroFormPushButton + * @extends AcroFormButton + * @extends AcroFormField + */ + var AcroFormPushButton = function AcroFormPushButton() { + AcroFormButton.call(this); + this.pushButton = true; + }; + inherit(AcroFormPushButton, AcroFormButton); + + /** + * @class AcroFormRadioButton + * @extends AcroFormButton + * @extends AcroFormField + */ + var AcroFormRadioButton = function AcroFormRadioButton() { + AcroFormButton.call(this); + this.radio = true; + this.pushButton = false; + var _Kids = []; + Object.defineProperty(this, "Kids", { + enumerable: true, + configurable: false, + get: function get() { + return _Kids; + }, + set: function set(value) { + if (typeof value !== "undefined") { + _Kids = value; + } else { + _Kids = []; + } + } + }); + }; + inherit(AcroFormRadioButton, AcroFormButton); + + /** + * The Child class of a RadioButton (the radioGroup) -> The single Buttons + * + * @class AcroFormChildClass + * @extends AcroFormField + * @ignore + */ + var AcroFormChildClass = function AcroFormChildClass() { + AcroFormField.call(this); + var _parent; + Object.defineProperty(this, "Parent", { + enumerable: false, + configurable: false, + get: function get() { + return _parent; + }, + set: function set(value) { + _parent = value; + } + }); + var _optionName; + Object.defineProperty(this, "optionName", { + enumerable: false, + configurable: true, + get: function get() { + return _optionName; + }, + set: function set(value) { + _optionName = value; + } + }); + var _MK = {}; + Object.defineProperty(this, "MK", { + enumerable: false, + configurable: false, + get: function get() { + var encryptor = function encryptor(data) { + return data; + }; + if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId); + var result = []; + result.push("<<"); + var key; + for (key in _MK) { + result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")"); + } + result.push(">>"); + return result.join("\n"); + }, + set: function set(value) { + if (_typeof(value) === "object") { + _MK = value; + } + } + }); + + /** + * From the PDF reference: + * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user. + * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields"). + * + * - '8' = Cross, + * - 'l' = Circle, + * - '' = nothing + * @name AcroFormButton#caption + * @type {string} + */ + Object.defineProperty(this, "caption", { + enumerable: true, + configurable: true, + get: function get() { + return _MK.CA || ""; + }, + set: function set(value) { + if (typeof value === "string") { + _MK.CA = value; + } + } + }); + var _AS; + Object.defineProperty(this, "AS", { + enumerable: false, + configurable: false, + get: function get() { + return _AS; + }, + set: function set(value) { + _AS = value; + } + }); + + /** + * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams") + * + * @name AcroFormButton#appearanceState + * @type {any} + */ + Object.defineProperty(this, "appearanceState", { + enumerable: true, + configurable: true, + get: function get() { + return _AS.substr(1, _AS.length - 1); + }, + set: function set(value) { + _AS = "/" + value; + } + }); + this.caption = "l"; + this.appearanceState = "Off"; + // todo: set AppearanceType as variable that can be set from the + // outside... + this._AppearanceType = AcroFormAppearance.RadioButton.Circle; + // The Default appearanceType is the Circle + this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName); + }; + inherit(AcroFormChildClass, AcroFormField); + AcroFormRadioButton.prototype.setAppearance = function (appearance) { + if (!("createAppearanceStream" in appearance && "getCA" in appearance)) { + throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!"); + } + for (var objId in this.Kids) { + if (this.Kids.hasOwnProperty(objId)) { + var child = this.Kids[objId]; + child.appearanceStreamContent = appearance.createAppearanceStream(child.optionName); + child.caption = appearance.getCA(); + } + } + }; + AcroFormRadioButton.prototype.createOption = function (name) { + // Create new Child for RadioGroup + var child = new AcroFormChildClass(); + child.Parent = this; + child.optionName = name; + // Add to Parent + this.Kids.push(child); + addField.call(this.scope, child); + return child; + }; + + /** + * @class AcroFormCheckBox + * @extends AcroFormButton + * @extends AcroFormField + */ + var AcroFormCheckBox = function AcroFormCheckBox() { + AcroFormButton.call(this); + this.fontName = "zapfdingbats"; + this.caption = "3"; + this.appearanceState = "On"; + this.value = "On"; + this.textAlign = "center"; + this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream(); + }; + inherit(AcroFormCheckBox, AcroFormButton); + + /** + * @class AcroFormTextField + * @extends AcroFormField + */ + var AcroFormTextField = function AcroFormTextField() { + AcroFormField.call(this); + this.FT = "/Tx"; + + /** + * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line. + * + * @name AcroFormTextField#multiline + * @type {boolean} + */ + Object.defineProperty(this, "multiline", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 13)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 13); + } else { + this.Ff = clearBitForPdf(this.Ff, 13); + } + } + }); + + /** + * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field. + * + * @name AcroFormTextField#fileSelect + * @type {boolean} + */ + Object.defineProperty(this, "fileSelect", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 21)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 21); + } else { + this.Ff = clearBitForPdf(this.Ff, 21); + } + } + }); + + /** + * (PDF 1.4) If set, text entered in the field shall not be spell-checked. + * + * @name AcroFormTextField#doNotSpellCheck + * @type {boolean} + */ + Object.defineProperty(this, "doNotSpellCheck", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 23)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 23); + } else { + this.Ff = clearBitForPdf(this.Ff, 23); + } + } + }); + + /** + * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area. + * + * @name AcroFormTextField#doNotScroll + * @type {boolean} + */ + Object.defineProperty(this, "doNotScroll", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 24)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 24); + } else { + this.Ff = clearBitForPdf(this.Ff, 24); + } + } + }); + + /** + * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs. + * + * @name AcroFormTextField#comb + * @type {boolean} + */ + Object.defineProperty(this, "comb", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 25)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 25); + } else { + this.Ff = clearBitForPdf(this.Ff, 25); + } + } + }); + + /** + * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string. + * + * @name AcroFormTextField#richText + * @type {boolean} + */ + Object.defineProperty(this, "richText", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 26)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 26); + } else { + this.Ff = clearBitForPdf(this.Ff, 26); + } + } + }); + var _MaxLen = null; + Object.defineProperty(this, "MaxLen", { + enumerable: true, + configurable: false, + get: function get() { + return _MaxLen; + }, + set: function set(value) { + _MaxLen = value; + } + }); + + /** + * (Optional; inheritable) The maximum length of the field’s text, in characters. + * + * @name AcroFormTextField#maxLength + * @type {number} + */ + Object.defineProperty(this, "maxLength", { + enumerable: true, + configurable: true, + get: function get() { + return _MaxLen; + }, + set: function set(value) { + if (Number.isInteger(value)) { + _MaxLen = value; + } + } + }); + Object.defineProperty(this, "hasAppearanceStream", { + enumerable: true, + configurable: true, + get: function get() { + return this.V || this.DV; + } + }); + }; + inherit(AcroFormTextField, AcroFormField); + + /** + * @class AcroFormPasswordField + * @extends AcroFormTextField + * @extends AcroFormField + */ + var AcroFormPasswordField = function AcroFormPasswordField() { + AcroFormTextField.call(this); + + /** + * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters. + * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set. + * + * @name AcroFormTextField#password + * @type {boolean} + */ + Object.defineProperty(this, "password", { + enumerable: true, + configurable: true, + get: function get() { + return Boolean(getBitForPdf(this.Ff, 14)); + }, + set: function set(value) { + if (Boolean(value) === true) { + this.Ff = setBitForPdf(this.Ff, 14); + } else { + this.Ff = clearBitForPdf(this.Ff, 14); + } + } + }); + this.password = true; + }; + inherit(AcroFormPasswordField, AcroFormTextField); + + // Contains Methods for creating standard appearances + var AcroFormAppearance = { + CheckBox: { + createAppearanceStream: function createAppearanceStream() { + var appearance = { + N: { + On: AcroFormAppearance.CheckBox.YesNormal + }, + D: { + On: AcroFormAppearance.CheckBox.YesPushDown, + Off: AcroFormAppearance.CheckBox.OffPushDown + } + }; + return appearance; + }, + /** + * Returns the standard On Appearance for a CheckBox + * + * @returns {AcroFormXObject} + */ + YesPushDown: function YesPushDown(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id; + var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color); + var calcRes = calculateX(formObject, formObject.caption); + stream.push("0.749023 g"); + stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re"); + stream.push("f"); + stream.push("BMC"); + stream.push("q"); + stream.push("0 0 1 rg"); + stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor); + stream.push("BT"); + stream.push(calcRes.text); + stream.push("ET"); + stream.push("Q"); + stream.push("EMC"); + xobj.stream = stream.join("\n"); + return xobj; + }, + YesNormal: function YesNormal(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id; + var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color); + var stream = []; + var height = AcroFormAppearance.internal.getHeight(formObject); + var width = AcroFormAppearance.internal.getWidth(formObject); + var calcRes = calculateX(formObject, formObject.caption); + stream.push("1 g"); + stream.push("0 0 " + f2(width) + " " + f2(height) + " re"); + stream.push("f"); + stream.push("q"); + stream.push("0 0 1 rg"); + stream.push("0 0 " + f2(width - 1) + " " + f2(height - 1) + " re"); + stream.push("W"); + stream.push("n"); + stream.push("0 g"); + stream.push("BT"); + stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor); + stream.push(calcRes.text); + stream.push("ET"); + stream.push("Q"); + xobj.stream = stream.join("\n"); + return xobj; + }, + /** + * Returns the standard Off Appearance for a CheckBox + * + * @returns {AcroFormXObject} + */ + OffPushDown: function OffPushDown(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + stream.push("0.749023 g"); + stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re"); + stream.push("f"); + xobj.stream = stream.join("\n"); + return xobj; + } + }, + RadioButton: { + Circle: { + createAppearanceStream: function createAppearanceStream(name) { + var appearanceStreamContent = { + D: { + Off: AcroFormAppearance.RadioButton.Circle.OffPushDown + }, + N: {} + }; + appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Circle.YesNormal; + appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Circle.YesPushDown; + return appearanceStreamContent; + }, + getCA: function getCA() { + return "l"; + }, + YesNormal: function YesNormal(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + // Make the Radius of the Circle relative to min(height, width) of formObject + var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; + // The Borderpadding... + DotRadius = Number((DotRadius * 0.9).toFixed(5)); + var c = AcroFormAppearance.internal.Bezier_C; + var DotRadiusBezier = Number((DotRadius * c).toFixed(5)); + /* + * The Following is a Circle created with Bezier-Curves. + */ + stream.push("q"); + stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm"); + stream.push(DotRadius + " 0 m"); + stream.push(DotRadius + " " + DotRadiusBezier + " " + DotRadiusBezier + " " + DotRadius + " 0 " + DotRadius + " c"); + stream.push("-" + DotRadiusBezier + " " + DotRadius + " -" + DotRadius + " " + DotRadiusBezier + " -" + DotRadius + " 0 c"); + stream.push("-" + DotRadius + " -" + DotRadiusBezier + " -" + DotRadiusBezier + " -" + DotRadius + " 0 -" + DotRadius + " c"); + stream.push(DotRadiusBezier + " -" + DotRadius + " " + DotRadius + " -" + DotRadiusBezier + " " + DotRadius + " 0 c"); + stream.push("f"); + stream.push("Q"); + xobj.stream = stream.join("\n"); + return xobj; + }, + YesPushDown: function YesPushDown(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; + // The Borderpadding... + DotRadius = Number((DotRadius * 0.9).toFixed(5)); + // Save results for later use; no need to waste + // processor ticks on doing math + var k = Number((DotRadius * 2).toFixed(5)); + var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5)); + var dc = Number((DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)); + stream.push("0.749023 g"); + stream.push("q"); + stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm"); + stream.push(k + " 0 m"); + stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c"); + stream.push("-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c"); + stream.push("-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c"); + stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c"); + stream.push("f"); + stream.push("Q"); + stream.push("0 g"); + stream.push("q"); + stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm"); + stream.push(DotRadius + " 0 m"); + stream.push("" + DotRadius + " " + dc + " " + dc + " " + DotRadius + " 0 " + DotRadius + " c"); + stream.push("-" + dc + " " + DotRadius + " -" + DotRadius + " " + dc + " -" + DotRadius + " 0 c"); + stream.push("-" + DotRadius + " -" + dc + " -" + dc + " -" + DotRadius + " 0 -" + DotRadius + " c"); + stream.push(dc + " -" + DotRadius + " " + DotRadius + " -" + dc + " " + DotRadius + " 0 c"); + stream.push("f"); + stream.push("Q"); + xobj.stream = stream.join("\n"); + return xobj; + }, + OffPushDown: function OffPushDown(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; + // The Borderpadding... + DotRadius = Number((DotRadius * 0.9).toFixed(5)); + // Save results for later use; no need to waste + // processor ticks on doing math + var k = Number((DotRadius * 2).toFixed(5)); + var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5)); + stream.push("0.749023 g"); + stream.push("q"); + stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm"); + stream.push(k + " 0 m"); + stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c"); + stream.push("-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c"); + stream.push("-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c"); + stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c"); + stream.push("f"); + stream.push("Q"); + xobj.stream = stream.join("\n"); + return xobj; + } + }, + Cross: { + /** + * Creates the Actual AppearanceDictionary-References + * + * @param {string} name + * @returns {Object} + * @ignore + */ + createAppearanceStream: function createAppearanceStream(name) { + var appearanceStreamContent = { + D: { + Off: AcroFormAppearance.RadioButton.Cross.OffPushDown + }, + N: {} + }; + appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Cross.YesNormal; + appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Cross.YesPushDown; + return appearanceStreamContent; + }, + getCA: function getCA() { + return "8"; + }, + YesNormal: function YesNormal(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + var cross = AcroFormAppearance.internal.calculateCross(formObject); + stream.push("q"); + stream.push("1 1 " + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + " " + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + " re"); + stream.push("W"); + stream.push("n"); + stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m"); + stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l"); + stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m"); + stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l"); + stream.push("s"); + stream.push("Q"); + xobj.stream = stream.join("\n"); + return xobj; + }, + YesPushDown: function YesPushDown(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var cross = AcroFormAppearance.internal.calculateCross(formObject); + var stream = []; + stream.push("0.749023 g"); + stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re"); + stream.push("f"); + stream.push("q"); + stream.push("1 1 " + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + " " + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + " re"); + stream.push("W"); + stream.push("n"); + stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m"); + stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l"); + stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m"); + stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l"); + stream.push("s"); + stream.push("Q"); + xobj.stream = stream.join("\n"); + return xobj; + }, + OffPushDown: function OffPushDown(formObject) { + var xobj = createFormXObject(formObject); + xobj.scope = formObject.scope; + var stream = []; + stream.push("0.749023 g"); + stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re"); + stream.push("f"); + xobj.stream = stream.join("\n"); + return xobj; + } + } + }, + /** + * Returns the standard Appearance + * + * @returns {AcroFormXObject} + */ + createDefaultAppearanceStream: function createDefaultAppearanceStream(formObject) { + // Set Helvetica to Standard Font (size: auto) + // Color: Black + var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id; + var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color); + var fontSize = formObject.fontSize; + var result = "/" + fontKey + " " + fontSize + " Tf " + encodedColor; + return result; + } + }; + AcroFormAppearance.internal = { + Bezier_C: 0.551915024494, + calculateCross: function calculateCross(formObject) { + var width = AcroFormAppearance.internal.getWidth(formObject); + var height = AcroFormAppearance.internal.getHeight(formObject); + var a = Math.min(width, height); + var cross = { + x1: { + // upperLeft + x: (width - a) / 2, + y: (height - a) / 2 + a // height - borderPadding + }, + x2: { + // lowerRight + x: (width - a) / 2 + a, + y: (height - a) / 2 // borderPadding + }, + x3: { + // lowerLeft + x: (width - a) / 2, + y: (height - a) / 2 // borderPadding + }, + x4: { + // upperRight + x: (width - a) / 2 + a, + y: (height - a) / 2 + a // height - borderPadding + } + }; + return cross; + } + }; + AcroFormAppearance.internal.getWidth = function (formObject) { + var result = 0; + if (_typeof(formObject) === "object") { + result = scale(formObject.Rect[2]); + } + return result; + }; + AcroFormAppearance.internal.getHeight = function (formObject) { + var result = 0; + if (_typeof(formObject) === "object") { + result = scale(formObject.Rect[3]); + } + return result; + }; + + // Public: + + /** + * Add an AcroForm-Field to the jsPDF-instance + * + * @name addField + * @function + * @instance + * @param {Object} fieldObject + * @returns {jsPDF} + */ + var addField = jsPDFAPI.addField = function (fieldObject) { + initializeAcroForm(this, fieldObject); + if (fieldObject instanceof AcroFormField) { + putForm(fieldObject); + } else { + throw new Error("Invalid argument passed to jsPDF.addField."); + } + fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber; + return this; + }; + jsPDFAPI.AcroFormChoiceField = AcroFormChoiceField; + jsPDFAPI.AcroFormListBox = AcroFormListBox; + jsPDFAPI.AcroFormComboBox = AcroFormComboBox; + jsPDFAPI.AcroFormEditBox = AcroFormEditBox; + jsPDFAPI.AcroFormButton = AcroFormButton; + jsPDFAPI.AcroFormPushButton = AcroFormPushButton; + jsPDFAPI.AcroFormRadioButton = AcroFormRadioButton; + jsPDFAPI.AcroFormCheckBox = AcroFormCheckBox; + jsPDFAPI.AcroFormTextField = AcroFormTextField; + jsPDFAPI.AcroFormPasswordField = AcroFormPasswordField; + jsPDFAPI.AcroFormAppearance = AcroFormAppearance; + jsPDFAPI.AcroForm = { + ChoiceField: AcroFormChoiceField, + ListBox: AcroFormListBox, + ComboBox: AcroFormComboBox, + EditBox: AcroFormEditBox, + Button: AcroFormButton, + PushButton: AcroFormPushButton, + RadioButton: AcroFormRadioButton, + CheckBox: AcroFormCheckBox, + TextField: AcroFormTextField, + PasswordField: AcroFormPasswordField, + Appearance: AcroFormAppearance + }; + jsPDF.AcroForm = { + ChoiceField: AcroFormChoiceField, + ListBox: AcroFormListBox, + ComboBox: AcroFormComboBox, + EditBox: AcroFormEditBox, + Button: AcroFormButton, + PushButton: AcroFormPushButton, + RadioButton: AcroFormRadioButton, + CheckBox: AcroFormCheckBox, + TextField: AcroFormTextField, + PasswordField: AcroFormPasswordField, + Appearance: AcroFormAppearance + }; + var AcroForm = jsPDF.AcroForm; + + (function (jsPDFAPI) { + + var namespace = "addImage_"; + jsPDFAPI.__addimage__ = {}; + var UNKNOWN = "UNKNOWN"; + + // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow. + // With too small batch iteration will be slow as more calls are made, + // higher values cause larger and slower garbage collection. + var ARRAY_APPLY_BATCH = 8192; + var imageFileTypeHeaders = { + PNG: [[0x89, 0x50, 0x4e, 0x47]], + TIFF: [[0x4d, 0x4d, 0x00, 0x2a], + //Motorola + [0x49, 0x49, 0x2a, 0x00] //Intel + ], + JPEG: [[0xff, 0xd8, 0xff, 0xe0, undefined, undefined, 0x4a, 0x46, 0x49, 0x46, 0x00], + //JFIF + [0xff, 0xd8, 0xff, 0xe1, undefined, undefined, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00], + //Exif + [0xff, 0xd8, 0xff, 0xdb], + //JPEG RAW + [0xff, 0xd8, 0xff, 0xee] //EXIF RAW + ], + JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]], + GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]], + GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]], + WEBP: [[0x52, 0x49, 0x46, 0x46, undefined, undefined, undefined, undefined, 0x57, 0x45, 0x42, 0x50]], + BMP: [[0x42, 0x4d], + //BM - Windows 3.1x, 95, NT, ... etc. + [0x42, 0x41], + //BA - OS/2 struct bitmap array + [0x43, 0x49], + //CI - OS/2 struct color icon + [0x43, 0x50], + //CP - OS/2 const color pointer + [0x49, 0x43], + //IC - OS/2 struct icon + [0x50, 0x54] //PT - OS/2 pointer + ] + }; + + /** + * Recognize filetype of Image by magic-bytes + * + * https://en.wikipedia.org/wiki/List_of_file_signatures + * + * @name getImageFileTypeByImageData + * @public + * @function + * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer + * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG' + * + * @returns {string} filetype of Image + */ + var getImageFileTypeByImageData = jsPDFAPI.__addimage__.getImageFileTypeByImageData = function (imageData, fallbackFormat) { + fallbackFormat = fallbackFormat || UNKNOWN; + var i; + var j; + var result = UNKNOWN; + var headerSchemata; + var compareResult; + var fileType; + if (fallbackFormat === "RGBA" || imageData.data !== undefined && imageData.data instanceof Uint8ClampedArray && "height" in imageData && "width" in imageData) { + return "RGBA"; + } + if (isArrayBufferView(imageData)) { + for (fileType in imageFileTypeHeaders) { + headerSchemata = imageFileTypeHeaders[fileType]; + for (i = 0; i < headerSchemata.length; i += 1) { + compareResult = true; + for (j = 0; j < headerSchemata[i].length; j += 1) { + if (headerSchemata[i][j] === undefined) { + continue; + } + if (headerSchemata[i][j] !== imageData[j]) { + compareResult = false; + break; + } + } + if (compareResult === true) { + result = fileType; + break; + } + } + } + } else { + for (fileType in imageFileTypeHeaders) { + headerSchemata = imageFileTypeHeaders[fileType]; + for (i = 0; i < headerSchemata.length; i += 1) { + compareResult = true; + for (j = 0; j < headerSchemata[i].length; j += 1) { + if (headerSchemata[i][j] === undefined) { + continue; + } + if (headerSchemata[i][j] !== imageData.charCodeAt(j)) { + compareResult = false; + break; + } + } + if (compareResult === true) { + result = fileType; + break; + } + } + } + } + if (result === UNKNOWN && fallbackFormat !== UNKNOWN) { + result = fallbackFormat; + } + return result; + }; + + // Image functionality ported from pdf.js + var putImage = function putImage(image) { + var out = this.internal.write; + var putStream = this.internal.putStream; + var getFilters = this.internal.getFilters; + var filter = getFilters(); + while (filter.indexOf("FlateEncode") !== -1) { + filter.splice(filter.indexOf("FlateEncode"), 1); + } + image.objectId = this.internal.newObject(); + var additionalKeyValues = []; + additionalKeyValues.push({ + key: "Type", + value: "/XObject" + }); + additionalKeyValues.push({ + key: "Subtype", + value: "/Image" + }); + additionalKeyValues.push({ + key: "Width", + value: image.width + }); + additionalKeyValues.push({ + key: "Height", + value: image.height + }); + if (image.colorSpace === color_spaces.INDEXED) { + additionalKeyValues.push({ + key: "ColorSpace", + value: "[/Indexed /DeviceRGB " + ( + // if an indexed png defines more than one colour with transparency, we've created a sMask + image.palette.length / 3 - 1) + " " + ("sMask" in image && typeof image.sMask !== "undefined" ? image.objectId + 2 : image.objectId + 1) + " 0 R]" + }); + } else { + additionalKeyValues.push({ + key: "ColorSpace", + value: "/" + image.colorSpace + }); + if (image.colorSpace === color_spaces.DEVICE_CMYK) { + additionalKeyValues.push({ + key: "Decode", + value: "[1 0 1 0 1 0 1 0]" + }); + } + } + additionalKeyValues.push({ + key: "BitsPerComponent", + value: image.bitsPerComponent + }); + if ("decodeParameters" in image && typeof image.decodeParameters !== "undefined") { + additionalKeyValues.push({ + key: "DecodeParms", + value: "<<" + image.decodeParameters + ">>" + }); + } + if ("transparency" in image && Array.isArray(image.transparency) && image.transparency.length > 0) { + var transparency = "", + i = 0, + len = image.transparency.length; + for (; i < len; i++) { + transparency += image.transparency[i] + " " + image.transparency[i] + " "; + } + additionalKeyValues.push({ + key: "Mask", + value: "[" + transparency + "]" + }); + } + if (typeof image.sMask !== "undefined") { + additionalKeyValues.push({ + key: "SMask", + value: image.objectId + 1 + " 0 R" + }); + } + var alreadyAppliedFilters = typeof image.filter !== "undefined" ? ["/" + image.filter] : undefined; + putStream({ + data: image.data, + additionalKeyValues: additionalKeyValues, + alreadyAppliedFilters: alreadyAppliedFilters, + objectId: image.objectId + }); + out("endobj"); + + // Soft mask + if ("sMask" in image && typeof image.sMask !== "undefined") { + var _image$sMaskBitsPerCo; + var sMaskBitsPerComponent = (_image$sMaskBitsPerCo = image.sMaskBitsPerComponent) !== null && _image$sMaskBitsPerCo !== void 0 ? _image$sMaskBitsPerCo : image.bitsPerComponent; + var sMask = { + width: image.width, + height: image.height, + colorSpace: "DeviceGray", + bitsPerComponent: sMaskBitsPerComponent, + data: image.sMask + }; + if ("filter" in image) { + sMask.decodeParameters = "/Predictor ".concat(image.predictor, " /Colors 1 /BitsPerComponent ").concat(sMaskBitsPerComponent, " /Columns ").concat(image.width); + sMask.filter = image.filter; + } + putImage.call(this, sMask); + } + + //Palette + if (image.colorSpace === color_spaces.INDEXED) { + var objId = this.internal.newObject(); + //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>'); + //putStream(zlib.compress(img['pal'])); + putStream({ + data: arrayBufferToBinaryString(new Uint8Array(image.palette)), + objectId: objId + }); + out("endobj"); + } + }; + var putResourcesCallback = function putResourcesCallback() { + var images = this.internal.collections[namespace + "images"]; + for (var i in images) { + putImage.call(this, images[i]); + } + }; + var putXObjectsDictCallback = function putXObjectsDictCallback() { + var images = this.internal.collections[namespace + "images"], + out = this.internal.write, + image; + for (var i in images) { + image = images[i]; + out("/I" + image.index, image.objectId, "0", "R"); + } + }; + var checkCompressValue = function checkCompressValue(value) { + if (value && typeof value === "string") value = value.toUpperCase(); + return value in jsPDFAPI.image_compression ? value : image_compression.NONE; + }; + var initialize = function initialize() { + if (!this.internal.collections[namespace + "images"]) { + this.internal.collections[namespace + "images"] = {}; + this.internal.events.subscribe("putResources", putResourcesCallback); + this.internal.events.subscribe("putXobjectDict", putXObjectsDictCallback); + } + }; + var getImages = function getImages() { + var images = this.internal.collections[namespace + "images"]; + initialize.call(this); + return images; + }; + var getImageIndex = function getImageIndex() { + return Object.keys(this.internal.collections[namespace + "images"]).length; + }; + var notDefined = function notDefined(value) { + return typeof value === "undefined" || value === null || value.length === 0; + }; + var generateAliasFromImageData = function generateAliasFromImageData(imageData) { + if (typeof imageData === "string" || isArrayBufferView(imageData)) { + return sHashCode(imageData); + } else if (isArrayBufferView(imageData.data)) { + return sHashCode(imageData.data); + } + return null; + }; + var isImageTypeSupported = function isImageTypeSupported(type) { + return typeof jsPDFAPI["process" + type.toUpperCase()] === "function"; + }; + var isDOMElement = function isDOMElement(object) { + return _typeof(object) === "object" && object.nodeType === 1; + }; + var getImageDataFromElement = function getImageDataFromElement(element, format) { + //if element is an image which uses data url definition, just return the dataurl + if (element.nodeName === "IMG" && element.hasAttribute("src")) { + var src = "" + element.getAttribute("src"); + + //is base64 encoded dataUrl, directly process it + if (src.indexOf("data:image/") === 0) { + return atob(unescape(src).split("base64,").pop()); + } + + //it is probably an url, try to load it + var tmpImageData = jsPDFAPI.loadFile(src, true); + if (tmpImageData !== undefined) { + return tmpImageData; + } + } + if (element.nodeName === "CANVAS") { + if (element.width === 0 || element.height === 0) { + throw new Error("Given canvas must have data. Canvas width: " + element.width + ", height: " + element.height); + } + var mimeType; + switch (format) { + case "PNG": + mimeType = "image/png"; + break; + case "WEBP": + mimeType = "image/webp"; + break; + case "JPEG": + case "JPG": + default: + mimeType = "image/jpeg"; + break; + } + return atob(element.toDataURL(mimeType, 1.0).split("base64,").pop()); + } + }; + var checkImagesForAlias = function checkImagesForAlias(alias) { + var images = this.internal.collections[namespace + "images"]; + if (images) { + for (var e in images) { + if (alias === images[e].alias) { + return images[e]; + } + } + } + }; + var determineWidthAndHeight = function determineWidthAndHeight(width, height, image) { + if (!width && !height) { + width = -96; + height = -96; + } + if (width < 0) { + width = -1 * image.width * 72 / width / this.internal.scaleFactor; + } + if (height < 0) { + height = -1 * image.height * 72 / height / this.internal.scaleFactor; + } + if (width === 0) { + width = height * image.width / image.height; + } + if (height === 0) { + height = width * image.height / image.width; + } + return [width, height]; + }; + var writeImageToPDF = function writeImageToPDF(x, y, width, height, image, rotation) { + var dims = determineWidthAndHeight.call(this, width, height, image), + coord = this.internal.getCoordinateString, + vcoord = this.internal.getVerticalCoordinateString; + var images = getImages.call(this); + width = dims[0]; + height = dims[1]; + images[image.index] = image; + if (rotation) { + rotation *= Math.PI / 180; + var c = Math.cos(rotation); + var s = Math.sin(rotation); + //like in pdf Reference do it 4 digits instead of 2 + var f4 = function f4(number) { + return number.toFixed(4); + }; + var rotationTransformationMatrix = [f4(c), f4(s), f4(s * -1), f4(c), 0, 0, "cm"]; + } + this.internal.write("q"); //Save graphics state + if (rotation) { + this.internal.write([1, "0", "0", 1, coord(x), vcoord(y + height), "cm"].join(" ")); //Translate + this.internal.write(rotationTransformationMatrix.join(" ")); //Rotate + this.internal.write([coord(width), "0", "0", coord(height), "0", "0", "cm"].join(" ")); //Scale + } else { + this.internal.write([coord(width), "0", "0", coord(height), coord(x), vcoord(y + height), "cm"].join(" ")); //Translate and Scale + } + if (this.isAdvancedAPI()) { + // draw image bottom up when in "advanced" API mode + this.internal.write([1, 0, 0, -1, 0, 0, "cm"].join(" ")); + } + this.internal.write("/I" + image.index + " Do"); //Paint Image + this.internal.write("Q"); //Restore graphics state + }; + + /** + * COLOR SPACES + */ + var color_spaces = jsPDFAPI.color_spaces = { + DEVICE_RGB: "DeviceRGB", + DEVICE_GRAY: "DeviceGray", + DEVICE_CMYK: "DeviceCMYK", + CAL_GREY: "CalGray", + CAL_RGB: "CalRGB", + LAB: "Lab", + ICC_BASED: "ICCBased", + INDEXED: "Indexed", + PATTERN: "Pattern", + SEPARATION: "Separation", + DEVICE_N: "DeviceN" + }; + + /** + * DECODE METHODS + */ + jsPDFAPI.decode = { + DCT_DECODE: "DCTDecode", + FLATE_DECODE: "FlateDecode", + LZW_DECODE: "LZWDecode", + JPX_DECODE: "JPXDecode", + JBIG2_DECODE: "JBIG2Decode", + ASCII85_DECODE: "ASCII85Decode", + ASCII_HEX_DECODE: "ASCIIHexDecode", + RUN_LENGTH_DECODE: "RunLengthDecode", + CCITT_FAX_DECODE: "CCITTFaxDecode" + }; + + /** + * IMAGE COMPRESSION TYPES + */ + var image_compression = jsPDFAPI.image_compression = { + NONE: "NONE", + FAST: "FAST", + MEDIUM: "MEDIUM", + SLOW: "SLOW" + }; + + /** + * @name sHashCode + * @function + * @param {string} data + * @returns {string} + */ + var sHashCode = jsPDFAPI.__addimage__.sHashCode = function (data) { + var hash = 0, + i, + len; + if (typeof data === "string") { + len = data.length; + for (i = 0; i < len; i++) { + hash = (hash << 5) - hash + data.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + } else if (isArrayBufferView(data)) { + len = data.byteLength / 2; + for (i = 0; i < len; i++) { + hash = (hash << 5) - hash + data[i]; + hash |= 0; // Convert to 32bit integer + } + } + return hash; + }; + + /** + * Validates if given String is a valid Base64-String + * + * @name validateStringAsBase64 + * @public + * @function + * @param {String} possible Base64-String + * + * @returns {boolean} + */ + var validateStringAsBase64 = jsPDFAPI.__addimage__.validateStringAsBase64 = function (possibleBase64String) { + possibleBase64String = possibleBase64String || ""; + possibleBase64String.toString().trim(); + var result = true; + if (possibleBase64String.length === 0) { + result = false; + } + if (possibleBase64String.length % 4 !== 0) { + result = false; + } + if (/^[A-Za-z0-9+/]+$/.test(possibleBase64String.substr(0, possibleBase64String.length - 2)) === false) { + result = false; + } + if (/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(possibleBase64String.substr(-2)) === false) { + result = false; + } + return result; + }; + + /** + * Strips out and returns info from a valid base64 data URI + * + * @name extractImageFromDataUrl + * @function + * @param {string} dataUrl a valid data URI of format 'data:[][;base64],' + * @returns {string} The raw Base64-encoded data. + */ + var extractImageFromDataUrl = jsPDFAPI.__addimage__.extractImageFromDataUrl = function (dataUrl) { + if (dataUrl == null) { + return null; + } + + // avoid using a regexp for parsing because it might be vulnerable against ReDoS attacks + + dataUrl = dataUrl.trim(); + if (!dataUrl.startsWith("data:")) { + return null; + } + var commaIndex = dataUrl.indexOf(","); + if (commaIndex < 0) { + return null; + } + var dataScheme = dataUrl.substring(0, commaIndex).trim(); + if (!dataScheme.endsWith("base64")) { + return null; + } + return dataUrl.substring(commaIndex + 1); + }; + + /** + * Tests supplied object to determine if ArrayBuffer + * + * @name isArrayBuffer + * @function + * @param {Object} object an Object + * + * @returns {boolean} + */ + jsPDFAPI.__addimage__.isArrayBuffer = function (object) { + return object instanceof ArrayBuffer; + }; + + /** + * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface + * + * @name isArrayBufferView + * @function + * @param {Object} object an Object + * @returns {boolean} + */ + var isArrayBufferView = jsPDFAPI.__addimage__.isArrayBufferView = function (object) { + return object instanceof Int8Array || object instanceof Uint8Array || object instanceof Uint8ClampedArray || object instanceof Int16Array || object instanceof Uint16Array || object instanceof Int32Array || object instanceof Uint32Array || object instanceof Float32Array || object instanceof Float64Array; + }; + + /** + * Convert Binary String to ArrayBuffer + * + * @name binaryStringToUint8Array + * @public + * @function + * @param {string} BinaryString with ImageData + * @returns {Uint8Array} + */ + var binaryStringToUint8Array = jsPDFAPI.__addimage__.binaryStringToUint8Array = function (binary_string) { + var len = binary_string.length; + var bytes = new Uint8Array(len); + for (var i = 0; i < len; i++) { + bytes[i] = binary_string.charCodeAt(i); + } + return bytes; + }; + + /** + * Convert the Buffer to a Binary String + * + * @name arrayBufferToBinaryString + * @public + * @function + * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData + * + * @returns {String} + */ + var arrayBufferToBinaryString = jsPDFAPI.__addimage__.arrayBufferToBinaryString = function (buffer) { + var out = ""; + // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView. + // Do not copy the array if input is already an array. + var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer); + for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) { + // Limit the amount of characters being parsed to prevent overflow. + // Note that while TextDecoder would be faster, it does not have the same + // functionality as fromCharCode with any provided encodings as of 3/2021. + out += String.fromCharCode.apply(null, buf.subarray(i, i + ARRAY_APPLY_BATCH)); + } + return out; + }; + + /** + * Possible parameter for addImage, an RGBA buffer with size. + * + * @typedef {Object} RGBAData + * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData. + * @property {number} width - Image width as the data does not carry this information in itself. + * @property {number} height - Image height as the data does not carry this information in itself. + */ + + /** + * Adds an Image to the PDF. + * + * @name addImage + * @public + * @function + * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData). + * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP' + * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} width width of the image (in units declared at inception of PDF document) + * @param {number} height height of the Image (in units declared at inception of PDF document) + * @param {string} alias alias of the image (if used multiple times) + * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW' + * @param {number} rotation rotation of the image in degrees (0-359) + * + * @returns jsPDF + */ + jsPDFAPI.addImage = function () { + var imageData, format, x, y, w, h, alias, compression, rotation; + imageData = arguments[0]; + if (typeof arguments[1] === "number") { + format = UNKNOWN; + x = arguments[1]; + y = arguments[2]; + w = arguments[3]; + h = arguments[4]; + alias = arguments[5]; + compression = arguments[6]; + rotation = arguments[7]; + } else { + format = arguments[1]; + x = arguments[2]; + y = arguments[3]; + w = arguments[4]; + h = arguments[5]; + alias = arguments[6]; + compression = arguments[7]; + rotation = arguments[8]; + } + if (_typeof(imageData) === "object" && !isDOMElement(imageData) && "imageData" in imageData) { + var options = imageData; + imageData = options.imageData; + format = options.format || format || UNKNOWN; + x = options.x || x || 0; + y = options.y || y || 0; + w = options.w || options.width || w; + h = options.h || options.height || h; + alias = options.alias || alias; + compression = options.compression || compression; + rotation = options.rotation || options.angle || rotation; + } + + //If compression is not explicitly set, determine if we should use compression + var filter = this.internal.getFilters(); + if (compression === undefined && filter.indexOf("FlateEncode") !== -1) { + compression = "SLOW"; + } + if (isNaN(x) || isNaN(y)) { + throw new Error("Invalid coordinates passed to jsPDF.addImage"); + } + initialize.call(this); + var image = processImageData.call(this, imageData, format, alias, compression); + writeImageToPDF.call(this, x, y, w, h, image, rotation); + return this; + }; + var processImageData = function processImageData(imageData, format, alias, compression) { + var result, dataAsBinaryString; + if (typeof imageData === "string" && getImageFileTypeByImageData(imageData) === UNKNOWN) { + imageData = unescape(imageData); + var tmpImageData = convertBase64ToBinaryString(imageData, false); + if (tmpImageData !== "") { + imageData = tmpImageData; + } else { + tmpImageData = jsPDFAPI.loadFile(imageData, true); + if (tmpImageData !== undefined) { + imageData = tmpImageData; + } + } + } + if (isDOMElement(imageData)) { + imageData = getImageDataFromElement(imageData, format); + } + format = getImageFileTypeByImageData(imageData, format); + if (!isImageTypeSupported(format)) { + throw new Error("addImage does not support files of type '" + format + "', please ensure that a plugin for '" + format + "' support is added."); + } + + // now do the heavy lifting + + if (notDefined(alias)) { + alias = generateAliasFromImageData(imageData); + } + result = checkImagesForAlias.call(this, alias); + if (!result) { + // no need to convert if imageData is already uint8array + if (!(imageData instanceof Uint8Array) && format !== "RGBA") { + dataAsBinaryString = imageData; + imageData = binaryStringToUint8Array(imageData); + } + result = this["process" + format.toUpperCase()](imageData, getImageIndex.call(this), alias, checkCompressValue(compression), dataAsBinaryString); + } + if (!result) { + throw new Error("An unknown error occurred whilst processing the image."); + } + return result; + }; + + /** + * @name convertBase64ToBinaryString + * @function + * @param {string} stringData + * @returns {string} binary string + */ + var convertBase64ToBinaryString = jsPDFAPI.__addimage__.convertBase64ToBinaryString = function (stringData, throwError) { + throwError = typeof throwError === "boolean" ? throwError : true; + var imageData = ""; + var rawData; + if (typeof stringData === "string") { + var _extractImageFromData; + rawData = (_extractImageFromData = extractImageFromDataUrl(stringData)) !== null && _extractImageFromData !== void 0 ? _extractImageFromData : stringData; + try { + imageData = atob(rawData); + } catch (e) { + if (throwError) { + if (!validateStringAsBase64(rawData)) { + throw new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString "); + } else { + throw new Error("atob-Error in jsPDF.convertBase64ToBinaryString " + e.message); + } + } + } + } + return imageData; + }; + + /** + * @name getImageProperties + * @function + * @param {Object} imageData + * @returns {Object} + */ + jsPDFAPI.getImageProperties = function (imageData) { + var image; + var tmpImageData = ""; + var format; + if (isDOMElement(imageData)) { + imageData = getImageDataFromElement(imageData); + } + if (typeof imageData === "string" && getImageFileTypeByImageData(imageData) === UNKNOWN) { + tmpImageData = convertBase64ToBinaryString(imageData, false); + if (tmpImageData === "") { + tmpImageData = jsPDFAPI.loadFile(imageData) || ""; + } + imageData = tmpImageData; + } + format = getImageFileTypeByImageData(imageData); + if (!isImageTypeSupported(format)) { + throw new Error("addImage does not support files of type '" + format + "', please ensure that a plugin for '" + format + "' support is added."); + } + if (!(imageData instanceof Uint8Array)) { + imageData = binaryStringToUint8Array(imageData); + } + image = this["process" + format.toUpperCase()](imageData); + if (!image) { + throw new Error("An unknown error occurred whilst processing the image"); + } + image.fileType = format; + return image; + }; + })(jsPDF.API); + + /** + * @license + * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + (function (jsPDFAPI) { + + var notEmpty = function notEmpty(obj) { + if (typeof obj != "undefined") { + if (obj != "") { + return true; + } + } + }; + jsPDF.API.events.push(["addPage", function (addPageData) { + var pageInfo = this.internal.getPageInfo(addPageData.pageNumber); + pageInfo.pageContext.annotations = []; + }]); + jsPDFAPI.events.push(["putPage", function (putPageData) { + var getHorizontalCoordinateString = this.internal.getCoordinateString; + var getVerticalCoordinateString = this.internal.getVerticalCoordinateString; + var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId); + var pageAnnos = putPageData.pageContext.annotations; + var anno, rect, line; + var found = false; + for (var a = 0; a < pageAnnos.length && !found; a++) { + anno = pageAnnos[a]; + switch (anno.type) { + case "link": + if (notEmpty(anno.options.url) || notEmpty(anno.options.pageNumber)) { + found = true; + } + break; + case "reference": + case "text": + case "freetext": + found = true; + break; + } + } + if (found == false) { + return; + } + this.internal.write("/Annots ["); + for (var i = 0; i < pageAnnos.length; i++) { + anno = pageAnnos[i]; + var escape = this.internal.pdfEscape; + var encryptor = this.internal.getEncryptor(putPageData.objId); + switch (anno.type) { + case "reference": + // References to Widget Annotations (for AcroForm Fields) + this.internal.write(" " + anno.object.objId + " 0 R "); + break; + case "text": + // Create a an object for both the text and the popup + var objText = this.internal.newAdditionalObject(); + var objPopup = this.internal.newAdditionalObject(); + var encryptorText = this.internal.getEncryptor(objText.objId); + var title = anno.title || "Note"; + rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) + " " + getVerticalCoordinateString(anno.bounds.y) + "] "; + line = "<>"; + objText.content = line; + var parent = objText.objId + " 0 R"; + var popoff = 30; + rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x + popoff) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w + popoff) + " " + getVerticalCoordinateString(anno.bounds.y) + "] "; + line = "<>"; + } else if (anno.options.pageNumber) { + // first page is 0 + var info = this.internal.getPageInfo(anno.options.pageNumber); + line = "< pageNumber or url [required] + *

If pageNumber is specified, top and zoom may also be specified

+ * @name link + * @function + * @param {number} x + * @param {number} y + * @param {number} w + * @param {number} h + * @param {Object} options + */ + jsPDFAPI.link = function (x, y, w, h, options) { + var pageInfo = this.internal.getCurrentPageInfo(); + var getHorizontalCoordinateString = this.internal.getCoordinateString; + var getVerticalCoordinateString = this.internal.getVerticalCoordinateString; + pageInfo.pageContext.annotations.push({ + finalBounds: { + x: getHorizontalCoordinateString(x), + y: getVerticalCoordinateString(y), + w: getHorizontalCoordinateString(x + w), + h: getVerticalCoordinateString(y + h) + }, + options: options, + type: "link" + }); + }; + + /** + * Currently only supports single line text. + * Returns the width of the text/link + * + * @name textWithLink + * @function + * @param {string} text + * @param {number} x + * @param {number} y + * @param {Object} options + * @returns {number} width the width of the text/link + */ + jsPDFAPI.textWithLink = function (text, x, y, options) { + var totalLineWidth = this.getTextWidth(text); + var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor; + var linkHeight, linkWidth; + + // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line + if (options.maxWidth !== undefined) { + var maxWidth = options.maxWidth; + linkWidth = maxWidth; + var numOfLines = this.splitTextToSize(text, linkWidth).length; + linkHeight = Math.ceil(lineHeight * numOfLines); + } else { + linkWidth = totalLineWidth; + linkHeight = lineHeight; + } + this.text(text, x, y, options); + + //TODO We really need the text baseline height to do this correctly. + // Or ability to draw text on top, bottom, center, or baseline. + y += lineHeight * 0.2; + //handle x position based on the align option + if (options.align === "center") { + x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width + } + if (options.align === "right") { + x = x - totalLineWidth; + } + this.link(x, y - lineHeight, linkWidth, linkHeight, options); + return totalLineWidth; + }; + + //TODO move into external library + /** + * @name getTextWidth + * @function + * @param {string} text + * @returns {number} txtWidth + */ + jsPDFAPI.getTextWidth = function (text) { + var fontSize = this.internal.getFontSize(); + var txtWidth = this.getStringUnitWidth(text) * fontSize / this.internal.scaleFactor; + return txtWidth; + }; + return this; + })(jsPDF.API); + + /** + * @license + * Copyright (c) 2017 Aras Abbasi + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF arabic parser PlugIn + * + * @name arabic + * @module + */ + (function (jsPDFAPI) { + + /** + * Arabic shape substitutions: char code => (isolated, final, initial, medial). + * Arabic Substition A + */ + var arabicSubstitionA = { + 0x0621: [0xfe80], + // ARABIC LETTER HAMZA + 0x0622: [0xfe81, 0xfe82], + // ARABIC LETTER ALEF WITH MADDA ABOVE + 0x0623: [0xfe83, 0xfe84], + // ARABIC LETTER ALEF WITH HAMZA ABOVE + 0x0624: [0xfe85, 0xfe86], + // ARABIC LETTER WAW WITH HAMZA ABOVE + 0x0625: [0xfe87, 0xfe88], + // ARABIC LETTER ALEF WITH HAMZA BELOW + 0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], + // ARABIC LETTER YEH WITH HAMZA ABOVE + 0x0627: [0xfe8d, 0xfe8e], + // ARABIC LETTER ALEF + 0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], + // ARABIC LETTER BEH + 0x0629: [0xfe93, 0xfe94], + // ARABIC LETTER TEH MARBUTA + 0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], + // ARABIC LETTER TEH + 0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], + // ARABIC LETTER THEH + 0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], + // ARABIC LETTER JEEM + 0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], + // ARABIC LETTER HAH + 0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], + // ARABIC LETTER KHAH + 0x062f: [0xfea9, 0xfeaa], + // ARABIC LETTER DAL + 0x0630: [0xfeab, 0xfeac], + // ARABIC LETTER THAL + 0x0631: [0xfead, 0xfeae], + // ARABIC LETTER REH + 0x0632: [0xfeaf, 0xfeb0], + // ARABIC LETTER ZAIN + 0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], + // ARABIC LETTER SEEN + 0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], + // ARABIC LETTER SHEEN + 0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], + // ARABIC LETTER SAD + 0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], + // ARABIC LETTER DAD + 0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], + // ARABIC LETTER TAH + 0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], + // ARABIC LETTER ZAH + 0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], + // ARABIC LETTER AIN + 0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], + // ARABIC LETTER GHAIN + 0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], + // ARABIC LETTER FEH + 0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], + // ARABIC LETTER QAF + 0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], + // ARABIC LETTER KAF + 0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], + // ARABIC LETTER LAM + 0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], + // ARABIC LETTER MEEM + 0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], + // ARABIC LETTER NOON + 0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], + // ARABIC LETTER HEH + 0x0648: [0xfeed, 0xfeee], + // ARABIC LETTER WAW + 0x0649: [0xfeef, 0xfef0, 64488, 64489], + // ARABIC LETTER ALEF MAKSURA + 0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], + // ARABIC LETTER YEH + 0x0671: [0xfb50, 0xfb51], + // ARABIC LETTER ALEF WASLA + 0x0677: [0xfbdd], + // ARABIC LETTER U WITH HAMZA ABOVE + 0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], + // ARABIC LETTER TTEH + 0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], + // ARABIC LETTER TTEHEH + 0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], + // ARABIC LETTER BEEH + 0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], + // ARABIC LETTER PEH + 0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], + // ARABIC LETTER TEHEH + 0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], + // ARABIC LETTER BEHEH + 0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], + // ARABIC LETTER NYEH + 0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], + // ARABIC LETTER DYEH + 0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], + // ARABIC LETTER TCHEH + 0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], + // ARABIC LETTER TCHEHEH + 0x0688: [0xfb88, 0xfb89], + // ARABIC LETTER DDAL + 0x068c: [0xfb84, 0xfb85], + // ARABIC LETTER DAHAL + 0x068d: [0xfb82, 0xfb83], + // ARABIC LETTER DDAHAL + 0x068e: [0xfb86, 0xfb87], + // ARABIC LETTER DUL + 0x0691: [0xfb8c, 0xfb8d], + // ARABIC LETTER RREH + 0x0698: [0xfb8a, 0xfb8b], + // ARABIC LETTER JEH + 0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], + // ARABIC LETTER VEH + 0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], + // ARABIC LETTER PEHEH + 0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], + // ARABIC LETTER KEHEH + 0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], + // ARABIC LETTER NG + 0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], + // ARABIC LETTER GAF + 0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], + // ARABIC LETTER NGOEH + 0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], + // ARABIC LETTER GUEH + 0x06ba: [0xfb9e, 0xfb9f], + // ARABIC LETTER NOON GHUNNA + 0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], + // ARABIC LETTER RNOON + 0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], + // ARABIC LETTER HEH DOACHASHMEE + 0x06c0: [0xfba4, 0xfba5], + // ARABIC LETTER HEH WITH YEH ABOVE + 0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], + // ARABIC LETTER HEH GOAL + 0x06c5: [0xfbe0, 0xfbe1], + // ARABIC LETTER KIRGHIZ OE + 0x06c6: [0xfbd9, 0xfbda], + // ARABIC LETTER OE + 0x06c7: [0xfbd7, 0xfbd8], + // ARABIC LETTER U + 0x06c8: [0xfbdb, 0xfbdc], + // ARABIC LETTER YU + 0x06c9: [0xfbe2, 0xfbe3], + // ARABIC LETTER KIRGHIZ YU + 0x06cb: [0xfbde, 0xfbdf], + // ARABIC LETTER VE + 0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], + // ARABIC LETTER FARSI YEH + 0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], + //ARABIC LETTER E + 0x06d2: [0xfbae, 0xfbaf], + // ARABIC LETTER YEH BARREE + 0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE + }; + + /* + var ligaturesSubstitutionA = { + 0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM + }; + */ + + var ligatures = { + 0xfedf: { + 0xfe82: 0xfef5, + // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM + 0xfe84: 0xfef7, + // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM + 0xfe88: 0xfef9, + // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM + 0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM + }, + 0xfee0: { + 0xfe82: 0xfef6, + // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM + 0xfe84: 0xfef8, + // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM + 0xfe88: 0xfefa, + // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM + 0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM + }, + 0xfe8d: { + 0xfedf: { + 0xfee0: { + 0xfeea: 0xfdf2 + } + } + }, + // ALLAH + 0x0651: { + 0x064c: 0xfc5e, + // Shadda + Dammatan + 0x064d: 0xfc5f, + // Shadda + Kasratan + 0x064e: 0xfc60, + // Shadda + Fatha + 0x064f: 0xfc61, + // Shadda + Damma + 0x0650: 0xfc62 // Shadda + Kasra + } + }; + var arabic_diacritics = { + 1612: 64606, + // Shadda + Dammatan + 1613: 64607, + // Shadda + Kasratan + 1614: 64608, + // Shadda + Fatha + 1615: 64609, + // Shadda + Damma + 1616: 64610 // Shadda + Kasra + }; + var alfletter = [1570, 1571, 1573, 1575]; + var noChangeInForm = -1; + var isolatedForm = 0; + var finalForm = 1; + var initialForm = 2; + var medialForm = 3; + jsPDFAPI.__arabicParser__ = {}; + + //private + var isInArabicSubstitutionA = jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function (letter) { + return typeof arabicSubstitionA[letter.charCodeAt(0)] !== "undefined"; + }; + var isArabicLetter = jsPDFAPI.__arabicParser__.isArabicLetter = function (letter) { + return typeof letter === "string" && /^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(letter); + }; + var isArabicEndLetter = jsPDFAPI.__arabicParser__.isArabicEndLetter = function (letter) { + return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length <= 2; + }; + var isArabicAlfLetter = jsPDFAPI.__arabicParser__.isArabicAlfLetter = function (letter) { + return isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0; + }; + jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function (letter) { + return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 1; + }; + var arabicLetterHasFinalForm = jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function (letter) { + return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 2; + }; + jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function (letter) { + return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 3; + }; + var arabicLetterHasMedialForm = jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function (letter) { + return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length == 4; + }; + var resolveLigatures = jsPDFAPI.__arabicParser__.resolveLigatures = function (letters) { + var i = 0; + var tmpLigatures = ligatures; + var result = ""; + var effectedLetters = 0; + for (i = 0; i < letters.length; i += 1) { + if (typeof tmpLigatures[letters.charCodeAt(i)] !== "undefined") { + effectedLetters++; + tmpLigatures = tmpLigatures[letters.charCodeAt(i)]; + if (typeof tmpLigatures === "number") { + result += String.fromCharCode(tmpLigatures); + tmpLigatures = ligatures; + effectedLetters = 0; + } + if (i === letters.length - 1) { + tmpLigatures = ligatures; + result += letters.charAt(i - (effectedLetters - 1)); + i = i - (effectedLetters - 1); + effectedLetters = 0; + } + } else { + tmpLigatures = ligatures; + result += letters.charAt(i - effectedLetters); + i = i - effectedLetters; + effectedLetters = 0; + } + } + return result; + }; + jsPDFAPI.__arabicParser__.isArabicDiacritic = function (letter) { + return letter !== undefined && arabic_diacritics[letter.charCodeAt(0)] !== undefined; + }; + var getCorrectForm = jsPDFAPI.__arabicParser__.getCorrectForm = function (currentChar, beforeChar, nextChar) { + if (!isArabicLetter(currentChar)) { + return -1; + } + if (isInArabicSubstitutionA(currentChar) === false) { + return noChangeInForm; + } + if (!arabicLetterHasFinalForm(currentChar) || !isArabicLetter(beforeChar) && !isArabicLetter(nextChar) || !isArabicLetter(nextChar) && isArabicEndLetter(beforeChar) || isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar) || isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar) || isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar)) { + return isolatedForm; + } + if (arabicLetterHasMedialForm(currentChar) && isArabicLetter(beforeChar) && !isArabicEndLetter(beforeChar) && isArabicLetter(nextChar) && arabicLetterHasFinalForm(nextChar)) { + return medialForm; + } + if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) { + return finalForm; + } + return initialForm; + }; + + /** + * @name processArabic + * @function + * @param {string} text + * @returns {string} + */ + var parseArabic = function parseArabic(text) { + text = text || ""; + var result = ""; + var i = 0; + var j = 0; + var position = 0; + var currentLetter = ""; + var prevLetter = ""; + var nextLetter = ""; + var words = text.split("\\s+"); + var newWords = []; + for (i = 0; i < words.length; i += 1) { + newWords.push(""); + for (j = 0; j < words[i].length; j += 1) { + currentLetter = words[i][j]; + prevLetter = words[i][j - 1]; + nextLetter = words[i][j + 1]; + if (isArabicLetter(currentLetter)) { + position = getCorrectForm(currentLetter, prevLetter, nextLetter); + if (position !== -1) { + newWords[i] += String.fromCharCode(arabicSubstitionA[currentLetter.charCodeAt(0)][position]); + } else { + newWords[i] += currentLetter; + } + } else { + newWords[i] += currentLetter; + } + } + newWords[i] = resolveLigatures(newWords[i]); + } + result = newWords.join(" "); + return result; + }; + var processArabic = jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function () { + var text = typeof arguments[0] === "string" ? arguments[0] : arguments[0].text; + var tmpText = []; + var result; + if (Array.isArray(text)) { + var i = 0; + tmpText = []; + for (i = 0; i < text.length; i += 1) { + if (Array.isArray(text[i])) { + tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]); + } else { + tmpText.push([parseArabic(text[i])]); + } + } + result = tmpText; + } else { + result = parseArabic(text); + } + if (typeof arguments[0] === "string") { + return result; + } else { + arguments[0].text = result; + return arguments[0]; + } + }; + jsPDFAPI.events.push(["preProcessText", processArabic]); + })(jsPDF.API); + + /** @license + * jsPDF Autoprint Plugin + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * @name autoprint + * @module + */ + (function (jsPDFAPI) { + + /** + * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer. + * + * @name autoPrint + * @function + * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer . + * @returns {jsPDF} + * @example + * var doc = new jsPDF(); + * doc.text(10, 10, 'This is a test'); + * doc.autoPrint({variant: 'non-conform'}); + * doc.save('autoprint.pdf'); + */ + jsPDFAPI.autoPrint = function (options) { + + var refAutoPrintTag; + options = options || {}; + options.variant = options.variant || "non-conform"; + switch (options.variant) { + case "javascript": + //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb + this.addJS("print({});"); + break; + case "non-conform": + default: + this.internal.events.subscribe("postPutResources", function () { + refAutoPrintTag = this.internal.newObject(); + this.internal.out("<<"); + this.internal.out("/S /Named"); + this.internal.out("/Type /Action"); + this.internal.out("/N /Print"); + this.internal.out(">>"); + this.internal.out("endobj"); + }); + this.internal.events.subscribe("putCatalog", function () { + this.internal.out("/OpenAction " + refAutoPrintTag + " 0 R"); + }); + break; + } + return this; + }; + })(jsPDF.API); + + /** + * @license + * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF Canvas PlugIn + * This plugin mimics the HTML5 Canvas + * + * The goal is to provide a way for current canvas users to print directly to a PDF. + * @name canvas + * @module + */ + (function (jsPDFAPI) { + + /** + * @class Canvas + * @classdesc A Canvas Wrapper for jsPDF + */ + var Canvas = function Canvas() { + var jsPdfInstance = undefined; + Object.defineProperty(this, "pdf", { + get: function get() { + return jsPdfInstance; + }, + set: function set(value) { + jsPdfInstance = value; + } + }); + var _width = 150; + /** + * The height property is a positive integer reflecting the height HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used. + * This is one of the two properties, the other being width, that controls the size of the canvas. + * + * @name width + */ + Object.defineProperty(this, "width", { + get: function get() { + return _width; + }, + set: function set(value) { + if (isNaN(value) || Number.isInteger(value) === false || value < 0) { + _width = 150; + } else { + _width = value; + } + if (this.getContext("2d").pageWrapXEnabled) { + this.getContext("2d").pageWrapX = _width + 1; + } + } + }); + var _height = 300; + /** + * The width property is a positive integer reflecting the width HTML attribute of the element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used. + * This is one of the two properties, the other being height, that controls the size of the canvas. + * + * @name height + */ + Object.defineProperty(this, "height", { + get: function get() { + return _height; + }, + set: function set(value) { + if (isNaN(value) || Number.isInteger(value) === false || value < 0) { + _height = 300; + } else { + _height = value; + } + if (this.getContext("2d").pageWrapYEnabled) { + this.getContext("2d").pageWrapY = _height + 1; + } + } + }); + var _childNodes = []; + Object.defineProperty(this, "childNodes", { + get: function get() { + return _childNodes; + }, + set: function set(value) { + _childNodes = value; + } + }); + var _style = {}; + Object.defineProperty(this, "style", { + get: function get() { + return _style; + }, + set: function set(value) { + _style = value; + } + }); + Object.defineProperty(this, "parentNode", {}); + }; + + /** + * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported. + * + * @name getContext + * @function + * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is "2d", leading to the creation of a Context2D object representing a two-dimensional rendering context. + * @param {object} contextAttributes + */ + Canvas.prototype.getContext = function (contextType, contextAttributes) { + contextType = contextType || "2d"; + var key; + if (contextType !== "2d") { + return null; + } + for (key in contextAttributes) { + if (this.pdf.context2d.hasOwnProperty(key)) { + this.pdf.context2d[key] = contextAttributes[key]; + } + } + this.pdf.context2d._canvas = this; + return this.pdf.context2d; + }; + + /** + * The toDataURL() method is just a stub to throw an error if accidently called. + * + * @name toDataURL + * @function + */ + Canvas.prototype.toDataURL = function () { + throw new Error("toDataURL is not implemented."); + }; + jsPDFAPI.events.push(["initialized", function () { + this.canvas = new Canvas(); + this.canvas.pdf = this; + }]); + return this; + })(jsPDF.API); + + /** + * @name cell + * @module + */ + (function (jsPDFAPI) { + + var NO_MARGINS = { + left: 0, + top: 0, + bottom: 0, + right: 0 + }; + var px2pt = 0.264583 * 72 / 25.4; + var printingHeaderRow = false; + var _initialize = function _initialize() { + if (typeof this.internal.__cell__ === "undefined") { + this.internal.__cell__ = {}; + this.internal.__cell__.padding = 3; + this.internal.__cell__.headerFunction = undefined; + this.internal.__cell__.margins = Object.assign({}, NO_MARGINS); + this.internal.__cell__.margins.width = this.getPageWidth(); + _reset.call(this); + } + }; + var _reset = function _reset() { + this.internal.__cell__.lastCell = new Cell(); + this.internal.__cell__.pages = 1; + }; + var Cell = function Cell() { + var _x = arguments[0]; + Object.defineProperty(this, "x", { + enumerable: true, + get: function get() { + return _x; + }, + set: function set(value) { + _x = value; + } + }); + var _y = arguments[1]; + Object.defineProperty(this, "y", { + enumerable: true, + get: function get() { + return _y; + }, + set: function set(value) { + _y = value; + } + }); + var _width = arguments[2]; + Object.defineProperty(this, "width", { + enumerable: true, + get: function get() { + return _width; + }, + set: function set(value) { + _width = value; + } + }); + var _height = arguments[3]; + Object.defineProperty(this, "height", { + enumerable: true, + get: function get() { + return _height; + }, + set: function set(value) { + _height = value; + } + }); + var _text = arguments[4]; + Object.defineProperty(this, "text", { + enumerable: true, + get: function get() { + return _text; + }, + set: function set(value) { + _text = value; + } + }); + var _lineNumber = arguments[5]; + Object.defineProperty(this, "lineNumber", { + enumerable: true, + get: function get() { + return _lineNumber; + }, + set: function set(value) { + _lineNumber = value; + } + }); + var _align = arguments[6]; + Object.defineProperty(this, "align", { + enumerable: true, + get: function get() { + return _align; + }, + set: function set(value) { + _align = value; + } + }); + return this; + }; + Cell.prototype.clone = function () { + return new Cell(this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align); + }; + Cell.prototype.toArray = function () { + return [this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align]; + }; + + /** + * @name setHeaderFunction + * @function + * @param {function} func + */ + jsPDFAPI.setHeaderFunction = function (func) { + _initialize.call(this); + this.internal.__cell__.headerFunction = typeof func === "function" ? func : undefined; + return this; + }; + + /** + * @name getTextDimensions + * @function + * @param {string} txt + * @returns {Object} dimensions + */ + jsPDFAPI.getTextDimensions = function (text, options) { + _initialize.call(this); + options = options || {}; + var fontSize = options.fontSize || this.getFontSize(); + var font = options.font || this.getFont(); + var scaleFactor = options.scaleFactor || this.internal.scaleFactor; + var width = 0; + var amountOfLines = 0; + var height = 0; + var tempWidth = 0; + var scope = this; + if (!Array.isArray(text) && typeof text !== "string") { + if (typeof text === "number") { + text = String(text); + } else { + throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings."); + } + } + var maxWidth = options.maxWidth; + if (maxWidth > 0) { + if (typeof text === "string") { + text = this.splitTextToSize(text, maxWidth); + } else if (Object.prototype.toString.call(text) === "[object Array]") { + text = text.reduce(function (acc, textLine) { + return acc.concat(scope.splitTextToSize(textLine, maxWidth)); + }, []); + } + } else { + // Without the else clause, it will not work if you do not pass along maxWidth + text = Array.isArray(text) ? text : [text]; + } + for (var i = 0; i < text.length; i++) { + tempWidth = this.getStringUnitWidth(text[i], { + font: font + }) * fontSize; + if (width < tempWidth) { + width = tempWidth; + } + } + if (width !== 0) { + amountOfLines = text.length; + } + width = width / scaleFactor; + height = Math.max((amountOfLines * fontSize * this.getLineHeightFactor() - fontSize * (this.getLineHeightFactor() - 1)) / scaleFactor, 0); + return { + w: width, + h: height + }; + }; + + /** + * @name cellAddPage + * @function + */ + jsPDFAPI.cellAddPage = function () { + _initialize.call(this); + this.addPage(); + var margins = this.internal.__cell__.margins || NO_MARGINS; + this.internal.__cell__.lastCell = new Cell(margins.left, margins.top, undefined, undefined); + this.internal.__cell__.pages += 1; + return this; + }; + + /** + * @name cell + * @function + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {string} text + * @param {number} lineNumber lineNumber + * @param {string} align + * @return {jsPDF} jsPDF-instance + */ + var cell = jsPDFAPI.cell = function () { + var currentCell; + if (arguments[0] instanceof Cell) { + currentCell = arguments[0]; + } else { + currentCell = new Cell(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + _initialize.call(this); + var lastCell = this.internal.__cell__.lastCell; + var padding = this.internal.__cell__.padding; + var margins = this.internal.__cell__.margins || NO_MARGINS; + var tableHeaderRow = this.internal.__cell__.tableHeaderRow; + var printHeaders = this.internal.__cell__.printHeaders; + // If this is not the first cell, we must change its position + if (typeof lastCell.lineNumber !== "undefined") { + if (lastCell.lineNumber === currentCell.lineNumber) { + //Same line + currentCell.x = (lastCell.x || 0) + (lastCell.width || 0); + currentCell.y = lastCell.y || 0; + } else { + //New line + if (lastCell.y + lastCell.height + currentCell.height + margins.bottom > this.getPageHeight()) { + this.cellAddPage(); + currentCell.y = margins.top; + if (printHeaders && tableHeaderRow) { + this.printHeaderRow(currentCell.lineNumber, true); + currentCell.y += tableHeaderRow[0].height; + } + } else { + currentCell.y = lastCell.y + lastCell.height || currentCell.y; + } + } + } + if (typeof currentCell.text[0] !== "undefined") { + this.rect(currentCell.x, currentCell.y, currentCell.width, currentCell.height, printingHeaderRow === true ? "FD" : undefined); + if (currentCell.align === "right") { + this.text(currentCell.text, currentCell.x + currentCell.width - padding, currentCell.y + padding, { + align: "right", + baseline: "top" + }); + } else if (currentCell.align === "center") { + this.text(currentCell.text, currentCell.x + currentCell.width / 2, currentCell.y + padding, { + align: "center", + baseline: "top", + maxWidth: currentCell.width - padding - padding + }); + } else { + this.text(currentCell.text, currentCell.x + padding, currentCell.y + padding, { + align: "left", + baseline: "top", + maxWidth: currentCell.width - padding - padding + }); + } + } + this.internal.__cell__.lastCell = currentCell; + return this; + }; + + /** + * Create a table from a set of data. + * @name table + * @function + * @param {Integer} [x] : left-position for top-left corner of table + * @param {Integer} [y] top-position for top-left corner of table + * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data. + * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost + * @param {Object} [config.printHeaders] True to print column headers at the top of every page + * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value + * @param {Object} [config.margins] margin values for left, top, bottom, and width + * @param {Object} [config.fontSize] Integer fontSize to use (optional) + * @param {Object} [config.padding] cell-padding in pt to use (optional) + * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional) + * @param {Object} [config.headerTextColor] default is #000 (optional) + * @param {Object} [config.rowStart] callback to handle before print each row (optional) + * @param {Object} [config.cellStart] callback to handle before print each cell (optional) + * @returns {jsPDF} jsPDF-instance + */ + + jsPDFAPI.table = function (x, y, data, headers, config) { + _initialize.call(this); + if (!data) { + throw new Error("No data for PDF table."); + } + config = config || {}; + var headerNames = [], + headerLabels = [], + headerAligns = [], + i, + columnMatrix = {}, + columnWidths = {}, + column, + columnMinWidths = [], + j, + tableHeaderConfigs = [], + //set up defaults. If a value is provided in config, defaults will be overwritten: + autoSize = config.autoSize || false, + printHeaders = config.printHeaders === false ? false : true, + fontSize = config.css && typeof config.css["font-size"] !== "undefined" ? config.css["font-size"] * 16 : config.fontSize || 12, + margins = config.margins || Object.assign({ + width: this.getPageWidth() + }, NO_MARGINS), + padding = typeof config.padding === "number" ? config.padding : 3, + headerBackgroundColor = config.headerBackgroundColor || "#c8c8c8", + headerTextColor = config.headerTextColor || "#000"; + _reset.call(this); + this.internal.__cell__.printHeaders = printHeaders; + this.internal.__cell__.margins = margins; + this.internal.__cell__.table_font_size = fontSize; + this.internal.__cell__.padding = padding; + this.internal.__cell__.headerBackgroundColor = headerBackgroundColor; + this.internal.__cell__.headerTextColor = headerTextColor; + this.setFontSize(fontSize); + + // Set header values + if (headers === undefined || headers === null) { + // No headers defined so we derive from data + headerNames = Object.keys(data[0]); + headerLabels = headerNames; + headerAligns = headerNames.map(function () { + return "left"; + }); + } else if (Array.isArray(headers) && _typeof(headers[0]) === "object") { + headerNames = headers.map(function (header) { + return header.name; + }); + headerLabels = headers.map(function (header) { + return header.prompt || header.name || ""; + }); + headerAligns = headers.map(function (header) { + return header.align || "left"; + }); + // Split header configs into names and prompts + for (i = 0; i < headers.length; i += 1) { + columnWidths[headers[i].name] = headers[i].width * px2pt; + } + } else if (Array.isArray(headers) && typeof headers[0] === "string") { + headerNames = headers; + headerLabels = headerNames; + headerAligns = headerNames.map(function () { + return "left"; + }); + } + if (autoSize || Array.isArray(headers) && typeof headers[0] === "string") { + var headerName; + for (i = 0; i < headerNames.length; i += 1) { + headerName = headerNames[i]; + + // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]} + + columnMatrix[headerName] = data.map(function (rec) { + return rec[headerName]; + }); + + // get header width + this.setFont(undefined, "bold"); + columnMinWidths.push(this.getTextDimensions(headerLabels[i], { + fontSize: this.internal.__cell__.table_font_size, + scaleFactor: this.internal.scaleFactor + }).w); + column = columnMatrix[headerName]; + + // get cell widths + this.setFont(undefined, "normal"); + for (j = 0; j < column.length; j += 1) { + columnMinWidths.push(this.getTextDimensions(column[j], { + fontSize: this.internal.__cell__.table_font_size, + scaleFactor: this.internal.scaleFactor + }).w); + } + + // get final column width + columnWidths[headerName] = Math.max.apply(null, columnMinWidths) + padding + padding; + + //have to reset + columnMinWidths = []; + } + } + + // -- Construct the table + + if (printHeaders) { + var row = {}; + for (i = 0; i < headerNames.length; i += 1) { + row[headerNames[i]] = {}; + row[headerNames[i]].text = headerLabels[i]; + row[headerNames[i]].align = headerAligns[i]; + } + var rowHeight = calculateLineHeight.call(this, row, columnWidths); + + // Construct the header row + tableHeaderConfigs = headerNames.map(function (value) { + return new Cell(x, y, columnWidths[value], rowHeight, row[value].text, undefined, row[value].align); + }); + + // Store the table header config + this.setTableHeaderRow(tableHeaderConfigs); + + // Print the header for the start of the table + this.printHeaderRow(1, false); + } + + // Construct the data rows + + var align = headers.reduce(function (pv, cv) { + pv[cv.name] = cv.align; + return pv; + }, {}); + for (i = 0; i < data.length; i += 1) { + if ("rowStart" in config && config.rowStart instanceof Function) { + config.rowStart({ + row: i, + data: data[i] + }, this); + } + var lineHeight = calculateLineHeight.call(this, data[i], columnWidths); + for (j = 0; j < headerNames.length; j += 1) { + var cellData = data[i][headerNames[j]]; + if ("cellStart" in config && config.cellStart instanceof Function) { + config.cellStart({ + row: i, + col: j, + data: cellData + }, this); + } + cell.call(this, new Cell(x, y, columnWidths[headerNames[j]], lineHeight, cellData, i + 2, align[headerNames[j]])); + } + } + this.internal.__cell__.table_x = x; + this.internal.__cell__.table_y = y; + return this; + }; + + /** + * Calculate the height for containing the highest column + * + * @name calculateLineHeight + * @function + * @param {Object[]} model is the line of data we want to calculate the height of + * @param {Integer[]} columnWidths is size of each column + * @returns {number} lineHeight + * @private + */ + var calculateLineHeight = function calculateLineHeight(model, columnWidths) { + var padding = this.internal.__cell__.padding; + var fontSize = this.internal.__cell__.table_font_size; + var scaleFactor = this.internal.scaleFactor; + return Object.keys(model).map(function (key) { + var value = model[key]; + return this.splitTextToSize(value.hasOwnProperty("text") ? value.text : value, columnWidths[key] - padding - padding); + }, this).map(function (value) { + return this.getLineHeightFactor() * value.length * fontSize / scaleFactor + padding + padding; + }, this).reduce(function (pv, cv) { + return Math.max(pv, cv); + }, 0); + }; + + /** + * Store the config for outputting a table header + * + * @name setTableHeaderRow + * @function + * @param {Object[]} config + * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell + * except the lineNumber parameter is excluded + */ + jsPDFAPI.setTableHeaderRow = function (config) { + _initialize.call(this); + this.internal.__cell__.tableHeaderRow = config; + }; + + /** + * Output the store header row + * + * @name printHeaderRow + * @function + * @param {number} lineNumber The line number to output the header at + * @param {boolean} new_page + */ + jsPDFAPI.printHeaderRow = function (lineNumber, new_page) { + _initialize.call(this); + if (!this.internal.__cell__.tableHeaderRow) { + throw new Error("Property tableHeaderRow does not exist."); + } + var tableHeaderCell; + printingHeaderRow = true; + if (typeof this.internal.__cell__.headerFunction === "function") { + var position = this.internal.__cell__.headerFunction(this, this.internal.__cell__.pages); + this.internal.__cell__.lastCell = new Cell(position[0], position[1], position[2], position[3], undefined, -1); + } + this.setFont(undefined, "bold"); + var tempHeaderConf = []; + for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) { + tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone(); + if (new_page) { + tableHeaderCell.y = this.internal.__cell__.margins.top || 0; + tempHeaderConf.push(tableHeaderCell); + } + tableHeaderCell.lineNumber = lineNumber; + var currentTextColor = this.getTextColor(); + this.setTextColor(this.internal.__cell__.headerTextColor); + this.setFillColor(this.internal.__cell__.headerBackgroundColor); + cell.call(this, tableHeaderCell); + this.setTextColor(currentTextColor); + } + if (tempHeaderConf.length > 0) { + this.setTableHeaderRow(tempHeaderConf); + } + this.setFont(undefined, "normal"); + printingHeaderRow = false; + }; + })(jsPDF.API); + + function toLookup(arr) { + return arr.reduce(function (lookup, name, index) { + lookup[name] = index; + return lookup; + }, {}); + } + var fontStyleOrder = { + italic: ["italic", "oblique", "normal"], + oblique: ["oblique", "italic", "normal"], + normal: ["normal", "oblique", "italic"] + }; + var fontStretchOrder = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"]; + + // For a given font-stretch value, we need to know where to start our search + // from in the fontStretchOrder list. + var fontStretchLookup = toLookup(fontStretchOrder); + var fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900]; + var fontWeightsLookup = toLookup(fontWeights); + function normalizeFontStretch(stretch) { + stretch = stretch || "normal"; + return typeof fontStretchLookup[stretch] === "number" ? stretch : "normal"; + } + function normalizeFontStyle(style) { + style = style || "normal"; + return fontStyleOrder[style] ? style : "normal"; + } + function normalizeFontWeight(weight) { + if (!weight) { + return 400; + } + if (typeof weight === "number") { + // Ignore values which aren't valid font-weights. + return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400; + } + if (/^\d00$/.test(weight)) { + return parseInt(weight); + } + switch (weight) { + case "bold": + return 700; + case "normal": + default: + return 400; + } + } + function normalizeFontFace(fontFace) { + var family = fontFace.family.replace(/"|'/g, "").toLowerCase(); + var style = normalizeFontStyle(fontFace.style); + var weight = normalizeFontWeight(fontFace.weight); + var stretch = normalizeFontStretch(fontFace.stretch); + return { + family: family, + style: style, + weight: weight, + stretch: stretch, + src: fontFace.src || [], + // The ref property maps this font-face to the font + // added by the .addFont() method. + ref: fontFace.ref || { + name: family, + style: [stretch, style, weight].join(" ") + } + }; + } + + /** + * Turns a list of font-faces into a map, for easier lookup when resolving + * fonts. + * @private + */ + function buildFontFaceMap(fontFaces) { + var map = {}; + for (var i = 0; i < fontFaces.length; ++i) { + var normalized = normalizeFontFace(fontFaces[i]); + var name = normalized.family; + var stretch = normalized.stretch; + var style = normalized.style; + var weight = normalized.weight; + map[name] = map[name] || {}; + map[name][stretch] = map[name][stretch] || {}; + map[name][stretch][style] = map[name][stretch][style] || {}; + map[name][stretch][style][weight] = normalized; + } + return map; + } + + /** + * Searches a map of stretches, weights, etc. in the given direction and + * then, if no match has been found, in the opposite directions. + * + * @param {Object.} matchingSet A map of the various font variations. + * @param {any[]} order The order of the different variations + * @param {number} pivot The starting point of the search in the order list. + * @param {number} dir The initial direction of the search (desc = -1, asc = 1) + * @private + */ + + function searchFromPivot(matchingSet, order, pivot, dir) { + var i; + for (i = pivot; i >= 0 && i < order.length; i += dir) { + if (matchingSet[order[i]]) { + return matchingSet[order[i]]; + } + } + for (i = pivot; i >= 0 && i < order.length; i -= dir) { + if (matchingSet[order[i]]) { + return matchingSet[order[i]]; + } + } + } + function resolveFontStretch(stretch, matchingSet) { + if (matchingSet[stretch]) { + return matchingSet[stretch]; + } + var pivot = fontStretchLookup[stretch]; + + // If the font-stretch value is normal or more condensed, we want to + // start with a descending search, otherwise we should do ascending. + var dir = pivot <= fontStretchLookup["normal"] ? -1 : 1; + var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir); + if (!match) { + // Since a font-family cannot exist without having at least one stretch value + // we should never reach this point. + throw new Error("Could not find a matching font-stretch value for " + stretch); + } + return match; + } + function resolveFontStyle(fontStyle, matchingSet) { + if (matchingSet[fontStyle]) { + return matchingSet[fontStyle]; + } + var ordering = fontStyleOrder[fontStyle]; + for (var i = 0; i < ordering.length; ++i) { + if (matchingSet[ordering[i]]) { + return matchingSet[ordering[i]]; + } + } + + // Since a font-family cannot exist without having at least one style value + // we should never reach this point. + throw new Error("Could not find a matching font-style for " + fontStyle); + } + function resolveFontWeight(weight, matchingSet) { + if (matchingSet[weight]) { + return matchingSet[weight]; + } + if (weight === 400 && matchingSet[500]) { + return matchingSet[500]; + } + if (weight === 500 && matchingSet[400]) { + return matchingSet[400]; + } + var pivot = fontWeightsLookup[weight]; + + // If the font-stretch value is normal or more condensed, we want to + // start with a descending search, otherwise we should do ascending. + var dir = weight < 400 ? -1 : 1; + var match = searchFromPivot(matchingSet, fontWeights, pivot, dir); + if (!match) { + // Since a font-family cannot exist without having at least one stretch value + // we should never reach this point. + throw new Error("Could not find a matching font-weight for value " + weight); + } + return match; + } + var defaultGenericFontFamilies = { + "sans-serif": "helvetica", + fixed: "courier", + monospace: "courier", + terminal: "courier", + cursive: "times", + fantasy: "times", + serif: "times" + }; + var systemFonts = { + caption: "times", + icon: "times", + menu: "times", + "message-box": "times", + "small-caption": "times", + "status-bar": "times" + }; + function ruleToString(rule) { + return [rule.stretch, rule.style, rule.weight, rule.family].join(" "); + } + function resolveFontFace(fontFaceMap, rules, opts) { + opts = opts || {}; + var defaultFontFamily = opts.defaultFontFamily || "times"; + var genericFontFamilies = Object.assign({}, defaultGenericFontFamilies, opts.genericFontFamilies || {}); + var rule = null; + var matches = null; + for (var i = 0; i < rules.length; ++i) { + rule = normalizeFontFace(rules[i]); + if (genericFontFamilies[rule.family]) { + rule.family = genericFontFamilies[rule.family]; + } + if (fontFaceMap.hasOwnProperty(rule.family)) { + matches = fontFaceMap[rule.family]; + break; + } + } + + // Always fallback to a known font family. + matches = matches || fontFaceMap[defaultFontFamily]; + if (!matches) { + // At this point we should definitiely have a font family, but if we + // don't there is something wrong with our configuration + throw new Error("Could not find a font-family for the rule '" + ruleToString(rule) + "' and default family '" + defaultFontFamily + "'."); + } + matches = resolveFontStretch(rule.stretch, matches); + matches = resolveFontStyle(rule.style, matches); + matches = resolveFontWeight(rule.weight, matches); + if (!matches) { + // We should've fount + throw new Error("Failed to resolve a font for the rule '" + ruleToString(rule) + "'."); + } + return matches; + } + function eatWhiteSpace(input) { + return input.trimLeft(); + } + function parseQuotedFontFamily(input, quote) { + var index = 0; + while (index < input.length) { + var current = input.charAt(index); + if (current === quote) { + return [input.substring(0, index), input.substring(index + 1)]; + } + index += 1; + } + + // Unexpected end of input + return null; + } + function parseNonQuotedFontFamily(input) { + // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + // + // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode. + // + // Breakdown of regexp: + // -[a-z_] - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit + // [a-z_] - allow a-z and underscore at beginning of input + // [a-z0-9_-]* - after that, anything goes + var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i); + + // non quoted value contains illegal characters + if (match === null) { + return null; + } + return [match[0], input.substring(match[0].length)]; + } + var defaultFont = ["times"]; + function parseFontFamily(input) { + var result = []; + var ch, parsed; + var remaining = input.trim(); + if (remaining === "") { + return defaultFont; + } + if (remaining in systemFonts) { + return [systemFonts[remaining]]; + } + while (remaining !== "") { + parsed = null; + remaining = eatWhiteSpace(remaining); + ch = remaining.charAt(0); + switch (ch) { + case '"': + case "'": + parsed = parseQuotedFontFamily(remaining.substring(1), ch); + break; + default: + parsed = parseNonQuotedFontFamily(remaining); + break; + } + if (parsed === null) { + return defaultFont; + } + result.push(parsed[0]); + remaining = eatWhiteSpace(parsed[1]); + + // We expect end of input or a comma separator here + if (remaining !== "" && remaining.charAt(0) !== ",") { + return defaultFont; + } + remaining = remaining.replace(/^,/, ""); + } + return result; + } + + /** + * This plugin mimics the HTML5 CanvasRenderingContext2D. + * + * The goal is to provide a way for current canvas implementations to print directly to a PDF. + * + * @name context2d + * @module + */ + (function (jsPDFAPI) { + + var ContextLayer = function ContextLayer(ctx) { + ctx = ctx || {}; + this.isStrokeTransparent = ctx.isStrokeTransparent || false; + this.strokeOpacity = ctx.strokeOpacity || 1; + this.strokeStyle = ctx.strokeStyle || "#000000"; + this.fillStyle = ctx.fillStyle || "#000000"; + this.isFillTransparent = ctx.isFillTransparent || false; + this.fillOpacity = ctx.fillOpacity || 1; + this.font = ctx.font || "10px sans-serif"; + this.textBaseline = ctx.textBaseline || "alphabetic"; + this.textAlign = ctx.textAlign || "left"; + this.lineWidth = ctx.lineWidth || 1; + this.lineJoin = ctx.lineJoin || "miter"; + this.lineCap = ctx.lineCap || "butt"; + this.path = ctx.path || []; + this.transform = typeof ctx.transform !== "undefined" ? ctx.transform.clone() : new Matrix(); + this.globalCompositeOperation = ctx.globalCompositeOperation || "normal"; + this.globalAlpha = ctx.globalAlpha || 1.0; + this.clip_path = ctx.clip_path || []; + this.currentPoint = ctx.currentPoint || new Point(); + this.miterLimit = ctx.miterLimit || 10.0; + this.lastPoint = ctx.lastPoint || new Point(); + this.lineDashOffset = ctx.lineDashOffset || 0.0; + this.lineDash = ctx.lineDash || []; + this.margin = ctx.margin || [0, 0, 0, 0]; + this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0; + this.ignoreClearRect = typeof ctx.ignoreClearRect === "boolean" ? ctx.ignoreClearRect : true; + return this; + }; + + //stub + var f2, getHorizontalCoordinateString, getVerticalCoordinateString, getHorizontalCoordinate, getVerticalCoordinate, Point, Rectangle, Matrix, _ctx; + jsPDFAPI.events.push(["initialized", function () { + this.context2d = new Context2D(this); + f2 = this.internal.f2; + getHorizontalCoordinateString = this.internal.getCoordinateString; + getVerticalCoordinateString = this.internal.getVerticalCoordinateString; + getHorizontalCoordinate = this.internal.getHorizontalCoordinate; + getVerticalCoordinate = this.internal.getVerticalCoordinate; + Point = this.internal.Point; + Rectangle = this.internal.Rectangle; + Matrix = this.internal.Matrix; + _ctx = new ContextLayer(); + }]); + var Context2D = function Context2D(pdf) { + Object.defineProperty(this, "canvas", { + get: function get() { + return { + parentNode: false, + style: false + }; + } + }); + var _pdf = pdf; + Object.defineProperty(this, "pdf", { + get: function get() { + return _pdf; + } + }); + var _pageWrapXEnabled = false; + /** + * @name pageWrapXEnabled + * @type {boolean} + * @default false + */ + Object.defineProperty(this, "pageWrapXEnabled", { + get: function get() { + return _pageWrapXEnabled; + }, + set: function set(value) { + _pageWrapXEnabled = Boolean(value); + } + }); + var _pageWrapYEnabled = false; + /** + * @name pageWrapYEnabled + * @type {boolean} + * @default true + */ + Object.defineProperty(this, "pageWrapYEnabled", { + get: function get() { + return _pageWrapYEnabled; + }, + set: function set(value) { + _pageWrapYEnabled = Boolean(value); + } + }); + var _posX = 0; + /** + * @name posX + * @type {number} + * @default 0 + */ + Object.defineProperty(this, "posX", { + get: function get() { + return _posX; + }, + set: function set(value) { + if (!isNaN(value)) { + _posX = value; + } + } + }); + var _posY = 0; + /** + * @name posY + * @type {number} + * @default 0 + */ + Object.defineProperty(this, "posY", { + get: function get() { + return _posY; + }, + set: function set(value) { + if (!isNaN(value)) { + _posY = value; + } + } + }); + + /** + * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off. + * @name margin + * @type {number|number[]} + * @default [0, 0, 0, 0] + */ + Object.defineProperty(this, "margin", { + get: function get() { + return _ctx.margin; + }, + set: function set(value) { + var margin; + if (typeof value === "number") { + margin = [value, value, value, value]; + } else { + margin = new Array(4); + margin[0] = value[0]; + margin[1] = value.length >= 2 ? value[1] : margin[0]; + margin[2] = value.length >= 3 ? value[2] : margin[0]; + margin[3] = value.length >= 4 ? value[3] : margin[1]; + } + _ctx.margin = margin; + } + }); + var _autoPaging = false; + /** + * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the + * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new + * pages if required. + * + * Context2d supports different modes: + *
    + *
  • + * false: Auto paging is disabled. + *
  • + *
  • + * true or 'slice': Will cut shapes or text chunks across page breaks. Will possibly + * slice text in half, making it difficult to read. + *
  • + *
  • + * 'text': Trys not to cut text in half across page breaks. Works best for documents consisting + * mostly of a single column of text. + *
  • + *
+ * @name Context2D#autoPaging + * @type {boolean|"slice"|"text"} + * @default false + */ + Object.defineProperty(this, "autoPaging", { + get: function get() { + return _autoPaging; + }, + set: function set(value) { + _autoPaging = value; + } + }); + var lastBreak = 0; + /** + * @name lastBreak + * @type {number} + * @default 0 + */ + Object.defineProperty(this, "lastBreak", { + get: function get() { + return lastBreak; + }, + set: function set(value) { + lastBreak = value; + } + }); + var pageBreaks = []; + /** + * Y Position of page breaks. + * @name pageBreaks + * @type {number} + * @default 0 + */ + Object.defineProperty(this, "pageBreaks", { + get: function get() { + return pageBreaks; + }, + set: function set(value) { + pageBreaks = value; + } + }); + + /** + * @name ctx + * @type {object} + * @default {} + */ + Object.defineProperty(this, "ctx", { + get: function get() { + return _ctx; + }, + set: function set(value) { + if (value instanceof ContextLayer) { + _ctx = value; + } + } + }); + + /** + * @name path + * @type {array} + * @default [] + */ + Object.defineProperty(this, "path", { + get: function get() { + return _ctx.path; + }, + set: function set(value) { + _ctx.path = value; + } + }); + + /** + * @name ctxStack + * @type {array} + * @default [] + */ + var _ctxStack = []; + Object.defineProperty(this, "ctxStack", { + get: function get() { + return _ctxStack; + }, + set: function set(value) { + _ctxStack = value; + } + }); + + /** + * Sets or returns the color, gradient, or pattern used to fill the drawing + * + * @name fillStyle + * @default #000000 + * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000
+ * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)
+ * A pattern object to use to fill the drawing (not supported by context2d) + */ + Object.defineProperty(this, "fillStyle", { + get: function get() { + return this.ctx.fillStyle; + }, + set: function set(value) { + var rgba; + rgba = getRGBA(value); + this.ctx.fillStyle = rgba.style; + this.ctx.isFillTransparent = rgba.a === 0; + this.ctx.fillOpacity = rgba.a; + this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { + a: rgba.a + }); + this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { + a: rgba.a + }); + } + }); + + /** + * Sets or returns the color, gradient, or pattern used for strokes + * + * @name strokeStyle + * @default #000000 + * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d) + * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d) + * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d) + */ + Object.defineProperty(this, "strokeStyle", { + get: function get() { + return this.ctx.strokeStyle; + }, + set: function set(value) { + var rgba = getRGBA(value); + this.ctx.strokeStyle = rgba.style; + this.ctx.isStrokeTransparent = rgba.a === 0; + this.ctx.strokeOpacity = rgba.a; + if (rgba.a === 0) { + this.pdf.setDrawColor(255, 255, 255); + } else if (rgba.a === 1) { + this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b); + } else { + this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b); + } + } + }); + + /** + * Sets or returns the style of the end caps for a line + * + * @name lineCap + * @default butt + * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line
+ * round A rounded end cap is added to each end of the line
+ * square A square end cap is added to each end of the line
+ */ + Object.defineProperty(this, "lineCap", { + get: function get() { + return this.ctx.lineCap; + }, + set: function set(value) { + if (["butt", "round", "square"].indexOf(value) !== -1) { + this.ctx.lineCap = value; + this.pdf.setLineCap(value); + } + } + }); + + /** + * Sets or returns the current line width + * + * @name lineWidth + * @default 1 + * @property {number} lineWidth The current line width, in pixels + */ + Object.defineProperty(this, "lineWidth", { + get: function get() { + return this.ctx.lineWidth; + }, + set: function set(value) { + if (!isNaN(value)) { + this.ctx.lineWidth = value; + this.pdf.setLineWidth(value); + } + } + }); + + /** + * Sets or returns the type of corner created, when two lines meet + */ + Object.defineProperty(this, "lineJoin", { + get: function get() { + return this.ctx.lineJoin; + }, + set: function set(value) { + if (["bevel", "round", "miter"].indexOf(value) !== -1) { + this.ctx.lineJoin = value; + this.pdf.setLineJoin(value); + } + } + }); + + /** + * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0. + * + * @name miterLimit + * @default 10 + */ + Object.defineProperty(this, "miterLimit", { + get: function get() { + return this.ctx.miterLimit; + }, + set: function set(value) { + if (!isNaN(value)) { + this.ctx.miterLimit = value; + this.pdf.setMiterLimit(value); + } + } + }); + Object.defineProperty(this, "textBaseline", { + get: function get() { + return this.ctx.textBaseline; + }, + set: function set(value) { + this.ctx.textBaseline = value; + } + }); + Object.defineProperty(this, "textAlign", { + get: function get() { + return this.ctx.textAlign; + }, + set: function set(value) { + if (["right", "end", "center", "left", "start"].indexOf(value) !== -1) { + this.ctx.textAlign = value; + } + } + }); + var _fontFaceMap = null; + function getFontFaceMap(pdf, fontFaces) { + if (_fontFaceMap === null) { + var fontMap = pdf.getFontList(); + var convertedFontFaces = convertToFontFaces(fontMap); + _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces)); + } + return _fontFaceMap; + } + function convertToFontFaces(fontMap) { + var fontFaces = []; + Object.keys(fontMap).forEach(function (family) { + var styles = fontMap[family]; + styles.forEach(function (style) { + var fontFace = null; + switch (style) { + case "bold": + fontFace = { + family: family, + weight: "bold" + }; + break; + case "italic": + fontFace = { + family: family, + style: "italic" + }; + break; + case "bolditalic": + fontFace = { + family: family, + weight: "bold", + style: "italic" + }; + break; + case "": + case "normal": + fontFace = { + family: family + }; + break; + } + + // If font-face is still null here, it is a font with some styling we don't recognize and + // cannot map or it is a font added via the fontFaces option of .html(). + if (fontFace !== null) { + fontFace.ref = { + name: family, + style: style + }; + fontFaces.push(fontFace); + } + }); + }); + return fontFaces; + } + var _fontFaces = null; + /** + * A map of available font-faces, as passed in the options of + * .html(). If set a limited implementation of the font style matching + * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm + * will be used. If not set it will fallback to previous behavior. + */ + + Object.defineProperty(this, "fontFaces", { + get: function get() { + return _fontFaces; + }, + set: function set(value) { + _fontFaceMap = null; + _fontFaces = value; + } + }); + Object.defineProperty(this, "font", { + get: function get() { + return this.ctx.font; + }, + set: function set(value) { + this.ctx.font = value; + var rx, matches; + + //source: https://stackoverflow.com/a/10136041 + // eslint-disable-next-line no-useless-escape + rx = /^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i; + matches = rx.exec(value); + if (matches !== null) { + var fontStyle = matches[1]; + matches[2]; + var fontWeight = matches[3]; + var fontSize = matches[4]; + matches[5]; + var fontFamily = matches[6]; + } else { + return; + } + var rxFontSize = /^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i; + var fontSizeUnit = rxFontSize.exec(fontSize)[2]; + if ("px" === fontSizeUnit) { + fontSize = Math.floor(parseFloat(fontSize) * this.pdf.internal.scaleFactor); + } else if ("em" === fontSizeUnit) { + fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize()); + } else { + fontSize = Math.floor(parseFloat(fontSize) * this.pdf.internal.scaleFactor); + } + this.pdf.setFontSize(fontSize); + var parts = parseFontFamily(fontFamily); + if (this.fontFaces) { + var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces); + var rules = parts.map(function (ff) { + return { + family: ff, + stretch: "normal", + // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?) + weight: fontWeight, + style: fontStyle + }; + }); + var font = resolveFontFace(fontFaceMap, rules); + this.pdf.setFont(font.ref.name, font.ref.style); + return; + } + var style = ""; + if (fontWeight === "bold" || parseInt(fontWeight, 10) >= 700 || fontStyle === "bold") { + style = "bold"; + } + if (fontStyle === "italic") { + style += "italic"; + } + if (style.length === 0) { + style = "normal"; + } + var jsPdfFontName = ""; + var fallbackFonts = { + arial: "Helvetica", + Arial: "Helvetica", + verdana: "Helvetica", + Verdana: "Helvetica", + helvetica: "Helvetica", + Helvetica: "Helvetica", + "sans-serif": "Helvetica", + fixed: "Courier", + monospace: "Courier", + terminal: "Courier", + cursive: "Times", + fantasy: "Times", + serif: "Times" + }; + for (var i = 0; i < parts.length; i++) { + if (this.pdf.internal.getFont(parts[i], style, { + noFallback: true, + disableWarning: true + }) !== undefined) { + jsPdfFontName = parts[i]; + break; + } else if (style === "bolditalic" && this.pdf.internal.getFont(parts[i], "bold", { + noFallback: true, + disableWarning: true + }) !== undefined) { + jsPdfFontName = parts[i]; + style = "bold"; + } else if (this.pdf.internal.getFont(parts[i], "normal", { + noFallback: true, + disableWarning: true + }) !== undefined) { + jsPdfFontName = parts[i]; + style = "normal"; + break; + } + } + if (jsPdfFontName === "") { + for (var j = 0; j < parts.length; j++) { + if (fallbackFonts[parts[j]]) { + jsPdfFontName = fallbackFonts[parts[j]]; + break; + } + } + } + jsPdfFontName = jsPdfFontName === "" ? "Times" : jsPdfFontName; + this.pdf.setFont(jsPdfFontName, style); + } + }); + Object.defineProperty(this, "globalCompositeOperation", { + get: function get() { + return this.ctx.globalCompositeOperation; + }, + set: function set(value) { + this.ctx.globalCompositeOperation = value; + } + }); + Object.defineProperty(this, "globalAlpha", { + get: function get() { + return this.ctx.globalAlpha; + }, + set: function set(value) { + this.ctx.globalAlpha = value; + } + }); + + /** + * A float specifying the amount of the line dash offset. The default value is 0.0. + * + * @name lineDashOffset + * @default 0.0 + */ + Object.defineProperty(this, "lineDashOffset", { + get: function get() { + return this.ctx.lineDashOffset; + }, + set: function set(value) { + this.ctx.lineDashOffset = value; + setLineDash.call(this); + } + }); + + // Not HTML API + Object.defineProperty(this, "lineDash", { + get: function get() { + return this.ctx.lineDash; + }, + set: function set(value) { + this.ctx.lineDash = value; + setLineDash.call(this); + } + }); + + // Not HTML API + Object.defineProperty(this, "ignoreClearRect", { + get: function get() { + return this.ctx.ignoreClearRect; + }, + set: function set(value) { + this.ctx.ignoreClearRect = Boolean(value); + } + }); + }; + + /** + * Sets the line dash pattern used when stroking lines. + * @name setLineDash + * @function + * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern. + */ + Context2D.prototype.setLineDash = function (dashArray) { + this.lineDash = dashArray; + }; + + /** + * gets the current line dash pattern. + * @name getLineDash + * @function + * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25]. + */ + Context2D.prototype.getLineDash = function () { + if (this.lineDash.length % 2) { + // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value + return this.lineDash.concat(this.lineDash); + } else { + // The copied value is returned to prevent contamination from outside. + return this.lineDash.slice(); + } + }; + Context2D.prototype.fill = function () { + pathPreProcess.call(this, "fill", false); + }; + + /** + * Actually draws the path you have defined + * + * @name stroke + * @function + * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black. + */ + Context2D.prototype.stroke = function () { + pathPreProcess.call(this, "stroke", false); + }; + + /** + * Begins a path, or resets the current + * + * @name beginPath + * @function + * @description The beginPath() method begins a path, or resets the current path. + */ + Context2D.prototype.beginPath = function () { + this.path = [{ + type: "begin" + }]; + }; + + /** + * Moves the path to the specified point in the canvas, without creating a line + * + * @name moveTo + * @function + * @param x {Number} The x-coordinate of where to move the path to + * @param y {Number} The y-coordinate of where to move the path to + */ + Context2D.prototype.moveTo = function (x, y) { + if (isNaN(x) || isNaN(y)) { + console.error("jsPDF.context2d.moveTo: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo"); + } + var pt = this.ctx.transform.applyToPoint(new Point(x, y)); + this.path.push({ + type: "mt", + x: pt.x, + y: pt.y + }); + this.ctx.lastPoint = new Point(x, y); + }; + + /** + * Creates a path from the current point back to the starting point + * + * @name closePath + * @function + * @description The closePath() method creates a path from the current point back to the starting point. + */ + Context2D.prototype.closePath = function () { + var pathBegin = new Point(0, 0); + var i = 0; + for (i = this.path.length - 1; i !== -1; i--) { + if (this.path[i].type === "begin") { + if (_typeof(this.path[i + 1]) === "object" && typeof this.path[i + 1].x === "number") { + pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y); + break; + } + } + } + this.path.push({ + type: "close" + }); + this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y); + }; + + /** + * Adds a new point and creates a line to that point from the last specified point in the canvas + * + * @name lineTo + * @function + * @param x The x-coordinate of where to create the line to + * @param y The y-coordinate of where to create the line to + * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line). + */ + Context2D.prototype.lineTo = function (x, y) { + if (isNaN(x) || isNaN(y)) { + console.error("jsPDF.context2d.lineTo: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo"); + } + var pt = this.ctx.transform.applyToPoint(new Point(x, y)); + this.path.push({ + type: "lt", + x: pt.x, + y: pt.y + }); + this.ctx.lastPoint = new Point(pt.x, pt.y); + }; + + /** + * Clips a region of any shape and size from the original canvas + * + * @name clip + * @function + * @description The clip() method clips a region of any shape and size from the original canvas. + */ + Context2D.prototype.clip = function () { + this.ctx.clip_path = JSON.parse(JSON.stringify(this.path)); + pathPreProcess.call(this, null, true); + }; + + /** + * Creates a cubic Bézier curve + * + * @name quadraticCurveTo + * @function + * @param cpx {Number} The x-coordinate of the Bézier control point + * @param cpy {Number} The y-coordinate of the Bézier control point + * @param x {Number} The x-coordinate of the ending point + * @param y {Number} The y-coordinate of the ending point + * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.

A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point. + */ + Context2D.prototype.quadraticCurveTo = function (cpx, cpy, x, y) { + if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) { + console.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo"); + } + var pt0 = this.ctx.transform.applyToPoint(new Point(x, y)); + var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy)); + this.path.push({ + type: "qct", + x1: pt1.x, + y1: pt1.y, + x: pt0.x, + y: pt0.y + }); + this.ctx.lastPoint = new Point(pt0.x, pt0.y); + }; + + /** + * Creates a cubic Bézier curve + * + * @name bezierCurveTo + * @function + * @param cp1x {Number} The x-coordinate of the first Bézier control point + * @param cp1y {Number} The y-coordinate of the first Bézier control point + * @param cp2x {Number} The x-coordinate of the second Bézier control point + * @param cp2y {Number} The y-coordinate of the second Bézier control point + * @param x {Number} The x-coordinate of the ending point + * @param y {Number} The y-coordinate of the ending point + * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve.

A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point. + */ + Context2D.prototype.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) { + if (isNaN(x) || isNaN(y) || isNaN(cp1x) || isNaN(cp1y) || isNaN(cp2x) || isNaN(cp2y)) { + console.error("jsPDF.context2d.bezierCurveTo: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo"); + } + var pt0 = this.ctx.transform.applyToPoint(new Point(x, y)); + var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y)); + var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y)); + this.path.push({ + type: "bct", + x1: pt1.x, + y1: pt1.y, + x2: pt2.x, + y2: pt2.y, + x: pt0.x, + y: pt0.y + }); + this.ctx.lastPoint = new Point(pt0.x, pt0.y); + }; + + /** + * Creates an arc/curve (used to create circles, or parts of circles) + * + * @name arc + * @function + * @param x {Number} The x-coordinate of the center of the circle + * @param y {Number} The y-coordinate of the center of the circle + * @param radius {Number} The radius of the circle + * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle) + * @param endAngle {Number} The ending angle, in radians + * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise. + * @description The arc() method creates an arc/curve (used to create circles, or parts of circles). + */ + Context2D.prototype.arc = function (x, y, radius, startAngle, endAngle, counterclockwise) { + if (isNaN(x) || isNaN(y) || isNaN(radius) || isNaN(startAngle) || isNaN(endAngle)) { + console.error("jsPDF.context2d.arc: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.arc"); + } + counterclockwise = Boolean(counterclockwise); + if (!this.ctx.transform.isIdentity) { + var xpt = this.ctx.transform.applyToPoint(new Point(x, y)); + x = xpt.x; + y = xpt.y; + var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius)); + var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0)); + radius = Math.sqrt(Math.pow(x_radPt.x - x_radPt0.x, 2) + Math.pow(x_radPt.y - x_radPt0.y, 2)); + } + if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) { + startAngle = 0; + endAngle = 2 * Math.PI; + } + this.path.push({ + type: "arc", + x: x, + y: y, + radius: radius, + startAngle: startAngle, + endAngle: endAngle, + counterclockwise: counterclockwise + }); + // this.ctx.lastPoint(new Point(pt.x,pt.y)); + }; + + /** + * Creates an arc/curve between two tangents + * + * @name arcTo + * @function + * @param x1 {Number} The x-coordinate of the first tangent + * @param y1 {Number} The y-coordinate of the first tangent + * @param x2 {Number} The x-coordinate of the second tangent + * @param y2 {Number} The y-coordinate of the second tangent + * @param radius The radius of the arc + * @description The arcTo() method creates an arc/curve between two tangents on the canvas. + */ + // eslint-disable-next-line no-unused-vars + Context2D.prototype.arcTo = function (x1, y1, x2, y2, radius) { + throw new Error("arcTo not implemented."); + }; + + /** + * Creates a rectangle + * + * @name rect + * @function + * @param x {Number} The x-coordinate of the upper-left corner of the rectangle + * @param y {Number} The y-coordinate of the upper-left corner of the rectangle + * @param w {Number} The width of the rectangle, in pixels + * @param h {Number} The height of the rectangle, in pixels + * @description The rect() method creates a rectangle. + */ + Context2D.prototype.rect = function (x, y, w, h) { + if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) { + console.error("jsPDF.context2d.rect: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.rect"); + } + this.moveTo(x, y); + this.lineTo(x + w, y); + this.lineTo(x + w, y + h); + this.lineTo(x, y + h); + this.lineTo(x, y); + this.lineTo(x + w, y); + this.lineTo(x, y); + }; + + /** + * Draws a "filled" rectangle + * + * @name fillRect + * @function + * @param x {Number} The x-coordinate of the upper-left corner of the rectangle + * @param y {Number} The y-coordinate of the upper-left corner of the rectangle + * @param w {Number} The width of the rectangle, in pixels + * @param h {Number} The height of the rectangle, in pixels + * @description The fillRect() method draws a "filled" rectangle. The default color of the fill is black. + */ + Context2D.prototype.fillRect = function (x, y, w, h) { + if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) { + console.error("jsPDF.context2d.fillRect: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.fillRect"); + } + if (isFillTransparent.call(this)) { + return; + } + var tmp = {}; + if (this.lineCap !== "butt") { + tmp.lineCap = this.lineCap; + this.lineCap = "butt"; + } + if (this.lineJoin !== "miter") { + tmp.lineJoin = this.lineJoin; + this.lineJoin = "miter"; + } + this.beginPath(); + this.rect(x, y, w, h); + this.fill(); + if (tmp.hasOwnProperty("lineCap")) { + this.lineCap = tmp.lineCap; + } + if (tmp.hasOwnProperty("lineJoin")) { + this.lineJoin = tmp.lineJoin; + } + }; + + /** + * Draws a rectangle (no fill) + * + * @name strokeRect + * @function + * @param x {Number} The x-coordinate of the upper-left corner of the rectangle + * @param y {Number} The y-coordinate of the upper-left corner of the rectangle + * @param w {Number} The width of the rectangle, in pixels + * @param h {Number} The height of the rectangle, in pixels + * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black. + */ + Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) { + if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) { + console.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.strokeRect"); + } + if (isStrokeTransparent.call(this)) { + return; + } + this.beginPath(); + this.rect(x, y, w, h); + this.stroke(); + }; + + /** + * Clears the specified pixels within a given rectangle + * + * @name clearRect + * @function + * @param x {Number} The x-coordinate of the upper-left corner of the rectangle + * @param y {Number} The y-coordinate of the upper-left corner of the rectangle + * @param w {Number} The width of the rectangle to clear, in pixels + * @param h {Number} The height of the rectangle to clear, in pixels + * @description We cannot clear PDF commands that were already written to PDF, so we use white instead.
+ * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set. + * This results in all calls to clearRect() to do nothing, and keep the canvas transparent. + * This flag is stored in the save/restore context and is managed the same way as other drawing states. + * + */ + Context2D.prototype.clearRect = function (x, y, w, h) { + if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) { + console.error("jsPDF.context2d.clearRect: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.clearRect"); + } + if (this.ignoreClearRect) { + return; + } + this.fillStyle = "#ffffff"; + this.fillRect(x, y, w, h); + }; + + /** + * Saves the state of the current context + * + * @name save + * @function + */ + Context2D.prototype.save = function (doStackPush) { + doStackPush = typeof doStackPush === "boolean" ? doStackPush : true; + var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber; + for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) { + this.pdf.setPage(i + 1); + this.pdf.internal.out("q"); + } + this.pdf.setPage(tmpPageNumber); + if (doStackPush) { + this.ctx.fontSize = this.pdf.internal.getFontSize(); + var ctx = new ContextLayer(this.ctx); + this.ctxStack.push(this.ctx); + this.ctx = ctx; + } + }; + + /** + * Returns previously saved path state and attributes + * + * @name restore + * @function + */ + Context2D.prototype.restore = function (doStackPop) { + doStackPop = typeof doStackPop === "boolean" ? doStackPop : true; + var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber; + for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) { + this.pdf.setPage(i + 1); + this.pdf.internal.out("Q"); + } + this.pdf.setPage(tmpPageNumber); + if (doStackPop && this.ctxStack.length !== 0) { + this.ctx = this.ctxStack.pop(); + this.fillStyle = this.ctx.fillStyle; + this.strokeStyle = this.ctx.strokeStyle; + this.font = this.ctx.font; + this.lineCap = this.ctx.lineCap; + this.lineWidth = this.ctx.lineWidth; + this.lineJoin = this.ctx.lineJoin; + this.lineDash = this.ctx.lineDash; + this.lineDashOffset = this.ctx.lineDashOffset; + } + }; + + /** + * @name toDataURL + * @function + */ + Context2D.prototype.toDataURL = function () { + throw new Error("toDataUrl not implemented."); + }; + + //helper functions + + /** + * Get the decimal values of r, g, b and a + * + * @name getRGBA + * @function + * @private + * @ignore + */ + var getRGBA = function getRGBA(style) { + var rxRgb = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/; + var rxRgba = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/; + var rxTransparent = /transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/; + var r, g, b, a; + if (style.isCanvasGradient === true) { + style = style.getColor(); + } + if (!style) { + return { + r: 0, + g: 0, + b: 0, + a: 0, + style: style + }; + } + if (rxTransparent.test(style)) { + r = 0; + g = 0; + b = 0; + a = 0; + } else { + var matches = rxRgb.exec(style); + if (matches !== null) { + r = parseInt(matches[1]); + g = parseInt(matches[2]); + b = parseInt(matches[3]); + a = 1; + } else { + matches = rxRgba.exec(style); + if (matches !== null) { + r = parseInt(matches[1]); + g = parseInt(matches[2]); + b = parseInt(matches[3]); + a = parseFloat(matches[4]); + } else { + a = 1; + if (typeof style === "string" && style.charAt(0) !== "#") { + var rgbColor = new RGBColor(style); + if (rgbColor.ok) { + style = rgbColor.toHex(); + } else { + style = "#000000"; + } + } + if (style.length === 4) { + r = style.substring(1, 2); + r += r; + g = style.substring(2, 3); + g += g; + b = style.substring(3, 4); + b += b; + } else { + r = style.substring(1, 3); + g = style.substring(3, 5); + b = style.substring(5, 7); + } + r = parseInt(r, 16); + g = parseInt(g, 16); + b = parseInt(b, 16); + } + } + } + return { + r: r, + g: g, + b: b, + a: a, + style: style + }; + }; + + /** + * @name isFillTransparent + * @function + * @private + * @ignore + * @returns {Boolean} + */ + var isFillTransparent = function isFillTransparent() { + return this.ctx.isFillTransparent || this.globalAlpha == 0; + }; + + /** + * @name isStrokeTransparent + * @function + * @private + * @ignore + * @returns {Boolean} + */ + var isStrokeTransparent = function isStrokeTransparent() { + return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0); + }; + + /** + * Draws "filled" text on the canvas + * + * @name fillText + * @function + * @param text {String} Specifies the text that will be written on the canvas + * @param x {Number} The x coordinate where to start painting the text (relative to the canvas) + * @param y {Number} The y coordinate where to start painting the text (relative to the canvas) + * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels + * @description The fillText() method draws filled text on the canvas. The default color of the text is black. + */ + Context2D.prototype.fillText = function (text, x, y, maxWidth) { + if (isNaN(x) || isNaN(y) || typeof text !== "string") { + console.error("jsPDF.context2d.fillText: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.fillText"); + } + maxWidth = isNaN(maxWidth) ? undefined : maxWidth; + if (isFillTransparent.call(this)) { + return; + } + var degs = rad2deg(this.ctx.transform.rotation); + + // We only use X axis as scale hint + var scale = this.ctx.transform.scaleX; + putText.call(this, { + text: text, + x: x, + y: y, + scale: scale, + angle: degs, + align: this.textAlign, + maxWidth: maxWidth + }); + }; + + /** + * Draws text on the canvas (no fill) + * + * @name strokeText + * @function + * @param text {String} Specifies the text that will be written on the canvas + * @param x {Number} The x coordinate where to start painting the text (relative to the canvas) + * @param y {Number} The y coordinate where to start painting the text (relative to the canvas) + * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels + * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black. + */ + Context2D.prototype.strokeText = function (text, x, y, maxWidth) { + if (isNaN(x) || isNaN(y) || typeof text !== "string") { + console.error("jsPDF.context2d.strokeText: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText"); + } + if (isStrokeTransparent.call(this)) { + return; + } + maxWidth = isNaN(maxWidth) ? undefined : maxWidth; + var degs = rad2deg(this.ctx.transform.rotation); + var scale = this.ctx.transform.scaleX; + putText.call(this, { + text: text, + x: x, + y: y, + scale: scale, + renderingMode: "stroke", + angle: degs, + align: this.textAlign, + maxWidth: maxWidth + }); + }; + + /** + * Returns an object that contains the width of the specified text + * + * @name measureText + * @function + * @param text {String} The text to be measured + * @description The measureText() method returns an object that contains the width of the specified text, in pixels. + * @returns {Number} + */ + Context2D.prototype.measureText = function (text) { + if (typeof text !== "string") { + console.error("jsPDF.context2d.measureText: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.measureText"); + } + var pdf = this.pdf; + var k = this.pdf.internal.scaleFactor; + var fontSize = pdf.internal.getFontSize(); + var txtWidth = pdf.getStringUnitWidth(text) * fontSize / pdf.internal.scaleFactor; + txtWidth *= Math.round(k * 96 / 72 * 10000) / 10000; + var TextMetrics = function TextMetrics(options) { + options = options || {}; + var _width = options.width || 0; + Object.defineProperty(this, "width", { + get: function get() { + return _width; + } + }); + return this; + }; + return new TextMetrics({ + width: txtWidth + }); + }; + + //Transformations + + /** + * Scales the current drawing bigger or smaller + * + * @name scale + * @function + * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.) + * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.) + * @description The scale() method scales the current drawing, bigger or smaller. + */ + Context2D.prototype.scale = function (scalewidth, scaleheight) { + if (isNaN(scalewidth) || isNaN(scaleheight)) { + console.error("jsPDF.context2d.scale: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.scale"); + } + var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0); + this.ctx.transform = this.ctx.transform.multiply(matrix); + }; + + /** + * Rotates the current drawing + * + * @name rotate + * @function + * @param angle {Number} The rotation angle, in radians. + * @description To calculate from degrees to radians: degrees*Math.PI/180.
+ * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180 + */ + Context2D.prototype.rotate = function (angle) { + if (isNaN(angle)) { + console.error("jsPDF.context2d.rotate: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.rotate"); + } + var matrix = new Matrix(Math.cos(angle), Math.sin(angle), -Math.sin(angle), Math.cos(angle), 0.0, 0.0); + this.ctx.transform = this.ctx.transform.multiply(matrix); + }; + + /** + * Remaps the (0,0) position on the canvas + * + * @name translate + * @function + * @param x {Number} The value to add to horizontal (x) coordinates + * @param y {Number} The value to add to vertical (y) coordinates + * @description The translate() method remaps the (0,0) position on the canvas. + */ + Context2D.prototype.translate = function (x, y) { + if (isNaN(x) || isNaN(y)) { + console.error("jsPDF.context2d.translate: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.translate"); + } + var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y); + this.ctx.transform = this.ctx.transform.multiply(matrix); + }; + + /** + * Replaces the current transformation matrix for the drawing + * + * @name transform + * @function + * @param a {Number} Horizontal scaling + * @param b {Number} Horizontal skewing + * @param c {Number} Vertical skewing + * @param d {Number} Vertical scaling + * @param e {Number} Horizontal moving + * @param f {Number} Vertical moving + * @description Each object on the canvas has a current transformation matrix.

The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:



a c e

b d f

0 0 1

In other words, the transform() method lets you scale, rotate, move, and skew the current context. + */ + Context2D.prototype.transform = function (a, b, c, d, e, f) { + if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) { + console.error("jsPDF.context2d.transform: Invalid arguments", arguments); + throw new Error("Invalid arguments passed to jsPDF.context2d.transform"); + } + var matrix = new Matrix(a, b, c, d, e, f); + this.ctx.transform = this.ctx.transform.multiply(matrix); + }; + + /** + * Resets the current transform to the identity matrix. Then runs transform() + * + * @name setTransform + * @function + * @param a {Number} Horizontal scaling + * @param b {Number} Horizontal skewing + * @param c {Number} Vertical skewing + * @param d {Number} Vertical scaling + * @param e {Number} Horizontal moving + * @param f {Number} Vertical moving + * @description Each object on the canvas has a current transformation matrix.

The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.

In other words, the setTransform() method lets you scale, rotate, move, and skew the current context. + */ + Context2D.prototype.setTransform = function (a, b, c, d, e, f) { + a = isNaN(a) ? 1 : a; + b = isNaN(b) ? 0 : b; + c = isNaN(c) ? 0 : c; + d = isNaN(d) ? 1 : d; + e = isNaN(e) ? 0 : e; + f = isNaN(f) ? 0 : f; + this.ctx.transform = new Matrix(a, b, c, d, e, f); + }; + var hasMargins = function hasMargins() { + return this.margin[0] > 0 || this.margin[1] > 0 || this.margin[2] > 0 || this.margin[3] > 0; + }; + + /** + * Draws an image, canvas, or video onto the canvas + * + * @function + * @param img {} Specifies the image, canvas, or video element to use + * @param sx {Number} Optional. The x coordinate where to start clipping + * @param sy {Number} Optional. The y coordinate where to start clipping + * @param swidth {Number} Optional. The width of the clipped image + * @param sheight {Number} Optional. The height of the clipped image + * @param x {Number} The x coordinate where to place the image on the canvas + * @param y {Number} The y coordinate where to place the image on the canvas + * @param width {Number} Optional. The width of the image to use (stretch or reduce the image) + * @param height {Number} Optional. The height of the image to use (stretch or reduce the image) + */ + Context2D.prototype.drawImage = function (img, sx, sy, swidth, sheight, x, y, width, height) { + var imageProperties = this.pdf.getImageProperties(img); + var factorX = 1; + var factorY = 1; + var clipFactorX = 1; + var clipFactorY = 1; + if (typeof swidth !== "undefined" && typeof width !== "undefined") { + clipFactorX = width / swidth; + clipFactorY = height / sheight; + factorX = imageProperties.width / swidth * width / swidth; + factorY = imageProperties.height / sheight * height / sheight; + } + + //is sx and sy are set and x and y not, set x and y with values of sx and sy + if (typeof x === "undefined") { + x = sx; + y = sy; + sx = 0; + sy = 0; + } + if (typeof swidth !== "undefined" && typeof width === "undefined") { + width = swidth; + height = sheight; + } + if (typeof swidth === "undefined" && typeof width === "undefined") { + width = imageProperties.width; + height = imageProperties.height; + } + var decomposedTransformationMatrix = this.ctx.transform.decompose(); + var angle = rad2deg(decomposedTransformationMatrix.rotate.shx); + var matrix = new Matrix(); + matrix = matrix.multiply(decomposedTransformationMatrix.translate); + matrix = matrix.multiply(decomposedTransformationMatrix.skew); + matrix = matrix.multiply(decomposedTransformationMatrix.scale); + var xRect = matrix.applyToRectangle(new Rectangle(x - sx * clipFactorX, y - sy * clipFactorY, swidth * factorX, sheight * factorY)); + var pageArray = getPagesByPath.call(this, xRect); + var pages = []; + for (var ii = 0; ii < pageArray.length; ii += 1) { + if (pages.indexOf(pageArray[ii]) === -1) { + pages.push(pageArray[ii]); + } + } + sortPages(pages); + var clipPath; + if (this.autoPaging) { + var min = pages[0]; + var max = pages[pages.length - 1]; + for (var i = min; i < max + 1; i++) { + this.pdf.setPage(i); + var pageWidthMinusMargins = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1]; + var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0]; + var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2]; + var pageHeightMinusMargins = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2]; + var previousPageHeightSum = i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins; + if (this.ctx.clip_path.length !== 0) { + var tmpPaths = this.path; + clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path)); + this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset); + drawPaths.call(this, "fill", true); + this.path = tmpPaths; + } + var tmpRect = JSON.parse(JSON.stringify(xRect)); + tmpRect = pathPositionRedo([tmpRect], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0]; + var needsClipping = (i > min || i < max) && hasMargins.call(this); + if (needsClipping) { + this.pdf.saveGraphicsState(); + this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath(); + } + this.pdf.addImage(img, "JPEG", tmpRect.x, tmpRect.y, tmpRect.w, tmpRect.h, null, null, angle); + if (needsClipping) { + this.pdf.restoreGraphicsState(); + } + } + } else { + this.pdf.addImage(img, "JPEG", xRect.x, xRect.y, xRect.w, xRect.h, null, null, angle); + } + }; + var getPagesByPath = function getPagesByPath(path, pageWrapX, pageWrapY) { + var result = []; + pageWrapX = pageWrapX || this.pdf.internal.pageSize.width; + pageWrapY = pageWrapY || this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2]; + var yOffset = this.posY + this.ctx.prevPageLastElemOffset; + switch (path.type) { + default: + case "mt": + case "lt": + result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1); + break; + case "arc": + result.push(Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1); + result.push(Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1); + break; + case "qct": + var rectOfQuadraticCurve = getQuadraticCurveBoundary(this.ctx.lastPoint.x, this.ctx.lastPoint.y, path.x1, path.y1, path.x, path.y); + result.push(Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1); + result.push(Math.floor((rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) / pageWrapY) + 1); + break; + case "bct": + var rectOfBezierCurve = getBezierCurveBoundary(this.ctx.lastPoint.x, this.ctx.lastPoint.y, path.x1, path.y1, path.x2, path.y2, path.x, path.y); + result.push(Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1); + result.push(Math.floor((rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY) + 1); + break; + case "rect": + result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1); + result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1); + } + for (var i = 0; i < result.length; i += 1) { + while (this.pdf.internal.getNumberOfPages() < result[i]) { + addPage.call(this); + } + } + return result; + }; + var addPage = function addPage() { + var fillStyle = this.fillStyle; + var strokeStyle = this.strokeStyle; + var font = this.font; + var lineCap = this.lineCap; + var lineWidth = this.lineWidth; + var lineJoin = this.lineJoin; + this.pdf.addPage(); + this.fillStyle = fillStyle; + this.strokeStyle = strokeStyle; + this.font = font; + this.lineCap = lineCap; + this.lineWidth = lineWidth; + this.lineJoin = lineJoin; + }; + var pathPositionRedo = function pathPositionRedo(paths, x, y) { + for (var i = 0; i < paths.length; i++) { + switch (paths[i].type) { + case "bct": + paths[i].x2 += x; + paths[i].y2 += y; + case "qct": + paths[i].x1 += x; + paths[i].y1 += y; + case "mt": + case "lt": + case "arc": + default: + paths[i].x += x; + paths[i].y += y; + } + } + return paths; + }; + var sortPages = function sortPages(pages) { + return pages.sort(function (a, b) { + return a - b; + }); + }; + var pathPreProcess = function pathPreProcess(rule, isClip) { + var fillStyle = this.fillStyle; + var strokeStyle = this.strokeStyle; + var lineCap = this.lineCap; + var oldLineWidth = this.lineWidth; + var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX); + var lineJoin = this.lineJoin; + var origPath = JSON.parse(JSON.stringify(this.path)); + var xPath = JSON.parse(JSON.stringify(this.path)); + var clipPath; + var tmpPath; + var pages = []; + for (var i = 0; i < xPath.length; i++) { + if (typeof xPath[i].x !== "undefined") { + var page = getPagesByPath.call(this, xPath[i]); + for (var ii = 0; ii < page.length; ii += 1) { + if (pages.indexOf(page[ii]) === -1) { + pages.push(page[ii]); + } + } + } + } + for (var j = 0; j < pages.length; j++) { + while (this.pdf.internal.getNumberOfPages() < pages[j]) { + addPage.call(this); + } + } + sortPages(pages); + if (this.autoPaging) { + var min = pages[0]; + var max = pages[pages.length - 1]; + for (var k = min; k < max + 1; k++) { + this.pdf.setPage(k); + this.fillStyle = fillStyle; + this.strokeStyle = strokeStyle; + this.lineCap = lineCap; + this.lineWidth = lineWidth; + this.lineJoin = lineJoin; + var pageWidthMinusMargins = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1]; + var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0]; + var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2]; + var pageHeightMinusMargins = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2]; + var previousPageHeightSum = k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins; + if (this.ctx.clip_path.length !== 0) { + var tmpPaths = this.path; + clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path)); + this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset); + drawPaths.call(this, rule, true); + this.path = tmpPaths; + } + tmpPath = JSON.parse(JSON.stringify(origPath)); + this.path = pathPositionRedo(tmpPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset); + if (isClip === false || k === 0) { + var needsClipping = (k > min || k < max) && hasMargins.call(this); + if (needsClipping) { + this.pdf.saveGraphicsState(); + this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath(); + } + drawPaths.call(this, rule, isClip); + if (needsClipping) { + this.pdf.restoreGraphicsState(); + } + } + this.lineWidth = oldLineWidth; + } + } else { + this.lineWidth = lineWidth; + drawPaths.call(this, rule, isClip); + this.lineWidth = oldLineWidth; + } + this.path = origPath; + }; + + /** + * Processes the paths + * + * @function + * @param rule {String} + * @param isClip {Boolean} + * @private + * @ignore + */ + var drawPaths = function drawPaths(rule, isClip) { + if (rule === "stroke" && !isClip && isStrokeTransparent.call(this)) { + return; + } + if (rule !== "stroke" && !isClip && isFillTransparent.call(this)) { + return; + } + var moves = []; + + //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha; + var delta; + var xPath = this.path; + for (var i = 0; i < xPath.length; i++) { + var pt = xPath[i]; + switch (pt.type) { + case "begin": + moves.push({ + begin: true + }); + break; + case "close": + moves.push({ + close: true + }); + break; + case "mt": + moves.push({ + start: pt, + deltas: [], + abs: [] + }); + break; + case "lt": + var iii = moves.length; + if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) { + delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y]; + if (iii > 0) { + for (iii; iii >= 0; iii--) { + if (moves[iii - 1].close !== true && moves[iii - 1].begin !== true) { + moves[iii - 1].deltas.push(delta); + moves[iii - 1].abs.push(pt); + break; + } + } + } + } + break; + case "bct": + delta = [pt.x1 - xPath[i - 1].x, pt.y1 - xPath[i - 1].y, pt.x2 - xPath[i - 1].x, pt.y2 - xPath[i - 1].y, pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y]; + moves[moves.length - 1].deltas.push(delta); + break; + case "qct": + var x1 = xPath[i - 1].x + 2.0 / 3.0 * (pt.x1 - xPath[i - 1].x); + var y1 = xPath[i - 1].y + 2.0 / 3.0 * (pt.y1 - xPath[i - 1].y); + var x2 = pt.x + 2.0 / 3.0 * (pt.x1 - pt.x); + var y2 = pt.y + 2.0 / 3.0 * (pt.y1 - pt.y); + var x3 = pt.x; + var y3 = pt.y; + delta = [x1 - xPath[i - 1].x, y1 - xPath[i - 1].y, x2 - xPath[i - 1].x, y2 - xPath[i - 1].y, x3 - xPath[i - 1].x, y3 - xPath[i - 1].y]; + moves[moves.length - 1].deltas.push(delta); + break; + case "arc": + moves.push({ + deltas: [], + abs: [], + arc: true + }); + if (Array.isArray(moves[moves.length - 1].abs)) { + moves[moves.length - 1].abs.push(pt); + } + break; + } + } + var style; + if (!isClip) { + if (rule === "stroke") { + style = "stroke"; + } else { + style = "fill"; + } + } else { + style = null; + } + var began = false; + for (var k = 0; k < moves.length; k++) { + if (moves[k].arc) { + var arcs = moves[k].abs; + for (var ii = 0; ii < arcs.length; ii++) { + var arc = arcs[ii]; + if (arc.type === "arc") { + drawArc.call(this, arc.x, arc.y, arc.radius, arc.startAngle, arc.endAngle, arc.counterclockwise, undefined, isClip, !began); + } else { + drawLine.call(this, arc.x, arc.y); + } + began = true; + } + } else if (moves[k].close === true) { + this.pdf.internal.out("h"); + began = false; + } else if (moves[k].begin !== true) { + var x = moves[k].start.x; + var y = moves[k].start.y; + drawLines.call(this, moves[k].deltas, x, y); + began = true; + } + } + if (style) { + putStyle.call(this, style); + } + if (isClip) { + doClip.call(this); + } + }; + var getBaseline = function getBaseline(y) { + var height = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor; + var descent = height * (this.pdf.internal.getLineHeightFactor() - 1); + switch (this.ctx.textBaseline) { + case "bottom": + return y - descent; + case "top": + return y + height - descent; + case "hanging": + return y + height - 2 * descent; + case "middle": + return y + height / 2 - descent; + case "ideographic": + // TODO not implemented + return y; + case "alphabetic": + default: + return y; + } + }; + var getTextBottom = function getTextBottom(yBaseLine) { + var height = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor; + var descent = height * (this.pdf.internal.getLineHeightFactor() - 1); + return yBaseLine + descent; + }; + Context2D.prototype.createLinearGradient = function createLinearGradient() { + var canvasGradient = function canvasGradient() {}; + canvasGradient.colorStops = []; + canvasGradient.addColorStop = function (offset, color) { + this.colorStops.push([offset, color]); + }; + canvasGradient.getColor = function () { + if (this.colorStops.length === 0) { + return "#000000"; + } + return this.colorStops[0][1]; + }; + canvasGradient.isCanvasGradient = true; + return canvasGradient; + }; + Context2D.prototype.createPattern = function createPattern() { + return this.createLinearGradient(); + }; + Context2D.prototype.createRadialGradient = function createRadialGradient() { + return this.createLinearGradient(); + }; + + /** + * + * @param x Edge point X + * @param y Edge point Y + * @param r Radius + * @param a1 start angle + * @param a2 end angle + * @param counterclockwise + * @param style + * @param isClip + */ + var drawArc = function drawArc(x, y, r, a1, a2, counterclockwise, style, isClip, includeMove) { + // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html + var curves = createArc.call(this, r, a1, a2, counterclockwise); + for (var i = 0; i < curves.length; i++) { + var curve = curves[i]; + if (i === 0) { + if (includeMove) { + doMove.call(this, curve.x1 + x, curve.y1 + y); + } else { + drawLine.call(this, curve.x1 + x, curve.y1 + y); + } + } + drawCurve.call(this, x, y, curve.x2, curve.y2, curve.x3, curve.y3, curve.x4, curve.y4); + } + if (!isClip) { + putStyle.call(this, style); + } else { + doClip.call(this); + } + }; + var putStyle = function putStyle(style) { + switch (style) { + case "stroke": + this.pdf.internal.out("S"); + break; + case "fill": + this.pdf.internal.out("f"); + break; + } + }; + var doClip = function doClip() { + this.pdf.clip(); + this.pdf.discardPath(); + }; + var doMove = function doMove(x, y) { + this.pdf.internal.out(getHorizontalCoordinateString(x) + " " + getVerticalCoordinateString(y) + " m"); + }; + var putText = function putText(options) { + var textAlign; + switch (options.align) { + case "right": + case "end": + textAlign = "right"; + break; + case "center": + textAlign = "center"; + break; + case "left": + case "start": + default: + textAlign = "left"; + break; + } + var textDimensions = this.pdf.getTextDimensions(options.text); + var yBaseLine = getBaseline.call(this, options.y); + var yBottom = getTextBottom.call(this, yBaseLine); + var yTop = yBottom - textDimensions.h; + var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine)); + var decomposedTransformationMatrix = this.ctx.transform.decompose(); + var matrix = new Matrix(); + matrix = matrix.multiply(decomposedTransformationMatrix.translate); + matrix = matrix.multiply(decomposedTransformationMatrix.skew); + matrix = matrix.multiply(decomposedTransformationMatrix.scale); + var baselineRect = this.ctx.transform.applyToRectangle(new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)); + var textBounds = matrix.applyToRectangle(new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)); + var pageArray = getPagesByPath.call(this, textBounds); + var pages = []; + for (var ii = 0; ii < pageArray.length; ii += 1) { + if (pages.indexOf(pageArray[ii]) === -1) { + pages.push(pageArray[ii]); + } + } + sortPages(pages); + var clipPath, oldSize, oldLineWidth; + if (this.autoPaging) { + var min = pages[0]; + var max = pages[pages.length - 1]; + for (var i = min; i < max + 1; i++) { + this.pdf.setPage(i); + var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0]; + var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2]; + var pageHeightMinusBottomMargin = this.pdf.internal.pageSize.height - this.margin[2]; + var pageHeightMinusMargins = pageHeightMinusBottomMargin - this.margin[0]; + var pageWidthMinusRightMargin = this.pdf.internal.pageSize.width - this.margin[1]; + var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3]; + var previousPageHeightSum = i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins; + if (this.ctx.clip_path.length !== 0) { + var tmpPaths = this.path; + clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path)); + this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -1 * previousPageHeightSum + topMargin); + drawPaths.call(this, "fill", true); + this.path = tmpPaths; + } + var textBoundsOnPage = pathPositionRedo([JSON.parse(JSON.stringify(textBounds))], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0]; + if (options.scale >= 0.01) { + oldSize = this.pdf.internal.getFontSize(); + this.pdf.setFontSize(oldSize * options.scale); + oldLineWidth = this.lineWidth; + this.lineWidth = oldLineWidth * options.scale; + } + var doSlice = this.autoPaging !== "text"; + if (doSlice || textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin) { + if (doSlice || textBoundsOnPage.y >= topMargin && textBoundsOnPage.x <= pageWidthMinusRightMargin) { + var croppedText = doSlice ? options.text : this.pdf.splitTextToSize(options.text, options.maxWidth || pageWidthMinusRightMargin - textBoundsOnPage.x)[0]; + var baseLineRectOnPage = pathPositionRedo([JSON.parse(JSON.stringify(baselineRect))], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0]; + var needsClipping = doSlice && (i > min || i < max) && hasMargins.call(this); + if (needsClipping) { + this.pdf.saveGraphicsState(); + this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath(); + } + this.pdf.text(croppedText, baseLineRectOnPage.x, baseLineRectOnPage.y, { + angle: options.angle, + align: textAlign, + renderingMode: options.renderingMode + }); + if (needsClipping) { + this.pdf.restoreGraphicsState(); + } + } + } else { + // This text is the last element of the page, but it got cut off due to the margin + // so we render it in the next page + + if (textBoundsOnPage.y < pageHeightMinusBottomMargin) { + // As a result, all other elements have their y offset increased + this.ctx.prevPageLastElemOffset += pageHeightMinusBottomMargin - textBoundsOnPage.y; + } + } + if (options.scale >= 0.01) { + this.pdf.setFontSize(oldSize); + this.lineWidth = oldLineWidth; + } + } + } else { + if (options.scale >= 0.01) { + oldSize = this.pdf.internal.getFontSize(); + this.pdf.setFontSize(oldSize * options.scale); + oldLineWidth = this.lineWidth; + this.lineWidth = oldLineWidth * options.scale; + } + this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, { + angle: options.angle, + align: textAlign, + renderingMode: options.renderingMode, + maxWidth: options.maxWidth + }); + if (options.scale >= 0.01) { + this.pdf.setFontSize(oldSize); + this.lineWidth = oldLineWidth; + } + } + }; + var drawLine = function drawLine(x, y, prevX, prevY) { + prevX = prevX || 0; + prevY = prevY || 0; + this.pdf.internal.out(getHorizontalCoordinateString(x + prevX) + " " + getVerticalCoordinateString(y + prevY) + " l"); + }; + var drawLines = function drawLines(lines, x, y) { + return this.pdf.lines(lines, x, y, null, null); + }; + var drawCurve = function drawCurve(x, y, x1, y1, x2, y2, x3, y3) { + this.pdf.internal.out([f2(getHorizontalCoordinate(x1 + x)), f2(getVerticalCoordinate(y1 + y)), f2(getHorizontalCoordinate(x2 + x)), f2(getVerticalCoordinate(y2 + y)), f2(getHorizontalCoordinate(x3 + x)), f2(getVerticalCoordinate(y3 + y)), "c"].join(" ")); + }; + + /** + * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius. + * + * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points. + * @function createArc + */ + var createArc = function createArc(radius, startAngle, endAngle, anticlockwise) { + var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below + var twoPi = Math.PI * 2; + var halfPi = Math.PI / 2.0; + while (startAngle > endAngle) { + startAngle = startAngle - twoPi; + } + var totalAngle = Math.abs(endAngle - startAngle); + if (totalAngle < twoPi) { + if (anticlockwise) { + totalAngle = twoPi - totalAngle; + } + } + + // Compute the sequence of arc curves, up to PI/2 at a time. + var curves = []; + + // clockwise or counterclockwise + var sgn = anticlockwise ? -1 : +1; + var a1 = startAngle; + for (; totalAngle > EPSILON;) { + var remain = sgn * Math.min(totalAngle, halfPi); + var a2 = a1 + remain; + curves.push(createSmallArc.call(this, radius, a1, a2)); + totalAngle -= Math.abs(a2 - a1); + a1 = a2; + } + return curves; + }; + + /** + * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r. + * + * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points. + * + * This algorithm is based on the approach described in: A. Riškus, "Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa," Information Technology and Control, 35(4), 2006 pp. 371-378. + */ + var createSmallArc = function createSmallArc(r, a1, a2) { + var a = (a2 - a1) / 2.0; + var x4 = r * Math.cos(a); + var y4 = r * Math.sin(a); + var x1 = x4; + var y1 = -y4; + var q1 = x1 * x1 + y1 * y1; + var q2 = q1 + x1 * x4 + y1 * y4; + var k2 = 4 / 3 * (Math.sqrt(2 * q1 * q2) - q2) / (x1 * y4 - y1 * x4); + var x2 = x1 - k2 * y1; + var y2 = y1 + k2 * x1; + var x3 = x2; + var y3 = -y2; + var ar = a + a1; + var cos_ar = Math.cos(ar); + var sin_ar = Math.sin(ar); + return { + x1: r * Math.cos(a1), + y1: r * Math.sin(a1), + x2: x2 * cos_ar - y2 * sin_ar, + y2: x2 * sin_ar + y2 * cos_ar, + x3: x3 * cos_ar - y3 * sin_ar, + y3: x3 * sin_ar + y3 * cos_ar, + x4: r * Math.cos(a2), + y4: r * Math.sin(a2) + }; + }; + var rad2deg = function rad2deg(value) { + return value * 180 / Math.PI; + }; + var getQuadraticCurveBoundary = function getQuadraticCurveBoundary(sx, sy, cpx, cpy, ex, ey) { + var midX1 = sx + (cpx - sx) * 0.5; + var midY1 = sy + (cpy - sy) * 0.5; + var midX2 = ex + (cpx - ex) * 0.5; + var midY2 = ey + (cpy - ey) * 0.5; + var resultX1 = Math.min(sx, ex, midX1, midX2); + var resultX2 = Math.max(sx, ex, midX1, midX2); + var resultY1 = Math.min(sy, ey, midY1, midY2); + var resultY2 = Math.max(sy, ey, midY1, midY2); + return new Rectangle(resultX1, resultY1, resultX2 - resultX1, resultY2 - resultY1); + }; + + //De Casteljau algorithm + var getBezierCurveBoundary = function getBezierCurveBoundary(ax, ay, bx, by, cx, cy, dx, dy) { + var tobx = bx - ax; + var toby = by - ay; + var tocx = cx - bx; + var tocy = cy - by; + var todx = dx - cx; + var tody = dy - cy; + var precision = 40; + var d, i, px, py, qx, qy, rx, ry, tx, ty, sx, sy, x, y, minx, miny, maxx, maxy, toqx, toqy, torx, tory, totx, toty; + for (i = 0; i < precision + 1; i++) { + d = i / precision; + px = ax + d * tobx; + py = ay + d * toby; + qx = bx + d * tocx; + qy = by + d * tocy; + rx = cx + d * todx; + ry = cy + d * tody; + toqx = qx - px; + toqy = qy - py; + torx = rx - qx; + tory = ry - qy; + sx = px + d * toqx; + sy = py + d * toqy; + tx = qx + d * torx; + ty = qy + d * tory; + totx = tx - sx; + toty = ty - sy; + x = sx + d * totx; + y = sy + d * toty; + if (i == 0) { + minx = x; + miny = y; + maxx = x; + maxy = y; + } else { + minx = Math.min(minx, x); + miny = Math.min(miny, y); + maxx = Math.max(maxx, x); + maxy = Math.max(maxy, y); + } + } + return new Rectangle(Math.round(minx), Math.round(miny), Math.round(maxx - minx), Math.round(maxy - miny)); + }; + var getPrevLineDashValue = function getPrevLineDashValue(lineDash, lineDashOffset) { + return JSON.stringify({ + lineDash: lineDash, + lineDashOffset: lineDashOffset + }); + }; + var setLineDash = function setLineDash() { + // Avoid unnecessary line dash declarations. + if (!this.prevLineDash && !this.ctx.lineDash.length && !this.ctx.lineDashOffset) { + return; + } + + // Avoid unnecessary line dash declarations. + var nextLineDash = getPrevLineDashValue(this.ctx.lineDash, this.ctx.lineDashOffset); + if (this.prevLineDash !== nextLineDash) { + this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset); + this.prevLineDash = nextLineDash; + } + }; + })(jsPDF.API); + + // DEFLATE is a complex format; to read this code, you should probably check the RFC first: + + // aliases for shorter compressed code (most minifers don't do this) + var u8 = Uint8Array, + u16 = Uint16Array, + i32 = Int32Array; + // fixed length extra bits + var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */0, 0, /* impossible */0]); + // fixed distance extra bits + var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */0, 0]); + // code length index map + var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); + // get base, reverse index map from extra bits + var freb = function (eb, start) { + var b = new u16(31); + for (var i = 0; i < 31; ++i) { + b[i] = start += 1 << eb[i - 1]; + } + // numbers here are at max 18 bits + var r = new i32(b[30]); + for (var i = 1; i < 30; ++i) { + for (var j = b[i]; j < b[i + 1]; ++j) { + r[j] = j - b[i] << 5 | i; + } + } + return { + b: b, + r: r + }; + }; + var _a = freb(fleb, 2), + fl = _a.b, + revfl = _a.r; + // we can ignore the fact that the other numbers are wrong; they never happen anyway + fl[28] = 258, revfl[258] = 28; + var _b = freb(fdeb, 0), + revfd = _b.r; + // map of value to reverse (assuming 16 bits) + var rev = new u16(32768); + for (var i = 0; i < 32768; ++i) { + // reverse table algorithm from SO + var x = (i & 0xAAAA) >> 1 | (i & 0x5555) << 1; + x = (x & 0xCCCC) >> 2 | (x & 0x3333) << 2; + x = (x & 0xF0F0) >> 4 | (x & 0x0F0F) << 4; + rev[i] = ((x & 0xFF00) >> 8 | (x & 0x00FF) << 8) >> 1; + } + // create huffman tree from u8 "map": index -> code length for code index + // mb (max bits) must be at most 15 + // TODO: optimize/split up? + var hMap = function (cd, mb, r) { + var s = cd.length; + // index + var i = 0; + // u16 "map": index -> # of codes with bit length = index + var l = new u16(mb); + // length of cd must be 288 (total # of codes) + for (; i < s; ++i) { + if (cd[i]) ++l[cd[i] - 1]; + } + // u16 "map": index -> minimum code for bit length = index + var le = new u16(mb); + for (i = 1; i < mb; ++i) { + le[i] = le[i - 1] + l[i - 1] << 1; + } + var co; + if (r) { + // u16 "map": index -> number of actual bits, symbol for code + co = new u16(1 << mb); + // bits to remove for reverser + var rvb = 15 - mb; + for (i = 0; i < s; ++i) { + // ignore 0 lengths + if (cd[i]) { + // num encoding both symbol and bits read + var sv = i << 4 | cd[i]; + // free bits + var r_1 = mb - cd[i]; + // start value + var v = le[cd[i] - 1]++ << r_1; + // m is end value + for (var m = v | (1 << r_1) - 1; v <= m; ++v) { + // every 16 bit value starting with the code yields the same result + co[rev[v] >> rvb] = sv; + } + } + } + } else { + co = new u16(s); + for (i = 0; i < s; ++i) { + if (cd[i]) { + co[i] = rev[le[cd[i] - 1]++] >> 15 - cd[i]; + } + } + } + return co; + }; + // fixed length tree + var flt = new u8(288); + for (var i = 0; i < 144; ++i) flt[i] = 8; + for (var i = 144; i < 256; ++i) flt[i] = 9; + for (var i = 256; i < 280; ++i) flt[i] = 7; + for (var i = 280; i < 288; ++i) flt[i] = 8; + // fixed distance tree + var fdt = new u8(32); + for (var i = 0; i < 32; ++i) fdt[i] = 5; + // fixed length map + var flm = /*#__PURE__*/hMap(flt, 9, 0); + // fixed distance map + var fdm = /*#__PURE__*/hMap(fdt, 5, 0); + // get end of byte + var shft = function (p) { + return (p + 7) / 8 | 0; + }; + // typed array slice - allows garbage collector to free original reference, + // while being more compatible than .slice + var slc = function (v, s, e) { + if (s == null || s < 0) s = 0; + if (e == null || e > v.length) e = v.length; + // can't use .constructor in case user-supplied + return new u8(v.subarray(s, e)); + }; + // starting at p, write the minimum number of bits that can hold v to d + var wbits = function (d, p, v) { + v <<= p & 7; + var o = p / 8 | 0; + d[o] |= v; + d[o + 1] |= v >> 8; + }; + // starting at p, write the minimum number of bits (>8) that can hold v to d + var wbits16 = function (d, p, v) { + v <<= p & 7; + var o = p / 8 | 0; + d[o] |= v; + d[o + 1] |= v >> 8; + d[o + 2] |= v >> 16; + }; + // creates code lengths from a frequency table + var hTree = function (d, mb) { + // Need extra info to make a tree + var t = []; + for (var i = 0; i < d.length; ++i) { + if (d[i]) t.push({ + s: i, + f: d[i] + }); + } + var s = t.length; + var t2 = t.slice(); + if (!s) return { + t: et, + l: 0 + }; + if (s == 1) { + var v = new u8(t[0].s + 1); + v[t[0].s] = 1; + return { + t: v, + l: 1 + }; + } + t.sort(function (a, b) { + return a.f - b.f; + }); + // after i2 reaches last ind, will be stopped + // freq must be greater than largest possible number of symbols + t.push({ + s: -1, + f: 25001 + }); + var l = t[0], + r = t[1], + i0 = 0, + i1 = 1, + i2 = 2; + t[0] = { + s: -1, + f: l.f + r.f, + l: l, + r: r + }; + // efficient algorithm from UZIP.js + // i0 is lookbehind, i2 is lookahead - after processing two low-freq + // symbols that combined have high freq, will start processing i2 (high-freq, + // non-composite) symbols instead + // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/ + while (i1 != s - 1) { + l = t[t[i0].f < t[i2].f ? i0++ : i2++]; + r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++]; + t[i1++] = { + s: -1, + f: l.f + r.f, + l: l, + r: r + }; + } + var maxSym = t2[0].s; + for (var i = 1; i < s; ++i) { + if (t2[i].s > maxSym) maxSym = t2[i].s; + } + // code lengths + var tr = new u16(maxSym + 1); + // max bits in tree + var mbt = ln(t[i1 - 1], tr, 0); + if (mbt > mb) { + // more algorithms from UZIP.js + // TODO: find out how this code works (debt) + // ind debt + var i = 0, + dt = 0; + // left cost + var lft = mbt - mb, + cst = 1 << lft; + t2.sort(function (a, b) { + return tr[b.s] - tr[a.s] || a.f - b.f; + }); + for (; i < s; ++i) { + var i2_1 = t2[i].s; + if (tr[i2_1] > mb) { + dt += cst - (1 << mbt - tr[i2_1]); + tr[i2_1] = mb; + } else break; + } + dt >>= lft; + while (dt > 0) { + var i2_2 = t2[i].s; + if (tr[i2_2] < mb) dt -= 1 << mb - tr[i2_2]++ - 1;else ++i; + } + for (; i >= 0 && dt; --i) { + var i2_3 = t2[i].s; + if (tr[i2_3] == mb) { + --tr[i2_3]; + ++dt; + } + } + mbt = mb; + } + return { + t: new u8(tr), + l: mbt + }; + }; + // get the max length and assign length codes + var ln = function (n, l, d) { + return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d; + }; + // length codes generation + var lc = function (c) { + var s = c.length; + // Note that the semicolon was intentional + while (s && !c[--s]); + var cl = new u16(++s); + // ind num streak + var cli = 0, + cln = c[0], + cls = 1; + var w = function (v) { + cl[cli++] = v; + }; + for (var i = 1; i <= s; ++i) { + if (c[i] == cln && i != s) ++cls;else { + if (!cln && cls > 2) { + for (; cls > 138; cls -= 138) w(32754); + if (cls > 2) { + w(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305); + cls = 0; + } + } else if (cls > 3) { + w(cln), --cls; + for (; cls > 6; cls -= 6) w(8304); + if (cls > 2) w(cls - 3 << 5 | 8208), cls = 0; + } + while (cls--) w(cln); + cls = 1; + cln = c[i]; + } + } + return { + c: cl.subarray(0, cli), + n: s + }; + }; + // calculate the length of output from tree, code lengths + var clen = function (cf, cl) { + var l = 0; + for (var i = 0; i < cl.length; ++i) l += cf[i] * cl[i]; + return l; + }; + // writes a fixed block + // returns the new bit pos + var wfblk = function (out, pos, dat) { + // no need to write 00 as type: TypedArray defaults to 0 + var s = dat.length; + var o = shft(pos + 2); + out[o] = s & 255; + out[o + 1] = s >> 8; + out[o + 2] = out[o] ^ 255; + out[o + 3] = out[o + 1] ^ 255; + for (var i = 0; i < s; ++i) out[o + i + 4] = dat[i]; + return (o + 4 + s) * 8; + }; + // writes a block + var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) { + wbits(out, p++, final); + ++lf[256]; + var _a = hTree(lf, 15), + dlt = _a.t, + mlb = _a.l; + var _b = hTree(df, 15), + ddt = _b.t, + mdb = _b.l; + var _c = lc(dlt), + lclt = _c.c, + nlc = _c.n; + var _d = lc(ddt), + lcdt = _d.c, + ndc = _d.n; + var lcfreq = new u16(19); + for (var i = 0; i < lclt.length; ++i) ++lcfreq[lclt[i] & 31]; + for (var i = 0; i < lcdt.length; ++i) ++lcfreq[lcdt[i] & 31]; + var _e = hTree(lcfreq, 7), + lct = _e.t, + mlcb = _e.l; + var nlcc = 19; + for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc); + var flen = bl + 5 << 3; + var ftlen = clen(lf, flt) + clen(df, fdt) + eb; + var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]; + if (bs >= 0 && flen <= ftlen && flen <= dtlen) return wfblk(out, p, dat.subarray(bs, bs + bl)); + var lm, ll, dm, dl; + wbits(out, p, 1 + (dtlen < ftlen)), p += 2; + if (dtlen < ftlen) { + lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt; + var llm = hMap(lct, mlcb, 0); + wbits(out, p, nlc - 257); + wbits(out, p + 5, ndc - 1); + wbits(out, p + 10, nlcc - 4); + p += 14; + for (var i = 0; i < nlcc; ++i) wbits(out, p + 3 * i, lct[clim[i]]); + p += 3 * nlcc; + var lcts = [lclt, lcdt]; + for (var it = 0; it < 2; ++it) { + var clct = lcts[it]; + for (var i = 0; i < clct.length; ++i) { + var len = clct[i] & 31; + wbits(out, p, llm[len]), p += lct[len]; + if (len > 15) wbits(out, p, clct[i] >> 5 & 127), p += clct[i] >> 12; + } + } + } else { + lm = flm, ll = flt, dm = fdm, dl = fdt; + } + for (var i = 0; i < li; ++i) { + var sym = syms[i]; + if (sym > 255) { + var len = sym >> 18 & 31; + wbits16(out, p, lm[len + 257]), p += ll[len + 257]; + if (len > 7) wbits(out, p, sym >> 23 & 31), p += fleb[len]; + var dst = sym & 31; + wbits16(out, p, dm[dst]), p += dl[dst]; + if (dst > 3) wbits16(out, p, sym >> 5 & 8191), p += fdeb[dst]; + } else { + wbits16(out, p, lm[sym]), p += ll[sym]; + } + } + wbits16(out, p, lm[256]); + return p + ll[256]; + }; + // deflate options (nice << 13) | chain + var deo = /*#__PURE__*/new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]); + // empty + var et = /*#__PURE__*/new u8(0); + // compresses data into a raw DEFLATE buffer + var dflt = function (dat, lvl, plvl, pre, post, st) { + var s = st.z || dat.length; + var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post); + // writing to this writes to the output buffer + var w = o.subarray(pre, o.length - post); + var lst = st.l; + var pos = (st.r || 0) & 7; + if (lvl) { + if (pos) w[0] = st.r >> 3; + var opt = deo[lvl - 1]; + var n = opt >> 13, + c = opt & 8191; + var msk_1 = (1 << plvl) - 1; + // prev 2-byte val map curr 2-byte val map + var prev = st.p || new u16(32768), + head = st.h || new u16(msk_1 + 1); + var bs1_1 = Math.ceil(plvl / 3), + bs2_1 = 2 * bs1_1; + var hsh = function (i) { + return (dat[i] ^ dat[i + 1] << bs1_1 ^ dat[i + 2] << bs2_1) & msk_1; + }; + // 24576 is an arbitrary number of maximum symbols per block + // 424 buffer for last block + var syms = new i32(25000); + // length/literal freq distance freq + var lf = new u16(288), + df = new u16(32); + // l/lcnt exbits index l/lind waitdx blkpos + var lc_1 = 0, + eb = 0, + i = st.i || 0, + li = 0, + wi = st.w || 0, + bs = 0; + for (; i + 2 < s; ++i) { + // hash value + var hv = hsh(i); + // index mod 32768 previous index mod + var imod = i & 32767, + pimod = head[hv]; + prev[imod] = pimod; + head[hv] = imod; + // We always should modify head and prev, but only add symbols if + // this data is not yet processed ("wait" for wait index) + if (wi <= i) { + // bytes remaining + var rem = s - i; + if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) { + pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos); + li = lc_1 = eb = 0, bs = i; + for (var j = 0; j < 286; ++j) lf[j] = 0; + for (var j = 0; j < 30; ++j) df[j] = 0; + } + // len dist chain + var l = 2, + d = 0, + ch_1 = c, + dif = imod - pimod & 32767; + if (rem > 2 && hv == hsh(i - dif)) { + var maxn = Math.min(n, rem) - 1; + var maxd = Math.min(32767, i); + // max possible length + // not capped at dif because decompressors implement "rolling" index population + var ml = Math.min(258, rem); + while (dif <= maxd && --ch_1 && imod != pimod) { + if (dat[i + l] == dat[i + l - dif]) { + var nl = 0; + for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl); + if (nl > l) { + l = nl, d = dif; + // break out early when we reach "nice" (we are satisfied enough) + if (nl > maxn) break; + // now, find the rarest 2-byte sequence within this + // length of literals and search for that instead. + // Much faster than just using the start + var mmd = Math.min(dif, nl - 2); + var md = 0; + for (var j = 0; j < mmd; ++j) { + var ti = i - dif + j & 32767; + var pti = prev[ti]; + var cd = ti - pti & 32767; + if (cd > md) md = cd, pimod = ti; + } + } + } + // check the previous match + imod = pimod, pimod = prev[imod]; + dif += imod - pimod & 32767; + } + } + // d will be nonzero only when a match was found + if (d) { + // store both dist and len data in one int32 + // Make sure this is recognized as a len/dist with 28th bit (2^28) + syms[li++] = 268435456 | revfl[l] << 18 | revfd[d]; + var lin = revfl[l] & 31, + din = revfd[d] & 31; + eb += fleb[lin] + fdeb[din]; + ++lf[257 + lin]; + ++df[din]; + wi = i + l; + ++lc_1; + } else { + syms[li++] = dat[i]; + ++lf[dat[i]]; + } + } + } + for (i = Math.max(i, wi); i < s; ++i) { + syms[li++] = dat[i]; + ++lf[dat[i]]; + } + pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos); + if (!lst) { + st.r = pos & 7 | w[pos / 8 | 0] << 3; + // shft(pos) now 1 less if pos & 7 != 0 + pos -= 7; + st.h = head, st.p = prev, st.i = i, st.w = wi; + } + } else { + for (var i = st.w || 0; i < s + lst; i += 65535) { + // end + var e = i + 65535; + if (e >= s) { + // write final block + w[pos / 8 | 0] = lst; + e = s; + } + pos = wfblk(w, pos + 1, dat.subarray(i, e)); + } + st.i = s; + } + return slc(o, 0, pre + shft(pos) + post); + }; + // Adler32 + var adler = function () { + var a = 1, + b = 0; + return { + p: function (d) { + // closures have awful performance + var n = a, + m = b; + var l = d.length | 0; + for (var i = 0; i != l;) { + var e = Math.min(i + 2655, l); + for (; i < e; ++i) m += n += d[i]; + n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16); + } + a = n, b = m; + }, + d: function () { + a %= 65521, b %= 65521; + return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | b >> 8; + } + }; + }; + // deflate with opts + var dopt = function (dat, opt, pre, post, st) { + if (!st) { + st = { + l: 1 + }; + if (opt.dictionary) { + var dict = opt.dictionary.subarray(-32768); + var newDat = new u8(dict.length + dat.length); + newDat.set(dict); + newDat.set(dat, dict.length); + dat = newDat; + st.w = dict.length; + } + } + return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 12 + opt.mem, pre, post, st); + }; + // write bytes + var wbytes = function (d, b, v) { + for (; v; ++b) d[b] = v, v >>>= 8; + }; + // zlib header + var zlh = function (c, o) { + var lv = o.level, + fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2; + c[0] = 120, c[1] = fl << 6 | (o.dictionary && 32); + c[1] |= 31 - (c[0] << 8 | c[1]) % 31; + if (o.dictionary) { + var h = adler(); + h.p(o.dictionary); + wbytes(c, 2, h.d()); + } + }; + /** + * Compress data with Zlib + * @param data The data to compress + * @param opts The compression options + * @returns The zlib-compressed version of the data + */ + function zlibSync(data, opts) { + if (!opts) opts = {}; + var a = adler(); + a.p(data); + var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4); + return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d; + } + // text decoder + var td = typeof TextDecoder != 'undefined' && /*#__PURE__*/new TextDecoder(); + // text decoder stream + var tds = 0; + try { + td.decode(et, { + stream: true + }); + tds = 1; + } catch (e) {} + + /** + * @license + * jsPDF filters PlugIn + * Copyright (c) 2014 Aras Abbasi + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + (function (jsPDFAPI) { + + var ASCII85Encode = function ASCII85Encode(a) { + var b, c, d, e, f, g, h, i, j, k; + // eslint-disable-next-line no-control-regex + for (!/[^\x00-\xFF]/.test(a), b = "\x00\x00\x00\x00".slice(a.length % 4 || 4), a += b, c = [], d = 0, e = a.length; e > d; d += 4) { + f = (a.charCodeAt(d) << 24) + (a.charCodeAt(d + 1) << 16) + (a.charCodeAt(d + 2) << 8) + a.charCodeAt(d + 3), 0 !== f ? (k = f % 85, f = (f - k) / 85, j = f % 85, f = (f - j) / 85, i = f % 85, f = (f - i) / 85, h = f % 85, f = (f - h) / 85, g = f % 85, c.push(g + 33, h + 33, i + 33, j + 33, k + 33)) : c.push(122); + } + return function (a, b) { + for (var c = b; c > 0; c--) { + a.pop(); + } + }(c, b.length), String.fromCharCode.apply(String, c) + "~>"; + }; + var ASCII85Decode = function ASCII85Decode(a) { + var c, + d, + e, + f, + g, + h = String, + l = "length", + w = 255, + x = "charCodeAt", + y = "slice", + z = "replace"; + for ("~>" === a[y](-2), a = a[y](0, -2)[z](/\s/g, "")[z]("z", "!!!!!"), c = "uuuuu"[y](a[l] % 5 || 5), a += c, e = [], f = 0, g = a[l]; g > f; f += 5) { + d = 52200625 * (a[x](f) - 33) + 614125 * (a[x](f + 1) - 33) + 7225 * (a[x](f + 2) - 33) + 85 * (a[x](f + 3) - 33) + (a[x](f + 4) - 33), e.push(w & d >> 24, w & d >> 16, w & d >> 8, w & d); + } + return function (a, b) { + for (var c = b; c > 0; c--) { + a.pop(); + } + }(e, c[l]), h.fromCharCode.apply(h, e); + }; + var ASCIIHexEncode = function ASCIIHexEncode(value) { + return value.split("").map(function (value) { + return ("0" + value.charCodeAt().toString(16)).slice(-2); + }).join("") + ">"; + }; + var ASCIIHexDecode = function ASCIIHexDecode(value) { + var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/); + value = value.replace(/\s/g, ""); + if (value.indexOf(">") !== -1) { + value = value.substr(0, value.indexOf(">")); + } + if (value.length % 2) { + value += "0"; + } + if (regexCheckIfHex.test(value) === false) { + return ""; + } + var result = ""; + for (var i = 0; i < value.length; i += 2) { + result += String.fromCharCode("0x" + (value[i] + value[i + 1])); + } + return result; + }; + /* + var FlatePredictors = { + None: 1, + TIFF: 2, + PNG_None: 10, + PNG_Sub: 11, + PNG_Up: 12, + PNG_Average: 13, + PNG_Paeth: 14, + PNG_Optimum: 15 + }; + */ + + var FlateEncode = function FlateEncode(data) { + var arr = new Uint8Array(data.length); + var i = data.length; + while (i--) { + arr[i] = data.charCodeAt(i); + } + arr = zlibSync(arr); + data = arr.reduce(function (data, byte) { + return data + String.fromCharCode(byte); + }, ""); + return data; + }; + jsPDFAPI.processDataByFilters = function (origData, filterChain) { + + var i = 0; + var data = origData || ""; + var reverseChain = []; + filterChain = filterChain || []; + if (typeof filterChain === "string") { + filterChain = [filterChain]; + } + for (i = 0; i < filterChain.length; i += 1) { + switch (filterChain[i]) { + case "ASCII85Decode": + case "/ASCII85Decode": + data = ASCII85Decode(data); + reverseChain.push("/ASCII85Encode"); + break; + case "ASCII85Encode": + case "/ASCII85Encode": + data = ASCII85Encode(data); + reverseChain.push("/ASCII85Decode"); + break; + case "ASCIIHexDecode": + case "/ASCIIHexDecode": + data = ASCIIHexDecode(data); + reverseChain.push("/ASCIIHexEncode"); + break; + case "ASCIIHexEncode": + case "/ASCIIHexEncode": + data = ASCIIHexEncode(data); + reverseChain.push("/ASCIIHexDecode"); + break; + case "FlateEncode": + case "/FlateEncode": + data = FlateEncode(data); + reverseChain.push("/FlateDecode"); + break; + default: + throw new Error('The filter: "' + filterChain[i] + '" is not implemented'); + } + } + return { + data: data, + reverseChain: reverseChain.reverse().join(" ") + }; + }; + })(jsPDF.API); + + /** + * @license + * jsPDF fileloading PlugIn + * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com) + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * @name fileloading + * @module + */ + (function (jsPDFAPI) { + + /** + * @name loadFile + * @function + * @param {string} url + * @param {boolean} sync + * @param {function} callback + * @returns {string|undefined} result + */ + jsPDFAPI.loadFile = function (url, sync, callback) { + return browserRequest(url, sync, callback); + }; + + /** + * @name loadImageFile + * @function + * @param {string} path + * @param {boolean} sync + * @param {function} callback + */ + jsPDFAPI.loadImageFile = jsPDFAPI.loadFile; + function browserRequest(url, sync, callback) { + sync = sync === false ? false : true; + callback = typeof callback === "function" ? callback : function () {}; + var result = undefined; + var xhr = function xhr(url, sync, callback) { + var request = new XMLHttpRequest(); + var i = 0; + var sanitizeUnicode = function sanitizeUnicode(data) { + var dataLength = data.length; + var charArray = []; + var StringFromCharCode = String.fromCharCode; + + //Transform Unicode to ASCII + for (i = 0; i < dataLength; i += 1) { + charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff)); + } + return charArray.join(""); + }; + request.open("GET", url, !sync); + // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com] + request.overrideMimeType("text/plain; charset=x-user-defined"); + if (sync === false) { + request.onload = function () { + if (request.status === 200) { + callback(sanitizeUnicode(this.responseText)); + } else { + callback(undefined); + } + }; + } + request.send(null); + if (sync && request.status === 200) { + return sanitizeUnicode(request.responseText); + } + }; + try { + result = xhr(url, sync, callback); + // eslint-disable-next-line no-empty + } catch (e) {} + return result; + } + })(jsPDF.API); + + /** + * jsPDF html PlugIn + * + * @name html + * @module + */ + (function (jsPDFAPI) { + + function loadHtml2Canvas() { + return function () { + if (globalObject["html2canvas"]) { + return Promise.resolve(globalObject["html2canvas"]); + } + if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { + return new Promise(function (resolve, reject) { + try { + resolve(require("html2canvas")); + } catch (e) { + reject(e); + } + }); + } + if (typeof define === "function" && define.amd) { + return new Promise(function (resolve, reject) { + try { + require(["html2canvas"], resolve); + } catch (e) { + reject(e); + } + }); + } + return Promise.reject(new Error("Could not load html2canvas")); + }().catch(function (e) { + return Promise.reject(new Error("Could not load html2canvas: " + e)); + }).then(function (html2canvas) { + return html2canvas.default ? html2canvas.default : html2canvas; + }); + } + function loadDomPurify() { + return function () { + if (globalObject["DOMPurify"]) { + return Promise.resolve(globalObject["DOMPurify"]); + } + if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { + return new Promise(function (resolve, reject) { + try { + resolve(require("dompurify")); + } catch (e) { + reject(e); + } + }); + } + if (typeof define === "function" && define.amd) { + return new Promise(function (resolve, reject) { + try { + require(["dompurify"], resolve); + } catch (e) { + reject(e); + } + }); + } + return Promise.reject(new Error("Could not load dompurify")); + }().catch(function (e) { + return Promise.reject(new Error("Could not load dompurify: " + e)); + }).then(function (dompurify) { + return dompurify.default ? dompurify.default : dompurify; + }); + } + + /** + * Determine the type of a variable/object. + * + * @private + * @ignore + */ + var objType = function objType(obj) { + var type = _typeof(obj); + if (type === "undefined") return "undefined";else if (type === "string" || obj instanceof String) return "string";else if (type === "number" || obj instanceof Number) return "number";else if (type === "function" || obj instanceof Function) return "function";else if (!!obj && obj.constructor === Array) return "array";else if (obj && obj.nodeType === 1) return "element";else if (type === "object") return "object";else return "unknown"; + }; + + /** + * Create an HTML element with optional className, innerHTML, and style. + * + * @private + * @ignore + */ + var createElement = function createElement(tagName, opt) { + var el = document.createElement(tagName); + if (opt.className) el.className = opt.className; + if (opt.innerHTML && opt.dompurify) { + el.innerHTML = opt.dompurify.sanitize(opt.innerHTML); + } + for (var key in opt.style) { + el.style[key] = opt.style[key]; + } + return el; + }; + + /** + * Deep-clone a node and preserve contents/properties. + * + * @private + * @ignore + */ + var cloneNode = function cloneNode(node, javascriptEnabled) { + // Recursively clone the node. + var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false); + for (var child = node.firstChild; child; child = child.nextSibling) { + if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== "SCRIPT") { + clone.appendChild(cloneNode(child, javascriptEnabled)); + } + } + if (node.nodeType === 1) { + // Preserve contents/properties of special nodes. + if (node.nodeName === "CANVAS") { + clone.width = node.width; + clone.height = node.height; + clone.getContext("2d").drawImage(node, 0, 0); + } else if (node.nodeName === "TEXTAREA" || node.nodeName === "SELECT") { + clone.value = node.value; + } + + // Preserve the node's scroll position when it loads. + clone.addEventListener("load", function () { + clone.scrollTop = node.scrollTop; + clone.scrollLeft = node.scrollLeft; + }, true); + } + + // Return the cloned node. + return clone; + }; + + /* ----- CONSTRUCTOR ----- */ + + var Worker = function Worker(opt) { + // Create the root parent for the proto chain, and the starting Worker. + var root = Object.assign(Worker.convert(Promise.resolve()), JSON.parse(JSON.stringify(Worker.template))); + var self = Worker.convert(Promise.resolve(), root); + + // Set progress, optional settings, and return. + self = self.setProgress(1, Worker, 1, [Worker]); + self = self.set(opt); + return self; + }; + + // Boilerplate for subclassing Promise. + Worker.prototype = Object.create(Promise.prototype); + Worker.prototype.constructor = Worker; + + // Converts/casts promises into Workers. + Worker.convert = function convert(promise, inherit) { + // Uses prototypal inheritance to receive changes made to ancestors' properties. + promise.__proto__ = inherit || Worker.prototype; + return promise; + }; + Worker.template = { + prop: { + src: null, + container: null, + overlay: null, + canvas: null, + img: null, + pdf: null, + pageSize: null, + callback: function callback() {} + }, + progress: { + val: 0, + state: null, + n: 0, + stack: [] + }, + opt: { + filename: "file.pdf", + margin: [0, 0, 0, 0], + enableLinks: true, + x: 0, + y: 0, + html2canvas: {}, + jsPDF: {}, + backgroundColor: "transparent" + } + }; + + /* ----- FROM / TO ----- */ + + Worker.prototype.from = function from(src, type) { + function getType(src) { + switch (objType(src)) { + case "string": + return "string"; + case "element": + return src.nodeName.toLowerCase() === "canvas" ? "canvas" : "element"; + default: + return "unknown"; + } + } + return this.then(function from_main() { + type = type || getType(src); + switch (type) { + case "string": + return this.then(loadDomPurify).then(function (dompurify) { + return this.set({ + src: createElement("div", { + innerHTML: src, + dompurify: dompurify + }) + }); + }); + case "element": + return this.set({ + src: src + }); + case "canvas": + return this.set({ + canvas: src + }); + case "img": + return this.set({ + img: src + }); + default: + return this.error("Unknown source type."); + } + }); + }; + Worker.prototype.to = function to(target) { + // Route the 'to' request to the appropriate method. + switch (target) { + case "container": + return this.toContainer(); + case "canvas": + return this.toCanvas(); + case "img": + return this.toImg(); + case "pdf": + return this.toPdf(); + default: + return this.error("Invalid target."); + } + }; + Worker.prototype.toContainer = function toContainer() { + // Set up function prerequisites. + var prereqs = [function checkSrc() { + return this.prop.src || this.error("Cannot duplicate - no source HTML."); + }, function checkPageSize() { + return this.prop.pageSize || this.setPageSize(); + }]; + return this.thenList(prereqs).then(function toContainer_main() { + // Define the CSS styles for the container and its overlay parent. + var overlayCSS = { + position: "fixed", + overflow: "hidden", + zIndex: 1000, + left: "-100000px", + right: 0, + bottom: 0, + top: 0 + }; + var containerCSS = { + position: "relative", + display: "inline-block", + width: (typeof this.opt.width === "number" && !isNaN(this.opt.width) && typeof this.opt.windowWidth === "number" && !isNaN(this.opt.windowWidth) ? this.opt.windowWidth : Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth)) + "px", + left: 0, + right: 0, + top: 0, + margin: "auto", + backgroundColor: this.opt.backgroundColor + }; // Set the overlay to hidden (could be changed in the future to provide a print preview). + + var source = cloneNode(this.prop.src, this.opt.html2canvas.javascriptEnabled); + if (source.tagName === "BODY") { + containerCSS.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px"; + } + this.prop.overlay = createElement("div", { + className: "html2pdf__overlay", + style: overlayCSS + }); + this.prop.container = createElement("div", { + className: "html2pdf__container", + style: containerCSS + }); + this.prop.container.appendChild(source); + this.prop.container.firstChild.appendChild(createElement("div", { + style: { + clear: "both", + border: "0 none transparent", + margin: 0, + padding: 0, + height: 0 + } + })); + this.prop.container.style.float = "none"; + this.prop.overlay.appendChild(this.prop.container); + document.body.appendChild(this.prop.overlay); + this.prop.container.firstChild.style.position = "relative"; + this.prop.container.height = Math.max(this.prop.container.firstChild.clientHeight, this.prop.container.firstChild.scrollHeight, this.prop.container.firstChild.offsetHeight) + "px"; + }); + }; + Worker.prototype.toCanvas = function toCanvas() { + // Set up function prerequisites. + var prereqs = [function checkContainer() { + return document.body.contains(this.prop.container) || this.toContainer(); + }]; + + // Fulfill prereqs then create the canvas. + return this.thenList(prereqs).then(loadHtml2Canvas).then(function toCanvas_main(html2canvas) { + // Handle old-fashioned 'onrendered' argument. + var options = Object.assign({}, this.opt.html2canvas); + delete options.onrendered; + return html2canvas(this.prop.container, options); + }).then(function toCanvas_post(canvas) { + // Handle old-fashioned 'onrendered' argument. + var onRendered = this.opt.html2canvas.onrendered || function () {}; + onRendered(canvas); + this.prop.canvas = canvas; + document.body.removeChild(this.prop.overlay); + }); + }; + Worker.prototype.toContext2d = function toContext2d() { + // Set up function prerequisites. + var prereqs = [function checkContainer() { + return document.body.contains(this.prop.container) || this.toContainer(); + }]; + + // Fulfill prereqs then create the canvas. + return this.thenList(prereqs).then(loadHtml2Canvas).then(function toContext2d_main(html2canvas) { + // Handle old-fashioned 'onrendered' argument. + + var pdf = this.opt.jsPDF; + var fontFaces = this.opt.fontFaces; + var scale = typeof this.opt.width === "number" && !isNaN(this.opt.width) && typeof this.opt.windowWidth === "number" && !isNaN(this.opt.windowWidth) ? this.opt.width / this.opt.windowWidth : 1; + var options = Object.assign({ + async: true, + allowTaint: true, + scale: scale, + scrollX: this.opt.scrollX || 0, + scrollY: this.opt.scrollY || 0, + backgroundColor: "#ffffff", + imageTimeout: 15000, + logging: true, + proxy: null, + removeContainer: true, + foreignObjectRendering: false, + useCORS: false + }, this.opt.html2canvas); + delete options.onrendered; + pdf.context2d.autoPaging = typeof this.opt.autoPaging === "undefined" ? true : this.opt.autoPaging; + pdf.context2d.posX = this.opt.x; + pdf.context2d.posY = this.opt.y; + pdf.context2d.margin = this.opt.margin; + pdf.context2d.fontFaces = fontFaces; + if (fontFaces) { + for (var i = 0; i < fontFaces.length; ++i) { + var font = fontFaces[i]; + var src = font.src.find(function (src) { + return src.format === "truetype"; + }); + if (src) { + pdf.addFont(src.url, font.ref.name, font.ref.style); + } + } + } + options.windowHeight = options.windowHeight || 0; + options.windowHeight = options.windowHeight == 0 ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : options.windowHeight; + pdf.context2d.save(true); + return html2canvas(this.prop.container, options); + }).then(function toContext2d_post(canvas) { + this.opt.jsPDF.context2d.restore(true); + + // Handle old-fashioned 'onrendered' argument. + var onRendered = this.opt.html2canvas.onrendered || function () {}; + onRendered(canvas); + this.prop.canvas = canvas; + document.body.removeChild(this.prop.overlay); + }); + }; + Worker.prototype.toImg = function toImg() { + // Set up function prerequisites. + var prereqs = [function checkCanvas() { + return this.prop.canvas || this.toCanvas(); + }]; + + // Fulfill prereqs then create the image. + return this.thenList(prereqs).then(function toImg_main() { + var imgData = this.prop.canvas.toDataURL("image/" + this.opt.image.type, this.opt.image.quality); + this.prop.img = document.createElement("img"); + this.prop.img.src = imgData; + }); + }; + Worker.prototype.toPdf = function toPdf() { + // Set up function prerequisites. + var prereqs = [function checkContext2d() { + return this.toContext2d(); + } + //function checkCanvas() { return this.prop.canvas || this.toCanvas(); } + ]; + + // Fulfill prereqs then create the image. + return this.thenList(prereqs).then(function toPdf_main() { + // Create local copies of frequently used properties. + this.prop.pdf = this.prop.pdf || this.opt.jsPDF; + }); + }; + + /* ----- OUTPUT / SAVE ----- */ + + Worker.prototype.output = function output(type, options, src) { + // Redirect requests to the correct function (outputPdf / outputImg). + src = src || "pdf"; + if (src.toLowerCase() === "img" || src.toLowerCase() === "image") { + return this.outputImg(type, options); + } else { + return this.outputPdf(type, options); + } + }; + Worker.prototype.outputPdf = function outputPdf(type, options) { + // Set up function prerequisites. + var prereqs = [function checkPdf() { + return this.prop.pdf || this.toPdf(); + }]; + + // Fulfill prereqs then perform the appropriate output. + return this.thenList(prereqs).then(function outputPdf_main() { + /* Currently implemented output types: + * https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992 + * save(options), arraybuffer, blob, bloburi/bloburl, + * datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl + */ + return this.prop.pdf.output(type, options); + }); + }; + Worker.prototype.outputImg = function outputImg(type) { + // Set up function prerequisites. + var prereqs = [function checkImg() { + return this.prop.img || this.toImg(); + }]; + + // Fulfill prereqs then perform the appropriate output. + return this.thenList(prereqs).then(function outputImg_main() { + switch (type) { + case undefined: + case "img": + return this.prop.img; + case "datauristring": + case "dataurlstring": + return this.prop.img.src; + case "datauri": + case "dataurl": + return document.location.href = this.prop.img.src; + default: + throw 'Image output type "' + type + '" is not supported.'; + } + }); + }; + Worker.prototype.save = function save(filename) { + // Set up function prerequisites. + var prereqs = [function checkPdf() { + return this.prop.pdf || this.toPdf(); + }]; + + // Fulfill prereqs, update the filename (if provided), and save the PDF. + return this.thenList(prereqs).set(filename ? { + filename: filename + } : null).then(function save_main() { + this.prop.pdf.save(this.opt.filename); + }); + }; + Worker.prototype.doCallback = function doCallback() { + // Set up function prerequisites. + var prereqs = [function checkPdf() { + return this.prop.pdf || this.toPdf(); + }]; + + // Fulfill prereqs, update the filename (if provided), and save the PDF. + return this.thenList(prereqs).then(function doCallback_main() { + this.prop.callback(this.prop.pdf); + }); + }; + + /* ----- SET / GET ----- */ + + Worker.prototype.set = function set(opt) { + // TODO: Implement ordered pairs? + + // Silently ignore invalid or empty input. + if (objType(opt) !== "object") { + return this; + } + + // Build an array of setter functions to queue. + var fns = Object.keys(opt || {}).map(function (key) { + if (key in Worker.template.prop) { + // Set pre-defined properties. + return function set_prop() { + this.prop[key] = opt[key]; + }; + } else { + switch (key) { + case "margin": + return this.setMargin.bind(this, opt.margin); + case "jsPDF": + return function set_jsPDF() { + this.opt.jsPDF = opt.jsPDF; + return this.setPageSize(); + }; + case "pageSize": + return this.setPageSize.bind(this, opt.pageSize); + default: + // Set any other properties in opt. + return function set_opt() { + this.opt[key] = opt[key]; + }; + } + } + }, this); + + // Set properties within the promise chain. + return this.then(function set_main() { + return this.thenList(fns); + }); + }; + Worker.prototype.get = function get(key, cbk) { + return this.then(function get_main() { + // Fetch the requested property, either as a predefined prop or in opt. + var val = key in Worker.template.prop ? this.prop[key] : this.opt[key]; + return cbk ? cbk(val) : val; + }); + }; + Worker.prototype.setMargin = function setMargin(margin) { + return this.then(function setMargin_main() { + // Parse the margin property. + switch (objType(margin)) { + case "number": + margin = [margin, margin, margin, margin]; + // eslint-disable-next-line no-fallthrough + case "array": + if (margin.length === 2) { + margin = [margin[0], margin[1], margin[0], margin[1]]; + } + if (margin.length === 4) { + break; + } + // eslint-disable-next-line no-fallthrough + default: + return this.error("Invalid margin array."); + } + + // Set the margin property, then update pageSize. + this.opt.margin = margin; + }).then(this.setPageSize); + }; + Worker.prototype.setPageSize = function setPageSize(pageSize) { + function toPx(val, k) { + return Math.floor(val * k / 72 * 96); + } + return this.then(function setPageSize_main() { + // Retrieve page-size based on jsPDF settings, if not explicitly provided. + pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF); + + // Add 'inner' field if not present. + if (!pageSize.hasOwnProperty("inner")) { + pageSize.inner = { + width: pageSize.width - this.opt.margin[1] - this.opt.margin[3], + height: pageSize.height - this.opt.margin[0] - this.opt.margin[2] + }; + pageSize.inner.px = { + width: toPx(pageSize.inner.width, pageSize.k), + height: toPx(pageSize.inner.height, pageSize.k) + }; + pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width; + } + + // Attach pageSize to this. + this.prop.pageSize = pageSize; + }); + }; + Worker.prototype.setProgress = function setProgress(val, state, n, stack) { + // Immediately update all progress values. + if (val != null) this.progress.val = val; + if (state != null) this.progress.state = state; + if (n != null) this.progress.n = n; + if (stack != null) this.progress.stack = stack; + this.progress.ratio = this.progress.val / this.progress.state; + + // Return this for command chaining. + return this; + }; + Worker.prototype.updateProgress = function updateProgress(val, state, n, stack) { + // Immediately update all progress values, using setProgress. + return this.setProgress(val ? this.progress.val + val : null, state ? state : null, n ? this.progress.n + n : null, stack ? this.progress.stack.concat(stack) : null); + }; + + /* ----- PROMISE MAPPING ----- */ + + Worker.prototype.then = function then(onFulfilled, onRejected) { + // Wrap `this` for encapsulation. + var self = this; + return this.thenCore(onFulfilled, onRejected, function then_main(onFulfilled, onRejected) { + // Update progress while queuing, calling, and resolving `then`. + self.updateProgress(null, null, 1, [onFulfilled]); + return Promise.prototype.then.call(this, function then_pre(val) { + self.updateProgress(null, onFulfilled); + return val; + }).then(onFulfilled, onRejected).then(function then_post(val) { + self.updateProgress(1); + return val; + }); + }); + }; + Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase) { + // Handle optional thenBase parameter. + thenBase = thenBase || Promise.prototype.then; + + // Wrap `this` for encapsulation and bind it to the promise handlers. + var self = this; + if (onFulfilled) { + onFulfilled = onFulfilled.bind(self); + } + if (onRejected) { + onRejected = onRejected.bind(self); + } + + // Cast self into a Promise to avoid polyfills recursively defining `then`. + var isNative = Promise.toString().indexOf("[native code]") !== -1 && Promise.name === "Promise"; + var selfPromise = isNative ? self : Worker.convert(Object.assign({}, self), Promise.prototype); + + // Return the promise, after casting it into a Worker and preserving props. + var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected); + return Worker.convert(returnVal, self.__proto__); + }; + Worker.prototype.thenExternal = function thenExternal(onFulfilled, onRejected) { + // Call `then` and return a standard promise (exits the Worker chain). + return Promise.prototype.then.call(this, onFulfilled, onRejected); + }; + Worker.prototype.thenList = function thenList(fns) { + // Queue a series of promise 'factories' into the promise chain. + var self = this; + fns.forEach(function thenList_forEach(fn) { + self = self.thenCore(fn); + }); + return self; + }; + Worker.prototype["catch"] = function (onRejected) { + // Bind `this` to the promise handler, call `catch`, and return a Worker. + if (onRejected) { + onRejected = onRejected.bind(this); + } + var returnVal = Promise.prototype["catch"].call(this, onRejected); + return Worker.convert(returnVal, this); + }; + Worker.prototype.catchExternal = function catchExternal(onRejected) { + // Call `catch` and return a standard promise (exits the Worker chain). + return Promise.prototype["catch"].call(this, onRejected); + }; + Worker.prototype.error = function error(msg) { + // Throw the error in the Promise chain. + return this.then(function error_main() { + throw new Error(msg); + }); + }; + + /* ----- ALIASES ----- */ + + Worker.prototype.using = Worker.prototype.set; + Worker.prototype.saveAs = Worker.prototype.save; + Worker.prototype.export = Worker.prototype.output; + Worker.prototype.run = Worker.prototype.then; + + // Get dimensions of a PDF page, as determined by jsPDF. + jsPDF.getPageSize = function (orientation, unit, format) { + // Decode options object + if (_typeof(orientation) === "object") { + var options = orientation; + orientation = options.orientation; + unit = options.unit || unit; + format = options.format || format; + } + + // Default options + unit = unit || "mm"; + format = format || "a4"; + orientation = ("" + (orientation || "P")).toLowerCase(); + var format_as_string = ("" + format).toLowerCase(); + + // Size in pt of various paper formats + var pageFormats = { + a0: [2383.94, 3370.39], + a1: [1683.78, 2383.94], + a2: [1190.55, 1683.78], + a3: [841.89, 1190.55], + a4: [595.28, 841.89], + a5: [419.53, 595.28], + a6: [297.64, 419.53], + a7: [209.76, 297.64], + a8: [147.4, 209.76], + a9: [104.88, 147.4], + a10: [73.7, 104.88], + b0: [2834.65, 4008.19], + b1: [2004.09, 2834.65], + b2: [1417.32, 2004.09], + b3: [1000.63, 1417.32], + b4: [708.66, 1000.63], + b5: [498.9, 708.66], + b6: [354.33, 498.9], + b7: [249.45, 354.33], + b8: [175.75, 249.45], + b9: [124.72, 175.75], + b10: [87.87, 124.72], + c0: [2599.37, 3676.54], + c1: [1836.85, 2599.37], + c2: [1298.27, 1836.85], + c3: [918.43, 1298.27], + c4: [649.13, 918.43], + c5: [459.21, 649.13], + c6: [323.15, 459.21], + c7: [229.61, 323.15], + c8: [161.57, 229.61], + c9: [113.39, 161.57], + c10: [79.37, 113.39], + dl: [311.81, 623.62], + letter: [612, 792], + "government-letter": [576, 756], + legal: [612, 1008], + "junior-legal": [576, 360], + ledger: [1224, 792], + tabloid: [792, 1224], + "credit-card": [153, 243] + }; + var k; + // Unit conversion + switch (unit) { + case "pt": + k = 1; + break; + case "mm": + k = 72 / 25.4; + break; + case "cm": + k = 72 / 2.54; + break; + case "in": + k = 72; + break; + case "px": + k = 72 / 96; + break; + case "pc": + k = 12; + break; + case "em": + k = 12; + break; + case "ex": + k = 6; + break; + default: + throw "Invalid unit: " + unit; + } + var pageHeight = 0; + var pageWidth = 0; + + // Dimensions are stored as user units and converted to points on output + if (pageFormats.hasOwnProperty(format_as_string)) { + pageHeight = pageFormats[format_as_string][1] / k; + pageWidth = pageFormats[format_as_string][0] / k; + } else { + try { + pageHeight = format[1]; + pageWidth = format[0]; + } catch (err) { + throw new Error("Invalid format: " + format); + } + } + var tmp; + // Handle page orientation + if (orientation === "p" || orientation === "portrait") { + orientation = "p"; + if (pageWidth > pageHeight) { + tmp = pageWidth; + pageWidth = pageHeight; + pageHeight = tmp; + } + } else if (orientation === "l" || orientation === "landscape") { + orientation = "l"; + if (pageHeight > pageWidth) { + tmp = pageWidth; + pageWidth = pageHeight; + pageHeight = tmp; + } + } else { + throw "Invalid orientation: " + orientation; + } + + // Return information (k is the unit conversion ratio from pts) + var info = { + width: pageWidth, + height: pageHeight, + unit: unit, + k: k, + orientation: orientation + }; + return info; + }; + + /** + * @typedef FontFace + * + * The font-face type implements an interface similar to that of the font-face CSS rule, + * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D + * is updated. + * + * All properties expect values similar to those in the font-face CSS rule. A difference + * is the font-family, which do not need to be enclosed in double-quotes when containing + * spaces like in CSS. + * + * @property {string} family The name of the font-family. + * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'. + * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.) + * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded. + * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched. + * @property {string} [src] url A URL to a font of a specific format. + * @property {string} [src] format Format of the font referenced by the URL. + */ + + /** + * Generate a PDF from an HTML element or string using. + * + * @name html + * @function + * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML. + * @param {Object} [options] Collection of settings + * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance + * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0. + * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode. + *
    + *
  • + * false: Auto paging is disabled. + *
  • + *
  • + * true or 'slice': Will cut shapes or text chunks across page breaks. Will possibly + * slice text in half, making it difficult to read. + *
  • + *
  • + * 'text': Trys not to cut text in half across page breaks. Works best for documents consisting + * mostly of a single column of text. + *
  • + *
+ * Default is true. + * @param {string} [options.filename] name of the file + * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image + * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options + * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm. + * @param {jsPDF} [options.jsPDF] jsPDF instance + * @param {number=} [options.x] x position on the PDF document in jsPDF units. + * @param {number=} [options.y] y position on the PDF document in jsPDF units. + * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be + * scaled such that it fits into the specified width. Has no effect if either the html2canvas.scale is + * specified or the windowWidth option is NOT specified. + * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the + * html2canvas.windowWidth option, this option affects the actual container size while rendering and + * does NOT affect CSS media queries. This option only has an effect, if the width option is also specified. + * + * @example + * var doc = new jsPDF(); + * + * doc.html(document.body, { + * callback: function (doc) { + * doc.save(); + * }, + * x: 10, + * y: 10 + * }); + */ + jsPDFAPI.html = function (src, options) { + + options = options || {}; + options.callback = options.callback || function () {}; + options.html2canvas = options.html2canvas || {}; + options.html2canvas.canvas = options.html2canvas.canvas || this.canvas; + options.jsPDF = options.jsPDF || this; + options.fontFaces = options.fontFaces ? options.fontFaces.map(normalizeFontFace) : null; + + // Create a new worker with the given options. + var worker = new Worker(options); + if (!options.worker) { + // If worker is not set to true, perform the traditional 'simple' operation. + return worker.from(src).doCallback(); + } else { + // Otherwise, return the worker for new Promise-based operation. + return worker; + } + }; + })(jsPDF.API); + + /** + * @license + * ==================================================================== + * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * ==================================================================== + */ + + /** + * jsPDF JavaScript plugin + * + * @name javascript + * @module + */ + (function (jsPDFAPI) { + + var jsNamesObj, jsJsObj, text; + /** + * @name addJS + * @function + * @param {string} javascript The javascript to be embedded into the PDF-file. + * @returns {jsPDF} + */ + jsPDFAPI.addJS = function (javascript) { + text = javascript; + this.internal.events.subscribe("postPutResources", function () { + jsNamesObj = this.internal.newObject(); + this.internal.out("<<"); + this.internal.out("/Names [(EmbeddedJS) " + (jsNamesObj + 1) + " 0 R]"); + this.internal.out(">>"); + this.internal.out("endobj"); + jsJsObj = this.internal.newObject(); + this.internal.out("<<"); + this.internal.out("/S /JavaScript"); + this.internal.out("/JS (" + text + ")"); + this.internal.out(">>"); + this.internal.out("endobj"); + }); + this.internal.events.subscribe("putCatalog", function () { + if (jsNamesObj !== undefined && jsJsObj !== undefined) { + this.internal.out("/Names <>"); + } + }); + return this; + }; + })(jsPDF.API); + + /** + * @license + * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF Outline PlugIn + * + * Generates a PDF Outline + * @name outline + * @module + */ + (function (jsPDFAPI) { + + var namesOid; + //var destsGoto = []; + + jsPDFAPI.events.push(["postPutResources", function () { + var pdf = this; + var rx = /^(\d+) 0 obj$/; + + // Write action goto objects for each page + // this.outline.destsGoto = []; + // for (var i = 0; i < totalPages; i++) { + // var id = pdf.internal.newObject(); + // this.outline.destsGoto.push(id); + // pdf.internal.write("<> endobj"); + // } + // + // for (var i = 0; i < dests.length; i++) { + // pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0 + // R"); + // } + // + if (this.outline.root.children.length > 0) { + var lines = pdf.outline.render().split(/\r\n/); + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var m = rx.exec(line); + if (m != null) { + var oid = m[1]; + pdf.internal.newObjectDeferredBegin(oid, false); + } + pdf.internal.write(line); + } + } + + // This code will write named destination for each page reference + // (page_1, etc) + if (this.outline.createNamedDestinations) { + var totalPages = this.internal.pages.length; + // WARNING: this assumes jsPDF starts on page 3 and pageIDs + // follow 5, 7, 9, etc + // Write destination objects for each page + var dests = []; + for (var i = 0; i < totalPages; i++) { + var id = pdf.internal.newObject(); + dests.push(id); + var info = pdf.internal.getPageInfo(i + 1); + pdf.internal.write("<< /D[" + info.objId + " 0 R /XYZ null null null]>> endobj"); + } + + // assign a name for each destination + var names2Oid = pdf.internal.newObject(); + pdf.internal.write("<< /Names [ "); + for (var i = 0; i < dests.length; i++) { + pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0 R"); + } + pdf.internal.write(" ] >>", "endobj"); + + // var kids = pdf.internal.newObject(); + // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R'); + // pdf.internal.write(' ] >>', 'endobj'); + + namesOid = pdf.internal.newObject(); + pdf.internal.write("<< /Dests " + names2Oid + " 0 R"); + pdf.internal.write(">>", "endobj"); + } + }]); + jsPDFAPI.events.push(["putCatalog", function () { + var pdf = this; + if (pdf.outline.root.children.length > 0) { + pdf.internal.write("/Outlines", this.outline.makeRef(this.outline.root)); + if (this.outline.createNamedDestinations) { + pdf.internal.write("/Names " + namesOid + " 0 R"); + } + // Open with Bookmarks showing + // pdf.internal.write("/PageMode /UseOutlines"); + } + }]); + jsPDFAPI.events.push(["initialized", function () { + var pdf = this; + pdf.outline = { + createNamedDestinations: false, + root: { + children: [] + } + }; + + /** + * Options: pageNumber + */ + pdf.outline.add = function (parent, title, options) { + var item = { + title: title, + options: options, + children: [] + }; + if (parent == null) { + parent = this.root; + } + parent.children.push(item); + return item; + }; + pdf.outline.render = function () { + this.ctx = {}; + this.ctx.val = ""; + this.ctx.pdf = pdf; + this.genIds_r(this.root); + this.renderRoot(this.root); + this.renderItems(this.root); + return this.ctx.val; + }; + pdf.outline.genIds_r = function (node) { + node.id = pdf.internal.newObjectDeferred(); + for (var i = 0; i < node.children.length; i++) { + this.genIds_r(node.children[i]); + } + }; + pdf.outline.renderRoot = function (node) { + this.objStart(node); + this.line("/Type /Outlines"); + if (node.children.length > 0) { + this.line("/First " + this.makeRef(node.children[0])); + this.line("/Last " + this.makeRef(node.children[node.children.length - 1])); + } + this.line("/Count " + this.count_r({ + count: 0 + }, node)); + this.objEnd(); + }; + pdf.outline.renderItems = function (node) { + var getVerticalCoordinateString = this.ctx.pdf.internal.getVerticalCoordinateString; + for (var i = 0; i < node.children.length; i++) { + var item = node.children[i]; + this.objStart(item); + this.line("/Title " + this.makeString(item.title)); + this.line("/Parent " + this.makeRef(node)); + if (i > 0) { + this.line("/Prev " + this.makeRef(node.children[i - 1])); + } + if (i < node.children.length - 1) { + this.line("/Next " + this.makeRef(node.children[i + 1])); + } + if (item.children.length > 0) { + this.line("/First " + this.makeRef(item.children[0])); + this.line("/Last " + this.makeRef(item.children[item.children.length - 1])); + } + var count = this.count = this.count_r({ + count: 0 + }, item); + if (count > 0) { + this.line("/Count " + count); + } + if (item.options) { + if (item.options.pageNumber) { + // Explicit Destination + //WARNING this assumes page ids are 3,5,7, etc. + var info = pdf.internal.getPageInfo(item.options.pageNumber); + this.line("/Dest " + "[" + info.objId + " 0 R /XYZ 0 " + getVerticalCoordinateString(0) + " 0]"); + // this line does not work on all clients (pageNumber instead of page ref) + //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]'); + + // Named Destination + // this.line('/Dest (page_' + (item.options.pageNumber) + ')'); + + // Action Destination + // var id = pdf.internal.newObject(); + // pdf.internal.write('<> endobj'); + // this.line('/A ' + id + ' 0 R' ); + } + } + this.objEnd(); + } + for (var z = 0; z < node.children.length; z++) { + this.renderItems(node.children[z]); + } + }; + pdf.outline.line = function (text) { + this.ctx.val += text + "\r\n"; + }; + pdf.outline.makeRef = function (node) { + return node.id + " 0 R"; + }; + pdf.outline.makeString = function (val) { + return "(" + pdf.internal.pdfEscape(val) + ")"; + }; + pdf.outline.objStart = function (node) { + this.ctx.val += "\r\n" + node.id + " 0 obj" + "\r\n<<\r\n"; + }; + pdf.outline.objEnd = function () { + this.ctx.val += ">> \r\n" + "endobj" + "\r\n"; + }; + pdf.outline.count_r = function (ctx, node) { + for (var i = 0; i < node.children.length; i++) { + ctx.count++; + this.count_r(ctx, node.children[i]); + } + return ctx.count; + }; + }]); + return this; + })(jsPDF.API); + + /** + * @license + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF jpeg Support PlugIn + * + * @name jpeg_support + * @module + */ + (function (jsPDFAPI) { + + /** + * 0xc0 (SOF) Huffman - Baseline DCT + * 0xc1 (SOF) Huffman - Extended sequential DCT + * 0xc2 Progressive DCT (SOF2) + * 0xc3 Spatial (sequential) lossless (SOF3) + * 0xc4 Differential sequential DCT (SOF5) + * 0xc5 Differential progressive DCT (SOF6) + * 0xc6 Differential spatial (SOF7) + * 0xc7 + */ + var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7]; + + //takes a string imgData containing the raw bytes of + //a jpeg image and returns [width, height] + //Algorithm from: http://www.64lines.com/jpeg-width-height + var getJpegInfo = function getJpegInfo(imgData) { + var width, height, numcomponents; + var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5); + var len = imgData.length; + var result = { + width: 0, + height: 0, + numcomponents: 1 + }; + for (var i = 4; i < len; i += 2) { + i += blockLength; + if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) { + height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6); + width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8); + numcomponents = imgData.charCodeAt(i + 9); + result = { + width: width, + height: height, + numcomponents: numcomponents + }; + break; + } else { + blockLength = imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3); + } + } + return result; + }; + + /** + * @ignore + */ + jsPDFAPI.processJPEG = function (data, index, alias, compression, dataAsBinaryString, colorSpace) { + var filter = this.decode.DCT_DECODE, + bpc = 8, + dims, + result = null; + if (typeof data === "string" || this.__addimage__.isArrayBuffer(data) || this.__addimage__.isArrayBufferView(data)) { + // if we already have a stored binary string rep use that + data = dataAsBinaryString || data; + data = this.__addimage__.isArrayBuffer(data) ? new Uint8Array(data) : data; + data = this.__addimage__.isArrayBufferView(data) ? this.__addimage__.arrayBufferToBinaryString(data) : data; + dims = getJpegInfo(data); + switch (dims.numcomponents) { + case 1: + colorSpace = this.color_spaces.DEVICE_GRAY; + break; + case 4: + colorSpace = this.color_spaces.DEVICE_CMYK; + break; + case 3: + colorSpace = this.color_spaces.DEVICE_RGB; + break; + } + result = { + data: data, + width: dims.width, + height: dims.height, + colorSpace: colorSpace, + bitsPerComponent: bpc, + filter: filter, + index: index, + alias: alias + }; + } + return result; + }; + })(jsPDF.API); + + function decode(bytes, encoding = 'utf8') { + const decoder = new TextDecoder(encoding); + return decoder.decode(bytes); + } + const encoder = new TextEncoder(); + function encode(str) { + return encoder.encode(str); + } + + const defaultByteLength = 1024 * 8; + const hostBigEndian = (() => { + const array = new Uint8Array(4); + const view = new Uint32Array(array.buffer); + return !((view[0] = 1) & array[0]); + })(); + const typedArrays = { + int8: globalThis.Int8Array, + uint8: globalThis.Uint8Array, + int16: globalThis.Int16Array, + uint16: globalThis.Uint16Array, + int32: globalThis.Int32Array, + uint32: globalThis.Uint32Array, + uint64: globalThis.BigUint64Array, + int64: globalThis.BigInt64Array, + float32: globalThis.Float32Array, + float64: globalThis.Float64Array + }; + class IOBuffer { + /** + * Reference to the internal ArrayBuffer object. + */ + buffer; + /** + * Byte length of the internal ArrayBuffer. + */ + byteLength; + /** + * Byte offset of the internal ArrayBuffer. + */ + byteOffset; + /** + * Byte length of the internal ArrayBuffer. + */ + length; + /** + * The current offset of the buffer's pointer. + */ + offset; + lastWrittenByte; + littleEndian; + _data; + _mark; + _marks; + /** + * Create a new IOBuffer. + * @param data - The data to construct the IOBuffer with. + * If data is a number, it will be the new buffer's length
+ * If data is `undefined`, the buffer will be initialized with a default length of 8Kb
+ * If data is an ArrayBuffer, SharedArrayBuffer, an ArrayBufferView (Typed Array), an IOBuffer instance, + * or a Node.js Buffer, a view will be created over the underlying ArrayBuffer. + * @param options - An object for the options. + * @returns A new IOBuffer instance. + */ + constructor(data = defaultByteLength, options = {}) { + let dataIsGiven = false; + if (typeof data === 'number') { + data = new ArrayBuffer(data); + } else { + dataIsGiven = true; + this.lastWrittenByte = data.byteLength; + } + const offset = options.offset ? options.offset >>> 0 : 0; + const byteLength = data.byteLength - offset; + let dvOffset = offset; + if (ArrayBuffer.isView(data) || data instanceof IOBuffer) { + if (data.byteLength !== data.buffer.byteLength) { + dvOffset = data.byteOffset + offset; + } + data = data.buffer; + } + if (dataIsGiven) { + this.lastWrittenByte = byteLength; + } else { + this.lastWrittenByte = 0; + } + this.buffer = data; + this.length = byteLength; + this.byteLength = byteLength; + this.byteOffset = dvOffset; + this.offset = 0; + this.littleEndian = true; + this._data = new DataView(this.buffer, dvOffset, byteLength); + this._mark = 0; + this._marks = []; + } + /** + * Checks if the memory allocated to the buffer is sufficient to store more + * bytes after the offset. + * @param byteLength - The needed memory in bytes. + * @returns `true` if there is sufficient space and `false` otherwise. + */ + available(byteLength = 1) { + return this.offset + byteLength <= this.length; + } + /** + * Check if little-endian mode is used for reading and writing multi-byte + * values. + * @returns `true` if little-endian mode is used, `false` otherwise. + */ + isLittleEndian() { + return this.littleEndian; + } + /** + * Set little-endian mode for reading and writing multi-byte values. + * @returns This. + */ + setLittleEndian() { + this.littleEndian = true; + return this; + } + /** + * Check if big-endian mode is used for reading and writing multi-byte values. + * @returns `true` if big-endian mode is used, `false` otherwise. + */ + isBigEndian() { + return !this.littleEndian; + } + /** + * Switches to big-endian mode for reading and writing multi-byte values. + * @returns This. + */ + setBigEndian() { + this.littleEndian = false; + return this; + } + /** + * Move the pointer n bytes forward. + * @param n - Number of bytes to skip. + * @returns This. + */ + skip(n = 1) { + this.offset += n; + return this; + } + /** + * Move the pointer n bytes backward. + * @param n - Number of bytes to move back. + * @returns This. + */ + back(n = 1) { + this.offset -= n; + return this; + } + /** + * Move the pointer to the given offset. + * @param offset - The offset to move to. + * @returns This. + */ + seek(offset) { + this.offset = offset; + return this; + } + /** + * Store the current pointer offset. + * @see {@link IOBuffer#reset} + * @returns This. + */ + mark() { + this._mark = this.offset; + return this; + } + /** + * Move the pointer back to the last pointer offset set by mark. + * @see {@link IOBuffer#mark} + * @returns This. + */ + reset() { + this.offset = this._mark; + return this; + } + /** + * Push the current pointer offset to the mark stack. + * @see {@link IOBuffer#popMark} + * @returns This. + */ + pushMark() { + this._marks.push(this.offset); + return this; + } + /** + * Pop the last pointer offset from the mark stack, and set the current + * pointer offset to the popped value. + * @see {@link IOBuffer#pushMark} + * @returns This. + */ + popMark() { + const offset = this._marks.pop(); + if (offset === undefined) { + throw new Error('Mark stack empty'); + } + this.seek(offset); + return this; + } + /** + * Move the pointer offset back to 0. + * @returns This. + */ + rewind() { + this.offset = 0; + return this; + } + /** + * Make sure the buffer has sufficient memory to write a given byteLength at + * the current pointer offset. + * If the buffer's memory is insufficient, this method will create a new + * buffer (a copy) with a length that is twice (byteLength + current offset). + * @param byteLength - The needed memory in bytes. + * @returns This. + */ + ensureAvailable(byteLength = 1) { + if (!this.available(byteLength)) { + const lengthNeeded = this.offset + byteLength; + const newLength = lengthNeeded * 2; + const newArray = new Uint8Array(newLength); + newArray.set(new Uint8Array(this.buffer)); + this.buffer = newArray.buffer; + this.length = newLength; + this.byteLength = newLength; + this._data = new DataView(this.buffer); + } + return this; + } + /** + * Read a byte and return false if the byte's value is 0, or true otherwise. + * Moves pointer forward by one byte. + * @returns The read boolean. + */ + readBoolean() { + return this.readUint8() !== 0; + } + /** + * Read a signed 8-bit integer and move pointer forward by 1 byte. + * @returns The read byte. + */ + readInt8() { + return this._data.getInt8(this.offset++); + } + /** + * Read an unsigned 8-bit integer and move pointer forward by 1 byte. + * @returns The read byte. + */ + readUint8() { + return this._data.getUint8(this.offset++); + } + /** + * Alias for {@link IOBuffer#readUint8}. + * @returns The read byte. + */ + readByte() { + return this.readUint8(); + } + /** + * Read `n` bytes and move pointer forward by `n` bytes. + * @param n - Number of bytes to read. + * @returns The read bytes. + */ + readBytes(n = 1) { + return this.readArray(n, 'uint8'); + } + /** + * Creates an array of corresponding to the type `type` and size `size`. + * For example type `uint8` will create a `Uint8Array`. + * @param size - size of the resulting array + * @param type - number type of elements to read + * @returns The read array. + */ + readArray(size, type) { + const bytes = typedArrays[type].BYTES_PER_ELEMENT * size; + const offset = this.byteOffset + this.offset; + const slice = this.buffer.slice(offset, offset + bytes); + if (this.littleEndian === hostBigEndian && type !== 'uint8' && type !== 'int8') { + const slice = new Uint8Array(this.buffer.slice(offset, offset + bytes)); + slice.reverse(); + const returnArray = new typedArrays[type](slice.buffer); + this.offset += bytes; + returnArray.reverse(); + return returnArray; + } + const returnArray = new typedArrays[type](slice); + this.offset += bytes; + return returnArray; + } + /** + * Read a 16-bit signed integer and move pointer forward by 2 bytes. + * @returns The read value. + */ + readInt16() { + const value = this._data.getInt16(this.offset, this.littleEndian); + this.offset += 2; + return value; + } + /** + * Read a 16-bit unsigned integer and move pointer forward by 2 bytes. + * @returns The read value. + */ + readUint16() { + const value = this._data.getUint16(this.offset, this.littleEndian); + this.offset += 2; + return value; + } + /** + * Read a 32-bit signed integer and move pointer forward by 4 bytes. + * @returns The read value. + */ + readInt32() { + const value = this._data.getInt32(this.offset, this.littleEndian); + this.offset += 4; + return value; + } + /** + * Read a 32-bit unsigned integer and move pointer forward by 4 bytes. + * @returns The read value. + */ + readUint32() { + const value = this._data.getUint32(this.offset, this.littleEndian); + this.offset += 4; + return value; + } + /** + * Read a 32-bit floating number and move pointer forward by 4 bytes. + * @returns The read value. + */ + readFloat32() { + const value = this._data.getFloat32(this.offset, this.littleEndian); + this.offset += 4; + return value; + } + /** + * Read a 64-bit floating number and move pointer forward by 8 bytes. + * @returns The read value. + */ + readFloat64() { + const value = this._data.getFloat64(this.offset, this.littleEndian); + this.offset += 8; + return value; + } + /** + * Read a 64-bit signed integer number and move pointer forward by 8 bytes. + * @returns The read value. + */ + readBigInt64() { + const value = this._data.getBigInt64(this.offset, this.littleEndian); + this.offset += 8; + return value; + } + /** + * Read a 64-bit unsigned integer number and move pointer forward by 8 bytes. + * @returns The read value. + */ + readBigUint64() { + const value = this._data.getBigUint64(this.offset, this.littleEndian); + this.offset += 8; + return value; + } + /** + * Read a 1-byte ASCII character and move pointer forward by 1 byte. + * @returns The read character. + */ + readChar() { + // eslint-disable-next-line unicorn/prefer-code-point + return String.fromCharCode(this.readInt8()); + } + /** + * Read `n` 1-byte ASCII characters and move pointer forward by `n` bytes. + * @param n - Number of characters to read. + * @returns The read characters. + */ + readChars(n = 1) { + let result = ''; + for (let i = 0; i < n; i++) { + result += this.readChar(); + } + return result; + } + /** + * Read the next `n` bytes, return a UTF-8 decoded string and move pointer + * forward by `n` bytes. + * @param n - Number of bytes to read. + * @returns The decoded string. + */ + readUtf8(n = 1) { + return decode(this.readBytes(n)); + } + /** + * Read the next `n` bytes, return a string decoded with `encoding` and move pointer + * forward by `n` bytes. + * If no encoding is passed, the function is equivalent to @see {@link IOBuffer#readUtf8} + * @param n - Number of bytes to read. + * @param encoding - The encoding to use. Default is 'utf8'. + * @returns The decoded string. + */ + decodeText(n = 1, encoding = 'utf8') { + return decode(this.readBytes(n), encoding); + } + /** + * Write 0xff if the passed value is truthy, 0x00 otherwise and move pointer + * forward by 1 byte. + * @param value - The value to write. + * @returns This. + */ + writeBoolean(value) { + this.writeUint8(value ? 0xff : 0x00); + return this; + } + /** + * Write `value` as an 8-bit signed integer and move pointer forward by 1 byte. + * @param value - The value to write. + * @returns This. + */ + writeInt8(value) { + this.ensureAvailable(1); + this._data.setInt8(this.offset++, value); + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as an 8-bit unsigned integer and move pointer forward by 1 + * byte. + * @param value - The value to write. + * @returns This. + */ + writeUint8(value) { + this.ensureAvailable(1); + this._data.setUint8(this.offset++, value); + this._updateLastWrittenByte(); + return this; + } + /** + * An alias for {@link IOBuffer#writeUint8}. + * @param value - The value to write. + * @returns This. + */ + writeByte(value) { + return this.writeUint8(value); + } + /** + * Write all elements of `bytes` as uint8 values and move pointer forward by + * `bytes.length` bytes. + * @param bytes - The array of bytes to write. + * @returns This. + */ + writeBytes(bytes) { + this.ensureAvailable(bytes.length); + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < bytes.length; i++) { + this._data.setUint8(this.offset++, bytes[i]); + } + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 16-bit signed integer and move pointer forward by 2 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeInt16(value) { + this.ensureAvailable(2); + this._data.setInt16(this.offset, value, this.littleEndian); + this.offset += 2; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 16-bit unsigned integer and move pointer forward by 2 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeUint16(value) { + this.ensureAvailable(2); + this._data.setUint16(this.offset, value, this.littleEndian); + this.offset += 2; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 32-bit signed integer and move pointer forward by 4 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeInt32(value) { + this.ensureAvailable(4); + this._data.setInt32(this.offset, value, this.littleEndian); + this.offset += 4; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 32-bit unsigned integer and move pointer forward by 4 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeUint32(value) { + this.ensureAvailable(4); + this._data.setUint32(this.offset, value, this.littleEndian); + this.offset += 4; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 32-bit floating number and move pointer forward by 4 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeFloat32(value) { + this.ensureAvailable(4); + this._data.setFloat32(this.offset, value, this.littleEndian); + this.offset += 4; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 64-bit floating number and move pointer forward by 8 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeFloat64(value) { + this.ensureAvailable(8); + this._data.setFloat64(this.offset, value, this.littleEndian); + this.offset += 8; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 64-bit signed bigint and move pointer forward by 8 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeBigInt64(value) { + this.ensureAvailable(8); + this._data.setBigInt64(this.offset, value, this.littleEndian); + this.offset += 8; + this._updateLastWrittenByte(); + return this; + } + /** + * Write `value` as a 64-bit unsigned bigint and move pointer forward by 8 + * bytes. + * @param value - The value to write. + * @returns This. + */ + writeBigUint64(value) { + this.ensureAvailable(8); + this._data.setBigUint64(this.offset, value, this.littleEndian); + this.offset += 8; + this._updateLastWrittenByte(); + return this; + } + /** + * Write the charCode of `str`'s first character as an 8-bit unsigned integer + * and move pointer forward by 1 byte. + * @param str - The character to write. + * @returns This. + */ + writeChar(str) { + // eslint-disable-next-line unicorn/prefer-code-point + return this.writeUint8(str.charCodeAt(0)); + } + /** + * Write the charCodes of all `str`'s characters as 8-bit unsigned integers + * and move pointer forward by `str.length` bytes. + * @param str - The characters to write. + * @returns This. + */ + writeChars(str) { + for (let i = 0; i < str.length; i++) { + // eslint-disable-next-line unicorn/prefer-code-point + this.writeUint8(str.charCodeAt(i)); + } + return this; + } + /** + * UTF-8 encode and write `str` to the current pointer offset and move pointer + * forward according to the encoded length. + * @param str - The string to write. + * @returns This. + */ + writeUtf8(str) { + return this.writeBytes(encode(str)); + } + /** + * Export a Uint8Array view of the internal buffer. + * The view starts at the byte offset and its length + * is calculated to stop at the last written byte or the original length. + * @returns A new Uint8Array view. + */ + toArray() { + return new Uint8Array(this.buffer, this.byteOffset, this.lastWrittenByte); + } + /** + * Get the total number of bytes written so far, regardless of the current offset. + * @returns - Total number of bytes. + */ + getWrittenByteLength() { + return this.lastWrittenByte - this.byteOffset; + } + /** + * Update the last written byte offset + * @private + */ + _updateLastWrittenByte() { + if (this.offset > this.lastWrittenByte) { + this.lastWrittenByte = this.offset; + } + } + } + + /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */ + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + /* eslint-disable space-unary-ops */ + + /* Public constants ==========================================================*/ + /* ===========================================================================*/ + + //const Z_FILTERED = 1; + //const Z_HUFFMAN_ONLY = 2; + //const Z_RLE = 3; + const Z_FIXED$1 = 4; + //const Z_DEFAULT_STRATEGY = 0; + + /* Possible values of the data_type field (though see inflate()) */ + const Z_BINARY = 0; + const Z_TEXT = 1; + //const Z_ASCII = 1; // = Z_TEXT + const Z_UNKNOWN$1 = 2; + + /*============================================================================*/ + + function zero$1(buf) { + let len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + + // From zutil.h + + const STORED_BLOCK = 0; + const STATIC_TREES = 1; + const DYN_TREES = 2; + /* The three kinds of block type */ + + const MIN_MATCH$1 = 3; + const MAX_MATCH$1 = 258; + /* The minimum and maximum match lengths */ + + // From deflate.h + /* =========================================================================== + * Internal compression state. + */ + + const LENGTH_CODES$1 = 29; + /* number of length codes, not counting the special END_BLOCK code */ + + const LITERALS$1 = 256; + /* number of literal bytes 0..255 */ + + const L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1; + /* number of Literal or Length codes, including the END_BLOCK code */ + + const D_CODES$1 = 30; + /* number of distance codes */ + + const BL_CODES$1 = 19; + /* number of codes used to transfer the bit lengths */ + + const HEAP_SIZE$1 = 2 * L_CODES$1 + 1; + /* maximum heap size */ + + const MAX_BITS$1 = 15; + /* All codes must not exceed MAX_BITS bits */ + + const Buf_size = 16; + /* size of bit buffer in bi_buf */ + + /* =========================================================================== + * Constants + */ + + const MAX_BL_BITS = 7; + /* Bit length codes must not exceed MAX_BL_BITS bits */ + + const END_BLOCK = 256; + /* end of block literal code */ + + const REP_3_6 = 16; + /* repeat previous bit length 3-6 times (2 bits of repeat count) */ + + const REPZ_3_10 = 17; + /* repeat a zero length 3-10 times (3 bits of repeat count) */ + + const REPZ_11_138 = 18; + /* repeat a zero length 11-138 times (7 bits of repeat count) */ + + /* eslint-disable comma-spacing,array-bracket-spacing */ + const extra_lbits = /* extra bits for each length code */ + new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]); + const extra_dbits = /* extra bits for each distance code */ + new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]); + const extra_blbits = /* extra bits for each bit length code */ + new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]); + const bl_order = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); + /* eslint-enable comma-spacing,array-bracket-spacing */ + + /* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + + /* =========================================================================== + * Local data. These are initialized only once. + */ + + // We pre-fill arrays with 0 to avoid uninitialized gaps + + const DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + + // !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 + const static_ltree = new Array((L_CODES$1 + 2) * 2); + zero$1(static_ltree); + /* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + + const static_dtree = new Array(D_CODES$1 * 2); + zero$1(static_dtree); + /* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + + const _dist_code = new Array(DIST_CODE_LEN); + zero$1(_dist_code); + /* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + + const _length_code = new Array(MAX_MATCH$1 - MIN_MATCH$1 + 1); + zero$1(_length_code); + /* length code for each normalized match length (0 == MIN_MATCH) */ + + const base_length = new Array(LENGTH_CODES$1); + zero$1(base_length); + /* First normalized length for each code (0 = MIN_MATCH) */ + + const base_dist = new Array(D_CODES$1); + zero$1(base_dist); + /* First normalized distance for each code (0 = distance of 1) */ + + function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; + } + let static_l_desc; + let static_d_desc; + let static_bl_desc; + function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ + } + const d_code = dist => { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; + }; + + /* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ + const put_short = (s, w) => { + // put_byte(s, (uch)((w) & 0xff)); + // put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = w & 0xff; + s.pending_buf[s.pending++] = w >>> 8 & 0xff; + }; + + /* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ + const send_bits = (s, value, length) => { + if (s.bi_valid > Buf_size - length) { + s.bi_buf |= value << s.bi_valid & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> Buf_size - s.bi_valid; + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= value << s.bi_valid & 0xffff; + s.bi_valid += length; + } + }; + const send_code = (s, c, tree) => { + send_bits(s, tree[c * 2] /*.Code*/, tree[c * 2 + 1] /*.Len*/); + }; + + /* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ + const bi_reverse = (code, len) => { + let res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; + }; + + /* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ + const bi_flush = s => { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } + }; + + /* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ + const gen_bitlen = (s, desc) => { + // deflate_state *s; + // tree_desc *desc; /* the tree descriptor */ + + const tree = desc.dyn_tree; + const max_code = desc.max_code; + const stree = desc.stat_desc.static_tree; + const has_stree = desc.stat_desc.has_stree; + const extra = desc.stat_desc.extra_bits; + const base = desc.stat_desc.extra_base; + const max_length = desc.stat_desc.max_length; + let h; /* heap index */ + let n, m; /* iterate over the tree elements */ + let bits; /* bit length */ + let xbits; /* extra bits */ + let f; /* frequency */ + let overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS$1; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1] /*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE$1; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1] /*.Dad*/ * 2 + 1] /*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1] /*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { + continue; + } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2] /*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1] /*.Len*/ + xbits); + } + } + if (overflow === 0) { + return; + } + + // Tracev((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { + bits--; + } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { + continue; + } + if (tree[m * 2 + 1] /*.Len*/ !== bits) { + // Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1] /*.Len*/) * tree[m * 2] /*.Freq*/; + tree[m * 2 + 1] /*.Len*/ = bits; + } + n--; + } + } + }; + + /* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ + const gen_codes = (tree, max_code, bl_count) => { + // ct_data *tree; /* the tree to decorate */ + // int max_code; /* largest code with non zero frequency */ + // ushf *bl_count; /* number of codes at each bit length */ + + const next_code = new Array(MAX_BITS$1 + 1); /* next code value for each bit length */ + let code = 0; /* running code value */ + let bits; /* bit index */ + let n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS$1; bits++) { + code = code + bl_count[bits - 1] << 1; + next_code[bits] = code; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< { + let n; /* iterates over tree elements */ + let bits; /* bit counter */ + let length; /* length value */ + let code; /* code value */ + let dist; /* distance index */ + const bl_count = new Array(MAX_BITS$1 + 1); + /* number of codes at each bit length for an optimal tree */ + + // do check in _tr_init() + //if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ + /*#ifdef NO_INIT_GLOBAL_POINTERS + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; + #endif*/ + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES$1 - 1; code++) { + base_length[code] = length; + for (n = 0; n < 1 << extra_lbits[code]; n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < 1 << extra_dbits[code]; n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES$1; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < 1 << extra_dbits[code] - 7; n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS$1; bits++) { + bl_count[bits] = 0; + } + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1] /*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1] /*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1] /*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1] /*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES$1 + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES$1; n++) { + static_dtree[n * 2 + 1] /*.Len*/ = 5; + static_dtree[n * 2] /*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS$1 + 1, L_CODES$1, MAX_BITS$1); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES$1, MAX_BITS$1); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES$1, MAX_BL_BITS); + + //static_init_done = true; + }; + + /* =========================================================================== + * Initialize a new block. + */ + const init_block = s => { + let n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES$1; n++) { + s.dyn_ltree[n * 2] /*.Freq*/ = 0; + } + for (n = 0; n < D_CODES$1; n++) { + s.dyn_dtree[n * 2] /*.Freq*/ = 0; + } + for (n = 0; n < BL_CODES$1; n++) { + s.bl_tree[n * 2] /*.Freq*/ = 0; + } + s.dyn_ltree[END_BLOCK * 2] /*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.sym_next = s.matches = 0; + }; + + /* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ + const bi_windup = s => { + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; + }; + + /* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ + const smaller = (tree, n, m, depth) => { + const _n2 = n * 2; + const _m2 = m * 2; + return tree[_n2] /*.Freq*/ < tree[_m2] /*.Freq*/ || tree[_n2] /*.Freq*/ === tree[_m2] /*.Freq*/ && depth[n] <= depth[m]; + }; + + /* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ + const pqdownheap = (s, tree, k) => { + // deflate_state *s; + // ct_data *tree; /* the tree to restore */ + // int k; /* node to move down */ + + const v = s.heap[k]; + let j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { + break; + } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; + }; + + // inlined manually + // const SMALLEST = 1; + + /* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ + const compress_block = (s, ltree, dtree) => { + // deflate_state *s; + // const ct_data *ltree; /* literal tree */ + // const ct_data *dtree; /* distance tree */ + + let dist; /* distance of matched string */ + let lc; /* match length or unmatched char (if dist == 0) */ + let sx = 0; /* running index in sym_buf */ + let code; /* the code to send */ + let extra; /* number of extra bits to send */ + + if (s.sym_next !== 0) { + do { + dist = s.pending_buf[s.sym_buf + sx++] & 0xff; + dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8; + lc = s.pending_buf[s.sym_buf + sx++]; + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS$1 + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and sym_buf is ok: */ + //Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); + } while (sx < s.sym_next); + } + send_code(s, END_BLOCK, ltree); + }; + + /* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ + const build_tree = (s, desc) => { + // deflate_state *s; + // tree_desc *desc; /* the tree descriptor */ + + const tree = desc.dyn_tree; + const stree = desc.stat_desc.static_tree; + const has_stree = desc.stat_desc.has_stree; + const elems = desc.stat_desc.elems; + let n, m; /* iterate over heap elements */ + let max_code = -1; /* largest code with non zero frequency */ + let node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE$1; + for (n = 0; n < elems; n++) { + if (tree[n * 2] /*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + } else { + tree[n * 2 + 1] /*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0; + tree[node * 2] /*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + if (has_stree) { + s.static_len -= stree[node * 2 + 1] /*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s.heap_len >> 1 /*int /2*/; n >= 1; n--) { + pqdownheap(s, tree, n); + } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1 /*SMALLEST*/]; + s.heap[1 /*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1 /*SMALLEST*/); + /***/ + + m = s.heap[1 /*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2] /*.Freq*/ = tree[n * 2] /*.Freq*/ + tree[m * 2] /*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1] /*.Dad*/ = tree[m * 2 + 1] /*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1 /*SMALLEST*/] = node++; + pqdownheap(s, tree, 1 /*SMALLEST*/); + } while (s.heap_len >= 2); + s.heap[--s.heap_max] = s.heap[1 /*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); + }; + + /* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ + const scan_tree = (s, tree, max_code) => { + // deflate_state *s; + // ct_data *tree; /* the tree to be scanned */ + // int max_code; /* and its largest code of non zero frequency */ + + let n; /* iterates over all tree elements */ + let prevlen = -1; /* last emitted length */ + let curlen; /* length of current code */ + + let nextlen = tree[0 * 2 + 1] /*.Len*/; /* length of next code */ + + let count = 0; /* repeat count of the current code */ + let max_count = 7; /* max repeat count */ + let min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1] /*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1] /*.Len*/; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + s.bl_tree[curlen * 2] /*.Freq*/ += count; + } else if (curlen !== 0) { + if (curlen !== prevlen) { + s.bl_tree[curlen * 2] /*.Freq*/++; + } + s.bl_tree[REP_3_6 * 2] /*.Freq*/++; + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2] /*.Freq*/++; + } else { + s.bl_tree[REPZ_11_138 * 2] /*.Freq*/++; + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + }; + + /* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ + const send_tree = (s, tree, max_code) => { + // deflate_state *s; + // ct_data *tree; /* the tree to be scanned */ + // int max_code; /* and its largest code of non zero frequency */ + + let n; /* iterates over all tree elements */ + let prevlen = -1; /* last emitted length */ + let curlen; /* length of current code */ + + let nextlen = tree[0 * 2 + 1] /*.Len*/; /* length of next code */ + + let count = 0; /* repeat count of the current code */ + let max_count = 7; /* max repeat count */ + let min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1] /*.Len*/; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + do { + send_code(s, curlen, s.bl_tree); + } while (--count !== 0); + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + }; + + /* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ + const build_bl_tree = s => { + let max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES$1 - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1] /*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; + }; + + /* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ + const send_all_trees = (s, lcodes, dcodes, blcodes) => { + // deflate_state *s; + // int lcodes, dcodes, blcodes; /* number of codes for each tree */ + + let rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1] /*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); + }; + + /* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "block list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ + const detect_data_type = s => { + /* block_mask is the bit mask of block-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + let block_mask = 0xf3ffc07f; + let n; + + /* Check for non-textual ("block-listed") bytes. */ + for (n = 0; n <= 31; n++, block_mask >>>= 1) { + if (block_mask & 1 && s.dyn_ltree[n * 2] /*.Freq*/ !== 0) { + return Z_BINARY; + } + } + + /* Check for textual ("allow-listed") bytes. */ + if (s.dyn_ltree[9 * 2] /*.Freq*/ !== 0 || s.dyn_ltree[10 * 2] /*.Freq*/ !== 0 || s.dyn_ltree[13 * 2] /*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS$1; n++) { + if (s.dyn_ltree[n * 2] /*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "block-listed" or "allow-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; + }; + let static_init_done = false; + + /* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ + const _tr_init$1 = s => { + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); + }; + + /* =========================================================================== + * Send a stored block + */ + const _tr_stored_block$1 = (s, buf, stored_len, last) => { + //DeflateState *s; + //charf *buf; /* input block */ + //ulg stored_len; /* length of input block */ + //int last; /* one if this is the last block for a file */ + + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + bi_windup(s); /* align on byte boundary */ + put_short(s, stored_len); + put_short(s, ~stored_len); + if (stored_len) { + s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending); + } + s.pending += stored_len; + }; + + /* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ + const _tr_align$1 = s => { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); + }; + + /* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and write out the encoded block. + */ + const _tr_flush_block$1 = (s, buf, stored_len, last) => { + //DeflateState *s; + //charf *buf; /* input block, or NULL if too old */ + //ulg stored_len; /* length of input block */ + //int last; /* one if this is the last block for a file */ + + let opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + let max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN$1) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = s.opt_len + 3 + 7 >>> 3; + static_lenb = s.static_len + 3 + 7 >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->sym_next / 3)); + + if (static_lenb <= opt_lenb) { + opt_lenb = static_lenb; + } + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + if (stored_len + 4 <= opt_lenb && buf !== -1) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block$1(s, buf, stored_len, last); + } else if (s.strategy === Z_FIXED$1 || static_lenb === opt_lenb) { + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); + }; + + /* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ + const _tr_tally$1 = (s, dist, lc) => { + // deflate_state *s; + // unsigned dist; /* distance of matched string */ + // unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ + + s.pending_buf[s.sym_buf + s.sym_next++] = dist; + s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8; + s.pending_buf[s.sym_buf + s.sym_next++] = lc; + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2] /*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2] /*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2] /*.Freq*/++; + } + return s.sym_next === s.sym_end; + }; + var _tr_init_1 = _tr_init$1; + var _tr_stored_block_1 = _tr_stored_block$1; + var _tr_flush_block_1 = _tr_flush_block$1; + var _tr_tally_1 = _tr_tally$1; + var _tr_align_1 = _tr_align$1; + var trees = { + _tr_init: _tr_init_1, + _tr_stored_block: _tr_stored_block_1, + _tr_flush_block: _tr_flush_block_1, + _tr_tally: _tr_tally_1, + _tr_align: _tr_align_1 + }; + + // Note: adler32 takes 12% for level 0 and 2% for level 6. + // It isn't worth it to make additional optimizations as in original. + // Small size is preferable. + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + const adler32 = (adler, buf, len, pos) => { + let s1 = adler & 0xffff | 0, + s2 = adler >>> 16 & 0xffff | 0, + n = 0; + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + do { + s1 = s1 + buf[pos++] | 0; + s2 = s2 + s1 | 0; + } while (--n); + s1 %= 65521; + s2 %= 65521; + } + return s1 | s2 << 16 | 0; + }; + var adler32_1 = adler32; + + // Note: we can't get significant speed boost here. + // So write code to minimize size - no pregenerated tables + // and array tools dependencies. + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + // Use ordinary array, since untyped makes no boost here + const makeTable = () => { + let c, + table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 0xEDB88320 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + }; + + // Create table on load. Just 255 signed longs. Not a problem. + const crcTable$1 = new Uint32Array(makeTable()); + const crc32 = (crc, buf, len, pos) => { + const t = crcTable$1; + const end = pos + len; + crc ^= -1; + for (let i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 0xFF]; + } + return crc ^ -1; // >>> 0; + }; + var crc32_1 = crc32; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + var messages = { + 2: 'need dictionary', + /* Z_NEED_DICT 2 */ + 1: 'stream end', + /* Z_STREAM_END 1 */ + 0: '', + /* Z_OK 0 */ + '-1': 'file error', + /* Z_ERRNO (-1) */ + '-2': 'stream error', + /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', + /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', + /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', + /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ + }; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + var constants$2 = { + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type + }; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + const { + _tr_init, + _tr_stored_block, + _tr_flush_block, + _tr_tally, + _tr_align + } = trees; + + /* Public constants ==========================================================*/ + /* ===========================================================================*/ + + const { + Z_NO_FLUSH: Z_NO_FLUSH$2, + Z_PARTIAL_FLUSH, + Z_FULL_FLUSH: Z_FULL_FLUSH$1, + Z_FINISH: Z_FINISH$3, + Z_BLOCK: Z_BLOCK$1, + Z_OK: Z_OK$3, + Z_STREAM_END: Z_STREAM_END$3, + Z_STREAM_ERROR: Z_STREAM_ERROR$2, + Z_DATA_ERROR: Z_DATA_ERROR$2, + Z_BUF_ERROR: Z_BUF_ERROR$1, + Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1, + Z_FILTERED, + Z_HUFFMAN_ONLY, + Z_RLE, + Z_FIXED, + Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1, + Z_UNKNOWN, + Z_DEFLATED: Z_DEFLATED$2 + } = constants$2; + + /*============================================================================*/ + + const MAX_MEM_LEVEL = 9; + /* Maximum value for memLevel in deflateInit2 */ + const MAX_WBITS$1 = 15; + /* 32K LZ77 window */ + const DEF_MEM_LEVEL = 8; + const LENGTH_CODES = 29; + /* number of length codes, not counting the special END_BLOCK code */ + const LITERALS = 256; + /* number of literal bytes 0..255 */ + const L_CODES = LITERALS + 1 + LENGTH_CODES; + /* number of Literal or Length codes, including the END_BLOCK code */ + const D_CODES = 30; + /* number of distance codes */ + const BL_CODES = 19; + /* number of codes used to transfer the bit lengths */ + const HEAP_SIZE = 2 * L_CODES + 1; + /* maximum heap size */ + const MAX_BITS = 15; + /* All codes must not exceed MAX_BITS bits */ + + const MIN_MATCH = 3; + const MAX_MATCH = 258; + const MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1; + const PRESET_DICT = 0x20; + const INIT_STATE = 42; /* zlib header -> BUSY_STATE */ + //#ifdef GZIP + const GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */ + //#endif + const EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */ + const NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */ + const COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */ + const HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */ + const BUSY_STATE = 113; /* deflate -> FINISH_STATE */ + const FINISH_STATE = 666; /* stream complete */ + + const BS_NEED_MORE = 1; /* block not completed, need more input or more output */ + const BS_BLOCK_DONE = 2; /* block flush performed */ + const BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ + const BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + + const OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + + const err = (strm, errorCode) => { + strm.msg = messages[errorCode]; + return errorCode; + }; + const rank = f => { + return f * 2 - (f > 4 ? 9 : 0); + }; + const zero = buf => { + let len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + }; + + /* =========================================================================== + * Slide the hash table when sliding the window down (could be avoided with 32 + * bit values at the expense of memory usage). We slide even when level == 0 to + * keep the hash table consistent if we switch back to level > 0 later. + */ + const slide_hash = s => { + let n, m; + let p; + let wsize = s.w_size; + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = m >= wsize ? m - wsize : 0; + } while (--n); + n = wsize; + //#ifndef FASTEST + p = n; + do { + m = s.prev[--p]; + s.prev[p] = m >= wsize ? m - wsize : 0; + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + //#endif + }; + + /* eslint-disable new-cap */ + let HASH_ZLIB = (s, prev, data) => (prev << s.hash_shift ^ data) & s.hash_mask; + // This hash causes less collisions, https://github.com/nodeca/pako/issues/135 + // But breaks binary compatibility + //let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask; + let HASH = HASH_ZLIB; + + /* ========================================================================= + * Flush as much pending output as possible. All deflate() output, except for + * some deflate_stored() output, goes through this function so some + * applications may wish to modify it to avoid allocating a large + * strm->next_out buffer and copying into it. (See also read_buf()). + */ + const flush_pending = strm => { + const s = strm.state; + + //_tr_flush_bits(s); + let len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { + return; + } + strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } + }; + const flush_block_only = (s, last) => { + _tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); + }; + const put_byte = (s, b) => { + s.pending_buf[s.pending++] = b; + }; + + /* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ + const putShortMSB = (s, b) => { + // put_byte(s, (Byte)(b >> 8)); + // put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = b >>> 8 & 0xff; + s.pending_buf[s.pending++] = b & 0xff; + }; + + /* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ + const read_buf = (strm, buf, start, size) => { + let len = strm.avail_in; + if (len > size) { + len = size; + } + if (len === 0) { + return 0; + } + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start); + if (strm.state.wrap === 1) { + strm.adler = adler32_1(strm.adler, buf, len, start); + } else if (strm.state.wrap === 2) { + strm.adler = crc32_1(strm.adler, buf, len, start); + } + strm.next_in += len; + strm.total_in += len; + return len; + }; + + /* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ + const longest_match = (s, cur_match) => { + let chain_length = s.max_chain_length; /* max hash chain length */ + let scan = s.strstart; /* current string */ + let match; /* matched string */ + let len; /* length of current match */ + let best_len = s.prev_length; /* best match length so far */ + let nice_match = s.nice_match; /* stop if match long enough */ + const limit = s.strstart > s.w_size - MIN_LOOKAHEAD ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0 /*NIL*/; + const _win = s.window; // shortcut + + const wmask = s.w_mask; + const prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + const strend = s.strstart + MAX_MATCH; + let scan_end1 = _win[scan + best_len - 1]; + let scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { + nice_match = s.lookahead; + } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; + }; + + /* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ + const fill_window = s => { + const _w_size = s.w_size; + let n, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + if (s.insert > s.strstart) { + s.insert = s.strstart; + } + slide_hash(s); + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = HASH(s, s.ins_h, s.window[str + 1]); + //#if MIN_MATCH != 3 + // Call update_hash() MIN_MATCH-3 more times + //#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]); + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + // if (s.high_water < s.window_size) { + // const curr = s.strstart + s.lookahead; + // let init = 0; + // + // if (s.high_water < curr) { + // /* Previous high water mark below current data -- zero WIN_INIT + // * bytes or up to end of window, whichever is less. + // */ + // init = s.window_size - curr; + // if (init > WIN_INIT) + // init = WIN_INIT; + // zmemzero(s->window + curr, (unsigned)init); + // s->high_water = curr + init; + // } + // else if (s->high_water < (ulg)curr + WIN_INIT) { + // /* High water mark at or above current data, but below current data + // * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + // * to end of window, whichever is less. + // */ + // init = (ulg)curr + WIN_INIT - s->high_water; + // if (init > s->window_size - s->high_water) + // init = s->window_size - s->high_water; + // zmemzero(s->window + s->high_water, (unsigned)init); + // s->high_water += init; + // } + // } + // + // Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + // "not enough room for search"); + }; + + /* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * + * In case deflateParams() is used to later switch to a non-zero compression + * level, s->matches (otherwise unused when storing) keeps track of the number + * of hash table slides to perform. If s->matches is 1, then one hash table + * slide will be done when switching. If s->matches is 2, the maximum value + * allowed here, then the hash table will be cleared, since two or more slides + * is the same as a clear. + * + * deflate_stored() is written to minimize the number of times an input byte is + * copied. It is most efficient with large input and output buffers, which + * maximizes the opportunites to have a single copy from next_in to next_out. + */ + const deflate_stored = (s, flush) => { + /* Smallest worthy block size when not flushing or finishing. By default + * this is 32K. This can be as small as 507 bytes for memLevel == 1. For + * large input and output buffers, the stored block size will be larger. + */ + let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5; + + /* Copy as many min_block or larger stored blocks directly to next_out as + * possible. If flushing, copy the remaining available input to next_out as + * stored blocks, if there is enough space. + */ + let len, + left, + have, + last = 0; + let used = s.strm.avail_in; + do { + /* Set len to the maximum size block that we can copy directly with the + * available input data and output space. Set left to how much of that + * would be copied from what's left in the window. + */ + len = 65535 /* MAX_STORED */; /* maximum deflate stored block length */ + have = s.bi_valid + 42 >> 3; /* number of header bytes */ + if (s.strm.avail_out < have) { + /* need room for header */ + break; + } + /* maximum stored block length that will fit in avail_out: */ + have = s.strm.avail_out - have; + left = s.strstart - s.block_start; /* bytes left in window */ + if (len > left + s.strm.avail_in) { + len = left + s.strm.avail_in; /* limit len to the input */ + } + if (len > have) { + len = have; /* limit len to the output */ + } + + /* If the stored block would be less than min_block in length, or if + * unable to copy all of the available input when flushing, then try + * copying to the window and the pending buffer instead. Also don't + * write an empty block when flushing -- deflate() does that. + */ + if (len < min_block && (len === 0 && flush !== Z_FINISH$3 || flush === Z_NO_FLUSH$2 || len !== left + s.strm.avail_in)) { + break; + } + + /* Make a dummy stored block in pending to get the header bytes, + * including any pending bits. This also updates the debugging counts. + */ + last = flush === Z_FINISH$3 && len === left + s.strm.avail_in ? 1 : 0; + _tr_stored_block(s, 0, 0, last); + + /* Replace the lengths in the dummy stored block with len. */ + s.pending_buf[s.pending - 4] = len; + s.pending_buf[s.pending - 3] = len >> 8; + s.pending_buf[s.pending - 2] = ~len; + s.pending_buf[s.pending - 1] = ~len >> 8; + + /* Write the stored block header bytes. */ + flush_pending(s.strm); + + //#ifdef ZLIB_DEBUG + // /* Update debugging counts for the data about to be copied. */ + // s->compressed_len += len << 3; + // s->bits_sent += len << 3; + //#endif + + /* Copy uncompressed bytes from the window to next_out. */ + if (left) { + if (left > len) { + left = len; + } + //zmemcpy(s->strm->next_out, s->window + s->block_start, left); + s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out); + s.strm.next_out += left; + s.strm.avail_out -= left; + s.strm.total_out += left; + s.block_start += left; + len -= left; + } + + /* Copy uncompressed bytes directly from next_in to next_out, updating + * the check value. + */ + if (len) { + read_buf(s.strm, s.strm.output, s.strm.next_out, len); + s.strm.next_out += len; + s.strm.avail_out -= len; + s.strm.total_out += len; + } + } while (last === 0); + + /* Update the sliding window with the last s->w_size bytes of the copied + * data, or append all of the copied data to the existing window if less + * than s->w_size bytes were copied. Also update the number of bytes to + * insert in the hash tables, in the event that deflateParams() switches to + * a non-zero compression level. + */ + used -= s.strm.avail_in; /* number of input bytes directly copied */ + if (used) { + /* If any input was used, then no unused input remains in the window, + * therefore s->block_start == s->strstart. + */ + if (used >= s.w_size) { + /* supplant the previous history */ + s.matches = 2; /* clear hash */ + //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); + s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0); + s.strstart = s.w_size; + s.insert = s.strstart; + } else { + if (s.window_size - s.strstart <= used) { + /* Slide the window down. */ + s.strstart -= s.w_size; + //zmemcpy(s->window, s->window + s->w_size, s->strstart); + s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0); + if (s.matches < 2) { + s.matches++; /* add a pending slide_hash() */ + } + if (s.insert > s.strstart) { + s.insert = s.strstart; + } + } + //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); + s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart); + s.strstart += used; + s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used; + } + s.block_start = s.strstart; + } + if (s.high_water < s.strstart) { + s.high_water = s.strstart; + } + + /* If the last block was written to next_out, then done. */ + if (last) { + return BS_FINISH_DONE; + } + + /* If flushing and all input has been consumed, then done. */ + if (flush !== Z_NO_FLUSH$2 && flush !== Z_FINISH$3 && s.strm.avail_in === 0 && s.strstart === s.block_start) { + return BS_BLOCK_DONE; + } + + /* Fill the window with any remaining input. */ + have = s.window_size - s.strstart; + if (s.strm.avail_in > have && s.block_start >= s.w_size) { + /* Slide the window down. */ + s.block_start -= s.w_size; + s.strstart -= s.w_size; + //zmemcpy(s->window, s->window + s->w_size, s->strstart); + s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0); + if (s.matches < 2) { + s.matches++; /* add a pending slide_hash() */ + } + have += s.w_size; /* more space now */ + if (s.insert > s.strstart) { + s.insert = s.strstart; + } + } + if (have > s.strm.avail_in) { + have = s.strm.avail_in; + } + if (have) { + read_buf(s.strm, s.window, s.strstart, have); + s.strstart += have; + s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have; + } + if (s.high_water < s.strstart) { + s.high_water = s.strstart; + } + + /* There was not enough avail_out to write a complete worthy or flushed + * stored block to next_out. Write a stored block to pending instead, if we + * have enough input for a worthy block, or if flushing and there is enough + * room for the remaining input as a stored block in the pending buffer. + */ + have = s.bi_valid + 42 >> 3; /* number of header bytes */ + /* maximum stored block length that will fit in pending: */ + have = s.pending_buf_size - have > 65535 /* MAX_STORED */ ? 65535 /* MAX_STORED */ : s.pending_buf_size - have; + min_block = have > s.w_size ? s.w_size : have; + left = s.strstart - s.block_start; + if (left >= min_block || (left || flush === Z_FINISH$3) && flush !== Z_NO_FLUSH$2 && s.strm.avail_in === 0 && left <= have) { + len = left > have ? have : left; + last = flush === Z_FINISH$3 && s.strm.avail_in === 0 && len === left ? 1 : 0; + _tr_stored_block(s, s.block_start, len, last); + s.block_start += len; + flush_pending(s.strm); + } + + /* We've done all we can with the available input and output. */ + return last ? BS_FINISH_STARTED : BS_NEED_MORE; + }; + + /* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ + const deflate_fast = (s, flush) => { + let hash_head; /* head of the hash chain */ + let bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0 /*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]); + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0 /*NIL*/ && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]); + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]); + + //#if MIN_MATCH != 3 + // Call UPDATE_HASH() MIN_MATCH-3 more times + //#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = _tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH$3) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.sym_next) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; + }; + + /* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ + const deflate_slow = (s, flush) => { + let hash_head; /* head of hash chain */ + let bflush; /* set if current block must be flushed */ + + let max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0 /*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]); + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + if (hash_head !== 0 /*NIL*/ && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD /*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096 /*TOO_FAR*/)) { + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]); + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = _tr_tally(s, 0, s.window[s.strstart - 1]); + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = _tr_tally(s, 0, s.window[s.strstart - 1]); + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH$3) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.sym_next) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; + }; + + /* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ + const deflate_rle = (s, flush) => { + let bflush; /* set if current block must be flushed */ + let prev; /* byte at distance one to match */ + let scan, strend; /* scan goes up to strend for length of run */ + + const _win = s.window; + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$2) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = _tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH$3) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.sym_next) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; + }; + + /* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ + const deflate_huff = (s, flush) => { + let bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH$2) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = _tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH$3) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.sym_next) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; + }; + + /* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ + function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; + } + const configuration_table = [/* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */]; + + /* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ + const lm_init = s => { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; + }; + function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED$2; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2); + this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2); + this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new Uint16Array(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.sym_buf = 0; /* buffer for distances and literals/lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.sym_next = 0; /* running index in sym_buf */ + this.sym_end = 0; /* symbol table full when sym_next reaches this */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ + } + + /* ========================================================================= + * Check for a valid deflate stream state. Return 0 if ok, 1 if not. + */ + const deflateStateCheck = strm => { + if (!strm) { + return 1; + } + const s = strm.state; + if (!s || s.strm !== strm || s.status !== INIT_STATE && + //#ifdef GZIP + s.status !== GZIP_STATE && + //#endif + s.status !== EXTRA_STATE && s.status !== NAME_STATE && s.status !== COMMENT_STATE && s.status !== HCRC_STATE && s.status !== BUSY_STATE && s.status !== FINISH_STATE) { + return 1; + } + return 0; + }; + const deflateResetKeep = strm => { + if (deflateStateCheck(strm)) { + return err(strm, Z_STREAM_ERROR$2); + } + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + const s = strm.state; + s.pending = 0; + s.pending_out = 0; + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = + //#ifdef GZIP + s.wrap === 2 ? GZIP_STATE : + //#endif + s.wrap ? INIT_STATE : BUSY_STATE; + strm.adler = s.wrap === 2 ? 0 // crc32(0, Z_NULL, 0) + : 1; // adler32(0, Z_NULL, 0) + s.last_flush = -2; + _tr_init(s); + return Z_OK$3; + }; + const deflateReset = strm => { + const ret = deflateResetKeep(strm); + if (ret === Z_OK$3) { + lm_init(strm.state); + } + return ret; + }; + const deflateSetHeader = (strm, head) => { + if (deflateStateCheck(strm) || strm.state.wrap !== 2) { + return Z_STREAM_ERROR$2; + } + strm.state.gzhead = head; + return Z_OK$3; + }; + const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => { + if (!strm) { + // === Z_NULL + return Z_STREAM_ERROR$2; + } + let wrap = 1; + if (level === Z_DEFAULT_COMPRESSION$1) { + level = 6; + } + if (windowBits < 0) { + /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$2 || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED || windowBits === 8 && wrap !== 1) { + return err(strm, Z_STREAM_ERROR$2); + } + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + const s = new DeflateState(); + strm.state = s; + s.strm = strm; + s.status = INIT_STATE; /* to pass state test in deflateReset() */ + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + s.window = new Uint8Array(s.w_size * 2); + s.head = new Uint16Array(s.hash_size); + s.prev = new Uint16Array(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << memLevel + 6; /* 16K elements by default */ + + /* We overlay pending_buf and sym_buf. This works since the average size + * for length/distance pairs over any compressed block is assured to be 31 + * bits or less. + * + * Analysis: The longest fixed codes are a length code of 8 bits plus 5 + * extra bits, for lengths 131 to 257. The longest fixed distance codes are + * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest + * possible fixed-codes length/distance pair is then 31 bits total. + * + * sym_buf starts one-fourth of the way into pending_buf. So there are + * three bytes in sym_buf for every four bytes in pending_buf. Each symbol + * in sym_buf is three bytes -- two for the distance and one for the + * literal/length. As each symbol is consumed, the pointer to the next + * sym_buf value to read moves forward three bytes. From that symbol, up to + * 31 bits are written to pending_buf. The closest the written pending_buf + * bits gets to the next sym_buf symbol to read is just before the last + * code is written. At that time, 31*(n-2) bits have been written, just + * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at + * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1 + * symbols are written.) The closest the writing gets to what is unread is + * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and + * can range from 128 to 32768. + * + * Therefore, at a minimum, there are 142 bits of space between what is + * written and what is read in the overlain buffers, so the symbols cannot + * be overwritten by the compressed data. That space is actually 139 bits, + * due to the three-bit fixed-code block header. + * + * That covers the case where either Z_FIXED is specified, forcing fixed + * codes, or when the use of fixed codes is chosen, because that choice + * results in a smaller compressed block than dynamic codes. That latter + * condition then assures that the above analysis also covers all dynamic + * blocks. A dynamic-code block will only be chosen to be emitted if it has + * fewer bits than a fixed-code block would for the same set of symbols. + * Therefore its average symbol length is assured to be less than 31. So + * the compressed data for a dynamic block also cannot overwrite the + * symbols from which it is being constructed. + */ + + s.pending_buf_size = s.lit_bufsize * 4; + s.pending_buf = new Uint8Array(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->sym_buf = s->pending_buf + s->lit_bufsize; + s.sym_buf = s.lit_bufsize; + + //s->sym_end = (s->lit_bufsize - 1) * 3; + s.sym_end = (s.lit_bufsize - 1) * 3; + /* We avoid equality with lit_bufsize*3 because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ + + s.level = level; + s.strategy = strategy; + s.method = method; + return deflateReset(strm); + }; + const deflateInit = (strm, level) => { + return deflateInit2(strm, level, Z_DEFLATED$2, MAX_WBITS$1, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY$1); + }; + + /* ========================================================================= */ + const deflate$2 = (strm, flush) => { + if (deflateStateCheck(strm) || flush > Z_BLOCK$1 || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR$2) : Z_STREAM_ERROR$2; + } + const s = strm.state; + if (!strm.output || strm.avail_in !== 0 && !strm.input || s.status === FINISH_STATE && flush !== Z_FINISH$3) { + return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2); + } + const old_flush = s.last_flush; + s.last_flush = flush; + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK$3; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH$3) { + return err(strm, Z_BUF_ERROR$1); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR$1); + } + + /* Write the header */ + if (s.status === INIT_STATE && s.wrap === 0) { + s.status = BUSY_STATE; + } + if (s.status === INIT_STATE) { + /* zlib header */ + let header = Z_DEFLATED$2 + (s.w_bits - 8 << 4) << 8; + let level_flags = -1; + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= level_flags << 6; + if (s.strstart !== 0) { + header |= PRESET_DICT; + } + header += 31 - header % 31; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + } + //#ifdef GZIP + if (s.status === GZIP_STATE) { + /* gzip header */ + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { + // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + } else { + put_byte(s, (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16)); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, s.gzhead.time >> 8 & 0xff); + put_byte(s, s.gzhead.time >> 16 & 0xff); + put_byte(s, s.gzhead.time >> 24 & 0xff); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, s.gzhead.extra.length >> 8 & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra /* != Z_NULL*/) { + let beg = s.pending; /* start of bytes to update crc */ + let left = (s.gzhead.extra.length & 0xffff) - s.gzindex; + while (s.pending + left > s.pending_buf_size) { + let copy = s.pending_buf_size - s.pending; + // zmemcpy(s.pending_buf + s.pending, + // s.gzhead.extra + s.gzindex, copy); + s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending); + s.pending = s.pending_buf_size; + //--- HCRC_UPDATE(beg) ---// + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg); + } + //---// + s.gzindex += copy; + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + beg = 0; + left -= copy; + } + // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility + // TypedArray.slice and TypedArray.from don't exist in IE10-IE11 + let gzhead_extra = new Uint8Array(s.gzhead.extra); + // zmemcpy(s->pending_buf + s->pending, + // s->gzhead->extra + s->gzindex, left); + s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending); + s.pending += left; + //--- HCRC_UPDATE(beg) ---// + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg); + } + //---// + s.gzindex = 0; + } + s.status = NAME_STATE; + } + if (s.status === NAME_STATE) { + if (s.gzhead.name /* != Z_NULL*/) { + let beg = s.pending; /* start of bytes to update crc */ + let val; + do { + if (s.pending === s.pending_buf_size) { + //--- HCRC_UPDATE(beg) ---// + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg); + } + //---// + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + beg = 0; + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + //--- HCRC_UPDATE(beg) ---// + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg); + } + //---// + s.gzindex = 0; + } + s.status = COMMENT_STATE; + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment /* != Z_NULL*/) { + let beg = s.pending; /* start of bytes to update crc */ + let val; + do { + if (s.pending === s.pending_buf_size) { + //--- HCRC_UPDATE(beg) ---// + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg); + } + //---// + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + beg = 0; + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + //--- HCRC_UPDATE(beg) ---// + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg); + } + //---// + } + s.status = HCRC_STATE; + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + } + put_byte(s, strm.adler & 0xff); + put_byte(s, strm.adler >> 8 & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + } + s.status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s.pending !== 0) { + s.last_flush = -1; + return Z_OK$3; + } + } + //#endif + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH$2 && s.status !== FINISH_STATE) { + let bstate = s.level === 0 ? deflate_stored(s, flush) : s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : s.strategy === Z_RLE ? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush); + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK$3; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + _tr_align(s); + } else if (flush !== Z_BLOCK$1) { + /* FULL_FLUSH or SYNC_FLUSH */ + + _tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH$1) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK$3; + } + } + } + if (flush !== Z_FINISH$3) { + return Z_OK$3; + } + if (s.wrap <= 0) { + return Z_STREAM_END$3; + } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, strm.adler >> 8 & 0xff); + put_byte(s, strm.adler >> 16 & 0xff); + put_byte(s, strm.adler >> 24 & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, strm.total_in >> 8 & 0xff); + put_byte(s, strm.total_in >> 16 & 0xff); + put_byte(s, strm.total_in >> 24 & 0xff); + } else { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { + s.wrap = -s.wrap; + } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK$3 : Z_STREAM_END$3; + }; + const deflateEnd = strm => { + if (deflateStateCheck(strm)) { + return Z_STREAM_ERROR$2; + } + const status = strm.state.status; + strm.state = null; + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR$2) : Z_OK$3; + }; + + /* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ + const deflateSetDictionary = (strm, dictionary) => { + let dictLength = dictionary.length; + if (deflateStateCheck(strm)) { + return Z_STREAM_ERROR$2; + } + const s = strm.state; + const wrap = s.wrap; + if (wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead) { + return Z_STREAM_ERROR$2; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0); + } + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { + /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + let tmpDict = new Uint8Array(s.w_size); + tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + const avail = strm.avail_in; + const next = strm.next_in; + const input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + let str = s.strstart; + let n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]); + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK$3; + }; + var deflateInit_1 = deflateInit; + var deflateInit2_1 = deflateInit2; + var deflateReset_1 = deflateReset; + var deflateResetKeep_1 = deflateResetKeep; + var deflateSetHeader_1 = deflateSetHeader; + var deflate_2$1 = deflate$2; + var deflateEnd_1 = deflateEnd; + var deflateSetDictionary_1 = deflateSetDictionary; + var deflateInfo = 'pako deflate (from Nodeca project)'; + + /* Not implemented + module.exports.deflateBound = deflateBound; + module.exports.deflateCopy = deflateCopy; + module.exports.deflateGetDictionary = deflateGetDictionary; + module.exports.deflateParams = deflateParams; + module.exports.deflatePending = deflatePending; + module.exports.deflatePrime = deflatePrime; + module.exports.deflateTune = deflateTune; + */ + + var deflate_1$2 = { + deflateInit: deflateInit_1, + deflateInit2: deflateInit2_1, + deflateReset: deflateReset_1, + deflateResetKeep: deflateResetKeep_1, + deflateSetHeader: deflateSetHeader_1, + deflate: deflate_2$1, + deflateEnd: deflateEnd_1, + deflateSetDictionary: deflateSetDictionary_1, + deflateInfo: deflateInfo + }; + const _has = (obj, key) => { + return Object.prototype.hasOwnProperty.call(obj, key); + }; + var assign = function (obj /*from1, from2, from3, ...*/) { + const sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + const source = sources.shift(); + if (!source) { + continue; + } + if (typeof source !== 'object') { + throw new TypeError(source + 'must be non-object'); + } + for (const p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + return obj; + }; + + // Join array of chunks to single array. + var flattenChunks = chunks => { + // calculate data length + let len = 0; + for (let i = 0, l = chunks.length; i < l; i++) { + len += chunks[i].length; + } + + // join chunks + const result = new Uint8Array(len); + for (let i = 0, pos = 0, l = chunks.length; i < l; i++) { + let chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + return result; + }; + var common = { + assign: assign, + flattenChunks: flattenChunks + }; + + // String encode/decode helpers + + // Quick check if we can use fast array to bin string conversion + // + // - apply(Array) can fail on Android 2.2 + // - apply(Uint8Array) can fail on iOS 5.1 Safari + // + let STR_APPLY_UIA_OK = true; + try { + String.fromCharCode.apply(null, new Uint8Array(1)); + } catch (__) { + STR_APPLY_UIA_OK = false; + } + + // Table with utf8 lengths (calculated by first byte of sequence) + // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, + // because max possible codepoint is 0x10ffff + const _utf8len = new Uint8Array(256); + for (let q = 0; q < 256; q++) { + _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1; + } + _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start + + // convert string to array (typed, when possible) + var string2buf = str => { + if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) { + return new TextEncoder().encode(str); + } + let buf, + c, + c2, + m_pos, + i, + str_len = str.length, + buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + (c - 0xd800 << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + buf = new Uint8Array(buf_len); + + // convert + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + (c - 0xd800 << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | c >>> 6; + buf[i++] = 0x80 | c & 0x3f; + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | c >>> 12; + buf[i++] = 0x80 | c >>> 6 & 0x3f; + buf[i++] = 0x80 | c & 0x3f; + } else { + /* four bytes */ + buf[i++] = 0xf0 | c >>> 18; + buf[i++] = 0x80 | c >>> 12 & 0x3f; + buf[i++] = 0x80 | c >>> 6 & 0x3f; + buf[i++] = 0x80 | c & 0x3f; + } + } + return buf; + }; + + // Helper + const buf2binstring = (buf, len) => { + // On Chrome, the arguments in a function call that are allowed is `65534`. + // If the length of the buffer is smaller than that, we can use this optimization, + // otherwise we will take a slower path. + if (len < 65534) { + if (buf.subarray && STR_APPLY_UIA_OK) { + return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len)); + } + } + let result = ''; + for (let i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; + }; + + // convert array to string + var buf2string = (buf, max) => { + const len = max || buf.length; + if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) { + return new TextDecoder().decode(buf.subarray(0, max)); + } + let i, out; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + const utf16buf = new Array(len * 2); + for (out = 0, i = 0; i < len;) { + let c = buf[i++]; + // quick process ascii + if (c < 0x80) { + utf16buf[out++] = c; + continue; + } + let c_len = _utf8len[c]; + // skip 5 & 6 byte codes + if (c_len > 4) { + utf16buf[out++] = 0xfffd; + i += c_len - 1; + continue; + } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = c << 6 | buf[i++] & 0x3f; + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { + utf16buf[out++] = 0xfffd; + continue; + } + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | c >> 10 & 0x3ff; + utf16buf[out++] = 0xdc00 | c & 0x3ff; + } + } + return buf2binstring(utf16buf, out); + }; + + // Calculate max possible position in utf8 buffer, + // that will not break sequence. If that's not possible + // - (very small limits) return max size as is. + // + // buf[] - utf8 bytes array + // max - length limit (mandatory); + var utf8border = (buf, max) => { + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + + // go back from last position, until start of sequence found + let pos = max - 1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { + pos--; + } + + // Very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { + return max; + } + + // If we came to start of buffer - that means buffer is too small, + // return max too. + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + var strings = { + string2buf: string2buf, + buf2string: buf2string, + utf8border: utf8border + }; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = '' /*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2 /*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; + } + var zstream = ZStream; + const toString$1 = Object.prototype.toString; + + /* Public constants ==========================================================*/ + /* ===========================================================================*/ + + const { + Z_NO_FLUSH: Z_NO_FLUSH$1, + Z_SYNC_FLUSH, + Z_FULL_FLUSH, + Z_FINISH: Z_FINISH$2, + Z_OK: Z_OK$2, + Z_STREAM_END: Z_STREAM_END$2, + Z_DEFAULT_COMPRESSION, + Z_DEFAULT_STRATEGY, + Z_DEFLATED: Z_DEFLATED$1 + } = constants$2; + + /* ===========================================================================*/ + + /** + * class Deflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[deflate]], + * [[deflateRaw]] and [[gzip]]. + **/ + + /* internal + * Deflate.chunks -> Array + * + * Chunks of output data, if [[Deflate#onData]] not overridden. + **/ + + /** + * Deflate.result -> Uint8Array + * + * Compressed result, generated by default [[Deflate#onData]] + * and [[Deflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Deflate#push]] with `Z_FINISH` / `true` param). + **/ + + /** + * Deflate.err -> Number + * + * Error code after deflate finished. 0 (Z_OK) on success. + * You will not need it in real life, because deflate errors + * are possible only on wrong options or bad `onData` / `onEnd` + * custom handlers. + **/ + + /** + * Deflate.msg -> String + * + * Error message, if [[Deflate.err]] != 0 + **/ + + /** + * new Deflate(options) + * - options (Object): zlib deflate options. + * + * Creates new deflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `level` + * - `windowBits` + * - `memLevel` + * - `strategy` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw deflate + * - `gzip` (Boolean) - create gzip wrapper + * - `header` (Object) - custom header for gzip + * - `text` (Boolean) - true if compressed data believed to be text + * - `time` (Number) - modification time, unix timestamp + * - `os` (Number) - operation system code + * - `extra` (Array) - array of bytes with extra data (max 65536) + * - `name` (String) - file name (binary string) + * - `comment` (String) - comment (binary string) + * - `hcrc` (Boolean) - true if header crc should be added + * + * ##### Example: + * + * ```javascript + * const pako = require('pako') + * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9]) + * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * const deflate = new pako.Deflate({ level: 3}); + * + * deflate.push(chunk1, false); + * deflate.push(chunk2, true); // true -> last chunk + * + * if (deflate.err) { throw new Error(deflate.err); } + * + * console.log(deflate.result); + * ``` + **/ + function Deflate$1(options) { + this.options = common.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED$1, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY + }, options || {}); + let opt = this.options; + if (opt.raw && opt.windowBits > 0) { + opt.windowBits = -opt.windowBits; + } else if (opt.gzip && opt.windowBits > 0 && opt.windowBits < 16) { + opt.windowBits += 16; + } + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new zstream(); + this.strm.avail_out = 0; + let status = deflate_1$2.deflateInit2(this.strm, opt.level, opt.method, opt.windowBits, opt.memLevel, opt.strategy); + if (status !== Z_OK$2) { + throw new Error(messages[status]); + } + if (opt.header) { + deflate_1$2.deflateSetHeader(this.strm, opt.header); + } + if (opt.dictionary) { + let dict; + // Convert data if needed + if (typeof opt.dictionary === 'string') { + // If we need to compress text, change encoding to utf8. + dict = strings.string2buf(opt.dictionary); + } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + status = deflate_1$2.deflateSetDictionary(this.strm, dict); + if (status !== Z_OK$2) { + throw new Error(messages[status]); + } + this._dict_set = true; + } + } + + /** + * Deflate#push(data[, flush_mode]) -> Boolean + * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be + * converted to utf8 byte sequence. + * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes. + * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH. + * + * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with + * new compressed chunks. Returns `true` on success. The last data block must + * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending + * buffers and call [[Deflate#onEnd]]. + * + * On fail call [[Deflate#onEnd]] with error code and return false. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ + Deflate$1.prototype.push = function (data, flush_mode) { + const strm = this.strm; + const chunkSize = this.options.chunkSize; + let status, _flush_mode; + if (this.ended) { + return false; + } + if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;else _flush_mode = flush_mode === true ? Z_FINISH$2 : Z_NO_FLUSH$1; + + // Convert data if needed + if (typeof data === 'string') { + // If we need to compress text, change encoding to utf8. + strm.input = strings.string2buf(data); + } else if (toString$1.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + for (;;) { + if (strm.avail_out === 0) { + strm.output = new Uint8Array(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + + // Make sure avail_out > 6 to avoid repeating markers + if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) { + this.onData(strm.output.subarray(0, strm.next_out)); + strm.avail_out = 0; + continue; + } + status = deflate_1$2.deflate(strm, _flush_mode); + + // Ended => flush and finish + if (status === Z_STREAM_END$2) { + if (strm.next_out > 0) { + this.onData(strm.output.subarray(0, strm.next_out)); + } + status = deflate_1$2.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK$2; + } + + // Flush if out buffer full + if (strm.avail_out === 0) { + this.onData(strm.output); + continue; + } + + // Flush if requested and has data + if (_flush_mode > 0 && strm.next_out > 0) { + this.onData(strm.output.subarray(0, strm.next_out)); + strm.avail_out = 0; + continue; + } + if (strm.avail_in === 0) break; + } + return true; + }; + + /** + * Deflate#onData(chunk) -> Void + * - chunk (Uint8Array): output data. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ + Deflate$1.prototype.onData = function (chunk) { + this.chunks.push(chunk); + }; + + /** + * Deflate#onEnd(status) -> Void + * - status (Number): deflate status. 0 (Z_OK) on success, + * other if not. + * + * Called once after you tell deflate that the input stream is + * complete (Z_FINISH). By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ + Deflate$1.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK$2) { + this.result = common.flattenChunks(this.chunks); + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + // See state defs from inflate.js + const BAD$1 = 16209; /* got a data error -- remain here until reset */ + const TYPE$1 = 16191; /* i: waiting for type bits, including last-flag bit */ + + /* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ + var inffast = function inflate_fast(strm, start) { + let _in; /* local strm.input */ + let last; /* have enough input while in < last */ + let _out; /* local strm.output */ + let beg; /* inflate()'s initial strm.output */ + let end; /* while out < end, enough space available */ + //#ifdef INFLATE_STRICT + let dmax; /* maximum distance from zlib header */ + //#endif + let wsize; /* window size or zero if not using window */ + let whave; /* valid bytes in the window */ + let wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + let s_window; /* allocated sliding window, if wsize != 0 */ + let hold; /* local strm.hold */ + let bits; /* local strm.bits */ + let lcode; /* local strm.lencode */ + let dcode; /* local strm.distcode */ + let lmask; /* mask for first level of length codes */ + let dmask; /* mask for first level of distance codes */ + let here; /* retrieved table entry */ + let op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + let len; /* match length, unused bytes */ + let dist; /* match distance */ + let from; /* where to copy match from */ + let from_source; + let input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + const state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); + //#ifdef INFLATE_STRICT + dmax = state.dmax; + //#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: for (;;) { + // Goto emulation + op = here >>> 24 /*here.bits*/; + hold >>>= op; + bits -= op; + op = here >>> 16 & 0xff /*here.op*/; + if (op === 0) { + /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff /*here.val*/; + } else if (op & 16) { + /* length base */ + len = here & 0xffff /*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & (1 << op) - 1; + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: for (;;) { + // goto emulation + op = here >>> 24 /*here.bits*/; + hold >>>= op; + bits -= op; + op = here >>> 16 & 0xff /*here.op*/; + if (op & 16) { + /* distance base */ + dist = here & 0xffff /*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & (1 << op) - 1; + //#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD$1; + break top; + } + //#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { + /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD$1; + break top; + } + + // (!) This block is disabled in zlib defaults, + // don't enable it for binary compatibility + //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + // if (len <= op - whave) { + // do { + // output[_out++] = 0; + // } while (--len); + // continue top; + // } + // len -= op - whave; + // do { + // output[_out++] = 0; + // } while (--op > whave); + // if (op === 0) { + // from = _out - dist; + // do { + // output[_out++] = output[from++]; + // } while (--len); + // continue top; + // } + //#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { + /* very common case */ + from += wsize - op; + if (op < len) { + /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } else if (wnext < op) { + /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { + /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { + /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } else { + /* contiguous in window */ + from += wnext - op; + if (op < len) { + /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } else { + from = _out - dist; /* copy direct from output */ + do { + /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } else if ((op & 64) === 0) { + /* 2nd level distance code */ + here = dcode[(here & 0xffff /*here.val*/) + (hold & (1 << op) - 1)]; + continue dodist; + } else { + strm.msg = 'invalid distance code'; + state.mode = BAD$1; + break top; + } + break; // need to emulate goto via "continue" + } + } else if ((op & 64) === 0) { + /* 2nd level length code */ + here = lcode[(here & 0xffff /*here.val*/) + (hold & (1 << op) - 1)]; + continue dolen; + } else if (op & 32) { + /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE$1; + break top; + } else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD$1; + break top; + } + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last); + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); + state.hold = hold; + state.bits = bits; + return; + }; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + const MAXBITS = 15; + const ENOUGH_LENS$1 = 852; + const ENOUGH_DISTS$1 = 592; + //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + + const CODES$1 = 0; + const LENS$1 = 1; + const DISTS$1 = 2; + const lbase = new Uint16Array([/* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]); + const lext = new Uint8Array([/* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]); + const dbase = new Uint16Array([/* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]); + const dext = new Uint8Array([/* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]); + const inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) => { + const bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + let len = 0; /* a code's length in bits */ + let sym = 0; /* index of code symbols */ + let min = 0, + max = 0; /* minimum and maximum code lengths */ + let root = 0; /* number of index bits for root table */ + let curr = 0; /* number of index bits for current table */ + let drop = 0; /* code bits to drop for sub-table */ + let left = 0; /* number of prefix codes available */ + let used = 0; /* code entries in table used */ + let huff = 0; /* Huffman code */ + let incr; /* for incrementing code, index */ + let fill; /* index for replicating entries */ + let low; /* low bits for current root entry */ + let mask; /* mask for low root bits */ + let next; /* next available space in table */ + let base = null; /* base value table to use */ + // let shoextra; /* extra bits table to use */ + let match; /* use base and extra for symbol >= match */ + const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + let extra = null; + let here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { + break; + } + } + if (root > max) { + root = max; + } + if (max === 0) { + /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { + break; + } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES$1 || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES$1) { + base = extra = work; /* dummy value--not used */ + match = 20; + } else if (type === LENS$1) { + base = lbase; + extra = lext; + match = 257; + } else { + /* DISTS */ + base = dbase; + extra = dext; + match = 0; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if (type === LENS$1 && used > ENOUGH_LENS$1 || type === DISTS$1 && used > ENOUGH_DISTS$1) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] + 1 < match) { + here_op = 0; + here_val = work[sym]; + } else if (work[sym] >= match) { + here_op = extra[work[sym] - match]; + here_val = base[work[sym] - match]; + } else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << len - drop; + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << len - 1; + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { + break; + } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { + break; + } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if (type === LENS$1 && used > ENOUGH_LENS$1 || type === DISTS$1 && used > ENOUGH_DISTS$1) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = root << 24 | curr << 16 | next - table_index | 0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = len - drop << 24 | 64 << 16 | 0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; + }; + var inftrees = inflate_table; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + const CODES = 0; + const LENS = 1; + const DISTS = 2; + + /* Public constants ==========================================================*/ + /* ===========================================================================*/ + + const { + Z_FINISH: Z_FINISH$1, + Z_BLOCK, + Z_TREES, + Z_OK: Z_OK$1, + Z_STREAM_END: Z_STREAM_END$1, + Z_NEED_DICT: Z_NEED_DICT$1, + Z_STREAM_ERROR: Z_STREAM_ERROR$1, + Z_DATA_ERROR: Z_DATA_ERROR$1, + Z_MEM_ERROR: Z_MEM_ERROR$1, + Z_BUF_ERROR, + Z_DEFLATED + } = constants$2; + + /* STATES ====================================================================*/ + /* ===========================================================================*/ + + const HEAD = 16180; /* i: waiting for magic header */ + const FLAGS = 16181; /* i: waiting for method and flags (gzip) */ + const TIME = 16182; /* i: waiting for modification time (gzip) */ + const OS = 16183; /* i: waiting for extra flags and operating system (gzip) */ + const EXLEN = 16184; /* i: waiting for extra length (gzip) */ + const EXTRA = 16185; /* i: waiting for extra bytes (gzip) */ + const NAME = 16186; /* i: waiting for end of file name (gzip) */ + const COMMENT = 16187; /* i: waiting for end of comment (gzip) */ + const HCRC = 16188; /* i: waiting for header crc (gzip) */ + const DICTID = 16189; /* i: waiting for dictionary check value */ + const DICT = 16190; /* waiting for inflateSetDictionary() call */ + const TYPE = 16191; /* i: waiting for type bits, including last-flag bit */ + const TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */ + const STORED = 16193; /* i: waiting for stored size (length and complement) */ + const COPY_ = 16194; /* i/o: same as COPY below, but only first time in */ + const COPY = 16195; /* i/o: waiting for input or output to copy stored block */ + const TABLE = 16196; /* i: waiting for dynamic block table lengths */ + const LENLENS = 16197; /* i: waiting for code length code lengths */ + const CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */ + const LEN_ = 16199; /* i: same as LEN below, but only first time in */ + const LEN = 16200; /* i: waiting for length/lit/eob code */ + const LENEXT = 16201; /* i: waiting for length extra bits */ + const DIST = 16202; /* i: waiting for distance code */ + const DISTEXT = 16203; /* i: waiting for distance extra bits */ + const MATCH = 16204; /* o: waiting for output space to copy string */ + const LIT = 16205; /* o: waiting for output space to write literal */ + const CHECK = 16206; /* i: waiting for 32-bit check value */ + const LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */ + const DONE = 16208; /* finished check, done -- remain here until reset */ + const BAD = 16209; /* got a data error -- remain here until reset */ + const MEM = 16210; /* got an inflate() memory error -- remain here until reset */ + const SYNC = 16211; /* looking for synchronization bytes to restart inflate() */ + + /* ===========================================================================*/ + + const ENOUGH_LENS = 852; + const ENOUGH_DISTS = 592; + //const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + + const MAX_WBITS = 15; + /* 32K LZ77 window */ + const DEF_WBITS = MAX_WBITS; + const zswap32 = q => { + return (q >>> 24 & 0xff) + (q >>> 8 & 0xff00) + ((q & 0xff00) << 8) + ((q & 0xff) << 24); + }; + function InflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib), or + -1 if raw or no header yet */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new Uint16Array(320); /* temporary storage for code lengths */ + this.work = new Uint16Array(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new Int32Array(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ + } + const inflateStateCheck = strm => { + if (!strm) { + return 1; + } + const state = strm.state; + if (!state || state.strm !== strm || state.mode < HEAD || state.mode > SYNC) { + return 1; + } + return 0; + }; + const inflateResetKeep = strm => { + if (inflateStateCheck(strm)) { + return Z_STREAM_ERROR$1; + } + const state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { + /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.flags = -1; + state.dmax = 32768; + state.head = null /*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS); + state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS); + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK$1; + }; + const inflateReset = strm => { + if (inflateStateCheck(strm)) { + return Z_STREAM_ERROR$1; + } + const state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + }; + const inflateReset2 = (strm, windowBits) => { + let wrap; + + /* get the state */ + if (inflateStateCheck(strm)) { + return Z_STREAM_ERROR$1; + } + const state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else { + wrap = (windowBits >> 4) + 5; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR$1; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); + }; + const inflateInit2 = (strm, windowBits) => { + if (!strm) { + return Z_STREAM_ERROR$1; + } + //strm.msg = Z_NULL; /* in case we return an error */ + + const state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.strm = strm; + state.window = null /*Z_NULL*/; + state.mode = HEAD; /* to pass state test in inflateReset2() */ + const ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK$1) { + strm.state = null /*Z_NULL*/; + } + return ret; + }; + const inflateInit = strm => { + return inflateInit2(strm, DEF_WBITS); + }; + + /* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ + let virgin = true; + let lenfix, distfix; // We have no pointers in JS, so keep tables separate + + const fixedtables = state => { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + lenfix = new Int32Array(512); + distfix = new Int32Array(32); + + /* literal/length table */ + let sym = 0; + while (sym < 144) { + state.lens[sym++] = 8; + } + while (sym < 256) { + state.lens[sym++] = 9; + } + while (sym < 280) { + state.lens[sym++] = 7; + } + while (sym < 288) { + state.lens[sym++] = 8; + } + inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { + bits: 9 + }); + + /* distance table */ + sym = 0; + while (sym < 32) { + state.lens[sym++] = 5; + } + inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { + bits: 5 + }); + + /* do this just once */ + virgin = false; + } + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; + }; + + /* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ + const updatewindow = (strm, src, end, copy) => { + let dist; + const state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + state.window = new Uint8Array(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + state.window.set(src.subarray(end - state.wsize, end), 0); + state.wnext = 0; + state.whave = state.wsize; + } else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + state.window.set(src.subarray(end - copy, end), 0); + state.wnext = copy; + state.whave = state.wsize; + } else { + state.wnext += dist; + if (state.wnext === state.wsize) { + state.wnext = 0; + } + if (state.whave < state.wsize) { + state.whave += dist; + } + } + } + return 0; + }; + const inflate$2 = (strm, flush) => { + let state; + let input, output; // input/output buffers + let next; /* next input INDEX */ + let put; /* next output INDEX */ + let have, left; /* available input and output */ + let hold; /* bit buffer */ + let bits; /* bits in bit buffer */ + let _in, _out; /* save starting available input and output */ + let copy; /* number of stored or match bytes to copy */ + let from; /* where to copy match bytes from */ + let from_source; + let here = 0; /* current decoding table entry */ + let here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //let last; /* parent table entry */ + let last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + let len; /* length to copy for repeats, bits to drop */ + let ret; /* return code */ + const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */ + let opts; + let n; // temporary variable for NEED_BITS + + const order = /* permutation of code lengths */ + new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); + if (inflateStateCheck(strm) || !strm.output || !strm.input && strm.avail_in !== 0) { + return Z_STREAM_ERROR$1; + } + state = strm.state; + if (state.mode === TYPE) { + state.mode = TYPEDO; + } /* skip check */ + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK$1; + inf_leave: + // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.wrap & 2 && hold === 0x8b1f) { + /* gzip header */ + if (state.wbits === 0) { + state.wbits = 15; + } + state.check = 0 /*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = hold >>> 8 & 0xff; + state.check = crc32_1(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff /*BITS(8)*/) << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f /*BITS(4)*/) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f /*BITS(4)*/) + 8; + if (state.wbits === 0) { + state.wbits = len; + } + if (len > 15 || len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + + // !!! pako patch. Force use `options.windowBits` if passed. + // Required to always use max window size by default. + state.dmax = 1 << state.wbits; + //state.dmax = 1 << len; + + state.flags = 0; /* indicate zlib header */ + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = hold >> 8 & 1; + } + if (state.flags & 0x0200 && state.wrap & 4) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = hold >>> 8 & 0xff; + state.check = crc32_1(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200 && state.wrap & 4) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = hold >>> 8 & 0xff; + hbuf[2] = hold >>> 16 & 0xff; + hbuf[3] = hold >>> 24 & 0xff; + state.check = crc32_1(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = hold & 0xff; + state.head.os = hold >> 8; + } + if (state.flags & 0x0200 && state.wrap & 4) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = hold >>> 8 & 0xff; + state.check = crc32_1(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200 && state.wrap & 4) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = hold >>> 8 & 0xff; + state.check = crc32_1(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } else if (state.head) { + state.head.extra = null /*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { + copy = have; + } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Uint8Array(state.head.extra_len); + } + state.head.extra.set(input.subarray(next, + // extra field is limited to 65536 bytes + // - no need for additional size check + next + copy), /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200 && state.wrap & 4) { + state.check = crc32_1(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { + break inf_leave; + } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && state.length < 65536 /*state.head.name_max*/) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200 && state.wrap & 4) { + state.check = crc32_1(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && state.length < 65536 /*state.head.comm_max*/) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200 && state.wrap & 4) { + state.check = crc32_1(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.wrap & 4 && hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = state.flags >> 9 & 1; + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT$1; + } + strm.adler = state.check = 1 /*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = hold & 0x01 /*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch (hold & 0x03 /*BITS(2)*/) { + case 0: + /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: + /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: + /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== (hold >>> 16 ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { + copy = have; + } + if (copy > left) { + copy = left; + } + if (copy === 0) { + break inf_leave; + } + //--- zmemcpy(put, next, copy); --- + output.set(input.subarray(next, next + copy), put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f /*BITS(5)*/) + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f /*BITS(5)*/) + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f /*BITS(4)*/) + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + //#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } + //#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = hold & 0x07; //BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + opts = { + bits: state.lenbits + }; + ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = here >>> 16 & 0xff; + here_val = here & 0xffff; + if (here_bits <= bits) { + break; + } + //--- PULLBYTE() ---// + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03); //BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07); //BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f); //BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { + break; + } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + opts = { + bits: state.lenbits + }; + ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { + bits: state.distbits + }; + ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inffast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = here >>> 16 & 0xff; + here_val = here & 0xffff; + if (here_bits <= bits) { + break; + } + //--- PULLBYTE() ---// + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1 /*BITS(last.bits + last.op)*/) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 0xff; + here_val = here & 0xffff; + if (last_bits + here_bits <= bits) { + break; + } + //--- PULLBYTE() ---// + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & (1 << state.extra) - 1 /*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & (1 << state.distbits) - 1]; /*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = here >>> 16 & 0xff; + here_val = here & 0xffff; + if (here_bits <= bits) { + break; + } + //--- PULLBYTE() ---// + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1 /*BITS(last.bits + last.op)*/) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 0xff; + here_val = here & 0xffff; + if (last_bits + here_bits <= bits) { + break; + } + //--- PULLBYTE() ---// + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = here_op & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & (1 << state.extra) - 1 /*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } + //#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { + break inf_leave; + } + copy = _out - left; + if (state.offset > copy) { + /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } + // (!) This block is disabled in zlib defaults, + // don't enable it for binary compatibility + //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + // Trace((stderr, "inflate.c too far\n")); + // copy -= state.whave; + // if (copy > state.length) { copy = state.length; } + // if (copy > left) { copy = left; } + // left -= copy; + // state.length -= copy; + // do { + // output[put++] = 0; + // } while (--copy); + // if (state.length === 0) { state.mode = LEN; } + // break; + //#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } else { + from = state.wnext - copy; + } + if (copy > state.length) { + copy = state.length; + } + from_source = state.window; + } else { + /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { + copy = left; + } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { + state.mode = LEN; + } + break; + case LIT: + if (left === 0) { + break inf_leave; + } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (state.wrap & 4 && _out) { + strm.adler = state.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/ + state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out); + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if (state.wrap & 4 && (state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.wrap & 4 && hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END$1; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR$1; + break inf_leave; + case MEM: + return Z_MEM_ERROR$1; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR$1; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH$1)) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ; + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap & 4 && _out) { + strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/ + state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if ((_in === 0 && _out === 0 || flush === Z_FINISH$1) && ret === Z_OK$1) { + ret = Z_BUF_ERROR; + } + return ret; + }; + const inflateEnd = strm => { + if (inflateStateCheck(strm)) { + return Z_STREAM_ERROR$1; + } + let state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK$1; + }; + const inflateGetHeader = (strm, head) => { + /* check state */ + if (inflateStateCheck(strm)) { + return Z_STREAM_ERROR$1; + } + const state = strm.state; + if ((state.wrap & 2) === 0) { + return Z_STREAM_ERROR$1; + } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK$1; + }; + const inflateSetDictionary = (strm, dictionary) => { + const dictLength = dictionary.length; + let state; + let dictid; + let ret; + + /* check state */ + if (inflateStateCheck(strm)) { + return Z_STREAM_ERROR$1; + } + state = strm.state; + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR$1; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32_1(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR$1; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR$1; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK$1; + }; + var inflateReset_1 = inflateReset; + var inflateReset2_1 = inflateReset2; + var inflateResetKeep_1 = inflateResetKeep; + var inflateInit_1 = inflateInit; + var inflateInit2_1 = inflateInit2; + var inflate_2$1 = inflate$2; + var inflateEnd_1 = inflateEnd; + var inflateGetHeader_1 = inflateGetHeader; + var inflateSetDictionary_1 = inflateSetDictionary; + var inflateInfo = 'pako inflate (from Nodeca project)'; + + /* Not implemented + module.exports.inflateCodesUsed = inflateCodesUsed; + module.exports.inflateCopy = inflateCopy; + module.exports.inflateGetDictionary = inflateGetDictionary; + module.exports.inflateMark = inflateMark; + module.exports.inflatePrime = inflatePrime; + module.exports.inflateSync = inflateSync; + module.exports.inflateSyncPoint = inflateSyncPoint; + module.exports.inflateUndermine = inflateUndermine; + module.exports.inflateValidate = inflateValidate; + */ + + var inflate_1$2 = { + inflateReset: inflateReset_1, + inflateReset2: inflateReset2_1, + inflateResetKeep: inflateResetKeep_1, + inflateInit: inflateInit_1, + inflateInit2: inflateInit2_1, + inflate: inflate_2$1, + inflateEnd: inflateEnd_1, + inflateGetHeader: inflateGetHeader_1, + inflateSetDictionary: inflateSetDictionary_1, + inflateInfo: inflateInfo + }; + + // (C) 1995-2013 Jean-loup Gailly and Mark Adler + // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin + // + // This software is provided 'as-is', without any express or implied + // warranty. In no event will the authors be held liable for any damages + // arising from the use of this software. + // + // Permission is granted to anyone to use this software for any purpose, + // including commercial applications, and to alter it and redistribute it + // freely, subject to the following restrictions: + // + // 1. The origin of this software must not be misrepresented; you must not + // claim that you wrote the original software. If you use this software + // in a product, an acknowledgment in the product documentation would be + // appreciated but is not required. + // 2. Altered source versions must be plainly marked as such, and must not be + // misrepresented as being the original software. + // 3. This notice may not be removed or altered from any source distribution. + + function GZheader() { + /* true if compressed data believed to be text */ + this.text = 0; + /* modification time */ + this.time = 0; + /* extra flags (not used when writing a gzip file) */ + this.xflags = 0; + /* operating system */ + this.os = 0; + /* pointer to extra field or Z_NULL if none */ + this.extra = null; + /* extra field length (valid if extra != Z_NULL) */ + this.extra_len = 0; // Actually, we don't need it in JS, + // but leave for few code modifications + + // + // Setup limits is not necessary because in js we should not preallocate memory + // for inflate use constant limit in 65536 bytes + // + + /* space at extra (only when reading header) */ + // this.extra_max = 0; + /* pointer to zero-terminated file name or Z_NULL */ + this.name = ''; + /* space at name (only when reading header) */ + // this.name_max = 0; + /* pointer to zero-terminated comment or Z_NULL */ + this.comment = ''; + /* space at comment (only when reading header) */ + // this.comm_max = 0; + /* true if there was or will be a header crc */ + this.hcrc = 0; + /* true when done reading gzip header (not used when writing a gzip file) */ + this.done = false; + } + var gzheader = GZheader; + const toString = Object.prototype.toString; + + /* Public constants ==========================================================*/ + /* ===========================================================================*/ + + const { + Z_NO_FLUSH, + Z_FINISH, + Z_OK, + Z_STREAM_END, + Z_NEED_DICT, + Z_STREAM_ERROR, + Z_DATA_ERROR, + Z_MEM_ERROR + } = constants$2; + + /* ===========================================================================*/ + + /** + * class Inflate + * + * Generic JS-style wrapper for zlib calls. If you don't need + * streaming behaviour - use more simple functions: [[inflate]] + * and [[inflateRaw]]. + **/ + + /* internal + * inflate.chunks -> Array + * + * Chunks of output data, if [[Inflate#onData]] not overridden. + **/ + + /** + * Inflate.result -> Uint8Array|String + * + * Uncompressed result, generated by default [[Inflate#onData]] + * and [[Inflate#onEnd]] handlers. Filled after you push last chunk + * (call [[Inflate#push]] with `Z_FINISH` / `true` param). + **/ + + /** + * Inflate.err -> Number + * + * Error code after inflate finished. 0 (Z_OK) on success. + * Should be checked if broken data possible. + **/ + + /** + * Inflate.msg -> String + * + * Error message, if [[Inflate.err]] != 0 + **/ + + /** + * new Inflate(options) + * - options (Object): zlib inflate options. + * + * Creates new inflator instance with specified params. Throws exception + * on bad params. Supported options: + * + * - `windowBits` + * - `dictionary` + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information on these. + * + * Additional options, for internal needs: + * + * - `chunkSize` - size of generated data chunks (16K by default) + * - `raw` (Boolean) - do raw inflate + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * By default, when no options set, autodetect deflate/gzip data format via + * wrapper header. + * + * ##### Example: + * + * ```javascript + * const pako = require('pako') + * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9]) + * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]); + * + * const inflate = new pako.Inflate({ level: 3}); + * + * inflate.push(chunk1, false); + * inflate.push(chunk2, true); // true -> last chunk + * + * if (inflate.err) { throw new Error(inflate.err); } + * + * console.log(inflate.result); + * ``` + **/ + function Inflate$1(options) { + this.options = common.assign({ + chunkSize: 1024 * 64, + windowBits: 15, + to: '' + }, options || {}); + const opt = this.options; + + // Force window size for `raw` data, if not set directly, + // because we have no header for autodetect. + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { + opt.windowBits = -15; + } + } + + // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { + opt.windowBits += 32; + } + + // Gzip header has no info about windows size, we can do autodetect only + // for deflate. So, if window size not set, force it to max when gzip possible + if (opt.windowBits > 15 && opt.windowBits < 48) { + // bit 3 (16) -> gzipped data + // bit 4 (32) -> autodetect gzip/deflate + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + this.err = 0; // error code, if happens (0 = Z_OK) + this.msg = ''; // error message + this.ended = false; // used to avoid multiple onEnd() calls + this.chunks = []; // chunks of compressed data + + this.strm = new zstream(); + this.strm.avail_out = 0; + let status = inflate_1$2.inflateInit2(this.strm, opt.windowBits); + if (status !== Z_OK) { + throw new Error(messages[status]); + } + this.header = new gzheader(); + inflate_1$2.inflateGetHeader(this.strm, this.header); + + // Setup dictionary + if (opt.dictionary) { + // Convert data if needed + if (typeof opt.dictionary === 'string') { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { + //In raw mode we need to set the dictionary early + status = inflate_1$2.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== Z_OK) { + throw new Error(messages[status]); + } + } + } + } + + /** + * Inflate#push(data[, flush_mode]) -> Boolean + * - data (Uint8Array|ArrayBuffer): input data + * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE + * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH, + * `true` means Z_FINISH. + * + * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with + * new output chunks. Returns `true` on success. If end of stream detected, + * [[Inflate#onEnd]] will be called. + * + * `flush_mode` is not needed for normal operation, because end of stream + * detected automatically. You may try to use it for advanced things, but + * this functionality was not tested. + * + * On fail call [[Inflate#onEnd]] with error code and return false. + * + * ##### Example + * + * ```javascript + * push(chunk, false); // push one of data chunks + * ... + * push(chunk, true); // push last chunk + * ``` + **/ + Inflate$1.prototype.push = function (data, flush_mode) { + const strm = this.strm; + const chunkSize = this.options.chunkSize; + const dictionary = this.options.dictionary; + let status, _flush_mode, last_avail_out; + if (this.ended) return false; + if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH; + + // Convert data if needed + if (toString.call(data) === '[object ArrayBuffer]') { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + for (;;) { + if (strm.avail_out === 0) { + strm.output = new Uint8Array(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = inflate_1$2.inflate(strm, _flush_mode); + if (status === Z_NEED_DICT && dictionary) { + status = inflate_1$2.inflateSetDictionary(strm, dictionary); + if (status === Z_OK) { + status = inflate_1$2.inflate(strm, _flush_mode); + } else if (status === Z_DATA_ERROR) { + // Replace code with more verbose + status = Z_NEED_DICT; + } + } + + // Skip snyc markers if more data follows and not raw mode + while (strm.avail_in > 0 && status === Z_STREAM_END && strm.state.wrap > 0 && data[strm.next_in] !== 0) { + inflate_1$2.inflateReset(strm); + status = inflate_1$2.inflate(strm, _flush_mode); + } + switch (status) { + case Z_STREAM_ERROR: + case Z_DATA_ERROR: + case Z_NEED_DICT: + case Z_MEM_ERROR: + this.onEnd(status); + this.ended = true; + return false; + } + + // Remember real `avail_out` value, because we may patch out buffer content + // to align utf8 strings boundaries. + last_avail_out = strm.avail_out; + if (strm.next_out) { + if (strm.avail_out === 0 || status === Z_STREAM_END) { + if (this.options.to === 'string') { + let next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + let tail = strm.next_out - next_out_utf8; + let utf8str = strings.buf2string(strm.output, next_out_utf8); + + // move tail & realign counters + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0); + this.onData(utf8str); + } else { + this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out)); + } + } + } + + // Must repeat iteration if out buffer is full + if (status === Z_OK && last_avail_out === 0) continue; + + // Finalize if end of stream reached. + if (status === Z_STREAM_END) { + status = inflate_1$2.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return true; + } + if (strm.avail_in === 0) break; + } + return true; + }; + + /** + * Inflate#onData(chunk) -> Void + * - chunk (Uint8Array|String): output data. When string output requested, + * each chunk will be string. + * + * By default, stores data blocks in `chunks[]` property and glue + * those in `onEnd`. Override this handler, if you need another behaviour. + **/ + Inflate$1.prototype.onData = function (chunk) { + this.chunks.push(chunk); + }; + + /** + * Inflate#onEnd(status) -> Void + * - status (Number): inflate status. 0 (Z_OK) on success, + * other if not. + * + * Called either after you tell inflate that the input stream is + * complete (Z_FINISH). By default - join collected chunks, + * free memory and fill `results` / `err` properties. + **/ + Inflate$1.prototype.onEnd = function (status) { + // On success - join + if (status === Z_OK) { + if (this.options.to === 'string') { + this.result = this.chunks.join(''); + } else { + this.result = common.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + + /** + * inflate(data[, options]) -> Uint8Array|String + * - data (Uint8Array|ArrayBuffer): input data to decompress. + * - options (Object): zlib inflate options. + * + * Decompress `data` with inflate/ungzip and `options`. Autodetect + * format via wrapper header by default. That's why we don't provide + * separate `ungzip` method. + * + * Supported options are: + * + * - windowBits + * + * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced) + * for more information. + * + * Sugar (options): + * + * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify + * negative windowBits implicitly. + * - `to` (String) - if equal to 'string', then result will be converted + * from utf8 to utf16 (javascript) string. When string output requested, + * chunk length can differ from `chunkSize`, depending on content. + * + * + * ##### Example: + * + * ```javascript + * const pako = require('pako'); + * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9])); + * let output; + * + * try { + * output = pako.inflate(input); + * } catch (err) { + * console.log(err); + * } + * ``` + **/ + function inflate$1(input, options) { + const inflator = new Inflate$1(options); + inflator.push(input); + + // That will never happens, if you don't cheat with options :) + if (inflator.err) throw inflator.msg || messages[inflator.err]; + return inflator.result; + } + + /** + * inflateRaw(data[, options]) -> Uint8Array|String + * - data (Uint8Array|ArrayBuffer): input data to decompress. + * - options (Object): zlib inflate options. + * + * The same as [[inflate]], but creates raw data, without wrapper + * (header and adler32 crc). + **/ + function inflateRaw$1(input, options) { + options = options || {}; + options.raw = true; + return inflate$1(input, options); + } + + /** + * ungzip(data[, options]) -> Uint8Array|String + * - data (Uint8Array|ArrayBuffer): input data to decompress. + * - options (Object): zlib inflate options. + * + * Just shortcut to [[inflate]], because it autodetects format + * by header.content. Done for convenience. + **/ + + var Inflate_1$1 = Inflate$1; + var inflate_2 = inflate$1; + var inflateRaw_1$1 = inflateRaw$1; + var ungzip$1 = inflate$1; + var constants = constants$2; + var inflate_1$1 = { + Inflate: Inflate_1$1, + inflate: inflate_2, + inflateRaw: inflateRaw_1$1, + ungzip: ungzip$1, + constants: constants + }; + const { + Inflate, + inflate, + inflateRaw, + ungzip + } = inflate_1$1; + var Inflate_1 = Inflate; + var inflate_1 = inflate; + + const crcTable = []; + for (let n = 0; n < 256; n++) { + let c = n; + for (let k = 0; k < 8; k++) { + if (c & 1) { + c = 0xedb88320 ^ c >>> 1; + } else { + c = c >>> 1; + } + } + crcTable[n] = c; + } + const initialCrc = 0xffffffff; + function updateCrc(currentCrc, data, length) { + let c = currentCrc; + for (let n = 0; n < length; n++) { + c = crcTable[(c ^ data[n]) & 0xff] ^ c >>> 8; + } + return c; + } + function crc(data, length) { + return (updateCrc(initialCrc, data, length) ^ initialCrc) >>> 0; + } + function checkCrc(buffer, crcLength, chunkName) { + const expectedCrc = buffer.readUint32(); + const actualCrc = crc(new Uint8Array(buffer.buffer, buffer.byteOffset + buffer.offset - crcLength - 4, crcLength), crcLength); // "- 4" because we already advanced by reading the CRC + if (actualCrc !== expectedCrc) { + throw new Error(`CRC mismatch for chunk ${chunkName}. Expected ${expectedCrc}, found ${actualCrc}`); + } + } + + function unfilterNone(currentLine, newLine, bytesPerLine) { + for (let i = 0; i < bytesPerLine; i++) { + newLine[i] = currentLine[i]; + } + } + function unfilterSub(currentLine, newLine, bytesPerLine, bytesPerPixel) { + let i = 0; + for (; i < bytesPerPixel; i++) { + // just copy first bytes + newLine[i] = currentLine[i]; + } + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i] + newLine[i - bytesPerPixel] & 0xff; + } + } + function unfilterUp(currentLine, newLine, prevLine, bytesPerLine) { + let i = 0; + if (prevLine.length === 0) { + // just copy bytes for first line + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i]; + } + } else { + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i] + prevLine[i] & 0xff; + } + } + } + function unfilterAverage(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel) { + let i = 0; + if (prevLine.length === 0) { + for (; i < bytesPerPixel; i++) { + newLine[i] = currentLine[i]; + } + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i] + (newLine[i - bytesPerPixel] >> 1) & 0xff; + } + } else { + for (; i < bytesPerPixel; i++) { + newLine[i] = currentLine[i] + (prevLine[i] >> 1) & 0xff; + } + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i] + (newLine[i - bytesPerPixel] + prevLine[i] >> 1) & 0xff; + } + } + } + function unfilterPaeth(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel) { + let i = 0; + if (prevLine.length === 0) { + for (; i < bytesPerPixel; i++) { + newLine[i] = currentLine[i]; + } + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i] + newLine[i - bytesPerPixel] & 0xff; + } + } else { + for (; i < bytesPerPixel; i++) { + newLine[i] = currentLine[i] + prevLine[i] & 0xff; + } + for (; i < bytesPerLine; i++) { + newLine[i] = currentLine[i] + paethPredictor$1(newLine[i - bytesPerPixel], prevLine[i], prevLine[i - bytesPerPixel]) & 0xff; + } + } + } + function paethPredictor$1(a, b, c) { + const p = a + b - c; + const pa = Math.abs(p - a); + const pb = Math.abs(p - b); + const pc = Math.abs(p - c); + if (pa <= pb && pa <= pc) return a;else if (pb <= pc) return b;else return c; + } + + /** + * Apllies filter on scanline based on the filter type. + * @param filterType - The filter type to apply. + * @param currentLine - The current line of pixel data. + * @param newLine - The new line of pixel data. + * @param prevLine - The previous line of pixel data. + * @param passLineBytes - The number of bytes in the pass line. + * @param bytesPerPixel - The number of bytes per pixel. + */ + function applyUnfilter(filterType, currentLine, newLine, prevLine, passLineBytes, bytesPerPixel) { + switch (filterType) { + case 0: + unfilterNone(currentLine, newLine, passLineBytes); + break; + case 1: + unfilterSub(currentLine, newLine, passLineBytes, bytesPerPixel); + break; + case 2: + unfilterUp(currentLine, newLine, prevLine, passLineBytes); + break; + case 3: + unfilterAverage(currentLine, newLine, prevLine, passLineBytes, bytesPerPixel); + break; + case 4: + unfilterPaeth(currentLine, newLine, prevLine, passLineBytes, bytesPerPixel); + break; + default: + throw new Error(`Unsupported filter: ${filterType}`); + } + } + + const uint16$1 = new Uint16Array([0x00ff]); + const uint8$1 = new Uint8Array(uint16$1.buffer); + const osIsLittleEndian$1 = uint8$1[0] === 0xff; + /** + * Decodes the Adam7 interlaced PNG data. + * + * @param params - DecodeInterlaceNullParams + * @returns - array of pixel data. + */ + function decodeInterlaceAdam7(params) { + const { + data, + width, + height, + channels, + depth + } = params; + // Adam7 interlacing pattern + const passes = [{ + x: 0, + y: 0, + xStep: 8, + yStep: 8 + }, + // Pass 1 + { + x: 4, + y: 0, + xStep: 8, + yStep: 8 + }, + // Pass 2 + { + x: 0, + y: 4, + xStep: 4, + yStep: 8 + }, + // Pass 3 + { + x: 2, + y: 0, + xStep: 4, + yStep: 4 + }, + // Pass 4 + { + x: 0, + y: 2, + xStep: 2, + yStep: 4 + }, + // Pass 5 + { + x: 1, + y: 0, + xStep: 2, + yStep: 2 + }, + // Pass 6 + { + x: 0, + y: 1, + xStep: 1, + yStep: 2 + } // Pass 7 + ]; + const bytesPerPixel = Math.ceil(depth / 8) * channels; + const resultData = new Uint8Array(height * width * bytesPerPixel); + let offset = 0; + // Process each pass + for (let passIndex = 0; passIndex < 7; passIndex++) { + const pass = passes[passIndex]; + // Calculate pass dimensions + const passWidth = Math.ceil((width - pass.x) / pass.xStep); + const passHeight = Math.ceil((height - pass.y) / pass.yStep); + if (passWidth <= 0 || passHeight <= 0) continue; + const passLineBytes = passWidth * bytesPerPixel; + const prevLine = new Uint8Array(passLineBytes); + // Process each scanline in this pass + for (let y = 0; y < passHeight; y++) { + // First byte is the filter type + const filterType = data[offset++]; + const currentLine = data.subarray(offset, offset + passLineBytes); + offset += passLineBytes; + // Create a new line for the unfiltered data + const newLine = new Uint8Array(passLineBytes); + // Apply the appropriate unfilter + applyUnfilter(filterType, currentLine, newLine, prevLine, passLineBytes, bytesPerPixel); + prevLine.set(newLine); + for (let x = 0; x < passWidth; x++) { + const outputX = pass.x + x * pass.xStep; + const outputY = pass.y + y * pass.yStep; + if (outputX >= width || outputY >= height) continue; + for (let i = 0; i < bytesPerPixel; i++) { + resultData[(outputY * width + outputX) * bytesPerPixel + i] = newLine[x * bytesPerPixel + i]; + } + } + } + } + if (depth === 16) { + const uint16Data = new Uint16Array(resultData.buffer); + if (osIsLittleEndian$1) { + for (let k = 0; k < uint16Data.length; k++) { + // PNG is always big endian. Swap the bytes. + uint16Data[k] = swap16$1(uint16Data[k]); + } + } + return uint16Data; + } else { + return resultData; + } + } + function swap16$1(val) { + return (val & 0xff) << 8 | val >> 8 & 0xff; + } + + const uint16 = new Uint16Array([0x00ff]); + const uint8 = new Uint8Array(uint16.buffer); + const osIsLittleEndian = uint8[0] === 0xff; + const empty = new Uint8Array(0); + function decodeInterlaceNull(params) { + const { + data, + width, + height, + channels, + depth + } = params; + const bytesPerPixel = Math.ceil(depth / 8) * channels; + const bytesPerLine = Math.ceil(depth / 8 * channels * width); + const newData = new Uint8Array(height * bytesPerLine); + let prevLine = empty; + let offset = 0; + let currentLine; + let newLine; + for (let i = 0; i < height; i++) { + currentLine = data.subarray(offset + 1, offset + 1 + bytesPerLine); + newLine = newData.subarray(i * bytesPerLine, (i + 1) * bytesPerLine); + switch (data[offset]) { + case 0: + unfilterNone(currentLine, newLine, bytesPerLine); + break; + case 1: + unfilterSub(currentLine, newLine, bytesPerLine, bytesPerPixel); + break; + case 2: + unfilterUp(currentLine, newLine, prevLine, bytesPerLine); + break; + case 3: + unfilterAverage(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel); + break; + case 4: + unfilterPaeth(currentLine, newLine, prevLine, bytesPerLine, bytesPerPixel); + break; + default: + throw new Error(`Unsupported filter: ${data[offset]}`); + } + prevLine = newLine; + offset += bytesPerLine + 1; + } + if (depth === 16) { + const uint16Data = new Uint16Array(newData.buffer); + if (osIsLittleEndian) { + for (let k = 0; k < uint16Data.length; k++) { + // PNG is always big endian. Swap the bytes. + uint16Data[k] = swap16(uint16Data[k]); + } + } + return uint16Data; + } else { + return newData; + } + } + function swap16(val) { + return (val & 0xff) << 8 | val >> 8 & 0xff; + } + + // https://www.w3.org/TR/PNG/#5PNG-file-signature + const pngSignature = Uint8Array.of(137, 80, 78, 71, 13, 10, 26, 10); + function checkSignature(buffer) { + if (!hasPngSignature(buffer.readBytes(pngSignature.length))) { + throw new Error('wrong PNG signature'); + } + } + function hasPngSignature(array) { + if (array.length < pngSignature.length) { + return false; + } + for (let i = 0; i < pngSignature.length; i++) { + if (array[i] !== pngSignature[i]) { + return false; + } + } + return true; + } + + // https://www.w3.org/TR/png/#11tEXt + const textChunkName = 'tEXt'; + const NULL = 0; + const latin1Decoder = new TextDecoder('latin1'); + function validateKeyword(keyword) { + validateLatin1(keyword); + if (keyword.length === 0 || keyword.length > 79) { + throw new Error('keyword length must be between 1 and 79'); + } + } + // eslint-disable-next-line no-control-regex + const latin1Regex = /^[\u0000-\u00FF]*$/; + function validateLatin1(text) { + if (!latin1Regex.test(text)) { + throw new Error('invalid latin1 text'); + } + } + function decodetEXt(text, buffer, length) { + const keyword = readKeyword(buffer); + text[keyword] = readLatin1(buffer, length - keyword.length - 1); + } + // https://www.w3.org/TR/png/#11keywords + function readKeyword(buffer) { + buffer.mark(); + while (buffer.readByte() !== NULL) { + /* advance */ + } + const end = buffer.offset; + buffer.reset(); + const keyword = latin1Decoder.decode(buffer.readBytes(end - buffer.offset - 1)); + // NULL + buffer.skip(1); + validateKeyword(keyword); + return keyword; + } + function readLatin1(buffer, length) { + return latin1Decoder.decode(buffer.readBytes(length)); + } + + const ColorType = { + UNKNOWN: -1, + GREYSCALE: 0, + TRUECOLOUR: 2, + INDEXED_COLOUR: 3, + GREYSCALE_ALPHA: 4, + TRUECOLOUR_ALPHA: 6 + }; + const CompressionMethod = { + UNKNOWN: -1, + DEFLATE: 0 + }; + const FilterMethod = { + UNKNOWN: -1, + ADAPTIVE: 0 + }; + const InterlaceMethod = { + UNKNOWN: -1, + NO_INTERLACE: 0, + ADAM7: 1 + }; + const DisposeOpType = { + NONE: 0, + BACKGROUND: 1, + PREVIOUS: 2 + }; + const BlendOpType = { + SOURCE: 0, + OVER: 1 + }; + + class PngDecoder extends IOBuffer { + _checkCrc; + _inflator; + _png; + _apng; + _end; + _hasPalette; + _palette; + _hasTransparency; + _transparency; + _compressionMethod; + _filterMethod; + _interlaceMethod; + _colorType; + _isAnimated; + _numberOfFrames; + _numberOfPlays; + _frames; + _writingDataChunks; + constructor(data, options = {}) { + super(data); + const { + checkCrc = false + } = options; + this._checkCrc = checkCrc; + this._inflator = new Inflate_1(); + this._png = { + width: -1, + height: -1, + channels: -1, + data: new Uint8Array(0), + depth: 1, + text: {} + }; + this._apng = { + width: -1, + height: -1, + channels: -1, + depth: 1, + numberOfFrames: 1, + numberOfPlays: 0, + text: {}, + frames: [] + }; + this._end = false; + this._hasPalette = false; + this._palette = []; + this._hasTransparency = false; + this._transparency = new Uint16Array(0); + this._compressionMethod = CompressionMethod.UNKNOWN; + this._filterMethod = FilterMethod.UNKNOWN; + this._interlaceMethod = InterlaceMethod.UNKNOWN; + this._colorType = ColorType.UNKNOWN; + this._isAnimated = false; + this._numberOfFrames = 1; + this._numberOfPlays = 0; + this._frames = []; + this._writingDataChunks = false; + // PNG is always big endian + // https://www.w3.org/TR/PNG/#7Integers-and-byte-order + this.setBigEndian(); + } + decode() { + checkSignature(this); + while (!this._end) { + const length = this.readUint32(); + const type = this.readChars(4); + this.decodeChunk(length, type); + } + this.decodeImage(); + return this._png; + } + decodeApng() { + checkSignature(this); + while (!this._end) { + const length = this.readUint32(); + const type = this.readChars(4); + this.decodeApngChunk(length, type); + } + this.decodeApngImage(); + return this._apng; + } + // https://www.w3.org/TR/PNG/#5Chunk-layout + decodeChunk(length, type) { + const offset = this.offset; + switch (type) { + // 11.2 Critical chunks + case 'IHDR': + // 11.2.2 IHDR Image header + this.decodeIHDR(); + break; + case 'PLTE': + // 11.2.3 PLTE Palette + this.decodePLTE(length); + break; + case 'IDAT': + // 11.2.4 IDAT Image data + this.decodeIDAT(length); + break; + case 'IEND': + // 11.2.5 IEND Image trailer + this._end = true; + break; + // 11.3 Ancillary chunks + case 'tRNS': + // 11.3.2.1 tRNS Transparency + this.decodetRNS(length); + break; + case 'iCCP': + // 11.3.3.3 iCCP Embedded ICC profile + this.decodeiCCP(length); + break; + case textChunkName: + // 11.3.4.3 tEXt Textual data + decodetEXt(this._png.text, this, length); + break; + case 'pHYs': + // 11.3.5.3 pHYs Physical pixel dimensions + this.decodepHYs(); + break; + default: + this.skip(length); + break; + } + if (this.offset - offset !== length) { + throw new Error(`Length mismatch while decoding chunk ${type}`); + } + if (this._checkCrc) { + checkCrc(this, length + 4, type); + } else { + this.skip(4); + } + } + decodeApngChunk(length, type) { + const offset = this.offset; + if (type !== 'fdAT' && type !== 'IDAT' && this._writingDataChunks) { + this.pushDataToFrame(); + } + switch (type) { + case 'acTL': + this.decodeACTL(); + break; + case 'fcTL': + this.decodeFCTL(); + break; + case 'fdAT': + this.decodeFDAT(length); + break; + default: + this.decodeChunk(length, type); + this.offset = offset + length; + break; + } + if (this.offset - offset !== length) { + throw new Error(`Length mismatch while decoding chunk ${type}`); + } + if (this._checkCrc) { + checkCrc(this, length + 4, type); + } else { + this.skip(4); + } + } + // https://www.w3.org/TR/PNG/#11IHDR + decodeIHDR() { + const image = this._png; + image.width = this.readUint32(); + image.height = this.readUint32(); + image.depth = checkBitDepth(this.readUint8()); + const colorType = this.readUint8(); + this._colorType = colorType; + let channels; + switch (colorType) { + case ColorType.GREYSCALE: + channels = 1; + break; + case ColorType.TRUECOLOUR: + channels = 3; + break; + case ColorType.INDEXED_COLOUR: + channels = 1; + break; + case ColorType.GREYSCALE_ALPHA: + channels = 2; + break; + case ColorType.TRUECOLOUR_ALPHA: + channels = 4; + break; + // Kept for exhaustiveness. + // eslint-disable-next-line unicorn/no-useless-switch-case + case ColorType.UNKNOWN: + default: + throw new Error(`Unknown color type: ${colorType}`); + } + this._png.channels = channels; + this._compressionMethod = this.readUint8(); + if (this._compressionMethod !== CompressionMethod.DEFLATE) { + throw new Error(`Unsupported compression method: ${this._compressionMethod}`); + } + this._filterMethod = this.readUint8(); + this._interlaceMethod = this.readUint8(); + } + decodeACTL() { + this._numberOfFrames = this.readUint32(); + this._numberOfPlays = this.readUint32(); + this._isAnimated = true; + } + decodeFCTL() { + const image = { + sequenceNumber: this.readUint32(), + width: this.readUint32(), + height: this.readUint32(), + xOffset: this.readUint32(), + yOffset: this.readUint32(), + delayNumber: this.readUint16(), + delayDenominator: this.readUint16(), + disposeOp: this.readUint8(), + blendOp: this.readUint8(), + data: new Uint8Array(0) + }; + this._frames.push(image); + } + // https://www.w3.org/TR/PNG/#11PLTE + decodePLTE(length) { + if (length % 3 !== 0) { + throw new RangeError(`PLTE field length must be a multiple of 3. Got ${length}`); + } + const l = length / 3; + this._hasPalette = true; + const palette = []; + this._palette = palette; + for (let i = 0; i < l; i++) { + palette.push([this.readUint8(), this.readUint8(), this.readUint8()]); + } + } + // https://www.w3.org/TR/PNG/#11IDAT + decodeIDAT(length) { + this._writingDataChunks = true; + const dataLength = length; + const dataOffset = this.offset + this.byteOffset; + this._inflator.push(new Uint8Array(this.buffer, dataOffset, dataLength)); + if (this._inflator.err) { + throw new Error(`Error while decompressing the data: ${this._inflator.err}`); + } + this.skip(length); + } + decodeFDAT(length) { + this._writingDataChunks = true; + let dataLength = length; + let dataOffset = this.offset + this.byteOffset; + dataOffset += 4; + dataLength -= 4; + this._inflator.push(new Uint8Array(this.buffer, dataOffset, dataLength)); + if (this._inflator.err) { + throw new Error(`Error while decompressing the data: ${this._inflator.err}`); + } + this.skip(length); + } + // https://www.w3.org/TR/PNG/#11tRNS + decodetRNS(length) { + switch (this._colorType) { + case ColorType.GREYSCALE: + case ColorType.TRUECOLOUR: + { + if (length % 2 !== 0) { + throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${length}`); + } + if (length / 2 > this._png.width * this._png.height) { + throw new Error(`tRNS chunk contains more alpha values than there are pixels (${length / 2} vs ${this._png.width * this._png.height})`); + } + this._hasTransparency = true; + this._transparency = new Uint16Array(length / 2); + for (let i = 0; i < length / 2; i++) { + this._transparency[i] = this.readUint16(); + } + break; + } + case ColorType.INDEXED_COLOUR: + { + if (length > this._palette.length) { + throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${length} vs ${this._palette.length})`); + } + let i = 0; + for (; i < length; i++) { + const alpha = this.readByte(); + this._palette[i].push(alpha); + } + for (; i < this._palette.length; i++) { + this._palette[i].push(255); + } + break; + } + // Kept for exhaustiveness. + /* eslint-disable unicorn/no-useless-switch-case */ + case ColorType.UNKNOWN: + case ColorType.GREYSCALE_ALPHA: + case ColorType.TRUECOLOUR_ALPHA: + default: + { + throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`); + } + /* eslint-enable unicorn/no-useless-switch-case */ + } + } + // https://www.w3.org/TR/PNG/#11iCCP + decodeiCCP(length) { + const name = readKeyword(this); + const compressionMethod = this.readUint8(); + if (compressionMethod !== CompressionMethod.DEFLATE) { + throw new Error(`Unsupported iCCP compression method: ${compressionMethod}`); + } + const compressedProfile = this.readBytes(length - name.length - 2); + this._png.iccEmbeddedProfile = { + name, + profile: inflate_1(compressedProfile) + }; + } + // https://www.w3.org/TR/PNG/#11pHYs + decodepHYs() { + const ppuX = this.readUint32(); + const ppuY = this.readUint32(); + const unitSpecifier = this.readByte(); + this._png.resolution = { + x: ppuX, + y: ppuY, + unit: unitSpecifier + }; + } + decodeApngImage() { + this._apng.width = this._png.width; + this._apng.height = this._png.height; + this._apng.channels = this._png.channels; + this._apng.depth = this._png.depth; + this._apng.numberOfFrames = this._numberOfFrames; + this._apng.numberOfPlays = this._numberOfPlays; + this._apng.text = this._png.text; + this._apng.resolution = this._png.resolution; + for (let i = 0; i < this._numberOfFrames; i++) { + const newFrame = { + sequenceNumber: this._frames[i].sequenceNumber, + delayNumber: this._frames[i].delayNumber, + delayDenominator: this._frames[i].delayDenominator, + data: this._apng.depth === 8 ? new Uint8Array(this._apng.width * this._apng.height * this._apng.channels) : new Uint16Array(this._apng.width * this._apng.height * this._apng.channels) + }; + const frame = this._frames.at(i); + if (frame) { + frame.data = decodeInterlaceNull({ + data: frame.data, + width: frame.width, + height: frame.height, + channels: this._apng.channels, + depth: this._apng.depth + }); + if (this._hasPalette) { + this._apng.palette = this._palette; + } + if (this._hasTransparency) { + this._apng.transparency = this._transparency; + } + if (i === 0 || frame.xOffset === 0 && frame.yOffset === 0 && frame.width === this._png.width && frame.height === this._png.height) { + newFrame.data = frame.data; + } else { + const prevFrame = this._apng.frames.at(i - 1); + this.disposeFrame(frame, prevFrame, newFrame); + this.addFrameDataToCanvas(newFrame, frame); + } + this._apng.frames.push(newFrame); + } + } + return this._apng; + } + disposeFrame(frame, prevFrame, imageFrame) { + switch (frame.disposeOp) { + case DisposeOpType.NONE: + break; + case DisposeOpType.BACKGROUND: + for (let row = 0; row < this._png.height; row++) { + for (let col = 0; col < this._png.width; col++) { + const index = (row * frame.width + col) * this._png.channels; + for (let channel = 0; channel < this._png.channels; channel++) { + imageFrame.data[index + channel] = 0; + } + } + } + break; + case DisposeOpType.PREVIOUS: + imageFrame.data.set(prevFrame.data); + break; + default: + throw new Error('Unknown disposeOp'); + } + } + addFrameDataToCanvas(imageFrame, frame) { + const maxValue = 1 << this._png.depth; + const calculatePixelIndices = (row, col) => { + const index = ((row + frame.yOffset) * this._png.width + frame.xOffset + col) * this._png.channels; + const frameIndex = (row * frame.width + col) * this._png.channels; + return { + index, + frameIndex + }; + }; + switch (frame.blendOp) { + case BlendOpType.SOURCE: + for (let row = 0; row < frame.height; row++) { + for (let col = 0; col < frame.width; col++) { + const { + index, + frameIndex + } = calculatePixelIndices(row, col); + for (let channel = 0; channel < this._png.channels; channel++) { + imageFrame.data[index + channel] = frame.data[frameIndex + channel]; + } + } + } + break; + // https://www.w3.org/TR/png-3/#13Alpha-channel-processing + case BlendOpType.OVER: + for (let row = 0; row < frame.height; row++) { + for (let col = 0; col < frame.width; col++) { + const { + index, + frameIndex + } = calculatePixelIndices(row, col); + for (let channel = 0; channel < this._png.channels; channel++) { + const sourceAlpha = frame.data[frameIndex + this._png.channels - 1] / maxValue; + const foregroundValue = channel % (this._png.channels - 1) === 0 ? 1 : frame.data[frameIndex + channel]; + const value = Math.floor(sourceAlpha * foregroundValue + (1 - sourceAlpha) * imageFrame.data[index + channel]); + imageFrame.data[index + channel] += value; + } + } + } + break; + default: + throw new Error('Unknown blendOp'); + } + } + decodeImage() { + if (this._inflator.err) { + throw new Error(`Error while decompressing the data: ${this._inflator.err}`); + } + const data = this._isAnimated ? (this._frames?.at(0)).data : this._inflator.result; + if (this._filterMethod !== FilterMethod.ADAPTIVE) { + throw new Error(`Filter method ${this._filterMethod} not supported`); + } + if (this._interlaceMethod === InterlaceMethod.NO_INTERLACE) { + this._png.data = decodeInterlaceNull({ + data: data, + width: this._png.width, + height: this._png.height, + channels: this._png.channels, + depth: this._png.depth + }); + } else if (this._interlaceMethod === InterlaceMethod.ADAM7) { + this._png.data = decodeInterlaceAdam7({ + data: data, + width: this._png.width, + height: this._png.height, + channels: this._png.channels, + depth: this._png.depth + }); + } else { + throw new Error(`Interlace method ${this._interlaceMethod} not supported`); + } + if (this._hasPalette) { + this._png.palette = this._palette; + } + if (this._hasTransparency) { + this._png.transparency = this._transparency; + } + } + pushDataToFrame() { + const result = this._inflator.result; + const lastFrame = this._frames.at(-1); + if (lastFrame) { + lastFrame.data = result; + } else { + this._frames.push({ + sequenceNumber: 0, + width: this._png.width, + height: this._png.height, + xOffset: 0, + yOffset: 0, + delayNumber: 0, + delayDenominator: 0, + disposeOp: DisposeOpType.NONE, + blendOp: BlendOpType.SOURCE, + data: result + }); + } + this._inflator = new Inflate_1(); + this._writingDataChunks = false; + } + } + function checkBitDepth(value) { + if (value !== 1 && value !== 2 && value !== 4 && value !== 8 && value !== 16) { + throw new Error(`invalid bit depth: ${value}`); + } + return value; + } + + var ResolutionUnitSpecifier; + (function (ResolutionUnitSpecifier) { + /** + * Unit is unknown + */ + ResolutionUnitSpecifier[ResolutionUnitSpecifier["UNKNOWN"] = 0] = "UNKNOWN"; + /** + * Unit is the metre + */ + ResolutionUnitSpecifier[ResolutionUnitSpecifier["METRE"] = 1] = "METRE"; + })(ResolutionUnitSpecifier || (ResolutionUnitSpecifier = {})); + + function decodePng(data, options) { + const decoder = new PngDecoder(data, options); + return decoder.decode(); + } + + /* + * @see http://www.w3.org/TR/PNG-Chunks.html + * + Color Allowed Interpretation + Type Bit Depths + + 0 1,2,4,8,16 Each pixel is a grayscale sample. + + 2 8,16 Each pixel is an R,G,B triple. + + 3 1,2,4,8 Each pixel is a palette index; + a PLTE chunk must appear. + + 4 8,16 Each pixel is a grayscale sample, + followed by an alpha sample. + + 6 8,16 Each pixel is an R,G,B triple, + followed by an alpha sample. + */ + + /* + * @name processPNG + * Entry point: process a PNG and return image dict and metadata for jsPDF + */ + jsPDF.API.processPNG = function (imageData, index, alias, compression) { + if (this.__addimage__.isArrayBuffer(imageData)) { + imageData = new Uint8Array(imageData); + } + if (!this.__addimage__.isArrayBufferView(imageData)) { + return; + } + var decodedPng = decodePng(imageData, { + checkCrc: true + }); + var width = decodedPng.width, + height = decodedPng.height, + channels = decodedPng.channels, + decodedPalette = decodedPng.palette, + bitsPerComponent = decodedPng.depth; + var result; + if (decodedPalette && channels === 1) { + result = processIndexedPNG(decodedPng); + } else if (channels === 2 || channels === 4) { + result = processAlphaPNG(decodedPng); + } else { + result = processOpaquePNG(decodedPng); + } + var _result = result, + colorSpace = _result.colorSpace, + colorsPerPixel = _result.colorsPerPixel, + sMaskBitsPerComponent = _result.sMaskBitsPerComponent, + colorBytes = _result.colorBytes, + alphaBytes = _result.alphaBytes, + needSMask = _result.needSMask, + palette = _result.palette, + mask = _result.mask; + var predictor = null; + var filter, decodeParameters, sMask; + if (canCompress(compression)) { + predictor = getPredictorFromCompression(compression); + filter = this.decode.FLATE_DECODE; + decodeParameters = "/Predictor ".concat(predictor, " /Colors ").concat(colorsPerPixel, " /BitsPerComponent ").concat(bitsPerComponent, " /Columns ").concat(width); + var rowByteLength = Math.ceil(width * colorsPerPixel * bitsPerComponent / 8); + imageData = compressBytes(colorBytes, rowByteLength, colorsPerPixel, bitsPerComponent, compression); + if (needSMask) { + var sMaskRowByteLength = Math.ceil(width * sMaskBitsPerComponent / 8); + sMask = compressBytes(alphaBytes, sMaskRowByteLength, 1, sMaskBitsPerComponent, compression); + } + } else { + filter = undefined; + decodeParameters = undefined; + imageData = colorBytes; + if (needSMask) sMask = alphaBytes; + } + if (this.__addimage__.isArrayBuffer(imageData) || this.__addimage__.isArrayBufferView(imageData)) { + imageData = this.__addimage__.arrayBufferToBinaryString(imageData); + } + if (sMask && this.__addimage__.isArrayBuffer(sMask) || this.__addimage__.isArrayBufferView(sMask)) { + sMask = this.__addimage__.arrayBufferToBinaryString(sMask); + } + return { + alias: alias, + data: imageData, + index: index, + filter: filter, + decodeParameters: decodeParameters, + transparency: mask, + palette: palette, + sMask: sMask, + predictor: predictor, + width: width, + height: height, + bitsPerComponent: bitsPerComponent, + sMaskBitsPerComponent: sMaskBitsPerComponent, + colorSpace: colorSpace + }; + }; + + /* + * PNG filter method types + * + * @see http://www.w3.org/TR/PNG-Filters.html + * @see http://www.libpng.org/pub/png/book/chapter09.html + * + * This is what the value 'Predictor' in decode params relates to + * + * 15 is "optimal prediction", which means the prediction algorithm can change from line to line. + * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte. + * + 0 None + 1 Sub + 2 Up + 3 Average + 4 Paeth + */ + + function canCompress(value) { + return value !== jsPDF.API.image_compression.NONE && hasCompressionJS(); + } + function hasCompressionJS() { + return typeof zlibSync === "function"; + } + function compressBytes(bytes, lineByteLength, channels, bitsPerComponent, compression) { + var level = 4; + var filter_method = filterUp; + switch (compression) { + case jsPDF.API.image_compression.FAST: + level = 1; + filter_method = filterSub; + break; + case jsPDF.API.image_compression.MEDIUM: + level = 6; + filter_method = filterAverage; + break; + case jsPDF.API.image_compression.SLOW: + level = 9; + filter_method = filterPaeth; + break; + } + var bytesPerPixel = Math.ceil(channels * bitsPerComponent / 8); + bytes = applyPngFilterMethod(bytes, lineByteLength, bytesPerPixel, filter_method); + var dat = zlibSync(bytes, { + level: level + }); + return jsPDF.API.__addimage__.arrayBufferToBinaryString(dat); + } + function applyPngFilterMethod(bytes, lineByteLength, bytesPerPixel, filter_method) { + var lines = bytes.length / lineByteLength; + var result = new Uint8Array(bytes.length + lines); + var filter_methods = getFilterMethods(); + var prevLine; + for (var i = 0; i < lines; i += 1) { + var offset = i * lineByteLength; + var line = bytes.subarray(offset, offset + lineByteLength); + if (filter_method) { + result.set(filter_method(line, bytesPerPixel, prevLine), offset + i); + } else { + var len = filter_methods.length; + var results = []; + for (var j = 0; j < len; j += 1) { + results[j] = filter_methods[j](line, bytesPerPixel, prevLine); + } + var ind = getIndexOfSmallestSum(results.concat()); + result.set(results[ind], offset + i); + } + prevLine = line; + } + return result; + } + function filterNone(line) { + /*const result = new Uint8Array(line.length + 1); + result[0] = 0; + result.set(line, 1);*/ + + var result = Array.apply([], line); + result.unshift(0); + return result; + } + function filterSub(line, colorsPerPixel) { + var len = line.length; + var result = []; + result[0] = 1; + for (var i = 0; i < len; i += 1) { + var left = line[i - colorsPerPixel] || 0; + result[i + 1] = line[i] - left + 0x0100 & 0xff; + } + return result; + } + function filterUp(line, colorsPerPixel, prevLine) { + var len = line.length; + var result = []; + result[0] = 2; + for (var i = 0; i < len; i += 1) { + var up = prevLine && prevLine[i] || 0; + result[i + 1] = line[i] - up + 0x0100 & 0xff; + } + return result; + } + function filterAverage(line, colorsPerPixel, prevLine) { + var len = line.length; + var result = []; + result[0] = 3; + for (var i = 0; i < len; i += 1) { + var left = line[i - colorsPerPixel] || 0; + var up = prevLine && prevLine[i] || 0; + result[i + 1] = line[i] + 0x0100 - (left + up >>> 1) & 0xff; + } + return result; + } + function filterPaeth(line, colorsPerPixel, prevLine) { + var len = line.length; + var result = []; + result[0] = 4; + for (var i = 0; i < len; i += 1) { + var left = line[i - colorsPerPixel] || 0; + var up = prevLine && prevLine[i] || 0; + var upLeft = prevLine && prevLine[i - colorsPerPixel] || 0; + var paeth = paethPredictor(left, up, upLeft); + result[i + 1] = line[i] - paeth + 0x0100 & 0xff; + } + return result; + } + function paethPredictor(left, up, upLeft) { + if (left === up && up === upLeft) { + return left; + } + var pLeft = Math.abs(up - upLeft), + pUp = Math.abs(left - upLeft), + pUpLeft = Math.abs(left + up - upLeft - upLeft); + return pLeft <= pUp && pLeft <= pUpLeft ? left : pUp <= pUpLeft ? up : upLeft; + } + function getFilterMethods() { + return [filterNone, filterSub, filterUp, filterAverage, filterPaeth]; + } + function getIndexOfSmallestSum(arrays) { + var sum = arrays.map(function (value) { + return value.reduce(function (pv, cv) { + return pv + Math.abs(cv); + }, 0); + }); + return sum.indexOf(Math.min.apply(null, sum)); + } + function getPredictorFromCompression(compression) { + var predictor; + switch (compression) { + case jsPDF.API.image_compression.FAST: + predictor = 11; + break; + case jsPDF.API.image_compression.MEDIUM: + predictor = 13; + break; + case jsPDF.API.image_compression.SLOW: + predictor = 14; + break; + default: + predictor = 12; + break; + } + return predictor; + } + + // Extracted helper for Indexed PNGs (palette-based) + function processIndexedPNG(decodedPng) { + var width = decodedPng.width, + height = decodedPng.height, + data = decodedPng.data, + decodedPalette = decodedPng.palette, + depth = decodedPng.depth; + var needSMask = false; + var palette = []; + var mask = []; + var alphaBytes = undefined; + var hasSemiTransparency = false; + var maxMaskLength = 1; + var maskLength = 0; + for (var i = 0; i < decodedPalette.length; i++) { + var _decodedPalette$i = _slicedToArray(decodedPalette[i], 4), + r = _decodedPalette$i[0], + g = _decodedPalette$i[1], + b = _decodedPalette$i[2], + a = _decodedPalette$i[3]; + palette.push(r, g, b); + if (a != null) { + if (a === 0) { + maskLength++; + if (mask.length < maxMaskLength) { + mask.push(i); + } + } else if (a < 255) { + hasSemiTransparency = true; + } + } + } + if (hasSemiTransparency || maskLength > maxMaskLength) { + needSMask = true; + mask = undefined; + var totalPixels = width * height; + // per PNG spec, palettes always use 8 bits per component + alphaBytes = new Uint8Array(totalPixels); + var dataView = new DataView(data.buffer); + for (var p = 0; p < totalPixels; p++) { + var paletteIndex = readSample(dataView, p, depth); + var _decodedPalette$palet = _slicedToArray(decodedPalette[paletteIndex], 4), + alpha = _decodedPalette$palet[3]; + alphaBytes[p] = alpha; + } + } else if (maskLength === 0) { + mask = undefined; + } + return { + colorSpace: "Indexed", + colorsPerPixel: 1, + sMaskBitsPerComponent: needSMask ? 8 : undefined, + colorBytes: data, + alphaBytes: alphaBytes, + needSMask: needSMask, + palette: palette, + mask: mask + }; + } + + /* + * Splits color and alpha values into separate buffers + */ + function processAlphaPNG(decodedPng) { + var data = decodedPng.data, + width = decodedPng.width, + height = decodedPng.height, + channels = decodedPng.channels, + depth = decodedPng.depth; + var colorSpace = channels === 2 ? "DeviceGray" : "DeviceRGB"; + var colorsPerPixel = channels - 1; + var totalPixels = width * height; + var colorChannels = colorsPerPixel; // 1 for Gray, 3 for RGB + var alphaChannels = 1; + var totalColorSamples = totalPixels * colorChannels; + var totalAlphaSamples = totalPixels * alphaChannels; + var colorByteLen = Math.ceil(totalColorSamples * depth / 8); + var alphaByteLen = Math.ceil(totalAlphaSamples * depth / 8); + var colorBytes = new Uint8Array(colorByteLen); + var alphaBytes = new Uint8Array(alphaByteLen); + var dataView = new DataView(data.buffer); + var colorView = new DataView(colorBytes.buffer); + var alphaView = new DataView(alphaBytes.buffer); + var needSMask = false; + for (var p = 0; p < totalPixels; p++) { + var pixelStartIndex = p * channels; + for (var s = 0; s < colorChannels; s++) { + var _sampleIndex = pixelStartIndex + s; + var colorValue = readSample(dataView, _sampleIndex, depth); + writeSample(colorView, colorValue, p * colorChannels + s, depth); + } + var sampleIndex = pixelStartIndex + colorChannels; + var alphaValue = readSample(dataView, sampleIndex, depth); + if (alphaValue < (1 << depth) - 1) { + needSMask = true; + } + writeSample(alphaView, alphaValue, p * alphaChannels, depth); + } + return { + colorSpace: colorSpace, + colorsPerPixel: colorsPerPixel, + sMaskBitsPerComponent: needSMask ? depth : undefined, + colorBytes: colorBytes, + alphaBytes: alphaBytes, + needSMask: needSMask + }; + } + function processOpaquePNG(decodedPng) { + var data = decodedPng.data, + channels = decodedPng.channels; + var colorSpace = channels === 1 ? "DeviceGray" : "DeviceRGB"; + var colorsPerPixel = colorSpace === "DeviceGray" ? 1 : 3; + var colorBytes; + if (data instanceof Uint16Array) { + colorBytes = convertUint16ArrayToUint8Array(data); + } else { + colorBytes = data; + } + return { + colorSpace: colorSpace, + colorsPerPixel: colorsPerPixel, + colorBytes: colorBytes, + needSMask: false + }; + } + function convertUint16ArrayToUint8Array(data) { + // PNG/PDF expect MSB-first byte order. Since EcmaScript does not specify + // the byte order of Uint16Array, we need to use a DataView to ensure the + // correct byte order. + var sampleCount = data.length; + var out = new Uint8Array(sampleCount * 2); + var outView = new DataView(out.buffer, out.byteOffset, out.byteLength); + for (var i = 0; i < sampleCount; i++) { + outView.setUint16(i * 2, data[i], false); + } + return out; + } + function readSample(view, sampleIndex, depth) { + var bitIndex = sampleIndex * depth; + var byteIndex = Math.floor(bitIndex / 8); + var bitOffset = 16 - (bitIndex - byteIndex * 8 + depth); + var bitMask = (1 << depth) - 1; + var word = safeGetUint16(view, byteIndex); + return word >> bitOffset & bitMask; + } + function writeSample(view, value, sampleIndex, depth) { + var bitIndex = sampleIndex * depth; + var byteIndex = Math.floor(bitIndex / 8); + var bitOffset = 16 - (bitIndex - byteIndex * 8 + depth); + var bitMask = (1 << depth) - 1; + var writeValue = (value & bitMask) << bitOffset; + var word = safeGetUint16(view, byteIndex) & ~(bitMask << bitOffset) & 0xffff; + safeSetUint16(view, byteIndex, word | writeValue); + } + function safeGetUint16(view, byteIndex) { + if (byteIndex + 1 < view.byteLength) { + return view.getUint16(byteIndex, false); + } + var b0 = view.getUint8(byteIndex); + return b0 << 8; + } + function safeSetUint16(view, byteIndex, value) { + if (byteIndex + 1 < view.byteLength) { + view.setUint16(byteIndex, value, false); + return; + } + var byteToWrite = value >> 8 & 0xff; + view.setUint8(byteIndex, byteToWrite); + } + + /** + * @license + * (c) Dean McNamee , 2013. + * + * https://github.com/deanm/omggif + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * omggif is a JavaScript implementation of a GIF 89a encoder and decoder, + * including animation and compression. It does not rely on any specific + * underlying system, so should run in the browser, Node, or Plask. + */ + function GifReader(buf) { + var p = 0; + + // - Header (GIF87a or GIF89a). + if (buf[p++] !== 0x47 || buf[p++] !== 0x49 || buf[p++] !== 0x46 || buf[p++] !== 0x38 || (buf[p++] + 1 & 0xfd) !== 0x38 || buf[p++] !== 0x61) { + throw new Error("Invalid GIF 87a/89a header."); + } + + // - Logical Screen Descriptor. + var width = buf[p++] | buf[p++] << 8; + var height = buf[p++] | buf[p++] << 8; + var pf0 = buf[p++]; // . + var global_palette_flag = pf0 >> 7; + var num_global_colors_pow2 = pf0 & 0x7; + var num_global_colors = 1 << num_global_colors_pow2 + 1; + buf[p++]; + buf[p++]; // Pixel aspect ratio (unused?). + + var global_palette_offset = null; + var global_palette_size = null; + if (global_palette_flag) { + global_palette_offset = p; + global_palette_size = num_global_colors; + p += num_global_colors * 3; // Seek past palette. + } + var no_eof = true; + var frames = []; + var delay = 0; + var transparent_index = null; + var disposal = 0; // 0 - No disposal specified. + var loop_count = null; + this.width = width; + this.height = height; + while (no_eof && p < buf.length) { + switch (buf[p++]) { + case 0x21: + // Graphics Control Extension Block + switch (buf[p++]) { + case 0xff: + // Application specific block + // Try if it's a Netscape block (with animation loop counter). + if (buf[p] !== 0x0b || + // 21 FF already read, check block size. + // NETSCAPE2.0 + buf[p + 1] == 0x4e && buf[p + 2] == 0x45 && buf[p + 3] == 0x54 && buf[p + 4] == 0x53 && buf[p + 5] == 0x43 && buf[p + 6] == 0x41 && buf[p + 7] == 0x50 && buf[p + 8] == 0x45 && buf[p + 9] == 0x32 && buf[p + 10] == 0x2e && buf[p + 11] == 0x30 && + // Sub-block + buf[p + 12] == 0x03 && buf[p + 13] == 0x01 && buf[p + 16] == 0) { + p += 14; + loop_count = buf[p++] | buf[p++] << 8; + p++; // Skip terminator. + } else { + // We don't know what it is, just try to get past it. + p += 12; + while (true) { + // Seek through subblocks. + var block_size = buf[p++]; + // Bad block size (ex: undefined from an out of bounds read). + if (!(block_size >= 0)) throw Error("Invalid block size"); + if (block_size === 0) break; // 0 size is terminator + p += block_size; + } + } + break; + case 0xf9: + // Graphics Control Extension + if (buf[p++] !== 0x4 || buf[p + 4] !== 0) throw new Error("Invalid graphics extension block."); + var pf1 = buf[p++]; + delay = buf[p++] | buf[p++] << 8; + transparent_index = buf[p++]; + if ((pf1 & 1) === 0) transparent_index = null; + disposal = pf1 >> 2 & 0x7; + p++; // Skip terminator. + break; + case 0xfe: + // Comment Extension. + while (true) { + // Seek through subblocks. + var block_size = buf[p++]; + // Bad block size (ex: undefined from an out of bounds read). + if (!(block_size >= 0)) throw Error("Invalid block size"); + if (block_size === 0) break; // 0 size is terminator + // console.log(buf.slice(p, p+block_size).toString('ascii')); + p += block_size; + } + break; + default: + throw new Error("Unknown graphic control label: 0x" + buf[p - 1].toString(16)); + } + break; + case 0x2c: + // Image Descriptor. + var x = buf[p++] | buf[p++] << 8; + var y = buf[p++] | buf[p++] << 8; + var w = buf[p++] | buf[p++] << 8; + var h = buf[p++] | buf[p++] << 8; + var pf2 = buf[p++]; + var local_palette_flag = pf2 >> 7; + var interlace_flag = pf2 >> 6 & 1; + var num_local_colors_pow2 = pf2 & 0x7; + var num_local_colors = 1 << num_local_colors_pow2 + 1; + var palette_offset = global_palette_offset; + var palette_size = global_palette_size; + var has_local_palette = false; + if (local_palette_flag) { + var has_local_palette = true; + palette_offset = p; // Override with local palette. + palette_size = num_local_colors; + p += num_local_colors * 3; // Seek past palette. + } + var data_offset = p; + p++; // codesize + while (true) { + var block_size = buf[p++]; + // Bad block size (ex: undefined from an out of bounds read). + if (!(block_size >= 0)) throw Error("Invalid block size"); + if (block_size === 0) break; // 0 size is terminator + p += block_size; + } + frames.push({ + x: x, + y: y, + width: w, + height: h, + has_local_palette: has_local_palette, + palette_offset: palette_offset, + palette_size: palette_size, + data_offset: data_offset, + data_length: p - data_offset, + transparent_index: transparent_index, + interlaced: !!interlace_flag, + delay: delay, + disposal: disposal + }); + break; + case 0x3b: + // Trailer Marker (end of file). + no_eof = false; + break; + default: + throw new Error("Unknown gif block: 0x" + buf[p - 1].toString(16)); + } + } + this.numFrames = function () { + return frames.length; + }; + this.loopCount = function () { + return loop_count; + }; + this.frameInfo = function (frame_num) { + if (frame_num < 0 || frame_num >= frames.length) throw new Error("Frame index out of range."); + return frames[frame_num]; + }; + this.decodeAndBlitFrameBGRA = function (frame_num, pixels) { + var frame = this.frameInfo(frame_num); + var num_pixels = frame.width * frame.height; + var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices. + GifReaderLZWOutputIndexStream(buf, frame.data_offset, index_stream, num_pixels); + var palette_offset = frame.palette_offset; + + // NOTE(deanm): It seems to be much faster to compare index to 256 than + // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in + // the profile, not sure if it's related to using a Uint8Array. + var trans = frame.transparent_index; + if (trans === null) trans = 256; + + // We are possibly just blitting to a portion of the entire frame. + // That is a subrect within the framerect, so the additional pixels + // must be skipped over after we finished a scanline. + var framewidth = frame.width; + var framestride = width - framewidth; + var xleft = framewidth; // Number of subrect pixels left in scanline. + + // Output indices of the top left and bottom right corners of the subrect. + var opbeg = (frame.y * width + frame.x) * 4; + var opend = ((frame.y + frame.height) * width + frame.x) * 4; + var op = opbeg; + var scanstride = framestride * 4; + + // Use scanstride to skip past the rows when interlacing. This is skipping + // 7 rows for the first two passes, then 3 then 1. + if (frame.interlaced === true) { + scanstride += width * 4 * 7; // Pass 1. + } + var interlaceskip = 8; // Tracking the row interval in the current pass. + + for (var i = 0, il = index_stream.length; i < il; ++i) { + var index = index_stream[i]; + if (xleft === 0) { + // Beginning of new scan line + op += scanstride; + xleft = framewidth; + if (op >= opend) { + // Catch the wrap to switch passes when interlacing. + scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); + // interlaceskip / 2 * 4 is interlaceskip << 1. + op = opbeg + (framewidth + framestride) * (interlaceskip << 1); + interlaceskip >>= 1; + } + } + if (index === trans) { + op += 4; + } else { + var r = buf[palette_offset + index * 3]; + var g = buf[palette_offset + index * 3 + 1]; + var b = buf[palette_offset + index * 3 + 2]; + pixels[op++] = b; + pixels[op++] = g; + pixels[op++] = r; + pixels[op++] = 255; + } + --xleft; + } + }; + + // I will go to copy and paste hell one day... + this.decodeAndBlitFrameRGBA = function (frame_num, pixels) { + var frame = this.frameInfo(frame_num); + var num_pixels = frame.width * frame.height; + var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices. + GifReaderLZWOutputIndexStream(buf, frame.data_offset, index_stream, num_pixels); + var palette_offset = frame.palette_offset; + + // NOTE(deanm): It seems to be much faster to compare index to 256 than + // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in + // the profile, not sure if it's related to using a Uint8Array. + var trans = frame.transparent_index; + if (trans === null) trans = 256; + + // We are possibly just blitting to a portion of the entire frame. + // That is a subrect within the framerect, so the additional pixels + // must be skipped over after we finished a scanline. + var framewidth = frame.width; + var framestride = width - framewidth; + var xleft = framewidth; // Number of subrect pixels left in scanline. + + // Output indices of the top left and bottom right corners of the subrect. + var opbeg = (frame.y * width + frame.x) * 4; + var opend = ((frame.y + frame.height) * width + frame.x) * 4; + var op = opbeg; + var scanstride = framestride * 4; + + // Use scanstride to skip past the rows when interlacing. This is skipping + // 7 rows for the first two passes, then 3 then 1. + if (frame.interlaced === true) { + scanstride += width * 4 * 7; // Pass 1. + } + var interlaceskip = 8; // Tracking the row interval in the current pass. + + for (var i = 0, il = index_stream.length; i < il; ++i) { + var index = index_stream[i]; + if (xleft === 0) { + // Beginning of new scan line + op += scanstride; + xleft = framewidth; + if (op >= opend) { + // Catch the wrap to switch passes when interlacing. + scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); + // interlaceskip / 2 * 4 is interlaceskip << 1. + op = opbeg + (framewidth + framestride) * (interlaceskip << 1); + interlaceskip >>= 1; + } + } + if (index === trans) { + op += 4; + } else { + var r = buf[palette_offset + index * 3]; + var g = buf[palette_offset + index * 3 + 1]; + var b = buf[palette_offset + index * 3 + 2]; + pixels[op++] = r; + pixels[op++] = g; + pixels[op++] = b; + pixels[op++] = 255; + } + --xleft; + } + }; + } + function GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) { + var min_code_size = code_stream[p++]; + var clear_code = 1 << min_code_size; + var eoi_code = clear_code + 1; + var next_code = eoi_code + 1; + var cur_code_size = min_code_size + 1; // Number of bits per code. + // NOTE: This shares the same name as the encoder, but has a different + // meaning here. Here this masks each code coming from the code stream. + var code_mask = (1 << cur_code_size) - 1; + var cur_shift = 0; + var cur = 0; + var op = 0; // Output pointer. + + var subblock_size = code_stream[p++]; + + // TODO(deanm): Would using a TypedArray be any faster? At least it would + // solve the fast mode / backing store uncertainty. + // var code_table = Array(4096); + var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits. + + var prev_code = null; // Track code-1. + + while (true) { + // Read up to two bytes, making sure we always 12-bits for max sized code. + while (cur_shift < 16) { + if (subblock_size === 0) break; // No more data to be read. + + cur |= code_stream[p++] << cur_shift; + cur_shift += 8; + if (subblock_size === 1) { + // Never let it get to 0 to hold logic above. + subblock_size = code_stream[p++]; // Next subblock. + } else { + --subblock_size; + } + } + + // TODO(deanm): We should never really get here, we should have received + // and EOI. + if (cur_shift < cur_code_size) break; + var code = cur & code_mask; + cur >>= cur_code_size; + cur_shift -= cur_code_size; + + // TODO(deanm): Maybe should check that the first code was a clear code, + // at least this is what you're supposed to do. But actually our encoder + // now doesn't emit a clear code first anyway. + if (code === clear_code) { + // We don't actually have to clear the table. This could be a good idea + // for greater error checking, but we don't really do any anyway. We + // will just track it with next_code and overwrite old entries. + + next_code = eoi_code + 1; + cur_code_size = min_code_size + 1; + code_mask = (1 << cur_code_size) - 1; + + // Don't update prev_code ? + prev_code = null; + continue; + } else if (code === eoi_code) { + break; + } + + // We have a similar situation as the decoder, where we want to store + // variable length entries (code table entries), but we want to do in a + // faster manner than an array of arrays. The code below stores sort of a + // linked list within the code table, and then "chases" through it to + // construct the dictionary entries. When a new entry is created, just the + // last byte is stored, and the rest (prefix) of the entry is only + // referenced by its table entry. Then the code chases through the + // prefixes until it reaches a single byte code. We have to chase twice, + // first to compute the length, and then to actually copy the data to the + // output (backwards, since we know the length). The alternative would be + // storing something in an intermediate stack, but that doesn't make any + // more sense. I implemented an approach where it also stored the length + // in the code table, although it's a bit tricky because you run out of + // bits (12 + 12 + 8), but I didn't measure much improvements (the table + // entries are generally not the long). Even when I created benchmarks for + // very long table entries the complexity did not seem worth it. + // The code table stores the prefix entry in 12 bits and then the suffix + // byte in 8 bits, so each entry is 20 bits. + + var chase_code = code < next_code ? code : prev_code; + + // Chase what we will output, either {CODE} or {CODE-1}. + var chase_length = 0; + var chase = chase_code; + while (chase > clear_code) { + chase = code_table[chase] >> 8; + ++chase_length; + } + var k = chase; + var op_end = op + chase_length + (chase_code !== code ? 1 : 0); + if (op_end > output_length) { + console.log("Warning, gif stream longer than expected."); + return; + } + + // Already have the first byte from the chase, might as well write it fast. + output[op++] = k; + op += chase_length; + var b = op; // Track pointer, writing backwards. + + if (chase_code !== code) + // The case of emitting {CODE-1} + k. + output[op++] = k; + chase = chase_code; + while (chase_length--) { + chase = code_table[chase]; + output[--b] = chase & 0xff; // Write backwards. + chase >>= 8; // Pull down to the prefix code. + } + if (prev_code !== null && next_code < 4096) { + code_table[next_code++] = prev_code << 8 | k; + // TODO(deanm): Figure out this clearing vs code growth logic better. I + // have an feeling that it should just happen somewhere else, for now it + // is awkward between when we grow past the max and then hit a clear code. + // For now just check if we hit the max 12-bits (then a clear code should + // follow, also of course encoded in 12-bits). + if (next_code >= code_mask + 1 && cur_code_size < 12) { + ++cur_code_size; + code_mask = code_mask << 1 | 1; + } + } + prev_code = code; + } + if (op !== output_length) { + console.log("Warning, gif stream shorter than expected."); + } + return output; + } + + /** + * @license + Copyright (c) 2008, Adobe Systems Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Adobe Systems Incorporated nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + /* + JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009 + + Basic GUI blocking jpeg encoder + */ + + function JPEGEncoder(quality) { + var ffloor = Math.floor; + var YTable = new Array(64); + var UVTable = new Array(64); + var fdtbl_Y = new Array(64); + var fdtbl_UV = new Array(64); + var YDC_HT; + var UVDC_HT; + var YAC_HT; + var UVAC_HT; + var bitcode = new Array(65535); + var category = new Array(65535); + var outputfDCTQuant = new Array(64); + var DU = new Array(64); + var byteout = []; + var bytenew = 0; + var bytepos = 7; + var YDU = new Array(64); + var UDU = new Array(64); + var VDU = new Array(64); + var clt = new Array(256); + var RGB_YUV_TABLE = new Array(2048); + var currentQuality; + var ZigZag = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63]; + var std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]; + var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; + var std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d]; + var std_ac_luminance_values = [0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]; + var std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]; + var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; + var std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77]; + var std_ac_chrominance_values = [0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]; + function initQuantTables(sf) { + var YQT = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]; + for (var i = 0; i < 64; i++) { + var t = ffloor((YQT[i] * sf + 50) / 100); + t = Math.min(Math.max(t, 1), 255); + YTable[ZigZag[i]] = t; + } + var UVQT = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99]; + for (var j = 0; j < 64; j++) { + var u = ffloor((UVQT[j] * sf + 50) / 100); + u = Math.min(Math.max(u, 1), 255); + UVTable[ZigZag[j]] = u; + } + var aasf = [1.0, 1.387039845, 1.306562965, 1.175875602, 1.0, 0.785694958, 0.5411961, 0.275899379]; + var k = 0; + for (var row = 0; row < 8; row++) { + for (var col = 0; col < 8; col++) { + fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0); + fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0); + k++; + } + } + } + function computeHuffmanTbl(nrcodes, std_table) { + var codevalue = 0; + var pos_in_table = 0; + var HT = new Array(); + for (var k = 1; k <= 16; k++) { + for (var j = 1; j <= nrcodes[k]; j++) { + HT[std_table[pos_in_table]] = []; + HT[std_table[pos_in_table]][0] = codevalue; + HT[std_table[pos_in_table]][1] = k; + pos_in_table++; + codevalue++; + } + codevalue *= 2; + } + return HT; + } + function initHuffmanTbl() { + YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values); + UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values); + YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values); + UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values); + } + function initCategoryNumber() { + var nrlower = 1; + var nrupper = 2; + for (var cat = 1; cat <= 15; cat++) { + //Positive numbers + for (var nr = nrlower; nr < nrupper; nr++) { + category[32767 + nr] = cat; + bitcode[32767 + nr] = []; + bitcode[32767 + nr][1] = cat; + bitcode[32767 + nr][0] = nr; + } + //Negative numbers + for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) { + category[32767 + nrneg] = cat; + bitcode[32767 + nrneg] = []; + bitcode[32767 + nrneg][1] = cat; + bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg; + } + nrlower <<= 1; + nrupper <<= 1; + } + } + function initRGBYUVTable() { + for (var i = 0; i < 256; i++) { + RGB_YUV_TABLE[i] = 19595 * i; + RGB_YUV_TABLE[i + 256 >> 0] = 38470 * i; + RGB_YUV_TABLE[i + 512 >> 0] = 7471 * i + 0x8000; + RGB_YUV_TABLE[i + 768 >> 0] = -11059 * i; + RGB_YUV_TABLE[i + 1024 >> 0] = -21709 * i; + RGB_YUV_TABLE[i + 1280 >> 0] = 32768 * i + 0x807fff; + RGB_YUV_TABLE[i + 1536 >> 0] = -27439 * i; + RGB_YUV_TABLE[i + 1792 >> 0] = -5329 * i; + } + } + + // IO functions + function writeBits(bs) { + var value = bs[0]; + var posval = bs[1] - 1; + while (posval >= 0) { + if (value & 1 << posval) { + bytenew |= 1 << bytepos; + } + posval--; + bytepos--; + if (bytepos < 0) { + if (bytenew == 0xff) { + writeByte(0xff); + writeByte(0); + } else { + writeByte(bytenew); + } + bytepos = 7; + bytenew = 0; + } + } + } + function writeByte(value) { + //byteout.push(clt[value]); // write char directly instead of converting later + byteout.push(value); + } + function writeWord(value) { + writeByte(value >> 8 & 0xff); + writeByte(value & 0xff); + } + + // DCT & quantization core + function fDCTQuant(data, fdtbl) { + var d0, d1, d2, d3, d4, d5, d6, d7; + /* Pass 1: process rows. */ + var dataOff = 0; + var i; + var I8 = 8; + var I64 = 64; + for (i = 0; i < I8; ++i) { + d0 = data[dataOff]; + d1 = data[dataOff + 1]; + d2 = data[dataOff + 2]; + d3 = data[dataOff + 3]; + d4 = data[dataOff + 4]; + d5 = data[dataOff + 5]; + d6 = data[dataOff + 6]; + d7 = data[dataOff + 7]; + var tmp0 = d0 + d7; + var tmp7 = d0 - d7; + var tmp1 = d1 + d6; + var tmp6 = d1 - d6; + var tmp2 = d2 + d5; + var tmp5 = d2 - d5; + var tmp3 = d3 + d4; + var tmp4 = d3 - d4; + + /* Even part */ + var tmp10 = tmp0 + tmp3; /* phase 2 */ + var tmp13 = tmp0 - tmp3; + var tmp11 = tmp1 + tmp2; + var tmp12 = tmp1 - tmp2; + data[dataOff] = tmp10 + tmp11; /* phase 3 */ + data[dataOff + 4] = tmp10 - tmp11; + var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */ + data[dataOff + 2] = tmp13 + z1; /* phase 5 */ + data[dataOff + 6] = tmp13 - z1; + + /* Odd part */ + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */ + var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */ + var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */ + var z3 = tmp11 * 0.707106781; /* c4 */ + + var z11 = tmp7 + z3; /* phase 5 */ + var z13 = tmp7 - z3; + data[dataOff + 5] = z13 + z2; /* phase 6 */ + data[dataOff + 3] = z13 - z2; + data[dataOff + 1] = z11 + z4; + data[dataOff + 7] = z11 - z4; + dataOff += 8; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + dataOff = 0; + for (i = 0; i < I8; ++i) { + d0 = data[dataOff]; + d1 = data[dataOff + 8]; + d2 = data[dataOff + 16]; + d3 = data[dataOff + 24]; + d4 = data[dataOff + 32]; + d5 = data[dataOff + 40]; + d6 = data[dataOff + 48]; + d7 = data[dataOff + 56]; + var tmp0p2 = d0 + d7; + var tmp7p2 = d0 - d7; + var tmp1p2 = d1 + d6; + var tmp6p2 = d1 - d6; + var tmp2p2 = d2 + d5; + var tmp5p2 = d2 - d5; + var tmp3p2 = d3 + d4; + var tmp4p2 = d3 - d4; + + /* Even part */ + var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */ + var tmp13p2 = tmp0p2 - tmp3p2; + var tmp11p2 = tmp1p2 + tmp2p2; + var tmp12p2 = tmp1p2 - tmp2p2; + data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */ + data[dataOff + 32] = tmp10p2 - tmp11p2; + var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */ + data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */ + data[dataOff + 48] = tmp13p2 - z1p2; + + /* Odd part */ + tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */ + tmp11p2 = tmp5p2 + tmp6p2; + tmp12p2 = tmp6p2 + tmp7p2; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */ + var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */ + var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */ + var z3p2 = tmp11p2 * 0.707106781; /* c4 */ + + var z11p2 = tmp7p2 + z3p2; /* phase 5 */ + var z13p2 = tmp7p2 - z3p2; + data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */ + data[dataOff + 24] = z13p2 - z2p2; + data[dataOff + 8] = z11p2 + z4p2; + data[dataOff + 56] = z11p2 - z4p2; + dataOff++; /* advance pointer to next column */ + } + + // Quantize/descale the coefficients + var fDCTQuant; + for (i = 0; i < I64; ++i) { + // Apply the quantization and scaling factor & Round to nearest integer + fDCTQuant = data[i] * fdtbl[i]; + outputfDCTQuant[i] = fDCTQuant > 0.0 ? fDCTQuant + 0.5 | 0 : fDCTQuant - 0.5 | 0; + //outputfDCTQuant[i] = fround(fDCTQuant); + } + return outputfDCTQuant; + } + function writeAPP0() { + writeWord(0xffe0); // marker + writeWord(16); // length + writeByte(0x4a); // J + writeByte(0x46); // F + writeByte(0x49); // I + writeByte(0x46); // F + writeByte(0); // = "JFIF",'\0' + writeByte(1); // versionhi + writeByte(1); // versionlo + writeByte(0); // xyunits + writeWord(1); // xdensity + writeWord(1); // ydensity + writeByte(0); // thumbnwidth + writeByte(0); // thumbnheight + } + function writeSOF0(width, height) { + writeWord(0xffc0); // marker + writeWord(17); // length, truecolor YUV JPG + writeByte(8); // precision + writeWord(height); + writeWord(width); + writeByte(3); // nrofcomponents + writeByte(1); // IdY + writeByte(0x11); // HVY + writeByte(0); // QTY + writeByte(2); // IdU + writeByte(0x11); // HVU + writeByte(1); // QTU + writeByte(3); // IdV + writeByte(0x11); // HVV + writeByte(1); // QTV + } + function writeDQT() { + writeWord(0xffdb); // marker + writeWord(132); // length + writeByte(0); + for (var i = 0; i < 64; i++) { + writeByte(YTable[i]); + } + writeByte(1); + for (var j = 0; j < 64; j++) { + writeByte(UVTable[j]); + } + } + function writeDHT() { + writeWord(0xffc4); // marker + writeWord(0x01a2); // length + + writeByte(0); // HTYDCinfo + for (var i = 0; i < 16; i++) { + writeByte(std_dc_luminance_nrcodes[i + 1]); + } + for (var j = 0; j <= 11; j++) { + writeByte(std_dc_luminance_values[j]); + } + writeByte(0x10); // HTYACinfo + for (var k = 0; k < 16; k++) { + writeByte(std_ac_luminance_nrcodes[k + 1]); + } + for (var l = 0; l <= 161; l++) { + writeByte(std_ac_luminance_values[l]); + } + writeByte(1); // HTUDCinfo + for (var m = 0; m < 16; m++) { + writeByte(std_dc_chrominance_nrcodes[m + 1]); + } + for (var n = 0; n <= 11; n++) { + writeByte(std_dc_chrominance_values[n]); + } + writeByte(0x11); // HTUACinfo + for (var o = 0; o < 16; o++) { + writeByte(std_ac_chrominance_nrcodes[o + 1]); + } + for (var p = 0; p <= 161; p++) { + writeByte(std_ac_chrominance_values[p]); + } + } + function writeSOS() { + writeWord(0xffda); // marker + writeWord(12); // length + writeByte(3); // nrofcomponents + writeByte(1); // IdY + writeByte(0); // HTY + writeByte(2); // IdU + writeByte(0x11); // HTU + writeByte(3); // IdV + writeByte(0x11); // HTV + writeByte(0); // Ss + writeByte(0x3f); // Se + writeByte(0); // Bf + } + function processDU(CDU, fdtbl, DC, HTDC, HTAC) { + var EOB = HTAC[0x00]; + var M16zeroes = HTAC[0xf0]; + var pos; + var I16 = 16; + var I63 = 63; + var I64 = 64; + var DU_DCT = fDCTQuant(CDU, fdtbl); + //ZigZag reorder + for (var j = 0; j < I64; ++j) { + DU[ZigZag[j]] = DU_DCT[j]; + } + var Diff = DU[0] - DC; + DC = DU[0]; + //Encode DC + if (Diff == 0) { + writeBits(HTDC[0]); // Diff might be 0 + } else { + pos = 32767 + Diff; + writeBits(HTDC[category[pos]]); + writeBits(bitcode[pos]); + } + //Encode ACs + var end0pos = 63; // was const... which is crazy + while (end0pos > 0 && DU[end0pos] == 0) { + end0pos--; + } + //end0pos = first element in reverse order !=0 + if (end0pos == 0) { + writeBits(EOB); + return DC; + } + var i = 1; + var lng; + while (i <= end0pos) { + var startpos = i; + while (DU[i] == 0 && i <= end0pos) { + ++i; + } + var nrzeroes = i - startpos; + if (nrzeroes >= I16) { + lng = nrzeroes >> 4; + for (var nrmarker = 1; nrmarker <= lng; ++nrmarker) { + writeBits(M16zeroes); + } + nrzeroes = nrzeroes & 0xf; + } + pos = 32767 + DU[i]; + writeBits(HTAC[(nrzeroes << 4) + category[pos]]); + writeBits(bitcode[pos]); + i++; + } + if (end0pos != I63) { + writeBits(EOB); + } + return DC; + } + function initCharLookupTable() { + var sfcc = String.fromCharCode; + for (var i = 0; i < 256; i++) { + ///// ACHTUNG // 255 + clt[i] = sfcc(i); + } + } + this.encode = function (image, quality // image data object + ) { + if (quality) setQuality(quality); + + // Initialize bit writer + byteout = new Array(); + bytenew = 0; + bytepos = 7; + + // Add JPEG headers + writeWord(0xffd8); // SOI + writeAPP0(); + writeDQT(); + writeSOF0(image.width, image.height); + writeDHT(); + writeSOS(); + + // Encode 8x8 macroblocks + var DCY = 0; + var DCU = 0; + var DCV = 0; + bytenew = 0; + bytepos = 7; + this.encode.displayName = "_encode_"; + var imageData = image.data; + var width = image.width; + var height = image.height; + var quadWidth = width * 4; + var x, + y = 0; + var r, g, b; + var start, p, col, row, pos; + while (y < height) { + x = 0; + while (x < quadWidth) { + start = quadWidth * y + x; + col = -1; + row = 0; + for (pos = 0; pos < 64; pos++) { + row = pos >> 3; // /8 + col = (pos & 7) * 4; // %8 + p = start + row * quadWidth + col; + if (y + row >= height) { + // padding bottom + p -= quadWidth * (y + 1 + row - height); + } + if (x + col >= quadWidth) { + // padding right + p -= x + col - quadWidth + 4; + } + r = imageData[p++]; + g = imageData[p++]; + b = imageData[p++]; + + /* // calculate YUV values dynamically + YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80 + UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b)); + VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b)); + */ + + // use lookup table (slightly faster) + YDU[pos] = (RGB_YUV_TABLE[r] + RGB_YUV_TABLE[g + 256 >> 0] + RGB_YUV_TABLE[b + 512 >> 0] >> 16) - 128; + UDU[pos] = (RGB_YUV_TABLE[r + 768 >> 0] + RGB_YUV_TABLE[g + 1024 >> 0] + RGB_YUV_TABLE[b + 1280 >> 0] >> 16) - 128; + VDU[pos] = (RGB_YUV_TABLE[r + 1280 >> 0] + RGB_YUV_TABLE[g + 1536 >> 0] + RGB_YUV_TABLE[b + 1792 >> 0] >> 16) - 128; + } + DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT); + DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); + DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); + x += 32; + } + y += 8; + } + + //////////////////////////////////////////////////////////////// + + // Do the bit alignment of the EOI marker + if (bytepos >= 0) { + var fillbits = []; + fillbits[1] = bytepos + 1; + fillbits[0] = (1 << bytepos + 1) - 1; + writeBits(fillbits); + } + writeWord(0xffd9); //EOI + + return new Uint8Array(byteout); + }; + function setQuality(quality) { + quality = Math.min(Math.max(quality, 1), 100); + if (currentQuality == quality) return; // don't recalc if unchanged + + var sf = quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2); + initQuantTables(sf); + currentQuality = quality; + //console.log('Quality set to: '+quality +'%'); + } + function init() { + quality = quality || 50; + // Create tables + initCharLookupTable(); + initHuffmanTbl(); + initCategoryNumber(); + initRGBYUVTable(); + setQuality(quality); + } + init(); + } + + /** + * @license + * Copyright (c) 2017 Aras Abbasi + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF Gif Support PlugIn + * + * @name gif_support + * @module + */ + (function (jsPDFAPI) { + + jsPDFAPI.processGIF89A = function (imageData, index, alias, compression) { + var reader = new GifReader(imageData); + var width = reader.width, + height = reader.height; + var qu = 100; + var pixels = []; + reader.decodeAndBlitFrameRGBA(0, pixels); + var rawImageData = { + data: pixels, + width: width, + height: height + }; + var encoder = new JPEGEncoder(qu); + var data = encoder.encode(rawImageData, qu); + return jsPDFAPI.processJPEG.call(this, data, index, alias, compression); + }; + jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A; + })(jsPDF.API); + + /** + * @author shaozilee + * + * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp + * + */ + function BmpDecoder(buffer, is_with_alpha) { + this.pos = 0; + this.buffer = buffer; + this.datav = new DataView(buffer.buffer); + this.is_with_alpha = !!is_with_alpha; + this.bottom_up = true; + this.flag = String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]); + this.pos += 2; + if (["BM", "BA", "CI", "CP", "IC", "PT"].indexOf(this.flag) === -1) throw new Error("Invalid BMP File"); + this.parseHeader(); + this.parseBGR(); + } + BmpDecoder.prototype.parseHeader = function () { + this.fileSize = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.reserved = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.offset = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.headerSize = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.width = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.height = this.datav.getInt32(this.pos, true); + this.pos += 4; + this.planes = this.datav.getUint16(this.pos, true); + this.pos += 2; + this.bitPP = this.datav.getUint16(this.pos, true); + this.pos += 2; + this.compress = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.rawSize = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.hr = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.vr = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.colors = this.datav.getUint32(this.pos, true); + this.pos += 4; + this.importantColors = this.datav.getUint32(this.pos, true); + this.pos += 4; + if (this.bitPP === 16 && this.is_with_alpha) { + this.bitPP = 15; + } + if (this.bitPP < 15) { + var len = this.colors === 0 ? 1 << this.bitPP : this.colors; + this.palette = new Array(len); + for (var i = 0; i < len; i++) { + var blue = this.datav.getUint8(this.pos++, true); + var green = this.datav.getUint8(this.pos++, true); + var red = this.datav.getUint8(this.pos++, true); + var quad = this.datav.getUint8(this.pos++, true); + this.palette[i] = { + red: red, + green: green, + blue: blue, + quad: quad + }; + } + } + if (this.height < 0) { + this.height *= -1; + this.bottom_up = false; + } + }; + BmpDecoder.prototype.parseBGR = function () { + this.pos = this.offset; + try { + var bitn = "bit" + this.bitPP; + var len = this.width * this.height * 4; + this.data = new Uint8Array(len); + this[bitn](); + } catch (e) { + console.log("bit decode error:" + e); + } + }; + BmpDecoder.prototype.bit1 = function () { + var xlen = Math.ceil(this.width / 8); + var mode = xlen % 4; + var y; + for (y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < xlen; x++) { + var b = this.datav.getUint8(this.pos++, true); + var location = line * this.width * 4 + x * 8 * 4; + for (var i = 0; i < 8; i++) { + if (x * 8 + i < this.width) { + var rgb = this.palette[b >> 7 - i & 0x1]; + this.data[location + i * 4] = rgb.blue; + this.data[location + i * 4 + 1] = rgb.green; + this.data[location + i * 4 + 2] = rgb.red; + this.data[location + i * 4 + 3] = 0xff; + } else { + break; + } + } + } + if (mode !== 0) { + this.pos += 4 - mode; + } + } + }; + BmpDecoder.prototype.bit4 = function () { + var xlen = Math.ceil(this.width / 2); + var mode = xlen % 4; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < xlen; x++) { + var b = this.datav.getUint8(this.pos++, true); + var location = line * this.width * 4 + x * 2 * 4; + var before = b >> 4; + var after = b & 0x0f; + var rgb = this.palette[before]; + this.data[location] = rgb.blue; + this.data[location + 1] = rgb.green; + this.data[location + 2] = rgb.red; + this.data[location + 3] = 0xff; + if (x * 2 + 1 >= this.width) break; + rgb = this.palette[after]; + this.data[location + 4] = rgb.blue; + this.data[location + 4 + 1] = rgb.green; + this.data[location + 4 + 2] = rgb.red; + this.data[location + 4 + 3] = 0xff; + } + if (mode !== 0) { + this.pos += 4 - mode; + } + } + }; + BmpDecoder.prototype.bit8 = function () { + var mode = this.width % 4; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var b = this.datav.getUint8(this.pos++, true); + var location = line * this.width * 4 + x * 4; + if (b < this.palette.length) { + var rgb = this.palette[b]; + this.data[location] = rgb.red; + this.data[location + 1] = rgb.green; + this.data[location + 2] = rgb.blue; + this.data[location + 3] = 0xff; + } else { + this.data[location] = 0xff; + this.data[location + 1] = 0xff; + this.data[location + 2] = 0xff; + this.data[location + 3] = 0xff; + } + } + if (mode !== 0) { + this.pos += 4 - mode; + } + } + }; + BmpDecoder.prototype.bit15 = function () { + var dif_w = this.width % 3; + var _11111 = parseInt("11111", 2), + _1_5 = _11111; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var B = this.datav.getUint16(this.pos, true); + this.pos += 2; + var blue = (B & _1_5) / _1_5 * 255 | 0; + var green = (B >> 5 & _1_5) / _1_5 * 255 | 0; + var red = (B >> 10 & _1_5) / _1_5 * 255 | 0; + var alpha = B >> 15 ? 0xff : 0x00; + var location = line * this.width * 4 + x * 4; + this.data[location] = red; + this.data[location + 1] = green; + this.data[location + 2] = blue; + this.data[location + 3] = alpha; + } + //skip extra bytes + this.pos += dif_w; + } + }; + BmpDecoder.prototype.bit16 = function () { + var dif_w = this.width % 3; + var _11111 = parseInt("11111", 2), + _1_5 = _11111; + var _111111 = parseInt("111111", 2), + _1_6 = _111111; + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var B = this.datav.getUint16(this.pos, true); + this.pos += 2; + var alpha = 0xff; + var blue = (B & _1_5) / _1_5 * 255 | 0; + var green = (B >> 5 & _1_6) / _1_6 * 255 | 0; + var red = (B >> 11) / _1_5 * 255 | 0; + var location = line * this.width * 4 + x * 4; + this.data[location] = red; + this.data[location + 1] = green; + this.data[location + 2] = blue; + this.data[location + 3] = alpha; + } + //skip extra bytes + this.pos += dif_w; + } + }; + BmpDecoder.prototype.bit24 = function () { + //when height > 0 + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var blue = this.datav.getUint8(this.pos++, true); + var green = this.datav.getUint8(this.pos++, true); + var red = this.datav.getUint8(this.pos++, true); + var location = line * this.width * 4 + x * 4; + this.data[location] = red; + this.data[location + 1] = green; + this.data[location + 2] = blue; + this.data[location + 3] = 0xff; + } + //skip extra bytes + this.pos += this.width % 4; + } + }; + + /** + * add 32bit decode func + * @author soubok + */ + BmpDecoder.prototype.bit32 = function () { + //when height > 0 + for (var y = this.height - 1; y >= 0; y--) { + var line = this.bottom_up ? y : this.height - 1 - y; + for (var x = 0; x < this.width; x++) { + var blue = this.datav.getUint8(this.pos++, true); + var green = this.datav.getUint8(this.pos++, true); + var red = this.datav.getUint8(this.pos++, true); + var alpha = this.datav.getUint8(this.pos++, true); + var location = line * this.width * 4 + x * 4; + this.data[location] = red; + this.data[location + 1] = green; + this.data[location + 2] = blue; + this.data[location + 3] = alpha; + } + //skip extra bytes + //this.pos += (this.width % 4); + } + }; + BmpDecoder.prototype.getData = function () { + return this.data; + }; + + /** + * @license + * Copyright (c) 2018 Aras Abbasi + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF bmp Support PlugIn + * @name bmp_support + * @module + */ + (function (jsPDFAPI) { + + jsPDFAPI.processBMP = function (imageData, index, alias, compression) { + var reader = new BmpDecoder(imageData, false); + var width = reader.width, + height = reader.height; + var qu = 100; + var pixels = reader.getData(); + var rawImageData = { + data: pixels, + width: width, + height: height + }; + var encoder = new JPEGEncoder(qu); + var data = encoder.encode(rawImageData, qu); + return jsPDFAPI.processJPEG.call(this, data, index, alias, compression); + }; + })(jsPDF.API); + + function WebPDecoder(imageData) { + function x(F) { + if (!F) throw Error("assert :P"); + } + function fa(F, L, J) { + for (var H = 0; 4 > H; H++) { + if (F[L + H] != J.charCodeAt(H)) return !0; + } + return !1; + } + function I(F, L, J, H, Z) { + for (var O = 0; O < Z; O++) { + F[L + O] = J[H + O]; + } + } + function M(F, L, J, H) { + for (var Z = 0; Z < H; Z++) { + F[L + Z] = J; + } + } + function V(F) { + return new Int32Array(F); + } + function wa(F, L) { + for (var J = [], H = 0; H < F; H++) { + J.push(new L()); + } + return J; + } + function wb() { + function F(J, H, Z) { + for (var O = Z[H], L = 0; L < O; L++) { + J.push(Z.length > H + 1 ? [] : 0); + if (Z.length < H + 1) break; + F(J[L], H + 1, Z); + } + } + var L = []; + F(L, 0, [3, 11]); + return L; + } + function Ed(F, L) { + function J(H, O, F) { + for (var Z = F[O], ma = 0; ma < Z; ma++) { + H.push(F.length > O + 1 ? [] : new L()); + if (F.length < O + 1) break; + J(H[ma], O + 1, F); + } + } + var H = []; + J(H, 0, F); + return H; + } + var _WebPDecoder = function _WebPDecoder() { + var self = this; + function L(a, b) { + for (var c = 1 << b - 1 >>> 0; a & c;) { + c >>>= 1; + } + return c ? (a & c - 1) + c : a; + } + function J(a, b, c, d, e) { + x(!(d % c)); + do { + d -= c, a[b + d] = e; + } while (0 < d); + } + function H(a, b, c, d, e, f) { + var g = b, + h = 1 << c, + k, + l, + m = V(16), + n = V(16); + x(0 != e); + x(null != d); + x(null != a); + x(0 < c); + for (l = 0; l < e; ++l) { + if (15 < d[l]) return 0; + ++m[d[l]]; + } + if (m[0] == e) return 0; + n[1] = 0; + for (k = 1; 15 > k; ++k) { + if (m[k] > 1 << k) return 0; + n[k + 1] = n[k] + m[k]; + } + for (l = 0; l < e; ++l) { + k = d[l], 0 < d[l] && (f[n[k]++] = l); + } + if (1 == n[15]) return d = new O(), d.g = 0, d.value = f[0], J(a, g, 1, h, d), h; + var r = -1, + q = h - 1, + t = 0, + v = 1, + p = 1, + u, + w = 1 << c; + l = 0; + k = 1; + for (e = 2; k <= c; ++k, e <<= 1) { + p <<= 1; + v += p; + p -= m[k]; + if (0 > p) return 0; + for (; 0 < m[k]; --m[k]) { + d = new O(), d.g = k, d.value = f[l++], J(a, g + t, e, w, d), t = L(t, k); + } + } + k = c + 1; + for (e = 2; 15 >= k; ++k, e <<= 1) { + p <<= 1; + v += p; + p -= m[k]; + if (0 > p) return 0; + for (; 0 < m[k]; --m[k]) { + d = new O(); + if ((t & q) != r) { + g += w; + r = k; + for (u = 1 << r - c; 15 > r;) { + u -= m[r]; + if (0 >= u) break; + ++r; + u <<= 1; + } + u = r - c; + w = 1 << u; + h += w; + r = t & q; + a[b + r].g = u + c; + a[b + r].value = g - b - r; + } + d.g = k - c; + d.value = f[l++]; + J(a, g + (t >> c), e, w, d); + t = L(t, k); + } + } + return v != 2 * n[15] - 1 ? 0 : h; + } + function Z(a, b, c, d, e) { + x(2328 >= e); + if (512 >= e) var f = V(512);else if (f = V(e), null == f) return 0; + return H(a, b, c, d, e, f); + } + function O() { + this.value = this.g = 0; + } + function Fd() { + this.value = this.g = 0; + } + function Ub() { + this.G = wa(5, O); + this.H = V(5); + this.jc = this.Qb = this.qb = this.nd = 0; + this.pd = wa(xb, Fd); + } + function ma(a, b, c, d) { + x(null != a); + x(null != b); + x(2147483648 > d); + a.Ca = 254; + a.I = 0; + a.b = -8; + a.Ka = 0; + a.oa = b; + a.pa = c; + a.Jd = b; + a.Yc = c + d; + a.Zc = 4 <= d ? c + d - 4 + 1 : c; + Qa(a); + } + function na(a, b) { + for (var c = 0; 0 < b--;) { + c |= K(a, 128) << b; + } + return c; + } + function ca(a, b) { + var c = na(a, b); + return G(a) ? -c : c; + } + function cb(a, b, c, d) { + var e, + f = 0; + x(null != a); + x(null != b); + x(4294967288 > d); + a.Sb = d; + a.Ra = 0; + a.u = 0; + a.h = 0; + 4 < d && (d = 4); + for (e = 0; e < d; ++e) { + f += b[c + e] << 8 * e; + } + a.Ra = f; + a.bb = d; + a.oa = b; + a.pa = c; + } + function Vb(a) { + for (; 8 <= a.u && a.bb < a.Sb;) { + a.Ra >>>= 8, a.Ra += a.oa[a.pa + a.bb] << ob - 8 >>> 0, ++a.bb, a.u -= 8; + } + db(a) && (a.h = 1, a.u = 0); + } + function D(a, b) { + x(0 <= b); + if (!a.h && b <= Gd) { + var c = pb(a) & Hd[b]; + a.u += b; + Vb(a); + return c; + } + a.h = 1; + return a.u = 0; + } + function Wb() { + this.b = this.Ca = this.I = 0; + this.oa = []; + this.pa = 0; + this.Jd = []; + this.Yc = 0; + this.Zc = []; + this.Ka = 0; + } + function Ra() { + this.Ra = 0; + this.oa = []; + this.h = this.u = this.bb = this.Sb = this.pa = 0; + } + function pb(a) { + return a.Ra >>> (a.u & ob - 1) >>> 0; + } + function db(a) { + x(a.bb <= a.Sb); + return a.h || a.bb == a.Sb && a.u > ob; + } + function qb(a, b) { + a.u = b; + a.h = db(a); + } + function Sa(a) { + a.u >= Xb && (x(a.u >= Xb), Vb(a)); + } + function Qa(a) { + x(null != a && null != a.oa); + a.pa < a.Zc ? (a.I = (a.oa[a.pa++] | a.I << 8) >>> 0, a.b += 8) : (x(null != a && null != a.oa), a.pa < a.Yc ? (a.b += 8, a.I = a.oa[a.pa++] | a.I << 8) : a.Ka ? a.b = 0 : (a.I <<= 8, a.b += 8, a.Ka = 1)); + } + function G(a) { + return na(a, 1); + } + function K(a, b) { + var c = a.Ca; + 0 > a.b && Qa(a); + var d = a.b, + e = c * b >>> 8, + f = (a.I >>> d > e) + 0; + f ? (c -= e, a.I -= e + 1 << d >>> 0) : c = e + 1; + d = c; + for (e = 0; 256 <= d;) { + e += 8, d >>= 8; + } + d = 7 ^ e + Id[d]; + a.b -= d; + a.Ca = (c << d) - 1; + return f; + } + function ra(a, b, c) { + a[b + 0] = c >> 24 & 255; + a[b + 1] = c >> 16 & 255; + a[b + 2] = c >> 8 & 255; + a[b + 3] = c >> 0 & 255; + } + function Ta(a, b) { + return a[b + 0] << 0 | a[b + 1] << 8; + } + function Yb(a, b) { + return Ta(a, b) | a[b + 2] << 16; + } + function Ha(a, b) { + return Ta(a, b) | Ta(a, b + 2) << 16; + } + function Zb(a, b) { + var c = 1 << b; + x(null != a); + x(0 < b); + a.X = V(c); + if (null == a.X) return 0; + a.Mb = 32 - b; + a.Xa = b; + return 1; + } + function $b(a, b) { + x(null != a); + x(null != b); + x(a.Xa == b.Xa); + I(b.X, 0, a.X, 0, 1 << b.Xa); + } + function ac() { + this.X = []; + this.Xa = this.Mb = 0; + } + function bc(a, b, c, d) { + x(null != c); + x(null != d); + var e = c[0], + f = d[0]; + 0 == e && (e = (a * f + b / 2) / b); + 0 == f && (f = (b * e + a / 2) / a); + if (0 >= e || 0 >= f) return 0; + c[0] = e; + d[0] = f; + return 1; + } + function xa(a, b) { + return a + (1 << b) - 1 >>> b; + } + function yb(a, b) { + return ((a & 4278255360) + (b & 4278255360) >>> 0 & 4278255360) + ((a & 16711935) + (b & 16711935) >>> 0 & 16711935) >>> 0; + } + function X(a, b) { + self[b] = function (b, d, e, f, g, h, k) { + var c; + for (c = 0; c < g; ++c) { + var m = self[a](h[k + c - 1], e, f + c); + h[k + c] = yb(b[d + c], m); + } + }; + } + function Jd() { + this.ud = this.hd = this.jd = 0; + } + function aa(a, b) { + return (((a ^ b) & 4278124286) >>> 1) + (a & b) >>> 0; + } + function sa(a) { + if (0 <= a && 256 > a) return a; + if (0 > a) return 0; + if (255 < a) return 255; + } + function eb(a, b) { + return sa(a + (a - b + 0.5 >> 1)); + } + function Ia(a, b, c) { + return Math.abs(b - c) - Math.abs(a - c); + } + function cc(a, b, c, d, e, f, g) { + d = f[g - 1]; + for (c = 0; c < e; ++c) { + f[g + c] = d = yb(a[b + c], d); + } + } + function Kd(a, b, c, d, e) { + var f; + for (f = 0; f < c; ++f) { + var g = a[b + f], + h = g >> 8 & 255, + k = g & 16711935, + k = k + ((h << 16) + h), + k = k & 16711935; + d[e + f] = (g & 4278255360) + k >>> 0; + } + } + function dc(a, b) { + b.jd = a >> 0 & 255; + b.hd = a >> 8 & 255; + b.ud = a >> 16 & 255; + } + function Ld(a, b, c, d, e, f) { + var g; + for (g = 0; g < d; ++g) { + var h = b[c + g], + k = h >>> 8, + l = h >>> 16, + m = h, + l = l + ((a.jd << 24 >> 24) * (k << 24 >> 24) >>> 5), + l = l & 255, + m = m + ((a.hd << 24 >> 24) * (k << 24 >> 24) >>> 5), + m = m + ((a.ud << 24 >> 24) * (l << 24 >> 24) >>> 5), + m = m & 255; + e[f + g] = (h & 4278255360) + (l << 16) + m; + } + } + function ec(a, b, c, d, e) { + self[b] = function (a, b, c, k, l, m, n, r, q) { + for (k = n; k < r; ++k) { + for (n = 0; n < q; ++n) { + l[m++] = e(c[d(a[b++])]); + } + } + }; + self[a] = function (a, b, h, k, l, m, n) { + var f = 8 >> a.b, + g = a.Ea, + t = a.K[0], + v = a.w; + if (8 > f) for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) { + var p = 0, + u; + for (u = 0; u < g; ++u) { + u & a || (p = d(k[l++])), m[n++] = e(t[p & v]), p >>= f; + } + } else self["VP8LMapColor" + c](k, l, t, v, m, n, b, h, g); + }; + } + function Md(a, b, c, d, e) { + for (c = b + c; b < c;) { + var f = a[b++]; + d[e++] = f >> 16 & 255; + d[e++] = f >> 8 & 255; + d[e++] = f >> 0 & 255; + } + } + function Nd(a, b, c, d, e) { + for (c = b + c; b < c;) { + var f = a[b++]; + d[e++] = f >> 16 & 255; + d[e++] = f >> 8 & 255; + d[e++] = f >> 0 & 255; + d[e++] = f >> 24 & 255; + } + } + function Od(a, b, c, d, e) { + for (c = b + c; b < c;) { + var f = a[b++], + g = f >> 16 & 240 | f >> 12 & 15, + f = f >> 0 & 240 | f >> 28 & 15; + d[e++] = g; + d[e++] = f; + } + } + function Pd(a, b, c, d, e) { + for (c = b + c; b < c;) { + var f = a[b++], + g = f >> 16 & 248 | f >> 13 & 7, + f = f >> 5 & 224 | f >> 3 & 31; + d[e++] = g; + d[e++] = f; + } + } + function Qd(a, b, c, d, e) { + for (c = b + c; b < c;) { + var f = a[b++]; + d[e++] = f >> 0 & 255; + d[e++] = f >> 8 & 255; + d[e++] = f >> 16 & 255; + } + } + function fb(a, b, c, d, e, f) { + if (0 == f) for (c = b + c; b < c;) { + f = a[b++], ra(d, (f[0] >> 24 | f[1] >> 8 & 65280 | f[2] << 8 & 16711680 | f[3] << 24) >>> 0), e += 32; + } else I(d, e, a, b, c); + } + function gb(a, b) { + self[b][0] = self[a + "0"]; + self[b][1] = self[a + "1"]; + self[b][2] = self[a + "2"]; + self[b][3] = self[a + "3"]; + self[b][4] = self[a + "4"]; + self[b][5] = self[a + "5"]; + self[b][6] = self[a + "6"]; + self[b][7] = self[a + "7"]; + self[b][8] = self[a + "8"]; + self[b][9] = self[a + "9"]; + self[b][10] = self[a + "10"]; + self[b][11] = self[a + "11"]; + self[b][12] = self[a + "12"]; + self[b][13] = self[a + "13"]; + self[b][14] = self[a + "0"]; + self[b][15] = self[a + "0"]; + } + function hb(a) { + return a == zb || a == Ab || a == Ja || a == Bb; + } + function Rd() { + this.eb = []; + this.size = this.A = this.fb = 0; + } + function Sd() { + this.y = []; + this.f = []; + this.ea = []; + this.F = []; + this.Tc = this.Ed = this.Cd = this.Fd = this.lb = this.Db = this.Ab = this.fa = this.J = this.W = this.N = this.O = 0; + } + function Cb() { + this.Rd = this.height = this.width = this.S = 0; + this.f = {}; + this.f.RGBA = new Rd(); + this.f.kb = new Sd(); + this.sd = null; + } + function Td() { + this.width = [0]; + this.height = [0]; + this.Pd = [0]; + this.Qd = [0]; + this.format = [0]; + } + function Ud() { + this.Id = this.fd = this.Md = this.hb = this.ib = this.da = this.bd = this.cd = this.j = this.v = this.Da = this.Sd = this.ob = 0; + } + function Vd(a) { + alert("todo:WebPSamplerProcessPlane"); + return a.T; + } + function Wd(a, b) { + var c = a.T, + d = b.ba.f.RGBA, + e = d.eb, + f = d.fb + a.ka * d.A, + g = P[b.ba.S], + h = a.y, + k = a.O, + l = a.f, + m = a.N, + n = a.ea, + r = a.W, + q = b.cc, + t = b.dc, + v = b.Mc, + p = b.Nc, + u = a.ka, + w = a.ka + a.T, + y = a.U, + A = y + 1 >> 1; + 0 == u ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y) : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y), ++c); + for (; u + 2 < w; u += 2) { + q = l, t = m, v = n, p = r, m += a.Rc, r += a.Rc, f += 2 * d.A, k += 2 * a.fa, g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y); + } + k += a.fa; + a.j + w < a.o ? (I(b.ec, b.fc, h, k, y), I(b.cc, b.dc, l, m, A), I(b.Mc, b.Nc, n, r, A), c--) : w & 1 || g(h, k, null, null, l, m, n, r, l, m, n, r, e, f + d.A, null, null, y); + return c; + } + function Xd(a, b, c) { + var d = a.F, + e = [a.J]; + if (null != d) { + var f = a.U, + g = b.ba.S, + h = g == ya || g == Ja; + b = b.ba.f.RGBA; + var k = [0], + l = a.ka; + k[0] = a.T; + a.Kb && (0 == l ? --k[0] : (--l, e[0] -= a.width), a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l)); + var m = b.eb, + l = b.fb + l * b.A; + a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A); + x(c == k); + a && hb(g) && za(m, l, h, f, k, b.A); + } + return 0; + } + function gc(a) { + var b = a.ma, + c = b.ba.S, + d = 11 > c, + e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c); + b.memory = null; + b.Ib = null; + b.Jb = null; + b.Nd = null; + if (!hc(b.Oa, a, e ? 11 : 12)) return 0; + e && hb(c) && ic(); + if (a.da) alert("todo:use_scaling");else { + if (d) { + if (b.Ib = Vd, a.Kb) { + c = a.U + 1 >> 1; + b.memory = V(a.U + 2 * c); + if (null == b.memory) return 0; + b.ec = b.memory; + b.fc = 0; + b.cc = b.ec; + b.dc = b.fc + a.U; + b.Mc = b.cc; + b.Nc = b.dc + c; + b.Ib = Wd; + ic(); + } + } else alert("todo:EmitYUV"); + e && (b.Jb = Xd, d && Aa()); + } + if (d && !jc) { + for (a = 0; 256 > a; ++a) { + Yd[a] = 89858 * (a - 128) + Ba >> Wa, Zd[a] = -22014 * (a - 128) + Ba, $d[a] = -45773 * (a - 128), ae[a] = 113618 * (a - 128) + Ba >> Wa; + } + for (a = ta; a < Eb; ++a) { + b = 76283 * (a - 16) + Ba >> Wa, be[a - ta] = ga(b, 255), ce[a - ta] = ga(b + 8 >> 4, 15); + } + jc = 1; + } + return 1; + } + function kc(a) { + var b = a.ma, + c = a.U, + d = a.T; + x(!(a.ka & 1)); + if (0 >= c || 0 >= d) return 0; + c = b.Ib(a, b); + null != b.Jb && b.Jb(a, b, c); + b.Dc += c; + return 1; + } + function lc(a) { + a.ma.memory = null; + } + function mc(a, b, c, d) { + if (47 != D(a, 8)) return 0; + b[0] = D(a, 14) + 1; + c[0] = D(a, 14) + 1; + d[0] = D(a, 1); + return 0 != D(a, 3) ? 0 : !a.h; + } + function ib(a, b) { + if (4 > a) return a + 1; + var c = a - 2 >> 1; + return (2 + (a & 1) << c) + D(b, c) + 1; + } + function nc(a, b) { + if (120 < b) return b - 120; + var c = de[b - 1], + c = (c >> 4) * a + (8 - (c & 15)); + return 1 <= c ? c : 1; + } + function ua(a, b, c) { + var d = pb(c); + b += d & 255; + var e = a[b].g - 8; + 0 < e && (qb(c, c.u + 8), d = pb(c), b += a[b].value, b += d & (1 << e) - 1); + qb(c, c.u + a[b].g); + return a[b].value; + } + function ub(a, b, c) { + c.g += a.g; + c.value += a.value << b >>> 0; + x(8 >= c.g); + return a.g; + } + function ha(a, b, c) { + var d = a.xc; + b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)]; + x(b < a.Wb); + return a.Ya[b]; + } + function oc(a, b, c, d) { + var e = a.ab, + f = a.c * b, + g = a.C; + b = g + b; + var h = c, + k = d; + d = a.Ta; + for (c = a.Ua; 0 < e--;) { + var l = a.gc[e], + m = g, + n = b, + r = h, + q = k, + k = d, + h = c, + t = l.Ea; + x(m < n); + x(n <= l.nc); + switch (l.hc) { + case 2: + pc(r, q, (n - m) * t, k, h); + break; + case 0: + var v = l, + p = m, + u = n, + w = k, + y = h, + A = v.Ea; + 0 == p && (ee(r, q, null, null, 1, w, y), cc(r, q + 1, 0, 0, A - 1, w, y + 1), q += A, y += A, ++p); + for (var E = 1 << v.b, B = E - 1, C = xa(A, v.b), N = v.K, v = v.w + (p >> v.b) * C; p < u;) { + var z = N, + Q = v, + S = 1; + for (fe(r, q, w, y - A, 1, w, y); S < A;) { + var K = qc[z[Q++] >> 8 & 15], + D = (S & ~B) + E; + D > A && (D = A); + K(r, q + +S, w, y + S - A, D - S, w, y + S); + S = D; + } + q += A; + y += A; + ++p; + p & B || (v += C); + } + n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t); + break; + case 1: + t = r; + u = q; + r = l.Ea; + q = 1 << l.b; + w = q - 1; + y = r & ~w; + A = r - y; + p = xa(r, l.b); + E = l.K; + for (l = l.w + (m >> l.b) * p; m < n;) { + B = E; + C = l; + N = new Jd(); + v = u + y; + for (z = u + r; u < v;) { + dc(B[C++], N), Fb(N, t, u, q, k, h), u += q, h += q; + } + u < z && (dc(B[C++], N), Fb(N, t, u, A, k, h), u += A, h += A); + ++m; + m & w || (l += p); + } + break; + case 3: + if (r == k && q == h && 0 < l.b) { + y = (n - m) * xa(l.Ea, l.b); + t = h + (n - m) * t - y; + u = k; + r = t; + q = k; + w = h; + A = y; + p = []; + for (y = A - 1; 0 <= y; --y) { + p[y] = q[w + y]; + } + for (y = A - 1; 0 <= y; --y) { + u[r + y] = p[y]; + } + rc(l, m, n, k, t, k, h); + } else rc(l, m, n, r, q, k, h); + } + h = d; + k = c; + } + k != c && I(d, c, h, k, f); + } + function ge(a, b) { + var c = a.V, + d = a.Ba + a.c * a.C, + e = b - a.C; + x(b <= a.l.o); + x(16 >= e); + if (0 < e) { + var f = a.l, + g = a.Ta, + h = a.Ua, + k = f.width; + oc(a, e, c, d); + h = [h]; + c = a.C; + d = b; + e = h; + x(c < d); + x(f.v < f.va); + d > f.o && (d = f.o); + if (c < f.j) { + var l = f.j - c, + c = f.j; + e[0] += l * k; + } + c >= d ? c = 0 : (e[0] += 4 * f.v, f.ka = c - f.j, f.U = f.va - f.v, f.T = d - c, c = 1); + if (c) { + h = h[0]; + c = a.ca; + if (11 > c.S) { + for (var m = c.f.RGBA, d = c.S, e = f.U, f = f.T, l = m.eb, n = m.A, r = f, m = m.fb + a.Ma * m.A; 0 < r--;) { + var q = g, + t = h, + v = e, + p = l, + u = m; + switch (d) { + case Ca: + sc(q, t, v, p, u); + break; + case Ua: + Gb(q, t, v, p, u); + break; + case zb: + Gb(q, t, v, p, u); + za(p, u, 0, v, 1, 0); + break; + case tc: + uc(q, t, v, p, u); + break; + case Va: + fb(q, t, v, p, u, 1); + break; + case Ab: + fb(q, t, v, p, u, 1); + za(p, u, 0, v, 1, 0); + break; + case ya: + fb(q, t, v, p, u, 0); + break; + case Ja: + fb(q, t, v, p, u, 0); + za(p, u, 1, v, 1, 0); + break; + case Db: + Hb(q, t, v, p, u); + break; + case Bb: + Hb(q, t, v, p, u); + vc(p, u, v, 1, 0); + break; + case wc: + xc(q, t, v, p, u); + break; + default: + x(0); + } + h += k; + m += n; + } + a.Ma += f; + } else alert("todo:EmitRescaledRowsYUVA"); + x(a.Ma <= c.height); + } + } + a.C = b; + x(a.C <= a.i); + } + function yc(a) { + var b; + if (0 < a.ua) return 0; + for (b = 0; b < a.Wb; ++b) { + var c = a.Ya[b].G, + d = a.Ya[b].H; + if (0 < c[1][d[1] + 0].g || 0 < c[2][d[2] + 0].g || 0 < c[3][d[3] + 0].g) return 0; + } + return 1; + } + function zc(a, b, c, d, e, f) { + if (0 != a.Z) { + var g = a.qd, + h = a.rd; + for (x(null != ia[a.Z]); b < c; ++b) { + ia[a.Z](g, h, d, e, d, e, f), g = d, h = e, e += f; + } + a.qd = g; + a.rd = h; + } + } + function Ib(a, b) { + var c = a.l.ma, + d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C, + d = a.C < d ? d : a.C; + x(b <= a.l.o); + if (b > d) { + var e = a.l.width, + f = c.ca, + g = c.tb + e * d, + h = a.V, + k = a.Ba + a.c * d, + l = a.gc; + x(1 == a.ab); + x(3 == l[0].hc); + he(l[0], d, b, h, k, f, g); + zc(c, d, b, f, g, e); + } + a.C = a.Ma = b; + } + function Jb(a, b, c, d, e, f, g) { + var h = a.$ / d, + k = a.$ % d, + l = a.m, + m = a.s, + n = c + a.$, + r = n; + e = c + d * e; + var q = c + d * f, + t = 280 + m.ua, + v = a.Pb ? h : 16777216, + p = 0 < m.ua ? m.Wa : null, + u = m.wc, + w = n < q ? ha(m, k, h) : null; + x(a.C < f); + x(q <= e); + var y = !1; + a: for (;;) { + for (; y || n < q;) { + var A = 0; + if (h >= v) { + var v = a, + E = n - c; + x(v.Pb); + v.wd = v.m; + v.xd = E; + 0 < v.s.ua && $b(v.s.Wa, v.s.vb); + v = h + ie; + } + k & u || (w = ha(m, k, h)); + x(null != w); + w.Qb && (b[n] = w.qb, y = !0); + if (!y) if (Sa(l), w.jc) { + var A = l, + E = b, + B = n, + C = w.pd[pb(A) & xb - 1]; + x(w.jc); + 256 > C.g ? (qb(A, A.u + C.g), E[B] = C.value, A = 0) : (qb(A, A.u + C.g - 256), x(256 <= C.value), A = C.value); + 0 == A && (y = !0); + } else A = ua(w.G[0], w.H[0], l); + if (l.h) break; + if (y || 256 > A) { + if (!y) if (w.nd) b[n] = (w.qb | A << 8) >>> 0;else { + Sa(l); + y = ua(w.G[1], w.H[1], l); + Sa(l); + E = ua(w.G[2], w.H[2], l); + B = ua(w.G[3], w.H[3], l); + if (l.h) break; + b[n] = (B << 24 | y << 16 | A << 8 | E) >>> 0; + } + y = !1; + ++n; + ++k; + if (k >= d && (k = 0, ++h, null != g && h <= f && !(h % 16) && g(a, h), null != p)) for (; r < n;) { + A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A; + } + } else if (280 > A) { + A = ib(A - 256, l); + E = ua(w.G[4], w.H[4], l); + Sa(l); + E = ib(E, l); + E = nc(d, E); + if (l.h) break; + if (n - c < E || e - n < A) break a;else for (B = 0; B < A; ++B) { + b[n + B] = b[n + B - E]; + } + n += A; + for (k += A; k >= d;) { + k -= d, ++h, null != g && h <= f && !(h % 16) && g(a, h); + } + x(n <= e); + k & u && (w = ha(m, k, h)); + if (null != p) for (; r < n;) { + A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A; + } + } else if (A < t) { + y = A - 280; + for (x(null != p); r < n;) { + A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A; + } + A = n; + E = p; + x(!(y >>> E.Xa)); + b[A] = E.X[y]; + y = !0; + } else break a; + y || x(l.h == db(l)); + } + if (a.Pb && l.h && n < e) x(a.m.h), a.a = 5, a.m = a.wd, a.$ = a.xd, 0 < a.s.ua && $b(a.s.vb, a.s.Wa);else if (l.h) break a;else null != g && g(a, h > f ? f : h), a.a = 0, a.$ = n - c; + return 1; + } + a.a = 3; + return 0; + } + function Ac(a) { + x(null != a); + a.vc = null; + a.yc = null; + a.Ya = null; + var b = a.Wa; + null != b && (b.X = null); + a.vb = null; + x(null != a); + } + function Bc() { + var a = new je(); + if (null == a) return null; + a.a = 0; + a.xb = Cc; + gb("Predictor", "VP8LPredictors"); + gb("Predictor", "VP8LPredictors_C"); + gb("PredictorAdd", "VP8LPredictorsAdd"); + gb("PredictorAdd", "VP8LPredictorsAdd_C"); + pc = Kd; + Fb = Ld; + sc = Md; + Gb = Nd; + Hb = Od; + xc = Pd; + uc = Qd; + self.VP8LMapColor32b = ke; + self.VP8LMapColor8b = le; + return a; + } + function rb(a, b, c, d, e) { + var f = 1, + g = [a], + h = [b], + k = d.m, + l = d.s, + m = null, + n = 0; + a: for (;;) { + if (c) for (; f && D(k, 1);) { + var r = g, + q = h, + t = d, + v = 1, + p = t.m, + u = t.gc[t.ab], + w = D(p, 2); + if (t.Oc & 1 << w) f = 0;else { + t.Oc |= 1 << w; + u.hc = w; + u.Ea = r[0]; + u.nc = q[0]; + u.K = [null]; + ++t.ab; + x(4 >= t.ab); + switch (w) { + case 0: + case 1: + u.b = D(p, 3) + 2; + v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K); + u.K = u.K[0]; + break; + case 3: + var y = D(p, 8) + 1, + A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3; + r[0] = xa(u.Ea, A); + u.b = A; + var v = rb(y, 1, 0, t, u.K), + E; + if (E = v) { + var B, + C = y, + N = u, + z = 1 << (8 >> N.b), + Q = V(z); + if (null == Q) E = 0;else { + var S = N.K[0], + K = N.w; + Q[0] = N.K[0][0]; + for (B = 1; B < 1 * C; ++B) { + Q[B] = yb(S[K + B], Q[B - 1]); + } + for (; B < 4 * z; ++B) { + Q[B] = 0; + } + N.K[0] = null; + N.K[0] = Q; + E = 1; + } + } + v = E; + break; + case 2: + break; + default: + x(0); + } + f = v; + } + } + g = g[0]; + h = h[0]; + if (f && D(k, 1) && (n = D(k, 4), f = 1 <= n && 11 >= n, !f)) { + d.a = 3; + break a; + } + var H; + if (H = f) b: { + var F = d, + G = g, + L = h, + J = n, + T = c, + Da, + ba, + X = F.m, + R = F.s, + P = [null], + U, + W = 1, + aa = 0, + na = me[J]; + c: for (;;) { + if (T && D(X, 1)) { + var ca = D(X, 3) + 2, + ga = xa(G, ca), + ka = xa(L, ca), + qa = ga * ka; + if (!rb(ga, ka, 0, F, P)) break c; + P = P[0]; + R.xc = ca; + for (Da = 0; Da < qa; ++Da) { + var ia = P[Da] >> 8 & 65535; + P[Da] = ia; + ia >= W && (W = ia + 1); + } + } + if (X.h) break c; + for (ba = 0; 5 > ba; ++ba) { + var Y = Dc[ba]; + !ba && 0 < J && (Y += 1 << J); + aa < Y && (aa = Y); + } + var ma = wa(W * na, O); + var ua = W, + va = wa(ua, Ub); + if (null == va) var la = null;else x(65536 >= ua), la = va; + var ha = V(aa); + if (null == la || null == ha || null == ma) { + F.a = 1; + break c; + } + var pa = ma; + for (Da = U = 0; Da < W; ++Da) { + var ja = la[Da], + da = ja.G, + ea = ja.H, + Fa = 0, + ra = 1, + Ha = 0; + for (ba = 0; 5 > ba; ++ba) { + Y = Dc[ba]; + da[ba] = pa; + ea[ba] = U; + !ba && 0 < J && (Y += 1 << J); + d: { + var sa, + za = Y, + ta = F, + oa = ha, + db = pa, + eb = U, + Ia = 0, + Ka = ta.m, + fb = D(Ka, 1); + M(oa, 0, 0, za); + if (fb) { + var gb = D(Ka, 1) + 1, + hb = D(Ka, 1), + Ja = D(Ka, 0 == hb ? 1 : 8); + oa[Ja] = 1; + 2 == gb && (Ja = D(Ka, 8), oa[Ja] = 1); + var ya = 1; + } else { + var Ua = V(19), + Va = D(Ka, 4) + 4; + if (19 < Va) { + ta.a = 3; + var Aa = 0; + break d; + } + for (sa = 0; sa < Va; ++sa) { + Ua[ne[sa]] = D(Ka, 3); + } + var Ba = void 0, + sb = void 0, + Wa = ta, + ib = Ua, + Ca = za, + Xa = oa, + Oa = 0, + La = Wa.m, + Ya = 8, + Za = wa(128, O); + e: for (;;) { + if (!Z(Za, 0, 7, ib, 19)) break e; + if (D(La, 1)) { + var kb = 2 + 2 * D(La, 3), + Ba = 2 + D(La, kb); + if (Ba > Ca) break e; + } else Ba = Ca; + for (sb = 0; sb < Ca && Ba--;) { + Sa(La); + var $a = Za[0 + (pb(La) & 127)]; + qb(La, La.u + $a.g); + var jb = $a.value; + if (16 > jb) Xa[sb++] = jb, 0 != jb && (Ya = jb);else { + var lb = 16 == jb, + ab = jb - 16, + mb = oe[ab], + bb = D(La, pe[ab]) + mb; + if (sb + bb > Ca) break e;else for (var nb = lb ? Ya : 0; 0 < bb--;) { + Xa[sb++] = nb; + } + } + } + Oa = 1; + break e; + } + Oa || (Wa.a = 3); + ya = Oa; + } + (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za)); + ya && 0 != Ia ? Aa = Ia : (ta.a = 3, Aa = 0); + } + if (0 == Aa) break c; + ra && 1 == qe[ba] && (ra = 0 == pa[U].g); + Fa += pa[U].g; + U += Aa; + if (3 >= ba) { + var Pa = ha[0], + tb; + for (tb = 1; tb < Y; ++tb) { + ha[tb] > Pa && (Pa = ha[tb]); + } + Ha += Pa; + } + } + ja.nd = ra; + ja.Qb = 0; + ra && (ja.qb = (da[3][ea[3] + 0].value << 24 | da[1][ea[1] + 0].value << 16 | da[2][ea[2] + 0].value) >>> 0, 0 == Fa && 256 > da[0][ea[0] + 0].value && (ja.Qb = 1, ja.qb += da[0][ea[0] + 0].value << 8)); + ja.jc = !ja.Qb && 6 > Ha; + if (ja.jc) { + var Ga, + Ea = ja; + for (Ga = 0; Ga < xb; ++Ga) { + var Ma = Ga, + Na = Ea.pd[Ma], + vb = Ea.G[0][Ea.H[0] + Ma]; + 256 <= vb.value ? (Na.g = vb.g + 256, Na.value = vb.value) : (Na.g = 0, Na.value = 0, Ma >>= ub(vb, 8, Na), Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na), Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na), ub(Ea.G[3][Ea.H[3] + Ma], 24, Na)); + } + } + } + R.vc = P; + R.Wb = W; + R.Ya = la; + R.yc = ma; + H = 1; + break b; + } + H = 0; + } + f = H; + if (!f) { + d.a = 3; + break a; + } + if (0 < n) { + if (l.ua = 1 << n, !Zb(l.Wa, n)) { + d.a = 1; + f = 0; + break a; + } + } else l.ua = 0; + var Qa = d, + cb = g, + ob = h, + Ra = Qa.s, + Ta = Ra.xc; + Qa.c = cb; + Qa.i = ob; + Ra.md = xa(cb, Ta); + Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1; + if (c) { + d.xb = re; + break a; + } + m = V(g * h); + if (null == m) { + d.a = 1; + f = 0; + break a; + } + f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h; + break a; + } + f ? (null != e ? e[0] = m : (x(null == m), x(c)), d.$ = 0, c || Ac(l)) : Ac(l); + return f; + } + function Ec(a, b) { + var c = a.c * a.i, + d = c + b + 16 * b; + x(a.c <= b); + a.V = V(d); + if (null == a.V) return a.Ta = null, a.Ua = 0, a.a = 1, 0; + a.Ta = a.V; + a.Ua = a.Ba + c + b; + return 1; + } + function se(a, b) { + var c = a.C, + d = b - c, + e = a.V, + f = a.Ba + a.c * c; + for (x(b <= a.l.o); 0 < d;) { + var g = 16 < d ? 16 : d, + h = a.l.ma, + k = a.l.width, + l = k * g, + m = h.ca, + n = h.tb + k * c, + r = a.Ta, + q = a.Ua; + oc(a, g, e, f); + Fc(r, q, m, n, l); + zc(h, c, c + g, m, n, k); + d -= g; + e += g * a.c; + c += g; + } + x(c == b); + a.C = a.Ma = b; + } + function te(a, b) { + var c = [0], + d = [0], + e = [0]; + a: for (;;) { + if (null == a) return 0; + if (null == b) return a.a = 2, 0; + a.l = b; + a.a = 0; + cb(a.m, b.data, b.w, b.ha); + if (!mc(a.m, c, d, e)) { + a.a = 3; + break a; + } + a.xb = Cc; + b.width = c[0]; + b.height = d[0]; + if (!rb(c[0], d[0], 1, a, null)) break a; + return 1; + } + x(0 != a.a); + return 0; + } + function ue() { + this.ub = this.yd = this.td = this.Rb = 0; + } + function ve() { + this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0; + } + function we() { + this.Fb = this.Bb = this.Cb = 0; + this.Zb = V(4); + this.Lb = V(4); + } + function Gc() { + this.Yb = wb(); + } + function xe() { + this.jb = V(3); + this.Wc = Ed([4, 8], Gc); + this.Xc = Ed([4, 17], Gc); + } + function ye() { + this.Pc = this.wb = this.Tb = this.zd = 0; + this.vd = new V(4); + this.od = new V(4); + } + function Xa() { + this.ld = this.La = this.dd = this.tc = 0; + } + function Hc() { + this.Na = this.la = 0; + } + function ze() { + this.Sc = [0, 0]; + this.Eb = [0, 0]; + this.Qc = [0, 0]; + this.ia = this.lc = 0; + } + function Kb() { + this.ad = V(384); + this.Za = 0; + this.Ob = V(16); + this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0; + } + function Ae() { + this.uc = this.M = this.Nb = 0; + this.wa = Array(new Xa()); + this.Y = 0; + this.ya = Array(new Kb()); + this.aa = 0; + this.l = new Oa(); + } + function Ic() { + this.y = V(16); + this.f = V(8); + this.ea = V(8); + } + function Be() { + this.cb = this.a = 0; + this.sc = ""; + this.m = new Wb(); + this.Od = new ue(); + this.Kc = new ve(); + this.ed = new ye(); + this.Qa = new we(); + this.Ic = this.$c = this.Aa = 0; + this.D = new Ae(); + this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0; + this.Jc = wa(8, Wb); + this.ia = 0; + this.pb = wa(4, ze); + this.Pa = new xe(); + this.Bd = this.kc = 0; + this.Ac = []; + this.Bc = 0; + this.zc = [0, 0, 0, 0]; + this.Gd = Array(new Ic()); + this.Hd = 0; + this.rb = Array(new Hc()); + this.sb = 0; + this.wa = Array(new Xa()); + this.Y = 0; + this.oc = []; + this.pc = 0; + this.sa = []; + this.ta = 0; + this.qa = []; + this.ra = 0; + this.Ha = []; + this.B = this.R = this.Ia = 0; + this.Ec = []; + this.M = this.ja = this.Vb = this.Fc = 0; + this.ya = Array(new Kb()); + this.L = this.aa = 0; + this.gd = Ed([4, 2], Xa); + this.ga = null; + this.Fa = []; + this.Cc = this.qc = this.P = 0; + this.Gb = []; + this.Uc = 0; + this.mb = []; + this.nb = 0; + this.rc = []; + this.Ga = this.Vc = 0; + } + function ga(a, b) { + return 0 > a ? 0 : a > b ? b : a; + } + function Oa() { + this.T = this.U = this.ka = this.height = this.width = 0; + this.y = []; + this.f = []; + this.ea = []; + this.Rc = this.fa = this.W = this.N = this.O = 0; + this.ma = "void"; + this.put = "VP8IoPutHook"; + this.ac = "VP8IoSetupHook"; + this.bc = "VP8IoTeardownHook"; + this.ha = this.Kb = 0; + this.data = []; + this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0; + this.F = []; + this.J = 0; + } + function Ce() { + var a = new Be(); + null != a && (a.a = 0, a.sc = "OK", a.cb = 0, a.Xb = 0, oa || (oa = De)); + return a; + } + function T(a, b, c) { + 0 == a.a && (a.a = b, a.sc = c, a.cb = 0); + return 0; + } + function Jc(a, b, c) { + return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2]; + } + function Kc(a, b) { + if (null == a) return 0; + a.a = 0; + a.sc = "OK"; + if (null == b) return T(a, 2, "null VP8Io passed to VP8GetHeaders()"); + var c = b.data; + var d = b.w; + var e = b.ha; + if (4 > e) return T(a, 7, "Truncated header."); + var f = c[d + 0] | c[d + 1] << 8 | c[d + 2] << 16; + var g = a.Od; + g.Rb = !(f & 1); + g.td = f >> 1 & 7; + g.yd = f >> 4 & 1; + g.ub = f >> 5; + if (3 < g.td) return T(a, 3, "Incorrect keyframe parameters."); + if (!g.yd) return T(a, 4, "Frame not displayable."); + d += 3; + e -= 3; + var h = a.Kc; + if (g.Rb) { + if (7 > e) return T(a, 7, "cannot parse picture header"); + if (!Jc(c, d, e)) return T(a, 3, "Bad code word"); + h.c = (c[d + 4] << 8 | c[d + 3]) & 16383; + h.Td = c[d + 4] >> 6; + h.i = (c[d + 6] << 8 | c[d + 5]) & 16383; + h.Ud = c[d + 6] >> 6; + d += 7; + e -= 7; + a.za = h.c + 15 >> 4; + a.Ub = h.i + 15 >> 4; + b.width = h.c; + b.height = h.i; + b.Da = 0; + b.j = 0; + b.v = 0; + b.va = b.width; + b.o = b.height; + b.da = 0; + b.ib = b.width; + b.hb = b.height; + b.U = b.width; + b.T = b.height; + f = a.Pa; + M(f.jb, 0, 255, f.jb.length); + f = a.Qa; + x(null != f); + f.Cb = 0; + f.Bb = 0; + f.Fb = 1; + M(f.Zb, 0, 0, f.Zb.length); + M(f.Lb, 0, 0, f.Lb); + } + if (g.ub > e) return T(a, 7, "bad partition length"); + f = a.m; + ma(f, c, d, g.ub); + d += g.ub; + e -= g.ub; + g.Rb && (h.Ld = G(f), h.Kd = G(f)); + h = a.Qa; + var k = a.Pa, + l; + x(null != f); + x(null != h); + h.Cb = G(f); + if (h.Cb) { + h.Bb = G(f); + if (G(f)) { + h.Fb = G(f); + for (l = 0; 4 > l; ++l) { + h.Zb[l] = G(f) ? ca(f, 7) : 0; + } + for (l = 0; 4 > l; ++l) { + h.Lb[l] = G(f) ? ca(f, 6) : 0; + } + } + if (h.Bb) for (l = 0; 3 > l; ++l) { + k.jb[l] = G(f) ? na(f, 8) : 255; + } + } else h.Bb = 0; + if (f.Ka) return T(a, 3, "cannot parse segment header"); + h = a.ed; + h.zd = G(f); + h.Tb = na(f, 6); + h.wb = na(f, 3); + h.Pc = G(f); + if (h.Pc && G(f)) { + for (k = 0; 4 > k; ++k) { + G(f) && (h.vd[k] = ca(f, 6)); + } + for (k = 0; 4 > k; ++k) { + G(f) && (h.od[k] = ca(f, 6)); + } + } + a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2; + if (f.Ka) return T(a, 3, "cannot parse filter header"); + l = d; + var m = e; + e = l; + d = l + m; + h = m; + a.Xb = (1 << na(a.m, 2)) - 1; + k = a.Xb; + if (m < 3 * k) c = 7;else { + l += 3 * k; + h -= 3 * k; + for (m = 0; m < k; ++m) { + var n = c[e + 0] | c[e + 1] << 8 | c[e + 2] << 16; + n > h && (n = h); + ma(a.Jc[+m], c, l, n); + l += n; + h -= n; + e += 3; + } + ma(a.Jc[+k], c, l, h); + c = l < d ? 0 : 5; + } + if (0 != c) return T(a, c, "cannot parse partitions"); + l = a.m; + c = na(l, 7); + e = G(l) ? ca(l, 4) : 0; + d = G(l) ? ca(l, 4) : 0; + h = G(l) ? ca(l, 4) : 0; + k = G(l) ? ca(l, 4) : 0; + l = G(l) ? ca(l, 4) : 0; + m = a.Qa; + for (n = 0; 4 > n; ++n) { + if (m.Cb) { + var r = m.Zb[n]; + m.Fb || (r += c); + } else if (0 < n) { + a.pb[n] = a.pb[0]; + continue; + } else r = c; + var q = a.pb[n]; + q.Sc[0] = Lb[ga(r + e, 127)]; + q.Sc[1] = Mb[ga(r + 0, 127)]; + q.Eb[0] = 2 * Lb[ga(r + d, 127)]; + q.Eb[1] = 101581 * Mb[ga(r + h, 127)] >> 16; + 8 > q.Eb[1] && (q.Eb[1] = 8); + q.Qc[0] = Lb[ga(r + k, 117)]; + q.Qc[1] = Mb[ga(r + l, 127)]; + q.lc = r + l; + } + if (!g.Rb) return T(a, 4, "Not a key frame."); + G(f); + g = a.Pa; + for (c = 0; 4 > c; ++c) { + for (e = 0; 8 > e; ++e) { + for (d = 0; 3 > d; ++d) { + for (h = 0; 11 > h; ++h) { + k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h], g.Wc[c][e].Yb[d][h] = k; + } + } + } + for (e = 0; 17 > e; ++e) { + g.Xc[c][e] = g.Wc[c][Ge[e]]; + } + } + a.kc = G(f); + a.kc && (a.Bd = na(f, 8)); + return a.cb = 1; + } + function De(a, b, c, d, e, f, g) { + var h = b[e].Yb[c]; + for (c = 0; 16 > e; ++e) { + if (!K(a, h[c + 0])) return e; + for (; !K(a, h[c + 1]);) { + if (h = b[++e].Yb[0], c = 0, 16 == e) return 16; + } + var k = b[e + 1].Yb; + if (K(a, h[c + 2])) { + var l = a, + m = h, + n = c; + var r = 0; + if (K(l, m[n + 3])) { + if (K(l, m[n + 6])) { + h = 0; + r = K(l, m[n + 8]); + m = K(l, m[n + 9 + r]); + n = 2 * r + m; + r = 0; + for (m = He[n]; m[h]; ++h) { + r += r + K(l, m[h]); + } + r += 3 + (8 << n); + } else K(l, m[n + 7]) ? (r = 7 + 2 * K(l, 165), r += K(l, 145)) : r = 5 + K(l, 159); + } else K(l, m[n + 4]) ? r = 3 + K(l, m[n + 5]) : r = 2; + h = k[2]; + } else r = 1, h = k[1]; + k = g + Ie[e]; + l = a; + 0 > l.b && Qa(l); + var m = l.b, + n = l.Ca >> 1, + q = n - (l.I >> m) >> 31; + --l.b; + l.Ca += q; + l.Ca |= 1; + l.I -= (n + 1 & q) << m; + f[k] = ((r ^ q) - q) * d[(0 < e) + 0]; + } + return 16; + } + function Lc(a) { + var b = a.rb[a.sb - 1]; + b.la = 0; + b.Na = 0; + M(a.zc, 0, 0, a.zc.length); + a.ja = 0; + } + function Je(a, b) { + for (a.M = 0; a.M < a.Va; ++a.M) { + var c = a.Jc[a.M & a.Xb], + d = a.m, + e = a, + f; + for (f = 0; f < e.za; ++f) { + var g = d; + var h = e; + var k = h.Ac, + l = h.Bc + 4 * f, + m = h.zc, + n = h.ya[h.aa + f]; + h.Qa.Bb ? n.$b = K(g, h.Pa.jb[0]) ? 2 + K(g, h.Pa.jb[2]) : K(g, h.Pa.jb[1]) : n.$b = 0; + h.kc && (n.Ad = K(g, h.Bd)); + n.Za = !K(g, 145) + 0; + if (n.Za) { + var r = n.Ob, + q = 0; + for (h = 0; 4 > h; ++h) { + var t = m[0 + h]; + var v; + for (v = 0; 4 > v; ++v) { + t = Ke[k[l + v]][t]; + for (var p = Mc[K(g, t[0])]; 0 < p;) { + p = Mc[2 * p + K(g, t[p])]; + } + t = -p; + k[l + v] = t; + } + I(r, q, k, l, 4); + q += 4; + m[0 + h] = t; + } + } else t = K(g, 156) ? K(g, 128) ? 1 : 3 : K(g, 163) ? 2 : 0, n.Ob[0] = t, M(k, l, t, 4), M(m, 0, t, 4); + n.Dd = K(g, 142) ? K(g, 114) ? K(g, 183) ? 1 : 3 : 2 : 0; + } + if (e.m.Ka) return T(a, 7, "Premature end-of-partition0 encountered."); + for (; a.ja < a.za; ++a.ja) { + d = a; + e = c; + g = d.rb[d.sb - 1]; + k = d.rb[d.sb + d.ja]; + f = d.ya[d.aa + d.ja]; + if (l = d.kc ? f.Ad : 0) g.la = k.la = 0, f.Za || (g.Na = k.Na = 0), f.Hc = 0, f.Gc = 0, f.ia = 0;else { + var u, + w, + g = k, + k = e, + l = d.Pa.Xc, + m = d.ya[d.aa + d.ja], + n = d.pb[m.$b]; + h = m.ad; + r = 0; + q = d.rb[d.sb - 1]; + t = v = 0; + M(h, r, 0, 384); + if (m.Za) { + var y = 0; + var A = l[3]; + } else { + p = V(16); + var E = g.Na + q.Na; + E = oa(k, l[1], E, n.Eb, 0, p, 0); + g.Na = q.Na = (0 < E) + 0; + if (1 < E) Nc(p, 0, h, r);else { + var B = p[0] + 3 >> 3; + for (p = 0; 256 > p; p += 16) { + h[r + p] = B; + } + } + y = 1; + A = l[0]; + } + var C = g.la & 15; + var N = q.la & 15; + for (p = 0; 4 > p; ++p) { + var z = N & 1; + for (B = w = 0; 4 > B; ++B) { + E = z + (C & 1), E = oa(k, A, E, n.Sc, y, h, r), z = E > y, C = C >> 1 | z << 7, w = w << 2 | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0]), r += 16; + } + C >>= 4; + N = N >> 1 | z << 7; + v = (v << 8 | w) >>> 0; + } + A = C; + y = N >> 4; + for (u = 0; 4 > u; u += 2) { + w = 0; + C = g.la >> 4 + u; + N = q.la >> 4 + u; + for (p = 0; 2 > p; ++p) { + z = N & 1; + for (B = 0; 2 > B; ++B) { + E = z + (C & 1), E = oa(k, l[2], E, n.Qc, 0, h, r), z = 0 < E, C = C >> 1 | z << 3, w = w << 2 | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0]), r += 16; + } + C >>= 2; + N = N >> 1 | z << 5; + } + t |= w << 4 * u; + A |= C << 4 << u; + y |= (N & 240) << u; + } + g.la = A; + q.la = y; + m.Hc = v; + m.Gc = t; + m.ia = t & 43690 ? 0 : n.ia; + l = !(v | t); + } + 0 < d.L && (d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za], d.wa[d.Y + d.ja].La |= !l); + if (e.Ka) return T(a, 7, "Premature end-of-file encountered."); + } + Lc(a); + c = a; + d = b; + e = 1; + f = c.D; + g = 0 < c.L && c.M >= c.zb && c.M <= c.Va; + if (0 == c.Aa) a: { + f.M = c.M, f.uc = g, Oc(c, f), e = 1; + w = c.D; + f = w.Nb; + t = Ya[c.L]; + g = t * c.R; + k = t / 2 * c.B; + p = 16 * f * c.R; + B = 8 * f * c.B; + l = c.sa; + m = c.ta - g + p; + n = c.qa; + h = c.ra - k + B; + r = c.Ha; + q = c.Ia - k + B; + C = w.M; + N = 0 == C; + v = C >= c.Va - 1; + 2 == c.Aa && Oc(c, w); + if (w.uc) for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) { + var Q = E; + y = w; + A = z; + var S = Q.D, + D = S.Nb; + u = Q.R; + var S = S.wa[S.Y + y], + F = Q.sa, + H = Q.ta + 16 * D * u + 16 * y, + J = S.dd, + G = S.tc; + if (0 != G) if (x(3 <= G), 1 == Q.L) 0 < y && Pc(F, H, u, G + 4), S.La && Qc(F, H, u, G), 0 < A && Rc(F, H, u, G + 4), S.La && Sc(F, H, u, G);else { + var L = Q.B, + O = Q.qa, + P = Q.ra + 8 * D * L + 8 * y, + R = Q.Ha, + Q = Q.Ia + 8 * D * L + 8 * y, + D = S.ld; + 0 < y && (Tc(F, H, u, G + 4, J, D), Uc(O, P, R, Q, L, G + 4, J, D)); + S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D)); + 0 < A && (Xc(F, H, u, G + 4, J, D), Yc(O, P, R, Q, L, G + 4, J, D)); + S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D)); + } + } + c.ia && alert("todo:DitherRow"); + if (null != d.put) { + w = 16 * C; + C = 16 * (C + 1); + N ? (d.y = c.sa, d.O = c.ta + p, d.f = c.qa, d.N = c.ra + B, d.ea = c.Ha, d.W = c.Ia + B) : (w -= t, d.y = l, d.O = m, d.f = n, d.N = h, d.ea = r, d.W = q); + v || (C -= t); + C > d.o && (C = d.o); + d.F = null; + d.J = null; + if (null != c.Fa && 0 < c.Fa.length && w < C && (d.J = Le(c, d, w, C - w), d.F = c.mb, null == d.F && 0 == d.F.length)) { + e = T(c, 3, "Could not decode alpha data."); + break a; + } + w < d.j && (t = d.j - w, w = d.j, x(!(t & 1)), d.O += c.R * t, d.N += c.B * (t >> 1), d.W += c.B * (t >> 1), null != d.F && (d.J += d.width * t)); + w < C && (d.O += d.v, d.N += d.v >> 1, d.W += d.v >> 1, null != d.F && (d.J += d.v), d.ka = w - d.j, d.U = d.va - d.v, d.T = C - w, e = d.put(d)); + } + f + 1 != c.Ic || v || (I(c.sa, c.ta - g, l, m + 16 * c.R, g), I(c.qa, c.ra - k, n, h + 8 * c.B, k), I(c.Ha, c.Ia - k, r, q + 8 * c.B, k)); + } + if (!e) return T(a, 6, "Output aborted."); + } + return 1; + } + function Me(a, b) { + if (null == a) return 0; + if (null == b) return T(a, 2, "NULL VP8Io parameter in VP8Decode()."); + if (!a.cb && !Kc(a, b)) return 0; + x(a.cb); + if (null == b.ac || b.ac(b)) { + b.ob && (a.L = 0); + var c = Ya[a.L]; + 2 == a.L ? (a.yb = 0, a.zb = 0) : (a.yb = b.v - c >> 4, a.zb = b.j - c >> 4, 0 > a.yb && (a.yb = 0), 0 > a.zb && (a.zb = 0)); + a.Va = b.o + 15 + c >> 4; + a.Hb = b.va + 15 + c >> 4; + a.Hb > a.za && (a.Hb = a.za); + a.Va > a.Ub && (a.Va = a.Ub); + if (0 < a.L) { + var d = a.ed; + for (c = 0; 4 > c; ++c) { + var e; + if (a.Qa.Cb) { + var f = a.Qa.Lb[c]; + a.Qa.Fb || (f += d.Tb); + } else f = d.Tb; + for (e = 0; 1 >= e; ++e) { + var g = a.gd[c][e], + h = f; + d.Pc && (h += d.vd[0], e && (h += d.od[0])); + h = 0 > h ? 0 : 63 < h ? 63 : h; + if (0 < h) { + var k = h; + 0 < d.wb && (k = 4 < d.wb ? k >> 2 : k >> 1, k > 9 - d.wb && (k = 9 - d.wb)); + 1 > k && (k = 1); + g.dd = k; + g.tc = 2 * h + k; + g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0; + } else g.tc = 0; + g.La = e; + } + } + } + c = 0; + } else T(a, 6, "Frame setup failed"), c = a.a; + if (c = 0 == c) { + if (c) { + a.$c = 0; + 0 < a.Aa || (a.Ic = Ne); + b: { + c = a.Ic; + var k = a.za, + d = 4 * k, + l = 32 * k, + m = k + 1, + n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0, + r = (2 == a.Aa ? 2 : 1) * k; + e = 3 * (16 * c + Ya[a.L]) / 2 * l; + f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0; + g = d + 832 + e + f; + if (g != g) c = 0;else { + if (g > a.Vb) { + a.Vb = 0; + a.Ec = V(g); + a.Fc = 0; + if (null == a.Ec) { + c = T(a, 1, "no memory during frame initialization."); + break b; + } + a.Vb = g; + } + g = a.Ec; + h = a.Fc; + a.Ac = g; + a.Bc = h; + h += d; + a.Gd = wa(l, Ic); + a.Hd = 0; + a.rb = wa(m + 1, Hc); + a.sb = 1; + a.wa = n ? wa(n, Xa) : null; + a.Y = 0; + a.D.Nb = 0; + a.D.wa = a.wa; + a.D.Y = a.Y; + 0 < a.Aa && (a.D.Y += k); + x(!0); + a.oc = g; + a.pc = h; + h += 832; + a.ya = wa(r, Kb); + a.aa = 0; + a.D.ya = a.ya; + a.D.aa = a.aa; + 2 == a.Aa && (a.D.aa += k); + a.R = 16 * k; + a.B = 8 * k; + l = Ya[a.L]; + k = l * a.R; + l = l / 2 * a.B; + a.sa = g; + a.ta = h + k; + a.qa = a.sa; + a.ra = a.ta + 16 * c * a.R + l; + a.Ha = a.qa; + a.Ia = a.ra + 8 * c * a.B + l; + a.$c = 0; + h += e; + a.mb = f ? g : null; + a.nb = f ? h : null; + x(h + f <= a.Fc + a.Vb); + Lc(a); + M(a.Ac, a.Bc, 0, d); + c = 1; + } + } + if (c) { + b.ka = 0; + b.y = a.sa; + b.O = a.ta; + b.f = a.qa; + b.N = a.ra; + b.ea = a.Ha; + b.Vd = a.Ia; + b.fa = a.R; + b.Rc = a.B; + b.F = null; + b.J = 0; + if (!ad) { + for (c = -255; 255 >= c; ++c) { + bd[255 + c] = 0 > c ? -c : c; + } + for (c = -1020; 1020 >= c; ++c) { + cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c; + } + for (c = -112; 112 >= c; ++c) { + dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c; + } + for (c = -255; 510 >= c; ++c) { + ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c; + } + ad = 1; + } + Nc = Oe; + Za = Pe; + Nb = Qe; + pa = Re; + Ob = Se; + fd = Te; + Xc = Ue; + Tc = Ve; + Yc = We; + Uc = Xe; + Zc = Ye; + Vc = Ze; + $c = $e; + Wc = af; + Rc = gd; + Pc = hd; + Sc = bf; + Qc = cf; + W[0] = df; + W[1] = ef; + W[2] = ff; + W[3] = gf; + W[4] = hf; + W[5] = jf; + W[6] = kf; + W[7] = lf; + W[8] = mf; + W[9] = nf; + Y[0] = of; + Y[1] = pf; + Y[2] = qf; + Y[3] = rf; + Y[4] = sf; + Y[5] = tf; + Y[6] = uf; + ka[0] = vf; + ka[1] = wf; + ka[2] = xf; + ka[3] = yf; + ka[4] = zf; + ka[5] = Af; + ka[6] = Bf; + c = 1; + } else c = 0; + } + c && (c = Je(a, b)); + null != b.bc && b.bc(b); + c &= 1; + } + if (!c) return 0; + a.cb = 0; + return c; + } + function qa(a, b, c, d, e) { + e = a[b + c + 32 * d] + (e >> 3); + a[b + c + 32 * d] = e & -256 ? 0 > e ? 0 : 255 : e; + } + function kb(a, b, c, d, e, f) { + qa(a, b, 0, c, d + e); + qa(a, b, 1, c, d + f); + qa(a, b, 2, c, d - f); + qa(a, b, 3, c, d - e); + } + function da(a) { + return (20091 * a >> 16) + a; + } + function id(a, b, c, d) { + var e = 0, + f; + var g = V(16); + for (f = 0; 4 > f; ++f) { + var h = a[b + 0] + a[b + 8]; + var k = a[b + 0] - a[b + 8]; + var l = (35468 * a[b + 4] >> 16) - da(a[b + 12]); + var m = da(a[b + 4]) + (35468 * a[b + 12] >> 16); + g[e + 0] = h + m; + g[e + 1] = k + l; + g[e + 2] = k - l; + g[e + 3] = h - m; + e += 4; + b++; + } + for (f = e = 0; 4 > f; ++f) { + a = g[e + 0] + 4, h = a + g[e + 8], k = a - g[e + 8], l = (35468 * g[e + 4] >> 16) - da(g[e + 12]), m = da(g[e + 4]) + (35468 * g[e + 12] >> 16), qa(c, d, 0, 0, h + m), qa(c, d, 1, 0, k + l), qa(c, d, 2, 0, k - l), qa(c, d, 3, 0, h - m), e++, d += 32; + } + } + function Te(a, b, c, d) { + var e = a[b + 0] + 4, + f = 35468 * a[b + 4] >> 16, + g = da(a[b + 4]), + h = 35468 * a[b + 1] >> 16; + a = da(a[b + 1]); + kb(c, d, 0, e + g, a, h); + kb(c, d, 1, e + f, a, h); + kb(c, d, 2, e - f, a, h); + kb(c, d, 3, e - g, a, h); + } + function Pe(a, b, c, d, e) { + id(a, b, c, d); + e && id(a, b + 16, c, d + 4); + } + function Qe(a, b, c, d) { + Za(a, b + 0, c, d, 1); + Za(a, b + 32, c, d + 128, 1); + } + function Re(a, b, c, d) { + a = a[b + 0] + 4; + var e; + for (e = 0; 4 > e; ++e) { + for (b = 0; 4 > b; ++b) { + qa(c, d, b, e, a); + } + } + } + function Se(a, b, c, d) { + a[b + 0] && pa(a, b + 0, c, d); + a[b + 16] && pa(a, b + 16, c, d + 4); + a[b + 32] && pa(a, b + 32, c, d + 128); + a[b + 48] && pa(a, b + 48, c, d + 128 + 4); + } + function Oe(a, b, c, d) { + var e = V(16), + f; + for (f = 0; 4 > f; ++f) { + var g = a[b + 0 + f] + a[b + 12 + f]; + var h = a[b + 4 + f] + a[b + 8 + f]; + var k = a[b + 4 + f] - a[b + 8 + f]; + var l = a[b + 0 + f] - a[b + 12 + f]; + e[0 + f] = g + h; + e[8 + f] = g - h; + e[4 + f] = l + k; + e[12 + f] = l - k; + } + for (f = 0; 4 > f; ++f) { + a = e[0 + 4 * f] + 3, g = a + e[3 + 4 * f], h = e[1 + 4 * f] + e[2 + 4 * f], k = e[1 + 4 * f] - e[2 + 4 * f], l = a - e[3 + 4 * f], c[d + 0] = g + h >> 3, c[d + 16] = l + k >> 3, c[d + 32] = g - h >> 3, c[d + 48] = l - k >> 3, d += 64; + } + } + function Pb(a, b, c) { + var d = b - 32, + e = R, + f = 255 - a[d - 1], + g; + for (g = 0; g < c; ++g) { + var h = e, + k = f + a[b - 1], + l; + for (l = 0; l < c; ++l) { + a[b + l] = h[k + a[d + l]]; + } + b += 32; + } + } + function ef(a, b) { + Pb(a, b, 4); + } + function wf(a, b) { + Pb(a, b, 8); + } + function pf(a, b) { + Pb(a, b, 16); + } + function qf(a, b) { + var c; + for (c = 0; 16 > c; ++c) { + I(a, b + 32 * c, a, b - 32, 16); + } + } + function rf(a, b) { + var c; + for (c = 16; 0 < c; --c) { + M(a, b, a[b - 1], 16), b += 32; + } + } + function $a(a, b, c) { + var d; + for (d = 0; 16 > d; ++d) { + M(b, c + 32 * d, a, 16); + } + } + function of(a, b) { + var c = 16, + d; + for (d = 0; 16 > d; ++d) { + c += a[b - 1 + 32 * d] + a[b + d - 32]; + } + $a(c >> 5, a, b); + } + function sf(a, b) { + var c = 8, + d; + for (d = 0; 16 > d; ++d) { + c += a[b - 1 + 32 * d]; + } + $a(c >> 4, a, b); + } + function tf(a, b) { + var c = 8, + d; + for (d = 0; 16 > d; ++d) { + c += a[b + d - 32]; + } + $a(c >> 4, a, b); + } + function uf(a, b) { + $a(128, a, b); + } + function z(a, b, c) { + return a + 2 * b + c + 2 >> 2; + } + function ff(a, b) { + var c = b - 32, + c = new Uint8Array([z(a[c - 1], a[c + 0], a[c + 1]), z(a[c + 0], a[c + 1], a[c + 2]), z(a[c + 1], a[c + 2], a[c + 3]), z(a[c + 2], a[c + 3], a[c + 4])]), + d; + for (d = 0; 4 > d; ++d) { + I(a, b + 32 * d, c, 0, c.length); + } + } + function gf(a, b) { + var c = a[b - 1], + d = a[b - 1 + 32], + e = a[b - 1 + 64], + f = a[b - 1 + 96]; + ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d)); + ra(a, b + 32, 16843009 * z(c, d, e)); + ra(a, b + 64, 16843009 * z(d, e, f)); + ra(a, b + 96, 16843009 * z(e, f, f)); + } + function df(a, b) { + var c = 4, + d; + for (d = 0; 4 > d; ++d) { + c += a[b + d - 32] + a[b - 1 + 32 * d]; + } + c >>= 3; + for (d = 0; 4 > d; ++d) { + M(a, b + 32 * d, c, 4); + } + } + function hf(a, b) { + var c = a[b - 1 + 0], + d = a[b - 1 + 32], + e = a[b - 1 + 64], + f = a[b - 1 - 32], + g = a[b + 0 - 32], + h = a[b + 1 - 32], + k = a[b + 2 - 32], + l = a[b + 3 - 32]; + a[b + 0 + 96] = z(d, e, a[b - 1 + 96]); + a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e); + a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d); + a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c); + a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f); + a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g); + a[b + 3 + 0] = z(l, k, h); + } + function kf(a, b) { + var c = a[b + 1 - 32], + d = a[b + 2 - 32], + e = a[b + 3 - 32], + f = a[b + 4 - 32], + g = a[b + 5 - 32], + h = a[b + 6 - 32], + k = a[b + 7 - 32]; + a[b + 0 + 0] = z(a[b + 0 - 32], c, d); + a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e); + a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f); + a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g); + a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h); + a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k); + a[b + 3 + 96] = z(h, k, k); + } + function jf(a, b) { + var c = a[b - 1 + 0], + d = a[b - 1 + 32], + e = a[b - 1 + 64], + f = a[b - 1 - 32], + g = a[b + 0 - 32], + h = a[b + 1 - 32], + k = a[b + 2 - 32], + l = a[b + 3 - 32]; + a[b + 0 + 0] = a[b + 1 + 64] = f + g + 1 >> 1; + a[b + 1 + 0] = a[b + 2 + 64] = g + h + 1 >> 1; + a[b + 2 + 0] = a[b + 3 + 64] = h + k + 1 >> 1; + a[b + 3 + 0] = k + l + 1 >> 1; + a[b + 0 + 96] = z(e, d, c); + a[b + 0 + 64] = z(d, c, f); + a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g); + a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h); + a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k); + a[b + 3 + 32] = z(h, k, l); + } + function lf(a, b) { + var c = a[b + 0 - 32], + d = a[b + 1 - 32], + e = a[b + 2 - 32], + f = a[b + 3 - 32], + g = a[b + 4 - 32], + h = a[b + 5 - 32], + k = a[b + 6 - 32], + l = a[b + 7 - 32]; + a[b + 0 + 0] = c + d + 1 >> 1; + a[b + 1 + 0] = a[b + 0 + 64] = d + e + 1 >> 1; + a[b + 2 + 0] = a[b + 1 + 64] = e + f + 1 >> 1; + a[b + 3 + 0] = a[b + 2 + 64] = f + g + 1 >> 1; + a[b + 0 + 32] = z(c, d, e); + a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f); + a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g); + a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h); + a[b + 3 + 64] = z(g, h, k); + a[b + 3 + 96] = z(h, k, l); + } + function nf(a, b) { + var c = a[b - 1 + 0], + d = a[b - 1 + 32], + e = a[b - 1 + 64], + f = a[b - 1 + 96]; + a[b + 0 + 0] = c + d + 1 >> 1; + a[b + 2 + 0] = a[b + 0 + 32] = d + e + 1 >> 1; + a[b + 2 + 32] = a[b + 0 + 64] = e + f + 1 >> 1; + a[b + 1 + 0] = z(c, d, e); + a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f); + a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f); + a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[b + 2 + 96] = a[b + 3 + 96] = f; + } + function mf(a, b) { + var c = a[b - 1 + 0], + d = a[b - 1 + 32], + e = a[b - 1 + 64], + f = a[b - 1 + 96], + g = a[b - 1 - 32], + h = a[b + 0 - 32], + k = a[b + 1 - 32], + l = a[b + 2 - 32]; + a[b + 0 + 0] = a[b + 2 + 32] = c + g + 1 >> 1; + a[b + 0 + 32] = a[b + 2 + 64] = d + c + 1 >> 1; + a[b + 0 + 64] = a[b + 2 + 96] = e + d + 1 >> 1; + a[b + 0 + 96] = f + e + 1 >> 1; + a[b + 3 + 0] = z(h, k, l); + a[b + 2 + 0] = z(g, h, k); + a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h); + a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g); + a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c); + a[b + 1 + 96] = z(f, e, d); + } + function xf(a, b) { + var c; + for (c = 0; 8 > c; ++c) { + I(a, b + 32 * c, a, b - 32, 8); + } + } + function yf(a, b) { + var c; + for (c = 0; 8 > c; ++c) { + M(a, b, a[b - 1], 8), b += 32; + } + } + function lb(a, b, c) { + var d; + for (d = 0; 8 > d; ++d) { + M(b, c + 32 * d, a, 8); + } + } + function vf(a, b) { + var c = 8, + d; + for (d = 0; 8 > d; ++d) { + c += a[b + d - 32] + a[b - 1 + 32 * d]; + } + lb(c >> 4, a, b); + } + function Af(a, b) { + var c = 4, + d; + for (d = 0; 8 > d; ++d) { + c += a[b + d - 32]; + } + lb(c >> 3, a, b); + } + function zf(a, b) { + var c = 4, + d; + for (d = 0; 8 > d; ++d) { + c += a[b - 1 + 32 * d]; + } + lb(c >> 3, a, b); + } + function Bf(a, b) { + lb(128, a, b); + } + function ab(a, b, c) { + var d = a[b - c], + e = a[b + 0], + f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]], + g = mb[112 + (f + 4 >> 3)]; + a[b - c] = R[255 + d + mb[112 + (f + 3 >> 3)]]; + a[b + 0] = R[255 + e - g]; + } + function jd(a, b, c, d) { + var e = a[b + 0], + f = a[b + c]; + return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d; + } + function kd(a, b, c, d) { + return 4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d; + } + function ld(a, b, c, d, e) { + var f = a[b - 3 * c], + g = a[b - 2 * c], + h = a[b - c], + k = a[b + 0], + l = a[b + c], + m = a[b + 2 * c], + n = a[b + 3 * c]; + return 4 * U[255 + h - k] + U[255 + g - l] > d ? 0 : U[255 + a[b - 4 * c] - f] <= e && U[255 + f - g] <= e && U[255 + g - h] <= e && U[255 + n - m] <= e && U[255 + m - l] <= e && U[255 + l - k] <= e; + } + function gd(a, b, c, d) { + var e = 2 * d + 1; + for (d = 0; 16 > d; ++d) { + kd(a, b + d, c, e) && ab(a, b + d, c); + } + } + function hd(a, b, c, d) { + var e = 2 * d + 1; + for (d = 0; 16 > d; ++d) { + kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1); + } + } + function bf(a, b, c, d) { + var e; + for (e = 3; 0 < e; --e) { + b += 4 * c, gd(a, b, c, d); + } + } + function cf(a, b, c, d) { + var e; + for (e = 3; 0 < e; --e) { + b += 4, hd(a, b, c, d); + } + } + function ea(a, b, c, d, e, f, g, h) { + for (f = 2 * f + 1; 0 < e--;) { + if (ld(a, b, c, f, g)) if (jd(a, b, c, h)) ab(a, b, c);else { + var k = a, + l = b, + m = c, + n = k[l - 2 * m], + r = k[l - m], + q = k[l + 0], + t = k[l + m], + v = k[l + 2 * m], + p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]], + u = 27 * p + 63 >> 7, + w = 18 * p + 63 >> 7, + p = 9 * p + 63 >> 7; + k[l - 3 * m] = R[255 + k[l - 3 * m] + p]; + k[l - 2 * m] = R[255 + n + w]; + k[l - m] = R[255 + r + u]; + k[l + 0] = R[255 + q - u]; + k[l + m] = R[255 + t - w]; + k[l + 2 * m] = R[255 + v - p]; + } + b += d; + } + } + function Fa(a, b, c, d, e, f, g, h) { + for (f = 2 * f + 1; 0 < e--;) { + if (ld(a, b, c, f, g)) if (jd(a, b, c, h)) ab(a, b, c);else { + var k = a, + l = b, + m = c, + n = k[l - m], + r = k[l + 0], + q = k[l + m], + t = 3 * (r - n), + v = mb[112 + (t + 4 >> 3)], + t = mb[112 + (t + 3 >> 3)], + p = v + 1 >> 1; + k[l - 2 * m] = R[255 + k[l - 2 * m] + p]; + k[l - m] = R[255 + n + t]; + k[l + 0] = R[255 + r - v]; + k[l + m] = R[255 + q - p]; + } + b += d; + } + } + function Ue(a, b, c, d, e, f) { + ea(a, b, c, 1, 16, d, e, f); + } + function Ve(a, b, c, d, e, f) { + ea(a, b, 1, c, 16, d, e, f); + } + function Ye(a, b, c, d, e, f) { + var g; + for (g = 3; 0 < g; --g) { + b += 4 * c, Fa(a, b, c, 1, 16, d, e, f); + } + } + function Ze(a, b, c, d, e, f) { + var g; + for (g = 3; 0 < g; --g) { + b += 4, Fa(a, b, 1, c, 16, d, e, f); + } + } + function We(a, b, c, d, e, f, g, h) { + ea(a, b, e, 1, 8, f, g, h); + ea(c, d, e, 1, 8, f, g, h); + } + function Xe(a, b, c, d, e, f, g, h) { + ea(a, b, 1, e, 8, f, g, h); + ea(c, d, 1, e, 8, f, g, h); + } + function $e(a, b, c, d, e, f, g, h) { + Fa(a, b + 4 * e, e, 1, 8, f, g, h); + Fa(c, d + 4 * e, e, 1, 8, f, g, h); + } + function af(a, b, c, d, e, f, g, h) { + Fa(a, b + 4, 1, e, 8, f, g, h); + Fa(c, d + 4, 1, e, 8, f, g, h); + } + function Cf() { + this.ba = new Cb(); + this.ec = []; + this.cc = []; + this.Mc = []; + this.Dc = this.Nc = this.dc = this.fc = 0; + this.Oa = new Ud(); + this.memory = 0; + this.Ib = "OutputFunc"; + this.Jb = "OutputAlphaFunc"; + this.Nd = "OutputRowFunc"; + } + function md() { + this.data = []; + this.offset = this.kd = this.ha = this.w = 0; + this.na = []; + this.xa = this.gb = this.Ja = this.Sa = this.P = 0; + } + function Df() { + this.nc = this.Ea = this.b = this.hc = 0; + this.K = []; + this.w = 0; + } + function Ef() { + this.ua = 0; + this.Wa = new ac(); + this.vb = new ac(); + this.md = this.xc = this.wc = 0; + this.vc = []; + this.Wb = 0; + this.Ya = new Ub(); + this.yc = new O(); + } + function je() { + this.xb = this.a = 0; + this.l = new Oa(); + this.ca = new Cb(); + this.V = []; + this.Ba = 0; + this.Ta = []; + this.Ua = 0; + this.m = new Ra(); + this.Pb = 0; + this.wd = new Ra(); + this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0; + this.s = new Ef(); + this.ab = 0; + this.gc = wa(4, Df); + this.Oc = 0; + } + function Ff() { + this.Lc = this.Z = this.$a = this.i = this.c = 0; + this.l = new Oa(); + this.ic = 0; + this.ca = []; + this.tb = 0; + this.qd = null; + this.rd = 0; + } + function Rb(a, b, c, d, e, f, g) { + a = null == a ? 0 : a[b + 0]; + for (b = 0; b < g; ++b) { + e[f + b] = a + c[d + b] & 255, a = e[f + b]; + } + } + function Gf(a, b, c, d, e, f, g) { + if (null == a) Rb(null, null, c, d, e, f, g);else { + var h; + for (h = 0; h < g; ++h) { + e[f + h] = a[b + h] + c[d + h] & 255; + } + } + } + function Hf(a, b, c, d, e, f, g) { + if (null == a) Rb(null, null, c, d, e, f, g);else { + var h = a[b + 0], + k = h, + l = h, + m; + for (m = 0; m < g; ++m) { + h = a[b + m], k = l + h - k, l = c[d + m] + (k & -256 ? 0 > k ? 0 : 255 : k) & 255, k = h, e[f + m] = l; + } + } + } + function Le(a, b, c, d) { + var e = b.width, + f = b.o; + x(null != a && null != b); + if (0 > c || 0 >= d || c + d > f) return null; + if (!a.Cc) { + if (null == a.ga) { + a.ga = new Ff(); + var g; + (g = null == a.ga) || (g = b.width * b.o, x(0 == a.Gb.length), a.Gb = V(g), a.Uc = 0, null == a.Gb ? g = 0 : (a.mb = a.Gb, a.nb = a.Uc, a.rc = null, g = 1), g = !g); + if (!g) { + g = a.ga; + var h = a.Fa, + k = a.P, + l = a.qc, + m = a.mb, + n = a.nb, + r = k + 1, + q = l - 1, + t = g.l; + x(null != h && null != m && null != b); + ia[0] = null; + ia[1] = Rb; + ia[2] = Gf; + ia[3] = Hf; + g.ca = m; + g.tb = n; + g.c = b.width; + g.i = b.height; + x(0 < g.c && 0 < g.i); + if (1 >= l) b = 0;else if (g.$a = h[k + 0] >> 0 & 3, g.Z = h[k + 0] >> 2 & 3, g.Lc = h[k + 0] >> 4 & 3, k = h[k + 0] >> 6 & 3, 0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k) b = 0;else if (t.put = kc, t.ac = gc, t.bc = lc, t.ma = g, t.width = b.width, t.height = b.height, t.Da = b.Da, t.v = b.v, t.va = b.va, t.j = b.j, t.o = b.o, g.$a) b: { + x(1 == g.$a), b = Bc(); + c: for (;;) { + if (null == b) { + b = 0; + break b; + } + x(null != g); + g.mc = b; + b.c = g.c; + b.i = g.i; + b.l = g.l; + b.l.ma = g; + b.l.width = g.c; + b.l.height = g.i; + b.a = 0; + cb(b.m, h, r, q); + if (!rb(g.c, g.i, 1, b, null)) break c; + 1 == b.ab && 3 == b.gc[0].hc && yc(b.s) ? (g.ic = 1, h = b.c * b.i, b.Ta = null, b.Ua = 0, b.V = V(h), b.Ba = 0, null == b.V ? (b.a = 1, b = 0) : b = 1) : (g.ic = 0, b = Ec(b, g.c)); + if (!b) break c; + b = 1; + break b; + } + g.mc = null; + b = 0; + } else b = q >= g.c * g.i; + g = !b; + } + if (g) return null; + 1 != a.ga.Lc ? a.Ga = 0 : d = f - c; + } + x(null != a.ga); + x(c + d <= f); + a: { + h = a.ga; + b = h.c; + f = h.l.o; + if (0 == h.$a) { + r = a.rc; + q = a.Vc; + t = a.Fa; + k = a.P + 1 + c * b; + l = a.mb; + m = a.nb + c * b; + x(k <= a.P + a.qc); + if (0 != h.Z) for (x(null != ia[h.Z]), g = 0; g < d; ++g) { + ia[h.Z](r, q, t, k, l, m, b), r = l, q = m, m += b, k += b; + } else for (g = 0; g < d; ++g) { + I(l, m, t, k, b), r = l, q = m, m += b, k += b; + } + a.rc = r; + a.Vc = q; + } else { + x(null != h.mc); + b = c + d; + g = h.mc; + x(null != g); + x(b <= g.i); + if (g.C >= b) b = 1;else if (h.ic || Aa(), h.ic) { + var h = g.V, + r = g.Ba, + q = g.c, + v = g.i, + t = 1, + k = g.$ / q, + l = g.$ % q, + m = g.m, + n = g.s, + p = g.$, + u = q * v, + w = q * b, + y = n.wc, + A = p < w ? ha(n, l, k) : null; + x(p <= u); + x(b <= v); + x(yc(n)); + c: for (;;) { + for (; !m.h && p < w;) { + l & y || (A = ha(n, l, k)); + x(null != A); + Sa(m); + v = ua(A.G[0], A.H[0], m); + if (256 > v) h[r + p] = v, ++p, ++l, l >= q && (l = 0, ++k, k <= b && !(k % 16) && Ib(g, k));else if (280 > v) { + var v = ib(v - 256, m); + var E = ua(A.G[4], A.H[4], m); + Sa(m); + E = ib(E, m); + E = nc(q, E); + if (p >= E && u - p >= v) { + var B; + for (B = 0; B < v; ++B) { + h[r + p + B] = h[r + p + B - E]; + } + } else { + t = 0; + break c; + } + p += v; + for (l += v; l >= q;) { + l -= q, ++k, k <= b && !(k % 16) && Ib(g, k); + } + p < w && l & y && (A = ha(n, l, k)); + } else { + t = 0; + break c; + } + x(m.h == db(m)); + } + Ib(g, k > b ? b : k); + break c; + } + !t || m.h && p < u ? (t = 0, g.a = m.h ? 5 : 3) : g.$ = p; + b = t; + } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se); + if (!b) { + d = 0; + break a; + } + } + c + d >= f && (a.Cc = 1); + d = 1; + } + if (!d) return null; + if (a.Cc && (d = a.ga, null != d && (d.mc = null), a.ga = null, 0 < a.Ga)) return alert("todo:WebPDequantizeLevels"), null; + } + return a.nb + c * e; + } + function If(a, b, c, d, e, f) { + for (; 0 < e--;) { + var g = a, + h = b + (c ? 1 : 0), + k = a, + l = b + (c ? 0 : 3), + m; + for (m = 0; m < d; ++m) { + var n = k[l + 4 * m]; + 255 != n && (n *= 32897, g[h + 4 * m + 0] = g[h + 4 * m + 0] * n >> 23, g[h + 4 * m + 1] = g[h + 4 * m + 1] * n >> 23, g[h + 4 * m + 2] = g[h + 4 * m + 2] * n >> 23); + } + b += f; + } + } + function Jf(a, b, c, d, e) { + for (; 0 < d--;) { + var f; + for (f = 0; f < c; ++f) { + var g = a[b + 2 * f + 0], + h = a[b + 2 * f + 1], + k = h & 15, + l = 4369 * k, + h = (h & 240 | h >> 4) * l >> 16; + a[b + 2 * f + 0] = (g & 240 | g >> 4) * l >> 16 & 240 | (g & 15 | g << 4) * l >> 16 >> 4 & 15; + a[b + 2 * f + 1] = h & 240 | k; + } + b += e; + } + } + function Kf(a, b, c, d, e, f, g, h) { + var k = 255, + l, + m; + for (m = 0; m < e; ++m) { + for (l = 0; l < d; ++l) { + var n = a[b + l]; + f[g + 4 * l] = n; + k &= n; + } + b += c; + g += h; + } + return 255 != k; + } + function Lf(a, b, c, d, e) { + var f; + for (f = 0; f < e; ++f) { + c[d + f] = a[b + f] >> 8; + } + } + function Aa() { + za = If; + vc = Jf; + fc = Kf; + Fc = Lf; + } + function va(a, b, c) { + self[a] = function (a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) { + var d, + E = y - 1 >> 1; + var B = h[k + 0] | l[m + 0] << 16; + var C = n[r + 0] | q[t + 0] << 16; + x(null != a); + var z = 3 * B + C + 131074 >> 2; + b(a[e + 0], z & 255, z >> 16, v, p); + null != f && (z = 3 * C + B + 131074 >> 2, b(f[g + 0], z & 255, z >> 16, u, w)); + for (d = 1; d <= E; ++d) { + var D = h[k + d] | l[m + d] << 16; + var G = n[r + d] | q[t + d] << 16; + var F = B + D + C + G + 524296; + var H = F + 2 * (D + C) >> 3; + F = F + 2 * (B + G) >> 3; + z = H + B >> 1; + B = F + D >> 1; + b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c); + b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c); + null != f && (z = F + C >> 1, B = H + G >> 1, b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c), b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c)); + B = D; + C = G; + } + y & 1 || (z = 3 * B + C + 131074 >> 2, b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c), null != f && (z = 3 * C + B + 131074 >> 2, b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c))); + }; + } + function ic() { + P[Ca] = Mf; + P[Ua] = nd; + P[tc] = Nf; + P[Va] = od; + P[ya] = pd; + P[Db] = qd; + P[wc] = Of; + P[zb] = nd; + P[Ab] = od; + P[Ja] = pd; + P[Bb] = qd; + } + function Sb(a) { + return a & ~Pf ? 0 > a ? 0 : 255 : a >> rd; + } + function bb(a, b) { + return Sb((19077 * a >> 8) + (26149 * b >> 8) - 14234); + } + function nb(a, b, c) { + return Sb((19077 * a >> 8) - (6419 * b >> 8) - (13320 * c >> 8) + 8708); + } + function Pa(a, b) { + return Sb((19077 * a >> 8) + (33050 * b >> 8) - 17685); + } + function Ga(a, b, c, d, e) { + d[e + 0] = bb(a, c); + d[e + 1] = nb(a, b, c); + d[e + 2] = Pa(a, b); + } + function Tb(a, b, c, d, e) { + d[e + 0] = Pa(a, b); + d[e + 1] = nb(a, b, c); + d[e + 2] = bb(a, c); + } + function sd(a, b, c, d, e) { + var f = nb(a, b, c); + b = f << 3 & 224 | Pa(a, b) >> 3; + d[e + 0] = bb(a, c) & 248 | f >> 5; + d[e + 1] = b; + } + function td(a, b, c, d, e) { + var f = Pa(a, b) & 240 | 15; + d[e + 0] = bb(a, c) & 240 | nb(a, b, c) >> 4; + d[e + 1] = f; + } + function ud(a, b, c, d, e) { + d[e + 0] = 255; + Ga(a, b, c, d, e + 1); + } + function vd(a, b, c, d, e) { + Tb(a, b, c, d, e); + d[e + 3] = 255; + } + function wd(a, b, c, d, e) { + Ga(a, b, c, d, e); + d[e + 3] = 255; + } + function ga(a, b) { + return 0 > a ? 0 : a > b ? b : a; + } + function la(a, b, c) { + self[a] = function (a, e, f, g, h, k, l, m, n) { + for (var d = m + (n & -2) * c; m != d;) { + b(a[e + 0], f[g + 0], h[k + 0], l, m), b(a[e + 1], f[g + 0], h[k + 0], l, m + c), e += 2, ++g, ++k, m += 2 * c; + } + n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m); + }; + } + function xd(a, b, c) { + return 0 == c ? 0 == a ? 0 == b ? 6 : 5 : 0 == b ? 4 : 0 : c; + } + function yd(a, b, c, d, e) { + switch (a >>> 30) { + case 3: + Za(b, c, d, e, 0); + break; + case 2: + fd(b, c, d, e); + break; + case 1: + pa(b, c, d, e); + } + } + function Oc(a, b) { + var c, + d, + e = b.M, + f = b.Nb, + g = a.oc, + h = a.pc + 40, + k = a.oc, + l = a.pc + 584, + m = a.oc, + n = a.pc + 600; + for (c = 0; 16 > c; ++c) { + g[h + 32 * c - 1] = 129; + } + for (c = 0; 8 > c; ++c) { + k[l + 32 * c - 1] = 129, m[n + 32 * c - 1] = 129; + } + 0 < e ? g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129 : (M(g, h - 32 - 1, 127, 21), M(k, l - 32 - 1, 127, 9), M(m, n - 32 - 1, 127, 9)); + for (d = 0; d < a.za; ++d) { + var r = b.ya[b.aa + d]; + if (0 < d) { + for (c = -1; 16 > c; ++c) { + I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4); + } + for (c = -1; 8 > c; ++c) { + I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4), I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4); + } + } + var q = a.Gd, + t = a.Hd + d, + v = r.ad, + p = r.Hc; + 0 < e && (I(g, h - 32, q[t].y, 0, 16), I(k, l - 32, q[t].f, 0, 8), I(m, n - 32, q[t].ea, 0, 8)); + if (r.Za) { + var u = g; + var w = h - 32 + 16; + 0 < e && (d >= a.za - 1 ? M(u, w, q[t].y[15], 4) : I(u, w, q[t + 1].y, 0, 4)); + for (c = 0; 4 > c; c++) { + u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c]; + } + for (c = 0; 16 > c; ++c, p <<= 2) { + u = g, w = h + zd[c], W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w); + } + } else if (u = xd(d, e, r.Ob[0]), Y[u](g, h), 0 != p) for (c = 0; 16 > c; ++c, p <<= 2) { + yd(p, v, 16 * +c, g, h + zd[c]); + } + c = r.Gc; + u = xd(d, e, r.Dd); + ka[u](k, l); + ka[u](m, n); + r = c >> 0; + p = v; + u = k; + w = l; + r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w)); + c >>= 8; + r = m; + p = n; + c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p)); + e < a.Ub - 1 && (I(q[t].y, 0, g, h + 480, 16), I(q[t].f, 0, k, l + 224, 8), I(q[t].ea, 0, m, n + 224, 8)); + c = 8 * f * a.B; + q = a.sa; + t = a.ta + 16 * d + 16 * f * a.R; + v = a.qa; + r = a.ra + 8 * d + c; + p = a.Ha; + u = a.Ia + 8 * d + c; + for (c = 0; 16 > c; ++c) { + I(q, t + c * a.R, g, h + 32 * c, 16); + } + for (c = 0; 8 > c; ++c) { + I(v, r + c * a.B, k, l + 32 * c, 8), I(p, u + c * a.B, m, n + 32 * c, 8); + } + } + } + function Ad(a, b, c, d, e, f, g, h, k) { + var l = [0], + m = [0], + n = 0, + r = null != k ? k.kd : 0, + q = null != k ? k : new md(); + if (null == a || 12 > c) return 7; + q.data = a; + q.w = b; + q.ha = c; + b = [b]; + c = [c]; + q.gb = [q.gb]; + a: { + var t = b; + var v = c; + var p = q.gb; + x(null != a); + x(null != v); + x(null != p); + p[0] = 0; + if (12 <= v[0] && !fa(a, t[0], "RIFF")) { + if (fa(a, t[0] + 8, "WEBP")) { + p = 3; + break a; + } + var u = Ha(a, t[0] + 4); + if (12 > u || 4294967286 < u) { + p = 3; + break a; + } + if (r && u > v[0] - 8) { + p = 7; + break a; + } + p[0] = u; + t[0] += 12; + v[0] -= 12; + } + p = 0; + } + if (0 != p) return p; + u = 0 < q.gb[0]; + for (c = c[0];;) { + t = [0]; + n = [n]; + a: { + var w = a; + v = b; + p = c; + var y = n, + A = l, + z = m, + B = t; + y[0] = 0; + if (8 > p[0]) p = 7;else { + if (!fa(w, v[0], "VP8X")) { + if (10 != Ha(w, v[0] + 4)) { + p = 3; + break a; + } + if (18 > p[0]) { + p = 7; + break a; + } + var C = Ha(w, v[0] + 8); + var D = 1 + Yb(w, v[0] + 12); + w = 1 + Yb(w, v[0] + 15); + if (2147483648 <= D * w) { + p = 3; + break a; + } + null != B && (B[0] = C); + null != A && (A[0] = D); + null != z && (z[0] = w); + v[0] += 18; + p[0] -= 18; + y[0] = 1; + } + p = 0; + } + } + n = n[0]; + t = t[0]; + if (0 != p) return p; + v = !!(t & 2); + if (!u && n) return 3; + null != f && (f[0] = !!(t & 16)); + null != g && (g[0] = v); + null != h && (h[0] = 0); + g = l[0]; + t = m[0]; + if (n && v && null == k) { + p = 0; + break; + } + if (4 > c) { + p = 7; + break; + } + if (u && n || !u && !n && !fa(a, b[0], "ALPH")) { + c = [c]; + q.na = [q.na]; + q.P = [q.P]; + q.Sa = [q.Sa]; + a: { + C = a; + p = b; + u = c; + var y = q.gb, + A = q.na, + z = q.P, + B = q.Sa; + D = 22; + x(null != C); + x(null != u); + w = p[0]; + var F = u[0]; + x(null != A); + x(null != B); + A[0] = null; + z[0] = null; + for (B[0] = 0;;) { + p[0] = w; + u[0] = F; + if (8 > F) { + p = 7; + break a; + } + var G = Ha(C, w + 4); + if (4294967286 < G) { + p = 3; + break a; + } + var H = 8 + G + 1 & -2; + D += H; + if (0 < y && D > y) { + p = 3; + break a; + } + if (!fa(C, w, "VP8 ") || !fa(C, w, "VP8L")) { + p = 0; + break a; + } + if (F[0] < H) { + p = 7; + break a; + } + fa(C, w, "ALPH") || (A[0] = C, z[0] = w + 8, B[0] = G); + w += H; + F -= H; + } + } + c = c[0]; + q.na = q.na[0]; + q.P = q.P[0]; + q.Sa = q.Sa[0]; + if (0 != p) break; + } + c = [c]; + q.Ja = [q.Ja]; + q.xa = [q.xa]; + a: if (y = a, p = b, u = c, A = q.gb[0], z = q.Ja, B = q.xa, C = p[0], w = !fa(y, C, "VP8 "), D = !fa(y, C, "VP8L"), x(null != y), x(null != u), x(null != z), x(null != B), 8 > u[0]) p = 7;else { + if (w || D) { + y = Ha(y, C + 4); + if (12 <= A && y > A - 12) { + p = 3; + break a; + } + if (r && y > u[0] - 8) { + p = 7; + break a; + } + z[0] = y; + p[0] += 8; + u[0] -= 8; + B[0] = D; + } else B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5), z[0] = u[0]; + p = 0; + } + c = c[0]; + q.Ja = q.Ja[0]; + q.xa = q.xa[0]; + b = b[0]; + if (0 != p) break; + if (4294967286 < q.Ja) return 3; + null == h || v || (h[0] = q.xa ? 2 : 1); + g = [g]; + t = [t]; + if (q.xa) { + if (5 > c) { + p = 7; + break; + } + h = g; + r = t; + v = f; + null == a || 5 > c ? a = 0 : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5) ? (u = [0], y = [0], A = [0], z = new Ra(), cb(z, a, b, c), mc(z, u, y, A) ? (null != h && (h[0] = u[0]), null != r && (r[0] = y[0]), null != v && (v[0] = A[0]), a = 1) : a = 0) : a = 0; + } else { + if (10 > c) { + p = 7; + break; + } + h = t; + null == a || 10 > c || !Jc(a, b + 3, c - 3) ? a = 0 : (r = a[b + 0] | a[b + 1] << 8 | a[b + 2] << 16, v = (a[b + 7] << 8 | a[b + 6]) & 16383, a = (a[b + 9] << 8 | a[b + 8]) & 16383, r & 1 || 3 < (r >> 1 & 7) || !(r >> 4 & 1) || r >> 5 >= q.Ja || !v || !a ? a = 0 : (g && (g[0] = v), h && (h[0] = a), a = 1)); + } + if (!a) return 3; + g = g[0]; + t = t[0]; + if (n && (l[0] != g || m[0] != t)) return 3; + null != k && (k[0] = q, k.offset = b - k.w, x(4294967286 > b - k.w), x(k.offset == k.ha - c)); + break; + } + return 0 == p || 7 == p && n && null == k ? (null != f && (f[0] |= null != q.na && 0 < q.na.length), null != d && (d[0] = g), null != e && (e[0] = t), 0) : p; + } + function hc(a, b, c) { + var d = b.width, + e = b.height, + f = 0, + g = 0, + h = d, + k = e; + b.Da = null != a && 0 < a.Da; + if (b.Da && (h = a.cd, k = a.bd, f = a.v, g = a.j, 11 > c || (f &= -2, g &= -2), 0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)) return 0; + b.v = f; + b.j = g; + b.va = f + h; + b.o = g + k; + b.U = h; + b.T = k; + b.da = null != a && 0 < a.da; + if (b.da) { + c = [a.ib]; + f = [a.hb]; + if (!bc(h, k, c, f)) return 0; + b.ib = c[0]; + b.hb = f[0]; + } + b.ob = null != a && a.ob; + b.Kb = null == a || !a.Sd; + b.da && (b.ob = b.ib < 3 * d / 4 && b.hb < 3 * e / 4, b.Kb = 0); + return 1; + } + function Bd(a) { + if (null == a) return 2; + if (11 > a.S) { + var b = a.f.RGBA; + b.fb += (a.height - 1) * b.A; + b.A = -b.A; + } else b = a.f.kb, a = a.height, b.O += (a - 1) * b.fa, b.fa = -b.fa, b.N += (a - 1 >> 1) * b.Ab, b.Ab = -b.Ab, b.W += (a - 1 >> 1) * b.Db, b.Db = -b.Db, null != b.F && (b.J += (a - 1) * b.lb, b.lb = -b.lb); + return 0; + } + function Cd(a, b, c, d) { + if (null == d || 0 >= a || 0 >= b) return 2; + if (null != c) { + if (c.Da) { + var e = c.cd, + f = c.bd, + g = c.v & -2, + h = c.j & -2; + if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b) return 2; + a = e; + b = f; + } + if (c.da) { + e = [c.ib]; + f = [c.hb]; + if (!bc(a, b, e, f)) return 2; + a = e[0]; + b = f[0]; + } + } + d.width = a; + d.height = b; + a: { + var k = d.width; + var l = d.height; + a = d.S; + if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;else { + if (0 >= d.Rd && null == d.sd) { + var g = f = e = b = 0, + h = k * Dd[a], + m = h * l; + 11 > a || (b = (k + 1) / 2, f = (l + 1) / 2 * b, 12 == a && (e = k, g = e * l)); + l = V(m + 2 * f + g); + if (null == l) { + a = 1; + break a; + } + d.sd = l; + 11 > a ? (k = d.f.RGBA, k.eb = l, k.fb = 0, k.A = h, k.size = m) : (k = d.f.kb, k.y = l, k.O = 0, k.fa = h, k.Fd = m, k.f = l, k.N = 0 + m, k.Ab = b, k.Cd = f, k.ea = l, k.W = 0 + m + f, k.Db = b, k.Ed = f, 12 == a && (k.F = l, k.J = 0 + m + 2 * f), k.Tc = g, k.lb = e); + } + b = 1; + e = d.S; + f = d.width; + g = d.height; + if (e >= Ca && 13 > e) { + if (11 > e) a = d.f.RGBA, h = Math.abs(a.A), b &= h * (g - 1) + f <= a.size, b &= h >= f * Dd[e], b &= null != a.eb;else { + a = d.f.kb; + h = (f + 1) / 2; + m = (g + 1) / 2; + k = Math.abs(a.fa); + var l = Math.abs(a.Ab), + n = Math.abs(a.Db), + r = Math.abs(a.lb), + q = r * (g - 1) + f; + b &= k * (g - 1) + f <= a.Fd; + b &= l * (m - 1) + h <= a.Cd; + b &= n * (m - 1) + h <= a.Ed; + b = b & k >= f & l >= h & n >= h; + b &= null != a.y; + b &= null != a.f; + b &= null != a.ea; + 12 == e && (b &= r >= f, b &= q <= a.Tc, b &= null != a.F); + } + } else b = 0; + a = b ? 0 : 2; + } + } + if (0 != a) return a; + null != c && c.fd && (a = Bd(d)); + return a; + } + var xb = 64, + Hd = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215], + Gd = 24, + ob = 32, + Xb = 8, + Id = [0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]; + X("Predictor0", "PredictorAdd0"); + self.Predictor0 = function () { + return 4278190080; + }; + self.Predictor1 = function (a) { + return a; + }; + self.Predictor2 = function (a, b, c) { + return b[c + 0]; + }; + self.Predictor3 = function (a, b, c) { + return b[c + 1]; + }; + self.Predictor4 = function (a, b, c) { + return b[c - 1]; + }; + self.Predictor5 = function (a, b, c) { + return aa(aa(a, b[c + 1]), b[c + 0]); + }; + self.Predictor6 = function (a, b, c) { + return aa(a, b[c - 1]); + }; + self.Predictor7 = function (a, b, c) { + return aa(a, b[c + 0]); + }; + self.Predictor8 = function (a, b, c) { + return aa(b[c - 1], b[c + 0]); + }; + self.Predictor9 = function (a, b, c) { + return aa(b[c + 0], b[c + 1]); + }; + self.Predictor10 = function (a, b, c) { + return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1])); + }; + self.Predictor11 = function (a, b, c) { + var d = b[c + 0]; + b = b[c - 1]; + return 0 >= Ia(d >> 24 & 255, a >> 24 & 255, b >> 24 & 255) + Ia(d >> 16 & 255, a >> 16 & 255, b >> 16 & 255) + Ia(d >> 8 & 255, a >> 8 & 255, b >> 8 & 255) + Ia(d & 255, a & 255, b & 255) ? d : a; + }; + self.Predictor12 = function (a, b, c) { + var d = b[c + 0]; + b = b[c - 1]; + return (sa((a >> 24 & 255) + (d >> 24 & 255) - (b >> 24 & 255)) << 24 | sa((a >> 16 & 255) + (d >> 16 & 255) - (b >> 16 & 255)) << 16 | sa((a >> 8 & 255) + (d >> 8 & 255) - (b >> 8 & 255)) << 8 | sa((a & 255) + (d & 255) - (b & 255))) >>> 0; + }; + self.Predictor13 = function (a, b, c) { + var d = b[c - 1]; + a = aa(a, b[c + 0]); + return (eb(a >> 24 & 255, d >> 24 & 255) << 24 | eb(a >> 16 & 255, d >> 16 & 255) << 16 | eb(a >> 8 & 255, d >> 8 & 255) << 8 | eb(a >> 0 & 255, d >> 0 & 255)) >>> 0; + }; + var ee = self.PredictorAdd0; + self.PredictorAdd1 = cc; + X("Predictor2", "PredictorAdd2"); + X("Predictor3", "PredictorAdd3"); + X("Predictor4", "PredictorAdd4"); + X("Predictor5", "PredictorAdd5"); + X("Predictor6", "PredictorAdd6"); + X("Predictor7", "PredictorAdd7"); + X("Predictor8", "PredictorAdd8"); + X("Predictor9", "PredictorAdd9"); + X("Predictor10", "PredictorAdd10"); + X("Predictor11", "PredictorAdd11"); + X("Predictor12", "PredictorAdd12"); + X("Predictor13", "PredictorAdd13"); + var fe = self.PredictorAdd2; + ec("ColorIndexInverseTransform", "MapARGB", "32b", function (a) { + return a >> 8 & 255; + }, function (a) { + return a; + }); + ec("VP8LColorIndexInverseTransformAlpha", "MapAlpha", "8b", function (a) { + return a; + }, function (a) { + return a >> 8 & 255; + }); + var rc = self.ColorIndexInverseTransform, + ke = self.MapARGB, + he = self.VP8LColorIndexInverseTransformAlpha, + le = self.MapAlpha, + pc, + qc = self.VP8LPredictorsAdd = []; + qc.length = 16; + (self.VP8LPredictors = []).length = 16; + (self.VP8LPredictorsAdd_C = []).length = 16; + (self.VP8LPredictors_C = []).length = 16; + var Fb, + sc, + Gb, + Hb, + xc, + uc, + bd = V(511), + cd = V(2041), + dd = V(225), + ed = V(767), + ad = 0, + Qb = cd, + mb = dd, + R = ed, + U = bd, + Ca = 0, + Ua = 1, + tc = 2, + Va = 3, + ya = 4, + Db = 5, + wc = 6, + zb = 7, + Ab = 8, + Ja = 9, + Bb = 10, + pe = [2, 3, 7], + oe = [3, 3, 11], + Dc = [280, 256, 256, 256, 40], + qe = [0, 1, 1, 1, 0], + ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + de = [24, 7, 23, 25, 40, 6, 39, 41, 22, 26, 38, 42, 56, 5, 55, 57, 21, 27, 54, 58, 37, 43, 72, 4, 71, 73, 20, 28, 53, 59, 70, 74, 36, 44, 88, 69, 75, 52, 60, 3, 87, 89, 19, 29, 86, 90, 35, 45, 68, 76, 85, 91, 51, 61, 104, 2, 103, 105, 18, 30, 102, 106, 34, 46, 84, 92, 67, 77, 101, 107, 50, 62, 120, 1, 119, 121, 83, 93, 17, 31, 100, 108, 66, 78, 118, 122, 33, 47, 117, 123, 49, 63, 99, 109, 82, 94, 0, 116, 124, 65, 79, 16, 32, 98, 110, 48, 115, 125, 81, 95, 64, 114, 126, 97, 111, 80, 113, 127, 96, 112], + me = [2954, 2956, 2958, 2962, 2970, 2986, 3018, 3082, 3212, 3468, 3980, 5004], + ie = 8, + Lb = [4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157], + Mb = [4, 5, 6, 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, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284], + oa = null, + He = [[173, 148, 140, 0], [176, 155, 140, 135, 0], [180, 157, 141, 134, 130, 0], [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]], + Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15], + Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9], + Fe = [[[[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]], [[253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128], [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128], [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]], [[1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128], [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128], [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]], [[1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128], [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128], [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]], [[1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128], [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128], [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]], [[1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128], [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128], [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]], [[1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128], [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128], [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]], [[1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]]], [[[198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62], [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1], [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]], [[1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128], [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128], [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]], [[1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128], [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128], [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]], [[1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128], [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128], [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]], [[1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128], [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128], [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]], [[1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128], [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128], [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]], [[1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128], [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128], [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]], [[1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128], [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128], [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]]], [[[253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128], [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128], [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]], [[1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128], [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128], [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]], [[1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128], [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128], [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]], [[1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128], [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128], [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]], [[1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128], [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128], [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128], [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128], [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128], [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128], [55, 93, 255, 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]]], [[[202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255], [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128], [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]], [[1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128], [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128], [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]], [[1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128], [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128], [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]], [[1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128], [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128], [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]], [[1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128], [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128], [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]], [[1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128], [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128], [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]], [[1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128], [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128], [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]], [[1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]]]], + Ke = [[[231, 120, 48, 89, 115, 113, 120, 152, 112], [152, 179, 64, 126, 170, 118, 46, 70, 95], [175, 69, 143, 80, 85, 82, 72, 155, 103], [56, 58, 10, 171, 218, 189, 17, 13, 152], [114, 26, 17, 163, 44, 195, 21, 10, 173], [121, 24, 80, 195, 26, 62, 44, 64, 85], [144, 71, 10, 38, 171, 213, 144, 34, 26], [170, 46, 55, 19, 136, 160, 33, 206, 71], [63, 20, 8, 114, 114, 208, 12, 9, 226], [81, 40, 11, 96, 182, 84, 29, 16, 36]], [[134, 183, 89, 137, 98, 101, 106, 165, 148], [72, 187, 100, 130, 157, 111, 32, 75, 80], [66, 102, 167, 99, 74, 62, 40, 234, 128], [41, 53, 9, 178, 241, 141, 26, 8, 107], [74, 43, 26, 146, 73, 166, 49, 23, 157], [65, 38, 105, 160, 51, 52, 31, 115, 128], [104, 79, 12, 27, 217, 255, 87, 17, 7], [87, 68, 71, 44, 114, 51, 15, 186, 23], [47, 41, 14, 110, 182, 183, 21, 17, 194], [66, 45, 25, 102, 197, 189, 23, 18, 22]], [[88, 88, 147, 150, 42, 46, 45, 196, 205], [43, 97, 183, 117, 85, 38, 35, 179, 61], [39, 53, 200, 87, 26, 21, 43, 232, 171], [56, 34, 51, 104, 114, 102, 29, 93, 77], [39, 28, 85, 171, 58, 165, 90, 98, 64], [34, 22, 116, 206, 23, 34, 43, 166, 73], [107, 54, 32, 26, 51, 1, 81, 43, 31], [68, 25, 106, 22, 64, 171, 36, 225, 114], [34, 19, 21, 102, 132, 188, 16, 76, 124], [62, 18, 78, 95, 85, 57, 50, 48, 51]], [[193, 101, 35, 159, 215, 111, 89, 46, 111], [60, 148, 31, 172, 219, 228, 21, 18, 111], [112, 113, 77, 85, 179, 255, 38, 120, 114], [40, 42, 1, 196, 245, 209, 10, 25, 109], [88, 43, 29, 140, 166, 213, 37, 43, 154], [61, 63, 30, 155, 67, 45, 68, 1, 209], [100, 80, 8, 43, 154, 1, 51, 26, 71], [142, 78, 78, 16, 255, 128, 34, 197, 171], [41, 40, 5, 102, 211, 183, 4, 1, 221], [51, 50, 17, 168, 209, 192, 23, 25, 82]], [[138, 31, 36, 171, 27, 166, 38, 44, 229], [67, 87, 58, 169, 82, 115, 26, 59, 179], [63, 59, 90, 180, 59, 166, 93, 73, 154], [40, 40, 21, 116, 143, 209, 34, 39, 175], [47, 15, 16, 183, 34, 223, 49, 45, 183], [46, 17, 33, 183, 6, 98, 15, 32, 183], [57, 46, 22, 24, 128, 1, 54, 17, 37], [65, 32, 73, 115, 28, 128, 23, 128, 205], [40, 3, 9, 115, 51, 192, 18, 6, 223], [87, 37, 9, 115, 59, 77, 64, 21, 47]], [[104, 55, 44, 218, 9, 54, 53, 130, 226], [64, 90, 70, 205, 40, 41, 23, 26, 57], [54, 57, 112, 184, 5, 41, 38, 166, 213], [30, 34, 26, 133, 152, 116, 10, 32, 134], [39, 19, 53, 221, 26, 114, 32, 73, 255], [31, 9, 65, 234, 2, 15, 1, 118, 73], [75, 32, 12, 51, 192, 255, 160, 43, 51], [88, 31, 35, 67, 102, 85, 55, 186, 85], [56, 21, 23, 111, 59, 205, 45, 37, 192], [55, 38, 70, 124, 73, 102, 1, 34, 98]], [[125, 98, 42, 88, 104, 85, 117, 175, 82], [95, 84, 53, 89, 128, 100, 113, 101, 45], [75, 79, 123, 47, 51, 128, 81, 171, 1], [57, 17, 5, 71, 102, 57, 53, 41, 49], [38, 33, 13, 121, 57, 73, 26, 1, 85], [41, 10, 67, 138, 77, 110, 90, 47, 114], [115, 21, 2, 10, 102, 255, 166, 23, 6], [101, 29, 16, 10, 85, 128, 101, 196, 26], [57, 18, 10, 102, 102, 213, 34, 20, 43], [117, 20, 15, 36, 163, 128, 68, 1, 26]], [[102, 61, 71, 37, 34, 53, 31, 243, 192], [69, 60, 71, 38, 73, 119, 28, 222, 37], [68, 45, 128, 34, 1, 47, 11, 245, 171], [62, 17, 19, 70, 146, 85, 55, 62, 70], [37, 43, 37, 154, 100, 163, 85, 160, 1], [63, 9, 92, 136, 28, 64, 32, 201, 85], [75, 15, 9, 9, 64, 255, 184, 119, 16], [86, 6, 28, 5, 64, 255, 25, 248, 1], [56, 8, 17, 132, 137, 255, 55, 116, 128], [58, 15, 20, 82, 135, 57, 26, 121, 40]], [[164, 50, 31, 137, 154, 133, 25, 35, 218], [51, 103, 44, 131, 131, 123, 31, 6, 158], [86, 40, 64, 135, 148, 224, 45, 183, 128], [22, 26, 17, 131, 240, 154, 14, 1, 209], [45, 16, 21, 91, 64, 222, 7, 1, 197], [56, 21, 39, 155, 60, 138, 23, 102, 213], [83, 12, 13, 54, 192, 255, 68, 47, 28], [85, 26, 85, 85, 128, 128, 32, 146, 171], [18, 11, 7, 63, 144, 171, 4, 4, 246], [35, 27, 10, 146, 174, 171, 12, 26, 128]], [[190, 80, 35, 99, 180, 80, 126, 54, 45], [85, 126, 47, 87, 176, 51, 41, 20, 32], [101, 75, 128, 139, 118, 146, 116, 128, 85], [56, 41, 15, 176, 236, 85, 37, 9, 62], [71, 30, 17, 119, 118, 255, 17, 18, 138], [101, 38, 60, 138, 55, 70, 43, 26, 142], [146, 36, 19, 30, 171, 255, 97, 27, 20], [138, 45, 61, 62, 219, 1, 81, 188, 64], [32, 41, 20, 117, 151, 142, 20, 21, 163], [112, 19, 12, 61, 195, 128, 48, 4, 24]]], + Ee = [[[[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255], [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255], [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255], [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255], [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255], [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255], [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]], [[255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]], [[255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255], [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255], [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255], [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255], [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255], [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]], [[255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255], [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255], [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255], [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]], [[255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255], [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]], [[255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255], [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255], [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255], [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255], [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]]], + Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0], + Nc, + Y = [], + W = [], + ka = [], + Za, + fd, + Nb, + pa, + Ob, + Xc, + Tc, + Yc, + Uc, + Zc, + Vc, + $c, + Wc, + Rc, + Pc, + Sc, + Qc, + re = 1, + Cc = 2, + ia = [], + za, + vc, + fc, + Fc, + P = []; + va("UpsampleRgbLinePair", Ga, 3); + va("UpsampleBgrLinePair", Tb, 3); + va("UpsampleRgbaLinePair", wd, 4); + va("UpsampleBgraLinePair", vd, 4); + va("UpsampleArgbLinePair", ud, 4); + va("UpsampleRgba4444LinePair", td, 2); + va("UpsampleRgb565LinePair", sd, 2); + var Mf = self.UpsampleRgbLinePair, + Nf = self.UpsampleBgrLinePair, + nd = self.UpsampleRgbaLinePair, + od = self.UpsampleBgraLinePair, + pd = self.UpsampleArgbLinePair, + qd = self.UpsampleRgba4444LinePair, + Of = self.UpsampleRgb565LinePair, + Wa = 16, + Ba = 1 << Wa - 1, + ta = -227, + Eb = 482, + rd = 6, + Pf = (256 << rd) - 1, + jc = 0, + Yd = V(256), + ae = V(256), + $d = V(256), + Zd = V(256), + be = V(Eb - ta), + ce = V(Eb - ta); + la("YuvToRgbRow", Ga, 3); + la("YuvToBgrRow", Tb, 3); + la("YuvToRgbaRow", wd, 4); + la("YuvToBgraRow", vd, 4); + la("YuvToArgbRow", ud, 4); + la("YuvToRgba4444Row", td, 2); + la("YuvToRgb565Row", sd, 2); + var zd = [0, 4, 8, 12, 128, 132, 136, 140, 256, 260, 264, 268, 384, 388, 392, 396], + Ya = [0, 2, 8], + Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1], + Ne = 1; + this.WebPDecodeRGBA = function (a, b, c, d, e) { + var f = Ua; + var g = new Cf(), + h = new Cb(); + g.ba = h; + h.S = f; + h.width = [h.width]; + h.height = [h.height]; + var k = h.width; + var l = h.height, + m = new Td(); + if (null == m || null == a) var n = 2;else x(null != m), n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null); + 0 != n ? k = 0 : (null != k && (k[0] = m.width[0]), null != l && (l[0] = m.height[0]), k = 1); + if (k) { + h.width = h.width[0]; + h.height = h.height[0]; + null != d && (d[0] = h.width); + null != e && (e[0] = h.height); + b: { + d = new Oa(); + e = new md(); + e.data = a; + e.w = b; + e.ha = c; + e.kd = 1; + b = [0]; + x(null != e); + a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e); + (0 == a || 7 == a) && b[0] && (a = 4); + b = a; + if (0 == b) { + x(null != g); + d.data = e.data; + d.w = e.w + e.offset; + d.ha = e.ha - e.offset; + d.put = kc; + d.ac = gc; + d.bc = lc; + d.ma = g; + if (e.xa) { + a = Bc(); + if (null == a) { + g = 1; + break b; + } + if (te(a, d)) { + b = Cd(d.width, d.height, g.Oa, g.ba); + if (d = 0 == b) { + c: { + d = a; + d: for (;;) { + if (null == d) { + d = 0; + break c; + } + x(null != d.s.yc); + x(null != d.s.Ya); + x(0 < d.s.Wb); + c = d.l; + x(null != c); + e = c.ma; + x(null != e); + if (0 != d.xb) { + d.ca = e.ba; + d.tb = e.tb; + x(null != d.ca); + if (!hc(e.Oa, c, Va)) { + d.a = 2; + break d; + } + if (!Ec(d, c.width)) break d; + if (c.da) break d; + (c.da || hb(d.ca.S)) && Aa(); + 11 > d.ca.S || (alert("todo:WebPInitConvertARGBToYUV"), null != d.ca.f.kb.F && Aa()); + if (d.Pb && 0 < d.s.ua && null == d.s.vb.X && !Zb(d.s.vb, d.s.Wa.Xa)) { + d.a = 1; + break d; + } + d.xb = 0; + } + if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d; + e.Dc = d.Ma; + d = 1; + break c; + } + x(0 != d.a); + d = 0; + } + d = !d; + } + d && (b = a.a); + } else b = a.a; + } else { + a = new Ce(); + if (null == a) { + g = 1; + break b; + } + a.Fa = e.na; + a.P = e.P; + a.qc = e.Sa; + if (Kc(a, d)) { + if (b = Cd(d.width, d.height, g.Oa, g.ba), 0 == b) { + a.Aa = 0; + c = g.Oa; + e = a; + x(null != e); + if (null != c) { + k = c.Md; + k = 0 > k ? 0 : 100 < k ? 255 : 255 * k / 100; + if (0 < k) { + for (l = m = 0; 4 > l; ++l) { + n = e.pb[l], 12 > n.lc && (n.ia = k * Qf[0 > n.lc ? 0 : n.lc] >> 3), m |= n.ia; + } + m && (alert("todo:VP8InitRandom"), e.ia = 1); + } + e.Ga = c.Id; + 100 < e.Ga ? e.Ga = 100 : 0 > e.Ga && (e.Ga = 0); + } + Me(a, d) || (b = a.a); + } + } else b = a.a; + } + 0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba)); + } + g = b; + } + f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y; + } else f = null; + return f; + }; + var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1]; + }; + new _WebPDecoder(); + + /** @license + * Copyright (c) 2017 Dominik Homberger + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + https://webpjs.appspot.com + WebPRiffParser dominikhlbg@gmail.com + */ + + function memcmp(data, data_off, str, size) { + for (var i = 0; i < size; i++) { + if (data[data_off + i] != str.charCodeAt(i)) return true; + } + return false; + } + function GetTag(data, data_off) { + var str = ""; + for (var i = 0; i < 4; i++) { + str += String.fromCharCode(data[data_off++]); + } + return str; + } + function GetLE16(data, data_off) { + return data[data_off + 0] << 0 | data[data_off + 1] << 8; + } + function GetLE24(data, data_off) { + return (data[data_off + 0] << 0 | data[data_off + 1] << 8 | data[data_off + 2] << 16) >>> 0; + } + function GetLE32(data, data_off) { + return (data[data_off + 0] << 0 | data[data_off + 1] << 8 | data[data_off + 2] << 16 | data[data_off + 3] << 24) >>> 0; + } + function WebPRiffParser(src, src_off) { + var imagearray = {}; + var i = 0; + var alpha_chunk = false; + var alpha_size = 0; + var alpha_offset = 0; + imagearray["frames"] = []; + if (memcmp(src, src_off, "RIFF", 4)) return; + src_off += 4; + GetLE32(src, src_off) + 8; + src_off += 8; + while (src_off < src.length) { + var fourcc = GetTag(src, src_off); + src_off += 4; + var payload_size = GetLE32(src, src_off); + src_off += 4; + var payload_size_padded = payload_size + (payload_size & 1); + switch (fourcc) { + case "VP8 ": + case "VP8L": + if (typeof imagearray["frames"][i] === "undefined") imagearray["frames"][i] = {}; + var obj = imagearray["frames"][i]; + obj["src_off"] = alpha_chunk ? alpha_offset : src_off - 8; + obj["src_size"] = alpha_size + payload_size + 8; + //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height); + //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]}; + i++; + if (alpha_chunk) { + alpha_chunk = false; + alpha_size = 0; + alpha_offset = 0; + } + break; + case "VP8X": + var obj = imagearray["header"] = {}; + obj["feature_flags"] = src[src_off]; + var src_off_ = src_off + 4; + obj["canvas_width"] = 1 + GetLE24(src, src_off_); + src_off_ += 3; + obj["canvas_height"] = 1 + GetLE24(src, src_off_); + src_off_ += 3; + break; + case "ALPH": + alpha_chunk = true; + alpha_size = payload_size_padded + 8; + alpha_offset = src_off - 8; + break; + case "ANIM": + var obj = imagearray["header"]; + obj["bgcolor"] = GetLE32(src, src_off); + src_off_ = src_off + 4; + obj["loop_count"] = GetLE16(src, src_off_); + src_off_ += 2; + break; + case "ANMF": + var temp = 0; + var obj = imagearray["frames"][i] = {}; + obj["offset_x"] = 2 * GetLE24(src, src_off); + src_off += 3; + obj["offset_y"] = 2 * GetLE24(src, src_off); + src_off += 3; + obj["width"] = 1 + GetLE24(src, src_off); + src_off += 3; + obj["height"] = 1 + GetLE24(src, src_off); + src_off += 3; + obj["duration"] = GetLE24(src, src_off); + src_off += 3; + temp = src[src_off++]; + obj["dispose"] = temp & 1; + obj["blend"] = temp >> 1 & 1; + break; + } + if (fourcc != "ANMF") src_off += payload_size_padded; + } + return imagearray; + } + var height = [0]; + var width = [0]; + var pixels = []; + var webpdecoder = new _WebPDecoder(); + var response = imageData; + var imagearray = WebPRiffParser(response, 0); + imagearray["response"] = response; + imagearray["rgbaoutput"] = true; + imagearray["dataurl"] = false; + var header = imagearray["header"] ? imagearray["header"] : null; + var frames = imagearray["frames"] ? imagearray["frames"] : null; + if (header) { + header["loop_counter"] = header["loop_count"]; + height = [header["canvas_height"]]; + width = [header["canvas_width"]]; + for (var f = 0; f < frames.length; f++) { + if (frames[f]["blend"] == 0) { + break; + } + } + } + var frame = frames[0]; + var rgba = webpdecoder.WebPDecodeRGBA(response, frame["src_off"], frame["src_size"], width, height); + frame["rgba"] = rgba; + frame["imgwidth"] = width[0]; + frame["imgheight"] = height[0]; + for (var i = 0; i < width[0] * height[0] * 4; i++) { + pixels[i] = rgba[i]; + } + this.width = width; + this.height = height; + this.data = pixels; + return this; + } + WebPDecoder.prototype.getData = function () { + return this.data; + }; + + /** + * @license + * Copyright (c) 2019 Aras Abbasi + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF webp Support PlugIn + * + * @name webp_support + * @module + */ + (function (jsPDFAPI) { + + jsPDFAPI.processWEBP = function (imageData, index, alias, compression) { + var reader = new WebPDecoder(imageData); + var width = reader.width, + height = reader.height; + var qu = 100; + var pixels = reader.getData(); + var rawImageData = { + data: pixels, + width: width, + height: height + }; + var encoder = new JPEGEncoder(qu); + var data = encoder.encode(rawImageData, qu); + return jsPDFAPI.processJPEG.call(this, data, index, alias, compression); + }; + })(jsPDF.API); + + /** + * @license + * + * Copyright (c) 2021 Antti Palola, https://github.com/Pantura + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * ==================================================================== + */ + + /** + * jsPDF RGBA array PlugIn + * @name rgba_support + * @module + */ + (function (jsPDFAPI) { + + /** + * @name processRGBA + * @function + * + * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...]. + * RGBA array data can be obtained from DOM canvas getImageData. + * @ignore + */ + jsPDFAPI.processRGBA = function (imageData, index, alias) { + + var imagePixels = imageData.data; + var length = imagePixels.length; + // jsPDF takes alpha data separately so extract that. + var rgbOut = new Uint8Array(length / 4 * 3); + var alphaOut = new Uint8Array(length / 4); + var outIndex = 0; + var alphaIndex = 0; + for (var i = 0; i < length; i += 4) { + var r = imagePixels[i]; + var g = imagePixels[i + 1]; + var b = imagePixels[i + 2]; + var alpha = imagePixels[i + 3]; + rgbOut[outIndex++] = r; + rgbOut[outIndex++] = g; + rgbOut[outIndex++] = b; + alphaOut[alphaIndex++] = alpha; + } + var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut); + var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut); + return { + alpha: alphaData, + data: rgbData, + index: index, + alias: alias, + colorSpace: "DeviceRGB", + bitsPerComponent: 8, + width: imageData.width, + height: imageData.height + }; + }; + })(jsPDF.API); + + /** + * @license + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * jsPDF setLanguage Plugin + * + * @name setLanguage + * @module + */ + (function (jsPDFAPI) { + + /** + * Add Language Tag to the generated PDF + * + * @name setLanguage + * @function + * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB'). + * @returns {jsPDF} + * @example + * var doc = new jsPDF() + * doc.text(10, 10, 'This is a test') + * doc.setLanguage("en-US") + * doc.save('english.pdf') + */ + jsPDFAPI.setLanguage = function (langCode) { + + var langCodes = { + af: "Afrikaans", + sq: "Albanian", + ar: "Arabic (Standard)", + "ar-DZ": "Arabic (Algeria)", + "ar-BH": "Arabic (Bahrain)", + "ar-EG": "Arabic (Egypt)", + "ar-IQ": "Arabic (Iraq)", + "ar-JO": "Arabic (Jordan)", + "ar-KW": "Arabic (Kuwait)", + "ar-LB": "Arabic (Lebanon)", + "ar-LY": "Arabic (Libya)", + "ar-MA": "Arabic (Morocco)", + "ar-OM": "Arabic (Oman)", + "ar-QA": "Arabic (Qatar)", + "ar-SA": "Arabic (Saudi Arabia)", + "ar-SY": "Arabic (Syria)", + "ar-TN": "Arabic (Tunisia)", + "ar-AE": "Arabic (U.A.E.)", + "ar-YE": "Arabic (Yemen)", + an: "Aragonese", + hy: "Armenian", + as: "Assamese", + ast: "Asturian", + az: "Azerbaijani", + eu: "Basque", + be: "Belarusian", + bn: "Bengali", + bs: "Bosnian", + br: "Breton", + bg: "Bulgarian", + my: "Burmese", + ca: "Catalan", + ch: "Chamorro", + ce: "Chechen", + zh: "Chinese", + "zh-HK": "Chinese (Hong Kong)", + "zh-CN": "Chinese (PRC)", + "zh-SG": "Chinese (Singapore)", + "zh-TW": "Chinese (Taiwan)", + cv: "Chuvash", + co: "Corsican", + cr: "Cree", + hr: "Croatian", + cs: "Czech", + da: "Danish", + nl: "Dutch (Standard)", + "nl-BE": "Dutch (Belgian)", + en: "English", + "en-AU": "English (Australia)", + "en-BZ": "English (Belize)", + "en-CA": "English (Canada)", + "en-IE": "English (Ireland)", + "en-JM": "English (Jamaica)", + "en-NZ": "English (New Zealand)", + "en-PH": "English (Philippines)", + "en-ZA": "English (South Africa)", + "en-TT": "English (Trinidad & Tobago)", + "en-GB": "English (United Kingdom)", + "en-US": "English (United States)", + "en-ZW": "English (Zimbabwe)", + eo: "Esperanto", + et: "Estonian", + fo: "Faeroese", + fj: "Fijian", + fi: "Finnish", + fr: "French (Standard)", + "fr-BE": "French (Belgium)", + "fr-CA": "French (Canada)", + "fr-FR": "French (France)", + "fr-LU": "French (Luxembourg)", + "fr-MC": "French (Monaco)", + "fr-CH": "French (Switzerland)", + fy: "Frisian", + fur: "Friulian", + gd: "Gaelic (Scots)", + "gd-IE": "Gaelic (Irish)", + gl: "Galacian", + ka: "Georgian", + de: "German (Standard)", + "de-AT": "German (Austria)", + "de-DE": "German (Germany)", + "de-LI": "German (Liechtenstein)", + "de-LU": "German (Luxembourg)", + "de-CH": "German (Switzerland)", + el: "Greek", + gu: "Gujurati", + ht: "Haitian", + he: "Hebrew", + hi: "Hindi", + hu: "Hungarian", + is: "Icelandic", + id: "Indonesian", + iu: "Inuktitut", + ga: "Irish", + it: "Italian (Standard)", + "it-CH": "Italian (Switzerland)", + ja: "Japanese", + kn: "Kannada", + ks: "Kashmiri", + kk: "Kazakh", + km: "Khmer", + ky: "Kirghiz", + tlh: "Klingon", + ko: "Korean", + "ko-KP": "Korean (North Korea)", + "ko-KR": "Korean (South Korea)", + la: "Latin", + lv: "Latvian", + lt: "Lithuanian", + lb: "Luxembourgish", + mk: "North Macedonia", + ms: "Malay", + ml: "Malayalam", + mt: "Maltese", + mi: "Maori", + mr: "Marathi", + mo: "Moldavian", + nv: "Navajo", + ng: "Ndonga", + ne: "Nepali", + no: "Norwegian", + nb: "Norwegian (Bokmal)", + nn: "Norwegian (Nynorsk)", + oc: "Occitan", + or: "Oriya", + om: "Oromo", + fa: "Persian", + "fa-IR": "Persian/Iran", + pl: "Polish", + pt: "Portuguese", + "pt-BR": "Portuguese (Brazil)", + pa: "Punjabi", + "pa-IN": "Punjabi (India)", + "pa-PK": "Punjabi (Pakistan)", + qu: "Quechua", + rm: "Rhaeto-Romanic", + ro: "Romanian", + "ro-MO": "Romanian (Moldavia)", + ru: "Russian", + "ru-MO": "Russian (Moldavia)", + sz: "Sami (Lappish)", + sg: "Sango", + sa: "Sanskrit", + sc: "Sardinian", + sd: "Sindhi", + si: "Singhalese", + sr: "Serbian", + sk: "Slovak", + sl: "Slovenian", + so: "Somani", + sb: "Sorbian", + es: "Spanish", + "es-AR": "Spanish (Argentina)", + "es-BO": "Spanish (Bolivia)", + "es-CL": "Spanish (Chile)", + "es-CO": "Spanish (Colombia)", + "es-CR": "Spanish (Costa Rica)", + "es-DO": "Spanish (Dominican Republic)", + "es-EC": "Spanish (Ecuador)", + "es-SV": "Spanish (El Salvador)", + "es-GT": "Spanish (Guatemala)", + "es-HN": "Spanish (Honduras)", + "es-MX": "Spanish (Mexico)", + "es-NI": "Spanish (Nicaragua)", + "es-PA": "Spanish (Panama)", + "es-PY": "Spanish (Paraguay)", + "es-PE": "Spanish (Peru)", + "es-PR": "Spanish (Puerto Rico)", + "es-ES": "Spanish (Spain)", + "es-UY": "Spanish (Uruguay)", + "es-VE": "Spanish (Venezuela)", + sx: "Sutu", + sw: "Swahili", + sv: "Swedish", + "sv-FI": "Swedish (Finland)", + "sv-SV": "Swedish (Sweden)", + ta: "Tamil", + tt: "Tatar", + te: "Teluga", + th: "Thai", + tig: "Tigre", + ts: "Tsonga", + tn: "Tswana", + tr: "Turkish", + tk: "Turkmen", + uk: "Ukrainian", + hsb: "Upper Sorbian", + ur: "Urdu", + ve: "Venda", + vi: "Vietnamese", + vo: "Volapuk", + wa: "Walloon", + cy: "Welsh", + xh: "Xhosa", + ji: "Yiddish", + zu: "Zulu" + }; + if (this.internal.languageSettings === undefined) { + this.internal.languageSettings = {}; + this.internal.languageSettings.isSubscribed = false; + } + if (langCodes[langCode] !== undefined) { + this.internal.languageSettings.languageCode = langCode; + if (this.internal.languageSettings.isSubscribed === false) { + this.internal.events.subscribe("putCatalog", function () { + this.internal.write("/Lang (" + this.internal.languageSettings.languageCode + ")"); + }); + this.internal.languageSettings.isSubscribed = true; + } + } + return this; + }; + })(jsPDF.API); + + /** + * jsPDF split_text_to_size plugin + * + * @name split_text_to_size + * @module + */ + (function (API) { + + /** + * Returns an array of length matching length of the 'word' string, with each + * cell occupied by the width of the char in that position. + * + * @name getCharWidthsArray + * @function + * @param {string} text + * @param {Object} options + * @returns {Array} + */ + var getCharWidthsArray = API.getCharWidthsArray = function (text, options) { + options = options || {}; + var activeFont = options.font || this.internal.getFont(); + var fontSize = options.fontSize || this.internal.getFontSize(); + var charSpace = options.charSpace || this.internal.getCharSpace(); + var widths = options.widths ? options.widths : activeFont.metadata.Unicode.widths; + var widthsFractionOf = widths.fof ? widths.fof : 1; + var kerning = options.kerning ? options.kerning : activeFont.metadata.Unicode.kerning; + var kerningFractionOf = kerning.fof ? kerning.fof : 1; + var doKerning = options.doKerning === false ? false : true; + var kerningValue = 0; + var i; + var length = text.length; + var char_code; + var prior_char_code = 0; //for kerning + var default_char_width = widths[0] || widthsFractionOf; + var output = []; + for (i = 0; i < length; i++) { + char_code = text.charCodeAt(i); + if (typeof activeFont.metadata.widthOfString === "function") { + output.push((activeFont.metadata.widthOfGlyph(activeFont.metadata.characterToGlyph(char_code)) + charSpace * (1000 / fontSize) || 0) / 1000); + } else { + if (doKerning && _typeof(kerning[char_code]) === "object" && !isNaN(parseInt(kerning[char_code][prior_char_code], 10))) { + kerningValue = kerning[char_code][prior_char_code] / kerningFractionOf; + } else { + kerningValue = 0; + } + output.push((widths[char_code] || default_char_width) / widthsFractionOf + kerningValue); + } + prior_char_code = char_code; + } + return output; + }; + + /** + * Returns a widths of string in a given font, if the font size is set as 1 point. + * + * In other words, this is "proportional" value. For 1 unit of font size, the length + * of the string will be that much. + * + * Multiply by font size to get actual width in *points* + * Then divide by 72 to get inches or divide by (72/25.4) to get 'mm' etc. + * + * @name getStringUnitWidth + * @public + * @function + * @param {string} text + * @param {string} options + * @returns {number} result + */ + var getStringUnitWidth = API.getStringUnitWidth = function (text, options) { + options = options || {}; + var fontSize = options.fontSize || this.internal.getFontSize(); + var font = options.font || this.internal.getFont(); + var charSpace = options.charSpace || this.internal.getCharSpace(); + var result = 0; + if (API.processArabic) { + text = API.processArabic(text); + } + if (typeof font.metadata.widthOfString === "function") { + result = font.metadata.widthOfString(text, fontSize, charSpace) / fontSize; + } else { + result = getCharWidthsArray.apply(this, arguments).reduce(function (pv, cv) { + return pv + cv; + }, 0); + } + return result; + }; + + /** + returns array of lines + */ + var splitLongWord = function splitLongWord(word, widths_array, firstLineMaxLen, maxLen) { + var answer = []; + + // 1st, chop off the piece that can fit on the hanging line. + var i = 0, + l = word.length, + workingLen = 0; + while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) { + workingLen += widths_array[i]; + i++; + } + // this is first line. + answer.push(word.slice(0, i)); + + // 2nd. Split the rest into maxLen pieces. + var startOfLine = i; + workingLen = 0; + while (i !== l) { + if (workingLen + widths_array[i] > maxLen) { + answer.push(word.slice(startOfLine, i)); + workingLen = 0; + startOfLine = i; + } + workingLen += widths_array[i]; + i++; + } + if (startOfLine !== i) { + answer.push(word.slice(startOfLine, i)); + } + return answer; + }; + + // Note, all sizing inputs for this function must be in "font measurement units" + // By default, for PDF, it's "point". + var splitParagraphIntoLines = function splitParagraphIntoLines(text, maxlen, options) { + // at this time works only on Western scripts, ones with space char + // separating the words. Feel free to expand. + + if (!options) { + options = {}; + } + var line = [], + lines = [line], + line_length = options.textIndent || 0, + separator_length = 0, + current_word_length = 0, + word, + widths_array, + words = text.split(" "), + spaceCharWidth = getCharWidthsArray.apply(this, [" ", options])[0], + i, + l, + tmp, + lineIndent; + if (options.lineIndent === -1) { + lineIndent = words[0].length + 2; + } else { + lineIndent = options.lineIndent || 0; + } + if (lineIndent) { + var pad = Array(lineIndent).join(" "), + wrds = []; + words.map(function (wrd) { + wrd = wrd.split(/\s*\n/); + if (wrd.length > 1) { + wrds = wrds.concat(wrd.map(function (wrd, idx) { + return (idx && wrd.length ? "\n" : "") + wrd; + })); + } else { + wrds.push(wrd[0]); + } + }); + words = wrds; + lineIndent = getStringUnitWidth.apply(this, [pad, options]); + } + for (i = 0, l = words.length; i < l; i++) { + var force = 0; + word = words[i]; + if (lineIndent && word[0] == "\n") { + word = word.substr(1); + force = 1; + } + widths_array = getCharWidthsArray.apply(this, [word, options]); + current_word_length = widths_array.reduce(function (pv, cv) { + return pv + cv; + }, 0); + if (line_length + separator_length + current_word_length > maxlen || force) { + if (current_word_length > maxlen) { + // this happens when you have space-less long URLs for example. + // we just chop these to size. We do NOT insert hiphens + tmp = splitLongWord.apply(this, [word, widths_array, maxlen - (line_length + separator_length), maxlen]); + // first line we add to existing line object + line.push(tmp.shift()); // it's ok to have extra space indicator there + // last line we make into new line object + line = [tmp.pop()]; + // lines in the middle we apped to lines object as whole lines + while (tmp.length) { + lines.push([tmp.shift()]); // single fragment occupies whole line + } + current_word_length = widths_array.slice(word.length - (line[0] ? line[0].length : 0)).reduce(function (pv, cv) { + return pv + cv; + }, 0); + } else { + // just put it on a new line + line = [word]; + } + + // now we attach new line to lines + lines.push(line); + line_length = current_word_length + lineIndent; + separator_length = spaceCharWidth; + } else { + line.push(word); + line_length += separator_length + current_word_length; + separator_length = spaceCharWidth; + } + } + var postProcess; + if (lineIndent) { + postProcess = function postProcess(ln, idx) { + return (idx ? pad : "") + ln.join(" "); + }; + } else { + postProcess = function postProcess(ln) { + return ln.join(" "); + }; + } + return lines.map(postProcess); + }; + + /** + * Splits a given string into an array of strings. Uses 'size' value + * (in measurement units declared as default for the jsPDF instance) + * and the font's "widths" and "Kerning" tables, where available, to + * determine display length of a given string for a given font. + * + * We use character's 100% of unit size (height) as width when Width + * table or other default width is not available. + * + * @name splitTextToSize + * @public + * @function + * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string. + * @param {number} size Nominal number, measured in units default to this instance of jsPDF. + * @param {Object} options Optional flags needed for chopper to do the right thing. + * @returns {Array} array Array with strings chopped to size. + */ + API.splitTextToSize = function (text, maxlen, options) { + + options = options || {}; + var fsize = options.fontSize || this.internal.getFontSize(), + newOptions = function (options) { + var widths = { + 0: 1 + }, + kerning = {}; + if (!options.widths || !options.kerning) { + var f = this.internal.getFont(options.fontName, options.fontStyle), + encoding = "Unicode"; + // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE + // Actual JavaScript-native String's 16bit char codes used. + // no multi-byte logic here + + if (f.metadata[encoding]) { + return { + widths: f.metadata[encoding].widths || widths, + kerning: f.metadata[encoding].kerning || kerning + }; + } else { + return { + font: f.metadata, + fontSize: this.internal.getFontSize(), + charSpace: this.internal.getCharSpace() + }; + } + } else { + return { + widths: options.widths, + kerning: options.kerning + }; + } + }.call(this, options); + + // first we split on end-of-line chars + var paragraphs; + if (Array.isArray(text)) { + paragraphs = text; + } else { + paragraphs = String(text).split(/\r?\n/); + } + + // now we convert size (max length of line) into "font size units" + // at present time, the "font size unit" is always 'point' + // 'proportional' means, "in proportion to font size" + var fontUnit_maxLen = 1.0 * this.internal.scaleFactor * maxlen / fsize; + // at this time, fsize is always in "points" regardless of the default measurement unit of the doc. + // this may change in the future? + // until then, proportional_maxlen is likely to be in 'points' + + // If first line is to be indented (shorter or longer) than maxLen + // we indicate that by using CSS-style "text-indent" option. + // here it's in font units too (which is likely 'points') + // it can be negative (which makes the first line longer than maxLen) + newOptions.textIndent = options.textIndent ? options.textIndent * 1.0 * this.internal.scaleFactor / fsize : 0; + newOptions.lineIndent = options.lineIndent; + var i, + l, + output = []; + for (i = 0, l = paragraphs.length; i < l; i++) { + output = output.concat(splitParagraphIntoLines.apply(this, [paragraphs[i], fontUnit_maxLen, newOptions])); + } + return output; + }; + })(jsPDF.API); + + /** + * This file adds the standard font metrics to jsPDF. + * + * Font metrics data is reprocessed derivative of contents of + * "Font Metrics for PDF Core 14 Fonts" package, which exhibits the following copyright and license: + * + * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. + * + * This file and the 14 PostScript(R) AFM files it accompanies may be used, + * copied, and distributed for any purpose and without charge, with or without + * modification, provided that all copyright notices are retained; that the AFM + * files are not distributed without this file; that all modifications to this + * file or any of the AFM files are prominently noted in the modified file(s); + * and that this paragraph is not modified. Adobe Systems has no responsibility + * or obligation to support the use of the AFM files. + * + * @name standard_fonts_metrics + * @module + */ + + (function (API) { + + API.__fontmetrics__ = API.__fontmetrics__ || {}; + var decoded = "0123456789abcdef", + encoded = "klmnopqrstuvwxyz", + mappingUncompress = {}, + mappingCompress = {}; + for (var i = 0; i < encoded.length; i++) { + mappingUncompress[encoded[i]] = decoded[i]; + mappingCompress[decoded[i]] = encoded[i]; + } + var hex = function hex(value) { + return "0x" + parseInt(value, 10).toString(16); + }; + var compress = API.__fontmetrics__.compress = function (data) { + var vals = ["{"]; + var value, keystring, valuestring, numberprefix; + for (var key in data) { + value = data[key]; + if (!isNaN(parseInt(key, 10))) { + key = parseInt(key, 10); + keystring = hex(key).slice(2); + keystring = keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)]; + } else { + keystring = "'" + key + "'"; + } + if (typeof value == "number") { + if (value < 0) { + valuestring = hex(value).slice(3); + numberprefix = "-"; + } else { + valuestring = hex(value).slice(2); + numberprefix = ""; + } + valuestring = numberprefix + valuestring.slice(0, -1) + mappingCompress[valuestring.slice(-1)]; + } else { + if (_typeof(value) === "object") { + valuestring = compress(value); + } else { + throw new Error("Don't know what to do with value type " + _typeof(value) + "."); + } + } + vals.push(keystring + valuestring); + } + vals.push("}"); + return vals.join(""); + }; + + /** + * Uncompresses data compressed into custom, base16-like format. + * + * @public + * @function + * @param + * @returns {Type} + */ + var uncompress = API.__fontmetrics__.uncompress = function (data) { + if (typeof data !== "string") { + throw new Error("Invalid argument passed to uncompress."); + } + var output = {}, + sign = 1, + stringparts, + // undef. will be [] in string mode + activeobject = output, + parentchain = [], + parent_key_pair, + keyparts = "", + valueparts = "", + key, + // undef. will be Truthy when Key is resolved. + datalen = data.length - 1, + // stripping ending } + ch; + for (var i = 1; i < datalen; i += 1) { + // - { } ' are special. + + ch = data[i]; + if (ch == "'") { + if (stringparts) { + // end of string mode + key = stringparts.join(""); + stringparts = undefined; + } else { + // start of string mode + stringparts = []; + } + } else if (stringparts) { + stringparts.push(ch); + } else if (ch == "{") { + // start of object + parentchain.push([activeobject, key]); + activeobject = {}; + key = undefined; + } else if (ch == "}") { + // end of object + parent_key_pair = parentchain.pop(); + parent_key_pair[0][parent_key_pair[1]] = activeobject; + key = undefined; + activeobject = parent_key_pair[0]; + } else if (ch == "-") { + sign = -1; + } else { + // must be number + if (key === undefined) { + if (mappingUncompress.hasOwnProperty(ch)) { + keyparts += mappingUncompress[ch]; + key = parseInt(keyparts, 16) * sign; + sign = +1; + keyparts = ""; + } else { + keyparts += ch; + } + } else { + if (mappingUncompress.hasOwnProperty(ch)) { + valueparts += mappingUncompress[ch]; + activeobject[key] = parseInt(valueparts, 16) * sign; + sign = +1; + key = undefined; + valueparts = ""; + } else { + valueparts += ch; + } + } + } + } + return output; + }; + + // encoding = 'Unicode' + // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior + // Actual 16bit char codes used. + // no multi-byte logic here + + // Unicode characters to WinAnsiEncoding: + // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158} + // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts. + // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly + // as well as give strings with some (supported by these fonts) Unicode characters and + // these will be mapped to win cp1252 + // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting "Euro" glyph displayed in both cases. + + var encodingBlock = { + codePages: ["WinAnsiEncoding"], + WinAnsiEncoding: uncompress("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}") + }; + var encodings = { + Unicode: { + Courier: encodingBlock, + "Courier-Bold": encodingBlock, + "Courier-BoldOblique": encodingBlock, + "Courier-Oblique": encodingBlock, + Helvetica: encodingBlock, + "Helvetica-Bold": encodingBlock, + "Helvetica-BoldOblique": encodingBlock, + "Helvetica-Oblique": encodingBlock, + "Times-Roman": encodingBlock, + "Times-Bold": encodingBlock, + "Times-BoldItalic": encodingBlock, + "Times-Italic": encodingBlock + // , 'Symbol' + // , 'ZapfDingbats' + } + }; + var fontMetrics = { + Unicode: { + // all sizing numbers are n/fontMetricsFractionOf = one font size unit + // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's + // width is 476/1000 or 47.6% of its height (regardless of font size) + // At this time this value applies to "widths" and "kerning" numbers. + + // char code 0 represents "default" (average) width - use it for chars missing in this table. + // key 'fof' represents the "fontMetricsFractionOf" value + + "Courier-Oblique": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), + "Times-BoldItalic": uncompress("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"), + "Helvetica-Bold": uncompress("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"), + Courier: uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), + "Courier-BoldOblique": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), + "Times-Bold": uncompress("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"), + Symbol: uncompress("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"), + Helvetica: uncompress("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"), + "Helvetica-BoldOblique": uncompress("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"), + ZapfDingbats: uncompress("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"), + "Courier-Bold": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"), + "Times-Italic": uncompress("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"), + "Times-Roman": uncompress("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"), + "Helvetica-Oblique": uncompress("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}") + } + }; + + /* + This event handler is fired when a new jsPDF object is initialized + This event handler appends metrics data to standard fonts within + that jsPDF instance. The metrics are mapped over Unicode character + codes, NOT CIDs or other codes matching the StandardEncoding table of the + standard PDF fonts. + Future: + Also included is the encoding maping table, converting Unicode (UCS-2, UTF-16) + char codes to StandardEncoding character codes. The encoding table is to be used + somewhere around "pdfEscape" call. + */ + API.events.push(["addFont", function (data) { + var font = data.font; + var metrics = fontMetrics["Unicode"][font.postScriptName]; + if (metrics) { + font.metadata["Unicode"] = {}; + font.metadata["Unicode"].widths = metrics.widths; + font.metadata["Unicode"].kerning = metrics.kerning; + } + var encodingBlock = encodings["Unicode"][font.postScriptName]; + if (encodingBlock) { + font.metadata["Unicode"].encoding = encodingBlock; + font.encoding = encodingBlock.codePages[0]; + } + }]); // end of adding event handler + })(jsPDF.API); + + /** + * @license + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * @name ttfsupport + * @module + */ + (function (jsPDF) { + + var binaryStringToUint8Array = function binaryStringToUint8Array(binary_string) { + var len = binary_string.length; + var bytes = new Uint8Array(len); + for (var i = 0; i < len; i++) { + bytes[i] = binary_string.charCodeAt(i); + } + return bytes; + }; + var addFont = function addFont(font, file) { + // eslint-disable-next-line no-control-regex + if (/^\x00\x01\x00\x00/.test(file)) { + file = binaryStringToUint8Array(file); + } else { + file = binaryStringToUint8Array(atob(file)); + } + font.metadata = jsPDF.API.TTFFont.open(file); + font.metadata.Unicode = font.metadata.Unicode || { + encoding: {}, + kerning: {}, + widths: [] + }; + font.metadata.glyIdsUsed = [0]; + }; + jsPDF.API.events.push(["addFont", function (data) { + var file = undefined; + var font = data.font; + var instance = data.instance; + if (font.isStandardFont) { + return; + } + if (typeof instance !== "undefined") { + if (instance.existsFileInVFS(font.postScriptName) === false) { + file = instance.loadFile(font.postScriptName); + } else { + file = instance.getFileFromVFS(font.postScriptName); + } + if (typeof file !== "string") { + throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" + font.postScriptName + "')."); + } + addFont(font, file); + } else { + throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('" + font.postScriptName + "')."); + } + }]); // end of adding event handler + })(jsPDF); + + /** + * jsPDF SVG plugin + * + * @name svg + * @module + */ + (function (jsPDFAPI) { + + function loadCanvg() { + return function () { + if (globalObject["canvg"]) { + return Promise.resolve(globalObject["canvg"]); + } + if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { + return new Promise(function (resolve, reject) { + try { + resolve(require("canvg")); + } catch (e) { + reject(e); + } + }); + } + if (typeof define === "function" && define.amd) { + return new Promise(function (resolve, reject) { + try { + require(["canvg"], resolve); + } catch (e) { + reject(e); + } + }); + } + return Promise.reject(new Error("Could not load canvg")); + }().catch(function (e) { + return Promise.reject(new Error("Could not load canvg: " + e)); + }).then(function (canvg) { + return canvg.default ? canvg.default : canvg; + }); + } + + /** + * Parses SVG XML and saves it as image into the PDF. + * + * Depends on canvas-element and canvg + * + * @name addSvgAsImage + * @public + * @function + * @param {string} SVG-Data as Text + * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page + * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page + * @param {number} width of SVG-Image (in units declared at inception of PDF document) + * @param {number} height of SVG-Image (in units declared at inception of PDF document) + * @param {string} alias of SVG-Image (if used multiple times) + * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW' + * @param {number} rotation of the image in degrees (0-359) + * + * @returns jsPDF jsPDF-instance + */ + jsPDFAPI.addSvgAsImage = function (svg, x, y, w, h, alias, compression, rotation) { + if (isNaN(x) || isNaN(y)) { + console.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments); + throw new Error("Invalid coordinates passed to jsPDF.addSvgAsImage"); + } + if (isNaN(w) || isNaN(h)) { + console.error("jsPDF.addSvgAsImage: Invalid measurements", arguments); + throw new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage"); + } + var canvas = document.createElement("canvas"); + canvas.width = w; + canvas.height = h; + var ctx = canvas.getContext("2d"); + ctx.fillStyle = "#fff"; /// set white fill style + ctx.fillRect(0, 0, canvas.width, canvas.height); + var options = { + ignoreMouse: true, + ignoreAnimation: true, + ignoreDimensions: true + }; + var doc = this; + return loadCanvg().then(function (canvg) { + return canvg.fromString(ctx, svg, options); + }, function () { + return Promise.reject(new Error("Could not load canvg.")); + }).then(function (instance) { + return instance.render(options); + }).then(function () { + doc.addImage(canvas.toDataURL("image/jpeg", 1.0), x, y, w, h, compression, rotation); + }); + }; + })(jsPDF.API); + + /** + * @license + * ==================================================================== + * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * ==================================================================== + */ + + /** + * jsPDF total_pages plugin + * @name total_pages + * @module + */ + (function (jsPDFAPI) { + + /** + * @name putTotalPages + * @function + * @param {string} pageExpression Regular Expression + * @returns {jsPDF} jsPDF-instance + */ + jsPDFAPI.putTotalPages = function (pageExpression) { + + var replaceExpression; + var totalNumberOfPages = 0; + if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) { + replaceExpression = new RegExp(pageExpression, "g"); + totalNumberOfPages = this.internal.getNumberOfPages(); + } else { + replaceExpression = new RegExp(this.pdfEscape16(pageExpression, this.internal.getFont()), "g"); + totalNumberOfPages = this.pdfEscape16(this.internal.getNumberOfPages() + "", this.internal.getFont()); + } + for (var n = 1; n <= this.internal.getNumberOfPages(); n++) { + for (var i = 0; i < this.internal.pages[n].length; i++) { + this.internal.pages[n][i] = this.internal.pages[n][i].replace(replaceExpression, totalNumberOfPages); + } + } + return this; + }; + })(jsPDF.API); + + /** + * Adds the ability to set ViewerPreferences and by thus + * controlling the way the document is to be presented on the + * screen or in print. + * @name viewerpreferences + * @module + */ + (function (jsPDFAPI) { + + /** + * Set the ViewerPreferences of the generated PDF + * + * @name viewerPreferences + * @function + * @public + * @param {Object} options Array with the ViewerPreferences
+ * Example: doc.viewerPreferences({"FitWindow":true});
+ *
+ * You can set following preferences:
+ *
+ * HideToolbar (boolean)
+ * Default value: false
+ *
+ * HideMenubar (boolean)
+ * Default value: false.
+ *
+ * HideWindowUI (boolean)
+ * Default value: false.
+ *
+ * FitWindow (boolean)
+ * Default value: false.
+ *
+ * CenterWindow (boolean)
+ * Default value: false
+ *
+ * DisplayDocTitle (boolean)
+ * Default value: false.
+ *
+ * NonFullScreenPageMode (string)
+ * Possible values: UseNone, UseOutlines, UseThumbs, UseOC
+ * Default value: UseNone
+ *
+ * Direction (string)
+ * Possible values: L2R, R2L
+ * Default value: L2R.
+ *
+ * ViewArea (string)
+ * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
+ * Default value: CropBox.
+ *
+ * ViewClip (string)
+ * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
+ * Default value: CropBox
+ *
+ * PrintArea (string)
+ * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
+ * Default value: CropBox
+ *
+ * PrintClip (string)
+ * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox
+ * Default value: CropBox.
+ *
+ * PrintScaling (string)
+ * Possible values: AppDefault, None
+ * Default value: AppDefault.
+ *
+ * Duplex (string)
+ * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge + * Default value: none
+ *
+ * PickTrayByPDFSize (boolean)
+ * Default value: false
+ *
+ * PrintPageRange (Array)
+ * Example: [[1,5], [7,9]]
+ * Default value: as defined by PDF viewer application
+ *
+ * NumCopies (Number)
+ * Possible values: 1, 2, 3, 4, 5
+ * Default value: 1
+ *
+ * For more information see the PDF Reference, sixth edition on Page 577 + * @param {boolean} doReset True to reset the settings + * @function + * @returns jsPDF jsPDF-instance + * @example + * var doc = new jsPDF() + * doc.text('This is a test', 10, 10) + * doc.viewerPreferences({'FitWindow': true}, true) + * doc.save("viewerPreferences.pdf") + * + * // Example printing 10 copies, using cropbox, and hiding UI. + * doc.viewerPreferences({ + * 'HideWindowUI': true, + * 'PrintArea': 'CropBox', + * 'NumCopies': 10 + * }) + */ + jsPDFAPI.viewerPreferences = function (options, doReset) { + options = options || {}; + doReset = doReset || false; + var configuration; + var configurationTemplate = { + HideToolbar: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.3 + }, + HideMenubar: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.3 + }, + HideWindowUI: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.3 + }, + FitWindow: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.3 + }, + CenterWindow: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.3 + }, + DisplayDocTitle: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.4 + }, + NonFullScreenPageMode: { + defaultValue: "UseNone", + value: "UseNone", + type: "name", + explicitSet: false, + valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"], + pdfVersion: 1.3 + }, + Direction: { + defaultValue: "L2R", + value: "L2R", + type: "name", + explicitSet: false, + valueSet: ["L2R", "R2L"], + pdfVersion: 1.3 + }, + ViewArea: { + defaultValue: "CropBox", + value: "CropBox", + type: "name", + explicitSet: false, + valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], + pdfVersion: 1.4 + }, + ViewClip: { + defaultValue: "CropBox", + value: "CropBox", + type: "name", + explicitSet: false, + valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], + pdfVersion: 1.4 + }, + PrintArea: { + defaultValue: "CropBox", + value: "CropBox", + type: "name", + explicitSet: false, + valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], + pdfVersion: 1.4 + }, + PrintClip: { + defaultValue: "CropBox", + value: "CropBox", + type: "name", + explicitSet: false, + valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"], + pdfVersion: 1.4 + }, + PrintScaling: { + defaultValue: "AppDefault", + value: "AppDefault", + type: "name", + explicitSet: false, + valueSet: ["AppDefault", "None"], + pdfVersion: 1.6 + }, + Duplex: { + defaultValue: "", + value: "none", + type: "name", + explicitSet: false, + valueSet: ["Simplex", "DuplexFlipShortEdge", "DuplexFlipLongEdge", "none"], + pdfVersion: 1.7 + }, + PickTrayByPDFSize: { + defaultValue: false, + value: false, + type: "boolean", + explicitSet: false, + valueSet: [true, false], + pdfVersion: 1.7 + }, + PrintPageRange: { + defaultValue: "", + value: "", + type: "array", + explicitSet: false, + valueSet: null, + pdfVersion: 1.7 + }, + NumCopies: { + defaultValue: 1, + value: 1, + type: "integer", + explicitSet: false, + valueSet: null, + pdfVersion: 1.7 + } + }; + var configurationKeys = Object.keys(configurationTemplate); + var rangeArray = []; + var i = 0; + var j = 0; + var k = 0; + var isValid; + var method; + var value; + function arrayContainsElement(array, element) { + var iterator; + var result = false; + for (iterator = 0; iterator < array.length; iterator += 1) { + if (array[iterator] === element) { + result = true; + } + } + return result; + } + if (this.internal.viewerpreferences === undefined) { + this.internal.viewerpreferences = {}; + this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(configurationTemplate)); + this.internal.viewerpreferences.isSubscribed = false; + } + configuration = this.internal.viewerpreferences.configuration; + if (options === "reset" || doReset === true) { + var len = configurationKeys.length; + for (k = 0; k < len; k += 1) { + configuration[configurationKeys[k]].value = configuration[configurationKeys[k]].defaultValue; + configuration[configurationKeys[k]].explicitSet = false; + } + } + if (_typeof(options) === "object") { + for (method in options) { + value = options[method]; + if (arrayContainsElement(configurationKeys, method) && value !== undefined) { + if (configuration[method].type === "boolean" && typeof value === "boolean") { + configuration[method].value = value; + } else if (configuration[method].type === "name" && arrayContainsElement(configuration[method].valueSet, value)) { + configuration[method].value = value; + } else if (configuration[method].type === "integer" && Number.isInteger(value)) { + configuration[method].value = value; + } else if (configuration[method].type === "array") { + for (i = 0; i < value.length; i += 1) { + isValid = true; + if (value[i].length === 1 && typeof value[i][0] === "number") { + rangeArray.push(String(value[i] - 1)); + } else if (value[i].length > 1) { + for (j = 0; j < value[i].length; j += 1) { + if (typeof value[i][j] !== "number") { + isValid = false; + } + } + if (isValid === true) { + rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(" ")); + } + } + } + configuration[method].value = "[" + rangeArray.join(" ") + "]"; + } else { + configuration[method].value = configuration[method].defaultValue; + } + configuration[method].explicitSet = true; + } + } + } + if (this.internal.viewerpreferences.isSubscribed === false) { + this.internal.events.subscribe("putCatalog", function () { + var pdfDict = []; + var vPref; + for (vPref in configuration) { + if (configuration[vPref].explicitSet === true) { + if (configuration[vPref].type === "name") { + pdfDict.push("/" + vPref + " /" + configuration[vPref].value); + } else { + pdfDict.push("/" + vPref + " " + configuration[vPref].value); + } + } + } + if (pdfDict.length !== 0) { + this.internal.write("/ViewerPreferences\n<<\n" + pdfDict.join("\n") + "\n>>"); + } + }); + this.internal.viewerpreferences.isSubscribed = true; + } + this.internal.viewerpreferences.configuration = configuration; + return this; + }; + })(jsPDF.API); + + /** ==================================================================== + * @license + * jsPDF XMP metadata plugin + * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * ==================================================================== + */ + + /** + * @name xmp_metadata + * @module + */ + (function (jsPDFAPI) { + + var postPutResources = function postPutResources() { + var xmpmeta_beginning = ''; + var rdf_beginning = ''; + var rdf_ending = ""; + var xmpmeta_ending = ""; + var utf8_xmpmeta_beginning = unescape(encodeURIComponent(xmpmeta_beginning)); + var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning)); + var utf8_metadata = unescape(encodeURIComponent(this.internal.__metadata__.metadata)); + var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending)); + var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending)); + var total_len = utf8_rdf_beginning.length + utf8_metadata.length + utf8_rdf_ending.length + utf8_xmpmeta_beginning.length + utf8_xmpmeta_ending.length; + this.internal.__metadata__.metadata_object_number = this.internal.newObject(); + this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + total_len + " >>"); + this.internal.write("stream"); + this.internal.write(utf8_xmpmeta_beginning + utf8_rdf_beginning + utf8_metadata + utf8_rdf_ending + utf8_xmpmeta_ending); + this.internal.write("endstream"); + this.internal.write("endobj"); + }; + var putCatalog = function putCatalog() { + if (this.internal.__metadata__.metadata_object_number) { + this.internal.write("/Metadata " + this.internal.__metadata__.metadata_object_number + " 0 R"); + } + }; + + /** + * Adds XMP formatted metadata to PDF + * + * @name addMetadata + * @function + * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters "<", ">" or "&", those characters should be written using XML entities. + * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash. + * @returns {jsPDF} jsPDF-instance + */ + jsPDFAPI.addMetadata = function (metadata, namespaceuri) { + if (typeof this.internal.__metadata__ === "undefined") { + this.internal.__metadata__ = { + metadata: metadata, + namespaceuri: namespaceuri || "http://jspdf.default.namespaceuri/" + }; + this.internal.events.subscribe("putCatalog", putCatalog); + this.internal.events.subscribe("postPutResources", postPutResources); + } + return this; + }; + })(jsPDF.API); + + /** + * @name utf8 + * @module + */ + (function (jsPDF) { + + var jsPDFAPI = jsPDF.API; + + /***************************************************************************************************/ + /* function : pdfEscape16 */ + /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */ + /* the corresponding glyph id and width, and then adding padding to the string. */ + /***************************************************************************************************/ + var pdfEscape16 = jsPDFAPI.pdfEscape16 = function (text, font) { + var widths = font.metadata.Unicode.widths; + var padz = ["", "0", "00", "000", "0000"]; + var ar = [""]; + for (var i = 0, l = text.length, t; i < l; ++i) { + t = font.metadata.characterToGlyph(text.charCodeAt(i)); + font.metadata.glyIdsUsed.push(t); + font.metadata.toUnicode[t] = text.charCodeAt(i); + if (widths.indexOf(t) == -1) { + widths.push(t); + widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]); + } + if (t == "0") { + //Spaces are not allowed in cmap. + return ar.join(""); + } else { + t = t.toString(16); + ar.push(padz[4 - t.length], t); + } + } + return ar.join(""); + }; + var toUnicodeCmap = function toUnicodeCmap(map) { + var code, codes, range, unicode, unicodeMap, _i, _len; + unicodeMap = "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange"; + codes = Object.keys(map).sort(function (a, b) { + return a - b; + }); + range = []; + for (_i = 0, _len = codes.length; _i < _len; _i++) { + code = codes[_i]; + if (range.length >= 100) { + unicodeMap += "\n" + range.length + " beginbfchar\n" + range.join("\n") + "\nendbfchar"; + range = []; + } + if (map[code] !== undefined && map[code] !== null && typeof map[code].toString === "function") { + unicode = ("0000" + map[code].toString(16)).slice(-4); + code = ("0000" + (+code).toString(16)).slice(-4); + range.push("<" + code + "><" + unicode + ">"); + } + } + if (range.length) { + unicodeMap += "\n" + range.length + " beginbfchar\n" + range.join("\n") + "\nendbfchar\n"; + } + unicodeMap += "endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"; + return unicodeMap; + }; + var identityHFunction = function identityHFunction(options) { + var font = options.font; + var out = options.out; + var newObject = options.newObject; + var putStream = options.putStream; + if (font.metadata instanceof jsPDF.API.TTFFont && font.encoding === "Identity-H") { + //Tag with Identity-H + var widths = font.metadata.Unicode.widths; + var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1); + var pdfOutput = data; + var pdfOutput2 = ""; + for (var i = 0; i < pdfOutput.length; i++) { + pdfOutput2 += String.fromCharCode(pdfOutput[i]); + } + var fontTable = newObject(); + putStream({ + data: pdfOutput2, + addLength1: true, + objectId: fontTable + }); + out("endobj"); + var cmap = newObject(); + var cmapData = toUnicodeCmap(font.metadata.toUnicode); + putStream({ + data: cmapData, + addLength1: true, + objectId: cmap + }); + out("endobj"); + var fontDescriptor = newObject(); + out("<<"); + out("/Type /FontDescriptor"); + out("/FontName /" + toPDFName(font.fontName)); + out("/FontFile2 " + fontTable + " 0 R"); + out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox)); + out("/Flags " + font.metadata.flags); + out("/StemV " + font.metadata.stemV); + out("/ItalicAngle " + font.metadata.italicAngle); + out("/Ascent " + font.metadata.ascender); + out("/Descent " + font.metadata.decender); + out("/CapHeight " + font.metadata.capHeight); + out(">>"); + out("endobj"); + var DescendantFont = newObject(); + out("<<"); + out("/Type /Font"); + out("/BaseFont /" + toPDFName(font.fontName)); + out("/FontDescriptor " + fontDescriptor + " 0 R"); + out("/W " + jsPDF.API.PDFObject.convert(widths)); + out("/CIDToGIDMap /Identity"); + out("/DW 1000"); + out("/Subtype /CIDFontType2"); + out("/CIDSystemInfo"); + out("<<"); + out("/Supplement 0"); + out("/Registry (Adobe)"); + out("/Ordering (" + font.encoding + ")"); + out(">>"); + out(">>"); + out("endobj"); + font.objectNumber = newObject(); + out("<<"); + out("/Type /Font"); + out("/Subtype /Type0"); + out("/ToUnicode " + cmap + " 0 R"); + out("/BaseFont /" + toPDFName(font.fontName)); + out("/Encoding /" + font.encoding); + out("/DescendantFonts [" + DescendantFont + " 0 R]"); + out(">>"); + out("endobj"); + font.isAlreadyPutted = true; + } + }; + jsPDFAPI.events.push(["putFont", function (args) { + identityHFunction(args); + }]); + var winAnsiEncodingFunction = function winAnsiEncodingFunction(options) { + var font = options.font; + var out = options.out; + var newObject = options.newObject; + var putStream = options.putStream; + if (font.metadata instanceof jsPDF.API.TTFFont && font.encoding === "WinAnsiEncoding") { + //Tag with WinAnsi encoding + var data = font.metadata.rawData; + var pdfOutput = data; + var pdfOutput2 = ""; + for (var i = 0; i < pdfOutput.length; i++) { + pdfOutput2 += String.fromCharCode(pdfOutput[i]); + } + var fontTable = newObject(); + putStream({ + data: pdfOutput2, + addLength1: true, + objectId: fontTable + }); + out("endobj"); + var cmap = newObject(); + var cmapData = toUnicodeCmap(font.metadata.toUnicode); + putStream({ + data: cmapData, + addLength1: true, + objectId: cmap + }); + out("endobj"); + var fontDescriptor = newObject(); + out("<<"); + out("/Descent " + font.metadata.decender); + out("/CapHeight " + font.metadata.capHeight); + out("/StemV " + font.metadata.stemV); + out("/Type /FontDescriptor"); + out("/FontFile2 " + fontTable + " 0 R"); + out("/Flags 96"); + out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox)); + out("/FontName /" + toPDFName(font.fontName)); + out("/ItalicAngle " + font.metadata.italicAngle); + out("/Ascent " + font.metadata.ascender); + out(">>"); + out("endobj"); + font.objectNumber = newObject(); + for (var j = 0; j < font.metadata.hmtx.widths.length; j++) { + font.metadata.hmtx.widths[j] = parseInt(font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)); //Change the width of Em units to Point units. + } + out("<>"); + out("endobj"); + font.isAlreadyPutted = true; + } + }; + jsPDFAPI.events.push(["putFont", function (args) { + winAnsiEncodingFunction(args); + }]); + var utf8TextFunction = function utf8TextFunction(args) { + var text = args.text || ""; + var x = args.x; + var y = args.y; + var options = args.options || {}; + var mutex = args.mutex || {}; + var pdfEscape = mutex.pdfEscape; + var activeFontKey = mutex.activeFontKey; + var fonts = mutex.fonts; + var key = activeFontKey; + var str = "", + s = 0, + cmapConfirm; + var strText = ""; + var encoding = fonts[key].encoding; + if (fonts[key].encoding !== "Identity-H") { + return { + text: text, + x: x, + y: y, + options: options, + mutex: mutex + }; + } + strText = text; + key = activeFontKey; + if (Array.isArray(text)) { + strText = text[0]; + } + for (s = 0; s < strText.length; s += 1) { + if (fonts[key].metadata.hasOwnProperty("cmap")) { + cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; + /* + if (Object.prototype.toString.call(text) === '[object Array]') { + var i = 0; + // for (i = 0; i < text.length; i += 1) { + if (Object.prototype.toString.call(text[s]) === '[object Array]') { + cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id + } else { + } + //} + } else { + cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id + }*/ + } + if (!cmapConfirm) { + if (strText[s].charCodeAt(0) < 256 && fonts[key].metadata.hasOwnProperty("Unicode")) { + str += strText[s]; + } else { + str += ""; + } + } else { + str += strText[s]; + } + } + var result = ""; + if (parseInt(key.slice(1)) < 14 || encoding === "WinAnsiEncoding") { + //For the default 13 font + result = pdfEscape(str, key).split("").map(function (cv) { + return cv.charCodeAt(0).toString(16); + }).join(""); + } else if (encoding === "Identity-H") { + result = pdfEscape16(str, fonts[key]); + } + mutex.isHex = true; + return { + text: result, + x: x, + y: y, + options: options, + mutex: mutex + }; + }; + var utf8EscapeFunction = function utf8EscapeFunction(parms) { + var text = parms.text || "", + x = parms.x, + y = parms.y, + options = parms.options, + mutex = parms.mutex; + var tmpText = []; + var args = { + text: text, + x: x, + y: y, + options: options, + mutex: mutex + }; + if (Array.isArray(text)) { + var i = 0; + for (i = 0; i < text.length; i += 1) { + if (Array.isArray(text[i])) { + if (text[i].length === 3) { + tmpText.push([utf8TextFunction(Object.assign({}, args, { + text: text[i][0] + })).text, text[i][1], text[i][2]]); + } else { + tmpText.push(utf8TextFunction(Object.assign({}, args, { + text: text[i] + })).text); + } + } else { + tmpText.push(utf8TextFunction(Object.assign({}, args, { + text: text[i] + })).text); + } + } + parms.text = tmpText; + } else { + parms.text = utf8TextFunction(Object.assign({}, args, { + text: text + })).text; + } + }; + jsPDFAPI.events.push(["postProcessText", utf8EscapeFunction]); + })(jsPDF); + + /** + * @license + * jsPDF virtual FileSystem functionality + * + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + */ + + /** + * Use the vFS to handle files + * + * @name vFS + * @module + */ + (function (jsPDFAPI) { + + var _initializeVFS = function _initializeVFS() { + if (typeof this.internal.vFS === "undefined") { + this.internal.vFS = {}; + } + return true; + }; + + /** + * Check if the file exists in the vFS + * + * @name existsFileInVFS + * @function + * @param {string} Possible filename in the vFS. + * @returns {boolean} + * @example + * doc.existsFileInVFS("someFile.txt"); + */ + jsPDFAPI.existsFileInVFS = function (filename) { + _initializeVFS.call(this); + return typeof this.internal.vFS[filename] !== "undefined"; + }; + + /** + * Add a file to the vFS + * + * @name addFileToVFS + * @function + * @param {string} filename The name of the file which should be added. + * @param {string} filecontent The content of the file. + * @returns {jsPDF} + * @example + * doc.addFileToVFS("someFile.txt", "BADFACE1"); + */ + jsPDFAPI.addFileToVFS = function (filename, filecontent) { + _initializeVFS.call(this); + this.internal.vFS[filename] = filecontent; + return this; + }; + + /** + * Get the file from the vFS + * + * @name getFileFromVFS + * @function + * @param {string} The name of the file which gets requested. + * @returns {string} + * @example + * doc.getFileFromVFS("someFile.txt"); + */ + jsPDFAPI.getFileFromVFS = function (filename) { + _initializeVFS.call(this); + if (typeof this.internal.vFS[filename] !== "undefined") { + return this.internal.vFS[filename]; + } + return null; + }; + })(jsPDF.API); + + /** + * @license + * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis) + * MIT License + */ + (function (jsPDF) { + + /** + * Table of Unicode types. + * + * Generated by: + * + * var bidi = require("./bidi/index"); + * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)). + * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)). + * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256)); + * + * for( var i = 0; i < bidi_accumulate.length; i++) { + * if(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON') + * bidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined + * } + * var bidiAccumulateStr = 'return [ "' + bidi_accumulate.toString().replace(/,/g, '", "') + '" ];'; + * require("fs").writeFile('unicode-types.js', bidiAccumulateStr); + * + * Based on: + * https://github.com/mathiasbynens/unicode-8.0.0 + */ + var bidiUnicodeTypes = ["BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "S", "B", "S", "WS", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "B", "B", "B", "S", "WS", "N", "N", "ET", "ET", "ET", "N", "N", "N", "N", "N", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "BN", "BN", "BN", "BN", "BN", "BN", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "CS", "N", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "L", "N", "N", "BN", "N", "N", "ET", "ET", "EN", "EN", "N", "L", "N", "N", "N", "EN", "L", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "N", "N", "N", "N", "N", "ET", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "R", "NSM", "R", "NSM", "NSM", "R", "NSM", "NSM", "R", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "AN", "AN", "AN", "AN", "AN", "AN", "N", "N", "AL", "ET", "ET", "AL", "CS", "AL", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "ET", "AN", "AN", "AL", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "NSM", "NSM", "N", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "R", "R", "N", "N", "N", "N", "R", "N", "N", "N", "N", "N", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "BN", "BN", "BN", "L", "R", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "WS", "B", "LRE", "RLE", "PDF", "LRO", "RLO", "CS", "ET", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "CS", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "WS", "BN", "BN", "BN", "BN", "BN", "N", "LRI", "RLI", "FSI", "PDI", "BN", "BN", "BN", "BN", "BN", "BN", "EN", "L", "N", "N", "EN", "EN", "EN", "EN", "EN", "EN", "ES", "ES", "N", "N", "N", "L", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "ES", "ES", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "R", "NSM", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "ES", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "N", "R", "R", "R", "R", "R", "N", "R", "N", "R", "R", "N", "R", "R", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "CS", "N", "CS", "N", "N", "CS", "N", "N", "N", "N", "N", "N", "N", "N", "N", "ET", "N", "N", "ES", "ES", "N", "N", "N", "N", "N", "ET", "ET", "N", "N", "N", "N", "N", "AL", "AL", "AL", "AL", "AL", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "N", "BN", "N", "N", "N", "ET", "ET", "ET", "N", "N", "N", "N", "N", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "N", "N", "N", "ET", "ET", "N", "N", "N", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N"]; + + /** + * Unicode Bidi algorithm compliant Bidi engine. + * For reference see http://unicode.org/reports/tr9/ + */ + + /** + * constructor ( options ) + * + * Initializes Bidi engine + * + * @param {Object} See 'setOptions' below for detailed description. + * options are cashed between invocation of 'doBidiReorder' method + * + * sample usage pattern of BidiEngine: + * var opt = { + * isInputVisual: true, + * isInputRtl: false, + * isOutputVisual: false, + * isOutputRtl: false, + * isSymmetricSwapping: true + * } + * var sourceToTarget = [], levels = []; + * var bidiEng = Globalize.bidiEngine(opt); + * var src = "text string to be reordered"; + * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels); + */ + + jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function (options) { + var _UNICODE_TYPES = _bidiUnicodeTypes; + var _STATE_TABLE_LTR = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]]; + var _STATE_TABLE_RTL = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1]]; + var _TYPE_NAMES_MAP = { + L: 0, + R: 1, + EN: 2, + AN: 3, + N: 4, + B: 5, + S: 6 + }; + var _UNICODE_RANGES_MAP = { + 0: 0, + 5: 1, + 6: 2, + 7: 3, + 0x20: 4, + 0xfb: 5, + 0xfe: 6, + 0xff: 7 + }; + var _SWAP_TABLE = ["(", ")", "(", "<", ">", "<", "[", "]", "[", "{", "}", "{", "\xAB", "\xBB", "\xAB", "\u2039", "\u203A", "\u2039", "\u2045", "\u2046", "\u2045", "\u207D", "\u207E", "\u207D", "\u208D", "\u208E", "\u208D", "\u2264", "\u2265", "\u2264", "\u2329", "\u232A", "\u2329", "\uFE59", "\uFE5A", "\uFE59", "\uFE5B", "\uFE5C", "\uFE5B", "\uFE5D", "\uFE5E", "\uFE5D", "\uFE64", "\uFE65", "\uFE64"]; + var _LTR_RANGES_REG_EXPR = new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/); + var _lastArabic = false, + _hasUbatB, + _hasUbatS, + DIR_LTR = 0, + DIR_RTL = 1, + _isInVisual, + _isInRtl, + _isOutVisual, + _isOutRtl, + _isSymmetricSwapping, + _dir = DIR_LTR; + this.__bidiEngine__ = {}; + var _init = function _init(text, sourceToTargetMap) { + if (sourceToTargetMap) { + for (var i = 0; i < text.length; i++) { + sourceToTargetMap[i] = i; + } + } + if (_isInRtl === undefined) { + _isInRtl = _isContextualDirRtl(text); + } + if (_isOutRtl === undefined) { + _isOutRtl = _isContextualDirRtl(text); + } + }; + + // for reference see 3.2 in http://unicode.org/reports/tr9/ + // + var _getCharType = function _getCharType(ch) { + var charCode = ch.charCodeAt(), + range = charCode >> 8, + rangeIdx = _UNICODE_RANGES_MAP[range]; + if (rangeIdx !== undefined) { + return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)]; + } else if (range === 0xfc || range === 0xfd) { + return "AL"; + } else if (_LTR_RANGES_REG_EXPR.test(range)) { + //unlikely case + return "L"; + } else if (range === 8) { + // even less likely + return "R"; + } + return "N"; //undefined type, mark as neutral + }; + var _isContextualDirRtl = function _isContextualDirRtl(text) { + for (var i = 0, charType; i < text.length; i++) { + charType = _getCharType(text.charAt(i)); + if (charType === "L") { + return false; + } else if (charType === "R") { + return true; + } + } + return false; + }; + + // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/ + // + var _resolveCharType = function _resolveCharType(chars, types, resolvedTypes, index) { + var cType = types[index], + wType, + nType, + i, + len; + switch (cType) { + case "L": + case "R": + _lastArabic = false; + break; + case "N": + case "AN": + break; + case "EN": + if (_lastArabic) { + cType = "AN"; + } + break; + case "AL": + _lastArabic = true; + cType = "R"; + break; + case "WS": + cType = "N"; + break; + case "CS": + if (index < 1 || index + 1 >= types.length || (wType = resolvedTypes[index - 1]) !== "EN" && wType !== "AN" || (nType = types[index + 1]) !== "EN" && nType !== "AN") { + cType = "N"; + } else if (_lastArabic) { + nType = "AN"; + } + cType = nType === wType ? nType : "N"; + break; + case "ES": + wType = index > 0 ? resolvedTypes[index - 1] : "B"; + cType = wType === "EN" && index + 1 < types.length && types[index + 1] === "EN" ? "EN" : "N"; + break; + case "ET": + if (index > 0 && resolvedTypes[index - 1] === "EN") { + cType = "EN"; + break; + } else if (_lastArabic) { + cType = "N"; + break; + } + i = index + 1; + len = types.length; + while (i < len && types[i] === "ET") { + i++; + } + if (i < len && types[i] === "EN") { + cType = "EN"; + } else { + cType = "N"; + } + break; + case "NSM": + if (_isInVisual && !_isInRtl) { + //V->L + len = types.length; + i = index + 1; + while (i < len && types[i] === "NSM") { + i++; + } + if (i < len) { + var c = chars[index]; + var rtlCandidate = c >= 0x0591 && c <= 0x08ff || c === 0xfb1e; + wType = types[i]; + if (rtlCandidate && (wType === "R" || wType === "AL")) { + cType = "R"; + break; + } + } + } + if (index < 1 || (wType = types[index - 1]) === "B") { + cType = "N"; + } else { + cType = resolvedTypes[index - 1]; + } + break; + case "B": + _lastArabic = false; + _hasUbatB = true; + cType = _dir; + break; + case "S": + _hasUbatS = true; + cType = "N"; + break; + case "LRE": + case "RLE": + case "LRO": + case "RLO": + case "PDF": + _lastArabic = false; + break; + case "BN": + cType = "N"; + break; + } + return cType; + }; + var _handleUbatS = function _handleUbatS(types, levels, length) { + for (var i = 0; i < length; i++) { + if (types[i] === "S") { + levels[i] = _dir; + for (var j = i - 1; j >= 0; j--) { + if (types[j] === "WS") { + levels[j] = _dir; + } else { + break; + } + } + } + } + }; + var _invertString = function _invertString(text, sourceToTargetMap, levels) { + var charArray = text.split(""); + if (levels) { + _computeLevels(charArray, levels, { + hiLevel: _dir + }); + } + charArray.reverse(); + sourceToTargetMap && sourceToTargetMap.reverse(); + return charArray.join(""); + }; + + // For reference see 3.3 in http://unicode.org/reports/tr9/ + // + var _computeLevels = function _computeLevels(chars, levels, params) { + var action, + condition, + i, + index, + newLevel, + prevState, + condPos = -1, + len = chars.length, + newState = 0, + resolvedTypes = [], + stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR, + types = []; + _lastArabic = false; + _hasUbatB = false; + _hasUbatS = false; + for (i = 0; i < len; i++) { + types[i] = _getCharType(chars[i]); + } + for (index = 0; index < len; index++) { + prevState = newState; + resolvedTypes[index] = _resolveCharType(chars, types, resolvedTypes, index); + newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]]; + action = newState & 0xf0; + newState &= 0x0f; + levels[index] = newLevel = stateTable[newState][5]; + if (action > 0) { + if (action === 0x10) { + for (i = condPos; i < index; i++) { + levels[i] = 1; + } + condPos = -1; + } else { + condPos = -1; + } + } + condition = stateTable[newState][6]; + if (condition) { + if (condPos === -1) { + condPos = index; + } + } else { + if (condPos > -1) { + for (i = condPos; i < index; i++) { + levels[i] = newLevel; + } + condPos = -1; + } + } + if (types[index] === "B") { + levels[index] = 0; + } + params.hiLevel |= newLevel; + } + if (_hasUbatS) { + _handleUbatS(types, levels, len); + } + }; + + // for reference see 3.4 in http://unicode.org/reports/tr9/ + // + var _invertByLevel = function _invertByLevel(level, charArray, sourceToTargetMap, levels, params) { + if (params.hiLevel < level) { + return; + } + if (level === 1 && _dir === DIR_RTL && !_hasUbatB) { + charArray.reverse(); + sourceToTargetMap && sourceToTargetMap.reverse(); + return; + } + var ch, + high, + end, + low, + len = charArray.length, + start = 0; + while (start < len) { + if (levels[start] >= level) { + end = start + 1; + while (end < len && levels[end] >= level) { + end++; + } + for (low = start, high = end - 1; low < high; low++, high--) { + ch = charArray[low]; + charArray[low] = charArray[high]; + charArray[high] = ch; + if (sourceToTargetMap) { + ch = sourceToTargetMap[low]; + sourceToTargetMap[low] = sourceToTargetMap[high]; + sourceToTargetMap[high] = ch; + } + } + start = end; + } + start++; + } + }; + + // for reference see 7 & BD16 in http://unicode.org/reports/tr9/ + // + var _symmetricSwap = function _symmetricSwap(charArray, levels, params) { + if (params.hiLevel !== 0 && _isSymmetricSwapping) { + for (var i = 0, index; i < charArray.length; i++) { + if (levels[i] === 1) { + index = _SWAP_TABLE.indexOf(charArray[i]); + if (index >= 0) { + charArray[i] = _SWAP_TABLE[index + 1]; + } + } + } + } + }; + var _reorder = function _reorder(text, sourceToTargetMap, levels) { + var charArray = text.split(""), + params = { + hiLevel: _dir + }; + if (!levels) { + levels = []; + } + _computeLevels(charArray, levels, params); + _symmetricSwap(charArray, levels, params); + _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params); + _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params); + return charArray.join(""); + }; + + // doBidiReorder( text, sourceToTargetMap, levels ) + // Performs Bidi reordering by implementing Unicode Bidi algorithm. + // Returns reordered string + // @text [String]: + // - input string to be reordered, this is input parameter + // $sourceToTargetMap [Array] (optional) + // - resultant mapping between input and output strings, this is output parameter + // $levels [Array] (optional) + // - array of calculated Bidi levels, , this is output parameter + this.__bidiEngine__.doBidiReorder = function (text, sourceToTargetMap, levels) { + _init(text, sourceToTargetMap); + if (!_isInVisual && _isOutVisual && !_isOutRtl) { + // LLTR->VLTR, LRTL->VLTR + _dir = _isInRtl ? DIR_RTL : DIR_LTR; + text = _reorder(text, sourceToTargetMap, levels); + } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) { + // VRTL->VLTR, VLTR->VRTL + _dir = _isInRtl ? DIR_RTL : DIR_LTR; + text = _invertString(text, sourceToTargetMap, levels); + } else if (!_isInVisual && _isOutVisual && _isOutRtl) { + // LLTR->VRTL, LRTL->VRTL + _dir = _isInRtl ? DIR_RTL : DIR_LTR; + text = _reorder(text, sourceToTargetMap, levels); + text = _invertString(text, sourceToTargetMap); + } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) { + // VLTR->LLTR + _dir = DIR_LTR; + text = _reorder(text, sourceToTargetMap, levels); + } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) { + // VLTR->LRTL, VRTL->LLTR + text = _invertString(text, sourceToTargetMap); + if (_isInRtl) { + //LLTR -> VLTR + _dir = DIR_LTR; + text = _reorder(text, sourceToTargetMap, levels); + } else { + //LRTL -> VRTL + _dir = DIR_RTL; + text = _reorder(text, sourceToTargetMap, levels); + text = _invertString(text, sourceToTargetMap); + } + } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) { + // VRTL->LRTL + _dir = DIR_RTL; + text = _reorder(text, sourceToTargetMap, levels); + text = _invertString(text, sourceToTargetMap); + } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) { + // LRTL->LLTR, LLTR->LRTL + var isSymmetricSwappingOrig = _isSymmetricSwapping; + if (_isInRtl) { + //LRTL->LLTR + _dir = DIR_RTL; + text = _reorder(text, sourceToTargetMap, levels); + _dir = DIR_LTR; + _isSymmetricSwapping = false; + text = _reorder(text, sourceToTargetMap, levels); + _isSymmetricSwapping = isSymmetricSwappingOrig; + } else { + //LLTR->LRTL + _dir = DIR_LTR; + text = _reorder(text, sourceToTargetMap, levels); + text = _invertString(text, sourceToTargetMap); + _dir = DIR_RTL; + _isSymmetricSwapping = false; + text = _reorder(text, sourceToTargetMap, levels); + _isSymmetricSwapping = isSymmetricSwappingOrig; + text = _invertString(text, sourceToTargetMap); + } + } + return text; + }; + + /** + * @name setOptions( options ) + * @function + * Sets options for Bidi conversion + * @param {Object}: + * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode) + * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string) + * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode) + * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string) + * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping), + */ + this.__bidiEngine__.setOptions = function (options) { + if (options) { + _isInVisual = options.isInputVisual; + _isOutVisual = options.isOutputVisual; + _isInRtl = options.isInputRtl; + _isOutRtl = options.isOutputRtl; + _isSymmetricSwapping = options.isSymmetricSwapping; + } + }; + this.__bidiEngine__.setOptions(options); + return this.__bidiEngine__; + }; + var _bidiUnicodeTypes = bidiUnicodeTypes; + var bidiEngine = new jsPDF.__bidiEngine__({ + isInputVisual: true + }); + var bidiEngineFunction = function bidiEngineFunction(args) { + var text = args.text; + args.x; + args.y; + var options = args.options || {}; + args.mutex || {}; + options.lang; + var tmpText = []; + options.isInputVisual = typeof options.isInputVisual === "boolean" ? options.isInputVisual : true; + bidiEngine.setOptions(options); + if (Object.prototype.toString.call(text) === "[object Array]") { + var i = 0; + tmpText = []; + for (i = 0; i < text.length; i += 1) { + if (Object.prototype.toString.call(text[i]) === "[object Array]") { + tmpText.push([bidiEngine.doBidiReorder(text[i][0]), text[i][1], text[i][2]]); + } else { + tmpText.push([bidiEngine.doBidiReorder(text[i])]); + } + } + args.text = tmpText; + } else { + args.text = bidiEngine.doBidiReorder(text); + } + bidiEngine.setOptions({ + isInputVisual: true + }); + }; + jsPDF.API.events.push(["postProcessText", bidiEngineFunction]); + })(jsPDF); + + /* eslint-disable no-control-regex */ + jsPDF.API.TTFFont = function () { + /************************************************************************/ + /* function : open */ + /* comment : Decode the encoded ttf content and create a TTFFont object. */ + /************************************************************************/ + TTFFont.open = function (file) { + return new TTFFont(file); + }; + /***************************************************************/ + /* function : TTFFont gernerator */ + /* comment : Decode TTF contents are parsed, Data, */ + /* Subset object is created, and registerTTF function is called.*/ + /***************************************************************/ + function TTFFont(rawData) { + var data; + this.rawData = rawData; + data = this.contents = new Data(rawData); + this.contents.pos = 4; + if (data.readString(4) === "ttcf") { + throw new Error("TTCF not supported."); + } else { + data.pos = 0; + this.parse(); + this.subset = new Subset(this); + this.registerTTF(); + } + } + /********************************************************/ + /* function : parse */ + /* comment : TTF Parses the file contents by each table.*/ + /********************************************************/ + TTFFont.prototype.parse = function () { + this.directory = new Directory(this.contents); + this.head = new HeadTable(this); + this.name = new NameTable(this); + this.cmap = new CmapTable(this); + this.toUnicode = {}; + this.hhea = new HheaTable(this); + this.maxp = new MaxpTable(this); + this.hmtx = new HmtxTable(this); + this.post = new PostTable(this); + this.os2 = new OS2Table(this); + this.loca = new LocaTable(this); + this.glyf = new GlyfTable(this); + this.ascender = this.os2.exists && this.os2.ascender || this.hhea.ascender; + this.decender = this.os2.exists && this.os2.decender || this.hhea.decender; + this.lineGap = this.os2.exists && this.os2.lineGap || this.hhea.lineGap; + return this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax]; + }; + /***************************************************************/ + /* function : registerTTF */ + /* comment : Get the value to assign pdf font descriptors. */ + /***************************************************************/ + TTFFont.prototype.registerTTF = function () { + var e, hi, low, raw, _ref; + this.scaleFactor = 1000.0 / this.head.unitsPerEm; + this.bbox = function () { + var _i, _len, _ref, _results; + _ref = this.bbox; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + e = _ref[_i]; + _results.push(Math.round(e * this.scaleFactor)); + } + return _results; + }.call(this); + this.stemV = 0; + if (this.post.exists) { + raw = this.post.italic_angle; + hi = raw >> 16; + low = raw & 0xff; + if ((hi & 0x8000) !== 0) { + hi = -((hi ^ 0xffff) + 1); + } + this.italicAngle = +("" + hi + "." + low); + } else { + this.italicAngle = 0; + } + this.ascender = Math.round(this.ascender * this.scaleFactor); + this.decender = Math.round(this.decender * this.scaleFactor); + this.lineGap = Math.round(this.lineGap * this.scaleFactor); + this.capHeight = this.os2.exists && this.os2.capHeight || this.ascender; + this.xHeight = this.os2.exists && this.os2.xHeight || 0; + this.familyClass = (this.os2.exists && this.os2.familyClass || 0) >> 8; + this.isSerif = (_ref = this.familyClass) === 1 || _ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 7; + this.isScript = this.familyClass === 10; + this.flags = 0; + if (this.post.isFixedPitch) { + this.flags |= 1 << 0; + } + if (this.isSerif) { + this.flags |= 1 << 1; + } + if (this.isScript) { + this.flags |= 1 << 3; + } + if (this.italicAngle !== 0) { + this.flags |= 1 << 6; + } + this.flags |= 1 << 5; + if (!this.cmap.unicode) { + throw new Error("No unicode cmap for font"); + } + }; + TTFFont.prototype.characterToGlyph = function (character) { + var _ref; + return ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) || 0; + }; + TTFFont.prototype.widthOfGlyph = function (glyph) { + var scale; + scale = 1000.0 / this.head.unitsPerEm; + return this.hmtx.forGlyph(glyph).advance * scale; + }; + TTFFont.prototype.widthOfString = function (string, size, charSpace) { + var charCode, i, scale, width, _ref; + string = "" + string; + width = 0; + for (i = 0, _ref = string.length; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) { + charCode = string.charCodeAt(i); + width += this.widthOfGlyph(this.characterToGlyph(charCode)) + charSpace * (1000 / size) || 0; + } + scale = size / 1000; + return width * scale; + }; + TTFFont.prototype.lineHeight = function (size, includeGap) { + var gap; + if (includeGap == null) { + includeGap = false; + } + gap = includeGap ? this.lineGap : 0; + return (this.ascender + gap - this.decender) / 1000 * size; + }; + return TTFFont; + }(); + + /************************************************************************************************/ + /* function : Data */ + /* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/ + /************************************************************************************************/ + var Data = function () { + function Data(data) { + this.data = data != null ? data : []; + this.pos = 0; + this.length = this.data.length; + } + Data.prototype.readByte = function () { + return this.data[this.pos++]; + }; + Data.prototype.writeByte = function (byte) { + return this.data[this.pos++] = byte; + }; + Data.prototype.readUInt32 = function () { + var b1, b2, b3, b4; + b1 = this.readByte() * 0x1000000; + b2 = this.readByte() << 16; + b3 = this.readByte() << 8; + b4 = this.readByte(); + return b1 + b2 + b3 + b4; + }; + Data.prototype.writeUInt32 = function (val) { + this.writeByte(val >>> 24 & 0xff); + this.writeByte(val >> 16 & 0xff); + this.writeByte(val >> 8 & 0xff); + return this.writeByte(val & 0xff); + }; + Data.prototype.readInt32 = function () { + var int; + int = this.readUInt32(); + if (int >= 0x80000000) { + return int - 0x100000000; + } else { + return int; + } + }; + Data.prototype.writeInt32 = function (val) { + if (val < 0) { + val += 0x100000000; + } + return this.writeUInt32(val); + }; + Data.prototype.readUInt16 = function () { + var b1, b2; + b1 = this.readByte() << 8; + b2 = this.readByte(); + return b1 | b2; + }; + Data.prototype.writeUInt16 = function (val) { + this.writeByte(val >> 8 & 0xff); + return this.writeByte(val & 0xff); + }; + Data.prototype.readInt16 = function () { + var int; + int = this.readUInt16(); + if (int >= 0x8000) { + return int - 0x10000; + } else { + return int; + } + }; + Data.prototype.writeInt16 = function (val) { + if (val < 0) { + val += 0x10000; + } + return this.writeUInt16(val); + }; + Data.prototype.readString = function (length) { + var i, ret; + ret = []; + for (i = 0; 0 <= length ? i < length : i > length; i = 0 <= length ? ++i : --i) { + ret[i] = String.fromCharCode(this.readByte()); + } + return ret.join(""); + }; + Data.prototype.writeString = function (val) { + var i, _ref, _results; + _results = []; + for (i = 0, _ref = val.length; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) { + _results.push(this.writeByte(val.charCodeAt(i))); + } + return _results; + }; + /*Data.prototype.stringAt = function (pos, length) { + this.pos = pos; + return this.readString(length); + };*/ + Data.prototype.readShort = function () { + return this.readInt16(); + }; + Data.prototype.writeShort = function (val) { + return this.writeInt16(val); + }; + Data.prototype.readLongLong = function () { + var b1, b2, b3, b4, b5, b6, b7, b8; + b1 = this.readByte(); + b2 = this.readByte(); + b3 = this.readByte(); + b4 = this.readByte(); + b5 = this.readByte(); + b6 = this.readByte(); + b7 = this.readByte(); + b8 = this.readByte(); + if (b1 & 0x80) { + return ((b1 ^ 0xff) * 0x100000000000000 + (b2 ^ 0xff) * 0x1000000000000 + (b3 ^ 0xff) * 0x10000000000 + (b4 ^ 0xff) * 0x100000000 + (b5 ^ 0xff) * 0x1000000 + (b6 ^ 0xff) * 0x10000 + (b7 ^ 0xff) * 0x100 + (b8 ^ 0xff) + 1) * -1; + } + return b1 * 0x100000000000000 + b2 * 0x1000000000000 + b3 * 0x10000000000 + b4 * 0x100000000 + b5 * 0x1000000 + b6 * 0x10000 + b7 * 0x100 + b8; + }; + Data.prototype.writeLongLong = function (val) { + var high, low; + high = Math.floor(val / 0x100000000); + low = val & 0xffffffff; + this.writeByte(high >> 24 & 0xff); + this.writeByte(high >> 16 & 0xff); + this.writeByte(high >> 8 & 0xff); + this.writeByte(high & 0xff); + this.writeByte(low >> 24 & 0xff); + this.writeByte(low >> 16 & 0xff); + this.writeByte(low >> 8 & 0xff); + return this.writeByte(low & 0xff); + }; + Data.prototype.readInt = function () { + return this.readInt32(); + }; + Data.prototype.writeInt = function (val) { + return this.writeInt32(val); + }; + /*Data.prototype.slice = function (start, end) { + return this.data.slice(start, end); + };*/ + Data.prototype.read = function (bytes) { + var buf, i; + buf = []; + for (i = 0; 0 <= bytes ? i < bytes : i > bytes; i = 0 <= bytes ? ++i : --i) { + buf.push(this.readByte()); + } + return buf; + }; + Data.prototype.write = function (bytes) { + var byte, i, _len, _results; + _results = []; + for (i = 0, _len = bytes.length; i < _len; i++) { + byte = bytes[i]; + _results.push(this.writeByte(byte)); + } + return _results; + }; + return Data; + }(); + var Directory = function () { + var checksum; + + /*****************************************************************************************************/ + /* function : Directory generator */ + /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/ + /*****************************************************************************************************/ + function Directory(data) { + var entry, i, _ref; + this.scalarType = data.readInt(); + this.tableCount = data.readShort(); + this.searchRange = data.readShort(); + this.entrySelector = data.readShort(); + this.rangeShift = data.readShort(); + this.tables = {}; + for (i = 0, _ref = this.tableCount; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) { + entry = { + tag: data.readString(4), + checksum: data.readInt(), + offset: data.readInt(), + length: data.readInt() + }; + this.tables[entry.tag] = entry; + } + } + /********************************************************************************************************/ + /* function : encode */ + /* comment : It encodes and stores the font table object and information used for the directory object. */ + /********************************************************************************************************/ + Directory.prototype.encode = function (tables) { + var adjustment, directory, directoryLength, entrySelector, headOffset, log2, offset, rangeShift, searchRange, sum, table, tableCount, tableData, tag; + tableCount = Object.keys(tables).length; + log2 = Math.log(2); + searchRange = Math.floor(Math.log(tableCount) / log2) * 16; + entrySelector = Math.floor(searchRange / log2); + rangeShift = tableCount * 16 - searchRange; + directory = new Data(); + directory.writeInt(this.scalarType); + directory.writeShort(tableCount); + directory.writeShort(searchRange); + directory.writeShort(entrySelector); + directory.writeShort(rangeShift); + directoryLength = tableCount * 16; + offset = directory.pos + directoryLength; + headOffset = null; + tableData = []; + for (tag in tables) { + table = tables[tag]; + directory.writeString(tag); + directory.writeInt(checksum(table)); + directory.writeInt(offset); + directory.writeInt(table.length); + tableData = tableData.concat(table); + if (tag === "head") { + headOffset = offset; + } + offset += table.length; + while (offset % 4) { + tableData.push(0); + offset++; + } + } + directory.write(tableData); + sum = checksum(directory.data); + adjustment = 0xb1b0afba - sum; + directory.pos = headOffset + 8; + directory.writeUInt32(adjustment); + return directory.data; + }; + /***************************************************************/ + /* function : checksum */ + /* comment : Duplicate the table for the tag. */ + /***************************************************************/ + checksum = function checksum(data) { + var i, sum, tmp, _ref; + data = __slice.call(data); + while (data.length % 4) { + data.push(0); + } + tmp = new Data(data); + sum = 0; + for (i = 0, _ref = data.length; i < _ref; i = i += 4) { + sum += tmp.readUInt32(); + } + return sum & 0xffffffff; + }; + return Directory; + }(); + var Table, + __hasProp = {}.hasOwnProperty, + __extends = function __extends(child, parent) { + for (var key in parent) { + if (__hasProp.call(parent, key)) child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }; + + /***************************************************************/ + /* function : Table */ + /* comment : Save info for each table, and parse the table. */ + /***************************************************************/ + Table = function () { + function Table(file) { + var info; + this.file = file; + info = this.file.directory.tables[this.tag]; + this.exists = !!info; + if (info) { + this.offset = info.offset, this.length = info.length; + this.parse(this.file.contents); + } + } + Table.prototype.parse = function () {}; + Table.prototype.encode = function () {}; + Table.prototype.raw = function () { + if (!this.exists) { + return null; + } + this.file.contents.pos = this.offset; + return this.file.contents.read(this.length); + }; + return Table; + }(); + var HeadTable = function (_super) { + __extends(HeadTable, _super); + function HeadTable() { + return HeadTable.__super__.constructor.apply(this, arguments); + } + HeadTable.prototype.tag = "head"; + HeadTable.prototype.parse = function (data) { + data.pos = this.offset; + this.version = data.readInt(); + this.revision = data.readInt(); + this.checkSumAdjustment = data.readInt(); + this.magicNumber = data.readInt(); + this.flags = data.readShort(); + this.unitsPerEm = data.readShort(); + this.created = data.readLongLong(); + this.modified = data.readLongLong(); + this.xMin = data.readShort(); + this.yMin = data.readShort(); + this.xMax = data.readShort(); + this.yMax = data.readShort(); + this.macStyle = data.readShort(); + this.lowestRecPPEM = data.readShort(); + this.fontDirectionHint = data.readShort(); + this.indexToLocFormat = data.readShort(); + return this.glyphDataFormat = data.readShort(); + }; + HeadTable.prototype.encode = function (indexToLocFormat) { + var table; + table = new Data(); + table.writeInt(this.version); + table.writeInt(this.revision); + table.writeInt(this.checkSumAdjustment); + table.writeInt(this.magicNumber); + table.writeShort(this.flags); + table.writeShort(this.unitsPerEm); + table.writeLongLong(this.created); + table.writeLongLong(this.modified); + table.writeShort(this.xMin); + table.writeShort(this.yMin); + table.writeShort(this.xMax); + table.writeShort(this.yMax); + table.writeShort(this.macStyle); + table.writeShort(this.lowestRecPPEM); + table.writeShort(this.fontDirectionHint); + table.writeShort(indexToLocFormat); + table.writeShort(this.glyphDataFormat); + return table.data; + }; + return HeadTable; + }(Table); + + /************************************************************************************/ + /* function : CmapEntry */ + /* comment : Cmap Initializes and encodes object information (required by pdf spec).*/ + /************************************************************************************/ + var CmapEntry = function () { + function CmapEntry(data, offset) { + var code, count, endCode, glyphId, glyphIds, i, idDelta, idRangeOffset, index, saveOffset, segCount, segCountX2, start, startCode, tail, _j, _k, _len; + this.platformID = data.readUInt16(); + this.encodingID = data.readShort(); + this.offset = offset + data.readInt(); + saveOffset = data.pos; + data.pos = this.offset; + this.format = data.readUInt16(); + this.length = data.readUInt16(); + this.language = data.readUInt16(); + this.isUnicode = this.platformID === 3 && this.encodingID === 1 && this.format === 4 || this.platformID === 0 && this.format === 4; + this.codeMap = {}; + switch (this.format) { + case 0: + for (i = 0; i < 256; ++i) { + this.codeMap[i] = data.readByte(); + } + break; + case 4: + segCountX2 = data.readUInt16(); + segCount = segCountX2 / 2; + data.pos += 6; + endCode = function () { + var _j, _results; + _results = []; + for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) { + _results.push(data.readUInt16()); + } + return _results; + }(); + data.pos += 2; + startCode = function () { + var _j, _results; + _results = []; + for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) { + _results.push(data.readUInt16()); + } + return _results; + }(); + idDelta = function () { + var _j, _results; + _results = []; + for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) { + _results.push(data.readUInt16()); + } + return _results; + }(); + idRangeOffset = function () { + var _j, _results; + _results = []; + for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) { + _results.push(data.readUInt16()); + } + return _results; + }(); + count = (this.length - data.pos + this.offset) / 2; + glyphIds = function () { + var _j, _results; + _results = []; + for (i = _j = 0; 0 <= count ? _j < count : _j > count; i = 0 <= count ? ++_j : --_j) { + _results.push(data.readUInt16()); + } + return _results; + }(); + for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) { + tail = endCode[i]; + start = startCode[i]; + for (code = _k = start; start <= tail ? _k <= tail : _k >= tail; code = start <= tail ? ++_k : --_k) { + if (idRangeOffset[i] === 0) { + glyphId = code + idDelta[i]; + } else { + index = idRangeOffset[i] / 2 + (code - start) - (segCount - i); + glyphId = glyphIds[index] || 0; + if (glyphId !== 0) { + glyphId += idDelta[i]; + } + } + this.codeMap[code] = glyphId & 0xffff; + } + } + } + data.pos = saveOffset; + } + CmapEntry.encode = function (charmap, encoding) { + var charMap, code, codeMap, codes, delta, deltas, diff, endCode, endCodes, entrySelector, glyphIDs, i, id, indexes, last, map, nextID, offset, old, rangeOffsets, rangeShift, searchRange, segCount, segCountX2, startCode, startCodes, startGlyph, subtable, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _len7, _m, _n, _name, _o, _p, _q; + subtable = new Data(); + codes = Object.keys(charmap).sort(function (a, b) { + return a - b; + }); + switch (encoding) { + case "macroman": + id = 0; + indexes = function () { + var _results = []; + for (i = 0; i < 256; ++i) { + _results.push(0); + } + return _results; + }(); + map = { + 0: 0 + }; + codeMap = {}; + for (_i = 0, _len = codes.length; _i < _len; _i++) { + code = codes[_i]; + if (map[_name = charmap[code]] == null) { + map[_name] = ++id; + } + codeMap[code] = { + old: charmap[code], + new: map[charmap[code]] + }; + indexes[code] = map[charmap[code]]; + } + subtable.writeUInt16(1); + subtable.writeUInt16(0); + subtable.writeUInt32(12); + subtable.writeUInt16(0); + subtable.writeUInt16(262); + subtable.writeUInt16(0); + subtable.write(indexes); + return { + charMap: codeMap, + subtable: subtable.data, + maxGlyphID: id + 1 + }; + case "unicode": + startCodes = []; + endCodes = []; + nextID = 0; + map = {}; + charMap = {}; + last = diff = null; + for (_j = 0, _len1 = codes.length; _j < _len1; _j++) { + code = codes[_j]; + old = charmap[code]; + if (map[old] == null) { + map[old] = ++nextID; + } + charMap[code] = { + old: old, + new: map[old] + }; + delta = map[old] - code; + if (last == null || delta !== diff) { + if (last) { + endCodes.push(last); + } + startCodes.push(code); + diff = delta; + } + last = code; + } + if (last) { + endCodes.push(last); + } + endCodes.push(0xffff); + startCodes.push(0xffff); + segCount = startCodes.length; + segCountX2 = segCount * 2; + searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2); + entrySelector = Math.log(searchRange / 2) / Math.LN2; + rangeShift = 2 * segCount - searchRange; + deltas = []; + rangeOffsets = []; + glyphIDs = []; + for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) { + startCode = startCodes[i]; + endCode = endCodes[i]; + if (startCode === 0xffff) { + deltas.push(0); + rangeOffsets.push(0); + break; + } + startGlyph = charMap[startCode]["new"]; + if (startCode - startGlyph >= 0x8000) { + deltas.push(0); + rangeOffsets.push(2 * (glyphIDs.length + segCount - i)); + for (code = _l = startCode; startCode <= endCode ? _l <= endCode : _l >= endCode; code = startCode <= endCode ? ++_l : --_l) { + glyphIDs.push(charMap[code]["new"]); + } + } else { + deltas.push(startGlyph - startCode); + rangeOffsets.push(0); + } + } + subtable.writeUInt16(3); + subtable.writeUInt16(1); + subtable.writeUInt32(12); + subtable.writeUInt16(4); + subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2); + subtable.writeUInt16(0); + subtable.writeUInt16(segCountX2); + subtable.writeUInt16(searchRange); + subtable.writeUInt16(entrySelector); + subtable.writeUInt16(rangeShift); + for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) { + code = endCodes[_m]; + subtable.writeUInt16(code); + } + subtable.writeUInt16(0); + for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) { + code = startCodes[_n]; + subtable.writeUInt16(code); + } + for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) { + delta = deltas[_o]; + subtable.writeUInt16(delta); + } + for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) { + offset = rangeOffsets[_p]; + subtable.writeUInt16(offset); + } + for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) { + id = glyphIDs[_q]; + subtable.writeUInt16(id); + } + return { + charMap: charMap, + subtable: subtable.data, + maxGlyphID: nextID + 1 + }; + } + }; + return CmapEntry; + }(); + var CmapTable = function (_super) { + __extends(CmapTable, _super); + function CmapTable() { + return CmapTable.__super__.constructor.apply(this, arguments); + } + CmapTable.prototype.tag = "cmap"; + CmapTable.prototype.parse = function (data) { + var entry, i, tableCount; + data.pos = this.offset; + this.version = data.readUInt16(); + tableCount = data.readUInt16(); + this.tables = []; + this.unicode = null; + for (i = 0; 0 <= tableCount ? i < tableCount : i > tableCount; i = 0 <= tableCount ? ++i : --i) { + entry = new CmapEntry(data, this.offset); + this.tables.push(entry); + if (entry.isUnicode) { + if (this.unicode == null) { + this.unicode = entry; + } + } + } + return true; + }; + /*************************************************************************/ + /* function : encode */ + /* comment : Encode the cmap table corresponding to the input character. */ + /*************************************************************************/ + CmapTable.encode = function (charmap, encoding) { + var result, table; + if (encoding == null) { + encoding = "macroman"; + } + result = CmapEntry.encode(charmap, encoding); + table = new Data(); + table.writeUInt16(0); + table.writeUInt16(1); + result.table = table.data.concat(result.subtable); + return result; + }; + return CmapTable; + }(Table); + var HheaTable = function (_super) { + __extends(HheaTable, _super); + function HheaTable() { + return HheaTable.__super__.constructor.apply(this, arguments); + } + HheaTable.prototype.tag = "hhea"; + HheaTable.prototype.parse = function (data) { + data.pos = this.offset; + this.version = data.readInt(); + this.ascender = data.readShort(); + this.decender = data.readShort(); + this.lineGap = data.readShort(); + this.advanceWidthMax = data.readShort(); + this.minLeftSideBearing = data.readShort(); + this.minRightSideBearing = data.readShort(); + this.xMaxExtent = data.readShort(); + this.caretSlopeRise = data.readShort(); + this.caretSlopeRun = data.readShort(); + this.caretOffset = data.readShort(); + data.pos += 4 * 2; + this.metricDataFormat = data.readShort(); + return this.numberOfMetrics = data.readUInt16(); + }; + /*HheaTable.prototype.encode = function (ids) { + var i, table, _i, _ref; + table = new Data; + table.writeInt(this.version); + table.writeShort(this.ascender); + table.writeShort(this.decender); + table.writeShort(this.lineGap); + table.writeShort(this.advanceWidthMax); + table.writeShort(this.minLeftSideBearing); + table.writeShort(this.minRightSideBearing); + table.writeShort(this.xMaxExtent); + table.writeShort(this.caretSlopeRise); + table.writeShort(this.caretSlopeRun); + table.writeShort(this.caretOffset); + for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + table.writeByte(0); + } + table.writeShort(this.metricDataFormat); + table.writeUInt16(ids.length); + return table.data; + };*/ + return HheaTable; + }(Table); + var OS2Table = function (_super) { + __extends(OS2Table, _super); + function OS2Table() { + return OS2Table.__super__.constructor.apply(this, arguments); + } + OS2Table.prototype.tag = "OS/2"; + OS2Table.prototype.parse = function (data) { + data.pos = this.offset; + this.version = data.readUInt16(); + this.averageCharWidth = data.readShort(); + this.weightClass = data.readUInt16(); + this.widthClass = data.readUInt16(); + this.type = data.readShort(); + this.ySubscriptXSize = data.readShort(); + this.ySubscriptYSize = data.readShort(); + this.ySubscriptXOffset = data.readShort(); + this.ySubscriptYOffset = data.readShort(); + this.ySuperscriptXSize = data.readShort(); + this.ySuperscriptYSize = data.readShort(); + this.ySuperscriptXOffset = data.readShort(); + this.ySuperscriptYOffset = data.readShort(); + this.yStrikeoutSize = data.readShort(); + this.yStrikeoutPosition = data.readShort(); + this.familyClass = data.readShort(); + this.panose = function () { + var i, _results; + _results = []; + for (i = 0; i < 10; ++i) { + _results.push(data.readByte()); + } + return _results; + }(); + this.charRange = function () { + var i, _results; + _results = []; + for (i = 0; i < 4; ++i) { + _results.push(data.readInt()); + } + return _results; + }(); + this.vendorID = data.readString(4); + this.selection = data.readShort(); + this.firstCharIndex = data.readShort(); + this.lastCharIndex = data.readShort(); + if (this.version > 0) { + this.ascent = data.readShort(); + this.descent = data.readShort(); + this.lineGap = data.readShort(); + this.winAscent = data.readShort(); + this.winDescent = data.readShort(); + this.codePageRange = function () { + var i, _results; + _results = []; + for (i = 0; i < 2; i = ++i) { + _results.push(data.readInt()); + } + return _results; + }(); + if (this.version > 1) { + this.xHeight = data.readShort(); + this.capHeight = data.readShort(); + this.defaultChar = data.readShort(); + this.breakChar = data.readShort(); + return this.maxContext = data.readShort(); + } + } + }; + /*OS2Table.prototype.encode = function () { + return this.raw(); + };*/ + return OS2Table; + }(Table); + var PostTable = function (_super) { + __extends(PostTable, _super); + function PostTable() { + return PostTable.__super__.constructor.apply(this, arguments); + } + PostTable.prototype.tag = "post"; + PostTable.prototype.parse = function (data) { + var length, numberOfGlyphs, _results; + data.pos = this.offset; + this.format = data.readInt(); + this.italicAngle = data.readInt(); + this.underlinePosition = data.readShort(); + this.underlineThickness = data.readShort(); + this.isFixedPitch = data.readInt(); + this.minMemType42 = data.readInt(); + this.maxMemType42 = data.readInt(); + this.minMemType1 = data.readInt(); + this.maxMemType1 = data.readInt(); + switch (this.format) { + case 0x00010000: + break; + case 0x00020000: + numberOfGlyphs = data.readUInt16(); + this.glyphNameIndex = []; + var i; + for (i = 0; 0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs; i = 0 <= numberOfGlyphs ? ++i : --i) { + this.glyphNameIndex.push(data.readUInt16()); + } + this.names = []; + _results = []; + while (data.pos < this.offset + this.length) { + length = data.readByte(); + _results.push(this.names.push(data.readString(length))); + } + return _results; + case 0x00025000: + numberOfGlyphs = data.readUInt16(); + return this.offsets = data.read(numberOfGlyphs); + case 0x00030000: + break; + case 0x00040000: + return this.map = function () { + var _j, _ref, _results1; + _results1 = []; + for (i = _j = 0, _ref = this.file.maxp.numGlyphs; 0 <= _ref ? _j < _ref : _j > _ref; i = 0 <= _ref ? ++_j : --_j) { + _results1.push(data.readUInt32()); + } + return _results1; + }.call(this); + } + }; + return PostTable; + }(Table); + + /*********************************************************************************************************/ + /* function : NameEntry */ + /* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/ + /*********************************************************************************************************/ + var NameEntry = function () { + function NameEntry(raw, entry) { + this.raw = raw; + this.length = raw.length; + this.platformID = entry.platformID; + this.encodingID = entry.encodingID; + this.languageID = entry.languageID; + } + return NameEntry; + }(); + var NameTable = function (_super) { + __extends(NameTable, _super); + function NameTable() { + return NameTable.__super__.constructor.apply(this, arguments); + } + NameTable.prototype.tag = "name"; + NameTable.prototype.parse = function (data) { + var count, entries, entry, i, name, stringOffset, strings, text, _j, _len, _name; + data.pos = this.offset; + data.readShort(); //format + count = data.readShort(); + stringOffset = data.readShort(); + entries = []; + for (i = 0; 0 <= count ? i < count : i > count; i = 0 <= count ? ++i : --i) { + entries.push({ + platformID: data.readShort(), + encodingID: data.readShort(), + languageID: data.readShort(), + nameID: data.readShort(), + length: data.readShort(), + offset: this.offset + stringOffset + data.readShort() + }); + } + strings = {}; + for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) { + entry = entries[i]; + data.pos = entry.offset; + text = data.readString(entry.length); + name = new NameEntry(text, entry); + if (strings[_name = entry.nameID] == null) { + strings[_name] = []; + } + strings[entry.nameID].push(name); + } + this.strings = strings; + this.copyright = strings[0]; + this.fontFamily = strings[1]; + this.fontSubfamily = strings[2]; + this.uniqueSubfamily = strings[3]; + this.fontName = strings[4]; + this.version = strings[5]; + try { + this.postscriptName = strings[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g, ""); + } catch (e) { + this.postscriptName = strings[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g, ""); + } + this.trademark = strings[7]; + this.manufacturer = strings[8]; + this.designer = strings[9]; + this.description = strings[10]; + this.vendorUrl = strings[11]; + this.designerUrl = strings[12]; + this.license = strings[13]; + this.licenseUrl = strings[14]; + this.preferredFamily = strings[15]; + this.preferredSubfamily = strings[17]; + this.compatibleFull = strings[18]; + return this.sampleText = strings[19]; + }; + /*NameTable.prototype.encode = function () { + var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref; + strings = {}; + _ref = this.strings; + for (id in _ref) { + val = _ref[id]; + strings[id] = val; + } + postscriptName = new NameEntry("" + subsetTag + "+" + this.postscriptName, { + platformID: 1 + , encodingID: 0 + , languageID: 0 + }); + strings[6] = [postscriptName]; + subsetTag = successorOf(subsetTag); + strCount = 0; + for (id in strings) { + list = strings[id]; + if (list != null) { + strCount += list.length; + } + } + table = new Data; + strTable = new Data; + table.writeShort(0); + table.writeShort(strCount); + table.writeShort(6 + 12 * strCount); + for (nameID in strings) { + list = strings[nameID]; + if (list != null) { + for (_i = 0, _len = list.length; _i < _len; _i++) { + string = list[_i]; + table.writeShort(string.platformID); + table.writeShort(string.encodingID); + table.writeShort(string.languageID); + table.writeShort(nameID); + table.writeShort(string.length); + table.writeShort(strTable.pos); + strTable.writeString(string.raw); + } + } + } + return nameTable = { + postscriptName: postscriptName.raw + , table: table.data.concat(strTable.data) + }; + };*/ + return NameTable; + }(Table); + var MaxpTable = function (_super) { + __extends(MaxpTable, _super); + function MaxpTable() { + return MaxpTable.__super__.constructor.apply(this, arguments); + } + MaxpTable.prototype.tag = "maxp"; + MaxpTable.prototype.parse = function (data) { + data.pos = this.offset; + this.version = data.readInt(); + this.numGlyphs = data.readUInt16(); + this.maxPoints = data.readUInt16(); + this.maxContours = data.readUInt16(); + this.maxCompositePoints = data.readUInt16(); + this.maxComponentContours = data.readUInt16(); + this.maxZones = data.readUInt16(); + this.maxTwilightPoints = data.readUInt16(); + this.maxStorage = data.readUInt16(); + this.maxFunctionDefs = data.readUInt16(); + this.maxInstructionDefs = data.readUInt16(); + this.maxStackElements = data.readUInt16(); + this.maxSizeOfInstructions = data.readUInt16(); + this.maxComponentElements = data.readUInt16(); + return this.maxComponentDepth = data.readUInt16(); + }; + /*MaxpTable.prototype.encode = function (ids) { + var table; + table = new Data; + table.writeInt(this.version); + table.writeUInt16(ids.length); + table.writeUInt16(this.maxPoints); + table.writeUInt16(this.maxContours); + table.writeUInt16(this.maxCompositePoints); + table.writeUInt16(this.maxComponentContours); + table.writeUInt16(this.maxZones); + table.writeUInt16(this.maxTwilightPoints); + table.writeUInt16(this.maxStorage); + table.writeUInt16(this.maxFunctionDefs); + table.writeUInt16(this.maxInstructionDefs); + table.writeUInt16(this.maxStackElements); + table.writeUInt16(this.maxSizeOfInstructions); + table.writeUInt16(this.maxComponentElements); + table.writeUInt16(this.maxComponentDepth); + return table.data; + };*/ + return MaxpTable; + }(Table); + var HmtxTable = function (_super) { + __extends(HmtxTable, _super); + function HmtxTable() { + return HmtxTable.__super__.constructor.apply(this, arguments); + } + HmtxTable.prototype.tag = "hmtx"; + HmtxTable.prototype.parse = function (data) { + var i, last, lsbCount, m, _j, _ref, _results; + data.pos = this.offset; + this.metrics = []; + for (i = 0, _ref = this.file.hhea.numberOfMetrics; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) { + this.metrics.push({ + advance: data.readUInt16(), + lsb: data.readInt16() + }); + } + lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics; + this.leftSideBearings = function () { + var _j, _results; + _results = []; + for (i = _j = 0; 0 <= lsbCount ? _j < lsbCount : _j > lsbCount; i = 0 <= lsbCount ? ++_j : --_j) { + _results.push(data.readInt16()); + } + return _results; + }(); + this.widths = function () { + var _j, _len, _ref1, _results; + _ref1 = this.metrics; + _results = []; + for (_j = 0, _len = _ref1.length; _j < _len; _j++) { + m = _ref1[_j]; + _results.push(m.advance); + } + return _results; + }.call(this); + last = this.widths[this.widths.length - 1]; + _results = []; + for (i = _j = 0; 0 <= lsbCount ? _j < lsbCount : _j > lsbCount; i = 0 <= lsbCount ? ++_j : --_j) { + _results.push(this.widths.push(last)); + } + return _results; + }; + /***************************************************************/ + /* function : forGlyph */ + /* comment : Returns the advance width and lsb for this glyph. */ + /***************************************************************/ + HmtxTable.prototype.forGlyph = function (id) { + if (id in this.metrics) { + return this.metrics[id]; + } + return { + advance: this.metrics[this.metrics.length - 1].advance, + lsb: this.leftSideBearings[id - this.metrics.length] + }; + }; + /*HmtxTable.prototype.encode = function (mapping) { + var id, metric, table, _i, _len; + table = new Data; + for (_i = 0, _len = mapping.length; _i < _len; _i++) { + id = mapping[_i]; + metric = this.forGlyph(id); + table.writeUInt16(metric.advance); + table.writeUInt16(metric.lsb); + } + return table.data; + };*/ + return HmtxTable; + }(Table); + var __slice = [].slice; + var GlyfTable = function (_super) { + __extends(GlyfTable, _super); + function GlyfTable() { + return GlyfTable.__super__.constructor.apply(this, arguments); + } + GlyfTable.prototype.tag = "glyf"; + GlyfTable.prototype.parse = function () { + return this.cache = {}; + }; + GlyfTable.prototype.glyphFor = function (id) { + var data, index, length, loca, numberOfContours, raw, xMax, xMin, yMax, yMin; + if (id in this.cache) { + return this.cache[id]; + } + loca = this.file.loca; + data = this.file.contents; + index = loca.indexOf(id); + length = loca.lengthOf(id); + if (length === 0) { + return this.cache[id] = null; + } + data.pos = this.offset + index; + raw = new Data(data.read(length)); + numberOfContours = raw.readShort(); + xMin = raw.readShort(); + yMin = raw.readShort(); + xMax = raw.readShort(); + yMax = raw.readShort(); + if (numberOfContours === -1) { + this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax); + } else { + this.cache[id] = new SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax); + } + return this.cache[id]; + }; + GlyfTable.prototype.encode = function (glyphs, mapping, old2new) { + var glyph, id, offsets, table, _i, _len; + table = []; + offsets = []; + for (_i = 0, _len = mapping.length; _i < _len; _i++) { + id = mapping[_i]; + glyph = glyphs[id]; + offsets.push(table.length); + if (glyph) { + table = table.concat(glyph.encode(old2new)); + } + } + offsets.push(table.length); + return { + table: table, + offsets: offsets + }; + }; + return GlyfTable; + }(Table); + var SimpleGlyph = function () { + /**************************************************************************/ + /* function : SimpleGlyph */ + /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/ + /**************************************************************************/ + function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) { + this.raw = raw; + this.numberOfContours = numberOfContours; + this.xMin = xMin; + this.yMin = yMin; + this.xMax = xMax; + this.yMax = yMax; + this.compound = false; + } + SimpleGlyph.prototype.encode = function () { + return this.raw.data; + }; + return SimpleGlyph; + }(); + var CompoundGlyph = function () { + var ARG_1_AND_2_ARE_WORDS, MORE_COMPONENTS, WE_HAVE_AN_X_AND_Y_SCALE, WE_HAVE_A_SCALE, WE_HAVE_A_TWO_BY_TWO; + ARG_1_AND_2_ARE_WORDS = 0x0001; + WE_HAVE_A_SCALE = 0x0008; + MORE_COMPONENTS = 0x0020; + WE_HAVE_AN_X_AND_Y_SCALE = 0x0040; + WE_HAVE_A_TWO_BY_TWO = 0x0080; + + /********************************************************************************************************************/ + /* function : CompoundGlypg generator */ + /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/ + /********************************************************************************************************************/ + function CompoundGlyph(raw, xMin, yMin, xMax, yMax) { + var data, flags; + this.raw = raw; + this.xMin = xMin; + this.yMin = yMin; + this.xMax = xMax; + this.yMax = yMax; + this.compound = true; + this.glyphIDs = []; + this.glyphOffsets = []; + data = this.raw; + while (true) { + flags = data.readShort(); + this.glyphOffsets.push(data.pos); + this.glyphIDs.push(data.readUInt16()); + if (!(flags & MORE_COMPONENTS)) { + break; + } + if (flags & ARG_1_AND_2_ARE_WORDS) { + data.pos += 4; + } else { + data.pos += 2; + } + if (flags & WE_HAVE_A_TWO_BY_TWO) { + data.pos += 8; + } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { + data.pos += 4; + } else if (flags & WE_HAVE_A_SCALE) { + data.pos += 2; + } + } + } + /****************************************************************************************************************/ + /* function : CompoundGlypg encode */ + /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/ + /****************************************************************************************************************/ + CompoundGlyph.prototype.encode = function () { + var i, result, _len, _ref; + result = new Data(__slice.call(this.raw.data)); + _ref = this.glyphIDs; + for (i = 0, _len = _ref.length; i < _len; ++i) { + result.pos = this.glyphOffsets[i]; + } + return result.data; + }; + return CompoundGlyph; + }(); + var LocaTable = function (_super) { + __extends(LocaTable, _super); + function LocaTable() { + return LocaTable.__super__.constructor.apply(this, arguments); + } + LocaTable.prototype.tag = "loca"; + LocaTable.prototype.parse = function (data) { + var format, i; + data.pos = this.offset; + format = this.file.head.indexToLocFormat; + if (format === 0) { + return this.offsets = function () { + var _ref, _results; + _results = []; + for (i = 0, _ref = this.length; i < _ref; i += 2) { + _results.push(data.readUInt16() * 2); + } + return _results; + }.call(this); + } else { + return this.offsets = function () { + var _ref, _results; + _results = []; + for (i = 0, _ref = this.length; i < _ref; i += 4) { + _results.push(data.readUInt32()); + } + return _results; + }.call(this); + } + }; + LocaTable.prototype.indexOf = function (id) { + return this.offsets[id]; + }; + LocaTable.prototype.lengthOf = function (id) { + return this.offsets[id + 1] - this.offsets[id]; + }; + LocaTable.prototype.encode = function (offsets, activeGlyphs) { + var LocaTable = new Uint32Array(this.offsets.length); + var glyfPtr = 0; + var listGlyf = 0; + for (var k = 0; k < LocaTable.length; ++k) { + LocaTable[k] = glyfPtr; + if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) { + ++listGlyf; + LocaTable[k] = glyfPtr; + var start = this.offsets[k]; + var len = this.offsets[k + 1] - start; + if (len > 0) { + glyfPtr += len; + } + } + } + var newLocaTable = new Array(LocaTable.length * 4); + for (var j = 0; j < LocaTable.length; ++j) { + newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff; + newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8; + newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16; + newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24; + } + return newLocaTable; + }; + return LocaTable; + }(Table); + + /************************************************************************************/ + /* function : invert */ + /* comment : Change the object's (key: value) to create an object with (value: key).*/ + /************************************************************************************/ + var invert = function invert(object) { + var key, ret, val; + ret = {}; + for (key in object) { + val = object[key]; + ret[val] = key; + } + return ret; + }; + + /*var successorOf = function (input) { + var added, alphabet, carry, i, index, isUpperCase, last, length, next, result; + alphabet = 'abcdefghijklmnopqrstuvwxyz'; + length = alphabet.length; + result = input; + i = input.length; + while (i >= 0) { + last = input.charAt(--i); + if (isNaN(last)) { + index = alphabet.indexOf(last.toLowerCase()); + if (index === -1) { + next = last; + carry = true; + } + else { + next = alphabet.charAt((index + 1) % length); + isUpperCase = last === last.toUpperCase(); + if (isUpperCase) { + next = next.toUpperCase(); + } + carry = index + 1 >= length; + if (carry && i === 0) { + added = isUpperCase ? 'A' : 'a'; + result = added + next + result.slice(1); + break; + } + } + } + else { + next = +last + 1; + carry = next > 9; + if (carry) { + next = 0; + } + if (carry && i === 0) { + result = '1' + next + result.slice(1); + break; + } + } + result = result.slice(0, i) + next + result.slice(i + 1); + if (!carry) { + break; + } + } + return result; + };*/ + + var Subset = function () { + function Subset(font) { + this.font = font; + this.subset = {}; + this.unicodes = {}; + this.next = 33; + } + /*Subset.prototype.use = function (character) { + var i, _i, _ref; + if (typeof character === 'string') { + for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + this.use(character.charCodeAt(i)); + } + return; + } + if (!this.unicodes[character]) { + this.subset[this.next] = character; + return this.unicodes[character] = this.next++; + } + };*/ + /*Subset.prototype.encodeText = function (text) { + var char, i, string, _i, _ref; + string = ''; + for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + char = this.unicodes[text.charCodeAt(i)]; + string += String.fromCharCode(char); + } + return string; + };*/ + /***************************************************************/ + /* function : generateCmap */ + /* comment : Returns the unicode cmap for this font. */ + /***************************************************************/ + Subset.prototype.generateCmap = function () { + var mapping, roman, unicode, unicodeCmap, _ref; + unicodeCmap = this.font.cmap.tables[0].codeMap; + mapping = {}; + _ref = this.subset; + for (roman in _ref) { + unicode = _ref[roman]; + mapping[roman] = unicodeCmap[unicode]; + } + return mapping; + }; + /*Subset.prototype.glyphIDs = function () { + var ret, roman, unicode, unicodeCmap, val, _ref; + unicodeCmap = this.font.cmap.tables[0].codeMap; + ret = [0]; + _ref = this.subset; + for (roman in _ref) { + unicode = _ref[roman]; + val = unicodeCmap[unicode]; + if ((val != null) && __indexOf.call(ret, val) < 0) { + ret.push(val); + } + } + return ret.sort(); + };*/ + /******************************************************************/ + /* function : glyphsFor */ + /* comment : Returns simple glyph objects for the input character.*/ + /******************************************************************/ + Subset.prototype.glyphsFor = function (glyphIDs) { + var additionalIDs, glyph, glyphs, id, _i, _len, _ref; + glyphs = {}; + for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) { + id = glyphIDs[_i]; + glyphs[id] = this.font.glyf.glyphFor(id); + } + additionalIDs = []; + for (id in glyphs) { + glyph = glyphs[id]; + if (glyph != null ? glyph.compound : void 0) { + additionalIDs.push.apply(additionalIDs, glyph.glyphIDs); + } + } + if (additionalIDs.length > 0) { + _ref = this.glyphsFor(additionalIDs); + for (id in _ref) { + glyph = _ref[id]; + glyphs[id] = glyph; + } + } + return glyphs; + }; + /***************************************************************/ + /* function : encode */ + /* comment : Encode various tables for the characters you use. */ + /***************************************************************/ + Subset.prototype.encode = function (glyID, indexToLocFormat) { + var cmap, code, glyf, glyphs, id, ids, loca, new2old, newIDs, nextGlyphID, old2new, oldID, oldIDs, tables, _ref; + cmap = CmapTable.encode(this.generateCmap(), "unicode"); + glyphs = this.glyphsFor(glyID); + old2new = { + 0: 0 + }; + _ref = cmap.charMap; + for (code in _ref) { + ids = _ref[code]; + old2new[ids.old] = ids["new"]; + } + nextGlyphID = cmap.maxGlyphID; + for (oldID in glyphs) { + if (!(oldID in old2new)) { + old2new[oldID] = nextGlyphID++; + } + } + new2old = invert(old2new); + newIDs = Object.keys(new2old).sort(function (a, b) { + return a - b; + }); + oldIDs = function () { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = newIDs.length; _i < _len; _i++) { + id = newIDs[_i]; + _results.push(new2old[id]); + } + return _results; + }(); + glyf = this.font.glyf.encode(glyphs, oldIDs, old2new); + loca = this.font.loca.encode(glyf.offsets, oldIDs); + tables = { + cmap: this.font.cmap.raw(), + glyf: glyf.table, + loca: loca, + hmtx: this.font.hmtx.raw(), + hhea: this.font.hhea.raw(), + maxp: this.font.maxp.raw(), + post: this.font.post.raw(), + name: this.font.name.raw(), + head: this.font.head.encode(indexToLocFormat) + }; + if (this.font.os2.exists) { + tables["OS/2"] = this.font.os2.raw(); + } + return this.font.directory.encode(tables); + }; + return Subset; + }(); + jsPDF.API.PDFObject = function () { + var pad; + function PDFObject() {} + pad = function pad(str, length) { + return (Array(length + 1).join("0") + str).slice(-length); + }; + /*****************************************************************************/ + /* function : convert */ + /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */ + /*****************************************************************************/ + PDFObject.convert = function (object) { + var e, items, key, out, val; + if (Array.isArray(object)) { + items = function () { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = object.length; _i < _len; _i++) { + e = object[_i]; + _results.push(PDFObject.convert(e)); + } + return _results; + }().join(" "); + return "[" + items + "]"; + } else if (typeof object === "string") { + return "/" + object; + } else if (object != null ? object.isString : void 0) { + return "(" + object + ")"; + } else if (object instanceof Date) { + return "(D:" + pad(object.getUTCFullYear(), 4) + pad(object.getUTCMonth(), 2) + pad(object.getUTCDate(), 2) + pad(object.getUTCHours(), 2) + pad(object.getUTCMinutes(), 2) + pad(object.getUTCSeconds(), 2) + "Z)"; + } else if ({}.toString.call(object) === "[object Object]") { + out = ["<<"]; + for (key in object) { + val = object[key]; + out.push("/" + key + " " + PDFObject.convert(val)); + } + out.push(">>"); + return out.join("\n"); + } else { + return "" + object; + } + }; + return PDFObject; + }(); + + exports.AcroForm = AcroForm; + exports.AcroFormAppearance = AcroFormAppearance; + exports.AcroFormButton = AcroFormButton; + exports.AcroFormCheckBox = AcroFormCheckBox; + exports.AcroFormChoiceField = AcroFormChoiceField; + exports.AcroFormComboBox = AcroFormComboBox; + exports.AcroFormEditBox = AcroFormEditBox; + exports.AcroFormListBox = AcroFormListBox; + exports.AcroFormPasswordField = AcroFormPasswordField; + exports.AcroFormPushButton = AcroFormPushButton; + exports.AcroFormRadioButton = AcroFormRadioButton; + exports.AcroFormTextField = AcroFormTextField; + exports.GState = GState; + exports.ShadingPattern = ShadingPattern; + exports.TilingPattern = TilingPattern; + exports["default"] = jsPDF; + exports.jsPDF = jsPDF; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=jspdf.umd.js.map diff --git a/Server/www/spiderbasic/localforage.min.js b/Server/www/spiderbasic/localforage.min.js new file mode 100644 index 0000000..afc52ad --- /dev/null +++ b/Server/www/spiderbasic/localforage.min.js @@ -0,0 +1,7 @@ +/*! + localForage -- Offline Storage, Improved + Version 1.5.0 + https://localforage.github.io/localForage + (c) 2013-2017 Mozilla, Apache License 2.0 +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.localforage=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=43)}}).catch(function(){return!1})}function o(a){return"boolean"==typeof la?na.resolve(la):n(a).then(function(a){return la=a})}function p(a){var b=ma[a.name],c={};c.promise=new na(function(a){c.resolve=a}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function q(a){var b=ma[a.name],c=b.deferredOperations.pop();c&&c.resolve()}function r(a,b){var c=ma[a.name],d=c.deferredOperations.pop();d&&d.reject(b)}function s(a,b){return new na(function(c,d){if(a.db){if(!b)return c(a.db);p(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ka.open.apply(ka,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(oa)}catch(c){if("ConstraintError"!==c.name)throw c;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){c(f.result),q(a)}})}function t(a){return s(a,!1)}function u(a){return s(a,!0)}function v(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function w(a){return new na(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function x(a){return i([m(atob(a.data))],{type:a.type})}function y(a){return a&&a.__local_forage_encoded_blob}function z(a){var b=this,c=b._initReady().then(function(){var a=ma[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return k(c,a,a),c}function A(a){p(a);for(var b=ma[a.name],c=b.forages,d=0;d>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function M(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+=ta[(3&c[b])<<4|c[b+1]>>4],d+=ta[(15&c[b+1])<<2|c[b+2]>>6],d+=ta[63&c[b+2]];return c.length%3==2?d=d.substring(0,d.length-1)+"=":c.length%3==1&&(d=d.substring(0,d.length-2)+"=="),d}function N(a,b){var c="";if(a&&(c=Ka.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ka.call(a.buffer))){var d,e=wa;a instanceof ArrayBuffer?(d=a,e+=ya):(d=a.buffer,"[object Int8Array]"===c?e+=Aa:"[object Uint8Array]"===c?e+=Ba:"[object Uint8ClampedArray]"===c?e+=Ca:"[object Int16Array]"===c?e+=Da:"[object Uint16Array]"===c?e+=Fa:"[object Int32Array]"===c?e+=Ea:"[object Uint32Array]"===c?e+=Ga:"[object Float32Array]"===c?e+=Ha:"[object Float64Array]"===c?e+=Ia:b(new Error("Failed to get type for BinaryArray"))),b(e+M(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=ua+a.type+"~"+M(this.result);b(wa+za+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}}function O(a){if(a.substring(0,xa)!==wa)return JSON.parse(a);var b,c=a.substring(Ja),d=a.substring(xa,Ja);if(d===za&&va.test(c)){var e=c.match(va);b=e[1],c=c.substring(e[0].length)}var f=L(c);switch(d){case ya:return f;case za:return i([f],{type:b});case Aa:return new Int8Array(f);case Ba:return new Uint8Array(f);case Ca:return new Uint8ClampedArray(f);case Da:return new Int16Array(f);case Fa:return new Uint16Array(f);case Ea:return new Int32Array(f);case Ga:return new Uint32Array(f);case Ha:return new Float32Array(f);case Ia:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function P(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new na(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=c,a()},function(a,b){d(b)})})});return c.serializer=La,e}function Q(a,b){var c=this;a=l(a);var d=new na(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function R(a,b){var c=this,d=new na(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;h0)return void f(S.apply(e,[a,h,c,d-1]));g(b)}})})}).catch(g)});return j(f,c),f}function T(a,b,c){return S.apply(this,[a,b,c,1])}function U(a,b){var c=this;a=l(a);var d=new na(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function V(a){var b=this,c=new na(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function W(a){var b=this,c=new na(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function X(a,b){var c=this,d=new na(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function Y(a){var b=this,c=new na(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return j(c,a),c}function _(a,b){var c=this;a=l(a);var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return j(d,b),d}function aa(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;hm||l.hasOwnProperty(m)&&(k[l[m]]=m)}e=k[h]?"keydown":"keypress"}"keypress"==e&&g.length&&(e="keydown");return{key:c,modifiers:g,action:e}}function B(a,b){return null===a||a===r?!1:a===b?!0:B(a.parentNode,b)}function c(a){function b(a){a= +a||{};var b=!1,n;for(n in q)a[n]?b=!0:q[n]=0;b||(v=!1)}function h(a,b,n,f,c,h){var g,e,l=[],m=n.type;if(!d._callbacks[a])return[];"keyup"==m&&u(a)&&(b=[a]);for(g=0;g":".","?":"/","|":"\\"},z={option:"alt",command:"meta","return":"enter", +escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},k;for(g=1;20>g;++g)l[111+g]="f"+g;for(g=0;9>=g;++g)l[g+96]=g;c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={};this._directMap= +{};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||B(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.init=function(){var a=c(r),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a,arguments)}}(b))};c.init();C.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports= +c);"function"===typeof define&&define.amd&&define(function(){return c})})(window,document); diff --git a/Server/www/spiderbasic/onsenui-css/dark-onsen-css-components.min.css b/Server/www/spiderbasic/onsenui-css/dark-onsen-css-components.min.css new file mode 100644 index 0000000..6fd78bb --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/dark-onsen-css-components.min.css @@ -0,0 +1,35 @@ +/*! + * Copyright 2013-2017 ASIAL CORPORATION + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *//*! + * Copyright 2012 Adobe Systems Inc.; + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */:root{--background-color:#0d0d0d;--text-color:#fff;--sub-text-color:#999;--highlight-color-rgb:255,161,1;--highlight-color:rgb(var(--highlight-color-rgb));--second-highlight-color:#da5926;--border-color:#242424;--button-background-color:var(--highlight-color);--button-cta-background-color:var(--second-highlight-color);--button-light-color:white;--toolbar-background-color:#181818;--toolbar-button-color:var(--highlight-color);--toolbar-text-color:#fff;--toolbar-border-color:#242424;--button-bar-color:var(--highlight-color);--button-bar-active-text-color:#fff;--button-bar-active-background-color:unset;--button-bar-active-background-color-default-blend-color:black;--button-bar-active-background-color-default-blend-time:-0.8s;--segment-color:var(--highlight-color);--segment-active-text-color:#fff;--segment-active-background-color:unset;--segment-active-background-color-default-blend-color:black;--segment-active-background-color-default-blend-time:-0.8s;--list-background-color:#181818;--list-header-background-color:#111;--list-tap-active-background-color:#262626;--list-item-chevron-color:#383833;--progress-bar-color:var(--highlight-color);--progress-bar-secondary-color:rgb(115, 73, 1);--progress-bar-background-color:transparent;--progress-circle-primary-color:var(--progress-bar-color);--progress-circle-secondary-color:rgb(115, 73, 1);--progress-circle-background-color:transparent;--tabbar-background-color:#212121;--tabbar-text-color:#aaa;--tabbar-highlight-text-color:var(--highlight-color);--tabbar-border-color:#0d0d0d;--switch-highlight-color:#44db5e;--switch-border-color:#666;--switch-background-color:var(--background-color);--range-track-background-color:#6b6f74;--range-track-background-color-active:#bbb;--range-thumb-background-color:#fff;--modal-background-color:rgba(0, 0, 0, 0.7);--modal-text-color:#fff;--alert-dialog-background-color:#f4f4f4;--alert-dialog-text-color:#1f1f21;--alert-dialog-button-color:var(--highlight-color);--alert-dialog-separator-color:#ddd;--dialog-background-color:#0d0d0d;--dialog-text-color:#1f1f21;--popover-background-color:#242424;--popover-text-color:var(--text-color);--action-sheet-title-color:#8f8e94;--action-sheet-button-separator-color:rgba(0, 0, 0, 0.1);--action-sheet-button-color:var(--highlight-color);--action-sheet-button-destructive-color:#fe3824;--action-sheet-button-background-color:rgba(255, 255, 255, 0.9);--action-sheet-button-active-background-color:#e9e9e9;--action-sheet-cancel-button-background-color:#fff;--notification-background-color:#fe3824;--notification-color:white;--search-input-background-color:rgba(255, 255, 255, 0.09);--fab-text-color:#ffffff;--fab-background-color-rgb:var(--highlight-color-rgb);--fab-background-color:rgb(var(--fab-background-color-rgb));--fab-active-background-color:rgba(var(--fab-background-color-rgb), 0.7);--card-background-color:var(--border-color);--card-text-color:var(--text-color);--toast-background-color:#ccc;--toast-text-color:#000;--toast-button-text-color:#000;--select-input-color:var(--text-color);--select-input-border-color:var(--border-color);--material-background-color:#303030;--material-text-color:#ffffff;--material-notification-background-color:#f50057;--material-notification-color:white;--material-switch-active-thumb-color-rgb:255,193,7;--material-switch-active-thumb-color:rgb(var(--material-switch-active-thumb-color-rgb));--material-switch-active-background-color:rgba(var(--material-switch-active-thumb-color-rgb), 0.5);--material-switch-inactive-thumb-color:#bdbdbd;--material-switch-inactive-background-color:rgba(255, 255, 255, 0.3);--material-range-track-color:#525252;--material-range-thumb-color:#cecec5;--material-range-disabled-thumb-color:#4f4f4f;--material-range-disabled-thumb-border-color:#303030;--material-range-zero-thumb-color:#0d0d0d;--material-toolbar-background-color:#212121;--material-toolbar-text-color-rgb:255,255,255;--material-toolbar-text-color:rgb(var(--material-toolbar-text-color-rgb));--material-toolbar-button-color:var(--toolbar-button-color);--material-segment-background-color:#292929;--material-segment-active-background-color:#404040;--material-segment-text-color:rgba(255, 255, 255, 0.62);--material-segment-active-text-color:#cacaca;--material-button-background-color:#d68600;--material-button-text-color:#ffffff;--material-button-disabled-background-color:rgba(176, 176, 176, 0.74);--material-button-disabled-color:rgba(255, 255, 255, 0.74);--material-flat-button-active-background-color:rgba(102, 102, 102, 0.2);--material-list-background-color:hsl(0, 0%, 20.8235294118%);--material-list-item-separator-color:rgba(255, 255, 255, 0.12);--material-list-header-text-color:#8a8a8a;--material-checkbox-active-color:#fff;--material-checkbox-inactive-color:#717171;--material-checkbox-checkmark-color:#000;--material-radio-button-active-color:#ffa101;--material-radio-button-inactive-color:#8e8e8e;--material-radio-button-disabled-color:#505050;--material-text-input-text-color:rgba(255, 255, 255, 0.75);--material-text-input-active-color:rgba(255, 255, 255, 0.75);--material-text-input-inactive-color:rgba(255, 255, 255, 0.3);--material-search-background-color:#424242;--material-dialog-background-color:#424242;--material-dialog-text-color:var(--material-text-color);--material-alert-dialog-background-color:#424242;--material-alert-dialog-title-color-rgb:255,255,255;--material-alert-dialog-title-color:rgb(var(--material-alert-dialog-title-color-rgb));--material-alert-dialog-content-color:rgba(var(--material-alert-dialog-title-color-rgb), 0.85);--material-alert-dialog-button-color:#d68600;--material-progress-bar-primary-color:#d68600;--material-progress-bar-secondary-color:rgb(115, 72, 0);--material-progress-bar-background-color:transparent;--material-progress-circle-primary-color:var(--material-progress-bar-primary-color);--material-progress-circle-secondary-color:var(--material-progress-bar-secondary-color);--material-progress-circle-background-color:transparent;--material-tabbar-background-color:var(--material-toolbar-background-color);--material-tabbar-text-color:rgba(var(--material-toolbar-text-color-rgb), 0.5);--material-tabbar-highlight-text-color:var(--material-toolbar-text-color);--material-tabbar-highlight-color:hsl(0, 0%, 15.9411764706%);--material-fab-text-color:#31313a;--material-fab-background-color:#ffffff;--material-fab-active-background-color:rgba(255, 255, 255, 0.75);--material-card-background-color:#424242;--material-card-text-color:rgba(255, 255, 255, 0.46);--material-toast-background-color:#ccc;--material-toast-text-color:#000;--material-toast-button-text-color:#583905;--material-select-input-color:var(--material-text-color);--material-select-input-active-color:rgba(255, 255, 255, 0.85);--material-select-input-inactive-color:rgba(255, 255, 255, 0.19);--material-select-border-color:rgba(255, 255, 255, 0.88);--material-popover-background-color:var(--material-alert-dialog-background-color);--material-popover-text-color:var(--material-text-color);--material-action-sheet-text-color:#686868;--tap-highlight-color:transparent}:root{--input-bg-color:var(--background-color);--input-border-color:var(--border-color);--input-text-color:var(--text-color);--input-placeholder-color:var(--sub-text-color);--input-invalid-border-color:var(--border-color);--input-invalid-text-color:var(--text-color);--input-border:1px solid var(--input-border-color);--font-size:17px;--font-weight:400;--material-font-size:17px;--material-font-weight:400;--font-size--mini:calc(var(--font-size) - 3px);--font-weight--large:500;--background-color--input:transparent}html{height:100%;width:100%}body{position:absolute;overflow:hidden;top:0;right:0;left:0;bottom:0;padding:0;margin:0;-webkit-text-size-adjust:100%;touch-action:manipulation}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:var(--tap-highlight-color);-webkit-touch-callout:none}input,select,textarea{-webkit-user-select:auto;user-select:auto;-moz-user-select:text;-webkit-touch-callout:none}a,button,input,select,textarea{touch-action:manipulation}input:active,input:focus,select:active,select:focus,textarea:active,textarea:focus{outline:0}h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4,h5,h6{font-size:18px}@-webkit-keyframes blend-background-color{0%{background-color:var(--blend-background-color__base)}100%{background-color:var(--blend-background-color__color)}}@keyframes blend-background-color{0%{background-color:var(--blend-background-color__base)}100%{background-color:var(--blend-background-color__color)}}@-webkit-keyframes blend-color{0%{color:var(--blend-color__base)}100%{color:var(--blend-color__color)}}@keyframes blend-color{0%{color:var(--blend-color__base)}100%{color:var(--blend-color__color)}}@-webkit-keyframes blend-border-color{0%{border-color:var(--blend-border-color__base)}100%{border-color:var(--blend-border-color__color)}}@keyframes blend-border-color{0%{border-color:var(--blend-border-color__base)}100%{border-color:var(--blend-border-color__color)}}:root{--page-background-color:var(--background-color);--page-material-background-color:var(--material-background-color)}.page{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);background-color:#0d0d0d;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;overflow-x:visible;overflow-y:hidden;color:#fff;color:var(--text-color);-ms-overflow-style:none;-webkit-font-smoothing:antialiased}.page::-webkit-scrollbar{display:none}.page__content{background-color:#0d0d0d;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box}.page__background{background-color:#0d0d0d;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box}.page--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);background-color:#303030;background-color:var(--page-material-background-color)}.page--material__content{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--font-weight)}.page__content h1,.page__content h2,.page__content h3,.page__content h4,.page__content h5{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:500;font-weight:var(--font-weight--large);margin:.6em 0;padding:0}.page__content h1{font-size:28px}.page__content h2{font-size:24px}.page__content h3{font-size:20px}.page--material__content h1,.page--material__content h2,.page--material__content h3,.page--material__content h4,.page--material__content h5{-webkit-font-smoothing:antialiased;font-weight:500;font-weight:var(--font-weight--large);margin:.6em 0;padding:0}.page--material__content h1{font-size:28px}.page--material__content h2{font-size:24px}.page--material__content h3{font-size:20px}.page--material__background{background-color:#303030;background-color:var(--page-material-background-color)}:root{--switch-checked-background-color:var(--switch-highlight-color);--switch-thumb-background-color:white;--switch-thumb-border-color:var(--border-color);--switch-thumb-border-color-active:var(--switch-highlight-color);--switch-height:32px;--switch-width:51px}.switch{display:inline-block;vertical-align:top;box-sizing:border-box;background-clip:padding-box;position:relative;min-width:51px;font-size:17px;font-size:var(--font-size);padding:0 20px;border:none;overflow:visible;width:51px;width:var(--switch-width);height:32px;height:var(--switch-height);z-index:0;text-align:left}.switch__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:0}.switch__toggle{background-color:#0d0d0d;background-color:var(--switch-background-color);position:absolute;top:0;left:0;right:0;bottom:0;border-radius:30px;transition-property:all;transition-duration:.35s;transition-timing-function:ease-out;box-shadow:inset 0 0 0 2px #666;box-shadow:inset 0 0 0 2px var(--switch-border-color)}.switch__handle{box-sizing:border-box;background-clip:padding-box;position:absolute;content:'';border-radius:28px;height:28px;width:28px;background-color:#fff;background-color:var(--switch-thumb-background-color);left:1px;top:2px;transition-property:all;transition-duration:.35s;transition-timing-function:cubic-bezier(.59,.01,.5,.99);box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25)}.switch--active__handle{transition:none}:checked+.switch__toggle{box-shadow:inset 0 0 0 2px #44db5e;box-shadow:inset 0 0 0 2px var(--switch-checked-background-color);background-color:#44db5e;background-color:var(--switch-checked-background-color)}:checked+.switch__toggle>.switch__handle{left:21px;box-shadow:0 3px 2px rgba(0,0,0,.25)}:disabled+.switch__toggle{opacity:.3;cursor:default;pointer-events:none}.switch__touch{position:absolute;top:-5px;bottom:-5px;left:-10px;right:-10px}.switch--material{width:36px;height:24px;padding:0 10px;min-width:36px}.switch--material__toggle{background-color:rgba(255,255,255,.3);background-color:var(--material-switch-inactive-background-color);margin-top:5px;height:14px;box-shadow:none}.switch--material__input{right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:0}.switch--material__handle{background-color:#bdbdbd;background-color:var(--material-switch-inactive-thumb-color);left:0;margin-top:-5px;width:20px;height:20px;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)}:checked+.switch--material__toggle{background-color:rgba(255,193,7,.5);background-color:var(--material-switch-active-background-color);box-shadow:none}:checked+.switch--material__toggle>.switch--material__handle{left:16px;background-color:#ffc107;background-color:var(--material-switch-active-thumb-color);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.switch--material__handle:before{background:0 0;content:'';display:block;width:100%;height:100%;border-radius:50%;z-index:0;box-shadow:0 0 0 0 rgba(0,0,0,.12);transition:box-shadow .1s linear}.switch--material__toggle>.switch--active__handle:before{box-shadow:0 0 0 14px rgba(0,0,0,.12)}:checked+.switch--material__toggle>.switch--active__handle:before{animation:blend-box-shadow 1s -.2s linear forwards paused}@-webkit-keyframes blend-box-shadow{0%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 14px #ffc107;box-shadow:0 0 0 14px var(--material-switch-active-thumb-color)}}@keyframes blend-box-shadow{0%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 14px #ffc107;box-shadow:0 0 0 14px var(--material-switch-active-thumb-color)}}.switch--material__touch{position:absolute;top:-10px;bottom:-10px;left:-15px;right:-15px}:root{--range-thumb-size:28px;--range-track-height:2px;--material-range-track-height:2px;--material-range-thumb-size:14px;--material-range-thumb-radius:calc(var(--material-range-thumb-size) / 2);--material-range-thumb-vertical-margin:24px;--material-range-thumb-horizontal-margin:2px}.range{display:inline-block;position:relative;width:100px;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);margin:0;padding:0;background-image:linear-gradient(#6b6f74,#6b6f74);background-image:linear-gradient(var(--range-track-background-color),var(--range-track-background-color));background-position:left center;background-size:100% 2px;background-size:100% var(--range-track-height);background-repeat:no-repeat;background-color:transparent}.range__input{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;appearance:none;background-image:linear-gradient(#bbb,#bbb);background-image:linear-gradient(var(--range-track-background-color-active),var(--range-track-background-color-active));background-position:left center;background-size:0 2px;background-size:0 var(--range-track-height);background-repeat:no-repeat;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);position:relative;z-index:1;width:100%}.range__input::-moz-range-track{position:relative;border:none;background:0 0;box-shadow:none;top:0;margin:0;padding:0}.range__input::-ms-track{position:relative;border:none;background-color:#6b6f74;background-color:var(--range-track-background-color);height:0;border-radius:50%}.range__input::-webkit-slider-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0;box-sizing:border-box;-webkit-appearance:none;appearance:none;top:0;z-index:1}.range__input::-moz-range-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0}.range__input::-ms-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0;top:0}.range__input::-ms-fill-lower{height:2px;background-color:#bbb;background-color:var(--range-track-background-color-active)}.range__input::-ms-tooltip{display:none}.range__input:disabled{opacity:1;pointer-events:none}.range__focus-ring{pointer-events:none;top:0;left:0;display:none;box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;border:none;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;appearance:none;background:0 0;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);position:absolute;z-index:0;width:100%}.range--disabled{cursor:default;pointer-events:none}.range--material{position:relative;background-image:linear-gradient(#525252,#525252);background-image:linear-gradient(var(--material-range-track-color),var(--material-range-track-color))}.range--material__input{background-image:linear-gradient(#cecec5,#cecec5);background-image:linear-gradient(var(--material-range-thumb-color),var(--material-range-thumb-color));background-position:center left;background-size:0 2px}.range--material__focus-ring{display:block}.range--material__focus-ring::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;width:var(--material-range-thumb-size);height:14px;height:var(--material-range-thumb-size);border:none;box-shadow:0 0 0 calc((32px - 14px)/ 2) #cecec5;box-shadow:0 0 0 calc((32px - var(--material-range-thumb-size))/ 2) var(--material-range-thumb-color);background-color:#cecec5;background-color:var(--material-range-thumb-color);border-radius:50%;opacity:0;-webkit-transition:opacity .25s ease-out,-webkit-transform .25s ease-out;transition:opacity .25s ease-out,-webkit-transform .25s ease-out;transition:opacity .25s ease-out,transform .25s ease-out;transition:opacity .25s ease-out,transform .25s ease-out,-webkit-transform .25s ease-out}.range--material__input.range__input--active+.range--material__focus-ring::-webkit-slider-thumb{opacity:.2;-webkit-transform:scale(1.5,1.5,1.5);transform:scale(1.5,1.5,1.5)}.range--material__input::-webkit-slider-thumb{position:relative;box-sizing:border-box;border:none;background-color:transparent;width:14px;width:var(--material-range-thumb-size);height:32px;border-radius:0;box-shadow:none;background-image:radial-gradient(circle farthest-corner,#cecec5 0,#cecec5 calc(calc(14px / 2) - .4px),transparent calc(14px / 2));background-image:radial-gradient(circle farthest-corner,var(--material-range-thumb-color) 0,var(--material-range-thumb-color) calc(var(--material-range-thumb-radius) - .4px),transparent var(--material-range-thumb-radius));-webkit-transition:-webkit-transform .1s linear;transition:-webkit-transform .1s linear;transition:transform .1s linear;transition:transform .1s linear,-webkit-transform .1s linear;overflow:visible}.range--material__input[_zero]::-webkit-slider-thumb{background-image:radial-gradient(circle farthest-corner,#0d0d0d 0,#0d0d0d 4px,#525252 4px,#525252 calc(calc(14px / 2) - .6px),transparent calc(calc(14px / 2)));background-image:radial-gradient(circle farthest-corner,var(--material-range-zero-thumb-color) 0,var(--material-range-zero-thumb-color) 4px,var(--material-range-track-color) 4px,var(--material-range-track-color) calc(var(--material-range-thumb-radius) - .6px),transparent calc(var(--material-range-thumb-radius)))}.range--material__input[_zero]+.range--material__focus-ring::-webkit-slider-thumb{box-shadow:0 0 0 calc((32px - 14px)/ 2) #525252;box-shadow:0 0 0 calc((32px - var(--material-range-thumb-size))/ 2) var(--material-range-track-color)}.range--material__input::-moz-range-track{background:0 0}.range--material__input::-moz-range-thumb,.range--material__input:focus::-moz-range-thumb{box-sizing:border-box;border:none;width:14px;width:var(--material-range-thumb-size);height:32px;border-radius:0;background-color:transparent;background-image:-moz-radial-gradient(circle farthest-corner,var(--material-range-thumb-color) 0,var(--material-range-thumb-color) calc(var(--material-range-thumb-radius) - .4px),transparent var(--material-range-thumb-radius));box-shadow:none}.range--material__input.range__input--active::-webkit-slider-thumb,.range--material__input:active::-webkit-slider-thumb{transform:scale(1.5);-webkit-transition:-webkit-transform .1s linear;transition:-webkit-transform .1s linear;transition:transform .1s linear;transition:transform .1s linear,-webkit-transform .1s linear}.range--material__input:disabled::-webkit-slider-thumb{background-image:radial-gradient(circle farthest-corner,#4f4f4f 0,#4f4f4f 4px,#303030 4.4px,#303030 calc(calc(14px / 2) + .6px),transparent calc(calc(14px / 2) + .6px));background-image:radial-gradient(circle farthest-corner,var(--material-range-disabled-thumb-color) 0,var(--material-range-disabled-thumb-color) 4px,var(--material-range-disabled-thumb-border-color) 4.4px,var(--material-range-disabled-thumb-border-color) calc(var(--material-range-thumb-radius) + .6px),transparent calc(var(--material-range-thumb-radius) + .6px));-webkit-transition:none;transition:none}.range--material__input:disabled::-moz-range-thumb{background-image:-moz-radial-gradient(circle farthest-corner,var(--material-range-disabled-thumb-color) 0,var(--material-range-disabled-thumb-color) 4px,var(--material-range-disabled-thumb-border-color) 4.4px,var(--material-range-disabled-thumb-border-color) calc(var(--material-range-thumb-radius) + .6px),transparent calc(var(--material-range-thumb-radius) + .6px));-moz-transition:none;transition:none}:root{--notification-border-radius:19px;--notification-width:auto;--notification-height:19px;--notification-min-width:19px;--notification-padding:0 4px;--notification-font-weight:var(--font-weight);--notification-font-size:16px;--material-notification-font-size:16px;--material-notification-font-weight:500}.notification{position:relative;display:inline-block;vertical-align:top;font:inherit;border:none;box-sizing:border-box;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none;margin:0;padding:0 4px;padding:var(--notification-padding);width:auto;width:var(--notification-width);height:19px;height:var(--notification-height);border-radius:19px;border-radius:var(--notification-border-radius);background-color:#fe3824;background-color:var(--notification-background-color);color:#fff;color:var(--notification-color);text-align:center;font-size:16px;font-size:var(--notification-font-size);min-width:19px;min-width:var(--notification-min-width);line-height:19px;line-height:var(--notification-height);font-weight:400;font-weight:var(--notification-font-weight)}.notification:empty{display:none}.notification--material{-webkit-font-smoothing:antialiased;background-color:#f50057;background-color:var(--material-notification-background-color);font-size:16px;font-size:var(--material-notification-font-size);font-weight:500;font-weight:var(--material-notification-font-weight);color:#fff;color:var(--material-notification-color)}:root{--toolbar-separator-color:var(--toolbar-border-color);--toolbar-height:44px;--toolbar-box-shadow:none;--toolbar-padding:0;--toolbar-separator:1px solid var(--toolbar-separator-color);--toolbar-material-height:56px}.toolbar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;height:44px;height:var(--toolbar-height);padding-left:0;padding-left:var(--toolbar-padding);padding-right:0;padding-right:var(--toolbar-padding);background:#181818;background:var(--toolbar-background-color);color:#fff;color:var(--toolbar-text-color);box-shadow:none;box-shadow:var(--toolbar-box-shadow);font-weight:400;font-weight:var(--font-weight);width:100%;white-space:nowrap;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#242424,#242424 100%);background-image:linear-gradient(0deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.toolbar{background-image:linear-gradient(0deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(0deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 50%,transparent 50%)}}.toolbar__bg{background:#181818;background:var(--toolbar-background-color)}.toolbar__item{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;height:44px;height:var(--toolbar-height);overflow:visible;display:block;vertical-align:middle}.toolbar__left{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;max-width:50%;width:27%;text-align:left;line-height:44px;line-height:var(--toolbar-height)}.toolbar__right{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;max-width:50%;width:27%;text-align:right;line-height:44px;line-height:var(--toolbar-height)}.toolbar__center{box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;border:none;width:46%;text-align:center;line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);color:#fff;color:var(--toolbar-text-color)}.toolbar__title{line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);color:#fff;color:var(--toolbar-text-color);margin:0;padding:0;overflow:visible}.toolbar__center:first-child:last-child{width:100%}.bottom-bar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;white-space:nowrap;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;display:block;height:44px;height:var(--toolbar-height);padding-left:0;padding-left:var(--toolbar-padding);padding-right:0;padding-right:var(--toolbar-padding);background:#181818;background:var(--toolbar-background-color);color:#fff;color:var(--toolbar-text-color);box-shadow:none;box-shadow:var(--toolbar-box-shadow);font-weight:400;font-weight:var(--font-weight);border-bottom:none;position:absolute;bottom:0;right:0;left:0;border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#242424,#242424 100%);background-image:linear-gradient(180deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.bottom-bar{background-image:linear-gradient(180deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(180deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 50%,transparent 50%)}}.bottom-bar__line-height{line-height:44px;line-height:var(--toolbar-height);padding-bottom:0;padding-top:0}.bottom-bar--aligned{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;line-height:44px;line-height:var(--toolbar-height)}.bottom-bar--transparent{background-color:transparent;background-image:none;border:none}.toolbar--material{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;justify-content:space-between;height:56px;height:var(--toolbar-material-height);border-bottom:0;box-shadow:0 1px 5px rgba(0,0,0,.3);padding:0;background-color:#212121;background-color:var(--material-toolbar-background-color);background-size:0}.toolbar--noshadow{box-shadow:none;background-image:none;border-bottom:none}.toolbar--material__left,.toolbar--material__right{-webkit-font-smoothing:antialiased;font-size:20px;font-weight:500;color:#fff;color:var(--material-toolbar-text-color);height:56px;height:var(--toolbar-material-height);min-width:72px;width:auto;line-height:56px;line-height:var(--toolbar-material-height)}.toolbar--material__center{-webkit-font-smoothing:antialiased;font-size:20px;font-weight:500;color:#fff;color:var(--material-toolbar-text-color);height:56px;height:var(--toolbar-material-height);width:auto;-webkit-flex-grow:1;flex-grow:1;overflow:hidden;text-overflow:ellipsis;text-align:left;line-height:56px;line-height:var(--toolbar-material-height)}.toolbar--material__center:first-child{margin-left:16px}.toolbar--material__center:last-child{margin-right:16px}.toolbar--material__left:empty,.toolbar--material__right:empty{min-width:16px}.toolbar--transparent{background-color:transparent;box-shadow:none;background-image:none;border-bottom:none}:root{--button-text-color:white;--button-quiet-color:var(--highlight-color);--button-cta-color:white;--button-large-padding:4px 12px;--button-padding:4px 10px;--button-line-height:32px;--button-large-line-height:36px;--button-active-opacity:0.2;--button-border-radius:3px}.button{position:relative;display:inline-block;box-sizing:border-box;margin:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:auto;text-decoration:none;padding:4px 10px;padding:var(--button-padding);font-size:17px;font-size:var(--font-size);line-height:32px;line-height:var(--button-line-height);letter-spacing:0;color:#fff;color:var(--button-text-color);vertical-align:middle;background-color:#ffa101;background-color:var(--button-background-color);border:0 solid currentColor;border-radius:3px;border-radius:var(--button-border-radius);transition:none}.button::-moz-focus-inner{outline:0}.button:hover{transition:none}.button:active{background-color:#ffa101;background-color:var(--button-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button:focus{outline:0}.button:disabled,.button[disabled]{opacity:.3;cursor:default;pointer-events:none}.button--outline{background-color:transparent;border:1px solid #ffa101;border:1px solid var(--button-background-color);color:#ffa101;color:var(--button-background-color)}.button--outline:active{border:1px solid #ffa101;border:1px solid var(--button-background-color);color:#ffa101;color:var(--button-background-color);opacity:1;--blend-background-color__base:var(--button-background-color);--blend-background-color__color:white;-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused}.button--outline:hover{border:1px solid #ffa101;border:1px solid var(--button-background-color);transition:0}.button--light{background-color:transparent;border:1px solid;--blend-color__base:transparent;--blend-color__color:var(--button-light-color);--blend-border-color__base:transparent;--blend-border-color__color:var(--button-light-color);-webkit-animation:blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;animation:blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused}.button--light:active{border:1px solid;--blend-background-color__base:transparent;--blend-background-color__color:var(--button-light-color);--blend-color__base:transparent;--blend-color__color:var(--button-light-color);--blend-border-color__base:transparent;--blend-border-color__color:var(--button-light-color);-webkit-animation:blend-background-color 1s -50ms linear forwards paused,blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;animation:blend-background-color 1s -50ms linear forwards paused,blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;opacity:1}.button--quiet{background:0 0;color:#ffa101;color:var(--button-quiet-color);border:none}.button--quiet:disabled,.button--quiet[disabled]{border:none}.button--quiet:active{background-color:transparent;border:none;transition:none;opacity:.2;opacity:var(--button-active-opacity);color:#ffa101;color:var(--button-quiet-color)}.button--cta{border:none;background-color:#da5926;background-color:var(--button-cta-background-color);color:#fff;color:var(--button-cta-color)}.button--cta:active{color:#fff;color:var(--button-cta-color);background-color:#da5926;background-color:var(--button-cta-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button--large{font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);display:block;width:100%;text-align:center}.button--large:active{transition:none}.button--large--quiet{font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);display:block;width:100%;background:0 0;border:1px solid transparent;box-shadow:none;color:#ffa101;color:var(--button-quiet-color);text-align:center}.button--large--quiet:active{opacity:.2;opacity:var(--button-active-opacity);color:#ffa101;color:var(--button-quiet-color);background:0 0;border:1px solid transparent;box-shadow:none}.button--large--cta{background-color:#da5926;background-color:var(--button-cta-background-color);color:#fff;color:var(--button-cta-color);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);width:100%;text-align:center;display:block}.button--large--cta:active{color:var(--button-cta-color);background-color:#da5926;background-color:var(--button-cta-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button--material{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;min-height:36px;line-height:36px;padding:0 16px;text-align:center;font-size:14px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);text-transform:uppercase;background-color:#d68600;background-color:var(--material-button-background-color);color:#fff;color:var(--material-button-text-color);font-weight:500;font-weight:var(--font-weight--large);opacity:1;transition:all .25s linear}.button--material:hover{transition:all .25s linear}.button--material:active{background-color:#d68600;background-color:var(--material-button-background-color);opacity:.9;transition:all .25s linear}.button--material:disabled,.button--material[disabled]{transition:none;box-shadow:none;background-color:rgba(176,176,176,.74);background-color:var(--material-button-disabled-background-color);color:rgba(255,255,255,.74);color:var(--material-button-disabled-color);opacity:1}.button--material--flat{-webkit-font-smoothing:antialiased;min-height:36px;line-height:36px;padding:0 16px;text-align:center;font-size:14px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);text-transform:uppercase;font-weight:500;font-weight:var(--font-weight--large);box-shadow:none;background-color:transparent;color:#d68600;color:var(--material-button-background-color);transition:all .25s linear}.button--material--flat:focus{background-color:transparent;color:#d68600;color:var(--material-button-background-color);outline:0;opacity:1;border:none}.button--material--flat:active{outline:0;opacity:1;border:none;background-color:rgba(102,102,102,.2);background-color:var(--material-flat-button-active-background-color);color:#d68600;color:var(--material-button-background-color);transition:all .25s linear}.button--material--flat:disabled,.button--material--flat[disabled]{opacity:1;box-shadow:none;background-color:transparent;color:rgba(255,255,255,.74);color:var(--material-button-disabled-color)}:root{--button-bar-active-color:var(--button-bar-active-text-color);--button-bar-border-top:1px solid var(--button-bar-color);--button-bar-border-bottom:1px solid var(--button-bar-color);--button-bar-border:0 solid var(--button-bar-color);--button-bar-border-radius:4px}.button-bar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin:0;padding:0;border:none}.button-bar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);border-radius:0;width:100%;padding:0;margin:0;position:relative;overflow:hidden;box-sizing:border-box}.button-bar__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:0;background-color:transparent;color:#ffa101;color:var(--button-bar-color);border:1px solid #ffa101;border:1px solid var(--button-bar-color);border-top-width:1px;border-bottom-width:1px;border-right-width:1px;border-left-width:0;font-weight:400;font-weight:var(--font-weight);padding:0;font-size:13px;height:27px;line-height:27px;width:100%;transition:background-color .2s linear,color .2s linear;box-sizing:border-box}.button-bar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.button-bar__button:hover{transition:none}.button-bar__button:focus{outline:0}:checked+.button-bar__button{background-color:#ffa101;background-color:var(--button-bar-color);color:#fff;color:var(--button-bar-active-color);transition:none}.button-bar__button:active,:active+.button-bar__button{background-color:unset;background-color:var(--button-bar-active-background-color);border:0 solid #ffa101;border:var(--button-bar-border);border-top:1px solid #ffa101;border-top:var(--button-bar-border-top);border-bottom:1px solid #ffa101;border-bottom:var(--button-bar-border-bottom);border-right:1px solid #ffa101;border-right:1px solid var(--button-bar-color);font-size:13px;width:100%;transition:none}.button-bar__button:active:before,:active+.button-bar__button:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:-1;--blend-background-color__base:var(--button-bar-color);--blend-background-color__color:var(--button-bar-active-background-color-default-blend-color);-webkit-animation:blend-background-color 1s -.8s linear forwards paused;animation:blend-background-color 1s -.8s linear forwards paused;-webkit-animation:blend-background-color 1s var(--button-bar-active-background-color-default-blend-time) linear forwards paused;animation:blend-background-color 1s var(--button-bar-active-background-color-default-blend-time) linear forwards paused}.button-bar__item:first-child>.button-bar__button{border-left-width:1px;border-radius:4px 0 0 4px;border-radius:var(--button-bar-border-radius) 0 0 var(--button-bar-border-radius)}.button-bar__item:last-child>.button-bar__button{border-right-width:1px;border-radius:0 4px 4px 0;border-radius:0 var(--button-bar-border-radius) var(--button-bar-border-radius) 0}:root{--segment-active-color:var(--segment-active-text-color);--segment-border-top:1px solid var(--segment-color);--segment-border-bottom:1px solid var(--segment-color);--segment-border:0 solid var(--segment-color);--segment-border-radius:4px}.segment{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin:0;padding:0;border:none}.segment__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);border-radius:0;width:100%;padding:0;margin:0;position:relative;overflow:hidden;box-sizing:border-box;display:block;background-color:transparent;border:none}.segment__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.segment__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:0;background-color:transparent;color:#ffa101;color:var(--segment-color);border:1px solid #ffa101;border:1px solid var(--segment-color);border-top-width:1px;border-bottom-width:1px;border-right-width:1px;border-left-width:0;font-weight:400;font-weight:var(--font-weight);padding:0;font-size:13px;height:29px;line-height:29px;width:100%;transition:background-color .2s linear,color .2s linear;box-sizing:border-box;text-align:center}.segment__item:disabled{opacity:.3;cursor:default;pointer-events:none}.segment__button:hover{transition:none}.segment__button:focus{outline:0}:active+.segment__button{background-color:unset;background-color:var(--segment-active-background-color);border:0 solid #ffa101;border:var(--segment-border);border-top:1px solid #ffa101;border-top:var(--segment-border-top);border-bottom:1px solid #ffa101;border-bottom:var(--segment-border-bottom);border-right:1px solid #ffa101;border-right:1px solid var(--segment-color);font-size:13px;width:100%;transition:none}:active+.segment__button:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:-1;--blend-background-color__base:var(--segment-color);--blend-background-color__color:var(--segment-active-background-color-default-blend-color);-webkit-animation:blend-background-color 1s -.8s linear forwards paused;animation:blend-background-color 1s -.8s linear forwards paused;-webkit-animation:blend-background-color 1s var(--segment-active-background-color-default-blend-time) linear forwards paused;animation:blend-background-color 1s var(--segment-active-background-color-default-blend-time) linear forwards paused}:checked+.segment__button{background-color:#ffa101;background-color:var(--segment-color);color:#fff;color:var(--segment-active-color);transition:none}.segment__item:first-child>.segment__button{border-left-width:1px;border-radius:4px 0 0 4px;border-radius:var(--segment-border-radius) 0 0 var(--segment-border-radius)}.segment__item:last-child>.segment__button{border-right-width:1px;border-radius:0 4px 4px 0;border-radius:0 var(--segment-border-radius) var(--segment-border-radius) 0}.segment--material{border-radius:2px;overflow:hidden;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24)}.segment--material__button{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);font-size:14px;height:32px;line-height:32px;border-width:0;color:rgba(255,255,255,.62);color:var(--material-segment-text-color);border-radius:0;background-color:#292929;background-color:var(--material-segment-background-color)}:active+.segment--material__button{background-color:#292929;background-color:var(--material-segment-background-color);border-radius:0;border-width:0;font-size:14px;transition:none;color:rgba(255,255,255,.62);color:var(--material-segment-text-color)}:checked+.segment--material__button{background-color:#404040;background-color:var(--material-segment-active-background-color);color:#cacaca;color:var(--material-segment-active-text-color);border-radius:0;border-width:0}.segment--material__item:first-child>.segment--material__button,.segment--material__item:last-child>.segment--material__button{border-radius:0;border-width:0}:root{--tabbar-button-color:var(--tabbar-text-color);--tabbar-active-color:var(--tabbar-highlight-text-color);--material-tabbar-current-color:var(--material-tabbar-highlight-text-color);--tabbar-active-border-top:none;--tabbar-focus-border-top:none;--tabbar-height:49px;--tabbar-button-line-height:49px;--tabbar-button-border:none;--tabbar-active-box-shadow:none;--tabbar-button-focus-box-shadow:none;--tabbar-border-top:1px solid var(--tabbar-border-color)}.tabbar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-flex;display:flex;position:absolute;bottom:0;left:0;right:0;white-space:nowrap;margin:0;padding:0;height:49px;height:var(--tabbar-height);background-color:#212121;background-color:var(--tabbar-background-color);border-top:1px solid #0d0d0d;border-top:var(--tabbar-border-top);width:100%}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#0d0d0d,#0d0d0d 50%,transparent 50%);background-image:linear-gradient(180deg,var(--tabbar-border-color),var(--tabbar-border-color) 50%,transparent 50%)}}.tabbar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:0;flex-basis:0;width:auto;border-radius:0}.tabbar__item>input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.tabbar__button{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;margin:0;font:inherit;background:0 0;border:none;cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative;display:inline-block;text-decoration:none;padding:0;height:49px;height:var(--tabbar-button-line-height);letter-spacing:0;color:#aaa;color:var(--tabbar-button-color);vertical-align:top;background-color:transparent;border-top:none;border-top:var(--tabbar-button-border);width:100%;font-weight:400;font-weight:var(--font-weight);line-height:49px;line-height:var(--tabbar-button-line-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar__button{border-top:none}}.tabbar__icon{font-size:24px;padding:0;margin:0;line-height:26px;display:block!important;height:28px}.tabbar__label{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:inline-block}.tabbar__badge.notification{vertical-align:text-bottom;top:-1px;margin-left:5px;z-index:10;font-size:12px;height:16px;min-width:16px;line-height:16px;border-radius:8px}.tabbar__icon~.tabbar__badge.notification{position:absolute;top:5px;margin-left:0}.tabbar__icon+.tabbar__label{display:block;font-size:10px;line-height:1;margin:0;font-weight:400;font-weight:var(--font-weight)}.tabbar__label:first-child{font-size:16px;line-height:49px;line-height:var(--tabbar-button-line-height);margin:0;padding:0}:checked+.tabbar__button{color:#ffa101;color:var(--tabbar-active-color);background-color:transparent;box-shadow:none;box-shadow:var(--tabbar-active-box-shadow);border-top:none;border-top:var(--tabbar-active-border-top)}.tabbar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.tabbar__button:focus{z-index:1;border-top:none;border-top:var(--tabbar-focus-border-top);box-shadow:none;box-shadow:var(--tabbar-button-focus-box-shadow);outline:0}.tabbar__content{position:absolute;top:0;left:0;right:0;bottom:49px;bottom:var(--tabbar-height);z-index:0}.tabbar--autogrow .tabbar__item{-webkit-flex-basis:auto;flex-basis:auto}.tabbar--top{position:relative;top:0;left:0;right:0;bottom:auto;border-top:none;border-bottom:1px solid #0d0d0d;border-bottom:var(--tabbar-border-top)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar--top{border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#0d0d0d,#0d0d0d 50%,transparent 50%);background-image:linear-gradient(0deg,var(--tabbar-border-color),var(--tabbar-border-color) 50%,transparent 50%)}}.tabbar--top__content{top:49px;top:var(--tabbar-height);left:0;right:0;bottom:0;z-index:0}.tabbar--top-border__button{background-color:transparent;border-bottom:4px solid transparent}:checked+.tabbar--top-border__button{background-color:transparent;border-bottom:4px solid #ffa101;border-bottom:4px solid var(--tabbar-active-color)}.tabbar__border{position:absolute;bottom:0;left:0;width:0;height:4px;background-color:#ffa101;background-color:var(--tabbar-active-color)}.tabbar--material{background:0 0;background-color:#212121;background-color:var(--material-tabbar-background-color);border-bottom-width:0;box-shadow:0 4px 2px -2px rgba(0,0,0,.14),0 3px 5px -2px rgba(0,0,0,.12),0 5px 1px -4px rgba(0,0,0,.2)}.tabbar--material__button{background-color:transparent;color:rgba(255,255,255,.5);color:var(--material-tabbar-text-color);text-transform:uppercase;font-size:14px;font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.tabbar--material__button:after{content:'';display:block;width:0;height:2px;bottom:0;position:absolute;margin-top:-2px;background-color:#fff;background-color:var(--material-tabbar-current-color)}:checked+.tabbar--material__button:after{width:100%;transition:width .2s ease-in-out}:checked+.tabbar--material__button{background-color:transparent;color:#fff;color:var(--material-tabbar-current-color)}.tabbar--material__item:not([ripple]):active{background-color:hsl(0,0%,15.9411764706%);background-color:var(--material-tabbar-highlight-color)}.tabbar--material__border{height:2px;background-color:#fff;background-color:var(--material-tabbar-current-color)}.tabbar--material__icon{font-size:22px!important;line-height:36px}.tabbar--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.tabbar--material__label:first-child{-webkit-font-smoothing:antialiased;letter-spacing:.015em;font-weight:500;font-size:14px}.tabbar--material__icon+.tabbar--material__label{font-size:10px}:root{--toolbar-button-background-color:rgba(0, 0, 0, 0);--toolbar-button-border-color:var(--toolbar-button-color);--toolbar-button-border-radius:2px;--toolbar-button-padding:4px 10px;--toolbar-button-active-background-color:var(--toolbar-button-background-color);--toolbar-button-border:1px solid var(--toolbar-button-border-color)}.toolbar-button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:4px 10px;padding:var(--toolbar-button-padding);letter-spacing:0;color:#ffa101;color:var(--toolbar-button-color);background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-background-color);border-radius:2px;border-radius:var(--toolbar-button-border-radius);border:1px solid transparent;font-weight:400;font-weight:var(--font-weight);font-size:17px;font-size:var(--font-size);transition:none}.toolbar-button:active{background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-active-background-color);transition:none;opacity:.2}.toolbar-button:disabled,.toolbar-button[disabled]{opacity:.3;cursor:default;pointer-events:none}.toolbar-button:focus{outline:0;transition:none}.toolbar-button:hover{transition:none}.toolbar-button--outline{border:1px solid #ffa101;border:var(--toolbar-button-border);margin:auto 8px;padding-left:6px;padding-right:6px}.toolbar-button--material{font-size:22px;color:#ffa101;color:var(--material-toolbar-button-color);display:inline-block;padding:0 12px;height:100%;margin:0;border:none;border-radius:0;vertical-align:baseline;vertical-align:initial;transition:background-color .25s linear}.toolbar-button--material:first-of-type{margin-left:4px}.toolbar-button--material:last-of-type{margin-right:4px}.toolbar-button--material:active{opacity:1;transition:background-color .25s linear}.back-button{height:44px;line-height:44px;padding-left:8px;color:#ffa101;color:var(--toolbar-button-color);background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-background-color);display:inline-block}.back-button:active{opacity:.2}.back-button__label{display:inline-block;height:100%;vertical-align:top;line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large)}.back-button__icon{margin-right:6px;display:-webkit-inline-flex;display:inline-flex;fill:rgb(255,161,1);fill:var(--toolbar-button-color);-webkit-align-items:center;align-items:center;height:100%}.back-button--material{font-size:22px;color:#ffa101;color:var(--material-toolbar-button-color);display:inline-block;padding:0 12px;height:100%;margin:0 0 0 4px;border:none;border-radius:0;vertical-align:baseline;vertical-align:initial;line-height:56px}.back-button--material__label{display:none;font-size:20px}.back-button--material__icon{display:-webkit-inline-flex;display:inline-flex;fill:rgb(255,161,1);fill:var(--material-toolbar-button-color);-webkit-align-items:center;align-items:center;height:100%}.back-button--material:active{opacity:1}:root{--checkbox-size:22px;--checkbox-border:1px solid #c7c7cd;--checkbox-checked-background-color:var(--highlight-color);--background-color--before--checkbox:var(--checkbox-checked-background-color);--checkmark-border:2px solid #fff;--material-checkbox-size:18px;--material-checkbox-focus-ring-size:40px;--material-checkbox-focus-ring-shadow-size:calc((var(--material-checkbox-focus-ring-size) - var(--material-checkbox-size)) / 2)}.checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);line-height:22px;line-height:var(--checkbox-size)}.checkbox__checkmark{box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);height:22px;height:var(--checkbox-size);width:22px;width:var(--checkbox-size);pointer-events:none}.checkbox__input,.checkbox__input:checked{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox__checkmark:before{content:'';position:absolute;box-sizing:border-box;width:22px;width:var(--checkbox-size);height:22px;height:var(--checkbox-size);background:0 0;border:1px solid #c7c7cd;border:var(--checkbox-border);border-radius:22px;border-radius:var(--checkbox-size);left:0}.checkbox__checkmark:after{content:'';position:absolute;top:7px;left:5px;width:11px;height:5px;background:0 0;border:2px solid #fff;border:var(--checkmark-border);border-width:1px;border-top:none;border-right:none;border-radius:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}:checked+.checkbox__checkmark:before{background:#ffa101;background:var(--background-color--before--checkbox);border:none}:checked+.checkbox__checkmark:after{opacity:1}:disabled+.checkbox__checkmark{opacity:.3;cursor:default;pointer-events:none}:disabled:active+.checkbox__checkmark:before{background:0 0}.checkbox--noborder__checkmark{background:0 0;border:none}.checkbox--noborder__checkmark:before{border:none}.checkbox--noborder__checkmark:after{height:4px;border:2px solid #ffa101;border:2px solid var(--highlight-color)}:checked+.checkbox--noborder__checkmark:before{background:0 0}:focus+.checkbox--noborder__checkmark:before{border:none}:disabled:active+.checkbox--noborder__checkmark:before{border:none}.checkbox--material{line-height:18px;line-height:var(--material-checkbox-size);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);overflow:visible}.checkbox--material__checkmark{width:18px;width:var(--material-checkbox-size);height:18px;height:var(--material-checkbox-size)}.checkbox--material__checkmark:before{border-radius:2px;height:18px;height:var(--material-checkbox-size);width:18px;width:var(--material-checkbox-size);border:2px solid #717171;border:2px solid var(--material-checkbox-inactive-color);transition:background-color .1s linear .2s,border-color .1s linear .2s;background-color:transparent}:checked+.checkbox--material__checkmark:before{border:2px solid #fff;border:2px solid var(--material-checkbox-active-color);background-color:#fff;background-color:var(--material-checkbox-active-color);transition:background-color .1s linear,border-color .1s linear}.checkbox--material__checkmark:after{border-color:#000;border-color:var(--material-checkbox-checkmark-color);transition:-webkit-transform .2s ease 0;transition:transform .2s ease 0;transition:transform .2s ease 0,-webkit-transform .2s ease 0;width:10px;height:5px;top:4px;left:3px;-webkit-transform:scale(0) rotate(-45deg);transform:scale(0) rotate(-45deg);border-width:2px}:checked+.checkbox--material__checkmark:after{transition:-webkit-transform .2s ease .2s;transition:transform .2s ease .2s;transition:transform .2s ease .2s,-webkit-transform .2s ease .2s;width:10px;height:5px;top:4px;left:3px;-webkit-transform:scale(1) rotate(-45deg);transform:scale(1) rotate(-45deg);border-width:2px}.checkbox--material__input:before{content:'';opacity:0;position:absolute;top:0;left:0;width:18px;width:var(--material-checkbox-size);height:18px;height:var(--material-checkbox-size);box-shadow:0 0 0 calc((40px - 18px)/ 2) #717171;box-shadow:0 0 0 var(--material-checkbox-focus-ring-shadow-size) var(--material-checkbox-inactive-color);box-sizing:border-box;border-radius:50%;background-color:#717171;background-color:var(--material-checkbox-inactive-color);pointer-events:none;display:block;-webkit-transform:scale3d(.2,.2,.2);transform:scale3d(.2,.2,.2);transition:opacity .25s ease-out,-webkit-transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out,-webkit-transform .1s ease-out}.checkbox--material__input:checked:before{box-shadow:0 0 0 calc((40px - 18px)/ 2) #fff;box-shadow:0 0 0 var(--material-checkbox-focus-ring-shadow-size) var(--material-checkbox-active-color);background-color:#fff;background-color:var(--material-checkbox-active-color)}.checkbox--material__input:active:before{opacity:.15;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}:disabled+.checkbox--material__checkmark{opacity:1}:disabled+.checkbox--material__checkmark:before{border-color:#afafaf}:disabled:checked+.checkbox--material__checkmark:before{background-color:#afafaf}:disabled:checked+.checkbox--material__checkmark:after{border-color:#fff}:root{--radio-button-background-active:rgba(0, 0, 0, 0);--radio-button-indicator-color:var(--highlight-color);--radio-button-background:transparent;--radio-button-border:3px solid var(--radio-button-indicator-color);--radio-button-size:24px;--material-radio-button-size:20px;--material-radio-button-shadow-size:calc((48px - var(--material-radio-button-size)) / 2)}.radio-button__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.radio-button__input:active,.radio-button__input:focus{outline:0;-webkit-tap-highlight-color:transparent}.radio-button{display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;position:relative;line-height:24px;line-height:var(--radio-button-size);text-align:left}.radio-button__checkmark:before{content:'';position:absolute;box-sizing:border-box;width:22px;width:var(--checkbox-size);height:22px;height:var(--checkbox-size);background:0 0;border:none;border-radius:22px;border-radius:var(--checkbox-size);left:0}.radio-button__checkmark{box-sizing:border-box;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;width:24px;width:var(--radio-button-size);height:24px;height:var(--radio-button-size);background:0 0;background:var(--radio-button-background);pointer-events:none}.radio-button__checkmark:after{content:'';position:absolute;top:7px;left:4px;opacity:0;width:11px;height:4px;background:0 0;border:2px solid #ffa101;border:2px solid var(--highlight-color);border-top:none;border-right:none;border-radius:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}:checked+.radio-button__checkmark{background:rgba(0,0,0,0);background:var(--radio-button-background-active)}:checked+.radio-button__checkmark:after{opacity:1}:checked+.radio-button__checkmark:before{background:0 0;border:none}:disabled+.radio-button__checkmark{opacity:.3;cursor:default;pointer-events:none}.radio-button--material{line-height:calc(20px + 2px);line-height:calc(var(--material-radio-button-size) + 2px);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.radio-button--material__input:before{content:'';position:absolute;top:0;left:0;opacity:0;width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);box-shadow:0 0 0 calc((48px - 20px)/ 2) #8e8e8e;box-shadow:0 0 0 var(--material-radio-button-shadow-size) var(--material-radio-button-inactive-color);border:none;box-sizing:border-box;border-radius:50%;background-color:#8e8e8e;background-color:var(--material-radio-button-inactive-color);pointer-events:none;display:block;-webkit-transform:scale3d(.2,.2,.2);transform:scale3d(.2,.2,.2);transition:opacity .25s ease-out,-webkit-transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out,-webkit-transform .1s ease-out}.radio-button--material__input:checked:before{box-shadow:0 0 0 calc((48px - 20px)/ 2) #ffa101;box-shadow:0 0 0 var(--material-radio-button-shadow-size) var(--material-radio-button-active-color);background-color:#ffa101;background-color:var(--material-radio-button-active-color)}.radio-button--material__input:active:before{opacity:.15;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}.radio-button--material__checkmark{width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);overflow:visible}.radio-button--material__checkmark:before{background:0 0;border:2px solid #8e8e8e;border:2px solid var(--material-radio-button-inactive-color);box-sizing:border-box;border-radius:50%;width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);transition:border .2s ease}.radio-button--material__checkmark:after{transition:background .2s ease,-webkit-transform .2s ease;transition:background .2s ease,transform .2s ease;transition:background .2s ease,transform .2s ease,-webkit-transform .2s ease;top:calc(20px / 4);top:calc(var(--material-radio-button-size)/ 4);left:calc(20px / 4);left:calc(var(--material-radio-button-size)/ 4);width:calc(20px / 2);width:calc(var(--material-radio-button-size)/ 2);height:calc(20px / 2);height:calc(var(--material-radio-button-size)/ 2);border:none;border-radius:50%;-webkit-transform:scale(0);transform:scale(0)}:checked+.radio-button--material__checkmark:before{background:0 0;border:2px solid #ffa101;border:2px solid var(--material-radio-button-active-color)}.radio-button--material__input+.radio-button__checkmark:after{background:#8e8e8e;background:var(--material-radio-button-inactive-color);opacity:1;-webkit-transform:scale(0);transform:scale(0)}:checked+.radio-button--material__checkmark:after{opacity:1;background:#ffa101;background:var(--material-radio-button-active-color);-webkit-transform:scale(1);transform:scale(1)}:disabled+.radio-button--material__checkmark{opacity:1}:disabled+.radio-button--material__checkmark:after{background-color:#505050;background-color:var(--material-radio-button-disabled-color);border-color:#505050;border-color:var(--material-radio-button-disabled-color)}:disabled+.radio-button--material__checkmark:before{border-color:#505050;border-color:var(--material-radio-button-disabled-color)}:root{--list-item-color:var(--text-color);--list-item-active-background-color:var(--list-tap-active-background-color);--list-item-separator-color:var(--border-color);--list-border:1px solid var(--list-item-separator-color);--list-item-min-height:44px;--list-item-margin:0 0 -1px 0;--list-item-padding-side:14px;--list-item-padding:0 0 0 var(--list-item-padding-side);--list-border-top:1px solid var(--list-item-separator-color);--list-border-bottom:1px solid var(--list-item-separator-color);--list-header-color:var(--text-color);--list-header-font-size:12px;--list-header-padding:0 0 0 15px;--list-header-min-height:24px;--list-header-font-weight:var(--font-weight--large);--inset-list-border:1px solid var(--list-item-separator-color);--list-title-color:#6d6d72;--list-title-font-size:13px;--list-title-font-weight:500;--list-title-line-height:24px;--list-title-padding:0 0 0 16px;--material-list-item-side-padding:16px;--material-list-item-min-height:48px;--material-list-item-padding:0 0 0 var(--material-list-item-side-padding);--material-list-title-color:#757575;--material-list-title-font-size:14px;--material-list-title-font-weight:500;--material-list-title-line-height:24px;--material-list-title-padding:12px 0 12px var(--material-list-item-side-padding)}.list{padding:0;margin:0;color:inherit;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);list-style-type:none;text-align:left;display:block;-webkit-overflow-scrolling:touch;overflow:hidden;background-image:linear-gradient(#242424,#242424),linear-gradient(#242424,#242424);background-image:linear-gradient(var(--list-item-separator-color),var(--list-item-separator-color)),linear-gradient(var(--list-item-separator-color),var(--list-item-separator-color));background-size:100% 1px,100% 1px;background-repeat:no-repeat;background-position:bottom,top;border:none;background-color:#181818;background-color:var(--list-background-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list{background-image:linear-gradient(0deg,#242424,#242424 50%,transparent 50%),linear-gradient(180deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%),linear-gradient(180deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item{position:relative;width:100%;list-style:none;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;padding:0 0 0 14px;padding:var(--list-item-padding);margin:0 0 -1px 0;margin:var(--list-item-margin);color:#fff;color:var(--list-item-color);transition:background-color .2s linear}.list-item__top{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;-webkit-order:0;order:0;width:100%}.list-item--expandable{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#242424,#242424 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);background-position-x:14px;background-position-x:var(--list-item-padding-side)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--expandable{background-image:linear-gradient(0deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item__expandable-content{display:none;width:100%;padding:12px 14px 12px 0;box-sizing:border-box;-webkit-order:1;order:1;overflow:hidden}.list-item--expandable.list-item--expanded>.list-item__expandable-content{display:block;height:auto}.list-item__left{box-sizing:border-box;display:-webkit-flex;display:flex;padding:12px 14px 12px 0;-webkit-order:0;order:0;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}.list-item__left:empty{width:0;min-width:0;padding:0;margin:0}.list-item__center{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-order:1;order:1;margin-right:auto;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;margin-left:0;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#242424,#242424 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);padding:12px 6px 12px 0;line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item__center{background-image:linear-gradient(0deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item__right{box-sizing:border-box;display:-webkit-flex;display:flex;margin-left:auto;padding:12px 12px 12px 0;-webkit-order:2;order:2;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#242424,#242424 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item__right{background-image:linear-gradient(0deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-header{margin:0;list-style:none;text-align:left;display:block;box-sizing:border-box;padding:0 0 0 15px;padding:var(--list-header-padding);font-size:12px;font-size:var(--list-header-font-size);font-weight:500;font-weight:var(--list-header-font-weight);color:#fff;color:var(--list-header-color);min-height:24px;min-height:var(--list-header-min-height);line-height:calc(1px + 24px);line-height:calc(1px + var(--list-header-min-height));text-transform:uppercase;position:relative;background-color:#111;background-color:var(--list-header-background-color);background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(0deg,#242424,#242424 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-header{background-image:linear-gradient(180deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(180deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list--noborder{border-top:none;border-bottom:none;background-image:none}.list-item--tappable:active{transition:none;background-color:#262626;background-color:var(--list-item-active-background-color)}.list--inset{margin:0 8px;border:1px solid #242424;border:var(--inset-list-border);border-radius:4px;background-image:none}.list-item__label{font-size:calc(17px - 3px);font-size:var(--font-size--mini);padding:0 4px;opacity:.6}.list-item__title{-webkit-flex-basis:100%;flex-basis:100%;-webkit-align-self:flex-end;align-self:flex-end;-webkit-order:0;order:0}.list-item__subtitle{opacity:.75;font-size:calc(17px - 3px);font-size:var(--font-size--mini);-webkit-order:1;order:1;-webkit-flex-basis:100%;flex-basis:100%;-webkit-align-self:flex-start;align-self:flex-start}.list-item__thumbnail{width:40px;height:40px;border-radius:6px;display:block;margin:0}.list-item__icon{font-size:22px;padding:0 6px}.list--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);background-image:none;background-color:hsl(0,0%,20.8235294118%);background-color:var(--material-list-background-color)}.list-item--material{border:0;padding:0 0 0 16px;padding:var(--material-list-item-padding);line-height:normal}.list-item--material__subtitle{margin-top:4px}.list-item--material:first-child{box-shadow:none}.list-item--material__left{padding:14px 0;min-width:56px;line-height:1;min-height:48px;min-height:var(--material-list-item-min-height)}.list-item--material__center,.list-item--material__left:empty{padding:14px 6px 14px 0;border-color:rgba(255,255,255,.12);border-color:var(--material-list-item-separator-color);border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);min-height:48px;min-height:var(--material-list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material__center,.list-item--material__left:empty{background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material__right{padding:14px 16px 14px 0;line-height:1;border-color:rgba(255,255,255,.12);border-color:var(--material-list-item-separator-color);border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);min-height:48px;min-height:var(--material-list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material__right{background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material.list-item--expandable{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);background-position-x:16px;background-position-x:var(--material-list-item-side-padding)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material.list-item--expandable{background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material.list-item--expandable.list-item--longdivider,.list-item--material.list-item--longdivider{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material.list-item--expandable.list-item--longdivider,.list-item--material.list-item--longdivider{background-image:linear-gradient(0deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-header--material{background:#181818;background:var(--list-background-color);border:none;font-size:14px;text-transform:none;margin:-1px 0 0 0;color:#8a8a8a;color:var(--material-list-header-text-color);font-weight:500;padding:8px 16px}.list-header--material:not(:first-of-type){border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 100%);background-image:linear-gradient(180deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);padding-top:16px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-header--material:not(:first-of-type){background-image:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.12) 50%,transparent 50%);background-image:linear-gradient(180deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material__thumbnail{width:40px;height:40px;border-radius:100%}.list-item--material__icon{font-size:20px;padding:0 4px}.list-item--chevron:before,.list-item__expand-chevron{border-right:2px solid #383833;border-right:2px solid var(--list-item-chevron-color);border-bottom:2px solid #383833;border-bottom:2px solid var(--list-item-chevron-color);width:7px;height:7px;background-color:transparent;z-index:5}.list-item--chevron:before{position:absolute;content:'';right:16px;top:50%;-webkit-transform:translateY(-50%) rotate(-45deg);transform:translateY(-50%) rotate(-45deg)}.list-item__expand-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin:1px}.list-item--expandable.list-item--expanded .list-item__expand-chevron{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.list-item--chevron__right{padding-right:30px}.list-item--expandable .list-item__center,.list-item--expandable .list-item__right,.list-item--nodivider.list-item--expandable,.list-item--nodivider__center,.list-item--nodivider__right{border:none;background-image:none}.list-item--longdivider{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#242424,#242424 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--longdivider{background-image:linear-gradient(0deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item--longdivider:last-of-type{border:none;background-image:none}.list-item--longdivider__center{border:none;background-image:none}.list-item--longdivider__right{border:none;background-image:none}.list-title{background:0 0;border:none;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;color:#6d6d72;color:var(--list-title-color);text-align:left;box-sizing:border-box;padding:0 0 0 16px;padding:var(--list-title-padding);margin:0;font-size:13px;font-size:var(--list-title-font-size);font-weight:500;font-weight:var(--list-title-font-weight);line-height:24px;line-height:var(--list-title-line-height);text-transform:uppercase;letter-spacing:.04em}.list-title--material{-webkit-font-smoothing:antialiased;color:#757575;color:var(--material-list-title-color);font-size:14px;font-size:var(--material-list-title-font-size);margin:0;padding:12px 0 12px 16px;padding:var(--material-list-title-padding);font-weight:500;font-weight:var(--material-list-title-font-weight);line-height:24px;line-height:var(--material-list-title-line-height)}:root{--search-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+aW9zLXNlYXJjaC1pbnB1dC1pY29uPC90aXRsZT4KICAgIDxk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xNDIzNyw3LjUgMTgsOS43Mzg1NzYyNSAxOCwxMi41IEMxOCwxMy42Mjc0Njg1IDE3LjYyNjgyMzIsMTQuNjY3Nzc2OCAxNi45OTcyNDgyLDE1LjUwNDE0NjYgWiBNMTMsMTYuNSBDMTUuMjA5MTM5LDE2LjUgMTcsMTQuNzA5MTM5IDE3LDEyLjUgQzE3LDEwLjI5MDg2MSAxNS4yMDkxMzksOC41IDEzLDguNSBDMTAuNzkwODYxLDguNSA5LDEwLjI5MDg2MSA5LDEyLjUgQzksMTQuNzA5MTM5IDEwLjc5MDg2MSwxNi41IDEzLDE2LjUgWiIgaWQ9Imlvcy1zZWFyY2gtaW5wdXQtaWNvbiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');--search-input-background-image:var(--search-icon);--search-input-color:var(--input-text-color);--search-decoration-margin-right:0;--search-input-border-radius:5.5px;--search-input-height:28px;--search-input-font-size:14px;--search-input-placeholder-color:#7a797b;--material-search-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQzLjIgKDM5MDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0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c2Zvcm09InRyYW5zbGF0ZSg4Ljc0NTAwMCwgOC43NDU1MDApIHNjYWxlKC0xLCAxKSByb3RhdGUoLTE4MC4wMDAwMDApIHRyYW5zbGF0ZSgtOC43NDUwMDAsIC04Ljc0NTUwMCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==')}.search-input{font:inherit;background:0 0;border:none;vertical-align:top;outline:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-appearance:textfield;appearance:textfield;box-sizing:border-box;height:28px;height:var(--search-input-height);font-size:14px;font-size:var(--search-input-font-size);background-color:rgba(255,255,255,.09);background-color:var(--search-input-background-color);box-shadow:none;color:#fff;color:var(--search-input-color);line-height:1.3;padding:0 8px 0 28px;margin:0;border-radius:5.5px;border-radius:var(--search-input-border-radius);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+aW9zLXNlYXJjaC1pbnB1dC1pY29uPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2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xOCwxMi41IEMxOCwxMy42Mjc0Njg1IDE3LjYyNjgyMzIsMTQuNjY3Nzc2OCAxNi45OTcyNDgyLDE1LjUwNDE0NjYgWiBNMTMsMTYuNSBDMTUuMjA5MTM5LDE2LjUgMTcsMTQuNzA5MTM5IDE3LDEyLjUgQzE3LDEwLjI5MDg2MSAxNS4yMDkxMzksOC41IDEzLDguNSBDMTAuNzkwODYxLDguNSA5LDEwLjI5MDg2MSA5LDEyLjUgQzksMTQuNzA5MTM5IDEwLjc5MDg2MSwxNi41IDEzLDE2LjUgWiIgaWQ9Imlvcy1zZWFyY2gtaW5wdXQtaWNvbiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');background-image:var(--search-input-background-image);background-position:8px center;background-repeat:no-repeat;background-size:13px;font-weight:400;font-weight:var(--font-weight);display:inline-block;text-indent:0}.search-input::-webkit-search-cancel-button{-webkit-appearance:textfield;appearance:textfield;display:none}.search-input::-webkit-search-decoration{display:none}.search-input:focus{outline:0}.search-input::-webkit-input-placeholder{color:#7a797b;color:var(--search-input-placeholder-color);font-size:14px;font-size:var(--search-input-font-size);text-indent:0}.search-input::placeholder{color:#7a797b;color:var(--search-input-placeholder-color);font-size:14px;font-size:var(--search-input-font-size);text-indent:0}.search-input:disabled{opacity:.3;cursor:default;pointer-events:none}.search-input--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);border-radius:2px;height:48px;background-color:#424242;background-color:var(--material-search-background-color);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcv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IEwxMi41MDIsNi40OTEgTDEyLjUwMiw2LjQ5MSBaIE02LjUsNi40OTEgQzQuMDE0LDYuNDkxIDIsOC41MDUgMiwxMC45OTEgQzIsMTMuNDc2IDQuMDE0LDE1LjQ5MSA2LjUsMTUuNDkxIEM4Ljk4NSwxNS40OTEgMTEsMTMuNDc2IDExLDEwLjk5MSBDMTEsOC41MDUgOC45ODUsNi40OTEgNi41LDYuNDkxIEw2LjUsNi40OTEgWiIgaWQ9IlNoYXBlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0NTAwMCwgOC43NDU1MDApIHNjYWxlKC0xLCAxKSByb3RhdGUoLTE4MC4wMDAwMDApIHRyYW5zbGF0ZSgtOC43NDUwMDAsIC04Ljc0NTUwMCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==');background-image:var(--material-search-icon);background-size:18px;background-position:18px center;font-size:14px;padding:0 24px 0 64px;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24),0 1px 0 0 rgba(255,255,255,.06) inset}:root{--text-input-font-size:16px;--text-input-height:31px;--text-input-border-color:var(--input-border-color);--material-text-input-font-size:16px;--material-text-input-color:var(--material-text-input-text-color)}.text-input{font:inherit;background:0 0;vertical-align:top;outline:0;line-height:1;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border:none;background-color:transparent;letter-spacing:0;box-shadow:none;color:#fff;color:var(--input-text-color);padding:0;margin:0;width:auto;font-size:16px;font-size:var(--text-input-font-size);height:31px;height:var(--text-input-height);font-weight:400;font-weight:var(--font-weight);box-sizing:border-box}.text-input::-ms-clear{display:none}.text-input:disabled{opacity:.3;cursor:default;pointer-events:none}.text-input::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.text-input::placeholder{color:#999;color:var(--input-placeholder-color)}.text-input:disabled::-webkit-input-placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.text-input:disabled::placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.text-input:invalid{border:none;background-color:transparent;color:#fff;color:var(--input-invalid-text-color)}.text-input--underbar{border:none;background-color:transparent;border-bottom:1px solid #242424;border-bottom:1px solid var(--text-input-border-color);border-radius:0}.text-input--underbar:disabled{border:none;background-color:transparent;border-bottom:1px solid #242424;border-bottom:1px solid var(--text-input-border-color)}.text-input--underbar:disabled::-webkit-input-placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.text-input--underbar:disabled::placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.text-input--underbar:invalid{border:none;background-color:transparent;border-bottom:1px solid #242424;border-bottom:1px solid var(--input-invalid-border-color)}.text-input--material{padding:0;margin:0;font:inherit;background:0 0;outline:0;line-height:1;-moz-osx-font-smoothing:grayscale;font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:rgba(255,255,255,.75);color:var(--material-text-input-color);background-image:linear-gradient(to top,transparent 1px,rgba(255,255,255,.3) 1px);background-image:linear-gradient(to top,transparent 1px,var(--material-text-input-inactive-color) 1px);background-size:100% 2px;background-repeat:no-repeat;background-position:center bottom;background-color:transparent;font-size:16px;font-size:var(--material-text-input-font-size);border:none;padding-bottom:2px;border-radius:0;height:24px;vertical-align:middle;-webkit-transform:translate3d(0,0,0)}.text-input--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:rgba(255,255,255,.3);color:var(--material-text-input-inactive-color);position:absolute;left:0;top:2px;font-size:16px;pointer-events:none}.text-input--material__label--active{color:rgba(255,255,255,.75);color:var(--material-text-input-active-color);-webkit-transform:translate(0,-75%) scale(.75);transform:translate(0,-75%) scale(.75);-webkit-transform-origin:left top;transform-origin:left top;transition:color .1s ease-in,-webkit-transform .1s ease-in;transition:transform .1s ease-in,color .1s ease-in;transition:transform .1s ease-in,color .1s ease-in,-webkit-transform .1s ease-in}.text-input--material:focus{background-image:linear-gradient(rgba(255,255,255,.75),rgba(255,255,255,.75)),linear-gradient(to top,transparent 1px,rgba(255,255,255,.3) 1px);background-image:linear-gradient(var(--material-text-input-active-color),var(--material-text-input-active-color)),linear-gradient(to top,transparent 1px,var(--material-text-input-inactive-color) 1px);-webkit-animation:material-text-input-animate .3s forwards;animation:material-text-input-animate .3s forwards}.text-input--material::-webkit-input-placeholder{color:rgba(255,255,255,.3);color:var(--material-text-input-inactive-color);line-height:20px}.text-input--material::placeholder{color:rgba(255,255,255,.3);color:var(--material-text-input-inactive-color);line-height:20px}@-webkit-keyframes material-text-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}@keyframes material-text-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}:root{--textarea-color:var(--input-text-color);--textarea-border:1px solid var(--input-border-color);--textarea-padding:5px 5px 5px 5px;--textarea-box-shadow:none;--textarea-border-radius:4px}.textarea{box-sizing:border-box;margin:0;font:inherit;background:0 0;line-height:normal;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;resize:none;outline:0;padding:5px 5px 5px 5px;padding:var(--textarea-padding);font-size:16px;font-size:var(--text-input-font-size);font-weight:400;font-weight:var(--font-weight);border-radius:4px;border-radius:var(--textarea-border-radius);border:1px solid #242424;border:var(--textarea-border);background-color:#0d0d0d;background-color:var(--input-bg-color);color:#fff;color:var(--textarea-color);letter-spacing:0;box-shadow:none;box-shadow:var(--textarea-box-shadow);-webkit-appearance:none;appearance:none;width:auto}.textarea:disabled{opacity:.3;cursor:default;pointer-events:none}.textarea::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.textarea::placeholder{color:#999;color:var(--input-placeholder-color)}.textarea--transparent{padding-left:0;padding-right:0;border:none;background-color:transparent}.dialog{box-sizing:border-box;padding:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:auto auto;overflow:hidden;min-width:270px;min-height:100px;text-align:left}.dialog-container{height:inherit;min-height:inherit;overflow:hidden;border-radius:4px;background-color:#0d0d0d;background-color:var(--dialog-background-color);-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');color:#1f1f21;color:var(--dialog-text-color)}.dialog-mask{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;position:absolute;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.2)}.dialog--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);text-align:left;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.dialog-container--material{border-radius:2px;background-color:#424242;background-color:var(--material-dialog-background-color);color:#fff;color:var(--material-dialog-text-color)}.dialog-mask--material{background-color:rgba(0,0,0,.3)}.alert-dialog{box-sizing:border-box;padding:0;font:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:270px;margin:auto;background-color:#f4f4f4;background-color:var(--alert-dialog-background-color);border-radius:8px;overflow:visible;max-width:95%;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-container{height:inherit;padding-top:16px;overflow:hidden}.alert-dialog-title{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);padding:0 8px;text-align:center;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-content{box-sizing:border-box;background-clip:padding-box;padding:4px 12px 8px;font-size:calc(17px - 3px);font-size:var(--font-size--mini);min-height:36px;text-align:center;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-footer{width:100%}.alert-dialog-button{box-sizing:border-box;font:inherit;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none;letter-spacing:0;vertical-align:middle;border:none;border-top:1px solid #ddd;border-top:1px solid var(--alert-dialog-separator-color);font-size:calc(17px - 1px);font-size:calc(var(--font-size) - 1px);padding:0 8px;margin:0;display:block;width:100%;background-color:transparent;text-align:center;height:44px;line-height:44px;outline:0;color:#ffa101;color:var(--alert-dialog-button-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#ddd,#ddd 50%,transparent 50%);background-image:linear-gradient(180deg,var(--alert-dialog-separator-color),var(--alert-dialog-separator-color) 50%,transparent 50%)}}.alert-dialog-button:active{background-color:rgba(0,0,0,.05)}.alert-dialog-button--primal{font-weight:500;font-weight:var(--font-weight--large)}.alert-dialog-footer--rowfooter{white-space:nowrap;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.alert-dialog-button--rowfooter{-webkit-flex:1;flex:1;display:block;width:100%;border-left:1px solid #ddd;border-left:1px solid var(--alert-dialog-separator-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter{border-top:none;border-left:none;background-size:100% 1px,1px 100%;background-repeat:no-repeat;background-position:top,left;background-image:linear-gradient(0deg,transparent,transparent 50%,#ddd 50%),linear-gradient(90deg,transparent,transparent 50%,#ddd 50%);background-image:linear-gradient(0deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%),linear-gradient(90deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%)}}.alert-dialog-button--rowfooter:first-child{border-left:none}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter:first-child{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top,left;background-image:linear-gradient(0deg,transparent,transparent 50%,#ddd 50%);background-image:linear-gradient(0deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%)}}.alert-dialog-mask{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;position:absolute;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.2)}.alert-dialog--material{border-radius:2px;background-color:#424242;background-color:var(--material-alert-dialog-background-color)}.alert-dialog-container--material{padding:22px 0 0 0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.alert-dialog-title--material{-webkit-font-smoothing:antialiased;text-align:left;font-size:20px;font-weight:500;padding:0 24px;color:#fff;color:var(--material-alert-dialog-title-color)}.alert-dialog-content--material{-webkit-font-smoothing:antialiased;text-align:left;font-size:16px;font-weight:400;font-weight:var(--material-font-weight);line-height:20px;padding:0 24px;margin:24px 0 10px 0;min-height:0;color:rgba(255,255,255,.85);color:var(--material-alert-dialog-content-color)}.alert-dialog-footer--material{display:block;padding:0;height:52px;box-sizing:border-box;margin:0;line-height:1}.alert-dialog-button--material{-webkit-font-smoothing:antialiased;text-transform:uppercase;display:inline-block;width:auto;float:right;background:0 0;border:none;border-radius:2px;font-size:14px;font-weight:500;outline:0;height:36px;line-height:36px;padding:0 8px;margin:8px 8px 8px 0;box-sizing:border-box;min-width:50px;color:#d68600;color:var(--material-alert-dialog-button-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--material{background:0 0}}.alert-dialog-button--material:active{background-color:transparent;background-color:initial}.alert-dialog-button--rowfooter--material,.alert-dialog-button--rowfooter--material:first-child{border:0}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter--material,.alert-dialog-button--rowfooter--material:first-child{background:0 0}}.alert-dialog-button--primal--material{font-weight:500}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--primal--material{background:0 0}}.alert-dialog-mask--material{background-color:rgba(0,0,0,.3)}:root{--popover-arrow-size:18px;--popover-arrow-radius:4px;--popover-radius:8px;--popover-margin:6px;--material-popover-radius:2px;--material-popover-margin:4px}.popover{position:absolute;z-index:20001}.popover--bottom{bottom:0}.popover--top{top:0}.popover--left{left:0}.popover--right{right:0}.popover-mask{left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.2);position:absolute;z-index:19999}.popover__content{box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:block;width:220px;overflow:auto;min-height:100px;max-height:100%;background-color:#242424;background-color:var(--popover-background-color);border-radius:8px;border-radius:var(--popover-radius);color:#fff;color:var(--popover-text-color);pointer-events:auto}.popover__arrow{position:absolute;width:18px;width:var(--popover-arrow-size);height:18px;height:var(--popover-arrow-size);-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;background-color:transparent;background-image:linear-gradient(45deg,#242424,#242424 50%,transparent 50%);background-image:linear-gradient(45deg,var(--popover-background-color),var(--popover-background-color) 50%,transparent 50%);border-radius:0 0 0 4px;border-radius:0 0 0 var(--popover-arrow-radius);margin:0;z-index:20001}.popover--bottom__arrow{-webkit-transform:translateY(6px) translateX(calc(18px / -2)) rotate(-45deg);transform:translateY(6px) translateX(calc(18px / -2)) rotate(-45deg);-webkit-transform:translateY(6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(-45deg);transform:translateY(6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(-45deg);bottom:0;margin-right:-18px}.popover--top__arrow{-webkit-transform:translateY(-6px) translateX(calc(18px / -2)) rotate(135deg);transform:translateY(-6px) translateX(calc(18px / -2)) rotate(135deg);-webkit-transform:translateY(-6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(135deg);transform:translateY(-6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(135deg);top:0;margin-right:-18px}.popover--left__arrow{-webkit-transform:translateX(-6px) translateY(calc(18px / -2)) rotate(45deg);transform:translateX(-6px) translateY(calc(18px / -2)) rotate(45deg);-webkit-transform:translateX(-6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(45deg);transform:translateX(-6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(45deg);left:0;margin-bottom:-18px}.popover--right__arrow{-webkit-transform:translateX(6px) translateY(calc(18px / -2)) rotate(225deg);transform:translateX(6px) translateY(calc(18px / -2)) rotate(225deg);-webkit-transform:translateX(6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(225deg);transform:translateX(6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(225deg);right:0;margin-bottom:-18px}.popover-mask--material{background-color:transparent}.popover--material__content{background-color:#424242;background-color:var(--material-popover-background-color);border-radius:2px;border-radius:var(--material-popover-radius);color:#fff;color:var(--material-popover-text-color);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.popover--material__arrow{display:none}.progress-bar{position:relative;height:2px;display:block;width:100%;background-color:transparent;background-color:var(--progress-bar-background-color);background-clip:padding-box;margin:0;overflow:hidden;border-radius:4px}.progress-bar__primary,.progress-bar__secondary{position:absolute;background-color:#ffa101;background-color:var(--progress-bar-color);top:0;bottom:0;transition:width .3s linear;z-index:100;border-radius:4px}.progress-bar__secondary{background-color:#734901;background-color:var(--progress-bar-secondary-color);z-index:0}.progress-bar--indeterminate:before{content:'';position:absolute;background-color:#ffa101;background-color:var(--progress-bar-color);top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:progress-bar__indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:progress-bar__indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;border-radius:4px}.progress-bar--indeterminate:after{content:'';position:absolute;background-color:#ffa101;background-color:var(--progress-bar-color);top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:progress-bar__indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:progress-bar__indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s;border-radius:4px}@-webkit-keyframes progress-bar__indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes progress-bar__indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@-webkit-keyframes progress-bar__indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}@keyframes progress-bar__indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}.progress-bar--material{height:4px;background-color:transparent;background-color:var(--material-progress-bar-background-color);border-radius:0}.progress-bar--material__primary,.progress-bar--material__secondary{background-color:#d68600;background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-bar--material__secondary{background-color:#734800;background-color:var(--material-progress-bar-secondary-color);z-index:0}.progress-bar--material.progress-bar--indeterminate:before{background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-bar--material.progress-bar--indeterminate:after{background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-circular{height:32px;position:relative;width:32px;-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-animation:none;animation:none}.progress-circular__background,.progress-circular__primary,.progress-circular__secondary{ + cx: 50%; + cy: 50%; + r: 40%; + -webkit-animation:none;animation:none;fill:none;stroke-width:5%;stroke-miterlimit:10}.progress-circular__background{stroke:transparent;stroke:var(--progress-circle-background-color)}.progress-circular__primary{stroke-dasharray:1,200;stroke-dashoffset:0;stroke:rgb(255,161,1);stroke:var(--progress-circle-primary-color);transition:all 1s cubic-bezier(.4, 0, .2, 1)}.progress-circular__secondary{stroke:rgb(115,73,1);stroke:var(--progress-circle-secondary-color)}.progress-circular--indeterminate{-webkit-animation:progress__rotate 2s linear infinite;animation:progress__rotate 2s linear infinite;-webkit-transform:none;transform:none}.progress-circular--indeterminate__primary{-webkit-animation:progress__dash 1.5s ease-in-out infinite;animation:progress__dash 1.5s ease-in-out infinite}.progress-circular--indeterminate__secondary{display:none}@-webkit-keyframes progress__rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes progress__rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes progress__dash{0%{stroke-dasharray:10%,241.32%;stroke-dashoffset:0}50%{stroke-dasharray:201%,50.322%;stroke-dashoffset:-100%}100%{stroke-dasharray:10%,241.32%;stroke-dashoffset:-251.32%}}@keyframes progress__dash{0%{stroke-dasharray:10%,241.32%;stroke-dashoffset:0}50%{stroke-dasharray:201%,50.322%;stroke-dashoffset:-100%}100%{stroke-dasharray:10%,241.32%;stroke-dashoffset:-251.32%}}.progress-circular--material__background,.progress-circular--material__primary,.progress-circular--material__secondary{stroke-width:9%}.progress-circular--material__background{stroke:transparent;stroke:var(--material-progress-circle-background-color)}.progress-circular--material__primary{stroke:#d68600;stroke:var(--material-progress-circle-primary-color)}.progress-circular--material__secondary{stroke:rgb(115,72,0);stroke:var(--material-progress-circle-secondary-color)}:root{--fab-width:56px;--fab-height:56px;--fab-position:absolute;--fab-mini-width:40px;--fab-mini-height:40px;--material-fab-width:56px;--material-fab-height:56px;--material-fab-position:absolute;--material-fab-mini-width:40px;--material-fab-mini-height:40px}button.fab,ons-fab.fab,ons-speed-dial-item.fab{position:relative;display:inline-block;box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;width:56px;width:var(--fab-width);height:56px;height:var(--fab-height);text-decoration:none;font-size:25px;line-height:56px;line-height:var(--fab-height);letter-spacing:0;color:#fff;color:var(--fab-text-color);vertical-align:middle;text-align:center;background-color:#ffa101;background-color:var(--fab-background-color);border:0 solid currentColor;border-radius:50%;overflow:hidden;box-shadow:0 3px 6px rgba(0,0,0,.12);transition:all .1s linear}button.fab:active,ons-fab.fab:active,ons-speed-dial-item.fab:active{background-color:rgba(255,161,1,.7);background-color:var(--fab-active-background-color);transition:all .2s ease;box-shadow:0 0 6px rgba(0,0,0,.12)}button.fab:focus,ons-fab.fab:focus,ons-speed-dial-item.fab:focus{outline:0}button.fab:disabled,button.fab[disabled],ons-fab.fab:disabled,ons-fab.fab[disabled],ons-speed-dial-item.fab:disabled,ons-speed-dial-item.fab[disabled]{background-color:rgba(0,0,0,.5);box-shadow:none;opacity:.3;cursor:default;pointer-events:none}button.fab__icon,ons-fab.fab__icon,ons-speed-dial-item.fab__icon{position:relative;overflow:hidden;height:100%;width:100%;display:block;border-radius:100%;padding:0;z-index:100;line-height:56px;line-height:var(--material-fab-height)}button.fab--material,ons-fab.fab--material,ons-speed-dial-item.fab--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);width:56px;width:var(--material-fab-width);height:56px;height:var(--material-fab-height);text-decoration:none;font-size:25px;line-height:56px;line-height:var(--material-fab-height);color:#31313a;color:var(--material-fab-text-color);background-color:#fff;background-color:var(--material-fab-background-color);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4);transition:all .2s ease-in-out}button.fab--material:active,ons-fab.fab--material:active,ons-speed-dial-item.fab--material:active{background-color:rgba(255,255,255,.75);background-color:var(--material-fab-active-background-color);transition:all .2s ease}button.fab--material:focus,ons-fab.fab--material:focus,ons-speed-dial-item.fab--material:focus{outline:0}button.fab--material__icon,ons-fab.fab--material__icon,ons-speed-dial-item.fab--material__icon{position:relative;overflow:hidden;height:100%;width:100%;display:block;border-radius:100%;padding:0;z-index:100;line-height:56px;line-height:var(--material-fab-height)}button.fab--mini,ons-fab.fab--mini,ons-speed-dial-item.fab--mini{width:40px;width:var(--fab-mini-width);height:40px;height:var(--fab-mini-height);line-height:40px;line-height:var(--fab-mini-height)}button.fab--mini__icon,ons-fab.fab--mini__icon,ons-speed-dial-item.fab--mini__icon{line-height:40px;line-height:var(--fab-mini-height)}button.speed-dial__item,ons-fab.speed-dial__item,ons-speed-dial-item.speed-dial__item{position:absolute;-webkit-transform:scale(0);transform:scale(0)}.speed-dial.fab--top__right,button.fab--top__right,ons-fab.fab--top__right{top:20px;bottom:auto;right:20px;left:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__right,button.fab--bottom__right,ons-fab.fab--bottom__right{top:auto;bottom:20px;right:20px;left:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--top__left,button.fab--top__left,ons-fab.fab--top__left{top:20px;bottom:auto;right:auto;left:20px;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__left,button.fab--bottom__left,ons-fab.fab--bottom__left{top:auto;bottom:20px;right:auto;left:20px;position:absolute;position:var(--fab-position)}.speed-dial.fab--top__center,button.fab--top__center,ons-fab.fab--top__center{top:20px;bottom:auto;margin-left:-28px;left:50%;right:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__center,button.fab--bottom__center,ons-fab.fab--bottom__center{top:auto;bottom:20px;margin-left:-28px;left:50%;right:auto;position:absolute;position:var(--fab-position)}.modal{white-space:nowrap;word-spacing:0;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;box-sizing:border-box;background-clip:padding-box;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);overflow:hidden;background-color:rgba(0,0,0,.7);background-color:var(--modal-background-color);position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;display:table;z-index:2147483647}.modal__content{overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;background:0 0;border:none;line-height:normal;box-sizing:border-box;background-clip:padding-box;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:table-cell;vertical-align:middle;text-align:center;color:#fff;color:var(--modal-text-color);white-space:normal}:root{--select-input-font-size:var(--font-size);--select-input-height:32px;--material-select-input-font-size:15px;--select-arrow-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lv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0 0;vertical-align:top;outline:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;font-size:17px;font-size:var(--select-input-font-size);height:32px;height:var(--select-input-height);line-height:32px;line-height:var(--select-input-height);border-color:#242424;border-color:var(--select-input-border-color);color:#fff;color:var(--select-input-color);-webkit-appearance:none;appearance:none;display:inline-block;border-radius:0;border:none;padding:0 20px 0 0;background-color:transparent;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');background-image:var(--select-arrow-icon);background-repeat:no-repeat;background-position:right center;border-bottom:none}.select-input::-ms-clear{display:none}.select-input::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.select-input::placeholder{color:#999;color:var(--input-placeholder-color)}.select-input:disabled{opacity:.3;cursor:default;pointer-events:none;border:none;background-color:transparent}.select-input:disabled::-webkit-input-placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.select-input:disabled::placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.select-input:invalid{border:none;background-color:transparent;color:#fff;color:var(--input-invalid-text-color)}.select-input[multiple]{height:calc(32px * 2);height:calc(var(--select-input-height) * 2)}.select-input--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#fff;color:var(--material-select-input-color);font-size:15px;font-size:var(--material-select-input-font-size);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4='),linear-gradient(to top,rgba(255,255,255,.88) 50%,rgba(255,255,255,.88) 50%);background-image:var(--select-arrow-icon),linear-gradient(to top,var(--material-select-border-color) 50%,var(--material-select-border-color) 50%);background-size:auto,100% 1px;background-repeat:no-repeat;background-position:right center,left bottom;border:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.select-input--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:rgba(255,255,255,.19);color:var(--material-select-input-inactive-color);position:absolute;left:0;top:2px;font-size:16px;pointer-events:none}.select-input--material__label--active{color:rgba(255,255,255,.85);color:var(--material-select-input-active-color);-webkit-transform:translate(0,-75%) scale(.75);transform:translate(0,-75%) scale(.75);-webkit-transform-origin:left top;transform-origin:left top;transition:color .1s ease-in,-webkit-transform .1s ease-in;transition:transform .1s ease-in,color .1s ease-in;transition:transform .1s ease-in,color .1s ease-in,-webkit-transform .1s ease-in}.select-input--material::-webkit-input-placeholder{color:rgba(255,255,255,.19);color:var(--material-select-input-inactive-color);line-height:20px}.select-input--material::placeholder{color:rgba(255,255,255,.19);color:var(--material-select-input-inactive-color);line-height:20px}@-webkit-keyframes material-select-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}@keyframes material-select-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}.select-input--underbar{border:none;border-bottom:1px solid #242424;border-bottom:1px solid var(--select-input-border-color)}.select-input--underbar:disabled{border:none;background-color:transparent;border-bottom:1px solid #242424;border-bottom:1px solid var(--select-input-border-color)}.select-input--underbar:disabled::-webkit-input-placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.select-input--underbar:disabled::placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.select-input--underbar:invalid{border:none;background-color:transparent;border-bottom:1px solid #242424;border-bottom:1px solid var(--input-invalid-border-color)}:root{--action-sheet-mask-color:rgba(0, 0, 0, 0.1);--material-action-sheet-mask-color:rgba(0, 0, 0, 0.2)}.action-sheet{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;position:absolute;left:10px;right:10px;bottom:10px;z-index:2}.action-sheet-button{box-sizing:border-box;height:56px;font-size:20px;text-align:center;color:#ffa101;color:var(--action-sheet-button-color);background-color:rgba(255,255,255,.9);background-color:var(--action-sheet-button-background-color);border-radius:0;line-height:56px;border:none;-webkit-appearance:none;appearance:none;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 100%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.action-sheet-button{background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 50%,transparent 50%)}}.action-sheet-button:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.action-sheet-button:active{background-color:#e9e9e9;background-color:var(--action-sheet-button-active-background-color);background-image:none}.action-sheet-button:focus{outline:0}.action-sheet-button:nth-last-of-type(2){border-bottom-right-radius:12px;border-bottom-left-radius:12px;background-image:none}.action-sheet-button:last-of-type{border-radius:12px;margin:8px 0 0 0;background-color:#fff;background-color:var(--action-sheet-cancel-button-background-color);background-image:none;font-weight:600}.action-sheet-button:last-of-type:active{background-color:#e9e9e9;background-color:var(--action-sheet-button-active-background-color)}.action-sheet-button--destructive{color:#fe3824;color:var(--action-sheet-button-destructive-color)}.action-sheet-title{box-sizing:border-box;height:56px;font-size:13px;color:#8f8e94;color:var(--action-sheet-title-color);text-align:center;background-color:rgba(255,255,255,.9);background-color:var(--action-sheet-button-background-color);line-height:56px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 100%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.action-sheet-title{background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 50%,transparent 50%)}}.action-sheet-title:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.action-sheet-icon{display:none}.action-sheet-mask{position:absolute;left:0;top:0;right:0;bottom:0;background-color:rgba(0,0,0,.1);background-color:var(--action-sheet-mask-color);z-index:1}.action-sheet--material{left:0;right:0;bottom:0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.action-sheet-title--material{-webkit-font-smoothing:antialiased;border-radius:0;background-image:none;text-align:left;height:56px;line-height:56px;font-size:16px;padding:0 0 0 16px;color:#686868;color:var(--material-action-sheet-text-color);background-color:#fff;font-weight:400;font-weight:var(--material-font-weight)}.action-sheet-title--material:first-child{border-radius:0}.action-sheet-button--material{-webkit-font-smoothing:antialiased;border-radius:0;background-image:none;height:52px;line-height:52px;text-align:left;font-size:16px;padding:0 0 0 16px;color:#686868;color:var(--material-action-sheet-text-color);font-weight:400;font-weight:var(--material-font-weight);background-color:#fff}.action-sheet-button--material:first-child{border-radius:0}.action-sheet-button--material:nth-last-of-type(2){border-radius:0}.action-sheet-button--material:last-of-type{margin:0;border-radius:0;font-weight:400;background-color:#fff}.action-sheet-icon--material{display:inline-block;float:left;height:52px;line-height:52px;margin-right:32px;font-size:26px;width:.8em;text-align:center}.action-sheet-mask--material{background-color:rgba(0,0,0,.2);background-color:var(--material-action-sheet-mask-color)}:root{--card-text-line-height:1.4;--card-text-font-size:14px;--material-card-text-line-height:1.4;--material-card-text-font-size:14px}.card{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);box-shadow:0 1px 2px rgba(0,0,0,.12);border-radius:8px;background-color:#242424;background-color:var(--card-background-color);box-sizing:border-box;display:block;margin:8px;padding:16px;text-align:left;word-wrap:break-word}.card__content{margin:0;font-size:14px;font-size:var(--card-text-font-size);line-height:1.4;line-height:var(--card-text-line-height);color:#fff;color:var(--card-text-color)}.card__title{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:20px;margin:4px 0 8px 0;padding:0;display:block;box-sizing:border-box}.card--material{background-color:#424242;background-color:var(--material-card-background-color);border-radius:2px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.card--material__content{font-size:14px;font-size:var(--material-card-text-font-size);line-height:1.4;line-height:var(--material-card-text-line-height);color:rgba(255,255,255,.46);color:var(--material-card-text-color)}.card--material__title{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);font-size:24px;margin:8px 0 12px 0}.toast{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;z-index:2;left:8px;right:8px;bottom:0;margin:8px 0;border-radius:8px;background-color:#ccc;background-color:var(--toast-background-color);display:-webkit-flex;display:flex;min-height:48px;line-height:1.5;box-sizing:border-box;padding:16px 16px}.toast__message{font-size:14px;color:#000;color:var(--toast-text-color);-webkit-flex-grow:1;flex-grow:1;text-align:left;margin:0 16px 0 0;white-space:normal}.toast__button{font-size:14px;color:#000;color:var(--toast-button-text-color);-webkit-flex-grow:0;flex-grow:0;-webkit-appearance:none;appearance:none;border:none;background-color:transparent;cursor:default;text-transform:uppercase}.toast__button:focus{outline:0}.toast__button:active{opacity:.4}.toast--material{left:0;right:0;bottom:0;margin:0;background-color:#ccc;background-color:var(--material-toast-background-color);border-radius:0;padding:16px 24px}.toast--material__message{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);margin:0 24px 0 0}.toast--material__button{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#583905;color:var(--material-toast-button-text-color)}.toolbar{top:0;box-sizing:border-box;padding-top:0}.bottom-bar{bottom:0;box-sizing:border-box;padding-bottom:0}.toolbar+.page__background{top:44px;top:var(--toolbar-height)}.page__content{top:0;padding-top:0;bottom:0}.toolbar+.page__background+.page__content{top:44px;top:var(--toolbar-height);padding-top:0}.page-with-bottom-toolbar>.page__content{bottom:44px}.toolbar.toolbar--material+.page__background{top:56px;top:var(--toolbar-material-height)}.toolbar.toolbar--material+.page__background+.page__content{top:56px;top:var(--toolbar-material-height);padding-top:0}.toolbar.toolbar--transparent+.page__background{top:0}.toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,.toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:44px;padding-top:var(--toolbar-height)}.toolbar.toolbar--material.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,.toolbar.toolbar--material.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:56px;padding-top:var(--toolbar-material-height)}.tabbar--top{padding-top:0}.tabbar:not(.tabbar--top){padding-bottom:0}:root{--iphonex-safe-area-inset-top-portrait:44px;--iphonex-safe-area-inset-right-portrait:0;--iphonex-safe-area-inset-bottom-portrait:34px;--iphonex-safe-area-inset-left-portrait:0;--iphonex-safe-area-inset-top-landscape:0;--iphonex-safe-area-inset-right-landscape:44px;--iphonex-safe-area-inset-bottom-landscape:21px;--iphonex-safe-area-inset-left-landscape:44px}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape);padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape)}html[onsflag-iphonex-landscape] .dialog .page__content,html[onsflag-iphonex-landscape] .modal .page__content{padding-left:0;padding-right:0}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .toolbar__left{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape)}html[onsflag-iphonex-landscape] .toolbar__right{padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape)}html[onsflag-iphonex-landscape] .bottom-bar{padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape);padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .tabbar{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape);padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape);width:calc(100% - 44px - 44px);width:calc(100% - var(--iphonex-safe-area-inset-left-landscape) - var(--iphonex-safe-area-inset-right-landscape))}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .fab--top__center,html[onsflag-iphonex-portrait] .fab--top__left,html[onsflag-iphonex-portrait] .fab--top__right{top:calc(44px + 20px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + 20px)}html[onsflag-iphonex-portrait] .fab--bottom__center,html[onsflag-iphonex-portrait] .fab--bottom__left,html[onsflag-iphonex-portrait] .fab--bottom__right{bottom:calc(34px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait))}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .fab--bottom__center,html[onsflag-iphonex-landscape] .fab--bottom__left,html[onsflag-iphonex-landscape] .fab--bottom__right{bottom:calc(21px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape))}html[onsflag-iphonex-landscape] .fab--bottom__left,html[onsflag-iphonex-landscape] .fab--top__left{left:calc(44px);left:calc(var(--iphonex-safe-area-inset-left-landscape))}html[onsflag-iphonex-landscape] .fab--bottom__right,html[onsflag-iphonex-landscape] .fab--top__right{right:calc(44px);right:calc(var(--iphonex-safe-area-inset-right-landscape))}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .action-sheet{bottom:calc(34px + 14px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + 14px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .action-sheet{left:calc((100vw - (100vh + 20px))/ 2);right:calc((100vw - (100vh + 20px))/ 2);bottom:calc(21px + 12px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + 12px)}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .toast{bottom:34px;bottom:var(--iphonex-safe-area-inset-bottom-portrait)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .toast{left:calc(44px + 8px);left:calc(var(--iphonex-safe-area-inset-left-landscape) + 8px);right:calc(44px + 8px);right:calc(var(--iphonex-safe-area-inset-right-landscape) + 8px);bottom:21px;bottom:var(--iphonex-safe-area-inset-bottom-landscape)}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .toolbar{top:0;box-sizing:content-box;padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait)}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar,html[onsflag-iphonex-portrait] .dialog .toolbar,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar{box-sizing:border-box;padding-top:0}html[onsflag-iphonex-portrait] .bottom-bar{bottom:0;box-sizing:content-box;padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}html[onsflag-iphonex-portrait] .dialog .bottom-bar,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .bottom-bar,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .bottom-bar{box-sizing:border-box;padding-bottom:0}html[onsflag-iphonex-portrait] .page__content{top:0;padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait);bottom:0;padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .page__content,/* if wrapped with a top tabbar */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .dialog .page__content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .page__content{padding-top:0}/* if wrapped with a bottom tabbar */ html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .dialog .page__content,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .page__content,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page__content{padding-bottom:0}html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content{top:calc(44px + 44px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height));padding-top:0}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content{top:var(--toolbar-height);padding-top:0}html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content{bottom:calc(34px + 44px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--toolbar-height));padding-bottom:0}html[onsflag-iphonex-portrait] .dialog .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar>.page__content{bottom:var(--toolbar-height);padding-bottom:0}html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:calc(44px + 44px);padding-top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height))}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page__content,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content{padding-top:44px;padding-top:var(--toolbar-height)}html[onsflag-iphonex-portrait] .tabbar--top{padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait)}html[onsflag-iphonex-portrait] .tabbar--top__content{top:calc(44px + 49px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--tabbar-height))}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .tabbar--top__content,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .tabbar--top__content,html[onsflag-iphonex-portrait] .dialog .tabbar--top__content{top:var(--tabbar-height)}html[onsflag-iphonex-portrait] .tabbar:not(.tabbar--top):not(.tabbar--top){padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content){bottom:calc(34px + 49px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--tabbar-height))}/* if wrapped with a page with a bottom-bar */ html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content),/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .tabbar__content:not(.tabbar--top__content),html[onsflag-iphonex-portrait] .dialog .tabbar__content:not(.tabbar--top__content){bottom:var(--tabbar-height)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .bottom-bar{bottom:0;box-sizing:content-box;padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}html[onsflag-iphonex-landscape] .dialog .bottom-bar,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .bottom-bar,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .bottom-bar{box-sizing:border-box;padding-bottom:0}html[onsflag-iphonex-landscape] .page__content{bottom:0;padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}/* if wrapped with a bottom tabbar */ html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .dialog .page__content,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .page__content,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page__content{padding-bottom:0}html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content{bottom:calc(21px + 44px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--toolbar-height));padding-bottom:0}html[onsflag-iphonex-landscape] .dialog .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar>.page__content{bottom:var(--toolbar-height);padding-bottom:0}html[onsflag-iphonex-landscape] .tabbar:not(.tabbar--top){padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content){bottom:calc(21px + 49px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--tabbar-height))}/* if wrapped with a page with a bottom-bar */ html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content),/* if wrapped with dialogs */ html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .tabbar__content:not(.tabbar--top__content),html[onsflag-iphonex-landscape] .dialog .tabbar__content:not(.tabbar--top__content){bottom:var(--tabbar-height)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset){margin-left:calc(-1 * 44px);margin-left:calc(-1 * var(--iphonex-safe-area-inset-left-landscape));margin-right:calc(-1 * 44px);margin-right:calc(-1 * var(--iphonex-safe-area-inset-right-landscape))}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-header{padding-left:calc(44px + 15px);padding-left:calc(var(--iphonex-safe-area-inset-left-landscape) + 15px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item{padding-left:calc(var(--iphonex-safe-area-inset-left-landscape) + 14px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:calc(44px + 16px);right:calc(var(--iphonex-safe-area-inset-right-landscape) + 16px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:calc(44px + 6px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 6px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:calc(44px + 12px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 12px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:calc(44px + 30px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 30px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset){margin-left:0;margin-right:0}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-header{padding-left:15px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item{padding-left:14px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:16px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:6px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:12px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:30px}} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/all.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/all.min.css new file mode 100644 index 0000000..e1cd156 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/all.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;font-display:auto;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:auto;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:auto;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/brands.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/brands.min.css new file mode 100644 index 0000000..94ee6ed --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/brands.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;font-display:auto;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/fontawesome.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/fontawesome.min.css new file mode 100644 index 0000000..13a472a --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/fontawesome.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/regular.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/regular.min.css new file mode 100644 index 0000000..57c1bb5 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/regular.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:auto;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/solid.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/solid.min.css new file mode 100644 index 0000000..579769c --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/solid.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:auto;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/svg-with-js.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/svg-with-js.min.css new file mode 100644 index 0000000..29c9bef --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/svg-with-js.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.svg-inline--fa,svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;transform:translate(-50%,-50%);transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;transform:scale(.25);transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;transform:scale(.25);transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;transform:scale(.25);transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;transform:scale(.25);transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;transform:scale(.25);transform-origin:top left}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/css/v4-shims.min.css b/Server/www/spiderbasic/onsenui-css/font_awesome/css/v4-shims.min.css new file mode 100644 index 0000000..e519a2d --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/css/v4-shims.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.8.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa.fa-glass:before{content:"\f000"}.fa.fa-meetup{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-star-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-o:before{content:"\f005"}.fa.fa-close:before,.fa.fa-remove:before{content:"\f00d"}.fa.fa-gear:before{content:"\f013"}.fa.fa-trash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-trash-o:before{content:"\f2ed"}.fa.fa-file-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-o:before{content:"\f15b"}.fa.fa-clock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-clock-o:before{content:"\f017"}.fa.fa-arrow-circle-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-down:before{content:"\f358"}.fa.fa-arrow-circle-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-up:before{content:"\f35b"}.fa.fa-play-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-play-circle-o:before{content:"\f144"}.fa.fa-repeat:before,.fa.fa-rotate-right:before{content:"\f01e"}.fa.fa-refresh:before{content:"\f021"}.fa.fa-list-alt{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dedent:before{content:"\f03b"}.fa.fa-video-camera:before{content:"\f03d"}.fa.fa-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-picture-o:before{content:"\f03e"}.fa.fa-photo{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-photo:before{content:"\f03e"}.fa.fa-image{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-image:before{content:"\f03e"}.fa.fa-pencil:before{content:"\f303"}.fa.fa-map-marker:before{content:"\f3c5"}.fa.fa-pencil-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pencil-square-o:before{content:"\f044"}.fa.fa-share-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-share-square-o:before{content:"\f14d"}.fa.fa-check-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-square-o:before{content:"\f14a"}.fa.fa-arrows:before{content:"\f0b2"}.fa.fa-times-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-circle-o:before{content:"\f057"}.fa.fa-check-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-check-circle-o:before{content:"\f058"}.fa.fa-mail-forward:before{content:"\f064"}.fa.fa-eye,.fa.fa-eye-slash{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-warning:before{content:"\f071"}.fa.fa-calendar:before{content:"\f073"}.fa.fa-arrows-v:before{content:"\f338"}.fa.fa-arrows-h:before{content:"\f337"}.fa.fa-bar-chart{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart:before{content:"\f080"}.fa.fa-bar-chart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bar-chart-o:before{content:"\f080"}.fa.fa-facebook-square,.fa.fa-twitter-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gears:before{content:"\f085"}.fa.fa-thumbs-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-up:before{content:"\f164"}.fa.fa-thumbs-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-thumbs-o-down:before{content:"\f165"}.fa.fa-heart-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-heart-o:before{content:"\f004"}.fa.fa-sign-out:before{content:"\f2f5"}.fa.fa-linkedin-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin-square:before{content:"\f08c"}.fa.fa-thumb-tack:before{content:"\f08d"}.fa.fa-external-link:before{content:"\f35d"}.fa.fa-sign-in:before{content:"\f2f6"}.fa.fa-github-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-lemon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lemon-o:before{content:"\f094"}.fa.fa-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-square-o:before{content:"\f0c8"}.fa.fa-bookmark-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bookmark-o:before{content:"\f02e"}.fa.fa-facebook,.fa.fa-twitter{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook:before{content:"\f39e"}.fa.fa-facebook-f{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-f:before{content:"\f39e"}.fa.fa-github{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-feed:before{content:"\f09e"}.fa.fa-hdd-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hdd-o:before{content:"\f0a0"}.fa.fa-hand-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-right:before{content:"\f0a4"}.fa.fa-hand-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-left:before{content:"\f0a5"}.fa.fa-hand-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-up:before{content:"\f0a6"}.fa.fa-hand-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-o-down:before{content:"\f0a7"}.fa.fa-arrows-alt:before{content:"\f31e"}.fa.fa-group:before{content:"\f0c0"}.fa.fa-chain:before{content:"\f0c1"}.fa.fa-scissors:before{content:"\f0c4"}.fa.fa-files-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-files-o:before{content:"\f0c5"}.fa.fa-floppy-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-floppy-o:before{content:"\f0c7"}.fa.fa-navicon:before,.fa.fa-reorder:before{content:"\f0c9"}.fa.fa-google-plus,.fa.fa-google-plus-square,.fa.fa-pinterest,.fa.fa-pinterest-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus:before{content:"\f0d5"}.fa.fa-money{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-money:before{content:"\f3d1"}.fa.fa-unsorted:before{content:"\f0dc"}.fa.fa-sort-desc:before{content:"\f0dd"}.fa.fa-sort-asc:before{content:"\f0de"}.fa.fa-linkedin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-linkedin:before{content:"\f0e1"}.fa.fa-rotate-left:before{content:"\f0e2"}.fa.fa-legal:before{content:"\f0e3"}.fa.fa-dashboard:before,.fa.fa-tachometer:before{content:"\f3fd"}.fa.fa-comment-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comment-o:before{content:"\f075"}.fa.fa-comments-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-comments-o:before{content:"\f086"}.fa.fa-flash:before{content:"\f0e7"}.fa.fa-clipboard,.fa.fa-paste{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paste:before{content:"\f328"}.fa.fa-lightbulb-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-lightbulb-o:before{content:"\f0eb"}.fa.fa-exchange:before{content:"\f362"}.fa.fa-cloud-download:before{content:"\f381"}.fa.fa-cloud-upload:before{content:"\f382"}.fa.fa-bell-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-o:before{content:"\f0f3"}.fa.fa-cutlery:before{content:"\f2e7"}.fa.fa-file-text-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-text-o:before{content:"\f15c"}.fa.fa-building-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-building-o:before{content:"\f1ad"}.fa.fa-hospital-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hospital-o:before{content:"\f0f8"}.fa.fa-tablet:before{content:"\f3fa"}.fa.fa-mobile-phone:before,.fa.fa-mobile:before{content:"\f3cd"}.fa.fa-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-o:before{content:"\f111"}.fa.fa-mail-reply:before{content:"\f3e5"}.fa.fa-github-alt{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-folder-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-o:before{content:"\f07b"}.fa.fa-folder-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-folder-open-o:before{content:"\f07c"}.fa.fa-smile-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-smile-o:before{content:"\f118"}.fa.fa-frown-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-frown-o:before{content:"\f119"}.fa.fa-meh-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-meh-o:before{content:"\f11a"}.fa.fa-keyboard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-keyboard-o:before{content:"\f11c"}.fa.fa-flag-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-flag-o:before{content:"\f024"}.fa.fa-mail-reply-all:before{content:"\f122"}.fa.fa-star-half-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-o:before{content:"\f089"}.fa.fa-star-half-empty{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-empty:before{content:"\f089"}.fa.fa-star-half-full{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-star-half-full:before{content:"\f089"}.fa.fa-code-fork:before{content:"\f126"}.fa.fa-chain-broken:before{content:"\f127"}.fa.fa-shield:before{content:"\f3ed"}.fa.fa-calendar-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-o:before{content:"\f133"}.fa.fa-css3,.fa.fa-html5,.fa.fa-maxcdn{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ticket:before{content:"\f3ff"}.fa.fa-minus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-minus-square-o:before{content:"\f146"}.fa.fa-level-up:before{content:"\f3bf"}.fa.fa-level-down:before{content:"\f3be"}.fa.fa-pencil-square:before{content:"\f14b"}.fa.fa-external-link-square:before{content:"\f360"}.fa.fa-compass{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-down:before{content:"\f150"}.fa.fa-toggle-down{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-down:before{content:"\f150"}.fa.fa-caret-square-o-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-up:before{content:"\f151"}.fa.fa-toggle-up{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-up:before{content:"\f151"}.fa.fa-caret-square-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-right:before{content:"\f152"}.fa.fa-toggle-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-right:before{content:"\f152"}.fa.fa-eur:before,.fa.fa-euro:before{content:"\f153"}.fa.fa-gbp:before{content:"\f154"}.fa.fa-dollar:before,.fa.fa-usd:before{content:"\f155"}.fa.fa-inr:before,.fa.fa-rupee:before{content:"\f156"}.fa.fa-cny:before,.fa.fa-jpy:before,.fa.fa-rmb:before,.fa.fa-yen:before{content:"\f157"}.fa.fa-rouble:before,.fa.fa-rub:before,.fa.fa-ruble:before{content:"\f158"}.fa.fa-krw:before,.fa.fa-won:before{content:"\f159"}.fa.fa-bitcoin,.fa.fa-btc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitcoin:before{content:"\f15a"}.fa.fa-file-text:before{content:"\f15c"}.fa.fa-sort-alpha-asc:before{content:"\f15d"}.fa.fa-sort-alpha-desc:before{content:"\f15e"}.fa.fa-sort-amount-asc:before{content:"\f160"}.fa.fa-sort-amount-desc:before{content:"\f161"}.fa.fa-sort-numeric-asc:before{content:"\f162"}.fa.fa-sort-numeric-desc:before{content:"\f163"}.fa.fa-xing,.fa.fa-xing-square,.fa.fa-youtube,.fa.fa-youtube-play,.fa.fa-youtube-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-youtube-play:before{content:"\f167"}.fa.fa-adn,.fa.fa-bitbucket,.fa.fa-bitbucket-square,.fa.fa-dropbox,.fa.fa-flickr,.fa.fa-instagram,.fa.fa-stack-overflow{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bitbucket-square:before{content:"\f171"}.fa.fa-tumblr,.fa.fa-tumblr-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-long-arrow-down:before{content:"\f309"}.fa.fa-long-arrow-up:before{content:"\f30c"}.fa.fa-long-arrow-left:before{content:"\f30a"}.fa.fa-long-arrow-right:before{content:"\f30b"}.fa.fa-android,.fa.fa-apple,.fa.fa-dribbble,.fa.fa-foursquare,.fa.fa-gittip,.fa.fa-gratipay,.fa.fa-linux,.fa.fa-skype,.fa.fa-trello,.fa.fa-windows{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-gittip:before{content:"\f184"}.fa.fa-sun-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sun-o:before{content:"\f185"}.fa.fa-moon-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-moon-o:before{content:"\f186"}.fa.fa-pagelines,.fa.fa-renren,.fa.fa-stack-exchange,.fa.fa-vk,.fa.fa-weibo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-arrow-circle-o-right{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-right:before{content:"\f35a"}.fa.fa-arrow-circle-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-arrow-circle-o-left:before{content:"\f359"}.fa.fa-caret-square-o-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-caret-square-o-left:before{content:"\f191"}.fa.fa-toggle-left{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-toggle-left:before{content:"\f191"}.fa.fa-dot-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-dot-circle-o:before{content:"\f192"}.fa.fa-vimeo-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-try:before,.fa.fa-turkish-lira:before{content:"\f195"}.fa.fa-plus-square-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-plus-square-o:before{content:"\f0fe"}.fa.fa-openid,.fa.fa-slack,.fa.fa-wordpress{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bank:before,.fa.fa-institution:before{content:"\f19c"}.fa.fa-mortar-board:before{content:"\f19d"}.fa.fa-delicious,.fa.fa-digg,.fa.fa-drupal,.fa.fa-google,.fa.fa-joomla,.fa.fa-pied-piper-alt,.fa.fa-pied-piper-pp,.fa.fa-reddit,.fa.fa-reddit-square,.fa.fa-stumbleupon,.fa.fa-stumbleupon-circle,.fa.fa-yahoo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-spoon:before{content:"\f2e5"}.fa.fa-behance,.fa.fa-behance-square,.fa.fa-steam,.fa.fa-steam-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-automobile:before{content:"\f1b9"}.fa.fa-cab:before{content:"\f1ba"}.fa.fa-envelope-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-o:before{content:"\f0e0"}.fa.fa-deviantart,.fa.fa-soundcloud{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-file-pdf-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-pdf-o:before{content:"\f1c1"}.fa.fa-file-word-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-word-o:before{content:"\f1c2"}.fa.fa-file-excel-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-excel-o:before{content:"\f1c3"}.fa.fa-file-powerpoint-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-powerpoint-o:before{content:"\f1c4"}.fa.fa-file-image-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-image-o:before{content:"\f1c5"}.fa.fa-file-photo-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-photo-o:before{content:"\f1c5"}.fa.fa-file-picture-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-picture-o:before{content:"\f1c5"}.fa.fa-file-archive-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-archive-o:before{content:"\f1c6"}.fa.fa-file-zip-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-zip-o:before{content:"\f1c6"}.fa.fa-file-audio-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-audio-o:before{content:"\f1c7"}.fa.fa-file-sound-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-sound-o:before{content:"\f1c7"}.fa.fa-file-video-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-video-o:before{content:"\f1c8"}.fa.fa-file-movie-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-movie-o:before{content:"\f1c8"}.fa.fa-file-code-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-file-code-o:before{content:"\f1c9"}.fa.fa-codepen,.fa.fa-jsfiddle,.fa.fa-vine{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-life-bouy,.fa.fa-life-ring{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-bouy:before{content:"\f1cd"}.fa.fa-life-buoy{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-buoy:before{content:"\f1cd"}.fa.fa-life-saver{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-life-saver:before{content:"\f1cd"}.fa.fa-support{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-support:before{content:"\f1cd"}.fa.fa-circle-o-notch:before{content:"\f1ce"}.fa.fa-ra,.fa.fa-rebel{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ra:before{content:"\f1d0"}.fa.fa-resistance{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-resistance:before{content:"\f1d0"}.fa.fa-empire,.fa.fa-ge{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-ge:before{content:"\f1d1"}.fa.fa-git,.fa.fa-git-square,.fa.fa-hacker-news,.fa.fa-y-combinator-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-y-combinator-square:before{content:"\f1d4"}.fa.fa-yc-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc-square:before{content:"\f1d4"}.fa.fa-qq,.fa.fa-tencent-weibo,.fa.fa-wechat,.fa.fa-weixin{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wechat:before{content:"\f1d7"}.fa.fa-send:before{content:"\f1d8"}.fa.fa-paper-plane-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-paper-plane-o:before{content:"\f1d8"}.fa.fa-send-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-send-o:before{content:"\f1d8"}.fa.fa-circle-thin{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-circle-thin:before{content:"\f111"}.fa.fa-header:before{content:"\f1dc"}.fa.fa-sliders:before{content:"\f1de"}.fa.fa-futbol-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-futbol-o:before{content:"\f1e3"}.fa.fa-soccer-ball-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-soccer-ball-o:before{content:"\f1e3"}.fa.fa-slideshare,.fa.fa-twitch,.fa.fa-yelp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-newspaper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-newspaper-o:before{content:"\f1ea"}.fa.fa-cc-amex,.fa.fa-cc-discover,.fa.fa-cc-mastercard,.fa.fa-cc-paypal,.fa.fa-cc-stripe,.fa.fa-cc-visa,.fa.fa-google-wallet,.fa.fa-paypal{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-bell-slash-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-bell-slash-o:before{content:"\f1f6"}.fa.fa-trash:before{content:"\f2ed"}.fa.fa-copyright{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-eyedropper:before{content:"\f1fb"}.fa.fa-area-chart:before{content:"\f1fe"}.fa.fa-pie-chart:before{content:"\f200"}.fa.fa-line-chart:before{content:"\f201"}.fa.fa-angellist,.fa.fa-ioxhost,.fa.fa-lastfm,.fa.fa-lastfm-square{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-cc{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-cc:before{content:"\f20a"}.fa.fa-ils:before,.fa.fa-shekel:before,.fa.fa-sheqel:before{content:"\f20b"}.fa.fa-meanpath{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-meanpath:before{content:"\f2b4"}.fa.fa-buysellads,.fa.fa-connectdevelop,.fa.fa-dashcube,.fa.fa-forumbee,.fa.fa-leanpub,.fa.fa-sellsy,.fa.fa-shirtsinbulk,.fa.fa-simplybuilt,.fa.fa-skyatlas{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-diamond{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-diamond:before{content:"\f3a5"}.fa.fa-intersex:before{content:"\f224"}.fa.fa-facebook-official{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-facebook-official:before{content:"\f09a"}.fa.fa-pinterest-p,.fa.fa-whatsapp{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-hotel:before{content:"\f236"}.fa.fa-medium,.fa.fa-viacoin,.fa.fa-y-combinator,.fa.fa-yc{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-yc:before{content:"\f23b"}.fa.fa-expeditedssl,.fa.fa-opencart,.fa.fa-optin-monster{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-battery-4:before,.fa.fa-battery:before{content:"\f240"}.fa.fa-battery-3:before{content:"\f241"}.fa.fa-battery-2:before{content:"\f242"}.fa.fa-battery-1:before{content:"\f243"}.fa.fa-battery-0:before{content:"\f244"}.fa.fa-object-group,.fa.fa-object-ungroup,.fa.fa-sticky-note-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-sticky-note-o:before{content:"\f249"}.fa.fa-cc-diners-club,.fa.fa-cc-jcb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-clone,.fa.fa-hourglass-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hourglass-o:before{content:"\f254"}.fa.fa-hourglass-1:before{content:"\f251"}.fa.fa-hourglass-2:before{content:"\f252"}.fa.fa-hourglass-3:before{content:"\f253"}.fa.fa-hand-rock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-rock-o:before{content:"\f255"}.fa.fa-hand-grab-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-grab-o:before{content:"\f255"}.fa.fa-hand-paper-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-paper-o:before{content:"\f256"}.fa.fa-hand-stop-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-stop-o:before{content:"\f256"}.fa.fa-hand-scissors-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-scissors-o:before{content:"\f257"}.fa.fa-hand-lizard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-lizard-o:before{content:"\f258"}.fa.fa-hand-spock-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-spock-o:before{content:"\f259"}.fa.fa-hand-pointer-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-pointer-o:before{content:"\f25a"}.fa.fa-hand-peace-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-hand-peace-o:before{content:"\f25b"}.fa.fa-registered{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-chrome,.fa.fa-creative-commons,.fa.fa-firefox,.fa.fa-get-pocket,.fa.fa-gg,.fa.fa-gg-circle,.fa.fa-internet-explorer,.fa.fa-odnoklassniki,.fa.fa-odnoklassniki-square,.fa.fa-opera,.fa.fa-safari,.fa.fa-tripadvisor,.fa.fa-wikipedia-w{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-television:before{content:"\f26c"}.fa.fa-500px,.fa.fa-amazon,.fa.fa-contao{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-calendar-plus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-plus-o:before{content:"\f271"}.fa.fa-calendar-minus-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-minus-o:before{content:"\f272"}.fa.fa-calendar-times-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-times-o:before{content:"\f273"}.fa.fa-calendar-check-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-calendar-check-o:before{content:"\f274"}.fa.fa-map-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-map-o:before{content:"\f279"}.fa.fa-commenting:before{content:"\f4ad"}.fa.fa-commenting-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-commenting-o:before{content:"\f4ad"}.fa.fa-houzz,.fa.fa-vimeo{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-vimeo:before{content:"\f27d"}.fa.fa-black-tie,.fa.fa-edge,.fa.fa-fonticons,.fa.fa-reddit-alien{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-credit-card-alt:before{content:"\f09d"}.fa.fa-codiepie,.fa.fa-fort-awesome,.fa.fa-mixcloud,.fa.fa-modx,.fa.fa-product-hunt,.fa.fa-scribd,.fa.fa-usb{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-pause-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-pause-circle-o:before{content:"\f28b"}.fa.fa-stop-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-stop-circle-o:before{content:"\f28d"}.fa.fa-bluetooth,.fa.fa-bluetooth-b,.fa.fa-envira,.fa.fa-gitlab,.fa.fa-wheelchair-alt,.fa.fa-wpbeginner,.fa.fa-wpforms{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-wheelchair-alt:before{content:"\f368"}.fa.fa-question-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-question-circle-o:before{content:"\f059"}.fa.fa-volume-control-phone:before{content:"\f2a0"}.fa.fa-asl-interpreting:before{content:"\f2a3"}.fa.fa-deafness:before,.fa.fa-hard-of-hearing:before{content:"\f2a4"}.fa.fa-glide,.fa.fa-glide-g{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-signing:before{content:"\f2a7"}.fa.fa-first-order,.fa.fa-google-plus-official,.fa.fa-pied-piper,.fa.fa-snapchat,.fa.fa-snapchat-ghost,.fa.fa-snapchat-square,.fa.fa-themeisle,.fa.fa-viadeo,.fa.fa-viadeo-square,.fa.fa-yoast{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-official:before{content:"\f2b3"}.fa.fa-google-plus-circle{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-google-plus-circle:before{content:"\f2b3"}.fa.fa-fa,.fa.fa-font-awesome{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-fa:before{content:"\f2b4"}.fa.fa-handshake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-handshake-o:before{content:"\f2b5"}.fa.fa-envelope-open-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-envelope-open-o:before{content:"\f2b6"}.fa.fa-linode{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-address-book-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-book-o:before{content:"\f2b9"}.fa.fa-vcard:before{content:"\f2bb"}.fa.fa-address-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-address-card-o:before{content:"\f2bb"}.fa.fa-vcard-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-vcard-o:before{content:"\f2bb"}.fa.fa-user-circle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-circle-o:before{content:"\f2bd"}.fa.fa-user-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-user-o:before{content:"\f007"}.fa.fa-id-badge{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license:before{content:"\f2c2"}.fa.fa-id-card-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-id-card-o:before{content:"\f2c2"}.fa.fa-drivers-license-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-drivers-license-o:before{content:"\f2c2"}.fa.fa-free-code-camp,.fa.fa-quora,.fa.fa-telegram{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-thermometer-4:before,.fa.fa-thermometer:before{content:"\f2c7"}.fa.fa-thermometer-3:before{content:"\f2c8"}.fa.fa-thermometer-2:before{content:"\f2c9"}.fa.fa-thermometer-1:before{content:"\f2ca"}.fa.fa-thermometer-0:before{content:"\f2cb"}.fa.fa-bathtub:before,.fa.fa-s15:before{content:"\f2cd"}.fa.fa-window-maximize,.fa.fa-window-restore{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle:before{content:"\f410"}.fa.fa-window-close-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-window-close-o:before{content:"\f410"}.fa.fa-times-rectangle-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-times-rectangle-o:before{content:"\f410"}.fa.fa-bandcamp,.fa.fa-eercast,.fa.fa-etsy,.fa.fa-grav,.fa.fa-imdb,.fa.fa-ravelry{font-family:"Font Awesome 5 Brands";font-weight:400}.fa.fa-eercast:before{content:"\f2da"}.fa.fa-snowflake-o{font-family:"Font Awesome 5 Free";font-weight:400}.fa.fa-snowflake-o:before{content:"\f2dc"}.fa.fa-spotify,.fa.fa-superpowers,.fa.fa-wpexplorer{font-family:"Font Awesome 5 Brands";font-weight:400} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.eot b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.eot new file mode 100644 index 0000000..02a5ecb Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.eot differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.svg b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.svg new file mode 100644 index 0000000..1b168ee --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.svg @@ -0,0 +1,3459 @@ + + + + + +Created by FontForge 20190112 at Thu Mar 21 16:19:01 2019 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.ttf b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.ttf new file mode 100644 index 0000000..3926cb1 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.ttf differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.woff b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.woff new file mode 100644 index 0000000..7bcc97e Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.woff differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.woff2 b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.woff2 new file mode 100644 index 0000000..2abc94a Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-brands-400.woff2 differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.eot b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.eot new file mode 100644 index 0000000..7b7a1d7 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.eot differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.svg b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.svg new file mode 100644 index 0000000..80cf2b2 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.svg @@ -0,0 +1,803 @@ + + + + + +Created by FontForge 20190112 at Thu Mar 21 16:19:01 2019 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.ttf b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.ttf new file mode 100644 index 0000000..17b86c2 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.ttf differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.woff b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.woff new file mode 100644 index 0000000..822243e Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.woff differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.woff2 b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.woff2 new file mode 100644 index 0000000..c446ff7 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-regular-400.woff2 differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.eot b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.eot new file mode 100644 index 0000000..dfc8921 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.eot differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.svg b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.svg new file mode 100644 index 0000000..132373b --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.svg @@ -0,0 +1,4527 @@ + + + + + +Created by FontForge 20190112 at Thu Mar 21 16:19:01 2019 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.ttf b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.ttf new file mode 100644 index 0000000..97ae69b Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.ttf differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.woff b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.woff new file mode 100644 index 0000000..86d9b32 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.woff differ diff --git a/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.woff2 b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.woff2 new file mode 100644 index 0000000..67f67dc Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/font_awesome/webfonts/fa-solid-900.woff2 differ diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/css/ionicons-core.min.css b/Server/www/spiderbasic/onsenui-css/ionicons/css/ionicons-core.min.css new file mode 100644 index 0000000..2b4311f --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/ionicons/css/ionicons-core.min.css @@ -0,0 +1,11 @@ +/*! + Ionicons, v4.5.5 + Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ + https://twitter.com/benjsperry https://twitter.com/ionicframework + MIT License: https://github.com/driftyco/ionicons + + Android-style icons originally built by Google’s + Material Design Icons: https://github.com/google/material-design-icons + used under CC BY http://creativecommons.org/licenses/by/4.0/ + Modified icons to fit ionicon’s grid from original. +*/.ion-ios-add:before{content:"\f102"}.ion-ios-add-circle:before{content:"\f101"}.ion-ios-add-circle-outline:before{content:"\f100"}.ion-ios-airplane:before{content:"\f137"}.ion-ios-alarm:before{content:"\f3c8"}.ion-ios-albums:before{content:"\f3ca"}.ion-ios-alert:before{content:"\f104"}.ion-ios-american-football:before{content:"\f106"}.ion-ios-analytics:before{content:"\f3ce"}.ion-ios-aperture:before{content:"\f108"}.ion-ios-apps:before{content:"\f10a"}.ion-ios-appstore:before{content:"\f10c"}.ion-ios-archive:before{content:"\f10e"}.ion-ios-arrow-back:before{content:"\f3cf"}.ion-ios-arrow-down:before{content:"\f3d0"}.ion-ios-arrow-dropdown:before{content:"\f110"}.ion-ios-arrow-dropdown-circle:before{content:"\f125"}.ion-ios-arrow-dropleft:before{content:"\f112"}.ion-ios-arrow-dropleft-circle:before{content:"\f129"}.ion-ios-arrow-dropright:before{content:"\f114"}.ion-ios-arrow-dropright-circle:before{content:"\f12b"}.ion-ios-arrow-dropup:before{content:"\f116"}.ion-ios-arrow-dropup-circle:before{content:"\f12d"}.ion-ios-arrow-forward:before{content:"\f3d1"}.ion-ios-arrow-round-back:before{content:"\f117"}.ion-ios-arrow-round-down:before{content:"\f118"}.ion-ios-arrow-round-forward:before{content:"\f119"}.ion-ios-arrow-round-up:before{content:"\f11a"}.ion-ios-arrow-up:before{content:"\f3d8"}.ion-ios-at:before{content:"\f3da"}.ion-ios-attach:before{content:"\f11b"}.ion-ios-backspace:before{content:"\f11d"}.ion-ios-barcode:before{content:"\f3dc"}.ion-ios-baseball:before{content:"\f3de"}.ion-ios-basket:before{content:"\f11f"}.ion-ios-basketball:before{content:"\f3e0"}.ion-ios-battery-charging:before{content:"\f120"}.ion-ios-battery-dead:before{content:"\f121"}.ion-ios-battery-full:before{content:"\f122"}.ion-ios-beaker:before{content:"\f124"}.ion-ios-bed:before{content:"\f139"}.ion-ios-beer:before{content:"\f126"}.ion-ios-bicycle:before{content:"\f127"}.ion-ios-bluetooth:before{content:"\f128"}.ion-ios-boat:before{content:"\f12a"}.ion-ios-body:before{content:"\f3e4"}.ion-ios-bonfire:before{content:"\f12c"}.ion-ios-book:before{content:"\f3e8"}.ion-ios-bookmark:before{content:"\f12e"}.ion-ios-bookmarks:before{content:"\f3ea"}.ion-ios-bowtie:before{content:"\f130"}.ion-ios-briefcase:before{content:"\f3ee"}.ion-ios-browsers:before{content:"\f3f0"}.ion-ios-brush:before{content:"\f132"}.ion-ios-bug:before{content:"\f134"}.ion-ios-build:before{content:"\f136"}.ion-ios-bulb:before{content:"\f138"}.ion-ios-bus:before{content:"\f13a"}.ion-ios-business:before{content:"\f1a3"}.ion-ios-cafe:before{content:"\f13c"}.ion-ios-calculator:before{content:"\f3f2"}.ion-ios-calendar:before{content:"\f3f4"}.ion-ios-call:before{content:"\f13e"}.ion-ios-camera:before{content:"\f3f6"}.ion-ios-car:before{content:"\f140"}.ion-ios-card:before{content:"\f142"}.ion-ios-cart:before{content:"\f3f8"}.ion-ios-cash:before{content:"\f144"}.ion-ios-cellular:before{content:"\f13d"}.ion-ios-chatboxes:before{content:"\f3fa"}.ion-ios-chatbubbles:before{content:"\f146"}.ion-ios-checkbox:before{content:"\f148"}.ion-ios-checkbox-outline:before{content:"\f147"}.ion-ios-checkmark:before{content:"\f3ff"}.ion-ios-checkmark-circle:before{content:"\f14a"}.ion-ios-checkmark-circle-outline:before{content:"\f149"}.ion-ios-clipboard:before{content:"\f14c"}.ion-ios-clock:before{content:"\f403"}.ion-ios-close:before{content:"\f406"}.ion-ios-close-circle:before{content:"\f14e"}.ion-ios-close-circle-outline:before{content:"\f14d"}.ion-ios-cloud:before{content:"\f40c"}.ion-ios-cloud-circle:before{content:"\f152"}.ion-ios-cloud-done:before{content:"\f154"}.ion-ios-cloud-download:before{content:"\f408"}.ion-ios-cloud-outline:before{content:"\f409"}.ion-ios-cloud-upload:before{content:"\f40b"}.ion-ios-cloudy:before{content:"\f410"}.ion-ios-cloudy-night:before{content:"\f40e"}.ion-ios-code:before{content:"\f157"}.ion-ios-code-download:before{content:"\f155"}.ion-ios-code-working:before{content:"\f156"}.ion-ios-cog:before{content:"\f412"}.ion-ios-color-fill:before{content:"\f159"}.ion-ios-color-filter:before{content:"\f414"}.ion-ios-color-palette:before{content:"\f15b"}.ion-ios-color-wand:before{content:"\f416"}.ion-ios-compass:before{content:"\f15d"}.ion-ios-construct:before{content:"\f15f"}.ion-ios-contact:before{content:"\f41a"}.ion-ios-contacts:before{content:"\f161"}.ion-ios-contract:before{content:"\f162"}.ion-ios-contrast:before{content:"\f163"}.ion-ios-copy:before{content:"\f41c"}.ion-ios-create:before{content:"\f165"}.ion-ios-crop:before{content:"\f41e"}.ion-ios-cube:before{content:"\f168"}.ion-ios-cut:before{content:"\f16a"}.ion-ios-desktop:before{content:"\f16c"}.ion-ios-disc:before{content:"\f16e"}.ion-ios-document:before{content:"\f170"}.ion-ios-done-all:before{content:"\f171"}.ion-ios-download:before{content:"\f420"}.ion-ios-easel:before{content:"\f173"}.ion-ios-egg:before{content:"\f175"}.ion-ios-exit:before{content:"\f177"}.ion-ios-expand:before{content:"\f178"}.ion-ios-eye:before{content:"\f425"}.ion-ios-eye-off:before{content:"\f17a"}.ion-ios-fastforward:before{content:"\f427"}.ion-ios-female:before{content:"\f17b"}.ion-ios-filing:before{content:"\f429"}.ion-ios-film:before{content:"\f42b"}.ion-ios-finger-print:before{content:"\f17c"}.ion-ios-fitness:before{content:"\f1ab"}.ion-ios-flag:before{content:"\f42d"}.ion-ios-flame:before{content:"\f42f"}.ion-ios-flash:before{content:"\f17e"}.ion-ios-flash-off:before{content:"\f12f"}.ion-ios-flashlight:before{content:"\f141"}.ion-ios-flask:before{content:"\f431"}.ion-ios-flower:before{content:"\f433"}.ion-ios-folder:before{content:"\f435"}.ion-ios-folder-open:before{content:"\f180"}.ion-ios-football:before{content:"\f437"}.ion-ios-funnel:before{content:"\f182"}.ion-ios-gift:before{content:"\f191"}.ion-ios-git-branch:before{content:"\f183"}.ion-ios-git-commit:before{content:"\f184"}.ion-ios-git-compare:before{content:"\f185"}.ion-ios-git-merge:before{content:"\f186"}.ion-ios-git-network:before{content:"\f187"}.ion-ios-git-pull-request:before{content:"\f188"}.ion-ios-glasses:before{content:"\f43f"}.ion-ios-globe:before{content:"\f18a"}.ion-ios-grid:before{content:"\f18c"}.ion-ios-hammer:before{content:"\f18e"}.ion-ios-hand:before{content:"\f190"}.ion-ios-happy:before{content:"\f192"}.ion-ios-headset:before{content:"\f194"}.ion-ios-heart:before{content:"\f443"}.ion-ios-heart-dislike:before{content:"\f13f"}.ion-ios-heart-empty:before{content:"\f19b"}.ion-ios-heart-half:before{content:"\f19d"}.ion-ios-help:before{content:"\f446"}.ion-ios-help-buoy:before{content:"\f196"}.ion-ios-help-circle:before{content:"\f198"}.ion-ios-help-circle-outline:before{content:"\f197"}.ion-ios-home:before{content:"\f448"}.ion-ios-hourglass:before{content:"\f103"}.ion-ios-ice-cream:before{content:"\f19a"}.ion-ios-image:before{content:"\f19c"}.ion-ios-images:before{content:"\f19e"}.ion-ios-infinite:before{content:"\f44a"}.ion-ios-information:before{content:"\f44d"}.ion-ios-information-circle:before{content:"\f1a0"}.ion-ios-information-circle-outline:before{content:"\f19f"}.ion-ios-jet:before{content:"\f1a5"}.ion-ios-journal:before{content:"\f189"}.ion-ios-key:before{content:"\f1a7"}.ion-ios-keypad:before{content:"\f450"}.ion-ios-laptop:before{content:"\f1a8"}.ion-ios-leaf:before{content:"\f1aa"}.ion-ios-link:before{content:"\f22a"}.ion-ios-list:before{content:"\f454"}.ion-ios-list-box:before{content:"\f143"}.ion-ios-locate:before{content:"\f1ae"}.ion-ios-lock:before{content:"\f1b0"}.ion-ios-log-in:before{content:"\f1b1"}.ion-ios-log-out:before{content:"\f1b2"}.ion-ios-magnet:before{content:"\f1b4"}.ion-ios-mail:before{content:"\f1b8"}.ion-ios-mail-open:before{content:"\f1b6"}.ion-ios-mail-unread:before{content:"\f145"}.ion-ios-male:before{content:"\f1b9"}.ion-ios-man:before{content:"\f1bb"}.ion-ios-map:before{content:"\f1bd"}.ion-ios-medal:before{content:"\f1bf"}.ion-ios-medical:before{content:"\f45c"}.ion-ios-medkit:before{content:"\f45e"}.ion-ios-megaphone:before{content:"\f1c1"}.ion-ios-menu:before{content:"\f1c3"}.ion-ios-mic:before{content:"\f461"}.ion-ios-mic-off:before{content:"\f45f"}.ion-ios-microphone:before{content:"\f1c6"}.ion-ios-moon:before{content:"\f468"}.ion-ios-more:before{content:"\f1c8"}.ion-ios-move:before{content:"\f1cb"}.ion-ios-musical-note:before{content:"\f46b"}.ion-ios-musical-notes:before{content:"\f46c"}.ion-ios-navigate:before{content:"\f46e"}.ion-ios-notifications:before{content:"\f1d3"}.ion-ios-notifications-off:before{content:"\f1d1"}.ion-ios-notifications-outline:before{content:"\f133"}.ion-ios-nuclear:before{content:"\f1d5"}.ion-ios-nutrition:before{content:"\f470"}.ion-ios-open:before{content:"\f1d7"}.ion-ios-options:before{content:"\f1d9"}.ion-ios-outlet:before{content:"\f1db"}.ion-ios-paper:before{content:"\f472"}.ion-ios-paper-plane:before{content:"\f1dd"}.ion-ios-partly-sunny:before{content:"\f1df"}.ion-ios-pause:before{content:"\f478"}.ion-ios-paw:before{content:"\f47a"}.ion-ios-people:before{content:"\f47c"}.ion-ios-person:before{content:"\f47e"}.ion-ios-person-add:before{content:"\f1e1"}.ion-ios-phone-landscape:before{content:"\f1e2"}.ion-ios-phone-portrait:before{content:"\f1e3"}.ion-ios-photos:before{content:"\f482"}.ion-ios-pie:before{content:"\f484"}.ion-ios-pin:before{content:"\f1e5"}.ion-ios-pint:before{content:"\f486"}.ion-ios-pizza:before{content:"\f1e7"}.ion-ios-planet:before{content:"\f1eb"}.ion-ios-play:before{content:"\f488"}.ion-ios-play-circle:before{content:"\f113"}.ion-ios-podium:before{content:"\f1ed"}.ion-ios-power:before{content:"\f1ef"}.ion-ios-pricetag:before{content:"\f48d"}.ion-ios-pricetags:before{content:"\f48f"}.ion-ios-print:before{content:"\f1f1"}.ion-ios-pulse:before{content:"\f493"}.ion-ios-qr-scanner:before{content:"\f1f3"}.ion-ios-quote:before{content:"\f1f5"}.ion-ios-radio:before{content:"\f1f9"}.ion-ios-radio-button-off:before{content:"\f1f6"}.ion-ios-radio-button-on:before{content:"\f1f7"}.ion-ios-rainy:before{content:"\f495"}.ion-ios-recording:before{content:"\f497"}.ion-ios-redo:before{content:"\f499"}.ion-ios-refresh:before{content:"\f49c"}.ion-ios-refresh-circle:before{content:"\f135"}.ion-ios-remove:before{content:"\f1fc"}.ion-ios-remove-circle:before{content:"\f1fb"}.ion-ios-remove-circle-outline:before{content:"\f1fa"}.ion-ios-reorder:before{content:"\f1fd"}.ion-ios-repeat:before{content:"\f1fe"}.ion-ios-resize:before{content:"\f1ff"}.ion-ios-restaurant:before{content:"\f201"}.ion-ios-return-left:before{content:"\f202"}.ion-ios-return-right:before{content:"\f203"}.ion-ios-reverse-camera:before{content:"\f49f"}.ion-ios-rewind:before{content:"\f4a1"}.ion-ios-ribbon:before{content:"\f205"}.ion-ios-rocket:before{content:"\f14b"}.ion-ios-rose:before{content:"\f4a3"}.ion-ios-sad:before{content:"\f207"}.ion-ios-save:before{content:"\f1a6"}.ion-ios-school:before{content:"\f209"}.ion-ios-search:before{content:"\f4a5"}.ion-ios-send:before{content:"\f20c"}.ion-ios-settings:before{content:"\f4a7"}.ion-ios-share:before{content:"\f211"}.ion-ios-share-alt:before{content:"\f20f"}.ion-ios-shirt:before{content:"\f213"}.ion-ios-shuffle:before{content:"\f4a9"}.ion-ios-skip-backward:before{content:"\f215"}.ion-ios-skip-forward:before{content:"\f217"}.ion-ios-snow:before{content:"\f218"}.ion-ios-speedometer:before{content:"\f4b0"}.ion-ios-square:before{content:"\f21a"}.ion-ios-square-outline:before{content:"\f15c"}.ion-ios-star:before{content:"\f4b3"}.ion-ios-star-half:before{content:"\f4b1"}.ion-ios-star-outline:before{content:"\f4b2"}.ion-ios-stats:before{content:"\f21c"}.ion-ios-stopwatch:before{content:"\f4b5"}.ion-ios-subway:before{content:"\f21e"}.ion-ios-sunny:before{content:"\f4b7"}.ion-ios-swap:before{content:"\f21f"}.ion-ios-switch:before{content:"\f221"}.ion-ios-sync:before{content:"\f222"}.ion-ios-tablet-landscape:before{content:"\f223"}.ion-ios-tablet-portrait:before{content:"\f24e"}.ion-ios-tennisball:before{content:"\f4bb"}.ion-ios-text:before{content:"\f250"}.ion-ios-thermometer:before{content:"\f252"}.ion-ios-thumbs-down:before{content:"\f254"}.ion-ios-thumbs-up:before{content:"\f256"}.ion-ios-thunderstorm:before{content:"\f4bd"}.ion-ios-time:before{content:"\f4bf"}.ion-ios-timer:before{content:"\f4c1"}.ion-ios-today:before{content:"\f14f"}.ion-ios-train:before{content:"\f258"}.ion-ios-transgender:before{content:"\f259"}.ion-ios-trash:before{content:"\f4c5"}.ion-ios-trending-down:before{content:"\f25a"}.ion-ios-trending-up:before{content:"\f25b"}.ion-ios-trophy:before{content:"\f25d"}.ion-ios-tv:before{content:"\f115"}.ion-ios-umbrella:before{content:"\f25f"}.ion-ios-undo:before{content:"\f4c7"}.ion-ios-unlock:before{content:"\f261"}.ion-ios-videocam:before{content:"\f4cd"}.ion-ios-volume-high:before{content:"\f11c"}.ion-ios-volume-low:before{content:"\f11e"}.ion-ios-volume-mute:before{content:"\f263"}.ion-ios-volume-off:before{content:"\f264"}.ion-ios-walk:before{content:"\f266"}.ion-ios-wallet:before{content:"\f18b"}.ion-ios-warning:before{content:"\f268"}.ion-ios-watch:before{content:"\f269"}.ion-ios-water:before{content:"\f26b"}.ion-ios-wifi:before{content:"\f26d"}.ion-ios-wine:before{content:"\f26f"}.ion-ios-woman:before{content:"\f271"}.ion-logo-android:before{content:"\f225"}.ion-logo-angular:before{content:"\f227"}.ion-logo-apple:before{content:"\f229"}.ion-logo-bitbucket:before{content:"\f193"}.ion-logo-bitcoin:before{content:"\f22b"}.ion-logo-buffer:before{content:"\f22d"}.ion-logo-chrome:before{content:"\f22f"}.ion-logo-closed-captioning:before{content:"\f105"}.ion-logo-codepen:before{content:"\f230"}.ion-logo-css3:before{content:"\f231"}.ion-logo-designernews:before{content:"\f232"}.ion-logo-dribbble:before{content:"\f233"}.ion-logo-dropbox:before{content:"\f234"}.ion-logo-euro:before{content:"\f235"}.ion-logo-facebook:before{content:"\f236"}.ion-logo-flickr:before{content:"\f107"}.ion-logo-foursquare:before{content:"\f237"}.ion-logo-freebsd-devil:before{content:"\f238"}.ion-logo-game-controller-a:before{content:"\f13b"}.ion-logo-game-controller-b:before{content:"\f181"}.ion-logo-github:before{content:"\f239"}.ion-logo-google:before{content:"\f23a"}.ion-logo-googleplus:before{content:"\f23b"}.ion-logo-hackernews:before{content:"\f23c"}.ion-logo-html5:before{content:"\f23d"}.ion-logo-instagram:before{content:"\f23e"}.ion-logo-ionic:before{content:"\f150"}.ion-logo-ionitron:before{content:"\f151"}.ion-logo-javascript:before{content:"\f23f"}.ion-logo-linkedin:before{content:"\f240"}.ion-logo-markdown:before{content:"\f241"}.ion-logo-model-s:before{content:"\f153"}.ion-logo-no-smoking:before{content:"\f109"}.ion-logo-nodejs:before{content:"\f242"}.ion-logo-npm:before{content:"\f195"}.ion-logo-octocat:before{content:"\f243"}.ion-logo-pinterest:before{content:"\f244"}.ion-logo-playstation:before{content:"\f245"}.ion-logo-polymer:before{content:"\f15e"}.ion-logo-python:before{content:"\f246"}.ion-logo-reddit:before{content:"\f247"}.ion-logo-rss:before{content:"\f248"}.ion-logo-sass:before{content:"\f249"}.ion-logo-skype:before{content:"\f24a"}.ion-logo-slack:before{content:"\f10b"}.ion-logo-snapchat:before{content:"\f24b"}.ion-logo-steam:before{content:"\f24c"}.ion-logo-tumblr:before{content:"\f24d"}.ion-logo-tux:before{content:"\f2ae"}.ion-logo-twitch:before{content:"\f2af"}.ion-logo-twitter:before{content:"\f2b0"}.ion-logo-usd:before{content:"\f2b1"}.ion-logo-vimeo:before{content:"\f2c4"}.ion-logo-vk:before{content:"\f10d"}.ion-logo-whatsapp:before{content:"\f2c5"}.ion-logo-windows:before{content:"\f32f"}.ion-logo-wordpress:before{content:"\f330"}.ion-logo-xbox:before{content:"\f34c"}.ion-logo-xing:before{content:"\f10f"}.ion-logo-yahoo:before{content:"\f34d"}.ion-logo-yen:before{content:"\f34e"}.ion-logo-youtube:before{content:"\f34f"}.ion-md-add:before{content:"\f273"}.ion-md-add-circle:before{content:"\f272"}.ion-md-add-circle-outline:before{content:"\f158"}.ion-md-airplane:before{content:"\f15a"}.ion-md-alarm:before{content:"\f274"}.ion-md-albums:before{content:"\f275"}.ion-md-alert:before{content:"\f276"}.ion-md-american-football:before{content:"\f277"}.ion-md-analytics:before{content:"\f278"}.ion-md-aperture:before{content:"\f279"}.ion-md-apps:before{content:"\f27a"}.ion-md-appstore:before{content:"\f27b"}.ion-md-archive:before{content:"\f27c"}.ion-md-arrow-back:before{content:"\f27d"}.ion-md-arrow-down:before{content:"\f27e"}.ion-md-arrow-dropdown:before{content:"\f280"}.ion-md-arrow-dropdown-circle:before{content:"\f27f"}.ion-md-arrow-dropleft:before{content:"\f282"}.ion-md-arrow-dropleft-circle:before{content:"\f281"}.ion-md-arrow-dropright:before{content:"\f284"}.ion-md-arrow-dropright-circle:before{content:"\f283"}.ion-md-arrow-dropup:before{content:"\f286"}.ion-md-arrow-dropup-circle:before{content:"\f285"}.ion-md-arrow-forward:before{content:"\f287"}.ion-md-arrow-round-back:before{content:"\f288"}.ion-md-arrow-round-down:before{content:"\f289"}.ion-md-arrow-round-forward:before{content:"\f28a"}.ion-md-arrow-round-up:before{content:"\f28b"}.ion-md-arrow-up:before{content:"\f28c"}.ion-md-at:before{content:"\f28d"}.ion-md-attach:before{content:"\f28e"}.ion-md-backspace:before{content:"\f28f"}.ion-md-barcode:before{content:"\f290"}.ion-md-baseball:before{content:"\f291"}.ion-md-basket:before{content:"\f292"}.ion-md-basketball:before{content:"\f293"}.ion-md-battery-charging:before{content:"\f294"}.ion-md-battery-dead:before{content:"\f295"}.ion-md-battery-full:before{content:"\f296"}.ion-md-beaker:before{content:"\f297"}.ion-md-bed:before{content:"\f160"}.ion-md-beer:before{content:"\f298"}.ion-md-bicycle:before{content:"\f299"}.ion-md-bluetooth:before{content:"\f29a"}.ion-md-boat:before{content:"\f29b"}.ion-md-body:before{content:"\f29c"}.ion-md-bonfire:before{content:"\f29d"}.ion-md-book:before{content:"\f29e"}.ion-md-bookmark:before{content:"\f29f"}.ion-md-bookmarks:before{content:"\f2a0"}.ion-md-bowtie:before{content:"\f2a1"}.ion-md-briefcase:before{content:"\f2a2"}.ion-md-browsers:before{content:"\f2a3"}.ion-md-brush:before{content:"\f2a4"}.ion-md-bug:before{content:"\f2a5"}.ion-md-build:before{content:"\f2a6"}.ion-md-bulb:before{content:"\f2a7"}.ion-md-bus:before{content:"\f2a8"}.ion-md-business:before{content:"\f1a4"}.ion-md-cafe:before{content:"\f2a9"}.ion-md-calculator:before{content:"\f2aa"}.ion-md-calendar:before{content:"\f2ab"}.ion-md-call:before{content:"\f2ac"}.ion-md-camera:before{content:"\f2ad"}.ion-md-car:before{content:"\f2b2"}.ion-md-card:before{content:"\f2b3"}.ion-md-cart:before{content:"\f2b4"}.ion-md-cash:before{content:"\f2b5"}.ion-md-cellular:before{content:"\f164"}.ion-md-chatboxes:before{content:"\f2b6"}.ion-md-chatbubbles:before{content:"\f2b7"}.ion-md-checkbox:before{content:"\f2b9"}.ion-md-checkbox-outline:before{content:"\f2b8"}.ion-md-checkmark:before{content:"\f2bc"}.ion-md-checkmark-circle:before{content:"\f2bb"}.ion-md-checkmark-circle-outline:before{content:"\f2ba"}.ion-md-clipboard:before{content:"\f2bd"}.ion-md-clock:before{content:"\f2be"}.ion-md-close:before{content:"\f2c0"}.ion-md-close-circle:before{content:"\f2bf"}.ion-md-close-circle-outline:before{content:"\f166"}.ion-md-cloud:before{content:"\f2c9"}.ion-md-cloud-circle:before{content:"\f2c2"}.ion-md-cloud-done:before{content:"\f2c3"}.ion-md-cloud-download:before{content:"\f2c6"}.ion-md-cloud-outline:before{content:"\f2c7"}.ion-md-cloud-upload:before{content:"\f2c8"}.ion-md-cloudy:before{content:"\f2cb"}.ion-md-cloudy-night:before{content:"\f2ca"}.ion-md-code:before{content:"\f2ce"}.ion-md-code-download:before{content:"\f2cc"}.ion-md-code-working:before{content:"\f2cd"}.ion-md-cog:before{content:"\f2cf"}.ion-md-color-fill:before{content:"\f2d0"}.ion-md-color-filter:before{content:"\f2d1"}.ion-md-color-palette:before{content:"\f2d2"}.ion-md-color-wand:before{content:"\f2d3"}.ion-md-compass:before{content:"\f2d4"}.ion-md-construct:before{content:"\f2d5"}.ion-md-contact:before{content:"\f2d6"}.ion-md-contacts:before{content:"\f2d7"}.ion-md-contract:before{content:"\f2d8"}.ion-md-contrast:before{content:"\f2d9"}.ion-md-copy:before{content:"\f2da"}.ion-md-create:before{content:"\f2db"}.ion-md-crop:before{content:"\f2dc"}.ion-md-cube:before{content:"\f2dd"}.ion-md-cut:before{content:"\f2de"}.ion-md-desktop:before{content:"\f2df"}.ion-md-disc:before{content:"\f2e0"}.ion-md-document:before{content:"\f2e1"}.ion-md-done-all:before{content:"\f2e2"}.ion-md-download:before{content:"\f2e3"}.ion-md-easel:before{content:"\f2e4"}.ion-md-egg:before{content:"\f2e5"}.ion-md-exit:before{content:"\f2e6"}.ion-md-expand:before{content:"\f2e7"}.ion-md-eye:before{content:"\f2e9"}.ion-md-eye-off:before{content:"\f2e8"}.ion-md-fastforward:before{content:"\f2ea"}.ion-md-female:before{content:"\f2eb"}.ion-md-filing:before{content:"\f2ec"}.ion-md-film:before{content:"\f2ed"}.ion-md-finger-print:before{content:"\f2ee"}.ion-md-fitness:before{content:"\f1ac"}.ion-md-flag:before{content:"\f2ef"}.ion-md-flame:before{content:"\f2f0"}.ion-md-flash:before{content:"\f2f1"}.ion-md-flash-off:before{content:"\f169"}.ion-md-flashlight:before{content:"\f16b"}.ion-md-flask:before{content:"\f2f2"}.ion-md-flower:before{content:"\f2f3"}.ion-md-folder:before{content:"\f2f5"}.ion-md-folder-open:before{content:"\f2f4"}.ion-md-football:before{content:"\f2f6"}.ion-md-funnel:before{content:"\f2f7"}.ion-md-gift:before{content:"\f199"}.ion-md-git-branch:before{content:"\f2fa"}.ion-md-git-commit:before{content:"\f2fb"}.ion-md-git-compare:before{content:"\f2fc"}.ion-md-git-merge:before{content:"\f2fd"}.ion-md-git-network:before{content:"\f2fe"}.ion-md-git-pull-request:before{content:"\f2ff"}.ion-md-glasses:before{content:"\f300"}.ion-md-globe:before{content:"\f301"}.ion-md-grid:before{content:"\f302"}.ion-md-hammer:before{content:"\f303"}.ion-md-hand:before{content:"\f304"}.ion-md-happy:before{content:"\f305"}.ion-md-headset:before{content:"\f306"}.ion-md-heart:before{content:"\f308"}.ion-md-heart-dislike:before{content:"\f167"}.ion-md-heart-empty:before{content:"\f1a1"}.ion-md-heart-half:before{content:"\f1a2"}.ion-md-help:before{content:"\f30b"}.ion-md-help-buoy:before{content:"\f309"}.ion-md-help-circle:before{content:"\f30a"}.ion-md-help-circle-outline:before{content:"\f16d"}.ion-md-home:before{content:"\f30c"}.ion-md-hourglass:before{content:"\f111"}.ion-md-ice-cream:before{content:"\f30d"}.ion-md-image:before{content:"\f30e"}.ion-md-images:before{content:"\f30f"}.ion-md-infinite:before{content:"\f310"}.ion-md-information:before{content:"\f312"}.ion-md-information-circle:before{content:"\f311"}.ion-md-information-circle-outline:before{content:"\f16f"}.ion-md-jet:before{content:"\f315"}.ion-md-journal:before{content:"\f18d"}.ion-md-key:before{content:"\f316"}.ion-md-keypad:before{content:"\f317"}.ion-md-laptop:before{content:"\f318"}.ion-md-leaf:before{content:"\f319"}.ion-md-link:before{content:"\f22e"}.ion-md-list:before{content:"\f31b"}.ion-md-list-box:before{content:"\f31a"}.ion-md-locate:before{content:"\f31c"}.ion-md-lock:before{content:"\f31d"}.ion-md-log-in:before{content:"\f31e"}.ion-md-log-out:before{content:"\f31f"}.ion-md-magnet:before{content:"\f320"}.ion-md-mail:before{content:"\f322"}.ion-md-mail-open:before{content:"\f321"}.ion-md-mail-unread:before{content:"\f172"}.ion-md-male:before{content:"\f323"}.ion-md-man:before{content:"\f324"}.ion-md-map:before{content:"\f325"}.ion-md-medal:before{content:"\f326"}.ion-md-medical:before{content:"\f327"}.ion-md-medkit:before{content:"\f328"}.ion-md-megaphone:before{content:"\f329"}.ion-md-menu:before{content:"\f32a"}.ion-md-mic:before{content:"\f32c"}.ion-md-mic-off:before{content:"\f32b"}.ion-md-microphone:before{content:"\f32d"}.ion-md-moon:before{content:"\f32e"}.ion-md-more:before{content:"\f1c9"}.ion-md-move:before{content:"\f331"}.ion-md-musical-note:before{content:"\f332"}.ion-md-musical-notes:before{content:"\f333"}.ion-md-navigate:before{content:"\f334"}.ion-md-notifications:before{content:"\f338"}.ion-md-notifications-off:before{content:"\f336"}.ion-md-notifications-outline:before{content:"\f337"}.ion-md-nuclear:before{content:"\f339"}.ion-md-nutrition:before{content:"\f33a"}.ion-md-open:before{content:"\f33b"}.ion-md-options:before{content:"\f33c"}.ion-md-outlet:before{content:"\f33d"}.ion-md-paper:before{content:"\f33f"}.ion-md-paper-plane:before{content:"\f33e"}.ion-md-partly-sunny:before{content:"\f340"}.ion-md-pause:before{content:"\f341"}.ion-md-paw:before{content:"\f342"}.ion-md-people:before{content:"\f343"}.ion-md-person:before{content:"\f345"}.ion-md-person-add:before{content:"\f344"}.ion-md-phone-landscape:before{content:"\f346"}.ion-md-phone-portrait:before{content:"\f347"}.ion-md-photos:before{content:"\f348"}.ion-md-pie:before{content:"\f349"}.ion-md-pin:before{content:"\f34a"}.ion-md-pint:before{content:"\f34b"}.ion-md-pizza:before{content:"\f354"}.ion-md-planet:before{content:"\f356"}.ion-md-play:before{content:"\f357"}.ion-md-play-circle:before{content:"\f174"}.ion-md-podium:before{content:"\f358"}.ion-md-power:before{content:"\f359"}.ion-md-pricetag:before{content:"\f35a"}.ion-md-pricetags:before{content:"\f35b"}.ion-md-print:before{content:"\f35c"}.ion-md-pulse:before{content:"\f35d"}.ion-md-qr-scanner:before{content:"\f35e"}.ion-md-quote:before{content:"\f35f"}.ion-md-radio:before{content:"\f362"}.ion-md-radio-button-off:before{content:"\f360"}.ion-md-radio-button-on:before{content:"\f361"}.ion-md-rainy:before{content:"\f363"}.ion-md-recording:before{content:"\f364"}.ion-md-redo:before{content:"\f365"}.ion-md-refresh:before{content:"\f366"}.ion-md-refresh-circle:before{content:"\f228"}.ion-md-remove:before{content:"\f368"}.ion-md-remove-circle:before{content:"\f367"}.ion-md-remove-circle-outline:before{content:"\f176"}.ion-md-reorder:before{content:"\f369"}.ion-md-repeat:before{content:"\f36a"}.ion-md-resize:before{content:"\f36b"}.ion-md-restaurant:before{content:"\f36c"}.ion-md-return-left:before{content:"\f36d"}.ion-md-return-right:before{content:"\f36e"}.ion-md-reverse-camera:before{content:"\f36f"}.ion-md-rewind:before{content:"\f370"}.ion-md-ribbon:before{content:"\f371"}.ion-md-rocket:before{content:"\f179"}.ion-md-rose:before{content:"\f372"}.ion-md-sad:before{content:"\f373"}.ion-md-save:before{content:"\f1a9"}.ion-md-school:before{content:"\f374"}.ion-md-search:before{content:"\f375"}.ion-md-send:before{content:"\f376"}.ion-md-settings:before{content:"\f377"}.ion-md-share:before{content:"\f379"}.ion-md-share-alt:before{content:"\f378"}.ion-md-shirt:before{content:"\f37a"}.ion-md-shuffle:before{content:"\f37b"}.ion-md-skip-backward:before{content:"\f37c"}.ion-md-skip-forward:before{content:"\f37d"}.ion-md-snow:before{content:"\f37e"}.ion-md-speedometer:before{content:"\f37f"}.ion-md-square:before{content:"\f381"}.ion-md-square-outline:before{content:"\f380"}.ion-md-star:before{content:"\f384"}.ion-md-star-half:before{content:"\f382"}.ion-md-star-outline:before{content:"\f383"}.ion-md-stats:before{content:"\f385"}.ion-md-stopwatch:before{content:"\f386"}.ion-md-subway:before{content:"\f387"}.ion-md-sunny:before{content:"\f388"}.ion-md-swap:before{content:"\f389"}.ion-md-switch:before{content:"\f38a"}.ion-md-sync:before{content:"\f38b"}.ion-md-tablet-landscape:before{content:"\f38c"}.ion-md-tablet-portrait:before{content:"\f38d"}.ion-md-tennisball:before{content:"\f38e"}.ion-md-text:before{content:"\f38f"}.ion-md-thermometer:before{content:"\f390"}.ion-md-thumbs-down:before{content:"\f391"}.ion-md-thumbs-up:before{content:"\f392"}.ion-md-thunderstorm:before{content:"\f393"}.ion-md-time:before{content:"\f394"}.ion-md-timer:before{content:"\f395"}.ion-md-today:before{content:"\f17d"}.ion-md-train:before{content:"\f396"}.ion-md-transgender:before{content:"\f397"}.ion-md-trash:before{content:"\f398"}.ion-md-trending-down:before{content:"\f399"}.ion-md-trending-up:before{content:"\f39a"}.ion-md-trophy:before{content:"\f39b"}.ion-md-tv:before{content:"\f17f"}.ion-md-umbrella:before{content:"\f39c"}.ion-md-undo:before{content:"\f39d"}.ion-md-unlock:before{content:"\f39e"}.ion-md-videocam:before{content:"\f39f"}.ion-md-volume-high:before{content:"\f123"}.ion-md-volume-low:before{content:"\f131"}.ion-md-volume-mute:before{content:"\f3a1"}.ion-md-volume-off:before{content:"\f3a2"}.ion-md-walk:before{content:"\f3a4"}.ion-md-wallet:before{content:"\f18f"}.ion-md-warning:before{content:"\f3a5"}.ion-md-watch:before{content:"\f3a6"}.ion-md-water:before{content:"\f3a7"}.ion-md-wifi:before{content:"\f3a8"}.ion-md-wine:before{content:"\f3a9"}.ion-md-woman:before{content:"\f3aa"} diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/css/ionicons.min.css b/Server/www/spiderbasic/onsenui-css/ionicons/css/ionicons.min.css new file mode 100644 index 0000000..a98e67e --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/ionicons/css/ionicons.min.css @@ -0,0 +1,11 @@ +/*! + Ionicons, v4.5.5 + Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ + https://twitter.com/benjsperry https://twitter.com/ionicframework + MIT License: https://github.com/driftyco/ionicons + + Android-style icons originally built by Google’s + Material Design Icons: https://github.com/google/material-design-icons + used under CC BY http://creativecommons.org/licenses/by/4.0/ + Modified icons to fit ionicon’s grid from original. +*/@font-face{font-family:"Ionicons";src:url("../fonts/ionicons.eot?v=4.5.5");src:url("../fonts/ionicons.eot?v=4.5.5#iefix") format("embedded-opentype"),url("../fonts/ionicons.woff2?v=4.5.5") format("woff2"),url("../fonts/ionicons.woff?v=4.5.5") format("woff"),url("../fonts/ionicons.ttf?v=4.5.5") format("truetype"),url("../fonts/ionicons.svg?v=4.5.5#Ionicons") format("svg");font-weight:normal;font-style:normal}.ion,.ionicons,.ion-ios-add:before,.ion-ios-add-circle:before,.ion-ios-add-circle-outline:before,.ion-ios-airplane:before,.ion-ios-alarm:before,.ion-ios-albums:before,.ion-ios-alert:before,.ion-ios-american-football:before,.ion-ios-analytics:before,.ion-ios-aperture:before,.ion-ios-apps:before,.ion-ios-appstore:before,.ion-ios-archive:before,.ion-ios-arrow-back:before,.ion-ios-arrow-down:before,.ion-ios-arrow-dropdown:before,.ion-ios-arrow-dropdown-circle:before,.ion-ios-arrow-dropleft:before,.ion-ios-arrow-dropleft-circle:before,.ion-ios-arrow-dropright:before,.ion-ios-arrow-dropright-circle:before,.ion-ios-arrow-dropup:before,.ion-ios-arrow-dropup-circle:before,.ion-ios-arrow-forward:before,.ion-ios-arrow-round-back:before,.ion-ios-arrow-round-down:before,.ion-ios-arrow-round-forward:before,.ion-ios-arrow-round-up:before,.ion-ios-arrow-up:before,.ion-ios-at:before,.ion-ios-attach:before,.ion-ios-backspace:before,.ion-ios-barcode:before,.ion-ios-baseball:before,.ion-ios-basket:before,.ion-ios-basketball:before,.ion-ios-battery-charging:before,.ion-ios-battery-dead:before,.ion-ios-battery-full:before,.ion-ios-beaker:before,.ion-ios-bed:before,.ion-ios-beer:before,.ion-ios-bicycle:before,.ion-ios-bluetooth:before,.ion-ios-boat:before,.ion-ios-body:before,.ion-ios-bonfire:before,.ion-ios-book:before,.ion-ios-bookmark:before,.ion-ios-bookmarks:before,.ion-ios-bowtie:before,.ion-ios-briefcase:before,.ion-ios-browsers:before,.ion-ios-brush:before,.ion-ios-bug:before,.ion-ios-build:before,.ion-ios-bulb:before,.ion-ios-bus:before,.ion-ios-business:before,.ion-ios-cafe:before,.ion-ios-calculator:before,.ion-ios-calendar:before,.ion-ios-call:before,.ion-ios-camera:before,.ion-ios-car:before,.ion-ios-card:before,.ion-ios-cart:before,.ion-ios-cash:before,.ion-ios-cellular:before,.ion-ios-chatboxes:before,.ion-ios-chatbubbles:before,.ion-ios-checkbox:before,.ion-ios-checkbox-outline:before,.ion-ios-checkmark:before,.ion-ios-checkmark-circle:before,.ion-ios-checkmark-circle-outline:before,.ion-ios-clipboard:before,.ion-ios-clock:before,.ion-ios-close:before,.ion-ios-close-circle:before,.ion-ios-close-circle-outline:before,.ion-ios-cloud:before,.ion-ios-cloud-circle:before,.ion-ios-cloud-done:before,.ion-ios-cloud-download:before,.ion-ios-cloud-outline:before,.ion-ios-cloud-upload:before,.ion-ios-cloudy:before,.ion-ios-cloudy-night:before,.ion-ios-code:before,.ion-ios-code-download:before,.ion-ios-code-working:before,.ion-ios-cog:before,.ion-ios-color-fill:before,.ion-ios-color-filter:before,.ion-ios-color-palette:before,.ion-ios-color-wand:before,.ion-ios-compass:before,.ion-ios-construct:before,.ion-ios-contact:before,.ion-ios-contacts:before,.ion-ios-contract:before,.ion-ios-contrast:before,.ion-ios-copy:before,.ion-ios-create:before,.ion-ios-crop:before,.ion-ios-cube:before,.ion-ios-cut:before,.ion-ios-desktop:before,.ion-ios-disc:before,.ion-ios-document:before,.ion-ios-done-all:before,.ion-ios-download:before,.ion-ios-easel:before,.ion-ios-egg:before,.ion-ios-exit:before,.ion-ios-expand:before,.ion-ios-eye:before,.ion-ios-eye-off:before,.ion-ios-fastforward:before,.ion-ios-female:before,.ion-ios-filing:before,.ion-ios-film:before,.ion-ios-finger-print:before,.ion-ios-fitness:before,.ion-ios-flag:before,.ion-ios-flame:before,.ion-ios-flash:before,.ion-ios-flash-off:before,.ion-ios-flashlight:before,.ion-ios-flask:before,.ion-ios-flower:before,.ion-ios-folder:before,.ion-ios-folder-open:before,.ion-ios-football:before,.ion-ios-funnel:before,.ion-ios-gift:before,.ion-ios-git-branch:before,.ion-ios-git-commit:before,.ion-ios-git-compare:before,.ion-ios-git-merge:before,.ion-ios-git-network:before,.ion-ios-git-pull-request:before,.ion-ios-glasses:before,.ion-ios-globe:before,.ion-ios-grid:before,.ion-ios-hammer:before,.ion-ios-hand:before,.ion-ios-happy:before,.ion-ios-headset:before,.ion-ios-heart:before,.ion-ios-heart-dislike:before,.ion-ios-heart-empty:before,.ion-ios-heart-half:before,.ion-ios-help:before,.ion-ios-help-buoy:before,.ion-ios-help-circle:before,.ion-ios-help-circle-outline:before,.ion-ios-home:before,.ion-ios-hourglass:before,.ion-ios-ice-cream:before,.ion-ios-image:before,.ion-ios-images:before,.ion-ios-infinite:before,.ion-ios-information:before,.ion-ios-information-circle:before,.ion-ios-information-circle-outline:before,.ion-ios-jet:before,.ion-ios-journal:before,.ion-ios-key:before,.ion-ios-keypad:before,.ion-ios-laptop:before,.ion-ios-leaf:before,.ion-ios-link:before,.ion-ios-list:before,.ion-ios-list-box:before,.ion-ios-locate:before,.ion-ios-lock:before,.ion-ios-log-in:before,.ion-ios-log-out:before,.ion-ios-magnet:before,.ion-ios-mail:before,.ion-ios-mail-open:before,.ion-ios-mail-unread:before,.ion-ios-male:before,.ion-ios-man:before,.ion-ios-map:before,.ion-ios-medal:before,.ion-ios-medical:before,.ion-ios-medkit:before,.ion-ios-megaphone:before,.ion-ios-menu:before,.ion-ios-mic:before,.ion-ios-mic-off:before,.ion-ios-microphone:before,.ion-ios-moon:before,.ion-ios-more:before,.ion-ios-move:before,.ion-ios-musical-note:before,.ion-ios-musical-notes:before,.ion-ios-navigate:before,.ion-ios-notifications:before,.ion-ios-notifications-off:before,.ion-ios-notifications-outline:before,.ion-ios-nuclear:before,.ion-ios-nutrition:before,.ion-ios-open:before,.ion-ios-options:before,.ion-ios-outlet:before,.ion-ios-paper:before,.ion-ios-paper-plane:before,.ion-ios-partly-sunny:before,.ion-ios-pause:before,.ion-ios-paw:before,.ion-ios-people:before,.ion-ios-person:before,.ion-ios-person-add:before,.ion-ios-phone-landscape:before,.ion-ios-phone-portrait:before,.ion-ios-photos:before,.ion-ios-pie:before,.ion-ios-pin:before,.ion-ios-pint:before,.ion-ios-pizza:before,.ion-ios-planet:before,.ion-ios-play:before,.ion-ios-play-circle:before,.ion-ios-podium:before,.ion-ios-power:before,.ion-ios-pricetag:before,.ion-ios-pricetags:before,.ion-ios-print:before,.ion-ios-pulse:before,.ion-ios-qr-scanner:before,.ion-ios-quote:before,.ion-ios-radio:before,.ion-ios-radio-button-off:before,.ion-ios-radio-button-on:before,.ion-ios-rainy:before,.ion-ios-recording:before,.ion-ios-redo:before,.ion-ios-refresh:before,.ion-ios-refresh-circle:before,.ion-ios-remove:before,.ion-ios-remove-circle:before,.ion-ios-remove-circle-outline:before,.ion-ios-reorder:before,.ion-ios-repeat:before,.ion-ios-resize:before,.ion-ios-restaurant:before,.ion-ios-return-left:before,.ion-ios-return-right:before,.ion-ios-reverse-camera:before,.ion-ios-rewind:before,.ion-ios-ribbon:before,.ion-ios-rocket:before,.ion-ios-rose:before,.ion-ios-sad:before,.ion-ios-save:before,.ion-ios-school:before,.ion-ios-search:before,.ion-ios-send:before,.ion-ios-settings:before,.ion-ios-share:before,.ion-ios-share-alt:before,.ion-ios-shirt:before,.ion-ios-shuffle:before,.ion-ios-skip-backward:before,.ion-ios-skip-forward:before,.ion-ios-snow:before,.ion-ios-speedometer:before,.ion-ios-square:before,.ion-ios-square-outline:before,.ion-ios-star:before,.ion-ios-star-half:before,.ion-ios-star-outline:before,.ion-ios-stats:before,.ion-ios-stopwatch:before,.ion-ios-subway:before,.ion-ios-sunny:before,.ion-ios-swap:before,.ion-ios-switch:before,.ion-ios-sync:before,.ion-ios-tablet-landscape:before,.ion-ios-tablet-portrait:before,.ion-ios-tennisball:before,.ion-ios-text:before,.ion-ios-thermometer:before,.ion-ios-thumbs-down:before,.ion-ios-thumbs-up:before,.ion-ios-thunderstorm:before,.ion-ios-time:before,.ion-ios-timer:before,.ion-ios-today:before,.ion-ios-train:before,.ion-ios-transgender:before,.ion-ios-trash:before,.ion-ios-trending-down:before,.ion-ios-trending-up:before,.ion-ios-trophy:before,.ion-ios-tv:before,.ion-ios-umbrella:before,.ion-ios-undo:before,.ion-ios-unlock:before,.ion-ios-videocam:before,.ion-ios-volume-high:before,.ion-ios-volume-low:before,.ion-ios-volume-mute:before,.ion-ios-volume-off:before,.ion-ios-walk:before,.ion-ios-wallet:before,.ion-ios-warning:before,.ion-ios-watch:before,.ion-ios-water:before,.ion-ios-wifi:before,.ion-ios-wine:before,.ion-ios-woman:before,.ion-logo-android:before,.ion-logo-angular:before,.ion-logo-apple:before,.ion-logo-bitbucket:before,.ion-logo-bitcoin:before,.ion-logo-buffer:before,.ion-logo-chrome:before,.ion-logo-closed-captioning:before,.ion-logo-codepen:before,.ion-logo-css3:before,.ion-logo-designernews:before,.ion-logo-dribbble:before,.ion-logo-dropbox:before,.ion-logo-euro:before,.ion-logo-facebook:before,.ion-logo-flickr:before,.ion-logo-foursquare:before,.ion-logo-freebsd-devil:before,.ion-logo-game-controller-a:before,.ion-logo-game-controller-b:before,.ion-logo-github:before,.ion-logo-google:before,.ion-logo-googleplus:before,.ion-logo-hackernews:before,.ion-logo-html5:before,.ion-logo-instagram:before,.ion-logo-ionic:before,.ion-logo-ionitron:before,.ion-logo-javascript:before,.ion-logo-linkedin:before,.ion-logo-markdown:before,.ion-logo-model-s:before,.ion-logo-no-smoking:before,.ion-logo-nodejs:before,.ion-logo-npm:before,.ion-logo-octocat:before,.ion-logo-pinterest:before,.ion-logo-playstation:before,.ion-logo-polymer:before,.ion-logo-python:before,.ion-logo-reddit:before,.ion-logo-rss:before,.ion-logo-sass:before,.ion-logo-skype:before,.ion-logo-slack:before,.ion-logo-snapchat:before,.ion-logo-steam:before,.ion-logo-tumblr:before,.ion-logo-tux:before,.ion-logo-twitch:before,.ion-logo-twitter:before,.ion-logo-usd:before,.ion-logo-vimeo:before,.ion-logo-vk:before,.ion-logo-whatsapp:before,.ion-logo-windows:before,.ion-logo-wordpress:before,.ion-logo-xbox:before,.ion-logo-xing:before,.ion-logo-yahoo:before,.ion-logo-yen:before,.ion-logo-youtube:before,.ion-md-add:before,.ion-md-add-circle:before,.ion-md-add-circle-outline:before,.ion-md-airplane:before,.ion-md-alarm:before,.ion-md-albums:before,.ion-md-alert:before,.ion-md-american-football:before,.ion-md-analytics:before,.ion-md-aperture:before,.ion-md-apps:before,.ion-md-appstore:before,.ion-md-archive:before,.ion-md-arrow-back:before,.ion-md-arrow-down:before,.ion-md-arrow-dropdown:before,.ion-md-arrow-dropdown-circle:before,.ion-md-arrow-dropleft:before,.ion-md-arrow-dropleft-circle:before,.ion-md-arrow-dropright:before,.ion-md-arrow-dropright-circle:before,.ion-md-arrow-dropup:before,.ion-md-arrow-dropup-circle:before,.ion-md-arrow-forward:before,.ion-md-arrow-round-back:before,.ion-md-arrow-round-down:before,.ion-md-arrow-round-forward:before,.ion-md-arrow-round-up:before,.ion-md-arrow-up:before,.ion-md-at:before,.ion-md-attach:before,.ion-md-backspace:before,.ion-md-barcode:before,.ion-md-baseball:before,.ion-md-basket:before,.ion-md-basketball:before,.ion-md-battery-charging:before,.ion-md-battery-dead:before,.ion-md-battery-full:before,.ion-md-beaker:before,.ion-md-bed:before,.ion-md-beer:before,.ion-md-bicycle:before,.ion-md-bluetooth:before,.ion-md-boat:before,.ion-md-body:before,.ion-md-bonfire:before,.ion-md-book:before,.ion-md-bookmark:before,.ion-md-bookmarks:before,.ion-md-bowtie:before,.ion-md-briefcase:before,.ion-md-browsers:before,.ion-md-brush:before,.ion-md-bug:before,.ion-md-build:before,.ion-md-bulb:before,.ion-md-bus:before,.ion-md-business:before,.ion-md-cafe:before,.ion-md-calculator:before,.ion-md-calendar:before,.ion-md-call:before,.ion-md-camera:before,.ion-md-car:before,.ion-md-card:before,.ion-md-cart:before,.ion-md-cash:before,.ion-md-cellular:before,.ion-md-chatboxes:before,.ion-md-chatbubbles:before,.ion-md-checkbox:before,.ion-md-checkbox-outline:before,.ion-md-checkmark:before,.ion-md-checkmark-circle:before,.ion-md-checkmark-circle-outline:before,.ion-md-clipboard:before,.ion-md-clock:before,.ion-md-close:before,.ion-md-close-circle:before,.ion-md-close-circle-outline:before,.ion-md-cloud:before,.ion-md-cloud-circle:before,.ion-md-cloud-done:before,.ion-md-cloud-download:before,.ion-md-cloud-outline:before,.ion-md-cloud-upload:before,.ion-md-cloudy:before,.ion-md-cloudy-night:before,.ion-md-code:before,.ion-md-code-download:before,.ion-md-code-working:before,.ion-md-cog:before,.ion-md-color-fill:before,.ion-md-color-filter:before,.ion-md-color-palette:before,.ion-md-color-wand:before,.ion-md-compass:before,.ion-md-construct:before,.ion-md-contact:before,.ion-md-contacts:before,.ion-md-contract:before,.ion-md-contrast:before,.ion-md-copy:before,.ion-md-create:before,.ion-md-crop:before,.ion-md-cube:before,.ion-md-cut:before,.ion-md-desktop:before,.ion-md-disc:before,.ion-md-document:before,.ion-md-done-all:before,.ion-md-download:before,.ion-md-easel:before,.ion-md-egg:before,.ion-md-exit:before,.ion-md-expand:before,.ion-md-eye:before,.ion-md-eye-off:before,.ion-md-fastforward:before,.ion-md-female:before,.ion-md-filing:before,.ion-md-film:before,.ion-md-finger-print:before,.ion-md-fitness:before,.ion-md-flag:before,.ion-md-flame:before,.ion-md-flash:before,.ion-md-flash-off:before,.ion-md-flashlight:before,.ion-md-flask:before,.ion-md-flower:before,.ion-md-folder:before,.ion-md-folder-open:before,.ion-md-football:before,.ion-md-funnel:before,.ion-md-gift:before,.ion-md-git-branch:before,.ion-md-git-commit:before,.ion-md-git-compare:before,.ion-md-git-merge:before,.ion-md-git-network:before,.ion-md-git-pull-request:before,.ion-md-glasses:before,.ion-md-globe:before,.ion-md-grid:before,.ion-md-hammer:before,.ion-md-hand:before,.ion-md-happy:before,.ion-md-headset:before,.ion-md-heart:before,.ion-md-heart-dislike:before,.ion-md-heart-empty:before,.ion-md-heart-half:before,.ion-md-help:before,.ion-md-help-buoy:before,.ion-md-help-circle:before,.ion-md-help-circle-outline:before,.ion-md-home:before,.ion-md-hourglass:before,.ion-md-ice-cream:before,.ion-md-image:before,.ion-md-images:before,.ion-md-infinite:before,.ion-md-information:before,.ion-md-information-circle:before,.ion-md-information-circle-outline:before,.ion-md-jet:before,.ion-md-journal:before,.ion-md-key:before,.ion-md-keypad:before,.ion-md-laptop:before,.ion-md-leaf:before,.ion-md-link:before,.ion-md-list:before,.ion-md-list-box:before,.ion-md-locate:before,.ion-md-lock:before,.ion-md-log-in:before,.ion-md-log-out:before,.ion-md-magnet:before,.ion-md-mail:before,.ion-md-mail-open:before,.ion-md-mail-unread:before,.ion-md-male:before,.ion-md-man:before,.ion-md-map:before,.ion-md-medal:before,.ion-md-medical:before,.ion-md-medkit:before,.ion-md-megaphone:before,.ion-md-menu:before,.ion-md-mic:before,.ion-md-mic-off:before,.ion-md-microphone:before,.ion-md-moon:before,.ion-md-more:before,.ion-md-move:before,.ion-md-musical-note:before,.ion-md-musical-notes:before,.ion-md-navigate:before,.ion-md-notifications:before,.ion-md-notifications-off:before,.ion-md-notifications-outline:before,.ion-md-nuclear:before,.ion-md-nutrition:before,.ion-md-open:before,.ion-md-options:before,.ion-md-outlet:before,.ion-md-paper:before,.ion-md-paper-plane:before,.ion-md-partly-sunny:before,.ion-md-pause:before,.ion-md-paw:before,.ion-md-people:before,.ion-md-person:before,.ion-md-person-add:before,.ion-md-phone-landscape:before,.ion-md-phone-portrait:before,.ion-md-photos:before,.ion-md-pie:before,.ion-md-pin:before,.ion-md-pint:before,.ion-md-pizza:before,.ion-md-planet:before,.ion-md-play:before,.ion-md-play-circle:before,.ion-md-podium:before,.ion-md-power:before,.ion-md-pricetag:before,.ion-md-pricetags:before,.ion-md-print:before,.ion-md-pulse:before,.ion-md-qr-scanner:before,.ion-md-quote:before,.ion-md-radio:before,.ion-md-radio-button-off:before,.ion-md-radio-button-on:before,.ion-md-rainy:before,.ion-md-recording:before,.ion-md-redo:before,.ion-md-refresh:before,.ion-md-refresh-circle:before,.ion-md-remove:before,.ion-md-remove-circle:before,.ion-md-remove-circle-outline:before,.ion-md-reorder:before,.ion-md-repeat:before,.ion-md-resize:before,.ion-md-restaurant:before,.ion-md-return-left:before,.ion-md-return-right:before,.ion-md-reverse-camera:before,.ion-md-rewind:before,.ion-md-ribbon:before,.ion-md-rocket:before,.ion-md-rose:before,.ion-md-sad:before,.ion-md-save:before,.ion-md-school:before,.ion-md-search:before,.ion-md-send:before,.ion-md-settings:before,.ion-md-share:before,.ion-md-share-alt:before,.ion-md-shirt:before,.ion-md-shuffle:before,.ion-md-skip-backward:before,.ion-md-skip-forward:before,.ion-md-snow:before,.ion-md-speedometer:before,.ion-md-square:before,.ion-md-square-outline:before,.ion-md-star:before,.ion-md-star-half:before,.ion-md-star-outline:before,.ion-md-stats:before,.ion-md-stopwatch:before,.ion-md-subway:before,.ion-md-sunny:before,.ion-md-swap:before,.ion-md-switch:before,.ion-md-sync:before,.ion-md-tablet-landscape:before,.ion-md-tablet-portrait:before,.ion-md-tennisball:before,.ion-md-text:before,.ion-md-thermometer:before,.ion-md-thumbs-down:before,.ion-md-thumbs-up:before,.ion-md-thunderstorm:before,.ion-md-time:before,.ion-md-timer:before,.ion-md-today:before,.ion-md-train:before,.ion-md-transgender:before,.ion-md-trash:before,.ion-md-trending-down:before,.ion-md-trending-up:before,.ion-md-trophy:before,.ion-md-tv:before,.ion-md-umbrella:before,.ion-md-undo:before,.ion-md-unlock:before,.ion-md-videocam:before,.ion-md-volume-high:before,.ion-md-volume-low:before,.ion-md-volume-mute:before,.ion-md-volume-off:before,.ion-md-walk:before,.ion-md-wallet:before,.ion-md-warning:before,.ion-md-watch:before,.ion-md-water:before,.ion-md-wifi:before,.ion-md-wine:before,.ion-md-woman:before{display:inline-block;font-family:"Ionicons";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ion-ios-add:before{content:"\f102"}.ion-ios-add-circle:before{content:"\f101"}.ion-ios-add-circle-outline:before{content:"\f100"}.ion-ios-airplane:before{content:"\f137"}.ion-ios-alarm:before{content:"\f3c8"}.ion-ios-albums:before{content:"\f3ca"}.ion-ios-alert:before{content:"\f104"}.ion-ios-american-football:before{content:"\f106"}.ion-ios-analytics:before{content:"\f3ce"}.ion-ios-aperture:before{content:"\f108"}.ion-ios-apps:before{content:"\f10a"}.ion-ios-appstore:before{content:"\f10c"}.ion-ios-archive:before{content:"\f10e"}.ion-ios-arrow-back:before{content:"\f3cf"}.ion-ios-arrow-down:before{content:"\f3d0"}.ion-ios-arrow-dropdown:before{content:"\f110"}.ion-ios-arrow-dropdown-circle:before{content:"\f125"}.ion-ios-arrow-dropleft:before{content:"\f112"}.ion-ios-arrow-dropleft-circle:before{content:"\f129"}.ion-ios-arrow-dropright:before{content:"\f114"}.ion-ios-arrow-dropright-circle:before{content:"\f12b"}.ion-ios-arrow-dropup:before{content:"\f116"}.ion-ios-arrow-dropup-circle:before{content:"\f12d"}.ion-ios-arrow-forward:before{content:"\f3d1"}.ion-ios-arrow-round-back:before{content:"\f117"}.ion-ios-arrow-round-down:before{content:"\f118"}.ion-ios-arrow-round-forward:before{content:"\f119"}.ion-ios-arrow-round-up:before{content:"\f11a"}.ion-ios-arrow-up:before{content:"\f3d8"}.ion-ios-at:before{content:"\f3da"}.ion-ios-attach:before{content:"\f11b"}.ion-ios-backspace:before{content:"\f11d"}.ion-ios-barcode:before{content:"\f3dc"}.ion-ios-baseball:before{content:"\f3de"}.ion-ios-basket:before{content:"\f11f"}.ion-ios-basketball:before{content:"\f3e0"}.ion-ios-battery-charging:before{content:"\f120"}.ion-ios-battery-dead:before{content:"\f121"}.ion-ios-battery-full:before{content:"\f122"}.ion-ios-beaker:before{content:"\f124"}.ion-ios-bed:before{content:"\f139"}.ion-ios-beer:before{content:"\f126"}.ion-ios-bicycle:before{content:"\f127"}.ion-ios-bluetooth:before{content:"\f128"}.ion-ios-boat:before{content:"\f12a"}.ion-ios-body:before{content:"\f3e4"}.ion-ios-bonfire:before{content:"\f12c"}.ion-ios-book:before{content:"\f3e8"}.ion-ios-bookmark:before{content:"\f12e"}.ion-ios-bookmarks:before{content:"\f3ea"}.ion-ios-bowtie:before{content:"\f130"}.ion-ios-briefcase:before{content:"\f3ee"}.ion-ios-browsers:before{content:"\f3f0"}.ion-ios-brush:before{content:"\f132"}.ion-ios-bug:before{content:"\f134"}.ion-ios-build:before{content:"\f136"}.ion-ios-bulb:before{content:"\f138"}.ion-ios-bus:before{content:"\f13a"}.ion-ios-business:before{content:"\f1a3"}.ion-ios-cafe:before{content:"\f13c"}.ion-ios-calculator:before{content:"\f3f2"}.ion-ios-calendar:before{content:"\f3f4"}.ion-ios-call:before{content:"\f13e"}.ion-ios-camera:before{content:"\f3f6"}.ion-ios-car:before{content:"\f140"}.ion-ios-card:before{content:"\f142"}.ion-ios-cart:before{content:"\f3f8"}.ion-ios-cash:before{content:"\f144"}.ion-ios-cellular:before{content:"\f13d"}.ion-ios-chatboxes:before{content:"\f3fa"}.ion-ios-chatbubbles:before{content:"\f146"}.ion-ios-checkbox:before{content:"\f148"}.ion-ios-checkbox-outline:before{content:"\f147"}.ion-ios-checkmark:before{content:"\f3ff"}.ion-ios-checkmark-circle:before{content:"\f14a"}.ion-ios-checkmark-circle-outline:before{content:"\f149"}.ion-ios-clipboard:before{content:"\f14c"}.ion-ios-clock:before{content:"\f403"}.ion-ios-close:before{content:"\f406"}.ion-ios-close-circle:before{content:"\f14e"}.ion-ios-close-circle-outline:before{content:"\f14d"}.ion-ios-cloud:before{content:"\f40c"}.ion-ios-cloud-circle:before{content:"\f152"}.ion-ios-cloud-done:before{content:"\f154"}.ion-ios-cloud-download:before{content:"\f408"}.ion-ios-cloud-outline:before{content:"\f409"}.ion-ios-cloud-upload:before{content:"\f40b"}.ion-ios-cloudy:before{content:"\f410"}.ion-ios-cloudy-night:before{content:"\f40e"}.ion-ios-code:before{content:"\f157"}.ion-ios-code-download:before{content:"\f155"}.ion-ios-code-working:before{content:"\f156"}.ion-ios-cog:before{content:"\f412"}.ion-ios-color-fill:before{content:"\f159"}.ion-ios-color-filter:before{content:"\f414"}.ion-ios-color-palette:before{content:"\f15b"}.ion-ios-color-wand:before{content:"\f416"}.ion-ios-compass:before{content:"\f15d"}.ion-ios-construct:before{content:"\f15f"}.ion-ios-contact:before{content:"\f41a"}.ion-ios-contacts:before{content:"\f161"}.ion-ios-contract:before{content:"\f162"}.ion-ios-contrast:before{content:"\f163"}.ion-ios-copy:before{content:"\f41c"}.ion-ios-create:before{content:"\f165"}.ion-ios-crop:before{content:"\f41e"}.ion-ios-cube:before{content:"\f168"}.ion-ios-cut:before{content:"\f16a"}.ion-ios-desktop:before{content:"\f16c"}.ion-ios-disc:before{content:"\f16e"}.ion-ios-document:before{content:"\f170"}.ion-ios-done-all:before{content:"\f171"}.ion-ios-download:before{content:"\f420"}.ion-ios-easel:before{content:"\f173"}.ion-ios-egg:before{content:"\f175"}.ion-ios-exit:before{content:"\f177"}.ion-ios-expand:before{content:"\f178"}.ion-ios-eye:before{content:"\f425"}.ion-ios-eye-off:before{content:"\f17a"}.ion-ios-fastforward:before{content:"\f427"}.ion-ios-female:before{content:"\f17b"}.ion-ios-filing:before{content:"\f429"}.ion-ios-film:before{content:"\f42b"}.ion-ios-finger-print:before{content:"\f17c"}.ion-ios-fitness:before{content:"\f1ab"}.ion-ios-flag:before{content:"\f42d"}.ion-ios-flame:before{content:"\f42f"}.ion-ios-flash:before{content:"\f17e"}.ion-ios-flash-off:before{content:"\f12f"}.ion-ios-flashlight:before{content:"\f141"}.ion-ios-flask:before{content:"\f431"}.ion-ios-flower:before{content:"\f433"}.ion-ios-folder:before{content:"\f435"}.ion-ios-folder-open:before{content:"\f180"}.ion-ios-football:before{content:"\f437"}.ion-ios-funnel:before{content:"\f182"}.ion-ios-gift:before{content:"\f191"}.ion-ios-git-branch:before{content:"\f183"}.ion-ios-git-commit:before{content:"\f184"}.ion-ios-git-compare:before{content:"\f185"}.ion-ios-git-merge:before{content:"\f186"}.ion-ios-git-network:before{content:"\f187"}.ion-ios-git-pull-request:before{content:"\f188"}.ion-ios-glasses:before{content:"\f43f"}.ion-ios-globe:before{content:"\f18a"}.ion-ios-grid:before{content:"\f18c"}.ion-ios-hammer:before{content:"\f18e"}.ion-ios-hand:before{content:"\f190"}.ion-ios-happy:before{content:"\f192"}.ion-ios-headset:before{content:"\f194"}.ion-ios-heart:before{content:"\f443"}.ion-ios-heart-dislike:before{content:"\f13f"}.ion-ios-heart-empty:before{content:"\f19b"}.ion-ios-heart-half:before{content:"\f19d"}.ion-ios-help:before{content:"\f446"}.ion-ios-help-buoy:before{content:"\f196"}.ion-ios-help-circle:before{content:"\f198"}.ion-ios-help-circle-outline:before{content:"\f197"}.ion-ios-home:before{content:"\f448"}.ion-ios-hourglass:before{content:"\f103"}.ion-ios-ice-cream:before{content:"\f19a"}.ion-ios-image:before{content:"\f19c"}.ion-ios-images:before{content:"\f19e"}.ion-ios-infinite:before{content:"\f44a"}.ion-ios-information:before{content:"\f44d"}.ion-ios-information-circle:before{content:"\f1a0"}.ion-ios-information-circle-outline:before{content:"\f19f"}.ion-ios-jet:before{content:"\f1a5"}.ion-ios-journal:before{content:"\f189"}.ion-ios-key:before{content:"\f1a7"}.ion-ios-keypad:before{content:"\f450"}.ion-ios-laptop:before{content:"\f1a8"}.ion-ios-leaf:before{content:"\f1aa"}.ion-ios-link:before{content:"\f22a"}.ion-ios-list:before{content:"\f454"}.ion-ios-list-box:before{content:"\f143"}.ion-ios-locate:before{content:"\f1ae"}.ion-ios-lock:before{content:"\f1b0"}.ion-ios-log-in:before{content:"\f1b1"}.ion-ios-log-out:before{content:"\f1b2"}.ion-ios-magnet:before{content:"\f1b4"}.ion-ios-mail:before{content:"\f1b8"}.ion-ios-mail-open:before{content:"\f1b6"}.ion-ios-mail-unread:before{content:"\f145"}.ion-ios-male:before{content:"\f1b9"}.ion-ios-man:before{content:"\f1bb"}.ion-ios-map:before{content:"\f1bd"}.ion-ios-medal:before{content:"\f1bf"}.ion-ios-medical:before{content:"\f45c"}.ion-ios-medkit:before{content:"\f45e"}.ion-ios-megaphone:before{content:"\f1c1"}.ion-ios-menu:before{content:"\f1c3"}.ion-ios-mic:before{content:"\f461"}.ion-ios-mic-off:before{content:"\f45f"}.ion-ios-microphone:before{content:"\f1c6"}.ion-ios-moon:before{content:"\f468"}.ion-ios-more:before{content:"\f1c8"}.ion-ios-move:before{content:"\f1cb"}.ion-ios-musical-note:before{content:"\f46b"}.ion-ios-musical-notes:before{content:"\f46c"}.ion-ios-navigate:before{content:"\f46e"}.ion-ios-notifications:before{content:"\f1d3"}.ion-ios-notifications-off:before{content:"\f1d1"}.ion-ios-notifications-outline:before{content:"\f133"}.ion-ios-nuclear:before{content:"\f1d5"}.ion-ios-nutrition:before{content:"\f470"}.ion-ios-open:before{content:"\f1d7"}.ion-ios-options:before{content:"\f1d9"}.ion-ios-outlet:before{content:"\f1db"}.ion-ios-paper:before{content:"\f472"}.ion-ios-paper-plane:before{content:"\f1dd"}.ion-ios-partly-sunny:before{content:"\f1df"}.ion-ios-pause:before{content:"\f478"}.ion-ios-paw:before{content:"\f47a"}.ion-ios-people:before{content:"\f47c"}.ion-ios-person:before{content:"\f47e"}.ion-ios-person-add:before{content:"\f1e1"}.ion-ios-phone-landscape:before{content:"\f1e2"}.ion-ios-phone-portrait:before{content:"\f1e3"}.ion-ios-photos:before{content:"\f482"}.ion-ios-pie:before{content:"\f484"}.ion-ios-pin:before{content:"\f1e5"}.ion-ios-pint:before{content:"\f486"}.ion-ios-pizza:before{content:"\f1e7"}.ion-ios-planet:before{content:"\f1eb"}.ion-ios-play:before{content:"\f488"}.ion-ios-play-circle:before{content:"\f113"}.ion-ios-podium:before{content:"\f1ed"}.ion-ios-power:before{content:"\f1ef"}.ion-ios-pricetag:before{content:"\f48d"}.ion-ios-pricetags:before{content:"\f48f"}.ion-ios-print:before{content:"\f1f1"}.ion-ios-pulse:before{content:"\f493"}.ion-ios-qr-scanner:before{content:"\f1f3"}.ion-ios-quote:before{content:"\f1f5"}.ion-ios-radio:before{content:"\f1f9"}.ion-ios-radio-button-off:before{content:"\f1f6"}.ion-ios-radio-button-on:before{content:"\f1f7"}.ion-ios-rainy:before{content:"\f495"}.ion-ios-recording:before{content:"\f497"}.ion-ios-redo:before{content:"\f499"}.ion-ios-refresh:before{content:"\f49c"}.ion-ios-refresh-circle:before{content:"\f135"}.ion-ios-remove:before{content:"\f1fc"}.ion-ios-remove-circle:before{content:"\f1fb"}.ion-ios-remove-circle-outline:before{content:"\f1fa"}.ion-ios-reorder:before{content:"\f1fd"}.ion-ios-repeat:before{content:"\f1fe"}.ion-ios-resize:before{content:"\f1ff"}.ion-ios-restaurant:before{content:"\f201"}.ion-ios-return-left:before{content:"\f202"}.ion-ios-return-right:before{content:"\f203"}.ion-ios-reverse-camera:before{content:"\f49f"}.ion-ios-rewind:before{content:"\f4a1"}.ion-ios-ribbon:before{content:"\f205"}.ion-ios-rocket:before{content:"\f14b"}.ion-ios-rose:before{content:"\f4a3"}.ion-ios-sad:before{content:"\f207"}.ion-ios-save:before{content:"\f1a6"}.ion-ios-school:before{content:"\f209"}.ion-ios-search:before{content:"\f4a5"}.ion-ios-send:before{content:"\f20c"}.ion-ios-settings:before{content:"\f4a7"}.ion-ios-share:before{content:"\f211"}.ion-ios-share-alt:before{content:"\f20f"}.ion-ios-shirt:before{content:"\f213"}.ion-ios-shuffle:before{content:"\f4a9"}.ion-ios-skip-backward:before{content:"\f215"}.ion-ios-skip-forward:before{content:"\f217"}.ion-ios-snow:before{content:"\f218"}.ion-ios-speedometer:before{content:"\f4b0"}.ion-ios-square:before{content:"\f21a"}.ion-ios-square-outline:before{content:"\f15c"}.ion-ios-star:before{content:"\f4b3"}.ion-ios-star-half:before{content:"\f4b1"}.ion-ios-star-outline:before{content:"\f4b2"}.ion-ios-stats:before{content:"\f21c"}.ion-ios-stopwatch:before{content:"\f4b5"}.ion-ios-subway:before{content:"\f21e"}.ion-ios-sunny:before{content:"\f4b7"}.ion-ios-swap:before{content:"\f21f"}.ion-ios-switch:before{content:"\f221"}.ion-ios-sync:before{content:"\f222"}.ion-ios-tablet-landscape:before{content:"\f223"}.ion-ios-tablet-portrait:before{content:"\f24e"}.ion-ios-tennisball:before{content:"\f4bb"}.ion-ios-text:before{content:"\f250"}.ion-ios-thermometer:before{content:"\f252"}.ion-ios-thumbs-down:before{content:"\f254"}.ion-ios-thumbs-up:before{content:"\f256"}.ion-ios-thunderstorm:before{content:"\f4bd"}.ion-ios-time:before{content:"\f4bf"}.ion-ios-timer:before{content:"\f4c1"}.ion-ios-today:before{content:"\f14f"}.ion-ios-train:before{content:"\f258"}.ion-ios-transgender:before{content:"\f259"}.ion-ios-trash:before{content:"\f4c5"}.ion-ios-trending-down:before{content:"\f25a"}.ion-ios-trending-up:before{content:"\f25b"}.ion-ios-trophy:before{content:"\f25d"}.ion-ios-tv:before{content:"\f115"}.ion-ios-umbrella:before{content:"\f25f"}.ion-ios-undo:before{content:"\f4c7"}.ion-ios-unlock:before{content:"\f261"}.ion-ios-videocam:before{content:"\f4cd"}.ion-ios-volume-high:before{content:"\f11c"}.ion-ios-volume-low:before{content:"\f11e"}.ion-ios-volume-mute:before{content:"\f263"}.ion-ios-volume-off:before{content:"\f264"}.ion-ios-walk:before{content:"\f266"}.ion-ios-wallet:before{content:"\f18b"}.ion-ios-warning:before{content:"\f268"}.ion-ios-watch:before{content:"\f269"}.ion-ios-water:before{content:"\f26b"}.ion-ios-wifi:before{content:"\f26d"}.ion-ios-wine:before{content:"\f26f"}.ion-ios-woman:before{content:"\f271"}.ion-logo-android:before{content:"\f225"}.ion-logo-angular:before{content:"\f227"}.ion-logo-apple:before{content:"\f229"}.ion-logo-bitbucket:before{content:"\f193"}.ion-logo-bitcoin:before{content:"\f22b"}.ion-logo-buffer:before{content:"\f22d"}.ion-logo-chrome:before{content:"\f22f"}.ion-logo-closed-captioning:before{content:"\f105"}.ion-logo-codepen:before{content:"\f230"}.ion-logo-css3:before{content:"\f231"}.ion-logo-designernews:before{content:"\f232"}.ion-logo-dribbble:before{content:"\f233"}.ion-logo-dropbox:before{content:"\f234"}.ion-logo-euro:before{content:"\f235"}.ion-logo-facebook:before{content:"\f236"}.ion-logo-flickr:before{content:"\f107"}.ion-logo-foursquare:before{content:"\f237"}.ion-logo-freebsd-devil:before{content:"\f238"}.ion-logo-game-controller-a:before{content:"\f13b"}.ion-logo-game-controller-b:before{content:"\f181"}.ion-logo-github:before{content:"\f239"}.ion-logo-google:before{content:"\f23a"}.ion-logo-googleplus:before{content:"\f23b"}.ion-logo-hackernews:before{content:"\f23c"}.ion-logo-html5:before{content:"\f23d"}.ion-logo-instagram:before{content:"\f23e"}.ion-logo-ionic:before{content:"\f150"}.ion-logo-ionitron:before{content:"\f151"}.ion-logo-javascript:before{content:"\f23f"}.ion-logo-linkedin:before{content:"\f240"}.ion-logo-markdown:before{content:"\f241"}.ion-logo-model-s:before{content:"\f153"}.ion-logo-no-smoking:before{content:"\f109"}.ion-logo-nodejs:before{content:"\f242"}.ion-logo-npm:before{content:"\f195"}.ion-logo-octocat:before{content:"\f243"}.ion-logo-pinterest:before{content:"\f244"}.ion-logo-playstation:before{content:"\f245"}.ion-logo-polymer:before{content:"\f15e"}.ion-logo-python:before{content:"\f246"}.ion-logo-reddit:before{content:"\f247"}.ion-logo-rss:before{content:"\f248"}.ion-logo-sass:before{content:"\f249"}.ion-logo-skype:before{content:"\f24a"}.ion-logo-slack:before{content:"\f10b"}.ion-logo-snapchat:before{content:"\f24b"}.ion-logo-steam:before{content:"\f24c"}.ion-logo-tumblr:before{content:"\f24d"}.ion-logo-tux:before{content:"\f2ae"}.ion-logo-twitch:before{content:"\f2af"}.ion-logo-twitter:before{content:"\f2b0"}.ion-logo-usd:before{content:"\f2b1"}.ion-logo-vimeo:before{content:"\f2c4"}.ion-logo-vk:before{content:"\f10d"}.ion-logo-whatsapp:before{content:"\f2c5"}.ion-logo-windows:before{content:"\f32f"}.ion-logo-wordpress:before{content:"\f330"}.ion-logo-xbox:before{content:"\f34c"}.ion-logo-xing:before{content:"\f10f"}.ion-logo-yahoo:before{content:"\f34d"}.ion-logo-yen:before{content:"\f34e"}.ion-logo-youtube:before{content:"\f34f"}.ion-md-add:before{content:"\f273"}.ion-md-add-circle:before{content:"\f272"}.ion-md-add-circle-outline:before{content:"\f158"}.ion-md-airplane:before{content:"\f15a"}.ion-md-alarm:before{content:"\f274"}.ion-md-albums:before{content:"\f275"}.ion-md-alert:before{content:"\f276"}.ion-md-american-football:before{content:"\f277"}.ion-md-analytics:before{content:"\f278"}.ion-md-aperture:before{content:"\f279"}.ion-md-apps:before{content:"\f27a"}.ion-md-appstore:before{content:"\f27b"}.ion-md-archive:before{content:"\f27c"}.ion-md-arrow-back:before{content:"\f27d"}.ion-md-arrow-down:before{content:"\f27e"}.ion-md-arrow-dropdown:before{content:"\f280"}.ion-md-arrow-dropdown-circle:before{content:"\f27f"}.ion-md-arrow-dropleft:before{content:"\f282"}.ion-md-arrow-dropleft-circle:before{content:"\f281"}.ion-md-arrow-dropright:before{content:"\f284"}.ion-md-arrow-dropright-circle:before{content:"\f283"}.ion-md-arrow-dropup:before{content:"\f286"}.ion-md-arrow-dropup-circle:before{content:"\f285"}.ion-md-arrow-forward:before{content:"\f287"}.ion-md-arrow-round-back:before{content:"\f288"}.ion-md-arrow-round-down:before{content:"\f289"}.ion-md-arrow-round-forward:before{content:"\f28a"}.ion-md-arrow-round-up:before{content:"\f28b"}.ion-md-arrow-up:before{content:"\f28c"}.ion-md-at:before{content:"\f28d"}.ion-md-attach:before{content:"\f28e"}.ion-md-backspace:before{content:"\f28f"}.ion-md-barcode:before{content:"\f290"}.ion-md-baseball:before{content:"\f291"}.ion-md-basket:before{content:"\f292"}.ion-md-basketball:before{content:"\f293"}.ion-md-battery-charging:before{content:"\f294"}.ion-md-battery-dead:before{content:"\f295"}.ion-md-battery-full:before{content:"\f296"}.ion-md-beaker:before{content:"\f297"}.ion-md-bed:before{content:"\f160"}.ion-md-beer:before{content:"\f298"}.ion-md-bicycle:before{content:"\f299"}.ion-md-bluetooth:before{content:"\f29a"}.ion-md-boat:before{content:"\f29b"}.ion-md-body:before{content:"\f29c"}.ion-md-bonfire:before{content:"\f29d"}.ion-md-book:before{content:"\f29e"}.ion-md-bookmark:before{content:"\f29f"}.ion-md-bookmarks:before{content:"\f2a0"}.ion-md-bowtie:before{content:"\f2a1"}.ion-md-briefcase:before{content:"\f2a2"}.ion-md-browsers:before{content:"\f2a3"}.ion-md-brush:before{content:"\f2a4"}.ion-md-bug:before{content:"\f2a5"}.ion-md-build:before{content:"\f2a6"}.ion-md-bulb:before{content:"\f2a7"}.ion-md-bus:before{content:"\f2a8"}.ion-md-business:before{content:"\f1a4"}.ion-md-cafe:before{content:"\f2a9"}.ion-md-calculator:before{content:"\f2aa"}.ion-md-calendar:before{content:"\f2ab"}.ion-md-call:before{content:"\f2ac"}.ion-md-camera:before{content:"\f2ad"}.ion-md-car:before{content:"\f2b2"}.ion-md-card:before{content:"\f2b3"}.ion-md-cart:before{content:"\f2b4"}.ion-md-cash:before{content:"\f2b5"}.ion-md-cellular:before{content:"\f164"}.ion-md-chatboxes:before{content:"\f2b6"}.ion-md-chatbubbles:before{content:"\f2b7"}.ion-md-checkbox:before{content:"\f2b9"}.ion-md-checkbox-outline:before{content:"\f2b8"}.ion-md-checkmark:before{content:"\f2bc"}.ion-md-checkmark-circle:before{content:"\f2bb"}.ion-md-checkmark-circle-outline:before{content:"\f2ba"}.ion-md-clipboard:before{content:"\f2bd"}.ion-md-clock:before{content:"\f2be"}.ion-md-close:before{content:"\f2c0"}.ion-md-close-circle:before{content:"\f2bf"}.ion-md-close-circle-outline:before{content:"\f166"}.ion-md-cloud:before{content:"\f2c9"}.ion-md-cloud-circle:before{content:"\f2c2"}.ion-md-cloud-done:before{content:"\f2c3"}.ion-md-cloud-download:before{content:"\f2c6"}.ion-md-cloud-outline:before{content:"\f2c7"}.ion-md-cloud-upload:before{content:"\f2c8"}.ion-md-cloudy:before{content:"\f2cb"}.ion-md-cloudy-night:before{content:"\f2ca"}.ion-md-code:before{content:"\f2ce"}.ion-md-code-download:before{content:"\f2cc"}.ion-md-code-working:before{content:"\f2cd"}.ion-md-cog:before{content:"\f2cf"}.ion-md-color-fill:before{content:"\f2d0"}.ion-md-color-filter:before{content:"\f2d1"}.ion-md-color-palette:before{content:"\f2d2"}.ion-md-color-wand:before{content:"\f2d3"}.ion-md-compass:before{content:"\f2d4"}.ion-md-construct:before{content:"\f2d5"}.ion-md-contact:before{content:"\f2d6"}.ion-md-contacts:before{content:"\f2d7"}.ion-md-contract:before{content:"\f2d8"}.ion-md-contrast:before{content:"\f2d9"}.ion-md-copy:before{content:"\f2da"}.ion-md-create:before{content:"\f2db"}.ion-md-crop:before{content:"\f2dc"}.ion-md-cube:before{content:"\f2dd"}.ion-md-cut:before{content:"\f2de"}.ion-md-desktop:before{content:"\f2df"}.ion-md-disc:before{content:"\f2e0"}.ion-md-document:before{content:"\f2e1"}.ion-md-done-all:before{content:"\f2e2"}.ion-md-download:before{content:"\f2e3"}.ion-md-easel:before{content:"\f2e4"}.ion-md-egg:before{content:"\f2e5"}.ion-md-exit:before{content:"\f2e6"}.ion-md-expand:before{content:"\f2e7"}.ion-md-eye:before{content:"\f2e9"}.ion-md-eye-off:before{content:"\f2e8"}.ion-md-fastforward:before{content:"\f2ea"}.ion-md-female:before{content:"\f2eb"}.ion-md-filing:before{content:"\f2ec"}.ion-md-film:before{content:"\f2ed"}.ion-md-finger-print:before{content:"\f2ee"}.ion-md-fitness:before{content:"\f1ac"}.ion-md-flag:before{content:"\f2ef"}.ion-md-flame:before{content:"\f2f0"}.ion-md-flash:before{content:"\f2f1"}.ion-md-flash-off:before{content:"\f169"}.ion-md-flashlight:before{content:"\f16b"}.ion-md-flask:before{content:"\f2f2"}.ion-md-flower:before{content:"\f2f3"}.ion-md-folder:before{content:"\f2f5"}.ion-md-folder-open:before{content:"\f2f4"}.ion-md-football:before{content:"\f2f6"}.ion-md-funnel:before{content:"\f2f7"}.ion-md-gift:before{content:"\f199"}.ion-md-git-branch:before{content:"\f2fa"}.ion-md-git-commit:before{content:"\f2fb"}.ion-md-git-compare:before{content:"\f2fc"}.ion-md-git-merge:before{content:"\f2fd"}.ion-md-git-network:before{content:"\f2fe"}.ion-md-git-pull-request:before{content:"\f2ff"}.ion-md-glasses:before{content:"\f300"}.ion-md-globe:before{content:"\f301"}.ion-md-grid:before{content:"\f302"}.ion-md-hammer:before{content:"\f303"}.ion-md-hand:before{content:"\f304"}.ion-md-happy:before{content:"\f305"}.ion-md-headset:before{content:"\f306"}.ion-md-heart:before{content:"\f308"}.ion-md-heart-dislike:before{content:"\f167"}.ion-md-heart-empty:before{content:"\f1a1"}.ion-md-heart-half:before{content:"\f1a2"}.ion-md-help:before{content:"\f30b"}.ion-md-help-buoy:before{content:"\f309"}.ion-md-help-circle:before{content:"\f30a"}.ion-md-help-circle-outline:before{content:"\f16d"}.ion-md-home:before{content:"\f30c"}.ion-md-hourglass:before{content:"\f111"}.ion-md-ice-cream:before{content:"\f30d"}.ion-md-image:before{content:"\f30e"}.ion-md-images:before{content:"\f30f"}.ion-md-infinite:before{content:"\f310"}.ion-md-information:before{content:"\f312"}.ion-md-information-circle:before{content:"\f311"}.ion-md-information-circle-outline:before{content:"\f16f"}.ion-md-jet:before{content:"\f315"}.ion-md-journal:before{content:"\f18d"}.ion-md-key:before{content:"\f316"}.ion-md-keypad:before{content:"\f317"}.ion-md-laptop:before{content:"\f318"}.ion-md-leaf:before{content:"\f319"}.ion-md-link:before{content:"\f22e"}.ion-md-list:before{content:"\f31b"}.ion-md-list-box:before{content:"\f31a"}.ion-md-locate:before{content:"\f31c"}.ion-md-lock:before{content:"\f31d"}.ion-md-log-in:before{content:"\f31e"}.ion-md-log-out:before{content:"\f31f"}.ion-md-magnet:before{content:"\f320"}.ion-md-mail:before{content:"\f322"}.ion-md-mail-open:before{content:"\f321"}.ion-md-mail-unread:before{content:"\f172"}.ion-md-male:before{content:"\f323"}.ion-md-man:before{content:"\f324"}.ion-md-map:before{content:"\f325"}.ion-md-medal:before{content:"\f326"}.ion-md-medical:before{content:"\f327"}.ion-md-medkit:before{content:"\f328"}.ion-md-megaphone:before{content:"\f329"}.ion-md-menu:before{content:"\f32a"}.ion-md-mic:before{content:"\f32c"}.ion-md-mic-off:before{content:"\f32b"}.ion-md-microphone:before{content:"\f32d"}.ion-md-moon:before{content:"\f32e"}.ion-md-more:before{content:"\f1c9"}.ion-md-move:before{content:"\f331"}.ion-md-musical-note:before{content:"\f332"}.ion-md-musical-notes:before{content:"\f333"}.ion-md-navigate:before{content:"\f334"}.ion-md-notifications:before{content:"\f338"}.ion-md-notifications-off:before{content:"\f336"}.ion-md-notifications-outline:before{content:"\f337"}.ion-md-nuclear:before{content:"\f339"}.ion-md-nutrition:before{content:"\f33a"}.ion-md-open:before{content:"\f33b"}.ion-md-options:before{content:"\f33c"}.ion-md-outlet:before{content:"\f33d"}.ion-md-paper:before{content:"\f33f"}.ion-md-paper-plane:before{content:"\f33e"}.ion-md-partly-sunny:before{content:"\f340"}.ion-md-pause:before{content:"\f341"}.ion-md-paw:before{content:"\f342"}.ion-md-people:before{content:"\f343"}.ion-md-person:before{content:"\f345"}.ion-md-person-add:before{content:"\f344"}.ion-md-phone-landscape:before{content:"\f346"}.ion-md-phone-portrait:before{content:"\f347"}.ion-md-photos:before{content:"\f348"}.ion-md-pie:before{content:"\f349"}.ion-md-pin:before{content:"\f34a"}.ion-md-pint:before{content:"\f34b"}.ion-md-pizza:before{content:"\f354"}.ion-md-planet:before{content:"\f356"}.ion-md-play:before{content:"\f357"}.ion-md-play-circle:before{content:"\f174"}.ion-md-podium:before{content:"\f358"}.ion-md-power:before{content:"\f359"}.ion-md-pricetag:before{content:"\f35a"}.ion-md-pricetags:before{content:"\f35b"}.ion-md-print:before{content:"\f35c"}.ion-md-pulse:before{content:"\f35d"}.ion-md-qr-scanner:before{content:"\f35e"}.ion-md-quote:before{content:"\f35f"}.ion-md-radio:before{content:"\f362"}.ion-md-radio-button-off:before{content:"\f360"}.ion-md-radio-button-on:before{content:"\f361"}.ion-md-rainy:before{content:"\f363"}.ion-md-recording:before{content:"\f364"}.ion-md-redo:before{content:"\f365"}.ion-md-refresh:before{content:"\f366"}.ion-md-refresh-circle:before{content:"\f228"}.ion-md-remove:before{content:"\f368"}.ion-md-remove-circle:before{content:"\f367"}.ion-md-remove-circle-outline:before{content:"\f176"}.ion-md-reorder:before{content:"\f369"}.ion-md-repeat:before{content:"\f36a"}.ion-md-resize:before{content:"\f36b"}.ion-md-restaurant:before{content:"\f36c"}.ion-md-return-left:before{content:"\f36d"}.ion-md-return-right:before{content:"\f36e"}.ion-md-reverse-camera:before{content:"\f36f"}.ion-md-rewind:before{content:"\f370"}.ion-md-ribbon:before{content:"\f371"}.ion-md-rocket:before{content:"\f179"}.ion-md-rose:before{content:"\f372"}.ion-md-sad:before{content:"\f373"}.ion-md-save:before{content:"\f1a9"}.ion-md-school:before{content:"\f374"}.ion-md-search:before{content:"\f375"}.ion-md-send:before{content:"\f376"}.ion-md-settings:before{content:"\f377"}.ion-md-share:before{content:"\f379"}.ion-md-share-alt:before{content:"\f378"}.ion-md-shirt:before{content:"\f37a"}.ion-md-shuffle:before{content:"\f37b"}.ion-md-skip-backward:before{content:"\f37c"}.ion-md-skip-forward:before{content:"\f37d"}.ion-md-snow:before{content:"\f37e"}.ion-md-speedometer:before{content:"\f37f"}.ion-md-square:before{content:"\f381"}.ion-md-square-outline:before{content:"\f380"}.ion-md-star:before{content:"\f384"}.ion-md-star-half:before{content:"\f382"}.ion-md-star-outline:before{content:"\f383"}.ion-md-stats:before{content:"\f385"}.ion-md-stopwatch:before{content:"\f386"}.ion-md-subway:before{content:"\f387"}.ion-md-sunny:before{content:"\f388"}.ion-md-swap:before{content:"\f389"}.ion-md-switch:before{content:"\f38a"}.ion-md-sync:before{content:"\f38b"}.ion-md-tablet-landscape:before{content:"\f38c"}.ion-md-tablet-portrait:before{content:"\f38d"}.ion-md-tennisball:before{content:"\f38e"}.ion-md-text:before{content:"\f38f"}.ion-md-thermometer:before{content:"\f390"}.ion-md-thumbs-down:before{content:"\f391"}.ion-md-thumbs-up:before{content:"\f392"}.ion-md-thunderstorm:before{content:"\f393"}.ion-md-time:before{content:"\f394"}.ion-md-timer:before{content:"\f395"}.ion-md-today:before{content:"\f17d"}.ion-md-train:before{content:"\f396"}.ion-md-transgender:before{content:"\f397"}.ion-md-trash:before{content:"\f398"}.ion-md-trending-down:before{content:"\f399"}.ion-md-trending-up:before{content:"\f39a"}.ion-md-trophy:before{content:"\f39b"}.ion-md-tv:before{content:"\f17f"}.ion-md-umbrella:before{content:"\f39c"}.ion-md-undo:before{content:"\f39d"}.ion-md-unlock:before{content:"\f39e"}.ion-md-videocam:before{content:"\f39f"}.ion-md-volume-high:before{content:"\f123"}.ion-md-volume-low:before{content:"\f131"}.ion-md-volume-mute:before{content:"\f3a1"}.ion-md-volume-off:before{content:"\f3a2"}.ion-md-walk:before{content:"\f3a4"}.ion-md-wallet:before{content:"\f18f"}.ion-md-warning:before{content:"\f3a5"}.ion-md-watch:before{content:"\f3a6"}.ion-md-water:before{content:"\f3a7"}.ion-md-wifi:before{content:"\f3a8"}.ion-md-wine:before{content:"\f3a9"}.ion-md-woman:before{content:"\f3aa"} diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.eot b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.eot new file mode 100644 index 0000000..e5e63fc Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.eot differ diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.svg b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.svg new file mode 100644 index 0000000..1a2b39b --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.svg @@ -0,0 +1,2090 @@ + + + + + +Created by FontForge 20170925 at Wed Apr 10 17:18:48 2019 + By Brandy S Carney +Copyright (c) 2019, Brandy S Carney + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.ttf b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.ttf new file mode 100644 index 0000000..a29887b Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.ttf differ diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.woff b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.woff new file mode 100644 index 0000000..d968268 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.woff differ diff --git a/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.woff2 b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.woff2 new file mode 100644 index 0000000..3917647 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/ionicons/fonts/ionicons.woff2 differ diff --git a/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/css/material-design-iconic-font.min.css b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/css/material-design-iconic-font.min.css new file mode 100644 index 0000000..e1a58fe --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/css/material-design-iconic-font.min.css @@ -0,0 +1 @@ +@font-face{font-family:Material-Design-Iconic-Font;src:url(../fonts/Material-Design-Iconic-Font.woff2?v=2.2.0) format('woff2'),url(../fonts/Material-Design-Iconic-Font.woff?v=2.2.0) format('woff'),url(../fonts/Material-Design-Iconic-Font.ttf?v=2.2.0) format('truetype')}.zmdi{display:inline-block;font:normal normal normal 14px/1 'Material-Design-Iconic-Font';font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.zmdi-hc-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.zmdi-hc-2x{font-size:2em}.zmdi-hc-3x{font-size:3em}.zmdi-hc-4x{font-size:4em}.zmdi-hc-5x{font-size:5em}.zmdi-hc-fw{width:1.28571429em;text-align:center}.zmdi-hc-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.zmdi-hc-ul>li{position:relative}.zmdi-hc-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.zmdi-hc-li.zmdi-hc-lg{left:-1.85714286em}.zmdi-hc-border{padding:.1em .25em;border:solid .1em #9e9e9e;border-radius:2px}.zmdi-hc-border-circle{padding:.1em .25em;border:solid .1em #9e9e9e;border-radius:50%}.zmdi.pull-left{float:left;margin-right:.15em}.zmdi.pull-right{float:right;margin-left:.15em}.zmdi-hc-spin{-webkit-animation:zmdi-spin 1.5s infinite linear;animation:zmdi-spin 1.5s infinite linear}.zmdi-hc-spin-reverse{-webkit-animation:zmdi-spin-reverse 1.5s infinite linear;animation:zmdi-spin-reverse 1.5s infinite linear}@-webkit-keyframes zmdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes zmdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes zmdi-spin-reverse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}@keyframes zmdi-spin-reverse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}.zmdi-hc-rotate-90{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.zmdi-hc-rotate-180{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.zmdi-hc-rotate-270{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.zmdi-hc-flip-horizontal{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.zmdi-hc-flip-vertical{-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}.zmdi-hc-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.zmdi-hc-stack-1x,.zmdi-hc-stack-2x{position:absolute;left:0;width:100%;text-align:center}.zmdi-hc-stack-1x{line-height:inherit}.zmdi-hc-stack-2x{font-size:2em}.zmdi-hc-inverse{color:#fff}.zmdi-3d-rotation:before{content:'\f101'}.zmdi-airplane-off:before{content:'\f102'}.zmdi-airplane:before{content:'\f103'}.zmdi-album:before{content:'\f104'}.zmdi-archive:before{content:'\f105'}.zmdi-assignment-account:before{content:'\f106'}.zmdi-assignment-alert:before{content:'\f107'}.zmdi-assignment-check:before{content:'\f108'}.zmdi-assignment-o:before{content:'\f109'}.zmdi-assignment-return:before{content:'\f10a'}.zmdi-assignment-returned:before{content:'\f10b'}.zmdi-assignment:before{content:'\f10c'}.zmdi-attachment-alt:before{content:'\f10d'}.zmdi-attachment:before{content:'\f10e'}.zmdi-audio:before{content:'\f10f'}.zmdi-badge-check:before{content:'\f110'}.zmdi-balance-wallet:before{content:'\f111'}.zmdi-balance:before{content:'\f112'}.zmdi-battery-alert:before{content:'\f113'}.zmdi-battery-flash:before{content:'\f114'}.zmdi-battery-unknown:before{content:'\f115'}.zmdi-battery:before{content:'\f116'}.zmdi-bike:before{content:'\f117'}.zmdi-block-alt:before{content:'\f118'}.zmdi-block:before{content:'\f119'}.zmdi-boat:before{content:'\f11a'}.zmdi-book-image:before{content:'\f11b'}.zmdi-book:before{content:'\f11c'}.zmdi-bookmark-outline:before{content:'\f11d'}.zmdi-bookmark:before{content:'\f11e'}.zmdi-brush:before{content:'\f11f'}.zmdi-bug:before{content:'\f120'}.zmdi-bus:before{content:'\f121'}.zmdi-cake:before{content:'\f122'}.zmdi-car-taxi:before{content:'\f123'}.zmdi-car-wash:before{content:'\f124'}.zmdi-car:before{content:'\f125'}.zmdi-card-giftcard:before{content:'\f126'}.zmdi-card-membership:before{content:'\f127'}.zmdi-card-travel:before{content:'\f128'}.zmdi-card:before{content:'\f129'}.zmdi-case-check:before{content:'\f12a'}.zmdi-case-download:before{content:'\f12b'}.zmdi-case-play:before{content:'\f12c'}.zmdi-case:before{content:'\f12d'}.zmdi-cast-connected:before{content:'\f12e'}.zmdi-cast:before{content:'\f12f'}.zmdi-chart-donut:before{content:'\f130'}.zmdi-chart:before{content:'\f131'}.zmdi-city-alt:before{content:'\f132'}.zmdi-city:before{content:'\f133'}.zmdi-close-circle-o:before{content:'\f134'}.zmdi-close-circle:before{content:'\f135'}.zmdi-close:before{content:'\f136'}.zmdi-cocktail:before{content:'\f137'}.zmdi-code-setting:before{content:'\f138'}.zmdi-code-smartphone:before{content:'\f139'}.zmdi-code:before{content:'\f13a'}.zmdi-coffee:before{content:'\f13b'}.zmdi-collection-bookmark:before{content:'\f13c'}.zmdi-collection-case-play:before{content:'\f13d'}.zmdi-collection-folder-image:before{content:'\f13e'}.zmdi-collection-image-o:before{content:'\f13f'}.zmdi-collection-image:before{content:'\f140'}.zmdi-collection-item-1:before{content:'\f141'}.zmdi-collection-item-2:before{content:'\f142'}.zmdi-collection-item-3:before{content:'\f143'}.zmdi-collection-item-4:before{content:'\f144'}.zmdi-collection-item-5:before{content:'\f145'}.zmdi-collection-item-6:before{content:'\f146'}.zmdi-collection-item-7:before{content:'\f147'}.zmdi-collection-item-8:before{content:'\f148'}.zmdi-collection-item-9-plus:before{content:'\f149'}.zmdi-collection-item-9:before{content:'\f14a'}.zmdi-collection-item:before{content:'\f14b'}.zmdi-collection-music:before{content:'\f14c'}.zmdi-collection-pdf:before{content:'\f14d'}.zmdi-collection-plus:before{content:'\f14e'}.zmdi-collection-speaker:before{content:'\f14f'}.zmdi-collection-text:before{content:'\f150'}.zmdi-collection-video:before{content:'\f151'}.zmdi-compass:before{content:'\f152'}.zmdi-cutlery:before{content:'\f153'}.zmdi-delete:before{content:'\f154'}.zmdi-dialpad:before{content:'\f155'}.zmdi-dns:before{content:'\f156'}.zmdi-drink:before{content:'\f157'}.zmdi-edit:before{content:'\f158'}.zmdi-email-open:before{content:'\f159'}.zmdi-email:before{content:'\f15a'}.zmdi-eye-off:before{content:'\f15b'}.zmdi-eye:before{content:'\f15c'}.zmdi-eyedropper:before{content:'\f15d'}.zmdi-favorite-outline:before{content:'\f15e'}.zmdi-favorite:before{content:'\f15f'}.zmdi-filter-list:before{content:'\f160'}.zmdi-fire:before{content:'\f161'}.zmdi-flag:before{content:'\f162'}.zmdi-flare:before{content:'\f163'}.zmdi-flash-auto:before{content:'\f164'}.zmdi-flash-off:before{content:'\f165'}.zmdi-flash:before{content:'\f166'}.zmdi-flip:before{content:'\f167'}.zmdi-flower-alt:before{content:'\f168'}.zmdi-flower:before{content:'\f169'}.zmdi-font:before{content:'\f16a'}.zmdi-fullscreen-alt:before{content:'\f16b'}.zmdi-fullscreen-exit:before{content:'\f16c'}.zmdi-fullscreen:before{content:'\f16d'}.zmdi-functions:before{content:'\f16e'}.zmdi-gas-station:before{content:'\f16f'}.zmdi-gesture:before{content:'\f170'}.zmdi-globe-alt:before{content:'\f171'}.zmdi-globe-lock:before{content:'\f172'}.zmdi-globe:before{content:'\f173'}.zmdi-graduation-cap:before{content:'\f174'}.zmdi-home:before{content:'\f175'}.zmdi-hospital-alt:before{content:'\f176'}.zmdi-hospital:before{content:'\f177'}.zmdi-hotel:before{content:'\f178'}.zmdi-hourglass-alt:before{content:'\f179'}.zmdi-hourglass-outline:before{content:'\f17a'}.zmdi-hourglass:before{content:'\f17b'}.zmdi-http:before{content:'\f17c'}.zmdi-image-alt:before{content:'\f17d'}.zmdi-image-o:before{content:'\f17e'}.zmdi-image:before{content:'\f17f'}.zmdi-inbox:before{content:'\f180'}.zmdi-invert-colors-off:before{content:'\f181'}.zmdi-invert-colors:before{content:'\f182'}.zmdi-key:before{content:'\f183'}.zmdi-label-alt-outline:before{content:'\f184'}.zmdi-label-alt:before{content:'\f185'}.zmdi-label-heart:before{content:'\f186'}.zmdi-label:before{content:'\f187'}.zmdi-labels:before{content:'\f188'}.zmdi-lamp:before{content:'\f189'}.zmdi-landscape:before{content:'\f18a'}.zmdi-layers-off:before{content:'\f18b'}.zmdi-layers:before{content:'\f18c'}.zmdi-library:before{content:'\f18d'}.zmdi-link:before{content:'\f18e'}.zmdi-lock-open:before{content:'\f18f'}.zmdi-lock-outline:before{content:'\f190'}.zmdi-lock:before{content:'\f191'}.zmdi-mail-reply-all:before{content:'\f192'}.zmdi-mail-reply:before{content:'\f193'}.zmdi-mail-send:before{content:'\f194'}.zmdi-mall:before{content:'\f195'}.zmdi-map:before{content:'\f196'}.zmdi-menu:before{content:'\f197'}.zmdi-money-box:before{content:'\f198'}.zmdi-money-off:before{content:'\f199'}.zmdi-money:before{content:'\f19a'}.zmdi-more-vert:before{content:'\f19b'}.zmdi-more:before{content:'\f19c'}.zmdi-movie-alt:before{content:'\f19d'}.zmdi-movie:before{content:'\f19e'}.zmdi-nature-people:before{content:'\f19f'}.zmdi-nature:before{content:'\f1a0'}.zmdi-navigation:before{content:'\f1a1'}.zmdi-open-in-browser:before{content:'\f1a2'}.zmdi-open-in-new:before{content:'\f1a3'}.zmdi-palette:before{content:'\f1a4'}.zmdi-parking:before{content:'\f1a5'}.zmdi-pin-account:before{content:'\f1a6'}.zmdi-pin-assistant:before{content:'\f1a7'}.zmdi-pin-drop:before{content:'\f1a8'}.zmdi-pin-help:before{content:'\f1a9'}.zmdi-pin-off:before{content:'\f1aa'}.zmdi-pin:before{content:'\f1ab'}.zmdi-pizza:before{content:'\f1ac'}.zmdi-plaster:before{content:'\f1ad'}.zmdi-power-setting:before{content:'\f1ae'}.zmdi-power:before{content:'\f1af'}.zmdi-print:before{content:'\f1b0'}.zmdi-puzzle-piece:before{content:'\f1b1'}.zmdi-quote:before{content:'\f1b2'}.zmdi-railway:before{content:'\f1b3'}.zmdi-receipt:before{content:'\f1b4'}.zmdi-refresh-alt:before{content:'\f1b5'}.zmdi-refresh-sync-alert:before{content:'\f1b6'}.zmdi-refresh-sync-off:before{content:'\f1b7'}.zmdi-refresh-sync:before{content:'\f1b8'}.zmdi-refresh:before{content:'\f1b9'}.zmdi-roller:before{content:'\f1ba'}.zmdi-ruler:before{content:'\f1bb'}.zmdi-scissors:before{content:'\f1bc'}.zmdi-screen-rotation-lock:before{content:'\f1bd'}.zmdi-screen-rotation:before{content:'\f1be'}.zmdi-search-for:before{content:'\f1bf'}.zmdi-search-in-file:before{content:'\f1c0'}.zmdi-search-in-page:before{content:'\f1c1'}.zmdi-search-replace:before{content:'\f1c2'}.zmdi-search:before{content:'\f1c3'}.zmdi-seat:before{content:'\f1c4'}.zmdi-settings-square:before{content:'\f1c5'}.zmdi-settings:before{content:'\f1c6'}.zmdi-shield-check:before{content:'\f1c7'}.zmdi-shield-security:before{content:'\f1c8'}.zmdi-shopping-basket:before{content:'\f1c9'}.zmdi-shopping-cart-plus:before{content:'\f1ca'}.zmdi-shopping-cart:before{content:'\f1cb'}.zmdi-sign-in:before{content:'\f1cc'}.zmdi-sort-amount-asc:before{content:'\f1cd'}.zmdi-sort-amount-desc:before{content:'\f1ce'}.zmdi-sort-asc:before{content:'\f1cf'}.zmdi-sort-desc:before{content:'\f1d0'}.zmdi-spellcheck:before{content:'\f1d1'}.zmdi-storage:before{content:'\f1d2'}.zmdi-store-24:before{content:'\f1d3'}.zmdi-store:before{content:'\f1d4'}.zmdi-subway:before{content:'\f1d5'}.zmdi-sun:before{content:'\f1d6'}.zmdi-tab-unselected:before{content:'\f1d7'}.zmdi-tab:before{content:'\f1d8'}.zmdi-tag-close:before{content:'\f1d9'}.zmdi-tag-more:before{content:'\f1da'}.zmdi-tag:before{content:'\f1db'}.zmdi-thumb-down:before{content:'\f1dc'}.zmdi-thumb-up-down:before{content:'\f1dd'}.zmdi-thumb-up:before{content:'\f1de'}.zmdi-ticket-star:before{content:'\f1df'}.zmdi-toll:before{content:'\f1e0'}.zmdi-toys:before{content:'\f1e1'}.zmdi-traffic:before{content:'\f1e2'}.zmdi-translate:before{content:'\f1e3'}.zmdi-triangle-down:before{content:'\f1e4'}.zmdi-triangle-up:before{content:'\f1e5'}.zmdi-truck:before{content:'\f1e6'}.zmdi-turning-sign:before{content:'\f1e7'}.zmdi-wallpaper:before{content:'\f1e8'}.zmdi-washing-machine:before{content:'\f1e9'}.zmdi-window-maximize:before{content:'\f1ea'}.zmdi-window-minimize:before{content:'\f1eb'}.zmdi-window-restore:before{content:'\f1ec'}.zmdi-wrench:before{content:'\f1ed'}.zmdi-zoom-in:before{content:'\f1ee'}.zmdi-zoom-out:before{content:'\f1ef'}.zmdi-alert-circle-o:before{content:'\f1f0'}.zmdi-alert-circle:before{content:'\f1f1'}.zmdi-alert-octagon:before{content:'\f1f2'}.zmdi-alert-polygon:before{content:'\f1f3'}.zmdi-alert-triangle:before{content:'\f1f4'}.zmdi-help-outline:before{content:'\f1f5'}.zmdi-help:before{content:'\f1f6'}.zmdi-info-outline:before{content:'\f1f7'}.zmdi-info:before{content:'\f1f8'}.zmdi-notifications-active:before{content:'\f1f9'}.zmdi-notifications-add:before{content:'\f1fa'}.zmdi-notifications-none:before{content:'\f1fb'}.zmdi-notifications-off:before{content:'\f1fc'}.zmdi-notifications-paused:before{content:'\f1fd'}.zmdi-notifications:before{content:'\f1fe'}.zmdi-account-add:before{content:'\f1ff'}.zmdi-account-box-mail:before{content:'\f200'}.zmdi-account-box-o:before{content:'\f201'}.zmdi-account-box-phone:before{content:'\f202'}.zmdi-account-box:before{content:'\f203'}.zmdi-account-calendar:before{content:'\f204'}.zmdi-account-circle:before{content:'\f205'}.zmdi-account-o:before{content:'\f206'}.zmdi-account:before{content:'\f207'}.zmdi-accounts-add:before{content:'\f208'}.zmdi-accounts-alt:before{content:'\f209'}.zmdi-accounts-list-alt:before{content:'\f20a'}.zmdi-accounts-list:before{content:'\f20b'}.zmdi-accounts-outline:before{content:'\f20c'}.zmdi-accounts:before{content:'\f20d'}.zmdi-face:before{content:'\f20e'}.zmdi-female:before{content:'\f20f'}.zmdi-male-alt:before{content:'\f210'}.zmdi-male-female:before{content:'\f211'}.zmdi-male:before{content:'\f212'}.zmdi-mood-bad:before{content:'\f213'}.zmdi-mood:before{content:'\f214'}.zmdi-run:before{content:'\f215'}.zmdi-walk:before{content:'\f216'}.zmdi-cloud-box:before{content:'\f217'}.zmdi-cloud-circle:before{content:'\f218'}.zmdi-cloud-done:before{content:'\f219'}.zmdi-cloud-download:before{content:'\f21a'}.zmdi-cloud-off:before{content:'\f21b'}.zmdi-cloud-outline-alt:before{content:'\f21c'}.zmdi-cloud-outline:before{content:'\f21d'}.zmdi-cloud-upload:before{content:'\f21e'}.zmdi-cloud:before{content:'\f21f'}.zmdi-download:before{content:'\f220'}.zmdi-file-plus:before{content:'\f221'}.zmdi-file-text:before{content:'\f222'}.zmdi-file:before{content:'\f223'}.zmdi-folder-outline:before{content:'\f224'}.zmdi-folder-person:before{content:'\f225'}.zmdi-folder-star-alt:before{content:'\f226'}.zmdi-folder-star:before{content:'\f227'}.zmdi-folder:before{content:'\f228'}.zmdi-gif:before{content:'\f229'}.zmdi-upload:before{content:'\f22a'}.zmdi-border-all:before{content:'\f22b'}.zmdi-border-bottom:before{content:'\f22c'}.zmdi-border-clear:before{content:'\f22d'}.zmdi-border-color:before{content:'\f22e'}.zmdi-border-horizontal:before{content:'\f22f'}.zmdi-border-inner:before{content:'\f230'}.zmdi-border-left:before{content:'\f231'}.zmdi-border-outer:before{content:'\f232'}.zmdi-border-right:before{content:'\f233'}.zmdi-border-style:before{content:'\f234'}.zmdi-border-top:before{content:'\f235'}.zmdi-border-vertical:before{content:'\f236'}.zmdi-copy:before{content:'\f237'}.zmdi-crop:before{content:'\f238'}.zmdi-format-align-center:before{content:'\f239'}.zmdi-format-align-justify:before{content:'\f23a'}.zmdi-format-align-left:before{content:'\f23b'}.zmdi-format-align-right:before{content:'\f23c'}.zmdi-format-bold:before{content:'\f23d'}.zmdi-format-clear-all:before{content:'\f23e'}.zmdi-format-clear:before{content:'\f23f'}.zmdi-format-color-fill:before{content:'\f240'}.zmdi-format-color-reset:before{content:'\f241'}.zmdi-format-color-text:before{content:'\f242'}.zmdi-format-indent-decrease:before{content:'\f243'}.zmdi-format-indent-increase:before{content:'\f244'}.zmdi-format-italic:before{content:'\f245'}.zmdi-format-line-spacing:before{content:'\f246'}.zmdi-format-list-bulleted:before{content:'\f247'}.zmdi-format-list-numbered:before{content:'\f248'}.zmdi-format-ltr:before{content:'\f249'}.zmdi-format-rtl:before{content:'\f24a'}.zmdi-format-size:before{content:'\f24b'}.zmdi-format-strikethrough-s:before{content:'\f24c'}.zmdi-format-strikethrough:before{content:'\f24d'}.zmdi-format-subject:before{content:'\f24e'}.zmdi-format-underlined:before{content:'\f24f'}.zmdi-format-valign-bottom:before{content:'\f250'}.zmdi-format-valign-center:before{content:'\f251'}.zmdi-format-valign-top:before{content:'\f252'}.zmdi-redo:before{content:'\f253'}.zmdi-select-all:before{content:'\f254'}.zmdi-space-bar:before{content:'\f255'}.zmdi-text-format:before{content:'\f256'}.zmdi-transform:before{content:'\f257'}.zmdi-undo:before{content:'\f258'}.zmdi-wrap-text:before{content:'\f259'}.zmdi-comment-alert:before{content:'\f25a'}.zmdi-comment-alt-text:before{content:'\f25b'}.zmdi-comment-alt:before{content:'\f25c'}.zmdi-comment-edit:before{content:'\f25d'}.zmdi-comment-image:before{content:'\f25e'}.zmdi-comment-list:before{content:'\f25f'}.zmdi-comment-more:before{content:'\f260'}.zmdi-comment-outline:before{content:'\f261'}.zmdi-comment-text-alt:before{content:'\f262'}.zmdi-comment-text:before{content:'\f263'}.zmdi-comment-video:before{content:'\f264'}.zmdi-comment:before{content:'\f265'}.zmdi-comments:before{content:'\f266'}.zmdi-check-all:before{content:'\f267'}.zmdi-check-circle-u:before{content:'\f268'}.zmdi-check-circle:before{content:'\f269'}.zmdi-check-square:before{content:'\f26a'}.zmdi-check:before{content:'\f26b'}.zmdi-circle-o:before{content:'\f26c'}.zmdi-circle:before{content:'\f26d'}.zmdi-dot-circle-alt:before{content:'\f26e'}.zmdi-dot-circle:before{content:'\f26f'}.zmdi-minus-circle-outline:before{content:'\f270'}.zmdi-minus-circle:before{content:'\f271'}.zmdi-minus-square:before{content:'\f272'}.zmdi-minus:before{content:'\f273'}.zmdi-plus-circle-o-duplicate:before{content:'\f274'}.zmdi-plus-circle-o:before{content:'\f275'}.zmdi-plus-circle:before{content:'\f276'}.zmdi-plus-square:before{content:'\f277'}.zmdi-plus:before{content:'\f278'}.zmdi-square-o:before{content:'\f279'}.zmdi-star-circle:before{content:'\f27a'}.zmdi-star-half:before{content:'\f27b'}.zmdi-star-outline:before{content:'\f27c'}.zmdi-star:before{content:'\f27d'}.zmdi-bluetooth-connected:before{content:'\f27e'}.zmdi-bluetooth-off:before{content:'\f27f'}.zmdi-bluetooth-search:before{content:'\f280'}.zmdi-bluetooth-setting:before{content:'\f281'}.zmdi-bluetooth:before{content:'\f282'}.zmdi-camera-add:before{content:'\f283'}.zmdi-camera-alt:before{content:'\f284'}.zmdi-camera-bw:before{content:'\f285'}.zmdi-camera-front:before{content:'\f286'}.zmdi-camera-mic:before{content:'\f287'}.zmdi-camera-party-mode:before{content:'\f288'}.zmdi-camera-rear:before{content:'\f289'}.zmdi-camera-roll:before{content:'\f28a'}.zmdi-camera-switch:before{content:'\f28b'}.zmdi-camera:before{content:'\f28c'}.zmdi-card-alert:before{content:'\f28d'}.zmdi-card-off:before{content:'\f28e'}.zmdi-card-sd:before{content:'\f28f'}.zmdi-card-sim:before{content:'\f290'}.zmdi-desktop-mac:before{content:'\f291'}.zmdi-desktop-windows:before{content:'\f292'}.zmdi-device-hub:before{content:'\f293'}.zmdi-devices-off:before{content:'\f294'}.zmdi-devices:before{content:'\f295'}.zmdi-dock:before{content:'\f296'}.zmdi-floppy:before{content:'\f297'}.zmdi-gamepad:before{content:'\f298'}.zmdi-gps-dot:before{content:'\f299'}.zmdi-gps-off:before{content:'\f29a'}.zmdi-gps:before{content:'\f29b'}.zmdi-headset-mic:before{content:'\f29c'}.zmdi-headset:before{content:'\f29d'}.zmdi-input-antenna:before{content:'\f29e'}.zmdi-input-composite:before{content:'\f29f'}.zmdi-input-hdmi:before{content:'\f2a0'}.zmdi-input-power:before{content:'\f2a1'}.zmdi-input-svideo:before{content:'\f2a2'}.zmdi-keyboard-hide:before{content:'\f2a3'}.zmdi-keyboard:before{content:'\f2a4'}.zmdi-laptop-chromebook:before{content:'\f2a5'}.zmdi-laptop-mac:before{content:'\f2a6'}.zmdi-laptop:before{content:'\f2a7'}.zmdi-mic-off:before{content:'\f2a8'}.zmdi-mic-outline:before{content:'\f2a9'}.zmdi-mic-setting:before{content:'\f2aa'}.zmdi-mic:before{content:'\f2ab'}.zmdi-mouse:before{content:'\f2ac'}.zmdi-network-alert:before{content:'\f2ad'}.zmdi-network-locked:before{content:'\f2ae'}.zmdi-network-off:before{content:'\f2af'}.zmdi-network-outline:before{content:'\f2b0'}.zmdi-network-setting:before{content:'\f2b1'}.zmdi-network:before{content:'\f2b2'}.zmdi-phone-bluetooth:before{content:'\f2b3'}.zmdi-phone-end:before{content:'\f2b4'}.zmdi-phone-forwarded:before{content:'\f2b5'}.zmdi-phone-in-talk:before{content:'\f2b6'}.zmdi-phone-locked:before{content:'\f2b7'}.zmdi-phone-missed:before{content:'\f2b8'}.zmdi-phone-msg:before{content:'\f2b9'}.zmdi-phone-paused:before{content:'\f2ba'}.zmdi-phone-ring:before{content:'\f2bb'}.zmdi-phone-setting:before{content:'\f2bc'}.zmdi-phone-sip:before{content:'\f2bd'}.zmdi-phone:before{content:'\f2be'}.zmdi-portable-wifi-changes:before{content:'\f2bf'}.zmdi-portable-wifi-off:before{content:'\f2c0'}.zmdi-portable-wifi:before{content:'\f2c1'}.zmdi-radio:before{content:'\f2c2'}.zmdi-reader:before{content:'\f2c3'}.zmdi-remote-control-alt:before{content:'\f2c4'}.zmdi-remote-control:before{content:'\f2c5'}.zmdi-router:before{content:'\f2c6'}.zmdi-scanner:before{content:'\f2c7'}.zmdi-smartphone-android:before{content:'\f2c8'}.zmdi-smartphone-download:before{content:'\f2c9'}.zmdi-smartphone-erase:before{content:'\f2ca'}.zmdi-smartphone-info:before{content:'\f2cb'}.zmdi-smartphone-iphone:before{content:'\f2cc'}.zmdi-smartphone-landscape-lock:before{content:'\f2cd'}.zmdi-smartphone-landscape:before{content:'\f2ce'}.zmdi-smartphone-lock:before{content:'\f2cf'}.zmdi-smartphone-portrait-lock:before{content:'\f2d0'}.zmdi-smartphone-ring:before{content:'\f2d1'}.zmdi-smartphone-setting:before{content:'\f2d2'}.zmdi-smartphone-setup:before{content:'\f2d3'}.zmdi-smartphone:before{content:'\f2d4'}.zmdi-speaker:before{content:'\f2d5'}.zmdi-tablet-android:before{content:'\f2d6'}.zmdi-tablet-mac:before{content:'\f2d7'}.zmdi-tablet:before{content:'\f2d8'}.zmdi-tv-alt-play:before{content:'\f2d9'}.zmdi-tv-list:before{content:'\f2da'}.zmdi-tv-play:before{content:'\f2db'}.zmdi-tv:before{content:'\f2dc'}.zmdi-usb:before{content:'\f2dd'}.zmdi-videocam-off:before{content:'\f2de'}.zmdi-videocam-switch:before{content:'\f2df'}.zmdi-videocam:before{content:'\f2e0'}.zmdi-watch:before{content:'\f2e1'}.zmdi-wifi-alt-2:before{content:'\f2e2'}.zmdi-wifi-alt:before{content:'\f2e3'}.zmdi-wifi-info:before{content:'\f2e4'}.zmdi-wifi-lock:before{content:'\f2e5'}.zmdi-wifi-off:before{content:'\f2e6'}.zmdi-wifi-outline:before{content:'\f2e7'}.zmdi-wifi:before{content:'\f2e8'}.zmdi-arrow-left-bottom:before{content:'\f2e9'}.zmdi-arrow-left:before{content:'\f2ea'}.zmdi-arrow-merge:before{content:'\f2eb'}.zmdi-arrow-missed:before{content:'\f2ec'}.zmdi-arrow-right-top:before{content:'\f2ed'}.zmdi-arrow-right:before{content:'\f2ee'}.zmdi-arrow-split:before{content:'\f2ef'}.zmdi-arrows:before{content:'\f2f0'}.zmdi-caret-down-circle:before{content:'\f2f1'}.zmdi-caret-down:before{content:'\f2f2'}.zmdi-caret-left-circle:before{content:'\f2f3'}.zmdi-caret-left:before{content:'\f2f4'}.zmdi-caret-right-circle:before{content:'\f2f5'}.zmdi-caret-right:before{content:'\f2f6'}.zmdi-caret-up-circle:before{content:'\f2f7'}.zmdi-caret-up:before{content:'\f2f8'}.zmdi-chevron-down:before{content:'\f2f9'}.zmdi-chevron-left:before{content:'\f2fa'}.zmdi-chevron-right:before{content:'\f2fb'}.zmdi-chevron-up:before{content:'\f2fc'}.zmdi-forward:before{content:'\f2fd'}.zmdi-long-arrow-down:before{content:'\f2fe'}.zmdi-long-arrow-left:before{content:'\f2ff'}.zmdi-long-arrow-return:before{content:'\f300'}.zmdi-long-arrow-right:before{content:'\f301'}.zmdi-long-arrow-tab:before{content:'\f302'}.zmdi-long-arrow-up:before{content:'\f303'}.zmdi-rotate-ccw:before{content:'\f304'}.zmdi-rotate-cw:before{content:'\f305'}.zmdi-rotate-left:before{content:'\f306'}.zmdi-rotate-right:before{content:'\f307'}.zmdi-square-down:before{content:'\f308'}.zmdi-square-right:before{content:'\f309'}.zmdi-swap-alt:before{content:'\f30a'}.zmdi-swap-vertical-circle:before{content:'\f30b'}.zmdi-swap-vertical:before{content:'\f30c'}.zmdi-swap:before{content:'\f30d'}.zmdi-trending-down:before{content:'\f30e'}.zmdi-trending-flat:before{content:'\f30f'}.zmdi-trending-up:before{content:'\f310'}.zmdi-unfold-less:before{content:'\f311'}.zmdi-unfold-more:before{content:'\f312'}.zmdi-apps:before{content:'\f313'}.zmdi-grid-off:before{content:'\f314'}.zmdi-grid:before{content:'\f315'}.zmdi-view-agenda:before{content:'\f316'}.zmdi-view-array:before{content:'\f317'}.zmdi-view-carousel:before{content:'\f318'}.zmdi-view-column:before{content:'\f319'}.zmdi-view-comfy:before{content:'\f31a'}.zmdi-view-compact:before{content:'\f31b'}.zmdi-view-dashboard:before{content:'\f31c'}.zmdi-view-day:before{content:'\f31d'}.zmdi-view-headline:before{content:'\f31e'}.zmdi-view-list-alt:before{content:'\f31f'}.zmdi-view-list:before{content:'\f320'}.zmdi-view-module:before{content:'\f321'}.zmdi-view-quilt:before{content:'\f322'}.zmdi-view-stream:before{content:'\f323'}.zmdi-view-subtitles:before{content:'\f324'}.zmdi-view-toc:before{content:'\f325'}.zmdi-view-web:before{content:'\f326'}.zmdi-view-week:before{content:'\f327'}.zmdi-widgets:before{content:'\f328'}.zmdi-alarm-check:before{content:'\f329'}.zmdi-alarm-off:before{content:'\f32a'}.zmdi-alarm-plus:before{content:'\f32b'}.zmdi-alarm-snooze:before{content:'\f32c'}.zmdi-alarm:before{content:'\f32d'}.zmdi-calendar-alt:before{content:'\f32e'}.zmdi-calendar-check:before{content:'\f32f'}.zmdi-calendar-close:before{content:'\f330'}.zmdi-calendar-note:before{content:'\f331'}.zmdi-calendar:before{content:'\f332'}.zmdi-time-countdown:before{content:'\f333'}.zmdi-time-interval:before{content:'\f334'}.zmdi-time-restore-setting:before{content:'\f335'}.zmdi-time-restore:before{content:'\f336'}.zmdi-time:before{content:'\f337'}.zmdi-timer-off:before{content:'\f338'}.zmdi-timer:before{content:'\f339'}.zmdi-android-alt:before{content:'\f33a'}.zmdi-android:before{content:'\f33b'}.zmdi-apple:before{content:'\f33c'}.zmdi-behance:before{content:'\f33d'}.zmdi-codepen:before{content:'\f33e'}.zmdi-dribbble:before{content:'\f33f'}.zmdi-dropbox:before{content:'\f340'}.zmdi-evernote:before{content:'\f341'}.zmdi-facebook-box:before{content:'\f342'}.zmdi-facebook:before{content:'\f343'}.zmdi-github-box:before{content:'\f344'}.zmdi-github:before{content:'\f345'}.zmdi-google-drive:before{content:'\f346'}.zmdi-google-earth:before{content:'\f347'}.zmdi-google-glass:before{content:'\f348'}.zmdi-google-maps:before{content:'\f349'}.zmdi-google-pages:before{content:'\f34a'}.zmdi-google-play:before{content:'\f34b'}.zmdi-google-plus-box:before{content:'\f34c'}.zmdi-google-plus:before{content:'\f34d'}.zmdi-google:before{content:'\f34e'}.zmdi-instagram:before{content:'\f34f'}.zmdi-language-css3:before{content:'\f350'}.zmdi-language-html5:before{content:'\f351'}.zmdi-language-javascript:before{content:'\f352'}.zmdi-language-python-alt:before{content:'\f353'}.zmdi-language-python:before{content:'\f354'}.zmdi-lastfm:before{content:'\f355'}.zmdi-linkedin-box:before{content:'\f356'}.zmdi-paypal:before{content:'\f357'}.zmdi-pinterest-box:before{content:'\f358'}.zmdi-pocket:before{content:'\f359'}.zmdi-polymer:before{content:'\f35a'}.zmdi-share:before{content:'\f35b'}.zmdi-stackoverflow:before{content:'\f35c'}.zmdi-steam-square:before{content:'\f35d'}.zmdi-steam:before{content:'\f35e'}.zmdi-twitter-box:before{content:'\f35f'}.zmdi-twitter:before{content:'\f360'}.zmdi-vk:before{content:'\f361'}.zmdi-wikipedia:before{content:'\f362'}.zmdi-windows:before{content:'\f363'}.zmdi-aspect-ratio-alt:before{content:'\f364'}.zmdi-aspect-ratio:before{content:'\f365'}.zmdi-blur-circular:before{content:'\f366'}.zmdi-blur-linear:before{content:'\f367'}.zmdi-blur-off:before{content:'\f368'}.zmdi-blur:before{content:'\f369'}.zmdi-brightness-2:before{content:'\f36a'}.zmdi-brightness-3:before{content:'\f36b'}.zmdi-brightness-4:before{content:'\f36c'}.zmdi-brightness-5:before{content:'\f36d'}.zmdi-brightness-6:before{content:'\f36e'}.zmdi-brightness-7:before{content:'\f36f'}.zmdi-brightness-auto:before{content:'\f370'}.zmdi-brightness-setting:before{content:'\f371'}.zmdi-broken-image:before{content:'\f372'}.zmdi-center-focus-strong:before{content:'\f373'}.zmdi-center-focus-weak:before{content:'\f374'}.zmdi-compare:before{content:'\f375'}.zmdi-crop-16-9:before{content:'\f376'}.zmdi-crop-3-2:before{content:'\f377'}.zmdi-crop-5-4:before{content:'\f378'}.zmdi-crop-7-5:before{content:'\f379'}.zmdi-crop-din:before{content:'\f37a'}.zmdi-crop-free:before{content:'\f37b'}.zmdi-crop-landscape:before{content:'\f37c'}.zmdi-crop-portrait:before{content:'\f37d'}.zmdi-crop-square:before{content:'\f37e'}.zmdi-exposure-alt:before{content:'\f37f'}.zmdi-exposure:before{content:'\f380'}.zmdi-filter-b-and-w:before{content:'\f381'}.zmdi-filter-center-focus:before{content:'\f382'}.zmdi-filter-frames:before{content:'\f383'}.zmdi-filter-tilt-shift:before{content:'\f384'}.zmdi-gradient:before{content:'\f385'}.zmdi-grain:before{content:'\f386'}.zmdi-graphic-eq:before{content:'\f387'}.zmdi-hdr-off:before{content:'\f388'}.zmdi-hdr-strong:before{content:'\f389'}.zmdi-hdr-weak:before{content:'\f38a'}.zmdi-hdr:before{content:'\f38b'}.zmdi-iridescent:before{content:'\f38c'}.zmdi-leak-off:before{content:'\f38d'}.zmdi-leak:before{content:'\f38e'}.zmdi-looks:before{content:'\f38f'}.zmdi-loupe:before{content:'\f390'}.zmdi-panorama-horizontal:before{content:'\f391'}.zmdi-panorama-vertical:before{content:'\f392'}.zmdi-panorama-wide-angle:before{content:'\f393'}.zmdi-photo-size-select-large:before{content:'\f394'}.zmdi-photo-size-select-small:before{content:'\f395'}.zmdi-picture-in-picture:before{content:'\f396'}.zmdi-slideshow:before{content:'\f397'}.zmdi-texture:before{content:'\f398'}.zmdi-tonality:before{content:'\f399'}.zmdi-vignette:before{content:'\f39a'}.zmdi-wb-auto:before{content:'\f39b'}.zmdi-eject-alt:before{content:'\f39c'}.zmdi-eject:before{content:'\f39d'}.zmdi-equalizer:before{content:'\f39e'}.zmdi-fast-forward:before{content:'\f39f'}.zmdi-fast-rewind:before{content:'\f3a0'}.zmdi-forward-10:before{content:'\f3a1'}.zmdi-forward-30:before{content:'\f3a2'}.zmdi-forward-5:before{content:'\f3a3'}.zmdi-hearing:before{content:'\f3a4'}.zmdi-pause-circle-outline:before{content:'\f3a5'}.zmdi-pause-circle:before{content:'\f3a6'}.zmdi-pause:before{content:'\f3a7'}.zmdi-play-circle-outline:before{content:'\f3a8'}.zmdi-play-circle:before{content:'\f3a9'}.zmdi-play:before{content:'\f3aa'}.zmdi-playlist-audio:before{content:'\f3ab'}.zmdi-playlist-plus:before{content:'\f3ac'}.zmdi-repeat-one:before{content:'\f3ad'}.zmdi-repeat:before{content:'\f3ae'}.zmdi-replay-10:before{content:'\f3af'}.zmdi-replay-30:before{content:'\f3b0'}.zmdi-replay-5:before{content:'\f3b1'}.zmdi-replay:before{content:'\f3b2'}.zmdi-shuffle:before{content:'\f3b3'}.zmdi-skip-next:before{content:'\f3b4'}.zmdi-skip-previous:before{content:'\f3b5'}.zmdi-stop:before{content:'\f3b6'}.zmdi-surround-sound:before{content:'\f3b7'}.zmdi-tune:before{content:'\f3b8'}.zmdi-volume-down:before{content:'\f3b9'}.zmdi-volume-mute:before{content:'\f3ba'}.zmdi-volume-off:before{content:'\f3bb'}.zmdi-volume-up:before{content:'\f3bc'}.zmdi-n-1-square:before{content:'\f3bd'}.zmdi-n-2-square:before{content:'\f3be'}.zmdi-n-3-square:before{content:'\f3bf'}.zmdi-n-4-square:before{content:'\f3c0'}.zmdi-n-5-square:before{content:'\f3c1'}.zmdi-n-6-square:before{content:'\f3c2'}.zmdi-neg-1:before{content:'\f3c3'}.zmdi-neg-2:before{content:'\f3c4'}.zmdi-plus-1:before{content:'\f3c5'}.zmdi-plus-2:before{content:'\f3c6'}.zmdi-sec-10:before{content:'\f3c7'}.zmdi-sec-3:before{content:'\f3c8'}.zmdi-zero:before{content:'\f3c9'}.zmdi-airline-seat-flat-angled:before{content:'\f3ca'}.zmdi-airline-seat-flat:before{content:'\f3cb'}.zmdi-airline-seat-individual-suite:before{content:'\f3cc'}.zmdi-airline-seat-legroom-extra:before{content:'\f3cd'}.zmdi-airline-seat-legroom-normal:before{content:'\f3ce'}.zmdi-airline-seat-legroom-reduced:before{content:'\f3cf'}.zmdi-airline-seat-recline-extra:before{content:'\f3d0'}.zmdi-airline-seat-recline-normal:before{content:'\f3d1'}.zmdi-airplay:before{content:'\f3d2'}.zmdi-closed-caption:before{content:'\f3d3'}.zmdi-confirmation-number:before{content:'\f3d4'}.zmdi-developer-board:before{content:'\f3d5'}.zmdi-disc-full:before{content:'\f3d6'}.zmdi-explicit:before{content:'\f3d7'}.zmdi-flight-land:before{content:'\f3d8'}.zmdi-flight-takeoff:before{content:'\f3d9'}.zmdi-flip-to-back:before{content:'\f3da'}.zmdi-flip-to-front:before{content:'\f3db'}.zmdi-group-work:before{content:'\f3dc'}.zmdi-hd:before{content:'\f3dd'}.zmdi-hq:before{content:'\f3de'}.zmdi-markunread-mailbox:before{content:'\f3df'}.zmdi-memory:before{content:'\f3e0'}.zmdi-nfc:before{content:'\f3e1'}.zmdi-play-for-work:before{content:'\f3e2'}.zmdi-power-input:before{content:'\f3e3'}.zmdi-present-to-all:before{content:'\f3e4'}.zmdi-satellite:before{content:'\f3e5'}.zmdi-tap-and-play:before{content:'\f3e6'}.zmdi-vibration:before{content:'\f3e7'}.zmdi-voicemail:before{content:'\f3e8'}.zmdi-group:before{content:'\f3e9'}.zmdi-rss:before{content:'\f3ea'}.zmdi-shape:before{content:'\f3eb'}.zmdi-spinner:before{content:'\f3ec'}.zmdi-ungroup:before{content:'\f3ed'}.zmdi-500px:before{content:'\f3ee'}.zmdi-8tracks:before{content:'\f3ef'}.zmdi-amazon:before{content:'\f3f0'}.zmdi-blogger:before{content:'\f3f1'}.zmdi-delicious:before{content:'\f3f2'}.zmdi-disqus:before{content:'\f3f3'}.zmdi-flattr:before{content:'\f3f4'}.zmdi-flickr:before{content:'\f3f5'}.zmdi-github-alt:before{content:'\f3f6'}.zmdi-google-old:before{content:'\f3f7'}.zmdi-linkedin:before{content:'\f3f8'}.zmdi-odnoklassniki:before{content:'\f3f9'}.zmdi-outlook:before{content:'\f3fa'}.zmdi-paypal-alt:before{content:'\f3fb'}.zmdi-pinterest:before{content:'\f3fc'}.zmdi-playstation:before{content:'\f3fd'}.zmdi-reddit:before{content:'\f3fe'}.zmdi-skype:before{content:'\f3ff'}.zmdi-slideshare:before{content:'\f400'}.zmdi-soundcloud:before{content:'\f401'}.zmdi-tumblr:before{content:'\f402'}.zmdi-twitch:before{content:'\f403'}.zmdi-vimeo:before{content:'\f404'}.zmdi-whatsapp:before{content:'\f405'}.zmdi-xbox:before{content:'\f406'}.zmdi-yahoo:before{content:'\f407'}.zmdi-youtube-play:before{content:'\f408'}.zmdi-youtube:before{content:'\f409'}.zmdi-3d-rotation:before{content:'\f101'}.zmdi-airplane-off:before{content:'\f102'}.zmdi-airplane:before{content:'\f103'}.zmdi-album:before{content:'\f104'}.zmdi-archive:before{content:'\f105'}.zmdi-assignment-account:before{content:'\f106'}.zmdi-assignment-alert:before{content:'\f107'}.zmdi-assignment-check:before{content:'\f108'}.zmdi-assignment-o:before{content:'\f109'}.zmdi-assignment-return:before{content:'\f10a'}.zmdi-assignment-returned:before{content:'\f10b'}.zmdi-assignment:before{content:'\f10c'}.zmdi-attachment-alt:before{content:'\f10d'}.zmdi-attachment:before{content:'\f10e'}.zmdi-audio:before{content:'\f10f'}.zmdi-badge-check:before{content:'\f110'}.zmdi-balance-wallet:before{content:'\f111'}.zmdi-balance:before{content:'\f112'}.zmdi-battery-alert:before{content:'\f113'}.zmdi-battery-flash:before{content:'\f114'}.zmdi-battery-unknown:before{content:'\f115'}.zmdi-battery:before{content:'\f116'}.zmdi-bike:before{content:'\f117'}.zmdi-block-alt:before{content:'\f118'}.zmdi-block:before{content:'\f119'}.zmdi-boat:before{content:'\f11a'}.zmdi-book-image:before{content:'\f11b'}.zmdi-book:before{content:'\f11c'}.zmdi-bookmark-outline:before{content:'\f11d'}.zmdi-bookmark:before{content:'\f11e'}.zmdi-brush:before{content:'\f11f'}.zmdi-bug:before{content:'\f120'}.zmdi-bus:before{content:'\f121'}.zmdi-cake:before{content:'\f122'}.zmdi-car-taxi:before{content:'\f123'}.zmdi-car-wash:before{content:'\f124'}.zmdi-car:before{content:'\f125'}.zmdi-card-giftcard:before{content:'\f126'}.zmdi-card-membership:before{content:'\f127'}.zmdi-card-travel:before{content:'\f128'}.zmdi-card:before{content:'\f129'}.zmdi-case-check:before{content:'\f12a'}.zmdi-case-download:before{content:'\f12b'}.zmdi-case-play:before{content:'\f12c'}.zmdi-case:before{content:'\f12d'}.zmdi-cast-connected:before{content:'\f12e'}.zmdi-cast:before{content:'\f12f'}.zmdi-chart-donut:before{content:'\f130'}.zmdi-chart:before{content:'\f131'}.zmdi-city-alt:before{content:'\f132'}.zmdi-city:before{content:'\f133'}.zmdi-close-circle-o:before{content:'\f134'}.zmdi-close-circle:before{content:'\f135'}.zmdi-close:before{content:'\f136'}.zmdi-cocktail:before{content:'\f137'}.zmdi-code-setting:before{content:'\f138'}.zmdi-code-smartphone:before{content:'\f139'}.zmdi-code:before{content:'\f13a'}.zmdi-coffee:before{content:'\f13b'}.zmdi-collection-bookmark:before{content:'\f13c'}.zmdi-collection-case-play:before{content:'\f13d'}.zmdi-collection-folder-image:before{content:'\f13e'}.zmdi-collection-image-o:before{content:'\f13f'}.zmdi-collection-image:before{content:'\f140'}.zmdi-collection-item-1:before{content:'\f141'}.zmdi-collection-item-2:before{content:'\f142'}.zmdi-collection-item-3:before{content:'\f143'}.zmdi-collection-item-4:before{content:'\f144'}.zmdi-collection-item-5:before{content:'\f145'}.zmdi-collection-item-6:before{content:'\f146'}.zmdi-collection-item-7:before{content:'\f147'}.zmdi-collection-item-8:before{content:'\f148'}.zmdi-collection-item-9-plus:before{content:'\f149'}.zmdi-collection-item-9:before{content:'\f14a'}.zmdi-collection-item:before{content:'\f14b'}.zmdi-collection-music:before{content:'\f14c'}.zmdi-collection-pdf:before{content:'\f14d'}.zmdi-collection-plus:before{content:'\f14e'}.zmdi-collection-speaker:before{content:'\f14f'}.zmdi-collection-text:before{content:'\f150'}.zmdi-collection-video:before{content:'\f151'}.zmdi-compass:before{content:'\f152'}.zmdi-cutlery:before{content:'\f153'}.zmdi-delete:before{content:'\f154'}.zmdi-dialpad:before{content:'\f155'}.zmdi-dns:before{content:'\f156'}.zmdi-drink:before{content:'\f157'}.zmdi-edit:before{content:'\f158'}.zmdi-email-open:before{content:'\f159'}.zmdi-email:before{content:'\f15a'}.zmdi-eye-off:before{content:'\f15b'}.zmdi-eye:before{content:'\f15c'}.zmdi-eyedropper:before{content:'\f15d'}.zmdi-favorite-outline:before{content:'\f15e'}.zmdi-favorite:before{content:'\f15f'}.zmdi-filter-list:before{content:'\f160'}.zmdi-fire:before{content:'\f161'}.zmdi-flag:before{content:'\f162'}.zmdi-flare:before{content:'\f163'}.zmdi-flash-auto:before{content:'\f164'}.zmdi-flash-off:before{content:'\f165'}.zmdi-flash:before{content:'\f166'}.zmdi-flip:before{content:'\f167'}.zmdi-flower-alt:before{content:'\f168'}.zmdi-flower:before{content:'\f169'}.zmdi-font:before{content:'\f16a'}.zmdi-fullscreen-alt:before{content:'\f16b'}.zmdi-fullscreen-exit:before{content:'\f16c'}.zmdi-fullscreen:before{content:'\f16d'}.zmdi-functions:before{content:'\f16e'}.zmdi-gas-station:before{content:'\f16f'}.zmdi-gesture:before{content:'\f170'}.zmdi-globe-alt:before{content:'\f171'}.zmdi-globe-lock:before{content:'\f172'}.zmdi-globe:before{content:'\f173'}.zmdi-graduation-cap:before{content:'\f174'}.zmdi-home:before{content:'\f175'}.zmdi-hospital-alt:before{content:'\f176'}.zmdi-hospital:before{content:'\f177'}.zmdi-hotel:before{content:'\f178'}.zmdi-hourglass-alt:before{content:'\f179'}.zmdi-hourglass-outline:before{content:'\f17a'}.zmdi-hourglass:before{content:'\f17b'}.zmdi-http:before{content:'\f17c'}.zmdi-image-alt:before{content:'\f17d'}.zmdi-image-o:before{content:'\f17e'}.zmdi-image:before{content:'\f17f'}.zmdi-inbox:before{content:'\f180'}.zmdi-invert-colors-off:before{content:'\f181'}.zmdi-invert-colors:before{content:'\f182'}.zmdi-key:before{content:'\f183'}.zmdi-label-alt-outline:before{content:'\f184'}.zmdi-label-alt:before{content:'\f185'}.zmdi-label-heart:before{content:'\f186'}.zmdi-label:before{content:'\f187'}.zmdi-labels:before{content:'\f188'}.zmdi-lamp:before{content:'\f189'}.zmdi-landscape:before{content:'\f18a'}.zmdi-layers-off:before{content:'\f18b'}.zmdi-layers:before{content:'\f18c'}.zmdi-library:before{content:'\f18d'}.zmdi-link:before{content:'\f18e'}.zmdi-lock-open:before{content:'\f18f'}.zmdi-lock-outline:before{content:'\f190'}.zmdi-lock:before{content:'\f191'}.zmdi-mail-reply-all:before{content:'\f192'}.zmdi-mail-reply:before{content:'\f193'}.zmdi-mail-send:before{content:'\f194'}.zmdi-mall:before{content:'\f195'}.zmdi-map:before{content:'\f196'}.zmdi-menu:before{content:'\f197'}.zmdi-money-box:before{content:'\f198'}.zmdi-money-off:before{content:'\f199'}.zmdi-money:before{content:'\f19a'}.zmdi-more-vert:before{content:'\f19b'}.zmdi-more:before{content:'\f19c'}.zmdi-movie-alt:before{content:'\f19d'}.zmdi-movie:before{content:'\f19e'}.zmdi-nature-people:before{content:'\f19f'}.zmdi-nature:before{content:'\f1a0'}.zmdi-navigation:before{content:'\f1a1'}.zmdi-open-in-browser:before{content:'\f1a2'}.zmdi-open-in-new:before{content:'\f1a3'}.zmdi-palette:before{content:'\f1a4'}.zmdi-parking:before{content:'\f1a5'}.zmdi-pin-account:before{content:'\f1a6'}.zmdi-pin-assistant:before{content:'\f1a7'}.zmdi-pin-drop:before{content:'\f1a8'}.zmdi-pin-help:before{content:'\f1a9'}.zmdi-pin-off:before{content:'\f1aa'}.zmdi-pin:before{content:'\f1ab'}.zmdi-pizza:before{content:'\f1ac'}.zmdi-plaster:before{content:'\f1ad'}.zmdi-power-setting:before{content:'\f1ae'}.zmdi-power:before{content:'\f1af'}.zmdi-print:before{content:'\f1b0'}.zmdi-puzzle-piece:before{content:'\f1b1'}.zmdi-quote:before{content:'\f1b2'}.zmdi-railway:before{content:'\f1b3'}.zmdi-receipt:before{content:'\f1b4'}.zmdi-refresh-alt:before{content:'\f1b5'}.zmdi-refresh-sync-alert:before{content:'\f1b6'}.zmdi-refresh-sync-off:before{content:'\f1b7'}.zmdi-refresh-sync:before{content:'\f1b8'}.zmdi-refresh:before{content:'\f1b9'}.zmdi-roller:before{content:'\f1ba'}.zmdi-ruler:before{content:'\f1bb'}.zmdi-scissors:before{content:'\f1bc'}.zmdi-screen-rotation-lock:before{content:'\f1bd'}.zmdi-screen-rotation:before{content:'\f1be'}.zmdi-search-for:before{content:'\f1bf'}.zmdi-search-in-file:before{content:'\f1c0'}.zmdi-search-in-page:before{content:'\f1c1'}.zmdi-search-replace:before{content:'\f1c2'}.zmdi-search:before{content:'\f1c3'}.zmdi-seat:before{content:'\f1c4'}.zmdi-settings-square:before{content:'\f1c5'}.zmdi-settings:before{content:'\f1c6'}.zmdi-shield-check:before{content:'\f1c7'}.zmdi-shield-security:before{content:'\f1c8'}.zmdi-shopping-basket:before{content:'\f1c9'}.zmdi-shopping-cart-plus:before{content:'\f1ca'}.zmdi-shopping-cart:before{content:'\f1cb'}.zmdi-sign-in:before{content:'\f1cc'}.zmdi-sort-amount-asc:before{content:'\f1cd'}.zmdi-sort-amount-desc:before{content:'\f1ce'}.zmdi-sort-asc:before{content:'\f1cf'}.zmdi-sort-desc:before{content:'\f1d0'}.zmdi-spellcheck:before{content:'\f1d1'}.zmdi-storage:before{content:'\f1d2'}.zmdi-store-24:before{content:'\f1d3'}.zmdi-store:before{content:'\f1d4'}.zmdi-subway:before{content:'\f1d5'}.zmdi-sun:before{content:'\f1d6'}.zmdi-tab-unselected:before{content:'\f1d7'}.zmdi-tab:before{content:'\f1d8'}.zmdi-tag-close:before{content:'\f1d9'}.zmdi-tag-more:before{content:'\f1da'}.zmdi-tag:before{content:'\f1db'}.zmdi-thumb-down:before{content:'\f1dc'}.zmdi-thumb-up-down:before{content:'\f1dd'}.zmdi-thumb-up:before{content:'\f1de'}.zmdi-ticket-star:before{content:'\f1df'}.zmdi-toll:before{content:'\f1e0'}.zmdi-toys:before{content:'\f1e1'}.zmdi-traffic:before{content:'\f1e2'}.zmdi-translate:before{content:'\f1e3'}.zmdi-triangle-down:before{content:'\f1e4'}.zmdi-triangle-up:before{content:'\f1e5'}.zmdi-truck:before{content:'\f1e6'}.zmdi-turning-sign:before{content:'\f1e7'}.zmdi-wallpaper:before{content:'\f1e8'}.zmdi-washing-machine:before{content:'\f1e9'}.zmdi-window-maximize:before{content:'\f1ea'}.zmdi-window-minimize:before{content:'\f1eb'}.zmdi-window-restore:before{content:'\f1ec'}.zmdi-wrench:before{content:'\f1ed'}.zmdi-zoom-in:before{content:'\f1ee'}.zmdi-zoom-out:before{content:'\f1ef'}.zmdi-alert-circle-o:before{content:'\f1f0'}.zmdi-alert-circle:before{content:'\f1f1'}.zmdi-alert-octagon:before{content:'\f1f2'}.zmdi-alert-polygon:before{content:'\f1f3'}.zmdi-alert-triangle:before{content:'\f1f4'}.zmdi-help-outline:before{content:'\f1f5'}.zmdi-help:before{content:'\f1f6'}.zmdi-info-outline:before{content:'\f1f7'}.zmdi-info:before{content:'\f1f8'}.zmdi-notifications-active:before{content:'\f1f9'}.zmdi-notifications-add:before{content:'\f1fa'}.zmdi-notifications-none:before{content:'\f1fb'}.zmdi-notifications-off:before{content:'\f1fc'}.zmdi-notifications-paused:before{content:'\f1fd'}.zmdi-notifications:before{content:'\f1fe'}.zmdi-account-add:before{content:'\f1ff'}.zmdi-account-box-mail:before{content:'\f200'}.zmdi-account-box-o:before{content:'\f201'}.zmdi-account-box-phone:before{content:'\f202'}.zmdi-account-box:before{content:'\f203'}.zmdi-account-calendar:before{content:'\f204'}.zmdi-account-circle:before{content:'\f205'}.zmdi-account-o:before{content:'\f206'}.zmdi-account:before{content:'\f207'}.zmdi-accounts-add:before{content:'\f208'}.zmdi-accounts-alt:before{content:'\f209'}.zmdi-accounts-list-alt:before{content:'\f20a'}.zmdi-accounts-list:before{content:'\f20b'}.zmdi-accounts-outline:before{content:'\f20c'}.zmdi-accounts:before{content:'\f20d'}.zmdi-face:before{content:'\f20e'}.zmdi-female:before{content:'\f20f'}.zmdi-male-alt:before{content:'\f210'}.zmdi-male-female:before{content:'\f211'}.zmdi-male:before{content:'\f212'}.zmdi-mood-bad:before{content:'\f213'}.zmdi-mood:before{content:'\f214'}.zmdi-run:before{content:'\f215'}.zmdi-walk:before{content:'\f216'}.zmdi-cloud-box:before{content:'\f217'}.zmdi-cloud-circle:before{content:'\f218'}.zmdi-cloud-done:before{content:'\f219'}.zmdi-cloud-download:before{content:'\f21a'}.zmdi-cloud-off:before{content:'\f21b'}.zmdi-cloud-outline-alt:before{content:'\f21c'}.zmdi-cloud-outline:before{content:'\f21d'}.zmdi-cloud-upload:before{content:'\f21e'}.zmdi-cloud:before{content:'\f21f'}.zmdi-download:before{content:'\f220'}.zmdi-file-plus:before{content:'\f221'}.zmdi-file-text:before{content:'\f222'}.zmdi-file:before{content:'\f223'}.zmdi-folder-outline:before{content:'\f224'}.zmdi-folder-person:before{content:'\f225'}.zmdi-folder-star-alt:before{content:'\f226'}.zmdi-folder-star:before{content:'\f227'}.zmdi-folder:before{content:'\f228'}.zmdi-gif:before{content:'\f229'}.zmdi-upload:before{content:'\f22a'}.zmdi-border-all:before{content:'\f22b'}.zmdi-border-bottom:before{content:'\f22c'}.zmdi-border-clear:before{content:'\f22d'}.zmdi-border-color:before{content:'\f22e'}.zmdi-border-horizontal:before{content:'\f22f'}.zmdi-border-inner:before{content:'\f230'}.zmdi-border-left:before{content:'\f231'}.zmdi-border-outer:before{content:'\f232'}.zmdi-border-right:before{content:'\f233'}.zmdi-border-style:before{content:'\f234'}.zmdi-border-top:before{content:'\f235'}.zmdi-border-vertical:before{content:'\f236'}.zmdi-copy:before{content:'\f237'}.zmdi-crop:before{content:'\f238'}.zmdi-format-align-center:before{content:'\f239'}.zmdi-format-align-justify:before{content:'\f23a'}.zmdi-format-align-left:before{content:'\f23b'}.zmdi-format-align-right:before{content:'\f23c'}.zmdi-format-bold:before{content:'\f23d'}.zmdi-format-clear-all:before{content:'\f23e'}.zmdi-format-clear:before{content:'\f23f'}.zmdi-format-color-fill:before{content:'\f240'}.zmdi-format-color-reset:before{content:'\f241'}.zmdi-format-color-text:before{content:'\f242'}.zmdi-format-indent-decrease:before{content:'\f243'}.zmdi-format-indent-increase:before{content:'\f244'}.zmdi-format-italic:before{content:'\f245'}.zmdi-format-line-spacing:before{content:'\f246'}.zmdi-format-list-bulleted:before{content:'\f247'}.zmdi-format-list-numbered:before{content:'\f248'}.zmdi-format-ltr:before{content:'\f249'}.zmdi-format-rtl:before{content:'\f24a'}.zmdi-format-size:before{content:'\f24b'}.zmdi-format-strikethrough-s:before{content:'\f24c'}.zmdi-format-strikethrough:before{content:'\f24d'}.zmdi-format-subject:before{content:'\f24e'}.zmdi-format-underlined:before{content:'\f24f'}.zmdi-format-valign-bottom:before{content:'\f250'}.zmdi-format-valign-center:before{content:'\f251'}.zmdi-format-valign-top:before{content:'\f252'}.zmdi-redo:before{content:'\f253'}.zmdi-select-all:before{content:'\f254'}.zmdi-space-bar:before{content:'\f255'}.zmdi-text-format:before{content:'\f256'}.zmdi-transform:before{content:'\f257'}.zmdi-undo:before{content:'\f258'}.zmdi-wrap-text:before{content:'\f259'}.zmdi-comment-alert:before{content:'\f25a'}.zmdi-comment-alt-text:before{content:'\f25b'}.zmdi-comment-alt:before{content:'\f25c'}.zmdi-comment-edit:before{content:'\f25d'}.zmdi-comment-image:before{content:'\f25e'}.zmdi-comment-list:before{content:'\f25f'}.zmdi-comment-more:before{content:'\f260'}.zmdi-comment-outline:before{content:'\f261'}.zmdi-comment-text-alt:before{content:'\f262'}.zmdi-comment-text:before{content:'\f263'}.zmdi-comment-video:before{content:'\f264'}.zmdi-comment:before{content:'\f265'}.zmdi-comments:before{content:'\f266'}.zmdi-check-all:before{content:'\f267'}.zmdi-check-circle-u:before{content:'\f268'}.zmdi-check-circle:before{content:'\f269'}.zmdi-check-square:before{content:'\f26a'}.zmdi-check:before{content:'\f26b'}.zmdi-circle-o:before{content:'\f26c'}.zmdi-circle:before{content:'\f26d'}.zmdi-dot-circle-alt:before{content:'\f26e'}.zmdi-dot-circle:before{content:'\f26f'}.zmdi-minus-circle-outline:before{content:'\f270'}.zmdi-minus-circle:before{content:'\f271'}.zmdi-minus-square:before{content:'\f272'}.zmdi-minus:before{content:'\f273'}.zmdi-plus-circle-o-duplicate:before{content:'\f274'}.zmdi-plus-circle-o:before{content:'\f275'}.zmdi-plus-circle:before{content:'\f276'}.zmdi-plus-square:before{content:'\f277'}.zmdi-plus:before{content:'\f278'}.zmdi-square-o:before{content:'\f279'}.zmdi-star-circle:before{content:'\f27a'}.zmdi-star-half:before{content:'\f27b'}.zmdi-star-outline:before{content:'\f27c'}.zmdi-star:before{content:'\f27d'}.zmdi-bluetooth-connected:before{content:'\f27e'}.zmdi-bluetooth-off:before{content:'\f27f'}.zmdi-bluetooth-search:before{content:'\f280'}.zmdi-bluetooth-setting:before{content:'\f281'}.zmdi-bluetooth:before{content:'\f282'}.zmdi-camera-add:before{content:'\f283'}.zmdi-camera-alt:before{content:'\f284'}.zmdi-camera-bw:before{content:'\f285'}.zmdi-camera-front:before{content:'\f286'}.zmdi-camera-mic:before{content:'\f287'}.zmdi-camera-party-mode:before{content:'\f288'}.zmdi-camera-rear:before{content:'\f289'}.zmdi-camera-roll:before{content:'\f28a'}.zmdi-camera-switch:before{content:'\f28b'}.zmdi-camera:before{content:'\f28c'}.zmdi-card-alert:before{content:'\f28d'}.zmdi-card-off:before{content:'\f28e'}.zmdi-card-sd:before{content:'\f28f'}.zmdi-card-sim:before{content:'\f290'}.zmdi-desktop-mac:before{content:'\f291'}.zmdi-desktop-windows:before{content:'\f292'}.zmdi-device-hub:before{content:'\f293'}.zmdi-devices-off:before{content:'\f294'}.zmdi-devices:before{content:'\f295'}.zmdi-dock:before{content:'\f296'}.zmdi-floppy:before{content:'\f297'}.zmdi-gamepad:before{content:'\f298'}.zmdi-gps-dot:before{content:'\f299'}.zmdi-gps-off:before{content:'\f29a'}.zmdi-gps:before{content:'\f29b'}.zmdi-headset-mic:before{content:'\f29c'}.zmdi-headset:before{content:'\f29d'}.zmdi-input-antenna:before{content:'\f29e'}.zmdi-input-composite:before{content:'\f29f'}.zmdi-input-hdmi:before{content:'\f2a0'}.zmdi-input-power:before{content:'\f2a1'}.zmdi-input-svideo:before{content:'\f2a2'}.zmdi-keyboard-hide:before{content:'\f2a3'}.zmdi-keyboard:before{content:'\f2a4'}.zmdi-laptop-chromebook:before{content:'\f2a5'}.zmdi-laptop-mac:before{content:'\f2a6'}.zmdi-laptop:before{content:'\f2a7'}.zmdi-mic-off:before{content:'\f2a8'}.zmdi-mic-outline:before{content:'\f2a9'}.zmdi-mic-setting:before{content:'\f2aa'}.zmdi-mic:before{content:'\f2ab'}.zmdi-mouse:before{content:'\f2ac'}.zmdi-network-alert:before{content:'\f2ad'}.zmdi-network-locked:before{content:'\f2ae'}.zmdi-network-off:before{content:'\f2af'}.zmdi-network-outline:before{content:'\f2b0'}.zmdi-network-setting:before{content:'\f2b1'}.zmdi-network:before{content:'\f2b2'}.zmdi-phone-bluetooth:before{content:'\f2b3'}.zmdi-phone-end:before{content:'\f2b4'}.zmdi-phone-forwarded:before{content:'\f2b5'}.zmdi-phone-in-talk:before{content:'\f2b6'}.zmdi-phone-locked:before{content:'\f2b7'}.zmdi-phone-missed:before{content:'\f2b8'}.zmdi-phone-msg:before{content:'\f2b9'}.zmdi-phone-paused:before{content:'\f2ba'}.zmdi-phone-ring:before{content:'\f2bb'}.zmdi-phone-setting:before{content:'\f2bc'}.zmdi-phone-sip:before{content:'\f2bd'}.zmdi-phone:before{content:'\f2be'}.zmdi-portable-wifi-changes:before{content:'\f2bf'}.zmdi-portable-wifi-off:before{content:'\f2c0'}.zmdi-portable-wifi:before{content:'\f2c1'}.zmdi-radio:before{content:'\f2c2'}.zmdi-reader:before{content:'\f2c3'}.zmdi-remote-control-alt:before{content:'\f2c4'}.zmdi-remote-control:before{content:'\f2c5'}.zmdi-router:before{content:'\f2c6'}.zmdi-scanner:before{content:'\f2c7'}.zmdi-smartphone-android:before{content:'\f2c8'}.zmdi-smartphone-download:before{content:'\f2c9'}.zmdi-smartphone-erase:before{content:'\f2ca'}.zmdi-smartphone-info:before{content:'\f2cb'}.zmdi-smartphone-iphone:before{content:'\f2cc'}.zmdi-smartphone-landscape-lock:before{content:'\f2cd'}.zmdi-smartphone-landscape:before{content:'\f2ce'}.zmdi-smartphone-lock:before{content:'\f2cf'}.zmdi-smartphone-portrait-lock:before{content:'\f2d0'}.zmdi-smartphone-ring:before{content:'\f2d1'}.zmdi-smartphone-setting:before{content:'\f2d2'}.zmdi-smartphone-setup:before{content:'\f2d3'}.zmdi-smartphone:before{content:'\f2d4'}.zmdi-speaker:before{content:'\f2d5'}.zmdi-tablet-android:before{content:'\f2d6'}.zmdi-tablet-mac:before{content:'\f2d7'}.zmdi-tablet:before{content:'\f2d8'}.zmdi-tv-alt-play:before{content:'\f2d9'}.zmdi-tv-list:before{content:'\f2da'}.zmdi-tv-play:before{content:'\f2db'}.zmdi-tv:before{content:'\f2dc'}.zmdi-usb:before{content:'\f2dd'}.zmdi-videocam-off:before{content:'\f2de'}.zmdi-videocam-switch:before{content:'\f2df'}.zmdi-videocam:before{content:'\f2e0'}.zmdi-watch:before{content:'\f2e1'}.zmdi-wifi-alt-2:before{content:'\f2e2'}.zmdi-wifi-alt:before{content:'\f2e3'}.zmdi-wifi-info:before{content:'\f2e4'}.zmdi-wifi-lock:before{content:'\f2e5'}.zmdi-wifi-off:before{content:'\f2e6'}.zmdi-wifi-outline:before{content:'\f2e7'}.zmdi-wifi:before{content:'\f2e8'}.zmdi-arrow-left-bottom:before{content:'\f2e9'}.zmdi-arrow-left:before{content:'\f2ea'}.zmdi-arrow-merge:before{content:'\f2eb'}.zmdi-arrow-missed:before{content:'\f2ec'}.zmdi-arrow-right-top:before{content:'\f2ed'}.zmdi-arrow-right:before{content:'\f2ee'}.zmdi-arrow-split:before{content:'\f2ef'}.zmdi-arrows:before{content:'\f2f0'}.zmdi-caret-down-circle:before{content:'\f2f1'}.zmdi-caret-down:before{content:'\f2f2'}.zmdi-caret-left-circle:before{content:'\f2f3'}.zmdi-caret-left:before{content:'\f2f4'}.zmdi-caret-right-circle:before{content:'\f2f5'}.zmdi-caret-right:before{content:'\f2f6'}.zmdi-caret-up-circle:before{content:'\f2f7'}.zmdi-caret-up:before{content:'\f2f8'}.zmdi-chevron-down:before{content:'\f2f9'}.zmdi-chevron-left:before{content:'\f2fa'}.zmdi-chevron-right:before{content:'\f2fb'}.zmdi-chevron-up:before{content:'\f2fc'}.zmdi-forward:before{content:'\f2fd'}.zmdi-long-arrow-down:before{content:'\f2fe'}.zmdi-long-arrow-left:before{content:'\f2ff'}.zmdi-long-arrow-return:before{content:'\f300'}.zmdi-long-arrow-right:before{content:'\f301'}.zmdi-long-arrow-tab:before{content:'\f302'}.zmdi-long-arrow-up:before{content:'\f303'}.zmdi-rotate-ccw:before{content:'\f304'}.zmdi-rotate-cw:before{content:'\f305'}.zmdi-rotate-left:before{content:'\f306'}.zmdi-rotate-right:before{content:'\f307'}.zmdi-square-down:before{content:'\f308'}.zmdi-square-right:before{content:'\f309'}.zmdi-swap-alt:before{content:'\f30a'}.zmdi-swap-vertical-circle:before{content:'\f30b'}.zmdi-swap-vertical:before{content:'\f30c'}.zmdi-swap:before{content:'\f30d'}.zmdi-trending-down:before{content:'\f30e'}.zmdi-trending-flat:before{content:'\f30f'}.zmdi-trending-up:before{content:'\f310'}.zmdi-unfold-less:before{content:'\f311'}.zmdi-unfold-more:before{content:'\f312'}.zmdi-apps:before{content:'\f313'}.zmdi-grid-off:before{content:'\f314'}.zmdi-grid:before{content:'\f315'}.zmdi-view-agenda:before{content:'\f316'}.zmdi-view-array:before{content:'\f317'}.zmdi-view-carousel:before{content:'\f318'}.zmdi-view-column:before{content:'\f319'}.zmdi-view-comfy:before{content:'\f31a'}.zmdi-view-compact:before{content:'\f31b'}.zmdi-view-dashboard:before{content:'\f31c'}.zmdi-view-day:before{content:'\f31d'}.zmdi-view-headline:before{content:'\f31e'}.zmdi-view-list-alt:before{content:'\f31f'}.zmdi-view-list:before{content:'\f320'}.zmdi-view-module:before{content:'\f321'}.zmdi-view-quilt:before{content:'\f322'}.zmdi-view-stream:before{content:'\f323'}.zmdi-view-subtitles:before{content:'\f324'}.zmdi-view-toc:before{content:'\f325'}.zmdi-view-web:before{content:'\f326'}.zmdi-view-week:before{content:'\f327'}.zmdi-widgets:before{content:'\f328'}.zmdi-alarm-check:before{content:'\f329'}.zmdi-alarm-off:before{content:'\f32a'}.zmdi-alarm-plus:before{content:'\f32b'}.zmdi-alarm-snooze:before{content:'\f32c'}.zmdi-alarm:before{content:'\f32d'}.zmdi-calendar-alt:before{content:'\f32e'}.zmdi-calendar-check:before{content:'\f32f'}.zmdi-calendar-close:before{content:'\f330'}.zmdi-calendar-note:before{content:'\f331'}.zmdi-calendar:before{content:'\f332'}.zmdi-time-countdown:before{content:'\f333'}.zmdi-time-interval:before{content:'\f334'}.zmdi-time-restore-setting:before{content:'\f335'}.zmdi-time-restore:before{content:'\f336'}.zmdi-time:before{content:'\f337'}.zmdi-timer-off:before{content:'\f338'}.zmdi-timer:before{content:'\f339'}.zmdi-android-alt:before{content:'\f33a'}.zmdi-android:before{content:'\f33b'}.zmdi-apple:before{content:'\f33c'}.zmdi-behance:before{content:'\f33d'}.zmdi-codepen:before{content:'\f33e'}.zmdi-dribbble:before{content:'\f33f'}.zmdi-dropbox:before{content:'\f340'}.zmdi-evernote:before{content:'\f341'}.zmdi-facebook-box:before{content:'\f342'}.zmdi-facebook:before{content:'\f343'}.zmdi-github-box:before{content:'\f344'}.zmdi-github:before{content:'\f345'}.zmdi-google-drive:before{content:'\f346'}.zmdi-google-earth:before{content:'\f347'}.zmdi-google-glass:before{content:'\f348'}.zmdi-google-maps:before{content:'\f349'}.zmdi-google-pages:before{content:'\f34a'}.zmdi-google-play:before{content:'\f34b'}.zmdi-google-plus-box:before{content:'\f34c'}.zmdi-google-plus:before{content:'\f34d'}.zmdi-google:before{content:'\f34e'}.zmdi-instagram:before{content:'\f34f'}.zmdi-language-css3:before{content:'\f350'}.zmdi-language-html5:before{content:'\f351'}.zmdi-language-javascript:before{content:'\f352'}.zmdi-language-python-alt:before{content:'\f353'}.zmdi-language-python:before{content:'\f354'}.zmdi-lastfm:before{content:'\f355'}.zmdi-linkedin-box:before{content:'\f356'}.zmdi-paypal:before{content:'\f357'}.zmdi-pinterest-box:before{content:'\f358'}.zmdi-pocket:before{content:'\f359'}.zmdi-polymer:before{content:'\f35a'}.zmdi-share:before{content:'\f35b'}.zmdi-stackoverflow:before{content:'\f35c'}.zmdi-steam-square:before{content:'\f35d'}.zmdi-steam:before{content:'\f35e'}.zmdi-twitter-box:before{content:'\f35f'}.zmdi-twitter:before{content:'\f360'}.zmdi-vk:before{content:'\f361'}.zmdi-wikipedia:before{content:'\f362'}.zmdi-windows:before{content:'\f363'}.zmdi-aspect-ratio-alt:before{content:'\f364'}.zmdi-aspect-ratio:before{content:'\f365'}.zmdi-blur-circular:before{content:'\f366'}.zmdi-blur-linear:before{content:'\f367'}.zmdi-blur-off:before{content:'\f368'}.zmdi-blur:before{content:'\f369'}.zmdi-brightness-2:before{content:'\f36a'}.zmdi-brightness-3:before{content:'\f36b'}.zmdi-brightness-4:before{content:'\f36c'}.zmdi-brightness-5:before{content:'\f36d'}.zmdi-brightness-6:before{content:'\f36e'}.zmdi-brightness-7:before{content:'\f36f'}.zmdi-brightness-auto:before{content:'\f370'}.zmdi-brightness-setting:before{content:'\f371'}.zmdi-broken-image:before{content:'\f372'}.zmdi-center-focus-strong:before{content:'\f373'}.zmdi-center-focus-weak:before{content:'\f374'}.zmdi-compare:before{content:'\f375'}.zmdi-crop-16-9:before{content:'\f376'}.zmdi-crop-3-2:before{content:'\f377'}.zmdi-crop-5-4:before{content:'\f378'}.zmdi-crop-7-5:before{content:'\f379'}.zmdi-crop-din:before{content:'\f37a'}.zmdi-crop-free:before{content:'\f37b'}.zmdi-crop-landscape:before{content:'\f37c'}.zmdi-crop-portrait:before{content:'\f37d'}.zmdi-crop-square:before{content:'\f37e'}.zmdi-exposure-alt:before{content:'\f37f'}.zmdi-exposure:before{content:'\f380'}.zmdi-filter-b-and-w:before{content:'\f381'}.zmdi-filter-center-focus:before{content:'\f382'}.zmdi-filter-frames:before{content:'\f383'}.zmdi-filter-tilt-shift:before{content:'\f384'}.zmdi-gradient:before{content:'\f385'}.zmdi-grain:before{content:'\f386'}.zmdi-graphic-eq:before{content:'\f387'}.zmdi-hdr-off:before{content:'\f388'}.zmdi-hdr-strong:before{content:'\f389'}.zmdi-hdr-weak:before{content:'\f38a'}.zmdi-hdr:before{content:'\f38b'}.zmdi-iridescent:before{content:'\f38c'}.zmdi-leak-off:before{content:'\f38d'}.zmdi-leak:before{content:'\f38e'}.zmdi-looks:before{content:'\f38f'}.zmdi-loupe:before{content:'\f390'}.zmdi-panorama-horizontal:before{content:'\f391'}.zmdi-panorama-vertical:before{content:'\f392'}.zmdi-panorama-wide-angle:before{content:'\f393'}.zmdi-photo-size-select-large:before{content:'\f394'}.zmdi-photo-size-select-small:before{content:'\f395'}.zmdi-picture-in-picture:before{content:'\f396'}.zmdi-slideshow:before{content:'\f397'}.zmdi-texture:before{content:'\f398'}.zmdi-tonality:before{content:'\f399'}.zmdi-vignette:before{content:'\f39a'}.zmdi-wb-auto:before{content:'\f39b'}.zmdi-eject-alt:before{content:'\f39c'}.zmdi-eject:before{content:'\f39d'}.zmdi-equalizer:before{content:'\f39e'}.zmdi-fast-forward:before{content:'\f39f'}.zmdi-fast-rewind:before{content:'\f3a0'}.zmdi-forward-10:before{content:'\f3a1'}.zmdi-forward-30:before{content:'\f3a2'}.zmdi-forward-5:before{content:'\f3a3'}.zmdi-hearing:before{content:'\f3a4'}.zmdi-pause-circle-outline:before{content:'\f3a5'}.zmdi-pause-circle:before{content:'\f3a6'}.zmdi-pause:before{content:'\f3a7'}.zmdi-play-circle-outline:before{content:'\f3a8'}.zmdi-play-circle:before{content:'\f3a9'}.zmdi-play:before{content:'\f3aa'}.zmdi-playlist-audio:before{content:'\f3ab'}.zmdi-playlist-plus:before{content:'\f3ac'}.zmdi-repeat-one:before{content:'\f3ad'}.zmdi-repeat:before{content:'\f3ae'}.zmdi-replay-10:before{content:'\f3af'}.zmdi-replay-30:before{content:'\f3b0'}.zmdi-replay-5:before{content:'\f3b1'}.zmdi-replay:before{content:'\f3b2'}.zmdi-shuffle:before{content:'\f3b3'}.zmdi-skip-next:before{content:'\f3b4'}.zmdi-skip-previous:before{content:'\f3b5'}.zmdi-stop:before{content:'\f3b6'}.zmdi-surround-sound:before{content:'\f3b7'}.zmdi-tune:before{content:'\f3b8'}.zmdi-volume-down:before{content:'\f3b9'}.zmdi-volume-mute:before{content:'\f3ba'}.zmdi-volume-off:before{content:'\f3bb'}.zmdi-volume-up:before{content:'\f3bc'}.zmdi-n-1-square:before{content:'\f3bd'}.zmdi-n-2-square:before{content:'\f3be'}.zmdi-n-3-square:before{content:'\f3bf'}.zmdi-n-4-square:before{content:'\f3c0'}.zmdi-n-5-square:before{content:'\f3c1'}.zmdi-n-6-square:before{content:'\f3c2'}.zmdi-neg-1:before{content:'\f3c3'}.zmdi-neg-2:before{content:'\f3c4'}.zmdi-plus-1:before{content:'\f3c5'}.zmdi-plus-2:before{content:'\f3c6'}.zmdi-sec-10:before{content:'\f3c7'}.zmdi-sec-3:before{content:'\f3c8'}.zmdi-zero:before{content:'\f3c9'}.zmdi-airline-seat-flat-angled:before{content:'\f3ca'}.zmdi-airline-seat-flat:before{content:'\f3cb'}.zmdi-airline-seat-individual-suite:before{content:'\f3cc'}.zmdi-airline-seat-legroom-extra:before{content:'\f3cd'}.zmdi-airline-seat-legroom-normal:before{content:'\f3ce'}.zmdi-airline-seat-legroom-reduced:before{content:'\f3cf'}.zmdi-airline-seat-recline-extra:before{content:'\f3d0'}.zmdi-airline-seat-recline-normal:before{content:'\f3d1'}.zmdi-airplay:before{content:'\f3d2'}.zmdi-closed-caption:before{content:'\f3d3'}.zmdi-confirmation-number:before{content:'\f3d4'}.zmdi-developer-board:before{content:'\f3d5'}.zmdi-disc-full:before{content:'\f3d6'}.zmdi-explicit:before{content:'\f3d7'}.zmdi-flight-land:before{content:'\f3d8'}.zmdi-flight-takeoff:before{content:'\f3d9'}.zmdi-flip-to-back:before{content:'\f3da'}.zmdi-flip-to-front:before{content:'\f3db'}.zmdi-group-work:before{content:'\f3dc'}.zmdi-hd:before{content:'\f3dd'}.zmdi-hq:before{content:'\f3de'}.zmdi-markunread-mailbox:before{content:'\f3df'}.zmdi-memory:before{content:'\f3e0'}.zmdi-nfc:before{content:'\f3e1'}.zmdi-play-for-work:before{content:'\f3e2'}.zmdi-power-input:before{content:'\f3e3'}.zmdi-present-to-all:before{content:'\f3e4'}.zmdi-satellite:before{content:'\f3e5'}.zmdi-tap-and-play:before{content:'\f3e6'}.zmdi-vibration:before{content:'\f3e7'}.zmdi-voicemail:before{content:'\f3e8'}.zmdi-group:before{content:'\f3e9'}.zmdi-rss:before{content:'\f3ea'}.zmdi-shape:before{content:'\f3eb'}.zmdi-spinner:before{content:'\f3ec'}.zmdi-ungroup:before{content:'\f3ed'}.zmdi-500px:before{content:'\f3ee'}.zmdi-8tracks:before{content:'\f3ef'}.zmdi-amazon:before{content:'\f3f0'}.zmdi-blogger:before{content:'\f3f1'}.zmdi-delicious:before{content:'\f3f2'}.zmdi-disqus:before{content:'\f3f3'}.zmdi-flattr:before{content:'\f3f4'}.zmdi-flickr:before{content:'\f3f5'}.zmdi-github-alt:before{content:'\f3f6'}.zmdi-google-old:before{content:'\f3f7'}.zmdi-linkedin:before{content:'\f3f8'}.zmdi-odnoklassniki:before{content:'\f3f9'}.zmdi-outlook:before{content:'\f3fa'}.zmdi-paypal-alt:before{content:'\f3fb'}.zmdi-pinterest:before{content:'\f3fc'}.zmdi-playstation:before{content:'\f3fd'}.zmdi-reddit:before{content:'\f3fe'}.zmdi-skype:before{content:'\f3ff'}.zmdi-slideshare:before{content:'\f400'}.zmdi-soundcloud:before{content:'\f401'}.zmdi-tumblr:before{content:'\f402'}.zmdi-twitch:before{content:'\f403'}.zmdi-vimeo:before{content:'\f404'}.zmdi-whatsapp:before{content:'\f405'}.zmdi-xbox:before{content:'\f406'}.zmdi-yahoo:before{content:'\f407'}.zmdi-youtube-play:before{content:'\f408'}.zmdi-youtube:before{content:'\f409'}.zmdi-import-export:before{content:'\f30c'}.zmdi-swap-vertical-:before{content:'\f30c'}.zmdi-airplanemode-inactive:before{content:'\f102'}.zmdi-airplanemode-active:before{content:'\f103'}.zmdi-rate-review:before{content:'\f103'}.zmdi-comment-sign:before{content:'\f25a'}.zmdi-network-warning:before{content:'\f2ad'}.zmdi-shopping-cart-add:before{content:'\f1ca'}.zmdi-file-add:before{content:'\f221'}.zmdi-network-wifi-scan:before{content:'\f2e4'}.zmdi-collection-add:before{content:'\f14e'}.zmdi-format-playlist-add:before{content:'\f3ac'}.zmdi-format-queue-music:before{content:'\f3ab'}.zmdi-plus-box:before{content:'\f277'}.zmdi-tag-backspace:before{content:'\f1d9'}.zmdi-alarm-add:before{content:'\f32b'}.zmdi-battery-charging:before{content:'\f114'}.zmdi-daydream-setting:before{content:'\f217'}.zmdi-more-horiz:before{content:'\f19c'}.zmdi-book-photo:before{content:'\f11b'}.zmdi-incandescent:before{content:'\f189'}.zmdi-wb-iridescent:before{content:'\f38c'}.zmdi-calendar-remove:before{content:'\f330'}.zmdi-refresh-sync-disabled:before{content:'\f1b7'}.zmdi-refresh-sync-problem:before{content:'\f1b6'}.zmdi-crop-original:before{content:'\f17e'}.zmdi-power-off:before{content:'\f1af'}.zmdi-power-off-setting:before{content:'\f1ae'}.zmdi-leak-remove:before{content:'\f38d'}.zmdi-star-border:before{content:'\f27c'}.zmdi-brightness-low:before{content:'\f36d'}.zmdi-brightness-medium:before{content:'\f36e'}.zmdi-brightness-high:before{content:'\f36f'}.zmdi-smartphone-portrait:before{content:'\f2d4'}.zmdi-live-tv:before{content:'\f2d9'}.zmdi-format-textdirection-l-to-r:before{content:'\f249'}.zmdi-format-textdirection-r-to-l:before{content:'\f24a'}.zmdi-arrow-back:before{content:'\f2ea'}.zmdi-arrow-forward:before{content:'\f2ee'}.zmdi-arrow-in:before{content:'\f2e9'}.zmdi-arrow-out:before{content:'\f2ed'}.zmdi-rotate-90-degrees-ccw:before{content:'\f304'}.zmdi-adb:before{content:'\f33a'}.zmdi-network-wifi:before{content:'\f2e8'}.zmdi-network-wifi-alt:before{content:'\f2e3'}.zmdi-network-wifi-lock:before{content:'\f2e5'}.zmdi-network-wifi-off:before{content:'\f2e6'}.zmdi-network-wifi-outline:before{content:'\f2e7'}.zmdi-network-wifi-info:before{content:'\f2e4'}.zmdi-layers-clear:before{content:'\f18b'}.zmdi-colorize:before{content:'\f15d'}.zmdi-format-paint:before{content:'\f1ba'}.zmdi-format-quote:before{content:'\f1b2'}.zmdi-camera-monochrome-photos:before{content:'\f285'}.zmdi-sort-by-alpha:before{content:'\f1cf'}.zmdi-folder-shared:before{content:'\f225'}.zmdi-folder-special:before{content:'\f226'}.zmdi-comment-dots:before{content:'\f260'}.zmdi-reorder:before{content:'\f31e'}.zmdi-dehaze:before{content:'\f197'}.zmdi-sort:before{content:'\f1ce'}.zmdi-pages:before{content:'\f34a'}.zmdi-stack-overflow:before{content:'\f35c'}.zmdi-calendar-account:before{content:'\f204'}.zmdi-paste:before{content:'\f109'}.zmdi-cut:before{content:'\f1bc'}.zmdi-save:before{content:'\f297'}.zmdi-smartphone-code:before{content:'\f139'}.zmdi-directions-bike:before{content:'\f117'}.zmdi-directions-boat:before{content:'\f11a'}.zmdi-directions-bus:before{content:'\f121'}.zmdi-directions-car:before{content:'\f125'}.zmdi-directions-railway:before{content:'\f1b3'}.zmdi-directions-run:before{content:'\f215'}.zmdi-directions-subway:before{content:'\f1d5'}.zmdi-directions-walk:before{content:'\f216'}.zmdi-local-hotel:before{content:'\f178'}.zmdi-local-activity:before{content:'\f1df'}.zmdi-local-play:before{content:'\f1df'}.zmdi-local-airport:before{content:'\f103'}.zmdi-local-atm:before{content:'\f198'}.zmdi-local-bar:before{content:'\f137'}.zmdi-local-cafe:before{content:'\f13b'}.zmdi-local-car-wash:before{content:'\f124'}.zmdi-local-convenience-store:before{content:'\f1d3'}.zmdi-local-dining:before{content:'\f153'}.zmdi-local-drink:before{content:'\f157'}.zmdi-local-florist:before{content:'\f168'}.zmdi-local-gas-station:before{content:'\f16f'}.zmdi-local-grocery-store:before{content:'\f1cb'}.zmdi-local-hospital:before{content:'\f177'}.zmdi-local-laundry-service:before{content:'\f1e9'}.zmdi-local-library:before{content:'\f18d'}.zmdi-local-mall:before{content:'\f195'}.zmdi-local-movies:before{content:'\f19d'}.zmdi-local-offer:before{content:'\f187'}.zmdi-local-parking:before{content:'\f1a5'}.zmdi-local-parking:before{content:'\f1a5'}.zmdi-local-pharmacy:before{content:'\f176'}.zmdi-local-phone:before{content:'\f2be'}.zmdi-local-pizza:before{content:'\f1ac'}.zmdi-local-post-office:before{content:'\f15a'}.zmdi-local-printshop:before{content:'\f1b0'}.zmdi-local-see:before{content:'\f28c'}.zmdi-local-shipping:before{content:'\f1e6'}.zmdi-local-store:before{content:'\f1d4'}.zmdi-local-taxi:before{content:'\f123'}.zmdi-local-wc:before{content:'\f211'}.zmdi-my-location:before{content:'\f299'}.zmdi-directions:before{content:'\f1e7'} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot new file mode 100644 index 0000000..5e25191 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot differ diff --git a/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.svg b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.svg new file mode 100644 index 0000000..8cb2673 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.svg @@ -0,0 +1,787 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.ttf b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.ttf new file mode 100644 index 0000000..5d489fd Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.ttf differ diff --git a/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff new file mode 100644 index 0000000..933b2bf Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff differ diff --git a/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff2 b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff2 new file mode 100644 index 0000000..35970e2 Binary files /dev/null and b/Server/www/spiderbasic/onsenui-css/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff2 differ diff --git a/Server/www/spiderbasic/onsenui-css/old-onsen-css-components.min.css b/Server/www/spiderbasic/onsenui-css/old-onsen-css-components.min.css new file mode 100644 index 0000000..8fb2520 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/old-onsen-css-components.min.css @@ -0,0 +1,35 @@ +/*! + * Copyright 2013-2017 ASIAL CORPORATION + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *//*! + * Copyright 2012 Adobe Systems Inc.; + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */:root{--background-color:#f9f9f9;--text-color:#1f1f21;--sub-text-color:#999;--highlight-color:rgba(24, 103, 194, 0.81);--second-highlight-color:#25a6d9;--border-color:#ccc;--button-background-color:var(--highlight-color);--button-cta-background-color:var(--second-highlight-color);--toolbar-background-color:#fff;--toolbar-button-color:rgba(38, 100, 171, 0.81);--toolbar-text-color:#1f1f21;--toolbar-border-color:#bbb;--button-bar-color:rgba(18, 114, 224, 0.77);--button-bar-active-text-color:#fff;--button-bar-active-background-color:unset;--button-bar-active-background-color-default-blend-color:white;--button-bar-active-background-color-default-blend-time:-0.7s;--button-light-color:black;--segment-color:rgba(18, 114, 224, 0.77);--segment-active-text-color:#fff;--segment-active-background-color:unset;--segment-active-background-color-default-blend-color:white;--segment-active-background-color-default-blend-time:-0.7s;--list-background-color:#fff;--list-header-background-color:#eee;--list-tap-active-background-color:#d9d9d9;--list-item-chevron-color:#c7c7cc;--progress-bar-color:rgba(24, 103, 194, 0.81);--progress-bar-secondary-color:rgba(24, 103, 194, 0.4);--progress-bar-background-color:#b6b6b6;--progress-circle-primary-color:rgba(24, 103, 194, 0.81);--progress-circle-secondary-color:rgba(24, 103, 194, 0.81);--progress-circle-background-color:#ddd;--tabbar-background-color:#fff;--tabbar-text-color:#999;--tabbar-highlight-text-color:rgba(24, 103, 194, 0.81);--tabbar-border-color:#ccc;--switch-highlight-color:#5198db;--switch-border-color:#e5e5e5;--switch-background-color:white;--range-track-background-color:#a4aab3;--range-track-background-color-active:var(--highlight-color);--range-thumb-background-color:#fff;--modal-background-color:rgba(0, 0, 0, 0.7);--modal-text-color:#fff;--alert-dialog-background-color:#f4f4f4;--alert-dialog-text-color:#1f1f21;--alert-dialog-button-color:rgba(24, 103, 194, 0.81);--alert-dialog-separator-color:#ddd;--dialog-background-color:#f4f4f4;--dialog-text-color:var(--text-color);--popover-background-color:white;--popover-text-color:#1f1f21;--action-sheet-title-color:#8f8e94;--action-sheet-button-separator-color:rgba(0, 0, 0, 0.1);--action-sheet-button-color:var(--highlight-color);--action-sheet-button-destructive-color:#fe3824;--action-sheet-button-background-color:rgba(255, 255, 255, 0.9);--action-sheet-button-active-background-color:#e9e9e9;--action-sheet-cancel-button-background-color:#fff;--notification-background-color:#dc5236;--notification-color:white;--search-input-background-color:rgba(3, 3, 3, 0.09);--fab-text-color:#ffffff;--fab-background-color:rgba(24, 103, 194, 0.81);--fab-active-background-color:rgba(24, 103, 194, 0.61);--card-background-color:white;--card-text-color:#030303;--toast-background-color:rgba(0, 0, 0, 0.8);--toast-text-color:white;--toast-button-text-color:white;--select-input-color:var(--text-color);--select-input-border-color:var(--border-color);--material-background-color:#ffffff;--material-text-color:var(--text-color);--material-notification-background-color:#e91e63;--material-notification-color:white;--material-switch-active-thumb-color:#009688;--material-switch-inactive-thumb-color:#f1f1f1;--material-switch-active-background-color:#77c2bb;--material-switch-inactive-background-color:#b0afaf;--material-range-track-color:#bdbdbd;--material-range-thumb-color:#009688;--material-range-disabled-thumb-color:#b0b0b0;--material-range-disabled-thumb-border-color:#eeeeee;--material-range-zero-thumb-color:#f2f2f2;--material-toolbar-background-color:#009688;--material-toolbar-text-color:#ffffff;--material-toolbar-button-color:#ffffff;--material-segment-background-color:#fafafa;--material-segment-active-background-color:#c8c8c8;--material-segment-text-color:rgba(0, 0, 0, 0.38);--material-segment-active-text-color:#353535;--material-button-background-color:#009688;--material-button-text-color:#ffffff;--material-button-disabled-background-color:rgba(79, 79, 79, 0.26);--material-button-disabled-color:rgba(0, 0, 0, 0.26);--material-flat-button-active-background-color:rgba(153, 153, 153, 0.2);--material-list-background-color:#fff;--material-list-item-separator-color:#eee;--material-list-header-text-color:#757575;--material-checkbox-active-color:#37474f;--material-checkbox-inactive-color:#717171;--material-checkbox-checkmark-color:#ffffff;--material-checkbox-active-color:#009688;--material-checkbox-inactive-color:#717171;--material-checkbox-checkmark-color:#ffffff;--material-radio-button-active-color:#009688;--material-radio-button-inactive-color:#717171;--material-radio-button-disabled-color:#afafaf;--material-text-input-text-color:#212121;--material-text-input-active-color:#009688;--material-text-input-inactive-color:#afafaf;--material-search-background-color:#fafafa;--material-dialog-background-color:#ffffff;--material-dialog-text-color:var(--material-text-color);--material-alert-dialog-background-color:#ffffff;--material-alert-dialog-title-color:#212121;--material-alert-dialog-content-color:#727272;--material-alert-dialog-button-color:#009688;--material-progress-bar-primary-color:#009688;--material-progress-bar-secondary-color:#80cbc4;--material-progress-bar-background-color:#e0e0e0;--material-progress-circle-primary-color:#009688;--material-progress-circle-secondary-color:#80cbc4;--material-progress-circle-background-color:#dbdbdb;--material-tabbar-background-color:#009688;--material-tabbar-text-color:rgba(255, 255, 255, 0.6);--material-tabbar-highlight-text-color:#ffffff;--material-tabbar-highlight-color:#26a69a;--material-fab-text-color:#ffffff;--material-fab-background-color:#009688;--material-fab-active-background-color:rgba(0, 150, 136, 0.85);--material-card-background-color:white;--material-card-text-color:rgba(0, 0, 0, 0.54);--material-toast-background-color:rgba(0, 0, 0, 0.8);--material-toast-text-color:white;--material-toast-button-text-color:#bbdefb;--material-select-input-color:var(--material-text-color);--material-select-input-active-color:rgba(0, 0, 0, 0.15);--material-select-input-inactive-color:rgba(0, 0, 0, 0.81);--material-select-border-color:rgba(0, 0, 0, 0.12);--material-popover-background-color:#fafafa;--material-popover-text-color:var(--material-text-color);--material-action-sheet-text-color:#686868;--tap-highlight-color:transparent}:root{--input-bg-color:var(--background-color);--input-border-color:var(--border-color);--input-text-color:var(--text-color);--input-placeholder-color:var(--sub-text-color);--input-invalid-border-color:var(--border-color);--input-invalid-text-color:var(--text-color);--input-border:1px solid var(--input-border-color);--font-size:17px;--font-weight:400;--material-font-size:17px;--material-font-weight:400;--font-size--mini:calc(var(--font-size) - 3px);--font-weight--large:500;--background-color--input:transparent}html{height:100%;width:100%}body{position:absolute;overflow:hidden;top:0;right:0;left:0;bottom:0;padding:0;margin:0;-webkit-text-size-adjust:100%;touch-action:manipulation}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:var(--tap-highlight-color);-webkit-touch-callout:none}input,select,textarea{-webkit-user-select:auto;user-select:auto;-moz-user-select:text;-webkit-touch-callout:none}a,button,input,select,textarea{touch-action:manipulation}input:active,input:focus,select:active,select:focus,textarea:active,textarea:focus{outline:0}h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4,h5,h6{font-size:18px}@-webkit-keyframes blend-background-color{0%{background-color:var(--blend-background-color__base)}100%{background-color:var(--blend-background-color__color)}}@keyframes blend-background-color{0%{background-color:var(--blend-background-color__base)}100%{background-color:var(--blend-background-color__color)}}@-webkit-keyframes blend-color{0%{color:var(--blend-color__base)}100%{color:var(--blend-color__color)}}@keyframes blend-color{0%{color:var(--blend-color__base)}100%{color:var(--blend-color__color)}}@-webkit-keyframes blend-border-color{0%{border-color:var(--blend-border-color__base)}100%{border-color:var(--blend-border-color__color)}}@keyframes blend-border-color{0%{border-color:var(--blend-border-color__base)}100%{border-color:var(--blend-border-color__color)}}:root{--page-background-color:var(--background-color);--page-material-background-color:var(--material-background-color)}.page{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);background-color:#f9f9f9;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;overflow-x:visible;overflow-y:hidden;color:#1f1f21;color:var(--text-color);-ms-overflow-style:none;-webkit-font-smoothing:antialiased}.page::-webkit-scrollbar{display:none}.page__content{background-color:#f9f9f9;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box}.page__background{background-color:#f9f9f9;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box}.page--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);background-color:#fff;background-color:var(--page-material-background-color)}.page--material__content{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--font-weight)}.page__content h1,.page__content h2,.page__content h3,.page__content h4,.page__content h5{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:500;font-weight:var(--font-weight--large);margin:.6em 0;padding:0}.page__content h1{font-size:28px}.page__content h2{font-size:24px}.page__content h3{font-size:20px}.page--material__content h1,.page--material__content h2,.page--material__content h3,.page--material__content h4,.page--material__content h5{-webkit-font-smoothing:antialiased;font-weight:500;font-weight:var(--font-weight--large);margin:.6em 0;padding:0}.page--material__content h1{font-size:28px}.page--material__content h2{font-size:24px}.page--material__content h3{font-size:20px}.page--material__background{background-color:#fff;background-color:var(--page-material-background-color)}:root{--switch-checked-background-color:var(--switch-highlight-color);--switch-thumb-background-color:white;--switch-thumb-border-color:var(--border-color);--switch-thumb-border-color-active:var(--switch-highlight-color);--switch-height:32px;--switch-width:51px}.switch{display:inline-block;vertical-align:top;box-sizing:border-box;background-clip:padding-box;position:relative;min-width:51px;font-size:17px;font-size:var(--font-size);padding:0 20px;border:none;overflow:visible;width:51px;width:var(--switch-width);height:32px;height:var(--switch-height);z-index:0;text-align:left}.switch__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:0}.switch__toggle{background-color:#fff;background-color:var(--switch-background-color);position:absolute;top:0;left:0;right:0;bottom:0;border-radius:30px;transition-property:all;transition-duration:.35s;transition-timing-function:ease-out;box-shadow:inset 0 0 0 2px #e5e5e5;box-shadow:inset 0 0 0 2px var(--switch-border-color)}.switch__handle{box-sizing:border-box;background-clip:padding-box;position:absolute;content:'';border-radius:28px;height:28px;width:28px;background-color:#fff;background-color:var(--switch-thumb-background-color);left:1px;top:2px;transition-property:all;transition-duration:.35s;transition-timing-function:cubic-bezier(.59,.01,.5,.99);box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25)}.switch--active__handle{transition:none}:checked+.switch__toggle{box-shadow:inset 0 0 0 2px #5198db;box-shadow:inset 0 0 0 2px var(--switch-checked-background-color);background-color:#5198db;background-color:var(--switch-checked-background-color)}:checked+.switch__toggle>.switch__handle{left:21px;box-shadow:0 3px 2px rgba(0,0,0,.25)}:disabled+.switch__toggle{opacity:.3;cursor:default;pointer-events:none}.switch__touch{position:absolute;top:-5px;bottom:-5px;left:-10px;right:-10px}.switch--material{width:36px;height:24px;padding:0 10px;min-width:36px}.switch--material__toggle{background-color:#b0afaf;background-color:var(--material-switch-inactive-background-color);margin-top:5px;height:14px;box-shadow:none}.switch--material__input{right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:0}.switch--material__handle{background-color:#f1f1f1;background-color:var(--material-switch-inactive-thumb-color);left:0;margin-top:-5px;width:20px;height:20px;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)}:checked+.switch--material__toggle{background-color:#77c2bb;background-color:var(--material-switch-active-background-color);box-shadow:none}:checked+.switch--material__toggle>.switch--material__handle{left:16px;background-color:#009688;background-color:var(--material-switch-active-thumb-color);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.switch--material__handle:before{background:0 0;content:'';display:block;width:100%;height:100%;border-radius:50%;z-index:0;box-shadow:0 0 0 0 rgba(0,0,0,.12);transition:box-shadow .1s linear}.switch--material__toggle>.switch--active__handle:before{box-shadow:0 0 0 14px rgba(0,0,0,.12)}:checked+.switch--material__toggle>.switch--active__handle:before{animation:blend-box-shadow 1s -.2s linear forwards paused}@-webkit-keyframes blend-box-shadow{0%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 14px #009688;box-shadow:0 0 0 14px var(--material-switch-active-thumb-color)}}@keyframes blend-box-shadow{0%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 14px #009688;box-shadow:0 0 0 14px var(--material-switch-active-thumb-color)}}.switch--material__touch{position:absolute;top:-10px;bottom:-10px;left:-15px;right:-15px}:root{--range-thumb-size:28px;--range-track-height:2px;--material-range-track-height:2px;--material-range-thumb-size:14px;--material-range-thumb-radius:calc(var(--material-range-thumb-size) / 2);--material-range-thumb-vertical-margin:24px;--material-range-thumb-horizontal-margin:2px}.range{display:inline-block;position:relative;width:100px;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);margin:0;padding:0;background-image:linear-gradient(#a4aab3,#a4aab3);background-image:linear-gradient(var(--range-track-background-color),var(--range-track-background-color));background-position:left center;background-size:100% 2px;background-size:100% var(--range-track-height);background-repeat:no-repeat;background-color:transparent}.range__input{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;appearance:none;background-image:linear-gradient(rgba(24,103,194,.81),rgba(24,103,194,.81));background-image:linear-gradient(var(--range-track-background-color-active),var(--range-track-background-color-active));background-position:left center;background-size:0 2px;background-size:0 var(--range-track-height);background-repeat:no-repeat;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);position:relative;z-index:1;width:100%}.range__input::-moz-range-track{position:relative;border:none;background:0 0;box-shadow:none;top:0;margin:0;padding:0}.range__input::-ms-track{position:relative;border:none;background-color:#a4aab3;background-color:var(--range-track-background-color);height:0;border-radius:50%}.range__input::-webkit-slider-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0;box-sizing:border-box;-webkit-appearance:none;appearance:none;top:0;z-index:1}.range__input::-moz-range-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0}.range__input::-ms-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0;top:0}.range__input::-ms-fill-lower{height:2px;background-color:rgba(24,103,194,.81);background-color:var(--range-track-background-color-active)}.range__input::-ms-tooltip{display:none}.range__input:disabled{opacity:1;pointer-events:none}.range__focus-ring{pointer-events:none;top:0;left:0;display:none;box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;border:none;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;appearance:none;background:0 0;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);position:absolute;z-index:0;width:100%}.range--disabled{cursor:default;pointer-events:none}.range--material{position:relative;background-image:linear-gradient(#bdbdbd,#bdbdbd);background-image:linear-gradient(var(--material-range-track-color),var(--material-range-track-color))}.range--material__input{background-image:linear-gradient(#009688,#009688);background-image:linear-gradient(var(--material-range-thumb-color),var(--material-range-thumb-color));background-position:center left;background-size:0 2px}.range--material__focus-ring{display:block}.range--material__focus-ring::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;width:var(--material-range-thumb-size);height:14px;height:var(--material-range-thumb-size);border:none;box-shadow:0 0 0 calc((32px - 14px)/ 2) #009688;box-shadow:0 0 0 calc((32px - var(--material-range-thumb-size))/ 2) var(--material-range-thumb-color);background-color:#009688;background-color:var(--material-range-thumb-color);border-radius:50%;opacity:0;-webkit-transition:opacity .25s ease-out,-webkit-transform .25s ease-out;transition:opacity .25s ease-out,-webkit-transform .25s ease-out;transition:opacity .25s ease-out,transform .25s ease-out;transition:opacity .25s ease-out,transform .25s ease-out,-webkit-transform .25s ease-out}.range--material__input.range__input--active+.range--material__focus-ring::-webkit-slider-thumb{opacity:.2;-webkit-transform:scale(1.5,1.5,1.5);transform:scale(1.5,1.5,1.5)}.range--material__input::-webkit-slider-thumb{position:relative;box-sizing:border-box;border:none;background-color:transparent;width:14px;width:var(--material-range-thumb-size);height:32px;border-radius:0;box-shadow:none;background-image:radial-gradient(circle farthest-corner,#009688 0,#009688 calc(calc(14px / 2) - .4px),transparent calc(14px / 2));background-image:radial-gradient(circle farthest-corner,var(--material-range-thumb-color) 0,var(--material-range-thumb-color) calc(var(--material-range-thumb-radius) - .4px),transparent var(--material-range-thumb-radius));-webkit-transition:-webkit-transform .1s linear;transition:-webkit-transform .1s linear;transition:transform .1s linear;transition:transform .1s linear,-webkit-transform .1s linear;overflow:visible}.range--material__input[_zero]::-webkit-slider-thumb{background-image:radial-gradient(circle farthest-corner,#f2f2f2 0,#f2f2f2 4px,#bdbdbd 4px,#bdbdbd calc(calc(14px / 2) - .6px),transparent calc(calc(14px / 2)));background-image:radial-gradient(circle farthest-corner,var(--material-range-zero-thumb-color) 0,var(--material-range-zero-thumb-color) 4px,var(--material-range-track-color) 4px,var(--material-range-track-color) calc(var(--material-range-thumb-radius) - .6px),transparent calc(var(--material-range-thumb-radius)))}.range--material__input[_zero]+.range--material__focus-ring::-webkit-slider-thumb{box-shadow:0 0 0 calc((32px - 14px)/ 2) #bdbdbd;box-shadow:0 0 0 calc((32px - var(--material-range-thumb-size))/ 2) var(--material-range-track-color)}.range--material__input::-moz-range-track{background:0 0}.range--material__input::-moz-range-thumb,.range--material__input:focus::-moz-range-thumb{box-sizing:border-box;border:none;width:14px;width:var(--material-range-thumb-size);height:32px;border-radius:0;background-color:transparent;background-image:-moz-radial-gradient(circle farthest-corner,var(--material-range-thumb-color) 0,var(--material-range-thumb-color) calc(var(--material-range-thumb-radius) - .4px),transparent var(--material-range-thumb-radius));box-shadow:none}.range--material__input.range__input--active::-webkit-slider-thumb,.range--material__input:active::-webkit-slider-thumb{transform:scale(1.5);-webkit-transition:-webkit-transform .1s linear;transition:-webkit-transform .1s linear;transition:transform .1s linear;transition:transform .1s linear,-webkit-transform .1s linear}.range--material__input:disabled::-webkit-slider-thumb{background-image:radial-gradient(circle farthest-corner,#b0b0b0 0,#b0b0b0 4px,#eee 4.4px,#eee calc(calc(14px / 2) + .6px),transparent calc(calc(14px / 2) + .6px));background-image:radial-gradient(circle farthest-corner,var(--material-range-disabled-thumb-color) 0,var(--material-range-disabled-thumb-color) 4px,var(--material-range-disabled-thumb-border-color) 4.4px,var(--material-range-disabled-thumb-border-color) calc(var(--material-range-thumb-radius) + .6px),transparent calc(var(--material-range-thumb-radius) + .6px));-webkit-transition:none;transition:none}.range--material__input:disabled::-moz-range-thumb{background-image:-moz-radial-gradient(circle farthest-corner,var(--material-range-disabled-thumb-color) 0,var(--material-range-disabled-thumb-color) 4px,var(--material-range-disabled-thumb-border-color) 4.4px,var(--material-range-disabled-thumb-border-color) calc(var(--material-range-thumb-radius) + .6px),transparent calc(var(--material-range-thumb-radius) + .6px));-moz-transition:none;transition:none}:root{--notification-border-radius:19px;--notification-width:auto;--notification-height:19px;--notification-min-width:19px;--notification-padding:0 4px;--notification-font-weight:var(--font-weight);--notification-font-size:16px;--material-notification-font-size:16px;--material-notification-font-weight:500}.notification{position:relative;display:inline-block;vertical-align:top;font:inherit;border:none;box-sizing:border-box;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none;margin:0;padding:0 4px;padding:var(--notification-padding);width:auto;width:var(--notification-width);height:19px;height:var(--notification-height);border-radius:19px;border-radius:var(--notification-border-radius);background-color:#dc5236;background-color:var(--notification-background-color);color:#fff;color:var(--notification-color);text-align:center;font-size:16px;font-size:var(--notification-font-size);min-width:19px;min-width:var(--notification-min-width);line-height:19px;line-height:var(--notification-height);font-weight:400;font-weight:var(--notification-font-weight)}.notification:empty{display:none}.notification--material{-webkit-font-smoothing:antialiased;background-color:#e91e63;background-color:var(--material-notification-background-color);font-size:16px;font-size:var(--material-notification-font-size);font-weight:500;font-weight:var(--material-notification-font-weight);color:#fff;color:var(--material-notification-color)}:root{--toolbar-separator-color:var(--toolbar-border-color);--toolbar-height:44px;--toolbar-box-shadow:none;--toolbar-padding:0;--toolbar-separator:1px solid var(--toolbar-separator-color);--toolbar-material-height:56px}.toolbar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;height:44px;height:var(--toolbar-height);padding-left:0;padding-left:var(--toolbar-padding);padding-right:0;padding-right:var(--toolbar-padding);background:#fff;background:var(--toolbar-background-color);color:#1f1f21;color:var(--toolbar-text-color);box-shadow:none;box-shadow:var(--toolbar-box-shadow);font-weight:400;font-weight:var(--font-weight);width:100%;white-space:nowrap;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#bbb,#bbb 100%);background-image:linear-gradient(0deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.toolbar{background-image:linear-gradient(0deg,#bbb,#bbb 50%,transparent 50%);background-image:linear-gradient(0deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 50%,transparent 50%)}}.toolbar__bg{background:#fff;background:var(--toolbar-background-color)}.toolbar__item{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;height:44px;height:var(--toolbar-height);overflow:visible;display:block;vertical-align:middle}.toolbar__left{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;max-width:50%;width:27%;text-align:left;line-height:44px;line-height:var(--toolbar-height)}.toolbar__right{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;max-width:50%;width:27%;text-align:right;line-height:44px;line-height:var(--toolbar-height)}.toolbar__center{box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;border:none;width:46%;text-align:center;line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);color:#1f1f21;color:var(--toolbar-text-color)}.toolbar__title{line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);color:#1f1f21;color:var(--toolbar-text-color);margin:0;padding:0;overflow:visible}.toolbar__center:first-child:last-child{width:100%}.bottom-bar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;white-space:nowrap;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;display:block;height:44px;height:var(--toolbar-height);padding-left:0;padding-left:var(--toolbar-padding);padding-right:0;padding-right:var(--toolbar-padding);background:#fff;background:var(--toolbar-background-color);color:#1f1f21;color:var(--toolbar-text-color);box-shadow:none;box-shadow:var(--toolbar-box-shadow);font-weight:400;font-weight:var(--font-weight);border-bottom:none;position:absolute;bottom:0;right:0;left:0;border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#bbb,#bbb 100%);background-image:linear-gradient(180deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.bottom-bar{background-image:linear-gradient(180deg,#bbb,#bbb 50%,transparent 50%);background-image:linear-gradient(180deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 50%,transparent 50%)}}.bottom-bar__line-height{line-height:44px;line-height:var(--toolbar-height);padding-bottom:0;padding-top:0}.bottom-bar--aligned{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;line-height:44px;line-height:var(--toolbar-height)}.bottom-bar--transparent{background-color:transparent;background-image:none;border:none}.toolbar--material{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;justify-content:space-between;height:56px;height:var(--toolbar-material-height);border-bottom:0;box-shadow:0 1px 5px rgba(0,0,0,.3);padding:0;background-color:#009688;background-color:var(--material-toolbar-background-color);background-size:0}.toolbar--noshadow{box-shadow:none;background-image:none;border-bottom:none}.toolbar--material__left,.toolbar--material__right{-webkit-font-smoothing:antialiased;font-size:20px;font-weight:500;color:#fff;color:var(--material-toolbar-text-color);height:56px;height:var(--toolbar-material-height);min-width:72px;width:auto;line-height:56px;line-height:var(--toolbar-material-height)}.toolbar--material__center{-webkit-font-smoothing:antialiased;font-size:20px;font-weight:500;color:#fff;color:var(--material-toolbar-text-color);height:56px;height:var(--toolbar-material-height);width:auto;-webkit-flex-grow:1;flex-grow:1;overflow:hidden;text-overflow:ellipsis;text-align:left;line-height:56px;line-height:var(--toolbar-material-height)}.toolbar--material__center:first-child{margin-left:16px}.toolbar--material__center:last-child{margin-right:16px}.toolbar--material__left:empty,.toolbar--material__right:empty{min-width:16px}.toolbar--transparent{background-color:transparent;box-shadow:none;background-image:none;border-bottom:none}:root{--button-text-color:white;--button-quiet-color:var(--highlight-color);--button-cta-color:white;--button-large-padding:4px 12px;--button-padding:4px 10px;--button-line-height:32px;--button-large-line-height:36px;--button-active-opacity:0.2;--button-border-radius:3px}.button{position:relative;display:inline-block;box-sizing:border-box;margin:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:auto;text-decoration:none;padding:4px 10px;padding:var(--button-padding);font-size:17px;font-size:var(--font-size);line-height:32px;line-height:var(--button-line-height);letter-spacing:0;color:#fff;color:var(--button-text-color);vertical-align:middle;background-color:rgba(24,103,194,.81);background-color:var(--button-background-color);border:0 solid currentColor;border-radius:3px;border-radius:var(--button-border-radius);transition:none}.button::-moz-focus-inner{outline:0}.button:hover{transition:none}.button:active{background-color:rgba(24,103,194,.81);background-color:var(--button-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button:focus{outline:0}.button:disabled,.button[disabled]{opacity:.3;cursor:default;pointer-events:none}.button--outline{background-color:transparent;border:1px solid rgba(24,103,194,.81);border:1px solid var(--button-background-color);color:rgba(24,103,194,.81);color:var(--button-background-color)}.button--outline:active{border:1px solid rgba(24,103,194,.81);border:1px solid var(--button-background-color);color:rgba(24,103,194,.81);color:var(--button-background-color);opacity:1;--blend-background-color__base:var(--button-background-color);--blend-background-color__color:white;-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused}.button--outline:hover{border:1px solid rgba(24,103,194,.81);border:1px solid var(--button-background-color);transition:0}.button--light{background-color:transparent;border:1px solid;--blend-color__base:transparent;--blend-color__color:var(--button-light-color);--blend-border-color__base:transparent;--blend-border-color__color:var(--button-light-color);-webkit-animation:blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;animation:blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused}.button--light:active{border:1px solid;--blend-background-color__base:transparent;--blend-background-color__color:var(--button-light-color);--blend-color__base:transparent;--blend-color__color:var(--button-light-color);--blend-border-color__base:transparent;--blend-border-color__color:var(--button-light-color);-webkit-animation:blend-background-color 1s -50ms linear forwards paused,blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;animation:blend-background-color 1s -50ms linear forwards paused,blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;opacity:1}.button--quiet{background:0 0;color:rgba(24,103,194,.81);color:var(--button-quiet-color);border:none}.button--quiet:disabled,.button--quiet[disabled]{border:none}.button--quiet:active{background-color:transparent;border:none;transition:none;opacity:.2;opacity:var(--button-active-opacity);color:rgba(24,103,194,.81);color:var(--button-quiet-color)}.button--cta{border:none;background-color:#25a6d9;background-color:var(--button-cta-background-color);color:#fff;color:var(--button-cta-color)}.button--cta:active{color:#fff;color:var(--button-cta-color);background-color:#25a6d9;background-color:var(--button-cta-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button--large{font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);display:block;width:100%;text-align:center}.button--large:active{transition:none}.button--large--quiet{font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);display:block;width:100%;background:0 0;border:1px solid transparent;box-shadow:none;color:rgba(24,103,194,.81);color:var(--button-quiet-color);text-align:center}.button--large--quiet:active{opacity:.2;opacity:var(--button-active-opacity);color:rgba(24,103,194,.81);color:var(--button-quiet-color);background:0 0;border:1px solid transparent;box-shadow:none}.button--large--cta{background-color:#25a6d9;background-color:var(--button-cta-background-color);color:#fff;color:var(--button-cta-color);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);width:100%;text-align:center;display:block}.button--large--cta:active{color:var(--button-cta-color);background-color:#25a6d9;background-color:var(--button-cta-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button--material{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;min-height:36px;line-height:36px;padding:0 16px;text-align:center;font-size:14px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);text-transform:uppercase;background-color:#009688;background-color:var(--material-button-background-color);color:#fff;color:var(--material-button-text-color);font-weight:500;font-weight:var(--font-weight--large);opacity:1;transition:all .25s linear}.button--material:hover{transition:all .25s linear}.button--material:active{background-color:#009688;background-color:var(--material-button-background-color);opacity:.9;transition:all .25s linear}.button--material:disabled,.button--material[disabled]{transition:none;box-shadow:none;background-color:rgba(79,79,79,.26);background-color:var(--material-button-disabled-background-color);color:rgba(0,0,0,.26);color:var(--material-button-disabled-color);opacity:1}.button--material--flat{-webkit-font-smoothing:antialiased;min-height:36px;line-height:36px;padding:0 16px;text-align:center;font-size:14px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);text-transform:uppercase;font-weight:500;font-weight:var(--font-weight--large);box-shadow:none;background-color:transparent;color:#009688;color:var(--material-button-background-color);transition:all .25s linear}.button--material--flat:focus{background-color:transparent;color:#009688;color:var(--material-button-background-color);outline:0;opacity:1;border:none}.button--material--flat:active{outline:0;opacity:1;border:none;background-color:rgba(153,153,153,.2);background-color:var(--material-flat-button-active-background-color);color:#009688;color:var(--material-button-background-color);transition:all .25s linear}.button--material--flat:disabled,.button--material--flat[disabled]{opacity:1;box-shadow:none;background-color:transparent;color:rgba(0,0,0,.26);color:var(--material-button-disabled-color)}:root{--button-bar-active-color:var(--button-bar-active-text-color);--button-bar-border-top:1px solid var(--button-bar-color);--button-bar-border-bottom:1px solid var(--button-bar-color);--button-bar-border:0 solid var(--button-bar-color);--button-bar-border-radius:4px}.button-bar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin:0;padding:0;border:none}.button-bar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);border-radius:0;width:100%;padding:0;margin:0;position:relative;overflow:hidden;box-sizing:border-box}.button-bar__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:0;background-color:transparent;color:rgba(18,114,224,.77);color:var(--button-bar-color);border:1px solid rgba(18,114,224,.77);border:1px solid var(--button-bar-color);border-top-width:1px;border-bottom-width:1px;border-right-width:1px;border-left-width:0;font-weight:400;font-weight:var(--font-weight);padding:0;font-size:13px;height:27px;line-height:27px;width:100%;transition:background-color .2s linear,color .2s linear;box-sizing:border-box}.button-bar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.button-bar__button:hover{transition:none}.button-bar__button:focus{outline:0}:checked+.button-bar__button{background-color:rgba(18,114,224,.77);background-color:var(--button-bar-color);color:#fff;color:var(--button-bar-active-color);transition:none}.button-bar__button:active,:active+.button-bar__button{background-color:unset;background-color:var(--button-bar-active-background-color);border:0 solid rgba(18,114,224,.77);border:var(--button-bar-border);border-top:1px solid rgba(18,114,224,.77);border-top:var(--button-bar-border-top);border-bottom:1px solid rgba(18,114,224,.77);border-bottom:var(--button-bar-border-bottom);border-right:1px solid rgba(18,114,224,.77);border-right:1px solid var(--button-bar-color);font-size:13px;width:100%;transition:none}.button-bar__button:active:before,:active+.button-bar__button:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:-1;--blend-background-color__base:var(--button-bar-color);--blend-background-color__color:var(--button-bar-active-background-color-default-blend-color);-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused;-webkit-animation:blend-background-color 1s var(--button-bar-active-background-color-default-blend-time) linear forwards paused;animation:blend-background-color 1s var(--button-bar-active-background-color-default-blend-time) linear forwards paused}.button-bar__item:first-child>.button-bar__button{border-left-width:1px;border-radius:4px 0 0 4px;border-radius:var(--button-bar-border-radius) 0 0 var(--button-bar-border-radius)}.button-bar__item:last-child>.button-bar__button{border-right-width:1px;border-radius:0 4px 4px 0;border-radius:0 var(--button-bar-border-radius) var(--button-bar-border-radius) 0}:root{--segment-active-color:var(--segment-active-text-color);--segment-border-top:1px solid var(--segment-color);--segment-border-bottom:1px solid var(--segment-color);--segment-border:0 solid var(--segment-color);--segment-border-radius:4px}.segment{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin:0;padding:0;border:none}.segment__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);border-radius:0;width:100%;padding:0;margin:0;position:relative;overflow:hidden;box-sizing:border-box;display:block;background-color:transparent;border:none}.segment__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.segment__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:0;background-color:transparent;color:rgba(18,114,224,.77);color:var(--segment-color);border:1px solid rgba(18,114,224,.77);border:1px solid var(--segment-color);border-top-width:1px;border-bottom-width:1px;border-right-width:1px;border-left-width:0;font-weight:400;font-weight:var(--font-weight);padding:0;font-size:13px;height:29px;line-height:29px;width:100%;transition:background-color .2s linear,color .2s linear;box-sizing:border-box;text-align:center}.segment__item:disabled{opacity:.3;cursor:default;pointer-events:none}.segment__button:hover{transition:none}.segment__button:focus{outline:0}:active+.segment__button{background-color:unset;background-color:var(--segment-active-background-color);border:0 solid rgba(18,114,224,.77);border:var(--segment-border);border-top:1px solid rgba(18,114,224,.77);border-top:var(--segment-border-top);border-bottom:1px solid rgba(18,114,224,.77);border-bottom:var(--segment-border-bottom);border-right:1px solid rgba(18,114,224,.77);border-right:1px solid var(--segment-color);font-size:13px;width:100%;transition:none}:active+.segment__button:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:-1;--blend-background-color__base:var(--segment-color);--blend-background-color__color:var(--segment-active-background-color-default-blend-color);-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused;-webkit-animation:blend-background-color 1s var(--segment-active-background-color-default-blend-time) linear forwards paused;animation:blend-background-color 1s var(--segment-active-background-color-default-blend-time) linear forwards paused}:checked+.segment__button{background-color:rgba(18,114,224,.77);background-color:var(--segment-color);color:#fff;color:var(--segment-active-color);transition:none}.segment__item:first-child>.segment__button{border-left-width:1px;border-radius:4px 0 0 4px;border-radius:var(--segment-border-radius) 0 0 var(--segment-border-radius)}.segment__item:last-child>.segment__button{border-right-width:1px;border-radius:0 4px 4px 0;border-radius:0 var(--segment-border-radius) var(--segment-border-radius) 0}.segment--material{border-radius:2px;overflow:hidden;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24)}.segment--material__button{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);font-size:14px;height:32px;line-height:32px;border-width:0;color:rgba(0,0,0,.38);color:var(--material-segment-text-color);border-radius:0;background-color:#fafafa;background-color:var(--material-segment-background-color)}:active+.segment--material__button{background-color:#fafafa;background-color:var(--material-segment-background-color);border-radius:0;border-width:0;font-size:14px;transition:none;color:rgba(0,0,0,.38);color:var(--material-segment-text-color)}:checked+.segment--material__button{background-color:#c8c8c8;background-color:var(--material-segment-active-background-color);color:#353535;color:var(--material-segment-active-text-color);border-radius:0;border-width:0}.segment--material__item:first-child>.segment--material__button,.segment--material__item:last-child>.segment--material__button{border-radius:0;border-width:0}:root{--tabbar-button-color:var(--tabbar-text-color);--tabbar-active-color:var(--tabbar-highlight-text-color);--material-tabbar-current-color:var(--material-tabbar-highlight-text-color);--tabbar-active-border-top:none;--tabbar-focus-border-top:none;--tabbar-height:49px;--tabbar-button-line-height:49px;--tabbar-button-border:none;--tabbar-active-box-shadow:none;--tabbar-button-focus-box-shadow:none;--tabbar-border-top:1px solid var(--tabbar-border-color)}.tabbar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-flex;display:flex;position:absolute;bottom:0;left:0;right:0;white-space:nowrap;margin:0;padding:0;height:49px;height:var(--tabbar-height);background-color:#fff;background-color:var(--tabbar-background-color);border-top:1px solid #ccc;border-top:var(--tabbar-border-top);width:100%}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(180deg,var(--tabbar-border-color),var(--tabbar-border-color) 50%,transparent 50%)}}.tabbar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:0;flex-basis:0;width:auto;border-radius:0}.tabbar__item>input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.tabbar__button{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;margin:0;font:inherit;background:0 0;border:none;cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative;display:inline-block;text-decoration:none;padding:0;height:49px;height:var(--tabbar-button-line-height);letter-spacing:0;color:#999;color:var(--tabbar-button-color);vertical-align:top;background-color:transparent;border-top:none;border-top:var(--tabbar-button-border);width:100%;font-weight:400;font-weight:var(--font-weight);line-height:49px;line-height:var(--tabbar-button-line-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar__button{border-top:none}}.tabbar__icon{font-size:24px;padding:0;margin:0;line-height:26px;display:block!important;height:28px}.tabbar__label{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:inline-block}.tabbar__badge.notification{vertical-align:text-bottom;top:-1px;margin-left:5px;z-index:10;font-size:12px;height:16px;min-width:16px;line-height:16px;border-radius:8px}.tabbar__icon~.tabbar__badge.notification{position:absolute;top:5px;margin-left:0}.tabbar__icon+.tabbar__label{display:block;font-size:10px;line-height:1;margin:0;font-weight:400;font-weight:var(--font-weight)}.tabbar__label:first-child{font-size:16px;line-height:49px;line-height:var(--tabbar-button-line-height);margin:0;padding:0}:checked+.tabbar__button{color:rgba(24,103,194,.81);color:var(--tabbar-active-color);background-color:transparent;box-shadow:none;box-shadow:var(--tabbar-active-box-shadow);border-top:none;border-top:var(--tabbar-active-border-top)}.tabbar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.tabbar__button:focus{z-index:1;border-top:none;border-top:var(--tabbar-focus-border-top);box-shadow:none;box-shadow:var(--tabbar-button-focus-box-shadow);outline:0}.tabbar__content{position:absolute;top:0;left:0;right:0;bottom:49px;bottom:var(--tabbar-height);z-index:0}.tabbar--autogrow .tabbar__item{-webkit-flex-basis:auto;flex-basis:auto}.tabbar--top{position:relative;top:0;left:0;right:0;bottom:auto;border-top:none;border-bottom:1px solid #ccc;border-bottom:var(--tabbar-border-top)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar--top{border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--tabbar-border-color),var(--tabbar-border-color) 50%,transparent 50%)}}.tabbar--top__content{top:49px;top:var(--tabbar-height);left:0;right:0;bottom:0;z-index:0}.tabbar--top-border__button{background-color:transparent;border-bottom:4px solid transparent}:checked+.tabbar--top-border__button{background-color:transparent;border-bottom:4px solid rgba(24,103,194,.81);border-bottom:4px solid var(--tabbar-active-color)}.tabbar__border{position:absolute;bottom:0;left:0;width:0;height:4px;background-color:rgba(24,103,194,.81);background-color:var(--tabbar-active-color)}.tabbar--material{background:0 0;background-color:#009688;background-color:var(--material-tabbar-background-color);border-bottom-width:0;box-shadow:0 4px 2px -2px rgba(0,0,0,.14),0 3px 5px -2px rgba(0,0,0,.12),0 5px 1px -4px rgba(0,0,0,.2)}.tabbar--material__button{background-color:transparent;color:rgba(255,255,255,.6);color:var(--material-tabbar-text-color);text-transform:uppercase;font-size:14px;font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.tabbar--material__button:after{content:'';display:block;width:0;height:2px;bottom:0;position:absolute;margin-top:-2px;background-color:#fff;background-color:var(--material-tabbar-current-color)}:checked+.tabbar--material__button:after{width:100%;transition:width .2s ease-in-out}:checked+.tabbar--material__button{background-color:transparent;color:#fff;color:var(--material-tabbar-current-color)}.tabbar--material__item:not([ripple]):active{background-color:#26a69a;background-color:var(--material-tabbar-highlight-color)}.tabbar--material__border{height:2px;background-color:#fff;background-color:var(--material-tabbar-current-color)}.tabbar--material__icon{font-size:22px!important;line-height:36px}.tabbar--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.tabbar--material__label:first-child{-webkit-font-smoothing:antialiased;letter-spacing:.015em;font-weight:500;font-size:14px}.tabbar--material__icon+.tabbar--material__label{font-size:10px}:root{--toolbar-button-background-color:rgba(0, 0, 0, 0);--toolbar-button-border-color:var(--toolbar-button-color);--toolbar-button-border-radius:2px;--toolbar-button-padding:4px 10px;--toolbar-button-active-background-color:var(--toolbar-button-background-color);--toolbar-button-border:1px solid var(--toolbar-button-border-color)}.toolbar-button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:4px 10px;padding:var(--toolbar-button-padding);letter-spacing:0;color:rgba(38,100,171,.81);color:var(--toolbar-button-color);background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-background-color);border-radius:2px;border-radius:var(--toolbar-button-border-radius);border:1px solid transparent;font-weight:400;font-weight:var(--font-weight);font-size:17px;font-size:var(--font-size);transition:none}.toolbar-button:active{background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-active-background-color);transition:none;opacity:.2}.toolbar-button:disabled,.toolbar-button[disabled]{opacity:.3;cursor:default;pointer-events:none}.toolbar-button:focus{outline:0;transition:none}.toolbar-button:hover{transition:none}.toolbar-button--outline{border:1px solid rgba(38,100,171,.81);border:var(--toolbar-button-border);margin:auto 8px;padding-left:6px;padding-right:6px}.toolbar-button--material{font-size:22px;color:#fff;color:var(--material-toolbar-button-color);display:inline-block;padding:0 12px;height:100%;margin:0;border:none;border-radius:0;vertical-align:baseline;vertical-align:initial;transition:background-color .25s linear}.toolbar-button--material:first-of-type{margin-left:4px}.toolbar-button--material:last-of-type{margin-right:4px}.toolbar-button--material:active{opacity:1;transition:background-color .25s linear}.back-button{height:44px;line-height:44px;padding-left:8px;color:rgba(38,100,171,.81);color:var(--toolbar-button-color);background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-background-color);display:inline-block}.back-button:active{opacity:.2}.back-button__label{display:inline-block;height:100%;vertical-align:top;line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large)}.back-button__icon{margin-right:6px;display:-webkit-inline-flex;display:inline-flex;fill:rgba(38,100,171,0.81);fill:var(--toolbar-button-color);-webkit-align-items:center;align-items:center;height:100%}.back-button--material{font-size:22px;color:#fff;color:var(--material-toolbar-button-color);display:inline-block;padding:0 12px;height:100%;margin:0 0 0 4px;border:none;border-radius:0;vertical-align:baseline;vertical-align:initial;line-height:56px}.back-button--material__label{display:none;font-size:20px}.back-button--material__icon{display:-webkit-inline-flex;display:inline-flex;fill:#ffffff;fill:var(--material-toolbar-button-color);-webkit-align-items:center;align-items:center;height:100%}.back-button--material:active{opacity:1}:root{--checkbox-size:22px;--checkbox-border:1px solid #c7c7cd;--checkbox-checked-background-color:var(--highlight-color);--background-color--before--checkbox:var(--checkbox-checked-background-color);--checkmark-border:2px solid #fff;--material-checkbox-size:18px;--material-checkbox-focus-ring-size:40px;--material-checkbox-focus-ring-shadow-size:calc((var(--material-checkbox-focus-ring-size) - var(--material-checkbox-size)) / 2)}.checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);line-height:22px;line-height:var(--checkbox-size)}.checkbox__checkmark{box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);height:22px;height:var(--checkbox-size);width:22px;width:var(--checkbox-size);pointer-events:none}.checkbox__input,.checkbox__input:checked{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox__checkmark:before{content:'';position:absolute;box-sizing:border-box;width:22px;width:var(--checkbox-size);height:22px;height:var(--checkbox-size);background:0 0;border:1px solid #c7c7cd;border:var(--checkbox-border);border-radius:22px;border-radius:var(--checkbox-size);left:0}.checkbox__checkmark:after{content:'';position:absolute;top:7px;left:5px;width:11px;height:5px;background:0 0;border:2px solid #fff;border:var(--checkmark-border);border-width:1px;border-top:none;border-right:none;border-radius:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}:checked+.checkbox__checkmark:before{background:rgba(24,103,194,.81);background:var(--background-color--before--checkbox);border:none}:checked+.checkbox__checkmark:after{opacity:1}:disabled+.checkbox__checkmark{opacity:.3;cursor:default;pointer-events:none}:disabled:active+.checkbox__checkmark:before{background:0 0}.checkbox--noborder__checkmark{background:0 0;border:none}.checkbox--noborder__checkmark:before{border:none}.checkbox--noborder__checkmark:after{height:4px;border:2px solid rgba(24,103,194,.81);border:2px solid var(--highlight-color)}:checked+.checkbox--noborder__checkmark:before{background:0 0}:focus+.checkbox--noborder__checkmark:before{border:none}:disabled:active+.checkbox--noborder__checkmark:before{border:none}.checkbox--material{line-height:18px;line-height:var(--material-checkbox-size);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);overflow:visible}.checkbox--material__checkmark{width:18px;width:var(--material-checkbox-size);height:18px;height:var(--material-checkbox-size)}.checkbox--material__checkmark:before{border-radius:2px;height:18px;height:var(--material-checkbox-size);width:18px;width:var(--material-checkbox-size);border:2px solid #717171;border:2px solid var(--material-checkbox-inactive-color);transition:background-color .1s linear .2s,border-color .1s linear .2s;background-color:transparent}:checked+.checkbox--material__checkmark:before{border:2px solid #009688;border:2px solid var(--material-checkbox-active-color);background-color:#009688;background-color:var(--material-checkbox-active-color);transition:background-color .1s linear,border-color .1s linear}.checkbox--material__checkmark:after{border-color:#fff;border-color:var(--material-checkbox-checkmark-color);transition:-webkit-transform .2s ease 0;transition:transform .2s ease 0;transition:transform .2s ease 0,-webkit-transform .2s ease 0;width:10px;height:5px;top:4px;left:3px;-webkit-transform:scale(0) rotate(-45deg);transform:scale(0) rotate(-45deg);border-width:2px}:checked+.checkbox--material__checkmark:after{transition:-webkit-transform .2s ease .2s;transition:transform .2s ease .2s;transition:transform .2s ease .2s,-webkit-transform .2s ease .2s;width:10px;height:5px;top:4px;left:3px;-webkit-transform:scale(1) rotate(-45deg);transform:scale(1) rotate(-45deg);border-width:2px}.checkbox--material__input:before{content:'';opacity:0;position:absolute;top:0;left:0;width:18px;width:var(--material-checkbox-size);height:18px;height:var(--material-checkbox-size);box-shadow:0 0 0 calc((40px - 18px)/ 2) #717171;box-shadow:0 0 0 var(--material-checkbox-focus-ring-shadow-size) var(--material-checkbox-inactive-color);box-sizing:border-box;border-radius:50%;background-color:#717171;background-color:var(--material-checkbox-inactive-color);pointer-events:none;display:block;-webkit-transform:scale3d(.2,.2,.2);transform:scale3d(.2,.2,.2);transition:opacity .25s ease-out,-webkit-transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out,-webkit-transform .1s ease-out}.checkbox--material__input:checked:before{box-shadow:0 0 0 calc((40px - 18px)/ 2) #009688;box-shadow:0 0 0 var(--material-checkbox-focus-ring-shadow-size) var(--material-checkbox-active-color);background-color:#009688;background-color:var(--material-checkbox-active-color)}.checkbox--material__input:active:before{opacity:.15;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}:disabled+.checkbox--material__checkmark{opacity:1}:disabled+.checkbox--material__checkmark:before{border-color:#afafaf}:disabled:checked+.checkbox--material__checkmark:before{background-color:#afafaf}:disabled:checked+.checkbox--material__checkmark:after{border-color:#fff}:root{--radio-button-background-active:rgba(0, 0, 0, 0);--radio-button-indicator-color:var(--highlight-color);--radio-button-background:transparent;--radio-button-border:3px solid var(--radio-button-indicator-color);--radio-button-size:24px;--material-radio-button-size:20px;--material-radio-button-shadow-size:calc((48px - var(--material-radio-button-size)) / 2)}.radio-button__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.radio-button__input:active,.radio-button__input:focus{outline:0;-webkit-tap-highlight-color:transparent}.radio-button{display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;position:relative;line-height:24px;line-height:var(--radio-button-size);text-align:left}.radio-button__checkmark:before{content:'';position:absolute;box-sizing:border-box;width:22px;width:var(--checkbox-size);height:22px;height:var(--checkbox-size);background:0 0;border:none;border-radius:22px;border-radius:var(--checkbox-size);left:0}.radio-button__checkmark{box-sizing:border-box;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;width:24px;width:var(--radio-button-size);height:24px;height:var(--radio-button-size);background:0 0;background:var(--radio-button-background);pointer-events:none}.radio-button__checkmark:after{content:'';position:absolute;top:7px;left:4px;opacity:0;width:11px;height:4px;background:0 0;border:2px solid rgba(24,103,194,.81);border:2px solid var(--highlight-color);border-top:none;border-right:none;border-radius:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}:checked+.radio-button__checkmark{background:rgba(0,0,0,0);background:var(--radio-button-background-active)}:checked+.radio-button__checkmark:after{opacity:1}:checked+.radio-button__checkmark:before{background:0 0;border:none}:disabled+.radio-button__checkmark{opacity:.3;cursor:default;pointer-events:none}.radio-button--material{line-height:calc(20px + 2px);line-height:calc(var(--material-radio-button-size) + 2px);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.radio-button--material__input:before{content:'';position:absolute;top:0;left:0;opacity:0;width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);box-shadow:0 0 0 calc((48px - 20px)/ 2) #717171;box-shadow:0 0 0 var(--material-radio-button-shadow-size) var(--material-radio-button-inactive-color);border:none;box-sizing:border-box;border-radius:50%;background-color:#717171;background-color:var(--material-radio-button-inactive-color);pointer-events:none;display:block;-webkit-transform:scale3d(.2,.2,.2);transform:scale3d(.2,.2,.2);transition:opacity .25s ease-out,-webkit-transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out,-webkit-transform .1s ease-out}.radio-button--material__input:checked:before{box-shadow:0 0 0 calc((48px - 20px)/ 2) #009688;box-shadow:0 0 0 var(--material-radio-button-shadow-size) var(--material-radio-button-active-color);background-color:#009688;background-color:var(--material-radio-button-active-color)}.radio-button--material__input:active:before{opacity:.15;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}.radio-button--material__checkmark{width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);overflow:visible}.radio-button--material__checkmark:before{background:0 0;border:2px solid #717171;border:2px solid var(--material-radio-button-inactive-color);box-sizing:border-box;border-radius:50%;width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);transition:border .2s ease}.radio-button--material__checkmark:after{transition:background .2s ease,-webkit-transform .2s ease;transition:background .2s ease,transform .2s ease;transition:background .2s ease,transform .2s ease,-webkit-transform .2s ease;top:calc(20px / 4);top:calc(var(--material-radio-button-size)/ 4);left:calc(20px / 4);left:calc(var(--material-radio-button-size)/ 4);width:calc(20px / 2);width:calc(var(--material-radio-button-size)/ 2);height:calc(20px / 2);height:calc(var(--material-radio-button-size)/ 2);border:none;border-radius:50%;-webkit-transform:scale(0);transform:scale(0)}:checked+.radio-button--material__checkmark:before{background:0 0;border:2px solid #009688;border:2px solid var(--material-radio-button-active-color)}.radio-button--material__input+.radio-button__checkmark:after{background:#717171;background:var(--material-radio-button-inactive-color);opacity:1;-webkit-transform:scale(0);transform:scale(0)}:checked+.radio-button--material__checkmark:after{opacity:1;background:#009688;background:var(--material-radio-button-active-color);-webkit-transform:scale(1);transform:scale(1)}:disabled+.radio-button--material__checkmark{opacity:1}:disabled+.radio-button--material__checkmark:after{background-color:#afafaf;background-color:var(--material-radio-button-disabled-color);border-color:#afafaf;border-color:var(--material-radio-button-disabled-color)}:disabled+.radio-button--material__checkmark:before{border-color:#afafaf;border-color:var(--material-radio-button-disabled-color)}:root{--list-item-color:var(--text-color);--list-item-active-background-color:var(--list-tap-active-background-color);--list-item-separator-color:var(--border-color);--list-border:1px solid var(--list-item-separator-color);--list-item-min-height:44px;--list-item-margin:0 0 -1px 0;--list-item-padding-side:14px;--list-item-padding:0 0 0 var(--list-item-padding-side);--list-border-top:1px solid var(--list-item-separator-color);--list-border-bottom:1px solid var(--list-item-separator-color);--list-header-color:var(--text-color);--list-header-font-size:12px;--list-header-padding:0 0 0 15px;--list-header-min-height:24px;--list-header-font-weight:var(--font-weight--large);--inset-list-border:1px solid var(--list-item-separator-color);--list-title-color:#6d6d72;--list-title-font-size:13px;--list-title-font-weight:500;--list-title-line-height:24px;--list-title-padding:0 0 0 16px;--material-list-item-side-padding:16px;--material-list-item-min-height:48px;--material-list-item-padding:0 0 0 var(--material-list-item-side-padding);--material-list-title-color:#757575;--material-list-title-font-size:14px;--material-list-title-font-weight:500;--material-list-title-line-height:24px;--material-list-title-padding:12px 0 12px var(--material-list-item-side-padding)}.list{padding:0;margin:0;color:inherit;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);list-style-type:none;text-align:left;display:block;-webkit-overflow-scrolling:touch;overflow:hidden;background-image:linear-gradient(#ccc,#ccc),linear-gradient(#ccc,#ccc);background-image:linear-gradient(var(--list-item-separator-color),var(--list-item-separator-color)),linear-gradient(var(--list-item-separator-color),var(--list-item-separator-color));background-size:100% 1px,100% 1px;background-repeat:no-repeat;background-position:bottom,top;border:none;background-color:#fff;background-color:var(--list-background-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%),linear-gradient(180deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%),linear-gradient(180deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item{position:relative;width:100%;list-style:none;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;padding:0 0 0 14px;padding:var(--list-item-padding);margin:0 0 -1px 0;margin:var(--list-item-margin);color:#1f1f21;color:var(--list-item-color);transition:background-color .2s linear}.list-item__top{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;-webkit-order:0;order:0;width:100%}.list-item--expandable{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);background-position-x:14px;background-position-x:var(--list-item-padding-side)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--expandable{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item__expandable-content{display:none;width:100%;padding:12px 14px 12px 0;box-sizing:border-box;-webkit-order:1;order:1;overflow:hidden}.list-item--expandable.list-item--expanded>.list-item__expandable-content{display:block;height:auto}.list-item__left{box-sizing:border-box;display:-webkit-flex;display:flex;padding:12px 14px 12px 0;-webkit-order:0;order:0;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}.list-item__left:empty{width:0;min-width:0;padding:0;margin:0}.list-item__center{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-order:1;order:1;margin-right:auto;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;margin-left:0;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);padding:12px 6px 12px 0;line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item__center{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item__right{box-sizing:border-box;display:-webkit-flex;display:flex;margin-left:auto;padding:12px 12px 12px 0;-webkit-order:2;order:2;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item__right{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-header{margin:0;list-style:none;text-align:left;display:block;box-sizing:border-box;padding:0 0 0 15px;padding:var(--list-header-padding);font-size:12px;font-size:var(--list-header-font-size);font-weight:500;font-weight:var(--list-header-font-weight);color:#1f1f21;color:var(--list-header-color);min-height:24px;min-height:var(--list-header-min-height);line-height:calc(1px + 24px);line-height:calc(1px + var(--list-header-min-height));text-transform:uppercase;position:relative;background-color:#eee;background-color:var(--list-header-background-color);background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-header{background-image:linear-gradient(180deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(180deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list--noborder{border-top:none;border-bottom:none;background-image:none}.list-item--tappable:active{transition:none;background-color:#d9d9d9;background-color:var(--list-item-active-background-color)}.list--inset{margin:0 8px;border:1px solid #ccc;border:var(--inset-list-border);border-radius:4px;background-image:none}.list-item__label{font-size:calc(17px - 3px);font-size:var(--font-size--mini);padding:0 4px;opacity:.6}.list-item__title{-webkit-flex-basis:100%;flex-basis:100%;-webkit-align-self:flex-end;align-self:flex-end;-webkit-order:0;order:0}.list-item__subtitle{opacity:.75;font-size:calc(17px - 3px);font-size:var(--font-size--mini);-webkit-order:1;order:1;-webkit-flex-basis:100%;flex-basis:100%;-webkit-align-self:flex-start;align-self:flex-start}.list-item__thumbnail{width:40px;height:40px;border-radius:6px;display:block;margin:0}.list-item__icon{font-size:22px;padding:0 6px}.list--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);background-image:none;background-color:#fff;background-color:var(--material-list-background-color)}.list-item--material{border:0;padding:0 0 0 16px;padding:var(--material-list-item-padding);line-height:normal}.list-item--material__subtitle{margin-top:4px}.list-item--material:first-child{box-shadow:none}.list-item--material__left{padding:14px 0;min-width:56px;line-height:1;min-height:48px;min-height:var(--material-list-item-min-height)}.list-item--material__center,.list-item--material__left:empty{padding:14px 6px 14px 0;border-color:#eee;border-color:var(--material-list-item-separator-color);border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);min-height:48px;min-height:var(--material-list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material__center,.list-item--material__left:empty{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material__right{padding:14px 16px 14px 0;line-height:1;border-color:#eee;border-color:var(--material-list-item-separator-color);border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);min-height:48px;min-height:var(--material-list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material__right{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material.list-item--expandable{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);background-position-x:16px;background-position-x:var(--material-list-item-side-padding)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material.list-item--expandable{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material.list-item--expandable.list-item--longdivider,.list-item--material.list-item--longdivider{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material.list-item--expandable.list-item--longdivider,.list-item--material.list-item--longdivider{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-header--material{background:#fff;background:var(--list-background-color);border:none;font-size:14px;text-transform:none;margin:-1px 0 0 0;color:#757575;color:var(--material-list-header-text-color);font-weight:500;padding:8px 16px}.list-header--material:not(:first-of-type){border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#eee,#eee 100%);background-image:linear-gradient(180deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);padding-top:16px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-header--material:not(:first-of-type){background-image:linear-gradient(180deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(180deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material__thumbnail{width:40px;height:40px;border-radius:100%}.list-item--material__icon{font-size:20px;padding:0 4px}.list-item--chevron:before,.list-item__expand-chevron{border-right:2px solid #c7c7cc;border-right:2px solid var(--list-item-chevron-color);border-bottom:2px solid #c7c7cc;border-bottom:2px solid var(--list-item-chevron-color);width:7px;height:7px;background-color:transparent;z-index:5}.list-item--chevron:before{position:absolute;content:'';right:16px;top:50%;-webkit-transform:translateY(-50%) rotate(-45deg);transform:translateY(-50%) rotate(-45deg)}.list-item__expand-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin:1px}.list-item--expandable.list-item--expanded .list-item__expand-chevron{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.list-item--chevron__right{padding-right:30px}.list-item--expandable .list-item__center,.list-item--expandable .list-item__right,.list-item--nodivider.list-item--expandable,.list-item--nodivider__center,.list-item--nodivider__right{border:none;background-image:none}.list-item--longdivider{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--longdivider{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item--longdivider:last-of-type{border:none;background-image:none}.list-item--longdivider__center{border:none;background-image:none}.list-item--longdivider__right{border:none;background-image:none}.list-title{background:0 0;border:none;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;color:#6d6d72;color:var(--list-title-color);text-align:left;box-sizing:border-box;padding:0 0 0 16px;padding:var(--list-title-padding);margin:0;font-size:13px;font-size:var(--list-title-font-size);font-weight:500;font-weight:var(--list-title-font-weight);line-height:24px;line-height:var(--list-title-line-height);text-transform:uppercase;letter-spacing:.04em}.list-title--material{-webkit-font-smoothing:antialiased;color:#757575;color:var(--material-list-title-color);font-size:14px;font-size:var(--material-list-title-font-size);margin:0;padding:12px 0 12px 16px;padding:var(--material-list-title-padding);font-weight:500;font-weight:var(--material-list-title-font-weight);line-height:24px;line-height:var(--material-list-title-line-height)}:root{--search-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+aW9zLXNlYXJjaC1pbnB1dC1pY29uPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9ImNvbXBvbmVudHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJpb3Mtc2VhcmNoLWlucHV0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DEzLDguNSBDMTAuNzkwODYxLDguNSA5LDEwLjI5MDg2MSA5LDEyLjUgQzksMTQuNzA5MTM5IDEwLjc5MDg2MSwxNi41IDEzLDE2LjUgWiIgaWQ9Imlvcy1zZWFyY2gtaW5wdXQtaWNvbiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');--search-input-background-image:var(--search-icon);--search-input-color:var(--input-text-color);--search-decoration-margin-right:0;--search-input-border-radius:5.5px;--search-input-height:28px;--search-input-font-size:14px;--search-input-placeholder-color:#7a797b;--material-search-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQzLjIgKDM5MDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJhbmRyb2lkLXNlYXJjaC1pbnB1dC1pY29uIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGZpbGw9IiM4OTg5ODkiPgogICAgICAgICAgICA8ZyBpZD0iY29tcG9uZW50cyI+CiAgICAg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A8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==')}.search-input{font:inherit;background:0 0;border:none;vertical-align:top;outline:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-appearance:textfield;appearance:textfield;box-sizing:border-box;height:28px;height:var(--search-input-height);font-size:14px;font-size:var(--search-input-font-size);background-color:rgba(3,3,3,.09);background-color:var(--search-input-background-color);box-shadow:none;color:#1f1f21;color:var(--search-input-color);line-height:1.3;padding:0 8px 0 28px;margin:0;border-radius:5.5px;border-radius:var(--search-input-border-radius);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+aW9zLXNlYXJjaC1pbnB1dC1pY29uPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9ImNvbXBvbmVudHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJpb3Mtc2VhcmNoLWlucHV0IiB0cmFuc2Zvcm09InRyYW5zbGF0Z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DEwLjI5MDg2MSA5LDEyLjUgQzksMTQuNzA5MTM5IDEwLjc5MDg2MSwxNi41IDEzLDE2LjUgWiIgaWQ9Imlvcy1zZWFyY2gtaW5wdXQtaWNvbiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');background-image:var(--search-input-background-image);background-position:8px center;background-repeat:no-repeat;background-size:13px;font-weight:400;font-weight:var(--font-weight);display:inline-block;text-indent:0}.search-input::-webkit-search-cancel-button{-webkit-appearance:textfield;appearance:textfield;display:none}.search-input::-webkit-search-decoration{display:none}.search-input:focus{outline:0}.search-input::-webkit-input-placeholder{color:#7a797b;color:var(--search-input-placeholder-color);font-size:14px;font-size:var(--search-input-font-size);text-indent:0}.search-input::placeholder{color:#7a797b;color:var(--search-input-placeholder-color);font-size:14px;font-size:var(--search-input-font-size);text-indent:0}.search-input:disabled{opacity:.3;cursor:default;pointer-events:none}.search-input--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);border-radius:2px;height:48px;background-color:#fafafa;background-color:var(--material-search-background-color);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQzLjIgKDM5MDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzP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uNDkxIEw2LjUsNi40OTEgWiIgaWQ9IlNoYXBlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0NTAwMCwgOC43NDU1MDApIHNjYWxlKC0xLCAxKSByb3RhdGUoLTE4MC4wMDAwMDApIHRyYW5zbGF0ZSgtOC43NDUwMDAsIC04Ljc0NTUwMCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==');background-image:var(--material-search-icon);background-size:18px;background-position:18px center;font-size:14px;padding:0 24px 0 64px;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24),0 1px 0 0 rgba(255,255,255,.06) inset}:root{--text-input-font-size:16px;--text-input-height:31px;--text-input-border-color:var(--input-border-color);--material-text-input-font-size:16px;--material-text-input-color:var(--material-text-input-text-color)}.text-input{font:inherit;background:0 0;vertical-align:top;outline:0;line-height:1;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border:none;background-color:transparent;letter-spacing:0;box-shadow:none;color:#1f1f21;color:var(--input-text-color);padding:0;margin:0;width:auto;font-size:16px;font-size:var(--text-input-font-size);height:31px;height:var(--text-input-height);font-weight:400;font-weight:var(--font-weight);box-sizing:border-box}.text-input::-ms-clear{display:none}.text-input:disabled{opacity:.3;cursor:default;pointer-events:none}.text-input::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.text-input::placeholder{color:#999;color:var(--input-placeholder-color)}.text-input:disabled::-webkit-input-placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.text-input:disabled::placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.text-input:invalid{border:none;background-color:transparent;color:#1f1f21;color:var(--input-invalid-text-color)}.text-input--underbar{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--text-input-border-color);border-radius:0}.text-input--underbar:disabled{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--text-input-border-color)}.text-input--underbar:disabled::-webkit-input-placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.text-input--underbar:disabled::placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.text-input--underbar:invalid{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--input-invalid-border-color)}.text-input--material{padding:0;margin:0;font:inherit;background:0 0;outline:0;line-height:1;-moz-osx-font-smoothing:grayscale;font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#212121;color:var(--material-text-input-color);background-image:linear-gradient(to top,transparent 1px,#afafaf 1px);background-image:linear-gradient(to top,transparent 1px,var(--material-text-input-inactive-color) 1px);background-size:100% 2px;background-repeat:no-repeat;background-position:center bottom;background-color:transparent;font-size:16px;font-size:var(--material-text-input-font-size);border:none;padding-bottom:2px;border-radius:0;height:24px;vertical-align:middle;-webkit-transform:translate3d(0,0,0)}.text-input--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#afafaf;color:var(--material-text-input-inactive-color);position:absolute;left:0;top:2px;font-size:16px;pointer-events:none}.text-input--material__label--active{color:#009688;color:var(--material-text-input-active-color);-webkit-transform:translate(0,-75%) scale(.75);transform:translate(0,-75%) scale(.75);-webkit-transform-origin:left top;transform-origin:left top;transition:color .1s ease-in,-webkit-transform .1s ease-in;transition:transform .1s ease-in,color .1s ease-in;transition:transform .1s ease-in,color .1s ease-in,-webkit-transform .1s ease-in}.text-input--material:focus{background-image:linear-gradient(#009688,#009688),linear-gradient(to top,transparent 1px,#afafaf 1px);background-image:linear-gradient(var(--material-text-input-active-color),var(--material-text-input-active-color)),linear-gradient(to top,transparent 1px,var(--material-text-input-inactive-color) 1px);-webkit-animation:material-text-input-animate .3s forwards;animation:material-text-input-animate .3s forwards}.text-input--material::-webkit-input-placeholder{color:#afafaf;color:var(--material-text-input-inactive-color);line-height:20px}.text-input--material::placeholder{color:#afafaf;color:var(--material-text-input-inactive-color);line-height:20px}@-webkit-keyframes material-text-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}@keyframes material-text-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}:root{--textarea-color:var(--input-text-color);--textarea-border:1px solid var(--input-border-color);--textarea-padding:5px 5px 5px 5px;--textarea-box-shadow:none;--textarea-border-radius:4px}.textarea{box-sizing:border-box;margin:0;font:inherit;background:0 0;line-height:normal;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;resize:none;outline:0;padding:5px 5px 5px 5px;padding:var(--textarea-padding);font-size:16px;font-size:var(--text-input-font-size);font-weight:400;font-weight:var(--font-weight);border-radius:4px;border-radius:var(--textarea-border-radius);border:1px solid #ccc;border:var(--textarea-border);background-color:#f9f9f9;background-color:var(--input-bg-color);color:#1f1f21;color:var(--textarea-color);letter-spacing:0;box-shadow:none;box-shadow:var(--textarea-box-shadow);-webkit-appearance:none;appearance:none;width:auto}.textarea:disabled{opacity:.3;cursor:default;pointer-events:none}.textarea::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.textarea::placeholder{color:#999;color:var(--input-placeholder-color)}.textarea--transparent{padding-left:0;padding-right:0;border:none;background-color:transparent}.dialog{box-sizing:border-box;padding:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:auto auto;overflow:hidden;min-width:270px;min-height:100px;text-align:left}.dialog-container{height:inherit;min-height:inherit;overflow:hidden;border-radius:4px;background-color:#f4f4f4;background-color:var(--dialog-background-color);-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');color:#1f1f21;color:var(--dialog-text-color)}.dialog-mask{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;position:absolute;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.2)}.dialog--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);text-align:left;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.dialog-container--material{border-radius:2px;background-color:#fff;background-color:var(--material-dialog-background-color);color:#1f1f21;color:var(--material-dialog-text-color)}.dialog-mask--material{background-color:rgba(0,0,0,.3)}.alert-dialog{box-sizing:border-box;padding:0;font:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:270px;margin:auto;background-color:#f4f4f4;background-color:var(--alert-dialog-background-color);border-radius:8px;overflow:visible;max-width:95%;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-container{height:inherit;padding-top:16px;overflow:hidden}.alert-dialog-title{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);padding:0 8px;text-align:center;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-content{box-sizing:border-box;background-clip:padding-box;padding:4px 12px 8px;font-size:calc(17px - 3px);font-size:var(--font-size--mini);min-height:36px;text-align:center;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-footer{width:100%}.alert-dialog-button{box-sizing:border-box;font:inherit;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none;letter-spacing:0;vertical-align:middle;border:none;border-top:1px solid #ddd;border-top:1px solid var(--alert-dialog-separator-color);font-size:calc(17px - 1px);font-size:calc(var(--font-size) - 1px);padding:0 8px;margin:0;display:block;width:100%;background-color:transparent;text-align:center;height:44px;line-height:44px;outline:0;color:rgba(24,103,194,.81);color:var(--alert-dialog-button-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#ddd,#ddd 50%,transparent 50%);background-image:linear-gradient(180deg,var(--alert-dialog-separator-color),var(--alert-dialog-separator-color) 50%,transparent 50%)}}.alert-dialog-button:active{background-color:rgba(0,0,0,.05)}.alert-dialog-button--primal{font-weight:500;font-weight:var(--font-weight--large)}.alert-dialog-footer--rowfooter{white-space:nowrap;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.alert-dialog-button--rowfooter{-webkit-flex:1;flex:1;display:block;width:100%;border-left:1px solid #ddd;border-left:1px solid var(--alert-dialog-separator-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter{border-top:none;border-left:none;background-size:100% 1px,1px 100%;background-repeat:no-repeat;background-position:top,left;background-image:linear-gradient(0deg,transparent,transparent 50%,#ddd 50%),linear-gradient(90deg,transparent,transparent 50%,#ddd 50%);background-image:linear-gradient(0deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%),linear-gradient(90deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%)}}.alert-dialog-button--rowfooter:first-child{border-left:none}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter:first-child{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top,left;background-image:linear-gradient(0deg,transparent,transparent 50%,#ddd 50%);background-image:linear-gradient(0deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%)}}.alert-dialog-mask{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;position:absolute;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.2)}.alert-dialog--material{border-radius:2px;background-color:#fff;background-color:var(--material-alert-dialog-background-color)}.alert-dialog-container--material{padding:22px 0 0 0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.alert-dialog-title--material{-webkit-font-smoothing:antialiased;text-align:left;font-size:20px;font-weight:500;padding:0 24px;color:#212121;color:var(--material-alert-dialog-title-color)}.alert-dialog-content--material{-webkit-font-smoothing:antialiased;text-align:left;font-size:16px;font-weight:400;font-weight:var(--material-font-weight);line-height:20px;padding:0 24px;margin:24px 0 10px 0;min-height:0;color:#727272;color:var(--material-alert-dialog-content-color)}.alert-dialog-footer--material{display:block;padding:0;height:52px;box-sizing:border-box;margin:0;line-height:1}.alert-dialog-button--material{-webkit-font-smoothing:antialiased;text-transform:uppercase;display:inline-block;width:auto;float:right;background:0 0;border:none;border-radius:2px;font-size:14px;font-weight:500;outline:0;height:36px;line-height:36px;padding:0 8px;margin:8px 8px 8px 0;box-sizing:border-box;min-width:50px;color:#009688;color:var(--material-alert-dialog-button-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--material{background:0 0}}.alert-dialog-button--material:active{background-color:transparent;background-color:initial}.alert-dialog-button--rowfooter--material,.alert-dialog-button--rowfooter--material:first-child{border:0}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter--material,.alert-dialog-button--rowfooter--material:first-child{background:0 0}}.alert-dialog-button--primal--material{font-weight:500}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--primal--material{background:0 0}}.alert-dialog-mask--material{background-color:rgba(0,0,0,.3)}:root{--popover-arrow-size:18px;--popover-arrow-radius:4px;--popover-radius:8px;--popover-margin:6px;--material-popover-radius:2px;--material-popover-margin:4px}.popover{position:absolute;z-index:20001}.popover--bottom{bottom:0}.popover--top{top:0}.popover--left{left:0}.popover--right{right:0}.popover-mask{left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.2);position:absolute;z-index:19999}.popover__content{box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:block;width:220px;overflow:auto;min-height:100px;max-height:100%;background-color:#fff;background-color:var(--popover-background-color);border-radius:8px;border-radius:var(--popover-radius);color:#1f1f21;color:var(--popover-text-color);pointer-events:auto}.popover__arrow{position:absolute;width:18px;width:var(--popover-arrow-size);height:18px;height:var(--popover-arrow-size);-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;background-color:transparent;background-image:linear-gradient(45deg,#fff,#fff 50%,transparent 50%);background-image:linear-gradient(45deg,var(--popover-background-color),var(--popover-background-color) 50%,transparent 50%);border-radius:0 0 0 4px;border-radius:0 0 0 var(--popover-arrow-radius);margin:0;z-index:20001}.popover--bottom__arrow{-webkit-transform:translateY(6px) translateX(calc(18px / -2)) rotate(-45deg);transform:translateY(6px) translateX(calc(18px / -2)) rotate(-45deg);-webkit-transform:translateY(6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(-45deg);transform:translateY(6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(-45deg);bottom:0;margin-right:-18px}.popover--top__arrow{-webkit-transform:translateY(-6px) translateX(calc(18px / -2)) rotate(135deg);transform:translateY(-6px) translateX(calc(18px / -2)) rotate(135deg);-webkit-transform:translateY(-6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(135deg);transform:translateY(-6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(135deg);top:0;margin-right:-18px}.popover--left__arrow{-webkit-transform:translateX(-6px) translateY(calc(18px / -2)) rotate(45deg);transform:translateX(-6px) translateY(calc(18px / -2)) rotate(45deg);-webkit-transform:translateX(-6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(45deg);transform:translateX(-6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(45deg);left:0;margin-bottom:-18px}.popover--right__arrow{-webkit-transform:translateX(6px) translateY(calc(18px / -2)) rotate(225deg);transform:translateX(6px) translateY(calc(18px / -2)) rotate(225deg);-webkit-transform:translateX(6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(225deg);transform:translateX(6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(225deg);right:0;margin-bottom:-18px}.popover-mask--material{background-color:transparent}.popover--material__content{background-color:#fafafa;background-color:var(--material-popover-background-color);border-radius:2px;border-radius:var(--material-popover-radius);color:#1f1f21;color:var(--material-popover-text-color);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.popover--material__arrow{display:none}.progress-bar{position:relative;height:2px;display:block;width:100%;background-color:#b6b6b6;background-color:var(--progress-bar-background-color);background-clip:padding-box;margin:0;overflow:hidden;border-radius:4px}.progress-bar__primary,.progress-bar__secondary{position:absolute;background-color:rgba(24,103,194,.81);background-color:var(--progress-bar-color);top:0;bottom:0;transition:width .3s linear;z-index:100;border-radius:4px}.progress-bar__secondary{background-color:rgba(24,103,194,.4);background-color:var(--progress-bar-secondary-color);z-index:0}.progress-bar--indeterminate:before{content:'';position:absolute;background-color:rgba(24,103,194,.81);background-color:var(--progress-bar-color);top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:progress-bar__indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:progress-bar__indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;border-radius:4px}.progress-bar--indeterminate:after{content:'';position:absolute;background-color:rgba(24,103,194,.81);background-color:var(--progress-bar-color);top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:progress-bar__indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:progress-bar__indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s;border-radius:4px}@-webkit-keyframes progress-bar__indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes progress-bar__indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@-webkit-keyframes progress-bar__indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}@keyframes progress-bar__indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}.progress-bar--material{height:4px;background-color:#e0e0e0;background-color:var(--material-progress-bar-background-color);border-radius:0}.progress-bar--material__primary,.progress-bar--material__secondary{background-color:#009688;background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-bar--material__secondary{background-color:#80cbc4;background-color:var(--material-progress-bar-secondary-color);z-index:0}.progress-bar--material.progress-bar--indeterminate:before{background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-bar--material.progress-bar--indeterminate:after{background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-circular{height:32px;position:relative;width:32px;-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-animation:none;animation:none}.progress-circular__background,.progress-circular__primary,.progress-circular__secondary{ + cx: 50%; + cy: 50%; + r: 40%; + -webkit-animation:none;animation:none;fill:none;stroke-width:5%;stroke-miterlimit:10}.progress-circular__background{stroke:#ddd;stroke:var(--progress-circle-background-color)}.progress-circular__primary{stroke-dasharray:1,200;stroke-dashoffset:0;stroke:rgba(24,103,194,0.81);stroke:var(--progress-circle-primary-color);transition:all 1s cubic-bezier(.4, 0, .2, 1)}.progress-circular__secondary{stroke:rgba(24,103,194,0.81);stroke:var(--progress-circle-secondary-color)}.progress-circular--indeterminate{-webkit-animation:progress__rotate 2s linear infinite;animation:progress__rotate 2s linear infinite;-webkit-transform:none;transform:none}.progress-circular--indeterminate__primary{-webkit-animation:progress__dash 1.5s ease-in-out infinite;animation:progress__dash 1.5s ease-in-out infinite}.progress-circular--indeterminate__secondary{display:none}@-webkit-keyframes progress__rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes progress__rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes progress__dash{0%{stroke-dasharray:10%,241.32%;stroke-dashoffset:0}50%{stroke-dasharray:201%,50.322%;stroke-dashoffset:-100%}100%{stroke-dasharray:10%,241.32%;stroke-dashoffset:-251.32%}}@keyframes progress__dash{0%{stroke-dasharray:10%,241.32%;stroke-dashoffset:0}50%{stroke-dasharray:201%,50.322%;stroke-dashoffset:-100%}100%{stroke-dasharray:10%,241.32%;stroke-dashoffset:-251.32%}}.progress-circular--material__background,.progress-circular--material__primary,.progress-circular--material__secondary{stroke-width:9%}.progress-circular--material__background{stroke:#dbdbdb;stroke:var(--material-progress-circle-background-color)}.progress-circular--material__primary{stroke:#009688;stroke:var(--material-progress-circle-primary-color)}.progress-circular--material__secondary{stroke:#80cbc4;stroke:var(--material-progress-circle-secondary-color)}:root{--fab-width:56px;--fab-height:56px;--fab-position:absolute;--fab-mini-width:40px;--fab-mini-height:40px;--material-fab-width:56px;--material-fab-height:56px;--material-fab-position:absolute;--material-fab-mini-width:40px;--material-fab-mini-height:40px}button.fab,ons-fab.fab,ons-speed-dial-item.fab{position:relative;display:inline-block;box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;width:56px;width:var(--fab-width);height:56px;height:var(--fab-height);text-decoration:none;font-size:25px;line-height:56px;line-height:var(--fab-height);letter-spacing:0;color:#fff;color:var(--fab-text-color);vertical-align:middle;text-align:center;background-color:rgba(24,103,194,.81);background-color:var(--fab-background-color);border:0 solid currentColor;border-radius:50%;overflow:hidden;box-shadow:0 3px 6px rgba(0,0,0,.12);transition:all .1s linear}button.fab:active,ons-fab.fab:active,ons-speed-dial-item.fab:active{background-color:rgba(24,103,194,.61);background-color:var(--fab-active-background-color);transition:all .2s ease;box-shadow:0 0 6px rgba(0,0,0,.12)}button.fab:focus,ons-fab.fab:focus,ons-speed-dial-item.fab:focus{outline:0}button.fab:disabled,button.fab[disabled],ons-fab.fab:disabled,ons-fab.fab[disabled],ons-speed-dial-item.fab:disabled,ons-speed-dial-item.fab[disabled]{background-color:rgba(0,0,0,.5);box-shadow:none;opacity:.3;cursor:default;pointer-events:none}button.fab__icon,ons-fab.fab__icon,ons-speed-dial-item.fab__icon{position:relative;overflow:hidden;height:100%;width:100%;display:block;border-radius:100%;padding:0;z-index:100;line-height:56px;line-height:var(--material-fab-height)}button.fab--material,ons-fab.fab--material,ons-speed-dial-item.fab--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);width:56px;width:var(--material-fab-width);height:56px;height:var(--material-fab-height);text-decoration:none;font-size:25px;line-height:56px;line-height:var(--material-fab-height);color:#fff;color:var(--material-fab-text-color);background-color:#009688;background-color:var(--material-fab-background-color);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4);transition:all .2s ease-in-out}button.fab--material:active,ons-fab.fab--material:active,ons-speed-dial-item.fab--material:active{background-color:rgba(0,150,136,.85);background-color:var(--material-fab-active-background-color);transition:all .2s ease}button.fab--material:focus,ons-fab.fab--material:focus,ons-speed-dial-item.fab--material:focus{outline:0}button.fab--material__icon,ons-fab.fab--material__icon,ons-speed-dial-item.fab--material__icon{position:relative;overflow:hidden;height:100%;width:100%;display:block;border-radius:100%;padding:0;z-index:100;line-height:56px;line-height:var(--material-fab-height)}button.fab--mini,ons-fab.fab--mini,ons-speed-dial-item.fab--mini{width:40px;width:var(--fab-mini-width);height:40px;height:var(--fab-mini-height);line-height:40px;line-height:var(--fab-mini-height)}button.fab--mini__icon,ons-fab.fab--mini__icon,ons-speed-dial-item.fab--mini__icon{line-height:40px;line-height:var(--fab-mini-height)}button.speed-dial__item,ons-fab.speed-dial__item,ons-speed-dial-item.speed-dial__item{position:absolute;-webkit-transform:scale(0);transform:scale(0)}.speed-dial.fab--top__right,button.fab--top__right,ons-fab.fab--top__right{top:20px;bottom:auto;right:20px;left:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__right,button.fab--bottom__right,ons-fab.fab--bottom__right{top:auto;bottom:20px;right:20px;left:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--top__left,button.fab--top__left,ons-fab.fab--top__left{top:20px;bottom:auto;right:auto;left:20px;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__left,button.fab--bottom__left,ons-fab.fab--bottom__left{top:auto;bottom:20px;right:auto;left:20px;position:absolute;position:var(--fab-position)}.speed-dial.fab--top__center,button.fab--top__center,ons-fab.fab--top__center{top:20px;bottom:auto;margin-left:-28px;left:50%;right:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__center,button.fab--bottom__center,ons-fab.fab--bottom__center{top:auto;bottom:20px;margin-left:-28px;left:50%;right:auto;position:absolute;position:var(--fab-position)}.modal{white-space:nowrap;word-spacing:0;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;box-sizing:border-box;background-clip:padding-box;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);overflow:hidden;background-color:rgba(0,0,0,.7);background-color:var(--modal-background-color);position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;display:table;z-index:2147483647}.modal__content{overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;background:0 0;border:none;line-height:normal;box-sizing:border-box;background-clip:padding-box;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:table-cell;vertical-align:middle;text-align:center;color:#fff;color:var(--modal-text-color);white-space:normal}:root{--select-input-font-size:var(--font-size);--select-input-height:32px;--material-select-input-font-size:15px;--select-arrow-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=')}.select-input{box-sizing:border-box;margin:0;font:inherit;background:0 0;vertical-align:top;outline:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;font-size:17px;font-size:var(--select-input-font-size);height:32px;height:var(--select-input-height);line-height:32px;line-height:var(--select-input-height);border-color:#ccc;border-color:var(--select-input-border-color);color:#1f1f21;color:var(--select-input-color);-webkit-appearance:none;appearance:none;display:inline-block;border-radius:0;border:none;padding:0 20px 0 0;background-color:transparent;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');background-image:var(--select-arrow-icon);background-repeat:no-repeat;background-position:right center;border-bottom:none}.select-input::-ms-clear{display:none}.select-input::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.select-input::placeholder{color:#999;color:var(--input-placeholder-color)}.select-input:disabled{opacity:.3;cursor:default;pointer-events:none;border:none;background-color:transparent}.select-input:disabled::-webkit-input-placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.select-input:disabled::placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.select-input:invalid{border:none;background-color:transparent;color:#1f1f21;color:var(--input-invalid-text-color)}.select-input[multiple]{height:calc(32px * 2);height:calc(var(--select-input-height) * 2)}.select-input--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#1f1f21;color:var(--material-select-input-color);font-size:15px;font-size:var(--material-select-input-font-size);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4='),linear-gradient(to top,rgba(0,0,0,.12) 50%,rgba(0,0,0,.12) 50%);background-image:var(--select-arrow-icon),linear-gradient(to top,var(--material-select-border-color) 50%,var(--material-select-border-color) 50%);background-size:auto,100% 1px;background-repeat:no-repeat;background-position:right center,left bottom;border:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.select-input--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:rgba(0,0,0,.81);color:var(--material-select-input-inactive-color);position:absolute;left:0;top:2px;font-size:16px;pointer-events:none}.select-input--material__label--active{color:rgba(0,0,0,.15);color:var(--material-select-input-active-color);-webkit-transform:translate(0,-75%) scale(.75);transform:translate(0,-75%) scale(.75);-webkit-transform-origin:left top;transform-origin:left top;transition:color .1s ease-in,-webkit-transform .1s ease-in;transition:transform .1s ease-in,color .1s ease-in;transition:transform .1s ease-in,color .1s ease-in,-webkit-transform .1s ease-in}.select-input--material::-webkit-input-placeholder{color:rgba(0,0,0,.81);color:var(--material-select-input-inactive-color);line-height:20px}.select-input--material::placeholder{color:rgba(0,0,0,.81);color:var(--material-select-input-inactive-color);line-height:20px}@-webkit-keyframes material-select-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}@keyframes material-select-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}.select-input--underbar{border:none;border-bottom:1px solid #ccc;border-bottom:1px solid var(--select-input-border-color)}.select-input--underbar:disabled{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--select-input-border-color)}.select-input--underbar:disabled::-webkit-input-placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.select-input--underbar:disabled::placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.select-input--underbar:invalid{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--input-invalid-border-color)}:root{--action-sheet-mask-color:rgba(0, 0, 0, 0.1);--material-action-sheet-mask-color:rgba(0, 0, 0, 0.2)}.action-sheet{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;position:absolute;left:10px;right:10px;bottom:10px;z-index:2}.action-sheet-button{box-sizing:border-box;height:56px;font-size:20px;text-align:center;color:rgba(24,103,194,.81);color:var(--action-sheet-button-color);background-color:rgba(255,255,255,.9);background-color:var(--action-sheet-button-background-color);border-radius:0;line-height:56px;border:none;-webkit-appearance:none;appearance:none;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 100%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.action-sheet-button{background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 50%,transparent 50%)}}.action-sheet-button:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.action-sheet-button:active{background-color:#e9e9e9;background-color:var(--action-sheet-button-active-background-color);background-image:none}.action-sheet-button:focus{outline:0}.action-sheet-button:nth-last-of-type(2){border-bottom-right-radius:12px;border-bottom-left-radius:12px;background-image:none}.action-sheet-button:last-of-type{border-radius:12px;margin:8px 0 0 0;background-color:#fff;background-color:var(--action-sheet-cancel-button-background-color);background-image:none;font-weight:600}.action-sheet-button:last-of-type:active{background-color:#e9e9e9;background-color:var(--action-sheet-button-active-background-color)}.action-sheet-button--destructive{color:#fe3824;color:var(--action-sheet-button-destructive-color)}.action-sheet-title{box-sizing:border-box;height:56px;font-size:13px;color:#8f8e94;color:var(--action-sheet-title-color);text-align:center;background-color:rgba(255,255,255,.9);background-color:var(--action-sheet-button-background-color);line-height:56px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 100%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.action-sheet-title{background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 50%,transparent 50%)}}.action-sheet-title:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.action-sheet-icon{display:none}.action-sheet-mask{position:absolute;left:0;top:0;right:0;bottom:0;background-color:rgba(0,0,0,.1);background-color:var(--action-sheet-mask-color);z-index:1}.action-sheet--material{left:0;right:0;bottom:0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.action-sheet-title--material{-webkit-font-smoothing:antialiased;border-radius:0;background-image:none;text-align:left;height:56px;line-height:56px;font-size:16px;padding:0 0 0 16px;color:#686868;color:var(--material-action-sheet-text-color);background-color:#fff;font-weight:400;font-weight:var(--material-font-weight)}.action-sheet-title--material:first-child{border-radius:0}.action-sheet-button--material{-webkit-font-smoothing:antialiased;border-radius:0;background-image:none;height:52px;line-height:52px;text-align:left;font-size:16px;padding:0 0 0 16px;color:#686868;color:var(--material-action-sheet-text-color);font-weight:400;font-weight:var(--material-font-weight);background-color:#fff}.action-sheet-button--material:first-child{border-radius:0}.action-sheet-button--material:nth-last-of-type(2){border-radius:0}.action-sheet-button--material:last-of-type{margin:0;border-radius:0;font-weight:400;background-color:#fff}.action-sheet-icon--material{display:inline-block;float:left;height:52px;line-height:52px;margin-right:32px;font-size:26px;width:.8em;text-align:center}.action-sheet-mask--material{background-color:rgba(0,0,0,.2);background-color:var(--material-action-sheet-mask-color)}:root{--card-text-line-height:1.4;--card-text-font-size:14px;--material-card-text-line-height:1.4;--material-card-text-font-size:14px}.card{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);box-shadow:0 1px 2px rgba(0,0,0,.12);border-radius:8px;background-color:#fff;background-color:var(--card-background-color);box-sizing:border-box;display:block;margin:8px;padding:16px;text-align:left;word-wrap:break-word}.card__content{margin:0;font-size:14px;font-size:var(--card-text-font-size);line-height:1.4;line-height:var(--card-text-line-height);color:#030303;color:var(--card-text-color)}.card__title{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:20px;margin:4px 0 8px 0;padding:0;display:block;box-sizing:border-box}.card--material{background-color:#fff;background-color:var(--material-card-background-color);border-radius:2px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.card--material__content{font-size:14px;font-size:var(--material-card-text-font-size);line-height:1.4;line-height:var(--material-card-text-line-height);color:rgba(0,0,0,.54);color:var(--material-card-text-color)}.card--material__title{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);font-size:24px;margin:8px 0 12px 0}.toast{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;z-index:2;left:8px;right:8px;bottom:0;margin:8px 0;border-radius:8px;background-color:rgba(0,0,0,.8);background-color:var(--toast-background-color);display:-webkit-flex;display:flex;min-height:48px;line-height:1.5;box-sizing:border-box;padding:16px 16px}.toast__message{font-size:14px;color:#fff;color:var(--toast-text-color);-webkit-flex-grow:1;flex-grow:1;text-align:left;margin:0 16px 0 0;white-space:normal}.toast__button{font-size:14px;color:#fff;color:var(--toast-button-text-color);-webkit-flex-grow:0;flex-grow:0;-webkit-appearance:none;appearance:none;border:none;background-color:transparent;cursor:default;text-transform:uppercase}.toast__button:focus{outline:0}.toast__button:active{opacity:.4}.toast--material{left:0;right:0;bottom:0;margin:0;background-color:rgba(0,0,0,.8);background-color:var(--material-toast-background-color);border-radius:0;padding:16px 24px}.toast--material__message{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);margin:0 24px 0 0}.toast--material__button{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#bbdefb;color:var(--material-toast-button-text-color)}.toolbar{top:0;box-sizing:border-box;padding-top:0}.bottom-bar{bottom:0;box-sizing:border-box;padding-bottom:0}.toolbar+.page__background{top:44px;top:var(--toolbar-height)}.page__content{top:0;padding-top:0;bottom:0}.toolbar+.page__background+.page__content{top:44px;top:var(--toolbar-height);padding-top:0}.page-with-bottom-toolbar>.page__content{bottom:44px}.toolbar.toolbar--material+.page__background{top:56px;top:var(--toolbar-material-height)}.toolbar.toolbar--material+.page__background+.page__content{top:56px;top:var(--toolbar-material-height);padding-top:0}.toolbar.toolbar--transparent+.page__background{top:0}.toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,.toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:44px;padding-top:var(--toolbar-height)}.toolbar.toolbar--material.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,.toolbar.toolbar--material.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:56px;padding-top:var(--toolbar-material-height)}.tabbar--top{padding-top:0}.tabbar:not(.tabbar--top){padding-bottom:0}:root{--iphonex-safe-area-inset-top-portrait:44px;--iphonex-safe-area-inset-right-portrait:0;--iphonex-safe-area-inset-bottom-portrait:34px;--iphonex-safe-area-inset-left-portrait:0;--iphonex-safe-area-inset-top-landscape:0;--iphonex-safe-area-inset-right-landscape:44px;--iphonex-safe-area-inset-bottom-landscape:21px;--iphonex-safe-area-inset-left-landscape:44px}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape);padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape)}html[onsflag-iphonex-landscape] .dialog .page__content,html[onsflag-iphonex-landscape] .modal .page__content{padding-left:0;padding-right:0}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .toolbar__left{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape)}html[onsflag-iphonex-landscape] .toolbar__right{padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape)}html[onsflag-iphonex-landscape] .bottom-bar{padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape);padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .tabbar{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape);padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape);width:calc(100% - 44px - 44px);width:calc(100% - var(--iphonex-safe-area-inset-left-landscape) - var(--iphonex-safe-area-inset-right-landscape))}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .fab--top__center,html[onsflag-iphonex-portrait] .fab--top__left,html[onsflag-iphonex-portrait] .fab--top__right{top:calc(44px + 20px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + 20px)}html[onsflag-iphonex-portrait] .fab--bottom__center,html[onsflag-iphonex-portrait] .fab--bottom__left,html[onsflag-iphonex-portrait] .fab--bottom__right{bottom:calc(34px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait))}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .fab--bottom__center,html[onsflag-iphonex-landscape] .fab--bottom__left,html[onsflag-iphonex-landscape] .fab--bottom__right{bottom:calc(21px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape))}html[onsflag-iphonex-landscape] .fab--bottom__left,html[onsflag-iphonex-landscape] .fab--top__left{left:calc(44px);left:calc(var(--iphonex-safe-area-inset-left-landscape))}html[onsflag-iphonex-landscape] .fab--bottom__right,html[onsflag-iphonex-landscape] .fab--top__right{right:calc(44px);right:calc(var(--iphonex-safe-area-inset-right-landscape))}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .action-sheet{bottom:calc(34px + 14px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + 14px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .action-sheet{left:calc((100vw - (100vh + 20px))/ 2);right:calc((100vw - (100vh + 20px))/ 2);bottom:calc(21px + 12px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + 12px)}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .toast{bottom:34px;bottom:var(--iphonex-safe-area-inset-bottom-portrait)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .toast{left:calc(44px + 8px);left:calc(var(--iphonex-safe-area-inset-left-landscape) + 8px);right:calc(44px + 8px);right:calc(var(--iphonex-safe-area-inset-right-landscape) + 8px);bottom:21px;bottom:var(--iphonex-safe-area-inset-bottom-landscape)}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .toolbar{top:0;box-sizing:content-box;padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait)}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar,html[onsflag-iphonex-portrait] .dialog .toolbar,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar{box-sizing:border-box;padding-top:0}html[onsflag-iphonex-portrait] .bottom-bar{bottom:0;box-sizing:content-box;padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}html[onsflag-iphonex-portrait] .dialog .bottom-bar,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .bottom-bar,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .bottom-bar{box-sizing:border-box;padding-bottom:0}html[onsflag-iphonex-portrait] .page__content{top:0;padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait);bottom:0;padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .page__content,/* if wrapped with a top tabbar */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .dialog .page__content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .page__content{padding-top:0}/* if wrapped with a bottom tabbar */ html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .dialog .page__content,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .page__content,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page__content{padding-bottom:0}html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content{top:calc(44px + 44px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height));padding-top:0}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content{top:var(--toolbar-height);padding-top:0}html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content{bottom:calc(34px + 44px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--toolbar-height));padding-bottom:0}html[onsflag-iphonex-portrait] .dialog .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar>.page__content{bottom:var(--toolbar-height);padding-bottom:0}html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:calc(44px + 44px);padding-top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height))}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page__content,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content{padding-top:44px;padding-top:var(--toolbar-height)}html[onsflag-iphonex-portrait] .tabbar--top{padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait)}html[onsflag-iphonex-portrait] .tabbar--top__content{top:calc(44px + 49px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--tabbar-height))}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .tabbar--top__content,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .tabbar--top__content,html[onsflag-iphonex-portrait] .dialog .tabbar--top__content{top:var(--tabbar-height)}html[onsflag-iphonex-portrait] .tabbar:not(.tabbar--top):not(.tabbar--top){padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content){bottom:calc(34px + 49px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--tabbar-height))}/* if wrapped with a page with a bottom-bar */ html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content),/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .tabbar__content:not(.tabbar--top__content),html[onsflag-iphonex-portrait] .dialog .tabbar__content:not(.tabbar--top__content){bottom:var(--tabbar-height)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .bottom-bar{bottom:0;box-sizing:content-box;padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}html[onsflag-iphonex-landscape] .dialog .bottom-bar,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .bottom-bar,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .bottom-bar{box-sizing:border-box;padding-bottom:0}html[onsflag-iphonex-landscape] .page__content{bottom:0;padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}/* if wrapped with a bottom tabbar */ html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .dialog .page__content,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .page__content,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page__content{padding-bottom:0}html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content{bottom:calc(21px + 44px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--toolbar-height));padding-bottom:0}html[onsflag-iphonex-landscape] .dialog .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar>.page__content{bottom:var(--toolbar-height);padding-bottom:0}html[onsflag-iphonex-landscape] .tabbar:not(.tabbar--top){padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content){bottom:calc(21px + 49px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--tabbar-height))}/* if wrapped with a page with a bottom-bar */ html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content),/* if wrapped with dialogs */ html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .tabbar__content:not(.tabbar--top__content),html[onsflag-iphonex-landscape] .dialog .tabbar__content:not(.tabbar--top__content){bottom:var(--tabbar-height)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset){margin-left:calc(-1 * 44px);margin-left:calc(-1 * var(--iphonex-safe-area-inset-left-landscape));margin-right:calc(-1 * 44px);margin-right:calc(-1 * var(--iphonex-safe-area-inset-right-landscape))}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-header{padding-left:calc(44px + 15px);padding-left:calc(var(--iphonex-safe-area-inset-left-landscape) + 15px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item{padding-left:calc(var(--iphonex-safe-area-inset-left-landscape) + 14px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:calc(44px + 16px);right:calc(var(--iphonex-safe-area-inset-right-landscape) + 16px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:calc(44px + 6px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 6px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:calc(44px + 12px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 12px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:calc(44px + 30px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 30px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset){margin-left:0;margin-right:0}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-header{padding-left:15px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item{padding-left:14px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:16px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:6px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:12px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:30px}} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/onsen-css-components.min.css b/Server/www/spiderbasic/onsenui-css/onsen-css-components.min.css new file mode 100644 index 0000000..f1dbe43 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/onsen-css-components.min.css @@ -0,0 +1,35 @@ +/*! + * Copyright 2013-2017 ASIAL CORPORATION + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *//*! + * Copyright 2012 Adobe Systems Inc.; + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */:root{--background-color:#efeff4;--text-color:#1f1f21;--sub-text-color:#999;--highlight-color-rgb:0,118,255;--highlight-color:rgb(var(--highlight-color-rgb));--second-highlight-color:#25a6d9;--border-color:#ccc;--button-background-color:var(--highlight-color);--button-cta-background-color:var(--second-highlight-color);--toolbar-background-color:#fafafa;--toolbar-button-color:var(--highlight-color);--toolbar-text-color:#1f1f21;--toolbar-border-color:#b2b2b2;--button-bar-color:var(--highlight-color);--button-bar-active-text-color:#fff;--button-bar-active-background-color:unset;--button-bar-active-background-color-default-blend-color:white;--button-bar-active-background-color-default-blend-time:-0.7s;--button-light-color:black;--segment-color:var(--highlight-color);--segment-active-text-color:#fff;--segment-active-background-color:unset;--segment-active-background-color-default-blend-color:white;--segment-active-background-color-default-blend-time:-0.7s;--list-background-color:#fff;--list-header-background-color:#eee;--list-tap-active-background-color:#d9d9d9;--list-item-chevron-color:#c7c7cc;--progress-bar-color:var(--highlight-color);--progress-bar-secondary-color:#65adff;--progress-bar-background-color:transparent;--progress-circle-primary-color:var(--highlight-color);--progress-circle-secondary-color:#65adff;--progress-circle-background-color:transparent;--tabbar-background-color:#fafafa;--tabbar-text-color:#999;--tabbar-highlight-text-color:var(--highlight-color);--tabbar-border-color:#ccc;--switch-highlight-color:#44db5e;--switch-border-color:#e5e5e5;--switch-background-color:white;--range-track-background-color:#a4aab3;--range-track-background-color-active:var(--highlight-color);--range-thumb-background-color:#fff;--modal-background-color:rgba(0, 0, 0, 0.7);--modal-text-color:#fff;--alert-dialog-background-color:#f4f4f4;--alert-dialog-text-color:#1f1f21;--alert-dialog-button-color:var(--highlight-color);--alert-dialog-separator-color:#ddd;--dialog-background-color:#f4f4f4;--dialog-text-color:var(--text-color);--popover-background-color:white;--popover-text-color:#1f1f21;--action-sheet-title-color:#8f8e94;--action-sheet-button-separator-color:rgba(0, 0, 0, 0.1);--action-sheet-button-color:var(--highlight-color);--action-sheet-button-destructive-color:#fe3824;--action-sheet-button-background-color:rgba(255, 255, 255, 0.9);--action-sheet-button-active-background-color:#e9e9e9;--action-sheet-cancel-button-background-color:#fff;--notification-background-color:#fe3824;--notification-color:white;--search-input-background-color:rgba(3, 3, 3, 0.09);--fab-text-color:#ffffff;--fab-background-color-rgb:var(--highlight-color-rgb);--fab-background-color:rgba(var(--fab-background-color-rgb));--fab-active-background-color:rgba(var(--fab-background-color-rgb), 0.7);--card-background-color:white;--card-text-color:#030303;--toast-background-color:rgba(0, 0, 0, 0.8);--toast-text-color:white;--toast-button-text-color:white;--select-input-color:var(--text-color);--select-input-border-color:var(--border-color);--material-background-color:#eceff1;--material-text-color:var(--text-color);--material-notification-background-color:#e91e63;--material-notification-color:white;--material-switch-active-thumb-color:#37474f;--material-switch-active-background-color:rgba(55, 71, 79, 0.5);--material-switch-inactive-thumb-color:#f1f1f1;--material-switch-inactive-background-color:#b0afaf;--material-range-track-color:#bdbdbd;--material-range-thumb-color:#31313a;--material-range-disabled-thumb-color:#b0b0b0;--material-range-disabled-thumb-border-color:#eeeeee;--material-range-zero-thumb-color:#f2f2f2;--material-toolbar-background-color:#ffffff;--material-toolbar-text-color:#31313a;--material-toolbar-button-color:#1e88e5;--material-segment-background-color:#fafafa;--material-segment-active-background-color:#c8c8c8;--material-segment-text-color:rgba(0, 0, 0, 0.38);--material-segment-active-text-color:#353535;--material-button-background-color:#2979ff;--material-button-text-color:#ffffff;--material-button-disabled-background-color:rgba(79, 79, 79, 0.26);--material-button-disabled-color:rgba(0, 0, 0, 0.26);--material-flat-button-active-background-color:rgba(153, 153, 153, 0.2);--material-list-background-color:#fff;--material-list-item-separator-color:#eee;--material-list-header-text-color:#757575;--material-checkbox-active-color:#37474f;--material-checkbox-inactive-color:#717171;--material-checkbox-checkmark-color:#ffffff;--material-radio-button-active-color:#37474f;--material-radio-button-inactive-color:#717171;--material-radio-button-disabled-color:#afafaf;--material-text-input-text-color:#212121;--material-text-input-active-color:#3d5afe;--material-text-input-inactive-color:#afafaf;--material-search-background-color:#fafafa;--material-dialog-background-color:#ffffff;--material-dialog-text-color:var(--material-text-color);--material-alert-dialog-background-color:#ffffff;--material-alert-dialog-title-color:#31313a;--material-alert-dialog-content-color:rgba(49, 49, 58, 0.85);--material-alert-dialog-button-color:#37474f;--material-progress-bar-primary-color:#37474f;--material-progress-bar-secondary-color:#548ba7;--material-progress-bar-background-color:transparent;--material-progress-circle-primary-color:var(--material-progress-bar-primary-color);--material-progress-circle-secondary-color:var(--material-progress-bar-secondary-color);--material-progress-circle-background-color:transparent;--material-tabbar-background-color:#ffffff;--material-tabbar-text-color:#31313a;--material-tabbar-highlight-text-color:#31313a;--material-tabbar-highlight-color:rgba(49, 49, 58, 0.1);--material-fab-text-color:#31313a;--material-fab-background-color:#ffffff;--material-fab-active-background-color:rgba(255, 255, 255, 0.75);--material-card-background-color:white;--material-card-text-color:rgba(0, 0, 0, 0.54);--material-toast-background-color:rgba(0, 0, 0, 0.8);--material-toast-text-color:white;--material-toast-button-text-color:#bbdefb;--material-select-input-color:var(--material-text-color);--material-select-input-active-color:rgba(0, 0, 0, 0.15);--material-select-input-inactive-color:rgba(0, 0, 0, 0.81);--material-select-border-color:rgba(0, 0, 0, 0.12);--material-popover-background-color:#fafafa;--material-popover-text-color:var(--material-text-color);--material-action-sheet-text-color:#686868;--tap-highlight-color:transparent}:root{--input-bg-color:var(--background-color);--input-border-color:var(--border-color);--input-text-color:var(--text-color);--input-placeholder-color:var(--sub-text-color);--input-invalid-border-color:var(--border-color);--input-invalid-text-color:var(--text-color);--input-border:1px solid var(--input-border-color);--font-size:17px;--font-weight:400;--material-font-size:17px;--material-font-weight:400;--font-size--mini:calc(var(--font-size) - 3px);--font-weight--large:500;--background-color--input:transparent}html{height:100%;width:100%}body{position:absolute;overflow:hidden;top:0;right:0;left:0;bottom:0;padding:0;margin:0;-webkit-text-size-adjust:100%;touch-action:manipulation}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:var(--tap-highlight-color);-webkit-touch-callout:none}input,select,textarea{-webkit-user-select:auto;user-select:auto;-moz-user-select:text;-webkit-touch-callout:none}a,button,input,select,textarea{touch-action:manipulation}input:active,input:focus,select:active,select:focus,textarea:active,textarea:focus{outline:0}h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4,h5,h6{font-size:18px}@-webkit-keyframes blend-background-color{0%{background-color:var(--blend-background-color__base)}100%{background-color:var(--blend-background-color__color)}}@keyframes blend-background-color{0%{background-color:var(--blend-background-color__base)}100%{background-color:var(--blend-background-color__color)}}@-webkit-keyframes blend-color{0%{color:var(--blend-color__base)}100%{color:var(--blend-color__color)}}@keyframes blend-color{0%{color:var(--blend-color__base)}100%{color:var(--blend-color__color)}}@-webkit-keyframes blend-border-color{0%{border-color:var(--blend-border-color__base)}100%{border-color:var(--blend-border-color__color)}}@keyframes blend-border-color{0%{border-color:var(--blend-border-color__base)}100%{border-color:var(--blend-border-color__color)}}:root{--page-background-color:var(--background-color);--page-material-background-color:var(--material-background-color)}.page{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);background-color:#efeff4;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;overflow-x:visible;overflow-y:hidden;color:#1f1f21;color:var(--text-color);-ms-overflow-style:none;-webkit-font-smoothing:antialiased}.page::-webkit-scrollbar{display:none}.page__content{background-color:#efeff4;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box}.page__background{background-color:#efeff4;background-color:var(--page-background-color);position:absolute;top:0;left:0;right:0;bottom:0;box-sizing:border-box}.page--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);background-color:#eceff1;background-color:var(--page-material-background-color)}.page--material__content{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--font-weight)}.page__content h1,.page__content h2,.page__content h3,.page__content h4,.page__content h5{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:500;font-weight:var(--font-weight--large);margin:.6em 0;padding:0}.page__content h1{font-size:28px}.page__content h2{font-size:24px}.page__content h3{font-size:20px}.page--material__content h1,.page--material__content h2,.page--material__content h3,.page--material__content h4,.page--material__content h5{-webkit-font-smoothing:antialiased;font-weight:500;font-weight:var(--font-weight--large);margin:.6em 0;padding:0}.page--material__content h1{font-size:28px}.page--material__content h2{font-size:24px}.page--material__content h3{font-size:20px}.page--material__background{background-color:#eceff1;background-color:var(--page-material-background-color)}:root{--switch-checked-background-color:var(--switch-highlight-color);--switch-thumb-background-color:white;--switch-thumb-border-color:var(--border-color);--switch-thumb-border-color-active:var(--switch-highlight-color);--switch-height:32px;--switch-width:51px}.switch{display:inline-block;vertical-align:top;box-sizing:border-box;background-clip:padding-box;position:relative;min-width:51px;font-size:17px;font-size:var(--font-size);padding:0 20px;border:none;overflow:visible;width:51px;width:var(--switch-width);height:32px;height:var(--switch-height);z-index:0;text-align:left}.switch__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:0}.switch__toggle{background-color:#fff;background-color:var(--switch-background-color);position:absolute;top:0;left:0;right:0;bottom:0;border-radius:30px;transition-property:all;transition-duration:.35s;transition-timing-function:ease-out;box-shadow:inset 0 0 0 2px #e5e5e5;box-shadow:inset 0 0 0 2px var(--switch-border-color)}.switch__handle{box-sizing:border-box;background-clip:padding-box;position:absolute;content:'';border-radius:28px;height:28px;width:28px;background-color:#fff;background-color:var(--switch-thumb-background-color);left:1px;top:2px;transition-property:all;transition-duration:.35s;transition-timing-function:cubic-bezier(.59,.01,.5,.99);box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25)}.switch--active__handle{transition:none}:checked+.switch__toggle{box-shadow:inset 0 0 0 2px #44db5e;box-shadow:inset 0 0 0 2px var(--switch-checked-background-color);background-color:#44db5e;background-color:var(--switch-checked-background-color)}:checked+.switch__toggle>.switch__handle{left:21px;box-shadow:0 3px 2px rgba(0,0,0,.25)}:disabled+.switch__toggle{opacity:.3;cursor:default;pointer-events:none}.switch__touch{position:absolute;top:-5px;bottom:-5px;left:-10px;right:-10px}.switch--material{width:36px;height:24px;padding:0 10px;min-width:36px}.switch--material__toggle{background-color:#b0afaf;background-color:var(--material-switch-inactive-background-color);margin-top:5px;height:14px;box-shadow:none}.switch--material__input{right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:0}.switch--material__handle{background-color:#f1f1f1;background-color:var(--material-switch-inactive-thumb-color);left:0;margin-top:-5px;width:20px;height:20px;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)}:checked+.switch--material__toggle{background-color:rgba(55,71,79,.5);background-color:var(--material-switch-active-background-color);box-shadow:none}:checked+.switch--material__toggle>.switch--material__handle{left:16px;background-color:#37474f;background-color:var(--material-switch-active-thumb-color);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.switch--material__handle:before{background:0 0;content:'';display:block;width:100%;height:100%;border-radius:50%;z-index:0;box-shadow:0 0 0 0 rgba(0,0,0,.12);transition:box-shadow .1s linear}.switch--material__toggle>.switch--active__handle:before{box-shadow:0 0 0 14px rgba(0,0,0,.12)}:checked+.switch--material__toggle>.switch--active__handle:before{animation:blend-box-shadow 1s -.2s linear forwards paused}@-webkit-keyframes blend-box-shadow{0%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 14px #37474f;box-shadow:0 0 0 14px var(--material-switch-active-thumb-color)}}@keyframes blend-box-shadow{0%{box-shadow:0 0 0 14px transparent}100%{box-shadow:0 0 0 14px #37474f;box-shadow:0 0 0 14px var(--material-switch-active-thumb-color)}}.switch--material__touch{position:absolute;top:-10px;bottom:-10px;left:-15px;right:-15px}:root{--range-thumb-size:28px;--range-track-height:2px;--material-range-track-height:2px;--material-range-thumb-size:14px;--material-range-thumb-radius:calc(var(--material-range-thumb-size) / 2);--material-range-thumb-vertical-margin:24px;--material-range-thumb-horizontal-margin:2px}.range{display:inline-block;position:relative;width:100px;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);margin:0;padding:0;background-image:linear-gradient(#a4aab3,#a4aab3);background-image:linear-gradient(var(--range-track-background-color),var(--range-track-background-color));background-position:left center;background-size:100% 2px;background-size:100% var(--range-track-height);background-repeat:no-repeat;background-color:transparent}.range__input{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;appearance:none;background-image:linear-gradient(#0076ff,#0076ff);background-image:linear-gradient(var(--range-track-background-color-active),var(--range-track-background-color-active));background-position:left center;background-size:0 2px;background-size:0 var(--range-track-height);background-repeat:no-repeat;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);position:relative;z-index:1;width:100%}.range__input::-moz-range-track{position:relative;border:none;background:0 0;box-shadow:none;top:0;margin:0;padding:0}.range__input::-ms-track{position:relative;border:none;background-color:#a4aab3;background-color:var(--range-track-background-color);height:0;border-radius:50%}.range__input::-webkit-slider-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0;box-sizing:border-box;-webkit-appearance:none;appearance:none;top:0;z-index:1}.range__input::-moz-range-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0}.range__input::-ms-thumb{cursor:pointer;position:relative;height:28px;height:var(--range-thumb-size);width:28px;width:var(--range-thumb-size);background-color:#fff;background-color:var(--range-thumb-background-color);border:none;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25);border-radius:50%;margin:0;padding:0;top:0}.range__input::-ms-fill-lower{height:2px;background-color:#0076ff;background-color:var(--range-track-background-color-active)}.range__input::-ms-tooltip{display:none}.range__input:disabled{opacity:1;pointer-events:none}.range__focus-ring{pointer-events:none;top:0;left:0;display:none;box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;border:none;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;appearance:none;background:0 0;height:calc(28px + 2px);height:calc(var(--range-thumb-size) + 2px);position:absolute;z-index:0;width:100%}.range--disabled{cursor:default;pointer-events:none}.range--material{position:relative;background-image:linear-gradient(#bdbdbd,#bdbdbd);background-image:linear-gradient(var(--material-range-track-color),var(--material-range-track-color))}.range--material__input{background-image:linear-gradient(#31313a,#31313a);background-image:linear-gradient(var(--material-range-thumb-color),var(--material-range-thumb-color));background-position:center left;background-size:0 2px}.range--material__focus-ring{display:block}.range--material__focus-ring::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;width:var(--material-range-thumb-size);height:14px;height:var(--material-range-thumb-size);border:none;box-shadow:0 0 0 calc((32px - 14px)/ 2) #31313a;box-shadow:0 0 0 calc((32px - var(--material-range-thumb-size))/ 2) var(--material-range-thumb-color);background-color:#31313a;background-color:var(--material-range-thumb-color);border-radius:50%;opacity:0;-webkit-transition:opacity .25s ease-out,-webkit-transform .25s ease-out;transition:opacity .25s ease-out,-webkit-transform .25s ease-out;transition:opacity .25s ease-out,transform .25s ease-out;transition:opacity .25s ease-out,transform .25s ease-out,-webkit-transform .25s ease-out}.range--material__input.range__input--active+.range--material__focus-ring::-webkit-slider-thumb{opacity:.2;-webkit-transform:scale(1.5,1.5,1.5);transform:scale(1.5,1.5,1.5)}.range--material__input::-webkit-slider-thumb{position:relative;box-sizing:border-box;border:none;background-color:transparent;width:14px;width:var(--material-range-thumb-size);height:32px;border-radius:0;box-shadow:none;background-image:radial-gradient(circle farthest-corner,#31313a 0,#31313a calc(calc(14px / 2) - .4px),transparent calc(14px / 2));background-image:radial-gradient(circle farthest-corner,var(--material-range-thumb-color) 0,var(--material-range-thumb-color) calc(var(--material-range-thumb-radius) - .4px),transparent var(--material-range-thumb-radius));-webkit-transition:-webkit-transform .1s linear;transition:-webkit-transform .1s linear;transition:transform .1s linear;transition:transform .1s linear,-webkit-transform .1s linear;overflow:visible}.range--material__input[_zero]::-webkit-slider-thumb{background-image:radial-gradient(circle farthest-corner,#f2f2f2 0,#f2f2f2 4px,#bdbdbd 4px,#bdbdbd calc(calc(14px / 2) - .6px),transparent calc(calc(14px / 2)));background-image:radial-gradient(circle farthest-corner,var(--material-range-zero-thumb-color) 0,var(--material-range-zero-thumb-color) 4px,var(--material-range-track-color) 4px,var(--material-range-track-color) calc(var(--material-range-thumb-radius) - .6px),transparent calc(var(--material-range-thumb-radius)))}.range--material__input[_zero]+.range--material__focus-ring::-webkit-slider-thumb{box-shadow:0 0 0 calc((32px - 14px)/ 2) #bdbdbd;box-shadow:0 0 0 calc((32px - var(--material-range-thumb-size))/ 2) var(--material-range-track-color)}.range--material__input::-moz-range-track{background:0 0}.range--material__input::-moz-range-thumb,.range--material__input:focus::-moz-range-thumb{box-sizing:border-box;border:none;width:14px;width:var(--material-range-thumb-size);height:32px;border-radius:0;background-color:transparent;background-image:-moz-radial-gradient(circle farthest-corner,var(--material-range-thumb-color) 0,var(--material-range-thumb-color) calc(var(--material-range-thumb-radius) - .4px),transparent var(--material-range-thumb-radius));box-shadow:none}.range--material__input.range__input--active::-webkit-slider-thumb,.range--material__input:active::-webkit-slider-thumb{transform:scale(1.5);-webkit-transition:-webkit-transform .1s linear;transition:-webkit-transform .1s linear;transition:transform .1s linear;transition:transform .1s linear,-webkit-transform .1s linear}.range--material__input:disabled::-webkit-slider-thumb{background-image:radial-gradient(circle farthest-corner,#b0b0b0 0,#b0b0b0 4px,#eee 4.4px,#eee calc(calc(14px / 2) + .6px),transparent calc(calc(14px / 2) + .6px));background-image:radial-gradient(circle farthest-corner,var(--material-range-disabled-thumb-color) 0,var(--material-range-disabled-thumb-color) 4px,var(--material-range-disabled-thumb-border-color) 4.4px,var(--material-range-disabled-thumb-border-color) calc(var(--material-range-thumb-radius) + .6px),transparent calc(var(--material-range-thumb-radius) + .6px));-webkit-transition:none;transition:none}.range--material__input:disabled::-moz-range-thumb{background-image:-moz-radial-gradient(circle farthest-corner,var(--material-range-disabled-thumb-color) 0,var(--material-range-disabled-thumb-color) 4px,var(--material-range-disabled-thumb-border-color) 4.4px,var(--material-range-disabled-thumb-border-color) calc(var(--material-range-thumb-radius) + .6px),transparent calc(var(--material-range-thumb-radius) + .6px));-moz-transition:none;transition:none}:root{--notification-border-radius:19px;--notification-width:auto;--notification-height:19px;--notification-min-width:19px;--notification-padding:0 4px;--notification-font-weight:var(--font-weight);--notification-font-size:16px;--material-notification-font-size:16px;--material-notification-font-weight:500}.notification{position:relative;display:inline-block;vertical-align:top;font:inherit;border:none;box-sizing:border-box;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none;margin:0;padding:0 4px;padding:var(--notification-padding);width:auto;width:var(--notification-width);height:19px;height:var(--notification-height);border-radius:19px;border-radius:var(--notification-border-radius);background-color:#fe3824;background-color:var(--notification-background-color);color:#fff;color:var(--notification-color);text-align:center;font-size:16px;font-size:var(--notification-font-size);min-width:19px;min-width:var(--notification-min-width);line-height:19px;line-height:var(--notification-height);font-weight:400;font-weight:var(--notification-font-weight)}.notification:empty{display:none}.notification--material{-webkit-font-smoothing:antialiased;background-color:#e91e63;background-color:var(--material-notification-background-color);font-size:16px;font-size:var(--material-notification-font-size);font-weight:500;font-weight:var(--material-notification-font-weight);color:#fff;color:var(--material-notification-color)}:root{--toolbar-separator-color:var(--toolbar-border-color);--toolbar-height:44px;--toolbar-box-shadow:none;--toolbar-padding:0;--toolbar-separator:1px solid var(--toolbar-separator-color);--toolbar-material-height:56px}.toolbar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;height:44px;height:var(--toolbar-height);padding-left:0;padding-left:var(--toolbar-padding);padding-right:0;padding-right:var(--toolbar-padding);background:#fafafa;background:var(--toolbar-background-color);color:#1f1f21;color:var(--toolbar-text-color);box-shadow:none;box-shadow:var(--toolbar-box-shadow);font-weight:400;font-weight:var(--font-weight);width:100%;white-space:nowrap;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#b2b2b2,#b2b2b2 100%);background-image:linear-gradient(0deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.toolbar{background-image:linear-gradient(0deg,#b2b2b2,#b2b2b2 50%,transparent 50%);background-image:linear-gradient(0deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 50%,transparent 50%)}}.toolbar__bg{background:#fafafa;background:var(--toolbar-background-color)}.toolbar__item{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;height:44px;height:var(--toolbar-height);overflow:visible;display:block;vertical-align:middle}.toolbar__left{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;max-width:50%;width:27%;text-align:left;line-height:44px;line-height:var(--toolbar-height)}.toolbar__right{box-sizing:border-box;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;max-width:50%;width:27%;text-align:right;line-height:44px;line-height:var(--toolbar-height)}.toolbar__center{box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;border:none;width:46%;text-align:center;line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);color:#1f1f21;color:var(--toolbar-text-color)}.toolbar__title{line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);color:#1f1f21;color:var(--toolbar-text-color);margin:0;padding:0;overflow:visible}.toolbar__center:first-child:last-child{width:100%}.bottom-bar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;white-space:nowrap;overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;display:block;height:44px;height:var(--toolbar-height);padding-left:0;padding-left:var(--toolbar-padding);padding-right:0;padding-right:var(--toolbar-padding);background:#fafafa;background:var(--toolbar-background-color);color:#1f1f21;color:var(--toolbar-text-color);box-shadow:none;box-shadow:var(--toolbar-box-shadow);font-weight:400;font-weight:var(--font-weight);border-bottom:none;position:absolute;bottom:0;right:0;left:0;border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#b2b2b2,#b2b2b2 100%);background-image:linear-gradient(180deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.bottom-bar{background-image:linear-gradient(180deg,#b2b2b2,#b2b2b2 50%,transparent 50%);background-image:linear-gradient(180deg,var(--toolbar-separator-color),var(--toolbar-separator-color) 50%,transparent 50%)}}.bottom-bar__line-height{line-height:44px;line-height:var(--toolbar-height);padding-bottom:0;padding-top:0}.bottom-bar--aligned{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;line-height:44px;line-height:var(--toolbar-height)}.bottom-bar--transparent{background-color:transparent;background-image:none;border:none}.toolbar--material{display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;justify-content:space-between;height:56px;height:var(--toolbar-material-height);border-bottom:0;box-shadow:0 1px 5px rgba(0,0,0,.3);padding:0;background-color:#fff;background-color:var(--material-toolbar-background-color);background-size:0}.toolbar--noshadow{box-shadow:none;background-image:none;border-bottom:none}.toolbar--material__left,.toolbar--material__right{-webkit-font-smoothing:antialiased;font-size:20px;font-weight:500;color:#31313a;color:var(--material-toolbar-text-color);height:56px;height:var(--toolbar-material-height);min-width:72px;width:auto;line-height:56px;line-height:var(--toolbar-material-height)}.toolbar--material__center{-webkit-font-smoothing:antialiased;font-size:20px;font-weight:500;color:#31313a;color:var(--material-toolbar-text-color);height:56px;height:var(--toolbar-material-height);width:auto;-webkit-flex-grow:1;flex-grow:1;overflow:hidden;text-overflow:ellipsis;text-align:left;line-height:56px;line-height:var(--toolbar-material-height)}.toolbar--material__center:first-child{margin-left:16px}.toolbar--material__center:last-child{margin-right:16px}.toolbar--material__left:empty,.toolbar--material__right:empty{min-width:16px}.toolbar--transparent{background-color:transparent;box-shadow:none;background-image:none;border-bottom:none}:root{--button-text-color:white;--button-quiet-color:var(--highlight-color);--button-cta-color:white;--button-large-padding:4px 12px;--button-padding:4px 10px;--button-line-height:32px;--button-large-line-height:36px;--button-active-opacity:0.2;--button-border-radius:3px}.button{position:relative;display:inline-block;box-sizing:border-box;margin:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:auto;text-decoration:none;padding:4px 10px;padding:var(--button-padding);font-size:17px;font-size:var(--font-size);line-height:32px;line-height:var(--button-line-height);letter-spacing:0;color:#fff;color:var(--button-text-color);vertical-align:middle;background-color:#0076ff;background-color:var(--button-background-color);border:0 solid currentColor;border-radius:3px;border-radius:var(--button-border-radius);transition:none}.button::-moz-focus-inner{outline:0}.button:hover{transition:none}.button:active{background-color:#0076ff;background-color:var(--button-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button:focus{outline:0}.button:disabled,.button[disabled]{opacity:.3;cursor:default;pointer-events:none}.button--outline{background-color:transparent;border:1px solid #0076ff;border:1px solid var(--button-background-color);color:#0076ff;color:var(--button-background-color)}.button--outline:active{border:1px solid #0076ff;border:1px solid var(--button-background-color);color:#0076ff;color:var(--button-background-color);opacity:1;--blend-background-color__base:var(--button-background-color);--blend-background-color__color:white;-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused}.button--outline:hover{border:1px solid #0076ff;border:1px solid var(--button-background-color);transition:0}.button--light{background-color:transparent;border:1px solid;--blend-color__base:transparent;--blend-color__color:var(--button-light-color);--blend-border-color__base:transparent;--blend-border-color__color:var(--button-light-color);-webkit-animation:blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;animation:blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused}.button--light:active{border:1px solid;--blend-background-color__base:transparent;--blend-background-color__color:var(--button-light-color);--blend-color__base:transparent;--blend-color__color:var(--button-light-color);--blend-border-color__base:transparent;--blend-border-color__color:var(--button-light-color);-webkit-animation:blend-background-color 1s -50ms linear forwards paused,blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;animation:blend-background-color 1s -50ms linear forwards paused,blend-color 1s -.4s linear forwards paused,blend-border-color 1s -.2s linear forwards paused;opacity:1}.button--quiet{background:0 0;color:#0076ff;color:var(--button-quiet-color);border:none}.button--quiet:disabled,.button--quiet[disabled]{border:none}.button--quiet:active{background-color:transparent;border:none;transition:none;opacity:.2;opacity:var(--button-active-opacity);color:#0076ff;color:var(--button-quiet-color)}.button--cta{border:none;background-color:#25a6d9;background-color:var(--button-cta-background-color);color:#fff;color:var(--button-cta-color)}.button--cta:active{color:#fff;color:var(--button-cta-color);background-color:#25a6d9;background-color:var(--button-cta-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button--large{font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);display:block;width:100%;text-align:center}.button--large:active{transition:none}.button--large--quiet{font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);display:block;width:100%;background:0 0;border:1px solid transparent;box-shadow:none;color:#0076ff;color:var(--button-quiet-color);text-align:center}.button--large--quiet:active{opacity:.2;opacity:var(--button-active-opacity);color:#0076ff;color:var(--button-quiet-color);background:0 0;border:1px solid transparent;box-shadow:none}.button--large--cta{background-color:#25a6d9;background-color:var(--button-cta-background-color);color:#fff;color:var(--button-cta-color);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);line-height:36px;line-height:var(--button-large-line-height);padding:4px 12px;padding:var(--button-large-padding);width:100%;text-align:center;display:block}.button--large--cta:active{color:var(--button-cta-color);background-color:#25a6d9;background-color:var(--button-cta-background-color);transition:none;opacity:.2;opacity:var(--button-active-opacity)}.button--material{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;min-height:36px;line-height:36px;padding:0 16px;text-align:center;font-size:14px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);text-transform:uppercase;background-color:#2979ff;background-color:var(--material-button-background-color);color:#fff;color:var(--material-button-text-color);font-weight:500;font-weight:var(--font-weight--large);opacity:1;transition:all .25s linear}.button--material:hover{transition:all .25s linear}.button--material:active{background-color:#2979ff;background-color:var(--material-button-background-color);opacity:.9;transition:all .25s linear}.button--material:disabled,.button--material[disabled]{transition:none;box-shadow:none;background-color:rgba(79,79,79,.26);background-color:var(--material-button-disabled-background-color);color:rgba(0,0,0,.26);color:var(--material-button-disabled-color);opacity:1}.button--material--flat{-webkit-font-smoothing:antialiased;min-height:36px;line-height:36px;padding:0 16px;text-align:center;font-size:14px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);text-transform:uppercase;font-weight:500;font-weight:var(--font-weight--large);box-shadow:none;background-color:transparent;color:#2979ff;color:var(--material-button-background-color);transition:all .25s linear}.button--material--flat:focus{background-color:transparent;color:#2979ff;color:var(--material-button-background-color);outline:0;opacity:1;border:none}.button--material--flat:active{outline:0;opacity:1;border:none;background-color:rgba(153,153,153,.2);background-color:var(--material-flat-button-active-background-color);color:#2979ff;color:var(--material-button-background-color);transition:all .25s linear}.button--material--flat:disabled,.button--material--flat[disabled]{opacity:1;box-shadow:none;background-color:transparent;color:rgba(0,0,0,.26);color:var(--material-button-disabled-color)}:root{--button-bar-active-color:var(--button-bar-active-text-color);--button-bar-border-top:1px solid var(--button-bar-color);--button-bar-border-bottom:1px solid var(--button-bar-color);--button-bar-border:0 solid var(--button-bar-color);--button-bar-border-radius:4px}.button-bar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin:0;padding:0;border:none}.button-bar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);border-radius:0;width:100%;padding:0;margin:0;position:relative;overflow:hidden;box-sizing:border-box}.button-bar__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:0;background-color:transparent;color:#0076ff;color:var(--button-bar-color);border:1px solid #0076ff;border:1px solid var(--button-bar-color);border-top-width:1px;border-bottom-width:1px;border-right-width:1px;border-left-width:0;font-weight:400;font-weight:var(--font-weight);padding:0;font-size:13px;height:27px;line-height:27px;width:100%;transition:background-color .2s linear,color .2s linear;box-sizing:border-box}.button-bar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.button-bar__button:hover{transition:none}.button-bar__button:focus{outline:0}:checked+.button-bar__button{background-color:#0076ff;background-color:var(--button-bar-color);color:#fff;color:var(--button-bar-active-color);transition:none}.button-bar__button:active,:active+.button-bar__button{background-color:unset;background-color:var(--button-bar-active-background-color);border:0 solid #0076ff;border:var(--button-bar-border);border-top:1px solid #0076ff;border-top:var(--button-bar-border-top);border-bottom:1px solid #0076ff;border-bottom:var(--button-bar-border-bottom);border-right:1px solid #0076ff;border-right:1px solid var(--button-bar-color);font-size:13px;width:100%;transition:none}.button-bar__button:active:before,:active+.button-bar__button:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:-1;--blend-background-color__base:var(--button-bar-color);--blend-background-color__color:var(--button-bar-active-background-color-default-blend-color);-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused;-webkit-animation:blend-background-color 1s var(--button-bar-active-background-color-default-blend-time) linear forwards paused;animation:blend-background-color 1s var(--button-bar-active-background-color-default-blend-time) linear forwards paused}.button-bar__item:first-child>.button-bar__button{border-left-width:1px;border-radius:4px 0 0 4px;border-radius:var(--button-bar-border-radius) 0 0 var(--button-bar-border-radius)}.button-bar__item:last-child>.button-bar__button{border-right-width:1px;border-radius:0 4px 4px 0;border-radius:0 var(--button-bar-border-radius) var(--button-bar-border-radius) 0}:root{--segment-active-color:var(--segment-active-text-color);--segment-border-top:1px solid var(--segment-color);--segment-border-bottom:1px solid var(--segment-color);--segment-border:0 solid var(--segment-color);--segment-border-radius:4px}.segment{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin:0;padding:0;border:none}.segment__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);border-radius:0;width:100%;padding:0;margin:0;position:relative;overflow:hidden;box-sizing:border-box;display:block;background-color:transparent;border:none}.segment__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.segment__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:0;background-color:transparent;color:#0076ff;color:var(--segment-color);border:1px solid #0076ff;border:1px solid var(--segment-color);border-top-width:1px;border-bottom-width:1px;border-right-width:1px;border-left-width:0;font-weight:400;font-weight:var(--font-weight);padding:0;font-size:13px;height:29px;line-height:29px;width:100%;transition:background-color .2s linear,color .2s linear;box-sizing:border-box;text-align:center}.segment__item:disabled{opacity:.3;cursor:default;pointer-events:none}.segment__button:hover{transition:none}.segment__button:focus{outline:0}:active+.segment__button{background-color:unset;background-color:var(--segment-active-background-color);border:0 solid #0076ff;border:var(--segment-border);border-top:1px solid #0076ff;border-top:var(--segment-border-top);border-bottom:1px solid #0076ff;border-bottom:var(--segment-border-bottom);border-right:1px solid #0076ff;border-right:1px solid var(--segment-color);font-size:13px;width:100%;transition:none}:active+.segment__button:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:-1;--blend-background-color__base:var(--segment-color);--blend-background-color__color:var(--segment-active-background-color-default-blend-color);-webkit-animation:blend-background-color 1s -.7s linear forwards paused;animation:blend-background-color 1s -.7s linear forwards paused;-webkit-animation:blend-background-color 1s var(--segment-active-background-color-default-blend-time) linear forwards paused;animation:blend-background-color 1s var(--segment-active-background-color-default-blend-time) linear forwards paused}:checked+.segment__button{background-color:#0076ff;background-color:var(--segment-color);color:#fff;color:var(--segment-active-color);transition:none}.segment__item:first-child>.segment__button{border-left-width:1px;border-radius:4px 0 0 4px;border-radius:var(--segment-border-radius) 0 0 var(--segment-border-radius)}.segment__item:last-child>.segment__button{border-right-width:1px;border-radius:0 4px 4px 0;border-radius:0 var(--segment-border-radius) var(--segment-border-radius) 0}.segment--material{border-radius:2px;overflow:hidden;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24)}.segment--material__button{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);font-size:14px;height:32px;line-height:32px;border-width:0;color:rgba(0,0,0,.38);color:var(--material-segment-text-color);border-radius:0;background-color:#fafafa;background-color:var(--material-segment-background-color)}:active+.segment--material__button{background-color:#fafafa;background-color:var(--material-segment-background-color);border-radius:0;border-width:0;font-size:14px;transition:none;color:rgba(0,0,0,.38);color:var(--material-segment-text-color)}:checked+.segment--material__button{background-color:#c8c8c8;background-color:var(--material-segment-active-background-color);color:#353535;color:var(--material-segment-active-text-color);border-radius:0;border-width:0}.segment--material__item:first-child>.segment--material__button,.segment--material__item:last-child>.segment--material__button{border-radius:0;border-width:0}:root{--tabbar-button-color:var(--tabbar-text-color);--tabbar-active-color:var(--tabbar-highlight-text-color);--material-tabbar-current-color:var(--material-tabbar-highlight-text-color);--tabbar-active-border-top:none;--tabbar-focus-border-top:none;--tabbar-height:49px;--tabbar-button-line-height:49px;--tabbar-button-border:none;--tabbar-active-box-shadow:none;--tabbar-button-focus-box-shadow:none;--tabbar-border-top:1px solid var(--tabbar-border-color)}.tabbar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:-webkit-flex;display:flex;position:absolute;bottom:0;left:0;right:0;white-space:nowrap;margin:0;padding:0;height:49px;height:var(--tabbar-height);background-color:#fafafa;background-color:var(--tabbar-background-color);border-top:1px solid #ccc;border-top:var(--tabbar-border-top);width:100%}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(180deg,var(--tabbar-border-color),var(--tabbar-border-color) 50%,transparent 50%)}}.tabbar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:0;flex-basis:0;width:auto;border-radius:0}.tabbar__item>input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.tabbar__button{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;margin:0;font:inherit;background:0 0;border:none;cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;position:relative;display:inline-block;text-decoration:none;padding:0;height:49px;height:var(--tabbar-button-line-height);letter-spacing:0;color:#999;color:var(--tabbar-button-color);vertical-align:top;background-color:transparent;border-top:none;border-top:var(--tabbar-button-border);width:100%;font-weight:400;font-weight:var(--font-weight);line-height:49px;line-height:var(--tabbar-button-line-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar__button{border-top:none}}.tabbar__icon{font-size:24px;padding:0;margin:0;line-height:26px;display:block!important;height:28px}.tabbar__label{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:inline-block}.tabbar__badge.notification{vertical-align:text-bottom;top:-1px;margin-left:5px;z-index:10;font-size:12px;height:16px;min-width:16px;line-height:16px;border-radius:8px}.tabbar__icon~.tabbar__badge.notification{position:absolute;top:5px;margin-left:0}.tabbar__icon+.tabbar__label{display:block;font-size:10px;line-height:1;margin:0;font-weight:400;font-weight:var(--font-weight)}.tabbar__label:first-child{font-size:16px;line-height:49px;line-height:var(--tabbar-button-line-height);margin:0;padding:0}:checked+.tabbar__button{color:#0076ff;color:var(--tabbar-active-color);background-color:transparent;box-shadow:none;box-shadow:var(--tabbar-active-box-shadow);border-top:none;border-top:var(--tabbar-active-border-top)}.tabbar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.tabbar__button:focus{z-index:1;border-top:none;border-top:var(--tabbar-focus-border-top);box-shadow:none;box-shadow:var(--tabbar-button-focus-box-shadow);outline:0}.tabbar__content{position:absolute;top:0;left:0;right:0;bottom:49px;bottom:var(--tabbar-height);z-index:0}.tabbar--autogrow .tabbar__item{-webkit-flex-basis:auto;flex-basis:auto}.tabbar--top{position:relative;top:0;left:0;right:0;bottom:auto;border-top:none;border-bottom:1px solid #ccc;border-bottom:var(--tabbar-border-top)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.tabbar--top{border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--tabbar-border-color),var(--tabbar-border-color) 50%,transparent 50%)}}.tabbar--top__content{top:49px;top:var(--tabbar-height);left:0;right:0;bottom:0;z-index:0}.tabbar--top-border__button{background-color:transparent;border-bottom:4px solid transparent}:checked+.tabbar--top-border__button{background-color:transparent;border-bottom:4px solid #0076ff;border-bottom:4px solid var(--tabbar-active-color)}.tabbar__border{position:absolute;bottom:0;left:0;width:0;height:4px;background-color:#0076ff;background-color:var(--tabbar-active-color)}.tabbar--material{background:0 0;background-color:#fff;background-color:var(--material-tabbar-background-color);border-bottom-width:0;box-shadow:0 4px 2px -2px rgba(0,0,0,.14),0 3px 5px -2px rgba(0,0,0,.12),0 5px 1px -4px rgba(0,0,0,.2)}.tabbar--material__button{background-color:transparent;color:#31313a;color:var(--material-tabbar-text-color);text-transform:uppercase;font-size:14px;font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.tabbar--material__button:after{content:'';display:block;width:0;height:2px;bottom:0;position:absolute;margin-top:-2px;background-color:#31313a;background-color:var(--material-tabbar-current-color)}:checked+.tabbar--material__button:after{width:100%;transition:width .2s ease-in-out}:checked+.tabbar--material__button{background-color:transparent;color:#31313a;color:var(--material-tabbar-current-color)}.tabbar--material__item:not([ripple]):active{background-color:rgba(49,49,58,.1);background-color:var(--material-tabbar-highlight-color)}.tabbar--material__border{height:2px;background-color:#31313a;background-color:var(--material-tabbar-current-color)}.tabbar--material__icon{font-size:22px!important;line-height:36px}.tabbar--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.tabbar--material__label:first-child{-webkit-font-smoothing:antialiased;letter-spacing:.015em;font-weight:500;font-size:14px}.tabbar--material__icon+.tabbar--material__label{font-size:10px}:root{--toolbar-button-background-color:rgba(0, 0, 0, 0);--toolbar-button-border-color:var(--toolbar-button-color);--toolbar-button-border-radius:2px;--toolbar-button-padding:4px 10px;--toolbar-button-active-background-color:var(--toolbar-button-background-color);--toolbar-button-border:1px solid var(--toolbar-button-border-color)}.toolbar-button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:4px 10px;padding:var(--toolbar-button-padding);letter-spacing:0;color:#0076ff;color:var(--toolbar-button-color);background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-background-color);border-radius:2px;border-radius:var(--toolbar-button-border-radius);border:1px solid transparent;font-weight:400;font-weight:var(--font-weight);font-size:17px;font-size:var(--font-size);transition:none}.toolbar-button:active{background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-active-background-color);transition:none;opacity:.2}.toolbar-button:disabled,.toolbar-button[disabled]{opacity:.3;cursor:default;pointer-events:none}.toolbar-button:focus{outline:0;transition:none}.toolbar-button:hover{transition:none}.toolbar-button--outline{border:1px solid #0076ff;border:var(--toolbar-button-border);margin:auto 8px;padding-left:6px;padding-right:6px}.toolbar-button--material{font-size:22px;color:#1e88e5;color:var(--material-toolbar-button-color);display:inline-block;padding:0 12px;height:100%;margin:0;border:none;border-radius:0;vertical-align:baseline;vertical-align:initial;transition:background-color .25s linear}.toolbar-button--material:first-of-type{margin-left:4px}.toolbar-button--material:last-of-type{margin-right:4px}.toolbar-button--material:active{opacity:1;transition:background-color .25s linear}.back-button{height:44px;line-height:44px;padding-left:8px;color:#0076ff;color:var(--toolbar-button-color);background-color:rgba(0,0,0,0);background-color:var(--toolbar-button-background-color);display:inline-block}.back-button:active{opacity:.2}.back-button__label{display:inline-block;height:100%;vertical-align:top;line-height:44px;line-height:var(--toolbar-height);font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large)}.back-button__icon{margin-right:6px;display:-webkit-inline-flex;display:inline-flex;fill:rgb(0,118,255);fill:var(--toolbar-button-color);-webkit-align-items:center;align-items:center;height:100%}.back-button--material{font-size:22px;color:#1e88e5;color:var(--material-toolbar-button-color);display:inline-block;padding:0 12px;height:100%;margin:0 0 0 4px;border:none;border-radius:0;vertical-align:baseline;vertical-align:initial;line-height:56px}.back-button--material__label{display:none;font-size:20px}.back-button--material__icon{display:-webkit-inline-flex;display:inline-flex;fill:#1e88e5;fill:var(--material-toolbar-button-color);-webkit-align-items:center;align-items:center;height:100%}.back-button--material:active{opacity:1}:root{--checkbox-size:22px;--checkbox-border:1px solid #c7c7cd;--checkbox-checked-background-color:var(--highlight-color);--background-color--before--checkbox:var(--checkbox-checked-background-color);--checkmark-border:2px solid #fff;--material-checkbox-size:18px;--material-checkbox-focus-ring-size:40px;--material-checkbox-focus-ring-shadow-size:calc((var(--material-checkbox-focus-ring-size) - var(--material-checkbox-size)) / 2)}.checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);line-height:22px;line-height:var(--checkbox-size)}.checkbox__checkmark{box-sizing:border-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);height:22px;height:var(--checkbox-size);width:22px;width:var(--checkbox-size);pointer-events:none}.checkbox__input,.checkbox__input:checked{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox__checkmark:before{content:'';position:absolute;box-sizing:border-box;width:22px;width:var(--checkbox-size);height:22px;height:var(--checkbox-size);background:0 0;border:1px solid #c7c7cd;border:var(--checkbox-border);border-radius:22px;border-radius:var(--checkbox-size);left:0}.checkbox__checkmark:after{content:'';position:absolute;top:7px;left:5px;width:11px;height:5px;background:0 0;border:2px solid #fff;border:var(--checkmark-border);border-width:1px;border-top:none;border-right:none;border-radius:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}:checked+.checkbox__checkmark:before{background:#0076ff;background:var(--background-color--before--checkbox);border:none}:checked+.checkbox__checkmark:after{opacity:1}:disabled+.checkbox__checkmark{opacity:.3;cursor:default;pointer-events:none}:disabled:active+.checkbox__checkmark:before{background:0 0}.checkbox--noborder__checkmark{background:0 0;border:none}.checkbox--noborder__checkmark:before{border:none}.checkbox--noborder__checkmark:after{height:4px;border:2px solid #0076ff;border:2px solid var(--highlight-color)}:checked+.checkbox--noborder__checkmark:before{background:0 0}:focus+.checkbox--noborder__checkmark:before{border:none}:disabled:active+.checkbox--noborder__checkmark:before{border:none}.checkbox--material{line-height:18px;line-height:var(--material-checkbox-size);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);overflow:visible}.checkbox--material__checkmark{width:18px;width:var(--material-checkbox-size);height:18px;height:var(--material-checkbox-size)}.checkbox--material__checkmark:before{border-radius:2px;height:18px;height:var(--material-checkbox-size);width:18px;width:var(--material-checkbox-size);border:2px solid #717171;border:2px solid var(--material-checkbox-inactive-color);transition:background-color .1s linear .2s,border-color .1s linear .2s;background-color:transparent}:checked+.checkbox--material__checkmark:before{border:2px solid #37474f;border:2px solid var(--material-checkbox-active-color);background-color:#37474f;background-color:var(--material-checkbox-active-color);transition:background-color .1s linear,border-color .1s linear}.checkbox--material__checkmark:after{border-color:#fff;border-color:var(--material-checkbox-checkmark-color);transition:-webkit-transform .2s ease 0;transition:transform .2s ease 0;transition:transform .2s ease 0,-webkit-transform .2s ease 0;width:10px;height:5px;top:4px;left:3px;-webkit-transform:scale(0) rotate(-45deg);transform:scale(0) rotate(-45deg);border-width:2px}:checked+.checkbox--material__checkmark:after{transition:-webkit-transform .2s ease .2s;transition:transform .2s ease .2s;transition:transform .2s ease .2s,-webkit-transform .2s ease .2s;width:10px;height:5px;top:4px;left:3px;-webkit-transform:scale(1) rotate(-45deg);transform:scale(1) rotate(-45deg);border-width:2px}.checkbox--material__input:before{content:'';opacity:0;position:absolute;top:0;left:0;width:18px;width:var(--material-checkbox-size);height:18px;height:var(--material-checkbox-size);box-shadow:0 0 0 calc((40px - 18px)/ 2) #717171;box-shadow:0 0 0 var(--material-checkbox-focus-ring-shadow-size) var(--material-checkbox-inactive-color);box-sizing:border-box;border-radius:50%;background-color:#717171;background-color:var(--material-checkbox-inactive-color);pointer-events:none;display:block;-webkit-transform:scale3d(.2,.2,.2);transform:scale3d(.2,.2,.2);transition:opacity .25s ease-out,-webkit-transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out,-webkit-transform .1s ease-out}.checkbox--material__input:checked:before{box-shadow:0 0 0 calc((40px - 18px)/ 2) #37474f;box-shadow:0 0 0 var(--material-checkbox-focus-ring-shadow-size) var(--material-checkbox-active-color);background-color:#37474f;background-color:var(--material-checkbox-active-color)}.checkbox--material__input:active:before{opacity:.15;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}:disabled+.checkbox--material__checkmark{opacity:1}:disabled+.checkbox--material__checkmark:before{border-color:#afafaf}:disabled:checked+.checkbox--material__checkmark:before{background-color:#afafaf}:disabled:checked+.checkbox--material__checkmark:after{border-color:#fff}:root{--radio-button-background-active:rgba(0, 0, 0, 0);--radio-button-indicator-color:var(--highlight-color);--radio-button-background:transparent;--radio-button-border:3px solid var(--radio-button-indicator-color);--radio-button-size:24px;--material-radio-button-size:20px;--material-radio-button-shadow-size:calc((48px - var(--material-radio-button-size)) / 2)}.radio-button__input{position:absolute;right:0;top:0;left:0;bottom:0;padding:0;border:0;background-color:transparent;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.radio-button__input:active,.radio-button__input:focus{outline:0;-webkit-tap-highlight-color:transparent}.radio-button{display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;position:relative;line-height:24px;line-height:var(--radio-button-size);text-align:left}.radio-button__checkmark:before{content:'';position:absolute;box-sizing:border-box;width:22px;width:var(--checkbox-size);height:22px;height:var(--checkbox-size);background:0 0;border:none;border-radius:22px;border-radius:var(--checkbox-size);left:0}.radio-button__checkmark{box-sizing:border-box;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;width:24px;width:var(--radio-button-size);height:24px;height:var(--radio-button-size);background:0 0;background:var(--radio-button-background);pointer-events:none}.radio-button__checkmark:after{content:'';position:absolute;top:7px;left:4px;opacity:0;width:11px;height:4px;background:0 0;border:2px solid #0076ff;border:2px solid var(--highlight-color);border-top:none;border-right:none;border-radius:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}:checked+.radio-button__checkmark{background:rgba(0,0,0,0);background:var(--radio-button-background-active)}:checked+.radio-button__checkmark:after{opacity:1}:checked+.radio-button__checkmark:before{background:0 0;border:none}:disabled+.radio-button__checkmark{opacity:.3;cursor:default;pointer-events:none}.radio-button--material{line-height:calc(20px + 2px);line-height:calc(var(--material-radio-button-size) + 2px);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.radio-button--material__input:before{content:'';position:absolute;top:0;left:0;opacity:0;width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);box-shadow:0 0 0 calc((48px - 20px)/ 2) #717171;box-shadow:0 0 0 var(--material-radio-button-shadow-size) var(--material-radio-button-inactive-color);border:none;box-sizing:border-box;border-radius:50%;background-color:#717171;background-color:var(--material-radio-button-inactive-color);pointer-events:none;display:block;-webkit-transform:scale3d(.2,.2,.2);transform:scale3d(.2,.2,.2);transition:opacity .25s ease-out,-webkit-transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out;transition:opacity .25s ease-out,transform .1s ease-out,-webkit-transform .1s ease-out}.radio-button--material__input:checked:before{box-shadow:0 0 0 calc((48px - 20px)/ 2) #37474f;box-shadow:0 0 0 var(--material-radio-button-shadow-size) var(--material-radio-button-active-color);background-color:#37474f;background-color:var(--material-radio-button-active-color)}.radio-button--material__input:active:before{opacity:.15;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}.radio-button--material__checkmark{width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);overflow:visible}.radio-button--material__checkmark:before{background:0 0;border:2px solid #717171;border:2px solid var(--material-radio-button-inactive-color);box-sizing:border-box;border-radius:50%;width:20px;width:var(--material-radio-button-size);height:20px;height:var(--material-radio-button-size);transition:border .2s ease}.radio-button--material__checkmark:after{transition:background .2s ease,-webkit-transform .2s ease;transition:background .2s ease,transform .2s ease;transition:background .2s ease,transform .2s ease,-webkit-transform .2s ease;top:calc(20px / 4);top:calc(var(--material-radio-button-size)/ 4);left:calc(20px / 4);left:calc(var(--material-radio-button-size)/ 4);width:calc(20px / 2);width:calc(var(--material-radio-button-size)/ 2);height:calc(20px / 2);height:calc(var(--material-radio-button-size)/ 2);border:none;border-radius:50%;-webkit-transform:scale(0);transform:scale(0)}:checked+.radio-button--material__checkmark:before{background:0 0;border:2px solid #37474f;border:2px solid var(--material-radio-button-active-color)}.radio-button--material__input+.radio-button__checkmark:after{background:#717171;background:var(--material-radio-button-inactive-color);opacity:1;-webkit-transform:scale(0);transform:scale(0)}:checked+.radio-button--material__checkmark:after{opacity:1;background:#37474f;background:var(--material-radio-button-active-color);-webkit-transform:scale(1);transform:scale(1)}:disabled+.radio-button--material__checkmark{opacity:1}:disabled+.radio-button--material__checkmark:after{background-color:#afafaf;background-color:var(--material-radio-button-disabled-color);border-color:#afafaf;border-color:var(--material-radio-button-disabled-color)}:disabled+.radio-button--material__checkmark:before{border-color:#afafaf;border-color:var(--material-radio-button-disabled-color)}:root{--list-item-color:var(--text-color);--list-item-active-background-color:var(--list-tap-active-background-color);--list-item-separator-color:var(--border-color);--list-border:1px solid var(--list-item-separator-color);--list-item-min-height:44px;--list-item-margin:0 0 -1px 0;--list-item-padding-side:14px;--list-item-padding:0 0 0 var(--list-item-padding-side);--list-border-top:1px solid var(--list-item-separator-color);--list-border-bottom:1px solid var(--list-item-separator-color);--list-header-color:var(--text-color);--list-header-font-size:12px;--list-header-padding:0 0 0 15px;--list-header-min-height:24px;--list-header-font-weight:var(--font-weight--large);--inset-list-border:1px solid var(--list-item-separator-color);--list-title-color:#6d6d72;--list-title-font-size:13px;--list-title-font-weight:500;--list-title-line-height:24px;--list-title-padding:0 0 0 16px;--material-list-item-side-padding:16px;--material-list-item-min-height:48px;--material-list-item-padding:0 0 0 var(--material-list-item-side-padding);--material-list-title-color:#757575;--material-list-title-font-size:14px;--material-list-title-font-weight:500;--material-list-title-line-height:24px;--material-list-title-padding:12px 0 12px var(--material-list-item-side-padding)}.list{padding:0;margin:0;color:inherit;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);list-style-type:none;text-align:left;display:block;-webkit-overflow-scrolling:touch;overflow:hidden;background-image:linear-gradient(#ccc,#ccc),linear-gradient(#ccc,#ccc);background-image:linear-gradient(var(--list-item-separator-color),var(--list-item-separator-color)),linear-gradient(var(--list-item-separator-color),var(--list-item-separator-color));background-size:100% 1px,100% 1px;background-repeat:no-repeat;background-position:bottom,top;border:none;background-color:#fff;background-color:var(--list-background-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%),linear-gradient(180deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%),linear-gradient(180deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item{position:relative;width:100%;list-style:none;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;padding:0 0 0 14px;padding:var(--list-item-padding);margin:0 0 -1px 0;margin:var(--list-item-margin);color:#1f1f21;color:var(--list-item-color);transition:background-color .2s linear}.list-item__top{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;-webkit-order:0;order:0;width:100%}.list-item--expandable{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);background-position-x:14px;background-position-x:var(--list-item-padding-side)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--expandable{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item__expandable-content{display:none;width:100%;padding:12px 14px 12px 0;box-sizing:border-box;-webkit-order:1;order:1;overflow:hidden}.list-item--expandable.list-item--expanded>.list-item__expandable-content{display:block;height:auto}.list-item__left{box-sizing:border-box;display:-webkit-flex;display:flex;padding:12px 14px 12px 0;-webkit-order:0;order:0;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}.list-item__left:empty{width:0;min-width:0;padding:0;margin:0}.list-item__center{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:row;flex-direction:row;-webkit-order:1;order:1;margin-right:auto;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;margin-left:0;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);padding:12px 6px 12px 0;line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item__center{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item__right{box-sizing:border-box;display:-webkit-flex;display:flex;margin-left:auto;padding:12px 12px 12px 0;-webkit-order:2;order:2;-webkit-align-items:center;align-items:center;-webkit-align-self:stretch;align-self:stretch;border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%);line-height:1.2em;min-height:44px;min-height:var(--list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item__right{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-header{margin:0;list-style:none;text-align:left;display:block;box-sizing:border-box;padding:0 0 0 15px;padding:var(--list-header-padding);font-size:12px;font-size:var(--list-header-font-size);font-weight:500;font-weight:var(--list-header-font-weight);color:#1f1f21;color:var(--list-header-color);min-height:24px;min-height:var(--list-header-min-height);line-height:calc(1px + 24px);line-height:calc(1px + var(--list-header-min-height));text-transform:uppercase;position:relative;background-color:#eee;background-color:var(--list-header-background-color);background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-header{background-image:linear-gradient(180deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(180deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list--noborder{border-top:none;border-bottom:none;background-image:none}.list-item--tappable:active{transition:none;background-color:#d9d9d9;background-color:var(--list-item-active-background-color)}.list--inset{margin:0 8px;border:1px solid #ccc;border:var(--inset-list-border);border-radius:4px;background-image:none}.list-item__label{font-size:calc(17px - 3px);font-size:var(--font-size--mini);padding:0 4px;opacity:.6}.list-item__title{-webkit-flex-basis:100%;flex-basis:100%;-webkit-align-self:flex-end;align-self:flex-end;-webkit-order:0;order:0}.list-item__subtitle{opacity:.75;font-size:calc(17px - 3px);font-size:var(--font-size--mini);-webkit-order:1;order:1;-webkit-flex-basis:100%;flex-basis:100%;-webkit-align-self:flex-start;align-self:flex-start}.list-item__thumbnail{width:40px;height:40px;border-radius:6px;display:block;margin:0}.list-item__icon{font-size:22px;padding:0 6px}.list--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);background-image:none;background-color:#fff;background-color:var(--material-list-background-color)}.list-item--material{border:0;padding:0 0 0 16px;padding:var(--material-list-item-padding);line-height:normal}.list-item--material__subtitle{margin-top:4px}.list-item--material:first-child{box-shadow:none}.list-item--material__left{padding:14px 0;min-width:56px;line-height:1;min-height:48px;min-height:var(--material-list-item-min-height)}.list-item--material__center,.list-item--material__left:empty{padding:14px 6px 14px 0;border-color:#eee;border-color:var(--material-list-item-separator-color);border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);min-height:48px;min-height:var(--material-list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material__center,.list-item--material__left:empty{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material__right{padding:14px 16px 14px 0;line-height:1;border-color:#eee;border-color:var(--material-list-item-separator-color);border-bottom:none;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);min-height:48px;min-height:var(--material-list-item-min-height)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material__right{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material.list-item--expandable{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);background-position-x:16px;background-position-x:var(--material-list-item-side-padding)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material.list-item--expandable{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material.list-item--expandable.list-item--longdivider,.list-item--material.list-item--longdivider{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#eee,#eee 100%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--material.list-item--expandable.list-item--longdivider,.list-item--material.list-item--longdivider{background-image:linear-gradient(0deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(0deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-header--material{background:#fff;background:var(--list-background-color);border:none;font-size:14px;text-transform:none;margin:-1px 0 0 0;color:#757575;color:var(--material-list-header-text-color);font-weight:500;padding:8px 16px}.list-header--material:not(:first-of-type){border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#eee,#eee 100%);background-image:linear-gradient(180deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 100%);padding-top:16px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-header--material:not(:first-of-type){background-image:linear-gradient(180deg,#eee,#eee 50%,transparent 50%);background-image:linear-gradient(180deg,var(--material-list-item-separator-color),var(--material-list-item-separator-color) 50%,transparent 50%)}}.list-item--material__thumbnail{width:40px;height:40px;border-radius:100%}.list-item--material__icon{font-size:20px;padding:0 4px}.list-item--chevron:before,.list-item__expand-chevron{border-right:2px solid #c7c7cc;border-right:2px solid var(--list-item-chevron-color);border-bottom:2px solid #c7c7cc;border-bottom:2px solid var(--list-item-chevron-color);width:7px;height:7px;background-color:transparent;z-index:5}.list-item--chevron:before{position:absolute;content:'';right:16px;top:50%;-webkit-transform:translateY(-50%) rotate(-45deg);transform:translateY(-50%) rotate(-45deg)}.list-item__expand-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin:1px}.list-item--expandable.list-item--expanded .list-item__expand-chevron{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.list-item--chevron__right{padding-right:30px}.list-item--expandable .list-item__center,.list-item--expandable .list-item__right,.list-item--nodivider.list-item--expandable,.list-item--nodivider__center,.list-item--nodivider__right{border:none;background-image:none}.list-item--longdivider{background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.list-item--longdivider{background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,var(--list-item-separator-color),var(--list-item-separator-color) 50%,transparent 50%)}}.list-item--longdivider:last-of-type{border:none;background-image:none}.list-item--longdivider__center{border:none;background-image:none}.list-item--longdivider__right{border:none;background-image:none}.list-title{background:0 0;border:none;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;color:#6d6d72;color:var(--list-title-color);text-align:left;box-sizing:border-box;padding:0 0 0 16px;padding:var(--list-title-padding);margin:0;font-size:13px;font-size:var(--list-title-font-size);font-weight:500;font-weight:var(--list-title-font-weight);line-height:24px;line-height:var(--list-title-line-height);text-transform:uppercase;letter-spacing:.04em}.list-title--material{-webkit-font-smoothing:antialiased;color:#757575;color:var(--material-list-title-color);font-size:14px;font-size:var(--material-list-title-font-size);margin:0;padding:12px 0 12px 16px;padding:var(--material-list-title-padding);font-weight:500;font-weight:var(--material-list-title-font-weight);line-height:24px;line-height:var(--material-list-title-line-height)}:root{--search-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+aW9zLXNlYXJjaC1pbnB1dC1pY29uPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa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zYyNSAxOCwxMi41IEMxOCwxMy42Mjc0Njg1IDE3LjYyNjgyMzIsMTQuNjY3Nzc2OCAxNi45OTcyNDgyLDE1LjUwNDE0NjYgWiBNMTMsMTYuNSBDMTUuMjA5MTM5LDE2LjUgMTcsMTQuNzA5MTM5IDE3LDEyLjUgQzE3LDEwLjI5MDg2MSAxNS4yMDkxMzksOC41IDEzLDguNSBDMTAuNzkwODYxLDguNSA5LDEwLjI5MDg2MSA5LDEyLjUgQzksMTQuNzA5MTM5IDEwLjc5MDg2MSwxNi41IDEzLDE2LjUgWiIgaWQ9Imlvcy1zZWFyY2gtaW5wdXQtaWNvbiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');--search-input-background-image:var(--search-icon);--search-input-color:var(--input-text-color);--search-decoration-margin-right:0;--search-input-border-radius:5.5px;--search-input-height:28px;--search-input-font-size:14px;--search-input-placeholder-color:#7a797b;--material-search-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQzLjIgKDM5MDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRo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ljc0NTAwMCwgOC43NDU1MDApIHNjYWxlKC0xLCAxKSByb3RhdGUoLTE4MC4wMDAwMDApIHRyYW5zbGF0ZSgtOC43NDUwMDAsIC04Ljc0NTUwMCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==')}.search-input{font:inherit;background:0 0;border:none;vertical-align:top;outline:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-appearance:textfield;appearance:textfield;box-sizing:border-box;height:28px;height:var(--search-input-height);font-size:14px;font-size:var(--search-input-font-size);background-color:rgba(3,3,3,.09);background-color:var(--search-input-background-color);box-shadow:none;color:#1f1f21;color:var(--search-input-color);line-height:1.3;padding:0 8px 0 28px;margin:0;border-radius:5.5px;border-radius:var(--search-input-border-radius);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTMgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQyICgzNjc4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+aW9zLXNlYXJjaC1pbnB1dC1pY29uPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+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0Njg1IDE3LjYyNjgyMzIsMTQuNjY3Nzc2OCAxNi45OTcyNDgyLDE1LjUwNDE0NjYgWiBNMTMsMTYuNSBDMTUuMjA5MTM5LDE2LjUgMTcsMTQuNzA5MTM5IDE3LDEyLjUgQzE3LDEwLjI5MDg2MSAxNS4yMDkxMzksOC41IDEzLDguNSBDMTAuNzkwODYxLDguNSA5LDEwLjI5MDg2MSA5LDEyLjUgQzksMTQuNzA5MTM5IDEwLjc5MDg2MSwxNi41IDEzLDE2LjUgWiIgaWQ9Imlvcy1zZWFyY2gtaW5wdXQtaWNvbiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');background-image:var(--search-input-background-image);background-position:8px center;background-repeat:no-repeat;background-size:13px;font-weight:400;font-weight:var(--font-weight);display:inline-block;text-indent:0}.search-input::-webkit-search-cancel-button{-webkit-appearance:textfield;appearance:textfield;display:none}.search-input::-webkit-search-decoration{display:none}.search-input:focus{outline:0}.search-input::-webkit-input-placeholder{color:#7a797b;color:var(--search-input-placeholder-color);font-size:14px;font-size:var(--search-input-font-size);text-indent:0}.search-input::placeholder{color:#7a797b;color:var(--search-input-placeholder-color);font-size:14px;font-size:var(--search-input-font-size);text-indent:0}.search-input:disabled{opacity:.3;cursor:default;pointer-events:none}.search-input--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);border-radius:2px;height:48px;background-color:#fafafa;background-color:var(--material-search-background-color);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8I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yLjUwMiw2LjQ5MSBaIE02LjUsNi40OTEgQzQuMDE0LDYuNDkxIDIsOC41MDUgMiwxMC45OTEgQzIsMTMuNDc2IDQuMDE0LDE1LjQ5MSA2LjUsMTUuNDkxIEM4Ljk4NSwxNS40OTEgMTEsMTMuNDc2IDExLDEwLjk5MSBDMTEsOC41MDUgOC45ODUsNi40OTEgNi41LDYuNDkxIEw2LjUsNi40OTEgWiIgaWQ9IlNoYXBlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4Ljc0NTAwMCwgOC43NDU1MDApIHNjYWxlKC0xLCAxKSByb3RhdGUoLTE4MC4wMDAwMDApIHRyYW5zbGF0ZSgtOC43NDUwMDAsIC04Ljc0NTUwMCkgIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==');background-image:var(--material-search-icon);background-size:18px;background-position:18px center;font-size:14px;padding:0 24px 0 64px;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24),0 1px 0 0 rgba(255,255,255,.06) inset}:root{--text-input-font-size:16px;--text-input-height:31px;--text-input-border-color:var(--input-border-color);--material-text-input-font-size:16px;--material-text-input-color:var(--material-text-input-text-color)}.text-input{font:inherit;background:0 0;vertical-align:top;outline:0;line-height:1;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border:none;background-color:transparent;letter-spacing:0;box-shadow:none;color:#1f1f21;color:var(--input-text-color);padding:0;margin:0;width:auto;font-size:16px;font-size:var(--text-input-font-size);height:31px;height:var(--text-input-height);font-weight:400;font-weight:var(--font-weight);box-sizing:border-box}.text-input::-ms-clear{display:none}.text-input:disabled{opacity:.3;cursor:default;pointer-events:none}.text-input::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.text-input::placeholder{color:#999;color:var(--input-placeholder-color)}.text-input:disabled::-webkit-input-placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.text-input:disabled::placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.text-input:invalid{border:none;background-color:transparent;color:#1f1f21;color:var(--input-invalid-text-color)}.text-input--underbar{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--text-input-border-color);border-radius:0}.text-input--underbar:disabled{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--text-input-border-color)}.text-input--underbar:disabled::-webkit-input-placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.text-input--underbar:disabled::placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.text-input--underbar:invalid{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--input-invalid-border-color)}.text-input--material{padding:0;margin:0;font:inherit;background:0 0;outline:0;line-height:1;-moz-osx-font-smoothing:grayscale;font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#212121;color:var(--material-text-input-color);background-image:linear-gradient(to top,transparent 1px,#afafaf 1px);background-image:linear-gradient(to top,transparent 1px,var(--material-text-input-inactive-color) 1px);background-size:100% 2px;background-repeat:no-repeat;background-position:center bottom;background-color:transparent;font-size:16px;font-size:var(--material-text-input-font-size);border:none;padding-bottom:2px;border-radius:0;height:24px;vertical-align:middle;-webkit-transform:translate3d(0,0,0)}.text-input--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#afafaf;color:var(--material-text-input-inactive-color);position:absolute;left:0;top:2px;font-size:16px;pointer-events:none}.text-input--material__label--active{color:#3d5afe;color:var(--material-text-input-active-color);-webkit-transform:translate(0,-75%) scale(.75);transform:translate(0,-75%) scale(.75);-webkit-transform-origin:left top;transform-origin:left top;transition:color .1s ease-in,-webkit-transform .1s ease-in;transition:transform .1s ease-in,color .1s ease-in;transition:transform .1s ease-in,color .1s ease-in,-webkit-transform .1s ease-in}.text-input--material:focus{background-image:linear-gradient(#3d5afe,#3d5afe),linear-gradient(to top,transparent 1px,#afafaf 1px);background-image:linear-gradient(var(--material-text-input-active-color),var(--material-text-input-active-color)),linear-gradient(to top,transparent 1px,var(--material-text-input-inactive-color) 1px);-webkit-animation:material-text-input-animate .3s forwards;animation:material-text-input-animate .3s forwards}.text-input--material::-webkit-input-placeholder{color:#afafaf;color:var(--material-text-input-inactive-color);line-height:20px}.text-input--material::placeholder{color:#afafaf;color:var(--material-text-input-inactive-color);line-height:20px}@-webkit-keyframes material-text-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}@keyframes material-text-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}:root{--textarea-color:var(--input-text-color);--textarea-border:1px solid var(--input-border-color);--textarea-padding:5px 5px 5px 5px;--textarea-box-shadow:none;--textarea-border-radius:4px}.textarea{box-sizing:border-box;margin:0;font:inherit;background:0 0;line-height:normal;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;resize:none;outline:0;padding:5px 5px 5px 5px;padding:var(--textarea-padding);font-size:16px;font-size:var(--text-input-font-size);font-weight:400;font-weight:var(--font-weight);border-radius:4px;border-radius:var(--textarea-border-radius);border:1px solid #ccc;border:var(--textarea-border);background-color:#efeff4;background-color:var(--input-bg-color);color:#1f1f21;color:var(--textarea-color);letter-spacing:0;box-shadow:none;box-shadow:var(--textarea-box-shadow);-webkit-appearance:none;appearance:none;width:auto}.textarea:disabled{opacity:.3;cursor:default;pointer-events:none}.textarea::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.textarea::placeholder{color:#999;color:var(--input-placeholder-color)}.textarea--transparent{padding-left:0;padding-right:0;border:none;background-color:transparent}.dialog{box-sizing:border-box;padding:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:auto auto;overflow:hidden;min-width:270px;min-height:100px;text-align:left}.dialog-container{height:inherit;min-height:inherit;overflow:hidden;border-radius:4px;background-color:#f4f4f4;background-color:var(--dialog-background-color);-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');color:#1f1f21;color:var(--dialog-text-color)}.dialog-mask{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;position:absolute;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.2)}.dialog--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);text-align:left;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.dialog-container--material{border-radius:2px;background-color:#fff;background-color:var(--material-dialog-background-color);color:#1f1f21;color:var(--material-dialog-text-color)}.dialog-mask--material{background-color:rgba(0,0,0,.3)}.alert-dialog{box-sizing:border-box;padding:0;font:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:270px;margin:auto;background-color:#f4f4f4;background-color:var(--alert-dialog-background-color);border-radius:8px;overflow:visible;max-width:95%;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-container{height:inherit;padding-top:16px;overflow:hidden}.alert-dialog-title{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:17px;font-size:var(--font-size);font-weight:500;font-weight:var(--font-weight--large);padding:0 8px;text-align:center;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-content{box-sizing:border-box;background-clip:padding-box;padding:4px 12px 8px;font-size:calc(17px - 3px);font-size:var(--font-size--mini);min-height:36px;text-align:center;color:#1f1f21;color:var(--alert-dialog-text-color)}.alert-dialog-footer{width:100%}.alert-dialog-button{box-sizing:border-box;font:inherit;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-decoration:none;letter-spacing:0;vertical-align:middle;border:none;border-top:1px solid #ddd;border-top:1px solid var(--alert-dialog-separator-color);font-size:calc(17px - 1px);font-size:calc(var(--font-size) - 1px);padding:0 8px;margin:0;display:block;width:100%;background-color:transparent;text-align:center;height:44px;line-height:44px;outline:0;color:#0076ff;color:var(--alert-dialog-button-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top;background-image:linear-gradient(180deg,#ddd,#ddd 50%,transparent 50%);background-image:linear-gradient(180deg,var(--alert-dialog-separator-color),var(--alert-dialog-separator-color) 50%,transparent 50%)}}.alert-dialog-button:active{background-color:rgba(0,0,0,.05)}.alert-dialog-button--primal{font-weight:500;font-weight:var(--font-weight--large)}.alert-dialog-footer--rowfooter{white-space:nowrap;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.alert-dialog-button--rowfooter{-webkit-flex:1;flex:1;display:block;width:100%;border-left:1px solid #ddd;border-left:1px solid var(--alert-dialog-separator-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter{border-top:none;border-left:none;background-size:100% 1px,1px 100%;background-repeat:no-repeat;background-position:top,left;background-image:linear-gradient(0deg,transparent,transparent 50%,#ddd 50%),linear-gradient(90deg,transparent,transparent 50%,#ddd 50%);background-image:linear-gradient(0deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%),linear-gradient(90deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%)}}.alert-dialog-button--rowfooter:first-child{border-left:none}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter:first-child{border-top:none;background-size:100% 1px;background-repeat:no-repeat;background-position:top,left;background-image:linear-gradient(0deg,transparent,transparent 50%,#ddd 50%);background-image:linear-gradient(0deg,transparent,transparent 50%,var(--alert-dialog-separator-color) 50%)}}.alert-dialog-mask{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;position:absolute;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.2)}.alert-dialog--material{border-radius:2px;background-color:#fff;background-color:var(--material-alert-dialog-background-color)}.alert-dialog-container--material{padding:22px 0 0 0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.alert-dialog-title--material{-webkit-font-smoothing:antialiased;text-align:left;font-size:20px;font-weight:500;padding:0 24px;color:#31313a;color:var(--material-alert-dialog-title-color)}.alert-dialog-content--material{-webkit-font-smoothing:antialiased;text-align:left;font-size:16px;font-weight:400;font-weight:var(--material-font-weight);line-height:20px;padding:0 24px;margin:24px 0 10px 0;min-height:0;color:rgba(49,49,58,.85);color:var(--material-alert-dialog-content-color)}.alert-dialog-footer--material{display:block;padding:0;height:52px;box-sizing:border-box;margin:0;line-height:1}.alert-dialog-button--material{-webkit-font-smoothing:antialiased;text-transform:uppercase;display:inline-block;width:auto;float:right;background:0 0;border:none;border-radius:2px;font-size:14px;font-weight:500;outline:0;height:36px;line-height:36px;padding:0 8px;margin:8px 8px 8px 0;box-sizing:border-box;min-width:50px;color:#37474f;color:var(--material-alert-dialog-button-color)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--material{background:0 0}}.alert-dialog-button--material:active{background-color:transparent;background-color:initial}.alert-dialog-button--rowfooter--material,.alert-dialog-button--rowfooter--material:first-child{border:0}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--rowfooter--material,.alert-dialog-button--rowfooter--material:first-child{background:0 0}}.alert-dialog-button--primal--material{font-weight:500}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.alert-dialog-button--primal--material{background:0 0}}.alert-dialog-mask--material{background-color:rgba(0,0,0,.3)}:root{--popover-arrow-size:18px;--popover-arrow-radius:4px;--popover-radius:8px;--popover-margin:6px;--material-popover-radius:2px;--material-popover-margin:4px}.popover{position:absolute;z-index:20001}.popover--bottom{bottom:0}.popover--top{top:0}.popover--left{left:0}.popover--right{right:0}.popover-mask{left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.2);position:absolute;z-index:19999}.popover__content{box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:block;width:220px;overflow:auto;min-height:100px;max-height:100%;background-color:#fff;background-color:var(--popover-background-color);border-radius:8px;border-radius:var(--popover-radius);color:#1f1f21;color:var(--popover-text-color);pointer-events:auto}.popover__arrow{position:absolute;width:18px;width:var(--popover-arrow-size);height:18px;height:var(--popover-arrow-size);-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;background-color:transparent;background-image:linear-gradient(45deg,#fff,#fff 50%,transparent 50%);background-image:linear-gradient(45deg,var(--popover-background-color),var(--popover-background-color) 50%,transparent 50%);border-radius:0 0 0 4px;border-radius:0 0 0 var(--popover-arrow-radius);margin:0;z-index:20001}.popover--bottom__arrow{-webkit-transform:translateY(6px) translateX(calc(18px / -2)) rotate(-45deg);transform:translateY(6px) translateX(calc(18px / -2)) rotate(-45deg);-webkit-transform:translateY(6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(-45deg);transform:translateY(6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(-45deg);bottom:0;margin-right:-18px}.popover--top__arrow{-webkit-transform:translateY(-6px) translateX(calc(18px / -2)) rotate(135deg);transform:translateY(-6px) translateX(calc(18px / -2)) rotate(135deg);-webkit-transform:translateY(-6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(135deg);transform:translateY(-6px) translateX(calc(var(--popover-arrow-size)/ -2)) rotate(135deg);top:0;margin-right:-18px}.popover--left__arrow{-webkit-transform:translateX(-6px) translateY(calc(18px / -2)) rotate(45deg);transform:translateX(-6px) translateY(calc(18px / -2)) rotate(45deg);-webkit-transform:translateX(-6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(45deg);transform:translateX(-6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(45deg);left:0;margin-bottom:-18px}.popover--right__arrow{-webkit-transform:translateX(6px) translateY(calc(18px / -2)) rotate(225deg);transform:translateX(6px) translateY(calc(18px / -2)) rotate(225deg);-webkit-transform:translateX(6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(225deg);transform:translateX(6px) translateY(calc(var(--popover-arrow-size)/ -2)) rotate(225deg);right:0;margin-bottom:-18px}.popover-mask--material{background-color:transparent}.popover--material__content{background-color:#fafafa;background-color:var(--material-popover-background-color);border-radius:2px;border-radius:var(--material-popover-radius);color:#1f1f21;color:var(--material-popover-text-color);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.popover--material__arrow{display:none}.progress-bar{position:relative;height:2px;display:block;width:100%;background-color:transparent;background-color:var(--progress-bar-background-color);background-clip:padding-box;margin:0;overflow:hidden;border-radius:4px}.progress-bar__primary,.progress-bar__secondary{position:absolute;background-color:#0076ff;background-color:var(--progress-bar-color);top:0;bottom:0;transition:width .3s linear;z-index:100;border-radius:4px}.progress-bar__secondary{background-color:#65adff;background-color:var(--progress-bar-secondary-color);z-index:0}.progress-bar--indeterminate:before{content:'';position:absolute;background-color:#0076ff;background-color:var(--progress-bar-color);top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:progress-bar__indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:progress-bar__indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite;border-radius:4px}.progress-bar--indeterminate:after{content:'';position:absolute;background-color:#0076ff;background-color:var(--progress-bar-color);top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:progress-bar__indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:progress-bar__indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s;border-radius:4px}@-webkit-keyframes progress-bar__indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes progress-bar__indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@-webkit-keyframes progress-bar__indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}@keyframes progress-bar__indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}.progress-bar--material{height:4px;background-color:transparent;background-color:var(--material-progress-bar-background-color);border-radius:0}.progress-bar--material__primary,.progress-bar--material__secondary{background-color:#37474f;background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-bar--material__secondary{background-color:#548ba7;background-color:var(--material-progress-bar-secondary-color);z-index:0}.progress-bar--material.progress-bar--indeterminate:before{background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-bar--material.progress-bar--indeterminate:after{background-color:var(--material-progress-bar-primary-color);border-radius:0}.progress-circular{height:32px;position:relative;width:32px;-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-animation:none;animation:none}.progress-circular__background,.progress-circular__primary,.progress-circular__secondary{ + cx: 50%; + cy: 50%; + r: 40%; + -webkit-animation:none;animation:none;fill:none;stroke-width:5%;stroke-miterlimit:10}.progress-circular__background{stroke:transparent;stroke:var(--progress-circle-background-color)}.progress-circular__primary{stroke-dasharray:1,200;stroke-dashoffset:0;stroke:rgb(0,118,255);stroke:var(--progress-circle-primary-color);transition:all 1s cubic-bezier(.4, 0, .2, 1)}.progress-circular__secondary{stroke:#65adff;stroke:var(--progress-circle-secondary-color)}.progress-circular--indeterminate{-webkit-animation:progress__rotate 2s linear infinite;animation:progress__rotate 2s linear infinite;-webkit-transform:none;transform:none}.progress-circular--indeterminate__primary{-webkit-animation:progress__dash 1.5s ease-in-out infinite;animation:progress__dash 1.5s ease-in-out infinite}.progress-circular--indeterminate__secondary{display:none}@-webkit-keyframes progress__rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes progress__rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes progress__dash{0%{stroke-dasharray:10%,241.32%;stroke-dashoffset:0}50%{stroke-dasharray:201%,50.322%;stroke-dashoffset:-100%}100%{stroke-dasharray:10%,241.32%;stroke-dashoffset:-251.32%}}@keyframes progress__dash{0%{stroke-dasharray:10%,241.32%;stroke-dashoffset:0}50%{stroke-dasharray:201%,50.322%;stroke-dashoffset:-100%}100%{stroke-dasharray:10%,241.32%;stroke-dashoffset:-251.32%}}.progress-circular--material__background,.progress-circular--material__primary,.progress-circular--material__secondary{stroke-width:9%}.progress-circular--material__background{stroke:transparent;stroke:var(--material-progress-circle-background-color)}.progress-circular--material__primary{stroke:#37474f;stroke:var(--material-progress-circle-primary-color)}.progress-circular--material__secondary{stroke:#548ba7;stroke:var(--material-progress-circle-secondary-color)}:root{--fab-width:56px;--fab-height:56px;--fab-position:absolute;--fab-mini-width:40px;--fab-mini-height:40px;--material-fab-width:56px;--material-fab-height:56px;--material-fab-position:absolute;--material-fab-mini-width:40px;--material-fab-mini-height:40px}button.fab,ons-fab.fab,ons-speed-dial-item.fab{position:relative;display:inline-block;box-sizing:border-box;padding:0;margin:0;font:inherit;background:0 0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;-webkit-user-select:none;user-select:none;width:56px;width:var(--fab-width);height:56px;height:var(--fab-height);text-decoration:none;font-size:25px;line-height:56px;line-height:var(--fab-height);letter-spacing:0;color:#fff;color:var(--fab-text-color);vertical-align:middle;text-align:center;background-color:rgba(0,118,255);background-color:var(--fab-background-color);border:0 solid currentColor;border-radius:50%;overflow:hidden;box-shadow:0 3px 6px rgba(0,0,0,.12);transition:all .1s linear}button.fab:active,ons-fab.fab:active,ons-speed-dial-item.fab:active{background-color:rgba(0,118,255,.7);background-color:var(--fab-active-background-color);transition:all .2s ease;box-shadow:0 0 6px rgba(0,0,0,.12)}button.fab:focus,ons-fab.fab:focus,ons-speed-dial-item.fab:focus{outline:0}button.fab:disabled,button.fab[disabled],ons-fab.fab:disabled,ons-fab.fab[disabled],ons-speed-dial-item.fab:disabled,ons-speed-dial-item.fab[disabled]{background-color:rgba(0,0,0,.5);box-shadow:none;opacity:.3;cursor:default;pointer-events:none}button.fab__icon,ons-fab.fab__icon,ons-speed-dial-item.fab__icon{position:relative;overflow:hidden;height:100%;width:100%;display:block;border-radius:100%;padding:0;z-index:100;line-height:56px;line-height:var(--material-fab-height)}button.fab--material,ons-fab.fab--material,ons-speed-dial-item.fab--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);width:56px;width:var(--material-fab-width);height:56px;height:var(--material-fab-height);text-decoration:none;font-size:25px;line-height:56px;line-height:var(--material-fab-height);color:#31313a;color:var(--material-fab-text-color);background-color:#fff;background-color:var(--material-fab-background-color);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4);transition:all .2s ease-in-out}button.fab--material:active,ons-fab.fab--material:active,ons-speed-dial-item.fab--material:active{background-color:rgba(255,255,255,.75);background-color:var(--material-fab-active-background-color);transition:all .2s ease}button.fab--material:focus,ons-fab.fab--material:focus,ons-speed-dial-item.fab--material:focus{outline:0}button.fab--material__icon,ons-fab.fab--material__icon,ons-speed-dial-item.fab--material__icon{position:relative;overflow:hidden;height:100%;width:100%;display:block;border-radius:100%;padding:0;z-index:100;line-height:56px;line-height:var(--material-fab-height)}button.fab--mini,ons-fab.fab--mini,ons-speed-dial-item.fab--mini{width:40px;width:var(--fab-mini-width);height:40px;height:var(--fab-mini-height);line-height:40px;line-height:var(--fab-mini-height)}button.fab--mini__icon,ons-fab.fab--mini__icon,ons-speed-dial-item.fab--mini__icon{line-height:40px;line-height:var(--fab-mini-height)}button.speed-dial__item,ons-fab.speed-dial__item,ons-speed-dial-item.speed-dial__item{position:absolute;-webkit-transform:scale(0);transform:scale(0)}.speed-dial.fab--top__right,button.fab--top__right,ons-fab.fab--top__right{top:20px;bottom:auto;right:20px;left:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__right,button.fab--bottom__right,ons-fab.fab--bottom__right{top:auto;bottom:20px;right:20px;left:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--top__left,button.fab--top__left,ons-fab.fab--top__left{top:20px;bottom:auto;right:auto;left:20px;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__left,button.fab--bottom__left,ons-fab.fab--bottom__left{top:auto;bottom:20px;right:auto;left:20px;position:absolute;position:var(--fab-position)}.speed-dial.fab--top__center,button.fab--top__center,ons-fab.fab--top__center{top:20px;bottom:auto;margin-left:-28px;left:50%;right:auto;position:absolute;position:var(--fab-position)}.speed-dial.fab--bottom__center,button.fab--bottom__center,ons-fab.fab--bottom__center{top:auto;bottom:20px;margin-left:-28px;left:50%;right:auto;position:absolute;position:var(--fab-position)}.modal{white-space:nowrap;word-spacing:0;padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;box-sizing:border-box;background-clip:padding-box;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);overflow:hidden;background-color:rgba(0,0,0,.7);background-color:var(--modal-background-color);position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;display:table;z-index:2147483647}.modal__content{overflow:hidden;word-spacing:0;padding:0;margin:0;font:inherit;background:0 0;border:none;line-height:normal;box-sizing:border-box;background-clip:padding-box;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);display:table-cell;vertical-align:middle;text-align:center;color:#fff;color:var(--modal-text-color);white-space:normal}:root{--select-input-font-size:var(--font-size);--select-input-height:32px;--material-select-input-font-size:15px;--select-arrow-icon:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=')}.select-input{box-sizing:border-box;margin:0;font:inherit;background:0 0;vertical-align:top;outline:0;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:relative;font-size:17px;font-size:var(--select-input-font-size);height:32px;height:var(--select-input-height);line-height:32px;line-height:var(--select-input-height);border-color:#ccc;border-color:var(--select-input-border-color);color:#1f1f21;color:var(--select-input-color);-webkit-appearance:none;appearance:none;display:inline-block;border-radius:0;border:none;padding:0 20px 0 0;background-color:transparent;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=');background-image:var(--select-arrow-icon);background-repeat:no-repeat;background-position:right center;border-bottom:none}.select-input::-ms-clear{display:none}.select-input::-webkit-input-placeholder{color:#999;color:var(--input-placeholder-color)}.select-input::placeholder{color:#999;color:var(--input-placeholder-color)}.select-input:disabled{opacity:.3;cursor:default;pointer-events:none;border:none;background-color:transparent}.select-input:disabled::-webkit-input-placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.select-input:disabled::placeholder{border:none;background-color:transparent;color:#999;color:var(--input-placeholder-color)}.select-input:invalid{border:none;background-color:transparent;color:#1f1f21;color:var(--input-invalid-text-color)}.select-input[multiple]{height:calc(32px * 2);height:calc(var(--select-input-height) * 2)}.select-input--material{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#1f1f21;color:var(--material-select-input-color);font-size:15px;font-size:var(--material-select-input-font-size);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSI1cHgiIHZpZXdCb3g9IjAgMCAxMCA1IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4yICgzOTA2OSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+c2VsZWN0LWFsbG93PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9InNlbGVjdCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Imlvcy1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xOTguMDAwMDAwLCAtMTE0LjAwMDAwMCkiIGZpbGw9IiM3NTc1NzUiPgogICAgICAgICAgICA8ZyBpZD0ibWVudS1iYXItKy1vcGVuLW1lbnUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMy4wMDAwMDAsIDEwMC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJtZW51LWJhciI+CiAgICAgICAgICAgICAgICAgICAgPHBvbHlnb24gaWQ9InNlbGVjdC1hbGxvdyIgcG9pbnRzPSI3NSAxNCA4MCAxOSA4NSAxNCI+PC9wb2x5Z29uPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4='),linear-gradient(to top,rgba(0,0,0,.12) 50%,rgba(0,0,0,.12) 50%);background-image:var(--select-arrow-icon),linear-gradient(to top,var(--material-select-border-color) 50%,var(--material-select-border-color) 50%);background-size:auto,100% 1px;background-repeat:no-repeat;background-position:right center,left bottom;border:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.select-input--material__label{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:rgba(0,0,0,.81);color:var(--material-select-input-inactive-color);position:absolute;left:0;top:2px;font-size:16px;pointer-events:none}.select-input--material__label--active{color:rgba(0,0,0,.15);color:var(--material-select-input-active-color);-webkit-transform:translate(0,-75%) scale(.75);transform:translate(0,-75%) scale(.75);-webkit-transform-origin:left top;transform-origin:left top;transition:color .1s ease-in,-webkit-transform .1s ease-in;transition:transform .1s ease-in,color .1s ease-in;transition:transform .1s ease-in,color .1s ease-in,-webkit-transform .1s ease-in}.select-input--material::-webkit-input-placeholder{color:rgba(0,0,0,.81);color:var(--material-select-input-inactive-color);line-height:20px}.select-input--material::placeholder{color:rgba(0,0,0,.81);color:var(--material-select-input-inactive-color);line-height:20px}@-webkit-keyframes material-select-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}@keyframes material-select-input-animate{0%{background-size:0 2px,100% 2px}100%{background-size:100% 2px,100% 2px}}.select-input--underbar{border:none;border-bottom:1px solid #ccc;border-bottom:1px solid var(--select-input-border-color)}.select-input--underbar:disabled{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--select-input-border-color)}.select-input--underbar:disabled::-webkit-input-placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.select-input--underbar:disabled::placeholder{color:var(--input-placeholder-color);border:none;background-color:transparent}.select-input--underbar:invalid{border:none;background-color:transparent;border-bottom:1px solid #ccc;border-bottom:1px solid var(--input-invalid-border-color)}:root{--action-sheet-mask-color:rgba(0, 0, 0, 0.1);--material-action-sheet-mask-color:rgba(0, 0, 0, 0.2)}.action-sheet{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);cursor:default;position:absolute;left:10px;right:10px;bottom:10px;z-index:2}.action-sheet-button{box-sizing:border-box;height:56px;font-size:20px;text-align:center;color:#0076ff;color:var(--action-sheet-button-color);background-color:rgba(255,255,255,.9);background-color:var(--action-sheet-button-background-color);border-radius:0;line-height:56px;border:none;-webkit-appearance:none;appearance:none;display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 100%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.action-sheet-button{background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 50%,transparent 50%)}}.action-sheet-button:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.action-sheet-button:active{background-color:#e9e9e9;background-color:var(--action-sheet-button-active-background-color);background-image:none}.action-sheet-button:focus{outline:0}.action-sheet-button:nth-last-of-type(2){border-bottom-right-radius:12px;border-bottom-left-radius:12px;background-image:none}.action-sheet-button:last-of-type{border-radius:12px;margin:8px 0 0 0;background-color:#fff;background-color:var(--action-sheet-cancel-button-background-color);background-image:none;font-weight:600}.action-sheet-button:last-of-type:active{background-color:#e9e9e9;background-color:var(--action-sheet-button-active-background-color)}.action-sheet-button--destructive{color:#fe3824;color:var(--action-sheet-button-destructive-color)}.action-sheet-title{box-sizing:border-box;height:56px;font-size:13px;color:#8f8e94;color:var(--action-sheet-title-color);text-align:center;background-color:rgba(255,255,255,.9);background-color:var(--action-sheet-button-background-color);line-height:56px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 100%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 100%)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi),(min-resolution:2dppx){.action-sheet-title{background-image:linear-gradient(0deg,rgba(0,0,0,.1),rgba(0,0,0,.1) 50%,transparent 50%);background-image:linear-gradient(0deg,var(--action-sheet-button-separator-color),var(--action-sheet-button-separator-color) 50%,transparent 50%)}}.action-sheet-title:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.action-sheet-icon{display:none}.action-sheet-mask{position:absolute;left:0;top:0;right:0;bottom:0;background-color:rgba(0,0,0,.1);background-color:var(--action-sheet-mask-color);z-index:1}.action-sheet--material{left:0;right:0;bottom:0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)}.action-sheet-title--material{-webkit-font-smoothing:antialiased;border-radius:0;background-image:none;text-align:left;height:56px;line-height:56px;font-size:16px;padding:0 0 0 16px;color:#686868;color:var(--material-action-sheet-text-color);background-color:#fff;font-weight:400;font-weight:var(--material-font-weight)}.action-sheet-title--material:first-child{border-radius:0}.action-sheet-button--material{-webkit-font-smoothing:antialiased;border-radius:0;background-image:none;height:52px;line-height:52px;text-align:left;font-size:16px;padding:0 0 0 16px;color:#686868;color:var(--material-action-sheet-text-color);font-weight:400;font-weight:var(--material-font-weight);background-color:#fff}.action-sheet-button--material:first-child{border-radius:0}.action-sheet-button--material:nth-last-of-type(2){border-radius:0}.action-sheet-button--material:last-of-type{margin:0;border-radius:0;font-weight:400;background-color:#fff}.action-sheet-icon--material{display:inline-block;float:left;height:52px;line-height:52px;margin-right:32px;font-size:26px;width:.8em;text-align:center}.action-sheet-mask--material{background-color:rgba(0,0,0,.2);background-color:var(--material-action-sheet-mask-color)}:root{--card-text-line-height:1.4;--card-text-font-size:14px;--material-card-text-line-height:1.4;--material-card-text-font-size:14px}.card{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);box-shadow:0 1px 2px rgba(0,0,0,.12);border-radius:8px;background-color:#fff;background-color:var(--card-background-color);box-sizing:border-box;display:block;margin:8px;padding:16px;text-align:left;word-wrap:break-word}.card__content{margin:0;font-size:14px;font-size:var(--card-text-font-size);line-height:1.4;line-height:var(--card-text-line-height);color:#030303;color:var(--card-text-color)}.card__title{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:20px;margin:4px 0 8px 0;padding:0;display:block;box-sizing:border-box}.card--material{background-color:#fff;background-color:var(--material-card-background-color);border-radius:2px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight)}.card--material__content{font-size:14px;font-size:var(--material-card-text-font-size);line-height:1.4;line-height:var(--material-card-text-line-height);color:rgba(0,0,0,.54);color:var(--material-card-text-color)}.card--material__title{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);font-size:24px;margin:8px 0 12px 0}.toast{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-weight:var(--font-weight);position:absolute;z-index:2;left:8px;right:8px;bottom:0;margin:8px 0;border-radius:8px;background-color:rgba(0,0,0,.8);background-color:var(--toast-background-color);display:-webkit-flex;display:flex;min-height:48px;line-height:1.5;box-sizing:border-box;padding:16px 16px}.toast__message{font-size:14px;color:#fff;color:var(--toast-text-color);-webkit-flex-grow:1;flex-grow:1;text-align:left;margin:0 16px 0 0;white-space:normal}.toast__button{font-size:14px;color:#fff;color:var(--toast-button-text-color);-webkit-flex-grow:0;flex-grow:0;-webkit-appearance:none;appearance:none;border:none;background-color:transparent;cursor:default;text-transform:uppercase}.toast__button:focus{outline:0}.toast__button:active{opacity:.4}.toast--material{left:0;right:0;bottom:0;margin:0;background-color:rgba(0,0,0,.8);background-color:var(--material-toast-background-color);border-radius:0;padding:16px 24px}.toast--material__message{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);margin:0 24px 0 0}.toast--material__button{-webkit-font-smoothing:antialiased;font-weight:400;font-weight:var(--material-font-weight);color:#bbdefb;color:var(--material-toast-button-text-color)}.toolbar{top:0;box-sizing:border-box;padding-top:0}.bottom-bar{bottom:0;box-sizing:border-box;padding-bottom:0}.toolbar+.page__background{top:44px;top:var(--toolbar-height)}.page__content{top:0;padding-top:0;bottom:0}.toolbar+.page__background+.page__content{top:44px;top:var(--toolbar-height);padding-top:0}.page-with-bottom-toolbar>.page__content{bottom:44px}.toolbar.toolbar--material+.page__background{top:56px;top:var(--toolbar-material-height)}.toolbar.toolbar--material+.page__background+.page__content{top:56px;top:var(--toolbar-material-height);padding-top:0}.toolbar.toolbar--transparent+.page__background{top:0}.toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,.toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:44px;padding-top:var(--toolbar-height)}.toolbar.toolbar--material.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,.toolbar.toolbar--material.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:56px;padding-top:var(--toolbar-material-height)}.tabbar--top{padding-top:0}.tabbar:not(.tabbar--top){padding-bottom:0}:root{--iphonex-safe-area-inset-top-portrait:44px;--iphonex-safe-area-inset-right-portrait:0;--iphonex-safe-area-inset-bottom-portrait:34px;--iphonex-safe-area-inset-left-portrait:0;--iphonex-safe-area-inset-top-landscape:0;--iphonex-safe-area-inset-right-landscape:44px;--iphonex-safe-area-inset-bottom-landscape:21px;--iphonex-safe-area-inset-left-landscape:44px}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape);padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape)}html[onsflag-iphonex-landscape] .dialog .page__content,html[onsflag-iphonex-landscape] .modal .page__content{padding-left:0;padding-right:0}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .toolbar__left{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape)}html[onsflag-iphonex-landscape] .toolbar__right{padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape)}html[onsflag-iphonex-landscape] .bottom-bar{padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape);padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .tabbar{padding-left:44px;padding-left:var(--iphonex-safe-area-inset-left-landscape);padding-right:44px;padding-right:var(--iphonex-safe-area-inset-right-landscape);width:calc(100% - 44px - 44px);width:calc(100% - var(--iphonex-safe-area-inset-left-landscape) - var(--iphonex-safe-area-inset-right-landscape))}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .fab--top__center,html[onsflag-iphonex-portrait] .fab--top__left,html[onsflag-iphonex-portrait] .fab--top__right{top:calc(44px + 20px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + 20px)}html[onsflag-iphonex-portrait] .fab--bottom__center,html[onsflag-iphonex-portrait] .fab--bottom__left,html[onsflag-iphonex-portrait] .fab--bottom__right{bottom:calc(34px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait))}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .fab--bottom__center,html[onsflag-iphonex-landscape] .fab--bottom__left,html[onsflag-iphonex-landscape] .fab--bottom__right{bottom:calc(21px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape))}html[onsflag-iphonex-landscape] .fab--bottom__left,html[onsflag-iphonex-landscape] .fab--top__left{left:calc(44px);left:calc(var(--iphonex-safe-area-inset-left-landscape))}html[onsflag-iphonex-landscape] .fab--bottom__right,html[onsflag-iphonex-landscape] .fab--top__right{right:calc(44px);right:calc(var(--iphonex-safe-area-inset-right-landscape))}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .action-sheet{bottom:calc(34px + 14px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + 14px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .action-sheet{left:calc((100vw - (100vh + 20px))/ 2);right:calc((100vw - (100vh + 20px))/ 2);bottom:calc(21px + 12px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + 12px)}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .toast{bottom:34px;bottom:var(--iphonex-safe-area-inset-bottom-portrait)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .toast{left:calc(44px + 8px);left:calc(var(--iphonex-safe-area-inset-left-landscape) + 8px);right:calc(44px + 8px);right:calc(var(--iphonex-safe-area-inset-right-landscape) + 8px);bottom:21px;bottom:var(--iphonex-safe-area-inset-bottom-landscape)}}@media (orientation:portrait){html[onsflag-iphonex-portrait] .toolbar{top:0;box-sizing:content-box;padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait)}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar,html[onsflag-iphonex-portrait] .dialog .toolbar,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar{box-sizing:border-box;padding-top:0}html[onsflag-iphonex-portrait] .bottom-bar{bottom:0;box-sizing:content-box;padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}html[onsflag-iphonex-portrait] .dialog .bottom-bar,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .bottom-bar,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .bottom-bar{box-sizing:border-box;padding-bottom:0}html[onsflag-iphonex-portrait] .page__content{top:0;padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait);bottom:0;padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .page__content,/* if wrapped with a top tabbar */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .dialog .page__content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .page__content{padding-top:0}/* if wrapped with a bottom tabbar */ html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .dialog .page__content,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .page__content,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page__content{padding-bottom:0}html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content{top:calc(44px + 44px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height));padding-top:0}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background,html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content{top:var(--toolbar-height);padding-top:0}html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content{bottom:calc(34px + 44px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--toolbar-height));padding-bottom:0}html[onsflag-iphonex-portrait] .dialog .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar>.page__content{bottom:var(--toolbar-height);padding-bottom:0}html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content{top:0;padding-top:calc(44px + 44px);padding-top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height))}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page__content,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content{padding-top:44px;padding-top:var(--toolbar-height)}html[onsflag-iphonex-portrait] .tabbar--top{padding-top:44px;padding-top:var(--iphonex-safe-area-inset-top-portrait)}html[onsflag-iphonex-portrait] .tabbar--top__content{top:calc(44px + 49px);top:calc(var(--iphonex-safe-area-inset-top-portrait) + var(--tabbar-height))}/* if wrapped with a page with a toolbar */ html[onsflag-iphonex-portrait] .tabbar--top__content .tabbar--top__content,/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .tabbar--top__content,html[onsflag-iphonex-portrait] .dialog .tabbar--top__content{top:var(--tabbar-height)}html[onsflag-iphonex-portrait] .tabbar:not(.tabbar--top):not(.tabbar--top){padding-bottom:34px;padding-bottom:var(--iphonex-safe-area-inset-bottom-portrait)}html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content){bottom:calc(34px + 49px);bottom:calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--tabbar-height))}/* if wrapped with a page with a bottom-bar */ html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content),/* if wrapped with dialogs */ html[onsflag-iphonex-portrait] .page-with-bottom-toolbar>.page__content .tabbar__content:not(.tabbar--top__content),html[onsflag-iphonex-portrait] .dialog .tabbar__content:not(.tabbar--top__content){bottom:var(--tabbar-height)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .bottom-bar{bottom:0;box-sizing:content-box;padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}html[onsflag-iphonex-landscape] .dialog .bottom-bar,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .bottom-bar,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .bottom-bar{box-sizing:border-box;padding-bottom:0}html[onsflag-iphonex-landscape] .page__content{bottom:0;padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}/* if wrapped with a bottom tabbar */ html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .dialog .page__content,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .page__content,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page__content{padding-bottom:0}html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content{bottom:calc(21px + 44px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--toolbar-height));padding-bottom:0}html[onsflag-iphonex-landscape] .dialog .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .page-with-bottom-toolbar>.page__content,html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar>.page__content{bottom:var(--toolbar-height);padding-bottom:0}html[onsflag-iphonex-landscape] .tabbar:not(.tabbar--top){padding-bottom:21px;padding-bottom:var(--iphonex-safe-area-inset-bottom-landscape)}html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content){bottom:calc(21px + 49px);bottom:calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--tabbar-height))}/* if wrapped with a page with a bottom-bar */ html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content),/* if wrapped with dialogs */ html[onsflag-iphonex-landscape] .page-with-bottom-toolbar>.page__content .tabbar__content:not(.tabbar--top__content),html[onsflag-iphonex-landscape] .dialog .tabbar__content:not(.tabbar--top__content){bottom:var(--tabbar-height)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset){margin-left:calc(-1 * 44px);margin-left:calc(-1 * var(--iphonex-safe-area-inset-left-landscape));margin-right:calc(-1 * 44px);margin-right:calc(-1 * var(--iphonex-safe-area-inset-right-landscape))}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-header{padding-left:calc(44px + 15px);padding-left:calc(var(--iphonex-safe-area-inset-left-landscape) + 15px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item{padding-left:calc(var(--iphonex-safe-area-inset-left-landscape) + 14px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:calc(44px + 16px);right:calc(var(--iphonex-safe-area-inset-right-landscape) + 16px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:calc(44px + 6px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 6px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:calc(44px + 12px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 12px)}html[onsflag-iphonex-landscape] .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:calc(44px + 30px);padding-right:calc(var(--iphonex-safe-area-inset-right-landscape) + 30px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset){margin-left:0;margin-right:0}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-header{padding-left:15px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item{padding-left:14px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:16px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:6px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:12px}html[onsflag-iphonex-landscape] .dialog .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:30px}} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/onsenui-core.min.css b/Server/www/spiderbasic/onsenui-css/onsenui-core.min.css new file mode 100644 index 0000000..5359859 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/onsenui-core.min.css @@ -0,0 +1 @@ +ons-gesture-detector,ons-navigator,ons-page,ons-tabbar{display:block;touch-action:manipulation}ons-action-sheet,ons-alert-dialog,ons-dialog,ons-navigator,ons-splitter,ons-tabbar,ons-toast{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;touch-action:manipulation}ons-toast{pointer-events:none}ons-toast .toast{pointer-events:auto}ons-tab{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}ons-action-sheet,ons-alert-dialog,ons-dialog,ons-navigator,ons-page,ons-tabbar,ons-toast{z-index:2}ons-fab,ons-speed-dial{z-index:10001}ons-bottom-toolbar,ons-toolbar:not([inline]){position:absolute;left:0;right:0;z-index:10000}ons-toolbar:not([inline]){top:0}ons-bottom-toolbar{bottom:0}.page,.page--material,.page--material__content,.page__content{background-color:transparent!important;background:0 0!important}.page__content{overflow:auto;-webkit-overflow-scrolling:touch;z-index:0;-ms-touch-action:pan-y}.page.overflow-visible,.page.overflow-visible .page,.page.overflow-visible .page__content,.page.overflow-visible ons-navigator,.page.overflow-visible ons-splitter{overflow:visible}.page.overflow-visible .page__content.content-swiping,.page.overflow-visible .page__content.content-swiping .page,.page.overflow-visible .page__content.content-swiping .page__content{overflow:auto}.page[status-bar-fill]>.page__content{top:20px}.page[status-bar-fill]>.toolbar{padding-top:20px;box-sizing:content-box}.page[status-bar-fill]>.toolbar:not(.toolbar--cover-content)+.page__background+.page__content,.page[status-bar-fill]>.toolbar:not(.toolbar--transparent)+.page__background{top:64px}.page[status-bar-fill]>.toolbar--material:not(.toolbar--cover-content)+.page__background+.page__content,.page[status-bar-fill]>.toolbar--material:not(.toolbar-transparent)+.page__background{top:76px}.page[status-bar-fill]>.toolbar.toolbar--transparent+.page__background{top:0}ons-tabbar[status-bar-fill]>.tabbar--top__content{top:71px}ons-tabbar[status-bar-fill]>.tabbar--top{padding-top:22px}ons-tabbar[position=top] .page[status-bar-fill]>.page__content{top:0}.toolbar+.page__background+.page__content ons-tabbar[status-bar-fill]>.tabbar--top{top:0}.toolbar+.page__background+.page__content ons-tabbar[status-bar-fill]>.tabbar--top__content{top:49px}.page__content>.list:not(.list--material):first-child{margin-top:-1px}.page--wrapper>.page__background{display:none}ons-action-sheet[disabled],ons-alert-dialog[disabled],ons-dialog[disabled],ons-popover[disabled]{pointer-events:none;opacity:.75}ons-list-item[disabled]{pointer-events:none}ons-range[disabled]{opacity:.3;pointer-events:none}ons-pull-hook{position:relative;display:block;margin:auto;text-align:center;z-index:20002}ons-splitter,ons-splitter-content,ons-splitter-mask,ons-splitter-side{display:block;position:absolute;left:0;right:0;top:0;bottom:0;box-sizing:border-box;z-index:0}ons-splitter-mask{z-index:4;background-color:rgba(0,0,0,.1);display:none;opacity:0}ons-splitter-content{z-index:2}ons-splitter-side{right:auto;z-index:2}ons-splitter-side[side=right]{right:0;left:auto}ons-splitter-side[mode=collapse]{z-index:5;left:auto;right:100%}ons-splitter-side[side=right][mode=collapse]{right:auto;left:100%}ons-splitter-side[mode=split]{z-index:3}ons-toolbar-button>ons-icon[icon*=ion-]{font-size:26px}ons-range,ons-select{display:inline-block}ons-range>input{min-width:50px;width:100%}ons-select>select{width:100%}ons-carousel[disabled]{pointer-events:none;opacity:.75}ons-carousel[fullscreen]{height:100%}.ons-status-bar-mock{position:absolute;width:100%;height:20px;padding:0 16px 0 6px;box-sizing:border-box;z-index:30000;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;font-size:12px;line-height:20px;font-family:Arial,Helvetica}.ons-status-bar-mock i{padding:0 2px}.ons-status-bar-mock.android{color:#fff;background-color:#222;font-family:Roboto,Arial,Helvetica}.ons-status-bar-mock.android~*{top:20px;bottom:0;position:inherit;width:100%}.ons-ios-scroll-fix .page:not(.page--wrapper)[shown]>.page__content{overflow-y:hidden}.ons-ios-scroll-fix ons-splitter-side>.page:not(.page--wrapper)[shown]>.page__content{overflow-y:auto}ons-row{display:-webkit-flex;display:-moz-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;width:100%;box-sizing:border-box}ons-row[align=top],ons-row[vertical-align=top]{box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;align-items:flex-start}ons-row[align=bottom],ons-row[vertical-align=bottom]{box-align:end;-webkit-align-items:flex-end;-moz-align-items:flex-end;align-items:flex-end}ons-row[align=center],ons-row[vertical-align=center]{box-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;text-align:inherit}ons-row+ons-row{padding-top:0}ons-col{-webkit-flex:1;-moz-flex:1;flex:1;display:block;width:100%;box-sizing:border-box}ons-col[align=top],ons-col[vertical-align=top]{-webkit-align-self:flex-start;align-self:flex-start}ons-col[align=bottom],ons-col[vertical-align=bottom]{-webkit-align-self:flex-end;align-self:flex-end}ons-col[align=center],ons-col[vertical-align=center]{-webkit-align-self:center;-moz-align-self:center;-ms-flex-item-align:center;text-align:inherit}.ons-icon{display:inline-block;line-height:inherit;font-style:normal;font-weight:400;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.segment__button .ons-icon{line-height:normal;line-height:initial}:not(ons-toolbar-button):not(ons-action-sheet-button):not(.segment__button)>.ons-icon--ion{line-height:.75em;vertical-align:-25%}.ons-icon[spin]{-webkit-animation:ons-icon-spin 2s infinite linear;animation:ons-icon-spin 2s infinite linear}@-webkit-keyframes ons-icon-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@keyframes ons-icon-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ons-icon[rotate="90"]{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ons-icon[rotate="180"]{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ons-icon[rotate="270"]{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.ons-icon[fixed-width]{width:1.28571429em;text-align:center}.ons-icon--lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.ons-icon--2x{font-size:2em}.ons-icon--3x{font-size:3em}.ons-icon--4x{font-size:4em}.ons-icon--5x{font-size:5em}.ons-icon.fa{font-family:'Font Awesome 5 Brands','Font Awesome 5 Free';font-weight:900}ons-checkbox,ons-input,ons-radio,ons-search-input{display:inline-block;position:relative}ons-input .text-input,ons-search-input .search-input{width:100%;display:inline-block}ons-input .text-input__label:not(.text-input--material__label){display:none}ons-input:not([float]) .text-input--material__label--active{display:none}ons-checkbox[disabled],ons-input[disabled],ons-radio[disabled],ons-search-input[disabled],ons-segment[disabled]{opacity:.5;pointer-events:none}ons-input input.text-input--material::-webkit-input-placeholder{color:transparent}ons-input input.text-input--material::-moz-placeholder{color:transparent}ons-input input.text-input--material:-ms-input-placeholder{color:transparent}@media (orientation:landscape){html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content{padding-right:0}html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content{padding-left:0}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content>ons-progress-bar>.progress-bar{margin-left:-44px;margin-right:-44px;width:calc(100% + 88px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content>.list:not(.list--inset){margin-left:0}html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content>.list:not(.list--inset)>.list-header{padding-left:15px}html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content>.list:not(.list--inset)>.list-item{padding-left:14px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset){margin-right:0}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:16px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:6px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:12px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:30px}}ons-progress-bar{display:block}ons-progress-circular{display:inline-block;width:32px;height:32px}ons-progress-circular>svg.progress-circular{width:100%;height:100%}.ripple{display:block;position:absolute;overflow:hidden;top:0;left:0;right:0;bottom:0;pointer-events:none}.ripple__background{background:rgba(255,255,255,.2);position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.ripple__wave{background:rgba(255,255,255,.2);width:0;height:0;border-radius:50%;position:absolute;top:0;left:0;z-index:0;pointer-events:none}.button--material--flat .ripple__background,.button--material--flat .ripple__wave,ons-list-item .ripple__background,ons-list-item .ripple__wave{background:rgba(189,189,189,.3)}.ripple--light-gray__background,.ripple--light-gray__wave{background:rgba(189,189,189,.3)}.ons-swiper{overflow:hidden;display:block;box-sizing:border-box}.ons-swiper-target{display:-webkit-flex;display:flex;height:100%;z-index:1;-webkit-flex-direction:row;flex-direction:row}.ons-swiper-target--vertical{-webkit-flex-direction:column;flex-direction:column}.ons-swiper-target>*{height:inherit;-webkit-flex-shrink:0;flex-shrink:0;box-sizing:border-box;width:100%;position:relative!important}.ons-swiper-target.active:not(.swiping)>.page:not([shown]){visibility:hidden}.ons-swiper-tabbar .tabbar--material__button:after{display:none}.ons-swiper-blocker{display:block;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui-css/onsenui-fonts.css b/Server/www/spiderbasic/onsenui-css/onsenui-fonts.css new file mode 100644 index 0000000..ebf5d3c --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/onsenui-fonts.css @@ -0,0 +1,4 @@ +@import url("./ionicons/css/ionicons.min.css"); +@import url("./material-design-iconic-font/css/material-design-iconic-font.min.css"); +@import url("./font_awesome/css/all.min.css"); +@import url("./font_awesome/css/v4-shims.min.css"); diff --git a/Server/www/spiderbasic/onsenui-css/onsenui.min.css b/Server/www/spiderbasic/onsenui-css/onsenui.min.css new file mode 100644 index 0000000..f213288 --- /dev/null +++ b/Server/www/spiderbasic/onsenui-css/onsenui.min.css @@ -0,0 +1 @@ +@import url(ionicons/css/ionicons.min.css);@import url(material-design-iconic-font/css/material-design-iconic-font.min.css);@import url(font_awesome/css/all.min.css);@import url(font_awesome/css/v4-shims.min.css);ons-gesture-detector,ons-navigator,ons-page,ons-tabbar{display:block;touch-action:manipulation}ons-action-sheet,ons-alert-dialog,ons-dialog,ons-navigator,ons-splitter,ons-tabbar,ons-toast{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;touch-action:manipulation}ons-toast{pointer-events:none}ons-toast .toast{pointer-events:auto}ons-tab{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}ons-action-sheet,ons-alert-dialog,ons-dialog,ons-navigator,ons-page,ons-tabbar,ons-toast{z-index:2}ons-fab,ons-speed-dial{z-index:10001}ons-bottom-toolbar,ons-toolbar:not([inline]){position:absolute;left:0;right:0;z-index:10000}ons-toolbar:not([inline]){top:0}ons-bottom-toolbar{bottom:0}.page,.page--material,.page--material__content,.page__content{background-color:transparent!important;background:0 0!important}.page__content{overflow:auto;-webkit-overflow-scrolling:touch;z-index:0;-ms-touch-action:pan-y}.page.overflow-visible,.page.overflow-visible .page,.page.overflow-visible .page__content,.page.overflow-visible ons-navigator,.page.overflow-visible ons-splitter{overflow:visible}.page.overflow-visible .page__content.content-swiping,.page.overflow-visible .page__content.content-swiping .page,.page.overflow-visible .page__content.content-swiping .page__content{overflow:auto}.page[status-bar-fill]>.page__content{top:20px}.page[status-bar-fill]>.toolbar{padding-top:20px;box-sizing:content-box}.page[status-bar-fill]>.toolbar:not(.toolbar--cover-content)+.page__background+.page__content,.page[status-bar-fill]>.toolbar:not(.toolbar--transparent)+.page__background{top:64px}.page[status-bar-fill]>.toolbar--material:not(.toolbar--cover-content)+.page__background+.page__content,.page[status-bar-fill]>.toolbar--material:not(.toolbar-transparent)+.page__background{top:76px}.page[status-bar-fill]>.toolbar.toolbar--transparent+.page__background{top:0}ons-tabbar[status-bar-fill]>.tabbar--top__content{top:71px}ons-tabbar[status-bar-fill]>.tabbar--top{padding-top:22px}ons-tabbar[position=top] .page[status-bar-fill]>.page__content{top:0}.toolbar+.page__background+.page__content ons-tabbar[status-bar-fill]>.tabbar--top{top:0}.toolbar+.page__background+.page__content ons-tabbar[status-bar-fill]>.tabbar--top__content{top:49px}.page__content>.list:not(.list--material):first-child{margin-top:-1px}.page--wrapper>.page__background{display:none}ons-action-sheet[disabled],ons-alert-dialog[disabled],ons-dialog[disabled],ons-popover[disabled]{pointer-events:none;opacity:.75}ons-list-item[disabled]{pointer-events:none}ons-range[disabled]{opacity:.3;pointer-events:none}ons-pull-hook{position:relative;display:block;margin:auto;text-align:center;z-index:20002}ons-splitter,ons-splitter-content,ons-splitter-mask,ons-splitter-side{display:block;position:absolute;left:0;right:0;top:0;bottom:0;box-sizing:border-box;z-index:0}ons-splitter-mask{z-index:4;background-color:rgba(0,0,0,.1);display:none;opacity:0}ons-splitter-content{z-index:2}ons-splitter-side{right:auto;z-index:2}ons-splitter-side[side=right]{right:0;left:auto}ons-splitter-side[mode=collapse]{z-index:5;left:auto;right:100%}ons-splitter-side[side=right][mode=collapse]{right:auto;left:100%}ons-splitter-side[mode=split]{z-index:3}ons-toolbar-button>ons-icon[icon*=ion-]{font-size:26px}ons-range,ons-select{display:inline-block}ons-range>input{min-width:50px;width:100%}ons-select>select{width:100%}ons-carousel[disabled]{pointer-events:none;opacity:.75}ons-carousel[fullscreen]{height:100%}.ons-status-bar-mock{position:absolute;width:100%;height:20px;padding:0 16px 0 6px;box-sizing:border-box;z-index:30000;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;font-size:12px;line-height:20px;font-family:Arial,Helvetica}.ons-status-bar-mock i{padding:0 2px}.ons-status-bar-mock.android{color:#fff;background-color:#222;font-family:Roboto,Arial,Helvetica}.ons-status-bar-mock.android~*{top:20px;bottom:0;position:inherit;width:100%}.ons-ios-scroll-fix .page:not(.page--wrapper)[shown]>.page__content{overflow-y:hidden}.ons-ios-scroll-fix ons-splitter-side>.page:not(.page--wrapper)[shown]>.page__content{overflow-y:auto}ons-row{display:-webkit-flex;display:-moz-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;width:100%;box-sizing:border-box}ons-row[align=top],ons-row[vertical-align=top]{box-align:start;-webkit-align-items:flex-start;-moz-align-items:flex-start;align-items:flex-start}ons-row[align=bottom],ons-row[vertical-align=bottom]{box-align:end;-webkit-align-items:flex-end;-moz-align-items:flex-end;align-items:flex-end}ons-row[align=center],ons-row[vertical-align=center]{box-align:center;-webkit-align-items:center;-moz-align-items:center;align-items:center;text-align:inherit}ons-row+ons-row{padding-top:0}ons-col{-webkit-flex:1;-moz-flex:1;flex:1;display:block;width:100%;box-sizing:border-box}ons-col[align=top],ons-col[vertical-align=top]{-webkit-align-self:flex-start;align-self:flex-start}ons-col[align=bottom],ons-col[vertical-align=bottom]{-webkit-align-self:flex-end;align-self:flex-end}ons-col[align=center],ons-col[vertical-align=center]{-webkit-align-self:center;-moz-align-self:center;-ms-flex-item-align:center;text-align:inherit}.ons-icon{display:inline-block;line-height:inherit;font-style:normal;font-weight:400;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.segment__button .ons-icon{line-height:normal;line-height:initial}:not(ons-toolbar-button):not(ons-action-sheet-button):not(.segment__button)>.ons-icon--ion{line-height:.75em;vertical-align:-25%}.ons-icon[spin]{-webkit-animation:ons-icon-spin 2s infinite linear;animation:ons-icon-spin 2s infinite linear}@-webkit-keyframes ons-icon-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@keyframes ons-icon-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ons-icon[rotate="90"]{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ons-icon[rotate="180"]{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ons-icon[rotate="270"]{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.ons-icon[fixed-width]{width:1.28571429em;text-align:center}.ons-icon--lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.ons-icon--2x{font-size:2em}.ons-icon--3x{font-size:3em}.ons-icon--4x{font-size:4em}.ons-icon--5x{font-size:5em}.ons-icon.fa{font-family:'Font Awesome 5 Brands','Font Awesome 5 Free';font-weight:900}ons-checkbox,ons-input,ons-radio,ons-search-input{display:inline-block;position:relative}ons-input .text-input,ons-search-input .search-input{width:100%;display:inline-block}ons-input .text-input__label:not(.text-input--material__label){display:none}ons-input:not([float]) .text-input--material__label--active{display:none}ons-checkbox[disabled],ons-input[disabled],ons-radio[disabled],ons-search-input[disabled],ons-segment[disabled]{opacity:.5;pointer-events:none}ons-input input.text-input--material::-webkit-input-placeholder{color:transparent}ons-input input.text-input--material::-moz-placeholder{color:transparent}ons-input input.text-input--material:-ms-input-placeholder{color:transparent}@media (orientation:landscape){html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content{padding-right:0}html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content{padding-left:0}}@media (orientation:landscape){html[onsflag-iphonex-landscape] .page__content>ons-progress-bar>.progress-bar{margin-left:-44px;margin-right:-44px;width:calc(100% + 88px)}}@media (orientation:landscape){html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content>.list:not(.list--inset){margin-left:0}html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content>.list:not(.list--inset)>.list-header{padding-left:15px}html[onsflag-iphonex-landscape] ons-splitter-side[side=right] .page__content>.list:not(.list--inset)>.list-item{padding-left:14px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset){margin-right:0}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item--chevron:before{right:16px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item>.list-item__center:last-child{padding-right:6px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item>.list-item__right{padding-right:12px}html[onsflag-iphonex-landscape] ons-splitter-side[side=left] .page__content>.list:not(.list--inset)>.list-item>.list-item--chevron__right{padding-right:30px}}ons-progress-bar{display:block}ons-progress-circular{display:inline-block;width:32px;height:32px}ons-progress-circular>svg.progress-circular{width:100%;height:100%}.ripple{display:block;position:absolute;overflow:hidden;top:0;left:0;right:0;bottom:0;pointer-events:none}.ripple__background{background:rgba(255,255,255,.2);position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.ripple__wave{background:rgba(255,255,255,.2);width:0;height:0;border-radius:50%;position:absolute;top:0;left:0;z-index:0;pointer-events:none}.button--material--flat .ripple__background,.button--material--flat .ripple__wave,ons-list-item .ripple__background,ons-list-item .ripple__wave{background:rgba(189,189,189,.3)}.ripple--light-gray__background,.ripple--light-gray__wave{background:rgba(189,189,189,.3)}.ons-swiper{overflow:hidden;display:block;box-sizing:border-box}.ons-swiper-target{display:-webkit-flex;display:flex;height:100%;z-index:1;-webkit-flex-direction:row;flex-direction:row}.ons-swiper-target--vertical{-webkit-flex-direction:column;flex-direction:column}.ons-swiper-target>*{height:inherit;-webkit-flex-shrink:0;flex-shrink:0;box-sizing:border-box;width:100%;position:relative!important}.ons-swiper-target.active:not(.swiping)>.page:not([shown]){visibility:hidden}.ons-swiper-tabbar .tabbar--material__button:after{display:none}.ons-swiper-blocker{display:block;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none} \ No newline at end of file diff --git a/Server/www/spiderbasic/onsenui.min.js b/Server/www/spiderbasic/onsenui.min.js new file mode 100644 index 0000000..22ae685 --- /dev/null +++ b/Server/www/spiderbasic/onsenui.min.js @@ -0,0 +1,11 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ons=e()}(this,(function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(e){for(var n=1;n=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var a=l(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}(this,n)}}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},f.apply(this,arguments)}function p(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=7;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){var t=(navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/)||[""])[0].replace(/_/g,".");return parseInt(t.split(".")[0])>=7}return!1}},{key:"isIPadOS",value:function(){return!(!/Macintosh/i.test(navigator.userAgent)||!navigator.maxTouchPoints||5!==navigator.maxTouchPoints)}},{key:"isIOSSafari",value:function(){var t=window.navigator,e=t.userAgent;return!(!this.isIOS()||-1===e.indexOf("Safari")||-1===e.indexOf("Version")||t.standalone)}},{key:"isWKWebView",value:function(){var t=/constructor/i.test(v);return!(!(this.isIOS()&&window.webkit&&window.webkit.messageHandlers&&window.indexedDB)||t)}},{key:"isAndroidPhone",value:function(){return/Android/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)}},{key:"isAndroidTablet",value:function(){return/Android/i.test(navigator.userAgent)&&!/Mobile/i.test(navigator.userAgent)}},{key:"isAndroid",value:function(t){return!t&&this._getSelectedPlatform()?"android"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":n(device))||/browser/i.test(device.platform)?/Android/i.test(navigator.userAgent):/Android/i.test(device.platform)}},{key:"isWP",value:function(t){return!t&&this._getSelectedPlatform()?"wp"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":n(device))||/browser/i.test(device.platform)?/Windows Phone|IEMobile|WPDesktop/i.test(navigator.userAgent):/Win32NT|WinCE/i.test(device.platform)}},{key:"isBlackBerry",value:function(t){return!t&&this._getSelectedPlatform()?"blackberry"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":n(device))||/browser/i.test(device.platform)?/BlackBerry|RIM Tablet OS|BB10/i.test(navigator.userAgent):/BlackBerry/i.test(device.platform)}},{key:"isOpera",value:function(t){return!t&&this._getSelectedPlatform()?"opera"===this._getSelectedPlatform():!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0}},{key:"isFirefox",value:function(t){return!t&&this._getSelectedPlatform()?"firefox"===this._getSelectedPlatform():"undefined"!=typeof InstallTrigger}},{key:"isSafari",value:function(t){return!t&&this._getSelectedPlatform()?"safari"===this._getSelectedPlatform():Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||"[object SafariRemoteNotification]"===(!window.safari||safari.pushNotification).toString()}},{key:"isChrome",value:function(t){return!t&&this._getSelectedPlatform()?"chrome"===this._getSelectedPlatform():!(!window.chrome||window.opera||navigator.userAgent.indexOf(" OPR/")>=0||navigator.userAgent.indexOf(" Edge/")>=0)}},{key:"isIE",value:function(t){return!t&&this._getSelectedPlatform()?"ie"===this._getSelectedPlatform():!!document.documentMode}},{key:"isEdge",value:function(t){return!t&&this._getSelectedPlatform()?"edge"===this._getSelectedPlatform():navigator.userAgent.indexOf(" Edge/")>=0}},{key:"getMobileOS",value:function(){return this.isAndroid()?"android":this.isIOS()?"ios":this.isWP()?"wp":"other"}},{key:"getIOSDevice",value:function(){return this.isIPhone()?"iphone":this.isIPad()?"ipad":this.isIPod()?"ipod":"na"}}]),t}(),b=new _;window.customElements&&(window.customElements.forcePolyfill=!0),function(){var t=new function(){},e=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function n(t){var n=e.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!n&&t}function i(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function a(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function o(t,e,n){n=n||new Set;for(var i=t;i;){if(i.nodeType===Node.ELEMENT_NODE){var r=i;e(r);var s=r.localName;if("link"===s&&"import"===r.getAttribute("rel")){if((i=r.import)instanceof Node&&!n.has(i))for(n.add(i),i=i.firstChild;i;i=i.nextSibling)o(i,e,n);i=a(t,r);continue}if("template"===s){i=a(t,r);continue}if(r=r.__CE_shadowRoot)for(r=r.firstChild;r;r=r.nextSibling)o(r,e,n)}i=i.firstChild?i.firstChild:a(t,i)}}function r(t,e,n){t[e]=n}function s(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function l(t,e){t.b=!0,t.c.push(e)}function c(t,e){t.b&&o(e,(function(e){return u(t,e)}))}function u(t,e){if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n0){var o=g(i[a-1],t);if(o)return void(i[a-1]=o)}else n=this.observer,l.push(n),s||(s=!0,e(u));i[a]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=n.get(t);e||n.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=n.get(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:"").split(/\s+/).reduce((function(t,e){return t.concat([Y.hyphenate(e),w(e)])}),[]),n=[],i=function(){var i=t.style[a];(0===e.length||e.some((function(t){return 0===i.indexOf(t)})))&&n.push(i)},a=t.style.length-1;a>=0;a--)i();n.forEach((function(e){return t.style[e]=""})),""===t.getAttribute("style")&&t.removeAttribute("style")};var C=!0,A={quiet:"material--flat",light:"material--flat",outline:"material--flat",cta:"","large--quiet":"material--flat large","large--cta":"large",noborder:"",tappable:""},S={android:function(t){var e=t.tagName.toLowerCase();if(!Y.hasModifier(t,"material")){var n=(t.getAttribute("modifier")||"").trim().split(/\s+/).map((function(t){return Object.prototype.hasOwnProperty.call(A,t)?A[t]:t}));n.unshift("material"),t.setAttribute("modifier",n.join(" ").trim())}-1===["ons-alert-dialog-button","ons-toolbar-button","ons-back-button","ons-button","ons-list-item","ons-fab","ons-speed-dial","ons-speed-dial-item","ons-tab"].indexOf(e)||t.hasAttribute("ripple")||t.querySelector("ons-ripple")||("ons-list-item"===e?t.hasAttribute("tappable")&&(t.setAttribute("ripple",""),t.removeAttribute("tappable")):t.setAttribute("ripple",""))},ios:function(t){Y.removeModifier(t,"material")&&(Y.removeModifier(t,"material--flat")&&Y.addModifier(t,Y.removeModifier(t,"large")?"large--quiet":"quiet"),t.getAttribute("modifier")||t.removeAttribute("modifier")),t.hasAttribute("ripple")&&("ons-list-item"===t.tagName.toLowerCase()&&t.setAttribute("tappable",""),t.removeAttribute("ripple"))}},x={android:!0},P=function(t,e){if(C&&!t.hasAttribute("disable-auto-styling")){var n=b.getMobileOS();if(Object.prototype.hasOwnProperty.call(S,n)&&(Object.prototype.hasOwnProperty.call(x,n)||e))return n}return null},L=function(t,e,n){return P(e,n)?t.split(/\s+/).map((function(t){return Object.prototype.hasOwnProperty.call(A,t)?A[t]:t})).join(" "):t},O={isEnabled:function(){return C},enable:function(){return C=!0},disable:function(){return C=!1},prepare:function(t,e){var n=P(t,e);n&&S[n](t)},mapModifier:L,getPlatform:P,restoreModifier:function(t){if("android"===P(t)){var e=t.getAttribute("modifier")||"",n=L(e,t);if(/(^|\s+)material($|\s+)/i.test(e)||(n="material "+n),n!==e)return t.setAttribute("modifier",n.trim()),!0}return!1}},M=function(){function t(){i(this,t)}return o(t,null,[{key:"diff",value:function(e,n){e=a((""+e).trim()),n=a((""+n).trim());var i=Object.keys(e).reduce((function(t,e){return n[e]||t.push(e),t}),[]);return{added:Object.keys(n).reduce((function(t,n){return e[n]||t.push(n),t}),[]),removed:i};function a(e){var n={};return t.split(e).forEach((function(t){return n[t]=t})),n}}},{key:"applyDiffToClassList",value:function(t,e,n){t.added.map((function(t){return n.replace(/\*/g,t)})).forEach((function(t){return t.split(/\s+/).forEach((function(t){return e.add(t)}))})),t.removed.map((function(t){return n.replace(/\*/g,t)})).forEach((function(t){return t.split(/\s+/).forEach((function(t){return e.remove(t)}))}))}},{key:"applyDiffToElement",value:function(e,n,i){Object.keys(i).forEach((function(a){for(var o=!a||Y.match(n,a)?[n]:Array.prototype.filter.call(n.querySelectorAll(a),(function(t){return!Y.findParent(t,n.tagName,(function(t){return t===n}))})),r=0;r0;)if(n=i,i=z(t),t=t.slice(i.length,t.length).trim(),":"===i&&(!s||!n||","===n)||","===i&&s||":"!==i&&","!==i&&n&&","!==n&&":"!==n)H(i,t,o);else if(":"===i&&s&&n){if(!a(n=R(n)?D(n):n))throw new Error("Invalid key token '"+n+"' at position 0 in string: '"+o+"'");e=n,s=!1}else","===i&&!s&&n&&(r[e]=q(n,t,o),s=!0);return i&&(r[e]=q(i,t,o)),r},j=function(t){for(var e,n,i=t=t.trim(),a=[];t.length>0;)e=n,n=z(t),t=t.slice(n.length,t.length).trim(),","!==n||e&&","!==e?","===n&&a.push(q(e,t,i)):H(n,t,i);return n&&(","!==n?a.push(q(n,t,i)):H(n,t,i)),a},V={},W="[Onsen UI]";V.globals={fabOffset:0,errorPrefix:W,supportsPassive:!1},b._runOnActualPlatform((function(){V.globals.actualMobileOS=b.getMobileOS(),V.globals.isWKWebView=b.isWKWebView()}));try{var X=Object.defineProperty({},"passive",{get:function(){V.globals.supportsPassive=!0}});window.addEventListener("testPassive",null,X),window.removeEventListener("testPassive",null,X)}catch(t){}V.addEventListener=function(t,e,n,i,a){t.addEventListener(e,n,V.globals.supportsPassive?i:(i||{}).capture)},V.removeEventListener=function(t,e,n,i,a){t.removeEventListener(e,n,V.globals.supportsPassive?i:(i||{}).capture)},V.prepareQuery=function(t){return t instanceof Function?t:function(e){return V.match(e,t)}},V.match=function(t,e){return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector).call(t,e)},V.findChild=function(t,e){for(var n=V.prepareQuery(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:{},e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("."),n=document.createElement(e.shift()||"div");return e.length&&(n.className=e.join(" ")),E(n,t),n},V.createElement=function(t){var e=document.createElement("div");t instanceof DocumentFragment?e.appendChild(document.importNode(t,!0)):e.innerHTML=t.trim(),e.children.length>1&&V.throw("HTML template must contain a single root element");var n=e.children[0];return e.children[0].remove(),n},V.createFragment=function(t){var e=document.createElement("template");return e.innerHTML=t,document.importNode(e.content,!0)},V.extend=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{};try{var i=JSON.parse(""+t);if("object"===n(i)&&null!==i)return i}catch(t){return e}return e},V.findFromPath=function(t){t=t.split(".");for(var e,n=window;e=t.shift();)n=n[e];return n},V.getTopPage=function(t){return t&&("ons-page"===t.tagName.toLowerCase()?t:t.topPage)||null},V.findToolbarPage=function(t){var e=V.getTopPage(t);if(e){if(e._canAnimateToolbar())return e;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});return Object.keys(n).forEach((function(t){i[t]=n[t]})),t.dispatchEvent(i),i},V.hasModifier=function(t,e){return!!t.hasAttribute("modifier")&&RegExp("(^|\\s+)".concat(e,"($|\\s+)"),"i").test(t.getAttribute("modifier"))},V.addModifier=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.autoStyle&&(e=O.mapModifier(e,t,n.forceAutoStyle)),!V.hasModifier(t,e)&&(t.setAttribute("modifier",((t.getAttribute("modifier")||"")+" "+e).trim()),!0)},V.removeModifier=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n.autoStyle&&(e=O.mapModifier(e,t,n.forceAutoStyle)),!t.getAttribute("modifier")||!V.hasModifier(t,e))return!1;var i=t.getAttribute("modifier").split(/\s+/).filter((function(t){return t&&t!==e}));return i.length?t.setAttribute("modifier",i.join(" ")):t.removeAttribute("modifier"),!0},V.toggleModifier=function(){var t=arguments.length>2?arguments.length<=2?void 0:arguments[2]:{},e="boolean"==typeof t?t:t.force;("boolean"==typeof e?e:!V.hasModifier.apply(V,arguments))?V.addModifier.apply(V,arguments):V.removeModifier.apply(V,arguments)},V.restoreClass=function(t,e,n){e.split(/\s+/).forEach((function(e){return""!==e&&!t.classList.contains(e)&&t.classList.add(e)})),t.hasAttribute("modifier")&&M.refresh(t,n)},V.updateParentPosition=function(t){!t._parentUpdated&&t.parentElement&&("static"===window.getComputedStyle(t.parentElement).getPropertyValue("position")&&(t.parentElement.style.position="relative"),t._parentUpdated=!0)},V.toggleAttribute=function(t,e,n){n?t.setAttribute(e,"boolean"==typeof n?"":n):t.removeAttribute(e)},V.bindListeners=function(t,e){e.forEach((function(e){var n=e.replace(/^_[a-z]/,"_bound"+e[1].toUpperCase());t[n]=t[n]||t[e].bind(t)}))},V.each=function(t,e){return Object.keys(t).forEach((function(n){return e(n,t[n])}))},V.updateRipple=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};void 0===e&&(e=t.hasAttribute("ripple"));var i=V.findChild(t,"ons-ripple");if(e){if(!i){var a=document.createElement("ons-ripple");Object.keys(n).forEach((function(t){return a.setAttribute(t,n[t])})),t.insertBefore(a,t.firstChild)}}else i&&i.remove()},V.animationOptionsParse=function(t){if(t=t.trim(),N(t))return F(D(t));if(B(t))return j(D(t));throw new Error("Provided string must be object or array like: "+t)},V.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},V.defer=function(){var t={};return t.promise=new Promise((function(e,n){t.resolve=e,t.reject=n})),t},V.warn=function(){if(!Q.config.warningsDisabled){for(var t,e=arguments.length,n=new Array(e),i=0;i2&&void 0!==arguments[2]&&arguments[2];"string"!=typeof t?G("Variable name must be a string"):"string"!=typeof e&&"function"!=typeof e?G("Variable value must be a string or a function"):Object.prototype.hasOwnProperty.call(this._variables,t)&&!n&&G('"'.concat(t,'" is already defined')),this._variables[t]=e},getVariable:function(t){return Object.prototype.hasOwnProperty.call(this._variables,t)?this._variables[t]:null},removeVariable:function(t){delete this._variables[t]},getAllVariables:function(){return this._variables},_parsePart:function(t){var e,n=!1,i=0,a=[];0===t.length&&G("Unable to parse empty string");for(var o=0;o0&&a.push(t.substring(i,o)),i=o,n=!0;else if("}"===e){n||G("} must be preceeded by ${"),t.substring(i,o+1).length>0&&a.push(t.substring(i,o+1)),i=o+1,n=!1}}return n&&G("Unterminated interpolation"),a.push(t.substring(i,t.length)),a},_replaceToken:function(t){var e=t.match(/^\${(.*?)}$/);if(!e)return t;var n=e[1].trim(),i=this.getVariable(n);if(null!==i){if("string"==typeof i)return i;var a=i();return"string"!=typeof a&&G("Must return a string"),a}G('Variable "'.concat(n,'" does not exist'))},_replaceTokens:function(t){return t.map(this._replaceToken.bind(this))},_parseExpression:function(t){return t.split(",").map((function(t){return t.trim()})).map(this._parsePart.bind(this)).map(this._replaceTokens.bind(this)).map((function(t){return t.join("")}))},evaluate:function(t){return t?this._parseExpression(t):[]}};K.defineVariable("mobileOS",b.getMobileOS()),K.defineVariable("iOSDevice",b.getIOSDevice()),K.defineVariable("runtime",(function(){return b.isWebView()?"cordova":"browser"}));var J={config:{autoStatusBarFill:!0,animationsDisabled:!1,warningsDisabled:!1}};J.nullElement=window.document.createElement("div"),J.isEnabledAutoStatusBarFill=function(){return!!J.config.autoStatusBarFill},J.normalizePageHTML=function(t){return(""+t).trim()},J.waitDOMContentLoaded=function(t){if("loading"===window.document.readyState||"uninitialized"==window.document.readyState){window.document.addEventListener("DOMContentLoaded",(function e(){t(),window.document.removeEventListener("DOMContentLoaded",e)}))}else setImmediate(t)},J.autoStatusBarFill=function(t){var e=function e(){J.shouldFillStatusBar()&&t(),document.removeEventListener("deviceready",e)};"object"===("undefined"==typeof device?"undefined":n(device))?document.addEventListener("deviceready",e):-1===["complete","interactive"].indexOf(document.readyState)?J.waitDOMContentLoaded(e):e()},J.shouldFillStatusBar=function(){return J.isEnabledAutoStatusBarFill()&&(b.isWebView()&&(b.isIOS7above()||b.isIPadOS())&&!b.isIPhoneX()||document.body.querySelector(".ons-status-bar-mock.ios"))},J.templateStore={_storage:{},get:function(t){return J.templateStore._storage[t]||null},set:function(t,e){J.templateStore._storage[t]=e}},J.getTemplateHTMLAsync=function(t){return new Promise((function(e,n){J.waitDOMContentLoaded((function(){var i=J.templateStore.get(t);if(i){if(i instanceof DocumentFragment)return e(i);var a="string"==typeof i?i:i[1];return e(J.normalizePageHTML(a))}var o=window.document.getElementById(t);if(o){var r=o.textContent||o.content;return e(r)}var s=new XMLHttpRequest;s.open("GET",t,!0),s.onload=function(){var i=s.responseText;if(s.status>=400&&s.status<600)404===s.status?n(404):n(i);else{var a=Y.createFragment(i);Y.arrayFrom(a.querySelectorAll("script")).forEach((function(t){var e=document.createElement("script");e.type=t.type||"text/javascript",e.appendChild(document.createTextNode(t.text||t.textContent||t.innerHTML)),t.parentNode.replaceChild(e,t)})),J.templateStore.set(t,a),e(a)}},s.onerror=function(){Y.throw("Page template not found: ".concat(t))},s.send(null)}))}))},J.getPageHTMLAsync=function(t){var e=K.evaluate(t);return function t(n){return"string"!=typeof n?Promise.reject("Must specify a page."):J.getTemplateHTMLAsync(n).catch((function(n){return 0===e.length?Promise.reject(n):t(e.shift())}))}(e.shift())};var Q=J,Z=function(){function t(e){i(this,t),this._animators=e.animators,this._baseClass=e.baseClass,this._baseClassName=e.baseClassName||e.baseClass.name,this._animation=e.defaultAnimation||"default",this._animationOptions=e.defaultAnimationOptions||{},this._animators[this._animation]||Y.throw("No such animation: "+this._animation)}return o(t,[{key:"setAnimationOptions",value:function(t){this._animationOptions=t}},{key:"newAnimator",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=null;if(t.animation instanceof this._baseClass)return t.animation;var i=null;if("string"==typeof t.animation&&(i=this._animators[t.animation]),!i&&e)n=e;else{i=i||this._animators[this._animation];var a=Y.extend({},this._animationOptions,t.animationOptions||{},Q.config.animationsDisabled?{duration:0,delay:0}:{});"function"==typeof(n=new i(a))&&(n=new n(a))}return n instanceof this._baseClass||Y.throw('"animator" is not an instance of '.concat(this._baseClassName)),n}}],[{key:"parseAnimationOptionsString",value:function(t){try{if("string"==typeof t){var e=Y.animationOptionsParse(t);if("object"===n(e)&&null!==e)return e;console.error('"animation-options" attribute must be a JSON object string: '+t)}return{}}catch(e){return console.error('"animation-options" attribute must be a JSON object string: '+t),{}}}}]),t}(),tt={_ready:!1,_domContentLoaded:!1,_onDOMContentLoaded:function(){tt._domContentLoaded=!0,b.isWebView()?window.document.addEventListener("deviceready",(function(){tt._ready=!0}),!1):tt._ready=!0},addBackButtonListener:function(t){if(!this._domContentLoaded)throw new Error("This method is available after DOMContentLoaded");this._ready?window.document.addEventListener("backbutton",t,!1):window.document.addEventListener("deviceready",(function(){window.document.addEventListener("backbutton",t,!1)}))},removeBackButtonListener:function(t){if(!this._domContentLoaded)throw new Error("This method is available after DOMContentLoaded");this._ready?window.document.removeEventListener("backbutton",t,!1):window.document.addEventListener("deviceready",(function(){window.document.removeEventListener("backbutton",t,!1)}))}};window.addEventListener("DOMContentLoaded",(function(){return tt._onDOMContentLoaded()}),!1);var et,nt={_store:{},_genId:(et=0,function(){return et++}),set:function(t,e){t.dataset.deviceBackButtonHandlerId&&this.remove(t);var n=t.dataset.deviceBackButtonHandlerId=nt._genId();this._store[n]=e},remove:function(t){t.dataset.deviceBackButtonHandlerId&&(delete this._store[t.dataset.deviceBackButtonHandlerId],delete t.dataset.deviceBackButtonHandlerId)},get:function(t){if(t.dataset.deviceBackButtonHandlerId){var e=t.dataset.deviceBackButtonHandlerId;if(!this._store[e])throw new Error;return this._store[e]}},has:function(t){if(!t.dataset)return!1;var e=t.dataset.deviceBackButtonHandlerId;return!!this._store[e]}},it=function(){function t(){i(this,t),this._isEnabled=!1,this._boundCallback=this._callback.bind(this)}return o(t,[{key:"enable",value:function(){this._isEnabled||(tt.addBackButtonListener(this._boundCallback),this._isEnabled=!0)}},{key:"disable",value:function(){this._isEnabled&&(tt.removeBackButtonListener(this._boundCallback),this._isEnabled=!1)}},{key:"fireDeviceBackButtonEvent",value:function(){var t=document.createEvent("Event");t.initEvent("backbutton",!0,!0),document.dispatchEvent(t)}},{key:"_callback",value:function(){this._dispatchDeviceBackButtonEvent()}},{key:"createHandler",value:function(t,e){if(!(t instanceof HTMLElement))throw new Error("element must be an instance of HTMLElement");if(!(e instanceof Function))throw new Error("callback must be an instance of Function");var n={_callback:e,_element:t,disable:function(){nt.remove(t)},setListener:function(t){this._callback=t},enable:function(){nt.set(t,this)},isEnabled:function(){return nt.get(t)===this},destroy:function(){nt.remove(t),this._callback=this._element=null}};return n.enable(),n}},{key:"_dispatchDeviceBackButtonEvent",value:function(){var t=this._captureTree(),e=this._findHandlerLeafElement(t),n=nt.get(e);n._callback(function t(e){return{_element:e,callParentHandler:function(){for(var e=this._element.parentNode;e;){if(n=nt.get(e))return n._callback(t(e));e=e.parentNode}}}}(e))}},{key:"_captureTree",value:function(){return function e(n){var i={element:n,children:Array.prototype.concat.apply([],t(n.children).map((function(t){if("none"===t.style.display||!1===t._isShown)return[];if(0===t.children.length&&!nt.has(t))return[];var n=e(t);return 0!==n.children.length||nt.has(n.element)?[n]:[]})))};if(!nt.has(i.element))for(var a=0;ai?t:e;throw new Error("Capturing backbutton-handler is failure.")}),null)}(t)}}]),t}(),at=new it;Q.AnimatorFactory=Z,Q.ModifierUtil=M,Q.dbbDispatcher=at;var ot,rt,st={};st.capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},st.buildTransitionValue=function(t){return t.property=t.property||"all",t.duration=t.duration||.4,t.timing=t.timing||"linear",t.property.split(/ +/).map((function(e){return e+" "+t.duration+"s "+t.timing})).join(", ")},st.onceOnTransitionEnd=function(t,e){if(!t)return function(){};var n=function(){st._transitionEndEvents.forEach((function(e){t.removeEventListener(e,i,!1)}))},i=function(i){t==i.target&&(i.stopPropagation(),n(),e())};return st._transitionEndEvents.forEach((function(e){t.addEventListener(e,i,!1)})),n},st._transitionEndEvents="ontransitionend"in window?["transitionend"]:"onwebkittransitionend"in window?["webkitTransitionEnd"]:"webkit"===st.vendorPrefix||"o"===st.vendorPrefix||"moz"===st.vendorPrefix||"ms"===st.vendorPrefix?[st.vendorPrefix+"TransitionEnd","transitionend"]:[],st._cssPropertyDict=function(){for(var t=window.getComputedStyle(document.documentElement,""),e={},n="A".charCodeAt(0),i="z".charCodeAt(0),a=function(t){return t.substr(1).toUpperCase()},o=0;o=r.charCodeAt(0)&&"cssText"!==r&&"parentText"!==r&&(e[r]=!0)}return e}(),st.hasCssProperty=function(t){return t in st._cssPropertyDict},st.vendorPrefix=(ot=window.getComputedStyle(document.documentElement,""),(Array.prototype.slice.call(ot).join("").match(/-(moz|webkit|ms)-/)||""===ot.OLink&&["","o"])[1]),st.forceLayoutAtOnce=function(t,e){this.batchImmediate((function(){t.forEach((function(t){t.offsetHeight})),e()}))},st.batchImmediate=(rt=[],function(t){0===rt.length&&setImmediate((function(){var t=rt.slice(0);rt=[],t.forEach((function(t){t()}))})),rt.push(t)}),st.batchAnimationFrame=function(){var t=[],e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};return function(n){0===t.length&&e((function(){var e=t.slice(0);t=[],e.forEach((function(t){t()}))})),t.push(n)}}(),st.transitionPropertyName=function(){if(st.hasCssProperty("transitionDuration"))return"transition";if(st.hasCssProperty(st.vendorPrefix+"TransitionDuration"))return st.vendorPrefix+"Transition";throw new Error("Invalid state")}();var lt,ct,ut,dt,ht=function t(e,n){if(!(this instanceof t))return new t(e,n);if(e instanceof HTMLElement)this.elements=[e];else{if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("First argument must be an array or an instance of HTMLElement.");this.elements=e}this.defaults=n,this.transitionQueue=[],this.lastStyleAttributeDict=[]};ht.prototype={transitionQueue:void 0,elements:void 0,defaults:void 0,play:function(t){return"function"==typeof t&&this.transitionQueue.push((function(e){t(),e()})),this.startAnimation(),this},default:function(t,e,n){function i(t,e,n){return void 0!==t.duration&&(e=t.duration),void 0!==t.timing&&(n=t.timing),{css:t.css||t,duration:e,timing:n}}return this.saveStyle().queue(i(t,0,this.defaults.timing)).wait(void 0===n?this.defaults.delay:n).queue(i(e,this.defaults.duration,this.defaults.timing)).restoreStyle()},queue:function(t,e){var n=this.transitionQueue;if(t&&e&&(e.css=t,t=new ht.Transition(e)),t instanceof Function||t instanceof ht.Transition||(t=t.css?new ht.Transition(t):new ht.Transition({css:t})),t instanceof Function)n.push(t);else{if(!(t instanceof ht.Transition))throw new Error("Invalid arguments");n.push(t.build())}return this},wait:function(t){return t>0&&this.transitionQueue.push((function(e){setTimeout(e,1e3*t)})),this},saveStyle:function(){return this.transitionQueue.push(function(t){this.elements.forEach(function(t,e){for(var n=this.lastStyleAttributeDict[e]={},i=0;i0){var i=t.transition||"all "+t.duration+"s "+(t.timing||"linear");this.transitionQueue.push((function(a){var o,r=this.elements,s=function(){r.forEach((function(t){t.style[n]=""}))},l=st.onceOnTransitionEnd(r[0],(function(){clearTimeout(o),s(),a()}));o=setTimeout((function(){l(),s(),a()}),1e3*t.duration*1.4),r.forEach((function(t,a){var o,r=e.lastStyleAttributeDict[a];if(!r)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");e.lastStyleAttributeDict[a]=void 0;for(var s=0,l=t.style.length;s0){var e=st.buildTransitionValue(this.options),n=this;return function(i){var a,o=this.elements,r=1e3*n.options.duration*1.4,s=st.onceOnTransitionEnd(o[0],(function(){clearTimeout(a),i()}));a=setTimeout((function(){s(),i()}),r),o.forEach((function(n){n.style[st.transitionPropertyName]=e,Object.keys(t).forEach((function(e){n.style[e]=t[e]}))}))}}if(this.options.duration<=0)return function(e){var n=this.elements;n.forEach((function(e){e.style[st.transitionPropertyName]="",Object.keys(t).forEach((function(n){e.style[n]=t[n]}))})),n.length>0?st.forceLayoutAtOnce(n,(function(){st.batchAnimationFrame(e)})):st.batchAnimationFrame(e)}}};var ft=function t(e,n){return new t.Instance(e,n||{})};ft.defaults={behavior:{touchAction:"pan-y",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ft.DOCUMENT=document,ft.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,ft.HAS_TOUCHEVENTS="ontouchstart"in window,ft.IS_MOBILE=/mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),ft.NO_MOUSEEVENTS=ft.HAS_TOUCHEVENTS&&ft.IS_MOBILE||ft.HAS_POINTEREVENTS,ft.CALCULATE_INTERVAL=25;var pt,mt,gt,vt,_t={},bt=ft.DIRECTION_DOWN="down",yt=ft.DIRECTION_LEFT="left",kt=ft.DIRECTION_UP="up",wt=ft.DIRECTION_RIGHT="right",Et=ft.POINTER_MOUSE="mouse",Ct=ft.POINTER_TOUCH="touch",At=ft.POINTER_PEN="pen",St=ft.EVENT_START="start",xt=ft.EVENT_MOVE="move",Pt=ft.EVENT_END="end",Lt=ft.EVENT_RELEASE="release",Ot=ft.EVENT_TOUCH="touch";function Mt(t){gt.set(t,!0)}function Tt(t){var e=vt.get(t,[])||[];vt.delete(t),e.forEach((function(t){return t()}))}function It(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};(void 0===gt&&(gt=new WeakMap,vt=new WeakMap),function(t,e){vt.has(t)||vt.set(t,[]),vt.get(t).push(e)}(t,e),function(t){return t.childNodes.length>0&&Mt(t),gt.has(t)}(t))?Tt(t):(new MutationObserver((function(e){Mt(t),Tt(t)})).observe(t,{childList:!0,characterData:!0}),setImmediate((function(){Mt(t),Tt(t)})))}ft.READY=!1,ft.plugins=ft.plugins||{},ft.gestures=ft.gestures||{},ct=ft.utils={extend:function(t,e,n){for(var i in e)!Object.prototype.hasOwnProperty.call(e,i)||void 0!==t[i]&&n||(t[i]=e[i]);return t},on:function(t,e,n,i){Y.addEventListener(t,e,n,i,!0)},off:function(t,e,n,i){Y.removeEventListener(t,e,n,i,!0)},each:function(t,e,n){var i,a;if("forEach"in t)t.forEach(e,n);else if(void 0!==t.length){for(i=0,a=t.length;i-1},inArray:function(t,e,n){if(n){for(var i=0,a=t.length;i=Math.abs(t.clientY-e.clientY)?t.clientX-e.clientX>0?yt:wt:t.clientY-e.clientY>0?kt:bt},getDistance:function(t,e){var n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==kt||t==bt},setPrefixedCss:function(t,e,n,i){var a=["","Webkit","Moz","O","ms"];e=ct.toCamelCase(e);for(var o=0;o0&&this.started&&(r=xt),this.started=!0;var c=this.collectEventData(n,r,a,t);return e!=Pt&&i.call(ut,c),s&&(c.changedLength=l,c.eventType=s,i.call(ut,c),c.eventType=r,delete c.changedLength),r==Pt&&(i.call(ut,c),this.started=!1),r},determineEventTypes:function(){var t;return t=ft.HAS_POINTEREVENTS?window.PointerEvent?["pointerdown","pointermove","pointerup pointercancel lostpointercapture"]:["MSPointerDown","MSPointerMove","MSPointerUp MSPointerCancel MSLostPointerCapture"]:ft.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],_t[St]=t[0],_t[xt]=t[1],_t[Pt]=t[2],_t},getTouchList:function(t,e){if(ft.HAS_POINTEREVENTS)return dt.getTouchList();if(t.touches){if(e==xt)return t.touches;var n=[],i=[].concat(ct.toArray(t.touches),ct.toArray(t.changedTouches)),a=[];return ct.each(i,(function(t){-1===ct.inArray(n,t.identifier)&&a.push(t),n.push(t.identifier)})),a}return t.identifier=1,[t]},collectEventData:function(t,e,n,i){var a=Ct;return ct.inStr(i.type,"mouse")||dt.matchType(Et,i)?a=Et:dt.matchType(At,i)&&(a=At),{center:ct.getCenter(n),timeStamp:Date.now(),target:i.target,touches:n,eventType:e,pointerType:a,srcEvent:i,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return ut.stopDetect()}}}},dt=ft.PointerEvent={pointers:{},getTouchList:function(){var t=[];return ct.each(this.pointers,(function(e){t.push(e)})),t},updatePointer:function(t,e){t==Pt||t!=Pt&&1!==e.buttons?delete this.pointers[e.pointerId]:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e)},matchType:function(t,e){if(!e.pointerType)return!1;var n=e.pointerType,i={};return i[Et]=n===(e.MSPOINTER_TYPE_MOUSE||Et),i[Ct]=n===(e.MSPOINTER_TYPE_TOUCH||Ct),i[At]=n===(e.MSPOINTER_TYPE_PEN||At),i[t]},reset:function(){this.pointers={}}},ut=ft.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:ct.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);var e=this.current.inst,n=e.options;return ct.each(this.gestures,(function(i){!this.stopped&&e.enabled&&n[i.name]&&i.handler.call(i,t,e)}),this),this.current&&(this.current.lastEvent=t),t.eventType==Pt&&this.stopDetect(),t}},stopDetect:function(){this.previous=ct.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,n,i,a){var o=this.current,r=!1,s=o.lastCalcEvent,l=o.lastCalcData;s&&t.timeStamp-s.timeStamp>ft.CALCULATE_INTERVAL&&(e=s.center,n=t.timeStamp-s.timeStamp,i=t.center.clientX-s.center.clientX,a=t.center.clientY-s.center.clientY,r=!0),t.eventType!=Ot&&t.eventType!=Lt||(o.futureCalcEvent=t),o.lastCalcEvent&&!r||(l.velocity=ct.getVelocity(n,i,a),l.angle=ct.getAngle(e,t.center),l.direction=ct.getDirection(e,t.center),o.lastCalcEvent=o.futureCalcEvent||t,o.futureCalcEvent=t),t.velocityX=l.velocity.x,t.velocityY=l.velocity.y,t.interimAngle=l.angle,t.interimDirection=l.direction},extendEventData:function(t){var e=this.current,n=e.startEvent,i=e.lastEvent||n;t.eventType!=Ot&&t.eventType!=Lt||(n.touches=[],ct.each(t.touches,(function(t){n.touches.push({clientX:t.clientX,clientY:t.clientY})})));var a=t.timeStamp-n.timeStamp,o=t.center.clientX-n.center.clientX,r=t.center.clientY-n.center.clientY;return this.getCalculatedData(t,i.center,a,o,r),ct.extend(t,{startEvent:n,deltaTime:a,deltaX:o,deltaY:r,distance:ct.getDistance(n.center,t.center),angle:ct.getAngle(n.center,t.center),direction:ct.getDirection(n.center,t.center),scale:ct.getScale(n.touches,t.touches),rotation:ct.getRotation(n.touches,t.touches)}),t},register:function(t){var e=t.defaults||{};return void 0===e[t.name]&&(e[t.name]=!0),ct.extend(ft.defaults,e,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort((function(t,e){return t.indexe.index?1:0})),this.gestures}},ft.Instance=function(t,e){var n=this,i=e&&e.passive?{passive:!0}:void 0;!function(t){ft.READY||(lt.determineEventTypes(),ct.each(ft.gestures,(function(t){ut.register(t)})),lt.onTouch(ft.DOCUMENT,xt,ut.detect,t),lt.onTouch(ft.DOCUMENT,Pt,ut.detect,t),ft.READY=!0)}(i),this.element=t,this.enabled=!0,ct.each(e,(function(t,n){delete e[n],e[ct.toCamelCase(n)]=t})),this.options=ct.extend(ct.extend({},ft.defaults),e||{}),this.options.listenerOptions=i,this.options.behavior&&ct.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=lt.onTouch(t,St,(function(t){n.enabled&&t.eventType==St?ut.startDetect(n,t):t.eventType==Ot&&ut.detect(t)}),i),this.eventHandlers=[]},ft.Instance.prototype={on:function(t,e,n){var i=this;return lt.on(i.element,t,e,Y.extend({},i.options.listenerOptions,n),(function(t){i.eventHandlers.push({gesture:t,handler:e})})),i},off:function(t,e,n){var i=this;return lt.off(i.element,t,e,Y.extend({},i.options.listenerOptions,n),(function(t){var n=ct.inArray(i.eventHandlers,{gesture:t,handler:e},!0);n>=0&&i.eventHandlers.splice(n,1)})),i},trigger:function(t,e){e||(e={});var n=ft.DOCUMENT.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e;var i=this.element;return ct.hasParent(e.target,i)&&(i=e.target),i.dispatchEvent(n),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(ct.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)ct.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],lt.off(this.element,_t[St],this.eventStartHandler),null}},pt="drag",mt=!1,ft.gestures.Drag={name:pt,index:50,handler:function(t,e){var n=ut.current;if(!(e.options.dragMaxTouches>0&&t.touches.length>e.options.dragMaxTouches))switch(t.eventType){case St:mt=!1;break;case xt:if(t.distance0)){var a=Math.abs(e.options.dragMinDistance/t.distance);i.pageX+=t.deltaX*a,i.pageY+=t.deltaY*a,i.clientX+=t.deltaX*a,i.clientY+=t.deltaY*a,t=ut.extendEventData(t)}(n.lastEvent.dragLockToAxis||e.options.dragLockToAxis&&e.options.dragLockMinDistance<=t.distance)&&(t.dragLockToAxis=!0);var o=n.lastEvent.direction;t.dragLockToAxis&&o!==t.direction&&(ct.isVertical(o)?t.direction=t.deltaY<0?kt:bt:t.direction=t.deltaX<0?yt:wt),mt||(e.trigger(pt+"start",t),mt=!0),e.trigger(pt,t),e.trigger(pt+t.direction,t);var r=ct.isVertical(t.direction);(e.options.dragBlockVertical&&r||e.options.dragBlockHorizontal&&!r)&&t.preventDefault();break;case Lt:mt&&t.changedLength<=e.options.dragMaxTouches&&(e.trigger(pt+"end",t),mt=!1);break;case Pt:mt=!1}},defaults:{dragMinDistance:10,dragDistanceCorrection:!0,dragMaxTouches:1,dragBlockHorizontal:!1,dragBlockVertical:!1,dragLockToAxis:!1,dragLockMinDistance:25}},ft.gestures.Gesture={name:"gesture",index:1337,handler:function(t,e){e.trigger(this.name,t)}},function(t){var e;ft.gestures.Hold={name:t,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:function(n,i){var a=i.options,o=ut.current;switch(n.eventType){case St:clearTimeout(e),o.name=t,e=setTimeout((function(){o&&o.name==t&&i.trigger(t,n)}),a.holdTimeout);break;case xt:n.distance>a.holdThreshold&&clearTimeout(e);break;case Lt:clearTimeout(e)}}}}("hold"),ft.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==Lt&&e.trigger(this.name,t)}},ft.gestures.Swipe={name:"swipe",index:40,defaults:{swipeMinTouches:1,swipeMaxTouches:1,swipeVelocityX:.6,swipeVelocityY:.6},handler:function(t,e){if(t.eventType==Lt){var n=t.touches.length,i=e.options;if(ni.swipeMaxTouches)return;(t.velocityX>i.swipeVelocityX||t.velocityY>i.swipeVelocityY)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}}},function(t){var e=!1;ft.gestures.Tap={name:t,index:100,handler:function(n,i){var a,o,r=i.options,s=ut.current,l=ut.previous;switch(n.eventType){case St:e=!1;break;case xt:e=e||n.distance>r.tapMaxDistance;break;case Pt:!ct.inStr(n.srcEvent.type,"cancel")&&n.deltaTimei.options.transformMinRotation&&i.trigger("rotate",n),a>i.options.transformMinScale&&(i.trigger("pinch",n),i.trigger("pinch"+(n.scale<1?"in":"out"),n));break;case Lt:e&&n.changedLength<2&&(i.trigger(t+"end",n),e=!1)}}}}("transform");var Dt,Nt=new(function(){function t(){i(this,t),this.queue=[]}return o(t,[{key:"add",value:function(t,e){var n=this;this.queue.push(t),1===this.queue.length&&setImmediate(this.queue[0]),e.then((function(){n.queue.shift(),n.queue.length>0&&setTimeout(n.queue[0],1e3/30)}))}}]),t}()),Bt=function(t,e){["id","class","animation"].forEach((function(n){return Object.prototype.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n])})),e.modifier&&Y.addModifier(t,e.modifier)},Rt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n=e({},n),"string"==typeof t?n.message=t:n=t,n&&(n.message||n.messageHTML)||Y.throw("Notifications must contain a message"),(Object.prototype.hasOwnProperty.call(n,"buttonLabels")||Object.prototype.hasOwnProperty.call(n,"buttonLabel"))&&(n.buttonLabels=n.buttonLabels||n.buttonLabel,Array.isArray(n.buttonLabels)||(n.buttonLabels=[n.buttonLabels||""])),Y.extend({compile:function(t){return t},callback:function(t){return t},animation:"default",cancelable:!1,primaryButtonIndex:(n.buttonLabels||i.buttonLabels||[]).length-1},i,n)},Ht={_createAlertDialog:function(){for(var t=arguments.length,e=new Array(t),n=0;n\n '));var a="";n.buttonLabels.forEach((function(t,e){a+='\n \n ').concat(t,"\n \n ")}));var o={},r=function(){o.dialog.onDialogCancel&&o.dialog.removeEventListener("dialogcancel",o.dialog.onDialogCancel),Object.keys(o).forEach((function(t){return delete o[t]})),o=null,n.destroy instanceof Function&&n.destroy()};o.dialog=document.createElement("ons-alert-dialog"),o.dialog.innerHTML='\n
\n
\n
\n
\n ').concat(n.title||"",'\n
\n
\n ').concat(n.message||n.messageHTML,"\n ").concat(i,'\n
\n
\n ').concat(a,"\n
\n
\n
\n "),It(o.dialog),Bt(o.dialog,n),n.isPrompt&&(o.input=o.dialog.querySelector(".text-input"),n.submitOnEnter&&(o.input.onkeypress=function(e){13===e.keyCode&&o.dialog.hide().then((function(){if(o){var e=o.input.value;r(),n.callback(e),t(e)}}))})),o.footer=o.dialog.querySelector(".alert-dialog-footer"),Y.arrayFrom(o.dialog.querySelectorAll(".alert-dialog-button")).forEach((function(e,i){e.onclick=function(){o.dialog.hide().then((function(){if(o){var e=i;n.isPrompt&&(e=i===n.primaryButtonIndex?o.input.value:null),o.dialog.remove(),r(),n.callback(e),t(e)}}))},o.footer.appendChild(e)})),n.cancelable&&(o.dialog.cancelable=!0,o.dialog.onDialogCancel=function(){setImmediate((function(){o.dialog.remove(),r()}));var e=n.isPrompt?null:-1;n.callback(e),t(e)},o.dialog.addEventListener("dialogcancel",o.dialog.onDialogCancel,!1)),document.body.appendChild(o.dialog),n.compile(o.dialog),setImmediate((function(){o.dialog.show().then((function(){if(o.input&&n.isPrompt&&n.autofocus){var t=o.input.value.length;o.input.focus(),o.input.type&&["text","search","url","tel","password"].includes(o.input.type)&&o.input.setSelectionRange(t,t)}}))}))}))},alert:function(t,e){return Ht._createAlertDialog(t,e,{buttonLabels:["OK"],title:"Alert"})},confirm:function(t,e){return Ht._createAlertDialog(t,e,{buttonLabels:["Cancel","OK"],title:"Confirm"})},prompt:function(t,e){return Ht._createAlertDialog(t,e,{buttonLabels:["OK"],title:"Alert",isPrompt:!0,autofocus:!0,submitOnEnter:!0})},toast:function(t,e){var n=new Promise((function(i){Y.checkMissingImport("Toast"),e=Rt(t,e,{timeout:0,force:!1});var a=Y.createElement("\n \n ".concat(e.message,"\n ").concat(e.buttonLabels?""):"","\n \n "));Bt(a,e);var o=a.hide.bind(a),r=function(t){a&&o().then((function(){a&&(a.remove(),a=null,e.callback(t),i(t))}))};e.buttonLabels&&(Y.findChild(a._toast,"button").onclick=function(){return r(0)}),a.hide=function(){return r(-1)},document.body.appendChild(a),e.compile(a);var s=function(){a.parentElement&&a.show(e).then((function(){e.timeout&&setTimeout((function(){return r(-1)}),e.timeout)}))};setImmediate((function(){return e.force?s():Nt.add(s,n)}))}));return n}},qt=(Dt={_isPortrait:!1,isPortrait:function(){return this._isPortrait()},isLandscape:function(){return!this.isPortrait()},_init:function(){return document.addEventListener("DOMContentLoaded",this._onDOMContentLoaded.bind(this),!1),"orientation"in window?window.addEventListener("orientationchange",this._onOrientationChange.bind(this),!1):window.addEventListener("resize",this._onResize.bind(this),!1),this._isPortrait=function(){return window.innerHeight>window.innerWidth},this},_onDOMContentLoaded:function(){this._installIsPortraitImplementation(),this.emit("change",{isPortrait:this.isPortrait()})},_installIsPortraitImplementation:function(){var t=window.innerWidthwindow.innerWidth}},_onOrientationChange:function(){var t=this,e=this._isPortrait(),n=0,i=setInterval((function(){n++;var a=window.innerWidth,o=window.innerHeight;(e&&a<=o||!e&&a>=o||50===n)&&(t.emit("change",{isPortrait:e}),clearInterval(i))}),20)},_onResize:function(){this.emit("change",{isPortrait:this.isPortrait()})}},y.mixin(Dt),Dt)._init(),zt={add:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this._lockList=[],this._waitList=[],this._log=e.log||function(){}}return o(t,[{key:"lock",value:function(){var t=this,e=function e(){t._unlock(e)};return e.id=Xt(),this._lockList.push(e),this._log("lock: "+e.id),e}},{key:"_unlock",value:function(t){var e=this._lockList.indexOf(t);if(-1===e)throw new Error("This function is not registered in the lock list.");this._lockList.splice(e,1),this._log("unlock: "+t.id),this._tryToFreeWaitList()}},{key:"_tryToFreeWaitList",value:function(){for(;!this.isLocked()&&this._waitList.length>0;)this._waitList.shift()()}},{key:"waitUnlock",value:function(t){if(!(t instanceof Function))throw new Error("The callback param must be a function.");this.isLocked()?this._waitList.push(t):t()}},{key:"isLocked",value:function(){return this._lockList.length>0}}]),t}();function Yt(t,e,n){var i=t.page,a=t.parent;t.params;var o=document.getElementById(i);a.appendChild(o),o.style.display="",e(o)}function $t(t){t._destroy,t.style.display="none",$("body").append(t)}var Gt,Kt=function(){function t(e,n){i(this,t),this._loader=e instanceof Function?e:Yt,this._unloader=n instanceof Function?n:$t}return o(t,[{key:"internalLoader",get:function(){return this._loader},set:function(t){if(!(t instanceof Function))throw Error("First parameter must be an instance of Function");this._loader=t}},{key:"load",value:function(t,e,n){var i=t.page,a=t.parent,o=t.params,r=void 0===o?{}:o;this._loader({page:i,parent:a,params:r},(function(t){if(!(t instanceof Element))throw Error("pageElement must be an instance of Element.");e(t)}),n)}},{key:"unload",value:function(t){if(!(t instanceof Element))throw Error("pageElement must be an instance of Element.");this._unloader(t)}}]),t}(),Jt=new Kt,Qt=new Kt((function(t,e){var n=t.page,i=t.parent;t.params;var a=Y.createElement(n.trim());i.appendChild(a),e(a)}),$t),Zt={animit:ht,defaultPageLoader:Jt,elements:k,GestureDetector:ft,modifier:zt,notification:Ht,orientation:qt,pageAttributeExpression:K,PageLoader:Kt,platform:b,softwareKeyboard:Ft,_autoStyle:O,_internal:Q,_readyLock:new Ut,_util:Y};Zt.platform.select((window.location.search.match(/platform=([\w-]+)/)||[])[1]),Gt=Zt._readyLock.lock(),window.addEventListener("DOMContentLoaded",(function(){Zt.isWebView()?window.document.addEventListener("deviceready",Gt,{once:!0}):Gt()}),{once:!0});var te=function(t){return Y.throw("This method must be called ".concat(t?"after":"before"," ons.isReady() is true"))};Zt.isReady=function(){return!Zt._readyLock.isLocked()},Zt.isWebView=Zt.platform.isWebView,Zt.ready=function(t){Zt.isReady()?t():Zt._readyLock.waitUnlock(t)},Zt.setDefaultDeviceBackButtonListener=function(t){Zt.isReady()||te(!0),Zt._defaultDeviceBackButtonHandler.setListener(t)},Zt.disableDeviceBackButtonHandler=function(){Zt.isReady()||te(!0),Q.dbbDispatcher.disable()},Zt.enableDeviceBackButtonHandler=function(){Zt.isReady()||te(!0),Q.dbbDispatcher.enable()},Zt.fireDeviceBackButtonEvent=function(){Q.dbbDispatcher.fireDeviceBackButtonEvent()},Zt.enableAutoStatusBarFill=function(){Zt.isReady()&&te(!1),Q.config.autoStatusBarFill=!0},Zt.disableAutoStatusBarFill=function(){Zt.isReady()&&te(!1),Q.config.autoStatusBarFill=!1},Zt.mockStatusBar=function(){Zt.isReady()&&te(!1);var t=function(){if(!document.body.children[0]||!document.body.children[0].classList.contains("ons-status-bar-mock")){var t=b.isAndroid(),e=function(t){return'')},n=t?"".concat(e("zmdi-twitter")," ").concat(e("zmdi-google-play")):"No SIM ".concat(e("fa-wifi")),i=t?"":"12:28 PM",a=t?"".concat(e("zmdi-network")," ").concat(e("zmdi-wifi")," ").concat(e("zmdi-battery")," 12:28 PM"):"80% ".concat(e("fa-battery-three-quarters"));document.body.insertBefore(Y.createElement('
')+"
".concat(n,"
").concat(i,"
").concat(a,"
")+"
"),document.body.firstChild)}};document.body?t():Q.waitDOMContentLoaded(t)},Zt.disableAnimations=function(){Q.config.animationsDisabled=!0},Zt.enableAnimations=function(){Q.config.animationsDisabled=!1},Zt._disableWarnings=function(){Q.config.warningsDisabled=!0},Zt._enableWarnings=function(){Q.config.warningsDisabled=!1},Zt.disableAutoStyling=O.disable,Zt.enableAutoStyling=O.enable,Zt.disableIconAutoPrefix=function(){Y.checkMissingImport("Icon"),k.Icon.setAutoPrefix(!1)},Zt.forcePlatformStyling=function(t){Zt.enableAutoStyling(),Zt.platform.select(t||"ios"),Zt._util.arrayFrom(document.querySelectorAll("*")).forEach((function(t){"ons-if"===t.tagName.toLowerCase()?t._platformUpdate():t.tagName.match(/^ons-/i)&&(O.prepare(t,!0),"ons-tabbar"===t.tagName.toLowerCase()&&t._updatePosition())}))},Zt.preload=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Promise.all((t instanceof Array?t:[t]).map((function(t){return"string"!=typeof t&&Y.throw("Expected string arguments but got "+n(t)),Q.getTemplateHTMLAsync(t)})))},Zt.createElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(t){var n=Zt._util.createElement(t);(n.remove(),e.append)&&((e.append instanceof HTMLElement?e.append:document.body).insertBefore(n,e.insertBefore||null),e.link instanceof Function&&e.link(n));return n};return"<"===(t=t.trim()).charAt(0)?n(t):Q.getPageHTMLAsync(t).then(n)},Zt.createPopover=Zt.createDialog=Zt.createAlertDialog=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zt.createElement(t,e({append:!0},n))},Zt.openActionSheet=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){Y.checkMissingImport("ActionSheet"),function(t){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Function";return Y.throw('"options.'.concat(t,'" must be an instance of ').concat(e))},n=function(e){return Object.hasOwnProperty.call(t,e)},i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Function;return t[e]instanceof n},a="buttons",o="callback",r="compile",s="destroy";(!n(a)||!i(a,Array))&&e(a,"Array"),n(o)&&!i(o)&&e(o),n(r)&&!i(r)&&e(r),n(s)&&!i(s)&&e(s)}(t);var i=Y.createElement("\n \n
\n \n ')),a=function e(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;i&&(t.destroy&&t.destroy(i),i.removeEventListener("dialogcancel",e,!1),i.remove(),i=null,t.callback&&t.callback(o),n(o))};i.addEventListener("dialogcancel",a,!1);var o=document.createDocumentFragment();t.buttons.forEach((function(n,r){var s="string"==typeof n?{label:n}:e({},n);t.destructive===r&&(s.modifier=(s.modifier||"")+" destructive");var l=Y.createElement("\n \n ").concat(s.label,"\n \n "));l.onclick=function(t){return i.hide().then((function(){return a(t,r)}))},o.appendChild(l)})),Y.findChild(i,".action-sheet").appendChild(o),document.body.appendChild(i),t.compile&&t.compile(el.dialog),setImmediate((function(){return i.show({animation:t.animation,animationOptions:t.animationOptions})}))}))},Zt.resolveLoadingPlaceholder=function(t,e){var n=Zt._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]"));0===n.length&&Y.throw("No ons-loading-placeholder exists"),n.filter((function(t){return!t.getAttribute("page")})).forEach((function(n){n.setAttribute("ons-loading-placeholder",t),Zt._resolveLoadingPlaceholder(n,t,e)}))},Zt._setupLoadingPlaceHolders=function(){Zt.ready((function(){Zt._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]")).forEach((function(t){var e=t.getAttribute("ons-loading-placeholder");"string"==typeof e&&Zt._resolveLoadingPlaceholder(t,e)}))}))},Zt._resolveLoadingPlaceholder=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t,e){return e()};e&&Zt.createElement(e).then((function(e){e.style.display="none",t.appendChild(e),n(e,(function(){for(;t.firstChild&&t.firstChild!==e;)t.removeChild(t.firstChild);e.style.display=""}))})).catch((function(t){return Promise.reject("Unabled to resolve placeholder: "+t)}))};var ee="currentScript"in document?function(){return document.currentScript}:function(){return document.scripts[document.scripts.length-1]};Zt.getScriptPage=function(){return ee()&&/ons-page/i.test(ee().parentElement.tagName)&&ee().parentElement||null};var ne=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.call(this)}return o(n)}(function(){if("function"!=typeof HTMLElement){var t=function(){};return t.prototype=document.createElement("div"),t}return HTMLElement}()),ie=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){if(null!==b._getSelectedPlatform())t._platformUpdate();else if(!t._isAllowedPlatform()){for(;t.childNodes[0];)t.childNodes[0].remove();t._platformUpdate()}})),t._onOrientationChange(),t}return o(n,[{key:"connectedCallback",value:function(){qt.on("change",this._onOrientationChange.bind(this))}},{key:"attributeChangedCallback",value:function(t){"orientation"===t&&this._onOrientationChange()}},{key:"disconnectedCallback",value:function(){qt.off("change",this._onOrientationChange)}},{key:"_platformUpdate",value:function(){this.style.display=this._isAllowedPlatform()?"":"none"}},{key:"_isAllowedPlatform",value:function(){return!this.getAttribute("platform")||this.getAttribute("platform").split(/\s+/).indexOf(b.getMobileOS())>=0}},{key:"_onOrientationChange",value:function(){if(this.hasAttribute("orientation")&&this._isAllowedPlatform()){var t=this.getAttribute("orientation").toLowerCase(),e=qt.isPortrait()?"portrait":"landscape";this.style.display=t===e?"":"none"}}}],[{key:"observedAttributes",get:function(){return["orientation"]}}]),n}(ne);k.If=ie,customElements.define("ons-if",ie);var ae=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.timing=e.timing||"linear",this.duration=e.duration||0,this.delay=e.delay||0,this.def={timing:this.timing,duration:this.duration,delay:this.delay}}return o(t,null,[{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=function(){e.apply(this,arguments),Y.extend(this,t)};return n.prototype=this.prototype,n}}]),t}(),oe={isIPhoneXPortraitPatchActive:function(){return null!=document.documentElement.getAttribute("onsflag-iphonex-portrait")&&window.innerWidth=window.innerHeight},getSafeAreaLengths:function(){return oe.isIPhoneXPortraitPatchActive()?{top:44,right:0,bottom:34,left:0}:oe.isIPhoneXLandscapePatchActive()?{top:0,right:44,bottom:21,left:44}:{top:0,right:0,bottom:0,left:0}},getSafeAreaDOMRect:function(){var t;return e(e({},t=oe.isIPhoneXPortraitPatchActive()?{x:0,y:44,width:window.innerWidth,height:window.innerHeight-78}:oe.isIPhoneXLandscapePatchActive()?{x:44,y:0,width:window.innerWidth-88,height:window.innerHeight-21}:{x:0,y:0,width:window.innerWidth,height:window.innerHeight}),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}},re=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),se=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.4:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).maskTiming="linear",t.maskDuration=.2,t}return o(n,[{key:"show",value:function(t,e){ht.runAll(ht(t._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.maskDuration,timing:this.maskTiming}),ht(t._sheet,this.def).default({transform:"translate3d(0, 80%, 0)",opacity:0},{transform:"translate3d(0, 0, 0)",opacity:1}).queue((function(t){e&&e(),t()})))}},{key:"hide",value:function(t,e){ht.runAll(ht(t._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.maskDuration,timing:this.maskTiming}),ht(t._sheet,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, 80%, 0)",opacity:0}).queue((function(t){e&&e(),t()})))}}]),n}(re),le=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.3:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).maskTiming="linear",t.maskDuration=.2,oe.isIPhoneXPortraitPatchActive()?t.liftAmount="calc(100% + 48px)":oe.isIPhoneXLandscapePatchActive()?t.liftAmount="calc(100% + 33px)":t.liftAmount=document.body.clientHeight/2-1+"px",t}return o(n,[{key:"show",value:function(t,e){ht.runAll(ht(t._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.maskDuration,timing:this.maskTiming}),ht(t._sheet,this.def).default({transform:"translate3d(0, ".concat(this.liftAmount,", 0)")},{transform:"translate3d(0, 0, 0)"}).queue((function(t){e&&e(),t()})))}},{key:"hide",value:function(t,e){ht.runAll(ht(t._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.maskDuration,timing:this.maskTiming}),ht(t._sheet,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, ".concat(this.liftAmount,", 0)")}).queue((function(t){e&&e(),t()})))}}]),n}(re),ce=function(t){s(a,t);var n=h(a);function a(){var t;return i(this,a),(t=n.call(this)).constructor===a&&Y.throwAbstract(),t._visible=!1,t._doorLock=new Ut,t._cancel=t._cancel.bind(d(t)),t._selfCamelName=Y.camelize(t.tagName.slice(4)),t._defaultDBB=function(e){return t.cancelable?t._cancel():e.callParentHandler()},t._animatorFactory=t._updateAnimatorFactory(),t}return o(a,[{key:"_scheme",get:function(){Y.throwMember()}},{key:"_updateAnimatorFactory",value:function(){Y.throwMember()}},{key:"_toggleStyle",value:function(t){this.style.display=t?"block":"none"}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonCallback=t,this._backButtonHandler=at.createHandler(this,t)}},{key:"_cancel",value:function(){var t=this;this.cancelable&&!this._running&&(this._running=!0,this.hide().then((function(){t._running=!1,Y.triggerElementEvent(t,"dialogcancel"),Y.triggerElementEvent(t,"dialog-cancel")}),(function(){return t._running=!1})))}},{key:"show",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:{},o=t?"show":"hide";(a=e({},a)).animationOptions=Y.extend(a.animationOptions||{},this.animationOptions);var s=!1;return Y.triggerElementEvent(this,"pre".concat(o),(r(n={},this._selfCamelName,this),r(n,"cancel",(function(){return s=!0})),n)),s?Promise.reject("Canceled in pre".concat(o," event.")):new Promise((function(e){i._doorLock.waitUnlock((function(){var n=i._doorLock.lock(),s=i._animatorFactory.newAnimator(a);t&&i._toggleStyle(!0,a),i._visible=t,Y.iosPageScrollFix(t),It(i,(function(){s[o](i,(function(){!t&&i._toggleStyle(!1,a),n(),Y.propagateAction(i,"_"+o),Y.triggerElementEvent(i,"post"+o,r({},i._selfCamelName,i)),a.callback instanceof Function&&a.callback(i),e(i)}))}))}))}))}},{key:"maskColor",get:function(){return this.getAttribute("mask-color")},set:function(t){null==t?this.removeAttribute("mask-color"):this.setAttribute("mask-color",t)}},{key:"animationOptions",get:function(){return Z.parseAnimationOptionsString(this.getAttribute("animation-options"))},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"_updateMask",value:function(){var t=this;It(this,(function(){t._mask&&(t._mask.style.backgroundColor=t.maskColor)}))}},{key:"_updateAnimation",value:function(){this._animatorFactory=this._updateAnimatorFactory()}},{key:"connectedCallback",value:function(){var t=this;"function"==typeof this._backButtonCallback?this.onDeviceBackButton=this._backButtonCallback:"function"==typeof this._defaultDBB&&(this.onDeviceBackButton=this._defaultDBB.bind(this)),It(this,(function(){t._mask&&t._mask.addEventListener("click",t._cancel,!1)}))}},{key:"disconnectedCallback",value:function(){this._backButtonHandler&&(this._backButtonHandler.destroy(),this._backButtonHandler=null),this._mask&&this._mask.removeEventListener("click",this._cancel,!1)}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"modifier":M.onModifierChanged(e,n,this,this._scheme);break;case"animation":this._updateAnimation();break;case"mask-color":this._updateMask();break;case"visible":this.visible!==this._visible&&(this._updateMask(),this._updateAnimation(),It(this,(function(){i._setVisible(i.visible)})))}}}],[{key:"observedAttributes",get:function(){return["modifier","animation","mask-color","visible"]}},{key:"events",get:function(){return["preshow","postshow","prehide","posthide","dialogcancel","dialog-cancel"]}}]),a}(ne);Y.defineBooleanProperties(ce,["visible","disabled","cancelable"]);var ue={".action-sheet":"action-sheet--*",".action-sheet-mask":"action-sheet-mask--*",".action-sheet-title":"action-sheet-title--*"},de={default:function(){return b.isAndroid()?se:le},none:re},he=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return ue}},{key:"_mask",get:function(){return Y.findChild(this,".action-sheet-mask")}},{key:"_sheet",get:function(){return Y.findChild(this,".action-sheet")}},{key:"_title",get:function(){return this.querySelector(".action-sheet-title")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:de,baseClass:re,baseClassName:"ActionSheetAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(O.prepare(this),this.style.display="none",this.style.zIndex=10001,!this._sheet){var t=document.createElement("div");for(t.classList.add("action-sheet");this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t)}if(!this._title){var e=document.createElement("div");e.classList.add("action-sheet-title"),this.title?e.innerHTML=this.title:e.hidden=!0,this._sheet.insertBefore(e,this._sheet.firstChild)}if(!this._mask){var n=document.createElement("div");n.classList.add("action-sheet-mask"),this.insertBefore(n,this.firstChild)}this._sheet.style.zIndex=20001,this._mask.style.zIndex=2e4,M.initModifier(this,this._scheme)}},{key:"_updateTitle",value:function(){this._title&&(this.title?(this._title.innerHTML=this.title,this._title.hidden=!1):this._title.hidden=!0)}},{key:"title",get:function(){return this.getAttribute("title")},set:function(t){null==t?this.removeAttribute("title"):this.setAttribute("title",t)}},{key:"attributeChangedCallback",value:function(t,e,i){"title"===t?this._updateTitle():f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["title"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof re||Y.throwAnimator("ActionSheet"),de[t]=e}},{key:"animators",get:function(){return de}},{key:"ActionSheetAnimator",get:function(){return re}}]),n}(ce);k.ActionSheet=he,customElements.define("ons-action-sheet",he);var fe=function(){function t(){i(this,t),this._queue=[],this._index=0}return o(t,[{key:"animate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=(new Date).getTime(),a={},o=!1,r=!1,s=!1,l=Object.keys(e),c={stop:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s&&clearTimeout(s);var d=Math.min(1,((new Date).getTime()-i)/n);return l.forEach((function(n){t.style[n]=(1-d)*a[n]+d*e[n]+("opacity"==n?"":"px")})),t.style.transitionDuration="0s",u.stopNext?r=!1:o||(o=!0,r&&r()),c},then:function(t){return r=t,o&&r&&r(),c},speed:function(r){if(Q.config.animationsDisabled&&(r=0),!o){s&&clearTimeout(s);var u=((new Date).getTime()-i)/n,d=r*(1-u);l.forEach((function(n){t.style[n]=(1-u)*a[n]+u*e[n]+("opacity"==n?"":"px")})),h=window.getComputedStyle(t),l.forEach(h.getPropertyValue.bind(h)),h=t.offsetHeight,i=t.speedUpTime,n=d,t.style.transitionDuration=n/1e3+"s",l.forEach((function(n){t.style[n]=e[n]+("opacity"==n?"":"px")})),s=setTimeout(c.stop,d)}var h;return c},finish:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=((new Date).getTime()-i)/n;return c.speed(t/(1-e)),c}};if(t.hasAttribute("disabled")||o||Q.config.animationsDisabled)return c;var u=window.getComputedStyle(t);return l.forEach((function(t){var e=parseFloat(u.getPropertyValue(t));a[t]=isNaN(e)?0:e})),o||(t.style.transitionProperty=l.join(","),t.style.transitionDuration=n/1e3+"s",l.forEach((function(n){t.style[n]=e[n]+("opacity"==n?"":"px")}))),s=setTimeout(c.stop,n),this._onStopAnimations(t,c.stop),c}},{key:"_onStopAnimations",value:function(t,e){var n=this._queue,i=this._index++;n[t]=n[t]||[],n[t][i]=function(a){return delete n[t][i],n[t]&&0==n[t].length&&delete n[t],e(a)}}},{key:"stopAnimations",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(t))return t.forEach((function(t){e.stopAnimations(t,n)}));(this._queue[t]||[]).forEach((function(t){t(n||{})}))}},{key:"stopAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.stopAnimations(Object.keys(this._queue),t)}},{key:"fade",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return this.animate(t,{opacity:0},e)}}]),t}(),pe="ripple",me={"":"ripple--*",".ripple__wave":"ripple--*__wave",".ripple__background":"ripple--*__background"},ge=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._onTap=t._onTap.bind(d(t)),t._onHold=t._onHold.bind(d(t)),t._onDragStart=t._onDragStart.bind(d(t)),t._onRelease=t._onRelease.bind(d(t)),It(d(t),(function(){return t._compile()})),t._animator=new fe,["color","center","start-radius","background","modifier"].forEach((function(e){t.attributeChangedCallback(e,null,t.getAttribute(e))})),t}return o(n,[{key:"_compile",value:function(){this.classList.add(pe),this._wave=this.getElementsByClassName("ripple__wave")[0],this._background=this.getElementsByClassName("ripple__background")[0],this._background&&this._wave||(this._wave=Y.create(".ripple__wave"),this._background=Y.create(".ripple__background"),this.appendChild(this._wave),this.appendChild(this._background)),M.initModifier(this,me)}},{key:"_getEffectSize",value:function(){if(this.hasAttribute("size")){var t=this.getAttribute("size");if(-1!==["cover","contain"].indexOf(t))return t}return"cover"}},{key:"_calculateCoords",value:function(t){var e,n,i,a,o,r=this.getBoundingClientRect(),s=this._getEffectSize(),l=function(){return Y.throw("Ripple invalid state")};return this._center?(e=r.width/2,n=r.height/2,"cover"===s?o=Math.sqrt(e*e+n*n):"contain"===s?o=Math.min(e,n):l()):(e=("number"==typeof t.clientX?t.clientX:t.changedTouches[0].clientX)-r.left,n=("number"==typeof t.clientY?t.clientY:t.changedTouches[0].clientY)-r.top,i=Math.max(n,r.height-n),a=Math.max(e,r.width-e),"cover"===s?o=Math.sqrt(i*i+a*a):"contain"===s?o=Math.min(Math.round(i/2),Math.round(a/2)):l()),{x:e,y:n,r:o}}},{key:"_rippleAnimation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=this._animator,i=this._wave,a=this._background,o=this._minR,r=this._calculateCoords(t),s=r.x,l=r.y,c=r.r;return n.stopAll({stopNext:1}),n.animate(a,{opacity:1},e),Y.extend(i.style,{opacity:1,top:l-o+"px",left:s-o+"px",width:2*o+"px",height:2*o+"px"}),n.animate(i,{top:l-c,left:s-c,height:2*c,width:2*c},e)}},{key:"_updateParent",value:function(){!this._parentUpdated&&this.parentNode&&("static"===window.getComputedStyle(this.parentNode).getPropertyValue("position")&&(this.parentNode.style.position="relative"),this._parentUpdated=!0)}},{key:"_onTap",value:function(t){var e=this;this.disabled||t.ripple||(t.ripple=!0,this._updateParent(),this._rippleAnimation(t.gesture.srcEvent).then((function(){e._animator.fade(e._wave),e._animator.fade(e._background)})))}},{key:"_onHold",value:function(t){this.disabled||t.ripple||(t.ripple=!0,this._updateParent(),this._holding=this._rippleAnimation(t.gesture.srcEvent,2e3),document.addEventListener("release",this._onRelease))}},{key:"_onRelease",value:function(t){var e=this;this._holding&&!t.ripple&&(t.ripple=!0,this._holding.speed(300).then((function(){e._animator.stopAll({stopNext:!0}),e._animator.fade(e._wave),e._animator.fade(e._background)})),this._holding=!1),document.removeEventListener("release",this._onRelease)}},{key:"_onDragStart",value:function(t){if(this._holding)return this._onRelease(t);-1!=["left","right"].indexOf(t.gesture.direction)&&this._onTap(t)}},{key:"connectedCallback",value:function(){this._parentNode=this.parentNode,Q.config.animationsDisabled?this.disabled=!0:(this._parentNode.addEventListener("tap",this._onTap),this._parentNode.addEventListener("hold",this._onHold),this._parentNode.addEventListener("dragstart",this._onDragStart))}},{key:"disconnectedCallback",value:function(){var t=this._parentNode||this.parentNode;t.removeEventListener("tap",this._onTap),t.removeEventListener("hold",this._onHold),t.removeEventListener("dragstart",this._onDragStart)}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,pe,me);break;case"modifier":M.onModifierChanged(e,n,this,me);break;case"start-radius":this._minR=Math.max(0,parseFloat(n)||0);break;case"color":n&&It(this,(function(){i._wave.style.background=n,i.hasAttribute("background")||(i._background.style.background=n)}));break;case"background":(n||e)&&It(this,"none"===n?function(){i._background.setAttribute("disabled","disabled"),i._background.style.background="transparent"}:function(){i._background.hasAttribute("disabled")&&i._background.removeAttribute("disabled"),i._background.style.background=n});break;case"center":"center"===t&&(this._center=null!=n&&"false"!=n)}}}],[{key:"observedAttributes",get:function(){return["start-radius","color","background","center","class","modifier"]}}]),n}(ne);Y.defineBooleanProperties(ge,["disabled","center"]),k.Ripple=ge,customElements.define("ons-ripple",ge);var ve=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).constructor===n&&Y.throwAbstract(),It(d(t),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){Y.throwMember()}},{key:"_defaultClassName",get:function(){Y.throwMember()}},{key:"_rippleOpt",get:function(){return[this]}},{key:"_icon",get:function(){return Y.findChild(this,"ons-icon")}},{key:"_hiddenButton",get:function(){return Y.findChild(this,"button")}},{key:"_compile",value:function(){if(O.prepare(this),this.classList.add(this._defaultClassName),!this._icon&&this.hasAttribute("icon")){Y.checkMissingImport("Icon");var t=Y.createElement(''));t.classList.add(this._defaultClassName.replace("button","icon")),this.insertBefore(t,this.firstChild)}if(!this._hiddenButton){var e=Y.createElement("");this.appendChild(e)}this._updateRipple(),M.initModifier(this,this._scheme)}},{key:"_updateIcon",value:function(){this._icon&&this._icon.setAttribute("icon",this.getAttribute("icon"))}},{key:"_updateRipple",value:function(){this._rippleOpt&&Y.updateRipple.apply(Y,p(this._rippleOpt))}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,this._defaultClassName,this._scheme);break;case"modifier":M.onModifierChanged(e,n,this,this._scheme);break;case"icon":this._updateIcon();break;case"ripple":this.classList.contains(this._defaultClassName)&&this._updateRipple()}}}],[{key:"observedAttributes",get:function(){return["modifier","class","icon","ripple"]}}]),n}(ne);Y.defineBooleanProperties(ve,["ripple","disabled"]);var _e=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return{"":"action-sheet-button--*",".action-sheet-icon":"action-sheet-icon--*"}}},{key:"_defaultClassName",get:function(){return"action-sheet-button"}},{key:"_rippleOpt",get:function(){}}]),n}(ve);k.ActionSheetButton=_e,customElements.define("ons-action-sheet-button",_e);var be=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),ye=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .4, 1)":a,r=t.duration,s=void 0===r?.2:r,l=t.delay,c=void 0===l?0:l;return i(this,n),e.call(this,{duration:s,timing:o,delay:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)",opacity:0},{transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:1}).queue((function(t){e(),t()})))}},{key:"hide",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:1},{transform:"translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)",opacity:0}).queue((function(t){e(),t()})))}}]),n}(be),ke=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .4, 1)":a,r=t.duration,s=void 0===r?.2:r,l=t.delay,c=void 0===l?0:l;return i(this,n),e.call(this,{duration:s,timing:o,delay:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0) scale3d(1.3, 1.3, 1)",opacity:0},{transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:1}).queue((function(t){e(),t()})))}},{key:"hide",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({opacity:1},{opacity:0}).queue((function(t){e(),t()})))}}]),n}(be),we={".alert-dialog":"alert-dialog--*",".alert-dialog-container":"alert-dialog-container--*",".alert-dialog-title":"alert-dialog-title--*",".alert-dialog-content":"alert-dialog-content--*",".alert-dialog-footer":"alert-dialog-footer--*",".alert-dialog-footer--rowfooter":"alert-dialog-footer--rowfooter--*",".alert-dialog-button--rowfooter":"alert-dialog-button--rowfooter--*",".alert-dialog-button--primal":"alert-dialog-button--primal--*",".alert-dialog-button":"alert-dialog-button--*","ons-alert-dialog-button":"alert-dialog-button--*",".alert-dialog-mask":"alert-dialog-mask--*",".text-input":"text-input--*"},Ee={none:be,default:function(){return b.isAndroid()?ye:ke},fade:function(){return b.isAndroid()?ye:ke}},Ce=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return we}},{key:"_mask",get:function(){return Y.findChild(this,".alert-dialog-mask")}},{key:"_dialog",get:function(){return Y.findChild(this,".alert-dialog")}},{key:"_titleElement",get:function(){return Y.findChild(this._dialog.children[0],".alert-dialog-title")}},{key:"_contentElement",get:function(){return Y.findChild(this._dialog.children[0],".alert-dialog-content")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:Ee,baseClass:be,baseClassName:"AlertDialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){O.prepare(this),this.style.display="none",this.style.zIndex=10001;var t=document.createDocumentFragment();if(!this._mask&&!this._dialog)for(;this.firstChild;)t.appendChild(this.firstChild);if(!this._mask){var e=document.createElement("div");e.classList.add("alert-dialog-mask"),this.insertBefore(e,this.children[0])}if(!this._dialog){var n=document.createElement("div");n.classList.add("alert-dialog"),this.insertBefore(n,null)}if(!Y.findChild(this._dialog,".alert-dialog-container")){var i=document.createElement("div");i.classList.add("alert-dialog-container"),this._dialog.appendChild(i)}this._dialog.children[0].appendChild(t),this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,M.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof be||Y.throwAnimator("AlertDialog"),Ee[t]=e}},{key:"animators",get:function(){return Ee}},{key:"AlertDialogAnimator",get:function(){return be}}]),n}(ce);k.AlertDialog=Ce,customElements.define("ons-alert-dialog",Ce);var Ae=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return{"":"alert-dialog-button--*"}}},{key:"_defaultClassName",get:function(){return"alert-dialog-button"}},{key:"_rippleOpt",get:function(){return[this,void 0,{modifier:"light-gray"}]}}]),n}(ve);k.AlertDialogButton=Ae,customElements.define("ons-alert-dialog-button",Ae);var Se="back-button",xe={"":"back-button--*",".back-button__icon":"back-button--*__icon",".back-button__label":"back-button--*__label"},Pe=function(t){s(a,t);var n=h(a);function a(){var t;i(this,a),It(d(t=n.call(this)),(function(){t._compile()})),t._options={},t._boundOnClick=t._onClick.bind(d(t));var e=Y.defineListenerProperty(d(t),"click"),o=e.onConnected,r=e.onDisconnected;return t._connectOnClick=o,t._disconnectOnClick=r,t}return o(a,[{key:"_updateIcon",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y.findChild(this,".back-button__icon")).innerHTML="android"===O.getPlatform(this)||Y.hasModifier(this,"material")?'\n \n \n md-back-button-icon\n Created with Sketch.\n \n \n \n \n \n \n \n':'\n \n \n ios-back-button-icon\n Created with Sketch.\n \n \n \n \n \n \n \n'}},{key:"_compile",value:function(){if(O.prepare(this),this.classList.add(Se),!Y.findChild(this,".back-button__label")){for(var t=Y.create("span.back-button__label");this.childNodes[0];)t.appendChild(this.childNodes[0]);this.appendChild(t)}if(!Y.findChild(this,".back-button__icon")){var e=Y.create("span.back-button__icon");this._updateIcon(e),this.insertBefore(e,this.children[0])}Y.updateRipple(this,void 0,{center:"",size:"contain",background:"transparent"}),M.initModifier(this,xe)}},{key:"options",get:function(){return this._options},set:function(t){this._options=t}},{key:"_onClick",value:function(t){var n=this;setTimeout((function(){if(!t.defaultPrevented){var i=Y.findParent(n,"ons-navigator");i&&i.popPage(e(e({},n.options),{},{onsBackButton:!0}))}}))}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1),this._connectOnClick()}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,Se,xe);break;case"modifier":M.onModifierChanged(e,n,this,xe)&&this._updateIcon()}}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1),this._disconnectOnClick()}},{key:"show",value:function(){this.style.display="inline-block"}},{key:"hide",value:function(){this.style.display="none"}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),a}(ne);k.BackButton=Pe,customElements.define("ons-back-button",Pe);var Le="bottom-bar",Oe={"":"bottom-bar--*"},Me=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).classList.add(Le),M.initModifier(d(t),Oe),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,Le,Oe);break;case"modifier":M.onModifierChanged(e,n,this,Oe)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.BottomToolbar=Me,customElements.define("ons-bottom-toolbar",Me);var Te=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return{"":"button--*"}}},{key:"_defaultClassName",get:function(){return"button"}}]),n}(ve);k.Button=Te,customElements.define("ons-button",Te);var Ie="card",De={"":"card--*",".card__title":"card--*__title",".card__content":"card--*__content"},Ne=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){t._compile()})),t}return o(n,[{key:"_compile",value:function(){for(var t=0;t1)&&Y.throw("Invalid auto-scroll-ratio "+t+". Must be between 0 and 1"),t},this.shouldBlock="other"===Y.globals.actualMobileOS,this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onResize=this.onResize.bind(this),this._shouldFixScroll="ios"===Y.globals.actualMobileOS}return o(t,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.swipeable,i=e.autoRefresh;this.initialized=!0,this.target=this.getElement().children[0],this.blocker=this.getElement().children[1],this.target&&this.blocker||Y.throw('Expected "target" and "blocker" elements to exist before initializing Swiper'),this.shouldBlock||(this.blocker.style.display="none"),this.getElement().classList.add("ons-swiper"),this.target.classList.add("ons-swiper-target"),this.blocker.classList.add("ons-swiper-blocker"),this._gestureDetector=new ft(this.getElement(),{dragMinDistance:1,dragLockToAxis:!0,passive:!this._shouldFixScroll}),this._mutationObserver=new MutationObserver((function(){return t.refresh()})),this.updateSwipeable(n),this.updateAutoRefresh(i),this._scroll=this._offset=this._lastActiveIndex=0,this._updateLayout(),this._setupInitialIndex(),setImmediate((function(){return t.initialized&&t._setupInitialIndex()})),window===window.parent&&0!==this.offsetHeight||window.requestAnimationFrame((function(){return t.initialized&&t.onResize()}))}},{key:"dispose",value:function(){this.initialized=!1,this.updateSwipeable(!1),this.updateAutoRefresh(!1),this._gestureDetector&&this._gestureDetector.dispose(),this.target=this.blocker=this._gestureDetector=this._mutationObserver=null,this.setupResize(!1)}},{key:"onResize",value:function(){var t=this._scroll/this.itemNumSize;this._reset(),this.setActiveIndex(t),this.refresh()}},{key:"itemCount",get:function(){return this.target.children.length}},{key:"itemNumSize",get:function(){return"number"==typeof this._itemNumSize&&this._itemNumSize==this._itemNumSize||(this._itemNumSize=this._calculateItemSize()),this._itemNumSize}},{key:"maxScroll",get:function(){var t=this.itemCount*this.itemNumSize-this.targetSize;return Math.ceil(t<0?0:t)}},{key:"_calculateItemSize",value:function(){var t=this.itemSize.match(/^(\d+)(px|%)/);t||Y.throw("Invalid state: swiper's size unit must be '%' or 'px'");var e=parseInt(t[1],10);return"%"===t[2]?Math.round(e/100*this.targetSize):e}},{key:"_setupInitialIndex",value:function(){this._reset(),this._lastActiveIndex=Math.max(Math.min(Number(this.getInitialIndex()),this.itemCount),0),this._scroll=this._offset+this.itemNumSize*this._lastActiveIndex,this._scrollTo(this._scroll)}},{key:"_setSwiping",value:function(t){this.target.classList.toggle("swiping",t)}},{key:"setActiveIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._setSwiping(!0),t=Math.max(0,Math.min(t,this.itemCount-1));var n=Math.max(0,Math.min(this.maxScroll,this._offset+this.itemNumSize*t));return this._changeTo(n,e)}},{key:"getActiveIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._scroll;t-=this._offset;var e=this.itemCount,n=this.itemNumSize;if(0===this.itemNumSize||!Y.isInteger(t))return this._lastActiveIndex;if(t<=0)return 0;for(var i=0;it)return i;return e-1}},{key:"setupResize",value:function(t){window[(t?"add":"remove")+"EventListener"]("resize",this.onResize,!0)}},{key:"show",value:function(){var t=this;this.setupResize(!0),this.onResize(),setTimeout((function(){return t.target&&t.target.classList.add("active")}),1e3/60)}},{key:"hide",value:function(){this.setupResize(!1),this.target.classList.remove("active")}},{key:"updateSwipeable",value:function(t){if(this._gestureDetector){var e=t?"on":"off";this._gestureDetector[e]("drag",this.onDrag),this._gestureDetector[e]("dragstart",this.onDragStart),this._gestureDetector[e]("dragend",this.onDragEnd)}}},{key:"updateAutoRefresh",value:function(t){this._mutationObserver&&(t?this._mutationObserver.observe(this.target,{childList:!0}):this._mutationObserver.disconnect())}},{key:"updateItemSize",value:function(t){this.itemSize=t||"100%",this.refresh()}},{key:"toggleBlocker",value:function(t){this.blocker.style.pointerEvents=t?"auto":"none"}},{key:"_canConsumeGesture",value:function(t){var e=t.direction,n=0===this._scroll&&!this.isOverScrollable(),i=this._scroll===this.maxScroll&&!this.isOverScrollable();return this.isVertical()?"down"===e&&!n||"up"===e&&!i:"right"===e&&!n||"left"===e&&!i}},{key:"onDragStart",value:function(t){var e=this;if(this._ignoreDrag=t.consumed||!Y.isValidGesture(t),!this._ignoreDrag){var n=t.consume;if(t.consume=function(){n&&n(),e._ignoreDrag=!0},this._canConsumeGesture(t.gesture)){var i=t.gesture.center&&t.gesture.center.clientX||0,a=this.getBubbleWidth()||0,o=function(){n&&n(),t.consumed=!0,e._started=!0,e.shouldBlock&&e.toggleBlocker(!0),e._setSwiping(!0),Y.iosPreventScroll(e._gestureDetector)};ithis.targetSize-a?setImmediate((function(){return!e._ignoreDrag&&o()})):o()}}}},{key:"onDrag",value:function(t){t.gesture&&!this._ignoreDrag&&this._started&&(this._continued=!0,t.stopPropagation(),this._scrollTo(this._scroll-this._getDelta(t),{throttle:!0}))}},{key:"onDragEnd",value:function(t){if(this._started=!1,t.gesture&&!this._ignoreDrag&&this._continued){this._continued=!1,t.stopPropagation();var e=this._scroll-this._getDelta(t),n=this._normalizeScroll(e);e===n?this._startMomentumScroll(e,t):this._killOverScroll(n),this.shouldBlock&&this.toggleBlocker(!1)}else this._ignoreDrag=!0}},{key:"_startMomentumScroll",value:function(t,e){var n=this._getVelocity(e),i=e.gesture.interimDirection===this.dM.dir[this._getDelta(e)<0?0:1],a=this._getAutoScroll(t,n,i),o=Math.abs(a-t)/(n+.01)/1e3;o=Math.min(.25,Math.max(.1,o)),this._changeTo(a,{swipe:!0,animationOptions:{duration:o,timing:"cubic-bezier(.4, .7, .5, 1)"}})}},{key:"_killOverScroll",value:function(t){var e=this;this._scroll=t;var n=this.dM.dir[Number(t>0)],i=function(){return e._changeTo(t,{animationOptions:{duration:.4,timing:"cubic-bezier(.1, .4, .1, 1)"}})};this.overScrollHook({direction:n,killOverScroll:i})||i()}},{key:"_changeTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={activeIndex:this.getActiveIndex(t),lastActiveIndex:this._lastActiveIndex,swipe:n.swipe||!1},a=i.activeIndex!==i.lastActiveIndex,o=!!a&&this.preChangeHook(i);return this._scroll=o?this._offset+i.lastActiveIndex*this.itemNumSize:t,this._lastActiveIndex=o?i.lastActiveIndex:i.activeIndex,this._scrollTo(this._scroll,n).then((function(){if(t!==e._scroll||o){if(n.reject)return e._setSwiping(!1),Promise.reject("Canceled")}else e._setSwiping(!1),a&&e.postChangeHook(i)})).catch((function(){return!1}))}},{key:"_scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.throttle){if(t<0)t=this.isOverScrollable()?Math.round(.35*t):0;else{var i=this.maxScroll;i0&&this.scrollHook((t/this.itemNumSize).toFixed(2),n.animationOptions||{}),new Promise((function(n){return ht(e.target).queue({transform:e._getTransform(t)},a).play(n)}))}},{key:"_getAutoScroll",value:function(t,e,n){var i=this.maxScroll,a=this._offset,o=this.itemNumSize;if(!this.isAutoScrollable())return Math.max(0,Math.min(i,t));for(var r=[],s=a;s1&&(l=r[1]),Math.max(0,Math.min(i,l))}},{key:"_reset",value:function(){this._targetSize=this._itemNumSize=void 0}},{key:"_normalizeScroll",value:function(t){return Math.max(Math.min(t,this.maxScroll),0)}},{key:"refresh",value:function(){if(this._reset(),this._updateLayout(),Y.isInteger(this._scroll)){var t=this._normalizeScroll(this._scroll);t!==this._scroll?this._killOverScroll(t):this._changeTo(t)}else this._setupInitialIndex();this.refreshHook()}},{key:"targetSize",get:function(){return this._targetSize||(this._targetSize=this.target["offset".concat(this.dM.size)]),this._targetSize}},{key:"_getDelta",value:function(t){return t.gesture["delta".concat(this.dM.axis)]}},{key:"_getVelocity",value:function(t){return t.gesture["velocity".concat(this.dM.axis)]}},{key:"_getTransform",value:function(t){return"translate3d(".concat(this.dM.t3d[0]).concat(-t).concat(this.dM.t3d[1],")")}},{key:"_updateLayout",value:function(){this.dM=He[this.isVertical()?"vertical":"horizontal"],this.target.classList.toggle("ons-swiper-target--vertical",this.isVertical());for(var t=this.target.children[0];t;t=t.nextElementSibling)t.style[this.dM.size.toLowerCase()]=this.itemSize;this.isCentered()&&(this._offset=(this.targetSize-this.itemNumSize)/-2||0)}}]),t}(),ze=function(t){s(a,t);var n=h(a);function a(){var t;i(this,a),t=n.call(this);var e=Y.defineListenerProperty(d(t),"swipe"),o=e.onConnected,r=e.onDisconnected;return t._connectOnSwipe=o,t._disconnectOnSwipe=r,It(d(t),(function(){return t._compile()})),t}return o(a,[{key:"_compile",value:function(){var t=this.children[0]&&"ONS-CAROUSEL-ITEM"!==this.children[0].tagName&&this.children[0]||document.createElement("div");if(!t.parentNode){for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t)}!this.children[1]&&this.appendChild(document.createElement("div")),this.appendChild=this.appendChild.bind(t),this.insertBefore=this.insertBefore.bind(t)}},{key:"connectedCallback",value:function(){var t=this;this._swiper||(this._swiper=new qe({getElement:function(){return t},getInitialIndex:function(){return t.getAttribute("active-index")||t.getAttribute("initial-index")},getAutoScrollRatio:function(){return t.autoScrollRatio},isVertical:function(){return t.vertical},isOverScrollable:function(){return t.overscrollable},isCentered:function(){return t.centered},isAutoScrollable:function(){return t.autoScroll},itemSize:this.itemSize,overScrollHook:this._onOverScroll.bind(this),preChangeHook:this._onPreChange.bind(this),postChangeHook:this._onPostChange.bind(this),refreshHook:this._onRefresh.bind(this),scrollHook:function(e,n){return Y.triggerElementEvent(t,"swipe",{index:e,options:n})}}),It(this,(function(){return t._swiper.init({swipeable:t.hasAttribute("swipeable"),autoRefresh:t.hasAttribute("auto-refresh")})}))),this._connectOnSwipe()}},{key:"disconnectedCallback",value:function(){this._swiper&&this._swiper.initialized&&(this._swiper.dispose(),this._swiper=null),this._disconnectOnSwipe()}},{key:"attributeChangedCallback",value:function(t,e,n){if(this._swiper)switch(t){case"swipeable":this._swiper.updateSwipeable(this.hasAttribute("swipeable"));break;case"auto-refresh":this._swiper.updateAutoRefresh(this.hasAttribute("auto-refresh"));break;case"item-height":this.vertical&&this._swiper.updateItemSize(this.itemSize);break;case"item-width":this.vertical||this._swiper.updateItemSize(this.itemSize);break;case"direction":this._swiper.refresh();break;case"active-index":this.getActiveIndex()!==this.activeIndex&&this.setActiveIndex(this.activeIndex)}}},{key:"_show",value:function(){this._swiper.show()}},{key:"_hide",value:function(){this._swiper.hide()}},{key:"_onOverScroll",value:function(t){var e=t.direction,n=t.killOverScroll,i=!1;return Y.triggerElementEvent(this,"overscroll",{carousel:this,activeIndex:this.getActiveIndex(),direction:e,waitToReturn:function(t){i=!0,t.then(n)}}),i}},{key:"_onPreChange",value:function(t){var e=t.activeIndex,n=t.lastActiveIndex;Y.triggerElementEvent(this,"prechange",{carousel:this,activeIndex:e,lastActiveIndex:n})}},{key:"_onPostChange",value:function(t){var e=t.activeIndex,n=t.lastActiveIndex;this.activeIndex=e,Y.triggerElementEvent(this,"postchange",{carousel:this,activeIndex:e,lastActiveIndex:n})}},{key:"_onRefresh",value:function(){Y.triggerElementEvent(this,"refresh",{carousel:this})}},{key:"setActiveIndex",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i=e({animation:this.getAttribute("animation"),animationOptions:this.animationOptions||{duration:.3,timing:"cubic-bezier(.4, .7, .5, 1)"}},i),this._swiper.setActiveIndex(t,i).then((function(){return i.callback instanceof Function&&i.callback(n),Promise.resolve(n)}))}},{key:"getActiveIndex",value:function(){return this._swiper.getActiveIndex()}},{key:"next",value:function(t){return this.setActiveIndex(this.getActiveIndex()+1,t)}},{key:"prev",value:function(t){return this.setActiveIndex(this.getActiveIndex()-1,t)}},{key:"first",value:function(t){return this.setActiveIndex(0,t)}},{key:"last",value:function(t){this.setActiveIndex(Math.max(this.itemCount-1,0),t)}},{key:"refresh",value:function(){this._swiper.refresh()}},{key:"itemCount",get:function(){return this._swiper.itemCount}},{key:"vertical",get:function(){return"vertical"===this.getAttribute("direction")}},{key:"itemSize",get:function(){var t=(this.getAttribute("item-".concat(this.vertical?"height":"width"))||"").trim();return t.match(/^\d+(px|%)$/)?t:"100%"}},{key:"autoScrollRatio",get:function(){return parseFloat(this.getAttribute("auto-scroll-ratio"))},set:function(t){this.setAttribute("auto-scroll-ratio",t)}},{key:"animationOptions",get:function(){var t=this.getAttribute("animation-options");return t?Y.animationOptionsParse(t):t},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"activeIndex",get:function(){return parseInt(this.getAttribute("active-index"))},set:function(t){null!=t&&this.setAttribute("active-index",t)}}],[{key:"observedAttributes",get:function(){return["swipeable","auto-refresh","direction","item-height","item-width","active-index"]}},{key:"events",get:function(){return["postchange","refresh","overscroll","prechange","swipe"]}}]),a}(ne);Y.defineBooleanProperties(ze,["swipeable","disabled","overscrollable","auto-scroll","centered","fullscreen","auto-refresh"]),k.Carousel=ze,customElements.define("ons-carousel",ze);var Fe=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).getAttribute("width")&&t._updateWidth(),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){"width"===t&&this._updateWidth()}},{key:"_updateWidth",value:function(){var t=this.getAttribute("width");t?(t=t.trim().match(/^\d+$/)?t+"%":t,E(this,{flex:"0 0 "+t,maxWidth:t})):E.clear(this,"flex maxWidth")}}],[{key:"observedAttributes",get:function(){return["width"]}}]),n}(ne);k.Col=Fe,customElements.define("ons-col",Fe);var je=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),Ve=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"ease-in-out":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.3:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -60%, 0)",opacity:0},{transform:"translate3d(-50%, -50%, 0)",opacity:1}).queue((function(t){e(),t()})))}},{key:"hide",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)",opacity:1},{transform:"translate3d(-50%, -60%, 0)",opacity:0}).queue((function(t){e(),t()})))}}]),n}(je),We=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease-in-out":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.2:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).bodyHeight=document.body.clientHeight,t}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, ".concat(this.bodyHeight/2-1,"px, 0)")},{transform:"translate3d(-50%, -50%, 0)"}).queue((function(t){e(),t()})))}},{key:"hide",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)"},{transform:"translate3d(-50%, ".concat(this.bodyHeight/2-1,"px, 0)")}).queue((function(t){e(),t()})))}}]),n}(je),Xe=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .4, 1)":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.2:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).bodyHeight=document.body.clientHeight,t}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, ".concat(-this.bodyHeight/2+1-t._dialog.clientHeight,"px, 0)")},{transform:"translate3d(-50%, -50%, 0)"}).queue((function(t){e(),t()})))}},{key:"hide",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)"},{transform:"translate3d(-50%, ".concat(-this.bodyHeight/2+1-t._dialog.clientHeight,"px, 0)")}).queue((function(t){e(),t()})))}}]),n}(je),Ue={".dialog":"dialog--*",".dialog-container":"dialog-container--*",".dialog-mask":"dialog-mask--*"},Ye={default:function(){return b.isAndroid()?Ve:We},slide:Xe,none:je},$e=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return Ue}},{key:"_mask",get:function(){return Y.findChild(this,".dialog-mask")}},{key:"_dialog",get:function(){return Y.findChild(this,".dialog")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:Ye,baseClass:je,baseClassName:"DialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(O.prepare(this),this.style.display="none",this.style.zIndex=10001,!this._dialog){var t=document.createElement("div");t.classList.add("dialog");var e=document.createElement("div");for(e.classList.add("dialog-container");this.firstChild;)e.appendChild(this.firstChild);t.appendChild(e),this.appendChild(t)}if(!this._mask){var n=document.createElement("div");n.classList.add("dialog-mask"),this.insertBefore(n,this.firstChild)}this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,this.setAttribute("status-bar-fill",""),M.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof je||Y.throwAnimator("Dialog"),Ye[t]=e}},{key:"animators",get:function(){return Ye}},{key:"DialogAnimator",get:function(){return je}}]),n}(ce);k.Dialog=$e,customElements.define("ons-dialog",$e);var Ge={"":"fab--*",".fab__icon":"fab--*__icon"},Ke=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._hide(),t.classList.add("fab"),It(d(t),(function(){t._compile()})),t}return o(n,[{key:"_compile",value:function(){if(O.prepare(this),!Y.findChild(this,".fab__icon")){var t=document.createElement("span");t.classList.add("fab__icon"),Y.arrayFrom(this.childNodes).forEach((function(e){e.tagName&&"ons-ripple"===e.tagName.toLowerCase()||t.appendChild(e)})),this.appendChild(t)}this._updateRipple(),M.initModifier(this,Ge),this._updatePosition()}},{key:"connectedCallback",value:function(){var t=this;setImmediate((function(){return t._show()}))}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,"fab",Ge);break;case"modifier":M.onModifierChanged(e,n,this,Ge);break;case"ripple":this._updateRipple();break;case"position":this._updatePosition()}}},{key:"_show",value:function(){this._manuallyHidden||this._toggle(!0)}},{key:"_hide",value:function(){var t=this;setImmediate((function(){return t._toggle(!1)}))}},{key:"_updateRipple",value:function(){Y.updateRipple(this)}},{key:"_updatePosition",value:function(){var t=this.getAttribute("position");switch(this.classList.remove("fab--top__left","fab--bottom__right","fab--bottom__left","fab--top__right","fab--top__center","fab--bottom__center"),t){case"top right":case"right top":this.classList.add("fab--top__right");break;case"top left":case"left top":this.classList.add("fab--top__left");break;case"bottom right":case"right bottom":this.classList.add("fab--bottom__right");break;case"bottom left":case"left bottom":this.classList.add("fab--bottom__left");break;case"center top":case"top center":this.classList.add("fab--top__center");break;case"center bottom":case"bottom center":this.classList.add("fab--bottom__center")}}},{key:"show",value:function(){this.toggle(!0)}},{key:"hide",value:function(){this.toggle(!1)}},{key:"toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.visible;this._manuallyHidden=!t,this._toggle(t)}},{key:"_toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.visible,e=(this.getAttribute("position")||"").indexOf("bottom")>=0?"translate3d(0px, -".concat(Y.globals.fabOffset||0,"px, 0px)"):"";E(this,{transform:"".concat(e," scale(").concat(Number(t),")")})}},{key:"visible",get:function(){return-1===this.style.transform.indexOf("scale(0)")&&"none"!==this.style.display}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","position","class"]}}]),n}(ne);Y.defineBooleanProperties(Ke,["disabled","ripple"]),k.Fab=Ke,customElements.define("ons-fab",Ke);var Je=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._gestureDetector=new ft(d(t),{passive:!0}),t}return o(n)}(ne);k.GestureDetector=Je,customElements.define("ons-gesture-detector",Je);var Qe="fa",Ze=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){t._compile()})),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){this._cleanClassAttribute("icon"===t?e:this.getAttribute("icon"),"modifier"===t?e:void 0),this._update()}},{key:"_compile",value:function(){O.prepare(this),this._update()}},{key:"_update",value:function(){var t=this,e=this._buildClassAndStyle(this._parseAttr("icon"),this._parseAttr("size")),n=e.classList,i=e.style;Y.extend(this.style,i),n.forEach((function(e){return t.classList.add(e)}))}},{key:"_parseAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getAttribute("modifier")||"",n=(this.getAttribute(t)||t||"").split(/\s*,\s*/),i=n[0],a=n[1];return a=(a||"").split(/\s*:\s*/),(e&&RegExp("(^|\\s+)".concat(a[0],"($|\\s+)"),"i").test(e)?a[1]:i)||""}},{key:"_cleanClassAttribute",value:function(t,e){var n=this,i=this._prefixIcon(this._parseAttr(t,e)),a=i.className,o=i.prefix,r=a!==o?"|".concat(o,"$|").concat(o,"-"):"|".concat(a,"$")||"",s=new RegExp("^(fa$|fa-|ion-|zmdi$|zmdi-|ons-icon--".concat(r,")"));Y.arrayFrom(this.classList).filter((function(t){return s.test(t)})).forEach((function(t){return n.classList.remove(t)}))}},{key:"_prefixIcon",value:function(t){var e=Qe+(Qe?"-":"")+t;return{className:e,prefix:e.split("-")[0]}}},{key:"_buildClassAndStyle",value:function(t,e){var n=["ons-icon"],i={};if(0===t.indexOf("ion-"))n.push(t),n.push("ons-icon--ion");else if(0===t.indexOf("fa-"))n.push(t),this.classList.contains("far")||this.classList.contains("fab")||this.classList.contains("fal")||n.push("fa");else if(0===t.indexOf("md-"))n.push("zmdi"),n.push("zmdi-"+t.split(/-(.+)?/)[1]);else{var a=this._prefixIcon(t),o=a.className,r=a.prefix;r&&n.push(r),o&&n.push(o)}return e.match(/^[1-5]x|lg$/)?(n.push("ons-icon--"+e),this.style.removeProperty("font-size")):i.fontSize=e,{classList:n,style:i}}}],[{key:"observedAttributes",get:function(){return["icon","size","modifier","class"]}},{key:"setAutoPrefix",value:function(t){Qe=t?"string"==typeof t&&t||"fa":""}}]),n}(ne);Y.defineBooleanProperties(Ze,["fixed-width","spin"]),k.Icon=Ze,customElements.define("ons-icon",Ze);var tn=function(){function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i(this,t),"object"===n(e)&&null!==e||Y.throw('"delegate" parameter must be an object'),this._userDelegate=e,a instanceof Element||null===a||Y.throw('"templateElement" parameter must be an instance of Element or null'),this._templateElement=a}return o(t,[{key:"itemHeight",get:function(){return this._userDelegate.itemHeight}},{key:"hasRenderFunction",value:function(){return this._userDelegate._render instanceof Function}},{key:"_render",value:function(){this._userDelegate._render.apply(this._userDelegate,arguments)}},{key:"loadItemElement",value:function(t,e){if(this._userDelegate.loadItemElement instanceof Function)this._userDelegate.loadItemElement(t,e);else{var n=this._userDelegate.createItemContent(t,this._templateElement);n instanceof Element||Y.throw('"createItemContent" must return an instance of Element'),e({element:n})}}},{key:"countItems",value:function(){var t=this._userDelegate.countItems();return"number"!=typeof t&&Y.throw('"countItems" must return a number'),t}},{key:"updateItem",value:function(t,e){this._userDelegate.updateItemContent instanceof Function&&this._userDelegate.updateItemContent(t,e)}},{key:"calculateItemHeight",value:function(t){if(this._userDelegate.calculateItemHeight instanceof Function){var e=this._userDelegate.calculateItemHeight(t);return"number"!=typeof e&&Y.throw('"calculateItemHeight" must return a number'),e}return 0}},{key:"destroyItem",value:function(t,e){this._userDelegate.destroyItem instanceof Function&&this._userDelegate.destroyItem(t,e)}},{key:"destroy",value:function(){this._userDelegate.destroy instanceof Function&&this._userDelegate.destroy(),this._userDelegate=this._templateElement=null}}]),t}(),en=function(){function t(e,n){i(this,t),n instanceof tn||Y.throw('"delegate" parameter must be an instance of LazyRepeatDelegate'),this._wrapperElement=e,this._delegate=n,this._insertIndex=this._wrapperElement.children[0]&&"ONS-LAZY-REPEAT"===this._wrapperElement.children[0].tagName?1:0,"ons-list"===e.tagName.toLowerCase()&&e.classList.add("lazy-list"),this._pageContent=this._findPageContentElement(e),this._pageContent||Y.throw("LazyRepeat must be descendant of a Page element"),this.lastScrollTop=this._pageContent.scrollTop,this.padding=0,this._topPositions=[0],this._renderedItems={},this._delegate.itemHeight||this._delegate.calculateItemHeight(0)||(this._unknownItemHeight=!0),this._addEventListeners(),this._onChange()}return o(t,[{key:"padding",get:function(){return parseInt(this._wrapperElement.style.paddingTop,10)},set:function(t){this._wrapperElement.style.paddingTop=t+"px"}},{key:"_findPageContentElement",value:function(t){var e=Y.findParent(t,".page__content");if(e)return e;var n=Y.findParent(t,"ons-page");if(n){var i=Y.findChild(n,".content");if(i)return i}return null}},{key:"_checkItemHeight",value:function(t){var e=this;this._delegate.loadItemElement(0,(function(n){e._unknownItemHeight||Y.throw("Invalid state"),e._wrapperElement.appendChild(n.element);var i=function(){e._delegate.destroyItem(0,n),n.element&&n.element.remove(),delete e._unknownItemHeight,t()};e._itemHeight=n.element.offsetHeight,e._itemHeight>0?i():(e._wrapperElement.style.visibility="hidden",n.element.style.visibility="hidden",setImmediate((function(){e._itemHeight=n.element.offsetHeight,0==e._itemHeight&&Y.throw('Invalid state: "itemHeight" must be greater than zero'),e._wrapperElement.style.visibility="",i()})))}))}},{key:"staticItemHeight",get:function(){return this._delegate.itemHeight||this._itemHeight}},{key:"_countItems",value:function(){return this._delegate.countItems()}},{key:"_getItemHeight",value:function(t){return Object.prototype.hasOwnProperty.call(this._renderedItems,t)?(Object.prototype.hasOwnProperty.call(this._renderedItems[t],"height")||(this._renderedItems[t].height=this._renderedItems[t].element.offsetHeight),this._renderedItems[t].height):this._topPositions[t+1]&&this._topPositions[t]?this._topPositions[t+1]-this._topPositions[t]:this.staticItemHeight||this._delegate.calculateItemHeight(t)}},{key:"_calculateRenderedHeight",value:function(){var t=this;return Object.keys(this._renderedItems).reduce((function(e,n){return e+t._getItemHeight(+n)}),0)}},{key:"_onChange",value:function(){this._render()}},{key:"_lastItemRendered",value:function(){return Math.max.apply(Math,p(Object.keys(this._renderedItems)))}},{key:"_firstItemRendered",value:function(){return Math.min.apply(Math,p(Object.keys(this._renderedItems)))}},{key:"refresh",value:function(){var t={forceScrollDown:!0},e=this._firstItemRendered();Y.isInteger(e)&&(this._wrapperElement.style.height=this._topPositions[e]+this._calculateRenderedHeight()+"px",this.padding=this._topPositions[e],t.forceFirstIndex=e),this._removeAllElements(),this._render(t),this._wrapperElement.style.height="inherit"}},{key:"_render",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.forceScrollDown,i=void 0!==n&&n,a=e.forceFirstIndex,o=e.forceLastIndex;if(this._unknownItemHeight)return this._checkItemHeight(this._render.bind(this,arguments[0]));var r=!i&&this.lastScrollTop>this._pageContent.scrollTop;this.lastScrollTop=this._pageContent.scrollTop;for(var s={},l=this._wrapperElement.getBoundingClientRect().top,c=4*window.innerHeight-l,u=this._countItems(),d=a||Math.max(0,this._calculateStartIndex(l)-30),h=d,f=this._topPositions[h];h=this._topPositions.length&&(this._topPositions.length+=100),this._topPositions[h]=f,f+=this._getItemHeight(h);if(this._delegate.hasRenderFunction&&this._delegate.hasRenderFunction())return this._delegate._render(d,h,(function(){t.padding=t._topPositions[d]}));if(r)for(var m=h-1;m>=d;m--)s[m]=!0,this._renderElement(m,r);else for(var g=o||Math.max.apply(Math,[h-1].concat(p(Object.keys(this._renderedItems)))),v=d;v<=g;v++)s[v]=!0,this._renderElement(v,r);Object.keys(this._renderedItems).forEach((function(e){return s[e]||t._removeElement(e,r)}))}},{key:"_renderElement",value:function(t,e){var n=this,i=this._renderedItems[t];i?this._delegate.updateItem(t,i):this._delegate.loadItemElement(t,(function(i){e?(n._wrapperElement.insertBefore(i.element,n._wrapperElement.children[n._insertIndex]),n.padding=n._topPositions[t],i.height=n._topPositions[t+1]-n._topPositions[t]):n._wrapperElement.appendChild(i.element),n._renderedItems[t]=i}))}},{key:"_removeElement",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t=+t;var n=this._renderedItems[t];this._delegate.destroyItem(t,n),e?this._topPositions[t+1]=void 0:this.padding=this.padding+this._getItemHeight(t),n.element.parentElement&&n.element.parentElement.removeChild(n.element),delete this._renderedItems[t]}},{key:"_removeAllElements",value:function(){var t=this;Object.keys(this._renderedItems).forEach((function(e){return t._removeElement(e)}))}},{key:"_recalculateTopPositions",value:function(t,e){for(var n=t;n<=e;n++)this._topPositions[n+1]=this._topPositions[n]+this._getItemHeight(n)}},{key:"_calculateStartIndex",value:function(t){var e=this._firstItemRendered(),n=this._lastItemRendered();this._recalculateTopPositions(e,n);for(var i=0,a=this._countItems()-1;;){var o=Math.floor((i+a)/2),r=t+this._topPositions[o];if(a0)return o;isNaN(r)||r>=0?a=o-1:i=o+1}}},{key:"_debounce",value:function(t,e,n){var i;return function(){var a=arguments,o=this,r=n&&!i;clearTimeout(i),r?t.apply(this,arguments):i=setTimeout((function(){i=null,t.apply(o,a)}),e)}}},{key:"_doubleFireOnTouchend",value:function(){this._render(),this._debounce(this._render.bind(this),100)}},{key:"_addEventListeners",value:function(){Y.bindListeners(this,["_onChange","_doubleFireOnTouchend"]),b.isIOS()&&(this._boundOnChange=this._debounce(this._boundOnChange,30)),this._pageContent.addEventListener("scroll",this._boundOnChange,!0),b.isIOS()&&(Y.addEventListener(this._pageContent,"touchmove",this._boundOnChange,{capture:!0,passive:!0}),this._pageContent.addEventListener("touchend",this._boundDoubleFireOnTouchend,!0)),window.document.addEventListener("resize",this._boundOnChange,!0)}},{key:"_removeEventListeners",value:function(){this._pageContent.removeEventListener("scroll",this._boundOnChange,!0),b.isIOS()&&(Y.removeEventListener(this._pageContent,"touchmove",this._boundOnChange,{capture:!0,passive:!0}),this._pageContent.removeEventListener("touchend",this._boundDoubleFireOnTouchend,!0)),window.document.removeEventListener("resize",this._boundOnChange,!0)}},{key:"destroy",value:function(){this._removeAllElements(),this._delegate.destroy(),this._parentElement=this._delegate=this._renderedItems=null,this._removeEventListeners()}}]),t}(),nn=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"connectedCallback",value:function(){this.hasAttribute("delegate")&&(this.delegate=window[this.getAttribute("delegate")])}},{key:"delegate",get:function(){Y.throw("No delegate getter")},set:function(t){this._lazyRepeatProvider&&this._lazyRepeatProvider.destroy(),!this._templateElement&&this.children[0]&&(this._templateElement=this.removeChild(this.children[0]));var e=new tn(t,this._templateElement||null);this._lazyRepeatProvider=new en(this.parentElement,e)}},{key:"refresh",value:function(){this._lazyRepeatProvider&&this._lazyRepeatProvider.refresh()}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"disconnectedCallback",value:function(){this._lazyRepeatProvider&&(this._lazyRepeatProvider.destroy(),this._lazyRepeatProvider=null)}}]),n}(ne);Q.LazyRepeatDelegate=tn,Q.LazyRepeatProvider=en,k.LazyRepeat=nn,customElements.define("ons-lazy-repeat",nn);var an="list-header",on={"":"list-header--*"},rn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(an),M.initModifier(this,on)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,an,on);break;case"modifier":M.onModifierChanged(e,n,this,on)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.ListHeader=rn,customElements.define("ons-list-header",rn);var sn="list-title",ln={"":"list-title--*"},cn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(sn),M.initModifier(this,ln)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,sn,ln);break;case"modifier":M.onModifierChanged(e,n,this,ln)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.ListTitle=cn,customElements.define("ons-list-title",cn);var un=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"showExpansion",value:function(t,e){e()}},{key:"hideExpansion",value:function(t,e){e()}}]),n}(ae),dn=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"showExpansion",value:function(t,e){this._animateExpansion(t,!0,e)}},{key:"hideExpansion",value:function(t,e){this._animateExpansion(t,!1,e)}},{key:"_animateExpansion",value:function(t,e,n){var i,a=t.expandableContent.style.height,o=t.expandableContent.style.display;t.expandableContent.style.height="auto",t.expandableContent.style.display="block";var r,s=window.getComputedStyle(t.expandableContent),l=[{height:0,paddingTop:0,paddingBottom:0},{height:s.height,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom}],c=[{transform:"rotate(45deg)"},{transform:"rotate(225deg)"}];(t.expandableContent.style.height=a,(i=ht(t.expandableContent,{duration:this.duration,property:"height padding-top padding-bottom"})).default.apply(i,p(e?l:l.reverse())).play((function(){t.expandableContent.style.display=o,n&&n()})),t.expandChevron)&&(r=ht(t.expandChevron,{duration:this.duration,property:"transform"})).default.apply(r,p(e?c:c.reverse())).play()}}]),n}(un),hn="list-item",fn={".list-item":"list-item--*",".list-item__left":"list-item--*__left",".list-item__center":"list-item--*__center",".list-item__right":"list-item--*__right",".list-item__label":"list-item--*__label",".list-item__title":"list-item--*__title",".list-item__subtitle":"list-item--*__subtitle",".list-item__thumbnail":"list-item--*__thumbnail",".list-item__icon":"list-item--*__icon"},pn={default:dn,none:un},mn=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),(t=e.call(this))._animatorFactory=t._updateAnimatorFactory();var a=/^ons-(?!col$|row$|if$)/i;return t._shouldIgnoreTap=function(t){return t.hasAttribute("prevent-tap")||a.test(t.tagName)},t.show=t.showExpansion,t.hide=t.hideExpansion,It(d(t),(function(){t._compile()})),t}return o(n,[{key:"_compile",value:function(){var t,e;O.prepare(this),this.classList.add(hn);var n,i,a,o=[];Array.from(this.childNodes).forEach((function(n){n.nodeType!==Node.ELEMENT_NODE?o.push(n):n.classList.contains("top")?t=n:n.classList.contains("expandable-content")?e=n:o.push(n),"ONS-RIPPLE"!==n.nodeName&&n.remove()})),o=t?Array.from(t.childNodes):o;var r=[];if(o.forEach((function(t){t.nodeType!==Node.ELEMENT_NODE?r.push(t):t.classList.contains("left")?n=t:t.classList.contains("right")?i=t:t.classList.contains("center")?a=t:r.push(t)})),this.hasAttribute("expandable")){if(this.classList.add("list-item--expandable"),t||(t=document.createElement("div")).classList.add("top"),t.classList.add("list-item__top"),this.appendChild(t),this._top=t,e&&(e.classList.add("list-item__expandable-content"),this.appendChild(e)),!i){(i=document.createElement("div")).classList.add("list-item__right","right");var s=document.createElement("span");s.classList.add("list-item__expand-chevron"),i.appendChild(s)}this.expanded&&this.classList.add("list-item--expanded")}else t=this;a||((a=document.createElement("div")).classList.add("center"),r.forEach((function(t){return a.appendChild(t)}))),a.classList.add("list-item__center"),t.appendChild(a),n&&(n.classList.add("list-item__left"),t.appendChild(n)),i&&(i.classList.add("list-item__right"),t.appendChild(i)),Y.updateRipple(this),M.initModifier(this,fn)}},{key:"showExpansion",value:function(){this.expanded=!0}},{key:"hideExpansion",value:function(){this.expanded=!1}},{key:"toggleExpansion",value:function(){this.expanded=!this.expanded}},{key:"clearTapBackgroundColor",value:function(){this._clearTapBackgroundColor()}},{key:"_animateExpansion",value:function(){var t=this,e=this.expanded&&this.classList.contains("list-item--expanded");if(this.hasAttribute("expandable")&&!this._expanding&&!e){this._expanding=!0;var n=function(){t._expanding=!1,t.expanded?t.classList.add("list-item--expanded"):t.classList.remove("list-item--expanded")},i=this._animatorFactory.newAnimator();i._animateExpansion?i._animateExpansion(this,this.expanded,n):n()}}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:pn,baseClass:un,baseClassName:"ListItemAnimator",defaultAnimation:this.getAttribute("animation")||"default"})}},{key:"expandableContent",get:function(){return this.querySelector(".list-item__expandable-content")}},{key:"expandChevron",get:function(){return this.querySelector(".list-item__expand-chevron")}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,hn,fn);break;case"modifier":M.onModifierChanged(e,n,this,fn);break;case"ripple":Y.updateRipple(this);break;case"animation":this._animatorFactory=this._updateAnimatorFactory();break;case"expanded":It(this,(function(){return i._animateExpansion()}))}}},{key:"connectedCallback",value:function(){var t=this;It(this,(function(){t._setupListeners(!0),t._originalBackgroundColor=t.style.backgroundColor,t.tapped=!1}))}},{key:"disconnectedCallback",value:function(){this._setupListeners(!1)}},{key:"_setupListeners",value:function(t){var e=(t?"add":"remove")+"EventListener";Y[e](this,"touchstart",this._onTouch,{passive:!0}),Y[e](this,"touchmove",this._onRelease,{passive:!0}),this[e]("touchcancel",this._onRelease),this[e]("touchend",this._onRelease),this[e]("touchleave",this._onRelease),this[e]("drag",this._onDrag),this[e]("mousedown",this._onTouch),this[e]("mouseup",this._onRelease),this[e]("mouseout",this._onRelease),this._top&&this._top[e]("click",this._onClickTop.bind(this))}},{key:"_onClickTop",value:function(){this._expanding||(this.toggleExpansion(),this.dispatchEvent(new Event("expand")),this.dispatchEvent(new Event("expansion")))}},{key:"_onDrag",value:function(t){var e=t.gesture;this.hasAttribute("lock-on-drag")&&["left","right"].indexOf(e.direction)>-1&&e.preventDefault()}},{key:"_onTouch",value:function(t){var e=this;if(!(this.tapped||this!==t.target&&(this._shouldIgnoreTap(t.target)||Y.findParent(t.target,this._shouldIgnoreTap,(function(t){return t===e}))))){this.tapped=!0;var n={transition:"background-color 0.0s linear 0.02s, box-shadow 0.0s linear 0.02s"};this.hasAttribute("tappable")&&(this.style.backgroundColor&&(this._originalBackgroundColor=this.style.backgroundColor),n.backgroundColor=this.getAttribute("tap-background-color")||"#d9d9d9",n.boxShadow="0px -1px 0px 0px ".concat(n.backgroundColor)),E(this,n)}}},{key:"_onRelease",value:function(){this.tapped=!1,this.keepTapBackgroundColor||this._clearTapBackgroundColor(),E.clear(this,"transition boxShadow")}},{key:"_clearTapBackgroundColor",value:function(){this.style.backgroundColor=this._originalBackgroundColor||""}}],[{key:"observedAttributes",get:function(){return["modifier","class","ripple","animation","expanded"]}}]),n}(ne);Y.defineBooleanProperties(mn,["expanded","expandable","tappable","lock-on-drag","keep-tap-background-color"]),Y.defineStringProperties(mn,["animation","tap-background-color"]),k.ListItem=mn,customElements.define("ons-list-item",mn);var gn="list",vn={"":"list--*"},_n=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(gn),M.initModifier(this,vn)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,gn,vn);break;case"modifier":M.onModifierChanged(e,n,this,vn)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.List=_n,customElements.define("ons-list",_n);var bn=["autocapitalize","autocomplete","autocorrect","autofocus","disabled","inputmode","max","maxlength","min","minlength","name","pattern","placeholder","readonly","required","size","spellcheck","step","validator","value"],yn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).constructor===n&&Y.throwAbstract(),It(d(t),(function(){return t._compile()})),t._boundDelegateEvent=t._delegateEvent.bind(d(t)),t}return o(n,[{key:"_update",value:function(){}},{key:"_scheme",get:function(){Y.throwMember()}},{key:"_template",get:function(){Y.throwMember()}},{key:"type",get:function(){Y.throwMember()}},{key:"_compile",value:function(){O.prepare(this),this._defaultClassName&&this.classList.add(this._defaultClassName),0===this.children.length&&(this.appendChild(Y.createFragment(this._template)),this._setInputId(),this._updateBoundAttributes(),M.initModifier(this,this._scheme))}},{key:"_updateBoundAttributes",value:function(){var t=this;bn.forEach((function(e){t.hasAttribute(e)?t._input.setAttribute(e,t.getAttribute(e)):t._input.removeAttribute(e)})),this._update()}},{key:"_delegateEvent",value:function(t){var e=new CustomEvent(t.type,{bubbles:!1,cancelable:!0});return this.dispatchEvent(e)}},{key:"_setInputId",value:function(){this.hasAttribute("input-id")&&(this._input.id=this.getAttribute("input-id"))}},{key:"_defaultClassName",get:function(){return""}},{key:"_input",get:function(){return this.querySelector("input")}},{key:"value",get:function(){return null===this._input?this.getAttribute("value"):this._input.value},set:function(t){var e=this;It(this,(function(){t instanceof Date&&(t=t.toISOString().substring(0,10)),e._input.value=t,e._update()}))}},{key:"connectedCallback",value:function(){var t=this;It(this,(function(){t._input.addEventListener("focus",t._boundDelegateEvent),t._input.addEventListener("blur",t._boundDelegateEvent)}))}},{key:"disconnectedCallback",value:function(){var t=this;It(this,(function(){t._input.removeEventListener("focus",t._boundDelegateEvent),t._input.removeEventListener("blur",t._boundDelegateEvent)}))}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"modifier":It(this,(function(){return M.onModifierChanged(e,n,i,i._scheme)}));break;case"input-id":It(this,(function(){return i._setInputId()}));break;case"class":Y.restoreClass(this,this._defaultClassName,this._scheme)}bn.indexOf(t)>=0&&It(this,(function(){return i._updateBoundAttributes()}))}},{key:"blur",value:function(){this._input.blur()}},{key:"focus",value:function(){this._input.focus()}}],[{key:"observedAttributes",get:function(){return["modifier","input-id","class"].concat(bn)}}]),n}(ne);Y.defineBooleanProperties(yn,["disabled"]);var kn={".text-input":"text-input--*",".text-input__label":"text-input--*__label"},wn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._boundOnInput=t._update.bind(d(t)),t._boundOnFocusin=t._update.bind(d(t)),t}return o(n,[{key:"_update",value:function(){this._updateLabel(),this._updateLabelClass()}},{key:"_scheme",get:function(){return kn}},{key:"_template",get:function(){return'\n \n \n ')}},{key:"type",get:function(){var t=this.getAttribute("type");return["checkbox","radio"].indexOf(t)<0&&t||"text"},set:function(t){this.setAttribute("type",t)}},{key:"_updateLabel",value:function(){var t=this.getAttribute("placeholder")||"";void 0!==this._helper.textContent?this._helper.textContent=t:this._helper.innerText=t}},{key:"_updateLabelClass",value:function(){""===this.value?this._helper.classList.remove("text-input--material__label--active"):this._helper.classList.add("text-input--material__label--active")}},{key:"_helper",get:function(){return this.querySelector("span")}},{key:"connectedCallback",value:function(){var t=this;f(l(n.prototype),"connectedCallback",this).call(this),It(this,(function(){t._input.addEventListener("input",t._boundOnInput),t._input.addEventListener("focusin",t._boundOnFocusin)}));var e=this.getAttribute("type");["checkbox","radio"].indexOf(e)>=0&&Y.warn('Warn: is deprecated since v2.4.0. Use instead."))}},{key:"disconnectedCallback",value:function(){var t=this;f(l(n.prototype),"disconnectedCallback",this).call(this),It(this,(function(){t._input.removeEventListener("input",t._boundOnInput),t._input.removeEventListener("focusin",t._boundOnFocusin)}))}},{key:"attributeChangedCallback",value:function(t,e,i){var a=this;if("type"===t)It(this,(function(){return a._input.setAttribute("type",a.type)}));else f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["type"])}}]),n}(yn);Y.defineBooleanProperties(wn,["float"]),k.Input=wn,customElements.define("ons-input",wn);var En=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).constructor===n&&util.throwAbstract(),It(d(t),(function(){t.attributeChangedCallback("checked",null,t.getAttribute("checked"))})),t}return o(n,[{key:"_template",get:function(){return'\n \n \n ')}},{key:"_helper",get:function(){return this.querySelector("span")}},{key:"checked",get:function(){return this._input.checked},set:function(t){var e=this;It(this,(function(){e._input.checked=t}))}},{key:"attributeChangedCallback",value:function(t,e,i){if("checked"===t)this.checked=null!==i;else f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["checked"])}}]),n}(yn),Cn={".checkbox":"checkbox--*",".checkbox__input":"checkbox--*__input",".checkbox__checkmark":"checkbox--*__checkmark"},An=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return Cn}},{key:"_defaultClassName",get:function(){return"checkbox"}},{key:"type",get:function(){return"checkbox"}}]),n}(En);k.Checkbox=An,customElements.define("ons-checkbox",An);var Sn={".radio-button":"radio-button--*",".radio-button__input":"radio-button--*__input",".radio-button__checkmark":"radio-button--*__checkmark"},xn=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return Sn}},{key:"_defaultClassName",get:function(){return"radio-button"}},{key:"type",get:function(){return"radio"}}]),n}(En);k.Radio=xn,customElements.define("ons-radio",xn);var Pn={".search-input":"search-input--*"},Ln=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return Pn}},{key:"_template",get:function(){return'\n \n ')}},{key:"type",get:function(){return"search"}}]),n}(yn);k.SearchInput=Ln,customElements.define("ons-search-input",Ln);var On=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),Mn=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.3:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:0},{opacity:1}).queue((function(t){e(),t()})).play()}},{key:"hide",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:1},{opacity:0}).queue((function(t){e(),t()})).play()}}]),n}(On),Tn=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier( .1, .7, .1, 1)":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.4:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht(t,this.def).default({transform:"translate3d(0, 100%, 0)"},{transform:"translate3d(0, 0, 0)"}).queue((function(t){e(),t()})).play()}},{key:"hide",value:function(t,e){e=e||function(){},ht(t,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, 100%, 0)"}).queue((function(t){e(),t()})).play()}}]),n}(On),In={"":"modal--*",modal__content:"modal--*__content"},Dn="modal",Nn={default:On,fade:Mn,lift:Tn,none:On},Bn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._defaultDBB=function(){},It(d(t),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return In}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:Nn,baseClass:On,baseClassName:"ModalAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(this.style.display="none",this.style.zIndex=10001,this.classList.add(Dn),!Y.findChild(this,".modal__content")){var t=document.createElement("div");for(t.classList.add("modal__content");this.childNodes[0];){var e=this.childNodes[0];this.removeChild(e),t.insertBefore(e,null)}this.appendChild(t)}M.initModifier(this,this._scheme)}},{key:"_toggleStyle",value:function(t){this.style.display=t?"table":"none"}},{key:"connectedCallback",value:function(){f(l(n.prototype),"connectedCallback",this).call(this)}},{key:"disconnectedCallback",value:function(){f(l(n.prototype),"disconnectedCallback",this).call(this)}},{key:"attributeChangedCallback",value:function(t,e,i){"class"===t?Y.restoreClass(this,Dn,In):f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["class"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof On||Y.throwAnimator("Modal"),Nn[t]=e}},{key:"animators",get:function(){return Nn}},{key:"ModalAnimator",get:function(){return On}}]),n}(ce);k.Modal=Bn,customElements.define("ons-modal",Bn);var Rn=function(){function t(e){var n=this;i(this,t),"element ignoreSwipe isInitialState onDragCallback swipeMax swipeMin swipeMid".split(/\s+/).forEach((function(t){return n[t]=e[t]})),this.elementHandler=e.elementHandler||e.element,this.getThreshold=e.getThreshold||function(){return.5},this.getSide=e.getSide||function(){return"left"},this.handleGesture=this.handleGesture.bind(this),this._shouldFixScroll="ios"===Y.globals.actualMobileOS}return o(t,[{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.element.hasAttribute("swipeable");this.gestureDetector||(this.gestureDetector=new ft(this.elementHandler,{dragMinDistance:1,passive:!this._shouldFixScroll}));var e=t?"on":"off";this.gestureDetector[e]("drag dragstart dragend",this.handleGesture)}},{key:"handleGesture",value:function(t){t.gesture&&("dragstart"===t.type?this.onDragStart(t):this._ignoreDrag||("dragend"===t.type?this.onDragEnd(t):this.onDrag(t)))}},{key:"onDragStart",value:function(t){var e,n,i,a=this;this._ignoreDrag=t.consumed||!Y.isValidGesture(t)||this.ignoreSwipe(t,"left"===a.getSide()?t.gesture.center.clientX:window.innerWidth-t.gesture.center.clientX),this._ignoreDrag||(t.consume&&t.consume(),t.consumed=!0,this._width=(e=this.element.style.width||"100%",n=[parseInt(e,10),/px/.test(e)],i=n[0],n[1]?i:Math.round(document.body.offsetWidth*i/100)),this._startDistance=this._distance=this.isInitialState instanceof Function&&!this.isInitialState()?this._width:0,Y.iosPreventScroll(this.gestureDetector))}},{key:"onDrag",value:function(t){t.stopPropagation();var e="left"===this.getSide()?t.gesture.deltaX:-t.gesture.deltaX,n=Math.max(0,Math.min(this._width,this._startDistance+e));n!==this._distance&&(this._distance=n,this.swipeMid(this._distance,this._width))}},{key:"onDragEnd",value:function(t){t.stopPropagation();var e=t.gesture.interimDirection;this.getSide()!==e&&this._distance>this._width*this.getThreshold()?this.swipeMax():this.swipeMin()}},{key:"dispose",value:function(){this.gestureDetector&&this.gestureDetector.dispose(),this.gestureDetector=this.element=this.elementHandler=null}}]),t}(),Hn=function(t){s(n,t);var e=h(n);function n(t){return i(this,n),t=Y.extend({timing:"linear",duration:"0.4",delay:"0"},t||{}),e.call(this,t)}return o(n,[{key:"push",value:function(t,e,n){n()}},{key:"pop",value:function(t,e,n){n()}},{key:"block",value:function(t){var e=Y.createElement('\n
\n ');return t.parentNode.appendChild(e),function(){return e.remove()}}}]),n}(ae),qn=["durationRestore","durationSwipe","timingSwipe"],zn=function(t){s(a,t);var n=h(a);function a(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o.durationRestore,s=void 0===r?.1:r,l=o.durationSwipe,c=void 0===l?.15:l,d=o.timingSwipe,h=void 0===d?"linear":d,f=u(o,qn);return i(this,a),(t=n.call(this,e({},f))).constructor===a&&Y.throwAbstract(),t.durationRestore=s,t.durationSwipe=c,t.timingSwipe=h,t.optSwipe={timing:h,duration:c},t.optRestore={timing:h,duration:s},t.swipeShadow=Y.createElement('
'),t.isDragStart=!0,t}return o(a,[{key:"_decompose",value:function(){Y.throwMember()}},{key:"_shouldAnimateToolbar",value:function(){Y.throwMember()}},{key:"_calculateDelta",value:function(){Y.throwMember()}},{key:"_dragStartSetup",value:function(t,e){this.isDragStart=!1,this.unblock=f(l(a.prototype),"block",this).call(this,e),t.parentElement.insertBefore(this.backgroundMask,t),this.target={enter:Y.findToolbarPage(t)||t,leave:Y.findToolbarPage(e)||e},this.decomp={enter:this._decompose(this.target.enter),leave:this._decompose(this.target.leave)},this.delta=this._calculateDelta(e,this.decomp.leave),this.shouldAnimateToolbar=this._shouldAnimateToolbar(this.target.enter,this.target.leave),this.shouldAnimateToolbar?(this.swipeShadow.style.top=this.decomp.leave.toolbar.offsetHeight+"px",this.target.leave.appendChild(this.swipeShadow),this._saveStyle(this.target.enter,this.target.leave)):(e.appendChild(this.swipeShadow),this._saveStyle(t,e)),e.classList.add("overflow-visible"),this.overflowElement=e,this.decomp.leave.content.classList.add("content-swiping")}},{key:"translate",value:function(t,e,n,i){this.isSwiping=!0,"none"===n.style.display&&(n.style.display=""),this.isDragStart&&(this.maxWidth=e,this._dragStartSetup(n,i));var a=(t-e)/e;this.shouldAnimateToolbar?ht.runAll(ht([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(".concat(25*a,"%, 0, 0)"),opacity:1+10*a/100}),ht(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(".concat(this.delta.title*a,"px, 0, 0)"),opacity:1+a}),ht(this.decomp.enter.backButtonLabel).queue({opacity:1+10*a/100,transform:"translate3d(".concat(this.delta.label*a,"px, 0, 0)")}),ht(this.decomp.enter.other).queue({opacity:1+a}),ht([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background,this.swipeShadow]).queue({transform:"translate3d(".concat(t,"px, 0, 0)")}),ht(this.decomp.leave.toolbar).queue({opacity:-1*a}),ht(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(".concat(125*(1+a),"%, 0, 0)")}),ht(this.decomp.leave.backButtonLabel).queue({opacity:-1*a,transform:"translate3d(".concat(this.delta.title*(1+a),"px, 0, 0)")}),ht(this.swipeShadow).queue({opacity:-1*a})):ht.runAll(ht(i).queue({transform:"translate3d(".concat(t,"px, 0, 0)")}),ht(n).queue({transform:"translate3d(".concat(25*a,"%, 0, 0)"),opacity:1+10*a/100}),ht(this.swipeShadow).queue({opacity:-1*a}))}},{key:"restore",value:function(t,e,n){var i=this;this.isDragStart||(this.shouldAnimateToolbar?ht.runAll(ht([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(-25%, 0, 0)",opacity:.9},this.optRestore),ht(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(-".concat(this.delta.title,"px, 0, 0)"),transition:"opacity ".concat(this.durationRestore,"s linear, transform ").concat(this.durationRestore,"s ").concat(this.timingSwipe),opacity:0}),ht(this.decomp.enter.backButtonLabel).queue({transform:"translate3d(-".concat(this.delta.label,"px, 0, 0)")},this.optRestore),ht(this.decomp.enter.other).queue({opacity:0},this.optRestore),ht([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background,this.swipeShadow]).queue({transform:"translate3d(0, 0, 0)"},this.optRestore),ht(this.decomp.leave.toolbar).queue({opacity:1},this.optRestore),ht(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(0, 0, 0)"},this.optRestore),ht(this.decomp.leave.backButtonLabel).queue({opacity:1,transform:"translate3d(0, 0, 0)",transition:"opacity ".concat(this.durationRestore,"s linear, transform ").concat(this.durationRestore,"s ").concat(this.timingSwipe)}),ht(this.swipeShadow).queue({opacity:0},this.optRestore).queue((function(e){i._reset(i.target.enter,i.target.leave),t.style.display="none",n&&n(),e()}))):ht.runAll(ht(t).queue({transform:"translate3D(-25%, 0, 0)",opacity:.9},this.optRestore),ht(e).queue({transform:"translate3D(0, 0, 0)"},this.optRestore).queue((function(a){i._reset(t,e),t.style.display="none",n&&n(),a()}))))}},{key:"popSwipe",value:function(t,e,n){var i=this;this.isDragStart||(this.shouldAnimateToolbar?ht.runAll(ht([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(0, 0, 0)",opacity:1},this.optSwipe),ht(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(0, 0, 0)",transition:"opacity ".concat(this.durationSwipe,"s linear, transform ").concat(this.durationSwipe,"s ").concat(this.timingSwipe),opacity:1}),ht(this.decomp.enter.backButtonLabel).queue({transform:"translate3d(0, 0, 0)"},this.optSwipe),ht(this.decomp.enter.other).queue({opacity:1},this.optSwipe),ht([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background]).queue({transform:"translate3d(100%, 0, 0)"},this.optSwipe),ht(this.decomp.leave.toolbar).queue({opacity:0},this.optSwipe),ht(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(125%, 0, 0)"},this.optSwipe),ht(this.decomp.leave.backButtonLabel).queue({opacity:0,transform:"translate3d(".concat(this.delta.title,"px, 0, 0)"),transition:"opacity ".concat(this.durationSwipe,"s linear, transform ").concat(this.durationSwipe,"s ").concat(this.timingSwipe)}),ht(this.swipeShadow).queue({opacity:0,transform:"translate3d(".concat(this.maxWidth,"px, 0, 0)")},this.optSwipe).queue((function(t){i._reset(i.target.enter,i.target.leave),n&&n(),t()}))):ht.runAll(ht(t).queue({transform:"translate3D(0, 0, 0)",opacity:1},this.optSwipe),ht(e).queue({transform:"translate3D(100%, 0, 0)"},this.optSwipe).queue((function(a){i._reset(t,e),n&&n(),a()}))))}},{key:"_saveStyle",value:function(){var t=this;this._savedStyle=new WeakMap;for(var e=function(e){return t._savedStyle.set(e,e.getAttribute("style"))},n=arguments.length,i=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return"translate3d(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,", ").concat(t,", ").concat(e,")")},Vn=function(t){s(a,t);var n=h(a);function a(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o.timing,s=void 0===r?"cubic-bezier(0.3, .4, 0, .9)":r,l=o.delay,c=void 0===l?0:l,d=o.duration,h=void 0===d?.4:d,f=u(o,Fn);return i(this,a),(t=n.call(this,e({timing:s,delay:c,duration:h},f))).backgroundMask=Y.createElement('
'),t}return o(a,[{key:"_decompose",value:function(t){var e=t._getToolbarElement(),n=e._getToolbarLeftItemsElement(),i=e._getToolbarRightItemsElement(),a=function(t){for(var e=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .1, 1)":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.4:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).backgroundMask=Y.createElement('
'),t}return o(n,[{key:"push",value:function(t,e,i){var a=this;this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:"translate3D(0, 100%, 0)"},{transform:"translate3D(0, 0, 0)"}),ht(e,this.def).default({transform:"translate3D(0, 0, 0)",opacity:1},{transform:"translate3D(0, -10%, 0)",opacity:.9}).queue((function(t){a.backgroundMask.remove(),o(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=this;this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:"translate3D(0, -43px, 0)",opacity:.9},{transform:"translate3D(0, 0, 0)",opacity:1}).queue((function(t){a.backgroundMask.remove(),o(),i(),t()})),ht(e,this.def).default({transform:"translate3D(0, 0, 0)"},{transform:"translate3D(0, 100%, 0)"}))}}]),n}(Hn),Xn="translate3d(0, 0, 0)",Un=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.4:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"push",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:Xn,opacity:0},{transform:Xn,opacity:1}).queue((function(t){a(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(e,this.def).default({transform:Xn,opacity:1},{transform:Xn,opacity:0}).queue((function(t){a(),i(),t()})))}}]),n}(Hn),Yn=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .4, 1)":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.3:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).blackMaskOpacity=.4,t.backgroundMask=Y.createElement('
'),t}return o(n,[{key:"push",value:function(t,e,i){var a=this;this.backgroundMask.remove(),e.parentElement.insertBefore(this.backgroundMask,e.nextSibling);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(this.backgroundMask,this.def).default({transform:"translate3d(0, 0, 0)",opacity:0},{opacity:this.blackMaskOpacity}).queue((function(t){a.backgroundMask.remove(),t()})),ht(t,this.def).default({transform:"translate3d(100%, 0, 0)"},{transform:"translate3d(0, 0, 0)"}),ht(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(-45%, 0, 0)"}).queue((function(t){o(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=this;this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t.nextSibling);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(this.backgroundMask,this.def).default({transform:"translate3d(0, 0, 0)",opacity:this.blackMaskOpacity},{opacity:0}).queue((function(t){a.backgroundMask.remove(),t()})),ht(t,this.def).default({transform:"translate3d(-45%, 0, 0)",opacity:.9},{transform:"translate3d(0, 0, 0)",opacity:1}),ht(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(100%, 0, 0)"}).queue((function(t){o(),i(),t()})))}}]),n}(Hn),$n=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .1, 1)":o,s=a.delay,l=void 0===s?.05:s,c=a.duration,u=void 0===c?.4:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).backgroundMask=Y.createElement('
'),t}return o(n,[{key:"push",value:function(t,e,i){var a=this;this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e);var o=f(l(n.prototype),"block",this).call(this,t),r=ht(this.backgroundMask).wait(this.delay+this.duration).queue((function(t){a.backgroundMask.remove(),t()}));ht.runAll(r,ht(t,this.def).default({transform:"translate3d(0, 100%, 0)"},{transform:"translate3d(0, 0, 0)"}),ht(e,this.def).default({opacity:1},{opacity:.4}).queue((function(t){o(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=this;this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(this.backgroundMask).wait(this.delay+this.duration).queue((function(t){a.backgroundMask.remove(),t()})),ht(t,this.def).default({opacity:.4},{opacity:1}).queue((function(t){o(),i(),t()})),ht(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, 100%, 0)"}))}}]),n}(Hn),Gn=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=a.timingPop,l=void 0===s?"cubic-bezier(0.4, 0, 1, 1)":s,c=a.delay,u=void 0===c?0:c,d=a.duration,h=void 0===d?.2:d;return i(this,n),(t=e.call(this,{timing:r,delay:u,duration:h})).timingPop=l,t}return o(n,[{key:"push",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:"translate3D(0, 42px, 0)",opacity:0},{transform:"translate3D(0, 0, 0)",opacity:1}).queue((function(t){a(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(e,this.def).default({transform:"translate3D(0, 0, 0)",opacity:1},{css:{transform:"translate3D(0, 38px, 0)",opacity:0},timing:this.timingPop}).queue((function(t){a(),i(),t()})))}}]),n}(Hn),Kn={default:function(){return b.isAndroid()?Gn:Vn},slide:function(){return b.isAndroid()?Yn:Vn},lift:function(){return b.isAndroid()?$n:Wn},fade:function(){return b.isAndroid()?Gn:Un},"slide-ios":Vn,"slide-md":Yn,"lift-ios":Wn,"lift-md":$n,"fade-ios":Un,"fade-md":Gn,none:function(t){s(n,t);var e=h(n);function n(t){return i(this,n),e.call(this,t)}return o(n,[{key:"push",value:function(t,e,n){n()}},{key:"pop",value:function(t,e,n){n()}}]),n}(Hn)},Jn={ready:function(t,e){e()}},Qn=function(t){return"ONS-PAGE"!==t.nodeName&&Y.throw("Only page elements can be children of navigator")},Zn=function(t){s(a,t);var e=h(a);function a(){var t;return i(this,a),(t=e.call(this))._isRunning=!1,t._initialized=!1,t._pageLoader=Jt,t._pageMap=new WeakMap,t._updateAnimatorFactory(),t}return o(a,[{key:"animatorFactory",get:function(){return this._animatorFactory}},{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Kt||Y.throwPageLoader(),this._pageLoader=t}},{key:"_getPageTarget",value:function(){return this._page||this.getAttribute("page")}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"connectedCallback",value:function(){var t,e=this;(this.onDeviceBackButton=this._onDeviceBackButton.bind(this),b.isAndroid()&&"force"!==this.getAttribute("swipeable"))||(this._swipe=new Rn({element:this,getThreshold:function(){return Math.max(.2,parseFloat(e.getAttribute("swipe-threshold"))||0)},swipeMax:function(){var n={duration:t.durationSwipe,timing:t.timingSwipe};e._onSwipe&&e._onSwipe(1,n),Y.triggerElementEvent(e,"swipe",{ratio:1,animationOptions:n}),e[e.swipeMax?"swipeMax":"popPage"]({animator:t,swipeToPop:!0}),t=null},swipeMid:function(n,i){var a=n/i;e._onSwipe&&e._onSwipe(a),Y.triggerElementEvent(e,"swipe",{ratio:a}),t.translate(n,i,e.topPage.previousElementSibling,e.topPage)},swipeMin:function(){var n={duration:t.durationRestore,timing:t.timingSwipe};e._onSwipe&&e._onSwipe(0,n),Y.triggerElementEvent(e,"swipe",{ratio:0,animationOptions:n}),t.restore(e.topPage.previousElementSibling,e.topPage),t=null},ignoreSwipe:function(n,i){if(!e._isRunning&&e.children.length>1){var a=parseInt(e.getAttribute("swipe-target-width")||25,10);if("right"===n.gesture.direction&&a>i){var o=function(t){return/ons-back-button/i.test(t.tagName)};if(!o(n.target)&&!Y.findParent(n.target,o,(function(t){return/ons-page/i.test(t.tagName)}))){var r=(e.topPage.pushedOptions||{}).animation||e.animatorFactory._animation,s=Kn[r]instanceof Function?Kn[r].call():Kn[r];if(void 0!==s&&s.swipeable)return t=new s,!1}}}return!0}}),this.attributeChangedCallback("swipeable"));if(!this._initialized){this._initialized=!0;var n=Y.defer();this.loaded=n.promise,Jn.ready(this,(function(){var t=!Y.hasAnyComponentAsParent(e),i={animation:"none",show:t};if(0===e.pages.length&&e._getPageTarget())e.pushPage(e._getPageTarget(),i).then((function(){return n.resolve()}));else if(e.pages.length>0){for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{};e=this._preparePageAndOptions(null,e).options,Y.isInteger(e.times)&&e.times>1&&this._removePages(e.times);return this._popPage(e,(function(){return new Promise((function(e){t._pageLoader.unload(t.pages[t.pages.length-1]),e()}))}))}},{key:"_popPage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return Promise.resolve()};if(this._isRunning)return Promise.reject("popPage is already running.");if(this.pages.length<=1)return Promise.reject("ons-navigator's page stack is empty.");if(this._emitPrePopEvent())return Promise.reject("Canceled in prepop event.");var i=this.pages.length;return this._isRunning=!0,this.pages[i-2].updateBackButton(i-2>0),new Promise((function(a){var o=e.pages[i-1],r=e.pages[i-2];(t=Y.extend({},e.options||{},t)).data&&(r.data=Y.extend({},r.data||{},t.data||{}));o._hide(),r.style.display="",(t.animator||e._animatorFactory.newAnimator(t)).pop(e.pages[i-2],e.pages[i-1],(function(){n().then((function(){e._isRunning=!1,r._show(),Y.triggerElementEvent(e,"postpop",{leavePage:o,enterPage:r,navigator:e,swipeToPop:!!t.swipeToPop,onsBackButton:!!t.onsBackButton}),t.callback&&t.callback(r),a(r)}))}))})).catch((function(){return e._isRunning=!1}))}},{key:"pushPage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._preparePageAndOptions(t,n);t=i.page,n=i.options;var a=function(i){Qn(i),e._pageMap.set(i,t),(i=Y.extend(i,{data:n.data})).style.visibility="hidden"};return n.pageHTML?this._pushPage(n,(function(){return new Promise((function(t){Qt.load({page:n.pageHTML,parent:e,params:n.data},(function(e){a(e),t()}))}))})):this._pushPage(n,(function(){return new Promise((function(i,o){e._pageLoader.load({page:t,parent:e,params:n.data},(function(t){a(t),i()}),(function(t){e._isRunning=!1,o(t)}))}))}))}},{key:"_pushPage",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return Promise.resolve()};if(this._isRunning)return Promise.reject("pushPage is already running.");if(this._emitPrePushEvent())return Promise.reject("Canceled in prepush event.");this._isRunning=!0;var i=this.animationOptions;e=Y.extend({},this.options||{},{animationOptions:i},e);var a=this._animatorFactory.newAnimator(e);return n().then((function(){var n=t.pages.length,i=t.pages[n-1],o=e.leavePage||t.pages[n-2];return Qn(i),i.updateBackButton(n>(e._replacePage?2:1)),i.pushedOptions=Y.extend({},i.pushedOptions||{},e||{}),i.data=Y.extend({},i.data||{},e.data||{}),i.unload=i.unload||e.unload,new Promise((function(n){var r=function(){t._isRunning=!1,!1!==e.show&&setImmediate((function(){return i._show()})),Y.triggerElementEvent(t,"postpush",{leavePage:o,enterPage:i,navigator:t}),o&&(o.style.display="none"),e.callback&&e.callback(i),n(i)};i.style.visibility="",o?(o._hide(),a.push(i,o,r)):r()}))})).catch((function(e){throw t._isRunning=!1,e}))}},{key:"replacePage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.pushPage(t,n).then((function(t){return e.pages.length>1&&e._pageLoader.unload(e.pages[e.pages.length-2]),e._updateLastPageBackButton(),Promise.resolve(t)}))}},{key:"insertPage",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this._preparePageAndOptions(e,i);if(e=a.page,i=a.options,(t=this._normalizeIndex(t))>=this.pages.length)return this.pushPage(e,i);e="string"==typeof i.pageHTML?i.pageHTML:e;var o="string"==typeof i.pageHTML?Qt:this._pageLoader;return new Promise((function(a){o.load({page:e,parent:n},(function(o){Qn(o),n._pageMap.set(o,e),o=Y.extend(o,{data:i.data,pushedOptions:i}),i.animationOptions=Y.extend({},n.animationOptions,i.animationOptions||{}),o.style.display="none",n.insertBefore(o,n.pages[t]),n.topPage.updateBackButton(!0),setTimeout((function(){o=null,a(n.pages[t])}),1e3/60)}))}))}},{key:"removePage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(t=this._normalizeIndex(t))1&&void 0!==arguments[1]?arguments[1]:{},i=this._preparePageAndOptions(t,n);if(t=i.page,(n=i.options).animator||n.animation||n.pop||(n.animation="none"),n.page||n.pageHTML||!this._getPageTarget()||(t=n.page=this._getPageTarget()),n.pop)return this._removePages(),this.insertPage(0,t,{data:n.data}).then((function(){return e.popPage(n)}));var a=n.callback;return n.callback=function(t){e._removePages(),t.updateBackButton(!1),a&&a(t)},this.pushPage(t,n)}},{key:"bringPageTop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};-1===["number","string"].indexOf(n(t))&&Y.throw("First argument must be a page name or the index of an existing page. You supplied "+t);var i="number"==typeof t?this._normalizeIndex(t):this._lastIndexOfPage(t),a=this.pages[i];return i<0?this.pushPage(t,e):(e=this._preparePageAndOptions(a,e).options,i===this.pages.length-1?Promise.resolve(a):(a||Y.throw("Failed to find item "+t),this._isRunning?Promise.reject("pushPage is already running."):this._emitPrePushEvent()?Promise.reject("Canceled in prepush event."):(a.style.display="",a.style.visibility="hidden",a.parentNode.appendChild(a),this._pushPage(e))))}},{key:"_preparePageAndOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"!=n(e)&&Y.throw("options must be an object. You supplied "+e),null==t&&e.page&&(t=e.page),{page:t,options:e=Y.extend({},this.options||{},e,{page:t})}}},{key:"_removePages",value:function(t){var e=this.pages,n=void 0===t?0:e.length-t;n=n<0?1:n;for(var i=e.length-2;i>=n;i--)this._pageMap.delete(e[i]),this._pageLoader.unload(e[i])}},{key:"_updateLastPageBackButton",value:function(){var t=this.pages.length-1;t>=0&&this.pages[t].updateBackButton(t>0)}},{key:"_normalizeIndex",value:function(t){return t>=0?t:Math.abs(this.pages.length+t)%this.pages.length}},{key:"_onDeviceBackButton",value:function(t){this.pages.length>1?this.popPage():t.callParentHandler()}},{key:"_lastIndexOfPage",value:function(t){var e;for(e=this.pages.length-1;e>=0&&t!==this._pageMap.get(this.pages[e]);e--);return e}},{key:"_emitPreEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1;return Y.triggerElementEvent(this,"pre"+t,Y.extend({navigator:this,currentPage:this.pages[this.pages.length-1],cancel:function(){return n=!0}},e)),n}},{key:"_emitPrePushEvent",value:function(){return this._emitPreEvent("push")}},{key:"_emitPrePopEvent",value:function(){var t=this.pages.length;return this._emitPreEvent("pop",{leavePage:this.pages[t-1],enterPage:this.pages[t-2]})}},{key:"_createPageElement",value:function(t){var e=Y.createElement(Q.normalizePageHTML(t));return Qn(e),e}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=at.createHandler(this,t)}},{key:"topPage",get:function(){for(var t=this.lastElementChild;t&&"ONS-PAGE"!==t.tagName;)t=t.previousElementSibling;return t}},{key:"pages",get:function(){return Y.arrayFrom(this.children).filter((function(t){return"ONS-PAGE"===t.tagName}))}},{key:"onSwipe",get:function(){return this._onSwipe},set:function(t){!t||t instanceof Function||Y.throw('"onSwipe" must be a function'),this._onSwipe=t}},{key:"options",get:function(){return this._options},set:function(t){this._options=t}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?Z.parseAnimationOptionsString(this.getAttribute("animation-options")):{}},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"_isRunning",get:function(){return JSON.parse(this.getAttribute("_is-running"))},set:function(t){this.setAttribute("_is-running",t?"true":"false")}},{key:"_show",value:function(){var t=this;this.loaded.then((function(){return t.topPage&&t.topPage._show()}))}},{key:"_hide",value:function(){this.topPage&&this.topPage._hide()}},{key:"_destroy",value:function(){for(var t=this.pages.length-1;t>=0;t--)this._pageLoader.unload(this.pages[t]);this.remove()}}],[{key:"observedAttributes",get:function(){return["animation","swipeable"]}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof Hn||Y.throwAnimator("Navigator"),Kn[t]=e}},{key:"animators",get:function(){return Kn}},{key:"NavigatorAnimator",get:function(){return Hn}},{key:"events",get:function(){return["prepush","postpush","prepop","postpop","swipe"]}},{key:"rewritables",get:function(){return Jn}}]),a}(ne);k.Navigator=Zn,customElements.define("ons-navigator",Zn);var ti="toolbar",ei={"":"toolbar--*",".toolbar__left":"toolbar--*__left",".toolbar__center":"toolbar--*__center",".toolbar__right":"toolbar--*__right"},ni=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._visible=!0,It(d(t),(function(){t._compile()})),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,ti,ei);break;case"modifier":M.onModifierChanged(e,n,this,ei)}}},{key:"setVisibility",value:function(t){var e=this;It(this,(function(){if(e._visible=t,e.style.display=t?"":"none",e.parentNode){var n=Y.findChild(e.parentNode,".page__background");n&&(n.style.top=t?null:0);var i=Y.findChild(e.parentNode,".page__content");i&&(i.style.top=t?null:0)}}))}},{key:"show",value:function(){this.setVisibility(!0)}},{key:"hide",value:function(){this.setVisibility(!1)}},{key:"visible",get:function(){return this._visible},set:function(t){this.setVisibility(t)}},{key:"_getToolbarLeftItemsElement",value:function(){return this.querySelector(".left")||Q.nullElement}},{key:"_getToolbarCenterItemsElement",value:function(){return this.querySelector(".center")||Q.nullElement}},{key:"_getToolbarRightItemsElement",value:function(){return this.querySelector(".right")||Q.nullElement}},{key:"_getToolbarBackButtonLabelElement",value:function(){return this.querySelector("ons-back-button .back-button__label")||Q.nullElement}},{key:"_getToolbarBackButtonIconElement",value:function(){return this.querySelector("ons-back-button .back-button__icon")||Q.nullElement}},{key:"_compile",value:function(){O.prepare(this),this.classList.add(ti),this._ensureToolbarItemElements(),M.initModifier(this,ei)}},{key:"_ensureToolbarItemElements",value:function(){for(var t=this.childNodes.length-1;t>=0;t--)1!=this.childNodes[t].nodeType&&this.removeChild(this.childNodes[t]);var e=this._ensureToolbarElement("center");if(e.classList.add("toolbar__title"),1!==this.children.length||!this.children[0].classList.contains("center")){var n=this._ensureToolbarElement("left"),i=this._ensureToolbarElement("right");this.children[0]===n&&this.children[1]===e&&this.children[2]===i||(this.appendChild(n),this.appendChild(e),this.appendChild(i))}}},{key:"_ensureToolbarElement",value:function(t){if(Y.findChild(this,".toolbar__"+t)){var e=Y.findChild(this,".toolbar__"+t);return e.classList.add(t),e}var n=Y.findChild(this,"."+t)||Y.create("."+t);return n.classList.add("toolbar__"+t),n}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);Y.defineBooleanProperties(ni,["static"]),k.Toolbar=ni,customElements.define("ons-toolbar",ni);var ii="page",ai={"":"page--*",".page__content":"page--*__content",".page__background":"page--*__background"},oi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._deriveHooks(),t._defaultClassName=ii,t.classList.add(ii),t._initialized=!1,It(d(t),(function(){t._compile(),t._isShown=!1,t._contentElement=t._getContentElement(),t._backgroundElement=t._getBackgroundElement()})),t}return o(n,[{key:"_compile",value:function(){var t=this;O.prepare(this);var e=Y.findChild(this,"ons-toolbar"),n=Y.findChild(this,".page__background")||Y.findChild(this,".background")||document.createElement("div");n.classList.add("page__background"),this.insertBefore(n,!e&&this.firstChild||e&&e.nextSibling);var i=Y.findChild(this,".page__content")||Y.findChild(this,".content")||document.createElement("div");i.classList.add("page__content"),i.parentElement||Y.arrayFrom(this.childNodes).forEach((function(e){(1!==e.nodeType||t._elementShouldBeMoved(e))&&i.appendChild(e)})),this._tryToFillStatusBar(i),this.insertBefore(i,n.nextSibling),e&&Y.hasModifier(e,"transparent")||1!==i.children.length||!Y.isPageControl(i.children[0])||(this._defaultClassName+=" page--wrapper",this.attributeChangedCallback("class")),Y.findChild(this,"ons-bottom-toolbar")&&(this._defaultClassName+=" page-with-bottom-toolbar",this.attributeChangedCallback("class")),M.initModifier(this,ai)}},{key:"_elementShouldBeMoved",value:function(t){if(t.classList.contains("page__background"))return!1;var e=t.tagName.toLowerCase();if("ons-fab"===e)return!t.hasAttribute("position");return t.hasAttribute("inline")||-1===["script","ons-toolbar","ons-bottom-toolbar","ons-modal","ons-speed-dial","ons-dialog","ons-alert-dialog","ons-popover","ons-action-sheet"].indexOf(e)}},{key:"_tryToFillStatusBar",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._contentElement;Q.autoStatusBarFill((function(){Y.toggleAttribute(t,"status-bar-fill",!Y.findParent(t,(function(t){return t.hasAttribute("status-bar-fill")}))&&(t._canAnimateToolbar(e)||!Y.findChild(e,Y.isPageControl)))}))}},{key:"_canAnimateToolbar",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._contentElement;return!!Y.findChild(this,"ons-toolbar")||!!Y.findChild(t,(function(t){return Y.match(t,"ons-toolbar")&&!t.hasAttribute("inline")}))}},{key:"connectedCallback",value:function(){var t=this;Y.isAttached(this)&&It(this,(function(){t._tryToFillStatusBar(),t.hasAttribute("on-infinite-scroll")&&t.attributeChangedCallback("on-infinite-scroll",null,t.getAttribute("on-infinite-scroll")),t._initialized||(t._initialized=!0,setImmediate((function(){t.onInit&&t.onInit(),Y.triggerElementEvent(t,"init")})),Y.hasAnyComponentAsParent(t)||setImmediate((function(){return t._show()})))}))}},{key:"updateBackButton",value:function(t){this.backButton&&(t?this.backButton.show():this.backButton.hide())}},{key:"name",get:function(){return this.getAttribute("name")},set:function(t){this.setAttribute("name",t)}},{key:"backButton",get:function(){return this.querySelector("ons-back-button")}},{key:"onInfiniteScroll",get:function(){return this._onInfiniteScroll},set:function(t){var e=this;!t||t instanceof Function||Y.throw('"onInfiniteScroll" must be function or null'),It(this,(function(){t?e._onInfiniteScroll||(e._infiniteScrollLimit=.9,e._boundOnScroll=e._onScroll.bind(e),setImmediate((function(){return e._contentElement.addEventListener("scroll",e._boundOnScroll)}))):e._contentElement.removeEventListener("scroll",e._boundOnScroll),e._onInfiniteScroll=t}))}},{key:"_onScroll",value:function(){var t=this,e=this._contentElement,n=(e.scrollTop+e.clientHeight)/e.scrollHeight>=this._infiniteScrollLimit;this._onInfiniteScroll&&!this._loadingContent&&n&&(this._loadingContent=!0,this._onInfiniteScroll((function(){return t._loadingContent=!1})))}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=at.createHandler(this,t)}},{key:"scrollTop",get:function(){return this._contentElement.scrollTop},set:function(t){this._contentElement.scrollTop=t}},{key:"_getContentElement",value:function(){var t=Y.findChild(this,".page__content");if(t)return t;Y.throw('Fail to get ".page__content" element')}},{key:"_getBackgroundElement",value:function(){var t=Y.findChild(this,".page__background");if(t)return t;Y.throw('Fail to get ".page__background" element')}},{key:"_getBottomToolbarElement",value:function(){return Y.findChild(this,"ons-bottom-toolbar")||Q.nullElement}},{key:"_getToolbarElement",value:function(){return Y.findChild(this,"ons-toolbar")||document.createElement("ons-toolbar")}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,this._defaultClassName,ai);break;case"modifier":M.onModifierChanged(e,n,this,ai);break;case"on-infinite-scroll":this.onInfiniteScroll=null===n?null:function(t){var e=Y.findFromPath(n);i.onInfiniteScroll=e,e(t)}}}},{key:"_show",value:function(){!this._isShown&&Y.isAttached(this)&&(this._isShown=!0,this.setAttribute("shown",""),this.onShow&&this.onShow(),Y.triggerElementEvent(this,"show"),Y.propagateAction(this,"_show"))}},{key:"_hide",value:function(){this._isShown&&(this._isShown=!1,this.removeAttribute("shown"),this.onHide&&this.onHide(),Y.triggerElementEvent(this,"hide"),Y.propagateAction(this,"_hide"))}},{key:"_destroy",value:function(){this._hide(),this.onDestroy&&this.onDestroy(),Y.triggerElementEvent(this,"destroy"),this.onDeviceBackButton&&this.onDeviceBackButton.destroy(),Y.propagateAction(this,"_destroy"),this.remove()}},{key:"_deriveHooks",value:function(){var t=this;this.constructor.events.forEach((function(e){var n="on"+e.charAt(0).toUpperCase()+e.slice(1);Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:function(){return t["_".concat(n)]},set:function(e){e instanceof Function||Y.throw('"'.concat(n,'" hook must be a function')),t["_".concat(n)]=e.bind(t)}})}))}}],[{key:"observedAttributes",get:function(){return["modifier","on-infinite-scroll","class"]}},{key:"events",get:function(){return["init","show","hide","destroy"]}}]),n}(ne);k.Page=oi,customElements.define("ons-page",oi);var ri=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .4, 1)":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}},{key:"_animate",value:function(t,e){var n=e.from,i=e.to,a=e.options,o=e.callback,r=e.restore,s=void 0!==r&&r,l=e.animation;return a=Y.extend({},this.options,a),l&&(n=l.from,i=l.to),l=ht(t),s&&(l=l.saveStyle()),l=l.queue(n).wait(this.delay).queue({css:i,duration:this.duration,timing:this.timing}),s&&(l=l.restoreStyle()),o&&(l=l.queue((function(t){o(),t()}))),l}},{key:"_animateAll",value:function(t,e){var n=this;Object.keys(e).forEach((function(i){return n._animate(t[i],e[i]).play()}))}}]),n}(ae),si={out:{from:{opacity:1},to:{opacity:0}},in:{from:{opacity:0},to:{opacity:1}}},li=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"show",value:function(t,e){this._animateAll(t,{_mask:si.in,_popover:{animation:si.in,restore:!0,callback:e}})}},{key:"hide",value:function(t,e){this._animateAll(t,{_mask:si.out,_popover:{animation:si.out,restore:!0,callback:e}})}}]),n}(ri),ci=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"show",value:function(t,e){this._animateAll(t,{_mask:si.in,_popover:{from:{transform:"scale3d(1.3, 1.3, 1.0)",opacity:0},to:{transform:"scale3d(1.0, 1.0, 1.0)",opacity:1},restore:!0,callback:e}})}}]),n}(li),ui={".popover":"popover--*",".popover-mask":"popover-mask--*",".popover__content":"popover--*__content",".popover__arrow":"popover--*__arrow"},di={default:function(){return b.isAndroid()?li:ci},none:ri,"fade-ios":ci,"fade-md":li},hi={up:"bottom",left:"right",down:"top",right:"left"},fi=function(t){s(r,t);var a=h(r);function r(){var t;return i(this,r),(t=a.call(this))._boundOnChange=t._onChange.bind(d(t)),It(d(t),(function(){t._compile(),t.style.display="none"})),t}return o(r,[{key:"_scheme",get:function(){return ui}},{key:"_mask",get:function(){return Y.findChild(this,".popover-mask")}},{key:"_popover",get:function(){return Y.findChild(this,".popover")}},{key:"_content",get:function(){return Y.findChild(this._popover,".popover__content")}},{key:"_arrow",get:function(){return Y.findChild(this._popover,".popover__arrow")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:di,baseClass:ri,baseClassName:"PopoverAnimator",defaultAnimation:this.getAttribute("animation")||"default"})}},{key:"_toggleStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.style.display="block";var n=e.target;!n&&this.target&&(n=document.getElementById(this.target)),this._currentTarget=n,this._positionPopover(n)}else this.style.display="none",this._clearStyles()}},{key:"_positionPopover",value:function(t){var e=this._radius,n=this._content,i=this._margin,a=oe.getSafeAreaLengths(),o=oe.getSafeAreaDOMRect(),r=t.getBoundingClientRect(),s=Y.hasModifier(this,"material"),l=s&&this.hasAttribute("cover-target"),c=(Y.findParent(this,"ons-page")||document.body).getBoundingClientRect(),u=Math.max(c.top,o.top),d=Math.max(c.left,o.left),h=Math.min(c.bottom,o.bottom),f=Math.min(c.right,o.right),p={top:r.top-(u+i),left:r.left-(d+i),bottom:h-i-r.bottom,right:f-i-r.right},m={top:r.top+Math.round(r.height/2)-(u+i),left:r.left+Math.round(r.width/2)-(d+i),bottom:h-i-r.bottom+Math.round(r.height/2),right:f-i-r.right+Math.round(r.width/2)},g=this._calculateDirections(p),v=g.vertical,_=g.primary,b=g.secondary;this._currentDirection=_,Y.addModifier(this,_);var y,k=v?"width":"height",w=(y=window.getComputedStyle(n),{width:parseInt(y.getPropertyValue("width"),10),height:parseInt(y.getPropertyValue("height"),10)}),E=l?0:(v?r.height:r.width)+(s?0:14),C=Math.max(a[_]+i,a[_]+i+p[_]+E),A=Math.max(a[b]+i,a[b]+i+m[b]-w[k]/2);this._popover.style[_]=C+"px",this._popover.style[b]=A+"px",this._arrow.style[b]=Math.max(e,a[b]+i+m[b]-A)+"px"}},{key:"_calculateDirections",value:function(t){var e=(this.getAttribute("direction")||"up down left right").split(/\s+/).map((function(t){return hi[t]})).sort((function(e,n){return t[e]-t[n]}))[0],n="top"==e||"bottom"==e;return{vertical:n,primary:e,secondary:n?t.left\n
\n
\n
\n
\n '),i=n.querySelector(".popover__content");this.childNodes[0];)i.appendChild(this.childNodes[0]);this.appendChild(n)}this.hasAttribute("style")&&(this._popover.setAttribute("style",this.getAttribute("style")),this.removeAttribute("style")),M.initModifier(this,this._scheme)}}},{key:"show",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof(i=!t||"object"!==n(t)||t instanceof Event||t instanceof HTMLElement?e(e({},i),{},{target:t}):e({},t)).target?i.target=document.querySelector(i.target):i.target instanceof Event&&(i.target=i.target.target),!i.target&&this.target&&(i.target=document.getElementById(this.target)),i.target instanceof HTMLElement||Y.throw("Invalid target type or undefined"),f(l(r.prototype),"show",this).call(this,i)}},{key:"connectedCallback",value:function(){var t=this;f(l(r.prototype),"connectedCallback",this).call(this),window.addEventListener("resize",this._boundOnChange,!1),this._margin=this._margin||parseInt(window.getComputedStyle(this).getPropertyValue("top")),this._margin=this._margin||6,It(this,(function(){t._radius=parseInt(window.getComputedStyle(t._content).getPropertyValue("border-top-left-radius"))}))}},{key:"disconnectedCallback",value:function(){f(l(r.prototype),"disconnectedCallback",this).call(this),window.removeEventListener("resize",this._boundOnChange,!1)}},{key:"attributeChangedCallback",value:function(t,e,n){if("direction"===t)return this._boundOnChange();"modifier"===t&&this._currentDirection&&Y.addModifier(this,this._currentDirection),f(l(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(r),"observedAttributes",this)),["direction"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof ri||Y.throwAnimator("Popover"),di[t]=e}},{key:"animators",get:function(){return di}},{key:"PopoverAnimator",get:function(){return ri}}]),r}(ce);Y.defineBooleanProperties(fi,["cover-target"]),Y.defineStringProperties(fi,["target"]),k.Popover=fi,customElements.define("ons-popover",fi);var pi={".progress-bar":"progress-bar--*",".progress-bar__primary":"progress-bar--*__primary",".progress-bar__secondary":"progress-bar--*__secondary"},mi=Y.createElement('\n
\n
\n
\n
\n'),gi="indeterminate",vi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_compile",value:function(){this._isCompiled()?this._template=Y.findChild(this,".progress-bar"):this._template=mi.cloneNode(!0),this._primary=Y.findChild(this._template,".progress-bar__primary"),this._secondary=Y.findChild(this._template,".progress-bar__secondary"),this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),O.prepare(this),M.initModifier(this,pi)}},{key:"_isCompiled",value:function(){if(!Y.findChild(this,".progress-bar"))return!1;var t=Y.findChild(this,".progress-bar");return!!Y.findChild(t,".progress-bar__secondary")&&!!Y.findChild(t,".progress-bar__primary")}},{key:"attributeChangedCallback",value:function(t,e,n){"modifier"===t?(M.onModifierChanged(e,n,this,pi),this.hasAttribute(gi)&&this._updateDeterminate()):"value"===t||"secondary-value"===t?this._updateValue():t===gi&&this._updateDeterminate()}},{key:"_updateDeterminate",value:function(){var t=this;It(this,(function(){return Y.toggleModifier(t,gi,{force:t.hasAttribute(gi)})}))}},{key:"_updateValue",value:function(){var t=this;It(this,(function(){t._primary.style.width=t.hasAttribute("value")?t.getAttribute("value")+"%":"0%",t._secondary.style.width=t.hasAttribute("secondary-value")?t.getAttribute("secondary-value")+"%":"0%"}))}},{key:"value",get:function(){return parseInt(this.getAttribute("value")||"0")},set:function(t){("number"!=typeof t||t<0||t>100)&&Y.throw("Invalid value"),this.setAttribute("value",Math.floor(t))}},{key:"secondaryValue",get:function(){return parseInt(this.getAttribute("secondary-value")||"0")},set:function(t){("number"!=typeof t||t<0||t>100)&&Y.throw("Invalid value"),this.setAttribute("secondary-value",Math.floor(t))}},{key:"indeterminate",get:function(){return this.hasAttribute(gi)},set:function(t){t?this.setAttribute(gi,""):this.removeAttribute(gi)}}],[{key:"observedAttributes",get:function(){return["modifier","value","secondary-value",gi]}}]),n}(ne);k.ProgressBar=vi,customElements.define("ons-progress-bar",vi);var _i={".progress-circular":"progress-circular--*",".progress-circular__background":"progress-circular--*__background",".progress-circular__primary":"progress-circular--*__primary",".progress-circular__secondary":"progress-circular--*__secondary"},bi=Y.createElement('\n \n \n \n \n \n'),yi="indeterminate",ki=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){"modifier"===t?(M.onModifierChanged(e,n,this,_i),this.hasAttribute(yi)&&this._updateDeterminate()):"value"===t||"secondary-value"===t?this._updateValue():t===yi&&this._updateDeterminate()}},{key:"_updateDeterminate",value:function(){var t=this;It(this,(function(){return Y.toggleModifier(t,yi,{force:t.hasAttribute(yi)})}))}},{key:"_updateValue",value:function(){var t=this;this.hasAttribute("value")&&It(this,(function(){var e=Math.ceil(251.32*t.getAttribute("value")*.01);t._primary.style["stroke-dasharray"]=e+"%, 251.32%"})),this.hasAttribute("secondary-value")?It(this,(function(){var e=Math.ceil(251.32*t.getAttribute("secondary-value")*.01);t._secondary.style.display=null,t._secondary.style["stroke-dasharray"]=e+"%, 251.32%"})):It(this,(function(){t._secondary.style.display="none"}))}},{key:"value",get:function(){return parseInt(this.getAttribute("value")||"0")},set:function(t){("number"!=typeof t||t<0||t>100)&&Y.throw("Invalid value"),this.setAttribute("value",Math.floor(t))}},{key:"secondaryValue",get:function(){return parseInt(this.getAttribute("secondary-value")||"0")},set:function(t){("number"!=typeof t||t<0||t>100)&&Y.throw("Invalid value"),this.setAttribute("secondary-value",Math.floor(t))}},{key:"indeterminate",get:function(){return this.hasAttribute(yi)},set:function(t){t?this.setAttribute(yi,""):this.removeAttribute(yi)}},{key:"_compile",value:function(){this._isCompiled()?this._template=Y.findChild(this,".progress-circular"):this._template=bi.cloneNode(!0),this._primary=Y.findChild(this._template,".progress-circular__primary"),this._secondary=Y.findChild(this._template,".progress-circular__secondary"),this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),O.prepare(this),M.initModifier(this,_i)}},{key:"_isCompiled",value:function(){if(!Y.findChild(this,".progress-circular"))return!1;var t=Y.findChild(this,".progress-circular");return!!Y.findChild(t,".progress-circular__secondary")&&!!Y.findChild(t,".progress-circular__primary")}}],[{key:"observedAttributes",get:function(){return["modifier","value","secondary-value",yi]}}]),n}(ne);k.ProgressCircular=ki,customElements.define("ons-progress-circular",ki);var wi="initial",Ei=function(t,e){return Y.throw('"'.concat(t,'" must be ').concat(e))},Ci=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),(t=e.call(this))._onDrag=t._onDrag.bind(d(t)),t._onDragStart=t._onDragStart.bind(d(t)),t._onDragEnd=t._onDragEnd.bind(d(t)),t._onScroll=t._onScroll.bind(d(t)),t._setState(wi,!0),t._hide();var a=Y.defineListenerProperty(d(t),"pull"),o=a.onConnected,r=a.onDisconnected;return t._connectOnPull=o,t._disconnectOnPull=r,t}return o(n,[{key:"_setStyle",value:function(){var t=this.height+"px";E(this,{height:t,lineHeight:t}),""===this.style.display&&this._show()}},{key:"_onScroll",value:function(t){var e=this._pageElement;e.scrollTop<0&&(e.scrollTop=0)}},{key:"_canConsumeGesture",value:function(t){return"up"===t.direction||"down"===t.direction}},{key:"_onDragStart",value:function(t){var e=this;if(t.gesture&&!this.disabled){var n=t.gesture.center.clientY+this._pageElement.scrollTop,i=window.innerHeight;if(this._ignoreDrag=t.consumed||n>1*i,!this._ignoreDrag){var a=t.consume;t.consume=function(){a&&a(),e._ignoreDrag=!0,e._hide()},this._canConsumeGesture(t.gesture)&&(a&&a(),t.consumed=!0,this._show())}this._startScroll=this._pageElement.scrollTop}}},{key:"_onDrag",value:function(t){var e=this;if(t.gesture&&!this.disabled&&!this._ignoreDrag&&this._canConsumeGesture(t.gesture)){"none"===this.style.display&&this._show(),t.stopPropagation(),t.gesture.center.clientY,this._pageElement.scrollTop;var n=Math.max(t.gesture.deltaY-this._startScroll,0);if(n!==this._currentTranslation){var i=this.thresholdHeight;i>0&&n>=i?(t.gesture.stopDetect(),setImmediate((function(){return e._finish()}))):n>=this.height?this._setState("preaction"):this._setState(wi),this._translateTo(n)}}}},{key:"_onDragEnd",value:function(t){!t.gesture||this.disabled||this._ignoreDrag||(t.stopPropagation(),this._currentTranslation>0&&(this._currentTranslation>this.height?this._finish():this._translateTo(0,{animate:!0})))}},{key:"onAction",get:function(){return this._onAction},set:function(t){!t||t instanceof Function||Ei("onAction","function or null"),this._onAction=t}},{key:"_finish",value:function(){var t=this;this._setState("action"),this._translateTo(this.height,{animate:!0}),(this.onAction||function(t){return t()})((function(){t._translateTo(0,{animate:!0}),t._setState(wi)}))}},{key:"height",get:function(){return parseInt(this.getAttribute("height")||"64",10)},set:function(t){Y.isInteger(t)||Ei("height","integer"),this.setAttribute("height","".concat(t,"px"))}},{key:"thresholdHeight",get:function(){return parseInt(this.getAttribute("threshold-height")||"96",10)},set:function(t){Y.isInteger(t)||Ei("thresholdHeight","integer"),this.setAttribute("threshold-height","".concat(t,"px"))}},{key:"_setState",value:function(t,e){var n=this.state;this.setAttribute("state",t),e||n===this.state||Y.triggerElementEvent(this,"changestate",{pullHook:this,state:t,lastState:n})}},{key:"state",get:function(){return this.getAttribute("state")}},{key:"pullDistance",get:function(){return this._currentTranslation}},{key:"_show",value:function(){var t=this;setImmediate((function(){t.style.display="",t._pageElement&&(t._pageElement.style.marginTop="-".concat(t.height,"px"))}))}},{key:"_hide",value:function(){this.style.display="none",this._pageElement&&(this._pageElement.style.marginTop="")}},{key:"_translateTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0!=this._currentTranslation||0!=t){this._currentTranslation=t;var n=e.animate?{duration:.3,timing:"cubic-bezier(.1, .7, .1, 1)"}:{};Y.triggerElementEvent(this,"pull",{ratio:(t/this.height).toFixed(2),animationOptions:n});var i=this.hasAttribute("fixed-content")?this:this._pageElement;ht(i).queue({transform:"translate3d(0px, ".concat(t,"px, 0px)")},n).play((function(){0===t&&E.clear(i,"transition transform"),e.callback instanceof Function&&e.callback()}))}}},{key:"_disableDragLock",value:function(){this._dragLockDisabled=!0,this._setupListeners(!0)}},{key:"_setupListeners",value:function(t){var e=this,n=function(t){return e._pageElement["".concat(t,"EventListener")]("scroll",e._onScroll,!1)},i=function(t){var n={passive:!0};e._gestureDetector[t]("drag",e._onDrag,n),e._gestureDetector[t]("dragstart",e._onDragStart,n),e._gestureDetector[t]("dragend",e._onDragEnd,n)};this._gestureDetector&&(i("off"),this._gestureDetector.dispose(),this._gestureDetector=null),n("remove"),t&&(this._gestureDetector=new ft(this._pageElement,{dragMinDistance:1,dragDistanceCorrection:!1,dragLockToAxis:!this._dragLockDisabled,passive:!0}),i("on"),n("add"))}},{key:"connectedCallback",value:function(){this._currentTranslation=0,this._pageElement=this.parentNode,this._setupListeners(!0),this._setStyle(),this._connectOnPull()}},{key:"disconnectedCallback",value:function(){this._hide(),this._setupListeners(!1),this._disconnectOnPull()}},{key:"attributeChangedCallback",value:function(t,e,n){"height"===t&&this._pageElement&&this._setStyle()}}],[{key:"observedAttributes",get:function(){return["height"]}},{key:"events",get:function(){return["changestate","pull"]}}]),n}(ne);Y.defineBooleanProperties(Ci,["disabled","fixed-content"]),k.PullHook=Ci,customElements.define("ons-pull-hook",Ci);var Ai={"":"range--*",".range__input":"range--*__input",".range__focus-ring":"range--*__focus-ring"},Si="range__input--active",xi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._onMouseDown=t._onMouseDown.bind(d(t)),t._onMouseUp=t._onMouseUp.bind(d(t)),t._onTouchStart=t._onTouchStart.bind(d(t)),t._onTouchEnd=t._onTouchEnd.bind(d(t)),t._onInput=t._update.bind(d(t)),t._onDragstart=t._onDragstart.bind(d(t)),t._onDragend=t._onDragend.bind(d(t)),t}return o(n,[{key:"_compile",value:function(){f(l(n.prototype),"_compile",this).call(this),this._updateDisabled(this.hasAttribute("disabled"))}},{key:"_update",value:function(){var t=this._input,e=this._focusRing;t.style.backgroundSize="".concat(100*this._ratio,"% 2px"),e.value=this.value,""===t.min&&"0"===t.value||t.min===t.value?t.setAttribute("_zero",""):t.removeAttribute("_zero"),["min","max"].forEach((function(n){return e[n]=t[n]}))}},{key:"_scheme",get:function(){return Ai}},{key:"_template",get:function(){return'\n \n \n ')}},{key:"_defaultClassName",get:function(){return"range"}},{key:"type",get:function(){return"range"}},{key:"_onMouseDown",value:function(t){var e=this;this._input.classList.add(Si),setImmediate((function(){return e._input.focus()}))}},{key:"_onTouchStart",value:function(t){this._onMouseDown()}},{key:"_onMouseUp",value:function(t){this._input.classList.remove(Si)}},{key:"_onTouchEnd",value:function(t){this._onMouseUp(t)}},{key:"_onDragstart",value:function(t){t.consumed=!0,t.gesture.stopPropagation(),this._input.classList.add(Si),this.addEventListener("drag",this._onDrag)}},{key:"_onDrag",value:function(t){t.stopPropagation()}},{key:"_onDragend",value:function(t){this._input.classList.remove(Si),this.removeEventListener("drag",this._onDrag)}},{key:"_focusRing",get:function(){return this.children[1]}},{key:"_ratio",get:function(){var t=""===this._input.min?0:parseInt(this._input.min),e=""===this._input.max?100:parseInt(this._input.max);return(this.value-t)/(e-t)}},{key:"attributeChangedCallback",value:function(t,e,i){"disabled"===t&&this._updateDisabled(i),f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}},{key:"_updateDisabled",value:function(t){t?this.classList.add("range--disabled"):this.classList.remove("range--disabled")}},{key:"connectedCallback",value:function(){this._setupListeners(!0)}},{key:"disconnectedCallback",value:function(){this._setupListeners(!1)}},{key:"_setupListeners",value:function(t){var e=(t?"add":"remove")+"EventListener";Y[e](this,"touchstart",this._onTouchStart,{passive:!0}),this[e]("mousedown",this._onMouseDown),this[e]("mouseup",this._onMouseUp),this[e]("touchend",this._onTouchEnd),this[e]("dragstart",this._onDragstart),this[e]("dragend",this._onDragend),this[e]("input",this._onInput)}}],[{key:"observedAttributes",get:function(){return["disabled"].concat(p(yn.observedAttributes))}}]),n}(yn);k.Range=xi,customElements.define("ons-range",xi);var Pi=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n)}(ne);k.Row=Pi,customElements.define("ons-row",Pi);var Li="segment",Oi={"":"segment--*",".segment__item":"segment--*__item",".segment__input":"segment--*__input",".segment__button":"segment--*__button"},Mi=function(){var t=0;return function(){return"ons-segment-gen-"+t++}}(),Ti=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._segmentId=Mi(),t._tabbar=null,t._onChange=t._onChange.bind(d(t)),t._onTabbarPreChange=t._onTabbarPreChange.bind(d(t)),It(d(t),(function(){t._compile(),setImmediate((function(){return t._lastActiveIndex=t._tabbar?t._tabbar.getActiveTabIndex():t.getActiveButtonIndex()}))})),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(Li);for(var t=this.children.length-1;t>=0;t--){var e=this.children[t];e.classList.add("segment__item");var n=Y.findChild(e,".segment__input")||Y.create("input.segment__input");n.type="radio",n.value=t,n.name=n.name||this._segmentId,n.checked=!this.hasAttribute("tabbar-id")&&t===(this.activeIndex||0);var i=Y.findChild(e,".segment__button")||Y.create(".segment__button");if(i.parentElement!==e)for(;e.firstChild;)i.appendChild(e.firstChild);e.appendChild(n),e.appendChild(i)}M.initModifier(this,Oi)}},{key:"connectedCallback",value:function(){var t=this;It(this,(function(){if(t.hasAttribute("tabbar-id")){var e=Y.findParent(t,"ons-page");t._tabbar=e&&e.querySelector("#"+t.getAttribute("tabbar-id")),t._tabbar&&"ONS-TABBAR"===t._tabbar.tagName||Y.throw("No tabbar with id ".concat(t.getAttribute("tabbar-id")," was found.")),t._tabbar.setAttribute("hide-tabs",""),setImmediate((function(){var e=t._tabbar.getActiveTabIndex();t._setChecked(e),t.activeIndex=e})),t._tabbar.addEventListener("prechange",t._onTabbarPreChange)}})),this.addEventListener("change",this._onChange)}},{key:"disconnectedCallback",value:function(){var t=this;It(this,(function(){t._tabbar&&(t._tabbar.removeEventListener("prechange",t._onTabbarPreChange),t._tabbar=null)})),this.removeEventListener("change",this._onChange)}},{key:"_setChecked",value:function(t){this.children[t].firstElementChild.checked=!0}},{key:"setActiveButton",value:function(t,e){return this._tabbar?this._tabbar.setActiveTab(t,e):(this._setChecked(t),this._postChange(t),Promise.resolve(t))}},{key:"getActiveButtonIndex",value:function(){for(var t=this.children.length-1;t>=0;t--)if(this.children[t].firstElementChild.checked)return t;return-1}},{key:"_onChange",value:function(t){t.stopPropagation(),this._tabbar?this._tabbar.setActiveTab(this.getActiveButtonIndex(),{reject:!1}):this._postChange(this.getActiveButtonIndex())}},{key:"_onTabbarPreChange",value:function(t){var e=this;setImmediate((function(){t.detail.canceled||(e._setChecked(t.index),e._postChange(t.index))}))}},{key:"_postChange",value:function(t){Y.triggerElementEvent(this,"postchange",{index:t,activeIndex:t,lastActiveIndex:this._lastActiveIndex,segmentItem:this.children[t]}),this._lastActiveIndex=t,this.activeIndex=t}},{key:"activeIndex",get:function(){return parseInt(this.getAttribute("active-index"))},set:function(t){null!=t&&this.setAttribute("active-index",t)}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,Li,Oi);break;case"modifier":M.onModifierChanged(e,n,this,Oi);break;case"active-index":It(this,(function(){i.getActiveButtonIndex()!==i.activeIndex&&i.setActiveButton(i.activeIndex)}))}}}],[{key:"observedAttributes",get:function(){return["class","modifier","active-index"]}},{key:"events",get:function(){return["postchange"]}}]),n}(ne);Y.defineBooleanProperties(Ti,["disabled"]),k.Segment=Ti,customElements.define("ons-segment",Ti);var Ii={"":"select-* select--*",".select-input":"select-input--*"},Di="select",Ni=["autofocus","disabled","form","multiple","name","required","size"],Bi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t._deriveGetters(),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,Di,Ii);break;case"modifier":M.onModifierChanged(e,n,this,Ii)}Ni.indexOf(t)>=0&&It(this,(function(){return i._updateBoundAttributes()}))}},{key:"_select",get:function(){return this.querySelector("select")}},{key:"_updateBoundAttributes",value:function(){var t=this;Ni.forEach((function(e){t.hasAttribute(e)?t._select.setAttribute(e,t.getAttribute(e)):t._select.removeAttribute(e)}))}},{key:"_compile",value:function(){O.prepare(this),this.classList.add(Di);var t=this._select||document.createElement("select");!t.id&&this.hasAttribute("select-id")&&(t.id=this.getAttribute("select-id")),t.classList.add("select-input"),this._select||(Y.arrayFrom(this.childNodes).forEach((function(e){return t.appendChild(e)})),this.appendChild(t)),M.initModifier(this,Ii)}},{key:"_deriveGetters",value:function(){var t=this;["disabled","length","multiple","name","options","selectedIndex","size","value","form","type"].forEach((function(e){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return t._select[e]},set:-1===["form","type"].indexOf(e)?function(n){return It(t,(function(){return t._select[e]=n}))}:void 0})}))}},{key:"add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._select.add(t,e)}},{key:"remove",value:function(t){void 0===t?Element.prototype.remove.call(this):this._select.remove(t)}}],[{key:"observedAttributes",get:function(){return["modifier","class"].concat(Ni)}}]),n}(ne);k.Select=Bi,customElements.define("ons-select",Bi);var Ri="fab fab--mini speed-dial__item",Hi={"":"fab--* speed-dial__item--*"},qi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t._boundOnClick=t._onClick.bind(d(t)),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,Ri,Hi);break;case"modifier":M.onModifierChanged(e,n,this,Hi),Y.addModifier(this,"mini");break;case"ripple":this._updateRipple()}}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1)}},{key:"_updateRipple",value:function(){Y.updateRipple(this)}},{key:"_onClick",value:function(t){t.stopPropagation()}},{key:"_compile",value:function(){var t=this;O.prepare(this),Ri.split(/\s+/).forEach((function(e){return t.classList.add(e)})),Y.addModifier(this,"mini"),this._updateRipple(),M.initModifier(this,Hi)}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","class"]}}]),n}(ne);Y.defineBooleanProperties(qi,["ripple"]),k.SpeedDialItem=qi,customElements.define("ons-speed-dial-item",qi);var zi="speed-dial",Fi={"":"speed-dial--*"},ji=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),It(d(t=e.call(this)),(function(){t._compile()})),t._boundOnClick=t._onClick.bind(d(t));var a=Y.defineListenerProperty(d(t),"click"),o=a.onConnected,r=a.onDisconnected;return t._connectOnClick=o,t._disconnectOnClick=r,t}return o(n,[{key:"_compile",value:function(){this.classList.add(zi),O.prepare(this),this._updateRipple(),M.initModifier(this,Fi),this.hasAttribute("direction")?this._updateDirection(this.getAttribute("direction")):this._updateDirection("up"),this._updatePosition()}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,zi,Fi);break;case"modifier":M.onModifierChanged(e,n,this,Fi);break;case"ripple":It(this,(function(){return i._updateRipple()}));break;case"direction":It(this,(function(){return i._updateDirection(n)}));break;case"position":It(this,(function(){return i._updatePosition()}));break;case"open":this._ignoreOpenSideEffect||It(this,(function(){return i._updateOpen(e)}))}}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1),this._connectOnClick()}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1),this._disconnectOnClick()}},{key:"items",get:function(){return Y.arrayFrom(this.querySelectorAll("ons-speed-dial-item"))}},{key:"_fab",get:function(){return Y.findChild(this,"ons-fab")}},{key:"_onClick",value:function(t){var e=this;setTimeout((function(){if(!t.defaultPrevented&&!e.disabled&&e.visible)return e.toggleItems()}))}},{key:"_show",value:function(){return this.inline?Promise.resolve():this.show()}},{key:"_hide",value:function(){var t=this;return new Promise((function(e){t.inline?e():setImmediate((function(){return t.hide().then(e)}))}))}},{key:"_updateRipple",value:function(){this._fab&&(this.hasAttribute("ripple")?this._fab.setAttribute("ripple",""):this._fab.removeAttribute("ripple"))}},{key:"_updateDirection",value:function(t){for(var e=this.items,n=0;n=0?"translate3d(0px, -".concat(Y.globals.fabOffset||0,"px, 0px) "):""}},{key:"show",value:function(){return this._fab.show(),E(this,{transform:this._getTranslate}),Promise.resolve()}},{key:"hide",value:function(){var t=this;return this.hideItems().then((function(){return t._fab.hide()}))}},{key:"showItems",value:function(){var t=this.open;return this._ignoreOpenSideEffect=!0,this.open=!0,this._ignoreOpenSideEffect=!1,this._updateOpen(t)}},{key:"hideItems",value:function(){var t=this.open;return this._ignoreOpenSideEffect=!0,this.open=!1,this._ignoreOpenSideEffect=!1,this._updateOpen(t)}},{key:"_updateOpen",value:function(t){this.open&&(this.hasAttribute("direction")?this._updateDirection(this.getAttribute("direction")):this._updateDirection("up"));var e=0;if(t!==this.open){for(var n=this.items,i=0;i1&&void 0!==arguments[1]?arguments[1]:{};this._page=t;var i=n.callback||function(){};return new Promise((function(n){var a=e._content||null;e._pageLoader.load({page:t,parent:e},(function(t){a&&(e._pageLoader.unload(a),a=null),setImmediate((function(){return e._show()})),i(t),n(t)}))}))}},{key:"_show",value:function(){this._content&&this._content._show()}},{key:"_hide",value:function(){this._content&&this._content._hide()}},{key:"_destroy",value:function(){this._content&&this._pageLoader.unload(this._content),this.remove()}}],[{key:"observedAttributes",get:function(){return[]}},{key:"rewritables",get:function(){return Vi}}]),n}(ne);k.SplitterContent=Wi,customElements.define("ons-splitter-content",Wi);var Xi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._boundOnClick=t._onClick.bind(d(t)),It(d(t),(function(){t.parentNode._sides.every((function(t){return"split"===t.mode}))&&t.setAttribute("style","display: none !important")})),t}return o(n,[{key:"_onClick",value:function(t){this.onClick instanceof Function?this.onClick():Y.match(this.parentNode,"ons-splitter")&&this.parentNode._sides.forEach((function(t){return t.close("left").catch((function(){}))})),t.stopPropagation()}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick)}}],[{key:"observedAttributes",get:function(){return[]}}]),n}(ne);k.SplitterMask=Xi,customElements.define("ons-splitter-mask",Xi);var Ui=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .1, 1)":a,r=t.duration,s=void 0===r?.3:r,l=t.delay,c=void 0===l?0:l;return i(this,n),e.call(this,{timing:o,duration:s,delay:c})}return o(n,[{key:"updateOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Y.extend(this,{timing:this.timing,duration:this.duration,delay:this.delay},t)}},{key:"activate",value:function(t){var e=this,n=t.parentNode;It(n,(function(){e._side=t,e._oppositeSide=n.right!==t&&n.right||n.left!==t&&n.left,e._content=n.content,e._mask=n.mask}))}},{key:"deactivate",value:function(){this.clearTransition(),this._mask&&this.clearMask(),this._content=this._side=this._oppositeSide=this._mask=null}},{key:"minus",get:function(){return"right"===this._side.side?"-":""}},{key:"clearTransition",value:function(){var t=this;"side mask content".split(/\s+/).forEach((function(e){return t["_"+e]&&E.clear(t["_"+e],"transform transition")}))}},{key:"clearMask",value:function(){this._oppositeSide&&"split"!==this._oppositeSide.mode&&this._oppositeSide.isOpen||(this._mask.style.opacity="",this._mask.style.display="none")}},{key:"translate",value:function(t){}},{key:"open",value:function(t){t()}},{key:"close",value:function(t){t()}}]),n}(ae),Yi=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"translate",value:function(t){this._mask.style.display="block",ht(this._side).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}).play()}},{key:"open",value:function(t){ht.runAll(ht(this._side).wait(this.delay).queue({transform:"translate3d(".concat(this.minus,"100%, 0, 0)")},this.def).queue((function(e){e(),t&&t()})),ht(this._mask).wait(this.delay).queue({display:"block"}).queue({opacity:"1"},{duration:this.duration,timing:"linear"}))}},{key:"close",value:function(t){ht.runAll(ht(this._side).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def).queue((function(e){t&&t(),e()})),ht(this._mask).wait(this.delay).queue({opacity:"0"},{duration:this.duration,timing:"linear"}).queue({display:"none"}))}}]),n}(Ui),$i=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_getSlidingElements",value:function(){var t=[this._side,this._content];return this._oppositeSide&&"split"===this._oppositeSide.mode&&t.push(this._oppositeSide),t}},{key:"translate",value:function(t){this._slidingElements||(this._slidingElements=this._getSlidingElements()),this._mask.style.display="block",ht(this._slidingElements).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}).play()}},{key:"open",value:function(t){var e=this,n=this._side.offsetWidth;this._slidingElements=this._getSlidingElements(),ht.runAll(ht(this._slidingElements).wait(this.delay).queue({transform:"translate3d(".concat(this.minus+n,"px, 0, 0)")},this.def).queue((function(n){e._slidingElements=null,n(),t&&t()})),ht(this._mask).wait(this.delay).queue({display:"block"}))}},{key:"close",value:function(t){var e=this;this._slidingElements=this._getSlidingElements(),ht.runAll(ht(this._slidingElements).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def).queue((function(i){e._slidingElements=null,f(l(n.prototype),"clearTransition",e).call(e),t&&t(),i()})),ht(this._mask).wait(this.delay).queue({display:"none"}))}}]),n}(Ui),Gi=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_getSlidingElements",value:function(){var t=[this._content,this._mask];return this._oppositeSide&&"split"===this._oppositeSide.mode&&t.push(this._oppositeSide),t}},{key:"activate",value:function(t){f(l(n.prototype),"activate",this).call(this,t),"collapse"===t.mode&&this._setStyles(t)}},{key:"deactivate",value:function(){this._side&&this._unsetStyles(this._side),f(l(n.prototype),"deactivate",this).call(this)}},{key:"_setStyles",value:function(t){E(t,{left:"right"===t.side?"auto":0,right:"right"===t.side?0:"auto",zIndex:0,backgroundColor:"black",transform:this._generateBehindPageStyle(0).container.transform,display:"none"});var e=t.parentElement;It(e,(function(){return e.content&&E(e.content,{boxShadow:"0 0 12px 0 rgba(0, 0, 0, 0.2)"})}))}},{key:"_unsetStyles",value:function(t){E.clear(t,"left right zIndex backgroundColor display"),t._content&&(t._content.style.opacity=""),this._oppositeSide&&"split"!==this._oppositeSide.mode||t.parentElement.content&&E.clear(t.parentElement.content,"boxShadow")}},{key:"_generateBehindPageStyle",value:function(t){var e=this.maxWidth,n=(t-e)/e*10;return{content:{opacity:1+(n=isNaN(n)?0:Math.max(Math.min(n,0),-10))/100},container:{transform:"translate3d(".concat((this.minus?-1:1)*n,"%, 0, 0)")}}}},{key:"translate",value:function(t){this._side.style.display="",this._side.style.zIndex=1,this.maxWidth=this.maxWidth||this._getMaxWidth();var e=this._generateBehindPageStyle(Math.min(t,this.maxWidth));this._slidingElements||(this._slidingElements=this._getSlidingElements()),this._mask.style.display="block",ht.runAll(ht(this._slidingElements).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}),ht(this._side._content).queue(e.content),ht(this._side).queue(e.container))}},{key:"open",value:function(t){var e=this;this._side.style.display="",this._side.style.zIndex=1,this.maxWidth=this.maxWidth||this._getMaxWidth();var n=this._generateBehindPageStyle(this.maxWidth);this._slidingElements=this._getSlidingElements(),setTimeout((function(){ht.runAll(ht(e._slidingElements).wait(e.delay).queue({transform:"translate3d(".concat(e.minus+e.maxWidth,"px, 0, 0)")},e.def),ht(e._mask).wait(e.delay).queue({display:"block"}),ht(e._side._content).wait(e.delay).queue(n.content,e.def),ht(e._side).wait(e.delay).queue(n.container,e.def).queue((function(n){e._slidingElements=null,n(),t&&t()})))}),1e3/60)}},{key:"close",value:function(t){var e=this,n=this._generateBehindPageStyle(0);this._slidingElements=this._getSlidingElements(),ht.runAll(ht(this._slidingElements).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def),ht(this._mask).wait(this.delay).queue({display:"none"}),ht(this._side._content).wait(this.delay).queue(n.content,this.def),ht(this._side).wait(this.delay).queue(n.container,this.def).queue((function(n){e._slidingElements=null,e._side.style.zIndex=0,e._side.style.display="none",e._side._content.style.opacity="",t&&t(),n()})))}},{key:"_getMaxWidth",value:function(){return this._side.offsetWidth}}]),n}(Ui),Ki={default:Yi,overlay:Yi,push:$i,reveal:Gi},Ji=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._onModeChange=t._onModeChange.bind(d(t)),It(d(t),(function(){!t.mask&&t.appendChild(document.createElement("ons-splitter-mask")),t._layout()})),t}return o(n,[{key:"_getSide",value:function(t){return Y.findChild(this,(function(e){return Y.match(e,"ons-splitter-side")&&e.getAttribute("side")===t}))}},{key:"left",get:function(){return this._getSide("left")}},{key:"right",get:function(){return this._getSide("right")}},{key:"side",get:function(){return Y.findChild(this,"ons-splitter-side")}},{key:"_sides",get:function(){return[this.left,this.right].filter((function(t){return t}))}},{key:"content",get:function(){return Y.findChild(this,"ons-splitter-content")}},{key:"topPage",get:function(){return this.content._content}},{key:"mask",get:function(){return Y.findChild(this,"ons-splitter-mask")}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=at.createHandler(this,t)}},{key:"_onDeviceBackButton",value:function(t){this._sides.some((function(t){return!!t.isOpen&&t.close()}))||t.callParentHandler()}},{key:"_onModeChange",value:function(t){var e=this;t.target.parentNode&&It(this,(function(){e._layout()}))}},{key:"_layout",value:function(){var t=this;this._sides.forEach((function(e){t.content&&(t.content.style[e.side]="split"===e.mode?e.style.width:0)}))}},{key:"connectedCallback",value:function(){this.onDeviceBackButton=this._onDeviceBackButton.bind(this),this.addEventListener("modechange",this._onModeChange,!1)}},{key:"disconnectedCallback",value:function(){this._backButtonHandler.destroy(),this._backButtonHandler=null,this.removeEventListener("modechange",this._onModeChange,!1)}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"_show",value:function(){Y.propagateAction(this,"_show")}},{key:"_hide",value:function(){Y.propagateAction(this,"_hide")}},{key:"_destroy",value:function(){Y.propagateAction(this,"_destroy"),this.remove()}}],[{key:"registerAnimator",value:function(t,e){e instanceof SplitterAnimator||Y.throwAnimator("Splitter"),Ki[t]=e}},{key:"SplitterAnimator",get:function(){return SplitterAnimator}},{key:"animators",get:function(){return Ki}}]),n}(ne);k.Splitter=Ji,customElements.define("ons-splitter",Ji);var Qi="split",Zi="collapse",ta="closed",ea="open",na="changing",ia={ready:function(t,e){setImmediate(e)}},aa=function(){function t(e,n){i(this,t),this._element=e,this._onChange=this._onChange.bind(this),n&&this.changeTarget(n)}return o(t,[{key:"changeTarget",value:function(t){this.disable(),this._target=t,t&&(this._orientation=-1!==["portrait","landscape"].indexOf(t),this.activate())}},{key:"_match",value:function(t){return this._orientation?this._target===(t.isPortrait?"portrait":"landscape"):t.matches}},{key:"_onChange",value:function(t){this._element._updateMode(this._match(t)?Zi:Qi)}},{key:"activate",value:function(){this._orientation?(qt.on("change",this._onChange),this._onChange({isPortrait:qt.isPortrait()})):(this._queryResult=window.matchMedia(this._target),this._queryResult.addListener(this._onChange),this._onChange(this._queryResult))}},{key:"disable",value:function(){this._orientation?qt.off("change",this._onChange):this._queryResult&&(this._queryResult.removeListener(this._onChange),this._queryResult=null)}}]),t}(),oa=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._page=null,t._state=ta,t._lock=new Ut,t._pageLoader=Jt,t._collapseDetection=new aa(d(t)),t._animatorFactory=new Z({animators:Ji.animators,baseClass:Ui,baseClassName:"SplitterAnimator",defaultAnimation:t.getAttribute("animation")}),It(d(t),(function(){t.attributeChangedCallback("width"),t.hasAttribute("side")||t.setAttribute("side","left"),ia.ready(d(t),(function(){var e=t._page||t.getAttribute("page");e&&t.load(e)}))})),t}return o(n,[{key:"connectedCallback",value:function(){var t=this;Y.match(this.parentNode,"ons-splitter")||Y.throw("Parent must be an ons-splitter element"),this._swipe||(this._swipe=new Rn({element:this,elementHandler:this.parentElement,swipeMax:function(){t._onSwipe&&t._onSwipe(1,t._animationOpt),Y.triggerElementEvent(t,"swipe",{ratio:1,animationOptions:t._animationOpt}),t.open()},swipeMid:function(e,n){var i=e/n;t._onSwipe&&t._onSwipe(i),Y.triggerElementEvent(t,"swipe",{ratio:i}),t._animator.translate(e)},swipeMin:function(){t._onSwipe&&t._onSwipe(0,t._animationOpt),Y.triggerElementEvent(t,"swipe",{ratio:0,animationOptions:t._animationOpt}),t.close()},getThreshold:function(){return Math.max(0,Math.min(1,parseFloat(t.getAttribute("open-threshold"))||.3))},getSide:function(){return t.side},isInitialState:function(){var e=t._state===ta;return t._state=na,e},ignoreSwipe:function(e,n){var i,a=t.isOpen,o=Math.max(0,parseInt(t.getAttribute("swipe-target-width"),10)||0);return t._mode===Qi||t._lock.isLocked()||t._isOtherSideOpen()||(i=e.gesture.direction,!("left"===t.side?"left"===i&&a||"right"===i&&!a:"left"===i&&!a||"right"===i&&a))||!a&&0!==o&&n>o}}),this.attributeChangedCallback("swipeable")),It(this,(function(){t.constructor.observedAttributes.forEach((function(e){return t.attributeChangedCallback(e,null,t.getAttribute(e))}))}))}},{key:"side",get:function(){return"right"===this.getAttribute("side")?"right":"left"},set:function(t){t?this.setAttribute("side",t):tihs.removeAttribute("side")}},{key:"disconnectedCallback",value:function(){this._swipe&&this._swipe.dispose(),this._animator=this._animationOpt=this._swipe=null}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"swipeable":this._swipe&&this._swipe.update();break;case"width":n=this.getAttribute("width"),this.style.width=/^\d+(px|%)$/.test(n)?n:"80%";break;case"animation":case"animation-options":this._updateAnimation();break;default:this[Y.camelize("_update-".concat(t))](n)}}},{key:"_emitEvent",value:function(t){if("pre"!==t.slice(0,3))return Y.triggerElementEvent(this,t,{side:this});var e=!1;return Y.triggerElementEvent(this,t,{side:this,cancel:function(){return e=!0}}),e}},{key:"_isOtherSideOpen",value:function(){var t=this;return!!Y.findChild(this.parentElement,(function(e){return e instanceof t.constructor&&e!==t&&e._mode===Zi&&e.isOpen}))}},{key:"_updateCollapse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAttribute("collapse");return null===t||"split"===t?(this._collapseDetection.disable(),this._updateMode(Qi)):""===t||"collapse"===t?(this._collapseDetection.disable(),this._updateMode(Zi)):void this._collapseDetection.changeTarget(t)}},{key:"_updateMode",value:function(t){t!==this._mode&&(this._mode=t,this.setAttribute("mode",t),t===Qi?(this._animator&&this._animator.deactivate(),this._state=ta):(this._animator&&this._animator.activate(this),this._state===ea&&this._animator.open()),Y.triggerElementEvent(this,"modechange",{side:this,mode:t}))}},{key:"_updateAnimation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAttribute("animation");this.parentNode&&(this._animator&&this._animator.deactivate(),this._animator=this._animatorFactory.newAnimator({animation:t}),this._animator.activate(this),this._animationOpt={timing:this._animator.duration,duration:this._animator.duration},this._animator.updateOptions(this.animationOptions))}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"_content",get:function(){return this.children[0]}},{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Kt||Y.throwPageLoader(),this._pageLoader=t}},{key:"mode",get:function(){return this._mode}},{key:"onSwipe",get:function(){return this._onSwipe},set:function(t){!t||t instanceof Function||Y.throw('"onSwipe" must be a function'),this._onSwipe=t}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?Z.parseAnimationOptionsString(this.getAttribute("animation-options")):{}},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"isOpen",get:function(){return this._mode===Zi&&this._state!==ta},set:function(t){this.toggle({},t)}},{key:"open",value:function(t){return this.toggle(t,!0)}},{key:"close",value:function(t){return this.toggle(t,!1)}},{key:"toggle",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i="boolean"==typeof n?n:!this.isOpen,a=i?"open":"close",o=i?ea:ta;if(this._mode===Qi)return Promise.resolve(!1);if(this._state===o)return Promise.resolve(this);if(this._lock.isLocked())return Promise.reject("Another splitter-side action is already running.");if(i&&this._isOtherSideOpen())return Promise.reject("Another menu is already open.");if(this._emitEvent("pre".concat(a)))return Promise.reject("Canceled in pre".concat(a," event."));var r=this._lock.lock();return this._state=na,e.animation&&this._updateAnimation(e.animation),new Promise((function(n){t._animator[a]((function(){Y.iosPageScrollFix(i),t._state=o,r(),t._emitEvent("post".concat(a)),e.callback instanceof Function&&e.callback(t),n(t)}))}))}},{key:"load",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._page=t;var i=n.callback||function(){};return new Promise((function(n){var a=e._content||null;e._pageLoader.load({page:t,parent:e},(function(t){a&&(e._pageLoader.unload(a),a=null),setImmediate((function(){return e._show()})),i(t),n(t)}))}))}},{key:"_show",value:function(){this._content&&this._content._show()}},{key:"_hide",value:function(){this._content&&this._content._hide()}},{key:"_destroy",value:function(){this._content&&this._pageLoader.unload(this._content),this.remove()}}],[{key:"observedAttributes",get:function(){return["animation","width","collapse","swipeable","animation-options"]}},{key:"events",get:function(){return["preopen","postopen","preclose","postclose","modechange","swipe"]}},{key:"rewritables",get:function(){return ia}}]),n}(ne);Y.defineBooleanProperties(oa,["swipeable"]),k.SplitterSide=oa,customElements.define("ons-splitter-side",oa);var ra={"":"switch--*",".switch__input":"switch--*__input",".switch__handle":"switch--*__handle",".switch__toggle":"switch--*__toggle"},sa={ios:[1,21],material:[0,16]},la=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){t.attributeChangedCallback("modifier",null,t.getAttribute("modifier"))})),t._onChange=t._onChange.bind(d(t)),t._onRelease=t._onRelease.bind(d(t)),t._lastTimeStamp=0,t}return o(n,[{key:"_scheme",get:function(){return ra}},{key:"_defaultClassName",get:function(){return"switch"}},{key:"_template",get:function(){return'\n \n
\n
\n
\n
\n
\n ')}},{key:"type",get:function(){return"checkbox"}},{key:"_getPosition",value:function(t){var e=this._locations;return Math.min(e[1],Math.max(e[0],this._startX+t.gesture.deltaX))}},{key:"_emitChangeEvent",value:function(){Y.triggerElementEvent(this,"change",{value:this.checked,switch:this,isInteractive:!0})}},{key:"_onChange",value:function(t){t&&t.stopPropagation&&t.stopPropagation(),this._emitChangeEvent()}},{key:"_onClick",value:function(t){(t.target.classList.contains("".concat(this.defaultElementClass,"__touch"))||t.timeStamp-this._lastTimeStamp<50)&&t.preventDefault(),this._lastTimeStamp=t.timeStamp}},{key:"_onHold",value:function(t){this.disabled||(M.addModifier(this,"active"),document.addEventListener("release",this._onRelease))}},{key:"_onDragStart",value:function(t){this.disabled||-1===["left","right"].indexOf(t.gesture.direction)?M.removeModifier(this,"active"):(t.consumed=!0,M.addModifier(this,"active"),this._startX=this._locations[this.checked?1:0],this.addEventListener("drag",this._onDrag),document.addEventListener("release",this._onRelease))}},{key:"_onDrag",value:function(t){t.stopPropagation(),this._handle.style.left=this._getPosition(t)+"px"}},{key:"_onRelease",value:function(t){var e=this._locations,n=this._getPosition(t),i=this.checked;this.checked=n>=(e[0]+e[1])/2,this.checked!==i&&this._emitChangeEvent(),this.removeEventListener("drag",this._onDrag),document.removeEventListener("release",this._onRelease),this._handle.style.left="",M.removeModifier(this,"active")}},{key:"click",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.disabled||(this.checked=!this.checked,this._emitChangeEvent(),this._lastTimeStamp=t.timeStamp||0)}},{key:"_handle",get:function(){return this.querySelector(".".concat(this._defaultClassName,"__handle"))}},{key:"checkbox",get:function(){return this._input}},{key:"connectedCallback",value:function(){var t=this;It(this,(function(){t._input.addEventListener("change",t._onChange)})),this.addEventListener("dragstart",this._onDragStart),this.addEventListener("hold",this._onHold),this.addEventListener("tap",this.click),this.addEventListener("click",this._onClick),this._gestureDetector=new ft(this,{dragMinDistance:1,holdTimeout:251,passive:!0})}},{key:"disconnectedCallback",value:function(){var t=this;It(this,(function(){t._input.removeEventListener("change",t._onChange)})),this.removeEventListener("dragstart",this._onDragStart),this.removeEventListener("hold",this._onHold),this.removeEventListener("tap",this.click),this.removeEventListener("click",this._onClick),this._gestureDetector&&this._gestureDetector.dispose()}},{key:"attributeChangedCallback",value:function(t,e,i){if("modifier"===t){var a=-1!==(i||"").indexOf("material");this._locations=sa[a?"material":"ios"]}f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["modifier"])}}]),n}(En);k.Switch=la,customElements.define("ons-switch",la);var ca={".tabbar__content":"tabbar--*__content",".tabbar__border":"tabbar--*__border",".tabbar":"tabbar--*"},ua={ready:function(t,e){e()}};Q.nullElement;var da=function(t,e,n){return(1-n)*t+n*e},ha=function(t){s(a,t);var n=h(a);function a(){var t;i(this,a),(t=n.call(this))._loadInactive=Y.defer(),It(d(t),(function(){return t._compile()}));var e=Y.defineListenerProperty(d(t),"swipe"),o=e.onConnected,r=e.onDisconnected;return t._connectOnSwipe=o,t._disconnectOnSwipe=r,t}return o(a,[{key:"connectedCallback",value:function(){var t=this;this._swiper||(this._swiper=new qe({getElement:function(){return t._contentElement},getInitialIndex:function(){return t.activeIndex||t.getAttribute("activeIndex")},getAutoScrollRatio:this._getAutoScrollRatio.bind(this),getBubbleWidth:function(){return parseInt(t.getAttribute("ignore-edge-width")||25,10)},isAutoScrollable:function(){return!0},preChangeHook:this._onPreChange.bind(this),postChangeHook:this._onPostChange.bind(this),refreshHook:this._onRefresh.bind(this),scrollHook:this._onScroll.bind(this)}),It(this,(function(){t._tabbarBorder=Y.findChild(t._tabbarElement,".tabbar__border"),t._swiper.init({swipeable:t.hasAttribute("swipeable")})}))),It(this,(function(){t._updatePosition(),t._updateVisibility(),Y.findParent(t,"ons-page",(function(t){return t===document.body}))||t._show()})),this._connectOnSwipe()}},{key:"disconnectedCallback",value:function(){this._swiper&&this._swiper.initialized&&(this._swiper.dispose(),this._swiper=null,this._tabbarBorder=null,this._tabsRect=null),this._disconnectOnSwipe()}},{key:"_normalizeEvent",value:function(t){return e(e({},t),{},{index:t.activeIndex,tabItem:this.tabs[t.activeIndex]})}},{key:"_onPostChange",value:function(t){t=this._normalizeEvent(t),Y.triggerElementEvent(this,"postchange",t);var e=t.tabItem.pageElement;e&&e._show()}},{key:"_onPreChange",value:function(t){if((t=this._normalizeEvent(t)).cancel=function(){return t.canceled=!0},Y.triggerElementEvent(this,"prechange",t),!t.canceled){var e=t,n=e.activeIndex,i=e.lastActiveIndex,a=this.tabs;if(a[n].setActive(!0),i>=0){var o=a[i];o.setActive(!1),o.pageElement&&o.pageElement._hide()}}return t.canceled}},{key:"_onScroll",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._tabbarBorder)if(this._tabbarBorder.style.transition="all ".concat(e.duration||0,"s ").concat(e.timing||""),this._autogrow&&this._tabsRect.length>0){var n=Math.floor(t),i=Math.ceil(t),a=t%1;this._tabbarBorder.style.width=da(this._tabsRect[n].width,this._tabsRect[i].width,a)+"px",this._tabbarBorder.style.transform="translate3d(".concat(da(this._tabsRect[n].left,this._tabsRect[i].left,a),"px, 0, 0)")}else this._tabbarBorder.style.transform="translate3d(".concat(100*t,"%, 0, 0)");Y.triggerElementEvent(this,"swipe",{index:t,options:e})}},{key:"_onRefresh",value:function(){if(this._autogrow=Y.hasModifier(this,"autogrow"),this._tabsRect=this.tabs.map((function(t){return t.getBoundingClientRect()})),this._tabbarBorder){this._tabbarBorder.style.display=this.hasAttribute("tab-border")||Y.hasModifier(this,"material")?"block":"none";var t=this.getActiveTabIndex();this._tabsRect.length>0&&t>=0&&(this._tabbarBorder.style.width=this._tabsRect[t].width+"px")}}},{key:"_getAutoScrollRatio",value:function(t,e,n){var i=n/300*(t?-1:1);return Math.min(1,Math.max(0,.6+e*i))}},{key:"_tabbarElement",get:function(){return Y.findChild(this,".tabbar")}},{key:"_contentElement",get:function(){return Y.findChild(this,".tabbar__content")}},{key:"_targetElement",get:function(){var t=this._contentElement;return t&&t.children[0]||null}},{key:"_compile",value:function(){O.prepare(this);var t=this._contentElement||Y.create(".tabbar__content");t.classList.add("ons-tabbar__content");var e=this._tabbarElement||Y.create(".tabbar");if(e.classList.add("ons-tabbar__footer"),!e.parentNode)for(;this.firstChild;)e.appendChild(this.firstChild);e.children.length>this.activeIndex&&!Y.findChild(e,"[active]")&&e.children[this.activeIndex].setAttribute("active",""),this._tabbarBorder=Y.findChild(e,".tabbar__border")||Y.create(".tabbar__border"),e.appendChild(this._tabbarBorder),e.classList.add("ons-swiper-tabbar"),!t.children[0]&&t.appendChild(document.createElement("div")),!t.children[1]&&t.appendChild(document.createElement("div")),t.appendChild=t.appendChild.bind(t.children[0]),t.insertBefore=t.insertBefore.bind(t.children[0]),this.appendChild(t),this.appendChild(e),M.initModifier(this,ca)}},{key:"_updatePosition",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAttribute("position"),n=this._top="top"===e||"auto"===e&&Y.hasModifier(this,"material"),i=n?Y.addModifier:Y.removeModifier;i(this,"top");var a=Y.findParent(this,"ons-page");a&&It(a,(function(){var e=0;a.children[0]&&Y.match(a.children[0],"ons-toolbar")&&(i(a.children[0],"noshadow"),e=1);var o=a._getContentElement(),r=window.getComputedStyle(a._getContentElement(),null);t.style.top=n?parseInt(r.getPropertyValue("padding-top"),10)-e+"px":"",o.style.top=r.top,o.style.top=""})),Q.autoStatusBarFill((function(){var e=Y.findParent(t,(function(t){return t.hasAttribute("status-bar-fill")}));Y.toggleAttribute(t,"status-bar-fill",n&&!e)}))}},{key:"topPage",get:function(){var t=this.tabs,e=this.getActiveTabIndex();return t[e]&&(t[e].pageElement||this.pages[0])||null}},{key:"pages",get:function(){return Y.arrayFrom(this._targetElement.children)}},{key:"tabs",get:function(){return Array.prototype.filter.call(this._tabbarElement.children,(function(t){return"ONS-TAB"===t.tagName}))}},{key:"setActiveTab",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.activeIndex;return this._activeIndexSkipEffect=!0,this.activeIndex=t,this._updateActiveIndex(t,n,e)}},{key:"_updateActiveIndex",value:function(t,n){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.tabs[n],r=this.tabs[t];if(!r)return Promise.reject("Specified index does not match any tab.");if(t===n)return Y.triggerElementEvent(this,"reactive",{index:t,activeIndex:t,tabItem:r}),Promise.resolve(r.pageElement);var s=r.pageElement;return(s?Promise.resolve(s):r.loaded).then((function(n){return i._swiper.setActiveIndex(t,e(e({reject:!0},a),{},{animation:o&&n?a.animation||i.getAttribute("animation"):"none",animationOptions:Y.extend({duration:.3,timing:"cubic-bezier(.4, .7, .5, 1)"},i.animationOptions,a.animationOptions||{})})).then((function(){return a.callback instanceof Function&&a.callback(n),n}))}))}},{key:"setTabbarVisibility",value:function(t){this.hideTabs=!t}},{key:"show",value:function(){this.hideTabs=!1}},{key:"hide",value:function(){this.hideTabs=!0}},{key:"_updateVisibility",value:function(){var t=this;It(this,(function(){var e=!t.hideTabs;t._contentElement.style[t._top?"top":"bottom"]=e?"":"0px",t._tabbarElement.style.display=e?"":"none",e&&t._onRefresh()}))}},{key:"visible",get:function(){return"none"!==this._tabbarElement.style.display}},{key:"getActiveTabIndex",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tabs,e=0;e0&&n>=0&&e[n].loaded.then((function(t){return t&&setImmediate((function(){return t._show()}))}))}))}},{key:"_hide",value:function(){this._swiper.hide();var t=this.topPage;t&&t._hide()}},{key:"_destroy",value:function(){this.tabs.forEach((function(t){return t.remove()})),this.remove()}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;if("modifier"===t){M.onModifierChanged(e,n,this,ca);var a=function(t){return/(^|\s+)top($|\s+)/i.test(t)};a(e)!==a(n)&&this._updatePosition()}else"position"===t?Y.isAttached(this)&&this._updatePosition():"swipeable"===t?this._swiper&&this._swiper.updateSwipeable(this.hasAttribute("swipeable")):"hide-tabs"===t?this.isConnected&&this._updateVisibility():"active-index"===t&&(this._activeIndexSkipEffect?this._activeIndexSkipEffect=!1:this.isConnected&&It(this,(function(){return i._updateActiveIndex(n,e)})))}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?Y.animationOptionsParse(this.getAttribute("animation-options")):{}},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}}],[{key:"observedAttributes",get:function(){return["modifier","position","swipeable","tab-border","hide-tabs","active-index"]}},{key:"rewritables",get:function(){return ua}},{key:"events",get:function(){return["prechange","postchange","reactive","swipe"]}}]),a}(ne);Y.defineBooleanProperties(ha,["hide-tabs","swipeable","tab-border"]),k.Tabbar=ha,customElements.define("ons-tabbar",ha);var fa="tabbar__item",pa={"":"tabbar--*__item",".tabbar__button":"tabbar--*__button"},ma=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),t=e.call(this),["label","icon","badge"].some(t.hasAttribute.bind(d(t)))?t._compile():It(d(t),(function(){return t._compile()})),t._pageLoader=Jt,t._onClick=t._onClick.bind(d(t));var a=Y.defineListenerProperty(d(t),"click"),o=a.onConnected,r=a.onDisconnected;return t._connectOnClick=o,t._disconnectOnClick=r,t}return o(n,[{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Kt||Y.throwPageLoader(),this._pageLoader=t}},{key:"_compile",value:function(){if(O.prepare(this),this.classList.add(fa),!this._button){for(var t=Y.create("button.tabbar__button");this.childNodes[0];)t.appendChild(this.childNodes[0]);var e=Y.create("input",{display:"none"});e.type="radio",this.appendChild(e),this.appendChild(t),this._updateButtonContent(),M.initModifier(this,pa),this._updateRipple()}}},{key:"_updateRipple",value:function(){this._button&&Y.updateRipple(this._button,this.hasAttribute("ripple"))}},{key:"_updateButtonContent",value:function(){var t,e=this,n=this._button,i=this._icon;if(this.hasAttribute("icon")){var a=(i=i||Y.createElement('
')).children[0],o=(t=a.getAttribute("icon"),function(){return a.attributeChangedCallback("icon",t,e.getAttribute("icon"))});this.hasAttribute("icon")&&this.hasAttribute("active-icon")?a.setAttribute("icon",this.getAttribute(this.isActive()?"active-icon":"icon")):this.hasAttribute("icon")&&a.setAttribute("icon",this.getAttribute("icon")),i.parentElement!==n&&n.insertBefore(i,n.firstChild),a.attributeChangedCallback instanceof Function?o():setImmediate((function(){return a.attributeChangedCallback instanceof Function&&o()}))}else i&&i.remove();["label","badge"].forEach((function(t,i){var a=e.querySelector(".tabbar__".concat(t));e.hasAttribute(t)?((a=a||Y.create(".tabbar__".concat(t)+("badge"===t?" notification":""))).textContent=e.getAttribute(t),a.parentElement!==n&&n.appendChild(a)):a&&a.remove()}))}},{key:"_input",get:function(){return Y.findChild(this,"input")}},{key:"_button",get:function(){return Y.findChild(this,".tabbar__button")}},{key:"_icon",get:function(){return this.querySelector(".tabbar__icon")}},{key:"_tabbar",get:function(){return Y.findParent(this,"ons-tabbar")}},{key:"index",get:function(){return Array.prototype.indexOf.call(this.parentElement.children,this)}},{key:"_onClick",value:function(t){var e=this;setTimeout((function(){t.defaultPrevented||e._tabbar.setActiveTab(e.index,{reject:!1})}))}},{key:"setActive",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];It(this,(function(){t._input.checked=e,t.classList.toggle("active",e),Y.toggleAttribute(t,"active",e),t.hasAttribute("icon")&&t.hasAttribute("active-icon")&&t._icon.children[0].setAttribute("icon",t.getAttribute(e?"active-icon":"icon"))}))}},{key:"_loadPageElement",value:function(t,e){var n=this;return this._hasLoaded=!0,new Promise((function(i){n._pageLoader.load({parent:t,page:e},(function(e){t.replaceChild(e,t.children[n.index]),n._loadedPage=e,i(e)}))}))}},{key:"pageElement",get:function(){if(this._loadedPage)return this._loadedPage;var t=this._tabbar;return t.pages.length===t.tabs.length?t.pages[this.index]:null}},{key:"isActive",value:function(){return this.classList.contains("active")}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._onClick,!1),this._loadedPage&&(this._hasLoaded=!1,this.loaded=null),this._disconnectOnClick()}},{key:"connectedCallback",value:function(){var t=this;if(this.addEventListener("click",this._onClick,!1),Y.isAttached(this)&&!this.loaded){var e=Y.defer();this.loaded=e.promise,It(this,(function(){var n=t.index,i=t._tabbar;i||Y.throw("Tab elements must be children of Tabbar"),i.hasAttribute("modifier")&&Y.addModifier(t,i.getAttribute("modifier")),t._hasLoaded||(t.hasAttribute("active")&&(t.setActive(!0),i.activeIndex=n),n===i.tabs.length-1&&(i._onRefresh(),setImmediate((function(){return i._onRefresh()}))),ha.rewritables.ready(i,(function(){var a=t.page||t.getAttribute("page");if(!t.pageElement&&a){var o=i._targetElement,r=Y.create("div",{height:"100%",width:"100%",visibility:"hidden"});o.insertBefore(r,o.children[n]);var s=function(){return t._loadPageElement(o,a).then(e.resolve)};return t.isActive()?s():i._loadInactive.promise.then(s)}return e.resolve(t.pageElement)})))})),this._connectOnClick()}}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,fa,pa);break;case"modifier":It(this,(function(){return M.onModifierChanged(e,n,i,pa)}));break;case"ripple":It(this,(function(){return i._updateRipple()}));break;case"icon":case"label":case"badge":It(this,(function(){return i._updateButtonContent()}));break;case"page":this.page=n||""}}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","icon","label","page","badge","class"]}}]),n}(ne);k.Tab=ma,customElements.define("ons-tab",ma);var ga=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),va=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.3:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:0},{opacity:1}).queue((function(t){e(),t()})).play()}},{key:"hide",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:1},{opacity:0}).queue((function(t){e(),t()})).play()}}]),n}(ga),_a=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.25:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).messageDelay=.4*t.duration+t.delay,b.isAndroid()?t.ascension=48:oe.isIPhoneXPortraitPatchActive()?t.ascension=98:oe.isIPhoneXLandscapePatchActive()?t.ascension=85:t.ascension=64,t}return o(n,[{key:"show",value:function(t,e){t=t._toast,Y.globals.fabOffset=this.ascension,ht.runAll(ht(t,this.def).default({transform:"translate3d(0, ".concat(this.ascension,"px, 0)")},{transform:"translate3d(0, 0, 0)"}).queue((function(t){e&&e(),t()})),ht(this._getFabs()).wait(this.delay).queue({transform:"translate3d(0, -".concat(this.ascension,"px, 0) scale(1)")},this.def),ht(Y.arrayFrom(t.children),this.def).default({opacity:0},{opacity:1}))}},{key:"hide",value:function(t,e){t=t._toast,Y.globals.fabOffset=0,ht.runAll(ht(t,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, ".concat(this.ascension,"px, 0)")}).queue((function(t){e&&e(),t()})),ht(this._getFabs(),this.def).wait(this.delay).queue({transform:"translate3d(0, 0, 0) scale(1)"},this.def),ht(Y.arrayFrom(t.children),this.def).default({opacity:1},{opacity:0}))}},{key:"_getFabs",value:function(){return Y.arrayFrom(document.querySelectorAll("ons-fab[position~=bottom], ons-speed-dial[position~=bottom]")).filter((function(t){return t.visible}))}}]),n}(ga),ba=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.35:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).bodyHeight=document.body.clientHeight,oe.isIPhoneXPortraitPatchActive()?t.liftAmount="calc(100% + 34px)":oe.isIPhoneXLandscapePatchActive()?t.liftAmount="calc(100% + 21px)":t.liftAmount="100%",t}return o(n,[{key:"show",value:function(t,e){t=t._toast,ht.runAll(ht(t,this.def).default({transform:"translate3d(0, ".concat(this.liftAmount,", 0)"),opacity:0},{transform:"translate3d(0, 0, 0)",opacity:1}).queue((function(t){e&&e(),t()})))}},{key:"hide",value:function(t,e){t=t._toast,ht.runAll(ht(t,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, ".concat(this.liftAmount,", 0)"),opacity:0}).queue((function(t){e&&e(),t()})))}},{key:"_updatePosition",value:function(t){0===parseInt(t.style.top,10)&&(t.style.top=t.style.bottom="")}}]),n}(ga),ya=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.35:c;return i(this,n),t=e.call(this,{timing:r,delay:l,duration:u}),oe.isIPhoneXPortraitPatchActive()?t.fallAmount="calc(-100% - 44px)":t.fallAmount="-100%",t}return o(n,[{key:"show",value:function(t,e){t=t._toast,this._updatePosition(t),ht.runAll(ht(t,this.def).default({transform:"translate3d(0, ".concat(this.fallAmount,", 0)"),opacity:0},{transform:"translate3d(0, 0, 0)",opacity:1}).queue((function(t){e&&e(),t()})))}},{key:"hide",value:function(t,e){var n=this;t=t._toast,this._updatePosition(t),ht.runAll(ht(t,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, ".concat(this.fallAmount,", 0)"),opacity:0}).queue((function(i){n._updatePosition(t,!0),e&&e(),i()})))}},{key:"_updatePosition",value:function(t,e){var n;n=oe.isIPhoneXPortraitPatchActive()?"44px":"0",t.style.top!==n&&(t.style.top=n,t.style.bottom="initial")}}]),n}(ga),ka={".toast":"toast--*",".toast__message":"toast--*__message",".toast__button":"toast--*__button"},wa="toast",Ea={default:b.isAndroid()?_a:ba,fade:va,ascend:_a,lift:ba,fall:ya,none:ga},Ca=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._defaultDBB=null,It(d(t),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return ka}},{key:"_toast",get:function(){return Y.findChild(this,".".concat(wa))}},{key:"_updateAnimatorFactory",value:function(){return this._toast&&(this._toast.style.top=this._toast.style.bottom=""),new Z({animators:Ea,baseClass:ga,baseClassName:"ToastAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){O.prepare(this),this.style.display="none",this.style.zIndex=1e4;var t="toast__message",e="toast__button",n=Y.findChild(this,".".concat(wa));if(!n)for((n=document.createElement("div")).classList.add(wa);this.childNodes[0];)n.appendChild(this.childNodes[0]);var i=Y.findChild(n,".".concat(e));if(i||(i=Y.findChild(n,(function(t){return Y.match(t,".button")||Y.match(t,"button")})))&&(i.classList.remove("button"),i.classList.add(e),n.appendChild(i)),!Y.findChild(n,".".concat(t))){var a=Y.findChild(n,".message");if(!a){a=document.createElement("div");for(var o=n.childNodes.length-1;o>=0;o--)n.childNodes[o]!==i&&a.insertBefore(n.childNodes[o],a.firstChild)}a.classList.add(t),n.insertBefore(a,n.firstChild)}n.parentNode!==this&&this.appendChild(n),M.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof ga||Y.throw('"Animator" param must inherit OnsToastElement.ToastAnimator'),Ea[t]=e}},{key:"animators",get:function(){return Ea}},{key:"ToastAnimator",get:function(){return ga}}]),n}(ce);k.Toast=Ca,customElements.define("ons-toast",Ca);var Aa=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return{"":"toolbar-button--*"}}},{key:"_defaultClassName",get:function(){return"toolbar-button"}},{key:"_rippleOpt",get:function(){return[this,void 0,{center:"",size:"contain",background:"transparent"}]}}]),n}(ve);return k.ToolbarButton=Aa,customElements.define("ons-toolbar-button",Aa),function(t){Q.waitDOMContentLoaded((function(){function t(t){for(var e=window.document.querySelectorAll(t),n=0;n=0;)t[e]=0}const a=256,i=286,n=30,s=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);const _=new Array(60);e(_);const f=new Array(512);e(f);const c=new Array(256);e(c);const u=new Array(29);e(u);const w=new Array(n);function b(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let g,p,m;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(w);const v=t=>t<256?f[t]:f[256+(t>>>7)],y=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{x(t,a[2*e],a[2*e+1])},A=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=(t,e,a)=>{const i=new Array(16);let n,r,l=0;for(n=1;n<=s;n++)i[n]=l=l+a[n-1]<<1;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=A(i[e]++,e))}},R=t=>{let e;for(e=0;e{t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},U=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n{let n,s,o,h,d=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===n?z(t,s,e):(o=c[s],z(t,o+a+1,e),h=r[o],0!==h&&(s-=u[o],x(t,s,h)),n--,o=v(n),z(t,o,i),h=l[o],0!==h&&(n-=w[o],x(t,n,h)))}while(d{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,r=e.stat_desc.elems;let l,o,h,d=-1;for(t.heap_len=0,t.heap_max=573,l=0;l>1;l>=1;l--)S(t,a,l);h=r;do{l=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=l,t.heap[--t.heap_max]=o,a[2*h]=a[2*l]+a[2*o],t.depth[h]=(t.depth[l]>=t.depth[o]?t.depth[l]:t.depth[o])+1,a[2*l+1]=a[2*o+1]=h,t.heap[1]=h++,S(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let d,_,f,c,u,w,b=0;for(c=0;c<=s;c++)t.bl_count[c]=0;for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++)_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,b++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=o&&(u=l[_-o]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));if(0!==b){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,b-=2}while(b>0);for(c=h;0!==c;c--)for(_=t.bl_count[c];0!==_;)f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--)}})(t,e),E(a,d,t.bl_count)},O=(t,e,a)=>{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++l{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++l{x(t,0+(i?1:0),3),((t,e,a,i)=>{Z(t),i&&(y(t,a),y(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a})(t,e,a,!0)};var N={_tr_init:t=>{F||((()=>{let t,e,a,h,k;const v=new Array(16);for(a=0,h=0;h<28;h++)for(u[h]=a,t=0;t<1<>=7;h{let s,r,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e{let e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?L(t,e,i,n):4===t.strategy||r===s?(x(t,2+(n?1:0),3),D(t,d,_)):(x(t,4+(n?1:0),3),((t,e,a,i)=>{let n;for(x(t,e-257,5),x(t,a-1,5),x(t,i-4,4),n=0;n(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(c[i]+a+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{x(t,2,3),z(t,256,d),(t=>{16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var B=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const C=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var M=(t,e,a,i)=>{const n=C,s=i+a;t^=-1;for(let a=i;a>>8^n[255&(t^e[a])];return-1^t},H={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:P,_tr_flush_block:Y,_tr_tally:G,_tr_align:X}=N,{Z_NO_FLUSH:W,Z_PARTIAL_FLUSH:q,Z_FULL_FLUSH:J,Z_FINISH:Q,Z_BLOCK:V,Z_OK:$,Z_STREAM_END:tt,Z_STREAM_ERROR:et,Z_DATA_ERROR:at,Z_BUF_ERROR:it,Z_DEFAULT_COMPRESSION:nt,Z_FILTERED:st,Z_HUFFMAN_ONLY:rt,Z_RLE:lt,Z_FIXED:ot,Z_DEFAULT_STRATEGY:ht,Z_UNKNOWN:dt,Z_DEFLATED:_t}=j,ft=258,ct=262,ut=103,wt=113,bt=666,gt=(t,e)=>(t.msg=H[e],e),pt=t=>(t<<1)-(t>4?9:0),mt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let kt=(t,e,a)=>(e<{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},yt=(t,e)=>{Y(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,vt(t.strm)},xt=(t,e)=>{t.pending_buf[t.pending++]=e},zt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=B(t.adler,e,n,a):2===t.state.wrap&&(t.adler=M(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},Et=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,l=t.nice_match;const o=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ft;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),l>t.lookahead&&(l=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=l)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>o&&0!=--n);return r<=t.lookahead?r:t.lookahead},Rt=t=>{const e=t.w_size;let a,i,n,s,r;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ct)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,a=i;do{n=t.head[--a],t.head[a]=n>=e?n-e:0}while(--i);i=e,a=i;do{n=t.prev[--a],t.prev[a]=n>=e?n-e:0}while(--i);s+=e}if(0===t.strm.avail_in)break;if(i=At(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=kt(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=kt(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let a,i;for(;;){if(t.lookahead=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(i=G(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=kt(t,t.ins_h,t.window[t.strstart+1]);else i=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2},Ut=(t,e)=>{let a,i,n;for(;;){if(t.lookahead=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=G(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(yt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=G(t,0,t.window[t.strstart-1]),i&&yt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=G(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2};function St(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const Dt=[new St(0,0,0,0,((t,e)=>{let a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Rt(t),0===t.lookahead&&e===W)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,yt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(yt(t,!1),t.strm.avail_out),1)})),new St(4,4,8,4,Zt),new St(4,5,16,8,Zt),new St(4,6,32,32,Zt),new St(4,4,16,16,Ut),new St(8,16,32,32,Ut),new St(8,16,128,128,Ut),new St(8,32,128,256,Ut),new St(32,128,258,1024,Ut),new St(32,258,258,4096,Ut)];function Tt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_t,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ot=t=>{if(!t||!t.state)return gt(t,et);t.total_in=t.total_out=0,t.data_type=dt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=W,K(e),$},It=t=>{const e=Ot(t);var a;return e===$&&((a=t.state).window_size=2*a.w_size,mt(a.head),a.max_lazy_match=Dt[a.level].max_lazy,a.good_match=Dt[a.level].good_length,a.nice_match=Dt[a.level].nice_length,a.max_chain_length=Dt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ft=(t,e,a,i,n,s)=>{if(!t)return et;let r=1;if(e===nt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==_t||i<8||i>15||e<0||e>9||s<0||s>ot)return gt(t,et);8===i&&(i=9);const l=new Tt;return t.state=l,l.strm=t,l.wrap=r,l.gzhead=null,l.w_bits=i,l.w_size=1<Ft(t,e,_t,15,8,ht),deflateInit2:Ft,deflateReset:It,deflateResetKeep:Ot,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?et:(t.state.gzhead=e,$):et,deflate:(t,e)=>{let a,i;if(!t||!t.state||e>V||e<0)return t?gt(t,et):et;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===bt&&e!==Q)return gt(t,0===t.avail_out?it:et);n.strm=t;const s=n.last_flush;if(n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,xt(n,31),xt(n,139),xt(n,8),n.gzhead?(xt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),xt(n,255&n.gzhead.time),xt(n,n.gzhead.time>>8&255),xt(n,n.gzhead.time>>16&255),xt(n,n.gzhead.time>>24&255),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(xt(n,255&n.gzhead.extra.length),xt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=M(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,3),n.status=wt);else{let e=_t+(n.w_bits-8<<4)<<8,a=-1;a=n.strategy>=rt||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=a<<6,0!==n.strstart&&(e|=32),e+=31-e%31,n.status=wt,zt(n,e),0!==n.strstart&&(zt(n,t.adler>>>16),zt(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(a=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending!==n.pending_buf_size));)xt(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexa&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexa&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.status=ut)}else n.status=ut;if(n.status===ut&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&vt(t),n.pending+2<=n.pending_buf_size&&(xt(n,255&t.adler),xt(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(vt(t),0===t.avail_out)return n.last_flush=-1,$}else if(0===t.avail_in&&pt(e)<=pt(s)&&e!==Q)return gt(t,it);if(n.status===bt&&0!==t.avail_in)return gt(t,it);if(0!==t.avail_in||0!==n.lookahead||e!==W&&n.status!==bt){let a=n.strategy===rt?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(Rt(t),0===t.lookahead)){if(e===W)return 1;break}if(t.match_length=0,a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):n.strategy===lt?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=ft){if(Rt(t),t.lookahead<=ft&&e===W)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+ft;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=G(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):Dt[n.level].func(n,e);if(3!==a&&4!==a||(n.status=bt),1===a||3===a)return 0===t.avail_out&&(n.last_flush=-1),$;if(2===a&&(e===q?X(n):e!==V&&(P(n,0,0,!1),e===J&&(mt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),vt(t),0===t.avail_out))return n.last_flush=-1,$}return e!==Q?$:n.wrap<=0?tt:(2===n.wrap?(xt(n,255&t.adler),xt(n,t.adler>>8&255),xt(n,t.adler>>16&255),xt(n,t.adler>>24&255),xt(n,255&t.total_in),xt(n,t.total_in>>8&255),xt(n,t.total_in>>16&255),xt(n,t.total_in>>24&255)):(zt(n,t.adler>>>16),zt(n,65535&t.adler)),vt(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?$:tt)},deflateEnd:t=>{if(!t||!t.state)return et;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==ut&&e!==wt&&e!==bt?gt(t,et):(t.state=null,e===wt?gt(t,at):$)},deflateSetDictionary:(t,e)=>{let a=e.length;if(!t||!t.state)return et;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return et;if(1===n&&(t.adler=B(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(mt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Rt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=kt(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Rt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=l,t.avail_in=s,i.wrap=n,$},deflateInfo:"pako deflate (from Nodeca project)"};const Nt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Bt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Nt(a,e)&&(t[e]=a[e])}}return t},Ct=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ht[254]=Ht[254]=1;var jt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,l=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},Kt=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Mt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ht[t[a]]>e?a:e};var Yt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Gt=Object.prototype.toString,{Z_NO_FLUSH:Xt,Z_SYNC_FLUSH:Wt,Z_FULL_FLUSH:qt,Z_FINISH:Jt,Z_OK:Qt,Z_STREAM_END:Vt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:te,Z_DEFLATED:ee}=j;function ae(t){this.options=Bt({level:$t,method:ee,chunkSize:16384,windowBits:15,memLevel:8,strategy:te},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Lt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Qt)throw new Error(H[a]);if(e.header&&Lt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?jt(e.dictionary):"[object ArrayBuffer]"===Gt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Lt.deflateSetDictionary(this.strm,t),a!==Qt)throw new Error(H[a]);this._dict_set=!0}}function ie(t,e){const a=new ae(e);if(a.push(t,!0),a.err)throw a.msg||H[a.err];return a.result}ae.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Jt:Xt,"string"==typeof t?a.input=jt(t):"[object ArrayBuffer]"===Gt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===Wt||s===qt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Lt.deflate(a,s),n===Vt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Lt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},ae.prototype.onData=function(t){this.chunks.push(t)},ae.prototype.onEnd=function(t){t===Qt&&(this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ne={Deflate:ae,deflate:ie,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ie(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ie(t,e)},constants:j};var se=function(t,e){let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),l=E.dmax,o=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,b=(1<>>24,f>>>=m,c-=m,m=p>>>16&255,0===m)A[n++]=65535&p;else{if(!(16&m)){if(0==(64&m)){p=u[(65535&p)+(f&(1<>>=m,c-=m),c<15&&(f+=z[a++]<>>24,f>>>=m,c-=m,m=p>>>16&255,!(16&m)){if(0==(64&m)){p=w[(65535&p)+(f&(1<l){t.msg="invalid distance too far back",E.mode=30;break t}if(f>>>=m,c-=m,m=n-s,v>m){if(m=v-m,m>h&&E.sane){t.msg="invalid distance too far back",E.mode=30;break t}if(y=0,x=_,0===d){if(y+=o-m,m2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a>3,a-=k,c-=k<<3,f&=(1<{const o=l.bits;let h,d,_,f,c,u,w=0,b=0,g=0,p=0,m=0,k=0,v=0,y=0,x=0,z=0,A=null,E=0;const R=new Uint16Array(16),Z=new Uint16Array(16);let U,S,D,T=null,O=0;for(w=0;w<=re;w++)R[w]=0;for(b=0;b=1&&0===R[p];p--);if(m>p&&(m=p),0===p)return n[s++]=20971520,n[s++]=20971520,l.bits=1,0;for(g=1;g0&&(0===t||1!==p))return-1;for(Z[1]=0,w=1;w852||2===t&&x>592)return 1;for(;;){U=w-v,r[b]u?(S=T[O+r[b]],D=A[E+r[b]]):(S=96,D=0),h=1<>v)+d]=U<<24|S<<16|D|0}while(0!==d);for(h=1<>=1;if(0!==h?(z&=h-1,z+=h):z=0,b++,0==--R[w]){if(w===p)break;w=e[a+r[b]]}if(w>m&&(z&f)!==_){for(0===v&&(v=m),c+=g,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=m<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),l.bits=m,0};const{Z_FINISH:fe,Z_BLOCK:ce,Z_TREES:ue,Z_OK:we,Z_STREAM_END:be,Z_NEED_DICT:ge,Z_STREAM_ERROR:pe,Z_DATA_ERROR:me,Z_MEM_ERROR:ke,Z_BUF_ERROR:ve,Z_DEFLATED:ye}=j,xe=12,ze=30,Ae=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function Ee(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Re=t=>{if(!t||!t.state)return pe;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,we},Ze=t=>{if(!t||!t.state)return pe;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Re(t)},Ue=(t,e)=>{let a;if(!t||!t.state)return pe;const i=t.state;return e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?pe:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,Ze(t))},Se=(t,e)=>{if(!t)return pe;const a=new Ee;t.state=a,a.window=null;const i=Ue(t,e);return i!==we&&(t.state=null),i};let De,Te,Oe=!0;const Ie=t=>{if(Oe){De=new Int32Array(512),Te=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(_e(1,t.lens,0,288,De,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;_e(2,t.lens,0,32,Te,0,t.work,{bits:5}),Oe=!1}t.lencode=De,t.lenbits=9,t.distcode=Te,t.distbits=5},Fe=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whaveSe(t,15),inflateInit2:Se,inflate:(t,e)=>{let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return pe;a=t.state,a.mode===xe&&(a.mode=13),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,_=l,f=o,x=we;t:for(;;)switch(a.mode){case 1:if(0===a.wrap){a.mode=13;break}for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>>8&255,a.check=M(a.check,A,2,0),h=0,d=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=ze;break}if((15&h)!==ye){t.msg="unknown compression method",a.mode=ze;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=ze;break}a.dmax=1<>8&1),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=3;case 3:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=M(a.check,A,4,0)),h=0,d=0,a.mode=4;case 4:for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>8),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(c=a.length,c>l&&(c=l),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&(a.check=M(a.check,i,c,s)),l-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===l)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=xe;break;case 10:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===l)break t;l--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=14;break;case 1:if(Ie(a),a.mode=20,e===ue){h>>>=2,d-=2;break t}break;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=ze}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break t;l--,h+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=ze;break}if(a.length=65535&h,h=0,d=0,a.mode=15,e===ue)break t;case 15:a.mode=16;case 16:if(c=a.length,c){if(c>l&&(c=l),c>o&&(c=o),0===c)break t;n.set(i.subarray(s,s+c),r),l-=c,s+=c,o-=c,r+=c,a.length-=c;break}a.mode=xe;break;case 17:for(;d<14;){if(0===l)break t;l--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=ze;break}a.have=0,a.mode=18;case 18:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=_e(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=ze;break}a.have=0,a.mode=19;case 19:for(;a.have>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=b,d-=b,a.lens[a.have++]=p;else{if(16===p){for(R=b+2;d>>=b,d-=b,0===a.have){t.msg="invalid bit length repeat",a.mode=ze;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===p){for(R=b+3;d>>=b,d-=b,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=b+7;d>>=b,d-=b,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=ze;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===ze)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=ze;break}if(a.lenbits=9,E={bits:a.lenbits},x=_e(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=ze;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=_e(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=ze;break}if(a.mode=20,e===ue)break t;case 20:a.mode=21;case 21:if(l>=6&&o>=258){t.next_out=r,t.avail_out=o,t.next_in=s,t.avail_in=l,a.hold=h,a.bits=d,se(t,f),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,a.mode===xe&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,a.length=p,0===g){a.mode=26;break}if(32&g){a.back=-1,a.mode=xe;break}if(64&g){t.msg="invalid literal/length code",a.mode=ze;break}a.extra=15&g,a.mode=22;case 22:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;z=a.distcode[h&(1<>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,64&g){t.msg="invalid distance code",a.mode=ze;break}a.offset=p,a.extra=15&g,a.mode=24;case 24:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=ze;break}a.mode=25;case 25:if(0===o)break t;if(c=f-o,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=ze;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>o&&(c=o),o-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=21);break;case 26:if(0===o)break t;n[r++]=a.length,o--,a.mode=21;break;case 27:if(a.wrap){for(;d<32;){if(0===l)break t;l--,h|=i[s++]<{if(!t||!t.state)return pe;let e=t.state;return e.window&&(e.window=null),t.state=null,we},inflateGetHeader:(t,e)=>{if(!t||!t.state)return pe;const a=t.state;return 0==(2&a.wrap)?pe:(a.head=e,e.done=!1,we)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return t&&t.state?(i=t.state,0!==i.wrap&&11!==i.mode?pe:11===i.mode&&(n=1,n=B(n,e,a,0),n!==i.check)?me:(s=Fe(t,e,a,a),s?(i.mode=31,ke):(i.havedict=1,we))):pe},inflateInfo:"pako inflate (from Nodeca project)"};var Ne=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Be=Object.prototype.toString,{Z_NO_FLUSH:Ce,Z_FINISH:Me,Z_OK:He,Z_STREAM_END:je,Z_NEED_DICT:Ke,Z_STREAM_ERROR:Pe,Z_DATA_ERROR:Ye,Z_MEM_ERROR:Ge}=j;function Xe(t){this.options=Bt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Le.inflateInit2(this.strm,e.windowBits);if(a!==He)throw new Error(H[a]);if(this.header=new Ne,Le.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=jt(e.dictionary):"[object ArrayBuffer]"===Be.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Le.inflateSetDictionary(this.strm,e.dictionary),a!==He)))throw new Error(H[a])}function We(t,e){const a=new Xe(e);if(a.push(t),a.err)throw a.msg||H[a.err];return a.result}Xe.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,l;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Me:Ce,"[object ArrayBuffer]"===Be.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Le.inflate(a,r),s===Ke&&n&&(s=Le.inflateSetDictionary(a,n),s===He?s=Le.inflate(a,r):s===Ye&&(s=Ke));a.avail_in>0&&s===je&&a.state.wrap>0&&0!==t[a.next_in];)Le.inflateReset(a),s=Le.inflate(a,r);switch(s){case Pe:case Ye:case Ke:case Ge:return this.onEnd(s),this.ended=!0,!1}if(l=a.avail_out,a.next_out&&(0===a.avail_out||s===je))if("string"===this.options.to){let t=Pt(a.output,a.next_out),e=a.next_out-t,n=Kt(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==He||0!==l){if(s===je)return s=Le.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},Xe.prototype.onData=function(t){this.chunks.push(t)},Xe.prototype.onEnd=function(t){t===He&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var qe={Inflate:Xe,inflate:We,inflateRaw:function(t,e){return(e=e||{}).raw=!0,We(t,e)},ungzip:We,constants:j};const{Deflate:Je,deflate:Qe,deflateRaw:Ve,gzip:$e}=ne,{Inflate:ta,inflate:ea,inflateRaw:aa,ungzip:ia}=qe;var na=Je,sa=Qe,ra=Ve,la=$e,oa=ta,ha=ea,da=aa,_a=ia,fa=j,ca={Deflate:na,deflate:sa,deflateRaw:ra,gzip:la,Inflate:oa,inflate:ha,inflateRaw:da,ungzip:_a,constants:fa};t.Deflate=na,t.Inflate=oa,t.constants=fa,t.default=ca,t.deflate=sa,t.deflateRaw=ra,t.gzip=la,t.inflate=ha,t.inflateRaw=da,t.ungzip=_a,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/Server/www/spiderbasic/paper-full.min.js b/Server/www/spiderbasic/paper-full.min.js new file mode 100644 index 0000000..9bbbefd --- /dev/null +++ b/Server/www/spiderbasic/paper-full.min.js @@ -0,0 +1,32 @@ +/*! + * Paper.js v0.12.11 - The Swiss Army Knife of Vector Graphics Scripting. + * http://paperjs.org/ + * + * Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey + * http://juerglehni.com/ & https://puckey.studio/ + * + * Distributed under the MIT license. See LICENSE file for details. + * + * All rights reserved. + * + * Date: Fri Jun 19 19:14:33 2020 +0200 + * + *** + * + * Straps.js - Class inheritance library with support for bean-style accessors + * + * Copyright (c) 2006 - 2020 Jürg Lehni + * http://juerglehni.com/ + * + * Distributed under the MIT license. + * + *** + * + * Acorn.js + * https://marijnhaverbeke.nl/acorn/ + * + * Acorn is a tiny, fast JavaScript parser written in JavaScript, + * created by Marijn Haverbeke and released under an MIT license. + * + */ +var paper=function(C,q){var A=(C=C||require("./node/self.js")).window,T=C.document,U=new function(){function n(t,e,n){var i;return t&&((i=f(t,"length"))&&"number"==typeof i.value?r:function(t,e){for(var n in this)this.hasOwnProperty(n)&&t.call(e,this[n],n,this)}).call(t,e,n=n||t),n}var s=/^(statics|enumerable|beans|preserve)$/,t=[],i=t.slice,a=Object.create,f=Object.getOwnPropertyDescriptor,d=Object.defineProperty,r=t.forEach||function(t,e){for(var n=0,i=this.length;nt.length&&(n=t.length);for(var a=0;a>>1;a[t[s]][e]=T[f]-n&&M<=T[d]+n)&&(b&&z&&S.push(s?A:A-o),C&&O&&v[A].push(x))}}b&&(t===e&&S.push(y),v[y]=S),p.length?(m=u(p,c,w[c]),p.splice(m+1,0,y)):p.push(y)}for(g=0;g>1,l=1&i?s[h++]*t(o):0;hb(s/o)&&(h=((u=-s/o)-r)/o)}}var w=H.solveQuadratic(n,h,u,t,e,a),x=null==e;return isFinite(o)&&(0===w||0=this.x&&n>=this.y&&e<=this.x+this.width&&n<=this.y+this.height},_containsRectangle:function(t){var e=t.x,n=t.y;return e>=this.x&&n>=this.y&&e+t.width<=this.x+this.width&&n+t.height<=this.y+this.height},intersects:function(){var t=M.read(arguments),e=U.read(arguments)||0;return t.x+t.width>this.x-e&&t.y+t.height>this.y-e&&t.xs[h]&&(s[h]=o)}return(e=e||new M)._set(r[0],r[1],s[0]-r[0],s[1]-r[1],n)},inverseTransform:function(){return this._inverseTransform(Z.read(arguments))},_inverseTransform:function(t,e,n){var i,r,s=this._a,a=this._b,o=this._c,h=this._d,u=this._tx,l=this._ty,c=s*h-a*o,f=null;return c&&!isNaN(c)&&isFinite(u)&&isFinite(l)&&(i=t.x-this._tx,r=t.y-this._ty,f=(e=e||new Z)._set((i*h-r*o)/c,(r*s-i*a)/c,n)),f},decompose:function(){var t,e,n,i,r,s=this._a,a=this._b,o=this._c,h=this._d,u=s*h-a*o,l=Math.sqrt,c=Math.atan2,f=180/Math.PI;return i=0!==s||0!==a?(t=l(s*s+a*a),e=Math.acos(s/t)*(0o[r]&&(o[r]=i)}s/=2;var l=a[r]+s,c=o[r]-s;if(t(t||0)},isCollinear:function(t){return t&&this.isStraight()&&t.isStraight()&&this.getLine().isCollinear(t.getLine())},isHorizontal:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).y)<1e-8},isVertical:function(){return this.isStraight()&&Math.abs(this.getTangentAtTime(.5).x)<1e-8}}),{beans:!1,getLocationAt:function(t,e){return this.getLocationAtTime(e?t:this.getTimeAt(t))},getLocationAtTime:function(t){return null!=t&&0<=t&&t<=1?new K(this,t):null},getTimeAt:function(t,e){return X.getTimeAt(this.getValues(),t,e)},getParameterAt:"#getTimeAt",getTimesWithTangent:function(){var t=Z.read(arguments);return t.isZero()?[]:X.getTimesWithTangent(this.getValues(),t)},getOffsetAtTime:function(t){return this.getPartLength(0,t)},getLocationOf:function(){return this.getLocationAtTime(this.getTimeOf(Z.read(arguments)))},getOffsetOf:function(){var t=this.getLocationOf.apply(this,arguments);return t?t.getOffset():null},getTimeOf:function(){return X.getTimeOf(this.getValues(),Z.read(arguments))},getParameterOf:"#getTimeOf",getNearestLocation:function(){var t=Z.read(arguments),e=this.getValues(),n=X.getNearestTime(e,t),i=X.getPoint(e,n);return new K(this,n,i,null,t.getDistance(i))},getNearestPoint:function(){var t=this.getNearestLocation.apply(this,arguments);return t?t.getPoint():t}},new function(){var t=["getPoint","getTangent","getNormal","getWeightedTangent","getWeightedNormal","getCurvature"];return U.each(t,function(i){this[i+"At"]=function(t,e){var n=this.getValues();return X[i](n,e?t:X.getTimeAt(n,t))},this[i+"AtTime"]=function(t){return X[i](this.getValues(),t)}},{statics:{_evaluateMethods:t}})},new function(){function f(t){var e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],u=9*(i-s)+3*(o-e),l=6*(e+s)-12*i,c=3*(i-e),f=9*(r-a)+3*(h-n),d=6*(n+a)-12*r,_=3*(r-n);return function(t){var e=(u*t+l)*t+c,n=(f*t+d)*t+_;return Math.sqrt(e*e+n*n)}}function d(t,e){return Math.max(2,Math.min(16,Math.ceil(32*Math.abs(e-t))))}function n(t,e,n,i){if(null==e||e<0||1i?r(e,!1,i):t[0][0]}function r(t,e,n){for(var i=t[0][0],r=t[0][1],s=1,a=t.length;so(e[0],e[2],e[4],e[6])&&o(t[0],t[2],t[4],t[6])-ao(e[1],e[3],e[5],e[7])&&o(t[1],t[3],t[5],t[7])-a>1,m=1&l,y=6*v,w=6*m,x=new Z(t[y],t[1+y]),b=new Z(e[w],e[1+w]);x.isClose(b,a)&&j(r,s,n,v,i,m)}}}return r}function b(t,e,n,i){var r,s=X.classify(t);return"loop"===s.type&&j(n,i,e,(r=s.roots)[0],e,r[1]),n}function S(t,e){function n(t){var e=t[6]-t[0],n=t[7]-t[1];return e*e+n*n}var i=Math.abs,r=G.getDistance,s=1e-7,a=X.isStraight(t),o=X.isStraight(e),h=a&&o,u=n(t)>1,k=X.getTimeOf(m[b],new Z(m[C][S?6:0],m[C][S?7:1]));if(null!=k&&(x=b?[S,k]:[k,S],(!y.length||1e-8s||i(v[3]-p[3])>s||i(v[4]-p[4])>s||i(v[5]-p[5])>s)&&(y=null)),y}return{getIntersections:function(t){var e=this.getValues(),n=t&&t!==this&&t.getValues();return n?x(e,n,this,t,[]):b(e,this,[])},statics:{getOverlaps:S,getIntersections:function(t,e,n,i,r,s){var a=!e;a&&(e=t);for(var o=t.length,h=e.length,u=new Array(o),l=a?u:new Array(h),c=[],f=0;f>>1,u=r[h];if(t&&(o=s.equals(u)?u:i(h,-1)||i(h,1)))return s._overlap&&(o._overlap=o._intersection._overlap=!0),o;var l=s.getPath(),c=u.getPath();(l!==c?l._id-c._id:s.getIndex()+s.getTime()-(u.getIndex()+u.getTime()))<0?n=h-1:e=1+h}return r.splice(e,0,s),s}return{statics:{insert:i,expand:function(t){for(var e=t.slice(),n=t.length-1;0<=n;n--)i(e,t[n]._intersection,!1);return e}}}}),z=D.extend({_class:"PathItem",_selectBounds:!1,_canScaleStroke:!0,beans:!0,initialize:function(){},statics:{create:function(t){var e,n,i,r;return U.isPlainObject(t)?(n=t.segments,e=t.pathData):Array.isArray(t)?n=t:"string"==typeof t&&(e=t),n?r=(i=n[0])&&Array.isArray(i[0]):e&&(r=1<(e.match(/m/gi)||[]).length||/z\s*\S+/i.test(e)),new(r?Y:Q)(t)}},_asPathItem:function(){return this},isClockwise:function(){return 0<=this.getArea()},setClockwise:function(t){this.isClockwise()!=(t=!!t)&&this.reverse()},setPathData:function(t){var e,n,i=t&&t.match(/[mlhvcsqtaz][^mlhvcsqtaz]*/gi),r=!1,s=new Z,a=new Z;function o(t,e){var n=+c[t];return r&&(n+=s[e]),n}function h(t){return new Z(o(t,"x"),o(t+1,"y"))}this.clear();for(var u=0,l=i&&i.length;u=s&&(a=0),d=u[a]||i[a].getValues(),o=0),!h)return _[0]===a&&_[1]===o;continue}}break}return!1},_hitTestSelf:function(i,r,t,s){var a,o,h,u,e,n,l,c=this,f=this.getStyle(),d=this._segments,_=d.length,g=this._closed,p=r._tolerancePadding,v=p,m=r.stroke&&f.hasStroke(),y=r.fill&&f.hasFill(),w=r.curves,x=m?f.getStrokeWidth()/2:y&&0=E(e,n,i,r))for(var s,a=t[y+0],o=t[y+2],h=t[y+4],u=t[y+6],l=S>L(a,o,h,u)||kL(e,n))){var i=t[y+0],r=t[y+2],s=t[y+4],a=t[y+6];if(e!==n){var o=b===e?0:b!==n&&!(S>L(i,r,s,a)||km[w+6]?1:-1,c=m[y+6];return b!==e?(hu.quality&&(u=C);break}c-=g}for(f=s.length-1;0<=f;f--)s[f].segment._winding=u}function R(t,n){var u,e=[];function l(t){var e;return!(!t||t._visited||n&&(!n[(e=t._winding||{}).winding]||n.unite&&2===e.winding&&e.windingL&&e.windingR))}function c(t){if(t)for(var e=0,n=u.length;e=E(h,u,l,c)&&n<=L(h,u,l,c))for(var f=X.getMonoCurves(o),d=0,_=f.length;d<_;d++){var g,p=f[d],v=p[1],m=p[7];v!==m&&(v<=n&&n<=m||m<=n&&n<=v)&&(g=n===v?p[0]:n===m?p[6]:1===X.solveCubic(p,1,n,r,0,1)?X.getPoint(p,r[0]).x:(p[0]+p[6])/2,i.push(g))}}1=t){var a=n[(this.index=e)-1],o=a&&a.index===s.index?a.time:0,h=a?a.offset:0;return{index:s.index,time:o+(s.time-o)*(t-h)/(s.offset-h)}}}return{index:n[i-1].index,time:1}},drawPart:function(t,e,n){for(var i=this._get(e),r=this._get(n),s=i.index,a=r.index;s<=a;s++){var o=X.getPart(this.curves[s],s===i.index?i.time:0,s===r.index?r.time:1);s===i.index&&t.moveTo(o[0],o[1]),t.bezierCurveTo.apply(t,o.slice(2))}}},U.each(X._evaluateMethods,function(n){this[n+"At"]=function(t){var e=this._get(t);return X[n](this.curves[e.index],e.time)}},{})),i=U.extend({initialize:function(t){for(var e,n=this.points=[],i=t._segments,r=t._closed,s=0,a=i.length;s=u)break;l=this.reparameterize(n,i,h,f),u=d.error}var _=a[o-1].subtract(a[o+1]);this.fitCubic(t,e,n,o,r,_),this.fitCubic(t,e,o,i,_.negate(),s)}else{var g=a[n],p=a[i],v=g.getDistance(p)/3;this.addCurve(t,[g,g.add(r.normalize(v)),p.add(s.normalize(v)),p])}},addCurve:function(t,e){t[t.length-1].setHandleOut(e[1].subtract(e[0])),t.push(new J(e[3],e[2].subtract(e[3])))},generateBezier:function(t,e,n,i,r){for(var s=Math.abs,a=this.points,o=a[t],h=a[e],u=[[0,0],[0,0]],l=[0,0],c=0,f=e-t+1;cz*z&&(S=k=z/3,T=O=null)),[o,o.add(T||i.normalize(S)),h.add(O||r.normalize(k)),h]},reparameterize:function(t,e,n,i){for(var r=t;r<=e;r++)n[r-t]=this.findRoot(i,this.points[r],n[r-t]);for(var r=1,s=n.length;ro&&(n=U.slice(n,0,o))}else if("string"===a){var u,l=function(t){var e=t.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i)||t.match(/^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i),n="rgb";if(e)for(var i=e[4]?4:3,r=new Array(i),s=0;sn&&(c=u.add(i.normalize(n-.1))),r=c||u,t.createRadialGradient(r.x,r.y,0,u.x,u.y,n)):t.createLinearGradient(u.x,u.y,l.x,l.y);for(var d=0,_=h.length;d<_;d++){var g=h[d],p=g._offset;s.addColorStop(null==p?d/(_-1):p,g._color.toCanvasStyle())}return this._canvasStyle=s},transform:function(t){if("gradient"===this._type){for(var e=this._components,n=1,i=e.length;nthis._maxDistance&&(this._maxDistance=t)},getMaxDistance:function(){return this._maxDistance},setMaxDistance:function(t){this._maxDistance=t,null!=this._minDistance&&null!=t&&tr[a]?(r[o]=(r[o]-r[a])*i/(r[s]-r[a]),r[s]=i):r[o]=r[s]=0,r[a]=0,C=r[0],S=r[1],k=r[2]}var I={multiply:function(){C=y*g/255,S=w*p/255,k=x*v/255},screen:function(){C=y+g-y*g/255,S=w+p-w*p/255,k=x+v-x*v/255},overlay:function(){C=y<128?2*y*g/255:255-2*(255-y)*(255-g)/255,S=w<128?2*w*p/255:255-2*(255-w)*(255-p)/255,k=x<128?2*x*v/255:255-2*(255-x)*(255-v)/255},"soft-light":function(){var t=g*y/255;C=t+y*(255-(255-y)*(255-g)/255-t)/255,S=(t=p*w/255)+w*(255-(255-w)*(255-p)/255-t)/255,k=(t=v*x/255)+x*(255-(255-x)*(255-v)/255-t)/255},"hard-light":function(){C=g<128?2*g*y/255:255-2*(255-g)*(255-y)/255,S=p<128?2*p*w/255:255-2*(255-p)*(255-w)/255,k=v<128?2*v*x/255:255-2*(255-v)*(255-x)/255},"color-dodge":function(){C=0===y?0:255===g?255:l(255,255*y/(255-g)),S=0===w?0:255===p?255:l(255,255*w/(255-p)),k=0===x?0:255===v?255:l(255,255*x/(255-v))},"color-burn":function(){C=255===y?255:0===g?0:c(0,255-255*(255-y)/g),S=255===w?255:0===p?0:c(0,255-255*(255-w)/p),k=255===x?255:0===v?0:c(0,255-255*(255-x)/v)},darken:function(){C=y=t)break;t+=i[1]}return t}function _(t){return f.substring(d(t.range[0]),d(t.range[1]))}function g(t,e){for(var n=d(t.range[0]),i=d(t.range[1]),r=0,s=a.length-1;0<=s;s--)if(n>a[s][0]){r=s+1;break}a.splice(r,0,[n,e.length-i+n]),f=f.substring(0,n)+e+f.substring(i)}function h(t,e){switch(t.type){case"UnaryExpression":t.operator in x&&"Literal"!==t.argument.type&&(r=_(t.argument),g(t,'$__("'+t.operator+'", '+r+")"));break;case"BinaryExpression":var n,i;t.operator in w&&"Literal"!==t.left.type&&(a=_(t.left),o=_(t.right),l=t.left,c=t.right,n=f.substring(d(l.range[1]),d(c.range[0])),i=t.operator,g(t,"__$__("+a+","+n.replace(new RegExp("\\"+i),'"'+i+'"')+", "+o+")"));break;case"UpdateExpression":case"AssignmentExpression":var r,s,a,o,h,u=e&&e.type;"ForStatement"===u||"BinaryExpression"===u&&/^[=!<>]/.test(e.operator)||"MemberExpression"===u&&e.computed||("UpdateExpression"===t.type?(s=(r=_(t.argument))+" = "+(h="__$__("+r+', "'+t.operator[0]+'", 1)'),t.prefix?s="("+s+")":"AssignmentExpression"!==u&&"VariableDeclarator"!==u&&"BinaryExpression"!==u||(_(e.left||e.id)===r&&(s=h),s=r+"; "+s),g(t,s)):/^.=$/.test(t.operator)&&"Literal"!==t.left.type&&(a=_(t.left),o=_(t.right),h=a+" = __$__("+a+', "'+t.operator[0]+'", '+o+")",g(t,/^\(.*\)$/.test(_(t))?"("+h+")":h)))}var l,c}var e,n,i,r=(t=t||{}).url||"",s=t.sourceMaps,o=t.paperFeatures||{},u=t.source||f,l=t.offset||0,c=at.agent,p=c.versionNumber,v=!1,m=/\r\n|\n|\r/gm;return s&&(c.chrome&&30<=p||c.webkit&&537.76<=p||c.firefox&&23<=p||c.node)&&(c.node?l-=2:A&&r&&!A.location.href.indexOf(r)&&(l=(n=T.getElementsByTagName("html")[0].innerHTML).substr(0,n.indexOf(f)+1).match(m).length+1),(i=["AA"+function(t){var e="";for(t=(Math.abs(t)<<1)+(t<0?1:0);t||!e;){var n=31&t;(t>>=5)&&(n|=32),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n]}return e}((v=0 0.0) { + c.rgb /= c.a; + + vec3 rgb = pow(c.rgb, vec3(1. / gamma)); + rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast); + rgb.r *= red; + rgb.g *= green; + rgb.b *= blue; + c.rgb = rgb * brightness; + + c.rgb *= c.a; + } + + gl_FragColor = c * alpha; +} +`;class ke extends a.Filter{constructor(e){super(Me,De),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,e)}apply(e,r,i,o){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,e.applyFilter(this,r,i,o)}}var Oe=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Re=` +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 uOffset; + +void main(void) +{ + vec4 color = vec4(0.0); + + // Sample top left pixel + color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y)); + + // Sample top right pixel + color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y)); + + // Sample bottom right pixel + color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y)); + + // Sample bottom left pixel + color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y)); + + // Average + color *= 0.25; + + gl_FragColor = color; +}`,Ee=` +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec2 uOffset; +uniform vec4 filterClamp; + +void main(void) +{ + vec4 color = vec4(0.0); + + // Sample top left pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample top right pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample bottom right pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Sample bottom left pixel + color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw)); + + // Average + color *= 0.25; + + gl_FragColor = color; +} +`;class T extends a.Filter{constructor(e=4,r=3,i=!1){super(Oe,i?Ee:Re),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new a.Point,this.pixelSize=1,this._clamp=i,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=r)}apply(e,r,i,o){const s=this._pixelSize.x/r._frame.width,n=this._pixelSize.y/r._frame.height;let l;if(this._quality===1||this._blur===0)l=this._kernels[0]+.5,this.uniforms.uOffset[0]=l*s,this.uniforms.uOffset[1]=l*n,e.applyFilter(this,r,i,o);else{const u=e.getFilterTexture();let h=r,p=u,S;const g=this._quality-1;for(let x=0;xe+r+.5,0))}_generateKernels(){const e=this._blur,r=this._quality,i=[e];if(e>0){let o=e;const s=e/r;for(let n=1;n0?(this._kernels=e,this._quality=e.length,this._blur=Math.max(...e)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(e){typeof e=="number"?(this._pixelSize.x=e,this._pixelSize.y=e):Array.isArray(e)?(this._pixelSize.x=e[0],this._pixelSize.y=e[1]):e instanceof a.Point?(this._pixelSize.x=e.x,this._pixelSize.y=e.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()}get blur(){return this._blur}set blur(e){this._blur=e,this._generateKernels()}}var L=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,$e=` +uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform float threshold; + +void main() { + vec4 color = texture2D(uSampler, vTextureCoord); + + // A simple & fast algorithm for getting brightness. + // It's inaccuracy , but good enought for this feature. + float _max = max(max(color.r, color.g), color.b); + float _min = min(min(color.r, color.g), color.b); + float brightness = (_max + _min) * 0.5; + + if(brightness > threshold) { + gl_FragColor = color; + } else { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } +} +`;class je extends a.Filter{constructor(e=.5){super(L,$e),this.threshold=e}get threshold(){return this.uniforms.threshold}set threshold(e){this.uniforms.threshold=e}}var Ie=`uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform sampler2D bloomTexture; +uniform float bloomScale; +uniform float brightness; + +void main() { + vec4 color = texture2D(uSampler, vTextureCoord); + color.rgb *= brightness; + vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0); + bloomColor.rgb *= bloomScale; + gl_FragColor = color + bloomColor; +} +`;const V=class extends a.Filter{constructor(t){super(L,Ie),this.bloomScale=1,this.brightness=1,this._resolution=a.settings.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const e=Object.assign(V.defaults,t);this.bloomScale=e.bloomScale,this.brightness=e.brightness;const{kernels:r,blur:i,quality:o,pixelSize:s,resolution:n}=e;this._extractFilter=new je(e.threshold),this._extractFilter.resolution=n,this._blurFilter=r?new T(r):new T(i,o),this.pixelSize=s,this.resolution=n}apply(t,e,r,i,o){const s=t.getFilterTexture();this._extractFilter.apply(t,e,s,1,o);const n=t.getFilterTexture();this._blurFilter.apply(t,s,n,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=n,t.applyFilter(this,e,r,i),t.returnFilterTexture(n),t.returnFilterTexture(s)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let N=V;N.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:a.settings.FILTER_RESOLUTION};var Le=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Ve=`varying vec2 vTextureCoord; + +uniform vec4 filterArea; +uniform float pixelSize; +uniform sampler2D uSampler; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 pixelate(vec2 coord, vec2 size) +{ + return floor(coord / size) * size; +} + +vec2 getMod(vec2 coord, vec2 size) +{ + return mod(coord, size) / size; +} + +float character(float n, vec2 p) +{ + p = floor(p*vec2(4.0, 4.0) + 2.5); + + if (clamp(p.x, 0.0, 4.0) == p.x) + { + if (clamp(p.y, 0.0, 4.0) == p.y) + { + if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0; + } + } + return 0.0; +} + +void main() +{ + vec2 coord = mapCoord(vTextureCoord); + + // get the grid position + vec2 pixCoord = pixelate(coord, vec2(pixelSize)); + pixCoord = unmapCoord(pixCoord); + + // sample the color at grid position + vec4 color = texture2D(uSampler, pixCoord); + + // brightness of the color as it's perceived by the human eye + float gray = 0.3 * color.r + 0.59 * color.g + 0.11 * color.b; + + // determine the character to use + float n = 65536.0; // . + if (gray > 0.2) n = 65600.0; // : + if (gray > 0.3) n = 332772.0; // * + if (gray > 0.4) n = 15255086.0; // o + if (gray > 0.5) n = 23385164.0; // & + if (gray > 0.6) n = 15252014.0; // 8 + if (gray > 0.7) n = 13199452.0; // @ + if (gray > 0.8) n = 11512810.0; // # + + // get the mod.. + vec2 modd = getMod(coord, vec2(pixelSize)); + + gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); + +} +`;class Ne extends a.Filter{constructor(e=8){super(Le,Ve),this.size=e}get size(){return this.uniforms.pixelSize}set size(e){this.uniforms.pixelSize=e}}var Ge=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Be=`precision mediump float; + +varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform float transformX; +uniform float transformY; +uniform vec3 lightColor; +uniform float lightAlpha; +uniform vec3 shadowColor; +uniform float shadowAlpha; + +void main(void) { + vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY); + vec4 color = texture2D(uSampler, vTextureCoord); + float light = texture2D(uSampler, vTextureCoord - transform).a; + float shadow = texture2D(uSampler, vTextureCoord + transform).a; + + color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0)); + color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); + gl_FragColor = vec4(color.rgb * color.a, color.a); +} +`;class Xe extends a.Filter{constructor(e){super(Ge,Be),this._thickness=2,this._angle=0,this.uniforms.lightColor=new Float32Array(3),this.uniforms.shadowColor=new Float32Array(3),Object.assign(this,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},e),this.padding=1}_updateTransform(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)}get rotation(){return this._angle/a.DEG_TO_RAD}set rotation(e){this._angle=e*a.DEG_TO_RAD,this._updateTransform()}get thickness(){return this._thickness}set thickness(e){this._thickness=e,this._updateTransform()}get lightColor(){return a.utils.rgb2hex(this.uniforms.lightColor)}set lightColor(e){a.utils.hex2rgb(e,this.uniforms.lightColor)}get lightAlpha(){return this.uniforms.lightAlpha}set lightAlpha(e){this.uniforms.lightAlpha=e}get shadowColor(){return a.utils.rgb2hex(this.uniforms.shadowColor)}set shadowColor(e){a.utils.hex2rgb(e,this.uniforms.shadowColor)}get shadowAlpha(){return this.uniforms.shadowAlpha}set shadowAlpha(e){this.uniforms.shadowAlpha=e}}class qe extends a.Filter{constructor(e=2,r=4,i=a.settings.FILTER_RESOLUTION,o=5){super();let s,n;typeof e=="number"?(s=e,n=e):e instanceof a.Point?(s=e.x,n=e.y):Array.isArray(e)&&(s=e[0],n=e[1]),this.blurXFilter=new I.BlurFilterPass(!0,s,r,i,o),this.blurYFilter=new I.BlurFilterPass(!1,n,r,i,o),this.blurYFilter.blendMode=a.BLEND_MODES.SCREEN,this.defaultFilter=new Pe.AlphaFilter}apply(e,r,i,o){const s=e.getFilterTexture();this.defaultFilter.apply(e,r,i,o),this.blurXFilter.apply(e,r,s,1),this.blurYFilter.apply(e,s,i,0),e.returnFilterTexture(s)}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e}}var Ke=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,We=`uniform float radius; +uniform float strength; +uniform vec2 center; +uniform sampler2D uSampler; +varying vec2 vTextureCoord; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; + +void main() +{ + vec2 coord = vTextureCoord * filterArea.xy; + coord -= center * dimensions.xy; + float distance = length(coord); + if (distance < radius) { + float percent = distance / radius; + if (strength > 0.0) { + coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75); + } else { + coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent); + } + } + coord += center * dimensions.xy; + coord /= filterArea.xy; + vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); + vec4 color = texture2D(uSampler, clampedCoord); + if (coord != clampedCoord) { + color *= max(0.0, 1.0 - length(coord - clampedCoord)); + } + + gl_FragColor = color; +} +`;const G=class extends a.Filter{constructor(t){super(Ke,We),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,G.defaults,t)}apply(t,e,r,i){const{width:o,height:s}=e.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,t.applyFilter(this,e,r,i)}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get strength(){return this.uniforms.strength}set strength(t){this.uniforms.strength=t}get center(){return this.uniforms.center}set center(t){this.uniforms.center=t}};let B=G;B.defaults={center:[.5,.5],radius:100,strength:1};var Ye=`const float PI = 3.1415926538; +const float PI_2 = PI*2.; + +varying vec2 vTextureCoord; +varying vec2 vFilterCoord; +uniform sampler2D uSampler; + +const int TYPE_LINEAR = 0; +const int TYPE_RADIAL = 1; +const int TYPE_CONIC = 2; +const int MAX_STOPS = 32; + +uniform int uNumStops; +uniform float uAlphas[3*MAX_STOPS]; +uniform vec3 uColors[MAX_STOPS]; +uniform float uOffsets[MAX_STOPS]; +uniform int uType; +uniform float uAngle; +uniform float uAlpha; +uniform int uMaxColors; + +struct ColorStop { + float offset; + vec3 color; + float alpha; +}; + +mat2 rotate2d(float angle){ + return mat2(cos(angle), -sin(angle), + sin(angle), cos(angle)); +} + +float projectLinearPosition(vec2 pos, float angle){ + vec2 center = vec2(0.5); + vec2 result = pos - center; + result = rotate2d(angle) * result; + result = result + center; + return clamp(result.x, 0., 1.); +} + +float projectRadialPosition(vec2 pos) { + float r = distance(vFilterCoord, vec2(0.5)); + return clamp(2.*r, 0., 1.); +} + +float projectAnglePosition(vec2 pos, float angle) { + vec2 center = pos - vec2(0.5); + float polarAngle=atan(-center.y, center.x); + return mod(polarAngle + angle, PI_2) / PI_2; +} + +float projectPosition(vec2 pos, int type, float angle) { + if (type == TYPE_LINEAR) { + return projectLinearPosition(pos, angle); + } else if (type == TYPE_RADIAL) { + return projectRadialPosition(pos); + } else if (type == TYPE_CONIC) { + return projectAnglePosition(pos, angle); + } + + return pos.y; +} + +void main(void) { + // current/original color + vec4 currentColor = texture2D(uSampler, vTextureCoord); + + // skip calculations if gradient alpha is 0 + if (0.0 == uAlpha) { + gl_FragColor = currentColor; + return; + } + + // project position + float y = projectPosition(vFilterCoord, uType, radians(uAngle)); + + // check gradient bounds + float offsetMin = uOffsets[0]; + float offsetMax = 0.0; + + for (int i = 0; i < MAX_STOPS; i++) { + if (i == uNumStops-1){ // last index + offsetMax = uOffsets[i]; + } + } + + if (y < offsetMin || y > offsetMax) { + gl_FragColor = currentColor; + return; + } + + // limit colors + if (uMaxColors > 0) { + float stepSize = 1./float(uMaxColors); + float stepNumber = float(floor(y/stepSize)); + y = stepSize * (stepNumber + 0.5);// offset by 0.5 to use color from middle of segment + } + + // find color stops + ColorStop from; + ColorStop to; + + for (int i = 0; i < MAX_STOPS; i++) { + if (y >= uOffsets[i]) { + from = ColorStop(uOffsets[i], uColors[i], uAlphas[i]); + to = ColorStop(uOffsets[i+1], uColors[i+1], uAlphas[i+1]); + } + + if (i == uNumStops-1){ // last index + break; + } + } + + // mix colors from stops + vec4 colorFrom = vec4(from.color * from.alpha, from.alpha); + vec4 colorTo = vec4(to.color * to.alpha, to.alpha); + + float segmentHeight = to.offset - from.offset; + float relativePos = y - from.offset;// position from 0 to [segmentHeight] + float relativePercent = relativePos / segmentHeight;// position in percent between [from.offset] and [to.offset]. + + float gradientAlpha = uAlpha * currentColor.a; + vec4 gradientColor = mix(colorFrom, colorTo, relativePercent) * gradientAlpha; + + // mix resulting color with current color + gl_FragColor = gradientColor + currentColor*(1.-gradientColor.a); +} +`,Ue=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; +uniform vec4 inputSize; +uniform vec4 outputFrame; + +varying vec2 vTextureCoord; +varying vec2 vFilterCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; + vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw; +} +`,_=_||{};_.stringify=function(){var t={"visit_linear-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return t.visit_gradient(e)},"visit_radial-gradient":function(e){return t.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return t.visit_gradient(e)},visit_gradient:function(e){var r=t.visit(e.orientation);return r&&(r+=", "),e.type+"("+r+t.visit(e.colorStops)+")"},visit_shape:function(e){var r=e.value,i=t.visit(e.at),o=t.visit(e.style);return o&&(r+=" "+o),i&&(r+=" at "+i),r},"visit_default-radial":function(e){var r="",i=t.visit(e.at);return i&&(r+=i),r},"visit_extent-keyword":function(e){var r=e.value,i=t.visit(e.at);return i&&(r+=" at "+i),r},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return t.visit(e.value.x)+" "+t.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return t.visit_color(e.value,e)},visit_hex:function(e){return t.visit_color("#"+e.value,e)},visit_rgb:function(e){return t.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return t.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,r){var i=e,o=t.visit(r.length);return o&&(i+=" "+o),i},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var r="",i=e.length;return e.forEach(function(o,s){r+=t.visit(o),s0&&r("Invalid input not EOF"),c}function o(){return z(s)}function s(){return n("linear-gradient",t.linearGradient,u)||n("repeating-linear-gradient",t.repeatingLinearGradient,u)||n("radial-gradient",t.radialGradient,S)||n("repeating-radial-gradient",t.repeatingRadialGradient,S)}function n(c,d,m){return l(d,function(C){var we=m();return we&&(y(t.comma)||r("Missing comma before color stops")),{type:c,orientation:we,colorStops:z(Vr)}})}function l(c,d){var m=y(c);if(m){y(t.startCall)||r("Missing (");var C=d(m);return y(t.endCall)||r("Missing )"),C}}function u(){return h()||p()}function h(){return v("directional",t.sideOrCorner,1)}function p(){return v("angular",t.angleValue,1)}function S(){var c,d=g(),m;return d&&(c=[],c.push(d),m=e,y(t.comma)&&(d=g(),d?c.push(d):e=m)),c}function g(){var c=x()||Ir();if(c)c.at=Se();else{var d=j();if(d){c=d;var m=Se();m&&(c.at=m)}else{var C=Te();C&&(c={type:"default-radial",at:C})}}return c}function x(){var c=v("shape",/^(circle)/i,0);return c&&(c.style=Ae()||j()),c}function Ir(){var c=v("shape",/^(ellipse)/i,0);return c&&(c.style=w()||j()),c}function j(){return v("extent-keyword",t.extentKeywords,1)}function Se(){if(v("position",/^at/,0)){var c=Te();return c||r("Missing positioning value"),c}}function Te(){var c=Lr();if(c.x||c.y)return{type:"position",value:c}}function Lr(){return{x:w(),y:w()}}function z(c){var d=c(),m=[];if(d)for(m.push(d);y(t.comma);)d=c(),d?m.push(d):r("One extra comma");return m}function Vr(){var c=Nr();return c||r("Expected color definition"),c.length=w(),c}function Nr(){return Br()||qr()||Xr()||Gr()}function Gr(){return v("literal",t.literalColor,0)}function Br(){return v("hex",t.hexColor,1)}function Xr(){return l(t.rgbColor,function(){return{type:"rgb",value:z(Fe)}})}function qr(){return l(t.rgbaColor,function(){return{type:"rgba",value:z(Fe)}})}function Fe(){return y(t.number)[1]}function w(){return v("%",t.percentageValue,1)||Kr()||Ae()}function Kr(){return v("position-keyword",t.positionKeywords,1)}function Ae(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(c,d,m){var C=y(d);if(C)return{type:c,value:C[m]}}function y(c){var d,m;return m=/^[\n\r\t\s]+/.exec(e),m&&ze(m[0].length),d=c.exec(e),d&&ze(d[0].length),d}function ze(c){e=e.substr(c)}return function(c){return e=c.toString(),i()}}();var Ze=_.parse;_.stringify;var X={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},q={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function He(t){var e,r=[],i=1,o;if(typeof t=="string")if(X[t])r=X[t].slice(),o="rgb";else if(t==="transparent")i=0,o="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1),n=s.length,l=n<=4;i=1,l?(r=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],n===4&&(i=parseInt(s[3]+s[3],16)/255)):(r=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],n===8&&(i=parseInt(s[6]+s[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),o="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var u=e[1],h=u==="rgb",s=u.replace(/a$/,"");o=s;var n=s==="cmyk"?4:s==="gray"?1:3;r=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(g,x){if(/%$/.test(g))return x===n?parseFloat(g)/100:s==="rgb"?parseFloat(g)*255/100:parseFloat(g);if(s[x]==="h"){if(/deg$/.test(g))return parseFloat(g);if(q[g]!==void 0)return q[g]}return parseFloat(g)}),u===s&&r.push(1),i=h||r[n]===void 0?1:r[n],r=r.slice(0,n)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(r=t.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),o=t.match(/([a-z])/ig).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(r=[t[0],t[1],t[2]],o="rgb",i=t.length===4?t[3]:1):t instanceof Object&&(t.r!=null||t.red!=null||t.R!=null?(o="rgb",r=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(o="hsl",r=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),i=t.a||t.alpha||t.opacity||1,t.opacity!=null&&(i/=100)):(o="rgb",r=[t>>>16,(t&65280)>>>8,t&255]);return{space:o,values:r,alpha:i}}var P={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},M={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,o,s,n,l,u;if(r===0)return u=i*255,[u,u,u];i<.5?s=i*(1+r):s=i+r-i*r,o=2*i-s,l=[0,0,0];for(var h=0;h<3;h++)n=e+1/3*-(h-1),n<0?n++:n>1&&n--,6*n<1?u=o+(s-o)*6*n:2*n<1?u=s:3*n<2?u=o+(s-o)*(2/3-n)*6:u=o,l[h]=u*255;return l}};P.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,o=Math.min(e,r,i),s=Math.max(e,r,i),n=s-o,l,u,h;return s===o?l=0:e===s?l=(r-i)/n:r===s?l=2+(i-e)/n:i===s&&(l=4+(e-r)/n),l=Math.min(l*60,360),l<0&&(l+=360),h=(o+s)/2,s===o?u=0:h<=.5?u=n/(s+o):u=n/(2-s-o),[l,u*100,h*100]};function Qe(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments));var e,r=He(t);if(!r.space)return[];const i=r.space[0]==="h"?M.min:P.min,o=r.space[0]==="h"?M.max:P.max;return e=Array(3),e[0]=Math.min(Math.max(r.values[0],i[0]),o[0]),e[1]=Math.min(Math.max(r.values[1],i[1]),o[1]),e[2]=Math.min(Math.max(r.values[2],i[2]),o[2]),r.space[0]==="h"&&(e=M.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}function K(t){switch(typeof t){case"string":return Je(t);case"number":return a.utils.hex2rgb(t);default:return t}}function Je(t){const e=Qe(t);if(!e)throw new Error(`Unable to parse color "${t}" as RGBA.`);return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function et(t){const e=Ze(ut(t));if(e.length===0)throw new Error("Invalid CSS gradient.");if(e.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=e[0],i=tt(r.type),o=rt(r.colorStops),s=nt(r.orientation);return{type:i,stops:o,angle:s}}function tt(t){const e={"linear-gradient":0,"radial-gradient":1};if(!(t in e))throw new Error(`Unsupported gradient type "${t}"`);return e[t]}function rt(t){const e=st(t),r=[];for(let i=0;i{for(let s=o;s6?parseFloat(t.toString().substring(0,6)):t}function nt(t){if(typeof t=="undefined")return 0;if("type"in t&&"value"in t)switch(t.type){case"angular":return parseFloat(t.value);case"directional":return lt(t.value)}return 0}function lt(t){const e={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(t in e))throw new Error(`Unsupported directional value "${t}"`);return e[t]}function ut(t){let e=t.replace(/\s{2,}/gu," ");return e=e.replace(/;/g,""),e=e.replace(/ ,/g,","),e=e.replace(/\( /g,"("),e=e.replace(/ \)/g,")"),e.trim()}var ct=Object.defineProperty,ft=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Y=(t,e,r)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))ht.call(e,r)&&Y(t,r,e[r]);if(W)for(var r of W(e))mt.call(e,r)&&Y(t,r,e[r]);return t},gt=(t,e)=>ft(t,dt(e));const U=90;function vt(t){return[...t].sort((e,r)=>e.offset-r.offset)}const k=class extends a.Filter{constructor(t){t&&"css"in t&&(t=gt(D({},et(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const e=D(D({},k.defaults),t);if(!e.stops||e.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(Ue,Ye),this._stops=[],this.autoFit=!1,Object.assign(this,e)}get stops(){return this._stops}set stops(t){const e=vt(t),r=new Float32Array(e.length*3),i=0,o=1,s=2;for(let n=0;nn.offset),this.uniforms.uAlphas=e.map(n=>n.alpha),this.uniforms.uNumStops=e.length,this._stops=e}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-U}get angle(){return this.uniforms.uAngle+U}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let F=k;F.LINEAR=0,F.RADIAL=1,F.CONIC=2,F.defaults={type:k.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var pt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,xt=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform sampler2D colorMap; +uniform float _mix; +uniform float _size; +uniform float _sliceSize; +uniform float _slicePixelSize; +uniform float _sliceInnerSize; +void main() { + vec4 color = texture2D(uSampler, vTextureCoord.xy); + + vec4 adjusted; + if (color.a > 0.0) { + color.rgb /= color.a; + float innerWidth = _size - 1.0; + float zSlice0 = min(floor(color.b * innerWidth), innerWidth); + float zSlice1 = min(zSlice0 + 1.0, innerWidth); + float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize; + float s0 = xOffset + (zSlice0 * _sliceSize); + float s1 = xOffset + (zSlice1 * _sliceSize); + float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize); + vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset)); + vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset)); + float zOffset = fract(color.b * innerWidth); + adjusted = mix(slice0Color, slice1Color, zOffset); + + color.rgb *= color.a; + } + gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a); + +}`;class yt extends a.Filter{constructor(e,r=!1,i=1){super(pt,xt),this.mix=1,this._size=0,this._sliceSize=0,this._slicePixelSize=0,this._sliceInnerSize=0,this._nearest=!1,this._scaleMode=null,this._colorMap=null,this._scaleMode=null,this.nearest=r,this.mix=i,this.colorMap=e}apply(e,r,i,o){this.uniforms._mix=this.mix,e.applyFilter(this,r,i,o)}get colorSize(){return this._size}get colorMap(){return this._colorMap}set colorMap(e){!e||(e instanceof a.Texture||(e=a.Texture.from(e)),e!=null&&e.baseTexture&&(e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=a.MIPMAP_MODES.OFF,this._size=e.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=e),this._colorMap=e)}get nearest(){return this._nearest}set nearest(e){this._nearest=e,this._scaleMode=e?a.SCALE_MODES.NEAREST:a.SCALE_MODES.LINEAR;const r=this._colorMap;r&&r.baseTexture&&(r.baseTexture._glTextures={},r.baseTexture.scaleMode=this._scaleMode,r.baseTexture.mipmap=a.MIPMAP_MODES.OFF,r._updateID++,r.baseTexture.emit("update",r.baseTexture))}updateColorMap(){const e=this._colorMap;e&&e.baseTexture&&(e._updateID++,e.baseTexture.emit("update",e.baseTexture),this.colorMap=e)}destroy(e=!1){this._colorMap&&this._colorMap.destroy(e),super.destroy()}}var Ct=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,_t=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec3 color; +uniform float alpha; + +void main(void) { + vec4 currentColor = texture2D(uSampler, vTextureCoord); + gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a); +} +`;class bt extends a.Filter{constructor(e=0,r=1){super(Ct,_t),this._color=0,this._alpha=1,this.uniforms.color=new Float32Array(3),this.color=e,this.alpha=r}set color(e){const r=this.uniforms.color;typeof e=="number"?(a.utils.hex2rgb(e,r),this._color=e):(r[0]=e[0],r[1]=e[1],r[2]=e[2],this._color=a.utils.rgb2hex(r))}get color(){return this._color}set alpha(e){this.uniforms.alpha=e,this._alpha=e}get alpha(){return this._alpha}}var St=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Tt=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec3 originalColor; +uniform vec3 newColor; +uniform float epsilon; +void main(void) { + vec4 currentColor = texture2D(uSampler, vTextureCoord); + vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001)); + float colorDistance = length(colorDiff); + float doReplace = step(colorDistance, epsilon); + gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a); +} +`;class Ft extends a.Filter{constructor(e=16711680,r=0,i=.4){super(St,Tt),this._originalColor=16711680,this._newColor=0,this.uniforms.originalColor=new Float32Array(3),this.uniforms.newColor=new Float32Array(3),this.originalColor=e,this.newColor=r,this.epsilon=i}set originalColor(e){const r=this.uniforms.originalColor;typeof e=="number"?(a.utils.hex2rgb(e,r),this._originalColor=e):(r[0]=e[0],r[1]=e[1],r[2]=e[2],this._originalColor=a.utils.rgb2hex(r))}get originalColor(){return this._originalColor}set newColor(e){const r=this.uniforms.newColor;typeof e=="number"?(a.utils.hex2rgb(e,r),this._newColor=e):(r[0]=e[0],r[1]=e[1],r[2]=e[2],this._newColor=a.utils.rgb2hex(r))}get newColor(){return this._newColor}set epsilon(e){this.uniforms.epsilon=e}get epsilon(){return this.uniforms.epsilon}}var At=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,zt=`precision mediump float; + +varying mediump vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform vec2 texelSize; +uniform float matrix[9]; + +void main(void) +{ + vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left + vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center + vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right + + vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left + vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center + vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right + + vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left + vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center + vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right + + gl_FragColor = + c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] + + c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] + + c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8]; + + gl_FragColor.a = c22.a; +} +`;class wt extends a.Filter{constructor(e,r=200,i=200){super(At,zt),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),e!==void 0&&(this.matrix=e),this.width=r,this.height=i}get matrix(){return this.uniforms.matrix}set matrix(e){e.forEach((r,i)=>{this.uniforms.matrix[i]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(e){this.uniforms.texelSize[0]=1/e}get height(){return 1/this.uniforms.texelSize[1]}set height(e){this.uniforms.texelSize[1]=1/e}}var Pt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Mt=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform sampler2D uSampler; + +void main(void) +{ + float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb); + + gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); + + if (lum < 1.00) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.75) + { + if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.50) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } + + if (lum < 0.3) + { + if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) + { + gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + } + } +} +`;class Dt extends a.Filter{constructor(){super(Pt,Mt)}}var kt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Ot=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec2 dimensions; + +const float SQRT_2 = 1.414213; + +const float light = 1.0; + +uniform float curvature; +uniform float lineWidth; +uniform float lineContrast; +uniform bool verticalLine; +uniform float noise; +uniform float noiseSize; + +uniform float vignetting; +uniform float vignettingAlpha; +uniform float vignettingBlur; + +uniform float seed; +uniform float time; + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + vec2 dir = vec2(vTextureCoord.xy * filterArea.xy / dimensions - vec2(0.5, 0.5)); + + gl_FragColor = texture2D(uSampler, vTextureCoord); + vec3 rgb = gl_FragColor.rgb; + + if (noise > 0.0 && noiseSize > 0.0) + { + pixelCoord.x = floor(pixelCoord.x / noiseSize); + pixelCoord.y = floor(pixelCoord.y / noiseSize); + float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; + rgb += _noise * noise; + } + + if (lineWidth > 0.0) + { + float _c = curvature > 0. ? curvature : 1.; + float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.; + vec2 uv = dir * k; + + float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c; + float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast; + rgb *= j; + float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.); + rgb *= 0.99 + ceil(segment) * 0.015; + } + + if (vignetting > 0.0) + { + float outter = SQRT_2 - vignetting * SQRT_2; + float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); + rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); + } + + gl_FragColor.rgb = rgb; +} +`;const Z=class extends a.Filter{constructor(t){super(kt,Ot),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Z.defaults,t)}apply(t,e,r,i){const{width:o,height:s}=e.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,this.uniforms.seed=this.seed,this.uniforms.time=this.time,t.applyFilter(this,e,r,i)}set curvature(t){this.uniforms.curvature=t}get curvature(){return this.uniforms.curvature}set lineWidth(t){this.uniforms.lineWidth=t}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(t){this.uniforms.lineContrast=t}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(t){this.uniforms.verticalLine=t}get verticalLine(){return this.uniforms.verticalLine}set noise(t){this.uniforms.noise=t}get noise(){return this.uniforms.noise}set noiseSize(t){this.uniforms.noiseSize=t}get noiseSize(){return this.uniforms.noiseSize}set vignetting(t){this.uniforms.vignetting=t}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(t){this.uniforms.vignettingAlpha=t}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(t){this.uniforms.vignettingBlur=t}get vignettingBlur(){return this.uniforms.vignettingBlur}};let H=Z;H.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var Rt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Et=`precision mediump float; + +varying vec2 vTextureCoord; +varying vec4 vColor; + +uniform vec4 filterArea; +uniform sampler2D uSampler; + +uniform float angle; +uniform float scale; +uniform bool grayscale; + +float pattern() +{ + float s = sin(angle), c = cos(angle); + vec2 tex = vTextureCoord * filterArea.xy; + vec2 point = vec2( + c * tex.x - s * tex.y, + s * tex.x + c * tex.y + ) * scale; + return (sin(point.x) * sin(point.y)) * 4.0; +} + +void main() +{ + vec4 color = texture2D(uSampler, vTextureCoord); + vec3 colorRGB = vec3(color); + + if (grayscale) + { + colorRGB = vec3(color.r + color.g + color.b) / 3.0; + } + + gl_FragColor = vec4(colorRGB * 10.0 - 5.0 + pattern(), color.a); +} +`;class $t extends a.Filter{constructor(e=1,r=5,i=!0){super(Rt,Et),this.scale=e,this.angle=r,this.grayscale=i}get scale(){return this.uniforms.scale}set scale(e){this.uniforms.scale=e}get angle(){return this.uniforms.angle}set angle(e){this.uniforms.angle=e}get grayscale(){return this.uniforms.grayscale}set grayscale(e){this.uniforms.grayscale=e}}var jt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,It=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform float alpha; +uniform vec3 color; + +uniform vec2 shift; +uniform vec4 inputSize; + +void main(void){ + vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw); + + // Premultiply alpha + sample.rgb = color.rgb * sample.a; + + // alpha user alpha + sample *= alpha; + + gl_FragColor = sample; +}`,Lt=Object.defineProperty,Q=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,J=(t,e,r)=>e in t?Lt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ee=(t,e)=>{for(var r in e||(e={}))Vt.call(e,r)&&J(t,r,e[r]);if(Q)for(var r of Q(e))Nt.call(e,r)&&J(t,r,e[r]);return t};const O=class extends a.Filter{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=a.settings.FILTER_RESOLUTION;const e=t?ee(ee({},O.defaults),t):O.defaults,{kernels:r,blur:i,quality:o,pixelSize:s,resolution:n}=e;this._offset=new a.ObservablePoint(this._updatePadding,this),this._tintFilter=new a.Filter(jt,It),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=n,this._blurFilter=r?new T(r):new T(i,o),this.pixelSize=s,this.resolution=n;const{shadowOnly:l,rotation:u,distance:h,offset:p,alpha:S,color:g}=e;this.shadowOnly=l,u!==void 0&&h!==void 0?(this.rotation=u,this.distance=h):this.offset=p,this.alpha=S,this.color=g}apply(t,e,r,i){const o=t.getFilterTexture();this._tintFilter.apply(t,e,o,1),this._blurFilter.apply(t,o,r,i),this.shadowOnly!==!0&&t.applyFilter(this,e,r,0),t.returnFilterTexture(o)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){a.utils.deprecation("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/a.DEG_TO_RAD}set rotation(t){a.utils.deprecation("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*a.DEG_TO_RAD,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return a.utils.rgb2hex(this._tintFilter.uniforms.color)}set color(t){a.utils.hex2rgb(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let te=O;te.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:a.settings.FILTER_RESOLUTION};var Gt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Bt=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float strength; +uniform vec4 filterArea; + + +void main(void) +{ + vec2 onePixel = vec2(1.0 / filterArea); + + vec4 color; + + color.rgb = vec3(0.5); + + color -= texture2D(uSampler, vTextureCoord - onePixel) * strength; + color += texture2D(uSampler, vTextureCoord + onePixel) * strength; + + color.rgb = vec3((color.r + color.g + color.b) / 3.0); + + float alpha = texture2D(uSampler, vTextureCoord).a; + + gl_FragColor = vec4(color.rgb * alpha, alpha); +} +`;class Xt extends a.Filter{constructor(e=5){super(Gt,Bt),this.strength=e}get strength(){return this.uniforms.strength}set strength(e){this.uniforms.strength=e}}var qt=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Kt=`// precision highp float; + +varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; +uniform float aspect; + +uniform sampler2D displacementMap; +uniform float offset; +uniform float sinDir; +uniform float cosDir; +uniform int fillMode; + +uniform float seed; +uniform vec2 red; +uniform vec2 green; +uniform vec2 blue; + +const int TRANSPARENT = 0; +const int ORIGINAL = 1; +const int LOOP = 2; +const int CLAMP = 3; +const int MIRROR = 4; + +void main(void) +{ + vec2 coord = (vTextureCoord * filterArea.xy) / dimensions; + + if (coord.x > 1.0 || coord.y > 1.0) { + return; + } + + float cx = coord.x - 0.5; + float cy = (coord.y - 0.5) * aspect; + float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5; + + // displacementMap: repeat + // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny); + + // displacementMap: mirror + ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny); + + vec4 dc = texture2D(displacementMap, vec2(0.5, ny)); + + float displacement = (dc.r - dc.g) * (offset / filterArea.x); + + coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect); + + if (fillMode == CLAMP) { + coord = clamp(coord, filterClamp.xy, filterClamp.zw); + } else { + if( coord.x > filterClamp.z ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.x -= filterClamp.z; + } else if (fillMode == MIRROR) { + coord.x = filterClamp.z * 2.0 - coord.x; + } + } else if( coord.x < filterClamp.x ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.x += filterClamp.z; + } else if (fillMode == MIRROR) { + coord.x *= -filterClamp.z; + } + } + + if( coord.y > filterClamp.w ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.y -= filterClamp.w; + } else if (fillMode == MIRROR) { + coord.y = filterClamp.w * 2.0 - coord.y; + } + } else if( coord.y < filterClamp.y ) { + if (fillMode == TRANSPARENT) { + discard; + } else if (fillMode == LOOP) { + coord.y += filterClamp.w; + } else if (fillMode == MIRROR) { + coord.y *= -filterClamp.w; + } + } + } + + gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r; + gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g; + gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b; + gl_FragColor.a = texture2D(uSampler, coord).a; +} +`;const R=class extends a.Filter{constructor(t){super(qt,Kt),this.offset=100,this.fillMode=R.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=a.Texture.from(this._canvas,{scaleMode:a.SCALE_MODES.NEAREST}),Object.assign(this,R.defaults,t)}apply(t,e,r,i){const{width:o,height:s}=e.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=s,this.uniforms.aspect=s/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,e,r,i)}_randomizeSizes(){const t=this._sizes,e=this._slices-1,r=this.sampleSize,i=Math.min(this.minSize/r,.9/this._slices);if(this.average){const o=this._slices;let s=1;for(let n=0;n0;r--){const i=Math.random()*r>>0,o=t[r];t[r]=t[i],t[i]=o}}_randomizeOffsets(){for(let t=0;t0?i:0,u=i<0?-i:0;r.fillStyle=`rgba(${l}, ${u}, 0, 1)`,r.fillRect(0,o>>0,t,n+1>>0),o+=n}e.baseTexture.update(),this.uniforms.displacementMap=e}set sizes(t){const e=Math.min(this._slices,t.length);for(let r=0;r 0.) { + result.rgb += (average - result.rgb) * (1. - 1. / (1.001 - uSaturation)); + } else { + result.rgb -= (average - result.rgb) * uSaturation; + } + + // lightness + result.rgb = mix(result.rgb, vec3(ceil(uLightness)) * color.a, abs(uLightness)); + + // alpha + gl_FragColor = mix(color, result, uAlpha); +} +`;const ae=class extends a.Filter{constructor(t){super(tr,rr),this._hue=0;const e=Object.assign({},ae.defaults,t);Object.assign(this,e)}get hue(){return this._hue}set hue(t){this._hue=t,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}get colorize(){return this.uniforms.uColorize}set colorize(t){this.uniforms.uColorize=t}get lightness(){return this.uniforms.uLightness}set lightness(t){this.uniforms.uLightness=t}get saturation(){return this.uniforms.uSaturation}set saturation(t){this.uniforms.uSaturation=t}};let ne=ae;ne.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var ir=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,or=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform vec2 uVelocity; +uniform int uKernelSize; +uniform float uOffset; + +const int MAX_KERNEL_SIZE = 2048; + +// Notice: +// the perfect way: +// int kernelSize = min(uKernelSize, MAX_KERNELSIZE); +// BUT in real use-case , uKernelSize < MAX_KERNELSIZE almost always. +// So use uKernelSize directly. + +void main(void) +{ + vec4 color = texture2D(uSampler, vTextureCoord); + + if (uKernelSize == 0) + { + gl_FragColor = color; + return; + } + + vec2 velocity = uVelocity / filterArea.xy; + float offset = -uOffset / length(uVelocity) - 0.5; + int k = uKernelSize - 1; + + for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) { + if (i == k) { + break; + } + vec2 bias = velocity * (float(i) / float(k) + offset); + color += texture2D(uSampler, vTextureCoord + bias); + } + gl_FragColor = color / float(uKernelSize); +} +`;class sr extends a.Filter{constructor(e=[0,0],r=5,i=0){super(ir,or),this.kernelSize=5,this.uniforms.uVelocity=new Float32Array(2),this._velocity=new a.ObservablePoint(this.velocityChanged,this),this.setVelocity(e),this.kernelSize=r,this.offset=i}apply(e,r,i,o){const{x:s,y:n}=this.velocity;this.uniforms.uKernelSize=s!==0||n!==0?this.kernelSize:0,e.applyFilter(this,r,i,o)}set velocity(e){this.setVelocity(e)}get velocity(){return this._velocity}setVelocity(e){if(Array.isArray(e)){const[r,i]=e;this._velocity.set(r,i)}else this._velocity.copyFrom(e)}velocityChanged(){this.uniforms.uVelocity[0]=this._velocity.x,this.uniforms.uVelocity[1]=this._velocity.y,this.padding=(Math.max(Math.abs(this._velocity.x),Math.abs(this._velocity.y))>>0)+1}set offset(e){this.uniforms.uOffset=e}get offset(){return this.uniforms.uOffset}}var ar=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,nr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform float epsilon; + +const int MAX_COLORS = %maxColors%; + +uniform vec3 originalColors[MAX_COLORS]; +uniform vec3 targetColors[MAX_COLORS]; + +void main(void) +{ + gl_FragColor = texture2D(uSampler, vTextureCoord); + + float alpha = gl_FragColor.a; + if (alpha < 0.0001) + { + return; + } + + vec3 color = gl_FragColor.rgb / alpha; + + for(int i = 0; i < MAX_COLORS; i++) + { + vec3 origColor = originalColors[i]; + if (origColor.r < 0.0) + { + break; + } + vec3 colorDiff = origColor - color; + if (length(colorDiff) < epsilon) + { + vec3 targetColor = targetColors[i]; + gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha); + return; + } + } +} +`;class lr extends a.Filter{constructor(e,r=.05,i=e.length){super(ar,nr.replace(/%maxColors%/g,i.toFixed(0))),this._replacements=[],this._maxColors=0,this.epsilon=r,this._maxColors=i,this.uniforms.originalColors=new Float32Array(i*3),this.uniforms.targetColors=new Float32Array(i*3),this.replacements=e}set replacements(e){const r=this.uniforms.originalColors,i=this.uniforms.targetColors,o=e.length;if(o>this._maxColors)throw new Error(`Length of replacements (${o}) exceeds the maximum colors length (${this._maxColors})`);r[o*3]=-1;for(let s=0;s 0.5) then: 1 - 2 * (1 - dst) * (1 - src) + return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), + (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), + (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z))); +} + + +void main() +{ + gl_FragColor = texture2D(uSampler, vTextureCoord); + vec3 color = gl_FragColor.rgb; + + if (sepia > 0.0) + { + float gray = (color.x + color.y + color.z) / 3.0; + vec3 grayscale = vec3(gray); + + color = Overlay(SEPIA_RGB, grayscale); + + color = grayscale + sepia * (color - grayscale); + } + + vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy; + + if (vignetting > 0.0) + { + float outter = SQRT_2 - vignetting * SQRT_2; + vec2 dir = vec2(vec2(0.5, 0.5) - coord); + dir.y *= dimensions.y / dimensions.x; + float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0); + color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha); + } + + if (scratchDensity > seed && scratch != 0.0) + { + float phase = seed * 256.0; + float s = mod(floor(phase), 2.0); + float dist = 1.0 / scratchDensity; + float d = distance(coord, vec2(seed * dist, abs(s - seed * dist))); + if (d < seed * 0.6 + 0.4) + { + highp float period = scratchDensity * 10.0; + + float xx = coord.x * period + phase; + float aa = abs(mod(xx, 0.5) * 4.0); + float bb = mod(floor(xx / 0.5), 2.0); + float yy = (1.0 - bb) * aa + bb * (2.0 - aa); + + float kk = 2.0 * period; + float dw = scratchWidth / dimensions.x * (0.75 + seed); + float dh = dw * kk; + + float tine = (yy - (2.0 - dh)); + + if (tine > 0.0) { + float _sign = sign(scratch); + + tine = s * tine / period + scratch + 0.1; + tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5); + + color.rgb *= tine; + } + } + } + + if (noise > 0.0 && noiseSize > 0.0) + { + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + pixelCoord.x = floor(pixelCoord.x / noiseSize); + pixelCoord.y = floor(pixelCoord.y / noiseSize); + // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0); + // float _noise = snoise(d) * 0.5; + float _noise = rand(pixelCoord * noiseSize * seed) - 0.5; + color += _noise * noise; + } + + gl_FragColor.rgb = color; +} +`;const le=class extends a.Filter{constructor(t,e=0){super(ur,cr),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof t=="number"?(this.seed=t,t=void 0):this.seed=e,Object.assign(this,le.defaults,t)}apply(t,e,r,i){var o,s;this.uniforms.dimensions[0]=(o=e.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(s=e.filterFrame)==null?void 0:s.height,this.uniforms.seed=this.seed,t.applyFilter(this,e,r,i)}set sepia(t){this.uniforms.sepia=t}get sepia(){return this.uniforms.sepia}set noise(t){this.uniforms.noise=t}get noise(){return this.uniforms.noise}set noiseSize(t){this.uniforms.noiseSize=t}get noiseSize(){return this.uniforms.noiseSize}set scratch(t){this.uniforms.scratch=t}get scratch(){return this.uniforms.scratch}set scratchDensity(t){this.uniforms.scratchDensity=t}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(t){this.uniforms.scratchWidth=t}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(t){this.uniforms.vignetting=t}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(t){this.uniforms.vignettingAlpha=t}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(t){this.uniforms.vignettingBlur=t}get vignettingBlur(){return this.uniforms.vignettingBlur}};let ue=le;ue.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var fr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,dr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterClamp; + +uniform float uAlpha; +uniform vec2 uThickness; +uniform vec4 uColor; +uniform bool uKnockout; + +const float DOUBLE_PI = 2. * 3.14159265358979323846264; +const float ANGLE_STEP = \${angleStep}; + +float outlineMaxAlphaAtPos(vec2 pos) { + if (uThickness.x == 0. || uThickness.y == 0.) { + return 0.; + } + + vec4 displacedColor; + vec2 displacedPos; + float maxAlpha = 0.; + + for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) { + displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle); + displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle); + displacedColor = texture2D(uSampler, clamp(displacedPos, filterClamp.xy, filterClamp.zw)); + maxAlpha = max(maxAlpha, displacedColor.a); + } + + return maxAlpha; +} + +void main(void) { + vec4 sourceColor = texture2D(uSampler, vTextureCoord); + vec4 contentColor = sourceColor * float(!uKnockout); + float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a); + vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha); + gl_FragColor = contentColor + outlineColor; +} +`;const A=class extends a.Filter{constructor(t=1,e=0,r=.1,i=1,o=!1){super(fr,dr.replace(/\$\{angleStep\}/,A.getAngleStep(r))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=o,Object.assign(this,{thickness:t,color:e,quality:r,alpha:i,knockout:o})}static getAngleStep(t){const e=Math.max(t*A.MAX_SAMPLES,A.MIN_SAMPLES);return(Math.PI*2/e).toFixed(7)}apply(t,e,r,i){this.uniforms.uThickness[0]=this._thickness/e._frame.width,this.uniforms.uThickness[1]=this._thickness/e._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,t.applyFilter(this,e,r,i)}get alpha(){return this._alpha}set alpha(t){this._alpha=t}get color(){return a.utils.rgb2hex(this.uniforms.uColor)}set color(t){a.utils.hex2rgb(t,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(t){this._knockout=t}get thickness(){return this._thickness}set thickness(t){this._thickness=t,this.padding=t}};let E=A;E.MIN_SAMPLES=1,E.MAX_SAMPLES=100;var hr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,mr=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform vec2 size; +uniform sampler2D uSampler; + +uniform vec4 filterArea; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 pixelate(vec2 coord, vec2 size) +{ + return floor( coord / size ) * size; +} + +void main(void) +{ + vec2 coord = mapCoord(vTextureCoord); + + coord = pixelate(coord, size); + + coord = unmapCoord(coord); + + gl_FragColor = texture2D(uSampler, coord); +} +`;class gr extends a.Filter{constructor(e=10){super(hr,mr),this.size=e}get size(){return this.uniforms.size}set size(e){typeof e=="number"&&(e=[e,e]),this.uniforms.size=e}}var vr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,pr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform float uRadian; +uniform vec2 uCenter; +uniform float uRadius; +uniform int uKernelSize; + +const int MAX_KERNEL_SIZE = 2048; + +void main(void) +{ + vec4 color = texture2D(uSampler, vTextureCoord); + + if (uKernelSize == 0) + { + gl_FragColor = color; + return; + } + + float aspect = filterArea.y / filterArea.x; + vec2 center = uCenter.xy / filterArea.xy; + float gradient = uRadius / filterArea.x * 0.3; + float radius = uRadius / filterArea.x - gradient * 0.5; + int k = uKernelSize - 1; + + vec2 coord = vTextureCoord; + vec2 dir = vec2(center - coord); + float dist = length(vec2(dir.x, dir.y * aspect)); + + float radianStep = uRadian; + if (radius >= 0.0 && dist > radius) { + float delta = dist - radius; + float gap = gradient; + float scale = 1.0 - abs(delta / gap); + if (scale <= 0.0) { + gl_FragColor = color; + return; + } + radianStep *= scale; + } + radianStep /= float(k); + + float s = sin(radianStep); + float c = cos(radianStep); + mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c)); + + for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) { + if (i == k) { + break; + } + + coord -= center; + coord.y *= aspect; + coord = rotationMatrix * coord; + coord.y /= aspect; + coord += center; + + vec4 sample = texture2D(uSampler, coord); + + // switch to pre-multiplied alpha to correctly blur transparent images + // sample.rgb *= sample.a; + + color += sample; + } + + gl_FragColor = color / float(uKernelSize); +} +`;class xr extends a.Filter{constructor(e=0,r=[0,0],i=5,o=-1){super(vr,pr),this._angle=0,this.angle=e,this.center=r,this.kernelSize=i,this.radius=o}apply(e,r,i,o){this.uniforms.uKernelSize=this._angle!==0?this.kernelSize:0,e.applyFilter(this,r,i,o)}set angle(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180}get angle(){return this._angle}get center(){return this.uniforms.uCenter}set center(e){this.uniforms.uCenter=e}get radius(){return this.uniforms.uRadius}set radius(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e}}var yr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Cr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; + +uniform vec4 filterArea; +uniform vec4 filterClamp; +uniform vec2 dimensions; + +uniform bool mirror; +uniform float boundary; +uniform vec2 amplitude; +uniform vec2 waveLength; +uniform vec2 alpha; +uniform float time; + +float rand(vec2 co) { + return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); +} + +void main(void) +{ + vec2 pixelCoord = vTextureCoord.xy * filterArea.xy; + vec2 coord = pixelCoord / dimensions; + + if (coord.y < boundary) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + + float k = (coord.y - boundary) / (1. - boundary + 0.0001); + float areaY = boundary * dimensions.y / filterArea.y; + float v = areaY + areaY - vTextureCoord.y; + float y = mirror ? v : vTextureCoord.y; + + float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x; + float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y; + float _alpha = (alpha.y - alpha.x) * k + alpha.x; + + float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude; + x = clamp(x, filterClamp.x, filterClamp.z); + + vec4 color = texture2D(uSampler, vec2(x, y)); + + gl_FragColor = color * _alpha; +} +`;const ce=class extends a.Filter{constructor(t){super(yr,Cr),this.time=0,this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,ce.defaults,t)}apply(t,e,r,i){var o,s;this.uniforms.dimensions[0]=(o=e.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(s=e.filterFrame)==null?void 0:s.height,this.uniforms.time=this.time,t.applyFilter(this,e,r,i)}set mirror(t){this.uniforms.mirror=t}get mirror(){return this.uniforms.mirror}set boundary(t){this.uniforms.boundary=t}get boundary(){return this.uniforms.boundary}set amplitude(t){this.uniforms.amplitude[0]=t[0],this.uniforms.amplitude[1]=t[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(t){this.uniforms.waveLength[0]=t[0],this.uniforms.waveLength[1]=t[1]}get waveLength(){return this.uniforms.waveLength}set alpha(t){this.uniforms.alpha[0]=t[0],this.uniforms.alpha[1]=t[1]}get alpha(){return this.uniforms.alpha}};let fe=ce;fe.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var _r=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,br=`precision mediump float; + +varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform vec4 filterArea; +uniform vec2 red; +uniform vec2 green; +uniform vec2 blue; + +void main(void) +{ + gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r; + gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g; + gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b; + gl_FragColor.a = texture2D(uSampler, vTextureCoord).a; +} +`;class Sr extends a.Filter{constructor(e=[-10,0],r=[0,10],i=[0,0]){super(_r,br),this.red=e,this.green=r,this.blue=i}get red(){return this.uniforms.red}set red(e){this.uniforms.red=e}get green(){return this.uniforms.green}set green(e){this.uniforms.green=e}get blue(){return this.uniforms.blue}set blue(e){this.uniforms.blue=e}}var Tr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Fr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; +uniform vec4 filterClamp; + +uniform vec2 center; + +uniform float amplitude; +uniform float wavelength; +// uniform float power; +uniform float brightness; +uniform float speed; +uniform float radius; + +uniform float time; + +const float PI = 3.14159; + +void main() +{ + float halfWavelength = wavelength * 0.5 / filterArea.x; + float maxRadius = radius / filterArea.x; + float currentRadius = time * speed / filterArea.x; + + float fade = 1.0; + + if (maxRadius > 0.0) { + if (currentRadius > maxRadius) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + fade = 1.0 - pow(currentRadius / maxRadius, 2.0); + } + + vec2 dir = vec2(vTextureCoord - center / filterArea.xy); + dir.y *= filterArea.y / filterArea.x; + float dist = length(dir); + + if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + + vec2 diffUV = normalize(dir); + + float diff = (dist - currentRadius) / halfWavelength; + + float p = 1.0 - pow(abs(diff), 2.0); + + // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade ); + float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade ); + + vec2 offset = diffUV * powDiff / filterArea.xy; + + // Do clamp : + vec2 coord = vTextureCoord + offset; + vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw); + vec4 color = texture2D(uSampler, clampedCoord); + if (coord != clampedCoord) { + color *= max(0.0, 1.0 - length(coord - clampedCoord)); + } + + // No clamp : + // gl_FragColor = texture2D(uSampler, vTextureCoord + offset); + + color.rgb *= 1.0 + (brightness - 1.0) * p * fade; + + gl_FragColor = color; +} +`;const de=class extends a.Filter{constructor(t=[0,0],e,r=0){super(Tr,Fr),this.center=t,Object.assign(this,de.defaults,e),this.time=r}apply(t,e,r,i){this.uniforms.time=this.time,t.applyFilter(this,e,r,i)}get center(){return this.uniforms.center}set center(t){this.uniforms.center=t}get amplitude(){return this.uniforms.amplitude}set amplitude(t){this.uniforms.amplitude=t}get wavelength(){return this.uniforms.wavelength}set wavelength(t){this.uniforms.wavelength=t}get brightness(){return this.uniforms.brightness}set brightness(t){this.uniforms.brightness=t}get speed(){return this.uniforms.speed}set speed(t){this.uniforms.speed=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}};let he=de;he.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var Ar=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,zr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform sampler2D uLightmap; +uniform vec4 filterArea; +uniform vec2 dimensions; +uniform vec4 ambientColor; +void main() { + vec4 diffuseColor = texture2D(uSampler, vTextureCoord); + vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions; + vec4 light = texture2D(uLightmap, lightCoord); + vec3 ambient = ambientColor.rgb * ambientColor.a; + vec3 intensity = ambient + light.rgb; + vec3 finalColor = diffuseColor.rgb * intensity; + gl_FragColor = vec4(finalColor, diffuseColor.a); +} +`;class wr extends a.Filter{constructor(e,r=0,i=1){super(Ar,zr),this._color=0,this.uniforms.dimensions=new Float32Array(2),this.uniforms.ambientColor=new Float32Array([0,0,0,i]),this.texture=e,this.color=r}apply(e,r,i,o){var s,n;this.uniforms.dimensions[0]=(s=r.filterFrame)==null?void 0:s.width,this.uniforms.dimensions[1]=(n=r.filterFrame)==null?void 0:n.height,e.applyFilter(this,r,i,o)}get texture(){return this.uniforms.uLightmap}set texture(e){this.uniforms.uLightmap=e}set color(e){const r=this.uniforms.ambientColor;typeof e=="number"?(a.utils.hex2rgb(e,r),this._color=e):(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],this._color=a.utils.rgb2hex(r))}get color(){return this._color}get alpha(){return this.uniforms.ambientColor[3]}set alpha(e){this.uniforms.ambientColor[3]=e}}var Pr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Mr=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float blur; +uniform float gradientBlur; +uniform vec2 start; +uniform vec2 end; +uniform vec2 delta; +uniform vec2 texSize; + +float random(vec3 scale, float seed) +{ + return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed); +} + +void main(void) +{ + vec4 color = vec4(0.0); + float total = 0.0; + + float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0); + vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x)); + float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur; + + for (float t = -30.0; t <= 30.0; t++) + { + float percent = (t + offset - 0.5) / 30.0; + float weight = 1.0 - abs(percent); + vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius); + sample.rgb *= sample.a; + color += sample * weight; + total += weight; + } + + color /= total; + color.rgb /= color.a + 0.00001; + + gl_FragColor = color; +} +`;class $ extends a.Filter{constructor(e){var r,i;super(Pr,Mr),this.uniforms.blur=e.blur,this.uniforms.gradientBlur=e.gradientBlur,this.uniforms.start=(r=e.start)!=null?r:new a.Point(0,window.innerHeight/2),this.uniforms.end=(i=e.end)!=null?i:new a.Point(600,window.innerHeight/2),this.uniforms.delta=new a.Point(30,30),this.uniforms.texSize=new a.Point(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(e){this.uniforms.blur=e}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(e){this.uniforms.gradientBlur=e}get start(){return this.uniforms.start}set start(e){this.uniforms.start=e,this.updateDelta()}get end(){return this.uniforms.end}set end(e){this.uniforms.end=e,this.updateDelta()}}class me extends ${updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(e*e+r*r);this.uniforms.delta.x=e/i,this.uniforms.delta.y=r/i}}class ge extends ${updateDelta(){const e=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,i=Math.sqrt(e*e+r*r);this.uniforms.delta.x=-r/i,this.uniforms.delta.y=e/i}}const ve=class extends a.Filter{constructor(t,e,r,i){super(),typeof t=="number"&&(a.utils.deprecation("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:e,start:r,end:i}),t=Object.assign({},ve.defaults,t),this.tiltShiftXFilter=new me(t),this.tiltShiftYFilter=new ge(t)}apply(t,e,r,i){const o=t.getFilterTexture();this.tiltShiftXFilter.apply(t,e,o,1),this.tiltShiftYFilter.apply(t,o,r,i),t.returnFilterTexture(o)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let pe=ve;pe.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var Dr=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,kr=`varying vec2 vTextureCoord; + +uniform sampler2D uSampler; +uniform float radius; +uniform float angle; +uniform vec2 offset; +uniform vec4 filterArea; + +vec2 mapCoord( vec2 coord ) +{ + coord *= filterArea.xy; + coord += filterArea.zw; + + return coord; +} + +vec2 unmapCoord( vec2 coord ) +{ + coord -= filterArea.zw; + coord /= filterArea.xy; + + return coord; +} + +vec2 twist(vec2 coord) +{ + coord -= offset; + + float dist = length(coord); + + if (dist < radius) + { + float ratioDist = (radius - dist) / radius; + float angleMod = ratioDist * ratioDist * angle; + float s = sin(angleMod); + float c = cos(angleMod); + coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c); + } + + coord += offset; + + return coord; +} + +void main(void) +{ + + vec2 coord = mapCoord(vTextureCoord); + + coord = twist(coord); + + coord = unmapCoord(coord); + + gl_FragColor = texture2D(uSampler, coord ); + +} +`;const xe=class extends a.Filter{constructor(t){super(Dr,kr),Object.assign(this,xe.defaults,t)}get offset(){return this.uniforms.offset}set offset(t){this.uniforms.offset=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get angle(){return this.uniforms.angle}set angle(t){this.uniforms.angle=t}};let ye=xe;ye.defaults={radius:200,angle:4,padding:20,offset:new a.Point};var Or=`attribute vec2 aVertexPosition; +attribute vec2 aTextureCoord; + +uniform mat3 projectionMatrix; + +varying vec2 vTextureCoord; + +void main(void) +{ + gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); + vTextureCoord = aTextureCoord; +}`,Rr=`varying vec2 vTextureCoord; +uniform sampler2D uSampler; +uniform vec4 filterArea; + +uniform vec2 uCenter; +uniform float uStrength; +uniform float uInnerRadius; +uniform float uRadius; + +const float MAX_KERNEL_SIZE = \${maxKernelSize}; + +// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/ +highp float rand(vec2 co, float seed) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159); + return fract(sin(sn) * c + seed); +} + +void main() { + + float minGradient = uInnerRadius * 0.3; + float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x; + + float gradient = uRadius * 0.3; + float radius = (uRadius - gradient * 0.5) / filterArea.x; + + float countLimit = MAX_KERNEL_SIZE; + + vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord); + float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x)); + + float strength = uStrength; + + float delta = 0.0; + float gap; + if (dist < innerRadius) { + delta = innerRadius - dist; + gap = minGradient; + } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity + delta = dist - radius; + gap = gradient; + } + + if (delta > 0.0) { + float normalCount = gap / filterArea.x; + delta = (normalCount - delta) / normalCount; + countLimit *= delta; + strength *= delta; + if (countLimit < 1.0) + { + gl_FragColor = texture2D(uSampler, vTextureCoord); + return; + } + } + + // randomize the lookup values to hide the fixed number of samples + float offset = rand(vTextureCoord, 0.0); + + float total = 0.0; + vec4 color = vec4(0.0); + + dir *= strength; + + for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) { + float percent = (t + offset) / MAX_KERNEL_SIZE; + float weight = 4.0 * (percent - percent * percent); + vec2 p = vTextureCoord + dir * percent; + vec4 sample = texture2D(uSampler, p); + + // switch to pre-multiplied alpha to correctly blur transparent images + // sample.rgb *= sample.a; + + color += sample * weight; + total += weight; + + if (t > countLimit){ + break; + } + } + + color /= total; + // switch back from pre-multiplied alpha + // color.rgb /= color.a + 0.00001; + + gl_FragColor = color; +} +`,Ce=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,$r=Object.prototype.propertyIsEnumerable,jr=(t,e)=>{var r={};for(var i in t)Er.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&Ce)for(var i of Ce(t))e.indexOf(i)<0&&$r.call(t,i)&&(r[i]=t[i]);return r};const _e=class extends a.Filter{constructor(t){const e=Object.assign(_e.defaults,t),{maxKernelSize:r}=e,i=jr(e,["maxKernelSize"]);super(Or,Rr.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,i)}get center(){return this.uniforms.uCenter}set center(t){this.uniforms.uCenter=t}get strength(){return this.uniforms.uStrength}set strength(t){this.uniforms.uStrength=t}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(t){this.uniforms.uInnerRadius=t}get radius(){return this.uniforms.uRadius}set radius(t){(t<0||t===1/0)&&(t=-1),this.uniforms.uRadius=t}};let be=_e;return be.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32},f.AdjustmentFilter=ke,f.AdvancedBloomFilter=N,f.AsciiFilter=Ne,f.BevelFilter=Xe,f.BloomFilter=qe,f.BulgePinchFilter=B,f.CRTFilter=H,f.ColorGradientFilter=F,f.ColorMapFilter=yt,f.ColorOverlayFilter=bt,f.ColorReplaceFilter=Ft,f.ConvolutionFilter=wt,f.CrossHatchFilter=Dt,f.DotFilter=$t,f.DropShadowFilter=te,f.EmbossFilter=Xt,f.GlitchFilter=b,f.GlowFilter=ie,f.GodrayFilter=se,f.GrayscaleFilter=er,f.HslAdjustmentFilter=ne,f.KawaseBlurFilter=T,f.MotionBlurFilter=sr,f.MultiColorReplaceFilter=lr,f.OldFilmFilter=ue,f.OutlineFilter=E,f.PixelateFilter=gr,f.RGBSplitFilter=Sr,f.RadialBlurFilter=xr,f.ReflectionFilter=fe,f.ShockwaveFilter=he,f.SimpleLightmapFilter=wr,f.TiltShiftAxisFilter=$,f.TiltShiftFilter=pe,f.TiltShiftXFilter=me,f.TiltShiftYFilter=ge,f.TwistFilter=ye,f.ZoomBlurFilter=be,Object.defineProperty(f,"__esModule",{value:!0}),f}({},PIXI,PIXI.filters,PIXI.filters);Object.assign(PIXI.filters,__filters); +//# sourceMappingURL=pixi-filters.js.map diff --git a/Server/www/spiderbasic/pixi.min.js b/Server/www/spiderbasic/pixi.min.js new file mode 100644 index 0000000..a8d8cf2 --- /dev/null +++ b/Server/www/spiderbasic/pixi.min.js @@ -0,0 +1,9 @@ +/*! + * pixi.js-legacy - v5.3.12 + * Compiled Wed, 23 Mar 2022 18:38:07 UTC + * + * pixi.js-legacy is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +var PIXI=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var i=r(function(t,r){!function(t){var e=t.Promise,i=e&&"resolve"in e&&"reject"in e&&"all"in e&&"race"in e&&function(){var t;return new e(function(e){t=e}),"function"==typeof t}();r?(r.Promise=i?e:T,r.Polyfill=T):i||(t.Promise=T);var n="pending",o="sealed",s="fulfilled",a="rejected",h=function(){};function u(t){return"[object Array]"===Object.prototype.toString.call(t)}var l,c="undefined"!=typeof setImmediate?setImmediate:setTimeout,d=[];function p(){for(var t=0;t0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var f=/iPhone/i,m=/iPod/i,v=/iPad/i,g=/\biOS-universal(?:.+)Mac\b/i,y=/\bAndroid(?:.+)Mobile\b/i,_=/Android/i,x=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,b=/Silk/i,E=/Windows Phone/i,T=/\bWindows(?:.+)ARM\b/i,S=/BlackBerry/i,w=/BB10/i,P=/Opera Mini/i,I=/\b(CriOS|Chrome)(?:.+)Mobile/i,A=/Mobile(?:.+)Firefox\b/i,O=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};var M=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,i=r.split("[FBAN");void 0!==i[1]&&(r=i[0]),void 0!==(i=r.split("Twitter"))[1]&&(r=i[0]);var n=function(t){return function(e){return e.test(t)}}(r),o={apple:{phone:n(f)&&!n(E),ipod:n(m),tablet:!n(f)&&(n(v)||O(e))&&!n(E),universal:n(g),device:(n(f)||n(m)||n(v)||n(g)||O(e))&&!n(E)},amazon:{phone:n(x),tablet:!n(x)&&n(b),device:n(x)||n(b)},android:{phone:!n(E)&&n(x)||!n(E)&&n(y),tablet:!n(E)&&!n(x)&&!n(y)&&(n(b)||n(_)),device:!n(E)&&(n(x)||n(b)||n(y)||n(_))||n(/\bokhttp\b/i)},windows:{phone:n(E),tablet:n(T),device:n(E)||n(T)},other:{blackberry:n(S),blackberry10:n(w),opera:n(P),firefox:n(A),chrome:n(I),device:n(S)||n(w)||n(P)||n(A)||n(I)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator);var D={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(M.tablet||M.phone){var r;M.apple.device&&(r=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(r[1],10)<11&&(e=!1),M.android.device&&(r=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(r[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:M.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!M.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},C=r(function(t){var e=Object.prototype.hasOwnProperty,r="~";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new n(i,o||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n80*r){i=o=t[0],n=s=t[1];for(var f=r;fo&&(o=a),h>s&&(s=h);u=0!==(u=Math.max(o-i,s-n))?1/u:0}return U(d,p,r,i,n,u),p}function F(t,e,r,i,n){var o,s;if(n===st(t,e,r,i)>0)for(o=e;o=e;o-=i)s=it(o,t[o],t[o+1],s);return s&&J(s,s.next)&&(nt(s),s=s.next),s}function B(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!J(i,i.next)&&0!==Z(i.prev,i,i.next))i=i.next;else{if(nt(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function U(t,e,r,i,n,o,s){if(t){!s&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=V(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,s,a,h,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,a=0,e=0;e0||h>0&&i;)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(s>1)}(n)}(t,i,n,o);for(var a,h,u=t;t.prev!==t.next;)if(a=t.prev,h=t.next,o?X(t,i,n,o):k(t))e.push(a.i/r),e.push(t.i/r),e.push(h.i/r),nt(t),t=h.next,u=h.next;else if((t=h)===u){s?1===s?U(t=j(B(t),e,r),e,r,i,n,o,2):2===s&&H(t,e,r,i,n,o):U(B(t),e,r,i,n,o,1);break}}}function k(t){var e=t.prev,r=t,i=t.next;if(Z(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(q(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&Z(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function X(t,e,r,i){var n=t.prev,o=t,s=t.next;if(Z(n,o,s)>=0)return!1;for(var a=n.xo.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,l=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=V(a,h,e,r,i),d=V(u,l,e,r,i),p=t.prevZ,f=t.nextZ;p&&p.z>=c&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&Z(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==t.prev&&f!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Z(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&Z(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&q(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Z(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function j(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!J(n,o)&&Q(n,i,i.next,o)&&et(n,o)&&et(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),nt(i),nt(i.next),i=t=o),i=i.next}while(i!==t);return B(i)}function H(t,e,r,i,n,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&K(s,a)){var h=rt(s,a);return s=B(s,s.next),h=B(h,h.next),U(s,e,r,i,n,o),void U(h,e,r,i,n,o)}a=a.next}s=s.next}while(s!==t)}function G(t,e){return t.x-e.x}function Y(t,e){var r=function(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x=i.x&&i.x>=l&&n!==i.x&&q(or.x||i.x===r.x&&z(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}(t,e);if(!r)return e;var i=rt(r,t),n=B(r,r.next);return B(i,i.next),e===r?n:e}function z(t,e){return Z(t.prev,t,e.prev)<0&&Z(e.next,t,t.next)<0}function V(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function W(t){var e=t,r=t;do{(e.x=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function K(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Q(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(et(t,e)&&et(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(Z(t.prev,t,e.prev)||Z(t,e.prev,e))||J(t,e)&&Z(t.prev,t,t.next)>0&&Z(e.prev,e,e.next)>0)}function Z(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function J(t,e){return t.x===e.x&&t.y===e.y}function Q(t,e,r,i){var n=tt(Z(t,e,r)),o=tt(Z(t,e,i)),s=tt(Z(r,i,t)),a=tt(Z(r,i,e));return n!==o&&s!==a||(!(0!==n||!$(t,r,e))||(!(0!==o||!$(t,i,e))||(!(0!==s||!$(r,t,i))||!(0!==a||!$(r,e,i)))))}function $(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function tt(t){return t>0?1:t<0?-1:0}function et(t,e){return Z(t.prev,t,t.next)<0?Z(t,e,t.next)>=0&&Z(t,t.prev,e)>=0:Z(t,e,t.prev)<0||Z(t,t.next,e)<0}function rt(t,e){var r=new ot(t.i,t.x,t.y),i=new ot(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function it(t,e,r,i){var n=new ot(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function nt(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ot(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function st(t,e,r,i){for(var n=0,o=e,s=r-i;o0&&(i+=t[n-1].length,r.holes.push(i))}return r},R.default=L;var at=r(function(t,r){!function(i){var n=r&&!r.nodeType&&r,o=t&&!t.nodeType&&t,s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self!==s||(i=s);var a,h,u=2147483647,l=36,c=1,d=26,p=38,f=700,m=72,v=128,g="-",y=/^xn--/,_=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=l-c,T=Math.floor,S=String.fromCharCode;function w(t){throw RangeError(b[t])}function P(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function I(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+P((t=t.replace(x,".")).split("."),e).join(".")}function A(t){for(var e,r,i=[],n=0,o=t.length;n=55296&&e<=56319&&n65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function M(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,r){var i=0;for(t=r?T(t/f):t>>1,t+=T(t/e);t>E*d>>1;i+=l)t=T(t/E);return T(i+(E+1)*t/(t+p))}function C(t){var e,r,i,n,o,s,a,h,p,f,y,_=[],x=t.length,b=0,E=v,S=m;for((r=t.lastIndexOf(g))<0&&(r=0),i=0;i=128&&w("not-basic"),_.push(t.charCodeAt(i));for(n=r>0?r+1:0;n=x&&w("invalid-input"),((h=(y=t.charCodeAt(n++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||h>T((u-b)/s))&&w("overflow"),b+=h*s,!(h<(p=a<=S?c:a>=S+d?d:a-S));a+=l)s>T(u/(f=l-p))&&w("overflow"),s*=f;S=D(b-o,e=_.length+1,0==o),T(b/e)>u-E&&w("overflow"),E+=T(b/e),b%=e,_.splice(b++,0,E)}return O(_)}function R(t){var e,r,i,n,o,s,a,h,p,f,y,_,x,b,E,P=[];for(_=(t=A(t)).length,e=v,r=0,o=m,s=0;s<_;++s)(y=t[s])<128&&P.push(S(y));for(i=n=P.length,n&&P.push(g);i<_;){for(a=u,s=0;s<_;++s)(y=t[s])>=e&&yT((u-r)/(x=i+1))&&w("overflow"),r+=(a-e)*x,e=a,s=0;s<_;++s)if((y=t[s])u&&w("overflow"),y==e){for(h=r,p=l;!(h<(f=p<=o?c:p>=o+d?d:p-o));p+=l)E=h-f,b=l-f,P.push(S(M(f+E%b,0))),h=T(E/b);P.push(S(M(h,0))),o=D(r,x,i==n),r=0,++i}++r,++e}return P.join("")}if(a={version:"1.3.2",ucs2:{decode:A,encode:O},decode:C,encode:R,toASCII:function(t){return I(t,function(t){return _.test(t)?"xn--"+R(t):t})},toUnicode:function(t){return I(t,function(t){return y.test(t)?C(t.slice(4).toLowerCase()):t})}},n&&o)if(t.exports==n)o.exports=a;else for(h in a)a.hasOwnProperty(h)&&(n[h]=a[h]);else i.punycode=a}(e)}),ht={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};ht.isString,ht.isObject,ht.isNull,ht.isNullOrUndefined;function ut(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var lt=function(t,e,r,i){e=e||"&",r=r||"=";var n={};if("string"!=typeof t||0===t.length)return n;var o=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var h=0;h=0?(u=p.substr(0,f),l=p.substr(f+1)):(u=p,l=""),c=decodeURIComponent(u),d=decodeURIComponent(l),ut(n,c)?Array.isArray(n[c])?n[c].push(d):n[c]=[n[c],d]:n[c]=d}return n},ct=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},dt=function(t,e,r,i){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(i){var n=encodeURIComponent(ct(i))+r;return Array.isArray(t[i])?t[i].map(function(t){return n+encodeURIComponent(ct(t))}).join(e):n+encodeURIComponent(ct(t[i]))}).join(e):i?encodeURIComponent(ct(i))+r+encodeURIComponent(ct(t)):""},pt=r(function(t,e){e.decode=e.parse=lt,e.encode=e.stringify=dt}),ft=(pt.decode,pt.parse,pt.encode,pt.stringify,Ct),mt=function(t,e){return Ct(t,!1,!0).resolve(e)},vt=function(t,e){if(!t)return e;return Ct(t,!1,!0).resolveObject(e)},gt=function(t){ht.isString(t)&&(t=Ct(t));if(!(t instanceof _t))return _t.prototype.format.call(t);return t.format()},yt=_t;function _t(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var xt=/^([a-z0-9.+-]+:)/i,bt=/:[0-9]*$/,Et=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Tt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),St=["'"].concat(Tt),wt=["%","/","?",";","#"].concat(St),Pt=["/","?","#"],It=/^[+a-z0-9A-Z_-]{0,63}$/,At=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ot={javascript:!0,"javascript:":!0},Mt={javascript:!0,"javascript:":!0},Dt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ct(t,e,r){if(t&&ht.isObject(t)&&t instanceof _t)return t;var i=new _t;return i.parse(t,e,r),i}_t.prototype.parse=function(t,e,r){if(!ht.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=-1!==i&&i127?x+="x":x+=_[b];if(!x.match(It)){var T=g.slice(0,f),S=g.slice(f+1),w=_.match(At);w&&(T.push(w[1]),S.unshift(w[2])),S.length&&(s="/"+S.join(".")+s),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),v||(this.hostname=at.toASCII(this.hostname));var P=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+P,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Ot[u])for(f=0,y=St.length;f0)&&r.host.split("@"))&&(r.auth=w.shift(),r.host=r.hostname=w.shift());return r.search=t.search,r.query=t.query,ht.isNull(r.pathname)&&ht.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var b=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&("."===b||".."===b)||""===b,T=0,S=_.length;S>=0;S--)"."===(b=_[S])?_.splice(S,1):".."===b?(_.splice(S,1),T++):T&&(_.splice(S,1),T--);if(!g&&!y)for(;T--;T)_.unshift("..");!g||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),E&&"/"!==_.join("/").substr(-1)&&_.push("");var w,P=""===_[0]||_[0]&&"/"===_[0].charAt(0);x&&(r.hostname=r.host=P?"":_.length?_.shift():"",(w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=w.shift(),r.host=r.hostname=w.shift()));return(g=g||r.host&&_.length)&&!P&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),ht.isNull(r.pathname)&&ht.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},_t.prototype.parseHost=function(){var t=this.host,e=bt.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var Rt={parse:ft,resolve:mt,resolveObject:vt,format:gt,Url:yt};!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(t.ENV||(t.ENV={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(t.RENDERER_TYPE||(t.RENDERER_TYPE={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(t.BUFFER_BITS||(t.BUFFER_BITS={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(t.BLEND_MODES||(t.BLEND_MODES={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(t.DRAW_MODES||(t.DRAW_MODES={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(t.FORMATS||(t.FORMATS={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(t.TARGETS||(t.TARGETS={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(t.TYPES||(t.TYPES={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(t.SCALE_MODES||(t.SCALE_MODES={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(t.WRAP_MODES||(t.WRAP_MODES={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(t.MIPMAP_MODES||(t.MIPMAP_MODES={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(t.ALPHA_MODES||(t.ALPHA_MODES={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(t.CLEAR_MODES||(t.CLEAR_MODES={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(t.GC_MODES||(t.GC_MODES={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(t.PRECISION||(t.PRECISION={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(t.MASK_TYPES||(t.MASK_TYPES={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(t.MSAA_QUALITY||(t.MSAA_QUALITY={})),D.RETINA_PREFIX=/@([0-9\.]+)x/,D.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var Lt,Nt=!1,Ft="5.3.12";function Bt(t){var e;if(!Nt){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+Ft+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,r)}else window.console&&window.console.log("PixiJS "+Ft+" - "+t+" - http://www.pixijs.com/");Nt=!0}}function Ut(){return void 0===Lt&&(Lt=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:D.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(t){return!1}}()),Lt}function kt(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function Xt(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function jt(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function Ht(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var Gt=function(){for(var e=[],r=[],i=0;i<32;i++)e[i]=i,r[i]=i;e[t.BLEND_MODES.NORMAL_NPM]=t.BLEND_MODES.NORMAL,e[t.BLEND_MODES.ADD_NPM]=t.BLEND_MODES.ADD,e[t.BLEND_MODES.SCREEN_NPM]=t.BLEND_MODES.SCREEN,r[t.BLEND_MODES.NORMAL]=t.BLEND_MODES.NORMAL_NPM,r[t.BLEND_MODES.ADD]=t.BLEND_MODES.ADD_NPM,r[t.BLEND_MODES.SCREEN]=t.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(r),n.push(e),n}();function Yt(t,e){return Gt[e?1:0][t]}function zt(t,e,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r}function Vt(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n=n*e+.5|0)}function Wt(t,e,r,i){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function qt(t,e){void 0===e&&(e=null);var r=6*t;if((e=e||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+r);for(var i=0,n=0;i>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function Qt(t){return!(t&t-1||!t)}function $t(t){var e=(t>65535?1:0)<<4,r=((t>>>=e)>255?1:0)<<3;return e|=r,e|=r=((t>>>=r)>15?1:0)<<2,(e|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function te(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){var o=n-(r=e+r>n?n-e:r);for(i=e;i=this.x&&t=this.y&&ee!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(r=!r)}return r},e}(),Se=function(){function e(e,r,i,n,o){void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=20),this.x=e,this.y=r,this.width=i,this.height=n,this.radius=o,this.type=t.SHAPES.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},e}(),we=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t}(),Pe=function(){function t(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=e}return t.prototype.clone=function(e,r){return void 0===e&&(e=this.cb),void 0===r&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),Ie=function(){function t(t,e,r,i,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new we;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new we;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,n=this.d,o=-Math.atan2(-i,n),s=Math.atan2(r,e),a=Math.abs(o+s);return a<1e-5||Math.abs(ge-a)<1e-5?(t.rotation=s,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),Ae=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Oe=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Me=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],De=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Ce=[],Re=[],Le=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];Ce.push(e);for(var r=0;r<16;r++)for(var i=Le(Ae[t]*Ae[r]+Me[t]*Oe[r]),n=Le(Oe[t]*Ae[r]+De[t]*Oe[r]),o=Le(Ae[t]*Me[r]+Me[t]*De[r]),s=Le(Oe[t]*Me[r]+De[t]*De[r]),a=0;a<16;a++)if(Ae[a]===i&&Oe[a]===n&&Me[a]===o&&De[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new Ie;h.set(Ae[t],Oe[t],Me[t],De[t],0,0),Re.push(h)}}();var Ne={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return Ae[t]},uY:function(t){return Oe[t]},vX:function(t){return Me[t]},vY:function(t){return De[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return Ce[t][e]},sub:function(t,e){return Ce[t][Ne.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?Ne.S:Ne.N:2*Math.abs(e)<=Math.abs(t)?t>0?Ne.E:Ne.W:e>0?t>0?Ne.SE:Ne.SW:t>0?Ne.NE:Ne.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=Re[Ne.inv(e)];n.tx=r,n.ty=i,t.append(n)}},Fe=function(){function t(){this.worldTransform=new Ie,this.localTransform=new Ie,this.position=new Pe(this.onChange,this,0,0),this.scale=new Pe(this.onChange,this,1,1),this.pivot=new Pe(this.onChange,this,0,0),this.skew=new Pe(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();D.SORTABLE_CHILDREN=!1;var Be=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?xe.EMPTY:((t=t||new xe(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=oi?o:i,n=s>n?s:n,e=(o=t[2])i?o:i,n=s>n?s:n,e=(o=t[4])i?o:i,n=s>n?s:n,e=(o=t[6])i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},t.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,l=t.ty,c=this.minX,d=this.minY,p=this.maxX,f=this.maxY,m=o*e+a*r+u,v=s*e+h*r+l;c=mp?m:p,f=v>f?v:f,c=(m=o*i+a*r+u)p?m:p,f=v>f?v:f,c=(m=o*e+a*n+u)p?m:p,f=v>f?v:f,c=(m=o*i+a*n+u)p?m:p,f=v>f?v:f,this.minX=c,this.minY=d,this.maxX=p,this.maxY=f},t.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;ao?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},t.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},t.prototype.addVerticesMatrix=function(t,e,r,i,n,o){void 0===n&&(n=0),void 0===o&&(o=n);for(var s=t.a,a=t.b,h=t.c,u=t.d,l=t.tx,c=t.ty,d=this.minX,p=this.minY,f=this.maxX,m=this.maxY,v=r;vi?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxXh?n:h,this.maxY=o>u?o:u}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxXh?n:h,this.maxY=o>u?o:u}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i},t}(),Ue=function(t,e){return(Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function ke(t,e){function r(){this.constructor=t}Ue(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Xe=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new Fe,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new Be,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return ke(e,t),e.mixin=function(t){for(var r=Object.keys(t),i=0;i1)for(var i=0;ithis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);te(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],r=0;r1)for(var i=0;i0&&n<=e){r=this.children.splice(i,n);for(var o=0;o1&&this.children.sort(He),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+t.title+"
tabIndex: "+t.tabIndex},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width=Ve+"px",e.style.height=Ve+"px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=Ke.toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();D.TARGET_FPMS=.06,(ze=t.UPDATE_PRIORITY||(t.UPDATE_PRIORITY={}))[ze.INTERACTION=50]="INTERACTION",ze[ze.HIGH=25]="HIGH",ze[ze.NORMAL=0]="NORMAL",ze[ze.LOW=-25]="LOW",ze[ze.UTILITY=-50]="UTILITY";var Je=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=0),void 0===i&&(i=!1),this.fn=t,this.context=e,this.priority=r,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),Qe=function(){function e(){var t=this;this._head=new Je(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/D.TARGET_FPMS,this.elapsedMS=1/D.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return e.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,r,i){return void 0===i&&(i=t.UPDATE_PRIORITY.NORMAL),this._addListener(new Je(e,r,i))},e.prototype.addOnce=function(e,r,i){return void 0===i&&(i=t.UPDATE_PRIORITY.NORMAL),this._addListener(new Je(e,r,i,!0))},e.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},e.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var r=t-this._lastFrame|0;if(r=0;l--){var c=u[l],d=this.recursiveFindHit(t,c,r,i,a);if(d){if(!c.parent)continue;a=!1,d&&(t.target&&(i=!1),s=!0)}}return n&&(i&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),r&&r(t,e,!!s))),s},t.prototype.findHit=function(t,e,r,i){this.recursiveFindHit(t,e,r,i,!1)},t}(),or={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Xe.mixin(or);var sr=1,ar={target:null,data:{global:null}},hr=function(e){function r(t,r){var i=e.call(this)||this;return r=r||{},i.renderer=t,i.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,i.interactionFrequency=r.interactionFrequency||10,i.mouse=new tr,i.mouse.identifier=sr,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[sr]=i.mouse,i.interactionDataPool=[],i.eventData=new rr,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!1,i.supportsTouchEvents="ontouchstart"in window,i.supportsPointerEvents=!!window.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new nr,i._tempDisplayObject=new je,i._useSystemTicker=void 0===r.useSystemTicker||r.useSystemTicker,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return function(t,e){function r(){this.constructor=t}er(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),Object.defineProperty(r.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),r.prototype.hitTest=function(t,e){return ar.target=null,ar.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(ar,e,null,!0),ar.target},r.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},r.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(Qe.system.add(this.tickerUpdate,this,t.UPDATE_PRIORITY.INTERACTION),this.tickerAdded=!0)},r.prototype.removeTickerListener=function(){this.tickerAdded&&(Qe.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},r.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},r.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},r.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var h=this.name,u=this.items;this._aliasCount++;for(var l=0,c=u.length;l0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(ur.prototype,{dispatch:{value:ur.prototype.emit},run:{value:ur.prototype.emit}}),D.PREFER_ENV=M.any?t.ENV.WEBGL:t.ENV.WEBGL2,D.STRICT_TEXTURE_CACHE=!1;var lr=[];function cr(t,e){if(!t)return null;var r="";if("string"==typeof t){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(var n=lr.length-1;n>=0;--n){var o=lr[n];if(o.test&&o.test(t,r))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var dr=function(t,e){return(dr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function pr(t,e){function r(){this.constructor=t}dr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var fr=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new ur("setRealSize"),this.onUpdate=new ur("update"),this.onError=new ur("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,r){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),mr=function(e){function r(t,r){var i=this,n=r||{},o=n.width,s=n.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(i=e.call(this,o,s)||this).data=t,i}return pr(r,e),r.prototype.upload=function(e,r,i){var n=e.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),i.width===r.width&&i.height===r.height?n.texSubImage2D(r.target,0,0,0,r.width,r.height,r.format,r.type,this.data):(i.width=r.width,i.height=r.height,n.texImage2D(r.target,0,i.internalFormat,r.width,r.height,0,r.format,i.type,this.data)),!0},r.prototype.dispose=function(){this.data=null},r.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},r}(fr),vr={scaleMode:t.SCALE_MODES.NEAREST,format:t.FORMATS.RGBA,alphaMode:t.ALPHA_MODES.NPM},gr=function(e){function r(r,i){void 0===r&&(r=null),void 0===i&&(i=null);var n=e.call(this)||this,o=(i=i||{}).alphaMode,s=i.mipmap,a=i.anisotropicLevel,h=i.scaleMode,u=i.width,l=i.height,c=i.wrapMode,d=i.format,p=i.type,f=i.target,m=i.resolution,v=i.resourceOptions;return!r||r instanceof fr||((r=cr(r,v)).internal=!0),n.width=u||0,n.height=l||0,n.resolution=m||D.RESOLUTION,n.mipmap=void 0!==s?s:D.MIPMAP_TEXTURES,n.anisotropicLevel=void 0!==a?a:D.ANISOTROPIC_LEVEL,n.wrapMode=c||D.WRAP_MODE,n.scaleMode=void 0!==h?h:D.SCALE_MODE,n.format=d||t.FORMATS.RGBA,n.type=p||t.TYPES.UNSIGNED_BYTE,n.target=f||t.TARGETS.TEXTURE_2D,n.alphaMode=void 0!==o?o:t.ALPHA_MODES.UNPACK,void 0!==i.premultiplyAlpha&&(n.premultiplyAlpha=i.premultiplyAlpha),n.uid=ie(),n.touched=0,n.isPowerOfTwo=!1,n._refreshPOT(),n._glTextures={},n.dirtyId=0,n.dirtyStyleId=0,n.cacheId=null,n.valid=u>0&&l>0,n.textureCacheIds=[],n.destroyed=!1,n.resource=null,n._batchEnabled=0,n._batchLocation=0,n.parentTextureArray=null,n.setResource(r),n}return pr(r,e),Object.defineProperty(r.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),r.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},r.prototype.setSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},r.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},r.prototype._refreshPOT=function(){this.isPowerOfTwo=Qt(this.realWidth)&&Qt(this.realHeight)},r.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},r.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},r.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},r.prototype.onError=function(t){this.emit("error",this,t)},r.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete he[this.cacheId],delete ae[this.cacheId],this.cacheId=null),this.dispose(),r.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},r.prototype.dispose=function(){this.emit("dispose",this)},r.prototype.castToBaseTexture=function(){return this},r.from=function(t,e,i){void 0===i&&(i=D.STRICT_TEXTURE_CACHE);var n="string"==typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+ie()),o=t._pixiId);var s=he[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return s||((s=new r(t,e)).cacheId=o,r.addToCache(s,o)),s},r.fromBuffer=function(e,i,n,o){e=e||new Float32Array(i*n*4);var s=new mr(e,{width:i,height:n}),a=e instanceof Float32Array?t.TYPES.FLOAT:t.TYPES.UNSIGNED_BYTE;return new r(s,Object.assign(vr,o||{width:i,height:n,type:a}))},r.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),he[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),he[e]=t)},r.removeFromCache=function(t){if("string"==typeof t){var e=he[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete he[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i0){if(!e.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(e.resource,r)}else e.target=t.TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+r,e.parentTextureArray=this.baseTexture,this.items[r]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[r]=e,this},r.prototype.upload=function(t,e,i){for(var n=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(xr),wr=function(t){function e(r,i){var n=this;if(i=i||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof r&&(r=[r]);var s=r[0].src||r[0];xr.crossOrigin(o,s,i.crossorigin);for(var a=0;a0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Qe.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&Qe.shared.remove(this.update,this);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Qe.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(xr),Pr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pr(e,t),e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(xr);lr.push(Tr,Pr,br,wr,Sr,mr,Er,_r);var Ir={Resource:fr,BaseImageResource:xr,INSTALLED:lr,autoDetectResource:cr,AbstractMultiResource:yr,ArrayResource:_r,BufferResource:mr,CanvasResource:br,CubeResource:Er,ImageResource:Tr,SVGResource:Sr,VideoResource:wr,ImageBitmapResource:Pr},Ar=function(){function t(t){this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),Or=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return pr(r,e),r.prototype.upload=function(e,r,i){var n=e.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),i.width===r.width&&i.height===r.height?n.texSubImage2D(r.target,0,0,0,r.width,r.height,r.format,r.type,this.data):(i.width=r.width,i.height=r.height,n.texImage2D(r.target,0,1===e.context.webGLVersion?n.DEPTH_COMPONENT:n.DEPTH_COMPONENT16,r.width,r.height,0,r.format,r.type,this.data)),!0},r}(mr),Mr=function(){function e(e,r){this.width=Math.ceil(e||100),this.height=Math.ceil(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ur("disposeFramebuffer"),this.multisample=t.MSAA_QUALITY.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,r){return void 0===e&&(e=0),this.colorTextures[e]=r||new gr(null,{scaleMode:t.SCALE_MODES.NEAREST,resolution:1,mipmap:t.MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new gr(new Or(null,{width:this.width,height:this.height}),{scaleMode:t.SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:t.MIPMAP_MODES.OFF,format:t.FORMATS.DEPTH_COMPONENT,type:t.TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r-1&&e.textureCacheIds.splice(r,1),delete ae[t],e}}else if(t&&t.textureCacheIds){for(var i=0;ithis.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(C);function Nr(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}Lr.EMPTY=new Lr(new gr),Nr(Lr.EMPTY),Nr(Lr.EMPTY.baseTexture),Lr.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new Lr(new gr(new br(t)))}(),Nr(Lr.WHITE),Nr(Lr.WHITE.baseTexture);var Fr=function(t){function e(e,r){var i=this,n=null;if(!(e instanceof Dr)){var o=arguments[1],s=arguments[2],a=arguments[3],h=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+s+") instead of the ctor directly."),n=arguments[0],r=null,e=new Dr({width:o,height:s,scaleMode:a,resolution:h})}return(i=t.call(this,e,r)||this).legacyRenderer=n,i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return pr(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,r){void 0===r&&(r=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new Dr(t))},e}(Lr),Br=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e){var r=new Dr(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Fr(r)},t.prototype.getOptimalTexture=function(e,r,i){void 0===i&&(i=1);var n=t.SCREEN_KEY;e*=i,r*=i,this.enableFullScreen&&e===this._pixelsWidth&&r===this._pixelsHeight||(n=(65535&(e=Jt(e)))<<16|65535&(r=Jt(r))),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(e,r)),o.filterPoolKey=n,o.setResolution(i),o},t.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i0&&e.height>0,i)for(var n=0;n1){for(var u=0;u1&&this.renderer.framebuffer.blit(),1===i.length)i[0].apply(this,r.renderTexture,u.renderTexture,t.CLEAR_MODES.BLEND,r),this.returnFilterTexture(r.renderTexture);else{var l=r.renderTexture,c=this.getOptimalFilterTexture(l.width,l.height,r.resolution);c.filterFrame=l.filterFrame;var d=0;for(d=0;d=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h=0&&l=t.ENV.WEBGL2&&(i=e.getContext("webgl2",r)),i)this.webGLVersion=2;else if(this.webGLVersion=1,!(i=e.getContext("webgl",r)||e.getContext("experimental-webgl",r)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl},r.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},r.prototype.handleContextLost=function(t){t.preventDefault()},r.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},r.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},r.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},r.prototype.validateContext=function(t){var e=t.getContextAttributes(),r="WebGL2RenderingContext"in window&&t instanceof window.WebGL2RenderingContext;r&&(this.webGLVersion=2),e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},r}(Ar),ii=function(){return function(e){this.framebuffer=e,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=t.MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null}}(),ni=new xe,oi=function(e){function r(t){var r=e.call(this,t)||this;return r.managedFramebuffers=[],r.unknownFramebuffer=new Mr(10,10),r.msaaSamples=null,r}return pr(r,e),r.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new xe,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var r=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;D.PREFER_ENV===t.ENV.WEBGL_LEGACY&&(r=null,i=null),r?e.drawBuffers=function(t){return r.drawBuffersWEBGL(t)}:(this.hasMRT=!1,e.drawBuffers=function(){}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},r.prototype.bind=function(t,e){var r=this.gl;if(t){var i=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.dirtyId!==t.dirtyId&&(i.dirtyId=t.dirtyId,i.dirtyFormat!==t.dirtyFormat?(i.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):i.dirtySize!==t.dirtySize&&(i.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n1&&(r.msaaBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.RGBA8,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,r.msaaBuffer));for(var n=[],o=0;o1)){var s=t.colorTextures[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,s.target,a._glTextures[this.CONTEXT_UID].texture,0),n.push(e.COLOR_ATTACHMENT0+o)}if((n.length>1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var h=t.depthTexture;this.renderer.texture.bind(h,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,0)}r.stencil||!t.stencil&&!t.depth||(r.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,r.stencil))},r.prototype.detectSamples=function(e){var r=this.msaaSamples,i=t.MSAA_QUALITY.NONE;if(e<=1||null===r)return i;for(var n=0;n=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},r.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r=i.data.byteLength)e.bufferSubData(o,0,i.data);else{var s=i.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=i.data.byteLength,e.bufferData(o,i.data,s)}}}},r.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},r.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},r.prototype.initGeometryVao=function(t,e,r){void 0===r&&(r=!0),this.checkCompatibility(t,e);var i=this.gl,n=this.CONTEXT_UID,o=this.getSignature(t,e),s=t.glVertexArrayObjects[this.CONTEXT_UID],a=s[o];if(a)return s[e.id]=a,a;var h=t.buffers,u=t.attributes,l={},c={};for(var d in h)l[d]=0,c[d]=0;for(var d in u)!u[d].size&&e.attributeData[d]?u[d].size=e.attributeData[d].size:u[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[u[d].buffer]+=u[d].size*ai[u[d].type];for(var d in u){var p=u[d],f=p.size;void 0===p.stride&&(l[p.buffer]===f*ai[p.type]?p.stride=0:p.stride=l[p.buffer]),void 0===p.start&&(p.start=c[p.buffer],c[p.buffer]+=f*ai[p.type])}a=i.createVertexArray(),i.bindVertexArray(a);for(var m=0;m=t.ENV.WEBGL2&&(r=e.getContext("webgl2",{})),r||((r=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?r.getExtension("WEBGL_draw_buffers"):r=null),vi=r}return vi}function yi(e,r,i){if("precision"!==e.substring(0,9)){var n=r;return r===t.PRECISION.HIGH&&i!==t.PRECISION.HIGH&&(n=t.PRECISION.MEDIUM),"precision "+n+" float;\n"+e}return i!==t.PRECISION.HIGH&&"precision highp"===e.substring(0,15)?e.replace("precision highp","precision mediump"):e}var _i={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function xi(t){return _i[t]}var bi=null,Ei={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Ti(t,e){if(!bi){var r=Object.keys(Ei);bi={};for(var i=0;i0&&(e+="\nelse "),re.name?1:-1});for(o=0;o0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*s+o.x,h=(t.y-n.y)*s+o.y,u=t.width*s,l=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(Gi),zi=function(t){function e(e){var r=t.call(this,e)||this;return r.glConst=WebGLRenderingContext.STENCIL_TEST,r}return pr(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,this._getBitwiseMask()),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,r++;this.stateId=t.data}for(r=0;rthis.checkCountMax&&(this.checkCount=0,this.run())))},r.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;ithis.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){var o=0;for(i=0;i=0;i--)this.unload(t.children[i])},r}(Ar),ln=function(){return function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121}}(),cn=function(e){function r(t){var r=e.call(this,t)||this;return r.boundTextures=[],r.currentLocation=-1,r.managedTextures=[],r._unknownBoundTextures=!1,r.unknownTexture=new gr,r}return pr(r,e),r.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r=1:r.mipmap=!1,2===this.webGLVersion||e.isPowerOfTwo?r.wrapMode=e.wrapMode:r.wrapMode=t.WRAP_MODES.CLAMP,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},r.prototype.setStyle=function(e,r){var i=this.gl;if(r.mipmap&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,r.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===t.SCALE_MODES.LINEAR){var o=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST)},r}(Ar),dn={FilterSystem:Qr,BatchSystem:ti,ContextSystem:ri,FramebufferSystem:oi,GeometrySystem:hi,MaskSystem:Hi,ScissorSystem:Yi,StencilSystem:zi,ProjectionSystem:Vi,RenderTextureSystem:Zi,ShaderSystem:en,StateSystem:hn,TextureGCSystem:un,TextureSystem:cn},pn=new Ie,fn=function(e){function r(r,i){void 0===r&&(r=t.RENDERER_TYPE.UNKNOWN);var n=e.call(this)||this;return(i=Object.assign({},D.RENDER_OPTIONS,i)).roundPixels&&(D.ROUND_PIXELS=i.roundPixels,oe("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),n.options=i,n.type=r,n.screen=new xe(0,0,i.width,i.height),n.view=i.view||document.createElement("canvas"),n.resolution=i.resolution||D.RESOLUTION,n.transparent=i.transparent,n.autoDensity=i.autoDensity||i.autoResize||!1,n.preserveDrawingBuffer=i.preserveDrawingBuffer,n.clearBeforeRender=i.clearBeforeRender,n._backgroundColor=0,n._backgroundColorRgba=[0,0,0,0],n._backgroundColorString="#000000",n.backgroundColor=i.backgroundColor||n._backgroundColor,n._lastObjectRendered=null,n.plugins={},n}return pr(r,e),r.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(r.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),r.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px"),this.emit("resize",t,e)},r.prototype.generateTexture=function(t,e,r,i){0===(i=i||t.getLocalBounds(null,!0)).width&&(i.width=1),0===i.height&&(i.height=1);var n=Fr.create({width:0|i.width,height:0|i.height,scaleMode:e,resolution:r});return pn.tx=-i.x,pn.ty=-i.y,this.render(t,n,!1,pn,!!t.parent),n},r.prototype.destroy=function(e){for(var r in this.plugins)this.plugins[r].destroy(),this.plugins[r]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);this.plugins=null,this.type=t.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this._tempDisplayObjectParent=null,this.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(r.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=Xt(t),kt(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),r}(C),mn=function(e){function r(i){var n=e.call(this,t.RENDERER_TYPE.WEBGL,i)||this;return i=n.options,n.gl=null,n.CONTEXT_UID=0,n.runners={destroy:new ur("destroy"),contextChange:new ur("contextChange"),reset:new ur("reset"),update:new ur("update"),postrender:new ur("postrender"),prerender:new ur("prerender"),resize:new ur("resize")},n.globalUniforms=new Zr({projectionMatrix:new Ie},!0),n.addSystem(Hi,"mask").addSystem(ri,"context").addSystem(hn,"state").addSystem(en,"shader").addSystem(cn,"texture").addSystem(hi,"geometry").addSystem(oi,"framebuffer").addSystem(Yi,"scissor").addSystem(zi,"stencil").addSystem(Vi,"projection").addSystem(un,"textureGC").addSystem(Qr,"filter").addSystem(Zi,"renderTexture").addSystem(ti,"batch"),n.initPlugins(r.__plugins),i.context?n.context.initFromContext(i.context):n.context.initFromOptions({alpha:!!n.transparent,antialias:i.antialias,premultipliedAlpha:n.transparent&&"notMultiplied"!==n.transparent,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer,powerPreference:n.options.powerPreference}),n.renderingToScreen=!0,Bt(2===n.context.webGLVersion?"WebGL 2":"WebGL 1"),n.resize(n.options.width,n.options.height),n}return pr(r,e),r.create=function(t){if(Ut())return new r(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},r.prototype.addSystem=function(t,e){e||(e=t.name);var r=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},r.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.enableTempParent();t.updateTransform(),t.disableTempParent(o)}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},r.prototype.resize=function(t,r){e.prototype.resize.call(this,t,r),this.runners.resize.emit(t,r)},r.prototype.reset=function(){return this.runners.reset.emit(),this},r.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},r.prototype.destroy=function(t){for(var r in this.runners.destroy.emit(),this.runners)this.runners[r].destroy();e.prototype.destroy.call(this,t),this.gl=null},r.registerPlugin=function(t,e){r.__plugins=r.__plugins||{},r.__plugins[t]=e},r}(fn);function vn(t){return mn.create(t)}var gn="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",yn="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",_n=function(){return function(){this.texArray=null,this.blend=0,this.type=t.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null}}(),xn=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},r.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,e=this.MAX_TEXTURES,i=r._textureArrayPool,n=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++gr._globalBatch,h=0,u=i[0],l=0;n.copyBoundTextures(o,e);for(var c=0;c=e&&(n.boundArray(u,o,a,e),this.buildDrawCalls(u,l,c),l=c,u=i[++h],++a),d._batchEnabled=a,d.touched=s,u.elements[u.count++]=d)}u.count>0&&(n.boundArray(u,o,a,e),this.buildDrawCalls(u,l,this._bufferSize),++h,++a);for(c=0;c0&&(e+="\nelse "),r0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=200:1223===i&&(i=204),2===(i/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,Gn||(Gn=document.createElement("a")),Gn.href=t;var r=!(t=Rn(Gn.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&i===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(i>-1?i:t.length,n>-1?n:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},jn(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function Vn(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function Wn(t){return t.toString().replace("object ","")}zn.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},zn.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},zn.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},zn.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},zn._loadTypeMap={gif:zn.LOAD_TYPE.IMAGE,png:zn.LOAD_TYPE.IMAGE,bmp:zn.LOAD_TYPE.IMAGE,jpg:zn.LOAD_TYPE.IMAGE,jpeg:zn.LOAD_TYPE.IMAGE,tif:zn.LOAD_TYPE.IMAGE,tiff:zn.LOAD_TYPE.IMAGE,webp:zn.LOAD_TYPE.IMAGE,tga:zn.LOAD_TYPE.IMAGE,svg:zn.LOAD_TYPE.IMAGE,"svg+xml":zn.LOAD_TYPE.IMAGE,mp3:zn.LOAD_TYPE.AUDIO,ogg:zn.LOAD_TYPE.AUDIO,wav:zn.LOAD_TYPE.AUDIO,mp4:zn.LOAD_TYPE.VIDEO,webm:zn.LOAD_TYPE.VIDEO},zn._xhrTypeMap={xhtml:zn.XHR_RESPONSE_TYPE.DOCUMENT,html:zn.XHR_RESPONSE_TYPE.DOCUMENT,htm:zn.XHR_RESPONSE_TYPE.DOCUMENT,xml:zn.XHR_RESPONSE_TYPE.DOCUMENT,tmx:zn.XHR_RESPONSE_TYPE.DOCUMENT,svg:zn.XHR_RESPONSE_TYPE.DOCUMENT,tsx:zn.XHR_RESPONSE_TYPE.DOCUMENT,gif:zn.XHR_RESPONSE_TYPE.BLOB,png:zn.XHR_RESPONSE_TYPE.BLOB,bmp:zn.XHR_RESPONSE_TYPE.BLOB,jpg:zn.XHR_RESPONSE_TYPE.BLOB,jpeg:zn.XHR_RESPONSE_TYPE.BLOB,tif:zn.XHR_RESPONSE_TYPE.BLOB,tiff:zn.XHR_RESPONSE_TYPE.BLOB,webp:zn.XHR_RESPONSE_TYPE.BLOB,tga:zn.XHR_RESPONSE_TYPE.BLOB,json:zn.XHR_RESPONSE_TYPE.JSON,text:zn.XHR_RESPONSE_TYPE.TEXT,txt:zn.XHR_RESPONSE_TYPE.TEXT,ttf:zn.XHR_RESPONSE_TYPE.BUFFER,otf:zn.XHR_RESPONSE_TYPE.BUFFER},zn.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var Kn=window.URL||window.webkitURL;var Zn={caching:function(t,e){var r=this;kn[t.url]?(t.data=kn[t.url],t.complete()):t.onComplete.once(function(){return kn[r.url]=r.data}),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===zn.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=Kn.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=zn.TYPE.IMAGE,void(t.data.onload=function(){Kn.revokeObjectURL(r),t.data.onload=null,e()})}}else{var i=t.xhr.getResponseHeader("content-type");if(i&&0===i.indexOf("image"))return t.data=new Image,t.data.src="data:"+i+";base64,"+function(t){for(var e="",r=0;r>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2],r-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var s=0;s16384&&(n=16384),s._properties=[!1,!0,!1,!1,!1],s._maxSize=r,s._batchSize=n,s._buffers=null,s._bufferUpdateIDs=[],s._updateID=0,s.interactiveChildren=!1,s.blendMode=t.BLEND_MODES.NORMAL,s.autoResize=o,s.roundPixels=!0,s.baseTexture=null,s.setProperties(i),s._tint=0,s.tintRgb=new Float32Array(4),s.tint=16777215,s}return oo(r,e),r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(r.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,kt(t,this.tintRgb)},enumerable:!1,configurable:!0}),r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthr&&!t.autoResize&&(o=r);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.state.blendMode=Yt(t.blendMode,a.alphaMode),n.state.set(this.state);var h=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=zt(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,a.alphaMode),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,d=0;ci&&(p=i),d>=s.length&&s.push(this._generateOneMoreBuffer(t));var f=s[d];f.uploadDynamic(e,c,p);var m=t._bufferUpdateIDs[d]||0;(l=l||f._updateID0,u=a.alpha,l=u<1&&h?Vt(a._tintRGB,u):a._tintRGB+(255*u<<24);i[o]=l,i[o+n]=l,i[o+2*n]=l,i[o+3*n]=l,o+=4*n}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},r}($r);(so=t.LINE_JOIN||(t.LINE_JOIN={})).MITER="miter",so.BEVEL="bevel",so.ROUND="round",(ao=t.LINE_CAP||(t.LINE_CAP={})).BUTT="butt",ao.ROUND="round",ao.SQUARE="square";var fo={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return rthis.maxSegments&&(r=this.maxSegments),r}},mo=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Lr.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Lr.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),vo=function(t,e){return(vo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function go(t,e){function r(){this.constructor=t}vo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var yo={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,i=t.holes,n=e.points,o=e.indices;if(r.length>=6){for(var s=[],a=0;ac&&(c+=2*Math.PI);var d=l,p=c-l,f=Math.abs(p),m=Math.sqrt(h*h+u*u),v=1+(15*f*Math.sqrt(m)/Math.PI>>0),g=p/v;if(d+=g,a){s.push(t,e),s.push(r,i);for(var y=1,_=d;y_?(X?(p.push(V,W),p.push(E+P*R,T+I*R),p.push(V,W),p.push(E+A*R,T+O*R)):(p.push(E-P*C,T-I*C),p.push(q,K),p.push(E-A*C,T-O*C),p.push(q,K)),m+=2):s.join===t.LINE_JOIN.ROUND?X?(p.push(V,W),p.push(E+P*R,T+I*R),m+=wo(E,T,E+P*R,T+I*R,E+A*R,T+O*R,p,!0)+4,p.push(V,W),p.push(E+A*R,T+O*R)):(p.push(E-P*C,T-I*C),p.push(q,K),m+=wo(E,T,E-P*C,T-I*C,E-A*C,T-O*C,p,!1)+4,p.push(E-A*C,T-O*C),p.push(q,K)):(p.push(V,W),p.push(q,K)):(p.push(E-P*C,T-I*C),p.push(E+P*R,T+I*R),s.join===t.LINE_JOIN.BEVEL||z/y>_||(s.join===t.LINE_JOIN.ROUND?m+=X?wo(E,T,E+P*R,T+I*R,E+A*R,T+O*R,p,!0)+2:wo(E,T,E-P*C,T-I*C,E-A*C,T-O*C,p,!1)+2:(X?(p.push(q,K),p.push(q,K)):(p.push(V,W),p.push(V,W)),m+=2)),p.push(E-A*C,T-O*C),p.push(E+A*R,T+O*R),m+=2)}}x=n[2*(f-2)],b=n[2*(f-2)+1],E=n[2*(f-1)],P=-(b-(T=n[2*(f-1)+1])),I=x-E,P/=M=Math.sqrt(P*P+I*I),I/=M,P*=g,I*=g,p.push(E-P*C,T-I*C),p.push(E+P*R,T+I*R),u||(s.cap===t.LINE_CAP.ROUND?m+=wo(E-P*(C-R)*.5,T-I*(C-R)*.5,E-P*C,T-I*C,E+P*R,T+I*R,p,!1)+2:s.cap===t.LINE_CAP.SQUARE&&(m+=So(E,T,P,I,C,R,!1,p)));var J=r.indices,Q=fo.epsilon*fo.epsilon;for(L=v;Ll*a}},t.arc=function(t,e,r,i,n,o,s,a,h){for(var u=s-o,l=fo._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/ge)),c=u/(2*l),d=2*c,p=Math.cos(c),f=Math.sin(c),m=l-1,v=m%1/m,g=0;g<=m;++g){var y=c+o+d*(g+v*g),_=Math.cos(y),x=-Math.sin(y);h.push((p*_+f*x)*n+r,(p*-x+f*_)*n+i)}},t}(),Mo=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o,s,a){for(var h=0,u=0,l=0,c=0,d=0,p=0,f=0,m=0,v=0,g=0,y=0,_=t,x=e,b=1;b<=10;++b)g=_-(m=(f=(p=(d=1-(u=b/10))*d)*d)*t+3*p*u*r+3*d*(l=u*u)*n+(c=l*u)*s),y=x-(v=f*e+3*p*u*i+3*d*l*o+c*a),_=m,x=v,h+=Math.sqrt(g*g+y*y);return h},t.curveTo=function(e,r,i,n,o,s,a){var h=a[a.length-2],u=a[a.length-1];a.length-=2;var l=fo._segmentsCount(t.curveLength(h,u,e,r,i,n,o,s)),c=0,d=0,p=0,f=0,m=0;a.push(h,u);for(var v=1,g=0;v<=l;++v)p=(d=(c=1-(g=v/l))*c)*c,m=(f=g*g)*g,a.push(p*h+3*d*g*e+3*c*f*i+m*o,p*u+3*d*g*r+3*c*f*n+m*s)},t}(),Do=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o){var s=t-2*r+n,a=e-2*i+o,h=2*r-2*t,u=2*i-2*e,l=4*(s*s+a*a),c=4*(s*h+a*u),d=h*h+u*u,p=2*Math.sqrt(l+c+d),f=Math.sqrt(l),m=2*l*f,v=2*Math.sqrt(d),g=c/f;return(m*p+f*c*(p-v)+(4*d*l-c*c)*Math.log((2*f+g+p)/(g+v)))/(4*m)},t.curveTo=function(e,r,i,n,o){for(var s=o[o.length-2],a=o[o.length-1],h=fo._segmentsCount(t.curveLength(s,a,e,r,i,n)),u=0,l=0,c=1;c<=h;++c){var d=c/h;u=s+(e-s)*d,l=a+(r-a)*d,o.push(u+(e+(i-e)*d-u)*d,l+(r+(n-r)*d-l)*d)}},t}(),Co=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),Ro=((Io={})[t.SHAPES.POLY]=yo,Io[t.SHAPES.CIRC]=_o,Io[t.SHAPES.ELIP]=_o,Io[t.SHAPES.RECT]=xo,Io[t.SHAPES.RREC]=To,Io),Lo=[],No=[],Fo={buildPoly:yo,buildCircle:_o,buildRectangle:xo,buildRoundedRectangle:To,FILL_COMMANDS:Ro,BATCH_POOL:Lo,DRAW_CALL_POOL:No,buildLine:Po,Star:Ao,ArcUtils:Oo,BezierUtils:Mo,QuadraticUtils:Do,BatchPart:Co},Bo=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.shape=t,this.lineStyle=r,this.fillStyle=e,this.matrix=i,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Uo=new we,ko=new Be,Xo=function(e){function r(){var t=e.call(this)||this;return t.uvsFloat32=null,t.indicesUint16=null,t.points=[],t.colors=[],t.uvs=[],t.indices=[],t.textureIds=[],t.graphicsData=[],t.dirty=0,t.batchDirty=-1,t.cacheDirty=-1,t.clearDirty=0,t.drawCalls=[],t.batches=[],t.shapeIndex=0,t._bounds=new Be,t.boundsDirty=-1,t.boundsPadding=0,t.batchable=!1,t.indicesUint16=null,t.uvsFloat32=null,t.closePointEps=1e-4,t}return go(r,e),Object.defineProperty(r.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),r.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},r.prototype.drawShape=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null);var n=new Bo(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},r.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var r=new Bo(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this},r.prototype.destroy=function(){e.prototype.destroy.call(this);for(var t=0;t0&&(o=(n=this.batches[this.batches.length-1]).style);for(var s=this.shapeIndex;s65535&&e;this.indicesUint16=y?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},r.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},r.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t131070)return!1;for(var t=this.batches,e=0;e0&&((o=No.pop())||((o=new _n).texArray=new xn),this.drawCalls.push(o)),o.start=c,o.size=0,o.texArray.count=0,o.type=l),f.touched=1,f._batchEnabled=e,f._batchLocation=s,f.wrapMode=10497,o.texArray.elements[o.texArray.count++]=f,s++)),o.size+=d.size,c+=d.size,h=f._batchLocation,this.addColors(i,p.color,p.alpha,d.attribSize,d.attribStart),this.addTextureIds(n,h,d.attribSize,d.attribStart)}gr._globalBatch=e,this.packAttributes()},r.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(3*t.length*4),o=new Float32Array(n),s=new Uint32Array(n),a=0,h=0;h>16)+(65280&e)+((255&e)<<16),r);t.length=Math.max(t.length,n+i);for(var s=0;s0&&e.alpha>0;return l?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:l},e)):this._lineStyle.reset(),this},r.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Te,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Te,this.currentPath.closeStroke=!1},r.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},r.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},r.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return i===t&&n===e||r.push(t,e),this},r.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},r.prototype.quadraticCurveTo=function(t,e,r,i){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),Do.curveTo(t,e,r,i,n),this},r.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),Mo.curveTo(t,e,r,i,n,o,this.currentPath.points),this},r.prototype.arcTo=function(t,e,r,i,n){this._initCurve(t,e);var o=this.currentPath.points,s=Oo.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,l=s.startAngle,c=s.endAngle,d=s.anticlockwise;this.arc(a,h,u,l,c,d)}return this},r.prototype.arc=function(t,e,r,i,n,o){if(void 0===o&&(o=!1),i===n)return this;if(!o&&n<=i?n+=ge:o&&i<=n&&(i+=ge),0===n-i)return this;var s=t+Math.cos(i)*r,a=e+Math.sin(i)*r,h=this._geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var l=Math.abs(u[u.length-2]-s),c=Math.abs(u[u.length-1]-a);l0;return s?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:s},t)):this._fillStyle.reset(),this},r.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},r.prototype.drawRect=function(t,e,r,i){return this.drawShape(new xe(t,e,r,i))},r.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new Se(t,e,r,i,n))},r.prototype.drawCircle=function(t,e,r){return this.drawShape(new be(t,e,r))},r.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new Ee(t,e,r,i))},r.prototype.drawPolygon=function(){for(var t,e=arguments,r=[],i=0;i>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(var a=0,h=s.length;a>16)+(65280&n)+((255&n)<<16)}}},r.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this._geometry.points,u=this.vertexData,l=0,c=0;c=i&&Wo.x=n&&Wo.y>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||Lr.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),r}(Ge),Zo=function(t,e){return(Zo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};(Vo=t.TEXT_GRADIENT||(t.TEXT_GRADIENT={}))[Vo.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",Vo[Vo.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL";var Jo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:t.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},Qo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],$o=function(){function t(t){this.styleID=0,this.reset(),rs(this,t,t)}return t.prototype.clone=function(){var e={};return rs(e,this,Jo),new t(e)},t.prototype.reset=function(){rs(this,Jo,Jo)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=es(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=es(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&Qo.indexOf(i)<0&&(i='"'+i+'"'),e[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function ts(t){return"number"==typeof t?Xt(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function es(t){if(Array.isArray(t)){for(var e=0;ef)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(g,r.breakWords))for(var b=t.wordWrapSplit(g),E=0;Ef&&(a+=t.addLine(s),p=!1,s="",o=0),s+=T,o+=I}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var A=v===m.length-1;a+=t.addLine(g,!A),p=!1,s="",o=0}else x+o>f&&(p=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(g)||p)&&(s+=g,o+=x)}return a+=t.addLine(s,!1)},t.addLine=function(e,r){return void 0===r&&(r=!0),e=t.trimRight(e),e=r?e+"\n":e},t.getFromCache=function(t,e,r,i){var n=r[t];if("number"!=typeof n){var o=t.length*e;n=i.measureText(t).width+o,r[t]=n}return n},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var i=e[r];if(!t.isBreakingSpace(i))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],i="";if("string"!=typeof e)return r;for(var n=0;na;--d){for(m=0;m0},t}();function us(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i=0;e--)this.add(t.children[e]);return this},e.prototype.destroy=function(){this.ticking&&Qe.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},e}();function gs(t,e){return e instanceof gr&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function ys(t,e){if(!(e instanceof Yo))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n=i&&Ps.x=n&&Ps.y>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;Wt(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Li),Hs=function(e){function r(r,i,n){var o=e.call(this)||this,s=new Xr(r),a=new Xr(i,!0),h=new Xr(n,!0,!0);return o.addAttribute("aVertexPosition",s,2,!1,t.TYPES.FLOAT).addAttribute("aTextureCoord",a,2,!1,t.TYPES.FLOAT).addIndex(h),o._updateId=-1,o}return Ls(r,e),Object.defineProperty(r.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),r}(Vr),Gs=function(t,e){return(Gs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ys=function(){return function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]}}(),zs=function(){function t(){}return t.test=function(t){return"string"==typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[]};for(var i in e){var n=e[i].match(/^[a-z]+/gm)[0],o=e[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var a in o){var h=o[a].split("="),u=h[0],l=h[1].replace(/"/gm,""),c=parseFloat(l),d=isNaN(c)?l:c;s[u]=d}r[n].push(s)}var p=new Ys;return r.info.forEach(function(t){return p.info.push({face:t.face,size:parseInt(t.size,10)})}),r.common.forEach(function(t){return p.common.push({lineHeight:parseInt(t.lineHeight,10)})}),r.page.forEach(function(t){return p.page.push({id:parseInt(t.id,10),file:t.file})}),r.char.forEach(function(t){return p.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})}),r.kerning.forEach(function(t){return p.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})}),p},t}(),Vs=function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new Ys,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),n=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),s=t.getElementsByTagName("kerning"),a=0;a")>-1){var e=(new self.DOMParser).parseFromString(t,"text/xml");return Vs.test(e)}return!1},t.parse=function(t){var e=(new window.DOMParser).parseFromString(t,"text/xml");return Vs.parse(e)},t}(),qs=[zs,Vs,Ws];function Ks(t){for(var e=0;e=u-S*a){if(0===y)throw new Error("[BitmapFont] textureHeight "+u+"px is too small for "+c.fontSize+"px fonts");--b,f=null,m=null,v=null,y=0,g=0,_=0}else if(_=Math.max(S+E.fontProperties.descent,_),w*a+g>=d)--b,y+=_*a,y=Math.ceil(y),g=0,_=0;else{Zs(f,m,E,g,y,a,c);var P=E.text.charCodeAt(0);p.char.push({id:P,page:x.length-1,x:g/a,y:y/a,width:w,height:S,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(c.dropShadow?c.dropShadowDistance:0)-(c.stroke?c.strokeThickness:0))}),g+=(w+2*s)*a,g=Math.ceil(g)}}var I=new t(p,x,!0);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=I,I},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),Qs=[],$s=[],ta=function(t){function e(r,i){void 0===i&&(i={});var n=t.call(this)||this;n._tint=16777215,i.font&&(oe("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),n._upgradeStyle(i));var o=Object.assign({},e.styleDefaults,i),s=o.align,a=o.tint,h=o.maxWidth,u=o.letterSpacing,l=o.fontName,c=o.fontSize;if(!Js.available[l])throw new Error('Missing BitmapFont "'+l+'"');return n._activePagesMeshData=[],n._textWidth=0,n._textHeight=0,n._align=s,n._tint=a,n._fontName=l,n._fontSize=c||Js.available[l].size,n._text=r,n._maxWidth=h,n._maxLineHeight=0,n._letterSpacing=u,n._anchor=new Pe(function(){n.dirty=!0},n,0,0),n._roundPixels=D.ROUND_PIXELS,n.dirty=!0,n._textureCache={},n}return function(t,e){function r(){this.constructor=t}Gs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.updateText=function(){for(var t,e=Js.available[this._fontName],r=this._fontSize/e.size,i=new we,n=[],o=[],s=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",a=s.length,h=this._maxWidth*e.size/this._fontSize,u=null,l=0,c=0,d=0,p=-1,f=0,m=0,v=0,g=0;g0&&i.x>h&&(te(n,1+p-++m,1+g-p),g=p,p=-1,o.push(f),c=Math.max(c,f),d++,i.x=0,i.y+=e.lineHeight,u=null)}}else o.push(l),c=Math.max(c,l),++d,++m,i.x=0,i.y+=e.lineHeight,u=null}var E=s.charAt(s.length-1);"\r"!==E&&"\n"!==E&&(/(?:\s)/.test(E)&&(l=f),o.push(l),c=Math.max(c,l));var T=[];for(g=0;g<=d;g++){var S=0;"right"===this._align?S=c-o[g]:"center"===this._align&&(S=(c-o[g])/2),T.push(S)}var w=n.length,P={},I=[],A=this._activePagesMeshData;for(g=0;g6*R)||z.vertices.length<2*Us.BATCHABLE_SIZE)z.vertices=new Float32Array(8*R),z.uvs=new Float32Array(8*R),z.indices=new Uint16Array(6*R);else for(var L=z.total,N=z.vertices,F=4*L*2;F=2&&(t.fontSize=parseInt(e[0],10))}else t.fontName=t.font.name,t.fontSize="number"==typeof t.font.size?t.font.size:parseInt(t.font.size,10)},e.prototype.destroy=function(e){var r=this._textureCache;for(var i in r){r[i].destroy(),delete r[i]}this._textureCache=null,t.prototype.destroy.call(this,e)},e.registerFont=function(t,e){return oe("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),Js.install(t,e)},Object.defineProperty(e,"fonts",{get:function(){return oe("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),Js.available},enumerable:!1,configurable:!0}),e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e}(Ge),ea=function(){function t(){}return t.add=function(){$n.setExtensionXhrType("fnt",$n.XHR_RESPONSE_TYPE.TEXT)},t.use=function(e,r){var i=Ks(e.data);if(i)for(var n=t.getBaseUrl(this,e),o=i.parse(e.data),s={},a=function(t){s[t.metadata.pageFile]=t.texture,Object.keys(s).length===o.page.length&&(e.bitmapFont=Js.install(o,s,!0),r())},h=0;h=i&&(e=t-s-1),o+=a=a.replace("%value%",r[e].toString()),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(s=t.call(this,a,h)||this).horizontal=e,s.resolution=n,s._quality=0,s.quality=i,s.blur=r,s}return sa(e,t),e.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),o=t.renderer,s=e,a=n;this.state.blend=!1,t.applyFilter(this,s,a,xa.CLEAR);for(var h=1;h>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=((i=i||3375104)>>16&255)/255,u=(i>>8&255)/255,l=(255&i)/255,c=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,h,u,l,e=e||.15,0,o-h,s-u,a-l,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(Fi);Da.prototype.grayscale=Da.prototype.greyscale;var Ca=function(t,e){return(Ca=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ra="varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",La="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n",Na=function(t){function e(e,r){var i=this,n=new Ie;return e.renderable=!1,(i=t.call(this,La,Ra,{mapSampler:e._texture,filterMatrix:n,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,i.maskMatrix=n,null==r&&(r=20),i.scale=new we(r,r),i}return function(t,e){function r(){this.constructor=t}Ca(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.apply=function(t,e,r,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),s=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==s&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/s,this.uniforms.rotation[3]=n.d/s),t.applyFilter(this,e,r,i)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(Fi),Fa=function(t,e){return(Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Ba="\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",Ua='varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n',ka=function(t){function e(){return t.call(this,Ba,Ua)||this}return function(t,e){function r(){this.constructor=t}Fa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e}(Fi),Xa=function(t,e){return(Xa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var ja="precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",Ha=function(t){function e(e,r){void 0===e&&(e=.5),void 0===r&&(r=Math.random());var i=t.call(this,yn,ja,{uNoise:0,uSeed:0})||this;return i.noise=e,i.seed=r,i}return function(t,e){function r(){this.constructor=t}Xa(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(Fi),Ga=new Ie;Xe.prototype._cacheAsBitmap=!1,Xe.prototype._cacheData=null;var Ya=function(){return function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}();Object.defineProperties(Xe.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new Ya),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),Xe.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},Xe.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var r=this.getLocalBounds(null,!0).clone();if(this.filters){var i=this.filters[0].padding;r.pad(i)}r.ceil(D.RESOLUTION);var n=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),s=t.renderTexture.destinationFrame.clone(),a=t.projection.transform,h=Fr.create({width:r.width,height:r.height}),u="cacheAsBitmap_"+ie();this._cacheData.textureCacheId=u,gr.addToCache(h.baseTexture,u),Lr.addToCache(h,u);var l=this.transform.localTransform.copyTo(Ga).invert().translate(-r.x,-r.y);this.render=this._cacheData.originalRender,t.render(this,h,!0,l,!1),t.projection.transform=a,t.renderTexture.bind(n,o,s),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new Ko(h);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-r.x/r.width,c.anchor.y=-r.y/r.height,c.alpha=e,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=c.containsPoint.bind(c)}},Xe.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},Xe.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),r=this.alpha;this.alpha=1;var i=t.context,n=t._projTransform;e.ceil(D.RESOLUTION);var o=Fr.create({width:e.width,height:e.height}),s="cacheAsBitmap_"+ie();this._cacheData.textureCacheId=s,gr.addToCache(o.baseTexture,s),Lr.addToCache(o,s);var a=Ga;this.transform.localTransform.copyTo(a),a.invert(),a.tx-=e.x,a.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,o,!0,a,!1),t.context=i,t._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var h=new Ko(o);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-e.x/e.width,h.anchor.y=-e.y/e.height,h.alpha=r,h._bounds=this._bounds,this._cacheData.sprite=h,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=h.containsPoint.bind(h)}},Xe.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},Xe.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},Xe.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,gr.removeFromCache(this._cacheData.textureCacheId),Lr.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Xe.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},Xe.prototype.name=null,Ge.prototype.getChildByName=function(t,e){for(var r=0,i=this.children.length;r0){var d=a.x-t[l].x,p=a.y-t[l].y,f=Math.sqrt(d*d+p*p);a=t[l],s+=f/h}else s=l/(u-1);n[c]=s,n[c+1]=0,n[c+2]=s,n[c+3]=1}var m=0;for(l=0;l0?this.textureScale*this._width/2:this._width/2;i/=l,n/=l,i*=c,n*=c,o[u]=h.x+i,o[u+1]=h.y+n,o[u+2]=h.x-i,o[u+3]=h.y-n,r=h}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Hs),Ka=function(e){function r(r,i,n){void 0===n&&(n=0);var o=this,s=new qa(r.height,i,n),a=new js(r);return n>0&&(r.baseTexture.wrapMode=t.WRAP_MODES.REPEAT),(o=e.call(this,s,a)||this).autoUpdate=!0,o}return Va(r,e),r.prototype._render=function(t){var r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),e.prototype._render.call(this,t)},r}(Us),Za=function(t){function e(e,r,i){var n=this,o=new Wa(e.width,e.height,r,i),s=new js(Lr.WHITE);return(n=t.call(this,o,s)||this).texture=e,n}return Va(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e.prototype.destroy=function(e){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,e)},e}(Us),Ja=function(t){function e(e,r,i,n,o){void 0===e&&(e=Lr.EMPTY);var s=this,a=new Hs(r,i,n);a.getBuffer("aVertexPosition").static=!1;var h=new js(e);return(s=t.call(this,a,h,null,o)||this).autoUpdate=!0,s}return Va(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(Us),Qa=10,$a=function(t){function e(e,r,i,n,o){void 0===r&&(r=Qa),void 0===i&&(i=Qa),void 0===n&&(n=Qa),void 0===o&&(o=Qa);var s=t.call(this,Lr.WHITE,4,4)||this;return s._origWidth=e.orig.width,s._origHeight=e.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=r,s._rightWidth=n,s._topHeight=i,s._bottomHeight=o,s.texture=e,s}return Va(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,r=this._topHeight+this._bottomHeight,i=this._height>r?1:this._height/r;return Math.min(e,i)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(Za),th=function(t,e){return(th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var eh=function(e){function r(t,r){void 0===r&&(r=!0);var i=e.call(this,t[0]instanceof Lr?t[0]:t[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=r,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=t,i}return function(t,e){function r(){this.constructor=t}th(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),r.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Qe.shared.remove(this.update,this),this._isConnectedToTicker=!1))},r.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Qe.shared.add(this.update,this,t.UPDATE_PRIORITY.HIGH),this._isConnectedToTicker=!0))},r.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},r.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},r.prototype.update=function(t){if(this._playing){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramer&&this.onLoop()),this.updateTexture())}},r.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},r.prototype.destroy=function(t){this.stop(),e.prototype.destroy.call(this,t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},r.fromFrames=function(t){for(var e=[],i=0;i0){var n=e.context;n.beginPath();for(var o=0;oS?S:T,r.moveTo(_,x+T),r.lineTo(_,x+E-T),r.quadraticCurveTo(_,x+E,_+T,x+E),r.lineTo(_+b-T,x+E),r.quadraticCurveTo(_+b,x+E,_+b,x+E-T),r.lineTo(_+b,x+T),r.quadraticCurveTo(_+b,x,_+b-T,x),r.lineTo(_+T,x),r.quadraticCurveTo(_,x,_,x+T),r.closePath()}}},e.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},e.prototype.destroy=function(){},e}();function hh(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e}function uh(){if("undefined"==typeof document)return!1;var t=hh("#ff00ff"),e=hh("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var i=r.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var n=i.getImageData(2,0,1,1);if(!n)return!1;var o=n.data;return 255===o[0]&&0===o[1]&&0===o[2]}var lh=new Ie,ch=function(e){function r(i){var n,o=e.call(this,t.RENDERER_TYPE.CANVAS,i)||this;if(o.rootContext=o.view.getContext("2d",{alpha:o.transparent}),o.context=o.rootContext,o.refresh=!0,o.maskManager=new ah(o),o.smoothProperty="imageSmoothingEnabled",!o.rootContext.imageSmoothingEnabled){var s=o.rootContext;s.webkitImageSmoothingEnabled?o.smoothProperty="webkitImageSmoothingEnabled":s.mozImageSmoothingEnabled?o.smoothProperty="mozImageSmoothingEnabled":s.oImageSmoothingEnabled?o.smoothProperty="oImageSmoothingEnabled":s.msImageSmoothingEnabled&&(o.smoothProperty="msImageSmoothingEnabled")}return o.initPlugins(r.__plugins),o.blendModes=(void 0===n&&(n=[]),uh()?(n[t.BLEND_MODES.NORMAL]="source-over",n[t.BLEND_MODES.ADD]="lighter",n[t.BLEND_MODES.MULTIPLY]="multiply",n[t.BLEND_MODES.SCREEN]="screen",n[t.BLEND_MODES.OVERLAY]="overlay",n[t.BLEND_MODES.DARKEN]="darken",n[t.BLEND_MODES.LIGHTEN]="lighten",n[t.BLEND_MODES.COLOR_DODGE]="color-dodge",n[t.BLEND_MODES.COLOR_BURN]="color-burn",n[t.BLEND_MODES.HARD_LIGHT]="hard-light",n[t.BLEND_MODES.SOFT_LIGHT]="soft-light",n[t.BLEND_MODES.DIFFERENCE]="difference",n[t.BLEND_MODES.EXCLUSION]="exclusion",n[t.BLEND_MODES.HUE]="hue",n[t.BLEND_MODES.SATURATION]="saturate",n[t.BLEND_MODES.COLOR]="color",n[t.BLEND_MODES.LUMINOSITY]="luminosity"):(n[t.BLEND_MODES.NORMAL]="source-over",n[t.BLEND_MODES.ADD]="lighter",n[t.BLEND_MODES.MULTIPLY]="source-over",n[t.BLEND_MODES.SCREEN]="source-over",n[t.BLEND_MODES.OVERLAY]="source-over",n[t.BLEND_MODES.DARKEN]="source-over",n[t.BLEND_MODES.LIGHTEN]="source-over",n[t.BLEND_MODES.COLOR_DODGE]="source-over",n[t.BLEND_MODES.COLOR_BURN]="source-over",n[t.BLEND_MODES.HARD_LIGHT]="source-over",n[t.BLEND_MODES.SOFT_LIGHT]="source-over",n[t.BLEND_MODES.DIFFERENCE]="source-over",n[t.BLEND_MODES.EXCLUSION]="source-over",n[t.BLEND_MODES.HUE]="source-over",n[t.BLEND_MODES.SATURATION]="source-over",n[t.BLEND_MODES.COLOR]="source-over",n[t.BLEND_MODES.LUMINOSITY]="source-over"),n[t.BLEND_MODES.NORMAL_NPM]=n[t.BLEND_MODES.NORMAL],n[t.BLEND_MODES.ADD_NPM]=n[t.BLEND_MODES.ADD],n[t.BLEND_MODES.SCREEN_NPM]=n[t.BLEND_MODES.SCREEN],n[t.BLEND_MODES.SRC_IN]="source-in",n[t.BLEND_MODES.SRC_OUT]="source-out",n[t.BLEND_MODES.SRC_ATOP]="source-atop",n[t.BLEND_MODES.DST_OVER]="destination-over",n[t.BLEND_MODES.DST_IN]="destination-in",n[t.BLEND_MODES.DST_OUT]="destination-out",n[t.BLEND_MODES.DST_ATOP]="destination-atop",n[t.BLEND_MODES.XOR]="xor",n[t.BLEND_MODES.SUBTRACT]="source-over",n),o._activeBlendMode=null,o._outerBlend=!1,o._projTransform=null,o.renderingToScreen=!1,Bt("Canvas"),o.resize(o.options.width,o.options.height),o}return function(t,e){function r(){this.constructor=t}sh(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(r,e),r.prototype.render=function(e,r,i,n,o){if(this.view){this.renderingToScreen=!r,this.emit("prerender");var s=this.resolution;r?((r=r.castToBaseTexture())._canvasRenderTarget||(r._canvasRenderTarget=new ue(r.width,r.height,r.resolution),r.resource=new Ir.CanvasResource(r._canvasRenderTarget.canvas),r.valid=!0),this.context=r._canvasRenderTarget.context,this.resolution=r._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(this._projTransform=n||null,r||(this._lastObjectRendered=e),!o){var h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}if(a.save(),a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,this._activeBlendMode=t.BLEND_MODES.NORMAL,this._outerBlend=!1,a.globalCompositeOperation=this.blendModes[t.BLEND_MODES.NORMAL],void 0!==i?i:this.clearBeforeRender)if(this.renderingToScreen)this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height));else{(r=r)._canvasRenderTarget.clear();var u=r.clearColor;u[3]>0&&(a.fillStyle=Xt(Ht(u)),a.fillRect(0,0,r.realWidth,r.realHeight))}var l=this.context;this.context=a,e.renderCanvas(this),this.context=l,a.restore(),this.resolution=s,this._projTransform=null,this.emit("postrender")}},r.prototype.setContextTransform=function(t,e,r){var i=t,n=this._projTransform,o=this.resolution;r=r||o,n&&((i=lh).copyFrom(t),i.prepend(n)),e?this.context.setTransform(i.a*r,i.b*r,i.c*r,i.d*r,i.tx*o|0,i.ty*o|0):this.context.setTransform(i.a*r,i.b*r,i.c*r,i.d*r,i.tx*o,i.ty*o)},r.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},r.prototype.setBlendMode=function(e,r){var i=e===t.BLEND_MODES.SRC_IN||e===t.BLEND_MODES.SRC_OUT||e===t.BLEND_MODES.DST_IN||e===t.BLEND_MODES.DST_ATOP;!r&&i&&(e=t.BLEND_MODES.NORMAL),this._activeBlendMode!==e&&(this._activeBlendMode=e,this._outerBlend=i,this.context.globalCompositeOperation=this.blendModes[e])},r.prototype.destroy=function(t){e.prototype.destroy.call(this,t),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},r.prototype.resize=function(r,i){e.prototype.resize.call(this,r,i),this.smoothProperty&&(this.rootContext[this.smoothProperty]=D.SCALE_MODE===t.SCALE_MODES.LINEAR)},r.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},r.registerPlugin=function(t,e){r.__plugins=r.__plugins||{},r.__plugins[t]=e},r}(fn),dh={canvas:null,getTintedCanvas:function(t,e){var r=t.texture,i="#"+("00000"+(0|(e=dh.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var n,o=r.tintCache[i];if(o){if(o.tintId===r._updateID)return r.tintCache[i];n=r.tintCache[i]}else n=document.createElement("canvas");if(dh.tintMethod(r,e,n),n.tintId=r._updateID,dh.convertTintToImage){var s=new Image;s.src=n.toDataURL(),r.tintCache[i]=s}else r.tintCache[i]=n;return n},getTintedPattern:function(t,e){var r="#"+("00000"+(0|(e=dh.roundColor(e))).toString(16)).substr(-6);t.patternCache=t.patternCache||{};var i=t.patternCache[r];return i&&i.tintId===t._updateID?i:(dh.canvas||(dh.canvas=document.createElement("canvas")),dh.tintMethod(t,e,dh.canvas),(i=dh.canvas.getContext("2d").createPattern(dh.canvas,"repeat")).tintId=t._updateID,t.patternCache[r]=i,i)},tintWithMultiply:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply";var s=t.baseTexture.getDrawableSource();i.drawImage(s,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(s,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithOverlay:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.getDrawableSource(),n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithPerPixel:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.getDrawableSource(),n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore();for(var s=kt(e),a=s[0],h=s[1],u=s[2],l=i.getImageData(0,0,n.width,n.height),c=l.data,d=0;d0){var P=w/Math.abs(t.worldTransform.a),I=w/Math.abs(t.worldTransform.d),A=(_+x+b)/3,O=(E+T+S)/3,M=_-A,D=E-O,C=Math.sqrt(M*M+D*D);_=A+M/C*(C+P),E=O+D/C*(C+I),D=T-O,x=A+(M=x-A)/(C=Math.sqrt(M*M+D*D))*(C+P),T=O+D/C*(C+I),D=S-O,b=A+(M=b-A)/(C=Math.sqrt(M*M+D*D))*(C+P),S=O+D/C*(C+I)}n.save(),n.beginPath(),n.moveTo(_,E),n.lineTo(x,T),n.lineTo(b,S),n.closePath(),n.clip();var R=p*g+v*m+f*y-g*m-v*f-p*y,L=_*g+v*b+x*y-g*b-v*x-_*y,N=p*x+_*m+f*b-x*m-_*f-p*b,F=p*g*b+v*x*m+_*f*y-_*g*m-v*f*b-p*x*y,B=E*g+v*S+T*y-g*S-v*T-E*y,U=p*T+E*m+f*S-T*m-E*f-p*S,k=p*g*S+v*T*m+E*f*y-E*g*m-v*f*S-p*T*y;n.transform(L/R,B/R,N/R,U/R,F/R,k/R),n.drawImage(d,0,0,l*u.resolution,c*u.resolution,0,0,l,c),n.restore(),this.renderer.invalidateBlendMode()}},e.prototype.renderMeshFlat=function(t){var e=this.renderer.context,r=t.geometry.getBuffer("aVertexPosition").data,i=r.length/2;e.beginPath();for(var n=1;n>16&255)/255,l=(e.tint>>8&255)/255,c=(255&e.tint)/255,d=0;d>16&255)/255*u*255<<16)+((g>>8&255)/255*l*255<<8)+(255&g)/255*c*255;s=this._calcCanvasStyle(m,_)}if(v.visible){var x=((y>>16&255)/255*u*255<<16)+((y>>8&255)/255*l*255<<8)+(255&y)/255*c*255;a=this._calcCanvasStyle(v,x)}if(i.lineWidth=v.width,i.lineCap=v.cap,i.lineJoin=v.join,i.miterLimit=v.miterLimit,p.type===t.SHAPES.POLY){i.beginPath();var b=(O=f).points,E=p.holes,T=void 0,S=void 0,w=void 0,P=void 0;i.moveTo(b[0],b[1]);for(var I=2;I0){T=0,w=b[0],P=b[1];for(I=2;I+2=0;I-=2)i.lineTo(b[I],b[I+1])}E[A].shape.closeStroke&&i.closePath()}}m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}else if(p.type===t.SHAPES.RECT){var O=f;m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fillRect(O.x,O.y,O.width,O.height)),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.strokeRect(O.x,O.y,O.width,O.height))}else if(p.type===t.SHAPES.CIRC){O=f;i.beginPath(),i.arc(O.x,O.y,O.radius,0,2*Math.PI),i.closePath(),m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}else if(p.type===t.SHAPES.ELIP){var M=2*(O=f).width,D=2*O.height,C=O.x-M/2,R=O.y-D/2;i.beginPath();var L=M/2*.5522848,N=D/2*.5522848,F=C+M,B=R+D,U=C+M/2,k=R+D/2;i.moveTo(C,k),i.bezierCurveTo(C,k-N,U-L,R,U,R),i.bezierCurveTo(U+L,R,F,k-N,F,k),i.bezierCurveTo(F,k+N,U+L,B,U,B),i.bezierCurveTo(U-L,B,C,k+N,C,k),i.closePath(),m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}else if(p.type===t.SHAPES.RREC){var X=(O=f).x,j=O.y,H=O.width,G=O.height,Y=O.radius,z=Math.min(H,G)/2|0;Y=Y>z?z:Y,i.beginPath(),i.moveTo(X,j+Y),i.lineTo(X,j+G-Y),i.quadraticCurveTo(X,j+G,X+Y,j+G),i.lineTo(X+H-Y,j+G),i.quadraticCurveTo(X+H,j+G,X+H,j+G-Y),i.lineTo(X+H,j+Y),i.quadraticCurveTo(X+H,j,X+H-Y,j),i.lineTo(X+Y,j),i.quadraticCurveTo(X,j,X,j+Y),i.closePath(),m.visible&&(i.globalAlpha=m.alpha*n,i.fillStyle=s,i.fill()),v.visible&&(i.globalAlpha=v.alpha*n,i.strokeStyle=a,i.stroke())}}},e.prototype.setPatternTransform=function(t,e){if(!1!==this._svgMatrix){if(!this._svgMatrix){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r&&r.createSVGMatrix&&(this._svgMatrix=r.createSVGMatrix()),!this._svgMatrix||!t.setTransform)return void(this._svgMatrix=!1)}this._svgMatrix.a=e.a,this._svgMatrix.b=e.b,this._svgMatrix.c=e.c,this._svgMatrix.d=e.d,this._svgMatrix.e=e.tx,this._svgMatrix.f=e.ty,t.setTransform(this._svgMatrix.inverse())}},e.prototype.destroy=function(){this.renderer=null,this._svgMatrix=null,this._tempMatrix=null},e}(),yh=new Ie;Yo.prototype.generateCanvasTexture=function(t,e){void 0===e&&(e=1);var r=this.getLocalBounds(),i=Fr.create({width:r.width,height:r.height,scaleMode:t,resolution:e});vh||(vh=new ch),this.transform.updateLocalTransform(),this.transform.localTransform.copyTo(yh),yh.invert(),yh.tx-=r.x,yh.ty-=r.y,vh.render(this,i,!0,yh);var n=Lr.from(i.baseTexture._canvasRenderTarget.canvas,{scaleMode:t});return n.baseTexture.setResolution(e),n},Yo.prototype.cachedGraphicsData=[],Yo.prototype._renderCanvas=function(t){!0!==this.isMask&&(this.finishPoly(),t.plugins.graphics.render(this))};var _h=new Ie,xh=function(){function e(t){this.renderer=t}return e.prototype.render=function(e){var r=e._texture,i=this.renderer,n=i.context,o=r._frame.width,s=r._frame.height,a=e.transform.worldTransform,h=0,u=0,l=r.baseTexture.getDrawableSource();if(!(r.orig.width<=0||r.orig.height<=0)&&r.valid&&l&&r.valid){i.setBlendMode(e.blendMode,!0),i.context.globalAlpha=e.worldAlpha;var c=r.baseTexture.scaleMode===t.SCALE_MODES.LINEAR;i.smoothProperty&&i.context[i.smoothProperty]!==c&&(n[i.smoothProperty]=c),r.trim?(h=r.trim.width/2+r.trim.x-e.anchor.x*r.orig.width,u=r.trim.height/2+r.trim.y-e.anchor.y*r.orig.height):(h=(.5-e.anchor.x)*r.orig.width,u=(.5-e.anchor.y)*r.orig.height),r.rotate&&(a.copyTo(_h),a=_h,Ne.matrixAppendRotationInv(a,r.rotate,h,u),h=0,u=0),h-=o/2,u-=s/2,i.setContextTransform(a,e.roundPixels,1),e.roundPixels&&(h|=0,u|=0);var d=r.baseTexture.resolution,p=i._outerBlend;p&&(n.save(),n.beginPath(),n.rect(h*i.resolution,u*i.resolution,o*i.resolution,s*i.resolution),n.clip()),16777215!==e.tint?(e._cachedTint===e.tint&&e._tintedCanvas.tintId===e._texture._updateID||(e._cachedTint=e.tint,e._tintedCanvas=dh.getTintedCanvas(e,e.tint)),n.drawImage(e._tintedCanvas,0,0,Math.floor(o*d),Math.floor(s*d),Math.floor(h*i.resolution),Math.floor(u*i.resolution),Math.floor(o*i.resolution),Math.floor(s*i.resolution))):n.drawImage(l,r._frame.x*d,r._frame.y*d,Math.floor(o*d),Math.floor(s*d),Math.floor(h*i.resolution),Math.floor(u*i.resolution),Math.floor(o*i.resolution),Math.floor(s*i.resolution)),p&&n.restore(),i.setBlendMode(t.BLEND_MODES.NORMAL)}},e.prototype.destroy=function(){this.renderer=null},e}();Ko.prototype._tintedCanvas=null,Ko.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)};var bh=new xe,Eh=function(){function t(t){this.renderer=t}return t.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},t.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},t.prototype.canvas=function(t){var e,r,i,n,o=this.renderer;t&&(n=t instanceof Fr?t:o.generateTexture(t)),n?(e=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,i=n.frame):(e=o.rootContext,r=o.resolution,(i=bh).width=this.renderer.width,i.height=this.renderer.height);var s=Math.floor(i.width*r+1e-4),a=Math.floor(i.height*r+1e-4),h=new ue(s,a,1),u=e.getImageData(i.x*r,i.y*r,s,a);return h.context.putImageData(u,0,0),h.canvas},t.prototype.pixels=function(t){var e,r,i,n,o=this.renderer;return t&&(n=t instanceof Fr?t:o.generateTexture(t)),n?(e=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,i=n.frame):(e=o.rootContext,(i=bh).width=o.width,i.height=o.height),e.getImageData(0,0,i.width*r,i.height*r).data},t.prototype.destroy=function(){this.renderer=null},t}();Object.defineProperty(ch.prototype,"extract",{get:function(){return oe("v5.3.0","CanvasRenderer#extract is deprecated, use CanvasRenderer#plugins.extract"),this.plugins.extract}});var Th=function(t,e){return(Th=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var Sh=16;function wh(t,e){var r=t;if(e instanceof gr){var i=e.source,n=0===i.width?r.canvas.width:Math.min(r.canvas.width,i.width),o=0===i.height?r.canvas.height:Math.min(r.canvas.height,i.height);return r.ctx.drawImage(i,0,0,n,o,0,0,r.canvas.width,r.canvas.height),!0}return!1}var Ph=function(t){function e(e){var r=t.call(this,e)||this;return r.uploadHookHelper=r,r.canvas=document.createElement("canvas"),r.canvas.width=Sh,r.canvas.height=Sh,r.ctx=r.canvas.getContext("2d"),r.registerUploadHook(wh),r}return function(t,e){function r(){this.constructor=t}Th(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(vs);return Is.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.valid){var r=t.context,i=this.worldTransform,n=e.baseTexture,o=n.getDrawableSource(),s=n.resolution,a=this.tilePosition.x/this.tileScale.x%e._frame.width*s,h=this.tilePosition.y/this.tileScale.y%e._frame.height*s;if(this._textureID!==this._texture._updateID||this._cachedTint!==this.tint){this._textureID=this._texture._updateID;var u=new ue(e._frame.width,e._frame.height,s);16777215!==this.tint?(this._tintedCanvas=dh.getTintedCanvas(this,this.tint),u.context.drawImage(this._tintedCanvas,0,0)):u.context.drawImage(o,-e._frame.x*s,-e._frame.y*s),this._cachedTint=this.tint,this._canvasPattern=u.context.createPattern(u.canvas,"repeat")}r.globalAlpha=this.worldAlpha,t.setBlendMode(this.blendMode),t.setContextTransform(i),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/s,this.tileScale.y/s);var l=this.anchor.x*-this._width,c=this.anchor.y*-this._height;this.uvRespectAnchor?(r.translate(a,h),r.fillRect(-a+l,-h+c,this._width/this.tileScale.x*s,this._height/this.tileScale.y*s)):(r.translate(a+l,h+c),r.fillRect(-a,-h,this._width/this.tileScale.x*s,this._height/this.tileScale.y*s))}},ho.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,i=!0,n=0,o=0,s=0,a=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var h=0;h + * Copyright 2014-2016 Benjamin Tan + * Copyright 2011-2013 John-David Dalton + * Available under MIT license + */ +;(function() { + 'use strict'; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used as a reference to the global object. */ + var root = (objectTypes[typeof window] && window) || this; + + /** Backup possible global object. */ + var oldRoot = root; + + /** Detect free variable `exports`. */ + var freeExports = objectTypes[typeof exports] && exports; + + /** Detect free variable `module`. */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global; + if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { + root = freeGlobal; + } + + /** + * Used as the maximum length of an array-like object. + * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) + * for more details. + */ + var maxSafeInteger = Math.pow(2, 53) - 1; + + /** Regular expression to detect Opera. */ + var reOpera = /\bOpera/; + + /** Possible global object. */ + var thisBinding = this; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check for own properties of an object. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to resolve the internal `[[Class]]` of values. */ + var toString = objectProto.toString; + + /*--------------------------------------------------------------------------*/ + + /** + * Capitalizes a string value. + * + * @private + * @param {string} string The string to capitalize. + * @returns {string} The capitalized string. + */ + function capitalize(string) { + string = String(string); + return string.charAt(0).toUpperCase() + string.slice(1); + } + + /** + * A utility function to clean up the OS name. + * + * @private + * @param {string} os The OS name to clean up. + * @param {string} [pattern] A `RegExp` pattern matching the OS name. + * @param {string} [label] A label for the OS. + */ + function cleanupOS(os, pattern, label) { + // Platform tokens are defined at: + // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx + // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx + var data = { + '10.0': '10', + '6.4': '10 Technical Preview', + '6.3': '8.1', + '6.2': '8', + '6.1': '7 / Server 2008 R2', + '6.0': 'Vista / Server 2008', + '5.2': 'XP 64-bit / Server 2003', + '5.1': 'XP', + '5.01': '2000 SP1', + '5.0': '2000', + '4.0': 'NT', + '4.90': 'ME' + }; + // Detect Windows version from platform tokens. + if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) && + (data = data[/[\d.]+$/.exec(os)])) { + os = 'Windows ' + data; + } + // Correct character case and cleanup string. + os = String(os); + + if (pattern && label) { + os = os.replace(RegExp(pattern, 'i'), label); + } + + os = format( + os.replace(/ ce$/i, ' CE') + .replace(/\bhpw/i, 'web') + .replace(/\bMacintosh\b/, 'Mac OS') + .replace(/_PowerPC\b/i, ' OS') + .replace(/\b(OS X) [^ \d]+/i, '$1') + .replace(/\bMac (OS X)\b/, '$1') + .replace(/\/(\d)/, ' $1') + .replace(/_/g, '.') + .replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, '') + .replace(/\bx86\.64\b/gi, 'x86_64') + .replace(/\b(Windows Phone) OS\b/, '$1') + .replace(/\b(Chrome OS \w+) [\d.]+\b/, '$1') + .split(' on ')[0] + ); + + return os; + } + + /** + * An iteration utility for arrays and objects. + * + * @private + * @param {Array|Object} object The object to iterate over. + * @param {Function} callback The function called per iteration. + */ + function each(object, callback) { + var index = -1, + length = object ? object.length : 0; + + if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { + while (++index < length) { + callback(object[index], index, object); + } + } else { + forOwn(object, callback); + } + } + + /** + * Trim and conditionally capitalize string values. + * + * @private + * @param {string} string The string to format. + * @returns {string} The formatted string. + */ + function format(string) { + string = trim(string); + return /^(?:webOS|i(?:OS|P))/.test(string) + ? string + : capitalize(string); + } + + /** + * Iterates over an object's own properties, executing the `callback` for each. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} callback The function executed per own property. + */ + function forOwn(object, callback) { + for (var key in object) { + if (hasOwnProperty.call(object, key)) { + callback(object[key], key, object); + } + } + } + + /** + * Gets the internal `[[Class]]` of a value. + * + * @private + * @param {*} value The value. + * @returns {string} The `[[Class]]`. + */ + function getClassOf(value) { + return value == null + ? capitalize(value) + : toString.call(value).slice(8, -1); + } + + /** + * Host objects can return type values that are different from their actual + * data type. The objects we are concerned with usually return non-primitive + * types of "object", "function", or "unknown". + * + * @private + * @param {*} object The owner of the property. + * @param {string} property The property to check. + * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. + */ + function isHostType(object, property) { + var type = object != null ? typeof object[property] : 'number'; + return !/^(?:boolean|number|string|undefined)$/.test(type) && + (type == 'object' ? !!object[property] : true); + } + + /** + * Prepares a string for use in a `RegExp` by making hyphens and spaces optional. + * + * @private + * @param {string} string The string to qualify. + * @returns {string} The qualified string. + */ + function qualify(string) { + return String(string).replace(/([ -])(?!$)/g, '$1?'); + } + + /** + * A bare-bones `Array#reduce` like utility function. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function called per iteration. + * @returns {*} The accumulated result. + */ + function reduce(array, callback) { + var accumulator = null; + each(array, function(value, index) { + accumulator = callback(accumulator, value, index, array); + }); + return accumulator; + } + + /** + * Removes leading and trailing whitespace from a string. + * + * @private + * @param {string} string The string to trim. + * @returns {string} The trimmed string. + */ + function trim(string) { + return String(string).replace(/^ +| +$/g, ''); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a new platform object. + * + * @memberOf platform + * @param {Object|string} [ua=navigator.userAgent] The user agent string or + * context object. + * @returns {Object} A platform object. + */ + function parse(ua) { + + /** The environment context object. */ + var context = root; + + /** Used to flag when a custom context is provided. */ + var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String'; + + // Juggle arguments. + if (isCustomContext) { + context = ua; + ua = null; + } + + /** Browser navigator object. */ + var nav = context.navigator || {}; + + /** Browser user agent string. */ + var userAgent = nav.userAgent || ''; + + ua || (ua = userAgent); + + /** Used to flag when `thisBinding` is the [ModuleScope]. */ + var isModuleScope = isCustomContext || thisBinding == oldRoot; + + /** Used to detect if browser is like Chrome. */ + var likeChrome = isCustomContext + ? !!nav.likeChrome + : /\bChrome\b/.test(ua) && !/internal|\n/i.test(toString.toString()); + + /** Internal `[[Class]]` value shortcuts. */ + var objectClass = 'Object', + airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject', + enviroClass = isCustomContext ? objectClass : 'Environment', + javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java), + phantomClass = isCustomContext ? objectClass : 'RuntimeObject'; + + /** Detect Java environments. */ + var java = /\bJava/.test(javaClass) && context.java; + + /** Detect Rhino. */ + var rhino = java && getClassOf(context.environment) == enviroClass; + + /** A character to represent alpha. */ + var alpha = java ? 'a' : '\u03b1'; + + /** A character to represent beta. */ + var beta = java ? 'b' : '\u03b2'; + + /** Browser document object. */ + var doc = context.document || {}; + + /** + * Detect Opera browser (Presto-based). + * http://www.howtocreate.co.uk/operaStuff/operaObject.html + * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini + */ + var opera = context.operamini || context.opera; + + /** Opera `[[Class]]`. */ + var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera)) + ? operaClass + : (opera = null); + + /*------------------------------------------------------------------------*/ + + /** Temporary variable used over the script's lifetime. */ + var data; + + /** The CPU architecture. */ + var arch = ua; + + /** Platform description array. */ + var description = []; + + /** Platform alpha/beta indicator. */ + var prerelease = null; + + /** A flag to indicate that environment features should be used to resolve the platform. */ + var useFeatures = ua == userAgent; + + /** The browser/environment version. */ + var version = useFeatures && opera && typeof opera.version == 'function' && opera.version(); + + /** A flag to indicate if the OS begins with "Name Version /". */ + var isSpecialCasedOS; + + /* Detectable layout engines (order is important). */ + var layout = getLayout([ + { 'label': 'EdgeHTML', 'pattern': 'Edge' }, + 'Trident', + { 'label': 'WebKit', 'pattern': 'AppleWebKit' }, + 'iCab', + 'Presto', + 'NetFront', + 'Tasman', + 'KHTML', + 'Gecko' + ]); + + /* Detectable browser names (order is important). */ + var name = getName([ + 'Adobe AIR', + 'Arora', + 'Avant Browser', + 'Breach', + 'Camino', + 'Epiphany', + 'Fennec', + 'Flock', + 'Galeon', + 'GreenBrowser', + 'iCab', + 'Iceweasel', + 'K-Meleon', + 'Konqueror', + 'Lunascape', + 'Maxthon', + { 'label': 'Microsoft Edge', 'pattern': 'Edge' }, + 'Midori', + 'Nook Browser', + 'PaleMoon', + 'PhantomJS', + 'Raven', + 'Rekonq', + 'RockMelt', + 'SeaMonkey', + { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, + 'Sleipnir', + 'SlimBrowser', + { 'label': 'SRWare Iron', 'pattern': 'Iron' }, + 'Sunrise', + 'Swiftfox', + 'WebPositive', + 'Opera Mini', + { 'label': 'Opera Mini', 'pattern': 'OPiOS' }, + 'Opera', + { 'label': 'Opera', 'pattern': 'OPR' }, + 'Chrome', + { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' }, + { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' }, + { 'label': 'Firefox Mobile', 'pattern': 'FxiOS' }, + { 'label': 'IE', 'pattern': 'IEMobile' }, + { 'label': 'IE', 'pattern': 'MSIE' }, + 'Safari' + ]); + + /* Detectable products (order is important). */ + var product = getProduct([ + { 'label': 'BlackBerry', 'pattern': 'BB10' }, + 'BlackBerry', + { 'label': 'Galaxy S', 'pattern': 'GT-I9000' }, + { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' }, + { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' }, + { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' }, + 'Google TV', + 'Lumia', + 'iPad', + 'iPod', + 'iPhone', + 'Kindle', + { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, + 'Nexus', + 'Nook', + 'PlayBook', + 'PlayStation 3', + 'PlayStation 4', + 'PlayStation Vita', + 'TouchPad', + 'Transformer', + { 'label': 'Wii U', 'pattern': 'WiiU' }, + 'Wii', + 'Xbox One', + { 'label': 'Xbox 360', 'pattern': 'Xbox' }, + 'Xoom' + ]); + + /* Detectable manufacturers. */ + var manufacturer = getManufacturer({ + 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 }, + 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 }, + 'Asus': { 'Transformer': 1 }, + 'Barnes & Noble': { 'Nook': 1 }, + 'BlackBerry': { 'PlayBook': 1 }, + 'Google': { 'Google TV': 1, 'Nexus': 1 }, + 'HP': { 'TouchPad': 1 }, + 'HTC': {}, + 'LG': {}, + 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 }, + 'Motorola': { 'Xoom': 1 }, + 'Nintendo': { 'Wii U': 1, 'Wii': 1 }, + 'Nokia': { 'Lumia': 1 }, + 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 }, + 'Sony': { 'PlayStation 4': 1, 'PlayStation 3': 1, 'PlayStation Vita': 1 } + }); + + /* Detectable operating systems (order is important). */ + var os = getOS([ + 'Windows Phone ', + 'Android', + 'CentOS', + { 'label': 'Chrome OS', 'pattern': 'CrOS' }, + 'Debian', + 'Fedora', + 'FreeBSD', + 'Gentoo', + 'Haiku', + 'Kubuntu', + 'Linux Mint', + 'OpenBSD', + 'Red Hat', + 'SuSE', + 'Ubuntu', + 'Xubuntu', + 'Cygwin', + 'Symbian OS', + 'hpwOS', + 'webOS ', + 'webOS', + 'Tablet OS', + 'Linux', + 'Mac OS X', + 'Macintosh', + 'Mac', + 'Windows 98;', + 'Windows ' + ]); + + /*------------------------------------------------------------------------*/ + + /** + * Picks the layout engine from an array of guesses. + * + * @private + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected layout engine. + */ + function getLayout(guesses) { + return reduce(guesses, function(result, guess) { + return result || RegExp('\\b' + ( + guess.pattern || qualify(guess) + ) + '\\b', 'i').exec(ua) && (guess.label || guess); + }); + } + + /** + * Picks the manufacturer from an array of guesses. + * + * @private + * @param {Array} guesses An object of guesses. + * @returns {null|string} The detected manufacturer. + */ + function getManufacturer(guesses) { + return reduce(guesses, function(result, value, key) { + // Lookup the manufacturer by product or scan the UA for the manufacturer. + return result || ( + value[product] || + value[/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] || + RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua) + ) && key; + }); + } + + /** + * Picks the browser name from an array of guesses. + * + * @private + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected browser name. + */ + function getName(guesses) { + return reduce(guesses, function(result, guess) { + return result || RegExp('\\b' + ( + guess.pattern || qualify(guess) + ) + '\\b', 'i').exec(ua) && (guess.label || guess); + }); + } + + /** + * Picks the OS name from an array of guesses. + * + * @private + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected OS name. + */ + function getOS(guesses) { + return reduce(guesses, function(result, guess) { + var pattern = guess.pattern || qualify(guess); + if (!result && (result = + RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua) + )) { + result = cleanupOS(result, pattern, guess.label || guess); + } + return result; + }); + } + + /** + * Picks the product name from an array of guesses. + * + * @private + * @param {Array} guesses An array of guesses. + * @returns {null|string} The detected product name. + */ + function getProduct(guesses) { + return reduce(guesses, function(result, guess) { + var pattern = guess.pattern || qualify(guess); + if (!result && (result = + RegExp('\\b' + pattern + ' *\\d+[.\\w_]*', 'i').exec(ua) || + RegExp('\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)', 'i').exec(ua) + )) { + // Split by forward slash and append product version if needed. + if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\d.]+/.test(result[0])) { + result[0] += ' ' + result[1]; + } + // Correct character case and cleanup string. + guess = guess.label || guess; + result = format(result[0] + .replace(RegExp(pattern, 'i'), guess) + .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ') + .replace(RegExp('(' + guess + ')[-_.]?(\\w)', 'i'), '$1 $2')); + } + return result; + }); + } + + /** + * Resolves the version using an array of UA patterns. + * + * @private + * @param {Array} patterns An array of UA patterns. + * @returns {null|string} The detected version. + */ + function getVersion(patterns) { + return reduce(patterns, function(result, pattern) { + return result || (RegExp(pattern + + '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null; + }); + } + + /** + * Returns `platform.description` when the platform object is coerced to a string. + * + * @name toString + * @memberOf platform + * @returns {string} Returns `platform.description` if available, else an empty string. + */ + function toStringPlatform() { + return this.description || ''; + } + + /*------------------------------------------------------------------------*/ + + // Convert layout to an array so we can add extra details. + layout && (layout = [layout]); + + // Detect product names that contain their manufacturer's name. + if (manufacturer && !product) { + product = getProduct([manufacturer]); + } + // Clean up Google TV. + if ((data = /\bGoogle TV\b/.exec(product))) { + product = data[0]; + } + // Detect simulators. + if (/\bSimulator\b/i.test(ua)) { + product = (product ? product + ' ' : '') + 'Simulator'; + } + // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS. + if (name == 'Opera Mini' && /\bOPiOS\b/.test(ua)) { + description.push('running in Turbo/Uncompressed mode'); + } + // Detect iOS. + if (/^iP/.test(product)) { + name || (name = 'Safari'); + os = 'iOS' + ((data = / OS ([\d_]+)/i.exec(ua)) + ? ' ' + data[1].replace(/_/g, '.') + : ''); + } + // Detect Kubuntu. + else if (name == 'Konqueror' && !/buntu/i.test(os)) { + os = 'Kubuntu'; + } + // Detect Android browsers. + else if (manufacturer && manufacturer != 'Google' && + ((/Chrome/.test(name) && !/\bMobile Safari\b/i.test(ua)) || /\bVita\b/.test(product))) { + name = 'Android Browser'; + os = /\bAndroid\b/.test(os) ? os : 'Android'; + } + // Detect Silk desktop/accelerated modes. + else if (name == 'Silk') { + if (!/\bMobi/i.test(ua)) { + os = 'Android'; + description.unshift('desktop mode'); + } + if (/Accelerated *= *true/i.test(ua)) { + description.unshift('accelerated'); + } + } + // Detect PaleMoon identifying as Firefox. + else if (name == 'PaleMoon' && (data = /\bFirefox\/([\d.]+)\b/.exec(ua))) { + description.push('identifying as Firefox ' + data[1]); + } + // Detect Firefox OS and products running Firefox. + else if (name == 'Firefox' && (data = /\b(Mobile|Tablet|TV)\b/i.exec(ua))) { + os || (os = 'Firefox OS'); + product || (product = data[1]); + } + // Detect false positives for Firefox/Safari. + else if (!name || (data = !/\bMinefield\b/i.test(ua) && /\b(?:Firefox|Safari)\b/.exec(name))) { + // Escape the `/` for Firefox 1. + if (name && !product && /[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) { + // Clear name of false positives. + name = null; + } + // Reassign a generic name. + if ((data = product || manufacturer || os) && + (product || manufacturer || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))) { + name = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os) ? os : data) + ' Browser'; + } + } + // Detect non-Opera (Presto-based) versions (order is important). + if (!version) { + version = getVersion([ + '(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))', + 'Version', + qualify(name), + '(?:Firefox|Minefield|NetFront)' + ]); + } + // Detect stubborn layout engines. + if ((data = + layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' || + /\bOpera\b/.test(name) && (/\bOPR\b/.test(ua) ? 'Blink' : 'Presto') || + /\b(?:Midori|Nook|Safari)\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' || + !layout && /\bMSIE\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') || + layout == 'WebKit' && /\bPlayStation\b(?! Vita\b)/i.test(name) && 'NetFront' + )) { + layout = [data]; + } + // Detect Windows Phone 7 desktop mode. + if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) { + name += ' Mobile'; + os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x'); + description.unshift('desktop mode'); + } + // Detect Windows Phone 8.x desktop mode. + else if (/\bWPDesktop\b/i.test(ua)) { + name = 'IE Mobile'; + os = 'Windows Phone 8.x'; + description.unshift('desktop mode'); + version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); + } + // Detect IE 11. + else if (name != 'IE' && layout == 'Trident' && (data = /\brv:([\d.]+)/.exec(ua))) { + if (name) { + description.push('identifying as ' + name + (version ? ' ' + version : '')); + } + name = 'IE'; + version = data[1]; + } + // Leverage environment features. + if (useFeatures) { + // Detect server-side environments. + // Rhino has a global function while others have a global object. + if (isHostType(context, 'global')) { + if (java) { + data = java.lang.System; + arch = data.getProperty('os.arch'); + os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version'); + } + if (isModuleScope && isHostType(context, 'system') && (data = [context.system])[0]) { + os || (os = data[0].os || null); + try { + data[1] = context.require('ringo/engine').version; + version = data[1].join('.'); + name = 'RingoJS'; + } catch(e) { + if (data[0].global.system == context.system) { + name = 'Narwhal'; + } + } + } + else if (typeof context.process == 'object' && (data = context.process)) { + name = 'Node.js'; + arch = data.arch; + os = data.platform; + version = /[\d.]+/.exec(data.version)[0]; + } + else if (rhino) { + name = 'Rhino'; + } + } + // Detect Adobe AIR. + else if (getClassOf((data = context.runtime)) == airRuntimeClass) { + name = 'Adobe AIR'; + os = data.flash.system.Capabilities.os; + } + // Detect PhantomJS. + else if (getClassOf((data = context.phantom)) == phantomClass) { + name = 'PhantomJS'; + version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch); + } + // Detect IE compatibility modes. + else if (typeof doc.documentMode == 'number' && (data = /\bTrident\/(\d+)/i.exec(ua))) { + // We're in compatibility mode when the Trident version + 4 doesn't + // equal the document mode. + version = [version, doc.documentMode]; + if ((data = +data[1] + 4) != version[1]) { + description.push('IE ' + version[1] + ' mode'); + layout && (layout[1] = ''); + version[1] = data; + } + version = name == 'IE' ? String(version[1].toFixed(1)) : version[0]; + } + os = os && format(os); + } + // Detect prerelease phases. + if (version && (data = + /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version) || + /(?:alpha|beta)(?: ?\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) || + /\bMinefield\b/i.test(ua) && 'a' + )) { + prerelease = /b/i.test(data) ? 'beta' : 'alpha'; + version = version.replace(RegExp(data + '\\+?$'), '') + + (prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || ''); + } + // Detect Firefox Mobile. + if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS)\b/.test(os)) { + name = 'Firefox Mobile'; + } + // Obscure Maxthon's unreliable version. + else if (name == 'Maxthon' && version) { + version = version.replace(/\.[\d.]+/, '.x'); + } + // Detect Xbox 360 and Xbox One. + else if (/\bXbox\b/i.test(product)) { + os = null; + if (product == 'Xbox 360' && /\bIEMobile\b/.test(ua)) { + description.unshift('mobile mode'); + } + } + // Add mobile postfix. + else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) && + (os == 'Windows CE' || /Mobi/i.test(ua))) { + name += ' Mobile'; + } + // Detect IE platform preview. + else if (name == 'IE' && useFeatures && context.external === null) { + description.unshift('platform preview'); + } + // Detect BlackBerry OS version. + // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp + else if ((/\bBlackBerry\b/.test(product) || /\bBB10\b/.test(ua)) && (data = + (RegExp(product.replace(/ +/g, ' *') + '/([.\\d]+)', 'i').exec(ua) || 0)[1] || + version + )) { + data = [data, /BB10/.test(ua)]; + os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0]; + version = null; + } + // Detect Opera identifying/masking itself as another browser. + // http://www.opera.com/support/kb/view/843/ + else if (this != forOwn && product != 'Wii' && ( + (useFeatures && opera) || + (/Opera/.test(name) && /\b(?:MSIE|Firefox)\b/i.test(ua)) || + (name == 'Firefox' && /\bOS X (?:\d+\.){2,}/.test(os)) || + (name == 'IE' && ( + (os && !/^Win/.test(os) && version > 5.5) || + /\bWindows XP\b/.test(os) && version > 8 || + version == 8 && !/\bTrident\b/.test(ua) + )) + ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) { + // When "identifying", the UA contains both Opera and the other browser's name. + data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : ''); + if (reOpera.test(name)) { + if (/\bIE\b/.test(data) && os == 'Mac OS') { + os = null; + } + data = 'identify' + data; + } + // When "masking", the UA contains only the other browser's name. + else { + data = 'mask' + data; + if (operaClass) { + name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2')); + } else { + name = 'Opera'; + } + if (/\bIE\b/.test(data)) { + os = null; + } + if (!useFeatures) { + version = null; + } + } + layout = ['Presto']; + description.push(data); + } + // Detect WebKit Nightly and approximate Chrome/Safari versions. + if ((data = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { + // Correct build number for numeric comparison. + // (e.g. "532.5" becomes "532.05") + data = [parseFloat(data.replace(/\.(\d)$/, '.0$1')), data]; + // Nightly builds are postfixed with a "+". + if (name == 'Safari' && data[1].slice(-1) == '+') { + name = 'WebKit Nightly'; + prerelease = 'alpha'; + version = data[1].slice(0, -1); + } + // Clear incorrect browser versions. + else if (version == data[1] || + version == (data[2] = (/\bSafari\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { + version = null; + } + // Use the full Chrome version when available. + data[1] = (/\bChrome\/([\d.]+)/i.exec(ua) || 0)[1]; + // Detect Blink layout engine. + if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') { + layout = ['Blink']; + } + // Detect JavaScriptCore. + // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi + if (!useFeatures || (!likeChrome && !data[1])) { + layout && (layout[1] = 'like Safari'); + data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8'); + } else { + layout && (layout[1] = 'like Chrome'); + data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28'); + } + // Add the postfix of ".x" or "+" for approximate versions. + layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+')); + // Obscure version for some Safari 1-2 releases. + if (name == 'Safari' && (!version || parseInt(version) > 45)) { + version = data; + } + } + // Detect Opera desktop modes. + if (name == 'Opera' && (data = /\bzbov|zvav$/.exec(os))) { + name += ' '; + description.unshift('desktop mode'); + if (data == 'zvav') { + name += 'Mini'; + version = null; + } else { + name += 'Mobile'; + } + os = os.replace(RegExp(' *' + data + '$'), ''); + } + // Detect Chrome desktop mode. + else if (name == 'Safari' && /\bChrome\b/.exec(layout && layout[1])) { + description.unshift('desktop mode'); + name = 'Chrome Mobile'; + version = null; + + if (/\bOS X\b/.test(os)) { + manufacturer = 'Apple'; + os = 'iOS 4.3+'; + } else { + os = null; + } + } + // Strip incorrect OS versions. + if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 && + ua.indexOf('/' + data + '-') > -1) { + os = trim(os.replace(data, '')); + } + // Add layout engine. + if (layout && !/\b(?:Avant|Nook)\b/.test(name) && ( + /Browser|Lunascape|Maxthon/.test(name) || + name != 'Safari' && /^iOS/.test(os) && /\bSafari\b/.test(layout[1]) || + /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(name) && layout[1])) { + // Don't add layout details to description if they are falsey. + (data = layout[layout.length - 1]) && description.push(data); + } + // Combine contextual information. + if (description.length) { + description = ['(' + description.join('; ') + ')']; + } + // Append manufacturer to description. + if (manufacturer && product && product.indexOf(manufacturer) < 0) { + description.push('on ' + manufacturer); + } + // Append product to description. + if (product) { + description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product); + } + // Parse the OS into an object. + if (os) { + data = + / ([\d.+]+)$/.exec(os) || + (isSpecialCasedOS = /^[a-z]+ ([\d.+]+) \//i.exec(os)); + os = { + 'architecture': 32, + 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os, + 'version': data ? data[1] : null, + 'toString': function() { + var version = this.version; + return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : ''); + } + }; + } + // Add browser/OS architecture. + if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) { + if (os) { + os.architecture = 64; + os.family = os.family.replace(RegExp(' *' + data), ''); + } + if ( + name && (/\bWOW64\b/i.test(ua) || + (useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\bWin64; x64\b/i.test(ua))) + ) { + description.unshift('32-bit'); + } + } + + ua || (ua = null); + + /*------------------------------------------------------------------------*/ + + /** + * The platform object. + * + * @name platform + * @type Object + */ + var platform = {}; + + /** + * The platform description. + * + * @memberOf platform + * @type string|null + */ + platform.description = ua; + + /** + * The name of the browser's layout engine. + * + * @memberOf platform + * @type string|null + */ + platform.layout = layout && layout[0]; + + /** + * The name of the product's manufacturer. + * + * @memberOf platform + * @type string|null + */ + platform.manufacturer = manufacturer; + + /** + * The name of the browser/environment. + * + * @memberOf platform + * @type string|null + */ + platform.name = name; + + /** + * The alpha/beta release indicator. + * + * @memberOf platform + * @type string|null + */ + platform.prerelease = prerelease; + + /** + * The name of the product hosting the browser. + * + * @memberOf platform + * @type string|null + */ + platform.product = product; + + /** + * The browser's user agent string. + * + * @memberOf platform + * @type string|null + */ + platform.ua = ua; + + /** + * The browser/environment version. + * + * @memberOf platform + * @type string|null + */ + platform.version = name && version; + + /** + * The name of the operating system. + * + * @memberOf platform + * @type Object + */ + platform.os = os || { + + /** + * The CPU architecture the OS is built for. + * + * @memberOf platform.os + * @type number|null + */ + 'architecture': null, + + /** + * The family of the OS. + * + * Common values include: + * "Windows", "Windows 7 / Server 2008 R2", "Windows Vista / Server 2008", + * "Windows XP", "OS X", "Ubuntu", "Debian", "Fedora", "Red Hat", "SuSE", + * "Android", "iOS" and "Windows Phone" + * + * @memberOf platform.os + * @type string|null + */ + 'family': null, + + /** + * The version of the OS. + * + * @memberOf platform.os + * @type string|null + */ + 'version': null, + + /** + * Returns the OS string. + * + * @memberOf platform.os + * @returns {string} The OS string. + */ + 'toString': function() { return 'null'; } + }; + + platform.parse = parse; + platform.toString = toStringPlatform; + + if (platform.version) { + description.unshift(version); + } + if (platform.name) { + description.unshift(name); + } + if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) { + description.push(product ? '(' + os + ')' : 'on ' + os); + } + if (description.length) { + platform.description = description.join(' '); + } + return platform; + } + + /*--------------------------------------------------------------------------*/ + + // Export platform. + // Some AMD build optimizers, like r.js, check for condition patterns like the following: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Define as an anonymous module so platform can be aliased through path mapping. + define(function() { + return parse(); + }); + } + // Check for `exports` after `define` in case a build optimizer adds an `exports` object. + else if (freeExports && freeModule) { + // Export for CommonJS support. + forOwn(parse(), function(value, key) { + freeExports[key] = value; + }); + } + else { + // Export to the global object. + root.platform = parse(); + } +}.call(this)); diff --git a/Server/www/spiderbasic/preloadjs.min.js b/Server/www/spiderbasic/preloadjs.min.js new file mode 100644 index 0000000..83c5a92 --- /dev/null +++ b/Server/www/spiderbasic/preloadjs.min.js @@ -0,0 +1,13 @@ +/*! +* @license PreloadJS +* Visit http://createjs.com/ for documentation, updates and examples. +* +* Copyright (c) 2011-2015 gskinner.com, inc. +* +* Distributed under the terms of the MIT license. +* http://www.opensource.org/licenses/mit-license.html +* +* This notice shall be included in all copies or substantial portions of the Software. +*/ +this.createjs=this.createjs||{},function(){"use strict";var a=createjs.PreloadJS=createjs.PreloadJS||{};a.version="0.6.2",a.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.extend=function(a,b){"use strict";function c(){this.constructor=a}return c.prototype=b.prototype,a.prototype=new c},this.createjs=this.createjs||{},createjs.promote=function(a,b){"use strict";var c=a.prototype,d=Object.getPrototypeOf&&Object.getPrototypeOf(c)||c.__proto__;if(d){c[(b+="_")+"constructor"]=d.constructor;for(var e in d)c.hasOwnProperty(e)&&"function"==typeof d[e]&&(c[b+e]=d[e])}return a},this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,Array.prototype.slice.call(arguments,0).concat(c))}}}(),this.createjs=this.createjs||{},createjs.indexOf=function(a,b){"use strict";for(var c=0,d=a.length;d>c;c++)if(b===a[c])return c;return-1},this.createjs=this.createjs||{},function(){"use strict";function Event(a,b,c){this.type=a,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!b,this.cancelable=!!c,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var a=Event.prototype;a.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},a.stopPropagation=function(){this.propagationStopped=!0},a.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},a.remove=function(){this.removed=!0},a.clone=function(){return new Event(this.type,this.bubbles,this.cancelable)},a.set=function(a){for(var b in a)this[b]=a[b];return this},a.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=Event}(),this.createjs=this.createjs||{},function(){"use strict";function ErrorEvent(a,b,c){this.Event_constructor("error"),this.title=a,this.message=b,this.data=c}var a=createjs.extend(ErrorEvent,createjs.Event);a.clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(ErrorEvent,"Event")}(),this.createjs=this.createjs||{},function(){"use strict";function EventDispatcher(){this._listeners=null,this._captureListeners=null}var a=EventDispatcher.prototype;EventDispatcher.initialize=function(b){b.addEventListener=a.addEventListener,b.on=a.on,b.removeEventListener=b.off=a.removeEventListener,b.removeAllEventListeners=a.removeAllEventListeners,b.hasEventListener=a.hasEventListener,b.dispatchEvent=a.dispatchEvent,b._dispatchEvent=a._dispatchEvent,b.willTrigger=a.willTrigger},a.addEventListener=function(a,b,c){var d;d=c?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var e=d[a];return e&&this.removeEventListener(a,b,c),e=d[a],e?e.push(b):d[a]=[b],b},a.on=function(a,b,c,d,e,f){return b.handleEvent&&(c=c||b,b=b.handleEvent),c=c||this,this.addEventListener(a,function(a){b.call(c,a,e),d&&a.remove()},f)},a.removeEventListener=function(a,b,c){var d=c?this._captureListeners:this._listeners;if(d){var e=d[a];if(e)for(var f=0,g=e.length;g>f;f++)if(e[f]==b){1==g?delete d[a]:e.splice(f,1);break}}},a.off=a.removeEventListener,a.removeAllEventListeners=function(a){a?(this._listeners&&delete this._listeners[a],this._captureListeners&&delete this._captureListeners[a]):this._listeners=this._captureListeners=null},a.dispatchEvent=function(a,b,c){if("string"==typeof a){var d=this._listeners;if(!(b||d&&d[a]))return!0;a=new createjs.Event(a,b,c)}else a.target&&a.clone&&(a=a.clone());try{a.target=this}catch(e){}if(a.bubbles&&this.parent){for(var f=this,g=[f];f.parent;)g.push(f=f.parent);var h,i=g.length;for(h=i-1;h>=0&&!a.propagationStopped;h--)g[h]._dispatchEvent(a,1+(0==h));for(h=1;i>h&&!a.propagationStopped;h++)g[h]._dispatchEvent(a,3)}else this._dispatchEvent(a,2);return!a.defaultPrevented},a.hasEventListener=function(a){var b=this._listeners,c=this._captureListeners;return!!(b&&b[a]||c&&c[a])},a.willTrigger=function(a){for(var b=this;b;){if(b.hasEventListener(a))return!0;b=b.parent}return!1},a.toString=function(){return"[EventDispatcher]"},a._dispatchEvent=function(a,b){var c,d=1==b?this._captureListeners:this._listeners;if(a&&d){var e=d[a.type];if(!e||!(c=e.length))return;try{a.currentTarget=this}catch(f){}try{a.eventPhase=b}catch(f){}a.removed=!1,e=e.slice();for(var g=0;c>g&&!a.immediatePropagationStopped;g++){var h=e[g];h.handleEvent?h.handleEvent(a):h(a),a.removed&&(this.off(a.type,h,1==b),a.removed=!1)}}},createjs.EventDispatcher=EventDispatcher}(),this.createjs=this.createjs||{},function(){"use strict";function ProgressEvent(a,b){this.Event_constructor("progress"),this.loaded=a,this.total=null==b?1:b,this.progress=0==b?0:this.loaded/this.total}var a=createjs.extend(ProgressEvent,createjs.Event);a.clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(ProgressEvent,"Event")}(window),function(){function a(b,d){function f(a){if(f[a]!==q)return f[a];var b;if("bug-string-char-index"==a)b="a"!="a"[0];else if("json"==a)b=f("json-stringify")&&f("json-parse");else{var c,e='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==a){var i=d.stringify,k="function"==typeof i&&t;if(k){(c=function(){return 1}).toJSON=c;try{k="0"===i(0)&&"0"===i(new g)&&'""'==i(new h)&&i(s)===q&&i(q)===q&&i()===q&&"1"===i(c)&&"[1]"==i([c])&&"[null]"==i([q])&&"null"==i(null)&&"[null,null,null]"==i([q,s,null])&&i({a:[c,!0,!1,null,"\x00\b\n\f\r "]})==e&&"1"===i(null,c)&&"[\n 1,\n 2\n]"==i([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==i(new j(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==i(new j(864e13))&&'"-000001-01-01T00:00:00.000Z"'==i(new j(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==i(new j(-1))}catch(l){k=!1}}b=k}if("json-parse"==a){var m=d.parse;if("function"==typeof m)try{if(0===m("0")&&!m(!1)){c=m(e);var n=5==c.a.length&&1===c.a[0];if(n){try{n=!m('" "')}catch(l){}if(n)try{n=1!==m("01")}catch(l){}if(n)try{n=1!==m("1.")}catch(l){}}}}catch(l){n=!1}b=n}}return f[a]=!!b}b||(b=e.Object()),d||(d=e.Object());var g=b.Number||e.Number,h=b.String||e.String,i=b.Object||e.Object,j=b.Date||e.Date,k=b.SyntaxError||e.SyntaxError,l=b.TypeError||e.TypeError,m=b.Math||e.Math,n=b.JSON||e.JSON;"object"==typeof n&&n&&(d.stringify=n.stringify,d.parse=n.parse);var o,p,q,r=i.prototype,s=r.toString,t=new j(-0xc782b5b800cec);try{t=-109252==t.getUTCFullYear()&&0===t.getUTCMonth()&&1===t.getUTCDate()&&10==t.getUTCHours()&&37==t.getUTCMinutes()&&6==t.getUTCSeconds()&&708==t.getUTCMilliseconds()}catch(u){}if(!f("json")){var v="[object Function]",w="[object Date]",x="[object Number]",y="[object String]",z="[object Array]",A="[object Boolean]",B=f("bug-string-char-index");if(!t)var C=m.floor,D=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(a,b){return D[b]+365*(a-1970)+C((a-1969+(b=+(b>1)))/4)-C((a-1901+b)/100)+C((a-1601+b)/400)};if((o=r.hasOwnProperty)||(o=function(a){var b,c={};return(c.__proto__=null,c.__proto__={toString:1},c).toString!=s?o=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);return this.__proto__=b,c}:(b=c.constructor,o=function(a){var c=(this.constructor||b).prototype;return a in this&&!(a in c&&this[a]===c[a])}),c=null,o.call(this,a)}),p=function(a,b){var d,e,f,g=0;(d=function(){this.valueOf=0}).prototype.valueOf=0,e=new d;for(f in e)o.call(e,f)&&g++;return d=e=null,g?p=2==g?function(a,b){var c,d={},e=s.call(a)==v;for(c in a)e&&"prototype"==c||o.call(d,c)||!(d[c]=1)||!o.call(a,c)||b(c)}:function(a,b){var c,d,e=s.call(a)==v;for(c in a)e&&"prototype"==c||!o.call(a,c)||(d="constructor"===c)||b(c);(d||o.call(a,c="constructor"))&&b(c)}:(e=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(a,b){var d,f,g=s.call(a)==v,h=!g&&"function"!=typeof a.constructor&&c[typeof a.hasOwnProperty]&&a.hasOwnProperty||o;for(d in a)g&&"prototype"==d||!h.call(a,d)||b(d);for(f=e.length;d=e[--f];h.call(a,d)&&b(d));}),p(a,b)},!f("json-stringify")){var F={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},G="000000",H=function(a,b){return(G+(b||0)).slice(-a)},I="\\u00",J=function(a){for(var b='"',c=0,d=a.length,e=!B||d>10,f=e&&(B?a.split(""):a);d>c;c++){var g=a.charCodeAt(c);switch(g){case 8:case 9:case 10:case 12:case 13:case 34:case 92:b+=F[g];break;default:if(32>g){b+=I+H(2,g.toString(16));break}b+=e?f[c]:a.charAt(c)}}return b+'"'},K=function(a,b,c,d,e,f,g){var h,i,j,k,m,n,r,t,u,v,B,D,F,G,I,L;try{h=b[a]}catch(M){}if("object"==typeof h&&h)if(i=s.call(h),i!=w||o.call(h,"toJSON"))"function"==typeof h.toJSON&&(i!=x&&i!=y&&i!=z||o.call(h,"toJSON"))&&(h=h.toJSON(a));else if(h>-1/0&&1/0>h){if(E){for(m=C(h/864e5),j=C(m/365.2425)+1970-1;E(j+1,0)<=m;j++);for(k=C((m-E(j,0))/30.42);E(j,k+1)<=m;k++);m=1+m-E(j,k),n=(h%864e5+864e5)%864e5,r=C(n/36e5)%24,t=C(n/6e4)%60,u=C(n/1e3)%60,v=n%1e3}else j=h.getUTCFullYear(),k=h.getUTCMonth(),m=h.getUTCDate(),r=h.getUTCHours(),t=h.getUTCMinutes(),u=h.getUTCSeconds(),v=h.getUTCMilliseconds();h=(0>=j||j>=1e4?(0>j?"-":"+")+H(6,0>j?-j:j):H(4,j))+"-"+H(2,k+1)+"-"+H(2,m)+"T"+H(2,r)+":"+H(2,t)+":"+H(2,u)+"."+H(3,v)+"Z"}else h=null;if(c&&(h=c.call(b,a,h)),null===h)return"null";if(i=s.call(h),i==A)return""+h;if(i==x)return h>-1/0&&1/0>h?""+h:"null";if(i==y)return J(""+h);if("object"==typeof h){for(G=g.length;G--;)if(g[G]===h)throw l();if(g.push(h),B=[],I=f,f+=e,i==z){for(F=0,G=h.length;G>F;F++)D=K(F,h,c,d,e,f,g),B.push(D===q?"null":D);L=B.length?e?"[\n"+f+B.join(",\n"+f)+"\n"+I+"]":"["+B.join(",")+"]":"[]"}else p(d||h,function(a){var b=K(a,h,c,d,e,f,g);b!==q&&B.push(J(a)+":"+(e?" ":"")+b)}),L=B.length?e?"{\n"+f+B.join(",\n"+f)+"\n"+I+"}":"{"+B.join(",")+"}":"{}";return g.pop(),L}};d.stringify=function(a,b,d){var e,f,g,h;if(c[typeof b]&&b)if((h=s.call(b))==v)f=b;else if(h==z){g={};for(var i,j=0,k=b.length;k>j;i=b[j++],h=s.call(i),(h==y||h==x)&&(g[i]=1));}if(d)if((h=s.call(d))==x){if((d-=d%1)>0)for(e="",d>10&&(d=10);e.lengthL;)switch(e=f.charCodeAt(L)){case 9:case 10:case 13:case 32:L++;break;case 123:case 125:case 91:case 93:case 58:case 44:return a=B?f.charAt(L):f[L],L++,a;case 34:for(a="@",L++;g>L;)if(e=f.charCodeAt(L),32>e)P();else if(92==e)switch(e=f.charCodeAt(++L)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:a+=O[e],L++;break;case 117:for(b=++L,c=L+4;c>L;L++)e=f.charCodeAt(L),e>=48&&57>=e||e>=97&&102>=e||e>=65&&70>=e||P();a+=N("0x"+f.slice(b,L));break;default:P()}else{if(34==e)break;for(e=f.charCodeAt(L),b=L;e>=32&&92!=e&&34!=e;)e=f.charCodeAt(++L);a+=f.slice(b,L)}if(34==f.charCodeAt(L))return L++,a;P();default:if(b=L,45==e&&(d=!0,e=f.charCodeAt(++L)),e>=48&&57>=e){for(48==e&&(e=f.charCodeAt(L+1),e>=48&&57>=e)&&P(),d=!1;g>L&&(e=f.charCodeAt(L),e>=48&&57>=e);L++);if(46==f.charCodeAt(L)){for(c=++L;g>c&&(e=f.charCodeAt(c),e>=48&&57>=e);c++);c==L&&P(),L=c}if(e=f.charCodeAt(L),101==e||69==e){for(e=f.charCodeAt(++L),(43==e||45==e)&&L++,c=L;g>c&&(e=f.charCodeAt(c),e>=48&&57>=e);c++);c==L&&P(),L=c}return+f.slice(b,L)}if(d&&P(),"true"==f.slice(L,L+4))return L+=4,!0;if("false"==f.slice(L,L+5))return L+=5,!1;if("null"==f.slice(L,L+4))return L+=4,null;P()}return"$"},R=function(a){var b,c;if("$"==a&&P(),"string"==typeof a){if("@"==(B?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(b=[];a=Q(),"]"!=a;c||(c=!0))c&&(","==a?(a=Q(),"]"==a&&P()):P()),","==a&&P(),b.push(R(a));return b}if("{"==a){for(b={};a=Q(),"}"!=a;c||(c=!0))c&&(","==a?(a=Q(),"}"==a&&P()):P()),(","==a||"string"!=typeof a||"@"!=(B?a.charAt(0):a[0])||":"!=Q())&&P(),b[a.slice(1)]=R(Q());return b}P()}return a},S=function(a,b,c){var d=T(a,b,c);d===q?delete a[b]:a[b]=d},T=function(a,b,c){var d,e=a[b];if("object"==typeof e&&e)if(s.call(e)==z)for(d=e.length;d--;)S(e,d,c);else p(e,function(a){S(e,a,c)});return c.call(a,b,e)};d.parse=function(a,b){var c,d;return L=0,M=""+a,c=R(Q()),"$"!=Q()&&P(),L=M=null,b&&s.call(b)==v?T((d={},d[""]=c,d),"",b):c}}}return d.runInContext=a,d}var b="function"==typeof define&&define.amd,c={"function":!0,object:!0},d=c[typeof exports]&&exports&&!exports.nodeType&&exports,e=c[typeof window]&&window||this,f=d&&c[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!f||f.global!==f&&f.window!==f&&f.self!==f||(e=f),d&&!b)a(e,d);else{var g=e.JSON,h=e.JSON3,i=!1,j=a(e,e.JSON3={noConflict:function(){return i||(i=!0,e.JSON=g,e.JSON3=h,g=h=null),j}});e.JSON={parse:j.parse,stringify:j.stringify}}b&&define(function(){return j})}.call(this),function(){var a={};a.appendToHead=function(b){a.getHead().appendChild(b)},a.getHead=function(){return document.head||document.getElementsByTagName("head")[0]},a.getBody=function(){return document.body||document.getElementsByTagName("body")[0]},createjs.DomUtils=a}(),function(){var a={};a.parseXML=function(a,b){var c=null;try{if(window.DOMParser){var d=new DOMParser;c=d.parseFromString(a,b)}}catch(e){}if(!c)try{c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(a)}catch(e){c=null}return c},a.parseJSON=function(a){if(null==a)return null;try{return JSON.parse(a)}catch(b){throw b}},createjs.DataUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function LoadItem(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.LoadItem.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=b.LOAD_TIMEOUT_DEFAULT}var a=LoadItem.prototype={},b=LoadItem;b.LOAD_TIMEOUT_DEFAULT=8e3,b.create=function(a){if("string"==typeof a){var c=new LoadItem;return c.src=a,c}if(a instanceof b)return a;if(a instanceof Object&&a.src)return null==a.loadTimeout&&(a.loadTimeout=b.LOAD_TIMEOUT_DEFAULT),a;throw new Error("Type not recognized.")},a.set=function(a){for(var b in a)this[b]=a[b];return this},createjs.LoadItem=b}(),function(){var a={};a.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,a.RELATIVE_PATT=/^[.\/]*?\//i,a.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,a.parseURI=function(b){var c={absolute:!1,relative:!1};if(null==b)return c;var d=b.indexOf("?");d>-1&&(b=b.substr(0,d));var e;return a.ABSOLUTE_PATT.test(b)?c.absolute=!0:a.RELATIVE_PATT.test(b)&&(c.relative=!0),(e=b.match(a.EXTENSION_PATT))&&(c.extension=e[1].toLowerCase()),c},a.formatQueryString=function(a,b){if(null==a)throw new Error("You must specify data.");var c=[];for(var d in a)c.push(d+"="+escape(a[d]));return b&&(c=c.concat(b)),c.join("&")},a.buildPath=function(a,b){if(null==b)return a;var c=[],d=a.indexOf("?");if(-1!=d){var e=a.slice(d+1);c=c.concat(e.split("&"))}return-1!=d?a.slice(0,d)+"?"+this.formatQueryString(b,c):a+"?"+this.formatQueryString(b,c)},a.isCrossDomain=function(a){var b=document.createElement("a");b.href=a.src;var c=document.createElement("a");c.href=location.href;var d=""!=b.hostname&&(b.port!=c.port||b.protocol!=c.protocol||b.hostname!=c.hostname);return d},a.isLocal=function(a){var b=document.createElement("a");return b.href=a.src,""==b.hostname&&"file:"==b.protocol},a.isBinary=function(a){switch(a){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},a.isImageTag=function(a){return a instanceof HTMLImageElement},a.isAudioTag=function(a){return window.HTMLAudioElement?a instanceof HTMLAudioElement:!1},a.isVideoTag=function(a){return window.HTMLVideoElement?a instanceof HTMLVideoElement:!1},a.isText=function(a){switch(a){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},a.getTypeByExtension=function(a){if(null==a)return createjs.AbstractLoader.TEXT;switch(a.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function AbstractLoader(a,b,c){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=c,this.resultFormatter=null,this._item=a?createjs.LoadItem.create(a):null,this._preferXHR=b,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var a=createjs.extend(AbstractLoader,createjs.EventDispatcher),b=AbstractLoader;b.POST="POST",b.GET="GET",b.BINARY="binary",b.CSS="css",b.IMAGE="image",b.JAVASCRIPT="javascript",b.JSON="json",b.JSONP="jsonp",b.MANIFEST="manifest",b.SOUND="sound",b.VIDEO="video",b.SPRITESHEET="spritesheet",b.SVG="svg",b.TEXT="text",b.XML="xml",a.getItem=function(){return this._item},a.getResult=function(a){return a?this._rawResult:this._result},a.getTag=function(){return this._tag},a.setTag=function(a){this._tag=a},a.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var a=new createjs.Event("initialize");a.loader=this._request,this.dispatchEvent(a),this._request.load()},a.cancel=function(){this.canceled=!0,this.destroy()},a.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},a.getLoadedItems=function(){return this._loadedItems},a._createRequest=function(){this._request=this._preferXHR?new createjs.XHRRequest(this._item):new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},a._createTag=function(){return null},a._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},a._sendProgress=function(a){if(!this._isCanceled()){var b=null;"number"==typeof a?(this.progress=a,b=new createjs.ProgressEvent(this.progress)):(b=a,this.progress=a.loaded/a.total,b.progress=this.progress,(isNaN(this.progress)||1/0==this.progress)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(b)}},a._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var a=new createjs.Event("complete");a.rawResult=this._rawResult,null!=this._result&&(a.result=this._result),this.dispatchEvent(a)}},a._sendError=function(a){!this._isCanceled()&&this.hasEventListener("error")&&(null==a&&(a=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(a))},a._isCanceled=function(){return null==window.createjs||this.canceled?!0:!1},a.resultFormatter=null,a.handleEvent=function(a){switch(a.type){case"complete":this._rawResult=a.target._response;var b=this.resultFormatter&&this.resultFormatter(this);b instanceof Function?b.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=b||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(a);break;case"error":this._sendError(a);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+a.type.toUpperCase()+"_ERROR"))}},a._resultFormatSuccess=function(a){this._result=a,this._sendComplete()},a._resultFormatFailed=function(a){this._sendError(a)},a.buildPath=function(a,b){return createjs.RequestUtils.buildPath(a,b)},a.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(AbstractLoader,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function AbstractMediaLoader(a,b,c){this.AbstractLoader_constructor(a,b,c),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var a=createjs.extend(AbstractMediaLoader,createjs.AbstractLoader);a.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},a._createTag=function(){},a._createRequest=function(){this._request=this._preferXHR?new createjs.XHRRequest(this._item):new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},a._updateXHR=function(a){a.loader.setResponseType&&a.loader.setResponseType("blob")},a._formatResult=function(a){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var b=window.URL||window.webkitURL,c=a.getResult(!0);a.getTag().src=b.createObjectURL(c)}return a.getTag()},createjs.AbstractMediaLoader=createjs.promote(AbstractMediaLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var AbstractRequest=function(a){this._item=a},a=createjs.extend(AbstractRequest,createjs.EventDispatcher);a.load=function(){},a.destroy=function(){},a.cancel=function(){},createjs.AbstractRequest=createjs.promote(AbstractRequest,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function TagRequest(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var a=createjs.extend(TagRequest,createjs.AbstractRequest);a.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var a=new createjs.Event("initialize");a.loader=this._tag,this.dispatchEvent(a),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},a.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},a._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;("loaded"==a.readyState||"complete"==a.readyState)&&this._handleTagComplete()},a._handleError=function(){this._clean(),this.dispatchEvent("error")},a._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},a._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},a._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},a._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},a._showTag=function(){this._tag.style.visibility=this._startTagVisibility},a._handleStalled=function(){},createjs.TagRequest=createjs.promote(TagRequest,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function MediaTagRequest(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var a=createjs.extend(MediaTagRequest,createjs.TagRequest);a.load=function(){var a=createjs.proxy(this._handleStalled,this);this._stalledCallback=a;var b=createjs.proxy(this._handleProgress,this);this._handleProgress=b,this._tag.addEventListener("stalled",a),this._tag.addEventListener("progress",b),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},a._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;("loaded"==a.readyState||"complete"==a.readyState)&&this._handleTagComplete()},a._handleStalled=function(){},a._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},a._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(MediaTagRequest,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function XHRRequest(a){this.AbstractRequest_constructor(a),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),!this._createXHR(a)}var a=createjs.extend(XHRRequest,createjs.AbstractRequest);XHRRequest.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],a.getResult=function(a){return a&&this._rawResponse?this._rawResponse:this._response},a.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},a.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(a){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,a))}},a.setResponseType=function(a){"blob"===a&&(a=window.URL?"blob":"arraybuffer",this._responseType=a),this._request.responseType=a},a.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},a.getResponseHeader=function(a){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(a):null},a._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},a._handleLoadStart=function(){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},a._handleAbort=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,a))},a._handleError=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(a.message))},a._handleReadyStateChange=function(){4==this._request.readyState&&this._handleLoad()},a._handleLoad=function(){if(!this.loaded){this.loaded=!0;var a=this._checkError();if(a)return void this._handleError(a);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(b){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===b.name&&window.BlobBuilder){var c=new BlobBuilder;c.append(this._response),this._response=c.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},a._handleTimeout=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,a))},a._checkError=function(){var a=parseInt(this._request.status);switch(a){case 404:case 0:return new Error(a)}return null},a._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(a){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(a){}return null},a._createXHR=function(a){var b=createjs.RequestUtils.isCrossDomain(a),c={},d=null;if(window.XMLHttpRequest)d=new XMLHttpRequest,b&&void 0===d.withCredentials&&window.XDomainRequest&&(d=new XDomainRequest);else{for(var e=0,f=s.ACTIVEX_VERSIONS.length;f>e;e++){var g=s.ACTIVEX_VERSIONS[e];try{d=new ActiveXObject(g);break}catch(h){}}if(null==d)return!1}null==a.mimeType&&createjs.RequestUtils.isText(a.type)&&(a.mimeType="text/plain; charset=utf-8"),a.mimeType&&d.overrideMimeType&&d.overrideMimeType(a.mimeType),this._xhrLevel="string"==typeof d.responseType?2:1;var i=null;if(i=a.method==createjs.AbstractLoader.GET?createjs.RequestUtils.buildPath(a.src,a.values):a.src,d.open(a.method||createjs.AbstractLoader.GET,i,!0),b&&d instanceof XMLHttpRequest&&1==this._xhrLevel&&(c.Origin=location.origin),a.values&&a.method==createjs.AbstractLoader.POST&&(c["Content-Type"]="application/x-www-form-urlencoded"),b||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),a.headers)for(var j in a.headers)c[j]=a.headers[j];for(j in c)d.setRequestHeader(j,c[j]);return d instanceof XMLHttpRequest&&void 0!==a.withCredentials&&(d.withCredentials=a.withCredentials),this._request=d,!0},a._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},a.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(XHRRequest,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function LoadQueue(a,b,c){this.AbstractLoader_constructor(),this._plugins=[],this._typeCallbacks={},this._extensionCallbacks={},this.next=null,this.maintainScriptOrder=!0,this.stopOnError=!1,this._maxConnections=1,this._availableLoaders=[createjs.ImageLoader,createjs.JavaScriptLoader,createjs.CSSLoader,createjs.JSONLoader,createjs.JSONPLoader,createjs.SoundLoader,createjs.ManifestLoader,createjs.SpriteSheetLoader,createjs.XMLLoader,createjs.SVGLoader,createjs.BinaryLoader,createjs.VideoLoader,createjs.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(a,b,c) +}var a=createjs.extend(LoadQueue,createjs.AbstractLoader),b=LoadQueue;a.init=function(a,b,c){this.useXHR=!0,this.preferXHR=!0,this._preferXHR=!0,this.setPreferXHR(a),this._paused=!1,this._basePath=b,this._crossOrigin=c,this._loadStartWasDispatched=!1,this._currentlyLoadingScript=null,this._currentLoads=[],this._loadQueue=[],this._loadQueueBackup=[],this._loadItemsById={},this._loadItemsBySrc={},this._loadedResults={},this._loadedRawResults={},this._numItems=0,this._numItemsLoaded=0,this._scriptOrder=[],this._loadedScripts=[],this._lastProgress=0/0},b.loadTimeout=8e3,b.LOAD_TIMEOUT=0,b.BINARY=createjs.AbstractLoader.BINARY,b.CSS=createjs.AbstractLoader.CSS,b.IMAGE=createjs.AbstractLoader.IMAGE,b.JAVASCRIPT=createjs.AbstractLoader.JAVASCRIPT,b.JSON=createjs.AbstractLoader.JSON,b.JSONP=createjs.AbstractLoader.JSONP,b.MANIFEST=createjs.AbstractLoader.MANIFEST,b.SOUND=createjs.AbstractLoader.SOUND,b.VIDEO=createjs.AbstractLoader.VIDEO,b.SVG=createjs.AbstractLoader.SVG,b.TEXT=createjs.AbstractLoader.TEXT,b.XML=createjs.AbstractLoader.XML,b.POST=createjs.AbstractLoader.POST,b.GET=createjs.AbstractLoader.GET,a.registerLoader=function(a){if(!a||!a.canLoadItem)throw new Error("loader is of an incorrect type.");if(-1!=this._availableLoaders.indexOf(a))throw new Error("loader already exists.");this._availableLoaders.unshift(a)},a.unregisterLoader=function(a){var b=this._availableLoaders.indexOf(a);-1!=b&&b0)return;var c=!1;if(b){for(;b.length;){var d=b.pop(),e=this.getResult(d);for(f=this._loadQueue.length-1;f>=0;f--)if(g=this._loadQueue[f].getItem(),g.id==d||g.src==d){this._loadQueue.splice(f,1)[0].cancel();break}for(f=this._loadQueueBackup.length-1;f>=0;f--)if(g=this._loadQueueBackup[f].getItem(),g.id==d||g.src==d){this._loadQueueBackup.splice(f,1)[0].cancel();break}if(e)this._disposeItem(this.getItem(d));else for(var f=this._currentLoads.length-1;f>=0;f--){var g=this._currentLoads[f].getItem();if(g.id==d||g.src==d){this._currentLoads.splice(f,1)[0].cancel(),c=!0;break}}}c&&this._loadNext()}else{this.close();for(var h in this._loadItemsById)this._disposeItem(this._loadItemsById[h]);this.init(this.preferXHR,this._basePath)}},a.reset=function(){this.close();for(var a in this._loadItemsById)this._disposeItem(this._loadItemsById[a]);for(var b=[],c=0,d=this._loadQueueBackup.length;d>c;c++)b.push(this._loadQueueBackup[c].getItem());this.loadManifest(b,!1)},a.installPlugin=function(a){if(null!=a&&null!=a.getPreloadHandlers){this._plugins.push(a);var b=a.getPreloadHandlers();if(b.scope=a,null!=b.types)for(var c=0,d=b.types.length;d>c;c++)this._typeCallbacks[b.types[c]]=b;if(null!=b.extensions)for(c=0,d=b.extensions.length;d>c;c++)this._extensionCallbacks[b.extensions[c]]=b}},a.setMaxConnections=function(a){this._maxConnections=a,!this._paused&&this._loadQueue.length>0&&this._loadNext()},a.loadFile=function(a,b,c){if(null==a){var d=new createjs.ErrorEvent("PRELOAD_NO_FILE");return void this._sendError(d)}this._addItem(a,null,c),this.setPaused(b!==!1?!1:!0)},a.loadManifest=function(a,c,d){var e=null,f=null;if(Array.isArray(a)){if(0==a.length){var g=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(g)}e=a}else if("string"==typeof a)e=[{src:a,type:b.MANIFEST}];else{if("object"!=typeof a){var g=new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(g)}if(void 0!==a.src){if(null==a.type)a.type=b.MANIFEST;else if(a.type!=b.MANIFEST){var g=new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(g)}e=[a]}else void 0!==a.manifest&&(e=a.manifest,f=a.path)}for(var h=0,i=e.length;i>h;h++)this._addItem(e[h],f,d);this.setPaused(c!==!1?!1:!0)},a.load=function(){this.setPaused(!1)},a.getItem=function(a){return this._loadItemsById[a]||this._loadItemsBySrc[a]},a.getResult=function(a,b){var c=this._loadItemsById[a]||this._loadItemsBySrc[a];if(null==c)return null;var d=c.id;return b&&this._loadedRawResults[d]?this._loadedRawResults[d]:this._loadedResults[d]},a.getItems=function(a){var b=[];for(var c in this._loadItemsById){var d=this._loadItemsById[c],e=this.getResult(c);(a!==!0||null!=e)&&b.push({item:d,result:e,rawResult:this.getResult(c,!0)})}return b},a.setPaused=function(a){this._paused=a,this._paused||this._loadNext()},a.close=function(){for(;this._currentLoads.length;)this._currentLoads.pop().cancel();this._scriptOrder.length=0,this._loadedScripts.length=0,this.loadStartWasDispatched=!1,this._itemCount=0,this._lastProgress=0/0},a._addItem=function(a,b,c){var d=this._createLoadItem(a,b,c);if(null!=d){var e=this._createLoader(d);null!=e&&("plugins"in e&&(e.plugins=this._plugins),d._loader=e,this._loadQueue.push(e),this._loadQueueBackup.push(e),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&d.type==createjs.LoadQueue.JAVASCRIPT||d.maintainOrder===!0)&&(this._scriptOrder.push(d),this._loadedScripts.push(null)))}},a._createLoadItem=function(a,b,c){var d=createjs.LoadItem.create(a);if(null==d)return null;var e="",f=c||this._basePath;if(d.src instanceof Object){if(!d.type)return null;if(b){e=b;var g=createjs.RequestUtils.parseURI(b);null==f||g.absolute||g.relative||(e=f+e)}else null!=f&&(e=f)}else{var h=createjs.RequestUtils.parseURI(d.src);h.extension&&(d.ext=h.extension),null==d.type&&(d.type=createjs.RequestUtils.getTypeByExtension(d.ext));var i=d.src;if(!h.absolute&&!h.relative)if(b){e=b;var g=createjs.RequestUtils.parseURI(b);i=b+i,null==f||g.absolute||g.relative||(e=f+e)}else null!=f&&(e=f);d.src=e+d.src}d.path=e,(void 0===d.id||null===d.id||""===d.id)&&(d.id=i);var j=this._typeCallbacks[d.type]||this._extensionCallbacks[d.ext];if(j){var k=j.callback.call(j.scope,d,this);if(k===!1)return null;k===!0||null!=k&&(d._loader=k),h=createjs.RequestUtils.parseURI(d.src),null!=h.extension&&(d.ext=h.extension)}return this._loadItemsById[d.id]=d,this._loadItemsBySrc[d.src]=d,null==d.crossOrigin&&(d.crossOrigin=this._crossOrigin),d},a._createLoader=function(a){if(null!=a._loader)return a._loader;for(var b=this.preferXHR,c=0;c=this._maxConnections);a++){var b=this._loadQueue[a];this._canStartLoad(b)&&(this._loadQueue.splice(a,1),a--,this._loadItem(b))}}},a._loadItem=function(a){a.on("fileload",this._handleFileLoad,this),a.on("progress",this._handleProgress,this),a.on("complete",this._handleFileComplete,this),a.on("error",this._handleError,this),a.on("fileerror",this._handleFileError,this),this._currentLoads.push(a),this._sendFileStart(a.getItem()),a.load()},a._handleFileLoad=function(a){a.target=null,this.dispatchEvent(a)},a._handleFileError=function(a){var b=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,a.item);this._sendError(b)},a._handleError=function(a){var b=a.target;this._numItemsLoaded++,this._finishOrderedItem(b,!0),this._updateProgress();var c=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,b.getItem());this._sendError(c),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(b),this._cleanLoadItem(b),this._loadNext())},a._handleFileComplete=function(a){var b=a.target,c=b.getItem(),d=b.getResult();this._loadedResults[c.id]=d;var e=b.getResult(!0);null!=e&&e!==d&&(this._loadedRawResults[c.id]=e),this._saveLoadedItems(b),this._removeLoadItem(b),this._finishOrderedItem(b)||this._processFinishedLoad(c,b),this._cleanLoadItem(b)},a._saveLoadedItems=function(a){var b=a.getLoadedItems();if(null!==b)for(var c=0;cb;b++){var c=this._loadedScripts[b];if(null===c)break;if(c!==!0){var d=this._loadedResults[c.id];c.type==createjs.LoadQueue.JAVASCRIPT&&createjs.DomUtils.appendToHead(d);var e=c._loader;this._processFinishedLoad(c,e),this._loadedScripts[b]=!0}}},a._processFinishedLoad=function(a,b){if(this._numItemsLoaded++,!this.maintainScriptOrder&&a.type==createjs.LoadQueue.JAVASCRIPT){var c=b.getTag();createjs.DomUtils.appendToHead(c)}this._updateProgress(),this._sendFileComplete(a,b),this._loadNext()},a._canStartLoad=function(a){if(!this.maintainScriptOrder||a.preferXHR)return!0;var b=a.getItem();if(b.type!=createjs.LoadQueue.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;for(var c=this._scriptOrder.indexOf(b),d=0;c>d;){var e=this._loadedScripts[d];if(null==e)return!1;d++}return this._currentlyLoadingScript=!0,!0},a._removeLoadItem=function(a){for(var b=this._currentLoads.length,c=0;b>c;c++)if(this._currentLoads[c]==a){this._currentLoads.splice(c,1);break}},a._cleanLoadItem=function(a){var b=a.getItem();b&&delete b._loader},a._handleProgress=function(a){var b=a.target;this._sendFileProgress(b.getItem(),b.progress),this._updateProgress()},a._updateProgress=function(){var a=this._numItemsLoaded/this._numItems,b=this._numItems-this._numItemsLoaded;if(b>0){for(var c=0,d=0,e=this._currentLoads.length;e>d;d++)c+=this._currentLoads[d].progress;a+=c/b*(b/this._numItems)}this._lastProgress!=a&&(this._sendProgress(a),this._lastProgress=a)},a._disposeItem=function(a){delete this._loadedResults[a.id],delete this._loadedRawResults[a.id],delete this._loadItemsById[a.id],delete this._loadItemsBySrc[a.src]},a._sendFileProgress=function(a,b){if(!this._isCanceled()&&!this._paused&&this.hasEventListener("fileprogress")){var c=new createjs.Event("fileprogress");c.progress=b,c.loaded=b,c.total=1,c.item=a,this.dispatchEvent(c)}},a._sendFileComplete=function(a,b){if(!this._isCanceled()&&!this._paused){var c=new createjs.Event("fileload");c.loader=b,c.item=a,c.result=this._loadedResults[a.id],c.rawResult=this._loadedRawResults[a.id],a.completeHandler&&a.completeHandler(c),this.hasEventListener("fileload")&&this.dispatchEvent(c)}},a._sendFileStart=function(a){var b=new createjs.Event("filestart");b.item=a,this.hasEventListener("filestart")&&this.dispatchEvent(b)},a.toString=function(){return"[PreloadJS LoadQueue]"},createjs.LoadQueue=createjs.promote(LoadQueue,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function TextLoader(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.TEXT)}var a=(createjs.extend(TextLoader,createjs.AbstractLoader),TextLoader);a.canLoadItem=function(a){return a.type==createjs.AbstractLoader.TEXT},createjs.TextLoader=createjs.promote(TextLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function BinaryLoader(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.BINARY),this.on("initialize",this._updateXHR,this)}var a=createjs.extend(BinaryLoader,createjs.AbstractLoader),b=BinaryLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.BINARY},a._updateXHR=function(a){a.loader.setResponseType("arraybuffer")},createjs.BinaryLoader=createjs.promote(BinaryLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function CSSLoader(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",this._tag=document.createElement(b?"style":"link"),this._tag.rel="stylesheet",this._tag.type="text/css"}var a=createjs.extend(CSSLoader,createjs.AbstractLoader),b=CSSLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.CSS},a._formatResult=function(a){if(this._preferXHR){var b=a.getTag();if(b.styleSheet)b.styleSheet.cssText=a.getResult(!0);else{var c=document.createTextNode(a.getResult(!0));b.appendChild(c)}}else b=this._tag;return createjs.DomUtils.appendToHead(b),b},createjs.CSSLoader=createjs.promote(CSSLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function ImageLoader(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.IMAGE),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",createjs.RequestUtils.isImageTag(a)?this._tag=a:createjs.RequestUtils.isImageTag(a.src)?this._tag=a.src:createjs.RequestUtils.isImageTag(a.tag)&&(this._tag=a.tag),null!=this._tag?this._preferXHR=!1:this._tag=document.createElement("img"),this.on("initialize",this._updateXHR,this)}var a=createjs.extend(ImageLoader,createjs.AbstractLoader),b=ImageLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.IMAGE},a.load=function(){if(""!=this._tag.src&&this._tag.complete)return void this._sendComplete();var a=this._item.crossOrigin;1==a&&(a="Anonymous"),null==a||createjs.RequestUtils.isLocal(this._item.src)||(this._tag.crossOrigin=a),this.AbstractLoader_load()},a._updateXHR=function(a){a.loader.mimeType="text/plain; charset=x-user-defined-binary",a.loader.setResponseType&&a.loader.setResponseType("blob")},a._formatResult=function(){return this._formatImage},a._formatImage=function(a,b){var c=this._tag,d=window.URL||window.webkitURL;if(this._preferXHR)if(d){var e=d.createObjectURL(this.getResult(!0));c.src=e,c.addEventListener("load",this._cleanUpURL,!1),c.addEventListener("error",this._cleanUpURL,!1)}else c.src=this._item.src;else;c.complete?a(c):(c.onload=createjs.proxy(function(){a(this._tag)},this),c.onerror=createjs.proxy(function(){b(_this._tag)},this))},a._cleanUpURL=function(a){var b=window.URL||window.webkitURL;b.revokeObjectURL(a.target.src)},createjs.ImageLoader=createjs.promote(ImageLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function JavaScriptLoader(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.JAVASCRIPT),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.setTag(document.createElement("script"))}var a=createjs.extend(JavaScriptLoader,createjs.AbstractLoader),b=JavaScriptLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.JAVASCRIPT},a._formatResult=function(a){var b=a.getTag();return this._preferXHR&&(b.text=a.getResult(!0)),b},createjs.JavaScriptLoader=createjs.promote(JavaScriptLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function JSONLoader(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.JSON),this.resultFormatter=this._formatResult}var a=createjs.extend(JSONLoader,createjs.AbstractLoader),b=JSONLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.JSON},a._formatResult=function(a){var b=null;try{b=createjs.DataUtils.parseJSON(a.getResult(!0))}catch(c){var d=new createjs.ErrorEvent("JSON_FORMAT",null,c);return this._sendError(d),c}return b},createjs.JSONLoader=createjs.promote(JSONLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function JSONPLoader(a){this.AbstractLoader_constructor(a,!1,createjs.AbstractLoader.JSONP),this.setTag(document.createElement("script")),this.getTag().type="text/javascript"}var a=createjs.extend(JSONPLoader,createjs.AbstractLoader),b=JSONPLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.JSONP},a.cancel=function(){this.AbstractLoader_cancel(),this._dispose()},a.load=function(){if(null==this._item.callback)throw new Error("callback is required for loading JSONP requests.");if(null!=window[this._item.callback])throw new Error("JSONP callback '"+this._item.callback+"' already exists on window. You need to specify a different callback or re-name the current one.");window[this._item.callback]=createjs.proxy(this._handleLoad,this),window.document.body.appendChild(this._tag),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag.src=this._item.src},a._handleLoad=function(a){this._result=this._rawResult=a,this._sendComplete(),this._dispose()},a._handleTimeout=function(){this._dispose(),this.dispatchEvent(new createjs.ErrorEvent("timeout"))},a._dispose=function(){window.document.body.removeChild(this._tag),delete window[this._item.callback],clearTimeout(this._loadTimeout)},createjs.JSONPLoader=createjs.promote(JSONPLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function ManifestLoader(a){this.AbstractLoader_constructor(a,null,createjs.AbstractLoader.MANIFEST),this.plugins=null,this._manifestQueue=null}var a=createjs.extend(ManifestLoader,createjs.AbstractLoader),b=ManifestLoader;b.MANIFEST_PROGRESS=.25,b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.MANIFEST},a.load=function(){this.AbstractLoader_load()},a._createRequest=function(){var a=this._item.callback;this._request=null!=a?new createjs.JSONPLoader(this._item):new createjs.JSONLoader(this._item)},a.handleEvent=function(a){switch(a.type){case"complete":return this._rawResult=a.target.getResult(!0),this._result=a.target.getResult(),this._sendProgress(b.MANIFEST_PROGRESS),void this._loadManifest(this._result);case"progress":return a.loaded*=b.MANIFEST_PROGRESS,this.progress=a.loaded/a.total,(isNaN(this.progress)||1/0==this.progress)&&(this.progress=0),void this._sendProgress(a)}this.AbstractLoader_handleEvent(a)},a.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},a._loadManifest=function(a){if(a&&a.manifest){var b=this._manifestQueue=new createjs.LoadQueue;b.on("fileload",this._handleManifestFileLoad,this),b.on("progress",this._handleManifestProgress,this),b.on("complete",this._handleManifestComplete,this,!0),b.on("error",this._handleManifestError,this,!0);for(var c=0,d=this.plugins.length;d>c;c++)b.installPlugin(this.plugins[c]);b.loadManifest(a)}else this._sendComplete()},a._handleManifestFileLoad=function(a){a.target=null,this.dispatchEvent(a)},a._handleManifestComplete=function(){this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},a._handleManifestProgress=function(a){this.progress=a.progress*(1-b.MANIFEST_PROGRESS)+b.MANIFEST_PROGRESS,this._sendProgress(this.progress)},a._handleManifestError=function(a){var b=new createjs.Event("fileerror");b.item=a.data,this.dispatchEvent(b)},createjs.ManifestLoader=createjs.promote(ManifestLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function SoundLoader(a,b){this.AbstractMediaLoader_constructor(a,b,createjs.AbstractLoader.SOUND),createjs.RequestUtils.isAudioTag(a)?this._tag=a:createjs.RequestUtils.isAudioTag(a.src)?this._tag=a:createjs.RequestUtils.isAudioTag(a.tag)&&(this._tag=createjs.RequestUtils.isAudioTag(a)?a:a.src),null!=this._tag&&(this._preferXHR=!1)}var a=createjs.extend(SoundLoader,createjs.AbstractMediaLoader),b=SoundLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SOUND},a._createTag=function(a){var b=document.createElement("audio");return b.autoplay=!1,b.preload="none",b.src=a,b},createjs.SoundLoader=createjs.promote(SoundLoader,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function VideoLoader(a,b){this.AbstractMediaLoader_constructor(a,b,createjs.AbstractLoader.VIDEO),createjs.RequestUtils.isVideoTag(a)||createjs.RequestUtils.isVideoTag(a.src)?(this.setTag(createjs.RequestUtils.isVideoTag(a)?a:a.src),this._preferXHR=!1):this.setTag(this._createTag())}var a=createjs.extend(VideoLoader,createjs.AbstractMediaLoader),b=VideoLoader;a._createTag=function(){return document.createElement("video")},b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.VIDEO},createjs.VideoLoader=createjs.promote(VideoLoader,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function SpriteSheetLoader(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.SPRITESHEET),this._manifestQueue=null}var a=createjs.extend(SpriteSheetLoader,createjs.AbstractLoader),b=SpriteSheetLoader;b.SPRITESHEET_PROGRESS=.25,b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SPRITESHEET},a.destroy=function(){this.AbstractLoader_destroy,this._manifestQueue.close()},a._createRequest=function(){var a=this._item.callback;this._request=null!=a?new createjs.JSONPLoader(this._item):new createjs.JSONLoader(this._item)},a.handleEvent=function(a){switch(a.type){case"complete":return this._rawResult=a.target.getResult(!0),this._result=a.target.getResult(),this._sendProgress(b.SPRITESHEET_PROGRESS),void this._loadManifest(this._result);case"progress":return a.loaded*=b.SPRITESHEET_PROGRESS,this.progress=a.loaded/a.total,(isNaN(this.progress)||1/0==this.progress)&&(this.progress=0),void this._sendProgress(a)}this.AbstractLoader_handleEvent(a)},a._loadManifest=function(a){if(a&&a.images){var b=this._manifestQueue=new createjs.LoadQueue(this._preferXHR,this._item.path,this._item.crossOrigin);b.on("complete",this._handleManifestComplete,this,!0),b.on("fileload",this._handleManifestFileLoad,this),b.on("progress",this._handleManifestProgress,this),b.on("error",this._handleManifestError,this,!0),b.loadManifest(a.images)}},a._handleManifestFileLoad=function(a){var b=a.result;if(null!=b){var c=this.getResult().images,d=c.indexOf(a.item.src);c[d]=b}},a._handleManifestComplete=function(){this._result=new createjs.SpriteSheet(this._result),this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},a._handleManifestProgress=function(a){this.progress=a.progress*(1-b.SPRITESHEET_PROGRESS)+b.SPRITESHEET_PROGRESS,this._sendProgress(this.progress)},a._handleManifestError=function(a){var b=new createjs.Event("fileerror");b.item=a.data,this.dispatchEvent(b)},createjs.SpriteSheetLoader=createjs.promote(SpriteSheetLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function SVGLoader(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",b?this.setTag(document.createElement("svg")):(this.setTag(document.createElement("object")),this.getTag().type="image/svg+xml")}var a=createjs.extend(SVGLoader,createjs.AbstractLoader),b=SVGLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SVG},a._formatResult=function(a){var b=createjs.DataUtils.parseXML(a.getResult(!0),"text/xml"),c=a.getTag();return!this._preferXHR&&document.body.contains(c)&&document.body.removeChild(c),null!=b.documentElement?(c.appendChild(b.documentElement),c.style.visibility="visible",c):b},createjs.SVGLoader=createjs.promote(SVGLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function XMLLoader(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.XML),this.resultFormatter=this._formatResult}var a=createjs.extend(XMLLoader,createjs.AbstractLoader),b=XMLLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.XML},a._formatResult=function(a){return createjs.DataUtils.parseXML(a.getResult(!0),"text/xml")},createjs.XMLLoader=createjs.promote(XMLLoader,"AbstractLoader")}(); \ No newline at end of file diff --git a/Server/www/spiderbasic/put.min.js b/Server/www/spiderbasic/put.min.js new file mode 100644 index 0000000..c754d4a --- /dev/null +++ b/Server/www/spiderbasic/put.min.js @@ -0,0 +1,4 @@ +(function(b){var d,c=/[-+,> ]/;b([],d=function(k,b){function q(u){function w(){a&&f&&a!=f&&(f==u&&(v||(v=c.test(g)&&k.createDocumentFragment()))?v:f).insertBefore(a,r||null)}for(var v,b,r,f,a,p=arguments,d=p[0],m=0;mm&&(u=null); +b=!0;if(d=g.replace(y,function(e,h,b,d,l,c){h&&(w(),"-"==h||"+"==h?(f=(r=a||f).parentNode,a=null,"+"==h&&(r=r.nextSibling)):("<"==h?f=a=(a||f).parentNode:(","==h?f=u:a&&(f=a),a=null),r=0),a&&(f=a));if((e=!b&&d)||!a&&(b||l))"$"==e?(e=p[++m],f.appendChild(k.createTextNode(e))):(e=e||q.defaultTag,(h=x&&p[m+1]&&p[m+1].name)&&(e="<"+e+' name="'+h+'">'),a=s&&~(t=e.indexOf("|"))?k.createElementNS(s[e.slice(0,t)],e.slice(t+1)):k.createElement(e));if(b)if("$"==d&&(d=p[++m]),"#"==b)a.id=d;else if(h=(e=a.className)&& +(" "+e+" ").replace(" "+d+" "," "),"."==b)a.className=e?(h+d).substring(1):d;else if("!"==g){var n;x?q("div",a,"<").innerHTML="":(n=a.parentNode)&&n.removeChild(a)}else h=h.substring(1,h.length-1),h!=e&&(a.className=h);l&&("$"==c&&(c=p[++m]),"style"==l?a.style.cssText=c:(b="!"==l.charAt(0)?(l=l.substring(1))&&"removeAttribute":"setAttribute",c=""===c?l:c,s&&~(t=l.indexOf("|"))?a[b+"NS"](s[l.slice(0,t)],l.slice(t+1),c):a[b](l,c)));return""}))throw new SyntaxError("Unexpected char "+d+" in "+g);w(); +f=d=a||f}}u&&v&&u.appendChild(v);return d}c=b||c;var y=/(?:\s*([-+ ,<>]))?\s*(\.|!\.?|#)?([-\w%$|]+)?(?:\[([^\]=]+)=?['"]?([^\]'"]*)['"]?\])?/g,t,s=!1;k=k||document;var x="object"==typeof k.createElement;q.addNamespace=function(b,c){k.createElementNS?(s||(s={}))[b]=c:k.namespaces.add(b,c)};q.defaultTag="div";q.forDocument=d;return q})})(function(b,d,c){c=c||d;"function"===typeof define?define([],function(){return c()}):"undefined"==typeof window?require("./node-html")(module,c):put=c()}); diff --git a/Server/www/spiderbasic/seedrandom.min.js b/Server/www/spiderbasic/seedrandom.min.js new file mode 100644 index 0000000..5516aa8 --- /dev/null +++ b/Server/www/spiderbasic/seedrandom.min.js @@ -0,0 +1 @@ +!function(a,b,c,d,e,f,g,h,i){function j(a){var b,c=a.length,e=this,f=0,g=e.i=e.j=0,h=e.S=[];for(c||(a=[c++]);d>f;)h[f]=f++;for(f=0;d>f;f++)h[f]=h[g=r&g+a[f%c]+(b=h[f])],h[g]=b;(e.g=function(a){for(var b,c=0,f=e.i,g=e.j,h=e.S;a--;)b=h[f=r&f+1],c=c*d+h[r&(h[f]=h[g=r&g+b])+(h[g]=b)];return e.i=f,e.j=g,c})(d)}function k(a,b){var c,d=[],e=typeof a;if(b&&"object"==e)for(c in a)try{d.push(k(a[c],b-1))}catch(f){}return d.length?d:"string"==e?a:a+"\0"}function l(a,b){for(var c,d=a+"",e=0;ea;)a=(a+c)*d,b*=d,c=s.g(1);for(;a>=q;)a/=2,b/=2,c>>>=1;return(a+c)/b},r,this==c)};l(c[i](),b),g&&g.exports?g.exports=s:h&&h.amd&&h(function(){return s})}(this,[],Math,256,6,52,"object"==typeof module&&module,"function"==typeof define&&define,"random"); diff --git a/Server/www/spiderbasic/soundjs.min.js b/Server/www/spiderbasic/soundjs.min.js new file mode 100644 index 0000000..c186e64 --- /dev/null +++ b/Server/www/spiderbasic/soundjs.min.js @@ -0,0 +1,18 @@ +/*! +* @license SoundJS +* Visit http://createjs.com/ for documentation, updates and examples. +* +* Copyright (c) 2011-2015 gskinner.com, inc. +* +* Distributed under the terms of the MIT license. +* http://www.opensource.org/licenses/mit-license.html +* +* This notice shall be included in all copies or substantial portions of the Software. +*/ + +/**! + * SoundJS FlashAudioPlugin also includes swfobject (http://code.google.com/p/swfobject/) + */ + +this.createjs=this.createjs||{},function(){var a=createjs.SoundJS=createjs.SoundJS||{};a.version="0.6.2",a.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.extend=function(a,b){"use strict";function c(){this.constructor=a}return c.prototype=b.prototype,a.prototype=new c},this.createjs=this.createjs||{},createjs.promote=function(a,b){"use strict";var c=a.prototype,d=Object.getPrototypeOf&&Object.getPrototypeOf(c)||c.__proto__;if(d){c[(b+="_")+"constructor"]=d.constructor;for(var e in d)c.hasOwnProperty(e)&&"function"==typeof d[e]&&(c[b+e]=d[e])}return a},this.createjs=this.createjs||{},createjs.indexOf=function(a,b){"use strict";for(var c=0,d=a.length;d>c;c++)if(b===a[c])return c;return-1},this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,Array.prototype.slice.call(arguments,0).concat(c))}}}(),this.createjs=this.createjs||{},function(){"use strict";function BrowserDetect(){throw"BrowserDetect cannot be instantiated"}var a=BrowserDetect.agent=window.navigator.userAgent;BrowserDetect.isWindowPhone=a.indexOf("IEMobile")>-1||a.indexOf("Windows Phone")>-1,BrowserDetect.isFirefox=a.indexOf("Firefox")>-1,BrowserDetect.isOpera=null!=window.opera,BrowserDetect.isChrome=a.indexOf("Chrome")>-1,BrowserDetect.isIOS=(a.indexOf("iPod")>-1||a.indexOf("iPhone")>-1||a.indexOf("iPad")>-1)&&!BrowserDetect.isWindowPhone,BrowserDetect.isAndroid=a.indexOf("Android")>-1&&!BrowserDetect.isWindowPhone,BrowserDetect.isBlackberry=a.indexOf("Blackberry")>-1,createjs.BrowserDetect=BrowserDetect}(),this.createjs=this.createjs||{},function(){"use strict";function EventDispatcher(){this._listeners=null,this._captureListeners=null}var a=EventDispatcher.prototype;EventDispatcher.initialize=function(b){b.addEventListener=a.addEventListener,b.on=a.on,b.removeEventListener=b.off=a.removeEventListener,b.removeAllEventListeners=a.removeAllEventListeners,b.hasEventListener=a.hasEventListener,b.dispatchEvent=a.dispatchEvent,b._dispatchEvent=a._dispatchEvent,b.willTrigger=a.willTrigger},a.addEventListener=function(a,b,c){var d;d=c?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var e=d[a];return e&&this.removeEventListener(a,b,c),e=d[a],e?e.push(b):d[a]=[b],b},a.on=function(a,b,c,d,e,f){return b.handleEvent&&(c=c||b,b=b.handleEvent),c=c||this,this.addEventListener(a,function(a){b.call(c,a,e),d&&a.remove()},f)},a.removeEventListener=function(a,b,c){var d=c?this._captureListeners:this._listeners;if(d){var e=d[a];if(e)for(var f=0,g=e.length;g>f;f++)if(e[f]==b){1==g?delete d[a]:e.splice(f,1);break}}},a.off=a.removeEventListener,a.removeAllEventListeners=function(a){a?(this._listeners&&delete this._listeners[a],this._captureListeners&&delete this._captureListeners[a]):this._listeners=this._captureListeners=null},a.dispatchEvent=function(a,b,c){if("string"==typeof a){var d=this._listeners;if(!(b||d&&d[a]))return!0;a=new createjs.Event(a,b,c)}else a.target&&a.clone&&(a=a.clone());try{a.target=this}catch(e){}if(a.bubbles&&this.parent){for(var f=this,g=[f];f.parent;)g.push(f=f.parent);var h,i=g.length;for(h=i-1;h>=0&&!a.propagationStopped;h--)g[h]._dispatchEvent(a,1+(0==h));for(h=1;i>h&&!a.propagationStopped;h++)g[h]._dispatchEvent(a,3)}else this._dispatchEvent(a,2);return!a.defaultPrevented},a.hasEventListener=function(a){var b=this._listeners,c=this._captureListeners;return!!(b&&b[a]||c&&c[a])},a.willTrigger=function(a){for(var b=this;b;){if(b.hasEventListener(a))return!0;b=b.parent}return!1},a.toString=function(){return"[EventDispatcher]"},a._dispatchEvent=function(a,b){var c,d=1==b?this._captureListeners:this._listeners;if(a&&d){var e=d[a.type];if(!e||!(c=e.length))return;try{a.currentTarget=this}catch(f){}try{a.eventPhase=b}catch(f){}a.removed=!1,e=e.slice();for(var g=0;c>g&&!a.immediatePropagationStopped;g++){var h=e[g];h.handleEvent?h.handleEvent(a):h(a),a.removed&&(this.off(a.type,h,1==b),a.removed=!1)}}},createjs.EventDispatcher=EventDispatcher}(),this.createjs=this.createjs||{},function(){"use strict";function Event(a,b,c){this.type=a,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!b,this.cancelable=!!c,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var a=Event.prototype;a.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},a.stopPropagation=function(){this.propagationStopped=!0},a.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},a.remove=function(){this.removed=!0},a.clone=function(){return new Event(this.type,this.bubbles,this.cancelable)},a.set=function(a){for(var b in a)this[b]=a[b];return this},a.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=Event}(),this.createjs=this.createjs||{},function(){"use strict";function ErrorEvent(a,b,c){this.Event_constructor("error"),this.title=a,this.message=b,this.data=c}var a=createjs.extend(ErrorEvent,createjs.Event);a.clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(ErrorEvent,"Event")}(),this.createjs=this.createjs||{},function(){"use strict";function ProgressEvent(a,b){this.Event_constructor("progress"),this.loaded=a,this.total=null==b?1:b,this.progress=0==b?0:this.loaded/this.total}var a=createjs.extend(ProgressEvent,createjs.Event);a.clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(ProgressEvent,"Event")}(window),this.createjs=this.createjs||{},function(){"use strict";function LoadItem(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.LoadItem.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=b.LOAD_TIMEOUT_DEFAULT}var a=LoadItem.prototype={},b=LoadItem;b.LOAD_TIMEOUT_DEFAULT=8e3,b.create=function(a){if("string"==typeof a){var c=new LoadItem;return c.src=a,c}if(a instanceof b)return a;if(a instanceof Object&&a.src)return null==a.loadTimeout&&(a.loadTimeout=b.LOAD_TIMEOUT_DEFAULT),a;throw new Error("Type not recognized.")},a.set=function(a){for(var b in a)this[b]=a[b];return this},createjs.LoadItem=b}(),function(){var a={};a.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,a.RELATIVE_PATT=/^[.\/]*?\//i,a.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,a.parseURI=function(b){var c={absolute:!1,relative:!1};if(null==b)return c;var d=b.indexOf("?");d>-1&&(b=b.substr(0,d));var e;return a.ABSOLUTE_PATT.test(b)?c.absolute=!0:a.RELATIVE_PATT.test(b)&&(c.relative=!0),(e=b.match(a.EXTENSION_PATT))&&(c.extension=e[1].toLowerCase()),c},a.formatQueryString=function(a,b){if(null==a)throw new Error("You must specify data.");var c=[];for(var d in a)c.push(d+"="+escape(a[d]));return b&&(c=c.concat(b)),c.join("&")},a.buildPath=function(a,b){if(null==b)return a;var c=[],d=a.indexOf("?");if(-1!=d){var e=a.slice(d+1);c=c.concat(e.split("&"))}return-1!=d?a.slice(0,d)+"?"+this.formatQueryString(b,c):a+"?"+this.formatQueryString(b,c)},a.isCrossDomain=function(a){var b=document.createElement("a");b.href=a.src;var c=document.createElement("a");c.href=location.href;var d=""!=b.hostname&&(b.port!=c.port||b.protocol!=c.protocol||b.hostname!=c.hostname);return d},a.isLocal=function(a){var b=document.createElement("a");return b.href=a.src,""==b.hostname&&"file:"==b.protocol},a.isBinary=function(a){switch(a){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},a.isImageTag=function(a){return a instanceof HTMLImageElement},a.isAudioTag=function(a){return window.HTMLAudioElement?a instanceof HTMLAudioElement:!1},a.isVideoTag=function(a){return window.HTMLVideoElement?a instanceof HTMLVideoElement:!1},a.isText=function(a){switch(a){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},a.getTypeByExtension=function(a){if(null==a)return createjs.AbstractLoader.TEXT;switch(a.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function AbstractLoader(a,b,c){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=c,this.resultFormatter=null,this._item=a?createjs.LoadItem.create(a):null,this._preferXHR=b,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var a=createjs.extend(AbstractLoader,createjs.EventDispatcher),b=AbstractLoader;b.POST="POST",b.GET="GET",b.BINARY="binary",b.CSS="css",b.IMAGE="image",b.JAVASCRIPT="javascript",b.JSON="json",b.JSONP="jsonp",b.MANIFEST="manifest",b.SOUND="sound",b.VIDEO="video",b.SPRITESHEET="spritesheet",b.SVG="svg",b.TEXT="text",b.XML="xml",a.getItem=function(){return this._item},a.getResult=function(a){return a?this._rawResult:this._result},a.getTag=function(){return this._tag},a.setTag=function(a){this._tag=a},a.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var a=new createjs.Event("initialize");a.loader=this._request,this.dispatchEvent(a),this._request.load()},a.cancel=function(){this.canceled=!0,this.destroy()},a.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},a.getLoadedItems=function(){return this._loadedItems},a._createRequest=function(){this._request=this._preferXHR?new createjs.XHRRequest(this._item):new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},a._createTag=function(){return null},a._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},a._sendProgress=function(a){if(!this._isCanceled()){var b=null;"number"==typeof a?(this.progress=a,b=new createjs.ProgressEvent(this.progress)):(b=a,this.progress=a.loaded/a.total,b.progress=this.progress,(isNaN(this.progress)||1/0==this.progress)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(b)}},a._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var a=new createjs.Event("complete");a.rawResult=this._rawResult,null!=this._result&&(a.result=this._result),this.dispatchEvent(a)}},a._sendError=function(a){!this._isCanceled()&&this.hasEventListener("error")&&(null==a&&(a=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(a))},a._isCanceled=function(){return null==window.createjs||this.canceled?!0:!1},a.resultFormatter=null,a.handleEvent=function(a){switch(a.type){case"complete":this._rawResult=a.target._response;var b=this.resultFormatter&&this.resultFormatter(this);b instanceof Function?b.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=b||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(a);break;case"error":this._sendError(a);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+a.type.toUpperCase()+"_ERROR"))}},a._resultFormatSuccess=function(a){this._result=a,this._sendComplete()},a._resultFormatFailed=function(a){this._sendError(a)},a.buildPath=function(a,b){return createjs.RequestUtils.buildPath(a,b)},a.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(AbstractLoader,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function AbstractMediaLoader(a,b,c){this.AbstractLoader_constructor(a,b,c),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var a=createjs.extend(AbstractMediaLoader,createjs.AbstractLoader);a.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},a._createTag=function(){},a._createRequest=function(){this._request=this._preferXHR?new createjs.XHRRequest(this._item):new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},a._updateXHR=function(a){a.loader.setResponseType&&a.loader.setResponseType("blob")},a._formatResult=function(a){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var b=window.URL||window.webkitURL,c=a.getResult(!0);a.getTag().src=b.createObjectURL(c)}return a.getTag()},createjs.AbstractMediaLoader=createjs.promote(AbstractMediaLoader,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var AbstractRequest=function(a){this._item=a},a=createjs.extend(AbstractRequest,createjs.EventDispatcher);a.load=function(){},a.destroy=function(){},a.cancel=function(){},createjs.AbstractRequest=createjs.promote(AbstractRequest,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function TagRequest(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var a=createjs.extend(TagRequest,createjs.AbstractRequest);a.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var a=new createjs.Event("initialize");a.loader=this._tag,this.dispatchEvent(a),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},a.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},a._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;("loaded"==a.readyState||"complete"==a.readyState)&&this._handleTagComplete()},a._handleError=function(){this._clean(),this.dispatchEvent("error")},a._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},a._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},a._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},a._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},a._showTag=function(){this._tag.style.visibility=this._startTagVisibility},a._handleStalled=function(){},createjs.TagRequest=createjs.promote(TagRequest,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function MediaTagRequest(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var a=createjs.extend(MediaTagRequest,createjs.TagRequest);a.load=function(){var a=createjs.proxy(this._handleStalled,this);this._stalledCallback=a;var b=createjs.proxy(this._handleProgress,this);this._handleProgress=b,this._tag.addEventListener("stalled",a),this._tag.addEventListener("progress",b),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},a._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;("loaded"==a.readyState||"complete"==a.readyState)&&this._handleTagComplete()},a._handleStalled=function(){},a._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},a._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(MediaTagRequest,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function XHRRequest(a){this.AbstractRequest_constructor(a),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),!this._createXHR(a)}var a=createjs.extend(XHRRequest,createjs.AbstractRequest);XHRRequest.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],a.getResult=function(a){return a&&this._rawResponse?this._rawResponse:this._response},a.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},a.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(a){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,a))}},a.setResponseType=function(a){"blob"===a&&(a=window.URL?"blob":"arraybuffer",this._responseType=a),this._request.responseType=a},a.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},a.getResponseHeader=function(a){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(a):null},a._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},a._handleLoadStart=function(){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},a._handleAbort=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,a))},a._handleError=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(a.message))},a._handleReadyStateChange=function(){4==this._request.readyState&&this._handleLoad()},a._handleLoad=function(){if(!this.loaded){this.loaded=!0;var a=this._checkError();if(a)return void this._handleError(a);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(b){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===b.name&&window.BlobBuilder){var c=new BlobBuilder;c.append(this._response),this._response=c.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},a._handleTimeout=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,a))},a._checkError=function(){var a=parseInt(this._request.status);switch(a){case 404:case 0:return new Error(a)}return null},a._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(a){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(a){}return null},a._createXHR=function(a){var b=createjs.RequestUtils.isCrossDomain(a),c={},d=null;if(window.XMLHttpRequest)d=new XMLHttpRequest,b&&void 0===d.withCredentials&&window.XDomainRequest&&(d=new XDomainRequest);else{for(var e=0,f=s.ACTIVEX_VERSIONS.length;f>e;e++){var g=s.ACTIVEX_VERSIONS[e];try{d=new ActiveXObject(g);break}catch(h){}}if(null==d)return!1}null==a.mimeType&&createjs.RequestUtils.isText(a.type)&&(a.mimeType="text/plain; charset=utf-8"),a.mimeType&&d.overrideMimeType&&d.overrideMimeType(a.mimeType),this._xhrLevel="string"==typeof d.responseType?2:1;var i=null;if(i=a.method==createjs.AbstractLoader.GET?createjs.RequestUtils.buildPath(a.src,a.values):a.src,d.open(a.method||createjs.AbstractLoader.GET,i,!0),b&&d instanceof XMLHttpRequest&&1==this._xhrLevel&&(c.Origin=location.origin),a.values&&a.method==createjs.AbstractLoader.POST&&(c["Content-Type"]="application/x-www-form-urlencoded"),b||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),a.headers)for(var j in a.headers)c[j]=a.headers[j];for(j in c)d.setRequestHeader(j,c[j]);return d instanceof XMLHttpRequest&&void 0!==a.withCredentials&&(d.withCredentials=a.withCredentials),this._request=d,!0},a._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},a.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(XHRRequest,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function SoundLoader(a,b){this.AbstractMediaLoader_constructor(a,b,createjs.AbstractLoader.SOUND),createjs.RequestUtils.isAudioTag(a)?this._tag=a:createjs.RequestUtils.isAudioTag(a.src)?this._tag=a:createjs.RequestUtils.isAudioTag(a.tag)&&(this._tag=createjs.RequestUtils.isAudioTag(a)?a:a.src),null!=this._tag&&(this._preferXHR=!1)}var a=createjs.extend(SoundLoader,createjs.AbstractMediaLoader),b=SoundLoader;b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SOUND},a._createTag=function(a){var b=document.createElement("audio");return b.autoplay=!1,b.preload="none",b.src=a,b},createjs.SoundLoader=createjs.promote(SoundLoader,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var PlayPropsConfig=function(){this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},a=PlayPropsConfig.prototype={},b=PlayPropsConfig;b.create=function(a){if(a instanceof b||a instanceof Object){var c=new createjs.PlayPropsConfig;return c.set(a),c}throw new Error("Type not recognized.")},a.set=function(a){for(var b in a)this[b]=a[b];return this},a.toString=function(){return"[PlayPropsConfig]"},createjs.PlayPropsConfig=b}(),this.createjs=this.createjs||{},function(){"use strict";function Sound(){throw"Sound cannot be instantiated"}function a(a,b){this.init(a,b)}var b=Sound;b.INTERRUPT_ANY="any",b.INTERRUPT_EARLY="early",b.INTERRUPT_LATE="late",b.INTERRUPT_NONE="none",b.PLAY_INITED="playInited",b.PLAY_SUCCEEDED="playSucceeded",b.PLAY_INTERRUPTED="playInterrupted",b.PLAY_FINISHED="playFinished",b.PLAY_FAILED="playFailed",b.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid"],b.EXTENSION_MAP={m4a:"mp4"},b.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,b.defaultInterruptBehavior=b.INTERRUPT_NONE,b.alternateExtensions=[],b.activePlugin=null,b._masterVolume=1,Object.defineProperty(b,"volume",{get:function(){return this._masterVolume},set:function(a){if(null==Number(a))return!1;if(a=Math.max(0,Math.min(1,a)),b._masterVolume=a,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(a))for(var c=this._instances,d=0,e=c.length;e>d;d++)c[d].setMasterVolume(a)}}),b._masterMute=!1,Object.defineProperty(b,"muted",{get:function(){return this._masterMute},set:function(a){if(null==a)return!1;if(this._masterMute=a,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(a))for(var b=this._instances,c=0,d=b.length;d>c;c++)b[c].setMasterMute(a);return!0}}),Object.defineProperty(b,"capabilities",{get:function(){return null==b.activePlugin?null:b.activePlugin._capabilities},set:function(){return!1}}),b._pluginsRegistered=!1,b._lastID=0,b._instances=[],b._idHash={},b._preloadHash={},b._defaultPlayPropsHash={},b.addEventListener=null,b.removeEventListener=null,b.removeAllEventListeners=null,b.dispatchEvent=null,b.hasEventListener=null,b._listeners=null,createjs.EventDispatcher.initialize(b),b.getPreloadHandlers=function(){return{callback:createjs.proxy(b.initLoad,b),types:["sound"],extensions:b.SUPPORTED_EXTENSIONS}},b._handleLoadComplete=function(a){var c=a.target.getItem().src;if(b._preloadHash[c])for(var d=0,e=b._preloadHash[c].length;e>d;d++){var f=b._preloadHash[c][d];if(b._preloadHash[c][d]=!0,b.hasEventListener("fileload")){var a=new createjs.Event("fileload");a.src=f.src,a.id=f.id,a.data=f.data,a.sprite=f.sprite,b.dispatchEvent(a)}}},b._handleLoadError=function(a){var c=a.target.getItem().src;if(b._preloadHash[c])for(var d=0,e=b._preloadHash[c].length;e>d;d++){var f=b._preloadHash[c][d];if(b._preloadHash[c][d]=!1,b.hasEventListener("fileerror")){var a=new createjs.Event("fileerror");a.src=f.src,a.id=f.id,a.data=f.data,a.sprite=f.sprite,b.dispatchEvent(a)}}},b._registerPlugin=function(a){return a.isSupported()?(b.activePlugin=new a,!0):!1},b.registerPlugins=function(a){b._pluginsRegistered=!0;for(var c=0,d=a.length;d>c;c++)if(b._registerPlugin(a[c]))return!0;return!1},b.initializeDefaultPlugins=function(){return null!=b.activePlugin?!0:b._pluginsRegistered?!1:b.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])?!0:!1},b.isReady=function(){return null!=b.activePlugin},b.getCapabilities=function(){return null==b.activePlugin?null:b.activePlugin._capabilities},b.getCapability=function(a){return null==b.activePlugin?null:b.activePlugin._capabilities[a]},b.initLoad=function(a){return b._registerSound(a)},b._registerSound=function(c){if(!b.initializeDefaultPlugins())return!1;var d;if(c.src instanceof Object?(d=b._parseSrc(c.src),d.src=c.path+d.src):d=b._parsePath(c.src),null==d)return!1;c.src=d.src,c.type="sound";var e=c.data,f=null;if(null!=e&&(isNaN(e.channels)?isNaN(e)||(f=parseInt(e)):f=parseInt(e.channels),e.audioSprite))for(var g,h=e.audioSprite.length;h--;)g=e.audioSprite[h],b._idHash[g.id]={src:c.src,startTime:parseInt(g.startTime),duration:parseInt(g.duration)},g.defaultPlayProps&&(b._defaultPlayPropsHash[g.id]=createjs.PlayPropsConfig.create(g.defaultPlayProps));null!=c.id&&(b._idHash[c.id]={src:c.src});var i=b.activePlugin.register(c);return a.create(c.src,f),null!=e&&isNaN(e)?c.data.channels=f||a.maxPerChannel():c.data=f||a.maxPerChannel(),i.type&&(c.type=i.type),c.defaultPlayProps&&(b._defaultPlayPropsHash[c.src]=createjs.PlayPropsConfig.create(c.defaultPlayProps)),i},b.registerSound=function(a,c,d,e,f){var g={src:a,id:c,data:d,defaultPlayProps:f};a instanceof Object&&a.src&&(e=c,g=a),g=createjs.LoadItem.create(g),g.path=e,null==e||g.src instanceof Object||(g.src=e+a);var h=b._registerSound(g);if(!h)return!1;if(b._preloadHash[g.src]||(b._preloadHash[g.src]=[]),b._preloadHash[g.src].push(g),1==b._preloadHash[g.src].length)h.on("complete",createjs.proxy(this._handleLoadComplete,this)),h.on("error",createjs.proxy(this._handleLoadError,this)),b.activePlugin.preload(h);else if(1==b._preloadHash[g.src][0])return!0;return g},b.registerSounds=function(a,b){var c=[];a.path&&(b?b+=a.path:b=a.path,a=a.manifest);for(var d=0,e=a.length;e>d;d++)c[d]=createjs.Sound.registerSound(a[d].src,a[d].id,a[d].data,b,a[d].defaultPlayProps);return c},b.removeSound=function(c,d){if(null==b.activePlugin)return!1;c instanceof Object&&c.src&&(c=c.src);var e;if(c instanceof Object?e=b._parseSrc(c):(c=b._getSrcById(c).src,e=b._parsePath(c)),null==e)return!1;c=e.src,null!=d&&(c=d+c);for(var f in b._idHash)b._idHash[f].src==c&&delete b._idHash[f];return a.removeSrc(c),delete b._preloadHash[c],b.activePlugin.removeSound(c),!0},b.removeSounds=function(a,b){var c=[];a.path&&(b?b+=a.path:b=a.path,a=a.manifest);for(var d=0,e=a.length;e>d;d++)c[d]=createjs.Sound.removeSound(a[d].src,b);return c},b.removeAllSounds=function(){b._idHash={},b._preloadHash={},a.removeAll(),b.activePlugin&&b.activePlugin.removeAllSounds()},b.loadComplete=function(a){if(!b.isReady())return!1;var c=b._parsePath(a);return a=c?b._getSrcById(c.src).src:b._getSrcById(a).src,void 0==b._preloadHash[a]?!1:1==b._preloadHash[a][0]},b._parsePath=function(a){"string"!=typeof a&&(a=a.toString());var c=a.match(b.FILE_PATTERN);if(null==c)return!1;for(var d=c[4],e=c[5],f=b.capabilities,g=0;!f[e];)if(e=b.alternateExtensions[g++],g>b.alternateExtensions.length)return null;a=a.replace("."+c[5],"."+e);var h={name:d,src:a,extension:e};return h},b._parseSrc=function(a){var c={name:void 0,src:void 0,extension:void 0},d=b.capabilities;for(var e in a)if(a.hasOwnProperty(e)&&d[e]){c.src=a[e],c.extension=e;break}if(!c.src)return!1;var f=c.src.lastIndexOf("/");return c.name=-1!=f?c.src.slice(f+1):c.src,c},b.play=function(a,c,d,e,f,g,h,i,j){var k;k=createjs.PlayPropsConfig.create(c instanceof Object||c instanceof createjs.PlayPropsConfig?c:{interrupt:c,delay:d,offset:e,loop:f,volume:g,pan:h,startTime:i,duration:j});var l=b.createInstance(a,k.startTime,k.duration),m=b._playInstance(l,k);return m||l._playFailed(),l},b.createInstance=function(c,d,e){if(!b.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(c,d,e);var f=b._defaultPlayPropsHash[c];c=b._getSrcById(c);var g=b._parsePath(c.src),h=null; +return null!=g&&null!=g.src?(a.create(g.src),null==d&&(d=c.startTime),h=b.activePlugin.create(g.src,d,e||c.duration),f=f||b._defaultPlayPropsHash[g.src],f&&h.applyPlayProps(f)):h=new createjs.DefaultSoundInstance(c,d,e),h.uniqueId=b._lastID++,h},b.stop=function(){for(var a=this._instances,b=a.length;b--;)a[b].stop()},b.setVolume=function(a){if(null==Number(a))return!1;if(a=Math.max(0,Math.min(1,a)),b._masterVolume=a,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(a))for(var c=this._instances,d=0,e=c.length;e>d;d++)c[d].setMasterVolume(a)},b.getVolume=function(){return this._masterVolume},b.setMute=function(a){if(null==a)return!1;if(this._masterMute=a,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(a))for(var b=this._instances,c=0,d=b.length;d>c;c++)b[c].setMasterMute(a);return!0},b.getMute=function(){return this._masterMute},b.setDefaultPlayProps=function(a,c){a=b._getSrcById(a),b._defaultPlayPropsHash[b._parsePath(a.src).src]=createjs.PlayPropsConfig.create(c)},b.getDefaultPlayProps=function(a){return a=b._getSrcById(a),b._defaultPlayPropsHash[b._parsePath(a.src).src]},b._playInstance=function(a,c){var d=b._defaultPlayPropsHash[a.src]||{};if(null==c.interrupt&&(c.interrupt=d.interrupt||b.defaultInterruptBehavior),null==c.delay&&(c.delay=d.delay||0),null==c.offset&&(c.offset=a.getPosition()),null==c.loop&&(c.loop=a.loop),null==c.volume&&(c.volume=a.volume),null==c.pan&&(c.pan=a.pan),0==c.delay){var e=b._beginPlaying(a,c);if(!e)return!1}else{var f=setTimeout(function(){b._beginPlaying(a,c)},c.delay);a.delayTimeoutId=f}return this._instances.push(a),!0},b._beginPlaying=function(b,c){if(!a.add(b,c.interrupt))return!1;var d=b._beginPlaying(c);if(!d){var e=createjs.indexOf(this._instances,b);return e>-1&&this._instances.splice(e,1),!1}return!0},b._getSrcById=function(a){return b._idHash[a]||{src:a}},b._playFinished=function(b){a.remove(b);var c=createjs.indexOf(this._instances,b);c>-1&&this._instances.splice(c,1)},createjs.Sound=Sound,a.channels={},a.create=function(b,c){var d=a.get(b);return null==d?(a.channels[b]=new a(b,c),!0):!1},a.removeSrc=function(b){var c=a.get(b);return null==c?!1:(c._removeAll(),delete a.channels[b],!0)},a.removeAll=function(){for(var b in a.channels)a.channels[b]._removeAll();a.channels={}},a.add=function(b,c){var d=a.get(b.src);return null==d?!1:d._add(b,c)},a.remove=function(b){var c=a.get(b.src);return null==c?!1:(c._remove(b),!0)},a.maxPerChannel=function(){return c.maxDefault},a.get=function(b){return a.channels[b]};var c=a.prototype;c.constructor=a,c.src=null,c.max=null,c.maxDefault=100,c.length=0,c.init=function(a,b){this.src=a,this.max=b||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},c._get=function(a){return this._instances[a]},c._add=function(a,b){return this._getSlot(b,a)?(this._instances.push(a),this.length++,!0):!1},c._remove=function(a){var b=createjs.indexOf(this._instances,a);return-1==b?!1:(this._instances.splice(b,1),this.length--,!0)},c._removeAll=function(){for(var a=this.length-1;a>=0;a--)this._instances[a].stop()},c._getSlot=function(a){var b,c;if(a!=Sound.INTERRUPT_NONE&&(c=this._get(0),null==c))return!0;for(var d=0,e=this.max;e>d;d++){if(b=this._get(d),null==b)return!0;if(b.playState==Sound.PLAY_FINISHED||b.playState==Sound.PLAY_INTERRUPTED||b.playState==Sound.PLAY_FAILED){c=b;break}a!=Sound.INTERRUPT_NONE&&(a==Sound.INTERRUPT_EARLY&&b.getPosition()c.getPosition())&&(c=b)}return null!=c?(c._interrupt(),this._remove(c),!0):!1},c.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var AbstractSoundInstance=function(a,b,c,d){this.EventDispatcher_constructor(),this.src=a,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this._pan=0,Object.defineProperty(this,"pan",{get:this.getPan,set:this.setPan}),this._startTime=Math.max(0,b||0),Object.defineProperty(this,"startTime",{get:this.getStartTime,set:this.setStartTime}),this._duration=Math.max(0,c||0),Object.defineProperty(this,"duration",{get:this.getDuration,set:this.setDuration}),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this.getPlaybackResource,set:this.setPlaybackResource}),d!==!1&&d!==!0&&this.setPlaybackResource(d),this._position=0,Object.defineProperty(this,"position",{get:this.getPosition,set:this.setPosition}),this._loop=0,Object.defineProperty(this,"loop",{get:this.getLoop,set:this.setLoop}),this._muted=!1,Object.defineProperty(this,"muted",{get:this.getMuted,set:this.setMuted}),this._paused=!1,Object.defineProperty(this,"paused",{get:this.getPaused,set:this.setPaused})},a=createjs.extend(AbstractSoundInstance,createjs.EventDispatcher);a.play=function(a,b,c,d,e,f){var g;return g=createjs.PlayPropsConfig.create(a instanceof Object||a instanceof createjs.PlayPropsConfig?a:{interrupt:a,delay:b,offset:c,loop:d,volume:e,pan:f}),this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(g),void(this._paused&&this.setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,g),this)},a.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},a.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},a.applyPlayProps=function(a){return null!=a.offset&&this.setPosition(a.offset),null!=a.loop&&this.setLoop(a.loop),null!=a.volume&&this.setVolume(a.volume),null!=a.pan&&this.setPan(a.pan),null!=a.startTime&&(this.setStartTime(a.startTime),this.setDuration(a.duration)),this},a.toString=function(){return"[AbstractSoundInstance]"},a.getPaused=function(){return this._paused},a.setPaused=function(a){return a!==!0&&a!==!1||this._paused==a||1==a&&this.playState!=createjs.Sound.PLAY_SUCCEEDED?void 0:(this._paused=a,a?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this)},a.setVolume=function(a){return a==this._volume?this:(this._volume=Math.max(0,Math.min(1,a)),this._muted||this._updateVolume(),this)},a.getVolume=function(){return this._volume},a.setMuted=function(a){return a===!0||a===!1?(this._muted=a,this._updateVolume(),this):void 0},a.getMuted=function(){return this._muted},a.setPan=function(a){return a==this._pan?this:(this._pan=Math.max(-1,Math.min(1,a)),this._updatePan(),this)},a.getPan=function(){return this._pan},a.getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},a.setPosition=function(a){return this._position=Math.max(0,a),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},a.getStartTime=function(){return this._startTime},a.setStartTime=function(a){return a==this._startTime?this:(this._startTime=Math.max(0,a||0),this._updateStartTime(),this)},a.getDuration=function(){return this._duration},a.setDuration=function(a){return a==this._duration?this:(this._duration=Math.max(0,a||0),this._updateDuration(),this)},a.setPlaybackResource=function(a){return this._playbackResource=a,0==this._duration&&this._setDurationFromSource(),this},a.getPlaybackResource=function(){return this._playbackResource},a.getLoop=function(){return this._loop},a.setLoop=function(a){null!=this._playbackResource&&(0!=this._loop&&0==a?this._removeLooping(a):0==this._loop&&0!=a&&this._addLooping(a)),this._loop=a},a._sendEvent=function(a){var b=new createjs.Event(a);this.dispatchEvent(b)},a._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},a._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},a._beginPlaying=function(a){return this.setPosition(a.offset),this.setLoop(a.loop),this.setVolume(a.volume),this.setPan(a.pan),null!=a.startTime&&(this.setStartTime(a.startTime),this.setDuration(a.duration)),null!=this._playbackResource&&this._positionc;c++){var e=this._soundInstances[b][c];e.setPlaybackResource(this._audioSources[b])}},a._handlePreloadError=function(){},a._updateVolume=function(){},createjs.AbstractPlugin=AbstractPlugin}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.SOUND)}var b=createjs.extend(a,createjs.AbstractLoader);a.context=null,b.toString=function(){return"[WebAudioLoader]"},b._createRequest=function(){this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},b._sendComplete=function(){a.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},b._handleAudioDecoded=function(a){this._result=a,this.AbstractLoader__sendComplete()},createjs.WebAudioLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function WebAudioSoundInstance(a,c,d,e){this.AbstractSoundInstance_constructor(a,c,d,e),this.gainNode=b.context.createGain(),this.panNode=b.context.createPanner(),this.panNode.panningModel=b._panningModel,this.panNode.connect(this.gainNode),this._updatePan(),this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var a=createjs.extend(WebAudioSoundInstance,createjs.AbstractSoundInstance),b=WebAudioSoundInstance;b.context=null,b._scratchBuffer=null,b.destinationNode=null,b._panningModel="equalpower",a.destroy=function(){this.AbstractSoundInstance_destroy(),this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},a.toString=function(){return"[WebAudioSoundInstance]"},a._updatePan=function(){this.panNode.setPosition(this._pan,0,-.5)},a._removeLooping=function(){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},a._addLooping=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},a._setDurationFromSource=function(){this._duration=1e3*this.playbackResource.duration},a._handleCleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout),this._playbackStartTime=0},a._cleanUpAudioNode=function(a){if(a){a.stop(0),a.disconnect(0);try{a.buffer=b._scratchBuffer}catch(c){}a=null}return a},a._handleSoundReady=function(){this.gainNode.connect(b.destinationNode);var a=.001*this._duration,c=.001*this._position;c>a&&(c=a),this.sourceNode=this._createAndPlayAudioNode(b.context.currentTime-a,c),this._playbackStartTime=this.sourceNode.startTime-c,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(a-c)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},a._createAndPlayAudioNode=function(a,c){var d=b.context.createBufferSource();d.buffer=this.playbackResource,d.connect(this.panNode);var e=.001*this._duration;return d.startTime=a+e,d.start(d.startTime,c+.001*this._startTime,e-c),d},a._pause=function(){this._position=1e3*(b.context.currentTime-this._playbackStartTime),this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout)},a._resume=function(){this._handleSoundReady()},a._updateVolume=function(){var a=this._muted?0:this._volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=a)},a._calculateCurrentPosition=function(){return 1e3*(b.context.currentTime-this._playbackStartTime)},a._updatePosition=function(){this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady()},a._handleLoop=function(){this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._playbackStartTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)},a._updateDuration=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause(),this._resume())},createjs.WebAudioSoundInstance=createjs.promote(WebAudioSoundInstance,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function WebAudioPlugin(){this.AbstractPlugin_constructor(),this._panningModel=b._panningModel,this.context=b.context,this.dynamicsCompressorNode=this.context.createDynamicsCompressor(),this.dynamicsCompressorNode.connect(this.context.destination),this.gainNode=this.context.createGain(),this.gainNode.connect(this.dynamicsCompressorNode),createjs.WebAudioSoundInstance.destinationNode=this.gainNode,this._capabilities=b._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses()}var a=createjs.extend(WebAudioPlugin,createjs.AbstractPlugin),b=WebAudioPlugin;b._capabilities=null,b._panningModel="equalpower",b.context=null,b._scratchBuffer=null,b._unlocked=!1,b.isSupported=function(){var a=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return"file:"!=location.protocol||a||this._isFileXHRSupported()?(b._generateCapabilities(),null==b.context?!1:!0):!1},b.playEmptySound=function(){if(null!=b.context){var a=b.context.createBufferSource();a.buffer=b._scratchBuffer,a.connect(b.context.destination),a.start(0,0,0)}},b._isFileXHRSupported=function(){var a=!0,b=new XMLHttpRequest;try{b.open("GET","WebAudioPluginTest.fail",!1)}catch(c){return a=!1}b.onerror=function(){a=!1},b.onload=function(){a=404==this.status||200==this.status||0==this.status&&""!=this.response};try{b.send()}catch(c){a=!1}return a},b._generateCapabilities=function(){if(null==b._capabilities){var a=document.createElement("audio");if(null==a.canPlayType)return null;if(null==b.context)if(window.AudioContext)b.context=new AudioContext;else{if(!window.webkitAudioContext)return null;b.context=new webkitAudioContext}null==b._scratchBuffer&&(b._scratchBuffer=b.context.createBuffer(1,1,22050)),b._compatibilitySetUp(),"ontouchstart"in window&&"running"!=b.context.state&&(b._unlock(),document.addEventListener("mousedown",b._unlock,!0),document.addEventListener("touchend",b._unlock,!0)),b._capabilities={panning:!0,volume:!0,tracks:-1};for(var c=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=c.length;f>e;e++){var g=c[e],h=d[g]||g;b._capabilities[g]="no"!=a.canPlayType("audio/"+g)&&""!=a.canPlayType("audio/"+g)||"no"!=a.canPlayType("audio/"+h)&&""!=a.canPlayType("audio/"+h)}b.context.destination.numberOfChannels<2&&(b._capabilities.panning=!1)}},b._compatibilitySetUp=function(){if(b._panningModel="equalpower",!b.context.createGain){b.context.createGain=b.context.createGainNode;var a=b.context.createBufferSource();a.__proto__.start=a.__proto__.noteGrainOn,a.__proto__.stop=a.__proto__.noteOff,b._panningModel=0}},b._unlock=function(){b._unlocked||(b.playEmptySound(),"running"==b.context.state&&(document.removeEventListener("mousedown",b._unlock,!0),document.removeEventListener("touchend",b._unlock,!0),b._unlocked=!0))},a.toString=function(){return"[WebAudioPlugin]"},a._addPropsToClasses=function(){var a=this._soundInstanceClass;a.context=this.context,a._scratchBuffer=b._scratchBuffer,a.destinationNode=this.gainNode,a._panningModel=this._panningModel,this._loaderClass.context=this.context},a._updateVolume=function(){var a=createjs.Sound._masterMute?0:this._volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=a)},createjs.WebAudioPlugin=createjs.promote(WebAudioPlugin,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function HTMLAudioTagPool(){throw"HTMLAudioTagPool cannot be instantiated"}function a(){this._tags=[]}var b=HTMLAudioTagPool;b._tags={},b._tagPool=new a,b._tagUsed={},b.get=function(a){var c=b._tags[a];return null==c?(c=b._tags[a]=b._tagPool.get(),c.src=a):b._tagUsed[a]?(c=b._tagPool.get(),c.src=a):b._tagUsed[a]=!0,c},b.set=function(a,c){c==b._tags[a]?b._tagUsed[a]=!1:b._tagPool.set(c)},b.remove=function(a){var c=b._tags[a];return null==c?!1:(b._tagPool.set(c),delete b._tags[a],delete b._tagUsed[a],!0)},b.getDuration=function(a){var c=b._tags[a];return null!=c&&c.duration?1e3*c.duration:0},createjs.HTMLAudioTagPool=HTMLAudioTagPool;var c=a.prototype;c.constructor=a,c.get=function(){var a;return a=0==this._tags.length?this._createTag():this._tags.pop(),null==a.parentNode&&document.body.appendChild(a),a},c.set=function(a){var b=createjs.indexOf(this._tags,a);-1==b&&(this._tags.src=null,this._tags.push(a))},c.toString=function(){return"[TagPool]"},c._createTag=function(){var a=document.createElement("audio");return a.autoplay=!1,a.preload="none",a}}(),this.createjs=this.createjs||{},function(){"use strict";function HTMLAudioSoundInstance(a,b,c,d){this.AbstractSoundInstance_constructor(a,b,c,d),this._audioSpriteStopTime=null,this._delayTimeoutId=null,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleTagReady,this),this._stalledHandler=createjs.proxy(this._playFailed,this),this._audioSpriteEndHandler=createjs.proxy(this._handleAudioSpriteLoop,this),this._loopHandler=createjs.proxy(this._handleSoundComplete,this),c?this._audioSpriteStopTime=.001*(b+c):this._duration=createjs.HTMLAudioTagPool.getDuration(this.src)}var a=createjs.extend(HTMLAudioSoundInstance,createjs.AbstractSoundInstance);a.setMasterVolume=function(){this._updateVolume()},a.setMasterMute=function(){this._updateVolume()},a.toString=function(){return"[HTMLAudioSoundInstance]"},a._removeLooping=function(){null!=this._playbackResource&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},a._addLooping=function(){null==this._playbackResource||this._audioSpriteStopTime||(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)},a._handleCleanUp=function(){var a=this._playbackResource;if(null!=a){a.pause(),a.loop=!1,a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1);try{a.currentTime=this._startTime}catch(b){}createjs.HTMLAudioTagPool.set(this.src,a),this._playbackResource=null}},a._beginPlaying=function(a){return this._playbackResource=createjs.HTMLAudioTagPool.get(this.src),this.AbstractSoundInstance__beginPlaying(a)},a._handleSoundReady=function(){if(4!==this._playbackResource.readyState){var a=this._playbackResource;return a.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),a.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),a.preload="auto",void a.load()}this._updateVolume(),this._playbackResource.currentTime=.001*(this._startTime+this._position),this._audioSpriteStopTime?this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1):(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),0!=this._loop&&(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)),this._playbackResource.play()},a._handleTagReady=function(){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),this._handleSoundReady()},a._pause=function(){this._playbackResource.pause()},a._resume=function(){this._playbackResource.play()},a._updateVolume=function(){if(null!=this._playbackResource){var a=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;a!=this._playbackResource.volume&&(this._playbackResource.volume=a)}},a._calculateCurrentPosition=function(){return 1e3*this._playbackResource.currentTime-this._startTime},a._updatePosition=function(){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1);try{this._playbackResource.currentTime=.001*(this._position+this._startTime)}catch(a){this._handleSetPositionSeek(null)}},a._handleSetPositionSeek=function(){null!=this._playbackResource&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},a._handleAudioSpriteLoop=function(){this._playbackResource.currentTime<=this._audioSpriteStopTime||(this._playbackResource.pause(),0==this._loop?this._handleSoundComplete(null):(this._position=0,this._loop--,this._playbackResource.currentTime=.001*this._startTime,this._paused||this._playbackResource.play(),this._sendEvent("loop")))},a._handleLoop=function(){0==this._loop&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},a._updateStartTime=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},a._updateDuration=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},a._setDurationFromSource=function(){this._duration=createjs.HTMLAudioTagPool.getDuration(this.src),this._playbackResource=null},createjs.HTMLAudioSoundInstance=createjs.promote(HTMLAudioSoundInstance,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function HTMLAudioPlugin(){this.AbstractPlugin_constructor(),this.defaultNumChannels=2,this._capabilities=b._capabilities,this._loaderClass=createjs.SoundLoader,this._soundInstanceClass=createjs.HTMLAudioSoundInstance}var a=createjs.extend(HTMLAudioPlugin,createjs.AbstractPlugin),b=HTMLAudioPlugin;b.MAX_INSTANCES=30,b._AUDIO_READY="canplaythrough",b._AUDIO_ENDED="ended",b._AUDIO_SEEKED="seeked",b._AUDIO_STALLED="stalled",b._TIME_UPDATE="timeupdate",b._capabilities=null,b.isSupported=function(){return b._generateCapabilities(),null!=b._capabilities},b._generateCapabilities=function(){if(null==b._capabilities){var a=document.createElement("audio");if(null==a.canPlayType)return null;b._capabilities={panning:!1,volume:!0,tracks:-1};for(var c=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=c.length;f>e;e++){var g=c[e],h=d[g]||g;b._capabilities[g]="no"!=a.canPlayType("audio/"+g)&&""!=a.canPlayType("audio/"+g)||"no"!=a.canPlayType("audio/"+h)&&""!=a.canPlayType("audio/"+h)}}},a.register=function(a){var b=createjs.HTMLAudioTagPool.get(a.src),c=this.AbstractPlugin_register(a);return c.setTag(b),c},a.removeSound=function(a){this.AbstractPlugin_removeSound(a),createjs.HTMLAudioTagPool.remove(a)},a.create=function(a,b,c){var d=this.AbstractPlugin_create(a,b,c);return d.setPlaybackResource(null),d},a.toString=function(){return"[HTMLAudioPlugin]"},a.setVolume=a.getVolume=a.setMute=null,createjs.HTMLAudioPlugin=createjs.promote(HTMLAudioPlugin,"AbstractPlugin")}(); \ No newline at end of file diff --git a/Server/www/spiderbasic/sql.min.js b/Server/www/spiderbasic/sql.min.js new file mode 100644 index 0000000..ff32644 --- /dev/null +++ b/Server/www/spiderbasic/sql.min.js @@ -0,0 +1,473 @@ +// This prevents pollution of the global namespace +var SQL = (function () { +var e;e||(e=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var aa={},ba;for(ba in e)e.hasOwnProperty(ba)&&(aa[ba]=e[ba]);var ca=!1,k=!1,l=!1,da=!1; +if(e.ENVIRONMENT)if("WEB"===e.ENVIRONMENT)ca=!0;else if("WORKER"===e.ENVIRONMENT)k=!0;else if("NODE"===e.ENVIRONMENT)l=!0;else if("SHELL"===e.ENVIRONMENT)da=!0;else throw Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ca="object"===typeof window,k="function"===typeof importScripts,l="object"===typeof process&&"function"===typeof require&&!ca&&!k,da=!ca&&!l&&!k; +if(l){e.print||(e.print=console.log);e.printErr||(e.printErr=console.warn);var ea,fa;e.read=function(a,b){ea||(ea=require("fs"));fa||(fa=require("path"));a=fa.normalize(a);var c=ea.readFileSync(a);return b?c:c.toString()};e.readBinary=function(a){a=e.read(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};e.load=function(a){ga(read(a))};e.thisProgram||(e.thisProgram=1 0) var gc = undefined");else if(ca||k)e.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},k&&(e.readBinary=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}), +e.readAsync=function(a,b,c){var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)},"undefined"!=typeof arguments&&(e.arguments=arguments),"undefined"!==typeof console?(e.print||(e.print=function(a){console.log(a)}),e.printErr||(e.printErr=function(a){console.warn(a)})):e.print||(e.print=function(){}),k&&(e.load=importScripts),"undefined"===typeof e.setWindowTitle&&(e.setWindowTitle= +function(a){document.title=a});else throw"Unknown runtime environment. Where are we?";function ga(a){eval.call(null,a)}!e.load&&e.read&&(e.load=function(a){ga(e.read(a))});e.print||(e.print=function(){});e.printErr||(e.printErr=e.print);e.arguments||(e.arguments=[]);e.thisProgram||(e.thisProgram="./this.program");e.quit||(e.quit=function(a,b){throw b;});e.print=e.print;e.Z=e.printErr;e.preRun=[];e.postRun=[];for(ba in aa)aa.hasOwnProperty(ba)&&(e[ba]=aa[ba]); +var aa=void 0,n={tb:function(a){return tempRet0=a},hb:function(){return tempRet0},$:function(){return m},Q:function(a){m=a},Ga:function(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-1]?n.U:"i"===a[0]?(a=parseInt(a.substr(1)),assert(0===a%8),a/8):0}},eb:function(a){return Math.max(n.Ga(a),n.U)},Qd:16,ke:function(a,b){"double"===b||"i64"===b?a&7&&(assert(4===(a&7)),a+= +4):assert(0===(a&3));return a},$d:function(a,b,c){return c||"i64"!=a&&"double"!=a?a?Math.min(b||(a?n.eb(a):0),n.U):Math.min(b,8):8},ga:function(a,b,c){return c&&c.length?e["dynCall_"+a].apply(null,[b].concat(c)):e["dynCall_"+a].call(null,b)},j:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null, +null,null,null,null,null,null,null,null,null,null,null,null],ua:function(a){for(var b=0;b>2];a=(b+a+15|0)&-16;t[ia>>2]=a;if(a=a>=ja)ka(),a=!0;return a?(t[ia>>2]=b,0):b},va:function(a,b){return Math.ceil(a/(b?b:16))*(b?b:16)}, +je:function(a,b,c){return c?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},G:8,U:4,Td:0};e.Runtime=n;n.addFunction=n.ua;n.removeFunction=n.pb;var la=0;function assert(a,b){a||u("Assertion failed: "+b)}function na(a){var b=e["_"+a];if(!b)try{b=eval("_"+a)}catch(c){}assert(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return b}var oa,pa; +(function(){function a(a){a=a.toString().match(f).slice(1);return{arguments:a[0],body:a[1],returnValue:a[2]}}function b(){if(!g){g={};for(var b in c)c.hasOwnProperty(b)&&(g[b]=a(c[b]))}}var c={stackSave:function(){n.$()},stackRestore:function(){n.Q()},arrayToC:function(a){var b=n.D(a.length);qa(a,b);return b},stringToC:function(a){var b=0;if(null!==a&&void 0!==a&&0!==a){var c=(a.length<<2)+1,b=n.D(c);ra(a,b,c)}return b}},d={string:c.stringToC,array:c.arrayToC};pa=function(a,b,c,f,g){a=na(a);var B= +[],R=0;if(f)for(var G=0;G>0]=b;break;case "i8":x[a>>0]=b;break;case "i16":ta[a>>1]=b;break;case "i32":t[a>>2]=b;break;case "i64":tempI64=[b>>>0,(tempDouble=b,1<=+ua(tempDouble)?0>>0:~~+xa((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)];t[a>>2]=tempI64[0];t[a+4>>2]=tempI64[1];break;case "float":ya[a>>2]=b;break;case "double":za[a>>3]=b;break;default:u("invalid type for setValue: "+ +c)}}e.setValue=sa;function y(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return x[a>>0];case "i8":return x[a>>0];case "i16":return ta[a>>1];case "i32":return t[a>>2];case "i64":return t[a>>2];case "float":return ya[a>>2];case "double":return za[a>>3];default:u("invalid type for setValue: "+b)}return null}e.getValue=y;e.ALLOC_NORMAL=0;e.ALLOC_STACK=1;e.ALLOC_STATIC=2;e.ALLOC_DYNAMIC=3;e.ALLOC_NONE=4; +function z(a,b,c,d){var f,g;"number"===typeof a?(f=!0,g=a):(f=!1,g=a.length);var h="string"===typeof b?b:null,p;4==c?p=d:p=["function"===typeof Aa?Aa:n.oa,n.D,n.oa,n.Ba][void 0===c?2:c](Math.max(g,h?1:b.length));if(f){d=p;assert(0==(p&3));for(a=p+(g&-4);d>2]=0;for(a=p+g;d>0]=0;return p}if("i8"===h)return a.subarray||a.slice?A.set(a,p):A.set(new Uint8Array(a),p),p;d=0;for(var r,v;d>0];c|=d;if(0==d&&!b)break;f++;if(b&&f==b)break}b||(b=f);d="";if(128>c){for(;0>0];if(!c)return b;b+=String.fromCharCode(c)}}; +e.stringToAscii=function(a,b){return Da(a,b,!1)};var Ea="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0; +function Fa(a,b){for(var c=b;a[c];)++c;if(16d?c+=String.fromCharCode(d):(d-=65536,c+=String.fromCharCode(55296|d>> +10,56320|d&1023)))):c+=String.fromCharCode(d)}}e.UTF8ArrayToString=Fa;e.UTF8ToString=function(a){return Fa(A,a)}; +function Ga(a,b,c,d){if(!(0=h&&(h=65536+((h&1023)<<10)|a.charCodeAt(++g)&1023);if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(2097151>=h){if(c+3>=d)break;b[c++]=240|h>>18}else{if(67108863>=h){if(c+4>=d)break;b[c++]=248|h>>24}else{if(c+5>=d)break;b[c++]=252|h>>30;b[c++]=128|h>>24&63}b[c++]=128|h>>18&63}b[c++]=128| +h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-f}e.stringToUTF8Array=Ga;function ra(a,b,c){return Ga(a,A,b,c)}e.stringToUTF8=ra;function Ha(a){for(var b=0,c=0;c=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:2097151>=d?b+4:67108863>=d?b+5:b+6}return b}e.lengthBytesUTF8=Ha;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le"); +function Ia(a){return a.replace(/__Z[\w\d_]+/g,function(a){var c;a:{var d=e.___cxa_demangle||e.__cxa_demangle;if(d)try{var f=a.substr(1),g=Ha(f)+1,h=Aa(g);ra(f,h,g);var p=Aa(4),r=d(h,0,0,p);if(0===y(p,"i32")&&r){c=w(r);break a}}catch(v){}finally{h&&Ja(h),p&&Ja(p),r&&Ja(r)}else n.K("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");c=a}return a===c?a:a+" ["+c+"]"})} +function Ka(){var a;a:{a=Error();if(!a.stack){try{throw Error(0);}catch(b){a=b}if(!a.stack){a="(no stack trace available)";break a}}a=a.stack.toString()}e.extraStackTrace&&(a+="\n"+e.extraStackTrace());return Ia(a)}e.stackTrace=Ka;var buffer,x,A,ta,La,t,Ma,ya,za,Na,q,Ba,Oa,m,Pa,Qa,ia;Na=q=Oa=m=Pa=Qa=ia=0;Ba=!1; +function ka(){u("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+ja+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}var Ra=e.TOTAL_STACK||5242880,ja=e.TOTAL_MEMORY||16777216; +ja>0]=a.charCodeAt(d);c||(x[b>>0]=0)}e.writeAsciiToMemory=Da;Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(a,b){var c=a&65535,d=b&65535;return c*d+((a>>>16)*d+c*(b>>>16)<<16)|0}); +Math.ee=Math.imul;Math.clz32||(Math.clz32=function(a){a=a>>>0;for(var b=0;32>b;b++)if(a&1<<31-b)return b;return 32});Math.Xd=Math.clz32;Math.trunc||(Math.trunc=function(a){return 0>a?Math.ceil(a):Math.floor(a)});Math.trunc=Math.trunc;var ua=Math.abs,xa=Math.ceil,wa=Math.floor,ab=Math.pow,va=Math.min,bb=0,cb=null,db=null;function eb(){bb++;e.monitorRunDependencies&&e.monitorRunDependencies(bb)}e.addRunDependency=eb; +function fb(){bb--;e.monitorRunDependencies&&e.monitorRunDependencies(bb);if(0==bb&&(null!==cb&&(clearInterval(cb),cb=null),db)){var a=db;db=null;a()}}e.removeRunDependency=fb;e.preloadedImages={};e.preloadedAudios={};Na=n.G;q=Na+48976;Ua.push(); +z([1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,254,255,255,127,0,0,0,0,128,0,0,0,244,1,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,100,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,127,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,170,61,0,0,1,0,1,0,130,0,0,0,175,61,0,0,1,0,1,0,131,0,0,0,180,61,0,0,1,0,1,0,132,0,0,0,185,61,0,0,2,0,1,0,133,0,0,0,190,61,0,0,2,0,1,0,133,0,0,0,196,61,0,0,1,0,1,0,134,0,0,0,202,61,0,0,1,0,1,0,135,0,0,0,208,61,0,0,1,0,1,0,136,0,0,0,214,61,0,0,2,0,1,0,137,0,0,0,225,61,0,0,1,0,1,0,138,0,0,0,233,61,0,0,1,0,1,0,139,0,0,0,241,61,0,0,1,0,1, +0,140,0,0,0,245,61,0,0,1,0,1,0,141,0,0,0,249,61,0,0,1,0,1,0,142,0,0,0,253,61,0,0,1,0,1,0,143,0,0,0,1,62,0,0,1,0,1,0,144,0,0,0,6,62,0,0,1,0,1,0,145,0,0,0,11,62,0,0,1,0,1,0,146,0,0,0,16,62,0,0,1,0,1,0,147,0,0,0,21,62,0,0,1,0,1,0,148,0,0,0,221,113,0,0,1,0,1,0,149,0,0,0,25,62,0,0,1,0,1,0,150,0,0,0,31,62,0,0,2,0,1,0,151,0,0,0,37,62,0,0,1,0,1,0,152,0,0,0,42,62,0,0,1,0,1,0,153,0,0,0,47,62,0,0,1,0,1,0,154,0,0,0,54,62,0,0,1,0,1,0,155,0,0,0,59,62,0,0,1,0,1,0,156,0,0,0,65,62,0,0,0,0,1,1,157,0,0,0,68,62,0,0, +2,0,1,0,158,0,0,0,78,62,0,0,2,0,1,0,159,0,0,0,78,62,0,0,3,0,1,0,159,0,0,0,88,62,0,0,2,0,1,0,160,0,0,0,96,62,0,0,2,0,1,0,161,0,0,0,105,62,0,0,1,0,1,0,162,0,0,0,113,62,0,0,1,0,1,0,163,0,0,0,120,62,0,0,2,0,1,0,164,0,0,0,125,62,0,0,2,0,1,0,165,0,0,0,130,62,0,0,2,0,1,0,166,0,0,0,135,62,0,0,2,0,1,0,167,0,0,0,145,62,0,0,1,0,0,0,168,0,0,0,130,0,0,0,151,62,0,0,1,0,0,0,168,0,0,0,131,0,0,0,212,108,0,0,1,0,0,0,169,0,0,0,132,0,0,0,160,62,0,0,1,0,0,0,169,0,0,0,133,0,0,0,167,62,0,0,1,0,0,0,169,0,0,0,134,0,0,0,182, +62,0,0,1,0,0,0,169,0,0,0,135,0,0,0,0,0,0,0,128,48,0,0,128,32,14,0,128,32,200,3,0,0,0,0,128,255,255,255,0,248,255,255,0,0,255,255,1,0,0,0,69,67,0,0,90,67,0,0,102,67,0,0,114,67,0,0,138,67,0,0,149,67,0,0,169,67,0,0,183,67,0,0,3,0,0,0,44,0,0,0,0,2,0,0,0,0,0,0,193,69,0,0,44,5,0,0,130,0,0,0,130,0,0,0,130,0,0,0,131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,0,0,0,130,0,0,0,131,0,0,0,132,0,0,0,132,0,0,0,133,0,0,0,133,0,0,0,134,0,0,0,3,0,0,0,44,0,0,0,0,2,0,0,0,0,0,0,198,69,0,0,48,5,0,0,130,0,0,0,130,0,0,0, +130,0,0,0,131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,0,0,0,130,0,0,0,131,0,0,0,132,0,0,0,132,0,0,0,133,0,0,0,133,0,0,0,134,0,0,0,3,0,0,0,44,0,0,0,0,2,0,0,0,0,0,0,208,69,0,0,52,5,0,0,130,0,0,0,130,0,0,0,130,0,0,0,131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,0,0,0,130,0,0,0,131,0,0,0,132,0,0,0,132,0,0,0,133,0,0,0,133,0,0,0,134,0,0,0,3,0,0,0,44,0,0,0,0,2,0,0,0,0,0,0,221,69,0,0,44,5,0,0,130,0,0,0,130,0,0,0,130,0,0,0,131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,0,0,0,130,0,0,0,131,0,0,0,132,0,0,0, +132,0,0,0,133,0,0,0,133,0,0,0,134,0,0,0,135,0,0,0,136,0,0,0,137,0,0,0,1,0,0,0,130,0,0,0,131,0,0,0,132,0,0,0,134,0,0,0,138,0,0,0,139,0,0,0,140,0,0,0,141,0,0,0,142,0,0,0,135,0,0,0,131,0,0,0,132,0,0,0,0,0,0,0,132,0,0,0,136,0,0,0,143,0,0,0,133,0,0,0,133,0,0,0,12,70,0,0,136,0,0,0,0,0,0,0,231,69,0,0,133,0,0,0,0,0,0,0,17,70,0,0,144,0,0,0,0,0,0,0,24,70,0,0,145,0,0,0,0,0,0,0,31,70,0,0,146,0,0,0,0,0,0,0,36,70,0,0,147,0,0,0,0,0,0,0,42,70,0,0,148,0,0,0,0,0,0,0,52,70,0,0,137,0,0,0,0,0,0,0,58,70,0,0,138,0,0,0, +0,0,0,0,63,70,0,0,0,0,0,0,0,0,0,0,69,70,0,0,0,0,0,0,0,0,0,0,77,70,0,0,139,0,0,0,0,0,0,0,83,70,0,0,0,0,0,0,0,0,0,0,90,70,0,0,0,0,0,0,0,0,0,0,99,70,0,0,149,0,0,0,0,0,0,0,106,70,0,0,0,0,0,0,0,0,0,0,116,70,0,0,134,0,0,0,0,0,0,0,123,70,0,0,150,0,0,0,0,0,0,0,137,70,0,0,151,0,0,0,0,0,0,0,143,70,0,0,135,0,0,0,0,0,0,0,149,70,0,0,140,0,0,0,0,0,0,0,156,70,0,0,130,0,0,0,0,0,0,0,164,70,0,0,130,0,0,0,0,0,0,0,169,70,0,0,152,0,0,0,0,0,0,0,176,70,0,0,0,0,0,0,0,0,0,0,183,70,0,0,131,0,0,0,0,0,0,0,195,70,0,0,141,0,0, +0,0,0,0,0,204,70,0,0,153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,71,0,0,74,71,0,0,83,71,0,0,191,69,0,0,3,0,0,0,136,0,0,0,131,0,0,0,132,0,0,0,134,0,0,0,138,0,0,0,139,0,0,0,154,0,0,0,155,0,0,0,156,0,0,0,135,0,0,0,131,0,0,0,132,0,0,0,0,0,0,0,132,0,0,0,136,0,0,0,143,0,0,0,133,0,0,0,133,0,0,0,3,0,0,0,137,0,0,0,131,0,0,0,132,0,0,0,134,0,0,0,138,0,0,0,139,0,0,0,157,0,0,0,158,0,0,0,159,0,0,0,135,0,0,0,131,0,0,0,132,0,0,0,134,0,0,0,132,0,0,0,136,0,0,0,143,0,0,0,133,0,0,0,133,0,0,0,0,0,0,64,1,0,0,0,0,0,0,0,138,0, +0,0,137,0,0,0,142,0,0,0,130,0,0,0,139,0,0,0,143,0,0,0,170,0,0,0,130,0,0,0,131,0,0,0,138,0,0,0,139,0,0,0,140,0,0,0,140,0,0,0,160,0,0,0,141,0,0,0,142,0,0,0,143,0,0,0,141,0,0,0,0,0,0,0,1,0,1,32,0,0,0,0,0,0,0,0,171,0,0,0,0,0,0,0,133,72,0,0,0,0,0,0,1,0,1,32,0,0,0,0,0,0,0,0,172,0,0,0,0,0,0,0,159,72,0,0,0,0,0,0,1,0,1,12,0,0,0,0,0,0,0,0,173,0,0,0,0,0,0,0,184,72,0,0,0,0,0,0,2,0,1,12,0,0,0,0,0,0,0,0,173,0,0,0,0,0,0,0,193,72,0,0,0,0,0,0,1,0,1,12,0,0,0,0,0,0,0,0,173,0,0,0,0,0,0,0,204,72,0,0,0,0,0,0,1,0,1,8,1, +0,0,0,0,0,0,0,174,0,0,0,0,0,0,0,211,72,0,0,0,0,0,0,2,0,1,8,1,0,0,0,0,0,0,0,174,0,0,0,0,0,0,0,211,72,0,0,0,0,0,0,1,0,1,8,2,0,0,0,0,0,0,0,174,0,0,0,0,0,0,0,217,72,0,0,0,0,0,0,2,0,1,8,2,0,0,0,0,0,0,0,174,0,0,0,0,0,0,0,217,72,0,0,0,0,0,0,1,0,1,8,3,0,0,0,0,0,0,0,174,0,0,0,0,0,0,0,223,72,0,0,0,0,0,0,2,0,1,8,3,0,0,0,0,0,0,0,174,0,0,0,0,0,0,0,223,72,0,0,0,0,0,0,255,0,33,8,0,0,0,0,0,0,0,0,175,0,0,0,0,0,0,0,228,72,0,0,0,0,0,0,0,0,33,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,72,0,0,0,0,0,0,1,0,33,16,0,0,0,0,0,0, +0,0,176,0,0,0,142,0,0,0,228,72,0,0,0,0,0,0,255,0,33,8,1,0,0,0,0,0,0,0,175,0,0,0,0,0,0,0,232,72,0,0,0,0,0,0,0,0,33,8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,72,0,0,0,0,0,0,1,0,33,16,1,0,0,0,0,0,0,0,176,0,0,0,142,0,0,0,232,72,0,0,0,0,0,0,1,0,129,8,0,0,0,0,0,0,0,0,177,0,0,0,0,0,0,0,236,72,0,0,0,0,0,0,1,0,65,8,0,0,0,0,0,0,0,0,178,0,0,0,0,0,0,0,243,72,0,0,0,0,0,0,2,0,1,8,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,250,72,0,0,0,0,0,0,255,0,1,8,0,0,0,0,0,0,0,0,180,0,0,0,0,0,0,0,0,73,0,0,0,0,0,0,1,0,1,8,0,0,0,0,0,0,0, +0,181,0,0,0,0,0,0,0,7,73,0,0,0,0,0,0,255,0,1,8,0,0,0,0,0,0,0,0,182,0,0,0,0,0,0,0,15,73,0,0,0,0,0,0,1,0,1,8,0,0,0,0,0,0,0,0,183,0,0,0,0,0,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0,0,0,2,0,1,8,0,0,0,0,0,0,0,0,199,0,0,0,0,0,0,0,184,73,0,0,0,0,0,0,3,0,1,8,0,0,0,0,0,0,0,0,199,0,0,0,0,0,0,0,184,73,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,200,0,0,0,143,0,0,0,191,73,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,200,0,0,0,144,0,0,0,195,73,0,0,0,0,0,0,1,0,1,0, +0,0,0,0,0,0,0,0,200,0,0,0,145,0,0,0,201,73,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,201,0,0,0,146,0,0,0,205,73,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,201,0,0,0,146,0,0,0,205,73,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,202,0,0,0,147,0,0,0,211,73,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,202,0,0,0,147,0,0,0,211,73,0,0,0,0,0,0,2,0,13,8,224,73,0,0,0,0,0,0,203,0,0,0,0,0,0,0,228,73,0,0,0,0,0,0,2,0,5,8,233,73,0,0,0,0,0,0,203,0,0,0,0,0,0,0,237,73,0,0,0,0,0,0,3,0,5,8,233,73,0,0,0,0,0,0,203,0,0,0,0,0,0,0,237,73,0,0,0,0,0,0,1, +0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,242,73,0,0,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,242,73,0,0,0,0,0,0,255,0,1,10,0,0,0,0,0,0,0,0,173,0,0,0,0,0,0,0,242,73,0,0,0,0,0,0,22,75,0,0,35,75,0,0,0,0,0,0,71,75,0,0,96,75,0,0,127,75,0,0,146,75,0,0,171,75,0,0,185,75,0,0,222,75,0,0,234,75,0,0,249,75,0,0,26,76,0,0,44,76,0,0,69,76,0,0,98,76,0,0,115,76,0,0,138,76,0,0,149,74,0,0,166,76,0,0,184,76,0,0,202,76,0,0,241,76,0,0,16,77,0,0,37,77,0,0,69,77,0,0,103,77,0,0,199,77,0,0,255,0,1,32,0,0,0,0,0,0,0,0, +204,0,0,0,0,0,0,0,201,77,0,0,0,0,0,0,255,0,1,32,0,0,0,0,0,0,0,0,205,0,0,0,0,0,0,0,211,77,0,0,0,0,0,0,255,0,1,32,0,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,216,77,0,0,0,0,0,0,255,0,1,32,0,0,0,0,0,0,0,0,207,0,0,0,0,0,0,0,221,77,0,0,0,0,0,0,255,0,1,32,0,0,0,0,0,0,0,0,208,0,0,0,0,0,0,0,230,77,0,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,0,0,209,0,0,0,0,0,0,0,239,77,0,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,0,0,210,0,0,0,0,0,0,0,252,77,0,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,14,78,0,0,0,0,0,0,2,0,1,8,0,0,0,0,0,0,0,0, +212,0,0,0,0,0,0,0,251,78,0,0,0,0,0,0,2,0,1,8,0,0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,15,79,0,0,0,0,0,0,3,0,1,8,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,37,79,0,0,0,0,0,0,1,0,0,0,144,0,0,0,135,0,0,0,136,0,0,0,144,0,0,0,161,0,0,0,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,86,0,0,105,86,0,0,112,86,0,0,115,86,0,0,118,86,0,0,121,86,0,0,124,86,0,0,127,86,0,0,135,86,0,0,144,86,0,0,150,86,0,0,155,86,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, +235,119,0,0,1,0,0,0,207,92,0,0,1,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,215,0,0,0,0,0,0,0,209,105,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,216,0,0,0,0,0,0,0,199,105,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,217,0,0,0,0,0,0,0,179,105,0,0,0,0,0,0,176,93,0,0,16,106,0,0,29,106,0,0,0,0,0,0,42,106,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,218,0,0,0,0,0,0,0,109,107,0,0,0,0,0,0,3,0,1,0,0,0,0,0,0,0,0,0,219,0,0,0,0,0,0,0,234,107,0,0,0,0,0,0,38,109,0,0,0,0,2,0,45,109,0,0,0,0,4,0,0,0,0,0,0,0,0,0,21,109,0,0,1,0,0,0,24,109,0,0,2,0,0,0, +27,109,0,0,6,0,0,0,31,109,0,0,128,0,0,0,0,0,0,0,0,0,0,0,113,116,0,0,0,0,0,0,8,0,0,0,174,111,0,0,1,1,0,0,0,0,0,0,128,116,0,0,2,0,0,0,0,0,16,0,144,116,0,0,3,0,0,0,0,0,0,0,41,111,0,0,4,1,0,0,0,0,0,0,206,111,0,0,5,0,0,0,0,0,0,0,157,116,0,0,6,0,0,0,0,0,0,0,177,116,0,0,2,0,0,0,0,0,0,32,193,116,0,0,2,0,0,0,16,0,0,0,214,116,0,0,7,0,0,0,0,0,0,0,229,116,0,0,8,0,0,0,0,0,0,0,245,116,0,0,2,0,0,0,128,0,0,0,3,117,0,0,0,2,0,0,15,0,0,0,16,117,0,0,10,1,0,0,0,0,0,0,30,117,0,0,11,1,0,0,0,0,0,0,49,117,0,0,2,0,0,0,0,0, +0,2,68,117,0,0,2,0,0,0,0,1,0,0,53,113,0,0,12,0,0,0,0,0,0,0,91,117,0,0,13,1,0,0,0,0,0,0,109,117,0,0,14,1,0,0,0,0,0,0,126,117,0,0,2,0,0,0,0,0,8,0,139,117,0,0,0,2,0,0,0,0,0,0,154,117,0,0,2,0,0,0,4,0,0,0,172,117,0,0,2,0,0,0,8,0,0,0,182,117,0,0,2,0,0,0,0,32,0,0,207,117,0,0,15,1,0,0,0,0,0,0,226,117,0,0,16,1,0,0,0,0,0,0,237,117,0,0,17,1,0,0,0,0,0,0,248,117,0,0,16,1,0,0,1,0,0,0,148,112,0,0,18,1,0,0,0,0,0,0,142,111,0,0,19,1,0,0,0,0,0,0,155,111,0,0,20,0,0,0,0,0,0,0,4,118,0,0,2,0,0,0,0,128,0,0,129,111,0,0,22, +0,0,0,0,0,0,0,23,118,0,0,23,1,0,0,0,0,0,0,218,111,0,0,24,0,0,0,0,0,0,0,38,118,0,0,23,1,0,0,0,0,0,0,88,111,0,0,25,0,0,0,0,0,0,0,49,118,0,0,2,0,0,0,0,0,0,4,60,118,0,0,18,1,0,0,0,0,0,0,72,118,0,0,2,0,0,0,0,64,0,0,89,118,0,0,2,0,0,0,0,0,4,0,108,118,0,0,2,0,0,0,0,0,2,0,134,118,0,0,0,0,0,0,1,0,0,0,98,111,0,0,26,0,0,0,0,0,0,0,149,118,0,0,2,0,0,0,64,0,0,0,168,118,0,0,27,0,0,0,0,0,0,0,171,113,0,0,28,0,0,0,0,0,0,0,182,118,0,0,29,1,0,0,0,0,0,0,29,112,0,0,30,1,0,0,0,0,0,0,188,118,0,0,31,1,0,0,0,0,0,0,228,111, +0,0,32,0,0,0,0,0,0,0,239,111,0,0,33,0,0,0,0,0,0,0,187,113,0,0,34,0,0,0,0,0,0,0,199,118,0,0,0,0,0,0,6,0,0,0,144,113,0,0,35,0,0,0,0,0,0,0,212,118,0,0,36,1,0,0,0,0,0,0,227,118,0,0,2,0,0,0,0,8,1,0,43,115,0,0,254,114,0,0,80,115,0,0,85,115,0,0,93,115,0,0,12,115,0,0,152,114,0,0,61,115,0,0,67,115,0,0,73,115,0,0,37,115,0,0,43,115,0,0,254,114,0,0,47,115,0,0,52,115,0,0,57,115,0,0,221,114,0,0,254,114,0,0,15,115,0,0,22,115,0,0,29,115,0,0,8,115,0,0,10,115,0,0,12,115,0,0,221,114,0,0,254,114,0,0,3,115,0,0,221,114, +0,0,254,114,0,0,218,114,0,0,221,114,0,0,152,114,0,0,150,86,0,0,225,114,0,0,228,114,0,0,238,114,0,0,248,114,0,0,152,114,0,0,107,89,0,0,158,114,0,0,165,114,0,0,238,113,0,0,1,0,0,0,243,113,0,0,1,0,0,0,249,113,0,0,2,0,0,0,2,114,0,0,3,0,0,0,11,114,0,0,2,0,0,0,19,114,0,0,3,0,0,0,27,114,0,0,0,0,0,0,34,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,113,0,0,221,113,0,0,225,113,0,0,0,202,154,59,0,202,154,59,208,7,0,0,232,3,0,0,244,1,0,0,168,97,0,0,127,0,0,0,10,0,0,0,80,195,0,0,231,3,0,0,232,3,0,0,0,0,0,0,183,115,0,0, +190,115,0,0,198,115,0,0,135,113,0,0,31,109,0,0,202,115,0,0,248,114,0,0,64,0,0,0,228,73,0,0,66,0,0,0,237,73,0,0,65,0,0,0,120,122,0,0,67,0,0,0,138,102,0,0,3,0,0,0,134,102,0,0,3,0,0,0,20,186,0,0,186,131,0,0,192,131,0,0,197,131,0,0,202,131,0,0,62,132,0,0,68,132,0,0,76,132,0,0,163,146,0,0,172,146,0,0,179,146,0,0,185,146,0,0,6,147,0,0,16,147,0,0,27,147,0,0,39,147,0,0,50,147,0,0,61,147,0,0,72,147,0,0,77,147,0,0,82,147,0,0,93,147,0,0,105,147,0,0,112,147,0,0,120,147,0,0,128,147,0,0,133,147,0,0,139,147,0,0, +153,147,0,0,159,147,0,0,169,147,0,0,174,147,0,0,178,147,0,0,183,147,0,0,186,147,0,0,192,147,0,0,199,147,0,0,206,147,0,0,213,147,0,0,220,147,0,0,223,147,0,0,227,147,0,0,238,147,0,0,247,147,0,0,253,147,0,0,7,148,0,0,17,148,0,0,24,148,0,0,32,148,0,0,35,148,0,0,38,148,0,0,41,148,0,0,44,148,0,0,47,148,0,0,50,148,0,0,60,148,0,0,67,148,0,0,73,148,0,0,83,148,0,0,94,148,0,0,98,148,0,0,107,148,0,0,116,148,0,0,123,148,0,0,133,148,0,0,140,148,0,0,145,148,0,0,152,148,0,0,163,148,0,0,168,148,0,0,175,148,0,0,181, +148,0,0,187,148,0,0,193,148,0,0,199,148,0,0,210,148,0,0,221,148,0,0,229,148,0,0,238,148,0,0,244,148,0,0,254,148,0,0,11,149,0,0,22,149,0,0,28,149,0,0,33,149,0,0,40,149,0,0,53,149,0,0,64,149,0,0,69,149,0,0,77,149,0,0,83,149,0,0,90,149,0,0,95,149,0,0,104,149,0,0,109,149,0,0,118,149,0,0,123,149,0,0,128,149,0,0,134,149,0,0,142,149,0,0,152,149,0,0,160,149,0,0,170,149,0,0,179,149,0,0,186,149,0,0,199,149,0,0,204,149,0,0,216,149,0,0,224,149,0,0,231,149,0,0,239,149,0,0,248,149,0,0,3,150,0,0,9,150,0,0,20,150, +0,0,30,150,0,0,40,150,0,0,49,150,0,0,59,150,0,0,73,150,0,0,87,150,0,0,98,150,0,0,111,150,0,0,122,150,0,0,128,150,0,0,140,150,0,0,149,150,0,0,158,150,0,0,165,150,0,0,175,150,0,0,182,150,0,0,193,150,0,0,207,150,0,0,218,150,0,0,225,150,0,0,233,150,0,0,239,150,0,0,247,150,0,0,4,151,0,0,14,151,0,0,24,151,0,0,29,151,0,0,38,151,0,0,46,151,0,0,52,151,0,0,57,151,0,0,69,151,0,0,81,151,0,0,93,151,0,0,105,151,0,0,118,151,0,0,128,151,0,0,138,151,0,0,150,151,0,0,162,151,0,0,172,151,0,0,178,151,0,0,188,151,0,0, +195,151,0,0,207,151,0,0,216,151,0,0,224,151,0,0,233,151,0,0,240,151,0,0,250,151,0,0,1,152,0,0,9,152,0,0,18,152,0,0,24,152,0,0,32,152,0,0,40,152,0,0,50,152,0,0,59,152,0,0,70,152,0,0,75,152,0,0,234,3,0,0,0,0,8,0,235,3,0,0,0,0,0,1,236,3,0,0,0,0,0,64,237,3,0,0,0,0,64,0,2,0,0,0,131,0,0,0,132,0,0,0,163,0,0,0,145,0,0,0,146,0,0,0,164,0,0,0,147,0,0,0,137,0,0,0,148,0,0,0,149,0,0,0,145,0,0,0,165,0,0,0,134,0,0,0,150,0,0,0,151,0,0,0,152,0,0,0,153,0,0,0,138,0,0,0,166,0,0,0,167,0,0,0,168,0,0,0,169,0,0,0,0,0,0,0, +133,0,0,0,133,0,0,0,170,0,0,0,154,0,0,0,154,0,0,0,171,0,0,0,155,0,0,0,139,0,0,0,156,0,0,0,157,0,0,0,146,0,0,0,172,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,211,155,0,0,255,155,0,0,67,156,0,0,95,156,0,0,124,156,0,0,151,156,0,0,179,156,0,0,204,156,0,0,228,156,0,0,37,157,0,0,96,157,0,0,164,157,0,0,212,157,0,0,68,158,0,0,203,158,0,0,255,158,0,0,65,159,0,0,108,159,0,0,167,159,0,0,206,159,0,0,250,159,0,0,35,160,0,0,82,160,0,0,124,160,0,0,20,186,0,0,20,186,0,0, +162,160,0,0,217,160,0,0,22,161,0,0,141,161,0,0,244,161,0,0,43,162,0,0,101,162,0,0,208,162,0,0,31,163,0,0,96,163,0,0,156,163,0,0,204,163,0,0,54,164,0,0,127,164,0,0,77,154,0,0,220,0,0,0,85,154,0,0,221,0,0,0,103,154,0,0,222,0,0,0,93,154,0,0,223,0,0,0,71,167,0,0,2,0,4,0,74,167,0,0,3,1,3,0,78,167,0,0,3,1,2,0,82,167,0,0,4,0,1,0,93,154,0,0,9,0,0,0,16,171,0,0,6,0,0,0,146,168,0,0,8,0,0,0,155,168,0,0,10,0,0,0,144,86,0,0,5,0,0,0,103,168,0,0,7,0,0,0,23,171,0,0,10,0,0,0,34,171,0,0,10,0,0,0,0,0,0,0,147,0,0,0,158, +0,0,0,135,0,0,0,159,0,0,0,134,0,0,0,0,0,0,0,0,0,0,0,148,0,0,0,160,0,0,0,136,0,0,0,161,0,0,0,135,0,0,0,0,0,0,0,0,0,0,0,136,0,0,0,136,0,0,0,173,0,0,0,162,0,0,0,162,0,0,0,174,0,0,0,163,0,0,0,140,0,0,0,164,0,0,0,165,0,0,0,149,0,0,0,175,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,0,0,0,166,0,0,0,137,0,0,0,167,0,0,0,137,0,0,0,0,0,0,0,255,255,255,255,255,255,0,252,1,0,0,248,1,0,0,248,48,0,0,0,7,232,0,0,6,108,1,0,47,236,1,0,7,172,2,0,1,208,2,0,3,216,2, +0,1,236,2,0,1,252,2,0,1,92,3,0,1,220,3,0,4,8,11,0,14,72,11,0,7,148,11,0,1,180,11,0,129,188,11,0,1,212,13,0,1,248,13,0,2,16,14,0,1,28,14,0,1,216,15,0,8,8,18,0,6,104,21,0,2,36,22,0,1,60,22,0,55,68,22,0,2,204,23,0,5,0,24,0,22,24,24,0,2,120,24,0,21,44,25,0,4,168,25,0,1,192,25,0,1,80,27,0,15,88,27,0,7,156,27,0,2,244,27,0,14,0,28,0,1,60,28,0,1,68,28,0,27,192,28,0,11,152,30,0,9,172,31,0,4,216,31,0,4,88,32,0,9,108,32,0,3,148,32,0,5,164,32,0,15,192,32,0,3,100,33,0,1,120,33,0,27,144,35,0,4,0,36,0,3,232,36, +0,18,248,36,0,7,68,37,0,4,136,37,0,1,192,37,0,3,4,38,0,1,240,38,0,7,248,38,0,2,28,39,0,3,44,39,0,1,92,39,0,2,136,39,0,2,200,39,0,2,232,39,0,3,4,40,0,1,240,40,0,5,248,40,0,2,28,41,0,3,44,41,0,1,68,41,0,2,192,41,0,1,212,41,0,3,4,42,0,1,240,42,0,8,248,42,0,3,28,43,0,3,44,43,0,2,136,43,0,2,192,43,0,3,4,44,0,1,240,44,0,7,248,44,0,2,28,45,0,3,44,45,0,2,88,45,0,2,136,45,0,1,192,45,0,1,8,46,0,5,248,46,0,3,24,47,0,4,40,47,0,1,92,47,0,8,204,47,0,3,4,48,0,7,248,48,0,3,24,49,0,4,40,49,0,2,84,49,0,2,136,49,0, +1,252,49,0,2,8,50,0,1,240,50,0,7,248,50,0,3,24,51,0,4,40,51,0,2,84,51,0,2,136,51,0,2,8,52,0,7,248,52,0,3,24,53,0,4,40,53,0,1,92,53,0,2,136,53,0,1,228,53,0,2,8,54,0,1,40,55,0,6,60,55,0,1,88,55,0,8,96,55,0,3,200,55,0,1,196,56,0,7,208,56,0,1,252,56,0,9,28,57,0,2,104,57,0,1,196,58,0,6,208,58,0,2,236,58,0,6,32,59,0,31,4,60,0,12,208,60,0,23,196,61,0,11,52,62,0,36,100,62,0,15,248,62,0,13,56,63,0,20,172,64,0,6,40,65,0,4,88,65,0,3,120,65,0,3,136,65,0,7,156,65,0,4,196,65,0,12,8,66,0,1,60,66,0,6,104,66,0,1, +236,67,0,12,116,77,0,10,64,78,0,1,0,80,0,2,180,89,0,1,0,90,0,2,108,90,0,3,172,91,0,3,72,92,0,5,200,92,0,2,72,93,0,2,200,93,0,35,208,94,0,4,96,95,0,1,116,95,0,15,0,96,0,1,164,98,0,12,128,100,0,12,192,100,0,1,0,101,0,2,16,101,0,17,192,102,0,2,32,103,0,34,120,103,0,5,92,104,0,2,120,104,0,10,84,105,0,29,128,105,0,1,252,105,0,7,128,106,0,6,160,106,0,5,0,108,0,17,208,108,0,35,104,109,0,3,0,110,0,13,132,110,0,14,152,111,0,4,240,111,0,20,144,112,0,5,236,112,0,2,248,113,0,8,0,115,0,25,64,115,0,1,180,115,0, +3,200,115,0,39,0,119,0,4,240,119,0,1,244,126,0,3,252,126,0,3,52,127,0,3,116,127,0,3,180,127,0,2,244,127,0,101,0,128,0,6,168,129,0,5,232,129,0,5,40,130,0,26,128,130,0,33,64,131,0,2,0,132,0,4,12,132,0,2,32,132,0,1,80,132,0,3,88,132,0,6,120,132,0,1,148,132,0,1,156,132,0,1,164,132,0,1,184,132,0,2,232,132,0,5,0,133,0,4,40,133,0,1,60,133,0,100,66,134,0,39,0,144,0,11,0,145,0,78,112,146,0,0,2,148,0,117,4,156,0,185,83,158,0,10,64,173,0,6,148,179,0,3,188,179,0,4,228,179,0,2,248,179,0,1,192,181,0,1,252,181, +0,79,128,183,0,12,192,184,0,26,0,186,0,89,108,186,0,214,0,188,0,12,192,191,0,5,0,192,0,25,32,192,0,7,168,192,0,2,216,192,0,3,244,192,0,4,100,194,0,1,128,194,0,1,236,195,0,2,64,198,0,10,88,198,0,36,0,199,0,31,0,200,0,30,168,200,0,1,64,201,0,32,128,201,0,39,40,202,0,63,0,203,0,0,1,204,0,64,0,55,1,55,64,146,2,2,248,147,2,3,52,152,2,16,188,153,2,1,124,154,2,8,192,155,2,23,0,156,2,2,128,156,2,2,36,158,2,1,8,160,2,1,24,160,2,1,44,160,2,9,140,160,2,4,216,160,2,4,208,161,2,2,0,162,2,17,208,162,2,2,56,163, +2,18,128,163,2,3,224,163,2,10,152,164,2,13,28,165,2,1,124,165,2,4,0,166,2,27,204,166,2,2,120,167,2,14,164,168,2,1,12,169,2,2,48,169,2,4,112,169,2,3,220,169,2,1,236,169,2,1,192,170,2,3,200,170,2,2,220,170,2,2,248,170,2,1,4,171,2,2,120,171,2,7,172,171,2,2,212,171,2,11,140,175,2,1,0,96,3,2,252,109,3,2,252,111,3,1,252,127,3,1,120,236,3,1,164,236,3,16,200,238,3,2,248,244,3,2,240,247,3,26,0,248,3,7,128,248,3,35,192,248,3,19,80,249,3,4,160,249,3,1,252,251,3,15,4,252,3,7,104,252,3,6,236,252,3,11,108,253, +3,7,128,255,3,7,160,255,3,5,228,255,3,3,0,4,4,9,220,4,4,17,228,5,4,12,64,6,4,46,64,7,4,1,124,14,4,1,64,15,4,1,92,33,4,1,124,36,4,1,252,36,4,3,4,40,4,2,20,40,4,4,48,40,4,3,224,40,4,1,252,40,4,9,64,41,4,1,252,41,4,7,228,44,4,3,0,64,4,22,224,64,4,3,0,66,4,18,192,66,4,3,0,68,4,14,156,68,4,4,0,69,4,3,0,70,4,14,204,70,4,4,20,71,4,13,172,90,4,4,192,145,4,46,68,189,5,4,60,190,5,246,0,64,7,39,0,68,7,181,164,68,7,70,0,72,7,87,0,76,7,1,4,91,7,1,108,91,7,1,236,91,7,1,84,92,7,1,212,92,7,1,60,93,7,1,188,93,7,1, +36,94,7,1,164,94,7,1,12,95,7,2,192,187,7,44,0,192,7,100,192,192,7,15,128,194,7,14,196,194,7,15,4,195,7,15,68,195,7,31,64,196,7,60,192,196,7,43,192,197,7,29,152,199,7,43,64,200,7,9,0,201,7,2,64,201,7,33,0,204,7,6,192,204,7,70,220,204,7,20,0,206,7,37,128,206,7,5,24,207,7,17,128,207,7,63,0,208,7,1,0,209,7,182,8,209,7,4,228,211,7,62,0,212,7,4,0,213,7,24,64,213,7,70,236,215,7,11,20,217,7,70,0,218,7,116,0,220,7,1,4,0,56,96,128,0,56,240,0,4,56,5,0,0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,151,0,0,0,152,0,0,0,69,187,0,0,0,4,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,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,33,0,0,12,0,14,0,24,0,31,0,59,0,15,39,0,0,2,0,2,0,8,0,9,0,14,0,16,0,20,0,23,0,25,0,25,0,29,0,33,0,36,0,41,0,46,0,48,0,53,0,54,0,59,0,62,0,65,0,67,0,69,0,78,0,81,0,86,0,91,0,95,0,96,0,101,0,105,0,109,0,117,0,122,0,128,0,136,0,142,0,152,0,159,0,162,0,162,0,165,0,167,0,167,0,171,0,176,0,179,0,184,0,184,0,188, +0,192,0,199,0,204,0,209,0,212,0,218,0,221,0,225,0,234,0,240,0,240,0,240,0,243,0,246,0,250,0,251,0,255,0,5,1,9,1,16,1,22,1,34,1,40,1,49,1,51,1,57,1,62,1,64,1,71,1,76,1,81,1,87,1,93,1,98,1,102,1,105,1,111,1,115,1,122,1,124,1,131,1,133,1,135,1,144,1,148,1,154,1,160,1,168,1,173,1,173,1,189,1,196,1,203,1,204,1,211,1,215,1,219,1,223,1,227,1,230,1,232,1,234,1,240,1,244,1,252,1,1,2,9,2,12,2,17,2,22,2,28,2,32,2,37,2,227,255,54,2,13,2,93,2,207,255,51,1,235,1,21,2,156,2,179,1,89,2,132,2,148,0,235,2,18,3,27, +3,163,1,20,3,59,3,22,3,198,1,64,3,121,3,239,1,56,3,222,2,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,76,0,15,3,130,3,137,3,139,3,143,3,153,3,165,3,168,3,172,3,175,3,179,3,182,3,184,3,187,3,190,3,194,3,197,3,201,3,206,3,209,3,212,3,216,3,220,3,223,3,225,3,228,3,231,3,234,3,238,3,242,3,250,3,253,3,0,4,4,4,8,4,10,4,12,4,16,4,22,4,27,4,34,4,38,4,40,4,44,4,46,4,49,4,76,0,76,0,76,0,76,0,76,0,76, +0,76,0,76,0,76,0,87,3,36,0,11,2,235,0,160,1,9,3,76,0,22,1,76,0,76,0,76,0,76,0,188,2,188,2,188,2,150,0,220,0,147,0,217,0,221,0,50,1,50,1,99,2,5,0,23,2,44,2,108,2,208,2,104,3,129,3,116,0,96,3,93,1,11,4,13,4,148,1,23,4,224,3,127,255,26,4,236,1,62,0,210,2,111,3,48,4,65,4,40,3,42,4,70,4,71,4,72,4,73,4,74,4,8,3,30,4,45,2,57,0,112,0,131,0,167,0,182,0,250,0,16,1,35,1,75,1,108,1,182,1,241,1,5,2,79,2,141,2,178,2,227,2,7,3,30,3,124,3,140,3,156,3,162,3,247,3,39,4,45,4,99,1,16,3,31,3,213,3,77,4,158,3,127,4,137, +4,138,4,177,3,140,4,142,4,104,4,144,4,147,4,148,4,250,0,149,4,150,4,151,4,154,4,156,4,157,4,64,4,78,4,95,4,100,4,102,4,158,3,107,4,115,4,164,4,116,4,105,4,106,4,79,4,120,4,83,4,155,4,132,4,143,4,158,4,110,4,98,4,159,4,160,4,126,4,129,4,173,4,87,4,178,4,179,4,99,4,101,4,181,4,123,4,161,4,145,4,162,4,166,4,167,4,168,4,189,4,193,4,169,4,133,4,172,4,174,4,170,4,196,4,194,4,121,4,130,4,205,4,207,4,209,4,192,4,213,4,216,4,217,4,220,4,198,4,203,4,206,4,208,4,199,4,211,4,212,4,221,4,225,4,202,4,226,4,230, +4,175,4,177,4,180,4,183,4,185,4,187,4,190,4,188,4,231,4,184,4,235,4,191,4,232,4,176,4,182,4,236,4,223,4,237,4,239,4,238,4,242,4,254,4,2,5,12,5,14,5,17,5,18,5,19,5,20,5,197,4,200,4,204,4,8,5,11,5,252,4,253,4,15,5,69,1,64,3,95,1,57,3,5,0,203,0,203,0,51,3,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,45,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,209,3,209,3,56,3,56,3,58,3,179,3,98,1,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98, +0,98,0,82,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,95,0,95,0,94,0,94,0,94,0,93,0,95,1,23,3,209,3,209,3,69,1,94,0,94,0,94,0,93,0,95,1,24,3,75,0,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,194,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,53,5,155,0,155,0,2,0,69,1,19,1,146,0,132,0,52,0,52,0,93,0,95,1,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,101,0,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,190,3, +190,3,69,1,12,1,172,1,157,1,155,1,61,0,240,2,240,2,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,60,0,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,14,1,73,1,17,1,21,1,191,3,192,3,250,0,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,45,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,170,3,46,5,186,2,194,2],"i8",4,n.G); +z([46,5,242,0,156,1,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,91,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,170,3,47,5,128,1,187,2,47,5,125,1,123,1,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,189,2,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,92,0,89,0,178,0,65,3,168,3,117,1,188,2,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,119,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94, +0,94,0,93,0,95,1,69,1,252,4,179,3,98,1,50,3,168,3,227,2,227,2,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,230,0,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,201,3,227,0,92,0,89,0,178,0,117,1,44,1,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,153,3,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,193,1,191,1,191,1,191,1,147,0,225,2,225,2,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98, +0,40,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,163,1,231,0,190,3,190,3,158,0,25,0,166,1,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,194,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,187,1,224,0,224,0,164,1,190,3,190,3,194,3,69,1,52,0,52,0,191,3,192,3,176,0,159,1,78,0,99,0,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,123,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,172,1,162,1,42,1,191,3,192,3, +194,3,81,0,99,0,88,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,205,2,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,75,3,75,3,87,3,90,3,228,3,62,1,87,1,123,1,100,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,194,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,69,1,94,1,94,1,94,1,4,1,121,1,84,1,161,3,52,0,52,0,90,0,74,3,74,3,86,3,89,3,78,3,78,3,97,0,97,0,98,0,98,0,98,0,98,0,105,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95, +1,86,0,189,1,79,3,3,0,179,4,105,1,104,1,122,1,88,1,45,3,190,3,190,3,20,5,86,0,189,1,217,2,3,0,212,0,169,0,31,1,149,1,26,1,148,1,199,0,232,0,194,1,44,1,248,2,83,0,84,0,24,1,245,0,6,1,109,1,251,0,85,0,96,1,96,1,92,0,89,0,178,0,83,0,84,0,242,0,156,1,52,0,52,0,192,1,85,0,96,1,96,1,246,0,191,3,192,3,194,0,199,1,158,2,146,1,143,1,142,1,192,1,243,0,221,0,114,0,178,1,8,3,105,1,194,1,141,1,12,1,235,2,224,0,224,0,132,0,132,0,198,0,64,3,178,1,196,1,195,1,172,1,171,1,51,3,159,1,222,2,201,2,132,0,52,0,52,0,64, +3,12,1,196,1,195,1,222,2,194,0,51,3,107,1,146,1,143,1,142,1,194,1,247,4,247,4,23,0,190,3,190,3,86,0,189,1,141,1,3,0,228,0,173,1,127,3,56,3,56,3,58,3,59,3,19,0,203,0,208,2,52,0,52,0,172,1,152,1,183,1,249,0,56,3,56,3,58,3,59,3,19,0,229,0,147,1,153,0,83,0,84,0,249,2,177,0,241,0,194,1,209,2,85,0,96,1,96,1,120,0,157,0,191,3,192,3,58,0,209,3,153,1,99,1,74,1,192,1,12,1,172,1,174,1,64,1,22,3,32,0,32,0,86,0,189,1,8,3,3,0,85,1,98,0,98,0,98,0,98,0,178,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1, +64,3,120,0,196,1,195,1,45,3,119,3,51,3,83,0,84,0,209,3,45,3,132,0,154,1,152,3,85,0,96,1,96,1,132,0,151,1,21,3,190,3,190,3,92,0,89,0,178,0,149,3,192,1,6,1,114,1,5,1,82,0,146,3,80,0,6,1,114,1,5,1,8,3,56,3,56,3,58,3,59,3,19,0,166,3,178,1,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,64,3,74,0,196,1,195,1,190,3,190,3,51,3,191,3,192,3,120,0,92,0,89,0,178,0,177,3,2,0,150,3,197,3,12,1,1,0,208,3,76,0,189,1,250,2,3,0,196,2,133,3,133,3,131,1,190,3,190,3,245,2,151,3,115,1,228,2,10,3,244,2,1,1,56,3, +56,3,58,3,59,3,19,0,161,1,229,2,194,1,24,0,191,3,192,3,83,0,84,0,113,1,190,3,190,3,177,0,226,0,85,0,96,1,96,1,117,3,59,1,58,1,57,1,215,0,55,1,10,0,10,0,171,2,192,1,93,1,92,1,191,3,192,3,141,3,9,3,157,0,120,0,190,3,190,3,81,1,8,3,160,1,199,2,54,1,194,1,178,1,194,1,65,1,194,1,23,3,103,0,200,0,175,0,194,1,191,3,192,3,140,3,64,3,24,3,196,1,195,1,9,0,9,0,51,3,10,0,10,0,52,0,52,0,51,0,51,0,180,0,204,2,248,0,10,0,10,0,171,0,170,0,167,0,83,1,191,3,192,3,247,0,216,3,190,2,190,2,194,1,203,2,233,0,174,2,214, +3,121,3,215,3,182,0,146,3,56,3,56,3,58,3,59,3,19,0,183,0,0,1,167,1,132,0,181,0,138,1,10,0,10,0,121,3,123,3,237,2,190,3,190,3,149,3,12,1,217,3,198,0,217,3,93,1,92,1,169,1,159,1,43,1,49,3,64,3,70,1,57,3,120,0,76,1,133,0,51,3,12,1,98,0,98,0,98,0,98,0,91,0,96,0,96,0,96,0,96,0,95,0,95,0,94,0,94,0,94,0,93,0,95,1,157,0,42,3,115,1,126,1,103,1,191,3,192,3,102,1,12,1,194,1,150,3,112,1,68,1,56,3,56,3,58,3,194,1,197,2,194,1,8,1,124,1,121,3,194,1,109,3,234,2,253,0,151,3,255,0,177,1,36,0,36,0,234,0,194,1,234,0, +120,0,13,1,37,0,37,0,12,0,12,0,78,1,16,1,27,0,27,0,194,1,74,1,118,0,194,1,162,0,230,2,24,1,194,1,38,0,38,0,194,1,217,3,100,1,217,3,194,1,197,2,186,4,194,1,132,0,194,1,39,0,39,0,194,1,40,0,40,0,194,1,106,1,41,0,41,0,194,1,42,0,42,0,194,1,254,0,28,0,28,0,194,1,29,0,29,0,31,0,31,0,194,1,43,0,43,0,194,1,44,0,44,0,194,1,202,2,45,0,45,0,194,1,11,0,11,0,255,2,194,1,46,0,46,0,194,1,12,1,194,1,105,0,105,0,194,1,47,0,47,0,194,1,48,0,48,0,194,1,237,0,33,0,33,0,194,1,172,0,49,0,49,0,194,1,50,0,50,0,34,0,34,0, +18,1,122,0,122,0,194,1,123,0,123,0,194,1,124,0,124,0,194,1,130,3,56,0,56,0,194,1,129,3,35,0,35,0,194,1,11,1,194,1,49,3,194,1,49,3,106,0,106,0,194,1,53,0,53,0,129,1,107,0,107,0,194,1,49,3,108,0,108,0,49,3,194,1,104,0,104,0,121,0,121,0,119,0,119,0,194,1,117,0,112,0,112,0,194,1,20,1,194,1,225,0,111,0,111,0,194,1,218,2,194,1,109,0,109,0,194,1,161,2,162,2,163,2,144,3,110,0,110,0,61,1,230,3,55,0,55,0,57,0,57,0,180,2,75,1,54,0,54,0,26,0,26,0,184,2,30,0,30,0,61,1,169,3,197,0,196,0,195,0,79,1,25,1,80,1,190, +1,75,1,233,2,177,2,180,1,184,1,188,1,120,0,72,0,130,1,223,0,175,0,89,1,245,2,165,3,20,0,30,1,63,1,244,2,47,3,116,1,118,1,202,0,202,0,202,0,7,1,139,1,29,1,74,0,208,0,21,0,184,2,207,2,206,2,116,3,120,0,120,0,120,0,120,0,120,0,242,2,22,1,60,3,77,0,74,0,214,2,215,2,17,3,15,3,112,3,202,0,231,3,208,0,126,3,125,3,126,3,125,3,182,2,48,3,251,2,116,0,6,3,10,5,175,1,176,1,46,1,231,3,134,1,47,1,55,3,185,2,179,2,168,2,159,0,33,1,167,2,116,3,169,2,184,3,35,1,218,0,37,1,7,0,60,1,60,3,173,0,37,3,3,1,108,1,252,0, +143,3,120,1,201,2,39,1,179,1,52,1,168,0,187,3,225,3,135,0,144,1,222,3,28,1,114,3,113,3,205,0,160,3,158,3,59,0,77,1,62,0,144,0,156,0,130,0,72,0,34,3,110,1,111,1,137,1,137,0,185,0,189,0,160,0,139,0,127,1,67,0,128,3,140,0,141,0,142,0,148,0,133,1,44,3,7,3,10,1,219,0,190,0,154,0,135,1,145,3,108,3,15,1,150,1,191,0,66,1,170,2,221,2,192,0,86,1,220,2,212,2,219,2,199,2,211,2,165,1,193,2,71,0,67,1,6,0,204,0,3,3,32,1,79,0,41,1,90,1,4,3,192,2,34,1,27,1,191,2,2,3,36,1,38,1,199,3,239,0,1,3,102,0,94,3,182,1,170, +1,240,0,168,1,186,1,73,0,213,0,176,2,238,0,22,0,197,1,185,3,214,0,217,0,216,0,198,1,165,2,164,2,159,2,241,2,125,0,115,0,235,0,126,0,157,2,97,1,166,0,127,0,244,0,179,0,101,1,50,1,48,1,49,1,51,1,113,0,124,3,71,1,122,3,43,3,72,1,134,0,128,0,136,0,138,0,231,2,2,1,139,3,184,0,143,0,129,0,142,3,186,0,63,0,64,0,145,0,187,0,138,3,65,0,8,0,66,0,13,0,188,0,202,0,131,3,9,1,149,0,219,3,132,1,150,0,173,2,161,0,136,1,29,1,193,0,23,1,140,1,151,0,145,1,68,0,14,0,15,0,210,2,69,0,236,0,63,3,131,0,62,3,92,3,70,0,239, +2,16,0,158,1,243,2,4,0,174,0,220,0,222,0,16,3,201,0,152,0,11,3,77,0,74,0,17,0,18,0,107,3,93,3,91,3,148,3,96,3,147,3,207,0,206,0,174,3,163,0,181,1,180,3,175,3,164,0,209,0,234,3,185,1,95,3,165,0,210,0,61,3,183,2,87,0,56,1,211,0,12,5,11,5,53,1,33,0,32,0,30,0,28,0,26,0,0,0,2,0,3,0,5,0,6,0,7,0,8,0,9,0,16,16,2,16,40,0,87,2,136,3,100,2,248,2,248,2,248,2,248,2,213,2,237,255,16,0,16,0,100,0,248,2,248,2,248,2,248,2,248,2,248,2,248,2,108,3,108,3,61,2,30,2,207,2,88,2,61,0,137,0,172,0,207,0,242,0,21,1,56,1,91, +1,126,1,161,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,238,1,203,1,17,2,52,2,52,2,193,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,88,3,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,248,2,219,3,234,2,234,2,234,2,234,2,234,2,33,3,23,0,32,0,181,3,193,3,211,3,196,3,196,3,181, +3,73,0,113,0,205,255,31,6,31,6,31,6,24,2,24,2,24,2,99,0,99,0,45,3,45,3,155,2,205,0,240,0,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,76,1,243,3,166,1,166,1,113,0,30,0,30,0,30,0,30,0,30,0,30,0,31,6,31,6,31,6,154,3,162,255,162,255,128,1,101,2,60,3,164,1,253,2,36,3,83,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,160,2,160,2,160,2,181,3,181,3,145,2,181,3,181,3,181,3,238,255, +181,3,181,3,226,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,181,3,4,3,94,4,200,2,200,2,200,2,42,3,45,0,1,3,195,4,109,4,162,1,162,1,57,2,109,4,57,2,62,3,95,2,151,2,114,3,162,1,181,2,114,3,114,3,80,3,128,4,41,4,6,5,214,4,214,4,7,5,7,5,214,4,64,5,61,5,215,4,73,5,73,5,73,5,73,5,214,4,75,5,215,4,64,5,61,5,61,5,215,4,214,4,75,5,219,4,32,5,214,4,214,4,75,5,90,5,214,4,75,5,214,4,75,5,90,5,10,5,10,5,10,5,47,5,90,5,10,5,21,5,10,5,47,5,10,5,10,5,4,5,24,5,4,5,24,5,4,5,24,5,4,5,24,5,214,4,111,5,214, +4,0,5,90,5,86,5,86,5,90,5,22,5,28,5,30,5,29,5,215,4,134,5,136,5,151,5,151,5,160,5,160,5,160,5,160,5,31,6,31,6,31,6,31,6,31,6,31,6,31,6,31,6,7,2,210,3,186,4,201,4,104,0,117,4,165,4,222,4,224,4,227,4,228,4,229,4,233,4,234,4,249,4,235,3,163,4,13,5,146,4,248,4,255,4,210,4,1,5,152,4,153,4,9,5,218,4,171,4,173,5,175,5,157,5,39,5,167,5,89,5,172,5,166,5,168,5,72,5,65,5,84,5,74,5,178,5,76,5,183,5,199,5,79,5,77,5,169,5,170,5,174,5,176,5,92,5,148,5,141,5,87,5,209,5,207,5,192,5,108,5,78,5,137,5,190,5,139,5,133, +5,149,5,115,5,200,5,203,5,206,5,114,5,122,5,208,5,150,5,210,5,211,5,205,5,212,5,152,5,177,5,214,5,158,5,171,5,215,5,217,5,218,5,216,5,127,5,222,5,223,5,225,5,219,5,126,5,226,5,227,5,195,5,188,5,231,5,130,5,229,5,193,5,230,5,194,5,236,5,229,5,237,5,238,5,239,5,240,5,241,5,243,5,252,5,244,5,246,5,245,5,247,5,248,5,250,5,251,5,247,5,253,5,255,5,0,6,1,6,3,6,156,5,161,5,162,5,163,5,7,6,11,6,13,6,1,5,247,4,247,4,247,4,179,4,179,4,179,4,179,4,247,4,72,4,101,4,101,4,231,4,52,5,52,5,52,5,52,5,52,5,52,5,178, +4,52,5,52,5,52,5,52,5,247,4,76,4,107,4,52,5,52,5,52,5,52,5,180,4,181,4,52,5,52,5,52,5,230,4,232,4,117,4,116,4,115,4,114,4,213,4,88,4,112,4,105,4,109,4,180,4,174,4,175,4,173,4,177,4,181,4,52,5,108,4,143,4,158,4,142,4,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,152,4,157,4,164,4,156,4,153,4,145,4,144,4,146,4,147,4,52, +5,251,3,43,4,52,5,52,5,52,5,148,4,52,5,149,4,161,4,160,4,159,4,238,4,9,5,8,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,1,5,247,4,1,4,1,4,52,5,247,4,247,4,247,4,247,4,247,4,247,4,243,4,76,4,67,4,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,235,4,233,4,52,5,194,4,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,72,4,52,5,52,5,52,5,52,5,52,5,52,5,52, +5,52,5,52,5,52,5,52,5,52,5,3,5,52,5,208,4,72,4,72,4,72,4,74,4,56,4,66,4,236,3,111,4,90,4,90,4,41,5,111,4,41,5,18,4,23,5,15,4,101,4,90,4,176,4,101,4,101,4,73,4,66,4,52,5,44,5,81,4,81,4,43,5,43,5,81,4,122,4,46,4,111,4,52,4,52,4,52,4,52,4,81,4,248,3,111,4,122,4,46,4,46,4,111,4,81,4,248,3,212,4,38,5,81,4,81,4,248,3,187,4,81,4,248,3,81,4,248,3,187,4,44,4,44,4,44,4,33,4,187,4,44,4,18,4,44,4,33,4,44,4,44,4,94,4,89,4,94,4,89,4,94,4,89,4,94,4,89,4,81,4,182,4,81,4,52,5,187,4,191,4,191,4,187,4,106,4,95,4,104, +4,102,4,111,4,254,3,36,4,6,5,6,5,2,5,2,5,2,5,2,5,49,5,49,5,243,4,18,5,18,5,20,4,20,4,18,5,52,5,52,5,52,5,52,5,52,5,52,5,13,5,52,5,196,4,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,128,4,52,5,232,3,240,4,52,5,52,5,239,4,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,40,5,52,5,52,5,52,5,52,5,52,5,52,5,211,4,210,4,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5, +52,5,52,5,52,5,52,5,52,5,58,4,52,5,52,5,52,5,27,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,103,4,52,5,96,4,52,5,52,5,31,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,52,5,249,4,52,5,52,5,52,5,248,4,52,5,52,5,52,5,52,5,52,5,130,4,52,5,129,4,133,4,52,5,242,3,52,5,16,0,2,2,65,0,14,26,181,0,64,1,192,0,14,23,216,0,14,7,0,1,1,48,50,1,1,6,57,1,1,16,74,1,1,46,120,1,116,1,121,1,1,6,127,1,104,1,129,1,50,1,130,1,1,4,134,1,44,1,135,1,0,1,137,1,42,2,139,1,0,1,142,1,32,1,143,1,38,1,144,1,40,1,145,1,0,1,147,1,42,1,148, +1,46,1,150,1,52,1,151,1,48,1,152,1,0,1,156,1,52,1,157,1,54,1,159,1,56,1,160,1,1,6,166,1,60,1,167,1,0,1,169,1,60,1,172,1,0,1,174,1,60,1,175,1,0,1,177,1,58,2,179,1,1,4,183,1,62,1,184,1,0,1,188,1,0,1,196,1,2,1,197,1,0,1,199,1,2,1,200,1,0,1,202,1,2,1,203,1,1,18,222,1,1,18,241,1,2,1,242,1,1,4,246,1,122,1,247,1,134,1,248,1,1,40,32,2,110,1,34,2,1,18,58,2,70,1,59,2,0,1,61,2,108,1,62,2,68,1,65,2,0,1,67,2,106,1,68,2,28,1,69,2,30,1,70,2,1,10,69,3,36,1,112,3,1,4,118,3,0,1,134,3,18,1,136,3,16,3,140,3,26,1,142, +3,24,2,145,3,14,17,163,3,14,9,194,3,0,1,207,3,4,1,208,3,140,1,209,3,142,1,213,3,146,1,214,3,144,1,216,3,1,24,240,3,136,1,241,3,138,1,244,3,130,1,245,3,128,1,247,3,0,1,249,3,152,1,250,3,0,1,253,3,110,3,0,4,34,16,16,4,14,32,96,4,1,34,138,4,1,54,192,4,6,1,193,4,1,14,208,4,1,88,49,5,22,38,160,16,66,38,199,16,66,1,205,16,66,1,0,30,1,150,155,30,132,1,158,30,96,1,160,30,1,96,8,31,150,8,24,31,150,6,40,31,150,8,56,31,150,8,72,31,150,6,89,31,151,8,104,31,150,8,136,31,150,8,152,31,150,8,168,31,150,8,184,31, +150,2,186,31,126,2,188,31,148,1,190,31,100,1,200,31,124,4,204,31,148,1,216,31,150,2,218,31,120,2,232,31,150,2,234,31,118,2,236,31,152,1,248,31,112,2,250,31,114,2,252,31,148,1,38,33,98,1,42,33,92,1,43,33,94,1,50,33,12,1,96,33,8,16,131,33,0,1,182,36,10,26,0,44,22,47,96,44,0,1,98,44,88,1,99,44,102,1,100,44,90,1,103,44,1,6,109,44,84,1,110,44,86,1,111,44,80,1,112,44,82,1,114,44,0,1,117,44,0,1,126,44,78,2,128,44,1,100,235,44,1,4,242,44,0,1,64,166,1,46,128,166,1,24,34,167,1,14,50,167,1,62,121,167,1,4,125, +167,76,1,126,167,1,10,139,167,0,1,141,167,74,1,144,167,1,4,160,167,1,10,170,167,72,1,33,255,14,26,1,0,2,0,8,0,15,0,16,0,26,0,28,0,32,0,37,0,38,0,40,0,48,0,63,0,64,0,69,0,71,0,79,0,80,0,116,0,202,0,203,0,205,0,206,0,207,0,209,0,210,0,211,0,213,0,214,0,217,0,218,0,219,0,7,3,96,28,40,42,43,42,188,90,216,90,252,117,193,213,225,213,226,213,228,213,3,214,9,214,25,214,65,223,186,223,65,226,163,226,251,227,26,241,244,254,61,255,93,255,126,255,128,255,130,255,135,255,144,255,156,255,159,255,170,255,182,255, +192,255,196,255,198,255,200,255,202,255,208,255,226,255,231,255,234,255,241,255,247,255,248,255,249,255,0,0,5,7,56,7,67,7,99,7,136,7,148,7,203,7,232,7,248,7,12,8,62,8,120,8,158,8,216,8,238,8,40,9,79,9,168,9,184,9,212,9,36,10,108,10,172,10,222,10,26,11,78,11,138,11,168,11,184,11,212,11,8,13,128,13,112,14,128,14,144,14,160,14,56,15,72,15,88,15,128,15,168,15,200,15,10,16,42,16,74,16,106,16,138,16,170,16,200,16,216,16,248,16,56,17,72,17,120,17,152,17,4,24,54,24,120,24,136,24,216,24,29,25,105,25,129,25, +8,240,28,240,94,240,152,240,202,240,248,240,8,241,30,241,88,241,104,241,140,241,184,241,218,241,252,241,46,242,170,242,202,242,248,242,10,243,94,243,156,243,234,243,14,244,72,244,90,244,120,244,140,244,176,244,184,244,192,244,200,244,10,245,204,245,74,246,106,246,42,247,158,247,97,99,111,115,0,97,115,105,110,0,97,116,97,110,0,97,116,110,50,0,97,116,97,110,50,0,97,99,111,115,104,0,97,115,105,110,104,0,97,116,97,110,104,0,100,105,102,102,101,114,101,110,99,101,0,100,101,103,114,101,101,115,0,114,97, +100,105,97,110,115,0,99,111,115,0,115,105,110,0,116,97,110,0,99,111,116,0,99,111,115,104,0,115,105,110,104,0,116,97,110,104,0,99,111,116,104,0,101,120,112,0,108,111,103,49,48,0,112,111,119,101,114,0,115,105,103,110,0,115,113,114,116,0,115,113,117,97,114,101,0,99,101,105,108,0,102,108,111,111,114,0,112,105,0,114,101,112,108,105,99,97,116,101,0,99,104,97,114,105,110,100,101,120,0,108,101,102,116,115,116,114,0,114,105,103,104,116,115,116,114,0,114,101,118,101,114,115,101,0,112,114,111,112,101,114,0, +112,97,100,108,0,112,97,100,114,0,112,97,100,99,0,115,116,114,102,105,108,116,101,114,0,115,116,100,101,118,0,118,97,114,105,97,110,99,101,0,109,101,100,105,97,110,0,108,111,119,101,114,95,113,117,97,114,116,105,108,101,0,117,112,112,101,114,95,113,117,97,114,116,105,108,101,0,102,111,114,32,110,111,100,101,0,97,114,103,99,61,61,49,0,99,47,101,120,116,101,110,115,105,111,110,45,102,117,110,99,116,105,111,110,115,46,99,0,97,99,111,115,70,117,110,99,0,97,115,105,110,70,117,110,99,0,97,116,97,110,70, +117,110,99,0,97,114,103,99,61,61,50,0,97,116,110,50,70,117,110,99,0,97,99,111,115,104,70,117,110,99,0,97,115,105,110,104,70,117,110,99,0,97,116,97,110,104,70,117,110,99,0,100,105,102,102,101,114,101,110,99,101,70,117,110,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,3,0,1,2,0,0,2,2,4,5,5,0,1,2,6,2,3,0,1,0,2,0,2,0,0,0,0,0,0,0,1,2,3,0,1,2,0,0,2,2,4,5,5,0,1,2,6,2,3,0,1,0,2,0,2,0,0,0,0,0,63,48,48,48,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4, +4,4,114,97,100,50,100,101,103,70,117,110,99,0,100,101,103,50,114,97,100,70,117,110,99,0,99,111,115,70,117,110,99,0,115,105,110,70,117,110,99,0,116,97,110,70,117,110,99,0,99,111,116,70,117,110,99,0,99,111,115,104,70,117,110,99,0,115,105,110,104,70,117,110,99,0,116,97,110,104,70,117,110,99,0,99,111,116,104,70,117,110,99,0,101,120,112,70,117,110,99,0,108,111,103,70,117,110,99,0,108,111,103,49,48,70,117,110,99,0,112,111,119,101,114,70,117,110,99,0,115,105,103,110,70,117,110,99,0,115,113,114,116,70,117, +110,99,0,115,113,117,97,114,101,70,117,110,99,0,99,101,105,108,70,117,110,99,0,102,108,111,111,114,70,117,110,99,0,100,111,109,97,105,110,32,101,114,114,111,114,0,97,114,103,99,61,61,51,32,124,124,97,114,103,99,61,61,50,0,99,104,97,114,105,110,100,101,120,70,117,110,99,0,108,101,102,116,70,117,110,99,0,114,105,103,104,116,70,117,110,99,0,49,61,61,97,114,103,99,0,114,101,118,101,114,115,101,70,117,110,99,0,112,114,111,112,101,114,70,117,110,99,0,112,97,100,108,70,117,110,99,0,122,60,61,122,84,101, +114,109,0,115,113,108,105,116,101,51,85,116,102,56,67,104,97,114,76,101,110,0,112,97,100,114,70,117,110,99,0,112,97,100,99,70,117,110,99,0,115,116,114,102,105,108,116,101,114,70,117,110,99,0,118,97,114,105,97,110,99,101,83,116,101,112,0,109,111,100,101,83,116,101,112,0,51,46,49,53,46,49,0,83,81,76,73,84,69,95,0,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,128,0,64,0,0,128,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,0,0,0,0,0,0,0,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,128,0,0,0,64,128,42,42,42,42,42,42,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,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,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,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,64,64,64,64,64,64,64,64,64,64,64,64, +67,79,77,80,73,76,69,82,61,99,108,97,110,103,45,52,46,48,46,48,0,68,73,83,65,66,76,69,95,76,70,83,0,69,78,65,66,76,69,95,70,84,83,51,0,69,78,65,66,76,69,95,70,84,83,51,95,80,65,82,69,78,84,72,69,83,73,83,0,73,78,84,54,52,95,84,89,80,69,0,79,77,73,84,95,76,79,65,68,95,69,88,84,69,78,83,73,79,78,0,83,89,83,84,69,77,95,77,65,76,76,79,67,0,84,72,82,69,65,68,83,65,70,69,61,48,0,0,1,2,3,4,5,6,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,37,38,39,40,41,42,43,44, +45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,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,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,0,1,1,0,0,0,0,1,0,0,109,105,115,117,115,101,0,37,115,32,97,116,32,108,105,110,101,32,37,100,32,111,102,32,91,37,46,49,48,115,93,0,37,0,100,10,1,0,0,0,115,0,4,5,0,0,103,0,1,3,30,0,122,0,4,6,0,0, +113,0,4,9,0,0,81,0,4,10,0,0,119,0,4,14,0,0,99,0,0,8,0,0,111,8,0,0,0,2,117,10,0,0,0,0,120,16,0,0,16,1,88,16,0,0,0,4,102,0,1,1,0,0,101,0,1,2,30,0,69,0,1,2,14,0,71,0,1,3,14,0,105,10,1,0,0,0,110,0,0,4,0,0,37,0,0,7,0,0,112,16,0,13,0,1,84,0,2,11,0,0,83,0,2,12,0,0,114,10,3,15,0,0,116,104,115,116,110,100,114,100,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,0,45,120,48,0,88,48,0,78,97,78,0,73,110,102,0,78,85,76,76,0,40,78,85,76,76,41,0,46,0,117,110,105, +120,0,117,110,105,120,45,110,111,110,101,0,117,110,105,120,45,100,111,116,102,105,108,101,0,117,110,105,120,45,101,120,99,108,0,99,108,111,115,101,0,111,115,95,117,110,105,120,46,99,58,37,100,58,32,40,37,100,41,32,37,115,40,37,115,41,32,45,32,37,115,0,111,112,101,110,0,97,99,99,101,115,115,0,103,101,116,99,119,100,0,115,116,97,116,0,102,115,116,97,116,0,102,116,114,117,110,99,97,116,101,0,102,99,110,116,108,0,114,101,97,100,0,112,114,101,97,100,0,112,114,101,97,100,54,52,0,119,114,105,116,101,0,112, +119,114,105,116,101,0,112,119,114,105,116,101,54,52,0,102,99,104,109,111,100,0,102,97,108,108,111,99,97,116,101,0,117,110,108,105,110,107,0,111,112,101,110,68,105,114,101,99,116,111,114,121,0,109,107,100,105,114,0,114,109,100,105,114,0,102,99,104,111,119,110,0,103,101,116,101,117,105,100,0,109,109,97,112,0,109,117,110,109,97,112,0,109,114,101,109,97,112,0,103,101,116,112,97,103,101,115,105,122,101,0,114,101,97,100,108,105,110,107,0,108,115,116,97,116,0,37,115,0,99,97,110,110,111,116,32,111,112,101, +110,32,102,105,108,101,0,97,116,116,101,109,112,116,32,116,111,32,111,112,101,110,32,34,37,115,34,32,97,115,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,37,100,0,47,100,101,118,47,110,117,108,108,0,37,115,47,101,116,105,108,113,115,95,37,108,108,120,37,99,0,83,81,76,73,84,69,95,84,77,80,68,73,82,0,84,77,80,68,73,82,0,47,118,97,114,47,116,109,112,0,47,117,115,114,47,116,109,112,0,47,116,109,112,0,102,117,108,108,95,102,115,121,110,99,0,47,100,101,118,47,117,114,97,110,100,111,109, +0,102,115,121,110,99,0,112,115,111,119,0,37,115,46,108,111,99,107,0,99,97,110,110,111,116,32,102,115,116,97,116,32,100,98,32,102,105,108,101,32,37,115,0,102,105,108,101,32,117,110,108,105,110,107,101,100,32,119,104,105,108,101,32,111,112,101,110,58,32,37,115,0,109,117,108,116,105,112,108,101,32,108,105,110,107,115,32,116,111,32,102,105,108,101,58,32,37,115,0,102,105,108,101,32,114,101,110,97,109,101,100,32,119,104,105,108,101,32,111,112,101,110,58,32,37,115,0,37,115,45,115,104,109,0,114,101,97,100, +111,110,108,121,95,115,104,109,0,2,2,3,5,3,4,5,4,0,1,2,4,9,12,15,20,111,110,111,102,102,97,108,115,101,121,101,115,116,114,117,101,120,116,114,97,102,117,108,108,0,1,0,0,0,1,1,3,2,109,111,100,101,111,102,0,102,97,105,108,101,100,32,109,101,109,111,114,121,32,114,101,115,105,122,101,32,37,117,32,116,111,32,37,117,32,98,121,116,101,115,0,102,97,105,108,101,100,32,116,111,32,97,108,108,111,99,97,116,101,32,37,117,32,98,121,116,101,115,32,111,102,32,109,101,109,111,114,121,0,115,113,108,105,116,101,95, +99,111,109,112,105,108,101,111,112,116,105,111,110,95,117,115,101,100,0,115,113,108,105,116,101,95,99,111,109,112,105,108,101,111,112,116,105,111,110,95,103,101,116,0,117,110,108,105,107,101,108,121,0,108,105,107,101,108,105,104,111,111,100,0,108,105,107,101,108,121,0,108,116,114,105,109,0,114,116,114,105,109,0,116,114,105,109,0,109,105,110,0,109,97,120,0,116,121,112,101,111,102,0,108,101,110,103,116,104,0,105,110,115,116,114,0,112,114,105,110,116,102,0,117,110,105,99,111,100,101,0,99,104,97,114, +0,97,98,115,0,114,111,117,110,100,0,117,112,112,101,114,0,108,111,119,101,114,0,104,101,120,0,105,102,110,117,108,108,0,114,97,110,100,111,109,0,114,97,110,100,111,109,98,108,111,98,0,110,117,108,108,105,102,0,115,113,108,105,116,101,95,118,101,114,115,105,111,110,0,115,113,108,105,116,101,95,115,111,117,114,99,101,95,105,100,0,115,113,108,105,116,101,95,108,111,103,0,113,117,111,116,101,0,108,97,115,116,95,105,110,115,101,114,116,95,114,111,119,105,100,0,99,104,97,110,103,101,115,0,116,111,116,97, +108,95,99,104,97,110,103,101,115,0,114,101,112,108,97,99,101,0,122,101,114,111,98,108,111,98,0,115,117,98,115,116,114,0,115,117,109,0,116,111,116,97,108,0,97,118,103,0,99,111,117,110,116,0,103,114,111,117,112,95,99,111,110,99,97,116,0,42,63,91,0,103,108,111,98,0,37,95,0,1,108,105,107,101,0,99,111,97,108,101,115,99,101,0,76,73,75,69,32,111,114,32,71,76,79,66,32,112,97,116,116,101,114,110,32,116,111,111,32,99,111,109,112,108,101,120,0,69,83,67,65,80,69,32,101,120,112,114,101,115,115,105,111,110,32, +109,117,115,116,32,98,101,32,97,32,115,105,110,103,108,101,32,99,104,97,114,97,99,116,101,114,0,0,1,2,3,4,5,6,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,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,0,1,2,3,0,1,0,0,37,108,108,100,0,37,33,46,49,53,103,0,115,116,114,105,110,103,32,111,114,32,98,108,111,98,32,116,111,111,32,98,105,103,0,44,0,4,5,3,5,1,5,1,5,2,5,2,5,1,5,1,5,4,5,3,5,1,5,1,5,2,5,2,5,1,5,1,5,105,110,116,101,103,101,114,32,111,118,101,114,102,108,111, +119,0,57,50,50,51,51,55,50,48,51,54,56,53,52,55,55,53,56,48,0,117,110,107,110,111,119,110,32,101,114,114,111,114,0,97,98,111,114,116,32,100,117,101,32,116,111,32,82,79,76,76,66,65,67,75,0,110,111,116,32,97,110,32,101,114,114,111,114,0,83,81,76,32,108,111,103,105,99,32,101,114,114,111,114,32,111,114,32,109,105,115,115,105,110,103,32,100,97,116,97,98,97,115,101,0,97,99,99,101,115,115,32,112,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,99,97,108,108,98,97,99,107,32,114,101,113,117, +101,115,116,101,100,32,113,117,101,114,121,32,97,98,111,114,116,0,100,97,116,97,98,97,115,101,32,105,115,32,108,111,99,107,101,100,0,100,97,116,97,98,97,115,101,32,116,97,98,108,101,32,105,115,32,108,111,99,107,101,100,0,111,117,116,32,111,102,32,109,101,109,111,114,121,0,97,116,116,101,109,112,116,32,116,111,32,119,114,105,116,101,32,97,32,114,101,97,100,111,110,108,121,32,100,97,116,97,98,97,115,101,0,105,110,116,101,114,114,117,112,116,101,100,0,100,105,115,107,32,73,47,79,32,101,114,114,111,114, +0,100,97,116,97,98,97,115,101,32,100,105,115,107,32,105,109,97,103,101,32,105,115,32,109,97,108,102,111,114,109,101,100,0,117,110,107,110,111,119,110,32,111,112,101,114,97,116,105,111,110,0,100,97,116,97,98,97,115,101,32,111,114,32,100,105,115,107,32,105,115,32,102,117,108,108,0,117,110,97,98,108,101,32,116,111,32,111,112,101,110,32,100,97,116,97,98,97,115,101,32,102,105,108,101,0,108,111,99,107,105,110,103,32,112,114,111,116,111,99,111,108,0,116,97,98,108,101,32,99,111,110,116,97,105,110,115,32, +110,111,32,100,97,116,97,0,100,97,116,97,98,97,115,101,32,115,99,104,101,109,97,32,104,97,115,32,99,104,97,110,103,101,100,0,99,111,110,115,116,114,97,105,110,116,32,102,97,105,108,101,100,0,100,97,116,97,116,121,112,101,32,109,105,115,109,97,116,99,104,0,108,105,98,114,97,114,121,32,114,111,117,116,105,110,101,32,99,97,108,108,101,100,32,111,117,116,32,111,102,32,115,101,113,117,101,110,99,101,0,108,97,114,103,101,32,102,105,108,101,32,115,117,112,112,111,114,116,32,105,115,32,100,105,115,97,98, +108,101,100,0,97,117,116,104,111,114,105,122,97,116,105,111,110,32,100,101,110,105,101,100,0,97,117,120,105,108,105,97,114,121,32,100,97,116,97,98,97,115,101,32,102,111,114,109,97,116,32,101,114,114,111,114,0,98,105,110,100,32,111,114,32,99,111,108,117,109,110,32,105,110,100,101,120,32,111,117,116,32,111,102,32,114,97,110,103,101,0,102,105,108,101,32,105,115,32,101,110,99,114,121,112,116,101,100,32,111,114,32,105,115,32,110,111,116,32,97,32,100,97,116,97,98,97,115,101,0,37,33,46,50,48,101,0,48,49, +50,51,52,53,54,55,56,57,65,66,67,68,69,70,37,46,42,102,0,105,110,116,101,103,101,114,0,116,101,120,116,0,114,101,97,108,0,98,108,111,98,0,110,117,108,108,0,1,32,0,106,117,108,105,97,110,100,97,121,0,100,97,116,101,0,116,105,109,101,0,100,97,116,101,116,105,109,101,0,115,116,114,102,116,105,109,101,0,99,117,114,114,101,110,116,95,116,105,109,101,0,99,117,114,114,101,110,116,95,116,105,109,101,115,116,97,109,112,0,99,117,114,114,101,110,116,95,100,97,116,101,0,37,48,50,100,0,37,48,54,46,51,102,0,37, +48,51,100,0,37,46,49,54,103,0,37,48,52,100,0,108,111,99,97,108,116,105,109,101,0,117,110,105,120,101,112,111,99,104,0,117,116,99,0,119,101,101,107,100,97,121,32,0,115,116,97,114,116,32,111,102,32,0,109,111,110,116,104,0,121,101,97,114,0,100,97,121,0,104,111,117,114,0,109,105,110,117,116,101,0,115,101,99,111,110,100,0,50,48,99,58,50,48,101,0,50,48,101,0,50,48,98,58,50,48,101,0,108,111,99,97,108,32,116,105,109,101,32,117,110,97,118,97,105,108,97,98,108,101,0,110,111,119,0,52,48,102,45,50,49,97,45,50, +49,100,0,37,48,52,100,45,37,48,50,100,45,37,48,50,100,32,37,48,50,100,58,37,48,50,100,58,37,48,50,100,0,37,48,50,100,58,37,48,50,100,58,37,48,50,100,0,37,48,52,100,45,37,48,50,100,45,37,48,50,100,0,115,113,108,105,116,101,95,114,101,110,97,109,101,95,116,97,98,108,101,0,115,113,108,105,116,101,95,114,101,110,97,109,101,95,116,114,105,103,103,101,114,0,115,113,108,105,116,101,95,114,101,110,97,109,101,95,112,97,114,101,110,116,0,37,115,37,46,42,115,34,37,119,34,0,37,115,37,115,0,27,27,27,27,27,27, +27,27,27,7,7,27,7,7,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,7,15,8,5,4,22,24,8,17,18,21,20,23,11,26,16,3,3,3,3,3,3,3,3,3,3,5,19,12,14,13,6,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,9,27,27,27,1,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,27,10,27,25,27,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,2,2,2,2,2,2,2,2,2,2,2,2],"i8",4,n.G+10240); +z([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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,76,105,117,74,0,45,0,0,82,0,77,0,0,42,12,78,15,0,116,85,54,112,0,19,0,0,121,0,119,115,0,22,93,0,9,0,0,70,71,0,69,6,0,48,90,102,0,118,101,0,0,44,0,103,24,0,17,0,122,53,23,0,5,110,25,96,0,0,124,106,60,123,57,28,55,0,91,0,100,26,0,99,0,0,0,95,92,97,88,109,14,39,108,0,81,0,18,89,111,32,0,120,80,113,62,46,84,0,0,94,40,59,114,0,36,0,0,29,0,86,63,64,0,20,61,0,56,7,7,5,4, +6,4,5,3,6,7,3,6,6,7,7,3,8,2,6,5,4,4,3,10,4,6,11,6,2,7,5,5,9,6,9,9,7,10,10,4,6,2,3,9,4,2,6,5,7,4,5,7,6,6,5,6,5,5,9,7,7,3,2,4,4,7,3,6,4,7,6,12,6,9,4,6,5,4,7,6,5,6,7,5,4,5,6,5,7,3,7,13,2,2,4,6,6,8,5,17,12,7,8,8,2,4,4,4,4,4,2,2,6,5,8,5,8,3,5,5,6,4,9,3,82,69,73,78,68,69,88,69,68,69,83,67,65,80,69,65,67,72,69,67,75,69,89,66,69,70,79,82,69,73,71,78,79,82,69,71,69,88,80,76,65,73,78,83,84,69,65,68,68,65,84,65,66,65,83,69,76,69,67,84,65,66,76,69,70,84,72,69,78,68,69,70,69,82,82,65,66,76,69,76,83,69,88,67,69, +80,84,82,65,78,83,65,67,84,73,79,78,65,84,85,82,65,76,84,69,82,65,73,83,69,88,67,76,85,83,73,86,69,88,73,83,84,83,65,86,69,80,79,73,78,84,69,82,83,69,67,84,82,73,71,71,69,82,69,70,69,82,69,78,67,69,83,67,79,78,83,84,82,65,73,78,84,79,70,70,83,69,84,69,77,80,79,82,65,82,89,85,78,73,81,85,69,82,89,87,73,84,72,79,85,84,69,82,69,76,69,65,83,69,65,84,84,65,67,72,65,86,73,78,71,82,79,85,80,68,65,84,69,66,69,71,73,78,78,69,82,69,67,85,82,83,73,86,69,66,69,84,87,69,69,78,79,84,78,85,76,76,73,75,69,67,65, +83,67,65,68,69,76,69,84,69,67,65,83,69,67,79,76,76,65,84,69,67,82,69,65,84,69,67,85,82,82,69,78,84,95,68,65,84,69,68,69,84,65,67,72,73,77,77,69,68,73,65,84,69,74,79,73,78,83,69,82,84,77,65,84,67,72,80,76,65,78,65,76,89,90,69,80,82,65,71,77,65,66,79,82,84,86,65,76,85,69,83,86,73,82,84,85,65,76,73,77,73,84,87,72,69,78,87,72,69,82,69,78,65,77,69,65,70,84,69,82,69,80,76,65,67,69,65,78,68,69,70,65,85,76,84,65,85,84,79,73,78,67,82,69,77,69,78,84,67,65,83,84,67,79,76,85,77,78,67,79,77,77,73,84,67,79,78, +70,76,73,67,84,67,82,79,83,83,67,85,82,82,69,78,84,95,84,73,77,69,83,84,65,77,80,82,73,77,65,82,89,68,69,70,69,82,82,69,68,73,83,84,73,78,67,84,68,82,79,80,70,65,73,76,70,82,79,77,70,85,76,76,71,76,79,66,89,73,70,73,83,78,85,76,76,79,82,68,69,82,69,83,84,82,73,67,84,82,73,71,72,84,82,79,76,76,66,65,67,75,82,79,87,85,78,73,79,78,85,83,73,78,71,86,65,67,85,85,77,86,73,69,87,73,78,73,84,73,65,76,76,89,93,56,140,70,42,72,104,79,63,113,74,75,31,2,77,142,69,24,119,16,98,138,11,112,139,117,6,58,107,98,141, +83,9,20,13,118,88,105,99,131,81,80,111,21,21,27,103,3,25,92,98,14,62,128,127,110,5,98,84,32,35,19,78,101,31,65,61,109,136,53,17,95,71,8,124,108,30,4,60,82,57,120,91,129,137,130,94,59,85,28,100,106,15,33,66,67,10,68,98,95,95,102,7,121,29,114,73,123,98,31,64,18,34,126,86,98,12,87,115,125,89,90,76,116,0,0,0,0,4,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,13,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,0,21,0,0,0,0,0,50,0,43,3,47,0,0,0,0,30,0,58,0,38,0,0,0,1,66,0,0,67,0,41,0,0,0,0,0,0,49,65,0,0,0,0,31,52,16,34,10, +0,0,0,0,0,0,0,11,72,79,0,8,0,104,98,0,107,0,87,0,75,51,0,27,37,73,83,0,35,68,0,0,37,46,42,115,34,37,119,34,37,115,0,50,48,49,54,45,49,49,45,48,52,32,49,50,58,48,56,58,52,57,32,49,49,51,54,56,54,51,99,55,54,53,55,54,49,49,48,101,55,49,48,100,100,53,100,54,57,97,98,54,98,102,51,52,55,99,54,53,101,51,54,0,117,110,97,98,108,101,32,116,111,32,111,112,101,110,32,97,32,116,101,109,112,111,114,97,114,121,32,100,97,116,97,98,97,115,101,32,102,105,108,101,32,102,111,114,32,115,116,111,114,105,110,103,32,116, +101,109,112,111,114,97,114,121,32,116,97,98,108,101,115,0,58,109,101,109,111,114,121,58,0,114,101,99,111,118,101,114,101,100,32,37,100,32,112,97,103,101,115,32,102,114,111,109,32,37,115,0,100,97,116,97,98,97,115,101,32,99,111,114,114,117,112,116,105,111,110,0,217,213,5,249,32,161,99,215,99,97,110,110,111,116,32,108,105,109,105,116,32,87,65,76,32,115,105,122,101,58,32,37,115,0,114,101,99,111,118,101,114,101,100,32,37,100,32,102,114,97,109,101,115,32,102,114,111,109,32,87,65,76,32,102,105,108,101,32, +37,115,0,45,106,111,117,114,110,97,108,0,0,45,119,97,108,0,0,110,111,108,111,99,107,0,105,109,109,117,116,97,98,108,101,0,83,81,76,105,116,101,32,102,111,114,109,97,116,32,51,0,64,32,32,0,1,1,0,1,0,0,37,115,45,109,106,88,88,88,88,88,88,57,88,88,122,0,77,74,32,100,101,108,101,116,101,58,32,37,115,0,77,74,32,99,111,108,108,105,100,101,58,32,37,115,0,45,109,106,37,48,54,88,57,37,48,50,88,0,70,79,82,69,73,71,78,32,75,69,89,32,99,111,110,115,116,114,97,105,110,116,32,102,97,105,108,101,100,0,65,80,73, +32,99,97,108,108,101,100,32,119,105,116,104,32,102,105,110,97,108,105,122,101,100,32,112,114,101,112,97,114,101,100,32,115,116,97,116,101,109,101,110,116,0,100,97,116,97,98,97,115,101,32,115,99,104,101,109,97,32,105,115,32,108,111,99,107,101,100,58,32,37,115,0,115,116,97,116,101,109,101,110,116,32,116,111,111,32,108,111,110,103,0,97,100,100,114,0,111,112,99,111,100,101,0,112,49,0,112,50,0,112,51,0,112,52,0,112,53,0,99,111,109,109,101,110,116,0,115,101,108,101,99,116,105,100,0,111,114,100,101,114, +0,102,114,111,109,0,100,101,116,97,105,108,0,117,110,114,101,99,111,103,110,105,122,101,100,32,116,111,107,101,110,58,32,34,37,84,34,0,110,101,97,114,32,34,37,84,34,58,32,115,121,110,116,97,120,32,101,114,114,111,114,0,147,1,147,3,148,1,149,3,150,0,150,1,150,1,150,1,149,2,149,2,149,2,149,2,149,3,149,5,154,6,156,1,158,0,158,3,157,1,157,0,155,5,155,2,162,0,162,2,164,2,166,0,166,4,166,6,167,2,171,2,171,2,171,4,171,3,171,3,171,2,171,3,171,5,171,2,171,4,171,4,171,1,171,2,176,0,176,1,178,0,178,2,180,2, +180,3,180,3,180,3,181,2,181,2,181,1,181,1,181,2,179,3,179,2,182,0,182,2,182,2,161,0,184,1,185,2,185,7,185,5,185,5,185,10,188,0,174,0,174,3,189,0,189,2,190,1,190,1,149,4,192,2,192,0,149,9,149,4,149,1,163,2,194,3,197,1,197,2,197,1,195,9,206,4,206,5,198,1,198,1,198,0,209,0,199,3,199,2,199,4,210,2,210,0,200,0,200,2,212,2,212,0,211,7,211,9,211,7,211,7,159,0,159,2,193,2,213,1,213,2,213,3,213,4,215,2,215,0,214,0,214,3,214,2,216,4,216,0,204,0,204,3,186,4,186,2,175,1,175,1,175,0,202,0,202,3,203,0,203,2,205, +0,205,2,205,4,205,4,149,6,201,0,201,2,149,8,218,5,218,7,218,3,218,5,149,6,149,7,219,2,219,1,220,0,220,3,217,3,217,1,173,3,172,1,173,1,173,1,173,3,173,5,172,1,172,1,172,1,173,1,173,3,173,6,173,5,173,4,172,1,173,5,173,3,173,3,173,3,173,3,173,3,173,3,173,3,173,3,221,1,221,2,173,3,173,5,173,2,173,3,173,3,173,4,173,2,173,2,173,2,173,2,222,1,222,2,173,5,223,1,223,2,173,5,173,3,173,5,173,5,173,4,173,5,226,5,226,4,227,2,227,0,225,1,225,0,208,0,207,3,207,1,224,0,224,3,149,12,228,1,228,0,177,0,177,3,187,5, +187,3,229,0,229,2,149,4,149,1,149,2,149,3,149,5,149,6,149,5,149,6,169,2,170,2,149,5,231,11,233,1,233,1,233,2,233,0,234,1,234,1,234,3,236,0,236,2,232,3,232,2,238,3,239,3,239,2,237,7,237,5,237,5,237,1,173,4,173,6,191,1,191,1,191,1,149,4,149,6,149,3,241,0,241,2,149,1,149,3,149,1,149,3,149,6,149,7,242,1,149,1,149,4,244,8,246,0,247,1,247,3,248,1,196,0,196,2,196,3,250,6,250,8,144,1,145,2,145,1,146,1,146,3,147,0,151,0,151,1,151,2,153,1,153,0,149,2,160,4,160,2,152,1,152,1,152,1,166,1,167,1,168,1,168,1,165, +2,165,0,171,2,161,2,183,3,183,1,184,0,188,1,190,1,194,1,195,1,209,2,210,1,173,1,208,1,230,1,230,1,230,1,230,1,230,1,169,1,235,0,235,3,238,1,239,0,240,1,240,0,243,0,243,1,245,1,245,3,246,2,249,0,249,4,249,2,114,111,119,105,100,0,117,110,107,110,111,119,110,32,116,97,98,108,101,32,111,112,116,105,111,110,58,32,37,46,42,115,0,115,101,116,32,108,105,115,116,0,116,111,111,32,109,97,110,121,32,97,114,103,117,109,101,110,116,115,32,111,110,32,102,117,110,99,116,105,111,110,32,37,84,0,113,117,97,108,105, +102,105,101,100,32,116,97,98,108,101,32,110,97,109,101,115,32,97,114,101,32,110,111,116,32,97,108,108,111,119,101,100,32,111,110,32,73,78,83,69,82,84,44,32,85,80,68,65,84,69,44,32,97,110,100,32,68,69,76,69,84,69,32,115,116,97,116,101,109,101,110,116,115,32,119,105,116,104,105,110,32,116,114,105,103,103,101,114,115,0,116,104,101,32,73,78,68,69,88,69,68,32,66,89,32,99,108,97,117,115,101,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,111,110,32,85,80,68,65,84,69,32,111,114,32,68,69,76,69, +84,69,32,115,116,97,116,101,109,101,110,116,115,32,119,105,116,104,105,110,32,116,114,105,103,103,101,114,115,0,116,104,101,32,78,79,84,32,73,78,68,69,88,69,68,32,99,108,97,117,115,101,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,111,110,32,85,80,68,65,84,69,32,111,114,32,68,69,76,69,84,69,32,115,116,97,116,101,109,101,110,116,115,32,119,105,116,104,105,110,32,116,114,105,103,103,101,114,115,0,100,117,112,108,105,99,97,116,101,32,87,73,84,72,32,116,97,98,108,101,32,110,97,109,101,58, +32,37,115,0,110,111,116,32,97,117,116,104,111,114,105,122,101,100,0,97,117,116,104,111,114,105,122,101,114,32,109,97,108,102,117,110,99,116,105,111,110,0,67,82,69,65,84,69,32,86,73,82,84,85,65,76,32,84,65,66,76,69,32,37,84,0,115,113,108,105,116,101,95,116,101,109,112,95,109,97,115,116,101,114,0,115,113,108,105,116,101,95,109,97,115,116,101,114,0,85,80,68,65,84,69,32,37,81,46,37,115,32,83,69,84,32,116,121,112,101,61,39,116,97,98,108,101,39,44,32,110,97,109,101,61,37,81,44,32,116,98,108,95,110,97,109, +101,61,37,81,44,32,114,111,111,116,112,97,103,101,61,48,44,32,115,113,108,61,37,81,32,87,72,69,82,69,32,114,111,119,105,100,61,35,37,100,0,110,97,109,101,61,39,37,113,39,32,65,78,68,32,116,121,112,101,61,39,116,97,98,108,101,39,0,118,105,114,116,117,97,108,32,116,97,98,108,101,115,32,109,97,121,32,110,111,116,32,98,101,32,97,108,116,101,114,101,100,0,67,97,110,110,111,116,32,97,100,100,32,97,32,99,111,108,117,109,110,32,116,111,32,97,32,118,105,101,119,0,115,113,108,105,116,101,95,97,108,116,101, +114,116,97,98,95,37,115,0,115,113,108,105,116,101,95,0,116,97,98,108,101,32,37,115,32,109,97,121,32,110,111,116,32,98,101,32,97,108,116,101,114,101,100,0,110,111,32,115,117,99,104,32,118,105,101,119,0,110,111,32,115,117,99,104,32,116,97,98,108,101,0,37,115,58,32,37,115,46,37,115,0,37,115,58,32,37,115,0,118,116,97,98,108,101,32,99,111,110,115,116,114,117,99,116,111,114,32,99,97,108,108,101,100,32,114,101,99,117,114,115,105,118,101,108,121,58,32,37,115,0,118,116,97,98,108,101,32,99,111,110,115,116, +114,117,99,116,111,114,32,102,97,105,108,101,100,58,32,37,115,0,118,116,97,98,108,101,32,99,111,110,115,116,114,117,99,116,111,114,32,100,105,100,32,110,111,116,32,100,101,99,108,97,114,101,32,115,99,104,101,109,97,58,32,37,115,0,104,105,100,100,101,110,0,49,0,67,82,69,65,84,69,32,84,65,66,76,69,32,120,40,116,121,112,101,32,116,101,120,116,44,110,97,109,101,32,116,101,120,116,44,116,98,108,95,110,97,109,101,32,116,101,120,116,44,114,111,111,116,112,97,103,101,32,105,110,116,101,103,101,114,44,115, +113,108,32,116,101,120,116,41,0,97,116,116,97,99,104,101,100,32,100,97,116,97,98,97,115,101,115,32,109,117,115,116,32,117,115,101,32,116,104,101,32,115,97,109,101,32,116,101,120,116,32,101,110,99,111,100,105,110,103,32,97,115,32,109,97,105,110,32,100,97,116,97,98,97,115,101,0,117,110,115,117,112,112,111,114,116,101,100,32,102,105,108,101,32,102,111,114,109,97,116,0,83,69,76,69,67,84,32,110,97,109,101,44,32,114,111,111,116,112,97,103,101,44,32,115,113,108,32,70,82,79,77,32,34,37,119,34,46,37,115,32, +79,82,68,69,82,32,66,89,32,114,111,119,105,100,0,115,113,108,105,116,101,95,115,116,97,116,49,0,83,69,76,69,67,84,32,116,98,108,44,105,100,120,44,115,116,97,116,32,70,82,79,77,32,37,81,46,115,113,108,105,116,101,95,115,116,97,116,49,0,117,110,111,114,100,101,114,101,100,42,0,115,122,61,91,48,45,57,93,42,0,110,111,115,107,105,112,115,99,97,110,42,0,105,110,118,97,108,105,100,0,65,80,73,32,99,97,108,108,32,119,105,116,104,32,37,115,32,100,97,116,97,98,97,115,101,32,99,111,110,110,101,99,116,105,111, +110,32,112,111,105,110,116,101,114,0,99,114,101,97,116,101,32,0,105,110,118,97,108,105,100,32,114,111,111,116,112,97,103,101,0,63,0,109,97,108,102,111,114,109,101,100,32,100,97,116,97,98,97,115,101,32,115,99,104,101,109,97,32,40,37,115,41,0,37,122,32,45,32,37,115,0,67,97,110,110,111,116,32,97,100,100,32,97,32,80,82,73,77,65,82,89,32,75,69,89,32,99,111,108,117,109,110,0,67,97,110,110,111,116,32,97,100,100,32,97,32,85,78,73,81,85,69,32,99,111,108,117,109,110,0,67,97,110,110,111,116,32,97,100,100,32, +97,32,82,69,70,69,82,69,78,67,69,83,32,99,111,108,117,109,110,32,119,105,116,104,32,110,111,110,45,78,85,76,76,32,100,101,102,97,117,108,116,32,118,97,108,117,101,0,67,97,110,110,111,116,32,97,100,100,32,97,32,78,79,84,32,78,85,76,76,32,99,111,108,117,109,110,32,119,105,116,104,32,100,101,102,97,117,108,116,32,118,97,108,117,101,32,78,85,76,76,0,67,97,110,110,111,116,32,97,100,100,32,97,32,99,111,108,117,109,110,32,119,105,116,104,32,110,111,110,45,99,111,110,115,116,97,110,116,32,100,101,102,97, +117,108,116,0,85,80,68,65,84,69,32,34,37,119,34,46,37,115,32,83,69,84,32,115,113,108,32,61,32,115,117,98,115,116,114,40,115,113,108,44,49,44,37,100,41,32,124,124,32,39,44,32,39,32,124,124,32,37,81,32,124,124,32,115,117,98,115,116,114,40,115,113,108,44,37,100,41,32,87,72,69,82,69,32,116,121,112,101,32,61,32,39,116,97,98,108,101,39,32,65,78,68,32,110,97,109,101,32,61,32,37,81,0,116,98,108,95,110,97,109,101,61,37,81,0,116,121,112,101,61,39,116,114,105,103,103,101,114,39,32,65,78,68,32,40,37,115,41,0, +110,97,109,101,61,37,81,0,37,115,32,79,82,32,110,97,109,101,61,37,81,0,45,0,116,104,101,114,101,32,105,115,32,97,108,114,101,97,100,121,32,97,110,111,116,104,101,114,32,116,97,98,108,101,32,111,114,32,105,110,100,101,120,32,119,105,116,104,32,116,104,105,115,32,110,97,109,101,58,32,37,115,0,118,105,101,119,32,37,115,32,109,97,121,32,110,111,116,32,98,101,32,97,108,116,101,114,101,100,0,85,80,68,65,84,69,32,34,37,119,34,46,37,115,32,83,69,84,32,115,113,108,32,61,32,115,113,108,105,116,101,95,114,101, +110,97,109,101,95,112,97,114,101,110,116,40,115,113,108,44,32,37,81,44,32,37,81,41,32,87,72,69,82,69,32,37,115,59,0,85,80,68,65,84,69,32,37,81,46,37,115,32,83,69,84,32,115,113,108,32,61,32,67,65,83,69,32,87,72,69,78,32,116,121,112,101,32,61,32,39,116,114,105,103,103,101,114,39,32,84,72,69,78,32,115,113,108,105,116,101,95,114,101,110,97,109,101,95,116,114,105,103,103,101,114,40,115,113,108,44,32,37,81,41,69,76,83,69,32,115,113,108,105,116,101,95,114,101,110,97,109,101,95,116,97,98,108,101,40,115,113, +108,44,32,37,81,41,32,69,78,68,44,32,116,98,108,95,110,97,109,101,32,61,32,37,81,44,32,110,97,109,101,32,61,32,67,65,83,69,32,87,72,69,78,32,116,121,112,101,61,39,116,97,98,108,101,39,32,84,72,69,78,32,37,81,32,87,72,69,78,32,110,97,109,101,32,76,73,75,69,32,39,115,113,108,105,116,101,95,97,117,116,111,105,110,100,101,120,37,37,39,32,65,78,68,32,116,121,112,101,61,39,105,110,100,101,120,39,32,84,72,69,78,32,39,115,113,108,105,116,101,95,97,117,116,111,105,110,100,101,120,95,39,32,124,124,32,37,81, +32,124,124,32,115,117,98,115,116,114,40,110,97,109,101,44,37,100,43,49,56,41,32,69,76,83,69,32,110,97,109,101,32,69,78,68,32,87,72,69,82,69,32,116,98,108,95,110,97,109,101,61,37,81,32,67,79,76,76,65,84,69,32,110,111,99,97,115,101,32,65,78,68,32,40,116,121,112,101,61,39,116,97,98,108,101,39,32,79,82,32,116,121,112,101,61,39,105,110,100,101,120,39,32,79,82,32,116,121,112,101,61,39,116,114,105,103,103,101,114,39,41,59,0,115,113,108,105,116,101,95,115,101,113,117,101,110,99,101,0,85,80,68,65,84,69,32, +34,37,119,34,46,115,113,108,105,116,101,95,115,101,113,117,101,110,99,101,32,115,101,116,32,110,97,109,101,32,61,32,37,81,32,87,72,69,82,69,32,110,97,109,101,32,61,32,37,81,0,85,80,68,65,84,69,32,115,113,108,105,116,101,95,116,101,109,112,95,109,97,115,116,101,114,32,83,69,84,32,115,113,108,32,61,32,115,113,108,105,116,101,95,114,101,110,97,109,101,95,116,114,105,103,103,101,114,40,115,113,108,44,32,37,81,41,44,32,116,98,108,95,110,97,109,101,32,61,32,37,81,32,87,72,69,82,69,32,37,115,59,0,118,105, +101,119,32,37,115,32,105,115,32,99,105,114,99,117,108,97,114,108,121,32,100,101,102,105,110,101,100,0,110,111,32,115,117,99,104,32,99,111,108,108,97,116,105,111,110,32,115,101,113,117,101,110,99,101,58,32,37,115,0,3,2,1,73,78,84,69,71,69,82,0,37,46,42,122,58,37,117,0,97,32,71,82,79,85,80,32,66,89,32,99,108,97,117,115,101,32,105,115,32,114,101,113,117,105,114,101,100,32,98,101,102,111,114,101,32,72,65,86,73,78,71,0,79,82,68,69,82,0,71,82,79,85,80,0,97,103,103,114,101,103,97,116,101,32,102,117,110, +99,116,105,111,110,115,32,97,114,101,32,110,111,116,32,97,108,108,111,119,101,100,32,105,110,32,116,104,101,32,71,82,79,85,80,32,66,89,32,99,108,97,117,115,101,0,116,111,111,32,109,97,110,121,32,116,101,114,109,115,32,105,110,32,79,82,68,69,82,32,66,89,32,99,108,97,117,115,101,0,37,114,32,79,82,68,69,82,32,66,89,32,116,101,114,109,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,97,110,121,32,99,111,108,117,109,110,32,105,110,32,116,104,101,32,114,101,115,117,108,116,32,115,101,116,0,37, +114,32,37,115,32,66,89,32,116,101,114,109,32,111,117,116,32,111,102,32,114,97,110,103,101,32,45,32,115,104,111,117,108,100,32,98,101,32,98,101,116,119,101,101,110,32,49,32,97,110,100,32,37,100,0,97,108,108,32,86,65,76,85,69,83,32,109,117,115,116,32,104,97,118,101,32,116,104,101,32,115,97,109,101,32,110,117,109,98,101,114,32,111,102,32,116,101,114,109,115,0,83,69,76,69,67,84,115,32,116,111,32,116,104,101,32,108,101,102,116,32,97,110,100,32,114,105,103,104,116,32,111,102,32,37,115,32,100,111,32,110, +111,116,32,104,97,118,101,32,116,104,101,32,115,97,109,101,32,110,117,109,98,101,114,32,111,102,32,114,101,115,117,108,116,32,99,111,108,117,109,110,115,0,85,78,73,79,78,32,65,76,76,0,73,78,84,69,82,83,69,67,84,0,69,88,67,69,80,84,0,85,78,73,79,78,0,116,111,111,32,109,97,110,121,32,116,101,114,109,115,32,105,110,32,37,115,32,66,89,32,99,108,97,117,115,101,0,69,120,112,114,101,115,115,105,111,110,32,116,114,101,101,32,105,115,32,116,111,111,32,108,97,114,103,101,32,40,109,97,120,105,109,117,109,32, +100,101,112,116,104,32,37,100,41,0,116,104,101,32,34,46,34,32,111,112,101,114,97,116,111,114,0,115,101,99,111,110,100,32,97,114,103,117,109,101,110,116,32,116,111,32,108,105,107,101,108,105,104,111,111,100,40,41,32,109,117,115,116,32,98,101,32,97,32,99,111,110,115,116,97,110,116,32,98,101,116,119,101,101,110,32,48,46,48,32,97,110,100,32,49,46,48,0,110,111,116,32,97,117,116,104,111,114,105,122,101,100,32,116,111,32,117,115,101,32,102,117,110,99,116,105,111,110,58,32,37,115,0,110,111,110,45,100,101, +116,101,114,109,105,110,105,115,116,105,99,32,102,117,110,99,116,105,111,110,115,0,109,105,115,117,115,101,32,111,102,32,97,103,103,114,101,103,97,116,101,32,102,117,110,99,116,105,111,110,32,37,46,42,115,40,41,0,110,111,32,115,117,99,104,32,102,117,110,99,116,105,111,110,58,32,37,46,42,115,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,116,111,32,102,117,110,99,116,105,111,110,32,37,46,42,115,40,41,0,115,117,98,113,117,101,114,105,101,115,0,112, +97,114,97,109,101,116,101,114,115,0,114,111,119,32,118,97,108,117,101,32,109,105,115,117,115,101,100,0,112,97,114,116,105,97,108,32,105,110,100,101,120,32,87,72,69,82,69,32,99,108,97,117,115,101,115,0,105,110,100,101,120,32,101,120,112,114,101,115,115,105,111,110,115,0,67,72,69,67,75,32,99,111,110,115,116,114,97,105,110,116,115,0,37,115,32,112,114,111,104,105,98,105,116,101,100,32,105,110,32,37,115,0,110,101,119,0,111,108,100,0,109,105,115,117,115,101,32,111,102,32,97,108,105,97,115,101,100,32,97, +103,103,114,101,103,97,116,101,32,37,115,0,110,111,32,115,117,99,104,32,99,111,108,117,109,110,0,97,109,98,105,103,117,111,117,115,32,99,111,108,117,109,110,32,110,97,109,101,0,37,115,58,32,37,115,46,37,115,46,37,115,0,82,79,87,73,68,0,97,99,99,101,115,115,32,116,111,32,37,115,46,37,115,46,37,115,32,105,115,32,112,114,111,104,105,98,105,116,101,100,0,97,99,99,101,115,115,32,116,111,32,37,115,46,37,115,32,105,115,32,112,114,111,104,105,98,105,116,101,100,0,95,82,79,87,73,68,95,0,79,73,68,0,115,113, +108,105,116,101,95,115,113,95,37,112,0,116,111,111,32,109,97,110,121,32,114,101,102,101,114,101,110,99,101,115,32,116,111,32,34,37,115,34,58,32,109,97,120,32,54,53,53,51,53,0,42,0,37,115,46,37,115,0,37,115,46,37,115,46,37,115,0,110,111,32,115,117,99,104,32,116,97,98,108,101,58,32,37,115,0,110,111,32,116,97,98,108,101,115,32,115,112,101,99,105,102,105,101,100,0,116,111,111,32,109,97,110,121,32,99,111,108,117,109,110,115,32,105,110,32,114,101,115,117,108,116,32,115,101,116,0,97,32,78,65,84,85,82,65, +76,32,106,111,105,110,32,109,97,121,32,110,111,116,32,104,97,118,101,32,97,110,32,79,78,32,111,114,32,85,83,73,78,71,32,99,108,97,117,115,101,0,99,97,110,110,111,116,32,104,97,118,101,32,98,111,116,104,32,79,78,32,97,110,100,32,85,83,73,78,71,32,99,108,97,117,115,101,115,32,105,110,32,116,104,101,32,115,97,109,101,32,106,111,105,110,0,99,97,110,110,111,116,32,106,111,105,110,32,117,115,105,110,103,32,99,111,108,117,109,110,32,37,115,32,45,32,99,111,108,117,109,110,32,110,111,116,32,112,114,101,115, +101,110,116,32,105,110,32,98,111,116,104,32,116,97,98,108,101,115,0,110,111,32,115,117,99,104,32,105,110,100,101,120,58,32,37,115,0,39,37,115,39,32,105,115,32,110,111,116,32,97,32,102,117,110,99,116,105,111,110,0,109,117,108,116,105,112,108,101,32,114,101,102,101,114,101,110,99,101,115,32,116,111,32,114,101,99,117,114,115,105,118,101,32,116,97,98,108,101,58,32,37,115,0,99,105,114,99,117,108,97,114,32,114,101,102,101,114,101,110,99,101,58,32,37,115,0,116,97,98,108,101,32,37,115,32,104,97,115,32,37, +100,32,118,97,108,117,101,115,32,102,111,114,32,37,100,32,99,111,108,117,109,110,115,0,109,117,108,116,105,112,108,101,32,114,101,99,117,114,115,105,118,101,32,114,101,102,101,114,101,110,99,101,115,58,32,37,115,0,114,101,99,117,114,115,105,118,101,32,114,101,102,101,114,101,110,99,101,32,105,110,32,97,32,115,117,98,113,117,101,114,121,58,32,37,115,0,110,111,32,115,117,99,104,32,109,111,100,117,108,101,58,32,37,115,0,111,98,106,101,99,116,32,110,97,109,101,32,114,101,115,101,114,118,101,100,32,102, +111,114,32,105,110,116,101,114,110,97,108,32,117,115,101,58,32,37,115,0,99,111,114,114,117,112,116,32,100,97,116,97,98,97,115,101,0,117,110,107,110,111,119,110,32,100,97,116,97,98,97,115,101,32,37,84,0,105,100,120,0,116,98,108,0,115,113,108,105,116,101,95,37,0,66,66,66,0,115,116,97,116,95,103,101,116,0,37,108,108,117,0,32,37,108,108,117,0,115,116,97,116,95,112,117,115,104,0,115,116,97,116,95,105,110,105,116,0,67,82,69,65,84,69,32,84,65,66,76,69,32,37,81,46,37,115,40,37,115,41,0,68,69,76,69,84,69, +32,70,82,79,77,32,37,81,46,37,115,32,87,72,69,82,69,32,37,115,61,37,81,0,116,98,108,44,105,100,120,44,115,116,97,116,0,115,113,108,105,116,101,95,115,116,97,116,51,0,115,113,108,105,116,101,95,115,116,97,116,52,0,117,110,97,98,108,101,32,116,111,32,105,100,101,110,116,105,102,121,32,116,104,101,32,111,98,106,101,99,116,32,116,111,32,98,101,32,114,101,105,110,100,101,120,101,100,0,105,110,100,101,120,32,39,37,113,39,0,44,32,0,109,105,115,117,115,101,32,111,102,32,97,103,103,114,101,103,97,116,101, +58,32,37,115,40,41,0,117,110,107,110,111,119,110,32,102,117,110,99,116,105,111,110,58,32,37,115,40,41,0,82,65,73,83,69,40,41,32,109,97,121,32,111,110,108,121,32,98,101,32,117,115,101,100,32,119,105,116,104,105,110,32,97,32,116,114,105,103,103,101,114,45,112,114,111,103,114,97,109,0,85,83,73,78,71,32,73,78,68,69,88,32,37,115,32,70,79,82,32,73,78,45,79,80,69,82,65,84,79,82,0,67,79,82,82,69,76,65,84,69,68,32,0,76,73,83,84,0,83,67,65,76,65,82,0,69,88,69,67,85,84,69,32,37,115,37,115,32,83,85,66,81,85, +69,82,89,32,37,100,0,115,117,98,45,115,101,108,101,99,116,32,114,101,116,117,114,110,115,32,37,100,32,99,111,108,117,109,110,115,32,45,32,101,120,112,101,99,116,101,100,32,37,100,0,48,120,0,104,101,120,32,108,105,116,101,114,97,108,32,116,111,111,32,98,105,103,58,32,37,115,0,115,113,108,105,116,101,95,100,101,116,97,99,104,0,110,111,32,115,117,99,104,32,100,97,116,97,98,97,115,101,58,32,37,115,0,99,97,110,110,111,116,32,100,101,116,97,99,104,32,100,97,116,97,98,97,115,101,32,37,115,0,99,97,110,110, +111,116,32,68,69,84,65,67,72,32,100,97,116,97,98,97,115,101,32,119,105,116,104,105,110,32,116,114,97,110,115,97,99,116,105,111,110,0,100,97,116,97,98,97,115,101,32,37,115,32,105,115,32,108,111,99,107,101,100,0,115,113,108,105,116,101,95,97,116,116,97,99,104,0,116,111,111,32,109,97,110,121,32,97,116,116,97,99,104,101,100,32,100,97,116,97,98,97,115,101,115,32,45,32,109,97,120,32,37,100,0,99,97,110,110,111,116,32,65,84,84,65,67,72,32,100,97,116,97,98,97,115,101,32,119,105,116,104,105,110,32,116,114, +97,110,115,97,99,116,105,111,110,0,100,97,116,97,98,97,115,101,32,37,115,32,105,115,32,97,108,114,101,97,100,121,32,105,110,32,117,115,101,0,100,97,116,97,98,97,115,101,32,105,115,32,97,108,114,101,97,100,121,32,97,116,116,97,99,104,101,100,0,117,110,97,98,108,101,32,116,111,32,111,112,101,110,32,100,97,116,97,98,97,115,101,58,32,37,115,0,102,105,108,101,58,0,108,111,99,97,108,104,111,115,116,0,105,110,118,97,108,105,100,32,117,114,105,32,97,117,116,104,111,114,105,116,121,58,32,37,46,42,115,0,118, +102,115,0,99,97,99,104,101,0,109,111,100,101,0,110,111,32,115,117,99,104,32,37,115,32,109,111,100,101,58,32,37,115,0,37,115,32,109,111,100,101,32,110,111,116,32,97,108,108,111,119,101,100,58,32,37,115,0,110,111,32,115,117,99,104,32,118,102,115,58,32,37,115,0,114,111,0,114,119,0,114,119,99,0,109,101,109,111,114,121,0,115,104,97,114,101,100,0,112,114,105,118,97,116,101,0,110,111,32,115,117,99,104,32,116,114,105,103,103,101,114,58,32,37,83,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,37,115,32,87, +72,69,82,69,32,110,97,109,101,61,37,81,32,65,78,68,32,116,121,112,101,61,39,116,114,105,103,103,101,114,39,0,116,101,109,112,111,114,97,114,121,32,116,114,105,103,103,101,114,32,109,97,121,32,110,111,116,32,104,97,118,101,32,113,117,97,108,105,102,105,101,100,32,110,97,109,101,0,116,114,105,103,103,101,114,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,116,114,105,103,103,101,114,115,32,111,110,32,118,105,114,116,117,97,108,32,116,97,98,108,101,115,0,116,114,105,103,103,101,114,32,37,84,32,97, +108,114,101,97,100,121,32,101,120,105,115,116,115,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,116,114,105,103,103,101,114,32,111,110,32,115,121,115,116,101,109,32,116,97,98,108,101,0,66,69,70,79,82,69,0,65,70,84,69,82,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,37,115,32,116,114,105,103,103,101,114,32,111,110,32,118,105,101,119,58,32,37,83,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,73,78,83,84,69,65,68,32,79,70,32,116,114,105,103,103,101,114,32,111,110,32,116,97,98,108,101, +58,32,37,83,0,37,115,32,37,84,32,99,97,110,110,111,116,32,114,101,102,101,114,101,110,99,101,32,111,98,106,101,99,116,115,32,105,110,32,100,97,116,97,98,97,115,101,32,37,115,0,37,115,32,99,97,110,110,111,116,32,117,115,101,32,118,97,114,105,97,98,108,101,115,0,73,78,83,69,82,84,32,73,78,84,79,32,37,81,46,37,115,32,86,65,76,85,69,83,40,39,116,114,105,103,103,101,114,39,44,37,81,44,37,81,44,48,44,39,67,82,69,65,84,69,32,84,82,73,71,71,69,82,32,37,113,39,41,0,116,121,112,101,61,39,116,114,105,103,103, +101,114,39,32,65,78,68,32,110,97,109,101,61,39,37,113,39,0,45,37,84,0,114,101,115,117,108,116,0,99,97,99,104,101,95,115,105,122,101,0,2,0,0,0,101,0,1,3,66,1,8,0,76,0,2,0,48,1,2,1,66,1,8,0,76,0,1,0,161,0,0,0,87,1,1,0,112,97,103,101,95,115,105,122,101,0,115,101,99,117,114,101,95,100,101,108,101,116,101,0,110,111,114,109,97,108,0,101,120,99,108,117,115,105,118,101,0,108,111,99,107,105,110,103,95,109,111,100,101,0,106,111,117,114,110,97,108,95,109,111,100,101,0,106,111,117,114,110,97,108,95,115,105,122, +101,95,108,105,109,105,116,0,97,117,116,111,95,118,97,99,117,117,109,0,2,0,1,0,101,0,1,4,21,1,0,0,75,0,2,0,102,0,7,0,99,97,99,104,101,95,115,112,105,108,108,0,109,109,97,112,95,115,105,122,101,0,116,101,109,112,95,115,116,111,114,101,0,116,101,109,112,95,115,116,111,114,101,95,100,105,114,101,99,116,111,114,121,0,110,111,116,32,97,32,119,114,105,116,97,98,108,101,32,100,105,114,101,99,116,111,114,121,0,115,121,110,99,104,114,111,110,111,117,115,0,83,97,102,101,116,121,32,108,101,118,101,108,32,109, +97,121,32,110,111,116,32,98,101,32,99,104,97,110,103,101,100,32,105,110,115,105,100,101,32,97,32,116,114,97,110,115,97,99,116,105,111,110,0,105,115,115,105,115,105,0,115,115,105,105,0,115,105,105,0,105,105,115,0,105,115,105,0,105,115,105,115,105,0,105,115,115,0,105,115,0,105,105,115,115,115,115,115,115,0,78,79,78,69,0,115,105,0,105,110,116,101,103,114,105,116,121,95,99,104,101,99,107,0,42,42,42,32,105,110,32,100,97,116,97,98,97,115,101,32,37,115,32,42,42,42,10,0,78,85,76,76,32,118,97,108,117,101, +32,105,110,32,37,115,46,37,115,0,114,111,119,32,0,32,109,105,115,115,105,110,103,32,102,114,111,109,32,105,110,100,101,120,32,0,110,111,110,45,117,110,105,113,117,101,32,101,110,116,114,121,32,105,110,32,105,110,100,101,120,32,0,119,114,111,110,103,32,35,32,111,102,32,101,110,116,114,105,101,115,32,105,110,32,105,110,100,101,120,32,0,91,1,0,0,21,1,4,0,97,0,3,0,87,3,1,0,111,107,0,101,110,99,111,100,105,110,103,0,117,110,115,117,112,112,111,114,116,101,100,32,101,110,99,111,100,105,110,103,58,32,37, +115,0,2,0,1,0,102,0,0,0,2,0,0,0,101,0,1,0,87,1,1,0,99,111,109,112,105,108,101,95,111,112,116,105,111,110,0,102,117,108,108,0,114,101,115,116,97,114,116,0,116,114,117,110,99,97,116,101,0,119,97,108,95,97,117,116,111,99,104,101,99,107,112,111,105,110,116,0,116,105,109,101,111,117,116,0,115,111,102,116,95,104,101,97,112,95,108,105,109,105,116,0,116,104,114,101,97,100,115,0,117,110,107,110,111,119,110,32,100,97,116,97,98,97,115,101,58,32,37,115,0,98,117,115,121,0,108,111,103,0,99,104,101,99,107,112,111, +105,110,116,101,100,0,85,84,70,56,0,85,84,70,45,56,0,85,84,70,45,49,54,108,101,0,85,84,70,45,49,54,98,101,0,85,84,70,49,54,108,101,0,85,84,70,49,54,98,101,0,85,84,70,45,49,54,0,85,84,70,49,54,0,37,95,0,0,117,110,97,98,108,101,32,116,111,32,100,101,108,101,116,101,47,109,111,100,105,102,121,32,117,115,101,114,45,102,117,110,99,116,105,111,110,32,100,117,101,32,116,111,32,97,99,116,105,118,101,32,115,116,97,116,101,109,101,110,116,115,0,102,111,114,101,105,103,110,32,107,101,121,32,109,105,115,109, +97,116,99,104,32,45,32,34,37,119,34,32,114,101,102,101,114,101,110,99,105,110,103,32,34,37,119,34,0,116,97,98,108,101,0,112,97,114,101,110,116,0,102,107,105,100,0,83,69,84,32,78,85,76,76,0,83,69,84,32,68,69,70,65,85,76,84,0,67,65,83,67,65,68,69,0,82,69,83,84,82,73,67,84,0,78,79,32,65,67,84,73,79,78,0,105,100,0,115,101,113,0,116,111,0,111,110,95,117,112,100,97,116,101,0,111,110,95,100,101,108,101,116,101,0,109,97,116,99,104,0,110,97,109,101,0,102,105,108,101,0,99,0,117,0,112,107,0,117,110,105,113, +117,101,0,111,114,105,103,105,110,0,112,97,114,116,105,97,108,0,115,101,113,110,111,0,99,105,100,0,100,101,115,99,0,99,111,108,108,0,107,101,121,0,105,110,100,101,120,0,119,105,100,116,104,0,104,101,105,103,104,116,0,116,121,112,101,0,110,111,116,110,117,108,108,0,100,102,108,116,95,118,97,108,117,101,0,116,101,109,112,111,114,97,114,121,32,115,116,111,114,97,103,101,32,99,97,110,110,111,116,32,98,101,32,99,104,97,110,103,101,100,32,102,114,111,109,32,119,105,116,104,105,110,32,97,32,116,114,97,110, +115,97,99,116,105,111,110,0,110,111,110,101,0,105,110,99,114,101,109,101,110,116,97,108,0,100,101,108,101,116,101,0,112,101,114,115,105,115,116,0,111,102,102,0,119,97,108,0,0,0,0,1,1,1,1,1,0,16,0,1,0,1,1,1,3,3,1,18,1,3,3,9,9,9,9,38,38,9,9,9,9,9,3,3,11,11,11,11,11,11,1,38,38,38,38,38,38,38,38,38,38,1,18,1,1,1,1,1,1,1,35,11,1,1,3,3,3,1,1,1,2,2,8,0,16,16,16,16,0,16,16,0,0,16,16,0,0,0,0,2,2,2,0,0,0,16,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,16,0,4,4,0,0,16,16,0,16,0,16,16,0,0,0,0,0,0,6, +16,0,4,26,0,0,0,0,0,0,0,0,0,0,0,16,16,0,0,0,97,112,112,108,105,99,97,116,105,111,110,95,105,100,0,97,117,116,111,109,97,116,105,99,95,105,110,100,101,120,0,98,117,115,121,95,116,105,109,101,111,117,116,0,99,97,115,101,95,115,101,110,115,105,116,105,118,101,95,108,105,107,101,0,99,101,108,108,95,115,105,122,101,95,99,104,101,99,107,0,99,104,101,99,107,112,111,105,110,116,95,102,117,108,108,102,115,121,110,99,0,99,111,108,108,97,116,105,111,110,95,108,105,115,116,0,99,111,109,112,105,108,101,95,111, +112,116,105,111,110,115,0,99,111,117,110,116,95,99,104,97,110,103,101,115,0,100,97,116,97,95,118,101,114,115,105,111,110,0,100,97,116,97,98,97,115,101,95,108,105,115,116,0,100,101,102,97,117,108,116,95,99,97,99,104,101,95,115,105,122,101,0,100,101,102,101,114,95,102,111,114,101,105,103,110,95,107,101,121,115,0,101,109,112,116,121,95,114,101,115,117,108,116,95,99,97,108,108,98,97,99,107,115,0,102,111,114,101,105,103,110,95,107,101,121,95,99,104,101,99,107,0,102,111,114,101,105,103,110,95,107,101,121, +95,108,105,115,116,0,102,111,114,101,105,103,110,95,107,101,121,115,0,102,114,101,101,108,105,115,116,95,99,111,117,110,116,0,102,117,108,108,95,99,111,108,117,109,110,95,110,97,109,101,115,0,102,117,108,108,102,115,121,110,99,0,105,103,110,111,114,101,95,99,104,101,99,107,95,99,111,110,115,116,114,97,105,110,116,115,0,105,110,99,114,101,109,101,110,116,97,108,95,118,97,99,117,117,109,0,105,110,100,101,120,95,105,110,102,111,0,105,110,100,101,120,95,108,105,115,116,0,105,110,100,101,120,95,120,105, +110,102,111,0,108,101,103,97,99,121,95,102,105,108,101,95,102,111,114,109,97,116,0,109,97,120,95,112,97,103,101,95,99,111,117,110,116,0,112,97,103,101,95,99,111,117,110,116,0,113,117,101,114,121,95,111,110,108,121,0,113,117,105,99,107,95,99,104,101,99,107,0,114,101,97,100,95,117,110,99,111,109,109,105,116,116,101,100,0,114,101,99,117,114,115,105,118,101,95,116,114,105,103,103,101,114,115,0,114,101,118,101,114,115,101,95,117,110,111,114,100,101,114,101,100,95,115,101,108,101,99,116,115,0,115,99,104, +101,109,97,95,118,101,114,115,105,111,110,0,115,104,111,114,116,95,99,111,108,117,109,110,95,110,97,109,101,115,0,115,104,114,105,110,107,95,109,101,109,111,114,121,0,115,116,97,116,115,0,116,97,98,108,101,95,105,110,102,111,0,117,115,101,114,95,118,101,114,115,105,111,110,0,119,97,108,95,99,104,101,99,107,112,111,105,110,116,0,119,114,105,116,97,98,108,101,95,115,99,104,101,109,97,0,110,111,32,115,117,99,104,32,105,110,100,101,120,58,32,37,83,0,105,110,100,101,120,32,97,115,115,111,99,105,97,116, +101,100,32,119,105,116,104,32,85,78,73,81,85,69,32,111,114,32,80,82,73,77,65,82,89,32,75,69,89,32,99,111,110,115,116,114,97,105,110,116,32,99,97,110,110,111,116,32,98,101,32,100,114,111,112,112,101,100,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,37,115,32,87,72,69,82,69,32,110,97,109,101,61,37,81,32,65,78,68,32,116,121,112,101,61,39,105,110,100,101,120,39,0,85,80,68,65,84,69,32,37,81,46,37,115,32,83,69,84,32,114,111,111,116,112,97,103,101,61,37,100,32,87,72,69,82,69,32,35,37,100,32,65,78,68,32, +114,111,111,116,112,97,103,101,61,35,37,100,0,115,113,108,105,116,101,95,115,116,97,116,37,100,0,115,121,110,116,97,120,32,101,114,114,111,114,32,97,102,116,101,114,32,99,111,108,117,109,110,32,110,97,109,101,32,34,37,46,42,115,34,0,48,0,118,97,114,105,97,98,108,101,32,110,117,109,98,101,114,32,109,117,115,116,32,98,101,32,98,101,116],"i8",4,n.G+20480); +z([119,101,101,110,32,63,49,32,97,110,100,32,63,37,100,0,116,111,111,32,109,97,110,121,32,83,81,76,32,118,97,114,105,97,98,108,101,115,0,116,97,98,108,101,32,37,83,32,104,97,115,32,110,111,32,99,111,108,117,109,110,32,110,97,109,101,100,32,37,115,0,116,97,98,108,101,32,37,83,32,104,97,115,32,37,100,32,99,111,108,117,109,110,115,32,98,117,116,32,37,100,32,118,97,108,117,101,115,32,119,101,114,101,32,115,117,112,112,108,105,101,100,0,37,100,32,118,97,108,117,101,115,32,102,111,114,32,37,100,32,99,111, +108,117,109,110,115,0,114,111,119,115,32,105,110,115,101,114,116,101,100,0,35,0,2,0,114,0,0,0,99,0,2,0,115,0,0,0,111,0,0,0,97,116,32,109,111,115,116,32,37,100,32,116,97,98,108,101,115,32,105,110,32,97,32,106,111,105,110,0,26,24,23,25,0,0,57,53,26,23,25,24,61,59,58,60,7,6,57,53,83,69,65,82,67,72,0,83,67,65,78,0,32,83,85,66,81,85,69,82,89,32,37,100,0,32,84,65,66,76,69,32,37,115,0,32,65,83,32,37,115,0,80,82,73,77,65,82,89,32,75,69,89,0,65,85,84,79,77,65,84,73,67,32,80,65,82,84,73,65,76,32,67,79,86,69, +82,73,78,71,32,73,78,68,69,88,0,65,85,84,79,77,65,84,73,67,32,67,79,86,69,82,73,78,71,32,73,78,68,69,88,0,67,79,86,69,82,73,78,71,32,73,78,68,69,88,32,37,115,0,73,78,68,69,88,32,37,115,0,32,85,83,73,78,71,32,0,61,0,62,63,32,65,78,68,32,114,111,119,105,100,60,0,62,0,60,0,32,85,83,73,78,71,32,73,78,84,69,71,69,82,32,80,82,73,77,65,82,89,32,75,69,89,32,40,114,111,119,105,100,37,115,63,41,0,32,86,73,82,84,85,65,76,32,84,65,66,76,69,32,73,78,68,69,88,32,37,100,58,37,115,0,32,40,0,32,65,78,68,32,0,37,115, +61,63,0,65,78,89,40,37,115,41,0,41,0,40,0,60,101,120,112,114,62,0,97,117,116,111,109,97,116,105,99,32,105,110,100,101,120,32,111,110,32,37,115,40,37,115,41,0,97,117,116,111,45,105,110,100,101,120,0,110,111,32,113,117,101,114,121,32,115,111,108,117,116,105,111,110,0,10,10,9,9,8,8,7,7,7,6,6,6,5,5,5,4,4,4,4,3,3,3,3,3,3,2,2,2,2,2,2,2,37,115,46,120,66,101,115,116,73,110,100,101,120,32,109,97,108,102,117,110,99,116,105,111,110,0,41,39,78,79,67,65,83,69,0,66,73,78,65,82,89,0,114,101,103,101,120,112,0,116, +111,111,32,109,97,110,121,32,97,114,103,117,109,101,110,116,115,32,111,110,32,37,115,40,41,32,45,32,109,97,120,32,37,100,0,45,45,32,84,82,73,71,71,69,82,32,37,115,0,0,1,2,3,4,6,8,8,0,0,0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,35,36,36,37,37,38,38,39,39,40,40,41,41,42,42,43,43,44,44,45,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55, +55,56,56,57,57,37,115,46,114,111,119,105,100,0,116,97,98,108,101,32,37,115,32,109,97,121,32,110,111,116,32,98,101,32,109,111,100,105,102,105,101,100,0,99,97,110,110,111,116,32,109,111,100,105,102,121,32,37,115,32,98,101,99,97,117,115,101,32,105,116,32,105,115,32,97,32,118,105,101,119,0,37,100,32,99,111,108,117,109,110,115,32,97,115,115,105,103,110,101,100,32,37,100,32,118,97,108,117,101,115,0,110,111,32,115,117,99,104,32,99,111,108,117,109,110,58,32,37,115,0,114,111,119,115,32,117,112,100,97,116, +101,100,0,116,111,111,32,109,97,110,121,32,99,111,108,117,109,110,115,32,105,110,32,37,115,0,114,111,119,115,32,100,101,108,101,116,101,100,0,0,7,4,6,4,40,10,5,32,14,5,48,19,4,56,23,5,1,28,5,3,110,97,116,117,114,97,108,101,102,116,111,117,116,101,114,105,103,104,116,102,117,108,108,105,110,110,101,114,99,114,111,115,115,0,117,110,107,110,111,119,110,32,111,114,32,117,110,115,117,112,112,111,114,116,101,100,32,106,111,105,110,32,116,121,112,101,58,32,37,84,32,37,84,37,115,37,84,0,82,73,71,72,84,32, +97,110,100,32,70,85,76,76,32,79,85,84,69,82,32,74,79,73,78,115,32,97,114,101,32,110,111,116,32,99,117,114,114,101,110,116,108,121,32,115,117,112,112,111,114,116,101,100,0,79,78,0,85,83,73,78,71,0,97,32,74,79,73,78,32,99,108,97,117,115,101,32,105,115,32,114,101,113,117,105,114,101,100,32,98,101,102,111,114,101,32,37,115,0,116,111,111,32,109,97,110,121,32,116,101,114,109,115,32,105,110,32,99,111,109,112,111,117,110,100,32,83,69,76,69,67,84,0,101,120,112,101,99,116,101,100,32,37,100,32,99,111,108,117, +109,110,115,32,102,111,114,32,39,37,115,39,32,98,117,116,32,103,111,116,32,37,100,0,68,73,83,84,73,78,67,84,0,71,82,79,85,80,32,66,89,0,82,73,71,72,84,32,80,65,82,84,32,79,70,32,79,82,68,69,82,32,66,89,0,79,82,68,69,82,32,66,89,0,99,111,108,117,109,110,37,100,0,32,85,83,73,78,71,32,67,79,86,69,82,73,78,71,32,73,78,68,69,88,32,0,83,67,65,78,32,84,65,66,76,69,32,37,115,37,115,37,115,0,68,73,83,84,73,78,67,84,32,97,103,103,114,101,103,97,116,101,115,32,109,117,115,116,32,104,97,118,101,32,101,120,97, +99,116,108,121,32,111,110,101,32,97,114,103,117,109,101,110,116,0,85,83,69,32,84,69,77,80,32,66,45,84,82,69,69,32,70,79,82,32,37,115,0,79,82,68,69,82,32,66,89,32,99,108,97,117,115,101,32,115,104,111,117,108,100,32,99,111,109,101,32,97,102,116,101,114,32,37,115,32,110,111,116,32,98,101,102,111,114,101,0,76,73,77,73,84,32,99,108,97,117,115,101,32,115,104,111,117,108,100,32,99,111,109,101,32,97,102,116,101,114,32,37,115,32,110,111,116,32,98,101,102,111,114,101,0,85,83,73,78,71,32,84,69,77,80,32,66,45, +84,82,69,69,32,0,67,79,77,80,79,85,78,68,32,83,85,66,81,85,69,82,73,69,83,32,37,100,32,65,78,68,32,37,100,32,37,115,40,37,115,41,0,114,101,99,117,114,115,105,118,101,32,97,103,103,114,101,103,97,116,101,32,113,117,101,114,105,101,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,112,97,114,97,109,101,116,101,114,115,32,97,114,101,32,110,111,116,32,97,108,108,111,119,101,100,32,105,110,32,118,105,101,119,115,0,118,105,101,119,0,115,113,108,105,116,101,95,115,116,97,116,0,116,97,98,108,101, +32,37,115,32,109,97,121,32,110,111,116,32,98,101,32,100,114,111,112,112,101,100,0,117,115,101,32,68,82,79,80,32,84,65,66,76,69,32,116,111,32,100,101,108,101,116,101,32,116,97,98,108,101,32,37,115,0,117,115,101,32,68,82,79,80,32,86,73,69,87,32,116,111,32,100,101,108,101,116,101,32,118,105,101,119,32,37,115,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,115,113,108,105,116,101,95,115,101,113,117,101,110,99,101,32,87,72,69,82,69,32,110,97,109,101,61,37,81,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81, +46,37,115,32,87,72,69,82,69,32,116,98,108,95,110,97,109,101,61,37,81,32,97,110,100,32,116,121,112,101,33,61,39,116,114,105,103,103,101,114,39,0,102,111,114,101,105,103,110,32,107,101,121,32,111,110,32,37,115,32,115,104,111,117,108,100,32,114,101,102,101,114,101,110,99,101,32,111,110,108,121,32,111,110,101,32,99,111,108,117,109,110,32,111,102,32,116,97,98,108,101,32,37,84,0,110,117,109,98,101,114,32,111,102,32,99,111,108,117,109,110,115,32,105,110,32,102,111,114,101,105,103,110,32,107,101,121,32,100, +111,101,115,32,110,111,116,32,109,97,116,99,104,32,116,104,101,32,110,117,109,98,101,114,32,111,102,32,99,111,108,117,109,110,115,32,105,110,32,116,104,101,32,114,101,102,101,114,101,110,99,101,100,32,116,97,98,108,101,0,117,110,107,110,111,119,110,32,99,111,108,117,109,110,32,34,37,115,34,32,105,110,32,102,111,114,101,105,103,110,32,107,101,121,32,100,101,102,105,110,105,116,105,111,110,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,97,32,84,69,77,80,32,105,110,100,101,120,32,111,110,32,110, +111,110,45,84,69,77,80,32,116,97,98,108,101,32,34,37,115,34,0,97,108,116,101,114,116,97,98,95,0,116,97,98,108,101,32,37,115,32,109,97,121,32,110,111,116,32,98,101,32,105,110,100,101,120,101,100,0,118,105,101,119,115,32,109,97,121,32,110,111,116,32,98,101,32,105,110,100,101,120,101,100,0,118,105,114,116,117,97,108,32,116,97,98,108,101,115,32,109,97,121,32,110,111,116,32,98,101,32,105,110,100,101,120,101,100,0,116,104,101,114,101,32,105,115,32,97,108,114,101,97,100,121,32,97,32,116,97,98,108,101,32, +110,97,109,101,100,32,37,115,0,105,110,100,101,120,32,37,115,32,97,108,114,101,97,100,121,32,101,120,105,115,116,115,0,115,113,108,105,116,101,95,97,117,116,111,105,110,100,101,120,95,37,115,95,37,100,0,101,120,112,114,101,115,115,105,111,110,115,32,112,114,111,104,105,98,105,116,101,100,32,105,110,32,80,82,73,77,65,82,89,32,75,69,89,32,97,110,100,32,85,78,73,81,85,69,32,99,111,110,115,116,114,97,105,110,116,115,0,99,111,110,102,108,105,99,116,105,110,103,32,79,78,32,67,79,78,70,76,73,67,84,32,99, +108,97,117,115,101,115,32,115,112,101,99,105,102,105,101,100,0,32,85,78,73,81,85,69,0,67,82,69,65,84,69,37,115,32,73,78,68,69,88,32,37,46,42,115,0,73,78,83,69,82,84,32,73,78,84,79,32,37,81,46,37,115,32,86,65,76,85,69,83,40,39,105,110,100,101,120,39,44,37,81,44,37,81,44,35,37,100,44,37,81,41,59,0,110,97,109,101,61,39,37,113,39,32,65,78,68,32,116,121,112,101,61,39,105,110,100,101,120,39,0,116,97,98,108,101,32,34,37,115,34,32,104,97,115,32,109,111,114,101,32,116,104,97,110,32,111,110,101,32,112,114, +105,109,97,114,121,32,107,101,121,0,65,85,84,79,73,78,67,82,69,77,69,78,84,32,105,115,32,111,110,108,121,32,97,108,108,111,119,101,100,32,111,110,32,97,110,32,73,78,84,69,71,69,82,32,80,82,73,77,65,82,89,32,75,69,89,0,100,101,102,97,117,108,116,32,118,97,108,117,101,32,111,102,32,99,111,108,117,109,110,32,91,37,115,93,32,105,115,32,110,111,116,32,99,111,110,115,116,97,110,116,0,116,111,111,32,109,97,110,121,32,99,111,108,117,109,110,115,32,111,110,32,37,115,0,100,117,112,108,105,99,97,116,101,32, +99,111,108,117,109,110,32,110,97,109,101,58,32,37,115,0,65,85,84,79,73,78,67,82,69,77,69,78,84,32,110,111,116,32,97,108,108,111,119,101,100,32,111,110,32,87,73,84,72,79,85,84,32,82,79,87,73,68,32,116,97,98,108,101,115,0,80,82,73,77,65,82,89,32,75,69,89,32,109,105,115,115,105,110,103,32,111,110,32,116,97,98,108,101,32,37,115,0,84,65,66,76,69,0,86,73,69,87,0,67,82,69,65,84,69,32,37,115,32,37,46,42,115,0,85,80,68,65,84,69,32,37,81,46,37,115,32,83,69,84,32,116,121,112,101,61,39,37,115,39,44,32,110,97, +109,101,61,37,81,44,32,116,98,108,95,110,97,109,101,61,37,81,44,32,114,111,111,116,112,97,103,101,61,35,37,100,44,32,115,113,108,61,37,81,32,87,72,69,82,69,32,114,111,119,105,100,61,35,37,100,0,67,82,69,65,84,69,32,84,65,66,76,69,32,37,81,46,115,113,108,105,116,101,95,115,101,113,117,101,110,99,101,40,110,97,109,101,44,115,101,113,41,0,116,98,108,95,110,97,109,101,61,39,37,113,39,32,65,78,68,32,116,121,112,101,33,61,39,116,114,105,103,103,101,114,39,0,10,32,32,0,44,10,32,32,0,10,41,0,67,82,69,65, +84,69,32,84,65,66,76,69,32,0,32,84,69,88,84,0,32,78,85,77,0,32,73,78,84,0,32,82,69,65,76,0,116,101,109,112,111,114,97,114,121,32,116,97,98,108,101,32,110,97,109,101,32,109,117,115,116,32,98,101,32,117,110,113,117,97,108,105,102,105,101,100,0,2,4,8,6,116,97,98,108,101,32,37,84,32,97,108,114,101,97,100,121,32,101,120,105,115,116,115,0,116,104,101,114,101,32,105,115,32,97,108,114,101,97,100,121,32,97,110,32,105,110,100,101,120,32,110,97,109,101,100,32,37,115,0,6,0,0,0,0,0,66,69,71,73,78,0,82,69,76,69, +65,83,69,0,82,79,76,76,66,65,67,75,0,67,79,77,77,73,84,0,79,0,0,0,57,0,9,0,96,0,0,0,36,0,7,0,123,0,0,0,96,0,1,0,13,0,9,0,7,0,2,0,76,0,0,0,111,0,0,0,112,97,114,115,101,114,32,115,116,97,99,107,32,111,118,101,114,102,108,111,119,0,19,95,53,97,22,24,24,101,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,19,55,55,132,133,134,1,2,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,187,43,44,45,46,47,48,49,50,51,52,53,47,48,49,50,51,52,53,61,97,97,19,49,50,51,52,53,70,26,27,28, +29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,144,145,146,147,19,16,22,92,172,173,52,53,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,81,43,44,45,46,47,48,49,50,51,52,53,55,56,19,152,207,208,115,24,117,118,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,79,43,44,45,46,47,48,49,50,51,52,53,19,88,157,90,23,97,98,193,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,19,22,23,172,23,26,119,120,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,187,43, +44,45,46,47,48,49,50,51,52,53,19,22,23,228,23,26,231,152,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,172,43,44,45,46,47,48,49,50,51,52,53,19,221,222,223,23,96,152,172,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,19,0,1,2,23,96,190,191,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,238,43,44,45,46,47,48,49,50,51,52,53,19,185,218,221,222,223,152,152,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,241,43,44,45,46,47,48,49,50,51,52,53,19,152,168,169,170,22,190,191,27, +28,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,19,19,218,55,56,24,22,152,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,250,194,195,56,55,56,55,19,172,173,97,98,152,206,138,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,19,207,208,152,97,98,97,138,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,181,43,44,45,46,47,48,49,50,51,52,53,19,30,31,32,33,247,248,19,152,28,29,30,31,32,33,34,35,36,37,38,39,40, +41,152,43,44,45,46,47,48,49,50,51,52,53,19,168,169,170,238,19,53,152,172,173,29,30,31,32,33,34,35,36,37,38,39,40,41,152,43,44,45,46,47,48,49,50,51,52,53,19,20,101,22,23,169,170,56,207,85,55,56,23,19,20,26,22,99,100,101,102,103,104,105,238,152,152,210,47,48,112,152,108,109,110,54,55,56,221,222,223,47,48,119,120,172,173,66,54,55,56,152,97,98,99,148,149,102,103,104,66,154,23,156,83,26,230,152,113,152,163,194,195,92,92,30,95,83,97,98,207,208,101,206,179,180,92,172,173,95,152,97,98,188,99,101,219,102, +103,104,152,119,120,196,55,56,19,20,113,22,193,163,11,132,133,134,135,136,24,65,172,173,207,208,250,152,132,133,134,135,136,193,78,84,47,48,49,98,199,152,86,54,55,56,196,152,97,98,209,55,163,244,107,66,152,207,208,164,175,172,173,19,20,124,22,111,38,39,40,41,83,43,44,45,46,47,48,49,50,51,52,53,95,196,97,98,85,152,101,47,48,97,85,92,207,193,54,55,56,92,49,175,55,56,221,222,223,12,66,108,109,110,137,163,139,108,109,110,26,132,133,134,135,136,152,83,43,44,45,46,47,48,49,50,51,52,53,95,26,97,98,55,56, +101,97,98,196,221,222,223,146,147,57,171,152,22,26,19,20,49,22,179,108,109,110,55,56,116,73,219,75,124,121,152,132,133,134,135,136,163,85,152,232,97,98,47,48,237,55,56,98,5,54,55,56,193,10,11,12,13,14,172,173,17,66,47,48,97,98,152,124,152,196,55,56,186,124,152,106,160,152,83,152,164,152,61,22,211,212,152,97,98,152,95,70,97,98,172,173,101,172,173,172,173,172,173,60,181,62,172,173,47,48,123,186,97,98,71,100,55,56,152,181,186,21,107,152,109,82,163,132,133,134,135,136,89,16,207,92,93,19,172,173,169,170, +195,55,56,12,152,132,30,134,47,48,186,206,225,152,95,114,97,196,245,246,101,152,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,152,163,219,152,141,97,98,193,152,152,57,91,164,132,133,134,152,55,152,152,237,230,152,103,193,88,73,90,75,172,173,183,152,185,196,152,172,173,172,173,217,152,172,173,152,107,22,152,24,193,112,152,172,173,152,132,242,134,152,97,140,152,92,152,172,173,152,172,173,152,100,172,173,152,172,173,152,140,172,173,152,172,173,172,173,152,172,173,152,172,173,152,152,172,173,152,172, +173,213,152,172,173,152,152,152,172,173,152,172,173,152,172,173,152,210,172,173,152,26,172,173,152,172,173,172,173,152,172,173,152,172,173,152,172,173,152,59,172,173,152,63,172,173,152,193,152,152,152,152,172,173,152,172,173,77,172,173,152,152,172,173,152,152,172,173,172,173,172,173,152,22,172,173,152,152,152,22,172,173,152,152,152,172,173,152,7,8,9,163,172,173,22,23,172,173,172,173,166,167,172,173,172,173,55,172,173,22,23,108,109,110,217,152,217,166,167,163,163,163,163,163,196,130,217,211,212,217, +116,23,22,101,26,121,23,23,23,26,26,26,23,23,112,26,26,37,97,100,101,55,196,196,196,196,196,23,23,55,26,26,7,8,23,152,23,26,96,26,132,132,134,134,23,152,152,26,152,122,152,191,152,96,234,152,152,152,152,152,197,210,152,97,152,152,210,233,210,198,150,97,184,201,239,214,214,201,239,180,214,227,200,198,155,67,243,176,69,175,175,175,122,159,159,240,159,240,22,220,27,130,201,18,159,18,189,158,158,220,192,159,137,236,192,192,192,189,74,189,159,235,159,158,22,177,201,201,159,107,158,177,159,174,158,76,174, +182,174,106,182,125,174,107,177,22,159,216,215,137,159,53,216,176,215,174,174,216,215,215,174,229,216,129,224,177,126,229,127,177,128,25,162,226,26,161,13,153,6,153,151,151,151,151,205,165,178,178,165,4,3,22,165,142,15,94,202,204,203,201,16,23,249,23,120,249,246,111,131,123,20,16,1,125,123,111,56,64,37,37,131,122,1,37,5,37,22,107,26,80,140,80,87,72,107,20,24,19,112,105,23,79,22,79,22,22,22,58,22,79,23,68,23,23,26,116,22,26,23,22,122,23,23,56,64,22,124,26,26,64,64,23,23,23,23,11,23,22,26,23,22,24, +1,23,22,26,251,24,23,22,122,23,23,22,15,122,122,122,23,0,0,55,55,55,55,0,55,55,55,0,55,55,55,55,0,0,0,55,0,0,55,0,0,0,55,0,0,0,0,55,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,117,110,111,112,101,110,101,100,0,37,115,32,99,111,110,115,116,114,97,105,110,116,32,102,97,105,108,101,100,0,37,122,58,32,37,115,0,97,98,111,114,116,32,97,116,32,37,100,32,105,110,32,91,37,115,93,58, +32,37,115,0,0,0,0,0,1,2,0,2,2,0,1,2,1,1,1,2,1,2,99,97,110,110,111,116,32,111,112,101,110,32,115,97,118,101,112,111,105,110,116,32,45,32,83,81,76,32,115,116,97,116,101,109,101,110,116,115,32,105,110,32,112,114,111,103,114,101,115,115,0,110,111,32,115,117,99,104,32,115,97,118,101,112,111,105,110,116,58,32,37,115,0,99,97,110,110,111,116,32,114,101,108,101,97,115,101,32,115,97,118,101,112,111,105,110,116,32,45,32,83,81,76,32,115,116,97,116,101,109,101,110,116,115,32,105,110,32,112,114,111,103,114,101, +115,115,0,99,97,110,110,111,116,32,99,111,109,109,105,116,32,116,114,97,110,115,97,99,116,105,111,110,32,45,32,83,81,76,32,115,116,97,116,101,109,101,110,116,115,32,105,110,32,112,114,111,103,114,101,115,115,0,99,97,110,110,111,116,32,114,111,108,108,98,97,99,107,32,45,32,110,111,32,116,114,97,110,115,97,99,116,105,111,110,32,105,115,32,97,99,116,105,118,101,0,99,97,110,110,111,116,32,99,111,109,109,105,116,32,45,32,110,111,32,116,114,97,110,115,97,99,116,105,111,110,32,105,115,32,97,99,116,105,118, +101,0,99,97,110,110,111,116,32,115,116,97,114,116,32,97,32,116,114,97,110,115,97,99,116,105,111,110,32,119,105,116,104,105,110,32,97,32,116,114,97,110,115,97,99,116,105,111,110,0,83,69,76,69,67,84,32,110,97,109,101,44,32,114,111,111,116,112,97,103,101,44,32,115,113,108,32,70,82,79,77,32,39,37,113,39,46,37,115,32,87,72,69,82,69,32,37,115,32,79,82,68,69,82,32,66,89,32,114,111,119,105,100,0,116,111,111,32,109,97,110,121,32,108,101,118,101,108,115,32,111,102,32,116,114,105,103,103,101,114,32,114,101, +99,117,114,115,105,111,110,0,105,110,116,111,0,111,117,116,32,111,102,0,99,97,110,110,111,116,32,99,104,97,110,103,101,32,37,115,32,119,97,108,32,109,111,100,101,32,102,114,111,109,32,119,105,116,104,105,110,32,97,32,116,114,97,110,115,97,99,116,105,111,110,0,100,97,116,97,98,97,115,101,32,116,97,98,108,101,32,105,115,32,108,111,99,107,101,100,58,32,37,115,0,115,116,97,116,101,109,101,110,116,32,97,98,111,114,116,115,32,97,116,32,37,100,58,32,91,37,115,93,32,37,115,0,45,45,32,0,39,37,46,42,113,39, +0,122,101,114,111,98,108,111,98,40,37,100,41,0,120,39,0,37,48,50,120,0,39,0,99,97,110,110,111,116,32,86,65,67,85,85,77,32,102,114,111,109,32,119,105,116,104,105,110,32,97,32,116,114,97,110,115,97,99,116,105,111,110,0,99,97,110,110,111,116,32,86,65,67,85,85,77,32,45,32,83,81,76,32,115,116,97,116,101,109,101,110,116,115,32,105,110,32,112,114,111,103,114,101,115,115,0,65,84,84,65,67,72,39,39,65,83,32,118,97,99,117,117,109,95,100,98,0,83,69,76,69,67,84,32,115,113,108,32,70,82,79,77,32,34,37,119,34,46, +115,113,108,105,116,101,95,109,97,115,116,101,114,32,87,72,69,82,69,32,116,121,112,101,61,39,116,97,98,108,101,39,65,78,68,32,110,97,109,101,60,62,39,115,113,108,105,116,101,95,115,101,113,117,101,110,99,101,39,32,65,78,68,32,99,111,97,108,101,115,99,101,40,114,111,111,116,112,97,103,101,44,49,41,62,48,0,83,69,76,69,67,84,32,115,113,108,32,70,82,79,77,32,34,37,119,34,46,115,113,108,105,116,101,95,109,97,115,116,101,114,32,87,72,69,82,69,32,116,121,112,101,61,39,105,110,100,101,120,39,32,65,78,68, +32,108,101,110,103,116,104,40,115,113,108,41,62,49,48,0,83,69,76,69,67,84,39,73,78,83,69,82,84,32,73,78,84,79,32,118,97,99,117,117,109,95,100,98,46,39,124,124,113,117,111,116,101,40,110,97,109,101,41,124,124,39,32,83,69,76,69,67,84,42,70,82,79,77,34,37,119,34,46,39,124,124,113,117,111,116,101,40,110,97,109,101,41,70,82,79,77,32,118,97,99,117,117,109,95,100,98,46,115,113,108,105,116,101,95,109,97,115,116,101,114,32,87,72,69,82,69,32,116,121,112,101,61,39,116,97,98,108,101,39,65,78,68,32,99,111,97, +108,101,115,99,101,40,114,111,111,116,112,97,103,101,44,49,41,62,48,0,73,78,83,69,82,84,32,73,78,84,79,32,118,97,99,117,117,109,95,100,98,46,115,113,108,105,116,101,95,109,97,115,116,101,114,32,83,69,76,69,67,84,42,70,82,79,77,32,34,37,119,34,46,115,113,108,105,116,101,95,109,97,115,116,101,114,32,87,72,69,82,69,32,116,121,112,101,32,73,78,40,39,118,105,101,119,39,44,39,116,114,105,103,103,101,114,39,41,32,79,82,40,116,121,112,101,61,39,116,97,98,108,101,39,65,78,68,32,114,111,111,116,112,97,103, +101,61,48,41,0,1,1,3,0,5,0,6,0,8,0,77,97,105,110,32,102,114,101,101,108,105,115,116,58,32,0,80,97,103,101,32,37,100,32,105,115,32,110,101,118,101,114,32,117,115,101,100,0,80,111,105,110,116,101,114,32,109,97,112,32,112,97,103,101,32,37,100,32,105,115,32,114,101,102,101,114,101,110,99,101,100,0,10,0,80,97,103,101,32,37,100,58,32,0,117,110,97,98,108,101,32,116,111,32,103,101,116,32,116,104,101,32,112,97,103,101,46,32,101,114,114,111,114,32,99,111,100,101,61,37,100,0,98,116,114,101,101,73,110,105,116, +80,97,103,101,40,41,32,114,101,116,117,114,110,115,32,101,114,114,111,114,32,99,111,100,101,32,37,100,0,79,110,32,116,114,101,101,32,112,97,103,101,32,37,100,32,99,101,108,108,32,37,100,58,32,0,79,110,32,112,97,103,101,32,37,100,32,97,116,32,114,105,103,104,116,32,99,104,105,108,100,58,32,0,79,102,102,115,101,116,32,37,100,32,111,117,116,32,111,102,32,114,97,110,103,101,32,37,100,46,46,37,100,0,69,120,116,101,110,100,115,32,111,102,102,32,101,110,100,32,111,102,32,112,97,103,101,0,82,111,119,105, +100,32,37,108,108,100,32,111,117,116,32,111,102,32,111,114,100,101,114,0,67,104,105,108,100,32,112,97,103,101,32,100,101,112,116,104,32,100,105,102,102,101,114,115,0,77,117,108,116,105,112,108,101,32,117,115,101,115,32,102,111,114,32,98,121,116,101,32,37,117,32,111,102,32,112,97,103,101,32,37,100,0,70,114,97,103,109,101,110,116,97,116,105,111,110,32,111,102,32,37,100,32,98,121,116,101,115,32,114,101,112,111,114,116,101,100,32,97,115,32,37,100,32,111,110,32,112,97,103,101,32,37,100,0,105,110,118,97, +108,105,100,32,112,97,103,101,32,110,117,109,98,101,114,32,37,100,0,50,110,100,32,114,101,102,101,114,101,110,99,101,32,116,111,32,112,97,103,101,32,37,100,0,70,97,105,108,101,100,32,116,111,32,114,101,97,100,32,112,116,114,109,97,112,32,107,101,121,61,37,100,0,66,97,100,32,112,116,114,32,109,97,112,32,101,110,116,114,121,32,107,101,121,61,37,100,32,101,120,112,101,99,116,101,100,61,40,37,100,44,37,100,41,32,103,111,116,61,40,37,100,44,37,100,41,0,37,100,32,111,102,32,37,100,32,112,97,103,101,115, +32,109,105,115,115,105,110,103,32,102,114,111,109,32,111,118,101,114,102,108,111,119,32,108,105,115,116,32,115,116,97,114,116,105,110,103,32,97,116,32,37,100,0,102,97,105,108,101,100,32,116,111,32,103,101,116,32,112,97,103,101,32,37,100,0,102,114,101,101,108,105,115,116,32,108,101,97,102,32,99,111,117,110,116,32,116,111,111,32,98,105,103,32,111,110,32,112,97,103,101,32,37,100,0,102,114,101,101,45,112,97,103,101,32,99,111,117,110,116,32,105,110,32,104,101,97,100,101,114,32,105,115,32,116,111,111,32, +115,109,97,108,108,0,0,1,2,3,4,6,8,78,79,84,32,78,85,76,76,0,85,78,73,81,85,69,0,67,72,69,67,75,0,70,79,82,69,73,71,78,32,75,69,89,0,37,46,50,120,0,107,40,37,100,0,66,0,44,37,115,37,115,0,40,37,46,50,48,115,41,0,37,115,40,37,100,41,0,37,100,0,40,98,108,111,98,41,0,118,116,97,98,58,37,112,0,44,37,100,0,93,0,112,114,111,103,114,97,109,0,83,97,118,101,112,111,105,110,116,0,65,117,116,111,67,111,109,109,105,116,0,84,114,97,110,115,97,99,116,105,111,110,0,83,111,114,116,101,114,78,101,120,116,0,80,114, +101,118,73,102,79,112,101,110,0,78,101,120,116,73,102,79,112,101,110,0,80,114,101,118,0,78,101,120,116,0,67,104,101,99,107,112,111,105,110,116,0,74,111,117,114,110,97,108,77,111,100,101,0,86,97,99,117,117,109,0,86,70,105,108,116,101,114,0,86,85,112,100,97,116,101,0,71,111,116,111,0,71,111,115,117,98,0,73,110,105,116,67,111,114,111,117,116,105,110,101,0,89,105,101,108,100,0,77,117,115,116,66,101,73,110,116,0,74,117,109,112,0,78,111,116,0,79,110,99,101,0,73,102,0,73,102,78,111,116,0,83,101,101,107, +76,84,0,83,101,101,107,76,69,0,83,101,101,107,71,69,0,83,101,101,107,71,84,0,79,114,0,65,110,100,0,78,111,67,111,110,102,108,105,99,116,0,78,111,116,70,111,117,110,100,0,70,111,117,110,100,0,83,101,101,107,82,111,119,105,100,0,78,111,116,69,120,105,115,116,115,0,73,115,78,117,108,108,0,78,111,116,78,117,108,108,0,78,101,0,69,113,0,71,116,0,76,101,0,76,116,0,71,101,0,69,108,115,101,78,111,116,69,113,0,66,105,116,65,110,100,0,66,105,116,79,114,0,83,104,105,102,116,76,101,102,116,0,83,104,105,102,116, +82,105,103,104,116,0,65,100,100,0,83,117,98,116,114,97,99,116,0,77,117,108,116,105,112,108,121,0,68,105,118,105,100,101,0,82,101,109,97,105,110,100,101,114,0,67,111,110,99,97,116,0,76,97,115,116,0,66,105,116,78,111,116,0,83,111,114,116,101,114,83,111,114,116,0,83,111,114,116,0,82,101,119,105,110,100,0,73,100,120,76,69,0,73,100,120,71,84,0,73,100,120,76,84,0,73,100,120,71,69,0,82,111,119,83,101,116,82,101,97,100,0,82,111,119,83,101,116,84,101,115,116,0,80,114,111,103,114,97,109,0,70,107,73,102,90, +101,114,111,0,73,102,80,111,115,0,73,102,78,111,116,90,101,114,111,0,68,101,99,114,74,117,109,112,90,101,114,111,0,73,110,99,114,86,97,99,117,117,109,0,86,78,101,120,116,0,73,110,105,116,0,82,101,116,117,114,110,0,69,110,100,67,111,114,111,117,116,105,110,101,0,72,97,108,116,73,102,78,117,108,108,0,72,97,108,116,0,73,110,116,101,103,101,114,0,73,110,116,54,52,0,83,116,114,105,110,103,0,78,117,108,108,0,83,111,102,116,78,117,108,108,0,66,108,111,98,0,86,97,114,105,97,98,108,101,0,77,111,118,101,0, +67,111,112,121,0,83,67,111,112,121,0,73,110,116,67,111,112,121,0,82,101,115,117,108,116,82,111,119,0,67,111,108,108,83,101,113,0,70,117,110,99,116,105,111,110,48,0,70,117,110,99,116,105,111,110,0,65,100,100,73,109,109,0,82,101,97,108,65,102,102,105,110,105,116,121,0,67,97,115,116,0,80,101,114,109,117,116,97,116,105,111,110,0,67,111,109,112,97,114,101,0,67,111,108,117,109,110,0,83,116,114,105,110,103,56,0,65,102,102,105,110,105,116,121,0,77,97,107,101,82,101,99,111,114,100,0,67,111,117,110,116,0,82, +101,97,100,67,111,111,107,105,101,0,83,101,116,67,111,111,107,105,101,0,82,101,111,112,101,110,73,100,120,0,79,112,101,110,82,101,97,100,0,79,112,101,110,87,114,105,116,101,0,79,112,101,110,65,117,116,111,105,110,100,101,120,0,79,112,101,110,69,112,104,101,109,101,114,97,108,0,83,111,114,116,101,114,79,112,101,110,0,83,101,113,117,101,110,99,101,84,101,115,116,0,79,112,101,110,80,115,101,117,100,111,0,67,108,111,115,101,0,67,111,108,117,109,110,115,85,115,101,100,0,83,101,113,117,101,110,99,101,0, +78,101,119,82,111,119,105,100,0,73,110,115,101,114,116,0,73,110,115,101,114,116,73,110,116,0,68,101,108,101,116,101,0,82,101,115,101,116,67,111,117,110,116,0,83,111,114,116,101,114,67,111,109,112,97,114,101,0,83,111,114,116,101,114,68,97,116,97,0,82,111,119,75,101,121,0,82,111,119,68,97,116,97,0,82,111,119,105,100,0,78,117,108,108,82,111,119,0,83,111,114,116,101,114,73,110,115,101,114,116,0,73,100,120,73,110,115,101,114,116,0,73,100,120,68,101,108,101,116,101,0,83,101,101,107,0,73,100,120,82,111, +119,105,100,0,68,101,115,116,114,111,121,0,67,108,101,97,114,0,82,101,97,108,0,82,101,115,101,116,83,111,114,116,101,114,0,67,114,101,97,116,101,73,110,100,101,120,0,67,114,101,97,116,101,84,97,98,108,101,0,80,97,114,115,101,83,99,104,101,109,97,0,76,111,97,100,65,110,97,108,121,115,105,115,0,68,114,111,112,84,97,98,108,101,0,68,114,111,112,73,110,100,101,120,0,68,114,111,112,84,114,105,103,103,101,114,0,73,110,116,101,103,114,105,116,121,67,107,0,82,111,119,83,101,116,65,100,100,0,80,97,114,97,109, +0,70,107,67,111,117,110,116,101,114,0,77,101,109,77,97,120,0,79,102,102,115,101,116,76,105,109,105,116,0,65,103,103,83,116,101,112,48,0,65,103,103,83,116,101,112,0,65,103,103,70,105,110,97,108,0,69,120,112,105,114,101,0,84,97,98,108,101,76,111,99,107,0,86,66,101,103,105,110,0,86,67,114,101,97,116,101,0,86,68,101,115,116,114,111,121,0,86,79,112,101,110,0,86,67,111,108,117,109,110,0,86,82,101,110,97,109,101,0,80,97,103,101,99,111,117,110,116,0,77,97,120,80,103,99,110,116,0,67,117,114,115,111,114,72, +105,110,116,0,78,111,111,112,0,69,120,112,108,97,105,110,0,65,80,73,32,99,97,108,108,101,100,32,119,105,116,104,32,78,85,76,76,32,112,114,101,112,97,114,101,100,32,115,116,97,116,101,109,101,110,116,0,98,105,110,100,32,111,110,32,97,32,98,117,115,121,32,112,114,101,112,97,114,101,100,32,115,116,97,116,101,109,101,110,116,58,32,91,37,115,93,0,99,97,110,110,111,116,32,111,112,101,110,32,118,105,114,116,117,97,108,32,116,97,98,108,101,58,32,37,115,0,99,97,110,110,111,116,32,111,112,101,110,32,116,97, +98,108,101,32,119,105,116,104,111,117,116,32,114,111,119,105,100,58,32,37,115,0,99,97,110,110,111,116,32,111,112,101,110,32,118,105,101,119,58,32,37,115,0,110,111,32,115,117,99,104,32,99,111,108,117,109,110,58,32,34,37,115,34,0,102,111,114,101,105,103,110,32,107,101,121,0,105,110,100,101,120,101,100,0,99,97,110,110,111,116,32,111,112,101,110,32,37,115,32,99,111,108,117,109,110,32,102,111,114,32,119,114,105,116,105,110,103,0,151,0,0,0,104,0,0,0,82,1,1,0,33,0,7,1,96,0,0,1,87,1,0,0,13,0,2,0,111,0,0, +0,75,0,0,0,99,97,110,110,111,116,32,111,112,101,110,32,118,97,108,117,101,32,111,102,32,116,121,112,101,32,37,115,0,110,111,32,115,117,99,104,32,114,111,119,105,100,58,32,37,108,108,100,0,1,4,3,2,5,116,101,109,112,0,117,110,97,98,108,101,32,116,111,32,99,108,111,115,101,32,100,117,101,32,116,111,32,117,110,102,105,110,97,108,105,122,101,100,32,115,116,97,116,101,109,101,110,116,115,32,111,114,32,117,110,102,105,110,105,115,104,101,100,32,98,97,99,107,117,112,115,0,117,110,97,98,108,101,32,116,111, +32,117,115,101,32,102,117,110,99,116,105,111,110,32,37,115,32,105,110,32,116,104,101,32,114,101,113,117,101,115,116,101,100,32,99,111,110,116,101,120,116,0,82,84,82,73,77,0,109,97,105,110,0,115,105,109,112,108,101,0,112,111,114,116,101,114,0,117,110,105,99,111,100,101,54,49,0,102,116,115,51,95,116,111,107,101,110,105,122,101,114,0,115,110,105,112,112,101,116,0,111,102,102,115,101,116,115,0,109,97,116,99,104,105,110,102,111,0,111,112,116,105,109,105,122,101,0,102,116,115,51,0,102,116,115,52,0,102, +116,115,51,116,111,107,101,110,105,122,101,0,67,82,69,65,84,69,32,84,65,66,76,69,32,120,40,105,110,112,117,116,44,32,116,111,107,101,110,44,32,115,116,97,114,116,44,32,101,110,100,44,32,112,111,115,105,116,105,111,110,41,0,117,110,107,110,111,119,110,32,116,111,107,101,110,105,122,101,114,58,32,37,115,0,65,76,84,69,82,32,84,65,66,76,69,32,37,81,46,39,37,113,95,99,111,110,116,101,110,116,39,32,32,82,69,78,65,77,69,32,84,79,32,39,37,113,95,99,111,110,116,101,110,116,39,59,0,65,76,84,69,82,32,84,65, +66,76,69,32,37,81,46,39,37,113,95,100,111,99,115,105,122,101,39,32,32,82,69,78,65,77,69,32,84,79,32,39,37,113,95,100,111,99,115,105,122,101,39,59,0,65,76,84,69,82,32,84,65,66,76,69,32,37,81,46,39,37,113,95,115,116,97,116,39,32,32,82,69,78,65,77,69,32,84,79,32,39,37,113,95,115,116,97,116,39,59,0,65,76,84,69,82,32,84,65,66,76,69,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,32,82,69,78,65,77,69,32,84,79,32,39,37,113,95,115,101,103,109,101,110,116,115,39,59,0,65,76,84,69,82,32,84,65,66, +76,69,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,32,32,82,69,78,65,77,69,32,84,79,32,39,37,113,95,115,101,103,100,105,114,39,59,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,99,111,110,116,101,110,116,39,32,87,72,69,82,69,32,114,111,119,105,100,32,61,32,63,0,83,69,76,69,67,84,32,78,79,84,32,69,88,73,83,84,83,40,83,69,76,69,67,84,32,100,111,99,105,100,32,70,82,79,77,32,37,81,46,39,37,113,95,99,111,110,116,101,110,116,39,32,87,72,69,82,69,32,114,111,119,105,100,33,61,63,41, +0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,99,111,110,116,101,110,116,39,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,100,111,99,115,105,122,101,39,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,116,97,116,39,0,83,69,76,69,67,84,32,37,115,32,87,72,69,82,69,32,114,111,119, +105,100,61,63,0,83,69,76,69,67,84,32,40,83,69,76,69,67,84,32,109,97,120,40,105,100,120,41,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,41,32,43,32,49,0,82,69,80,76,65,67,69,32,73,78,84,79,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,40,98,108,111,99,107,105,100,44,32,98,108,111,99,107,41,32,86,65,76,85,69,83,40,63,44,32,63,41,0,83,69,76,69,67,84,32,99,111,97,108,101,115,99,101,40,40,83,69,76,69,67,84,32,109, +97,120,40,98,108,111,99,107,105,100,41,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,41,32,43,32,49,44,32,49,41,0,82,69,80,76,65,67,69,32,73,78,84,79,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,86,65,76,85,69,83,40,63,44,63,44,63,44,63,44,63,44,63,41,0,83,69,76,69,67,84,32,105,100,120,44,32,115,116,97,114,116,95,98,108,111,99,107,44,32,108,101,97,118,101,115,95,101,110,100,95,98,108,111,99,107,44,32,101,110,100,95,98,108,111,99,107,44,32,114,111,111,116,32, +70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,32,79,82,68,69,82,32,66,89,32,105,100,120,32,65,83,67,0,83,69,76,69,67,84,32,105,100,120,44,32,115,116,97,114,116,95,98,108,111,99,107,44,32,108,101,97,118,101,115,95,101,110,100,95,98,108,111,99,107,44,32,101,110,100,95,98,108,111,99,107,44,32,114,111,111,116,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,66,69,84,87, +69,69,78,32,63,32,65,78,68,32,63,79,82,68,69,82,32,66,89,32,108,101,118,101,108,32,68,69,83,67,44,32,105,100,120,32,65,83,67,0,83,69,76,69,67,84,32,99,111,117,110,116,40,42,41,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,0,83,69,76,69,67,84,32,109,97,120,40,108,101,118,101,108,41,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,66,69,84,87,69,69,78,32,63,32,65,78, +68,32,63,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,32,87,72,69,82,69,32,98,108,111,99,107,105,100,32,66,69,84,87,69,69,78,32,63,32,65,78,68,32,63,0,73,78,83,69,82,84,32,73,78,84,79,32,37,81,46,39,37,113,95,99,111,110,116,101,110,116,39,32,86,65,76,85,69,83,40,37,115,41,0,68,69,76,69,84,69,32,70,82,79,77,32, +37,81,46,39,37,113,95,100,111,99,115,105,122,101,39,32,87,72,69,82,69,32,100,111,99,105,100,32,61,32,63,0,82,69,80,76,65,67,69,32,73,78,84,79,32,37],"i8",4,n.G+30720); +z([81,46,39,37,113,95,100,111,99,115,105,122,101,39,32,86,65,76,85,69,83,40,63,44,63,41,0,83,69,76,69,67,84,32,115,105,122,101,32,70,82,79,77,32,37,81,46,39,37,113,95,100,111,99,115,105,122,101,39,32,87,72,69,82,69,32,100,111,99,105,100,61,63,0,83,69,76,69,67,84,32,118,97,108,117,101,32,70,82,79,77,32,37,81,46,39,37,113,95,115,116,97,116,39,32,87,72,69,82,69,32,105,100,61,63,0,82,69,80,76,65,67,69,32,73,78,84,79,32,37,81,46,39,37,113,95,115,116,97,116,39,32,86,65,76,85,69,83,40,63,44,63,41,0,68,69, +76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,66,69,84,87,69,69,78,32,63,32,65,78,68,32,63,0,83,69,76,69,67,84,32,63,32,85,78,73,79,78,32,83,69,76,69,67,84,32,108,101,118,101,108,32,47,32,40,49,48,50,52,32,42,32,63,41,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,0,83,69,76,69,67,84,32,108,101,118,101,108,44,32,99,111,117,110,116,40,42,41,32,65,83,32,99,110,116,32,70,82,79,77,32,37,81,46,39,37,113,95, +115,101,103,100,105,114,39,32,32,32,71,82,79,85,80,32,66,89,32,108,101,118,101,108,32,72,65,86,73,78,71,32,99,110,116,62,61,63,32,32,79,82,68,69,82,32,66,89,32,40,108,101,118,101,108,32,37,37,32,49,48,50,52,41,32,65,83,67,32,76,73,77,73,84,32,49,0,83,69,76,69,67,84,32,50,32,42,32,116,111,116,97,108,40,49,32,43,32,108,101,97,118,101,115,95,101,110,100,95,98,108,111,99,107,32,45,32,115,116,97,114,116,95,98,108,111,99,107,41,32,32,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32, +87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,32,65,78,68,32,105,100,120,32,60,32,63,0,68,69,76,69,84,69,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,32,65,78,68,32,105,100,120,32,61,32,63,0,85,80,68,65,84,69,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,83,69,84,32,105,100,120,32,61,32,63,32,87,72,69,82,69,32,108,101,118,101,108,61,63,32,65,78,68,32,105,100,120,61,63,0,83,69,76,69,67,84,32,105,100,120,44,32,115, +116,97,114,116,95,98,108,111,99,107,44,32,108,101,97,118,101,115,95,101,110,100,95,98,108,111,99,107,44,32,101,110,100,95,98,108,111,99,107,44,32,114,111,111,116,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,61,32,63,32,65,78,68,32,105,100,120,32,61,32,63,0,85,80,68,65,84,69,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,83,69,84,32,115,116,97,114,116,95,98,108,111,99,107,32,61,32,63,44,32,114,111,111,116,32,61,32,63,87,72,69, +82,69,32,108,101,118,101,108,32,61,32,63,32,65,78,68,32,105,100,120,32,61,32,63,0,83,69,76,69,67,84,32,49,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,32,87,72,69,82,69,32,98,108,111,99,107,105,100,61,63,32,65,78,68,32,98,108,111,99,107,32,73,83,32,78,85,76,76,0,83,69,76,69,67,84,32,105,100,120,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,61,63,32,79,82,68,69,82,32,66,89,32,49,32,65,83,67,0,83,69,76,69,67, +84,32,109,97,120,40,32,108,101,118,101,108,32,37,37,32,49,48,50,52,32,41,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,0,83,69,76,69,67,84,32,108,101,118,101,108,44,32,105,100,120,44,32,101,110,100,95,98,108,111,99,107,32,70,82,79,77,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,87,72,69,82,69,32,108,101,118,101,108,32,66,69,84,87,69,69,78,32,63,32,65,78,68,32,63,32,79,82,68,69,82,32,66,89,32,108,101,118,101,108,32,68,69,83,67,44,32,105,100,120,32,65,83,67,0,85,80,68, +65,84,69,32,79,82,32,70,65,73,76,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,83,69,84,32,108,101,118,101,108,61,45,49,44,105,100,120,61,63,32,87,72,69,82,69,32,108,101,118,101,108,61,63,32,65,78,68,32,105,100,120,61,63,0,85,80,68,65,84,69,32,79,82,32,70,65,73,76,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,32,83,69,84,32,108,101,118,101,108,61,63,32,87,72,69,82,69,32,108,101,118,101,108,61,45,49,0,37,108,108,100,32,37,108,108,100,0,37,115,95,115,101,103,109,101,110,116,115,0,98, +108,111,99,107,0,83,69,76,69,67,84,32,49,32,70,82,79,77,32,37,81,46,115,113,108,105,116,101,95,109,97,115,116,101,114,32,87,72,69,82,69,32,116,98,108,95,110,97,109,101,61,39,37,113,95,115,116,97,116,39,0,112,99,120,0,83,69,76,69,67,84,32,37,115,32,87,72,69,82,69,32,114,111,119,105,100,32,61,32,63,0,117,110,114,101,99,111,103,110,105,122,101,100,32,109,97,116,99,104,105,110,102,111,32,114,101,113,117,101,115,116,58,32,37,99,0,105,108,108,101,103,97,108,32,102,105,114,115,116,32,97,114,103,117,109, +101,110,116,32,116,111,32,37,115,0,73,110,100,101,120,32,111,112,116,105,109,105,122,101,100,0,73,110,100,101,120,32,97,108,114,101,97,100,121,32,111,112,116,105,109,97,108,0,83,65,86,69,80,79,73,78,84,32,102,116,115,51,0,82,69,76,69,65,83,69,32,102,116,115,51,0,82,79,76,76,66,65,67,75,32,84,79,32,102,116,115,51,0,37,100,32,37,100,32,37,100,32,37,100,32,0,60,98,62,0,60,47,98,62,0,60,98,62,46,46,46,60,47,98,62,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110, +116,115,32,116,111,32,102,117,110,99,116,105,111,110,32,115,110,105,112,112,101,116,40,41,0,114,101,98,117,105,108,100,0,105,110,116,101,103,114,105,116,121,45,99,104,101,99,107,0,109,101,114,103,101,61,0,97,117,116,111,109,101,114,103,101,61,0,67,82,69,65,84,69,32,84,65,66,76,69,32,73,70,32,78,79,84,32,69,88,73,83,84,83,32,37,81,46,39,37,113,95,115,116,97,116,39,40,105,100,32,73,78,84,69,71,69,82,32,80,82,73,77,65,82,89,32,75,69,89,44,32,118,97,108,117,101,32,66,76,79,66,41,59,0,83,69,76,69,67,84, +32,37,115,0,68,69,83,67,0,65,83,67,0,83,69,76,69,67,84,32,37,115,32,87,72,69,82,69,32,114,111,119,105,100,32,66,69,84,87,69,69,78,32,37,108,108,100,32,65,78,68,32,37,108,108,100,32,79,82,68,69,82,32,66,89,32,114,111,119,105,100,32,37,115,0,83,69,76,69,67,84,32,37,115,32,79,82,68,69,82,32,66,89,32,114,111,119,105,100,32,37,115,0,70,84,83,32,101,120,112,114,101,115,115,105,111,110,32,116,114,101,101,32,105,115,32,116,111,111,32,108,97,114,103,101,32,40,109,97,120,105,109,117,109,32,100,101,112,116, +104,32,37,100,41,0,109,97,108,102,111,114,109,101,100,32,77,65,84,67,72,32,101,120,112,114,101,115,115,105,111,110,58,32,91,37,115,93,0,79,82,0,65,78,68,0,78,79,84,0,78,69,65,82,0,68,82,79,80,32,84,65,66,76,69,32,73,70,32,69,88,73,83,84,83,32,37,81,46,39,37,113,95,99,111,110,116,101,110,116,39,0,68,82,79,80,32,84,65,66,76,69,32,73,70,32,69,88,73,83,84,83,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,0,68,82,79,80,32,84,65,66,76,69,32,73,70,32,69,88,73,83,84,83,32,37,81,46,39,37,113, +95,115,101,103,100,105,114,39,0,68,82,79,80,32,84,65,66,76,69,32,73,70,32,69,88,73,83,84,83,32,37,81,46,39,37,113,95,100,111,99,115,105,122,101,39,0,68,82,79,80,32,84,65,66,76,69,32,73,70,32,69,88,73,83,84,83,32,37,81,46,39,37,113,95,115,116,97,116,39,0,116,111,107,101,110,105,122,101,0,117,110,114,101,99,111,103,110,105,122,101,100,32,112,97,114,97,109,101,116,101,114,58,32,37,115,0,117,110,114,101,99,111,103,110,105,122,101,100,32,109,97,116,99,104,105,110,102,111,58,32,37,115,0,97,115,99,0,117, +110,114,101,99,111,103,110,105,122,101,100,32,111,114,100,101,114,58,32,37,115,0,99,111,110,116,101,110,116,0,101,114,114,111,114,32,112,97,114,115,105,110,103,32,112,114,101,102,105,120,32,112,97,114,97,109,101,116,101,114,58,32,37,115,0,99,111,109,112,114,101,115,115,0,117,110,99,111,109,112,114,101,115,115,0,109,105,115,115,105,110,103,32,37,115,32,112,97,114,97,109,101,116,101,114,32,105,110,32,102,116,115,52,32,99,111,110,115,116,114,117,99,116,111,114,0,95,95,108,97,110,103,105,100,0,37,81, +44,32,0,37,122,37,81,44,32,0,67,82,69,65,84,69,32,84,65,66,76,69,32,120,40,37,115,32,37,81,32,72,73,68,68,69,78,44,32,100,111,99,105,100,32,72,73,68,68,69,78,44,32,37,81,32,72,73,68,68,69,78,41,0,80,82,65,71,77,65,32,37,81,46,112,97,103,101,95,115,105,122,101,0,100,111,99,105,100,32,73,78,84,69,71,69,82,32,80,82,73,77,65,82,89,32,75,69,89,0,37,122,44,32,39,99,37,100,37,113,39,0,37,122,44,32,108,97,110,103,105,100,0,67,82,69,65,84,69,32,84,65,66,76,69,32,37,81,46,39,37,113,95,99,111,110,116,101,110, +116,39,40,37,115,41,0,67,82,69,65,84,69,32,84,65,66,76,69,32,37,81,46,39,37,113,95,115,101,103,109,101,110,116,115,39,40,98,108,111,99,107,105,100,32,73,78,84,69,71,69,82,32,80,82,73,77,65,82,89,32,75,69,89,44,32,98,108,111,99,107,32,66,76,79,66,41,59,0,67,82,69,65,84,69,32,84,65,66,76,69,32,37,81,46,39,37,113,95,115,101,103,100,105,114,39,40,108,101,118,101,108,32,73,78,84,69,71,69,82,44,105,100,120,32,73,78,84,69,71,69,82,44,115,116,97,114,116,95,98,108,111,99,107,32,73,78,84,69,71,69,82,44,108, +101,97,118,101,115,95,101,110,100,95,98,108,111,99,107,32,73,78,84,69,71,69,82,44,101,110,100,95,98,108,111,99,107,32,73,78,84,69,71,69,82,44,114,111,111,116,32,66,76,79,66,44,80,82,73,77,65,82,89,32,75,69,89,40,108,101,118,101,108,44,32,105,100,120,41,41,59,0,67,82,69,65,84,69,32,84,65,66,76,69,32,37,81,46,39,37,113,95,100,111,99,115,105,122,101,39,40,100,111,99,105,100,32,73,78,84,69,71,69,82,32,80,82,73,77,65,82,89,32,75,69,89,44,32,115,105,122,101,32,66,76,79,66,41,59,0,44,37,115,40,63,41,0,44, +32,63,0,100,111,99,105,100,0,44,37,115,40,120,46,39,99,37,100,37,113,39,41,0,44,32,120,46,37,81,0,108,97,110,103,105,100,0,44,32,120,46,39,37,113,39,0,95,99,111,110,116,101,110,116,0,32,70,82,79,77,32,39,37,113,39,46,39,37,113,37,115,39,32,65,83,32,120,0,83,69,76,69,67,84,32,42,32,70,82,79,77,32,37,81,46,37,81,0,112,114,101,102,105,120,0,108,97,110,103,117,97,103,101,105,100,0,110,111,116,105,110,100,101,120,101,100,0,117,110,107,110,111,119,110,32,116,111,107,101,110,105,122,101,114,0,0,0,0,0,0, +0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,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,0,0,0,0,1,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,0,0,0,0,0,97,114,103,117,109,101,110,116,32,116,121,112,101,32,109,105,115,109,97,116,99,104,0,102,116,115,51,116,111,107,101,110,105,122,101,32,100,105,115,97,98,108,101,100,0,1,1,1,1,1,1,1,1,1,1,0,0,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,0, +0,0,0,1,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,0,0,0,0,0,115,101,115,115,0,115,115,0,115,101,105,0,105,0,100,101,101,0,101,101,0,103,110,105,0,100,101,0,116,97,0,97,116,101,0,108,98,0,98,108,101,0,122,105,0,105,122,101,0,108,97,110,111,105,116,97,0,108,97,110,111,105,116,0,116,105,111,110,0,105,99,110,101,0,101,110,99,101,0,105,99,110,97,0,97,110,99,101,0,114,101,122,105,0,105,103,111,108,0,105,108,98,0,105,108,108,97,0,97,108,0,105,108,116,110,101,0,101,110,116,0,105,108,101,0,101, +0,105,108,115,117,111,0,111,117,115,0,110,111,105,116,97,122,105,0,110,111,105,116,97,0,114,111,116,97,0,109,115,105,108,97,0,115,115,101,110,101,118,105,0,105,118,101,0,115,115,101,110,108,117,102,0,102,117,108,0,115,115,101,110,115,117,111,0,105,116,105,108,97,0,105,116,105,118,105,0,105,116,105,108,105,98,0,101,116,97,99,105,0,105,99,0,101,118,105,116,97,0,101,122,105,108,97,0,105,116,105,99,105,0,108,97,99,105,0,108,117,102,0,115,115,101,110,0,116,110,101,109,101,0,116,110,101,109,0,116,110,101, +0,110,111,105,0,101,116,97,0,105,116,105,0,0,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,2,1,102,116,115,52,97,117,120,0,67,82,69,65,84,69,32,84,65,66,76,69,32,120,40,116,101,114,109,44,32,99,111,108,44,32,100,111,99,117,109,101,110,116,115,44,32,111,99,99,117,114,114,101,110,99,101,115,44,32,108,97,110,103,117,97,103,101,105,100,32,72,73,68,68,69,78,41,0,105,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,115,32,116,111,32,102,116,115,52,97,117,120,32,99,111,110,115,116,114,117,99,116, +111,114,0,0,97,99,101,105,110,111,117,121,121,97,99,100,101,101,103,104,105,106,107,108,110,111,114,115,116,117,117,119,121,122,111,117,97,105,111,117,103,107,111,106,103,110,97,101,105,111,114,117,115,116,104,97,101,111,121,0,0,0,0,0,0,0,0,97,98,100,100,101,102,103,104,104,105,107,108,108,109,110,112,114,114,115,116,117,118,119,119,120,121,122,104,116,119,121,97,101,105,111,117,121,114,101,109,111,118,101,95,100,105,97,99,114,105,116,105,99,115,61,49,0,114,101,109,111,118,101,95,100,105,97,99,114, +105,116,105,99,115,61,48,0,116,111,107,101,110,99,104,97,114,115,61,0,115,101,112,97,114,97,116,111,114,115,61,0,97,117,116,111,109,97,116,105,99,32,101,120,116,101,110,115,105,111,110,32,108,111,97,100,105,110,103,32,102,97,105,108,101,100,58,32,37,115,0,77,65,84,67,72,0,117,110,97,98,108,101,32,116,111,32,100,101,108,101,116,101,47,109,111,100,105,102,121,32,99,111,108,108,97,116,105,111,110,32,115,101,113,117,101,110,99,101,32,100,117,101,32,116,111,32,97,99,116,105,118,101,32,115,116,97,116,101, +109,101,110,116,115,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116, +97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121, +112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32, +108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101, +97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101, +120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109, +0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101, +97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116, +105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103, +101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97, +105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111, +116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111, +99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104, +97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,47,112,114,111,99,47,115,101,108,102,47,102,100,47,0],"i8",4,n.G+40960);var gb=q;q+=16;e._i64Subtract=hb; +function ib(a){e.___errno_location&&(t[e.___errno_location()>>2]=a);return a} +var E={q:1,p:2,md:3,ic:4,v:5,ta:6,Cb:7,Gc:8,t:9,Qb:10,pa:11,wd:11,ra:12,L:13,bc:14,Sc:15,M:16,qa:17,xd:18,R:19,S:20,N:21,h:22,Bc:23,Ma:24,F:25,td:26,cc:27,Oc:28,T:29,jd:30,uc:31,bd:32,Zb:33,Na:34,Kc:42,fc:43,Rb:44,lc:45,mc:46,nc:47,tc:48,ud:49,Ec:50,kc:51,Wb:35,Hc:37,Ib:52,Lb:53,yd:54,Cc:55,Mb:56,Nb:57,Xb:35,Ob:59,Qc:60,Fc:61,qd:62,Pc:63,Lc:64,Mc:65,hd:66,Ic:67,Fb:68,nd:69,Sb:70,cd:71,wc:72,$b:73,Kb:74,Xc:76,Jb:77,gd:78,oc:79,pc:80,sc:81,rc:82,qc:83,Rc:38,sa:39,xc:36,ba:40,Yc:95,ad:96,Vb:104,Dc:105, +Gb:97,ed:91,Vc:88,Nc:92,kd:108,Ub:111,Db:98,Tb:103,Ac:101,yc:100,rd:110,dc:112,ec:113,hc:115,Hb:114,Yb:89,vc:90,dd:93,ld:94,Eb:99,zc:102,jc:106,Tc:107,sd:109,vd:87,ac:122,od:116,Wc:95,Jc:123,gc:84,Zc:75,Pb:125,Uc:131,$c:130,pd:86},jb={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core", +13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable", +35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor", +54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message", +75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket", +92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown", +109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"}; +function kb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function lb(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=kb(a.split("/").filter(function(a){return!!a}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a} +function mb(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function nb(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function ob(){var a=Array.prototype.slice.call(arguments,0);return lb(a.join("/"))}function F(a,b){return lb(a+"/"+b)} +function pb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=kb(a.split("/").filter(function(a){return!!a}),!b).join("/");return(b?"/":"")+a||"."}var qb=[];function rb(a,b){qb[a]={input:[],output:[],J:b};sb(a,tb)} +var tb={open:function(a){var b=qb[a.c.rdev];if(!b)throw new H(E.R);a.tty=b;a.seekable=!1},close:function(a){a.tty.J.flush(a.tty)},flush:function(a){a.tty.J.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.J.Ha)throw new H(E.ta);for(var f=0,g=0;ga.b.length&&(a.b=I.cb(a),a.g=a.b.length);if(!a.b||a.b.subarray){var c=a.b?a.b.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)|0),0!=c&&(b=Math.max(b,256)),c=a.b,a.b=new Uint8Array(b),0b)a.b.length=b;else for(;a.b.length=a.c.g)return 0;a=Math.min(a.c.g-f,d);assert(0<=a);if(8b)throw new H(E.h);return b},wa:function(a,b,c){I.Ca(a.c,b+c);a.c.g=Math.max(a.c.g,b+c)},X:function(a, +b,c,d,f,g,h){if(32768!==(a.c.mode&61440))throw new H(E.R);c=a.c.b;if(h&2||c.buffer!==b&&c.buffer!==b.buffer){if(0>1)}catch(c){if(!c.code)throw c;throw new H(E[c.code]);}return b.mode},m:function(a){for(var b=[];a.parent!==a;)b.push(a.name),a=a.parent;b.push(a.l.ka.root);b.reverse();return ob.apply(null,b)},Da:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w", +578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},bb:function(a){a&=-2099201;a&=-32769;a&=-524289;if(a in K.Da)return K.Da[a];throw new H(E.h);},d:{n:function(a){a=K.m(a);var b;try{b=fs.lstatSync(a)}catch(c){if(!c.code)throw c;throw new H(E[c.code]);}K.W&&!b.B&&(b.B=4096);K.W&&!b.blocks&&(b.blocks=(b.size+b.B-1)/b.B|0);return{dev:b.dev,ino:b.ino,mode:b.mode,nlink:b.nlink,uid:b.uid,gid:b.gid,rdev:b.rdev,size:b.size, +atime:b.atime,mtime:b.mtime,ctime:b.ctime,B:b.B,blocks:b.blocks}},k:function(a,b){var c=K.m(a);try{void 0!==b.mode&&(fs.chmodSync(c,b.mode),a.mode=b.mode),void 0!==b.size&&fs.truncateSync(c,b.size)}catch(d){if(!d.code)throw d;throw new H(E[d.code]);}},lookup:function(a,b){var c=F(K.m(a),b),c=K.Fa(c);return K.createNode(a,b,c)},O:function(a,b,c,d){a=K.createNode(a,b,c,d);b=K.m(a);try{J(a.mode)?fs.mkdirSync(b,a.mode):fs.writeFileSync(b,"",{mode:a.mode})}catch(f){if(!f.code)throw f;throw new H(E[f.code]); +}return a},rename:function(a,b,c){a=K.m(a);b=F(K.m(b),c);try{fs.renameSync(a,b)}catch(d){if(!d.code)throw d;throw new H(E[d.code]);}},unlink:function(a,b){var c=F(K.m(a),b);try{fs.unlinkSync(c)}catch(d){if(!d.code)throw d;throw new H(E[d.code]);}},rmdir:function(a,b){var c=F(K.m(a),b);try{fs.rmdirSync(c)}catch(d){if(!d.code)throw d;throw new H(E[d.code]);}},readdir:function(a){a=K.m(a);try{return fs.readdirSync(a)}catch(b){if(!b.code)throw b;throw new H(E[b.code]);}},symlink:function(a,b,c){a=F(K.m(a), +b);try{fs.symlinkSync(c,a)}catch(d){if(!d.code)throw d;throw new H(E[d.code]);}},readlink:function(a){var b=K.m(a);try{return b=fs.readlinkSync(b),b=Ab.relative(Ab.resolve(a.l.ka.root),b)}catch(c){if(!c.code)throw c;throw new H(E[c.code]);}}},e:{open:function(a){var b=K.m(a.c);try{32768===(a.c.mode&61440)&&(a.P=fs.openSync(b,K.bb(a.flags)))}catch(c){if(!c.code)throw c;throw new H(E[c.code]);}},close:function(a){try{32768===(a.c.mode&61440)&&a.P&&fs.closeSync(a.P)}catch(b){if(!b.code)throw b;throw new H(E[b.code]); +}},read:function(a,b,c,d,f){if(0===d)return 0;var g=new Buffer(d),h;try{h=fs.readSync(a.P,g,0,d,f)}catch(p){throw new H(E[p.code]);}if(0b)throw new H(E.h);return b}}};q+=16; +q+=16;q+=16;var Bb=null,Cb=[null],L=[],Db=1,Eb=null,Fb=!0,M={},H=null,yb={}; +function N(a,b){a=pb("/",a);b=b||{};if(!a)return{path:"",c:null};var c={Ea:!0,ma:0},d;for(d in c)void 0===b[d]&&(b[d]=c[d]);if(8>>0)%Eb.length}function Ib(a){var b=Hb(a.parent.id,a.name);a.I=Eb[b];Eb[b]=a}function Jb(a){var b=Hb(a.parent.id,a.name);if(Eb[b]===a)Eb[b]=a.I;else for(b=Eb[b];b;){if(b.I===a){b.I=a.I;break}b=b.I}} +function zb(a,b){var c;if(c=(c=Kb(a,"x"))?c:a.d.lookup?0:E.L)throw new H(c,a);for(c=Eb[Hb(a.id,b)];c;c=c.I){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.d.lookup(a,b)} +function xb(a,b,c,d){Lb||(Lb=function(a,b,c,d){a||(a=this);this.parent=a;this.l=a.l;this.H=null;this.id=Db++;this.name=b;this.mode=c;this.d={};this.e={};this.rdev=d},Lb.prototype={},Object.defineProperties(Lb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},kb:{get:function(){return J(this.mode)}},jb:{get:function(){return 8192===(this.mode& +61440)}}}));a=new Lb(a,b,c,d);Ib(a);return a}function J(a){return 16384===(a&61440)}var Mb={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Nb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function Kb(a,b){if(Fb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return E.L}else return E.L;return 0} +function Ob(a,b){try{return zb(a,b),E.qa}catch(c){}return Kb(a,"wx")}function Pb(a,b,c){var d;try{d=zb(a,b)}catch(f){return f.f}if(a=Kb(a,"wx"))return a;if(c){if(!J(d.mode))return E.S;if(d===d.parent||"/"===O(d))return E.M}else if(J(d.mode))return E.N;return 0}function Qb(a){var b;b=4096;for(a=a||0;a<=b;a++)if(!L[a])return a;throw new H(E.Ma);} +function Rb(a,b){Sb||(Sb=function(){},Sb.prototype={},Object.defineProperties(Sb.prototype,{object:{get:function(){return this.c},set:function(a){this.c=a}},he:{get:function(){return 1!==(this.flags&2097155)}},ie:{get:function(){return 0!==(this.flags&2097155)}},ge:{get:function(){return this.flags&1024}}}));var c=new Sb,d;for(d in a)c[d]=a[d];a=c;c=Qb(b);a.fd=c;return L[c]=a}var wb={open:function(a){a.e=Cb[a.c.rdev].e;a.e.open&&a.e.open(a)},u:function(){throw new H(E.T);}}; +function sb(a,b){Cb[a]={e:b}}function Tb(a,b){var c="/"===b,d=!b,f;if(c&&Bb)throw new H(E.M);if(!c&&!d){f=N(b,{Ea:!1});b=f.path;f=f.c;if(f.H)throw new H(E.M);if(!J(f.mode))throw new H(E.S);}var d={type:a,ka:{},Ka:b,nb:[]},g=a.l(d);g.l=d;d.root=g;c?Bb=g:f&&(f.H=d,f.l&&f.l.nb.push(d))}function Ub(a,b,c){var d=N(a,{parent:!0}).c;a=nb(a);if(!a||"."===a||".."===a)throw new H(E.h);var f=Ob(d,a);if(f)throw new H(f);if(!d.d.O)throw new H(E.q);return d.d.O(d,a,b,c)} +function Vb(a,b){b=(void 0!==b?b:438)&4095;b|=32768;return Ub(a,b,0)}function P(a,b){b=(void 0!==b?b:511)&1023;b|=16384;return Ub(a,b,0)}function Wb(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Ub(a,b|8192,c)}function Xb(a,b){if(!pb(a))throw new H(E.p);var c=N(b,{parent:!0}).c;if(!c)throw new H(E.p);var d=nb(b),f=Ob(c,d);if(f)throw new H(f);if(!c.d.symlink)throw new H(E.q);return c.d.symlink(c,d,a)} +function Yb(a){var b=N(a,{parent:!0}).c,c=nb(a),d=zb(b,c),f=Pb(b,c,!1);if(f)throw new H(f);if(!b.d.unlink)throw new H(E.q);if(d.H)throw new H(E.M);try{M.willDeletePath&&M.willDeletePath(a)}catch(g){console.log("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+g.message)}b.d.unlink(b,c);Jb(d);try{if(M.onDeletePath)M.onDeletePath(a)}catch(h){console.log("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+h.message)}} +function Gb(a){a=N(a).c;if(!a)throw new H(E.p);if(!a.d.readlink)throw new H(E.h);return pb(O(a.parent),a.d.readlink(a))}function Zb(a,b){var c=N(a,{C:!b}).c;if(!c)throw new H(E.p);if(!c.d.n)throw new H(E.q);return c.d.n(c)}function $b(a){return Zb(a,!0)}function ac(a,b){var c;"string"===typeof a?c=N(a,{C:!0}).c:c=a;if(!c.d.k)throw new H(E.q);c.d.k(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})} +function bc(a){var b;"string"===typeof a?b=N(a,{C:!0}).c:b=a;if(!b.d.k)throw new H(E.q);b.d.k(b,{timestamp:Date.now()})}function cc(a,b){if(0>b)throw new H(E.h);var c;"string"===typeof a?c=N(a,{C:!0}).c:c=a;if(!c.d.k)throw new H(E.q);if(J(c.mode))throw new H(E.N);if(32768!==(c.mode&61440))throw new H(E.h);var d=Kb(c,"w");if(d)throw new H(d);c.d.k(c,{size:b,timestamp:Date.now()})} +function dc(a,b,c,d){if(""===a)throw new H(E.p);if("string"===typeof b){var f=Mb[b];if("undefined"===typeof f)throw Error("Unknown file open mode: "+b);b=f}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;var g;if("object"===typeof a)g=a;else{a=lb(a);try{g=N(a,{C:!(b&131072)}).c}catch(h){}}f=!1;if(b&64)if(g){if(b&128)throw new H(E.qa);}else g=Ub(a,c,0),f=!0;if(!g)throw new H(E.p);8192===(g.mode&61440)&&(b&=-513);if(b&65536&&!J(g.mode))throw new H(E.S);if(!f&&(c=g?40960===(g.mode&61440)?E.ba:J(g.mode)&& +("r"!==Nb(b)||b&512)?E.N:Kb(g,Nb(b)):E.p))throw new H(c);b&512&&cc(g,0);b&=-641;d=Rb({c:g,path:O(g),flags:b,seekable:!0,position:0,e:g.e,vb:[],error:!1},d);d.e.open&&d.e.open(d);!e.logReadFiles||b&1||(ec||(ec={}),a in ec||(ec[a]=1,e.printErr("read file: "+a)));try{M.onOpenFile&&(g=0,1!==(b&2097155)&&(g|=1),0!==(b&2097155)&&(g|=2),M.onOpenFile(a,g))}catch(p){console.log("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+p.message)}return d} +function fc(a){a.ia&&(a.ia=null);try{a.e.close&&a.e.close(a)}catch(b){throw b;}finally{L[a.fd]=null}}function gc(a,b,c){if(!a.seekable||!a.e.u)throw new H(E.T);a.position=a.e.u(a,b,c);a.vb=[]}function hc(a,b,c,d,f){if(0>d||0>f)throw new H(E.h);if(1===(a.flags&2097155))throw new H(E.t);if(J(a.c.mode))throw new H(E.N);if(!a.e.read)throw new H(E.h);var g=!0;if("undefined"===typeof f)f=a.position,g=!1;else if(!a.seekable)throw new H(E.T);b=a.e.read(a,b,c,d,f);g||(a.position+=b);return b} +function ic(a,b,c,d,f,g){if(0>d||0>f)throw new H(E.h);if(0===(a.flags&2097155))throw new H(E.t);if(J(a.c.mode))throw new H(E.N);if(!a.e.write)throw new H(E.h);a.flags&1024&&gc(a,0,2);var h=!0;if("undefined"===typeof f)f=a.position,h=!1;else if(!a.seekable)throw new H(E.T);b=a.e.write(a,b,c,d,f,g);h||(a.position+=b);try{if(a.path&&M.onWriteToFile)M.onWriteToFile(a.path)}catch(p){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+p.message)}return b} +function jc(){H||(H=function(a,b){this.c=b;this.sb=function(a){this.f=a;for(var b in E)if(E[b]===a){this.code=b;break}};this.sb(a);this.message=jb[a]},H.prototype=Error(),H.prototype.constructor=H,[E.p].forEach(function(a){yb[a]=new H(a);yb[a].stack=""}))}var kc;function lc(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function mc(a,b,c,d){a=F("string"===typeof a?a:O(a),b);return Vb(a,lc(c,d))} +function nc(a,b,c,d,f,g){a=b?F("string"===typeof a?a:O(a),b):a;d=lc(d,f);f=Vb(a,d);if(c){if("string"===typeof c){a=Array(c.length);b=0;for(var h=c.length;b>2]=d.dev;t[c+4>>2]=0;t[c+8>>2]=d.ino;t[c+12>>2]=d.mode;t[c+16>>2]=d.nlink;t[c+20>>2]=d.uid;t[c+24>>2]=d.gid;t[c+28>>2]=d.rdev;t[c+32>>2]=0;t[c+36>>2]=d.size;t[c+40>>2]=4096;t[c+44>>2]=d.blocks;t[c+48>>2]=d.atime.getTime()/1E3|0;t[c+52>>2]=0;t[c+56>>2]=d.mtime.getTime()/1E3|0;t[c+60>>2]=0;t[c+64>>2]=d.ctime.getTime()/1E3|0;t[c+68>>2]=0;t[c+72>>2]=d.ino;return 0}var S=0; +function T(){S+=4;return t[S-4>>2]}function U(){return w(T())}function sc(){var a;a=T();a=L[a];if(!a)throw new H(E.t);return a}e._memset=tc;e._bitshift64Shl=uc;e._i64Add=vc; +var wc=z([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0, +1,0,3,0,1,0,2,0,1,0],"i8",2);e._llvm_cttz_i32=xc;e.___udivmoddi4=yc;e.___divdi3=zc;function Ac(a){a=a/1E3;if((ca||k)&&self.performance&&self.performance.now)for(var b=self.performance.now();self.performance.now()-b>2]=60*-(new Date).getTimezoneOffset();var b=new Date(2E3,0,1),c=new Date(2E3,6,1);t[Fc>>2]=Number(b.getTimezoneOffset()!=c.getTimezoneOffset());var d=a(b),f=a(c),d=z(C(d),"i8",0),f=z(C(f),"i8",0);c.getTimezoneOffset()>2]=d,t[Ec+4>>2]=f):(t[Ec>>2]=f,t[Ec+4>>2]=d)}} +function Ic(a,b){Hc();var c=new Date(1E3*t[a>>2]);t[b>>2]=c.getSeconds();t[b+4>>2]=c.getMinutes();t[b+8>>2]=c.getHours();t[b+12>>2]=c.getDate();t[b+16>>2]=c.getMonth();t[b+20>>2]=c.getFullYear()-1900;t[b+24>>2]=c.getDay();var d=new Date(c.getFullYear(),0,1);t[b+28>>2]=(c.getTime()-d.getTime())/864E5|0;t[b+36>>2]=-(60*c.getTimezoneOffset());c=c.getTimezoneOffset()==Math.min(d.getTimezoneOffset(),(new Date(2E3,6,1)).getTimezoneOffset())|0;t[b+32>>2]=c;t[b+40>>2]=t[Ec+(c?n.U:0)>>2];return b} +e._bitshift64Lshr=Jc;var Kc=q;q+=16;function Lc(a){var b,c;Lc.A?(c=t[Kc>>2],b=t[c>>2]):(Lc.A=!0,V.USER=V.LOGNAME="web_user",V.PATH="/",V.PWD="/",V.HOME="/home/web_user",V.LANG="C",V._=e.thisProgram,b=z(1024,"i8",2),c=z(256,"i8*",2),t[c>>2]=b,t[Kc>>2]=c);var d=[],f=0,g;for(g in a)if("string"===typeof a[g]){var h=g+"="+a[g];d.push(h);f+=h.length}if(1024>2]=b,b+=h.length+1;t[c+4*d.length>>2]=0} +var V={};function Mc(a){if(0===a)return 0;a=w(a);if(!V.hasOwnProperty(a))return 0;Mc.A&&Ja(Mc.A);Mc.A=z(C(V[a]),"i8",0);return Mc.A}e.___udivdi3=Nc;e.___muldsi3=Oc;e.___muldi3=Pc;e._sbrk=Qc;e._memmove=Rc;e.___uremdi3=Sc;function Tc(a,b){S=b;return 0}e.___remdi3=Uc;jc();Eb=Array(4096);Tb(I,"/");P("/tmp");P("/home");P("/home/web_user"); +(function(){P("/dev");sb(259,{read:function(){return 0},write:function(a,b,f,g){return g}});Wb("/dev/null",259);rb(1280,ub);rb(1536,vb);Wb("/dev/tty",1280);Wb("/dev/tty1",1536);var a;if("undefined"!==typeof crypto){var b=new Uint8Array(1);a=function(){crypto.getRandomValues(b);return b[0]}}else a=l?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};oc("/dev","random",a);oc("/dev","urandom",a);P("/dev/shm");P("/dev/shm/tmp")})();P("/proc");P("/proc/self"); +P("/proc/self/fd");Tb({l:function(){var a=xb("/proc/self","fd",16895,73);a.d={lookup:function(a,c){var d=L[+c];if(!d)throw new H(E.t);var f={parent:null,l:{Ka:"fake"},d:{readlink:function(){return d.path}}};return f.parent=f}};return a}},"/proc/self/fd"); +Ua.unshift(function(){if(!e.noFSInit&&!kc){assert(!kc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");kc=!0;jc();e.stdin=e.stdin;e.stdout=e.stdout;e.stderr=e.stderr;e.stdin?oc("/dev","stdin",e.stdin):Xb("/dev/tty","/dev/stdin");e.stdout?oc("/dev","stdout",null,e.stdout):Xb("/dev/tty","/dev/stdout");e.stderr?oc("/dev","stderr",null,e.stderr):Xb("/dev/tty1","/dev/stderr"); +var a=dc("/dev/stdin","r");assert(0===a.fd,"invalid handle for stdin ("+a.fd+")");a=dc("/dev/stdout","w");assert(1===a.fd,"invalid handle for stdout ("+a.fd+")");a=dc("/dev/stderr","w");assert(2===a.fd,"invalid handle for stderr ("+a.fd+")")}});Va.push(function(){Fb=!1});Wa.push(function(){kc=!1;var a=e._fflush;a&&a(0);for(a=0;athis.length-1||0>a)){var b=a%this.chunkSize;return this.Ia(a/this.chunkSize|0)[b]}};p.prototype.rb=function(a){this.Ia=a};p.prototype.za=function(){var a=new XMLHttpRequest;a.open("HEAD",c,!1);a.send(null);if(!(200<=a.status&&300>a.status||304===a.status))throw Error("Couldn't load "+c+". Status: "+a.status);var b=Number(a.getResponseHeader("Content-length")),d,f=(d=a.getResponseHeader("Accept-Ranges"))&& +"bytes"===d,a=(d=a.getResponseHeader("Content-Encoding"))&&"gzip"===d,g=1048576;f||(g=b);var h=this;h.rb(function(a){var d=a*g,f=(a+1)*g-1,f=Math.min(f,b-1);if("undefined"===typeof h.V[a]){var p=h.V;if(d>f)throw Error("invalid range ("+d+", "+f+") or no bytes requested!");if(f>b-1)throw Error("only "+b+" bytes available! programmer error!");var r=new XMLHttpRequest;r.open("GET",c,!1);b!==g&&r.setRequestHeader("Range","bytes="+d+"-"+f);"undefined"!=typeof Uint8Array&&(r.responseType="arraybuffer"); +r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined");r.send(null);if(!(200<=r.status&&300>r.status||304===r.status))throw Error("Couldn't load "+c+". Status: "+r.status);d=void 0!==r.response?new Uint8Array(r.response||[]):C(r.responseText||"",!0);p[a]=d}if("undefined"===typeof h.V[a])throw Error("doXHR failed!");return h.V[a]});if(a||!b)g=b=1,g=b=this.Ia(0).length,console.log("LazyFiles on gzip forces download of the whole file when length is accessed");this.Ta=b;this.Sa= +g;this.ja=!0};if("undefined"!==typeof XMLHttpRequest){if(!k)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";g=new p;Object.defineProperties(g,{length:{get:function(){this.ja||this.za();return this.Ta}},chunkSize:{get:function(){this.ja||this.za();return this.Sa}}});h=void 0}else h=c,g=void 0;var r=mc(a,b,d,f);g?r.b=g:h&&(r.b=null,r.url=h);Object.defineProperties(r,{g:{get:function(){return this.b.length}}});var v={};Object.keys(r.e).forEach(function(a){var b= +r.e[a];v[a]=function(){if(!pc(r))throw new H(E.v);return b.apply(null,arguments)}});v.read=function(a,b,c,d,f){if(!pc(r))throw new H(E.v);a=a.c.b;if(f>=a.length)return 0;d=Math.min(a.length-f,d);assert(0<=d);if(a.slice)for(var g=0;g>2]=Qa;Ba=!0;e.Ua={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:Infinity}; +e.Va={abort:u,assert:assert,enlargeMemory:function(){ka()},getTotalMemory:function(){return ja},abortOnCannotGrowMemory:ka,invoke_iiii:function(a,b,c,d){try{return e.dynCall_iiii(a,b,c,d)}catch(f){if("number"!==typeof f&&"longjmp"!==f)throw f;e.setThrew(1,0)}},jsCall_iiii:function(a,b,c,d){return n.j[a](b,c,d)},invoke_i:function(a){try{return e.dynCall_i(a)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;e.setThrew(1,0)}},jsCall_i:function(a){return n.j[a]()},invoke_vi:function(a,b){try{e.dynCall_vi(a, +b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;e.setThrew(1,0)}},jsCall_vi:function(a,b){n.j[a](b)},invoke_vii:function(a,b,c){try{e.dynCall_vii(a,b,c)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;e.setThrew(1,0)}},jsCall_vii:function(a,b,c){n.j[a](b,c)},invoke_iiiiiii:function(a,b,c,d,f,g,h){try{return e.dynCall_iiiiiii(a,b,c,d,f,g,h)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;e.setThrew(1,0)}},jsCall_iiiiiii:function(a,b,c,d,f,g,h){return n.j[a](b,c,d,f,g,h)},invoke_ii:function(a, +b){try{return e.dynCall_ii(a,b)}catch(c){if("number"!==typeof c&&"longjmp"!==c)throw c;e.setThrew(1,0)}},jsCall_ii:function(a,b){return n.j[a](b)},invoke_viii:function(a,b,c,d){try{e.dynCall_viii(a,b,c,d)}catch(f){if("number"!==typeof f&&"longjmp"!==f)throw f;e.setThrew(1,0)}},jsCall_viii:function(a,b,c,d){n.j[a](b,c,d)},invoke_v:function(a){try{e.dynCall_v(a)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;e.setThrew(1,0)}},jsCall_v:function(a){n.j[a]()},invoke_iiiii:function(a,b,c,d,f){try{return e.dynCall_iiiii(a, +b,c,d,f)}catch(g){if("number"!==typeof g&&"longjmp"!==g)throw g;e.setThrew(1,0)}},jsCall_iiiii:function(a,b,c,d,f){return n.j[a](b,c,d,f)},invoke_viiiiii:function(a,b,c,d,f,g,h){try{e.dynCall_viiiiii(a,b,c,d,f,g,h)}catch(p){if("number"!==typeof p&&"longjmp"!==p)throw p;e.setThrew(1,0)}},jsCall_viiiiii:function(a,b,c,d,f,g,h){n.j[a](b,c,d,f,g,h)},invoke_iii:function(a,b,c){try{return e.dynCall_iii(a,b,c)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;e.setThrew(1,0)}},jsCall_iii:function(a, +b,c){return n.j[a](b,c)},invoke_iiiiii:function(a,b,c,d,f,g){try{return e.dynCall_iiiiii(a,b,c,d,f,g)}catch(h){if("number"!==typeof h&&"longjmp"!==h)throw h;e.setThrew(1,0)}},jsCall_iiiiii:function(a,b,c,d,f,g){return n.j[a](b,c,d,f,g)},invoke_viiii:function(a,b,c,d,f){try{e.dynCall_viiii(a,b,c,d,f)}catch(g){if("number"!==typeof g&&"longjmp"!==g)throw g;e.setThrew(1,0)}},jsCall_viiii:function(a,b,c,d,f){n.j[a](b,c,d,f)},___syscall221:function(a,b){S=b;try{var c=sc();switch(T()){case 0:var d=T();return 0> +d?-E.h:dc(c.path,c.flags,0,d).fd;case 1:case 2:return 0;case 3:return c.flags;case 4:return d=T(),c.flags|=d,0;case 12:case 12:return d=T(),ta[d+0>>1]=2,0;case 13:case 14:case 13:case 14:return 0;case 16:case 8:return-E.h;case 9:return ib(E.h),-1;default:return-E.h}}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},___syscall85:function(a,b){S=b;try{var c=U(),d=T(),f;var g=T();if(0>=g)f=-E.h;else{var h=Gb(c),p=Math.min(g,Ha(h)),r=x[d+p];ra(h,d,g+1);x[d+p]=r;f=p}return f}catch(v){return"undefined"!== +typeof Q&&v instanceof H||u(v),-v.f}},_utimes:function(a,b){var c;b?(c=1E3*t[b+8>>2],c+=t[b+12>>2]/1E3):c=Date.now();a=w(a);try{var d=c,f=N(a,{C:!0}).c;f.d.k(f,{timestamp:Math.max(d,c)});return 0}catch(g){if(!(g instanceof H))throw g+" : "+Ka();ib(g.f);return-1}},_llvm_pow_f64:ab,___syscall6:function(a,b){S=b;try{var c=sc();fc(c);return 0}catch(d){return"undefined"!==typeof Q&&d instanceof H||u(d),-d.f}},___syscall40:function(a,b){S=b;try{var c=U(),d=N(c,{parent:!0}).c,f=nb(c),g=zb(d,f),h=Pb(d,f, +!0);if(h)throw new H(h);if(!d.d.rmdir)throw new H(E.q);if(g.H)throw new H(E.M);try{M.willDeletePath&&M.willDeletePath(c)}catch(p){console.log("FS.trackingDelegate['willDeletePath']('"+c+"') threw an exception: "+p.message)}d.d.rmdir(d,f);Jb(g);try{if(M.onDeletePath)M.onDeletePath(c)}catch(r){console.log("FS.trackingDelegate['onDeletePath']('"+c+"') threw an exception: "+r.message)}return 0}catch(v){return"undefined"!==typeof Q&&v instanceof H||u(v),-v.f}},___syscall118:function(a,b){S=b;try{return sc(), +0}catch(c){return"undefined"!==typeof Q&&c instanceof H||u(c),-c.f}},___syscall20:function(a,b){S=b;return 42},___syscall183:function(a,b){S=b;try{var c=T(),d=T();if(0===d)return-E.h;if(2>d)return-E.Na;Da("/",c);return c}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},___assert_fail:function(a,b,c,d){la=!0;throw"Assertion failed: "+w(a)+", at: "+[b?w(b):"unknown filename",c,d?w(d):"unknown function"]+" at "+Ka();},_usleep:Ac,___buildEnvironment:Lc,_localtime_r:Ic,_tzset:Hc,___setErrNo:ib, +___syscall192:function(a,b){S=b;try{var c=T(),d=T(),f=T(),g=T(),h=T(),p=T(),p=p<<12,r,v=!1;if(-1===h){r=Vc(16384,d);if(!r)return-E.ra;tc(r,0,d);v=!0}else{var D=L[h];if(!D)return-E.t;var B,R=A;if(1===(D.flags&2097155))throw new H(E.L);if(!D.e.X)throw new H(E.R);B=D.e.X(D,R,c,d,p,f,g);r=B.ob;v=B.da}qc[r]={mb:r,lb:d,da:v,fd:h,flags:g};return r}catch(G){return"undefined"!==typeof Q&&G instanceof H||u(G),-G.f}},___syscall197:function(a,b){S=b;try{var c=sc(),d=T();return rc(Zb,c.path,d)}catch(f){return"undefined"!== +typeof Q&&f instanceof H||u(f),-f.f}},___syscall196:function(a,b){S=b;try{var c=U(),d=T();return rc($b,c,d)}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},___syscall195:function(a,b){S=b;try{var c=U(),d=T();return rc(Zb,c,d)}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},___syscall194:function(a,b){S=b;try{var c=T();assert(0===T());var d=T(),f=T();0<=d?assert(0===f):assert(-1===f);var g=L[c];if(!g)throw new H(E.t);if(0===(g.flags&2097155))throw new H(E.h);cc(g.c, +d);return 0}catch(h){return"undefined"!==typeof Q&&h instanceof H||u(h),-h.f}},___syscall212:function(a,b){S=b;try{var c=U();T();T();bc(c);return 0}catch(d){return"undefined"!==typeof Q&&d instanceof H||u(d),-d.f}},_sysconf:function(a){switch(a){case 30:return 16384;case 85:return a=2130706432,a=A.length,a/16384;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809; +case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32; +case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}ib(E.h);return-1}, +___syscall94:function(a,b){S=b;try{var c=T(),d=T(),f=L[c];if(!f)throw new H(E.t);ac(f.c,d);return 0}catch(g){return"undefined"!==typeof Q&&g instanceof H||u(g),-g.f}},_nanosleep:function(a,b){var c=t[a>>2],d=t[a+4>>2];0!==b&&(t[b>>2]=0,t[b+4>>2]=0);return Ac(1E6*c+d/1E3)},_emscripten_memcpy_big:function(a,b,c){A.set(A.subarray(b,b+c),a);return a},___syscall91:function(a,b){S=b;try{var c=T(),d=T(),f=qc[c];if(!f)return 0;if(d===f.lb){var g=L[f.fd],h=f.flags,p=new Uint8Array(A.subarray(c,c+d));g&&g.e.Y&& +g.e.Y(g,p,0,d,h);qc[c]=null;f.da&&Ja(f.mb)}return 0}catch(r){return"undefined"!==typeof Q&&r instanceof H||u(r),-r.f}},_getenv:Mc,___syscall33:function(a,b){S=b;try{var c=U(),d;var f=T();if(f&-8)d=-E.h;else{var g;g=N(c,{C:!0}).c;c="";f&4&&(c+="r");f&2&&(c+="w");f&1&&(c+="x");d=c&&Kb(g,c)?-E.L:0}return d}catch(h){return"undefined"!==typeof Q&&h instanceof H||u(h),-h.f}},___syscall54:function(a,b){S=b;try{var c=sc(),d=T();switch(d){case 21505:return c.tty?0:-E.F;case 21506:return c.tty?0:-E.F;case 21519:if(!c.tty)return-E.F; +var f=T();return t[f>>2]=0;case 21520:return c.tty?-E.h:-E.F;case 21531:f=T();if(!c.e.ib)throw new H(E.F);return c.e.ib(c,d,f);case 21523:return c.tty?0:-E.F;default:u("bad ioctl syscall "+d)}}catch(g){return"undefined"!==typeof Q&&g instanceof H||u(g),-g.f}},___unlock:function(){},___syscall140:function(a,b){S=b;try{var c=sc();T();var d=T(),f=T(),g=T();gc(c,d,g);t[f>>2]=c.position;c.ia&&0===d&&0===g&&(c.ia=null);return 0}catch(h){return"undefined"!==typeof Q&&h instanceof H||u(h),-h.f}},___syscall15:function(a, +b){S=b;try{var c=U(),d=T();ac(c,d);return 0}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},___syscall39:function(a,b){S=b;try{var c=U(),d=T(),c=lb(c);"/"===c[c.length-1]&&(c=c.substr(0,c.length-1));P(c,d);return 0}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},___syscall10:function(a,b){S=b;try{var c=U();Yb(c);return 0}catch(d){return"undefined"!==typeof Q&&d instanceof H||u(d),-d.f}},___syscall3:function(a,b){S=b;try{var c=sc(),d=T(),f=T();return hc(c,x,d, +f)}catch(g){return"undefined"!==typeof Q&&g instanceof H||u(g),-g.f}},___lock:function(){},_abort:function(){e.abort()},___syscall5:function(a,b){S=b;try{var c=U(),d=T(),f=T();return dc(c,d,f).fd}catch(g){return"undefined"!==typeof Q&&g instanceof H||u(g),-g.f}},___syscall4:function(a,b){S=b;try{var c=sc(),d=T(),f=T();return ic(c,x,d,f)}catch(g){return"undefined"!==typeof Q&&g instanceof H||u(g),-g.f}},_time:function(a){var b=Date.now()/1E3|0;a&&(t[a>>2]=b);return b},_gettimeofday:function(a){var b= +Date.now();t[a>>2]=b/1E3|0;t[a+4>>2]=b%1E3*1E3|0;return 0},___syscall201:function(){return Tc.apply(null,arguments)},___syscall207:function(a,b){S=b;try{var c=T();T();T();var d=L[c];if(!d)throw new H(E.t);bc(d.c);return 0}catch(f){return"undefined"!==typeof Q&&f instanceof H||u(f),-f.f}},_localtime:function(a){return Ic(a,Dc)},___syscall202:Tc,___syscall146:function(a,b){S=b;try{var c=sc(),d=T(),f;a:{for(var g=T(),h=0,p=0;p>2],t[d+(8*p+4)>>2],void 0);if(0>r){f=-1;break a}h+= +r}f=h}return f}catch(v){return"undefined"!==typeof Q&&v instanceof H||u(v),-v.f}},DYNAMICTOP_PTR:ia,tempDoublePtr:gb,ABORT:la,STACKTOP:m,STACK_MAX:Pa,cttz_i8:wc};// EMSCRIPTEN_START_ASM +var W=(function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.DYNAMICTOP_PTR|0;var j=env.tempDoublePtr|0;var k=env.ABORT|0;var l=env.STACKTOP|0;var m=env.STACK_MAX|0;var n=env.cttz_i8|0;var o=0;var p=0;var q=0;var r=0;var s=global.NaN,t=global.Infinity;var u=0,v=0,w=0,x=0,y=0.0;var z=0;var A=global.Math.floor;var B=global.Math.abs;var C=global.Math.sqrt;var D=global.Math.pow;var E=global.Math.cos;var F=global.Math.sin;var G=global.Math.tan;var H=global.Math.acos;var I=global.Math.asin;var J=global.Math.atan;var K=global.Math.atan2;var L=global.Math.exp;var M=global.Math.log;var N=global.Math.ceil;var O=global.Math.imul;var P=global.Math.min;var Q=global.Math.max;var R=global.Math.clz32;var S=env.abort;var T=env.assert;var U=env.enlargeMemory;var V=env.getTotalMemory;var W=env.abortOnCannotGrowMemory;var X=env.invoke_iiii;var Y=env.jsCall_iiii;var Z=env.invoke_i;var _=env.jsCall_i;var $=env.invoke_vi;var aa=env.jsCall_vi;var ba=env.invoke_vii;var ca=env.jsCall_vii;var da=env.invoke_iiiiiii;var ea=env.jsCall_iiiiiii;var fa=env.invoke_ii;var ga=env.jsCall_ii;var ha=env.invoke_viii;var ia=env.jsCall_viii;var ja=env.invoke_v;var ka=env.jsCall_v;var la=env.invoke_iiiii;var ma=env.jsCall_iiiii;var na=env.invoke_viiiiii;var oa=env.jsCall_viiiiii;var pa=env.invoke_iii;var qa=env.jsCall_iii;var ra=env.invoke_iiiiii;var sa=env.jsCall_iiiiii;var ta=env.invoke_viiii;var ua=env.jsCall_viiii;var va=env.___syscall221;var wa=env.___syscall85;var xa=env._utimes;var ya=env._llvm_pow_f64;var za=env.___syscall6;var Aa=env.___syscall40;var Ba=env.___syscall118;var Ca=env.___syscall20;var Da=env.___syscall183;var Ea=env.___assert_fail;var Fa=env._usleep;var Ga=env.___buildEnvironment;var Ha=env._localtime_r;var Ia=env._tzset;var Ja=env.___setErrNo;var Ka=env.___syscall192;var La=env.___syscall197;var Ma=env.___syscall196;var Na=env.___syscall195;var Oa=env.___syscall194;var Pa=env.___syscall212;var Qa=env._sysconf;var Ra=env.___syscall94;var Sa=env._nanosleep;var Ta=env._emscripten_memcpy_big;var Ua=env.___syscall91;var Va=env._getenv;var Wa=env.___syscall33;var Xa=env.___syscall54;var Ya=env.___unlock;var Za=env.___syscall140;var _a=env.___syscall15;var $a=env.___syscall39;var ab=env.___syscall10;var bb=env.___syscall3;var cb=env.___lock;var db=env._abort;var eb=env.___syscall5;var fb=env.___syscall4;var gb=env._time;var hb=env._gettimeofday;var ib=env.___syscall201;var jb=env.___syscall207;var kb=env._localtime;var lb=env.___syscall202;var mb=env.___syscall146;var nb=0.0; +// EMSCRIPTEN_START_FUNCS +function Gw(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;Y=l;l=l+208|0;W=Y+56|0;V=Y+48|0;U=Y+40|0;T=Y+24|0;X=Y+16|0;p=Y+8|0;m=Y;w=Y+196|0;k=Y+192|0;N=Y+188|0;O=Y+184|0;P=Y+180|0;Q=Y+176|0;R=Y+172|0;S=Y+168|0;q=Y+164|0;r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;while(1){if(!(c[(c[i>>2]|0)+48>>2]|0))break;c[i>>2]=c[(c[i>>2]|0)+48>>2]}tv(c[O>>2]|0,c[c[i>>2]>>2]|0,(c[n>>2]|0)+34|0,(c[n>>2]|0)+4|0)|0;b[(c[n>>2]|0)+32>>1]=-1;b[(c[n>>2]|0)+38>>1]=200;h=(c[n>>2]|0)+42|0;a[h>>0]=d[h>>0]|2;break}h=gu(c[O>>2]|0,0,c[r>>2]|0)|0;c[n>>2]=h;c[(c[r>>2]|0)+16>>2]=h;if(!(c[n>>2]|0)){h=24;break a}if((e[(c[n>>2]|0)+36>>1]|0)==65535){h=26;break a}h=(c[n>>2]|0)+36|0;b[h>>1]=(b[h>>1]|0)+1<<16>>16;if((d[(c[n>>2]|0)+42>>0]&16|0)==0?Kw(c[O>>2]|0,c[r>>2]|0)|0:0){h=29;break a}if((d[(c[n>>2]|0)+42>>0]&16|0)==0?(c[(c[n>>2]|0)+12>>2]|0)==0:0)break;if(kv(c[O>>2]|0,c[n>>2]|0)|0){h=33;break a}h=qv(c[s>>2]|0,c[(c[n>>2]|0)+12>>2]|0,0)|0;c[(c[r>>2]|0)+20>>2]=h;b[j>>1]=b[(c[n>>2]|0)+34>>1]|0;b[(c[n>>2]|0)+34>>1]=-1;Mv(c[k>>2]|0,c[(c[r>>2]|0)+20>>2]|0)|0;b[(c[n>>2]|0)+34>>1]=b[j>>1]|0}while(0);if(Lw(c[O>>2]|0,c[r>>2]|0)|0){h=36;break}}c[P>>2]=(c[P>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+72}if((h|0)==12){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==16){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==18){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==24){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==26){X=c[O>>2]|0;c[p>>2]=c[c[n>>2]>>2];Ck(X,26429,p);c[(c[r>>2]|0)+16>>2]=0;c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==29){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==33){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==36){c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}else if((h|0)==38){if((d[(c[s>>2]|0)+69>>0]|0)==0?(Mw(c[O>>2]|0,c[N>>2]|0)|0)==0:0){c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[c[q>>2]>>2]|0))break;c[t>>2]=c[(c[(c[q>>2]|0)+4>>2]|0)+((c[R>>2]|0)*20|0)>>2];if((d[c[t>>2]>>0]|0)==160)break;if((d[c[t>>2]>>0]|0)==122?(d[c[(c[t>>2]|0)+16>>2]>>0]|0)==160:0)break;c[R>>2]=(c[R>>2]|0)+1}if((c[R>>2]|0)<(c[c[q>>2]>>2]|0)){c[x>>2]=c[(c[q>>2]|0)+4>>2];c[y>>2]=0;c[o>>2]=c[(c[c[O>>2]>>2]|0)+24>>2];if(c[o>>2]&4|0)f=(c[o>>2]&64|0)==0;else f=0;c[z>>2]=f&1;c[R>>2]=0;while(1){if((c[R>>2]|0)>=(c[c[q>>2]>>2]|0))break;c[t>>2]=c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)>>2];c[u>>2]=c[(c[t>>2]|0)+16>>2];do if((d[c[t>>2]>>0]|0)!=160){if((d[c[t>>2]>>0]|0)==122?(d[c[u>>2]>>0]|0)==160:0){h=58;break}c[y>>2]=Ks(c[O>>2]|0,c[y>>2]|0,c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)>>2]|0)|0;if(c[y>>2]|0){c[(c[(c[y>>2]|0)+4>>2]|0)+(((c[c[y>>2]>>2]|0)-1|0)*20|0)+4>>2]=c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)+4>>2];c[(c[(c[y>>2]|0)+4>>2]|0)+(((c[c[y>>2]>>2]|0)-1|0)*20|0)+8>>2]=c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)+8>>2];c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)+4>>2]=0;c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)+8>>2]=0}c[(c[x>>2]|0)+((c[R>>2]|0)*20|0)>>2]=0}else h=58;while(0);do if((h|0)==58){h=0;c[A>>2]=0;c[B>>2]=0;if((d[c[t>>2]>>0]|0)==122)c[B>>2]=c[(c[(c[t>>2]|0)+12>>2]|0)+8>>2];c[P>>2]=0;c[r>>2]=(c[S>>2]|0)+8;while(1){if((c[P>>2]|0)>=(c[c[S>>2]>>2]|0))break;c[C>>2]=c[(c[r>>2]|0)+16>>2];c[D>>2]=c[(c[r>>2]|0)+20>>2];c[E>>2]=c[(c[r>>2]|0)+12>>2];c[F>>2]=0;if(!(c[E>>2]|0))c[E>>2]=c[c[C>>2]>>2];if(a[(c[s>>2]|0)+69>>0]|0)break;if((c[D>>2]|0)!=0?(c[(c[D>>2]|0)+8>>2]&2048|0)!=0:0)h=72;else h=67;do if((h|0)==67){h=0;c[D>>2]=0;if(c[B>>2]|0?Ig(c[B>>2]|0,c[E>>2]|0)|0:0)break;c[G>>2]=Nt(c[s>>2]|0,c[(c[C>>2]|0)+64>>2]|0)|0;if((c[G>>2]|0)>=0)f=c[(c[(c[s>>2]|0)+16>>2]|0)+(c[G>>2]<<4)>>2]|0;else f=26468;c[F>>2]=f;h=72}while(0);b:do if((h|0)==72){h=0;c[Q>>2]=0;while(1){if((c[Q>>2]|0)>=(b[(c[C>>2]|0)+34>>1]|0))break b;c[H>>2]=c[(c[(c[C>>2]|0)+4>>2]|0)+(c[Q>>2]<<4)>>2];if(!((c[B>>2]|0)!=0&(c[D>>2]|0)!=0?!(Aw(c[(c[(c[c[D>>2]>>2]|0)+4>>2]|0)+((c[Q>>2]|0)*20|0)+8>>2]|0,0,c[B>>2]|0,0)|0):0))h=76;do if((h|0)==76){h=0;if((c[(c[N>>2]|0)+8>>2]&131072|0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c[M>>2]|0}c[g+8>>2]=f;p=(c[M>>2]|0)+13|0;a[p>>0]=a[p>>0]&-3|2}while(0);Hd(c[s>>2]|0,c[J>>2]|0)}while(0);c[Q>>2]=(c[Q>>2]|0)+1}}while(0);c[P>>2]=(c[P>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+72}if(!(c[A>>2]|0)){f=c[O>>2]|0;if(c[B>>2]|0){c[U>>2]=c[B>>2];Ck(f,26485,U);break}else{Ck(f,26503,V);break}}}while(0);c[R>>2]=(c[R>>2]|0)+1}_j(c[s>>2]|0,c[q>>2]|0);c[c[N>>2]>>2]=c[y>>2]}if(c[c[N>>2]>>2]|0?(c[c[c[N>>2]>>2]>>2]|0)>(c[(c[s>>2]|0)+96+8>>2]|0):0){Ck(c[O>>2]|0,26523,W);c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}c[w>>2]=0;X=c[w>>2]|0;l=Y;return X|0}c[w>>2]=2;X=c[w>>2]|0;l=Y;return X|0}}c[w>>2]=1;X=c[w>>2]|0;l=Y;return X|0}function Hw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=l;l=l+16|0;h=f+12|0;g=f+8|0;d=f+4|0;e=f;c[h>>2]=a;c[g>>2]=b;c[d>>2]=c[c[h>>2]>>2];c[e>>2]=c[(Iw(c[g>>2]|0)|0)+64>>2];if(!(c[e>>2]|0)){l=f;return}c[(c[d>>2]|0)+472>>2]=c[(c[e>>2]|0)+4>>2];l=f;return}function Iw(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;while(1){a=c[b>>2]|0;if(!(c[(c[b>>2]|0)+52>>2]|0))break;c[b>>2]=c[a+52>>2]}l=d;return a|0}function Jw(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;B=l;l=l+96|0;A=B+16|0;o=B+8|0;i=B;v=B+88|0;w=B+84|0;n=B+80|0;x=B+76|0;h=B+72|0;y=B+68|0;p=B+64|0;z=B+60|0;q=B+56|0;r=B+52|0;s=B+48|0;t=B+44|0;u=B+40|0;j=B+36|0;k=B+32|0;m=B+28|0;c[w>>2]=f;c[n>>2]=g;c[x>>2]=c[c[w>>2]>>2];c[h>>2]=c[c[x>>2]>>2];c[y>>2]=$w(c[(c[x>>2]|0)+472>>2]|0,c[n>>2]|0,p)|0;if(c[y>>2]|0){f=c[x>>2]|0;if(c[(c[y>>2]|0)+12>>2]|0){A=c[(c[y>>2]|0)+12>>2]|0;c[i>>2]=c[c[y>>2]>>2];Ck(f,A,i);c[v>>2]=1;A=c[v>>2]|0;l=B;return A|0}if(Kw(f,c[n>>2]|0)|0){c[v>>2]=1;A=c[v>>2]|0;l=B;return A|0}i=jl(c[h>>2]|0,72,0)|0;c[z>>2]=i;c[(c[n>>2]|0)+16>>2]=i;if(!(c[z>>2]|0)){c[v>>2]=2;A=c[v>>2]|0;l=B;return A|0}b[(c[z>>2]|0)+36>>1]=1;i=go(c[h>>2]|0,c[c[y>>2]>>2]|0)|0;c[c[z>>2]>>2]=i;b[(c[z>>2]|0)+32>>1]=-1;b[(c[z>>2]|0)+38>>1]=200;i=(c[z>>2]|0)+42|0;a[i>>0]=d[i>>0]|66;i=qv(c[h>>2]|0,c[(c[y>>2]|0)+8>>2]|0,0)|0;c[(c[n>>2]|0)+20>>2]=i;if(a[(c[h>>2]|0)+69>>0]|0){c[v>>2]=7;A=c[v>>2]|0;l=B;return A|0}c[r>>2]=c[(c[n>>2]|0)+20>>2];if((d[(c[r>>2]|0)+4>>0]|0)==116)f=1;else f=(d[(c[r>>2]|0)+4>>0]|0)==115;c[t>>2]=f&1;a:do if(c[t>>2]|0){c[k>>2]=c[(c[(c[n>>2]|0)+20>>2]|0)+28>>2];c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[c[k>>2]>>2]|0))break a;c[m>>2]=(c[k>>2]|0)+8+((c[j>>2]|0)*72|0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]|0)+8>>2]&8192|0?26868:26902;Mv(c[w>>2]|0,c[r>>2]|0)|0}c[(c[y>>2]|0)+12>>2]=0;c[(c[x>>2]|0)+472>>2]=c[u>>2]}c[v>>2]=0;A=c[v>>2]|0;l=B;return A|0}function Kw(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i;e=i+12|0;f=i+8|0;g=i+4|0;c[f>>2]=a;c[g>>2]=b;if((d[(c[g>>2]|0)+36+1>>0]|0)>>>2&1|0){f=c[f>>2]|0;c[h>>2]=c[(c[g>>2]|0)+8>>2];Ck(f,26741,h);c[e>>2]=1;h=c[e>>2]|0;l=i;return h|0}else{c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}return 0}function Lw(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n;f=n+28|0;g=n+24|0;h=n+20|0;i=n+16|0;j=n+12|0;k=n+8|0;c[g>>2]=b;c[h>>2]=e;do if(c[(c[h>>2]|0)+16>>2]|0?(d[(c[h>>2]|0)+36+1>>0]|0)>>>1&1|0:0){c[i>>2]=c[(c[h>>2]|0)+16>>2];c[j>>2]=c[(c[h>>2]|0)+64>>2];c[k>>2]=c[(c[i>>2]|0)+8>>2];while(1){if(!(c[k>>2]|0))break;if(!(Ig(c[c[k>>2]>>2]|0,c[j>>2]|0)|0))break;c[k>>2]=c[(c[k>>2]|0)+20>>2]}if(c[k>>2]|0){c[(c[h>>2]|0)+68>>2]=c[k>>2];break}k=c[g>>2]|0;c[m>>2]=c[j>>2];c[m+4>>2]=0;Ck(k,26723,m);a[(c[g>>2]|0)+17>>0]=1;c[f>>2]=1;m=c[f>>2]|0;l=n;return m|0}while(0);c[f>>2]=0;m=c[f>>2]|0;l=n;return m|0}function Mw(a,e){a=a|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+96|0;B=C+16|0;A=C+8|0;z=C;x=C+92|0;y=C+88|0;q=C+84|0;r=C+80|0;s=C+76|0;t=C+72|0;u=C+68|0;v=C+64|0;f=C+60|0;g=C+56|0;h=C+52|0;i=C+48|0;j=C+44|0;k=C+40|0;m=C+36|0;w=C+32|0;n=C+28|0;o=C+24|0;p=C+20|0;c[y>>2]=a;c[q>>2]=e;c[r>>2]=c[(c[q>>2]|0)+28>>2];c[u>>2]=(c[r>>2]|0)+8;c[v>>2]=(c[u>>2]|0)+72;c[s>>2]=0;a:while(1){if((c[s>>2]|0)>=((c[c[r>>2]>>2]|0)-1|0)){a=28;break}c[f>>2]=c[(c[u>>2]|0)+16>>2];c[g>>2]=c[(c[v>>2]|0)+16>>2];b:do if(!((c[f>>2]|0)==0|(c[g>>2]|0)==0)){c[h>>2]=(d[(c[v>>2]|0)+36>>0]&32|0)!=0&1;c:do if(d[(c[v>>2]|0)+36>>0]&4|0){if(c[(c[v>>2]|0)+48>>2]|0){a=7;break a}if(c[(c[v>>2]|0)+52>>2]|0){a=7;break a}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(b[(c[g>>2]|0)+34>>1]|0))break c;c[i>>2]=c[(c[(c[g>>2]|0)+4>>2]|0)+(c[t>>2]<<4)>>2];if(Nw(c[r>>2]|0,(c[s>>2]|0)+1|0,c[i>>2]|0,j,k)|0)Qw(c[y>>2]|0,c[r>>2]|0,c[j>>2]|0,c[k>>2]|0,(c[s>>2]|0)+1|0,c[t>>2]|0,c[h>>2]|0,(c[q>>2]|0)+32|0);c[t>>2]=(c[t>>2]|0)+1}}while(0);if(c[(c[v>>2]|0)+48>>2]|0?c[(c[v>>2]|0)+52>>2]|0:0){a=15;break a}if(c[(c[v>>2]|0)+48>>2]|0){if(c[h>>2]|0)Rw(c[(c[v>>2]|0)+48>>2]|0,c[(c[v>>2]|0)+44>>2]|0);e=Sw(c[c[y>>2]>>2]|0,c[(c[q>>2]|0)+32>>2]|0,c[(c[v>>2]|0)+48>>2]|0)|0;c[(c[q>>2]|0)+32>>2]=e;c[(c[v>>2]|0)+48>>2]=0}if(c[(c[v>>2]|0)+52>>2]|0){c[m>>2]=c[(c[v>>2]|0)+52>>2];c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[(c[m>>2]|0)+4>>2]|0))break b;c[w>>2]=c[(c[c[m>>2]>>2]|0)+(c[t>>2]<<3)>>2];c[p>>2]=Pw(c[g>>2]|0,c[w>>2]|0)|0;if((c[p>>2]|0)<0){a=25;break a}if(!(Nw(c[r>>2]|0,(c[s>>2]|0)+1|0,c[w>>2]|0,n,o)|0)){a=25;break a}Qw(c[y>>2]|0,c[r>>2]|0,c[n>>2]|0,c[o>>2]|0,(c[s>>2]|0)+1|0,c[p>>2]|0,c[h>>2]|0,(c[q>>2]|0)+32|0);c[t>>2]=(c[t>>2]|0)+1}}}while(0);c[s>>2]=(c[s>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+72;c[u>>2]=(c[u>>2]|0)+72}if((a|0)==7){B=c[y>>2]|0;c[z>>2]=0;Ck(B,26554,z);c[x>>2]=1;B=c[x>>2]|0;l=C;return B|0}else if((a|0)==15){Ck(c[y>>2]|0,26604,A);c[x>>2]=1;B=c[x>>2]|0;l=C;return B|0}else if((a|0)==25){A=c[y>>2]|0;c[B>>2]=c[w>>2];Ck(A,26659,B);c[x>>2]=1;B=c[x>>2]|0;l=C;return B|0}else if((a|0)==28){c[x>>2]=0;B=c[x>>2]|0;l=C;return B|0}return 0}function Nw(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;j=q+28|0;k=q+24|0;m=q+20|0;n=q+16|0;o=q+12|0;g=q+8|0;h=q+4|0;i=q;c[k>>2]=a;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[g>>2]=f;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[m>>2]|0)){p=8;break}c[i>>2]=Pw(c[(c[k>>2]|0)+8+((c[h>>2]|0)*72|0)+16>>2]|0,c[n>>2]|0)|0;if((c[i>>2]|0)>=0)break;c[h>>2]=(c[h>>2]|0)+1}if((p|0)==8){c[j>>2]=0;p=c[j>>2]|0;l=q;return p|0}if(c[o>>2]|0){c[c[o>>2]>>2]=c[h>>2];c[c[g>>2]>>2]=c[i>>2]}c[j>>2]=1;p=c[j>>2]|0;l=q;return p|0}function Ow(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;d=h+8|0;e=h+4|0;f=h;c[d>>2]=a;c[e>>2]=b;if(!(c[d>>2]|0)){c[g>>2]=-1;g=c[g>>2]|0;l=h;return g|0}c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[d>>2]|0)+4>>2]|0)){a=8;break}a=(Ig(c[(c[c[d>>2]>>2]|0)+(c[f>>2]<<3)>>2]|0,c[e>>2]|0)|0)==0;b=c[f>>2]|0;if(a){a=6;break}c[f>>2]=b+1}if((a|0)==6){c[g>>2]=b;g=c[g>>2]|0;l=h;return g|0}else if((a|0)==8){c[g>>2]=-1;g=c[g>>2]|0;l=h;return g|0}return 0}function Pw(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;e=i+8|0;f=i+4|0;g=i;c[e>>2]=a;c[f>>2]=d;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(b[(c[e>>2]|0)+34>>1]|0)){a=6;break}a=(Ig(c[(c[(c[e>>2]|0)+4>>2]|0)+(c[g>>2]<<4)>>2]|0,c[f>>2]|0)|0)==0;d=c[g>>2]|0;if(a){a=4;break}c[g>>2]=d+1}if((a|0)==4){c[h>>2]=d;h=c[h>>2]|0;l=i;return h|0}else if((a|0)==6){c[h>>2]=-1;h=c[h>>2]|0;l=i;return h|0}return 0}function Qw(a,d,e,f,g,h,i,j){a=a|0;d=d|0;e=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w(c[(c[(c[(c[f>>2]|0)+20>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0,c[g>>2]|0);c[h>>2]=(c[h>>2]|0)+1}}while(0);Rw(c[(c[f>>2]|0)+12>>2]|0,c[g>>2]|0);c[f>>2]=c[(c[f>>2]|0)+16>>2]}l=i;return}function Sw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;a=c[h>>2]|0;if(!(c[g>>2]|0)){c[e>>2]=a;i=c[e>>2]|0;l=j;return i|0}b=c[g>>2]|0;if(!a){c[e>>2]=b;i=c[e>>2]|0;l=j;return i|0}if((Tw(b)|0)==0?(Tw(c[h>>2]|0)|0)==0:0){c[i>>2]=at(c[f>>2]|0,28,0,0)|0;Uw(c[f>>2]|0,c[i>>2]|0,c[g>>2]|0,c[h>>2]|0);c[e>>2]=c[i>>2];i=c[e>>2]|0;l=j;return i|0}ck(c[f>>2]|0,c[g>>2]|0);ck(c[f>>2]|0,c[h>>2]|0);c[e>>2]=at(c[f>>2]|0,134,4176,0)|0;i=c[e>>2]|0;l=j;return i|0}function Tw(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=0;do if(!(c[(c[d>>2]|0)+4>>2]&1|0))if(Zv(c[d>>2]|0,e)|0){c[b>>2]=(c[e>>2]|0)==0&1;break}else{c[b>>2]=0;break}else c[b>>2]=0;while(0);l=f;return c[b>>2]|0}function Uw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;if(!(c[g>>2]|0)){ck(c[f>>2]|0,c[h>>2]|0);ck(c[f>>2]|0,c[i>>2]|0);l=j;return}if(c[i>>2]|0){c[(c[g>>2]|0)+16>>2]=c[i>>2];f=(c[g>>2]|0)+4|0;c[f>>2]=c[f>>2]|2097408&c[(c[i>>2]|0)+4>>2]}if(c[h>>2]|0){c[(c[g>>2]|0)+12>>2]=c[h>>2];i=(c[g>>2]|0)+4|0;c[i>>2]=c[i>>2]|2097408&c[(c[h>>2]|0)+4>>2]}Vw(c[g>>2]|0);l=j;return}function Vw(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=0;Ww(c[(c[b>>2]|0)+12>>2]|0,d);Ww(c[(c[b>>2]|0)+16>>2]|0,d);a=(c[b>>2]|0)+20|0;if(!(c[(c[b>>2]|0)+4>>2]&2048|0)){if(c[a>>2]|0){Yw(c[(c[b>>2]|0)+20>>2]|0,d);f=2097408&(Zw(c[(c[b>>2]|0)+20>>2]|0)|0);a=(c[b>>2]|0)+4|0;c[a>>2]=c[a>>2]|f}}else Xw(c[a>>2]|0,d);c[(c[b>>2]|0)+24>>2]=(c[d>>2]|0)+1;l=e;return}function Ww(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[d>>2]|0)){l=f;return}if((c[(c[d>>2]|0)+24>>2]|0)<=(c[c[e>>2]>>2]|0)){l=f;return}c[c[e>>2]>>2]=c[(c[d>>2]|0)+24>>2];l=f;return}function Xw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[d>>2]|0)){l=f;return}Ww(c[(c[d>>2]|0)+32>>2]|0,c[e>>2]|0);Ww(c[(c[d>>2]|0)+40>>2]|0,c[e>>2]|0);Ww(c[(c[d>>2]|0)+56>>2]|0,c[e>>2]|0);Ww(c[(c[d>>2]|0)+60>>2]|0,c[e>>2]|0);Yw(c[c[d>>2]>>2]|0,c[e>>2]|0);Yw(c[(c[d>>2]|0)+36>>2]|0,c[e>>2]|0);Yw(c[(c[d>>2]|0)+44>>2]|0,c[e>>2]|0);Xw(c[(c[d>>2]|0)+48>>2]|0,c[e>>2]|0);l=f;return}function Yw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(!(c[d>>2]|0)){l=g;return}c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[c[d>>2]>>2]|0))break;Ww(c[(c[(c[d>>2]|0)+4>>2]|0)+((c[f>>2]|0)*20|0)>>2]|0,c[e>>2]|0);c[f>>2]=(c[f>>2]|0)+1}l=g;return}function Zw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[e>>2]=0;if(!(c[b>>2]|0)){f=c[e>>2]|0;l=g;return f|0}c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[c[b>>2]>>2]|0))break;c[f>>2]=c[(c[(c[b>>2]|0)+4>>2]|0)+((c[d>>2]|0)*20|0)>>2];c[e>>2]=c[e>>2]|c[(c[f>>2]|0)+4>>2];c[d>>2]=(c[d>>2]|0)+1}f=c[e>>2]|0;l=g;return f|0}function _w(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;n=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[n>>2]=a;c[g>>2]=d;c[h>>2]=e;c[i>>2]=f;c[j>>2]=at(c[n>>2]|0,152,0,0)|0;if(!(c[j>>2]|0)){n=c[j>>2]|0;l=m;return n|0}c[k>>2]=(c[g>>2]|0)+8+((c[h>>2]|0)*72|0);c[(c[j>>2]|0)+44>>2]=c[(c[k>>2]|0)+16>>2];c[(c[j>>2]|0)+28>>2]=c[(c[k>>2]|0)+44>>2];if((b[(c[(c[j>>2]|0)+44>>2]|0)+32>>1]|0)==(c[i>>2]|0))b[(c[j>>2]|0)+32>>1]=-1;else{b[(c[j>>2]|0)+32>>1]=c[i>>2];i=HR(1,0,((c[i>>2]|0)>=64?63:c[i>>2]|0)|0)|0;n=(c[k>>2]|0)+56|0;h=n;k=c[h+4>>2]|z;c[n>>2]=c[h>>2]|i;c[n+4>>2]=k}n=(c[j>>2]|0)+4|0;c[n>>2]=c[n>>2]|4;n=c[j>>2]|0;l=m;return n|0}function $w(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;a:do if((c[(c[g>>2]|0)+4>>2]|0)==0?(g=c[(c[g>>2]|0)+8>>2]|0,c[i>>2]=g,g|0):0){c[j>>2]=c[f>>2];b:while(1){if(!(c[j>>2]|0))break a;c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[c[j>>2]>>2]|0))break;if(!(Ig(c[i>>2]|0,c[(c[j>>2]|0)+8+(c[k>>2]<<4)>>2]|0)|0))break b;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=c[(c[j>>2]|0)+4>>2]}c[c[h>>2]>>2]=c[j>>2];c[e>>2]=(c[j>>2]|0)+8+(c[k>>2]<<4);k=c[e>>2]|0;l=m;return k|0}while(0);c[e>>2]=0;k=c[e>>2]|0;l=m;return k|0}function ax(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;k=r+36|0;m=r+32|0;n=r+28|0;o=r+24|0;p=r+20|0;q=r+16|0;g=r+12|0;h=r+8|0;i=r+4|0;j=r;c[m>>2]=a;c[n>>2]=e;c[o>>2]=f;if(!(c[n>>2]|0)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>>2]|0);jx(c[e>>2]|0,c[h>>2]|0);l=j;return}function gx(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;q=r+8|0;p=r;i=r+36|0;j=r+32|0;k=r+28|0;m=r+24|0;n=r+20|0;o=r+16|0;h=r+12|0;c[j>>2]=b;c[k>>2]=e;c[m>>2]=f;c[n>>2]=g;c[h>>2]=c[c[j>>2]>>2];b=(c[h>>2]|0)+148|0;if((c[(c[m>>2]|0)+4>>2]|0)>>>0>0){if(a[b+5>>0]|0){Ck(c[j>>2]|0,27001,p);c[i>>2]=-1;q=c[i>>2]|0;l=r;return q|0}c[c[n>>2]>>2]=c[m>>2];c[o>>2]=ex(c[h>>2]|0,c[k>>2]|0)|0;if((c[o>>2]|0)<0){p=c[j>>2]|0;c[q>>2]=c[k>>2];Ck(p,27018,q);c[i>>2]=-1;q=c[i>>2]|0;l=r;return q|0}}else{c[o>>2]=d[b+4>>0];c[c[n>>2]>>2]=c[k>>2]}c[i>>2]=c[o>>2];q=c[i>>2]|0;l=r;return q|0}function hx(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+96|0;w=x+16|0;v=x;q=x+84|0;r=x+80|0;s=x+76|0;t=x+72|0;u=x+68|0;h=x+64|0;i=x+60|0;j=x+56|0;k=x+52|0;m=x+40|0;n=x+88|0;o=x+36|0;p=x+32|0;c[q>>2]=b;c[r>>2]=d;c[s>>2]=e;c[t>>2]=f;c[u>>2]=g;c[i>>2]=c[c[q>>2]>>2];c[k>>2]=Rt(c[q>>2]|0)|0;if(!(c[k>>2]|0)){l=x;return}c[j>>2]=(c[(c[i>>2]|0)+16>>2]|0)+(c[r>>2]<<4);c[h>>2]=0;while(1){if((c[h>>2]|0)>=3)break;c[o>>2]=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)}_t(c[r>>2]|0,89,1,c[x>>2]|0,c[z>>2]|0,4220,-5)|0;px(c[r>>2]|0,2);Wt(c[r>>2]|0,7,c[p>>2]|0,c[G>>2]|0)|0;vx(c[r>>2]|0,c[x>>2]|0,0,c[C>>2]|0);_t(c[r>>2]|0,99,c[A>>2]|0,3,c[z>>2]|0,27055,0)|0;Wt(c[r>>2]|0,114,c[P>>2]|0,c[w>>2]|0)|0;Xt(c[r>>2]|0,115,c[P>>2]|0,c[z>>2]|0,c[w>>2]|0)|0;px(c[r>>2]|0,8);tx(c[r>>2]|0,c[F>>2]|0)}while(0);c[o>>2]=c[(c[o>>2]|0)+20>>2]}if(b|0){l=R;return}if(!(d[v>>0]|0)){l=R;return}Wt(c[r>>2]|0,100,c[q>>2]|0,c[C>>2]|0)|0;c[t>>2]=kx(c[r>>2]|0,22,c[C>>2]|0)|0;Wt(c[r>>2]|0,79,0,c[B>>2]|0)|0;_t(c[r>>2]|0,99,c[A>>2]|0,3,c[z>>2]|0,27055,0)|0;Wt(c[r>>2]|0,114,c[P>>2]|0,c[w>>2]|0)|0;Xt(c[r>>2]|0,115,c[P>>2]|0,c[z>>2]|0,c[w>>2]|0)|0;px(c[r>>2]|0,8);tx(c[r>>2]|0,c[t>>2]|0);l=R;return}function jx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[d>>2]=b;c[e>>2]=Rt(c[g>>2]|0)|0;if(!(c[e>>2]|0)){l=f;return}kx(c[e>>2]|0,137,c[d>>2]|0)|0;l=f;return}function kx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;d=Xt(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0,0,0)|0;l=e;return d|0}function lx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h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=s;return}else{c[b+112>>2]=0;yd(c[c[m>>2]>>2]|0);l=s;return}}function nx(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;k=q+24|0;m=q+20|0;n=q+16|0;o=q+12|0;p=q+8|0;i=q+4|0;j=q;c[k>>2]=a;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;c[i>>2]=Rt(c[k>>2]|0)|0;mx(c[k>>2]|0,c[n>>2]|0,c[(c[o>>2]|0)+28>>2]|0,((c[p>>2]|0)==105?1:0)&255,c[c[o>>2]>>2]|0);if(!(d[(c[o>>2]|0)+42>>0]&32)){Fx(c[i>>2]|0,c[p>>2]|0,c[m>>2]|0,c[(c[o>>2]|0)+28>>2]|0,c[n>>2]|0,b[(c[o>>2]|0)+34>>1]|0)|0;l=q;return}else{c[j>>2]=Au(c[o>>2]|0)|0;Xt(c[i>>2]|0,c[p>>2]|0,c[m>>2]|0,c[(c[j>>2]|0)+44>>2]|0,c[n>>2]|0)|0;ox(c[k>>2]|0,c[j>>2]|0);l=q;return}}function ox(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;f=d+8|0;e=d+4|0;g=d;c[f>>2]=a;c[e>>2]=b;c[g>>2]=c[(c[f>>2]|0)+8>>2];b=c[g>>2]|0;$t(b,-1,Dx(c[f>>2]|0,c[e>>2]|0)|0,-6);l=d;return}function px(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g;f=g+4|0;c[e>>2]=b;a[f>>0]=d;if((c[(c[e>>2]|0)+136>>2]|0)<=0){l=g;return}a[(c[(c[e>>2]|0)+88>>2]|0)+(((c[(c[e>>2]|0)+136>>2]|0)-1|0)*20|0)+3>>0]=a[f>>0]|0;l=g;return}function qx(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;f=e+8|0;b=e+4|0;d=e;c[f>>2]=a;c[b>>2]=c[(c[f>>2]|0)+12>>2];f=(c[b>>2]|0)+72|0;a=c[f>>2]|0;c[f>>2]=a+1;c[d>>2]=a;if(!(c[d>>2]&(c[d>>2]|0)-1)){f=Qh(c[c[b>>2]>>2]|0,c[(c[b>>2]|0)+76>>2]|0,(c[d>>2]<<1)+1<<2,0)|0;c[(c[b>>2]|0)+76>>2]=f}if(!(c[(c[b>>2]|0)+76>>2]|0)){f=c[d>>2]|0;f=-1-f|0;l=e;return f|0}c[(c[(c[b>>2]|0)+76>>2]|0)+(c[d>>2]<<2)>>2]=-1;f=c[d>>2]|0;f=-1-f|0;l=e;return f|0}function rx(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+32|0;f=j+12|0;g=j+8|0;m=j+4|0;h=j+17|0;k=j+16|0;i=j;c[f>>2]=b;c[g>>2]=e;c[m>>2]=c[c[f>>2]>>2];a[h>>0]=a[(c[m>>2]|0)+66>>0]|0;a[k>>0]=a[(c[m>>2]|0)+148+5>>0]|0;c[i>>2]=zv(c[m>>2]|0,a[h>>0]|0,c[g>>2]|0,d[k>>0]|0)|0;if(a[k>>0]|0){m=c[i>>2]|0;l=j;return m|0}if(c[i>>2]|0?c[(c[i>>2]|0)+12>>2]|0:0){m=c[i>>2]|0;l=j;return m|0}c[i>>2]=yv(c[f>>2]|0,a[h>>0]|0,c[i>>2]|0,c[g>>2]|0)|0;m=c[i>>2]|0;l=j;return m|0}function sx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=Xt(c[f>>2]|0,13,0,c[e>>2]|0,0)|0;l=d;return b|0}function tx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;zx(c[e>>2]|0,c[f>>2]|0,c[(c[e>>2]|0)+136>>2]|0);l=d;return}function ux(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+12|0;h=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[h>>2]=b;c[e>>2]=c[(c[d>>2]|0)+12>>2];c[f>>2]=-1-(c[h>>2]|0);if(!(c[(c[e>>2]|0)+76>>2]|0)){l=g;return}c[(c[(c[e>>2]|0)+76>>2]|0)+(c[f>>2]<<2)>>2]=c[(c[d>>2]|0)+136>>2];l=g;return}function vx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=l;l=l+16|0;g=f+12|0;i=f+8|0;h=f;c[g>>2]=a;c[i>>2]=b;c[f+4>>2]=d;c[h>>2]=e;_t(c[g>>2]|0,89,0,c[i>>2]|0,c[h>>2]|0,4248,-5)|0;px(c[g>>2]|0,1);l=f;return}function wx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+64|0;n=o+24|0;m=o+16|0;g=o+56|0;p=o+48|0;h=o+44|0;i=o+40|0;j=o+36|0;k=o+32|0;e=o+8|0;f=o;c[g>>2]=a;c[o+52>>2]=b;c[p>>2]=d;c[h>>2]=wi(c[c[p>>2]>>2]|0)|0;d=((c[(c[h>>2]|0)+12>>2]|0)+1|0)*25|0;c[k>>2]=Cg(d,((d|0)<0)<<31>>31)|0;if(!(c[k>>2]|0)){bi(c[g>>2]|0);l=o;return}p=c[k>>2]|0;d=m;c[d>>2]=c[c[h>>2]>>2];c[d+4>>2]=0;Ne(24,p,27068,m)|0;p=c[k>>2]|0;c[i>>2]=p+(_c(c[k>>2]|0)|0);c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[(c[h>>2]|0)+12>>2]|0))break;p=e;c[p>>2]=(c[(c[(c[h>>2]|0)+20+4>>2]|0)+(c[j>>2]<<2)>>2]|0)+1;c[p+4>>2]=0;p=e;p=IR(c[c[h>>2]>>2]|0,0,c[p>>2]|0,c[p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i>>2]=g;l=h;return}function yx(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return}function zx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;g=e+8|0;f=e+4|0;h=e;c[g>>2]=a;c[f>>2]=b;c[h>>2]=d;d=c[h>>2]|0;c[(Ax(c[g>>2]|0,c[f>>2]|0)|0)+8>>2]=d;l=e;return}function Ax(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=d;if((c[g>>2]|0)<0)c[g>>2]=(c[(c[f>>2]|0)+136>>2]|0)-1;if(a[(c[c[f>>2]>>2]|0)+69>>0]|0){c[e>>2]=47036;g=c[e>>2]|0;l=h;return g|0}else{c[e>>2]=(c[(c[f>>2]|0)+88>>2]|0)+((c[g>>2]|0)*20|0);g=c[e>>2]|0;l=h;return g|0}return 0}function Bx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+48|0;f=k+32|0;n=k+24|0;g=k+20|0;h=k+16|0;i=k+12|0;j=k+8|0;m=k+4|0;e=k;c[f>>2]=a;c[k+28>>2]=b;c[n>>2]=d;c[h>>2]=vi(c[c[n>>2]>>2]|0)|0;c[j>>2]=(c[h>>2]|0)+1&-2;c[i>>2]=vi(c[(c[n>>2]|0)+4>>2]|0)|0;c[m>>2]=56+(c[j>>2]<<2)+(c[j>>2]<<2);c[e>>2]=uh(c[f>>2]|0)|0;d=c[m>>2]|0;c[g>>2]=jl(c[e>>2]|0,d,((d|0)<0)<<31>>31)|0;if(!(c[g>>2]|0)){bi(c[f>>2]|0);l=k;return}else{c[(c[g>>2]|0)+52>>2]=c[e>>2];c[c[g>>2]>>2]=0;c[(c[g>>2]|0)+8>>2]=c[h>>2];c[(c[g>>2]|0)+12>>2]=c[i>>2];c[(c[g>>2]|0)+20+4>>2]=(c[g>>2]|0)+56;c[(c[g>>2]|0)+20>>2]=(c[(c[g>>2]|0)+20+4>>2]|0)+(c[j>>2]<<2);Ti(c[f>>2]|0,c[g>>2]|0,56,150);l=k;return}}function Cx(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];Hd(c[(c[d>>2]|0)+52>>2]|0,c[d>>2]|0);l=b;return}function Dx(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;h=p+28|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;g=p+8|0;n=p+4|0;o=p;c[i>>2]=b;c[j>>2]=f;c[m>>2]=e[(c[j>>2]|0)+52>>1];c[g>>2]=e[(c[j>>2]|0)+50>>1];if(c[(c[i>>2]|0)+36>>2]|0){c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}b=c[c[i>>2]>>2]|0;if((d[(c[j>>2]|0)+55>>0]|0)>>>3&1|0)c[n>>2]=Ex(b,c[g>>2]|0,(c[m>>2]|0)-(c[g>>2]|0)|0)|0;else c[n>>2]=Ex(b,c[m>>2]|0,0)|0;if(c[n>>2]|0){c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[m>>2]|0))break;c[o>>2]=c[(c[(c[j>>2]|0)+32>>2]|0)+(c[k>>2]<<2)>>2];if((c[o>>2]|0)==31345)b=0;else b=rx(c[i>>2]|0,c[o>>2]|0)|0;c[(c[n>>2]|0)+20+(c[k>>2]<<2)>>2]=b;a[(c[(c[n>>2]|0)+16>>2]|0)+(c[k>>2]|0)>>0]=a[(c[(c[j>>2]|0)+28>>2]|0)+(c[k>>2]|0)>>0]|0;c[k>>2]=(c[k>>2]|0)+1}if(c[(c[i>>2]|0)+36>>2]|0){Pj(c[n>>2]|0);c[n>>2]=0}}c[h>>2]=c[n>>2];o=c[h>>2]|0;l=p;return o|0}function Ex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+60>>2]=c[o>>2];Qx(c[w>>2]|0);Rx(c[w>>2]|0,c[(c[x>>2]|0)+36>>2]|0,c[c[n>>2]>>2]|0,16);break}else{c[c[n>>2]>>2]=0;break}while(0);if(c[m>>2]|0?(d[(c[x>>2]|0)+55>>0]|0)>>>3&1|0:0)a=b[(c[x>>2]|0)+50>>1]|0;else a=b[(c[x>>2]|0)+52>>1]|0;c[v>>2]=a&65535;c[u>>2]=Sx(c[w>>2]|0,c[v>>2]|0)|0;do if(c[q>>2]|0){if((c[u>>2]|0)==(c[r>>2]|0)?(c[(c[q>>2]|0)+36>>2]|0)==0:0)break;c[q>>2]=0}while(0);c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[v>>2]|0))break;if(!((c[q>>2]|0?(b[(c[(c[q>>2]|0)+4>>2]|0)+(c[t>>2]<<1)>>1]|0)==(b[(c[(c[x>>2]|0)+4>>2]|0)+(c[t>>2]<<1)>>1]|0):0)?(b[(c[(c[q>>2]|0)+4>>2]|0)+(c[t>>2]<<1)>>1]|0)!=-2:0)){Tx(c[w>>2]|0,c[x>>2]|0,c[o>>2]|0,c[t>>2]|0,(c[u>>2]|0)+(c[t>>2]|0)|0);Ux(c[s>>2]|0,92)|0}c[t>>2]=(c[t>>2]|0)+1}if(!(c[p>>2]|0)){t=c[w>>2]|0;w=c[u>>2]|0;x=c[v>>2]|0;Vx(t,w,x);x=c[u>>2]|0;l=y;return x|0}Xt(c[s>>2]|0,99,c[u>>2]|0,c[v>>2]|0,c[p>>2]|0)|0;t=c[w>>2]|0;w=c[u>>2]|0;x=c[v>>2]|0;Vx(t,w,x);x=c[u>>2]|0;l=y;return x|0}function Lx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=f;return}ux(c[(c[d>>2]|0)+8>>2]|0,c[e>>2]|0);Ox(c[d>>2]|0);l=f;return}function Mx(d,f,g){d=d|0;f=f|0;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(c[m>>2]|0)|0;if((c[o>>2]|0)==2)mv(c[m>>2]|0);_t(c[k>>2]|0,75,c[n>>2]|0,c[o>>2]|0,0,c[p>>2]|0,a[i>>0]|0)|0;px(c[k>>2]|0,a[j>>0]|0);l=q;return}function Ox(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;c[e>>2]=0;a=(c[b>>2]|0)+64|0;c[a>>2]=(c[a>>2]|0)+-1;while(1){if((c[e>>2]|0)>=(d[(c[b>>2]|0)+25>>0]|0|0))break;if((c[(c[b>>2]|0)+152+((c[e>>2]|0)*20|0)+8>>2]|0)>(c[(c[b>>2]|0)+64>>2]|0)){Px(c[b>>2]|0,c[e>>2]|0);continue}else{c[e>>2]=(c[e>>2]|0)+1;continue}}l=f;return}function Px(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=e;if(a[(c[f>>2]|0)+152+((c[g>>2]|0)*20|0)+6>>0]|0?(d[(c[f>>2]|0)+19>>0]|0)<8:0){i=c[(c[f>>2]|0)+152+((c[g>>2]|0)*20|0)+12>>2]|0;b=(c[f>>2]|0)+352|0;j=(c[f>>2]|0)+19|0;e=a[j>>0]|0;a[j>>0]=e+1<<24>>24;c[b+((e&255)<<2)>>2]=i}j=(c[f>>2]|0)+25|0;a[j>>0]=(a[j>>0]|0)+-1<<24>>24;if((c[g>>2]|0)>=(d[(c[f>>2]|0)+25>>0]|0)){l=h;return}j=(c[f>>2]|0)+152+((c[g>>2]|0)*20|0)|0;i=(c[f>>2]|0)+152+((d[(c[f>>2]|0)+25>>0]|0)*20|0)|0;c[j>>2]=c[i>>2];c[j+4>>2]=c[i+4>>2];c[j+8>>2]=c[i+8>>2];c[j+12>>2]=c[i+12>>2];c[j+16>>2]=c[i+16>>2];l=h;return}function Qx(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[d>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>>2]=e;c[m>>2]=f;c[n>>2]=g;b[h>>1]=b[(c[(c[j>>2]|0)+4>>2]|0)+(c[m>>2]<<1)>>1]|0;if((b[h>>1]|0)==-2){c[(c[i>>2]|0)+60>>2]=c[k>>2];Yx(c[i>>2]|0,c[(c[(c[(c[j>>2]|0)+40>>2]|0)+4>>2]|0)+((c[m>>2]|0)*20|0)>>2]|0,c[n>>2]|0);l=o;return}else{Zx(c[(c[i>>2]|0)+8>>2]|0,c[(c[j>>2]|0)+12>>2]|0,c[k>>2]|0,b[h>>1]|0,c[n>>2]|0);l=o;return}}function Ux(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;h=l;l=l+16|0;f=h+4|0;g=h;i=h+8|0;c[g>>2]=b;a[i>>0]=e;if((c[(c[g>>2]|0)+136>>2]|0)>0?(d[(c[(c[g>>2]|0)+88>>2]|0)+(((c[(c[g>>2]|0)+136>>2]|0)-1|0)*20|0)>>0]|0|0)==(d[i>>0]|0|0):0){c[f>>2]=Xx(c[g>>2]|0,(c[(c[g>>2]|0)+136>>2]|0)-1|0)|0;i=c[f>>2]|0;l=h;return i|0}c[f>>2]=0;i=c[f>>2]|0;l=h;return i|0}function Vx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;a=c[e>>2]|0;b=c[f>>2]|0;if((c[g>>2]|0)==1){Wu(a,b);l=h;return}Wx(a,b,c[g>>2]|0);if((c[g>>2]|0)<=(c[(c[e>>2]|0)+28>>2]|0)){l=h;return}c[(c[e>>2]|0)+28>>2]=c[g>>2];c[(c[e>>2]|0)+32>>2]=c[f>>2];l=h;return}function Wx(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=e;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(d[(c[f>>2]|0)+25>>0]|0|0))break;c[j>>2]=(c[f>>2]|0)+152+((c[i>>2]|0)*20|0);if((c[(c[j>>2]|0)+12>>2]|0)>=(c[g>>2]|0)?(c[(c[j>>2]|0)+12>>2]|0)<((c[g>>2]|0)+(c[h>>2]|0)|0):0){Px(c[f>>2]|0,c[i>>2]|0);continue}c[i>>2]=(c[i>>2]|0)+1}l=k;return}function Xx(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=d;if(a[(c[c[f>>2]>>2]|0)+69>>0]|0){c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}else{c[h>>2]=(c[(c[f>>2]|0)+88>>2]|0)+((c[g>>2]|0)*20|0);Nj(c[c[f>>2]>>2]|0,a[(c[h>>2]|0)+1>>0]|0,c[(c[h>>2]|0)+16>>2]|0);a[(c[h>>2]|0)+1>>0]=0;c[(c[h>>2]|0)+16>>2]=0;a[c[h>>2]>>0]=-95;c[e>>2]=1;h=c[e>>2]|0;l=i;return h|0}return 0}function Yx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;c[i>>2]=c[c[f>>2]>>2];c[g>>2]=aw(c[i>>2]|0,c[g>>2]|0,0)|0;if(a[(c[i>>2]|0)+69>>0]|0){h=c[i>>2]|0;i=c[g>>2]|0;ck(h,i);l=j;return}ay(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);h=c[i>>2]|0;i=c[g>>2]|0;ck(h,i);l=j;return}function Zx(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;k=q+24|0;m=q+20|0;n=q+16|0;o=q+12|0;p=q+8|0;i=q+4|0;j=q;c[k>>2]=a;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[o>>2]|0)>=0?(c[o>>2]|0)!=(b[(c[m>>2]|0)+32>>1]|0):0){c[i>>2]=d[(c[m>>2]|0)+42>>0]&16|0?156:96;c[j>>2]=c[o>>2];if(d[(c[m>>2]|0)+42>>0]&32|0?(d[(c[m>>2]|0)+42>>0]&16|0)==0:0){h=Au(c[m>>2]|0)|0;c[j>>2]=(_x(h,c[o>>2]&65535)|0)<<16>>16}Xt(c[k>>2]|0,c[i>>2]|0,c[n>>2]|0,c[j>>2]|0,c[p>>2]|0)|0}else Wt(c[k>>2]|0,123,c[n>>2]|0,c[p>>2]|0)|0;if((c[o>>2]|0)<0){l=q;return}$x(c[k>>2]|0,c[m>>2]|0,c[o>>2]|0,c[p>>2]|0);l=q;return}function _x(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j+10|0;f=j+4|0;g=j+8|0;h=j;c[f>>2]=a;b[g>>1]=d;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(e[(c[f>>2]|0)+52>>1]|0)){a=6;break}d=c[h>>2]|0;if((b[g>>1]|0)==(b[(c[(c[f>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]|0)){a=4;break}c[h>>2]=d+1}if((a|0)==4){b[i>>1]=d;i=b[i>>1]|0;l=j;return i|0}else if((a|0)==6){b[i>>1]=-1;i=b[i>>1]|0;l=j;return i|0}return 0}function $x(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o+24|0;g=o;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;if(c[(c[i>>2]|0)+12>>2]|0){l=o;return}c[m>>2]=0;a[n>>0]=a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|0;F=ja+284|0;ea=ja+280|0;ba=ja+276|0;ca=ja+272|0;P=ja+268|0;A=ja+264|0;Q=ja+216|0;B=ja+208|0;i=ja+204|0;j=ja+200|0;k=ja+196|0;m=ja+192|0;n=ja+188|0;o=ja+184|0;C=ja+180|0;p=ja+176|0;q=ja+172|0;r=ja+168|0;R=ja+164|0;S=ja+160|0;H=ja+156|0;D=ja+152|0;I=ja+148|0;J=ja+144|0;K=ja+140|0;E=ja+309|0;L=ja+136|0;M=ja+132|0;N=ja+308|0;s=ja+128|0;t=ja+124|0;u=ja+120|0;v=ja+116|0;w=ja+112|0;U=ja+108|0;V=ja+104|0;W=ja+100|0;X=ja+96|0;Y=ja+92|0;Z=ja+88|0;_=ja+40|0;$=ja+32|0;aa=ja+28|0;c[ha>>2]=f;c[T>>2]=g;c[ia>>2]=h;c[da>>2]=c[(c[ha>>2]|0)+8>>2];c[ea>>2]=c[ia>>2];c[ba>>2]=0;c[ca>>2]=0;c[B>>2]=0;if(!(c[da>>2]|0)){c[ga>>2]=0;ia=c[ga>>2]|0;l=ja;return ia|0}if(!(c[T>>2]|0))c[F>>2]=101;else c[F>>2]=d[c[T>>2]>>0];a:do switch(c[F>>2]|0){case 154:{c[i>>2]=c[(c[T>>2]|0)+40>>2];c[j>>2]=(c[(c[i>>2]|0)+28>>2]|0)+((b[(c[T>>2]|0)+34>>1]|0)*24|0);if(!(a[c[i>>2]>>0]|0)){c[ga>>2]=c[(c[j>>2]|0)+16>>2];ia=c[ga>>2]|0;l=ja;return ia|0}if(a[(c[i>>2]|0)+1>>0]|0){Xt(c[da>>2]|0,96,c[(c[i>>2]|0)+8>>2]|0,c[(c[j>>2]|0)+12>>2]|0,c[ia>>2]|0)|0;c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return ia|0}else fa=11;break}case 152:{fa=11;break}case 134:{dy(c[ha>>2]|0,c[T>>2]|0,0,c[ia>>2]|0);c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return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c[ea>>2];ia=c[ga>>2]|0;l=ja;return ia|0}case 148:case 29:{c[F>>2]=(c[F>>2]|0)==29?37:36;c[B>>2]=128;fa=29;break}case 37:case 36:case 41:case 38:case 39:case 40:{fa=29;break}case 52:case 46:case 45:case 50:case 44:case 43:case 51:case 48:case 49:case 47:case 27:case 28:{c[P>>2]=iy(c[ha>>2]|0,c[(c[T>>2]|0)+12>>2]|0,ba)|0;c[A>>2]=iy(c[ha>>2]|0,c[(c[T>>2]|0)+16>>2]|0,ca)|0;Xt(c[da>>2]|0,c[F>>2]|0,c[A>>2]|0,c[P>>2]|0,c[ia>>2]|0)|0;break}case 155:{c[p>>2]=c[(c[T>>2]|0)+12>>2];if((d[c[p>>2]>>0]|0)==134){dy(c[ha>>2]|0,c[p>>2]|0,1,c[ia>>2]|0);c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return ia|0}if((d[c[p>>2]>>0]|0)!=132){a[Q>>0]=-122;c[Q+4>>2]=17408;c[Q+8>>2]=0;c[P>>2]=iy(c[ha>>2]|0,Q,ba)|0;c[A>>2]=iy(c[ha>>2]|0,c[(c[T>>2]|0)+12>>2]|0,ca)|0;Xt(c[da>>2]|0,48,c[A>>2]|0,c[P>>2]|0,c[ia>>2]|0)|0;break a}ey(c[da>>2]|0,c[(c[p>>2]|0)+8>>2]|0,1,c[ia>>2]|0);c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return ia|0}case 19:case 54:{c[P>>2]=iy(c[ha>>2]|0,c[(c[T>>2]|0)+12>>2]|0,ba)|0;Wt(c[da>>2]|0,c[F>>2]|0,c[P>>2]|0,c[ea>>2]|0)|0;break}case 35:case 34:{Wt(c[da>>2]|0,76,1,c[ia>>2]|0)|0;c[P>>2]=iy(c[ha>>2]|0,c[(c[T>>2]|0)+12>>2]|0,ba)|0;c[q>>2]=kx(c[da>>2]|0,c[F>>2]|0,c[P>>2]|0)|0;Wt(c[da>>2]|0,76,0,c[ia>>2]|0)|0;tx(c[da>>2]|0,c[q>>2]|0);break}case 153:{c[r>>2]=c[(c[T>>2]|0)+40>>2];if(!(c[r>>2]|0)){ia=c[ha>>2]|0;c[x>>2]=c[(c[T>>2]|0)+8>>2];Ck(ia,27251,x);break a}c[ga>>2]=c[(c[(c[r>>2]|0)+40>>2]|0)+(b[(c[T>>2]|0)+34>>1]<<4)+8>>2];ia=c[ga>>2]|0;l=ja;return ia|0}case 151:{c[I>>2]=0;c[K>>2]=c[c[ha>>2]>>2];a[E>>0]=a[(c[K>>2]|0)+66>>0]|0;c[L>>2]=0;if(c[(c[T>>2]|0)+4>>2]&16384|0)c[R>>2]=0;else c[R>>2]=c[(c[T>>2]|0)+20>>2];if(c[R>>2]|0)f=c[c[R>>2]>>2]|0;else f=0;c[S>>2]=f;c[D>>2]=c[(c[T>>2]|0)+8>>2];c[H>>2]=uw(c[K>>2]|0,c[D>>2]|0,c[S>>2]|0,a[E>>0]|0,0)|0;if(c[H>>2]|0?(c[(c[H>>2]|0)+16>>2]|0)==0:0){if(e[(c[H>>2]|0)+2>>1]&512|0){c[M>>2]=qx(c[da>>2]|0)|0;ay(c[ha>>2]|0,c[c[(c[R>>2]|0)+4>>2]>>2]|0,c[ia>>2]|0);c[J>>2]=1;while(1){f=c[da>>2]|0;if((c[J>>2]|0)>=(c[S>>2]|0))break;Wt(f,35,c[ia>>2]|0,c[M>>2]|0)|0;Wx(c[ha>>2]|0,c[ia>>2]|0,1);Qx(c[ha>>2]|0);ay(c[ha>>2]|0,c[(c[(c[R>>2]|0)+4>>2]|0)+((c[J>>2]|0)*20|0)>>2]|0,c[ia>>2]|0);Ox(c[ha>>2]|0);c[J>>2]=(c[J>>2]|0)+1}ux(f,c[M>>2]|0);break a}if(e[(c[H>>2]|0)+2>>1]&1024|0){c[ga>>2]=by(c[ha>>2]|0,c[c[(c[R>>2]|0)+4>>2]>>2]|0,c[ia>>2]|0)|0;ia=c[ga>>2]|0;l=ja;return ia|0}c[J>>2]=0;while(1){if((c[J>>2]|0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,-5)|0;px(c[da>>2]|0,c[S>>2]&255);if((c[S>>2]|0)!=0&(c[I>>2]|0)==0)Vx(c[ha>>2]|0,c[P>>2]|0,c[S>>2]|0);c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return ia|0}ia=c[ha>>2]|0;c[G>>2]=c[D>>2];Ck(ia,27277,G);break}case 119:case 20:{if((c[F>>2]|0)==119?(ia=c[c[c[(c[T>>2]|0)+20>>2]>>2]>>2]|0,c[s>>2]=ia,(ia|0)!=1):0){ny(c[ha>>2]|0,c[s>>2]|0,1);break a}c[ga>>2]=oy(c[ha>>2]|0,c[T>>2]|0,0,0)|0;ia=c[ga>>2]|0;l=ja;return ia|0}case 159:{if(!(c[(c[(c[T>>2]|0)+12>>2]|0)+28>>2]|0)){ia=oy(c[ha>>2]|0,c[(c[T>>2]|0)+12>>2]|0,0,0)|0;c[(c[(c[T>>2]|0)+12>>2]|0)+28>>2]=ia}c[ga>>2]=(c[(c[(c[T>>2]|0)+12>>2]|0)+28>>2]|0)+(b[(c[T>>2]|0)+32>>1]|0);ia=c[ga>>2]|0;l=ja;return ia|0}case 33:{c[t>>2]=qx(c[da>>2]|0)|0;c[u>>2]=qx(c[da>>2]|0)|0;Wt(c[da>>2]|0,79,0,c[ia>>2]|0)|0;py(c[ha>>2]|0,c[T>>2]|0,c[t>>2]|0,c[u>>2]|0);Wt(c[da>>2]|0,76,1,c[ia>>2]|0)|0;ux(c[da>>2]|0,c[t>>2]|0);Wt(c[da>>2]|0,91,c[ia>>2]|0,0)|0;ux(c[da>>2]|0,c[u>>2]|0);c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return ia|0}case 32:{qy(c[ha>>2]|0,c[T>>2]|0,c[ia>>2]|0,0,0);c[ga>>2]=c[ia>>2];ia=c[ga>>2]|0;l=ja;return ia|0}case 156:case 53:case 161:{c[ga>>2]=by(c[ha>>2]|0,c[(c[T>>2]|0)+12>>2]|0,c[ia>>2]|0)|0;ia=c[ga>>2]|0;l=ja;return ia|0}case 88:{c[v>>2]=c[(c[T>>2]|0)+44>>2];c[w>>2]=(O(c[(c[T>>2]|0)+28>>2]|0,(b[(c[v>>2]|0)+34>>1]|0)+1|0)|0)+1+(b[(c[T>>2]|0)+32>>1]|0);Wt(c[da>>2]|0,143,c[w>>2]|0,c[ia>>2]|0)|0;if((b[(c[T>>2]|0)+32>>1]|0)>=0?(a[(c[(c[v>>2]|0)+4>>2]|0)+(b[(c[T>>2]|0)+32>>1]<<4)+13>>0]|0)==69:0)kx(c[da>>2]|0,92,c[ia>>2]|0)|0;break}case 158:{Ck(c[ha>>2]|0,26144,y);break}case 83:{if(!(c[(c[ha>>2]|0)+128>>2]|0)){Ck(c[ha>>2]|0,27300,z);c[ga>>2]=0;ia=c[ga>>2]|0;l=ja;return ia|0}if((a[(c[T>>2]|0)+1>>0]|0)==2)mv(c[ha>>2]|0);if((a[(c[T>>2]|0)+1>>0]|0)==4){_t(c[da>>2]|0,75,0,4,0,c[(c[T>>2]|0)+8>>2]|0,0)|0;break a}else{Nx(c[ha>>2]|0,1811,a[(c[T>>2]|0)+1>>0]|0,c[(c[T>>2]|0)+8>>2]|0,0,0);break a}}default:{c[aa>>2]=0;c[Y>>2]=c[(c[T>>2]|0)+20>>2];c[Z>>2]=c[(c[Y>>2]|0)+4>>2];c[W>>2]=c[c[Y>>2]>>2];c[U>>2]=qx(c[da>>2]|0)|0;T=c[(c[T>>2]|0)+12>>2]|0;c[$>>2]=T;if(T|0){f=Q;g=c[$>>2]|0;i=f+48|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(i|0));sy(Q,ry(c[ha>>2]|0,Q,ba)|0);f=_;i=f+48|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(i|0));a[_>>0]=37;c[_+12>>2]=Q;c[aa>>2]=_;c[ba>>2]=0}c[X>>2]=0;while(1){if((c[X>>2]|0)>=((c[W>>2]|0)-1|0))break;Qx(c[ha>>2]|0);f=c[(c[Z>>2]|0)+((c[X>>2]|0)*20|0)>>2]|0;if(c[$>>2]|0)c[_+16>>2]=f;else c[aa>>2]=f;c[V>>2]=qx(c[da>>2]|0)|0;ty(c[ha>>2]|0,c[aa>>2]|0,c[V>>2]|0,16);ay(c[ha>>2]|0,c[(c[Z>>2]|0)+(((c[X>>2]|0)+1|0)*20|0)>>2]|0,c[ia>>2]|0);sx(c[da>>2]|0,c[U>>2]|0)|0;Ox(c[ha>>2]|0);ux(c[da>>2]|0,c[V>>2]|0);c[X>>2]=(c[X>>2]|0)+2}if(c[W>>2]&1|0){Qx(c[ha>>2]|0);ay(c[ha>>2]|0,c[(c[(c[Y>>2]|0)+4>>2]|0)+(((c[W>>2]|0)-1|0)*20|0)>>2]|0,c[ia>>2]|0);Ox(c[ha>>2]|0)}else Wt(c[da>>2]|0,79,0,c[ia>>2]|0)|0;ux(c[da>>2]|0,c[U>>2]|0)}}while(0);do if((fa|0)==11){c[k>>2]=c[(c[T>>2]|0)+28>>2];do if((c[k>>2]|0)<0){if((c[(c[ha>>2]|0)+56>>2]|0)<=0){c[k>>2]=c[(c[ha>>2]|0)+60>>2];break}c[ga>>2]=(b[(c[T>>2]|0)+32>>1]|0)+(c[(c[ha>>2]|0)+56>>2]|0);ia=c[ga>>2]|0;l=ja;return ia|0}while(0);c[ga>>2]=cy(c[ha>>2]|0,c[(c[T>>2]|0)+44>>2]|0,b[(c[T>>2]|0)+32>>1]|0,c[k>>2]|0,c[ia>>2]|0,a[(c[T>>2]|0)+38>>0]|0)|0;ia=c[ga>>2]|0;l=ja;return ia|0}else if((fa|0)==29){c[C>>2]=c[(c[T>>2]|0)+12>>2];fa=(gy(c[C>>2]|0)|0)!=0;f=c[ha>>2]|0;if(fa){hy(f,c[T>>2]|0,c[ia>>2]|0,c[F>>2]&255,c[B>>2]&255);break}else{c[P>>2]=iy(f,c[C>>2]|0,ba)|0;c[A>>2]=iy(c[ha>>2]|0,c[(c[T>>2]|0)+16>>2]|0,ca)|0;jy(c[ha>>2]|0,c[C>>2]|0,c[(c[T>>2]|0)+16>>2]|0,c[F>>2]|0,c[P>>2]|0,c[A>>2]|0,c[ea>>2]|0,32|c[B>>2])|0;break}}while(0);Wu(c[ha>>2]|0,c[ba>>2]|0);Wu(c[ha>>2]|0,c[ca>>2]|0);c[ga>>2]=c[ea>>2];ia=c[ga>>2]|0;l=ja;return ia|0}function cy(e,f,g,h,i,j){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+48|0;r=w+32|0;s=w+28|0;t=w+24|0;u=w+20|0;k=w+16|0;m=w+12|0;n=w+36|0;o=w+8|0;p=w+4|0;q=w;c[s>>2]=e;c[t>>2]=f;c[u>>2]=g;c[k>>2]=h;c[m>>2]=i;a[n>>0]=j;c[o>>2]=c[(c[s>>2]|0)+8>>2];c[p>>2]=0;c[q>>2]=(c[s>>2]|0)+152;while(1){if((c[p>>2]|0)>=(d[(c[s>>2]|0)+25>>0]|0))break;if((c[c[q>>2]>>2]|0)==(c[k>>2]|0)?(b[(c[q>>2]|0)+4>>1]|0)==(c[u>>2]|0):0){v=5;break}c[p>>2]=(c[p>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+20}if((v|0)==5){u=(c[s>>2]|0)+68|0;v=c[u>>2]|0;c[u>>2]=v+1;c[(c[q>>2]|0)+16>>2]=v;Ry(c[s>>2]|0,c[(c[q>>2]|0)+12>>2]|0);c[r>>2]=c[(c[q>>2]|0)+12>>2];v=c[r>>2]|0;l=w;return v|0}Zx(c[o>>2]|0,c[t>>2]|0,c[k>>2]|0,c[u>>2]|0,c[m>>2]|0);if(a[n>>0]|0)px(c[o>>2]|0,a[n>>0]|0);else Sy(c[s>>2]|0,c[k>>2]|0,c[u>>2]|0,c[m>>2]|0);c[r>>2]=c[m>>2];v=c[r>>2]|0;l=w;return v|0}function dy(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;o=p+8|0;i=p+40|0;q=p+36|0;j=p+32|0;k=p+28|0;m=p+24|0;n=p+20|0;f=p+16|0;g=p;h=p+12|0;c[i>>2]=a;c[q>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=c[(c[i>>2]|0)+8>>2];a=(c[q>>2]|0)+8|0;if(c[(c[q>>2]|0)+4>>2]&1024|0){c[n>>2]=c[a>>2];if(c[j>>2]|0)c[n>>2]=0-(c[n>>2]|0);Wt(c[m>>2]|0,76,c[n>>2]|0,c[k>>2]|0)|0;l=p;return}c[h>>2]=c[a>>2];c[f>>2]=Qy(c[h>>2]|0,g)|0;if(c[f>>2]|0?!((c[f>>2]|0)==2&(c[j>>2]|0)!=0):0)if(!(Zc(c[h>>2]|0,27474,2)|0)){q=c[i>>2]|0;c[o>>2]=c[h>>2];Ck(q,27477,o);l=p;return}else{ey(c[m>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);l=p;return}if(c[j>>2]|0){o=(c[f>>2]|0)==2;n=g;n=FR(0,0,c[n>>2]|0,c[n+4>>2]|0)|0;q=g;c[q>>2]=o?0:n;c[q+4>>2]=o?-2147483648:z}Py(c[m>>2]|0,77,0,c[k>>2]|0,0,g,-13)|0;l=p;return}function ey(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;i=m+12|0;j=m+8|0;k=m;c[f>>2]=a;c[g>>2]=b;c[i>>2]=d;c[j>>2]=e;if(!(c[g>>2]|0)){l=m;return}e=c[g>>2]|0;oi(e,k,_c(c[g>>2]|0)|0,1)|0;if(c[i>>2]|0)h[k>>3]=-+h[k>>3];Py(c[f>>2]|0,132,0,c[j>>2]|0,0,k,-12)|0;l=m;return}function fy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=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2];p=c[h>>2]|0;l=q;return p|0}while(0);n=(c[i>>2]|0)+44|0;o=(c[n>>2]|0)+1|0;c[n>>2]=o;c[m>>2]=o;Hy(c[i>>2]|0,c[j>>2]|0,c[m>>2]|0,1)}else p=12;do if((p|0)==12){c[g>>2]=Uu(c[i>>2]|0)|0;c[m>>2]=by(c[i>>2]|0,c[j>>2]|0,c[g>>2]|0)|0;if((c[m>>2]|0)==(c[g>>2]|0)){c[c[k>>2]>>2]=c[g>>2];break}else{Wu(c[i>>2]|0,c[g>>2]|0);c[c[k>>2]>>2]=0;break}}while(0);c[h>>2]=c[m>>2];p=c[h>>2]|0;l=q;return p|0}function jy(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;k=l;l=l+48|0;n=k+40|0;v=k+36|0;u=k+32|0;s=k+28|0;p=k+24|0;r=k+20|0;q=k+16|0;t=k+12|0;m=k+8|0;j=k+4|0;o=k;c[n>>2]=a;c[v>>2]=b;c[u>>2]=d;c[s>>2]=e;c[p>>2]=f;c[r>>2]=g;c[q>>2]=h;c[t>>2]=i;c[o>>2]=Dy(c[n>>2]|0,c[v>>2]|0,c[u>>2]|0)|0;c[m>>2]=(Ly(c[v>>2]|0,c[u>>2]|0,c[t>>2]|0)|0)&255;c[j>>2]=_t(c[(c[n>>2]|0)+8>>2]|0,c[s>>2]|0,c[r>>2]|0,c[q>>2]|0,c[p>>2]|0,c[o>>2]|0,-4)|0;px(c[(c[n>>2]|0)+8>>2]|0,c[m>>2]&255);l=k;return c[j>>2]|0}function ky(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Iy(c[d>>2]|0,1,0)|0;l=b;return a|0}function ly(b,f,g,h,i){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0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0)+1;break}Wt(c[p>>2]|0,d[o>>0]|0,c[r>>2]|0,(c[v>>2]|0)+(c[k>>2]|0)|0)|0}}while(0);c[k>>2]=(c[k>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+20}l=z;return c[n>>2]|0}function my(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+64|0;s=y+52|0;t=y+48|0;u=y+44|0;v=y+40|0;w=y+36|0;x=y+32|0;j=y+28|0;k=y+24|0;m=y+20|0;n=y+16|0;o=y+12|0;p=y+8|0;q=y+4|0;r=y;c[t>>2]=f;c[u>>2]=g;c[v>>2]=h;c[w>>2]=i;c[m>>2]=0;c[n>>2]=0;c[p>>2]=0;if(!(c[w>>2]|0)){c[s>>2]=c[u>>2];x=c[s>>2]|0;l=y;return x|0}if((d[c[w>>2]>>0]|0)!=152){c[s>>2]=c[u>>2];x=c[s>>2]|0;l=y;return x|0}c[x>>2]=c[(c[w>>2]|0)+44>>2];if(!(c[x>>2]|0)){c[s>>2]=c[u>>2];x=c[s>>2]|0;l=y;return x|0}if(!(d[(c[x>>2]|0)+42>>0]&16)){c[s>>2]=c[u>>2];x=c[s>>2]|0;l=y;return x|0}c[j>>2]=c[(lv(c[t>>2]|0,c[x>>2]|0)|0)+8>>2];c[k>>2]=c[c[j>>2]>>2];if(!(c[(c[k>>2]|0)+72>>2]|0)){c[s>>2]=c[u>>2];x=c[s>>2]|0;l=y;return x|0}c[q>>2]=go(c[t>>2]|0,c[(c[u>>2]|0)+20>>2]|0)|0;if(c[q>>2]|0){c[r>>2]=c[q>>2];while(1){if(!(a[c[r>>2]>>0]|0))break;a[c[r>>2]>>0]=a[17348+(d[c[r>>2]>>0]|0)>>0]|0;c[r>>2]=(c[r>>2]|0)+1}c[p>>2]=zb[c[(c[k>>2]|0)+72>>2]&255](c[j>>2]|0,c[v>>2]|0,c[q>>2]|0,m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O+164|0;L=O+160|0;M=O+156|0;F=O+152|0;N=O+148|0;H=O+144|0;I=O+140|0;h=O+136|0;v=O+132|0;n=O+128|0;w=O+124|0;o=O+120|0;p=O+116|0;q=O+112|0;r=O+88|0;s=O+80|0;t=O+76|0;x=O+172|0;y=O+72|0;u=O+68|0;z=O+64|0;A=O+60|0;B=O+56|0;C=O+52|0;D=O+48|0;E=O+44|0;j=O+40|0;k=O+16|0;m=O+12|0;c[K>>2]=b;c[L>>2]=e;c[M>>2]=f;c[F>>2]=g;c[N>>2]=-1;c[H>>2]=0;c[I>>2]=Rt(c[K>>2]|0)|0;if(!(c[I>>2]|0)){c[J>>2]=0;N=c[J>>2]|0;l=O;return N|0}Qx(c[K>>2]|0);if(!(c[(c[L>>2]|0)+4>>2]&32))c[N>>2]=Tt(c[I>>2]|0,20)|0;if((d[(c[K>>2]|0)+409>>0]|0)==2){g=c[c[K>>2]>>2]|0;e=(d[c[L>>2]>>0]|0)==33?27393:27398;f=c[(c[K>>2]|0)+424>>2]|0;c[i>>2]=(c[N>>2]|0)>=0?47636:27381;c[i+4>>2]=e;c[i+8>>2]=f;c[h>>2]=Bj(g,27405,i)|0;_t(c[I>>2]|0,162,c[(c[K>>2]|0)+420>>2]|0,0,0,c[h>>2]|0,-1)|0}b=c[L>>2]|0;do if((d[c[L>>2]>>0]|0)==33){c[n>>2]=c[b+12>>2];c[w>>2]=0;c[o>>2]=xw(c[n>>2]|0)|0;k=(c[K>>2]|0)+40|0;m=c[k>>2]|0;c[k>>2]=m+1;c[(c[L>>2]|0)+28>>2]=m;c[v>>2]=Wt(c[I>>2]|0,107,c[(c[L>>2]|0)+28>>2]|0,c[F>>2]|0?0:c[o>>2]|0)|0;if(c[F>>2]|0)b=0;else b=Ex(c[c[K>>2]>>2]|0,c[o>>2]|0,1)|0;c[w>>2]=b;b=(c[L>>2]|0)+20|0;a:do if(c[(c[L>>2]|0)+4>>2]&2048|0){c[p>>2]=c[b>>2];c[q>>2]=c[c[p>>2]>>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+1}k=c[i>>2]|0;l=m;return k|0}function sy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e+4|0;g=e;c[f>>2]=b;c[g>>2]=d;a[(c[f>>2]|0)+38>>0]=a[c[f>>2]>>0]|0;a[c[f>>2]>>0]=-99;c[(c[f>>2]|0)+28>>2]=c[g>>2];d=(c[f>>2]|0)+4|0;c[d>>2]=c[d>>2]&-4097;l=e;return}function ty(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;n=u+44|0;o=u+40|0;p=u+36|0;q=u+32|0;r=u+28|0;s=u+24|0;g=u+20|0;h=u+16|0;i=u+12|0;j=u+8|0;k=u+4|0;m=u;c[n>>2]=a;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;c[r>>2]=c[(c[n>>2]|0)+8>>2];c[s>>2]=0;c[g>>2]=0;c[h>>2]=0;if((c[r>>2]|0)==0|(c[o>>2]|0)==0){l=u;return}c[s>>2]=((d[c[o>>2]>>0]|0)+0^1)-0;a:do switch(d[c[o>>2]>>0]|0|0){case 28:{ty(c[n>>2]|0,c[(c[o>>2]|0)+12>>2]|0,c[p>>2]|0,c[q>>2]|0);Qx(c[n>>2]|0);ty(c[n>>2]|0,c[(c[o>>2]|0)+16>>2]|0,c[p>>2]|0,c[q>>2]|0);Ox(c[n>>2]|0);break}case 27:{c[k>>2]=qx(c[r>>2]|0)|0;uy(c[n>>2]|0,c[(c[o>>2]|0)+12>>2]|0,c[k>>2]|0,c[q>>2]^16);Qx(c[n>>2]|0);ty(c[n>>2]|0,c[(c[o>>2]|0)+16>>2]|0,c[p>>2]|0,c[q>>2]|0);ux(c[r>>2]|0,c[k>>2]|0);Ox(c[n>>2]|0);break}case 19:{uy(c[n>>2]|0,c[(c[o>>2]|0)+12>>2]|0,c[p>>2]|0,c[q>>2]|0);break}case 148:case 29:{c[s>>2]=(d[c[o>>2]>>0]|0|0)==29?36:37;c[q>>2]=128;t=7;break}case 37:case 36:case 41:case 38:case 39:case 40:{t=7;break}case 35:case 34:{c[i>>2]=iy(c[n>>2]|0,c[(c[o>>2]|0)+12>>2]|0,g)|0;Wt(c[r>>2]|0,c[s>>2]|0,c[i>>2]|0,c[p>>2]|0)|0;break}case 32:{qy(c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,133,c[q>>2]|0);break}case 33:if(c[q>>2]|0){py(c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[p>>2]|0);break a}else{c[m>>2]=qx(c[r>>2]|0)|0;py(c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[m>>2]|0);ux(c[r>>2]|0,c[m>>2]|0);break a}default:t=14}while(0);if((t|0)==7)if(gy(c[(c[o>>2]|0)+12>>2]|0)|0)t=14;else{c[i>>2]=iy(c[n>>2]|0,c[(c[o>>2]|0)+12>>2]|0,g)|0;c[j>>2]=iy(c[n>>2]|0,c[(c[o>>2]|0)+16>>2]|0,h)|0;jy(c[n>>2]|0,c[(c[o>>2]|0)+12>>2]|0,c[(c[o>>2]|0)+16>>2]|0,c[s>>2]|0,c[i>>2]|0,c[j>>2]|0,c[p>>2]|0,c[q>>2]|0)|0}do if((t|0)==14){if(Tw(c[o>>2]|0)|0){sx(c[r>>2]|0,c[p>>2]|0)|0;break}if(!(vy(c[o>>2]|0)|0)){c[i>>2]=iy(c[n>>2]|0,c[o>>2]|0,g)|0;Xt(c[r>>2]|0,22,c[i>>2]|0,c[p>>2]|0,(c[q>>2]|0)!=0&1)|0}}while(0);Wu(c[n>>2]|0,c[g>>2]|0);Wu(c[n>>2]|0,c[h>>2]|0);l=u;return}function uy(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;o=v+48|0;p=v+44|0;q=v+40|0;r=v+36|0;s=v+32|0;t=v+28|0;g=v+24|0;h=v+20|0;i=v+16|0;j=v+12|0;k=v+8|0;m=v+4|0;n=v;c[o>>2]=a;c[p>>2]=b;c[q>>2]=e;c[r>>2]=f;c[s>>2]=c[(c[o>>2]|0)+8>>2];c[t>>2]=0;c[g>>2]=0;c[h>>2]=0;if((c[s>>2]|0)==0|(c[p>>2]|0)==0){l=v;return}c[t>>2]=d[c[p>>2]>>0];switch(c[t>>2]|0){case 28:{c[k>>2]=qx(c[s>>2]|0)|0;ty(c[o>>2]|0,c[(c[p>>2]|0)+12>>2]|0,c[k>>2]|0,c[r>>2]^16);Qx(c[o>>2]|0);uy(c[o>>2]|0,c[(c[p>>2]|0)+16>>2]|0,c[q>>2]|0,c[r>>2]|0);ux(c[s>>2]|0,c[k>>2]|0);Ox(c[o>>2]|0);break}case 27:{uy(c[o>>2]|0,c[(c[p>>2]|0)+12>>2]|0,c[q>>2]|0,c[r>>2]|0);Qx(c[o>>2]|0);uy(c[o>>2]|0,c[(c[p>>2]|0)+16>>2]|0,c[q>>2]|0,c[r>>2]|0);Ox(c[o>>2]|0);break}case 19:{ty(c[o>>2]|0,c[(c[p>>2]|0)+12>>2]|0,c[q>>2]|0,c[r>>2]|0);break}case 148:case 29:{c[t>>2]=(c[t>>2]|0)==29?37:36;c[r>>2]=128;u=7;break}case 37:case 36:case 41:case 38:case 39:case 40:{u=7;break}case 35:case 34:{c[i>>2]=iy(c[o>>2]|0,c[(c[p>>2]|0)+12>>2]|0,g)|0;Wt(c[s>>2]|0,c[t>>2]|0,c[i>>2]|0,c[q>>2]|0)|0;break}case 32:{qy(c[o>>2]|0,c[p>>2]|0,c[q>>2]|0,134,c[r>>2]|0);break}case 33:{c[m>>2]=qx(c[s>>2]|0)|0;c[n>>2]=c[r>>2]|0?c[q>>2]|0:c[m>>2]|0;py(c[o>>2]|0,c[p>>2]|0,c[m>>2]|0,c[n>>2]|0);sx(c[s>>2]|0,c[q>>2]|0)|0;ux(c[s>>2]|0,c[m>>2]|0);break}default:u=12}if((u|0)==7)if(gy(c[(c[p>>2]|0)+12>>2]|0)|0)u=12;else{c[i>>2]=iy(c[o>>2]|0,c[(c[p>>2]|0)+12>>2]|0,g)|0;c[j>>2]=iy(c[o>>2]|0,c[(c[p>>2]|0)+16>>2]|0,h)|0;jy(c[o>>2]|0,c[(c[p>>2]|0)+12>>2]|0,c[(c[p>>2]|0)+16>>2]|0,c[t>>2]|0,c[i>>2]|0,c[j>>2]|0,c[q>>2]|0,c[r>>2]|0)|0}do if((u|0)==12){if(vy(c[p>>2]|0)|0){sx(c[s>>2]|0,c[q>>2]|0)|0;break}if(!(Tw(c[p>>2]|0)|0)){c[i>>2]=iy(c[o>>2]|0,c[p>>2]|0,g)|0;Xt(c[s>>2]|0,21,c[i>>2]|0,c[q>>2]|0,(c[r>>2]|0)!=0&1)|0}}while(0);Wu(c[o>>2]|0,c[g>>2]|0);Wu(c[o>>2]|0,c[h>>2]|0);l=v;return}function vy(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=0;do if(!(c[(c[d>>2]|0)+4>>2]&1|0))if(Zv(c[d>>2]|0,e)|0){c[b>>2]=(c[e>>2]|0)!=0&1;break}else{c[b>>2]=0;break}else c[b>>2]=0;while(0);l=f;return c[b>>2]|0}function wy(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;h=i;e=i+16|0;d=i+12|0;f=i+8|0;g=i+4|0;c[d>>2]=a;c[f>>2]=b;c[g>>2]=xw(c[(c[f>>2]|0)+12>>2]|0)|0;a=c[g>>2]|0;if(c[(c[f>>2]|0)+4>>2]&2048|0){if((a|0)!=(c[c[c[(c[f>>2]|0)+20>>2]>>2]>>2]|0)){ny(c[d>>2]|0,c[c[c[(c[f>>2]|0)+20>>2]>>2]>>2]|0,c[g>>2]|0);c[e>>2]=1;h=c[e>>2]|0;l=i;return h|0}}else if((a|0)!=1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>2]|0)+4>>2]&2048|0)==0:0){if(Fy(c[S>>2]|0)|0?(c[c[(c[S>>2]|0)+20>>2]>>2]|0)>2:0)break;c[m>>2]=5}while(0);if(!(c[m>>2]|0)){c[N>>2]=c[(c[R>>2]|0)+136>>2];c[O>>2]=0;c[m>>2]=2;if(c[T>>2]&4|0){c[(c[R>>2]|0)+136>>2]=0;if((b[(c[(c[S>>2]|0)+12>>2]|0)+32>>1]|0)<0?(c[(c[S>>2]|0)+4>>2]&2048|0)==0:0)c[m>>2]=1}else if(c[U>>2]|0){T=(c[R>>2]|0)+44|0;W=(c[T>>2]|0)+1|0;c[T>>2]=W;c[O>>2]=W;c[c[U>>2]>>2]=W}oy(c[R>>2]|0,c[S>>2]|0,c[O>>2]|0,(c[m>>2]|0)==1&1)|0;c[(c[R>>2]|0)+136>>2]=c[N>>2]}else c[(c[S>>2]|0)+28>>2]=c[n>>2];if(!((c[V>>2]|0)!=0&(c[m>>2]|0)!=3&(c[m>>2]|0)!=4)){W=c[m>>2]|0;l=X;return W|0}c[Q>>2]=xw(c[(c[S>>2]|0)+12>>2]|0)|0;c[P>>2]=0;while(1){if((c[P>>2]|0)>=(c[Q>>2]|0))break;c[(c[V>>2]|0)+(c[P>>2]<<2)>>2]=c[P>>2];c[P>>2]=(c[P>>2]|0)+1}W=c[m>>2]|0;l=X;return W|0}function zy(e){e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j+4|0;g=j;h=j+8|0;c[g>>2]=e;while(1){if((d[c[g>>2]>>0]|0)==156)f=1;else f=(d[c[g>>2]>>0]|0)==155;e=c[g>>2]|0;if(!f)break;c[g>>2]=c[e+12>>2]}a[h>>0]=a[e>>0]|0;if((d[h>>0]|0)==157)a[h>>0]=a[(c[g>>2]|0)+38>>0]|0;switch(d[h>>0]|0){case 133:case 132:case 97:case 134:{c[i>>2]=0;i=c[i>>2]|0;l=j;return i|0}case 152:{if(!(c[(c[g>>2]|0)+4>>2]&1048576|0))if((b[(c[g>>2]|0)+32>>1]|0)>=0)e=(d[(c[(c[(c[g>>2]|0)+44>>2]|0)+4>>2]|0)+(b[(c[g>>2]|0)+32>>1]<<4)+12>>0]|0)==0;else e=0;else e=1;c[i>>2]=e&1;i=c[i>>2]|0;l=j;return i|0}default:{c[i>>2]=1;i=c[i>>2]|0;l=j;return i|0}}return 0}function Ay(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;b=(gy(c[f>>2]|0)|0)!=0;a=c[f>>2]|0;if(!b){c[e>>2]=a;g=c[e>>2]|0;l=h;return g|0}if((d[a>>0]|0|0)!=119?(d[(c[f>>2]|0)+38>>0]|0|0)!=119:0){c[e>>2]=c[(c[(c[(c[f>>2]|0)+20>>2]|0)+4>>2]|0)+((c[g>>2]|0)*20|0)>>2];g=c[e>>2]|0;l=h;return g|0}c[e>>2]=c[(c[(c[c[(c[f>>2]|0)+20>>2]>>2]|0)+4>>2]|0)+((c[g>>2]|0)*20|0)>>2];g=c[e>>2]|0;l=h;return g|0}function By(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+28|0;b=m+24|0;k=m+20|0;e=m+16|0;f=m+12|0;g=m+8|0;h=m+4|0;i=m;c[b>>2]=a;do if(c[(c[b>>2]|0)+4>>2]&2048|0){if(c[(c[b>>2]|0)+4>>2]&32|0){c[j>>2]=0;break}c[k>>2]=c[(c[b>>2]|0)+20>>2];if(c[(c[k>>2]|0)+48>>2]|0){c[j>>2]=0;break}if(c[(c[k>>2]|0)+8>>2]&9|0){c[j>>2]=0;break}if(c[(c[k>>2]|0)+56>>2]|0){c[j>>2]=0;break}if(c[(c[k>>2]|0)+32>>2]|0){c[j>>2]=0;break}c[e>>2]=c[(c[k>>2]|0)+28>>2];if((c[c[e>>2]>>2]|0)!=1){c[j>>2]=0;break}if(c[(c[e>>2]|0)+8+20>>2]|0){c[j>>2]=0;break}c[g>>2]=c[(c[e>>2]|0)+8+16>>2];if((d[(c[g>>2]|0)+42>>0]|0)&16|0){c[j>>2]=0;break}c[f>>2]=c[c[k>>2]>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[f>>2]>>2]|0)){a=24;break}c[i>>2]=c[(c[(c[f>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2];if((d[c[i>>2]>>0]|0|0)!=152){a=22;break}c[h>>2]=(c[h>>2]|0)+1}if((a|0)==22){c[j>>2]=0;break}else if((a|0)==24){c[j>>2]=c[k>>2];break}}else c[j>>2]=0;while(0);l=m;return c[j>>2]|0}function Cy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;e=h+6|0;i=h;f=h+5|0;g=h+4|0;c[i>>2]=b;a[f>>0]=d;a[g>>0]=wv(c[i>>2]|0)|0;if(a[g>>0]|0?a[f>>0]|0:0){if((a[g>>0]|0)<67?(a[f>>0]|0)<67:0){a[e>>0]=65;i=a[e>>0]|0;l=h;return i|0}a[e>>0]=67;i=a[e>>0]|0;l=h;return i|0}if((a[g>>0]|0)!=0|(a[f>>0]|0)!=0){a[e>>0]=(a[g>>0]|0)+(a[f>>0]|0);i=a[e>>0]|0;l=h;return i|0}else{a[e>>0]=65;i=a[e>>0]|0;l=h;return i|0}return 0}function Dy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[(c[f>>2]|0)+4>>2]&256|0){c[h>>2]=xv(c[e>>2]|0,c[f>>2]|0)|0;h=c[h>>2]|0;l=i;return h|0}if(c[g>>2]|0?c[(c[g>>2]|0)+4>>2]&256|0:0){c[h>>2]=xv(c[e>>2]|0,c[g>>2]|0)|0;h=c[h>>2]|0;l=i;return h|0}c[h>>2]=xv(c[e>>2]|0,c[f>>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ks(c[h>>2]|0,c[k>>2]|0,c[o>>2]|0)|0;if(!(c[k>>2]|0)){m=c[k>>2]|0;o=c[h>>2]|0;o=o+80|0;c[o>>2]=m;l=n;return}c[m>>2]=(c[(c[k>>2]|0)+4>>2]|0)+(((c[c[k>>2]>>2]|0)-1|0)*20|0);c[(c[m>>2]|0)+16>>2]=c[i>>2];m=(c[m>>2]|0)+13|0;a[m>>0]=a[m>>0]&-5|((d[j>>0]|0)&1)<<2&255;m=c[k>>2]|0;o=c[h>>2]|0;o=o+80|0;c[o>>2]=m;l=n;return}function Iy(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;h=l;l=l+48|0;i=h+36|0;k=h+32|0;j=h+28|0;g=h;c[i>>2]=b;c[k>>2]=e;c[j>>2]=f;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;a[g+20>>0]=c[k>>2];c[g+4>>2]=190;c[g+8>>2]=191;c[g+24>>2]=c[j>>2];Qv(g,c[i>>2]|0)|0;l=h;return d[g+20>>0]|0|0}function Jy(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+8|0;g=j+4|0;h=j;c[g>>2]=b;c[h>>2]=e;if((d[(c[g>>2]|0)+20>>0]|0|0)==2?c[(c[h>>2]|0)+4>>2]&1|0:0){a[(c[g>>2]|0)+20>>0]=0;c[f>>2]=2}else i=4;a:do if((i|0)==4){b:do switch(d[c[h>>2]>>0]|0|0){case 151:{if((d[(c[g>>2]|0)+20>>0]|0|0)<4?(c[(c[h>>2]|0)+4>>2]&524288|0)==0:0){a[(c[g>>2]|0)+20>>0]=0;c[f>>2]=2;break a}c[f>>2]=0;break a}case 154:case 153:case 152:case 55:{if((d[(c[g>>2]|0)+20>>0]|0|0)==3?(c[(c[h>>2]|0)+28>>2]|0)==(c[(c[g>>2]|0)+24>>2]|0):0){c[f>>2]=0;break a}a[(c[g>>2]|0)+20>>0]=0;c[f>>2]=2;break a}case 135:{if((d[(c[g>>2]|0)+20>>0]|0|0)==5){a[c[h>>2]>>0]=101;break b}if((d[(c[g>>2]|0)+20>>0]|0|0)==4){a[(c[g>>2]|0)+20>>0]=0;c[f>>2]=2;break a}break}default:{}}while(0);c[f>>2]=0}while(0);l=j;return c[f>>2]|0}function Ky(b,d){b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+4|0;c[f>>2]=b;c[e>>2]=d;a[(c[f>>2]|0)+20>>0]=0;l=e;return 2}function Ly(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;g=l;l=l+16|0;i=g+8|0;j=g+4|0;h=g;f=g+12|0;c[i>>2]=b;c[j>>2]=d;c[h>>2]=e;a[f>>0]=wv(c[j>>2]|0)|0;e=(Cy(c[i>>2]|0,a[f>>0]|0)|0)&255;a[f>>0]=e|c[h>>2]&255;l=g;return a[f>>0]|0}function My(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Iy(c[d>>2]|0,2,0)|0;l=b;return a|0}function Ny(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;if((d[c[f>>2]>>0]|0|0)!=119){g=c[g>>2]|0;l=h;return g|0}c[g>>2]=oy(c[e>>2]|0,c[f>>2]|0,0,0)|0;g=c[g>>2]|0;l=h;return g|0}function Oy(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+32|0;p=s+24|0;q=s+20|0;j=s+16|0;r=s+12|0;k=s+8|0;m=s+4|0;n=s;o=s+28|0;c[q>>2]=b;c[j>>2]=e;c[r>>2]=f;c[k>>2]=g;c[m>>2]=h;c[n>>2]=i;a[o>>0]=a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,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m+24|0;f=m+20|0;g=m+16|0;h=m;i=m+12|0;j=m+8|0;c[f>>2]=b;c[g>>2]=e;do if((a[c[f>>2]>>0]|0)==48){if((a[(c[f>>2]|0)+1>>0]|0)!=120?(a[(c[f>>2]|0)+1>>0]|0)!=88:0)break;e=h;c[e>>2]=0;c[e+4>>2]=0;c[i>>2]=2;while(1){b=c[i>>2]|0;if((a[(c[f>>2]|0)+(c[i>>2]|0)>>0]|0)!=48)break;c[i>>2]=b+1}c[j>>2]=b;while(1){if(!(d[16965+(d[(c[f>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&8))break;e=h;e=RR(c[e>>2]|0,c[e+4>>2]|0,16,0)|0;b=z;b=IR(e|0,b|0,(Of(a[(c[f>>2]|0)+(c[j>>2]|0)>>0]|0)|0)&255|0,0)|0;e=h;c[e>>2]=b;c[e+4>>2]=z;c[j>>2]=(c[j>>2]|0)+1}g=c[g>>2]|0;c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];if(!(a[(c[f>>2]|0)+(c[j>>2]|0)>>0]|0))b=((c[j>>2]|0)-(c[i>>2]|0)|0)<=16;else b=0;c[k>>2]=b?0:1;k=c[k>>2]|0;l=m;return k|0}while(0);i=c[f>>2]|0;j=c[g>>2]|0;c[k>>2]=ri(i,j,_c(c[f>>2]|0)|0,1)|0;k=c[k>>2]|0;l=m;return k|0}function Ry(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;c[i>>2]=(c[f>>2]|0)+152;while(1){if((c[h>>2]|0)>=(d[(c[f>>2]|0)+25>>0]|0|0))break;if((c[(c[i>>2]|0)+12>>2]|0)==(c[g>>2]|0))a[(c[i>>2]|0)+6>>0]=0;c[h>>2]=(c[h>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+20}l=j;return}function Sy(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+32|0;m=s+28|0;n=s+24|0;o=s+20|0;p=s+16|0;q=s+12|0;r=s+8|0;j=s+4|0;k=s;c[m>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=i;if((e[(c[c[m>>2]>>2]|0)+64>>1]|0)&2|0){l=s;return}if((d[(c[m>>2]|0)+25>>0]|0|0)>=10){c[r>>2]=2147483647;c[j>>2]=-1;c[q>>2]=0;c[k>>2]=(c[m>>2]|0)+152;while(1){if((c[q>>2]|0)>=10)break;if((c[(c[k>>2]|0)+16>>2]|0)<(c[r>>2]|0)){c[j>>2]=c[q>>2];c[r>>2]=c[(c[k>>2]|0)+16>>2]}c[q>>2]=(c[q>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+20}c[k>>2]=(c[m>>2]|0)+152+((c[j>>2]|0)*20|0)}else{q=(c[m>>2]|0)+152|0;i=(c[m>>2]|0)+25|0;r=a[i>>0]|0;a[i>>0]=r+1<<24>>24;c[k>>2]=q+((r&255)*20|0)}c[(c[k>>2]|0)+8>>2]=c[(c[m>>2]|0)+64>>2];c[c[k>>2]>>2]=c[n>>2];b[(c[k>>2]|0)+4>>1]=c[o>>2];c[(c[k>>2]|0)+12>>2]=c[p>>2];a[(c[k>>2]|0)+6>>0]=0;q=(c[m>>2]|0)+68|0;r=c[q>>2]|0;c[q>>2]=r+1;c[(c[k>>2]|0)+16>>2]=r;l=s;return}function Ty(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;i=k;c[f>>2]=a;c[g>>2]=d;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(e[(c[g>>2]|0)+52>>1]|0)){a=7;break}c[i>>2]=c[(c[(c[g>>2]|0)+32>>2]|0)+(c[h>>2]<<2)>>2];if((b[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>2]|0,(c[t>>2]|0)+2|0);if(c[r>>2]|0){_t(c[r>>2]|0,89,0,(c[t>>2]|0)+3-(a[c[x>>2]>>0]|0)|0,(c[t>>2]|0)+3|0,c[x>>2]|0,-5)|0;px(c[r>>2]|0,a[c[x>>2]>>0]|0);kx(c[r>>2]|0,150,(c[w>>2]|0)==24&1)|0}}while(0);ck(c[s>>2]|0,c[m>>2]|0);ck(c[s>>2]|0,c[n>>2]|0);ck(c[s>>2]|0,c[o>>2]|0);l=y;return}function Vy(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;do if(c[g>>2]|0)if((d[c[g>>2]>>0]|0|0)!=55){c[h>>2]=Uv(c[f>>2]|0,c[g>>2]|0)|0;break}else{a[c[g>>2]>>0]=97;break}while(0);l=i;return c[h>>2]|0}function Wy(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+192|0;p=q+24|0;o=q+16|0;n=q+8|0;m=q;g=q+52|0;r=q+44|0;h=q+40|0;i=q+36|0;j=q+32|0;k=q+28|0;f=q+56|0;c[g>>2]=b;c[q+48>>2]=d;c[r>>2]=e;c[h>>2]=wh(c[c[r>>2]>>2]|0)|0;c[i>>2]=uh(c[g>>2]|0)|0;c[k>>2]=0;if(!(c[h>>2]|0))c[h>>2]=47636;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[(c[i>>2]|0)+20>>2]|0))break;c[k>>2]=(c[(c[i>>2]|0)+16>>2]|0)+(c[j>>2]<<4);if(c[(c[k>>2]|0)+4>>2]|0?(Ig(c[c[k>>2]>>2]|0,c[h>>2]|0)|0)==0:0)break;c[j>>2]=(c[j>>2]|0)+1}do if((c[j>>2]|0)>=(c[(c[i>>2]|0)+20>>2]|0)){c[m>>2]=c[h>>2];Ne(128,f,27515,m)|0}else{if((c[j>>2]|0)<2){c[n>>2]=c[h>>2];Ne(128,f,27536,n)|0;break}if(!(a[(c[i>>2]|0)+67>>0]|0)){Ne(128,f,27562,o)|0;break}if((xk(c[(c[k>>2]|0)+4>>2]|0)|0)==0?(Oq(c[(c[k>>2]|0)+4>>2]|0)|0)==0:0){Fq(c[(c[k>>2]|0)+4>>2]|0)|0;c[(c[k>>2]|0)+4>>2]=0;c[(c[k>>2]|0)+12>>2]=0;_p(c[i>>2]|0);l=q;return}c[p>>2]=c[h>>2];Ne(128,f,27604,p)|0}while(0);yh(c[g>>2]|0,f,-1);l=q;return}function Xy(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;E=l;l=l+128|0;B=E+48|0;A=E+40|0;D=E+32|0;C=E+24|0;k=E+16|0;h=E+8|0;g=E;w=E+116|0;F=E+108|0;j=E+104|0;x=E+100|0;y=E+96|0;z=E+92|0;n=E+88|0;o=E+84|0;p=E+80|0;q=E+76|0;r=E+72|0;s=E+68|0;t=E+64|0;i=E+60|0;u=E+56|0;v=E+52|0;c[w>>2]=b;c[E+112>>2]=e;c[F>>2]=f;c[x>>2]=0;c[y>>2]=uh(c[w>>2]|0)|0;c[o>>2]=0;c[p>>2]=0;c[s>>2]=0;c[n>>2]=wh(c[c[F>>2]>>2]|0)|0;c[z>>2]=wh(c[(c[F>>2]|0)+4>>2]|0)|0;if(!(c[n>>2]|0))c[n>>2]=47636;if(!(c[z>>2]|0))c[z>>2]=47636;b=c[y>>2]|0;do if((c[(c[y>>2]|0)+20>>2]|0)<((c[(c[y>>2]|0)+96+28>>2]|0)+2|0)){if(!(a[b+67>>0]|0)){c[s>>2]=Bj(c[y>>2]|0,27677,h)|0;break}c[j>>2]=0;while(1){e=c[(c[y>>2]|0)+16>>2]|0;if((c[j>>2]|0)>=(c[(c[y>>2]|0)+20>>2]|0))break;c[i>>2]=c[e+(c[j>>2]<<4)>>2];if(!(Ig(c[i>>2]|0,c[z>>2]|0)|0)){m=12;break}c[j>>2]=(c[j>>2]|0)+1}if((m|0)==12){F=c[y>>2]|0;c[k>>2]=c[z>>2];c[s>>2]=Bj(F,27719,k)|0;break}b=c[y>>2]|0;do if((e|0)==((c[y>>2]|0)+392|0)){c[r>>2]=od(b,48,0)|0;if(!(c[r>>2]|0)){l=E;return}else{F=c[r>>2]|0;m=c[(c[y>>2]|0)+16>>2]|0;c[F>>2]=c[m>>2];c[F+4>>2]=c[m+4>>2];c[F+8>>2]=c[m+8>>2];c[F+12>>2]=c[m+12>>2];c[F+16>>2]=c[m+16>>2];c[F+20>>2]=c[m+20>>2];c[F+24>>2]=c[m+24>>2];c[F+28>>2]=c[m+28>>2];break}}else{c[r>>2]=Pd(b,c[(c[y>>2]|0)+16>>2]|0,(c[(c[y>>2]|0)+20>>2]|0)+1<<4,0)|0;if(!(c[r>>2]|0)){l=E;return}}while(0);c[(c[y>>2]|0)+16>>2]=c[r>>2];c[r>>2]=(c[(c[y>>2]|0)+16>>2]|0)+(c[(c[y>>2]|0)+20>>2]<<4);F=c[r>>2]|0;c[F>>2]=0;c[F+4>>2]=0;c[F+8>>2]=0;c[F+12>>2]=0;c[q>>2]=c[(c[y>>2]|0)+48>>2];c[x>>2]=Yy(c[(c[c[y>>2]>>2]|0)+16>>2]|0,c[n>>2]|0,q,t,o,p)|0;if(c[x>>2]|0){if((c[x>>2]|0)==7)yd(c[y>>2]|0);yh(c[w>>2]|0,c[p>>2]|0,-1);Kd(c[p>>2]|0);l=E;return}c[q>>2]=c[q>>2]|256;c[x>>2]=Bk(c[t>>2]|0,c[o>>2]|0,c[y>>2]|0,(c[r>>2]|0)+4|0,0,c[q>>2]|0)|0;Kd(c[o>>2]|0);F=(c[y>>2]|0)+20|0;c[F>>2]=(c[F>>2]|0)+1;if((c[x>>2]|0)!=19){if(!(c[x>>2]|0)){F=Zy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2]|0);c[s>>2]=Bj(c[y>>2]|0,19371,A)|0;break}if(!(c[s>>2]|0)){F=c[y>>2]|0;c[B>>2]=c[n>>2];c[s>>2]=Bj(F,27778,B)|0}}else{c[g>>2]=c[(c[y>>2]|0)+96+28>>2];c[s>>2]=Bj(b,27640,g)|0}while(0);if(c[s>>2]|0){yh(c[w>>2]|0,c[s>>2]|0,-1);Hd(c[y>>2]|0,c[s>>2]|0)}if(!(c[x>>2]|0)){l=E;return}Bi(c[w>>2]|0,c[x>>2]|0);l=E;return}function Yy(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;S=l;l=l+160|0;Q=S+32|0;P=S+24|0;O=S+16|0;N=S+8|0;K=S+140|0;T=S+136|0;L=S+132|0;M=S+128|0;m=S+124|0;n=S+120|0;o=S+116|0;p=S+112|0;q=S+108|0;r=S+104|0;s=S+100|0;t=S+144|0;j=S+96|0;u=S+92|0;v=S+88|0;w=S+84|0;x=S+80|0;k=S;y=S+76|0;A=S+72|0;B=S+68|0;C=S+64|0;D=S+60|0;E=S+56|0;F=S+52|0;G=S+48|0;H=S+44|0;I=S+40|0;J=S+36|0;c[T>>2]=b;c[L>>2]=e;c[M>>2]=f;c[m>>2]=g;c[n>>2]=h;c[o>>2]=i;c[p>>2]=0;c[q>>2]=c[c[M>>2]>>2];c[r>>2]=c[T>>2];c[j>>2]=_c(c[L>>2]|0)|0;a:do if(((c[q>>2]&64|0)!=0|(c[5]|0)!=0)&(c[j>>2]|0)>=5?(wQ(c[L>>2]|0,27806,5)|0)==0:0){c[x>>2]=0;i=(c[j>>2]|0)+2|0;T=k;c[T>>2]=i;c[T+4>>2]=((i|0)<0)<<31>>31;c[q>>2]=c[q>>2]|64;c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[j>>2]|0))break;i=(a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0)==38&1;T=k;i=IR(c[T>>2]|0,c[T+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0;T=k;c[T>>2]=i;c[T+4>>2]=z;c[w>>2]=(c[w>>2]|0)+1}T=k;c[s>>2]=Ve(c[T>>2]|0,c[T+4>>2]|0)|0;if(!(c[s>>2]|0)){c[K>>2]=7;T=c[K>>2]|0;l=S;return T|0}c[w>>2]=5;do if((a[(c[L>>2]|0)+5>>0]|0)==47?(a[(c[L>>2]|0)+6>>0]|0)==47:0){c[w>>2]=7;while(1){if(a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0)e=(a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0)!=47;else e=0;b=c[w>>2]|0;if(!e)break;c[w>>2]=b+1}if((b|0)!=7){if((c[w>>2]|0)==16?(wQ(27812,(c[L>>2]|0)+7|0,9)|0)==0:0)break;T=(c[L>>2]|0)+7|0;c[N>>2]=(c[w>>2]|0)-7;c[N+4>>2]=T;T=Ue(27822,N)|0;c[c[o>>2]>>2]=T;c[p>>2]=1;break a}}while(0);c[v>>2]=0;b:while(1){T=a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0;a[t>>0]=T;if(!(T<<24>>24))break;if((a[t>>0]|0)==35)break;c[w>>2]=(c[w>>2]|0)+1;do if(((a[t>>0]|0)==37?d[16965+(d[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0)>>0]&8|0:0)?d[16965+(d[(c[L>>2]|0)+((c[w>>2]|0)+1)>>0]|0)>>0]&8|0:0){T=c[L>>2]|0;N=c[w>>2]|0;c[w>>2]=N+1;c[y>>2]=((Of(a[T+N>>0]|0)|0)&255)<<4;N=c[L>>2]|0;T=c[w>>2]|0;c[w>>2]=T+1;T=(Of(a[N+T>>0]|0)|0)&255;c[y>>2]=(c[y>>2]|0)+T;if(c[y>>2]|0){a[t>>0]=c[y>>2];break}while(1){T=a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0;a[t>>0]=T;if(!(T<<24>>24))continue b;if((a[t>>0]|0)==35)continue b;if((c[v>>2]|0)==0?(a[t>>0]|0)==63:0)continue b;if((c[v>>2]|0)==1){if((a[t>>0]|0)==61)continue b;if((a[t>>0]|0)==38)continue b}if((c[v>>2]|0)==2?(a[t>>0]|0)==38:0)continue b;c[w>>2]=(c[w>>2]|0)+1}}else R=37;while(0);c:do if((R|0)==37){R=0;do if((c[v>>2]|0)==1){if((a[t>>0]|0)!=38?(a[t>>0]|0)!=61:0)break;if(!(a[(c[s>>2]|0)+((c[x>>2]|0)-1)>>0]|0))while(1){if(!(a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0))continue b;if((a[(c[L>>2]|0)+(c[w>>2]|0)>>0]|0)==35)continue b;if((a[(c[L>>2]|0)+((c[w>>2]|0)-1)>>0]|0)==38)continue b;c[w>>2]=(c[w>>2]|0)+1}else{if((a[t>>0]|0)==38){N=c[s>>2]|0;T=c[x>>2]|0;c[x>>2]=T+1;a[N+T>>0]=0}else c[v>>2]=2;a[t>>0]=0;break c}}while(0);if(!((c[v>>2]|0)==0?(a[t>>0]|0)==63:0)){if((c[v>>2]|0)!=2)break;if((a[t>>0]|0)!=38)break}a[t>>0]=0;c[v>>2]=1}while(0);i=a[t>>0]|0;N=c[s>>2]|0;T=c[x>>2]|0;c[x>>2]=T+1;a[N+T>>0]=i}if((c[v>>2]|0)==1){N=c[s>>2]|0;T=c[x>>2]|0;c[x>>2]=T+1;a[N+T>>0]=0}T=c[s>>2]|0;N=c[x>>2]|0;c[x>>2]=N+1;a[T+N>>0]=0;N=c[s>>2]|0;T=c[x>>2]|0;c[x>>2]=T+1;a[N+T>>0]=0;T=c[s>>2]|0;c[u>>2]=T+((_c(c[s>>2]|0)|0)+1);while(1){if(!(a[c[u>>2]>>0]|0)){R=84;break a}c[A>>2]=_c(c[u>>2]|0)|0;c[B>>2]=(c[u>>2]|0)+((c[A>>2]|0)+1);c[C>>2]=_c(c[B>>2]|0)|0;if((c[A>>2]|0)==3?(wQ(27850,c[u>>2]|0,3)|0)==0:0)c[r>>2]=c[B>>2];else{c[D>>2]=0;c[E>>2]=0;c[F>>2]=0;c[G>>2]=0;if((c[A>>2]|0)==5?(wQ(27854,c[u>>2]|0,5)|0)==0:0){c[F>>2]=393216;c[D>>2]=4356;c[G>>2]=c[F>>2];c[E>>2]=27854}if((c[A>>2]|0)==4?(wQ(27860,c[u>>2]|0,4)|0)==0:0){c[F>>2]=135;c[D>>2]=4380;c[G>>2]=c[F>>2]&c[q>>2];c[E>>2]=17937}if(c[D>>2]|0){c[I>>2]=0;c[H>>2]=0;while(1){if(!(c[(c[D>>2]|0)+(c[H>>2]<<3)>>2]|0))break;c[J>>2]=c[(c[D>>2]|0)+(c[H>>2]<<3)>>2];T=c[C>>2]|0;if((T|0)==(_c(c[J>>2]|0)|0)?0==(wQ(c[B>>2]|0,c[J>>2]|0,c[C>>2]|0)|0):0){R=73;break}c[H>>2]=(c[H>>2]|0)+1}if((R|0)==73){R=0;c[I>>2]=c[(c[D>>2]|0)+(c[H>>2]<<3)+4>>2]}if(!(c[I>>2]|0)){R=76;break}if((c[I>>2]&-129|0)>(c[G>>2]|0)){R=78;break}c[q>>2]=c[q>>2]&~c[F>>2]|c[I>>2]}}c[u>>2]=(c[B>>2]|0)+((c[C>>2]|0)+1)}if((R|0)==76){T=c[B>>2]|0;c[O>>2]=c[E>>2];c[O+4>>2]=T;T=Ue(27865,O)|0;c[c[o>>2]>>2]=T;c[p>>2]=1;break}else if((R|0)==78){T=c[B>>2]|0;c[P>>2]=c[E>>2];c[P+4>>2]=T;T=Ue(27885,P)|0;c[c[o>>2]>>2]=T;c[p>>2]=3;break}}else R=81;while(0);do if((R|0)==81){T=(c[j>>2]|0)+2|0;c[s>>2]=Ve(T,((T|0)<0)<<31>>31)|0;if(c[s>>2]|0){MR(c[s>>2]|0,c[L>>2]|0,c[j>>2]|0)|0;a[(c[s>>2]|0)+(c[j>>2]|0)>>0]=0;a[(c[s>>2]|0)+((c[j>>2]|0)+1)>>0]=0;c[q>>2]=c[q>>2]&-65;R=84;break}c[K>>2]=7;T=c[K>>2]|0;l=S;return T|0}while(0);if((R|0)==84?(T=_e(c[r>>2]|0)|0,c[c[m>>2]>>2]=T,(c[c[m>>2]>>2]|0)==0):0){c[Q>>2]=c[r>>2];T=Ue(27909,Q)|0;c[c[o>>2]>>2]=T;c[p>>2]=1}if(c[p>>2]|0){Kd(c[s>>2]|0);c[s>>2]=0}c[c[M>>2]>>2]=c[q>>2];c[c[n>>2]>>2]=c[s>>2];c[K>>2]=c[p>>2];T=c[K>>2]|0;l=S;return T|0}function Zy(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=e;if(c[g>>2]|0)c[h>>2]=gl(c[g>>2]|0,84,151)|0;else c[h>>2]=jl(0,84,0)|0;if(!(c[h>>2]|0)){yd(c[f>>2]|0);h=c[h>>2]|0;l=i;return h|0}if(d[(c[h>>2]|0)+76>>0]|0){h=c[h>>2]|0;l=i;return h|0}aq((c[h>>2]|0)+8|0);aq((c[h>>2]|0)+24|0);aq((c[h>>2]|0)+40|0);aq((c[h>>2]|0)+56|0);a[(c[h>>2]|0)+77>>0]=1;h=c[h>>2]|0;l=i;return h|0}function _y(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=e;if(((c[g>>2]|0)>=0?(a[(c[f>>2]|0)+13>>0]|0)==0:0)?(cz(c[(c[f>>2]|0)+216>>2]|0)|0)==0:0)a[(c[f>>2]|0)+4>>0]=c[g>>2];l=h;return d[(c[f>>2]|0)+4>>0]|0}function $y(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+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=a[(c[g>>2]|0)+12>>0]|0;if(!(a[(c[g>>2]|0)+8>>0]|0)){e=c[h>>2]|0;e=e&32;e=(e|0)!=0;h=c[g>>2]|0;h=h+21|0;f=a[h>>0]|0;f=f&255;g=f|1;f=f&-2;g=e?f:g;g=g&255;a[h>>0]=g;l=i;return}e=(c[g>>2]|0)+11|0;a[e>>0]=d[e>>0]|32;e=c[h>>2]|0;e=e&32;e=(e|0)!=0;h=c[g>>2]|0;h=h+21|0;f=a[h>>0]|0;f=f&255;g=f|1;f=f&-2;g=e?f:g;g=g&255;a[h>>0]=g;l=i;return}function cz(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if(!(c[b>>2]|0)){b=0;b=b&1;l=e;return b|0}b=(d[(c[b>>2]|0)+43>>0]|0|0)==2;b=b&1;l=e;return b|0}function dz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[c[d>>2]>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[(c[f>>2]|0)+20>>2]|0))break;c[h>>2]=(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4);do if(c[(c[h>>2]|0)+4>>2]|0){if(c[e>>2]|0?0!=(Ig(c[e>>2]|0,c[c[h>>2]>>2]|0)|0):0)break;ju(c[d>>2]|0,c[g>>2]|0)}while(0);c[g>>2]=(c[g>>2]|0)+1}l=i;return}function ez(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o;e=o+44|0;f=o+40|0;g=o+36|0;h=o+32|0;i=o+28|0;j=o+24|0;k=o+20|0;m=o+16|0;d=o+12|0;c[e>>2]=a;c[f>>2]=b;c[i>>2]=c[c[e>>2]>>2];c[j>>2]=Nt(c[c[e>>2]>>2]|0,c[(c[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2]|0)+12>>2];c[e>>2]=0;c[i>>2]=(c[d>>2]|0)+8;while(1){if((c[e>>2]|0)>=(c[c[d>>2]>>2]|0)){a=15;break}if(!(c[(c[h>>2]|0)+8>>2]|0)){if(c[(c[i>>2]|0)+4>>2]|0?Ig(c[(c[i>>2]|0)+4>>2]|0,c[f>>2]|0)|0:0){a=8;break}Hd(c[c[c[h>>2]>>2]>>2]|0,c[(c[i>>2]|0)+4>>2]|0);c[(c[i>>2]|0)+4>>2]=0;c[c[i>>2]>>2]=c[(c[h>>2]|0)+4>>2]}if(kz(c[h>>2]|0,c[(c[i>>2]|0)+20>>2]|0)|0){a=11;break}if(lz(c[h>>2]|0,c[(c[i>>2]|0)+48>>2]|0)|0){a=13;break}c[e>>2]=(c[e>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+72}if((a|0)==8){f=c[c[h>>2]>>2]|0;e=c[(c[h>>2]|0)+20>>2]|0;i=c[(c[i>>2]|0)+4>>2]|0;c[j>>2]=c[(c[h>>2]|0)+16>>2];c[j+4>>2]=e;c[j+8>>2]=i;Ck(f,28283,j);c[g>>2]=1;j=c[g>>2]|0;l=k;return j|0}else if((a|0)==11){c[g>>2]=1;j=c[g>>2]|0;l=k;return j|0}else if((a|0)==13){c[g>>2]=1;j=c[g>>2]|0;l=k;return j|0}else if((a|0)==15){c[g>>2]=0;j=c[g>>2]|0;l=k;return j|0}return 0}function kz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;f=g+8|0;d=g+4|0;e=g;c[d>>2]=a;c[e>>2]=b;while(1){if(!(c[e>>2]|0)){a=20;break}if(mz(c[d>>2]|0,c[c[e>>2]>>2]|0)|0){a=4;break}if(jz(c[d>>2]|0,c[(c[e>>2]|0)+28>>2]|0)|0){a=6;break}if(lz(c[d>>2]|0,c[(c[e>>2]|0)+32>>2]|0)|0){a=8;break}if(mz(c[d>>2]|0,c[(c[e>>2]|0)+36>>2]|0)|0){a=10;break}if(lz(c[d>>2]|0,c[(c[e>>2]|0)+40>>2]|0)|0){a=12;break}if(mz(c[d>>2]|0,c[(c[e>>2]|0)+44>>2]|0)|0){a=14;break}if(lz(c[d>>2]|0,c[(c[e>>2]|0)+56>>2]|0)|0){a=16;break}if(lz(c[d>>2]|0,c[(c[e>>2]|0)+60>>2]|0)|0){a=18;break}c[e>>2]=c[(c[e>>2]|0)+48>>2]}if((a|0)==4)c[f>>2]=1;else if((a|0)==6)c[f>>2]=1;else if((a|0)==8)c[f>>2]=1;else if((a|0)==10)c[f>>2]=1;else if((a|0)==12)c[f>>2]=1;else if((a|0)==14)c[f>>2]=1;else if((a|0)==16)c[f>>2]=1;else if((a|0)==18)c[f>>2]=1;else if((a|0)==20)c[f>>2]=0;l=g;return c[f>>2]|0}function lz(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j;g=j+12|0;h=j+8|0;f=j+4|0;c[h>>2]=b;c[f>>2]=e;while(1){if(!(c[f>>2]|0)){b=16;break}if((d[c[f>>2]>>0]|0)==135){if(!(a[(c[c[c[h>>2]>>2]>>2]|0)+148+5>>0]|0)){b=6;break}a[c[f>>2]>>0]=101}if(c[(c[f>>2]|0)+4>>2]&8404992|0){b=16;break}b=c[h>>2]|0;e=(c[f>>2]|0)+20|0;if(c[(c[f>>2]|0)+4>>2]&2048|0){if(kz(b,c[e>>2]|0)|0){b=10;break}}else if(mz(b,c[e>>2]|0)|0){b=12;break}if(lz(c[h>>2]|0,c[(c[f>>2]|0)+16>>2]|0)|0){b=14;break}c[f>>2]=c[(c[f>>2]|0)+12>>2]}if((b|0)==6){f=c[c[h>>2]>>2]|0;c[i>>2]=c[(c[h>>2]|0)+16>>2];Ck(f,28329,i);c[g>>2]=1;i=c[g>>2]|0;l=j;return i|0}else if((b|0)==10){c[g>>2]=1;i=c[g>>2]|0;l=j;return i|0}else if((b|0)==12){c[g>>2]=1;i=c[g>>2]|0;l=j;return i|0}else if((b|0)==14){c[g>>2]=1;i=c[g>>2]|0;l=j;return i|0}else if((b|0)==16){c[g>>2]=0;i=c[g>>2]|0;l=j;return i|0}return 0}function mz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;h=i+16|0;d=i+12|0;e=i+8|0;f=i+4|0;g=i;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){c[h>>2]=0;h=c[h>>2]|0;l=i;return h|0}c[f>>2]=0;c[g>>2]=c[(c[e>>2]|0)+4>>2];while(1){if((c[f>>2]|0)>=(c[c[e>>2]>>2]|0)){a=8;break}if(lz(c[d>>2]|0,c[c[g>>2]>>2]|0)|0){a=6;break}c[f>>2]=(c[f>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+20}if((a|0)==6){c[h>>2]=1;h=c[h>>2]|0;l=i;return h|0}else if((a|0)==8){c[h>>2]=0;h=c[h>>2]|0;l=i;return h|0}return 0}function nz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;f=g+8|0;d=g+4|0;e=g;c[d>>2]=a;c[e>>2]=b;while(1){if(!(c[e>>2]|0)){a=10;break}if(kz(c[d>>2]|0,c[(c[e>>2]|0)+8>>2]|0)|0){a=4;break}if(lz(c[d>>2]|0,c[(c[e>>2]|0)+16>>2]|0)|0){a=6;break}if(mz(c[d>>2]|0,c[(c[e>>2]|0)+20>>2]|0)|0){a=8;break}c[e>>2]=c[(c[e>>2]|0)+28>>2]}if((a|0)==4)c[f>>2]=1;else if((a|0)==6)c[f>>2]=1;else if((a|0)==8)c[f>>2]=1;else if((a|0)==10)c[f>>2]=0;l=g;return c[f>>2]|0}function oz(a){a=a|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;a=(c[e>>2]|0)+144|0;b[a>>1]=b[a>>1]&-33|32;l=d;return}function pz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;m=l;l=l+32|0;o=m+28|0;n=m+24|0;h=m+20|0;i=m+16|0;j=m+12|0;k=m+8|0;f=m+4|0;g=m;c[o>>2]=a;c[n>>2]=b;c[h>>2]=d;c[i>>2]=e;c[j>>2]=1;c[k>>2]=gA(c[o>>2]|0,c[n>>2]|0)|0;if(!(c[k>>2]|0)){o=c[j>>2]|0;l=m;return o|0}Ek(c[k>>2]|0);c[f>>2]=Hj(c[k>>2]|0)|0;c[g>>2]=_o(c[f>>2]|0)|0;if((c[h>>2]|0)==7){c[c[i>>2]>>2]=c[g>>2];c[j>>2]=0;o=c[j>>2]|0;l=m;return o|0}if((c[h>>2]|0)==27){o=Yk(c[f>>2]|0)|0;c[c[i>>2]>>2]=o;c[j>>2]=0;o=c[j>>2]|0;l=m;return o|0}if((c[h>>2]|0)==28){o=hA(c[f>>2]|0)|0;c[c[i>>2]>>2]=o;c[j>>2]=0;o=c[j>>2]|0;l=m;return o|0}if(c[c[g>>2]>>2]|0){c[j>>2]=Hl(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;o=c[j>>2]|0;l=m;return o|0}else{c[j>>2]=12;o=c[j>>2]|0;l=m;return o|0}return 0}function qz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(!(c[g>>2]|0)){l=h;return}Vt(c[e>>2]|0,1,c[g>>2]|0)|0;rz(c[e>>2]|0,c[f>>2]|0);Wt(c[e>>2]|0,87,1,1)|0;l=h;return}function rz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;Ez(c[f>>2]|0,1,e);l=d;return}function sz(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;j=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;o=p+8|0;h=p+4|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=0,f=0;f=l;l=l+16|0;b=f+4|0;d=f;c[d>>2]=a;do if(c[d>>2]|0){if(!(Ig(c[d>>2]|0,28535)|0)){c[b>>2]=1;break}if(!(Ig(c[d>>2]|0,28528)|0))c[b>>2]=0;else e=6}else e=6;while(0);if((e|0)==6)c[b>>2]=-1;l=f;return c[b>>2]|0}function vz(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;if((c[d>>2]|0)==6)c[b>>2]=0;else c[b>>2]=c[5412+(c[d>>2]<<2)>>2];l=e;return c[b>>2]|0}function wz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;f=g;c[e>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;d=f;b=c[d+4>>2]|0;if((b|0)>-1|(b|0)==-1&(c[d>>2]|0)>>>0>=4294967295){a=f;b=c[a+4>>2]|0;d=(c[e>>2]|0)+168|0;c[d>>2]=c[a>>2];c[d+4>>2]=b;fA(c[(c[e>>2]|0)+216>>2]|0,c[f>>2]|0,c[f+4>>2]|0)}f=(c[e>>2]|0)+168|0;z=c[f+4>>2]|0;l=g;return c[f>>2]|0}function xz(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;Ek(c[d>>2]|0);if(!(a[(c[(c[d>>2]|0)+4>>2]|0)+17>>0]|0)){d=0;c[e>>2]=d;e=c[e>>2]|0;l=f;return e|0}d=(a[(c[(c[d>>2]|0)+4>>2]|0)+18>>0]|0)!=0^1?1:2;c[e>>2]=d;e=c[e>>2]|0;l=f;return e|0}function yz(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[d>>2]=a;do if(Ig(c[d>>2]|0,29606)|0){if(!(Ig(c[d>>2]|0,29050)|0)){c[b>>2]=1;break}if(!(Ig(c[d>>2]|0,29611)|0)){c[b>>2]=2;break}else{c[e>>2]=Mf(c[d>>2]|0)|0;c[b>>2]=((c[e>>2]|0)>=0&(c[e>>2]|0)<=2?c[e>>2]|0:0)&255;break}}else c[b>>2]=0;while(0);l=f;return c[b>>2]|0}function zz(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+32|0;k=j+12|0;m=j+8|0;g=j+4|0;h=j;i=j+16|0;c[k>>2]=b;c[m>>2]=f;c[g>>2]=c[(c[k>>2]|0)+4>>2];c[h>>2]=0;a[i>>0]=c[m>>2];Ek(c[k>>2]|0);if((e[(c[g>>2]|0)+22>>1]|0)&2|0?((d[i>>0]|0|0?1:0)|0)!=(d[(c[g>>2]|0)+17>>0]|0|0):0){c[h>>2]=8;m=c[h>>2]|0;l=j;return m|0}a[(c[g>>2]|0)+17>>0]=d[i>>0]|0|0?1:0;a[(c[g>>2]|0)+18>>0]=(d[i>>0]|0|0)==2?1:0;m=c[h>>2]|0;l=j;return m|0}function Az(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+12|0;f=e+8|0;g=e+4|0;d=e;c[h>>2]=a;c[f>>2]=b;c[g>>2]=c[(c[h>>2]|0)+4>>2];Ek(c[h>>2]|0);c[d>>2]=dA(c[c[g>>2]>>2]|0,c[f>>2]|0)|0;l=e;return c[d>>2]|0}function Bz(b){b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=b;if(!(a[(c[e>>2]|0)+67>>0]|0)){l=h;return}c[f>>2]=c[(c[e>>2]|0)+16>>2];c[g>>2]=c[(c[e>>2]|0)+20>>2];while(1){b=c[g>>2]|0;c[g>>2]=b+-1;if((b|0)<=0)break;if(c[(c[f>>2]|0)+4>>2]|0)az(c[(c[f>>2]|0)+4>>2]|0,d[(c[f>>2]|0)+8>>0]|c[(c[e>>2]|0)+24>>2]&56)|0;c[f>>2]=(c[f>>2]|0)+16}l=h;return}function Cz(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;f=j+16|0;g=j+12|0;k=j+8|0;h=j+4|0;i=j;c[g>>2]=b;c[k>>2]=e;c[h>>2]=cA(c[k>>2]|0)|0;c[i>>2]=c[c[g>>2]>>2];if((d[(c[i>>2]|0)+68>>0]|0|0)==(c[h>>2]|0)){c[f>>2]=0;k=c[f>>2]|0;l=j;return k|0}if(Dz(c[g>>2]|0)|0){c[f>>2]=1;k=c[f>>2]|0;l=j;return k|0}else{a[(c[i>>2]|0)+68>>0]=c[h>>2];c[f>>2]=0;k=c[f>>2]|0;l=j;return k|0}return 0}function Dz(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h;d=h+12|0;e=h+8|0;f=h+4|0;c[e>>2]=b;c[f>>2]=c[c[e>>2]>>2];do if(c[(c[(c[f>>2]|0)+16>>2]|0)+16+4>>2]|0){if(a[(c[f>>2]|0)+67>>0]|0?(xk(c[(c[(c[f>>2]|0)+16>>2]|0)+16+4>>2]|0)|0)==0:0){Fq(c[(c[(c[f>>2]|0)+16>>2]|0)+16+4>>2]|0)|0;c[(c[(c[f>>2]|0)+16>>2]|0)+16+4>>2]=0;Yo(c[f>>2]|0);break}Ck(c[e>>2]|0,29544,g);c[d>>2]=1;g=c[d>>2]|0;l=h;return g|0}while(0);c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}function Ez(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;Xr(c[e>>2]|0,c[f>>2]|0);c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[f>>2]|0))break;Yr(c[e>>2]|0,c[h>>2]|0,0,c[(c[g>>2]|0)+(c[h>>2]<<2)>>2]|0,0)|0;c[h>>2]=(c[h>>2]|0)+1}l=i;return}function Fz(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;i=q+40|0;j=q+36|0;k=q+32|0;m=q+16|0;n=q+12|0;o=q+44|0;p=q+8|0;g=q+4|0;h=q;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=f;c[n>>2]=0;while(1){f=a[(c[k>>2]|0)+(c[n>>2]|0)>>0]|0;a[o>>0]=f;if(!(f<<24>>24))break;if((a[o>>0]|0)==115){e=(c[m>>2]|0)+(4-1)&~(4-1);d=c[e>>2]|0;c[m>>2]=e+4;c[g>>2]=d;c[p>>2]=c[g>>2];d=c[i>>2]|0;e=(c[p>>2]|0)==0?79:97;f=c[j>>2]|0;c[j>>2]=f+1;_t(d,e,0,f,0,c[p>>2]|0,0)|0}else{d=c[i>>2]|0;f=(c[m>>2]|0)+(4-1)&~(4-1);e=c[f>>2]|0;c[m>>2]=f+4;c[h>>2]=e;e=c[h>>2]|0;f=c[j>>2]|0;c[j>>2]=f+1;Wt(d,76,e,f)|0}c[n>>2]=(c[n>>2]|0)+1}l=q;return}function Gz(b){b=b|0;var e=0,f=0,g=0;f=l;l=l+16|0;g=f+4|0;e=f;a[g>>0]=b;switch(d[g>>0]|0|0){case 7:{c[e>>2]=29354;break}case 8:{c[e>>2]=29363;break}case 9:{c[e>>2]=29375;break}case 6:{c[e>>2]=29383;break}default:c[e>>2]=29392}l=f;return c[e>>2]|0}function Hz(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+80|0;B=D;w=D+64|0;x=D+60|0;y=D+56|0;z=D+52|0;A=D+48|0;k=D+44|0;m=D+40|0;n=D+36|0;o=D+32|0;p=D+28|0;q=D+24|0;r=D+20|0;s=D+16|0;t=D+68|0;u=D+12|0;v=D+8|0;c[x>>2]=f;c[y>>2]=g;c[z>>2]=h;c[A>>2]=i;c[k>>2]=j;c[m>>2]=0;c[n>>2]=0;c[o>>2]=c[(c[z>>2]|0)+20>>2];c[p>>2]=c[(c[z>>2]|0)+36+4>>2];do if((c[o>>2]|0)==1){if((b[(c[y>>2]|0)+32>>1]|0)>=0){if(!(c[p>>2]|0)){c[w>>2]=0;C=c[w>>2]|0;l=D;return C|0}if(!(Ig(c[(c[(c[y>>2]|0)+4>>2]|0)+(b[(c[y>>2]|0)+32>>1]<<4)>>2]|0,c[p>>2]|0)|0)){c[w>>2]=0;C=c[w>>2]|0;l=D;return C|0}}}else if(c[k>>2]|0){c[n>>2]=od(c[c[x>>2]>>2]|0,c[o>>2]<<2,0)|0;if(c[n>>2]|0){c[c[k>>2]>>2]=c[n>>2];break}c[w>>2]=1;C=c[w>>2]|0;l=D;return C|0}while(0);c[m>>2]=c[(c[y>>2]|0)+8>>2];a:while(1){if(!(c[m>>2]|0))break;do if((e[(c[m>>2]|0)+50>>1]|0)==(c[o>>2]|0)?d[(c[m>>2]|0)+54>>0]|0:0){if(!(c[p>>2]|0))if((a[(c[m>>2]|0)+55>>0]&3|0)==2){C=17;break a}else break;c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[o>>2]|0))break;b[t>>1]=b[(c[(c[m>>2]|0)+4>>2]|0)+(c[r>>2]<<1)>>1]|0;if((b[t>>1]|0)<0)break;j=c[(c[(c[y>>2]|0)+4>>2]|0)+(b[t>>1]<<4)+8>>2]|0;c[u>>2]=j;c[u>>2]=c[u>>2]|0?j:31345;if(Ig(c[(c[(c[m>>2]|0)+32>>2]|0)+(c[r>>2]<<2)>>2]|0,c[u>>2]|0)|0)break;c[v>>2]=c[(c[(c[y>>2]|0)+4>>2]|0)+(b[t>>1]<<4)>>2];c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[o>>2]|0))break;if(!(Ig(c[(c[z>>2]|0)+36+(c[s>>2]<<3)+4>>2]|0,c[v>>2]|0)|0)){C=28;break}c[s>>2]=(c[s>>2]|0)+1}if((C|0)==28?(C=0,c[n>>2]|0):0)c[(c[n>>2]|0)+(c[r>>2]<<2)>>2]=c[(c[z>>2]|0)+36+(c[s>>2]<<3)>>2];if((c[s>>2]|0)==(c[o>>2]|0))break;c[r>>2]=(c[r>>2]|0)+1}if((c[r>>2]|0)==(c[o>>2]|0))break a}while(0);c[m>>2]=c[(c[m>>2]|0)+20>>2]}b:do if((C|0)==17?c[n>>2]|0:0){c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[o>>2]|0))break b;c[(c[n>>2]|0)+(c[q>>2]<<2)>>2]=c[(c[z>>2]|0)+36+(c[q>>2]<<3)>>2];c[q>>2]=(c[q>>2]|0)+1}}while(0);if(c[m>>2]|0){c[c[A>>2]>>2]=c[m>>2];c[w>>2]=0;C=c[w>>2]|0;l=D;return C|0}if(!(a[(c[x>>2]|0)+150>>0]|0)){C=c[x>>2]|0;A=c[(c[z>>2]|0)+8>>2]|0;c[B>>2]=c[c[c[z>>2]>>2]>>2];c[B+4>>2]=A;Ck(C,29291,B)}Hd(c[c[x>>2]>>2]|0,c[n>>2]|0);c[w>>2]=1;C=c[w>>2]|0;l=D;return C|0}function Iz(d,f){d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+16|0;g=o+12|0;i=o+8|0;j=o+4|0;k=o;m=o+20|0;n=o+22|0;c[g>>2]=d;c[i>>2]=f;if(!(c[(c[i>>2]|0)+16>>2]|0)){c[k>>2]=c[(c[i>>2]|0)+12>>2];f=(e[(c[i>>2]|0)+52>>1]|0)+1|0;f=md(0,f,((f|0)<0)<<31>>31)|0;c[(c[i>>2]|0)+16>>2]=f;if(!(c[(c[i>>2]|0)+16>>2]|0)){yd(c[g>>2]|0);c[h>>2]=0;n=c[h>>2]|0;l=o;return n|0}c[j>>2]=0;while(1){d=c[i>>2]|0;if((c[j>>2]|0)>=(e[(c[i>>2]|0)+52>>1]|0))break;b[m>>1]=b[(c[d+4>>2]|0)+(c[j>>2]<<1)>>1]|0;if((b[m>>1]|0)>=0)a[(c[(c[i>>2]|0)+16>>2]|0)+(c[j>>2]|0)>>0]=a[(c[(c[k>>2]|0)+4>>2]|0)+(b[m>>1]<<4)+13>>0]|0;else{d=c[i>>2]|0;if((b[m>>1]|0)==-1){f=68;d=(c[d+16>>2]|0)+(c[j>>2]|0)|0}else{f=wv(c[(c[(c[d+40>>2]|0)+4>>2]|0)+((c[j>>2]|0)*20|0)>>2]|0)|0;a[n>>0]=f;a[n>>0]=(a[n>>0]|0)==0?65:f;f=a[n>>0]|0;d=(c[(c[i>>2]|0)+16>>2]|0)+(c[j>>2]|0)|0}a[d>>0]=f}c[j>>2]=(c[j>>2]|0)+1}a[(c[d+16>>2]|0)+(c[j>>2]|0)>>0]=0}c[h>>2]=c[(c[i>>2]|0)+16>>2];n=c[h>>2]|0;l=o;return n|0}function Jz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(c[e>>2]|0)c[f>>2]=29224;else c[f>>2]=18921;aA(c[d>>2]|0,18925,2,1,c[f>>2]|0,203,0,0,0)|0;aA(c[d>>2]|0,18925,3,1,c[f>>2]|0,203,0,0,0)|0;aA(c[d>>2]|0,18916,2,1,18912,203,0,0,0)|0;bA(c[d>>2]|0,18916,12);bA(c[d>>2]|0,18925,(c[e>>2]|0?12:4)&255);l=g;return}function Kz(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=0;while(1){b=c[e>>2]|0;if((c[f>>2]|0)>=(d[(c[e>>2]|0)+25>>0]|0|0))break;if(d[b+152+((c[f>>2]|0)*20|0)+6>>0]|0|0?(d[(c[e>>2]|0)+19>>0]|0|0)<8:0){i=c[(c[e>>2]|0)+152+((c[f>>2]|0)*20|0)+12>>2]|0;h=(c[e>>2]|0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2]|0))break;c[s>>2]=b+1;c[z>>2]=b;if((a[(c[x>>2]|0)+55>>0]&3|0)==2?(d[(c[p>>2]|0)+42>>0]|0)&32|0:0){if(c[u>>2]|0)c[c[u>>2]>>2]=c[z>>2];a[r>>0]=0}if(!((c[t>>2]|0)!=0?!(d[(c[t>>2]|0)+((c[v>>2]|0)+1)>>0]|0|0):0)){Xt(c[y>>2]|0,c[q>>2]|0,c[z>>2]|0,c[(c[x>>2]|0)+44>>2]|0,c[w>>2]|0)|0;ox(c[B>>2]|0,c[x>>2]|0);px(c[y>>2]|0,a[r>>0]|0)}c[x>>2]=c[(c[x>>2]|0)+20>>2];c[v>>2]=(c[v>>2]|0)+1}if((b|0)>(c[(c[B>>2]|0)+40>>2]|0))c[(c[B>>2]|0)+40>>2]=c[s>>2];c[A>>2]=c[v>>2];B=c[A>>2]|0;l=C;return B|0}function Mz(a){a=a|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;a=(c[e>>2]|0)+144|0;b[a>>1]=b[a>>1]&-33;l=d;return}function Nz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[f>>2]=a;c[d>>2]=b;a=c[f>>2]|0;if((c[d>>2]|0)>0){$z(a,138,c[d>>2]|0)|0;l=e;return 0}else{$z(a,0,0)|0;l=e;return 0}return 0}function Oz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;h=l;l=l+16|0;i=h+12|0;f=h+8|0;g=h+4|0;j=h;c[i>>2]=a;c[f>>2]=b;c[g>>2]=d;c[j>>2]=e;if((c[j>>2]|0)<(c[i>>2]|0)){l=h;return 0}zg();Wz(c[f>>2]|0,c[g>>2]|0)|0;Bg();l=h;return 0}function Pz(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;Gj(c[b>>2]|0);c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0))break;c[e>>2]=c[(c[(c[b>>2]|0)+16>>2]|0)+(c[d>>2]<<4)+4>>2];if(c[e>>2]|0){c[f>>2]=Hj(c[e>>2]|0)|0;Uz(c[f>>2]|0)}c[d>>2]=(c[d>>2]|0)+1}l=g;return 0}function Qz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;a=c[d>>2]|0;if((c[e>>2]|0)>0){Tz(a,192,c[d>>2]|0)|0;c[(c[d>>2]|0)+428>>2]=c[e>>2];l=f;return 0}else{Tz(a,0,0)|0;l=f;return 0}return 0}function Rz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if((c[g>>2]|0)<0|(c[g>>2]|0)>=12){c[e>>2]=-1;i=c[e>>2]|0;l=j;return i|0}c[i>>2]=c[(c[f>>2]|0)+96+(c[g>>2]<<2)>>2];if((c[h>>2]|0)>=0){if((c[h>>2]|0)>(c[5364+(c[g>>2]<<2)>>2]|0))c[h>>2]=c[5364+(c[g>>2]<<2)>>2];c[(c[f>>2]|0)+96+(c[g>>2]<<2)>>2]=c[h>>2]}c[e>>2]=c[i>>2];i=c[e>>2]|0;l=j;return i|0}function Sz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;f=l;l=l+32|0;d=f+16|0;i=f+12|0;h=f+8|0;e=f+4|0;g=f;c[i>>2]=a;c[h>>2]=b;c[e>>2]=c[i>>2];c[g>>2]=c[(c[i>>2]|0)+428>>2];if((((c[h>>2]|0)+1|0)*1e3|0)>(c[g>>2]|0)){c[d>>2]=0;i=c[d>>2]|0;l=f;return i|0}else{zo(c[c[e>>2]>>2]|0,1e6)|0;c[d>>2]=1;i=c[d>>2]|0;l=f;return i|0}return 0}function Tz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;c[(c[f>>2]|0)+380>>2]=c[h>>2];c[(c[f>>2]|0)+380+4>>2]=c[g>>2];c[(c[f>>2]|0)+380+8>>2]=0;c[(c[f>>2]|0)+428>>2]=0;l=e;return 0}function Uz(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Vz(c[(c[d>>2]|0)+212>>2]|0);l=b;return}function Vz(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;qb[c[164>>2]&255](c[(c[d>>2]|0)+44>>2]|0);l=b;return}function Wz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=Xz(c[f>>2]|0,c[e>>2]|0,0,0,0)|0;l=d;return b|0}function Xz(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;q=r;k=r+32|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;h=r+12|0;i=r+8|0;j=r+4|0;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;c[h>>2]=g;c[j>>2]=10;if(c[p>>2]|0)c[c[p>>2]>>2]=-1;if(c[h>>2]|0)c[c[h>>2]>>2]=-1;if((c[o>>2]|0)<0|(c[o>>2]|0)>3){c[k>>2]=21;q=c[k>>2]|0;l=r;return q|0}if(c[n>>2]|0?a[c[n>>2]>>0]|0:0)c[j>>2]=yk(c[m>>2]|0,c[n>>2]|0)|0;if((c[j>>2]|0)<0){c[i>>2]=1;p=c[m>>2]|0;c[q>>2]=c[n>>2];vk(p,1,29123,q)}else{c[(c[m>>2]|0)+380+8>>2]=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0}else{c[k>>2]=_z(c[c[m>>2]>>2]|0,c[h>>2]|0,c[i>>2]|0,c[j>>2]|0)|0;m=c[k>>2]|0;l=n;return m|0}return 0}function _z(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=a;c[h>>2]=b;c[i>>2]=e;c[j>>2]=f;c[k>>2]=0;if(!(c[(c[g>>2]|0)+216>>2]|0)){k=c[k>>2]|0;l=m;return k|0}if(!(c[h>>2]|0))a=0;else a=c[(c[g>>2]|0)+184>>2]|0;c[k>>2]=Fn(c[(c[g>>2]|0)+216>>2]|0,c[h>>2]|0,a,c[(c[g>>2]|0)+188>>2]|0,d[(c[g>>2]|0)+10>>0]|0,c[(c[g>>2]|0)+160>>2]|0,c[(c[g>>2]|0)+208>>2]|0,c[i>>2]|0,c[j>>2]|0)|0;k=c[k>>2]|0;l=m;return k|0}function $z(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+16|0;g=f+12|0;i=f+8|0;h=f+4|0;e=f;c[g>>2]=a;c[i>>2]=b;c[h>>2]=d;c[e>>2]=c[(c[g>>2]|0)+228>>2];c[(c[g>>2]|0)+224>>2]=c[i>>2];c[(c[g>>2]|0)+228>>2]=c[h>>2];l=f;return c[e>>2]|0}function aA(d,f,g,h,i,j,k,m,n){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+64|0;C=D;B=D+56|0;q=D+52|0;r=D+48|0;s=D+44|0;t=D+40|0;u=D+36|0;v=D+32|0;w=D+28|0;x=D+24|0;y=D+20|0;z=D+16|0;o=D+12|0;A=D+8|0;p=D+4|0;c[q>>2]=d;c[r>>2]=f;c[s>>2]=g;c[t>>2]=h;c[u>>2]=i;c[v>>2]=j;c[w>>2]=k;c[x>>2]=m;c[y>>2]=n;do if(c[r>>2]|0){if(c[v>>2]|0?(c[x>>2]|0)!=0|(c[w>>2]|0)!=0:0)break;if(((c[v>>2]|0)==0&(c[x>>2]|0)!=0^1|(c[w>>2]|0)!=0?!((((c[v>>2]|0)!=0|(c[x>>2]|0)!=0)^1)&(c[w>>2]|0)!=0|(c[s>>2]|0)<-1|(c[s>>2]|0)>127):0)?(n=_c(c[r>>2]|0)|0,c[o>>2]=n,255>=(n|0)):0){c[A>>2]=c[t>>2]&2048;c[t>>2]=c[t>>2]&7;do if((c[t>>2]|0)!=4){if((c[t>>2]|0)==5){c[p>>2]=aA(c[q>>2]|0,c[r>>2]|0,c[s>>2]|0,1|c[A>>2],c[u>>2]|0,c[v>>2]|0,c[w>>2]|0,c[x>>2]|0,c[y>>2]|0)|0;if(!(c[p>>2]|0))c[p>>2]=aA(c[q>>2]|0,c[r>>2]|0,c[s>>2]|0,2|c[A>>2],c[u>>2]|0,c[v>>2]|0,c[w>>2]|0,c[x>>2]|0,c[y>>2]|0)|0;if(!(c[p>>2]|0)){c[t>>2]=3;break}c[B>>2]=c[p>>2];C=c[B>>2]|0;l=D;return C|0}}else c[t>>2]=(a[936]|0)==0?3:2;while(0);c[z>>2]=uw(c[q>>2]|0,c[r>>2]|0,c[s>>2]|0,c[t>>2]&255,0)|0;do if((c[z>>2]|0?(e[(c[z>>2]|0)+2>>1]&3|0)==(c[t>>2]|0):0)?(a[c[z>>2]>>0]|0)==(c[s>>2]|0):0){d=c[q>>2]|0;if(!(c[(c[q>>2]|0)+156>>2]|0)){$p(d);break}vk(d,5,29228,C);c[B>>2]=5;C=c[B>>2]|0;l=D;return C|0}while(0);c[z>>2]=uw(c[q>>2]|0,c[r>>2]|0,c[s>>2]|0,c[t>>2]&255,1)|0;if(!(c[z>>2]|0)){c[B>>2]=7;C=c[B>>2]|0;l=D;return C|0}Gq(c[q>>2]|0,c[z>>2]|0);if(c[y>>2]|0){C=c[y>>2]|0;c[C>>2]=(c[C>>2]|0)+1}c[(c[z>>2]|0)+24>>2]=c[y>>2];b[(c[z>>2]|0)+2>>1]=e[(c[z>>2]|0)+2>>1]&3|c[A>>2];c[(c[z>>2]|0)+12>>2]=c[v>>2]|0?c[v>>2]|0:c[w>>2]|0;c[(c[z>>2]|0)+16>>2]=c[x>>2];c[(c[z>>2]|0)+4>>2]=c[u>>2];a[c[z>>2]>>0]=c[s>>2];c[B>>2]=0;C=c[B>>2]|0;l=D;return C|0}}while(0);c[B>>2]=cd(139436)|0;C=c[B>>2]|0;l=D;return C|0}function bA(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0;k=l;l=l+16|0;n=k+8|0;m=k+4|0;i=k+12|0;j=k;c[n>>2]=f;c[m>>2]=g;a[i>>0]=h;c[j>>2]=uw(c[n>>2]|0,c[m>>2]|0,2,1,0)|0;if(!(c[j>>2]|0)){l=k;return}n=(c[j>>2]|0)+2|0;b[n>>1]=e[n>>1]|0|(d[i>>0]|0);l=k;return}function cA(b){b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+4|0;e=g;c[e>>2]=b;if((a[c[e>>2]>>0]|0)>=48?(a[c[e>>2]>>0]|0)<=50:0)c[d>>2]=(a[c[e>>2]>>0]|0)-48;else f=4;do if((f|0)==4){if(!(Ig(c[e>>2]|0,29443)|0)){c[d>>2]=1;break}if(!(Ig(c[e>>2]|0,27935)|0)){c[d>>2]=2;break}else{c[d>>2]=0;break}}while(0);l=g;return c[d>>2]|0}function dA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=eA(c[(c[f>>2]|0)+212>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function eA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(c[e>>2]|0){if((c[e>>2]|0)<0){a=c[e>>2]|0;a=RR(-1024,-1,a|0,((a|0)<0)<<31>>31|0)|0;b=(c[(c[d>>2]|0)+24>>2]|0)+(c[(c[d>>2]|0)+28>>2]|0)|0;b=LR(a|0,z|0,b|0,((b|0)<0)<<31>>31|0)|0;c[e>>2]=b}c[(c[d>>2]|0)+20>>2]=c[e>>2]}c[f>>2]=Ok(c[d>>2]|0)|0;if((c[f>>2]|0)>=(c[(c[d>>2]|0)+20>>2]|0)){f=c[f>>2]|0;l=g;return f|0}c[f>>2]=c[(c[d>>2]|0)+20>>2];f=c[f>>2]|0;l=g;return f|0}function fA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;f=g;c[e>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;if(!(c[e>>2]|0)){l=g;return}b=f;d=c[b+4>>2]|0;f=(c[e>>2]|0)+16|0;c[f>>2]=c[b>>2];c[f+4>>2]=d;l=g;return}function gA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h+8|0;d=h+4|0;g=h;c[f>>2]=a;c[d>>2]=b;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[(c[f>>2]|0)+20>>2]|0)){a=8;break}if(c[(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4)+4>>2]|0){if(!(c[d>>2]|0)){a=6;break}if(!(Ig(c[d>>2]|0,c[(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4)>>2]|0)|0)){a=6;break}}c[g>>2]=(c[g>>2]|0)+1}if((a|0)==6){c[e>>2]=c[(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4)+4>>2];g=c[e>>2]|0;l=h;return g|0}else if((a|0)==8){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}return 0}function hA(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=c[d>>2]|0;if(c[(c[d>>2]|0)+216>>2]|0){d=iA(c[a+216>>2]|0)|0;l=b;return d|0}else{d=c[a+68>>2]|0;l=b;return d|0}return 0}function iA(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+8>>2]|0}function jA(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+80|0;n=o+8|0;m=o;g=o+44|0;p=o+40|0;h=o+36|0;i=o+32|0;j=o+28|0;k=o+24|0;f=o+48|0;c[g>>2]=a;c[p>>2]=b;c[h>>2]=d;c[i>>2]=e;c[k>>2]=c[(c[(c[c[g>>2]>>2]|0)+16>>2]|0)+(c[p>>2]<<4)>>2];c[j>>2]=1;while(1){if((c[j>>2]|0)>4)break;c[m>>2]=c[j>>2];Ne(24,f,30647,m)|0;if(mu(c[c[g>>2]>>2]|0,f,c[k>>2]|0)|0){p=c[g>>2]|0;d=c[h>>2]|0;e=c[i>>2]|0;c[n>>2]=c[k>>2];c[n+4>>2]=f;c[n+8>>2]=d;c[n+12>>2]=e;Qt(p,27122,n)}c[j>>2]=(c[j>>2]|0)+1}l=o;return}function kA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=l;l=l+48|0;h=e;g=e+36|0;i=e+32|0;k=e+28|0;j=e+24|0;f=e+20|0;c[g>>2]=a;c[i>>2]=b;c[k>>2]=d;c[j>>2]=Rt(c[g>>2]|0)|0;c[f>>2]=Uu(c[g>>2]|0)|0;Xt(c[j>>2]|0,130,c[i>>2]|0,c[f>>2]|0,c[k>>2]|0)|0;mv(c[g>>2]|0);d=c[g>>2]|0;j=(c[k>>2]|0)==1?23323:23342;i=c[i>>2]|0;a=c[f>>2]|0;b=c[f>>2]|0;c[h>>2]=c[(c[(c[c[g>>2]>>2]|0)+16>>2]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(c[k>>2]|0,c[m>>2]|0)|0;c[j>>2]=c[i>>2];while(1){if(!(c[j>>2]|0))break;if((d[(c[j>>2]|0)+8>>0]|0|0)==(c[n>>2]|0)?uD(c[(c[j>>2]|0)+16>>2]|0,c[o>>2]|0)|0:0)c[h>>2]=c[h>>2]|(d[(c[j>>2]|0)+9>>0]|0);c[j>>2]=c[(c[j>>2]|0)+32>>2]}if(!(c[p>>2]|0)){o=c[h>>2]|0;o=(o|0)!=0;p=c[i>>2]|0;p=o?p:0;l=q;return p|0}c[c[p>>2]>>2]=c[h>>2];o=c[h>>2]|0;o=(o|0)!=0;p=c[i>>2]|0;p=o?p:0;l=q;return p|0}function nA(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;k=n+8|0;j=n;f=n+24|0;g=n+20|0;h=n+16|0;i=n+12|0;c[g>>2]=a;c[h>>2]=b;c[i>>2]=e;if(!((d[(c[h>>2]|0)+42>>0]|0)&16|0?!(c[(c[c[(lv(c[c[g>>2]>>2]|0,c[h>>2]|0)|0)+4>>2]>>2]|0)+52>>2]|0):0))m=3;do if((m|0)==3){if(((d[(c[h>>2]|0)+42>>0]|0)&1|0?(c[(c[c[g>>2]>>2]|0)+24>>2]&2048|0)==0:0)?(d[(c[g>>2]|0)+18>>0]|0|0)==0:0)break;if((c[i>>2]|0)==0?c[(c[h>>2]|0)+12>>2]|0:0){m=c[g>>2]|0;c[k>>2]=c[c[h>>2]>>2];Ck(m,31575,k);c[f>>2]=1;m=c[f>>2]|0;l=n;return m|0}c[f>>2]=0;m=c[f>>2]|0;l=n;return m|0}while(0);m=c[g>>2]|0;c[j>>2]=c[c[h>>2]>>2];Ck(m,31546,j);c[f>>2]=1;m=c[f>>2]|0;l=n;return m|0}function oA(a){a=a|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;a=(c[e>>2]|0)+144|0;b[a>>1]=b[a>>1]&-17|16;l=d;return}function pA(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=l;l=l+128|0;L=O+108|0;M=O+104|0;N=O+100|0;n=O+96|0;t=O+92|0;u=O+88|0;v=O+84|0;k=O+80|0;w=O+76|0;x=O+72|0;y=O+68|0;m=O+64|0;z=O+60|0;A=O+56|0;B=O+52|0;C=O+48|0;D=O+44|0;r=O+40|0;E=O+36|0;F=O+32|0;G=O+28|0;s=O+24|0;q=O+20|0;H=O+16|0;I=O+12|0;o=O+8|0;p=O+4|0;J=O+112|0;K=O;c[M>>2]=f;c[N>>2]=g;c[n>>2]=h;c[t>>2]=i;c[u>>2]=j;c[v>>2]=c[c[M>>2]>>2];c[E>>2]=0;c[F>>2]=0;c[q>>2]=0;if(!(c[n>>2]|0)){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if((c[(c[M>>2]|0)+472>>2]|0)==0?(c[(c[n>>2]|0)+64>>2]|0)==0:0){if(Yu(c[M>>2]|0,c[N>>2]|0)|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(d[(c[N>>2]|0)+42>>0]&16|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if((c[t>>2]|0)==10){if((b[(c[N>>2]|0)+32>>1]|0)>=0)c[t>>2]=d[(c[N>>2]|0)+43>>0];if((c[t>>2]|0)==10)c[t>>2]=2}if((c[c[(c[n>>2]|0)+28>>2]>>2]|0)!=1){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[(c[n>>2]|0)+28>>2]|0)+8+20>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[n>>2]|0)+32>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[n>>2]|0)+44>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[n>>2]|0)+36>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[n>>2]|0)+56>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[n>>2]|0)+48>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[n>>2]|0)+8>>2]&1|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}c[k>>2]=c[c[n>>2]>>2];if((c[c[k>>2]>>2]|0)!=1){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if((d[c[c[(c[k>>2]|0)+4>>2]>>2]>>0]|0)!=160){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}c[m>>2]=(c[(c[n>>2]|0)+28>>2]|0)+8;c[w>>2]=gu(c[M>>2]|0,0,c[m>>2]|0)|0;if(!(c[w>>2]|0)){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if((c[w>>2]|0)==(c[N>>2]|0)){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(((d[(c[N>>2]|0)+42>>0]&32|0)==0|0)!=((d[(c[w>>2]|0)+42>>0]&32|0)==0|0)){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(d[(c[w>>2]|0)+42>>0]&16|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if(c[(c[w>>2]|0)+12>>2]|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if((b[(c[N>>2]|0)+34>>1]|0)!=(b[(c[w>>2]|0)+34>>1]|0)){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}if((b[(c[N>>2]|0)+32>>1]|0)!=(b[(c[w>>2]|0)+32>>1]|0)){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}c[z>>2]=0;a:while(1){g=c[N>>2]|0;if((c[z>>2]|0)>=(b[(c[N>>2]|0)+34>>1]|0)){f=64;break}c[o>>2]=(c[g+4>>2]|0)+(c[z>>2]<<4);c[p>>2]=(c[(c[w>>2]|0)+4>>2]|0)+(c[z>>2]<<4);if((a[(c[o>>2]|0)+13>>0]|0)!=(a[(c[p>>2]|0)+13>>0]|0)){f=52;break}if(uk(c[(c[o>>2]|0)+8>>2]|0,c[(c[p>>2]|0)+8>>2]|0)|0){f=54;break}if(d[(c[o>>2]|0)+12>>0]|0?(a[(c[p>>2]|0)+12>>0]|0)==0:0){f=57;break}do if((c[z>>2]|0)>0){if(((c[(c[o>>2]|0)+4>>2]|0)==0|0)!=((c[(c[p>>2]|0)+4>>2]|0)==0|0)){f=62;break a}if(!(c[(c[o>>2]|0)+4>>2]|0))break;if(vQ(c[(c[(c[o>>2]|0)+4>>2]|0)+8>>2]|0,c[(c[(c[p>>2]|0)+4>>2]|0)+8>>2]|0)|0){f=62;break a}}while(0);c[z>>2]=(c[z>>2]|0)+1}if((f|0)==52){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}else if((f|0)==54){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}else if((f|0)==57){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}else if((f|0)==62){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}else if((f|0)==64){c[y>>2]=c[g+8>>2];while(1){if(!(c[y>>2]|0))break;if(d[(c[y>>2]|0)+54>>0]|0)c[q>>2]=1;c[x>>2]=c[(c[w>>2]|0)+8>>2];while(1){if(!(c[x>>2]|0))break;if(wD(c[y>>2]|0,c[x>>2]|0)|0)break;c[x>>2]=c[(c[x>>2]|0)+20>>2]}if(!(c[x>>2]|0)){f=73;break}c[y>>2]=c[(c[y>>2]|0)+20>>2]}if((f|0)==73){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}do if(c[(c[N>>2]|0)+24>>2]|0){if(!(dw(c[(c[w>>2]|0)+24>>2]|0,c[(c[N>>2]|0)+24>>2]|0,-1)|0))break;c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}while(0);do if(c[(c[v>>2]|0)+24>>2]&524288|0){if(!(c[(c[N>>2]|0)+16>>2]|0))break;c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}while(0);if(c[(c[v>>2]|0)+24>>2]&128|0){c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}c[A>>2]=Nt(c[v>>2]|0,c[(c[w>>2]|0)+64>>2]|0)|0;c[G>>2]=Rt(c[M>>2]|0)|0;ju(c[M>>2]|0,c[A>>2]|0);p=(c[M>>2]|0)+40|0;o=c[p>>2]|0;c[p>>2]=o+1;c[B>>2]=o;o=(c[M>>2]|0)+40|0;p=c[o>>2]|0;c[o>>2]=p+1;c[C>>2]=p;c[s>>2]=qA(c[M>>2]|0,c[u>>2]|0,c[N>>2]|0)|0;c[H>>2]=Uu(c[M>>2]|0)|0;c[I>>2]=Uu(c[M>>2]|0)|0;nx(c[M>>2]|0,c[C>>2]|0,c[u>>2]|0,c[N>>2]|0,105);do if(!(c[(c[v>>2]|0)+24>>2]&268435456)){if((b[(c[N>>2]|0)+32>>1]|0)<0){if(!(c[q>>2]|0?1:(c[(c[N>>2]|0)+8>>2]|0)!=0))f=87}else if(!(c[q>>2]|0))f=87;if((f|0)==87?!((c[t>>2]|0)!=2&(c[t>>2]|0)!=1):0)break;c[D>>2]=Wt(c[G>>2]|0,57,c[C>>2]|0,0)|0;c[E>>2]=Tt(c[G>>2]|0,13)|0;tx(c[G>>2]|0,c[D>>2]|0)}while(0);f=c[M>>2]|0;if(!(d[(c[w>>2]|0)+42>>0]&32)){nx(f,c[B>>2]|0,c[A>>2]|0,c[w>>2]|0,104);c[F>>2]=Wt(c[G>>2]|0,57,c[B>>2]|0,0)|0;do if((b[(c[N>>2]|0)+32>>1]|0)<0){f=c[G>>2]|0;if(!(c[(c[N>>2]|0)+8>>2]|0)){c[D>>2]=Wt(f,114,c[C>>2]|0,c[I>>2]|0)|0;break}else{c[D>>2]=Wt(f,123,c[B>>2]|0,c[I>>2]|0)|0;break}}else{c[D>>2]=Wt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2]=c[(c[(c[x>>2]|0)+32>>2]|0)+(c[z>>2]<<2)>>2];if(uk(31345,c[K>>2]|0)|0)break;c[z>>2]=(c[z>>2]|0)+1}if((c[z>>2]|0)!=(e[(c[x>>2]|0)+52>>1]|0))break;a[J>>0]=16;Xt(c[G>>2]|0,53,c[C>>2]|0,0,-1)|0}while(0);do if(d[(c[w>>2]|0)+42>>0]&32|0){if((a[(c[y>>2]|0)+55>>0]&3|0)!=2)break;a[J>>0]=d[J>>0]|1}while(0);Xt(c[G>>2]|0,126,c[C>>2]|0,c[H>>2]|0,1)|0;px(c[G>>2]|0,a[J>>0]|0);Wt(c[G>>2]|0,7,c[B>>2]|0,(c[D>>2]|0)+1|0)|0;tx(c[G>>2]|0,c[D>>2]|0);Wt(c[G>>2]|0,111,c[B>>2]|0,0)|0;Wt(c[G>>2]|0,111,c[C>>2]|0,0)|0;c[y>>2]=c[(c[y>>2]|0)+20>>2]}if(c[F>>2]|0)tx(c[G>>2]|0,c[F>>2]|0);Wu(c[M>>2]|0,c[I>>2]|0);Wu(c[M>>2]|0,c[H>>2]|0);if(c[E>>2]|0){CA(c[M>>2]|0);Wt(c[G>>2]|0,75,0,0)|0;tx(c[G>>2]|0,c[E>>2]|0);Wt(c[G>>2]|0,111,c[C>>2]|0,0)|0;c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}else{c[L>>2]=1;N=c[L>>2]|0;l=O;return N|0}}}c[L>>2]=0;N=c[L>>2]|0;l=O;return N|0}function qA(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+24|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[g>>2]=a;c[h>>2]=b;c[i>>2]=e;c[j>>2]=0;if((d[(c[i>>2]|0)+42>>0]|0)&8|0?(c[(c[c[g>>2]>>2]|0)+24>>2]&268435456|0)==0:0){a=c[g>>2]|0;if(c[(c[g>>2]|0)+124>>2]|0)a=c[a+124>>2]|0;c[k>>2]=a;c[m>>2]=c[(c[k>>2]|0)+120>>2];while(1){if(c[m>>2]|0)b=(c[(c[m>>2]|0)+4>>2]|0)!=(c[i>>2]|0);else b=0;a=c[m>>2]|0;if(!b)break;c[m>>2]=c[a>>2]}do if(!a){c[m>>2]=od(c[c[g>>2]>>2]|0,16,0)|0;if(c[m>>2]|0){c[c[m>>2]>>2]=c[(c[k>>2]|0)+120>>2];c[(c[k>>2]|0)+120>>2]=c[m>>2];c[(c[m>>2]|0)+4>>2]=c[i>>2];c[(c[m>>2]|0)+8>>2]=c[h>>2];h=(c[k>>2]|0)+44|0;c[h>>2]=(c[h>>2]|0)+1;h=(c[k>>2]|0)+44|0;i=(c[h>>2]|0)+1|0;c[h>>2]=i;c[(c[m>>2]|0)+12>>2]=i;k=(c[k>>2]|0)+44|0;c[k>>2]=(c[k>>2]|0)+1;break}c[f>>2]=0;m=c[f>>2]|0;l=n;return m|0}while(0);c[j>>2]=c[(c[m>>2]|0)+12>>2]}c[f>>2]=c[j>>2];m=c[f>>2]|0;l=n;return m|0}function rA(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e+4|0;g=e;c[f>>2]=b;c[g>>2]=d;kx(c[f>>2]|0,73,c[g>>2]|0)|0;a[(c[(c[f>>2]|0)+12>>2]|0)+19>>0]=0;c[(c[(c[f>>2]|0)+12>>2]|0)+28>>2]=0;l=e;return}function sA(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;q=r+40|0;f=r+36|0;k=r+32|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;g=r+12|0;h=r+8|0;i=r+4|0;j=r;c[f>>2]=a;c[k>>2]=b;c[m>>2]=e;c[n>>2]=Rt(c[f>>2]|0)|0;c[p>>2]=Vu(c[n>>2]|0)|0;if((d[(c[m>>2]|0)+42>>0]|0)&16|0)a=lv(c[c[f>>2]>>2]|0,c[m>>2]|0)|0;else a=0;c[g>>2]=a;c[o>>2]=1;a:while(1){if((c[o>>2]|0)>=(c[p>>2]|0)){a=18;break}c[h>>2]=Ax(c[n>>2]|0,c[o>>2]|0)|0;b:do if((d[c[h>>2]>>0]|0|0)==104?(c[(c[h>>2]|0)+12>>2]|0)==(c[k>>2]|0):0){c[j>>2]=c[(c[h>>2]|0)+8>>2];if((c[j>>2]|0)==(c[(c[m>>2]|0)+28>>2]|0)){a=8;break a}c[i>>2]=c[(c[m>>2]|0)+8>>2];while(1){if(!(c[i>>2]|0))break b;if((c[j>>2]|0)==(c[(c[i>>2]|0)+44>>2]|0)){a=12;break a}c[i>>2]=c[(c[i>>2]|0)+20>>2]}}while(0);if((d[c[h>>2]>>0]|0|0)==155?(c[(c[h>>2]|0)+16>>2]|0)==(c[g>>2]|0):0){a=16;break}c[o>>2]=(c[o>>2]|0)+1}if((a|0)==8){c[q>>2]=1;q=c[q>>2]|0;l=r;return q|0}else if((a|0)==12){c[q>>2]=1;q=c[q>>2]|0;l=r;return q|0}else if((a|0)==16){c[q>>2]=1;q=c[q>>2]|0;l=r;return q|0}else if((a|0)==18){c[q>>2]=0;q=c[q>>2]|0;l=r;return q|0}return 0}function tA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=l;l=l+32|0;j=e+16|0;g=e+12|0;h=e+8|0;i=e+4|0;f=e;c[j>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=c[(c[j>>2]|0)+8>>2];ay(c[j>>2]|0,c[g>>2]|0,c[h>>2]|0);b=(c[j>>2]|0)+44|0;d=(c[b>>2]|0)+1|0;c[b>>2]=d;c[f>>2]=d;Wt(c[i>>2]|0,84,c[h>>2]|0,c[f>>2]|0)|0;sy(c[g>>2]|0,c[f>>2]|0);l=e;return}function uA(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l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))break;if(((d[(c[t>>2]|0)+8>>0]|0|0)==(c[m>>2]|0)?(d[(c[t>>2]|0)+9>>0]|0|0)==(c[o>>2]|0):0)?uD(c[(c[t>>2]|0)+16>>2]|0,c[n>>2]|0)|0:0)NC(c[u>>2]|0,c[t>>2]|0,c[p>>2]|0,c[q>>2]|0,c[r>>2]|0,c[s>>2]|0);c[t>>2]=c[(c[t>>2]|0)+32>>2]}l=v;return}function wA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if((c[f>>2]|0)<=0){l=h;return}Wt(c[(c[e>>2]|0)+8>>2]|0,145,c[f>>2]|0,c[g>>2]|0)|0;l=h;return}function xA(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=a;c[g>>2]=b;c[h>>2]=e;if(d[(c[f>>2]|0)+23>>0]|0|0?ky(c[g>>2]|0)|0:0){Hy(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0,0);l=i;return}ay(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);l=i;return}function yA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+20|0;d=j+16|0;e=j+12|0;f=j+8|0;g=j+4|0;h=j;c[k>>2]=a;c[d>>2]=b;a=c[k>>2]|0;if(c[(c[k>>2]|0)+124>>2]|0)a=c[a+124>>2]|0;c[e>>2]=a;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[e>>2]|0)+412>>2]|0))break;if((c[d>>2]|0)==(c[(c[(c[e>>2]|0)+460>>2]|0)+(c[f>>2]<<2)>>2]|0)){i=10;break}c[f>>2]=(c[f>>2]|0)+1}if((i|0)==10){l=j;return}c[g>>2]=(c[(c[e>>2]|0)+412>>2]|0)+1<<2;k=c[g>>2]|0;c[h>>2]=Qd(c[(c[e>>2]|0)+460>>2]|0,k,((k|0)<0)<<31>>31)|0;if(c[h>>2]|0){c[(c[e>>2]|0)+460>>2]=c[h>>2];h=c[d>>2]|0;i=c[(c[e>>2]|0)+460>>2]|0;g=(c[e>>2]|0)+412|0;k=c[g>>2]|0;c[g>>2]=k+1;c[i+(k<<2)>>2]=h;l=j;return}else{yd(c[c[e>>2]>>2]|0);l=j;return}}function zA(f,g,h,i,j,k,m,n,o,p,q,r){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;r=r|0;var s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;na=l;l=l+192|0;C=na;E=na+176|0;F=na+172|0;G=na+168|0;H=na+164|0;I=na+160|0;J=na+156|0;K=na+152|0;L=na+183|0;M=na+182|0;N=na+148|0;O=na+144|0;s=na+140|0;P=na+136|0;Q=na+132|0;R=na+128|0;S=na+124|0;T=na+120|0;U=na+116|0;t=na+112|0;V=na+108|0;u=na+104|0;W=na+100|0;X=na+96|0;Y=na+92|0;Z=na+88|0;_=na+181|0;$=na+180|0;aa=na+84|0;v=na+80|0;w=na+76|0;x=na+72|0;y=na+68|0;z=na+64|0;A=na+60|0;B=na+56|0;ba=na+52|0;ca=na+48|0;da=na+44|0;ea=na+40|0;fa=na+36|0;ga=na+32|0;ha=na+28|0;ia=na+24|0;ja=na+20|0;ka=na+16|0;la=na+12|0;ma=na+8|0;c[E>>2]=f;c[F>>2]=g;c[G>>2]=h;c[H>>2]=i;c[I>>2]=j;c[J>>2]=k;c[K>>2]=m;a[L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2];while(1){if(!(c[Q>>2]|0))break c;if((d[(c[Q>>2]|0)+54>>0]|0)==4)break;if((d[(c[Q>>2]|0)+54>>0]|0)==3)break;c[Q>>2]=c[(c[Q>>2]|0)+20>>2]}c[Y>>2]=Tt(c[P>>2]|0,13)|0}while(0);Xt(c[P>>2]|0,33,c[H>>2]|0,c[A>>2]|0,c[J>>2]|0)|0;switch(c[V>>2]|0){case 3:case 2:case 1:{D=55;break}case 5:{c[B>>2]=0;if(c[(c[S>>2]|0)+24>>2]&262144|0)c[B>>2]=mA(c[E>>2]|0,c[F>>2]|0,109,0,0)|0;if(!(c[B>>2]|0)?!(FC(c[E>>2]|0,c[F>>2]|0,0,0)|0):0){if(c[(c[F>>2]|0)+8>>2]|0){GC(c[E>>2]|0);IC(c[E>>2]|0,c[F>>2]|0,c[H>>2]|0,c[I>>2]|0,0,-1)}}else{GC(c[E>>2]|0);HC(c[E>>2]|0,c[F>>2]|0,c[B>>2]|0,c[H>>2]|0,c[I>>2]|0,c[J>>2]|0,1,0,5,1,-1)}c[W>>2]=1;break}case 4:{sx(c[P>>2]|0,c[N>>2]|0)|0;break}default:{c[V>>2]=2;D=55}}if((D|0)==55)EC(c[E>>2]|0,c[V>>2]|0,c[F>>2]|0);ux(c[P>>2]|0,c[A>>2]|0);if(c[Y>>2]|0){c[Z>>2]=Tt(c[P>>2]|0,13)|0;tx(c[P>>2]|0,c[Y>>2]|0)}}c[U>>2]=0;c[Q>>2]=c[(c[F>>2]|0)+8>>2];while(1){if(!(c[Q>>2]|0))break;do if(c[(c[G>>2]|0)+(c[U>>2]<<2)>>2]|0){if(!(d[$>>0]|0)){uA(c[P>>2]|0,c[F>>2]|0,(c[J>>2]|0)+1|0);a[$>>0]=1}c[da>>2]=(c[I>>2]|0)+(c[U>>2]|0);c[ea>>2]=qx(c[P>>2]|0)|0;if(c[(c[Q>>2]|0)+36>>2]|0){Wt(c[P>>2]|0,79,0,c[(c[G>>2]|0)+(c[U>>2]<<2)>>2]|0)|0;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(d[(c[o>>2]|0)+42>>0]&32|0){l=E;return}c[z>>2]=(c[r>>2]|0)+1;c[A>>2]=Uu(c[D>>2]|0)|0;Xt(c[w>>2]|0,99,c[z>>2]|0,b[(c[o>>2]|0)+34>>1]|0,c[A>>2]|0)|0;if(!(a[C>>0]|0))uA(c[w>>2]|0,c[o>>2]|0,0);fy(c[D>>2]|0,c[z>>2]|0,b[(c[o>>2]|0)+34>>1]|0);if(a[(c[D>>2]|0)+18>>0]|0)a[y>>0]=0;else{a[y>>0]=1;a[y>>0]=d[y>>0]|(c[t>>2]|0?4:2)}if(c[u>>2]|0)a[y>>0]=d[y>>0]|8;if(c[v>>2]|0)a[y>>0]=d[y>>0]|16;Xt(c[w>>2]|0,115,c[p>>2]|0,c[A>>2]|0,c[r>>2]|0)|0;if(!(a[(c[D>>2]|0)+18>>0]|0))$t(c[w>>2]|0,-1,c[o>>2]|0,-20);px(c[w>>2]|0,a[y>>0]|0);l=E;return}function CA(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[(c[b>>2]|0)+120>>2]|0)){l=d;return}DA(c[b>>2]|0);l=d;return}function DA(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[d>>2]=b;c[f>>2]=c[(c[d>>2]|0)+8>>2];c[g>>2]=c[c[d>>2]>>2];c[e>>2]=c[(c[d>>2]|0)+120>>2];while(1){if(!(c[e>>2]|0)){b=5;break}c[i>>2]=(c[(c[g>>2]|0)+16>>2]|0)+(c[(c[e>>2]|0)+8>>2]<<4);c[k>>2]=c[(c[e>>2]|0)+12>>2];c[j>>2]=Uu(c[d>>2]|0)|0;nx(c[d>>2]|0,0,c[(c[e>>2]|0)+8>>2]|0,c[(c[(c[i>>2]|0)+12>>2]|0)+72>>2]|0,105);c[h>>2]=sz(c[f>>2]|0,5,30890,0)|0;if(!(c[h>>2]|0)){b=5;break}c[(c[h>>2]|0)+4>>2]=(c[k>>2]|0)+1;c[(c[h>>2]|0)+20+8>>2]=(c[k>>2]|0)+1;c[(c[h>>2]|0)+40+4>>2]=(c[k>>2]|0)-1;c[(c[h>>2]|0)+40+12>>2]=c[j>>2];c[(c[h>>2]|0)+60+8>>2]=c[j>>2];c[(c[h>>2]|0)+60+12>>2]=(c[k>>2]|0)+1;a[(c[h>>2]|0)+60+3>>0]=8;Wu(c[d>>2]|0,c[j>>2]|0);c[e>>2]=c[c[e>>2]>>2]}if((b|0)==5){l=m;return}}function EA(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+24|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;g=o;c[h>>2]=a;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[i>>2]|0)+20>>2]|0)){a=8;break}c[g>>2]=c[(c[i>>2]|0)+36+(c[m>>2]<<3)>>2];if((c[(c[j>>2]|0)+(c[g>>2]<<2)>>2]|0)>=0){a=4;break}if(c[k>>2]|0?(c[g>>2]|0)==(b[(c[h>>2]|0)+32>>1]|0):0){a=6;break}c[m>>2]=(c[m>>2]|0)+1}if((a|0)==4){c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}else if((a|0)==6){c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}else if((a|0)==8){c[n>>2]=0;n=c[n>>2]|0;l=o;return n|0}return 0} +function Bb(a){a=a|0;var b=0;b=l;l=l+a|0;l=l+15&-16;return b|0}function Cb(){return l|0}function Db(a){a=a|0;l=a}function Eb(a,b){a=a|0;b=b|0;l=a;m=b}function Fb(a,b){a=a|0;b=b|0;if(!o){o=a;p=b}}function Gb(a){a=a|0;z=a}function Hb(){return z|0}function Ib(b){b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=b;c[f>>2]=0;while(1){if((c[f>>2]|0)>>>0>=40)break;c[g>>2]=0;switch(d[328+((c[f>>2]|0)*12|0)+5>>0]|0){case 1:{c[g>>2]=c[e>>2];break}case 2:{c[g>>2]=-1;break}default:{}}TI(c[e>>2]|0,c[328+((c[f>>2]|0)*12|0)>>2]|0,a[328+((c[f>>2]|0)*12|0)+4>>0]|0,d[328+((c[f>>2]|0)*12|0)+6>>0]|0,c[g>>2]|0,c[328+((c[f>>2]|0)*12|0)+8>>2]|0,0,0)|0;c[f>>2]=(c[f>>2]|0)+1}c[f>>2]=0;while(1){if((c[f>>2]|0)>>>0>=6)break;c[h>>2]=0;switch(d[808+(c[f>>2]<<4)+5>>0]|0){case 1:{c[h>>2]=c[e>>2];break}case 2:{c[h>>2]=-1;break}default:{}}TI(c[e>>2]|0,c[808+(c[f>>2]<<4)>>2]|0,a[808+(c[f>>2]<<4)+4>>0]|0,1,c[h>>2]|0,0,c[808+(c[f>>2]<<4)+8>>2]|0,c[808+(c[f>>2]<<4)+12>>2]|0)|0;c[f>>2]=(c[f>>2]|0)+1}l=i;return 0}function Jb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,378,16110);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+H(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Kb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,379,16119);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+I(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Lb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,380,16128);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+J(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Mb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;h[i>>3]=0.0;if((c[k>>2]|0)!=2)Ea(16137,16086,570,16145);if((fi(c[c[f>>2]>>2]|0)|0)!=5?(fi(c[(c[f>>2]|0)+4>>2]|0)|0)!=5:0){h[g>>3]=+mi(c[c[f>>2]>>2]|0);h[i>>3]=+mi(c[(c[f>>2]|0)+4>>2]|0);hi(c[e>>2]|0,+K(+(+h[g>>3]),+(+h[i>>3])));l=j;return}Ui(c[e>>2]|0);l=j;return}function Nb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,394,16154);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+LQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Ob(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,402,16164);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+GQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Pb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,410,16174);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+OQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Qb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+64|0;j=o+32|0;p=o+28|0;k=o+24|0;m=o+20|0;n=o+16|0;f=o+12|0;g=o+8|0;h=o+4|0;i=o;c[j>>2]=b;c[p>>2]=d;c[k>>2]=e;c[m>>2]=o+48;c[n>>2]=o+40;c[f>>2]=0;c[g>>2]=0;if((c[p>>2]|0)!=2)Ea(16137,16086,1680,16184);if((fi(c[c[k>>2]>>2]|0)|0)!=5?(fi(c[(c[k>>2]|0)+4>>2]|0)|0)!=5:0){c[h>>2]=wh(c[c[k>>2]>>2]|0)|0;c[i>>2]=wh(c[(c[k>>2]|0)+4>>2]|0)|0;Mc(c[h>>2]|0,c[m>>2]|0);Mc(c[i>>2]|0,c[n>>2]|0);c[g>>2]=0;while(1){if((c[g>>2]|0)>=4)break;p=Nc(c[m>>2]|0)|0;if((p|0)==(Nc(c[n>>2]|0)|0))c[f>>2]=(c[f>>2]|0)+1;do{p=(c[m>>2]|0)+1|0;c[m>>2]=p}while((192&a[p>>0]|0)==128);do{p=(c[n>>2]|0)+1|0;c[n>>2]=p}while((192&a[p>>0]|0)==128);c[g>>2]=(c[g>>2]|0)+1}Ch(c[j>>2]|0,c[f>>2]|0);l=o;return}Ui(c[j>>2]|0);l=o;return}function Rb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,498,16588);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+Oc(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Sb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,499,16600);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+Pc(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Tb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,420,16612);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+E(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Ub(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,419,16620);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+F(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Vb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,421,16628);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+G(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Wb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,422,16636);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+Qc(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Xb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,446,16644);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+PQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Yb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,438,16653);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+MQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function Zb(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,454,16662);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+KQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function _b(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,456,16671);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+Rc(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function $b(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,474,16680);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+L(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function ac(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,472,16688);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+M(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function bc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,473,16696);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+FQ(+h[g>>3]);k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function cc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0;k=l;l=l+48|0;e=k+32|0;m=k+28|0;f=k+24|0;g=k+16|0;i=k+8|0;j=k;c[e>>2]=a;c[m>>2]=b;c[f>>2]=d;h[g>>3]=0.0;h[i>>3]=0.0;if((c[m>>2]|0)!=2)Ea(16137,16086,546,16706);if((fi(c[c[f>>2]>>2]|0)|0)!=5?(fi(c[(c[f>>2]|0)+4>>2]|0)|0)!=5:0){h[g>>3]=+mi(c[c[f>>2]>>2]|0);h[i>>3]=+mi(c[(c[f>>2]|0)+4>>2]|0);c[(_P()|0)>>2]=0;h[j>>3]=+D(+(+h[g>>3]),+(+h[i>>3]));m=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(m){hi(a,+h[j>>3]);l=k;return}else{m=oQ(c[(_P()|0)>>2]|0)|0;yh(a,m,c[(_P()|0)>>2]|0);l=k;return}}Ui(c[e>>2]|0);l=k;return}function dc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;i=j+24|0;k=j+20|0;e=j+16|0;f=j+8|0;g=j;c[i>>2]=a;c[k>>2]=b;c[e>>2]=d;h[f>>3]=0.0;d=g;c[d>>2]=0;c[d+4>>2]=0;if((c[k>>2]|0)!=1)Ea(16078,16086,590,16716);switch(fi(c[c[e>>2]>>2]|0)|0){case 1:{k=g;c[k>>2]=ki(c[c[e>>2]>>2]|0)|0;c[k+4>>2]=z;k=g;f=c[k+4>>2]|0;if((f|0)>0|(f|0)==0&(c[k>>2]|0)>>>0>0)a=1;else a=(c[g+4>>2]|0)<0?-1:0;k=g;c[k>>2]=a;c[k+4>>2]=((a|0)<0)<<31>>31;k=g;gi(c[i>>2]|0,c[k>>2]|0,c[k+4>>2]|0);l=j;return}case 5:{Ui(c[i>>2]|0);l=j;return}default:{h[f>>3]=+mi(c[c[e>>2]>>2]|0);if(+h[f>>3]>0.0)a=1;else a=+h[f>>3]<0.0?-1:0;h[f>>3]=+(a|0);hi(c[i>>2]|0,+h[f>>3]);l=j;return}}}function ec(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,375,16725);if((fi(c[c[f>>2]>>2]|0)|0)==5){Ui(c[e>>2]|0);l=j;return}h[g>>3]=+mi(c[c[f>>2]>>2]|0);c[(_P()|0)>>2]=0;h[i>>3]=+C(+(+h[g>>3]));k=(c[(_P()|0)>>2]|0)==0;a=c[e>>2]|0;if(k){hi(a,+h[i>>3]);l=j;return}else{k=oQ(c[(_P()|0)>>2]|0)|0;yh(a,k,c[(_P()|0)>>2]|0);l=j;return}}function fc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+24|0;k=j+20|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;d=g;c[d>>2]=0;c[d+4>>2]=0;h[i>>3]=0.0;if((c[k>>2]|0)!=1)Ea(16078,16086,514,16734);switch(fi(c[c[f>>2]>>2]|0)|0){case 1:{i=g;c[i>>2]=ki(c[c[f>>2]>>2]|0)|0;c[i+4>>2]=z;f=c[e>>2]|0;i=g;k=g;gi(f,RR(c[i>>2]|0,c[i+4>>2]|0,c[k>>2]|0,c[k+4>>2]|0)|0,z);l=j;return}case 5:{Ui(c[e>>2]|0);l=j;return}default:{h[i>>3]=+mi(c[c[f>>2]>>2]|0);hi(c[e>>2]|0,+h[i>>3]*+h[i>>3]);l=j;return}}}function gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0.0;j=l;l=l+48|0;e=j+32|0;k=j+28|0;f=j+24|0;g=j+16|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;d=j+8|0;c[d>>2]=0;c[d+4>>2]=0;if((c[k>>2]|0)!=1)Ea(16078,16086,620,16745);switch(fi(c[c[f>>2]>>2]|0)|0){case 1:{k=i;c[k>>2]=ki(c[c[f>>2]>>2]|0)|0;c[k+4>>2]=z;k=i;gi(c[e>>2]|0,c[k>>2]|0,c[k+4>>2]|0);l=j;return}case 5:{Ui(c[e>>2]|0);l=j;return}default:{h[g>>3]=+mi(c[c[f>>2]>>2]|0);m=+N(+(+h[g>>3]));gi(c[e>>2]|0,~~m>>>0,+B(m)>=1.0?(m>0.0?~~+P(+A(m/4294967296.0),4294967295.0)>>>0:~~+N((m-+(~~m>>>0))/4294967296.0)>>>0):0);l=j;return}}}function hc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0.0;j=l;l=l+48|0;e=j+32|0;k=j+28|0;f=j+24|0;g=j+16|0;i=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=d;h[g>>3]=0.0;d=j+8|0;c[d>>2]=0;c[d+4>>2]=0;if((c[k>>2]|0)!=1)Ea(16078,16086,645,16754);switch(fi(c[c[f>>2]>>2]|0)|0){case 1:{k=i;c[k>>2]=ki(c[c[f>>2]>>2]|0)|0;c[k+4>>2]=z;k=i;gi(c[e>>2]|0,c[k>>2]|0,c[k+4>>2]|0);l=j;return}case 5:{Ui(c[e>>2]|0);l=j;return}default:{h[g>>3]=+mi(c[c[f>>2]>>2]|0);m=+A(+(+h[g>>3]));gi(c[e>>2]|0,~~m>>>0,+B(m)>=1.0?(m>0.0?~~+P(+A(m/4294967296.0),4294967295.0)>>>0:~~+N((m-+(~~m>>>0))/4294967296.0)>>>0):0);l=j;return}}}function ic(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+8|0;c[f>>2]=a;c[e+4>>2]=b;c[e>>2]=d;hi(c[f>>2]|0,3.141592653589793);l=e;return}function jc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+64|0;g=n+48|0;o=n+44|0;h=n+40|0;i=n+36|0;j=n+32|0;k=n+24|0;m=n+16|0;e=n+8|0;f=n;c[g>>2]=a;c[o>>2]=b;c[h>>2]=d;d=f;c[d>>2]=0;c[d+4>>2]=0;if((c[o>>2]|0)!=2){l=n;return}if(5==(fi(c[c[h>>2]>>2]|0)|0)){l=n;return}d=ki(c[(c[h>>2]|0)+4>>2]|0)|0;o=k;c[o>>2]=d;c[o+4>>2]=z;if((c[k+4>>2]|0)<0){yh(c[g>>2]|0,16764,-1);l=n;return}d=xh(c[c[h>>2]>>2]|0)|0;o=m;c[o>>2]=d;c[o+4>>2]=((d|0)<0)<<31>>31;o=m;d=k;d=RR(c[o>>2]|0,c[o+4>>2]|0,c[d>>2]|0,c[d+4>>2]|0)|0;o=e;c[o>>2]=d;c[o+4>>2]=z;o=e;o=IR(c[o>>2]|0,c[o+4>>2]|0,1,0)|0;c[i>>2]=Yd(o)|0;o=m;o=IR(c[o>>2]|0,c[o+4>>2]|0,1,0)|0;c[j>>2]=Yd(o)|0;if((c[i>>2]|0)!=0&(c[j>>2]|0)!=0){o=c[j>>2]|0;xQ(o,wh(c[c[h>>2]>>2]|0)|0)|0;o=f;c[o>>2]=0;c[o+4>>2]=0;while(1){h=f;e=c[h+4>>2]|0;o=k;d=c[o+4>>2]|0;if(!((e|0)<(d|0)|((e|0)==(d|0)?(c[h>>2]|0)>>>0<(c[o>>2]|0)>>>0:0)))break;o=c[i>>2]|0;d=f;h=m;h=RR(c[d>>2]|0,c[d+4>>2]|0,c[h>>2]|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2]=0;if((c[q>>2]|0)!=2)Ea(16137,16086,1073,16809);if(5!=(fi(c[c[j>>2]>>2]|0)|0)?5!=(fi(c[(c[j>>2]|0)+4>>2]|0)|0):0){c[o>>2]=wh(c[c[j>>2]>>2]|0)|0;c[n>>2]=vi(c[(c[j>>2]|0)+4>>2]|0)|0;c[g>>2]=c[o>>2];a:while(1){if(!(Nc(c[g>>2]|0)|0))break;q=c[k>>2]|0;c[k>>2]=q+1;if((q|0)>=(c[n>>2]|0))break;while(1){q=(c[g>>2]|0)+1|0;c[g>>2]=q;if((192&(d[q>>0]|0)|0)!=128)continue a}}c[m>>2]=(c[g>>2]|0)-(c[o>>2]|0);c[h>>2]=Yd((c[g>>2]|0)-(c[o>>2]|0)+1|0)|0;if(c[h>>2]|0){EQ(c[h>>2]|0,c[o>>2]|0,(c[g>>2]|0)-(c[o>>2]|0)|0)|0;a[(c[h>>2]|0)+(c[m>>2]|0)>>0]=0;ci(c[i>>2]|0,c[h>>2]|0,-1,-1);Kd(c[h>>2]|0);l=p;return}else{bi(c[i>>2]|0);l=p;return}}Ui(c[i>>2]|0);l=p;return}function mc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;i=p+36|0;q=p+32|0;j=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;o=p+12|0;f=p+8|0;g=p+4|0;h=p;c[i>>2]=b;c[q>>2]=d;c[j>>2]=e;c[k>>2]=0;c[m>>2]=0;c[n>>2]=0;if((c[q>>2]|0)!=2)Ea(16137,16086,1113,16818);if(5!=(fi(c[c[j>>2]>>2]|0)|0)?5!=(fi(c[(c[j>>2]|0)+4>>2]|0)|0):0){c[o>>2]=wh(c[c[j>>2]>>2]|0)|0;c[k>>2]=vi(c[(c[j>>2]|0)+4>>2]|0)|0;c[f>>2]=c[o>>2];while(1){if(!(Nc(c[f>>2]|0)|0))break;do{q=(c[f>>2]|0)+1|0;c[f>>2]=q}while((192&a[q>>0]|0)==128);c[m>>2]=(c[m>>2]|0)+1}c[g>>2]=c[f>>2];c[f>>2]=c[o>>2];q=(c[m>>2]|0)-(c[k>>2]|0)|0;c[n>>2]=q;c[n>>2]=(c[n>>2]|0)<0?0:q;a:while(1){q=c[n>>2]|0;c[n>>2]=q+-1;if((q|0)<=0)break;while(1){q=(c[f>>2]|0)+1|0;c[f>>2]=q;if((192&a[q>>0]|0)!=128)continue a}}c[h>>2]=Yd((c[g>>2]|0)-(c[f>>2]|0)+1|0)|0;if(c[h>>2]|0){xQ(c[h>>2]|0,c[f>>2]|0)|0;ci(c[i>>2]|0,c[h>>2]|0,-1,-1);Kd(c[h>>2]|0);l=p;return}else{bi(c[i>>2]|0);l=p;return}}Ui(c[i>>2]|0);l=p;return}function nc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+48|0;h=o+32|0;p=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;m=o+12|0;n=o+8|0;f=o+4|0;g=o;c[h>>2]=b;c[p>>2]=d;c[i>>2]=e;c[f>>2]=0;c[g>>2]=0;if(1!=(c[p>>2]|0))Ea(16828,16086,1323,16836);if(5==(fi(c[c[i>>2]>>2]|0)|0)){Ui(c[h>>2]|0);l=o;return}c[j>>2]=wh(c[c[i>>2]>>2]|0)|0;c[f>>2]=lQ(c[j>>2]|0)|0;c[m>>2]=Yd((c[f>>2]|0)+1|0)|0;if(!(c[m>>2]|0)){bi(c[h>>2]|0);l=o;return}c[n>>2]=(c[m>>2]|0)+(c[f>>2]|0);p=c[n>>2]|0;c[n>>2]=p+-1;a[p>>0]=0;c[k>>2]=c[j>>2];a:while(1){if(!(Nc(c[k>>2]|0)|0))break;c[j>>2]=c[k>>2];do{p=(c[k>>2]|0)+1|0;c[k>>2]=p}while((192&a[p>>0]|0)==128);c[g>>2]=1;while(1){if(((c[k>>2]|0)+(0-(c[g>>2]|0))|0)>>>0<(c[j>>2]|0)>>>0)continue a;i=a[(c[k>>2]|0)+(0-(c[g>>2]|0))>>0]|0;p=c[n>>2]|0;c[n>>2]=p+-1;a[p>>0]=i;c[g>>2]=(c[g>>2]|0)+1}}ci(c[h>>2]|0,c[m>>2]|0,-1,-1);Kd(c[m>>2]|0);l=o;return}function oc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+32|0;h=n+24|0;o=n+20|0;f=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n+28|0;g=n;c[h>>2]=b;c[o>>2]=d;c[f>>2]=e;c[g>>2]=1;if((c[o>>2]|0)!=1)Ea(16078,16086,724,16848);if(5==(fi(c[c[f>>2]>>2]|0)|0)){Ui(c[h>>2]|0);l=n;return}c[i>>2]=wh(c[c[f>>2]>>2]|0)|0;c[j>>2]=Tc(c[i>>2]|0)|0;if(!(c[j>>2]|0)){bi(c[h>>2]|0);l=n;return}c[k>>2]=c[j>>2];while(1){o=c[i>>2]|0;c[i>>2]=o+1;o=a[o>>0]|0;a[m>>0]=o;if(!(o<<24>>24))break;if(XQ(a[m>>0]|0)|0)c[g>>2]=1;else{b=a[m>>0]|0;if((c[g>>2]|0)==1)a[m>>0]=pR(b)|0;else a[m>>0]=BQ(b)|0;c[g>>2]=0}f=a[m>>0]|0;o=c[k>>2]|0;c[k>>2]=o+1;a[o>>0]=f}a[c[k>>2]>>0]=0;ci(c[h>>2]|0,c[j>>2]|0,-1,-1);Kd(c[j>>2]|0);l=n;return}function pc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+48|0;n=o+40|0;p=o+36|0;f=o+32|0;h=o+8|0;i=o;j=o+28|0;k=o+24|0;m=o+20|0;g=o+16|0;c[n>>2]=b;c[p>>2]=d;c[f>>2]=e;c[j>>2]=0;if((c[p>>2]|0)!=2)Ea(16137,16086,771,16859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(!((d|0)<(e|0)|((d|0)==(e|0)?f>>>0<=(c[q>>2]|0)>>>0:0)))break;c[i>>2]=b+1;a[b>>0]=32;c[m>>2]=(c[m>>2]|0)+1}xQ(b,c[g>>2]|0)|0;c[i>>2]=(c[i>>2]|0)+(c[h>>2]|0);while(1){f=c[m>>2]|0;h=k;h=IR(f|0,((f|0)<0)<<31>>31|0,c[h>>2]|0,c[h+4>>2]|0)|0;f=z;q=j;g=c[q+4>>2]|0;b=c[i>>2]|0;if(!((f|0)<(g|0)|((f|0)==(g|0)?h>>>0<=(c[q>>2]|0)>>>0:0)))break;c[i>>2]=b+1;a[b>>0]=32;c[m>>2]=(c[m>>2]|0)+1}a[b>>0]=0}while(0);ci(c[o>>2]|0,c[n>>2]|0,-1,-1);Kd(c[n>>2]|0);l=p;return}function sc(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+48|0;k=r+44|0;s=r+40|0;m=r+36|0;n=r+32|0;o=r+28|0;p=r+24|0;q=r+20|0;f=r+16|0;g=r+12|0;h=r+8|0;i=r+4|0;j=r;c[k>>2]=b;c[s>>2]=d;c[m>>2]=e;c[i>>2]=0;c[j>>2]=0;if((c[s>>2]|0)!=2)Ea(16137,16086,939,16914);if((fi(c[c[m>>2]>>2]|0)|0)!=5?(fi(c[(c[m>>2]|0)+4>>2]|0)|0)!=5:0){c[n>>2]=wh(c[c[m>>2]>>2]|0)|0;c[o>>2]=wh(c[(c[m>>2]|0)+4>>2]|0)|0;c[g>>2]=Yd((lQ(c[n>>2]|0)|0)+1|0)|0;if(!(c[g>>2]|0)){bi(c[k>>2]|0);l=r;return}c[h>>2]=c[g>>2];c[p>>2]=c[n>>2];a:while(1){s=Nc(c[p>>2]|0)|0;c[i>>2]=s;if(!s)break;c[q>>2]=c[o>>2];b:while(1){s=Nc(c[q>>2]|0)|0;c[j>>2]=s;if(!s)break;if((c[j>>2]|0)==(c[i>>2]|0))break;while(1){s=(c[q>>2]|0)+1|0;c[q>>2]=s;if((192&a[s>>0]|0)!=128)continue b}}if(c[j>>2]|0){c[f>>2]=c[q>>2];do{s=(c[f>>2]|0)+1|0;c[f>>2]=s}while((192&a[s>>0]|0)==128);EQ(c[h>>2]|0,c[q>>2]|0,(c[f>>2]|0)-(c[q>>2]|0)|0)|0;c[h>>2]=(c[h>>2]|0)+((c[f>>2]|0)-(c[q>>2]|0))}while(1){s=(c[p>>2]|0)+1|0;c[p>>2]=s;if((192&a[s>>0]|0)!=128)continue a}}a[c[h>>2]>>0]=0;ci(c[k>>2]|0,c[g>>2]|0,-1,-1);Kd(c[g>>2]|0);l=r;return}Ui(c[k>>2]|0);l=r;return}function tc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;e=k+28|0;m=k+24|0;f=k+20|0;g=k+16|0;i=k+8|0;j=k;c[e>>2]=a;c[m>>2]=b;c[f>>2]=d;if((c[m>>2]|0)!=1)Ea(16078,16086,1395,16928);c[g>>2]=$h(c[e>>2]|0,24)|0;if(5==(ji(c[c[f>>2]>>2]|0)|0)){l=k;return}m=(c[g>>2]|0)+16|0;e=m;e=IR(c[e>>2]|0,c[e+4>>2]|0,1,0)|0;c[m>>2]=e;c[m+4>>2]=z;h[j>>3]=+mi(c[c[f>>2]>>2]|0);h[i>>3]=+h[j>>3]-+h[c[g>>2]>>3];f=(c[g>>2]|0)+16|0;m=c[g>>2]|0;h[m>>3]=+h[m>>3]+ +h[i>>3]/(+((c[f>>2]|0)>>>0)+4294967296.0*+(c[f+4>>2]|0));m=(c[g>>2]|0)+8|0;h[m>>3]=+h[m>>3]+ +h[i>>3]*(+h[j>>3]-+h[c[g>>2]>>3]);l=k;return}function uc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0.0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(c[d>>2]|0?(a=(c[d>>2]|0)+16|0,f=c[a+4>>2]|0,(f|0)>0|(f|0)==0&(c[a>>2]|0)>>>0>1):0){b=c[b>>2]|0;g=+h[(c[d>>2]|0)+8>>3];f=(c[d>>2]|0)+16|0;f=FR(c[f>>2]|0,c[f+4>>2]|0,1,0)|0;hi(b,+C(+(g/(+(f>>>0)+4294967296.0*+(z|0)))));l=e;return}hi(c[b>>2]|0,0.0);l=e;return}function vc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0.0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(c[d>>2]|0?(a=(c[d>>2]|0)+16|0,f=c[a+4>>2]|0,(f|0)>0|(f|0)==0&(c[a>>2]|0)>>>0>1):0){b=c[b>>2]|0;g=+h[(c[d>>2]|0)+8>>3];f=(c[d>>2]|0)+16|0;f=FR(c[f>>2]|0,c[f+4>>2]|0,1,0)|0;hi(b,g/(+(f>>>0)+4294967296.0*+(z|0)));l=e;return}hi(c[b>>2]|0,0.0);l=e;return}function wc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+80|0;e=q+64|0;r=q+60|0;j=q+56|0;m=q+52|0;n=q+8|0;o=q;p=q+48|0;k=q+44|0;f=q+40|0;g=q+28|0;i=q+16|0;c[e>>2]=a;c[r>>2]=b;c[j>>2]=d;d=n;c[d>>2]=0;c[d+4>>2]=0;h[o>>3]=0.0;if((c[r>>2]|0)!=1)Ea(16078,16086,1418,16941);c[f>>2]=ji(c[c[j>>2]>>2]|0)|0;if((c[f>>2]|0)==5){l=q;return}c[m>>2]=$h(c[e>>2]|0,64)|0;do if(!(c[(c[m>>2]|0)+56>>2]|0)){a=yR(1,12)|0;c[(c[m>>2]|0)+56>>2]=a;a=c[m>>2]|0;if((c[f>>2]|0)==1){r=c[a+56>>2]|0;Bc(g,176);c[r>>2]=c[g>>2];c[r+4>>2]=c[g+4>>2];c[r+8>>2]=c[g+8>>2];r=(c[m>>2]|0)+48|0;c[r>>2]=0;c[r+4>>2]=0;break}else{r=a+48|0;c[r>>2]=1;c[r+4>>2]=0;r=c[(c[m>>2]|0)+56>>2]|0;Bc(i,177);c[r>>2]=c[i>>2];c[r+4>>2]=c[i+4>>2];c[r+8>>2]=c[i+8>>2];break}}while(0);r=(c[m>>2]|0)+16|0;a=r;a=IR(c[a>>2]|0,c[a+4>>2]|0,1,0)|0;c[r>>2]=a;c[r+4>>2]=z;r=(c[m>>2]|0)+48|0;a=c[c[j>>2]>>2]|0;if(0==(c[r>>2]|0)?0==(c[r+4>>2]|0):0){r=ki(a)|0;o=n;c[o>>2]=r;c[o+4>>2]=z;c[p>>2]=yR(1,8)|0;o=c[n+4>>2]|0;r=c[p>>2]|0;c[r>>2]=c[n>>2];c[r+4>>2]=o;Fc(c[(c[m>>2]|0)+56>>2]|0,c[p>>2]|0);l=q;return}else{h[o>>3]=+mi(a);c[k>>2]=yR(1,8)|0;h[c[k>>2]>>3]=+h[o>>3];Fc(c[(c[m>>2]|0)+56>>2]|0,c[k>>2]|0);l=q;return}}function xc(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(!(c[d>>2]|0)){l=e;return}if(!(c[(c[d>>2]|0)+56>>2]|0)){l=e;return}Hc(c[(c[d>>2]|0)+56>>2]|0,131,c[d>>2]|0);Jc(c[(c[d>>2]|0)+56>>2]|0);xR(c[(c[d>>2]|0)+56>>2]|0);a=(c[d>>2]|0)+40|0;if(!(1==(c[a>>2]|0)?0==(c[a+4>>2]|0):0)){l=e;return}f=(c[d>>2]|0)+48|0;b=c[b>>2]|0;a=c[d>>2]|0;if(0==(c[f>>2]|0)?0==(c[f+4>>2]|0):0){f=a;gi(b,c[f>>2]|0,c[f+4>>2]|0);l=e;return}else{hi(b,+h[a+8>>3]);l=e;return}}function yc(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(!(c[d>>2]|0)){l=e;return}a=(c[d>>2]|0)+16|0;h[(c[d>>2]|0)+24>>3]=(+((c[a>>2]|0)>>>0)+4294967296.0*+(c[a+4>>2]|0))/2.0;Wc(c[b>>2]|0);l=e;return}function zc(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(!(c[d>>2]|0)){l=e;return}a=(c[d>>2]|0)+16|0;h[(c[d>>2]|0)+24>>3]=(+((c[a>>2]|0)>>>0)+4294967296.0*+(c[a+4>>2]|0))/4.0;Wc(c[b>>2]|0);l=e;return}function Ac(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(!(c[d>>2]|0)){l=e;return}a=(c[d>>2]|0)+16|0;a=RR(c[a>>2]|0,c[a+4>>2]|0,3,0)|0;h[(c[d>>2]|0)+24>>3]=(+(a>>>0)+4294967296.0*+(z|0))/4.0;Wc(c[b>>2]|0);l=e;return}function Bc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+12|0;e=d;c[f>>2]=b;c[e+4>>2]=c[f>>2];c[e>>2]=0;c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];c[a+8>>2]=c[e+8>>2];l=d;return}function Cc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;f=l;l=l+16|0;h=f+12|0;g=f+8|0;e=f;c[h>>2]=a;c[g>>2]=b;c[f+4>>2]=d;c[e>>2]=yR(c[h>>2]|0,c[g>>2]|0)|0;l=f;return c[e>>2]|0}function Dc(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;xR(c[d>>2]|0);l=b;return}function Ec(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;g=j+12|0;h=j+8|0;i=j+4|0;f=j;c[e>>2]=a;c[g>>2]=b;c[h>>2]=d;if(!(c[c[e>>2]>>2]|0)){c[f>>2]=Cc(1,24,16069)|0;c[(c[f>>2]|0)+8>>2]=c[h>>2];i=(c[f>>2]|0)+16|0;c[i>>2]=1;c[i+4>>2]=0;c[c[e>>2]>>2]=c[f>>2];l=j;return}c[i>>2]=yb[c[g>>2]&255](c[(c[c[e>>2]>>2]|0)+8>>2]|0,c[h>>2]|0)|0;if(!(c[i>>2]|0)){i=(c[c[e>>2]>>2]|0)+16|0;g=i;g=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[i>>2]=g;c[i+4>>2]=z;Dc(c[h>>2]|0);l=j;return}a=c[c[e>>2]>>2]|0;if((c[i>>2]|0)>0){Ec(a,c[g>>2]|0,c[h>>2]|0);l=j;return}else{Ec(a+4|0,c[g>>2]|0,c[h>>2]|0);l=j;return}}function Fc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;Ec(c[f>>2]|0,c[(c[f>>2]|0)+4>>2]|0,c[e>>2]|0);l=d;return}function Gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(!(c[e>>2]|0)){l=h;return}if(c[c[e>>2]>>2]|0)Gc(c[c[e>>2]>>2]|0,c[f>>2]|0,c[g>>2]|0);d=(c[e>>2]|0)+16|0;Ab[c[f>>2]&255](c[(c[e>>2]|0)+8>>2]|0,c[d>>2]|0,c[d+4>>2]|0,c[g>>2]|0);if(!(c[(c[e>>2]|0)+4>>2]|0)){l=h;return}Gc(c[(c[e>>2]|0)+4>>2]|0,c[f>>2]|0,c[g>>2]|0);l=h;return}function Hc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;Gc(c[c[h>>2]>>2]|0,c[g>>2]|0,c[f>>2]|0);l=e;return}function Ic(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}Dc(c[(c[b>>2]|0)+8>>2]|0);if(c[c[b>>2]>>2]|0)Ic(c[c[b>>2]>>2]|0);if(c[(c[b>>2]|0)+4>>2]|0)Ic(c[(c[b>>2]|0)+4>>2]|0);Dc(c[b>>2]|0);l=d;return}function Jc(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Ic(c[c[d>>2]>>2]|0);l=b;return}function Kc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;g=l;l=l+32|0;d=g+24|0;i=g+20|0;h=g+16|0;e=g+8|0;f=g;c[i>>2]=a;c[h>>2]=b;i=c[i>>2]|0;a=c[i+4>>2]|0;b=e;c[b>>2]=c[i>>2];c[b+4>>2]=a;h=c[h>>2]|0;b=c[h+4>>2]|0;a=f;c[a>>2]=c[h>>2];c[a+4>>2]=b;a=e;b=f;if((c[a>>2]|0)==(c[b>>2]|0)?(c[a+4>>2]|0)==(c[b+4>>2]|0):0){c[d>>2]=0;i=c[d>>2]|0;l=g;return i|0}h=e;e=c[h+4>>2]|0;i=f;f=c[i+4>>2]|0;if((e|0)<(f|0)|((e|0)==(f|0)?(c[h>>2]|0)>>>0<(c[i>>2]|0)>>>0:0)){c[d>>2]=-1;i=c[d>>2]|0;l=g;return i|0}else{c[d>>2]=1;i=c[d>>2]|0;l=g;return i|0}return 0}function Lc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0;g=l;l=l+32|0;d=g+24|0;j=g+20|0;i=g+16|0;e=g+8|0;f=g;c[j>>2]=a;c[i>>2]=b;h[e>>3]=+h[c[j>>2]>>3];h[f>>3]=+h[c[i>>2]>>3];do if(!(+h[e>>3]==+h[f>>3]))if(+h[e>>3]<+h[f>>3]){c[d>>2]=-1;break}else{c[d>>2]=1;break}else c[d>>2]=0;while(0);l=g;return c[d>>2]|0}function Mc(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;f=k+16|0;i=k+12|0;g=k+8|0;j=k+4|0;h=k;c[f>>2]=b;c[i>>2]=e;c[g>>2]=0;while(1){if(!(d[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0))break;if(!((oR(d[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0)|0)!=0^1))break;c[g>>2]=(c[g>>2]|0)+1}if(!(a[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0)){xQ(c[i>>2]|0,16327)|0;l=k;return}e=(pR(d[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0)|0)&255;a[c[i>>2]>>0]=e;c[j>>2]=1;while(1){if((c[j>>2]|0)>=4)break;if(!(d[(c[f>>2]|0)+(c[g>>2]|0)>>0]|0))break;c[h>>2]=d[16199+(d[(c[f>>2]|0)+(c[g>>2]|0)>>0]&127)>>0];if((c[h>>2]|0)>0){m=(c[h>>2]|0)+48&255;b=c[i>>2]|0;e=c[j>>2]|0;c[j>>2]=e+1;a[b+e>>0]=m}c[g>>2]=(c[g>>2]|0)+1}while(1){b=c[i>>2]|0;e=c[j>>2]|0;if((c[j>>2]|0)>=4)break;c[j>>2]=e+1;a[b+e>>0]=48}a[b+e>>0]=0;l=k;return}function Nc(a){a=a|0;var b=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;b=h+8|0;e=h+4|0;f=h;c[b>>2]=a;a=c[b>>2]|0;c[b>>2]=a+1;c[e>>2]=d[a>>0];c[f>>2]=d[16332+(c[e>>2]|0)>>0];switch(c[f>>2]|0){case 4:{c[e>>2]=65533;g=c[e>>2]|0;l=h;return g|0}case 3:{a=c[e>>2]<<6;g=c[b>>2]|0;c[b>>2]=g+1;c[e>>2]=a+(d[g>>0]|0);g=4;break}case 2:{g=4;break}case 1:break;default:{g=c[e>>2]|0;l=h;return g|0}}if((g|0)==4){a=c[e>>2]<<6;g=c[b>>2]|0;c[b>>2]=g+1;c[e>>2]=a+(d[g>>0]|0)}a=c[e>>2]<<6;g=c[b>>2]|0;c[b>>2]=g+1;c[e>>2]=a+(d[g>>0]|0);c[e>>2]=(c[e>>2]|0)-(c[904+(c[f>>2]<<2)>>2]|0);if((c[920+(c[f>>2]<<2)>>2]&c[e>>2]|0?(c[e>>2]&-2048|0)!=55296:0)?(c[e>>2]&-2|0)!=65534:0){g=c[e>>2]|0;l=h;return g|0}c[e>>2]=65533;g=c[e>>2]|0;l=h;return g|0}function Oc(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;h[b>>3]=a;l=c;return +(+h[b>>3]*180.0/3.141592653589793)}function Pc(a){a=+a;var b=0,c=0;c=l;l=l+16|0;b=c;h[b>>3]=a;l=c;return +(+h[b>>3]*3.141592653589793/180.0)}function Qc(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=1.0/+G(+(+h[c>>3]));l=b;return +a}function Rc(a){a=+a;var b=0,c=0;b=l;l=l+16|0;c=b;h[c>>3]=a;a=1.0/+KQ(+h[c>>3]);l=b;return +a}function Sc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;m=t+40|0;n=t+36|0;o=t+32|0;p=t+28|0;q=t+24|0;r=t+20|0;g=t+16|0;h=t+12|0;i=t+8|0;j=t+4|0;k=t;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[q>>2]=f;c[r>>2]=0;c[g>>2]=-1;if(!(a[c[n>>2]>>0]|0)){c[m>>2]=-1;s=c[m>>2]|0;l=t;return s|0}a:while(1){if(!(Nc(c[o>>2]|0)|0))break;f=c[r>>2]|0;c[r>>2]=f+1;if((f|0)>=(c[p>>2]|0))break;while(1){f=(c[o>>2]|0)+1|0;c[o>>2]=f;if((192&a[f>>0]|0)!=128)continue a}}c[r>>2]=0;while(1){if(!(Nc(c[o>>2]|0)|0))break;c[h>>2]=c[n>>2];c[i>>2]=c[o>>2];do{c[j>>2]=Nc(c[h>>2]|0)|0;c[k>>2]=Nc(c[i>>2]|0)|0;do{f=(c[h>>2]|0)+1|0;c[h>>2]=f}while((192&a[f>>0]|0)==128);do{f=(c[i>>2]|0)+1|0;c[i>>2]=f}while((192&a[f>>0]|0)==128)}while((c[j>>2]|0?(c[j>>2]|0)==(c[k>>2]|0):0)&(c[k>>2]|0)!=0);if(!(c[j>>2]|0)){s=14;break}do{f=(c[o>>2]|0)+1|0;c[o>>2]=f}while((192&a[f>>0]|0)==128);c[r>>2]=(c[r>>2]|0)+1}if((s|0)==14)c[g>>2]=c[r>>2];if(c[q>>2]|0)c[c[q>>2]>>2]=c[o>>2];s=c[g>>2]|0;c[m>>2]=(c[g>>2]|0)>=0?s+(c[p>>2]|0)|0:s;s=c[m>>2]|0;l=t;return s|0}function Tc(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=Yd((lQ(c[d>>2]|0)|0)+1|0)|0;a=xQ(c[e>>2]|0,c[d>>2]|0)|0;l=b;return a|0}function Uc(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;i=j+4|0;h=j;c[f>>2]=b;c[g>>2]=e;c[i>>2]=0;if((c[g>>2]|0)>=0)c[h>>2]=(c[f>>2]|0)+(c[g>>2]|0);else c[h>>2]=-1;if((c[f>>2]|0)>>>0>(c[h>>2]|0)>>>0)Ea(16868,16086,316,16877);while(1){if(!(a[c[f>>2]>>0]|0)){b=10;break}if((c[f>>2]|0)>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+4>>2]=z;l=k;return}m=a+32|0;e=c[m+4>>2]|0;n=i;f=c[n+4>>2]|0;if(!((e|0)<(f|0)|((e|0)==(f|0)?(c[m>>2]|0)>>>0<(c[n>>2]|0)>>>0:0))){l=k;return}h[(c[j>>2]|0)+8>>3]=+h[g>>3];m=c[i+4>>2]|0;n=(c[j>>2]|0)+32|0;c[n>>2]=c[i>>2];c[n+4>>2]=m;n=(c[j>>2]|0)+40|0;c[n>>2]=1;c[n+4>>2]=0;l=k;return}}function Wc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;c[e>>2]=$h(c[b>>2]|0,0)|0;if(!(c[e>>2]|0)){l=f;return}if(!(c[(c[e>>2]|0)+56>>2]|0)){l=f;return}c[(c[e>>2]|0)+60>>2]=0;Hc(c[(c[e>>2]|0)+56>>2]|0,132,c[e>>2]|0);Jc(c[(c[e>>2]|0)+56>>2]|0);xR(c[(c[e>>2]|0)+56>>2]|0);d=(c[e>>2]|0)+48|0;if(!(0==(c[d>>2]|0)?0==(c[d+4>>2]|0):0)){d=(c[e>>2]|0)+40|0;hi(c[b>>2]|0,+h[(c[e>>2]|0)+8>>3]/(+((c[d>>2]|0)>>>0)+4294967296.0*+(c[d+4>>2]|0)));l=f;return}g=(c[e>>2]|0)+40|0;a=c[b>>2]|0;d=c[e>>2]|0;b=c[d>>2]|0;d=c[d+4>>2]|0;if(1==(c[g>>2]|0)?0==(c[g+4>>2]|0):0){gi(a,b,d);l=f;return}else{g=(c[e>>2]|0)+40|0;hi(a,(+(b>>>0)+4294967296.0*+(d|0))*1.0/(+((c[g>>2]|0)>>>0)+4294967296.0*+(c[g+4>>2]|0)));l=f;return}}function Xc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+64|0;k=q+56|0;n=q+32|0;r=q+52|0;o=q+24|0;p=q+16|0;g=q+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f=h;c[d>>2]=b;if(!(Zc(c[d>>2]|0,16957,7)|0))c[d>>2]=(c[d>>2]|0)+7;c[f>>2]=_c(c[d>>2]|0)|0;c[e>>2]=0;while(1){if((c[e>>2]|0)>=8){b=9;break}if((Zc(c[d>>2]|0,c[940+(c[e>>2]<<2)>>2]|0,c[f>>2]|0)|0)==0?($c(a[(c[940+(c[e>>2]<<2)>>2]|0)+(c[f>>2]|0)>>0]|0)|0)==0:0){b=7;break}c[e>>2]=(c[e>>2]|0)+1}if((b|0)==7){c[g>>2]=1;g=c[g>>2]|0;l=h;return g|0}else if((b|0)==9){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}return 0}function Zc(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m+20|0;f=m+16|0;g=m+12|0;h=m+8|0;i=m+4|0;j=m;c[f>>2]=a;c[g>>2]=b;c[h>>2]=e;a=c[g>>2]|0;if(!(c[f>>2]|0)){c[k>>2]=a|0?-1:0;k=c[k>>2]|0;l=m;return k|0}if(!a){c[k>>2]=1;k=c[k>>2]|0;l=m;return k|0}c[i>>2]=c[f>>2];c[j>>2]=c[g>>2];while(1){g=c[h>>2]|0;c[h>>2]=g+-1;if((g|0)<=0)break;if(!(d[c[i>>2]>>0]|0))break;if((d[17348+(d[c[i>>2]>>0]|0)>>0]|0|0)!=(d[17348+(d[c[j>>2]>>0]|0)>>0]|0|0))break;c[i>>2]=(c[i>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+1}if((c[h>>2]|0)<0)a=0;else a=(d[17348+(d[c[i>>2]>>0]|0)>>0]|0)-(d[17348+(d[c[j>>2]>>0]|0)>>0]|0)|0;c[k>>2]=a;k=c[k>>2]|0;l=m;return k|0}function _c(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;if(!(c[d>>2]|0))c[b>>2]=0;else c[b>>2]=1073741823&(lQ(c[d>>2]|0)|0);l=e;return c[b>>2]|0}function $c(b){b=b|0;var c=0,e=0;e=l;l=l+16|0;c=e;a[c>>0]=b;l=e;return ((d[16965+(d[c>>0]|0)>>0]|0)&70|0)!=0|0}function ad(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;if((c[d>>2]|0)>=0&(c[d>>2]|0)<8){c[b>>2]=c[940+(c[d>>2]<<2)>>2];d=c[b>>2]|0;l=e;return d|0}else{c[b>>2]=0;d=c[b>>2]|0;l=e;return d|0}return 0}function bd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+20|0;h=m+16|0;i=m+12|0;j=m+8|0;k=m+4|0;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;if((c[h>>2]|0)<0|(c[h>>2]|0)>=10){c[g>>2]=cd(18365)|0;k=c[g>>2]|0;l=m;return k|0}if(a[17604+(c[h>>2]|0)>>0]|0)b=dd()|0;else b=ed()|0;c[m>>2]=b;i=c[i>>2]|0;c[i>>2]=c[46740+(c[h>>2]<<2)>>2];c[i+4>>2]=0;j=c[j>>2]|0;c[j>>2]=c[46780+(c[h>>2]<<2)>>2];c[j+4>>2]=0;if(c[k>>2]|0)c[46780+(c[h>>2]<<2)>>2]=c[46740+(c[h>>2]<<2)>>2];c[g>>2]=0;k=c[g>>2]|0;l=m;return k|0}function cd(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=fd(21,c[d>>2]|0,17614)|0;l=b;return a|0}function dd(){return c[11726]|0}function ed(){return c[11676]|0}function fd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+32|0;g=f;e=f+20|0;i=f+16|0;h=f+12|0;c[e>>2]=a;c[i>>2]=b;c[h>>2]=d;d=c[e>>2]|0;h=c[h>>2]|0;a=c[i>>2]|0;b=(gd()|0)+20|0;c[g>>2]=h;c[g+4>>2]=a;c[g+8>>2]=b;hd(d,17621,g);l=f;return c[e>>2]|0}function gd(){return 21617}function hd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+20|0;f=h+16|0;g=h;c[e>>2]=a;c[f>>2]=b;if(!(c[66]|0)){l=h;return}c[g>>2]=d;id(c[e>>2]|0,c[f>>2]|0,g);l=h;return}function id(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+256|0;h=e+36|0;i=e+32|0;f=e+28|0;g=e;c[h>>2]=a;c[i>>2]=b;c[f>>2]=d;jd(g,0,e+40|0,210,0);kd(g,c[i>>2]|0,c[f>>2]|0);f=c[66]|0;a=c[67]|0;b=c[h>>2]|0;d=ld(g)|0;ub[f&255](a,b,d);l=e;return}function jd(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+32|0;i=h+16|0;m=h+12|0;n=h+8|0;k=h+4|0;j=h;c[i>>2]=b;c[m>>2]=d;c[n>>2]=e;c[k>>2]=f;c[j>>2]=g;g=c[n>>2]|0;c[(c[i>>2]|0)+4>>2]=g;c[(c[i>>2]|0)+8>>2]=g;c[c[i>>2]>>2]=c[m>>2];c[(c[i>>2]|0)+12>>2]=0;c[(c[i>>2]|0)+16>>2]=c[k>>2];c[(c[i>>2]|0)+20>>2]=c[j>>2];a[(c[i>>2]|0)+24>>0]=0;a[(c[i>>2]|0)+25>>0]=0;l=h;return}function kd(b,e,f){b=b|0;e=e|0;f=f|0;var g=0.0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$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]=f;a[v>>0]=16;c[G>>2]=0;c[N>>2]=0;c[ua>>2]=0;if(a[(c[F>>2]|0)+25>>0]|0){f=d[(c[F>>2]|0)+25>>0]&2;a[w>>0]=f;if(f&255|0){e=c[_>>2]|0;b=(c[e>>2]|0)+(4-1)&~(4-1);f=c[b>>2]|0;c[e>>2]=b+4;c[i>>2]=f;c[N>>2]=c[i>>2]}a[x>>0]=d[(c[F>>2]|0)+25>>0]&1}else{a[x>>0]=0;a[w>>0]=0}a:while(1){i=a[c[P>>2]>>0]|0;c[ja>>2]=i;if(!i){Ha=272;break}if((c[ja>>2]|0)!=37){c[ua>>2]=c[P>>2];do{c[P>>2]=(c[P>>2]|0)+1;if(!(a[c[P>>2]>>0]|0))break}while((a[c[P>>2]>>0]|0)!=37);zd(c[F>>2]|0,c[ua>>2]|0,(c[P>>2]|0)-(c[ua>>2]|0)|0);if(!(a[c[P>>2]>>0]|0)){Ha=272;break}}i=(c[P>>2]|0)+1|0;c[P>>2]=i;i=a[i>>0]|0;c[ja>>2]=i;if(!i){Ha=13;break}a[r>>0]=0;a[q>>0]=0;a[p>>0]=0;a[o>>0]=0;a[n>>0]=0;a[m>>0]=0;a[u>>0]=0;do{switch(c[ja>>2]|0){case 45:{a[m>>0]=1;break}case 43:{a[n>>0]=1;break}case 32:{a[o>>0]=1;break}case 35:{a[p>>0]=1;break}case 33:{a[q>>0]=1;break}case 48:{a[r>>0]=1;break}default:a[u>>0]=1}if(a[u>>0]|0)break;i=(c[P>>2]|0)+1|0;c[P>>2]=i;i=a[i>>0]|0;c[ja>>2]=i}while((i|0)!=0);if((c[ja>>2]|0)==42){if(a[w>>0]|0){i=Ad(c[N>>2]|0)|0;c[k>>2]=i}else{f=c[_>>2]|0;e=(c[f>>2]|0)+(4-1)&~(4-1);i=c[e>>2]|0;c[f>>2]=e+4;c[Q>>2]=i;c[k>>2]=c[Q>>2]}if((c[k>>2]|0)<0){a[m>>0]=1;c[k>>2]=(c[k>>2]|0)>=-2147483647?0-(c[k>>2]|0)|0:0}i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0]}else{c[R>>2]=0;while(1){b=c[R>>2]|0;if(!((c[ja>>2]|0)>=48?(c[ja>>2]|0)<=57:0))break;c[R>>2]=(b*10|0)+(c[ja>>2]|0)-48;i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0]}c[k>>2]=b&2147483647}do if((c[ja>>2]|0)==46){i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0];if((c[ja>>2]|0)!=42){c[T>>2]=0;while(1){b=c[T>>2]|0;if(!((c[ja>>2]|0)>=48?(c[ja>>2]|0)<=57:0))break;c[T>>2]=(b*10|0)+(c[ja>>2]|0)-48;i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0]}c[Fa>>2]=b&2147483647;break}if(a[w>>0]|0){i=Ad(c[N>>2]|0)|0;c[Fa>>2]=i}else{f=c[_>>2]|0;e=(c[f>>2]|0)+(4-1)&~(4-1);i=c[e>>2]|0;c[f>>2]=e+4;c[S>>2]=i;c[Fa>>2]=c[S>>2]}i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0];if((c[Fa>>2]|0)<0)c[Fa>>2]=(c[Fa>>2]|0)>=-2147483647?0-(c[Fa>>2]|0)|0:-1}else c[Fa>>2]=-1;while(0);do if((c[ja>>2]|0)==108){a[s>>0]=1;i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0];if((c[ja>>2]|0)==108){a[t>>0]=1;i=(c[P>>2]|0)+1|0;c[P>>2]=i;c[ja>>2]=a[i>>0];break}else{a[t>>0]=0;break}}else{a[t>>0]=0;a[s>>0]=0}while(0);c[C>>2]=17648;a[v>>0]=16;c[j>>2]=0;while(1){if((c[j>>2]|0)>=23)break;b=c[j>>2]|0;if((c[ja>>2]|0)==(a[17648+((c[j>>2]|0)*6|0)>>0]|0)){Ha=56;break}c[j>>2]=b+1}if((Ha|0)==56){Ha=0;c[C>>2]=17648+(b*6|0);if((d[x>>0]|0)==0?d[(c[C>>2]|0)+2>>0]&2|0:0){Ha=272;break}a[v>>0]=a[(c[C>>2]|0)+3>>0]|0}b:do switch(d[v>>0]|0){case 13:{a[t>>0]=0;a[s>>0]=1;Ha=62;break}case 0:case 15:{Ha=62;break}case 3:case 2:case 1:{if(a[w>>0]|0)h[B>>3]=+Bd(c[N>>2]|0);else{i=c[_>>2]|0;f=(c[i>>2]|0)+(8-1)&~(8-1);g=+h[f>>3];c[i>>2]=f+8;h[fa>>3]=g;h[B>>3]=+h[fa>>3]}if((c[Fa>>2]|0)<0)c[Fa>>2]=6;do if(!(+h[B>>3]<0.0)){if(a[n>>0]|0){a[y>>0]=43;break}if(a[o>>0]|0){a[y>>0]=32;break}else{a[y>>0]=0;break}}else{h[B>>3]=-+h[B>>3];a[y>>0]=45}while(0);if((d[v>>0]|0)==3&(c[Fa>>2]|0)>0)c[Fa>>2]=(c[Fa>>2]|0)+-1;c[j>>2]=c[Fa>>2]&4095;h[K>>3]=.5;while(1){if((c[j>>2]|0)<=0)break;c[j>>2]=(c[j>>2]|0)+-1;h[K>>3]=+h[K>>3]*.1}if((d[v>>0]|0)==1)h[B>>3]=+h[B>>3]+ +h[K>>3];c[H>>2]=0;if(Cd(+h[B>>3])|0){c[ua>>2]=17835;c[Ga>>2]=3;break b}if(+h[B>>3]>0.0){h[ga>>3]=1.0;while(1){if(!(+h[B>>3]>=+h[ga>>3]*1.e+100?(c[H>>2]|0)<=350:0))break;h[ga>>3]=+h[ga>>3]*1.e+100;c[H>>2]=(c[H>>2]|0)+100}while(1){if(!(+h[B>>3]>=+h[ga>>3]*1.0e10?(c[H>>2]|0)<=350:0))break;h[ga>>3]=+h[ga>>3]*1.0e10;c[H>>2]=(c[H>>2]|0)+10}while(1){g=+h[ga>>3];if(!(+h[B>>3]>=+h[ga>>3]*10.0?(c[H>>2]|0)<=350:0))break;h[ga>>3]=g*10.0;c[H>>2]=(c[H>>2]|0)+1}h[B>>3]=+h[B>>3]/g;while(1){if(!(+h[B>>3]<1.0e-08))break;h[B>>3]=+h[B>>3]*1.0e8;c[H>>2]=(c[H>>2]|0)-8}while(1){if(!(+h[B>>3]<1.0))break;h[B>>3]=+h[B>>3]*10.0;c[H>>2]=(c[H>>2]|0)+-1}if((c[H>>2]|0)>350){c[ua>>2]=O;a[O>>0]=a[y>>0]|0;i=O+((a[y>>0]|0)!=0&1)|0;a[i>>0]=a[17839]|0;a[i+1>>0]=a[17840]|0;a[i+2>>0]=a[17841]|0;a[i+3>>0]=a[17842]|0;c[Ga>>2]=3+((a[y>>0]|0)!=0&1);break b}}c[ua>>2]=O;if((d[v>>0]|0)!=1?(h[B>>3]=+h[B>>3]+ +h[K>>3],+h[B>>3]>=10.0):0){h[B>>3]=+h[B>>3]*.1;c[H>>2]=(c[H>>2]|0)+1}c:do if((d[v>>0]|0)==3){a[M>>0]=((a[p>>0]|0)!=0^1)&1;do if((c[H>>2]|0)>=-4){if((c[H>>2]|0)>(c[Fa>>2]|0))break;c[Fa>>2]=(c[Fa>>2]|0)-(c[H>>2]|0);a[v>>0]=1;break c}while(0);a[v>>0]=2}else a[M>>0]=a[q>>0]|0;while(0);if((d[v>>0]|0)==2)c[I>>2]=0;else c[I>>2]=c[H>>2];i=(c[I>>2]|0)>0?c[I>>2]|0:0;f=c[Fa>>2]|0;f=IR(i|0,((i|0)<0)<<31>>31|0,f|0,((f|0)<0)<<31>>31|0)|0;i=c[k>>2]|0;i=IR(f|0,z|0,i|0,((i|0)<0)<<31>>31|0)|0;f=z;if((f|0)>0|(f|0)==0&i>>>0>55?(i=(c[I>>2]|0)>0?c[I>>2]|0:0,f=c[Fa>>2]|0,f=IR(i|0,((i|0)<0)<<31>>31|0,f|0,((f|0)<0)<<31>>31|0)|0,i=c[k>>2]|0,i=IR(f|0,z|0,i|0,((i|0)<0)<<31>>31|0)|0,i=IR(i|0,z|0,15,0)|0,i=pd(i,z)|0,c[G>>2]=i,c[ua>>2]=i,(c[ua>>2]|0)==0):0){Ha=165;break a}c[D>>2]=c[ua>>2];c[J>>2]=16+((d[q>>0]|0)*10|0);a[L>>0]=((c[Fa>>2]|0)>0?1:0)|d[p>>0]|d[q>>0];if(a[y>>0]|0){f=a[y>>0]|0;i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=f}d:do if((c[I>>2]|0)<0){i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=48}else while(1){if((c[I>>2]|0)<0)break d;f=Dd(B,J)|0;i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=f;c[I>>2]=(c[I>>2]|0)+-1}while(0);if(a[L>>0]|0){i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=46}c[I>>2]=(c[I>>2]|0)+1;while(1){if((c[I>>2]|0)>=0)break;i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=48;c[Fa>>2]=(c[Fa>>2]|0)+-1;c[I>>2]=(c[I>>2]|0)+1}while(1){i=c[Fa>>2]|0;c[Fa>>2]=i+-1;if((i|0)<=0)break;f=Dd(B,J)|0;i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=f}do if(d[M>>0]|0){if(!(d[L>>0]|0))break;while(1){b=(c[ua>>2]|0)+-1|0;if((a[(c[ua>>2]|0)+-1>>0]|0)!=48)break;c[ua>>2]=b;a[b>>0]=0}if((a[b>>0]|0)!=46)break;b=c[ua>>2]|0;if(a[q>>0]|0){c[ua>>2]=b+1;a[b>>0]=48;break}else{i=b+-1|0;c[ua>>2]=i;a[i>>0]=0;break}}while(0);if((d[v>>0]|0)==2){b=a[17795+(d[(c[C>>2]|0)+4>>0]|0)>>0]|0;i=c[ua>>2]|0;c[ua>>2]=i+1;a[i>>0]=b;i=(c[H>>2]|0)<0;b=c[ua>>2]|0;c[ua>>2]=b+1;if(i){a[b>>0]=45;c[H>>2]=0-(c[H>>2]|0)}else a[b>>0]=43;if((c[H>>2]|0)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2]=c[la>>2]}if((c[Fa>>2]|0)>1){c[k>>2]=(c[k>>2]|0)-((c[Fa>>2]|0)-1);if(!((c[k>>2]|0)<=1|(a[m>>0]|0)!=0)){Fd(c[F>>2]|0,(c[k>>2]|0)-1|0,32);c[k>>2]=0}Fd(c[F>>2]|0,(c[Fa>>2]|0)-1|0,c[ja>>2]&255)}c[Ga>>2]=1;a[O>>0]=c[ja>>2];c[ua>>2]=O;break}case 6:case 5:{if(a[w>>0]|0){c[ua>>2]=Ed(c[N>>2]|0)|0;a[v>>0]=5}else{f=c[_>>2]|0;e=(c[f>>2]|0)+(4-1)&~(4-1);i=c[e>>2]|0;c[f>>2]=e+4;c[ma>>2]=i;c[ua>>2]=c[ma>>2]}if(c[ua>>2]|0){if((d[v>>0]|0)==6)c[G>>2]=c[ua>>2]}else c[ua>>2]=47636;if((c[Fa>>2]|0)<0){c[Ga>>2]=_c(c[ua>>2]|0)|0;break b}c[Ga>>2]=0;while(1){if((c[Ga>>2]|0)>=(c[Fa>>2]|0))break b;if(!(a[(c[ua>>2]|0)+(c[Ga>>2]|0)>>0]|0))break b;c[Ga>>2]=(c[Ga>>2]|0)+1}}case 14:case 10:case 9:{a[va>>0]=(d[v>>0]|0)==14?34:39;if(a[w>>0]|0)c[wa>>2]=Ed(c[N>>2]|0)|0;else{f=c[_>>2]|0;e=(c[f>>2]|0)+(4-1)&~(4-1);i=c[e>>2]|0;c[f>>2]=e+4;c[xa>>2]=i;c[wa>>2]=c[xa>>2]}c[ra>>2]=(c[wa>>2]|0)==0&1;if(c[ra>>2]|0)c[wa>>2]=(d[v>>0]|0)==10?17843:17848;c[pa>>2]=c[Fa>>2];c[qa>>2]=0;c[na>>2]=0;while(1){if(!(c[pa>>2]|0))break;i=a[(c[wa>>2]|0)+(c[na>>2]|0)>>0]|0;a[ta>>0]=i;if(!(i<<24>>24))break;if((a[ta>>0]|0)==(a[va>>0]|0))c[qa>>2]=(c[qa>>2]|0)+1;c[na>>2]=(c[na>>2]|0)+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;e=(c[f>>2]|0)+(4-1)&~(4-1);i=c[e>>2]|0;c[f>>2]=e+4;c[Da>>2]=i;c[Ca>>2]=c[Da>>2];c[Ea>>2]=(c[Aa>>2]|0)+8+((c[Ca>>2]|0)*72|0);if(c[(c[Ea>>2]|0)+4>>2]|0){Gd(c[F>>2]|0,c[(c[Ea>>2]|0)+4>>2]|0);zd(c[F>>2]|0,17855,1)}Gd(c[F>>2]|0,c[(c[Ea>>2]|0)+8>>2]|0);c[k>>2]=0;c[Ga>>2]=0;break}default:{Ha=272;break a}}while(0);if((Ha|0)==62){Ha=0;b=(a[w>>0]|0)!=0;do if(d[(c[C>>2]|0)+2>>0]&1|0){do if(!b){if(a[t>>0]|0){e=c[_>>2]|0;b=(c[e>>2]|0)+(8-1)&~(8-1);f=b;i=c[f>>2]|0;f=c[f+4>>2]|0;c[e>>2]=b+8;e=V;c[e>>2]=i;c[e+4>>2]=f;e=V;f=c[e+4>>2]|0;i=U;c[i>>2]=c[e>>2];c[i+4>>2]=f;break}i=(a[s>>0]|0)!=0;f=c[_>>2]|0;e=(c[f>>2]|0)+(4-1)&~(4-1);b=c[e>>2]|0;c[f>>2]=e+4;if(i){c[W>>2]=b;f=c[W>>2]|0;i=U;c[i>>2]=f;c[i+4>>2]=((f|0)<0)<<31>>31;break}else{c[X>>2]=b;f=c[X>>2]|0;i=U;c[i>>2]=f;c[i+4>>2]=((f|0)<0)<<31>>31;break}}else{f=Ad(c[N>>2]|0)|0;i=U;c[i>>2]=f;c[i+4>>2]=z}while(0);e=U;b=c[e>>2]|0;e=c[e+4>>2]|0;if((c[U+4>>2]|0)<0){if((b|0)==0&(e|0)==-2147483648){i=A;c[i>>2]=0;c[i+4>>2]=-2147483648}else{f=U;f=FR(0,0,c[f>>2]|0,c[f+4>>2]|0)|0;i=A;c[i>>2]=f;c[i+4>>2]=z}a[y>>0]=45;break}i=A;c[i>>2]=b;c[i+4>>2]=e;if(a[n>>0]|0){a[y>>0]=43;break}if(a[o>>0]|0){a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>>2]|0,32);if(c[G>>2]|0){Hd(c[c[F>>2]>>2]|0,c[G>>2]|0);c[G>>2]=0}c[P>>2]=(c[P>>2]|0)+1}if((Ha|0)==13){zd(c[F>>2]|0,17646,1);l=Ia;return}else if((Ha|0)==96){nd(c[F>>2]|0,1);l=Ia;return}else if((Ha|0)==165){nd(c[F>>2]|0,1);l=Ia;return}else if((Ha|0)==245){nd(c[F>>2]|0,1);l=Ia;return}else if((Ha|0)==272){l=Ia;return}}function ld(b){b=b|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=b;do if((c[(c[e>>2]|0)+8>>2]|0?(a[(c[(c[e>>2]|0)+8>>2]|0)+(c[(c[e>>2]|0)+12>>2]|0)>>0]=0,(c[(c[e>>2]|0)+20>>2]|0)>>>0>0):0)?((d[(c[e>>2]|0)+25>>0]|0)&4|0)==0:0){b=md(c[c[e>>2]>>2]|0,(c[(c[e>>2]|0)+12>>2]|0)+1|0,0)|0;c[(c[e>>2]|0)+8>>2]=b;b=c[e>>2]|0;if(c[(c[e>>2]|0)+8>>2]|0){MR(c[b+8>>2]|0,c[(c[e>>2]|0)+4>>2]|0,(c[(c[e>>2]|0)+12>>2]|0)+1|0)|0;b=(c[e>>2]|0)+25|0;a[b>>0]=d[b>>0]|0|4;break}else{nd(b,1);break}}while(0);l=f;return c[(c[e>>2]|0)+8>>2]|0}function md(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;e=i+16|0;f=i+12|0;g=i;h=i+8|0;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;if(c[f>>2]|0){h=g;c[e>>2]=od(c[f>>2]|0,c[h>>2]|0,c[h+4>>2]|0)|0;h=c[e>>2]|0;l=i;return h|0}else{c[h>>2]=pd(c[g>>2]|0,c[g+4>>2]|0)|0;c[e>>2]=c[h>>2];h=c[e>>2]|0;l=i;return h|0}return 0}function nd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e;g=e+4|0;c[f>>2]=b;a[g>>0]=d;a[(c[f>>2]|0)+24>>0]=a[g>>0]|0;c[(c[f>>2]|0)+16>>2]=0;l=e;return}function od(b,d,f){b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k+12|0;i=k;j=k+8|0;c[h>>2]=b;b=i;c[b>>2]=d;c[b+4>>2]=f;do if(c[(c[h>>2]|0)+256>>2]|0){if(a[(c[h>>2]|0)+69>>0]|0){c[g>>2]=0;j=c[g>>2]|0;l=k;return j|0}}else{f=i;d=c[f+4>>2]|0;b=(c[h>>2]|0)+256|0;if(d>>>0>0|((d|0)==0?(c[f>>2]|0)>>>0>(e[(c[h>>2]|0)+256+4>>1]|0)>>>0:0)){j=b+16+4|0;c[j>>2]=(c[j>>2]|0)+1;break}f=c[b+28>>2]|0;c[j>>2]=f;if(!f){j=(c[h>>2]|0)+256+16+8|0;c[j>>2]=(c[j>>2]|0)+1;break}c[(c[h>>2]|0)+256+28>>2]=c[c[j>>2]>>2];i=(c[h>>2]|0)+256+8|0;c[i>>2]=(c[i>>2]|0)+1;i=(c[h>>2]|0)+256+16|0;c[i>>2]=(c[i>>2]|0)+1;if((c[(c[h>>2]|0)+256+8>>2]|0)>(c[(c[h>>2]|0)+256+12>>2]|0))c[(c[h>>2]|0)+256+12>>2]=c[(c[h>>2]|0)+256+8>>2];c[g>>2]=c[j>>2];j=c[g>>2]|0;l=k;return j|0}while(0);j=i;c[g>>2]=xd(c[h>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;j=c[g>>2]|0;l=k;return j|0}function pd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;e=f+8|0;g=d;c[g>>2]=a;c[g+4>>2]=b;g=d;b=d;a=c[b+4>>2]|0;if((c[g>>2]|0)==0&(c[g+4>>2]|0)==0|(a>>>0>0|(a|0)==0&(c[b>>2]|0)>>>0>=2147483392)){c[e>>2]=0;g=c[e>>2]|0;l=f;return g|0}if(c[2]|0){qd(c[d>>2]|0,e)|0;g=c[e>>2]|0;l=f;return g|0}else{c[e>>2]=tb[c[48>>2]&255](c[d>>2]|0)|0;g=c[e>>2]|0;l=f;return g|0}return 0}function qd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+32|0;i=h+20|0;d=h+16|0;e=h+12|0;f=h+8|0;g=h;c[i>>2]=a;c[d>>2]=b;c[e>>2]=tb[c[64>>2]&255](c[i>>2]|0)|0;rd(5,c[i>>2]|0);b=46712;a=c[b+4>>2]|0;do if((a|0)>0|(a|0)==0&(c[b>>2]|0)>>>0>0){b=sd(0)|0;a=g;c[a>>2]=b;c[a+4>>2]=z;a=g;g=c[a>>2]|0;a=c[a+4>>2]|0;b=46712;i=c[e>>2]|0;i=FR(c[b>>2]|0,c[b+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0;b=z;if((a|0)>(b|0)|(a|0)==(b|0)&g>>>0>=i>>>0){c[11683]=1;td(c[e>>2]|0);break}else{c[11683]=0;break}}while(0);c[f>>2]=tb[c[48>>2]&255](c[e>>2]|0)|0;if(!(c[f>>2]|0)){g=c[f>>2]|0;i=c[d>>2]|0;c[i>>2]=g;i=c[e>>2]|0;l=h;return i|0}c[e>>2]=ud(c[f>>2]|0)|0;vd(0,c[e>>2]|0);vd(9,1);g=c[f>>2]|0;i=c[d>>2]|0;c[i>>2]=g;i=c[e>>2]|0;l=h;return i|0}function rd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;c[e>>2]=c[g>>2];if((c[e>>2]|0)>>>0<=(c[46780+(c[d>>2]<<2)>>2]|0)>>>0){l=f;return}c[46780+(c[d>>2]<<2)>>2]=c[e>>2];l=f;return}function sd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;z=0;l=d;return c[46740+(c[b>>2]<<2)>>2]|0}function td(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d;c[b>>2]=a;a=46712;e=c[a+4>>2]|0;if((e|0)<0|(e|0)==0&(c[a>>2]|0)>>>0<=0){l=d;return}wd(c[b>>2]|0)|0;l=d;return}function ud(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=tb[c[60>>2]&255](c[d>>2]|0)|0;l=b;return a|0}function vd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e+4|0;f=e;c[d>>2]=a;c[f>>2]=b;b=46740+(c[d>>2]<<2)|0;c[b>>2]=(c[b>>2]|0)+(c[f>>2]|0);if((c[46740+(c[d>>2]<<2)>>2]|0)>>>0<=(c[46780+(c[d>>2]<<2)>>2]|0)>>>0){l=e;return}c[46780+(c[d>>2]<<2)>>2]=c[46740+(c[d>>2]<<2)>>2];l=e;return}function wd(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;l=b;return 0}function xd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+12|0;h=g;f=g+8|0;c[e>>2]=a;a=h;c[a>>2]=b;c[a+4>>2]=d;d=h;c[f>>2]=pd(c[d>>2]|0,c[d+4>>2]|0)|0;if(c[f>>2]|0){h=c[f>>2]|0;l=g;return h|0}yd(c[e>>2]|0);h=c[f>>2]|0;l=g;return h|0}function yd(b){b=b|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=b;if(d[(c[e>>2]|0)+69>>0]|0|0){l=f;return}if(d[(c[e>>2]|0)+70>>0]|0|0){l=f;return}a[(c[e>>2]|0)+69>>0]=1;if((c[(c[e>>2]|0)+168>>2]|0)>0)c[(c[e>>2]|0)+248>>2]=1;e=(c[e>>2]|0)+256|0;c[e>>2]=(c[e>>2]|0)+1;l=f;return}function zd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(((c[(c[e>>2]|0)+12>>2]|0)+(c[g>>2]|0)|0)>>>0>=(c[(c[e>>2]|0)+16>>2]|0)>>>0){Fj(c[e>>2]|0,c[f>>2]|0,c[g>>2]|0);l=h;return}else{d=(c[e>>2]|0)+12|0;c[d>>2]=(c[d>>2]|0)+(c[g>>2]|0);MR((c[(c[e>>2]|0)+8>>2]|0)+((c[(c[e>>2]|0)+12>>2]|0)-(c[g>>2]|0))|0,c[f>>2]|0,c[g>>2]|0)|0;l=h;return}}function Ad(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e;d=e+8|0;c[d>>2]=a;if((c[c[d>>2]>>2]|0)<=(c[(c[d>>2]|0)+4>>2]|0)){d=b;c[d>>2]=0;c[d+4>>2]=0;d=b;d=c[d>>2]|0;b=b+4|0;b=c[b>>2]|0;z=b;l=e;return d|0}else{f=c[(c[d>>2]|0)+8>>2]|0;d=(c[d>>2]|0)+4|0;a=c[d>>2]|0;c[d>>2]=a+1;a=ki(c[f+(a<<2)>>2]|0)|0;d=b;c[d>>2]=a;c[d+4>>2]=z;d=b;d=c[d>>2]|0;b=b+4|0;b=c[b>>2]|0;z=b;l=e;return d|0}return 0}function Bd(a){a=a|0;var b=0,d=0,e=0,f=0.0,g=0;e=l;l=l+16|0;b=e;d=e+8|0;c[d>>2]=a;if((c[c[d>>2]>>2]|0)<=(c[(c[d>>2]|0)+4>>2]|0)){h[b>>3]=0.0;f=+h[b>>3];l=e;return +f}else{a=c[(c[d>>2]|0)+8>>2]|0;g=(c[d>>2]|0)+4|0;d=c[g>>2]|0;c[g>>2]=d+1;h[b>>3]=+mi(c[a+(d<<2)>>2]|0);f=+h[b>>3];l=e;return +f}return 0.0}function Cd(a){a=+a;var b=0,d=0,e=0,f=0,g=0;d=l;l=l+32|0;g=d+16|0;b=d+24|0;f=d+8|0;e=d;h[g>>3]=a;h[f>>3]=+h[g>>3];h[e>>3]=+h[f>>3];c[b>>2]=+h[f>>3]!=+h[e>>3]&1;l=d;return c[b>>2]|0}function Dd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+20|0;f=k+16|0;g=k+12|0;i=k+8|0;j=k;c[f>>2]=b;c[g>>2]=d;if((c[c[g>>2]>>2]|0)<=0){a[e>>0]=48;j=a[e>>0]|0;l=k;return j|0}else{g=c[g>>2]|0;c[g>>2]=(c[g>>2]|0)+-1;c[i>>2]=~~+h[c[f>>2]>>3];h[j>>3]=+(c[i>>2]|0);c[i>>2]=(c[i>>2]|0)+48;h[c[f>>2]>>3]=(+h[c[f>>2]>>3]-+h[j>>3])*10.0;a[e>>0]=c[i>>2];j=a[e>>0]|0;l=k;return j|0}return 0}function Ed(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;if((c[c[d>>2]>>2]|0)<=(c[(c[d>>2]|0)+4>>2]|0)){c[b>>2]=0;d=c[b>>2]|0;l=e;return d|0}else{a=c[(c[d>>2]|0)+8>>2]|0;f=(c[d>>2]|0)+4|0;d=c[f>>2]|0;c[f>>2]=d+1;c[b>>2]=wh(c[a+(d<<2)>>2]|0)|0;d=c[b>>2]|0;l=e;return d|0}return 0}function Fd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;i=l;l=l+16|0;f=i+4|0;g=i;h=i+8|0;c[f>>2]=b;c[g>>2]=d;a[h>>0]=e;e=c[g>>2]|0;e=IR(c[(c[f>>2]|0)+12>>2]|0,0,e|0,((e|0)<0)<<31>>31|0)|0;d=z;if((d|0)>0|((d|0)==0?e>>>0>=(c[(c[f>>2]|0)+16>>2]|0)>>>0:0)?(e=Nd(c[f>>2]|0,c[g>>2]|0)|0,c[g>>2]=e,(e|0)<=0):0){l=i;return}while(1){e=c[g>>2]|0;c[g>>2]=e+-1;if((e|0)<=0)break;b=a[h>>0]|0;d=c[(c[f>>2]|0)+8>>2]|0;j=(c[f>>2]|0)+12|0;e=c[j>>2]|0;c[j>>2]=e+1;a[d+e>>0]=b}l=i;return}function Gd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;a=c[f>>2]|0;b=c[e>>2]|0;zd(a,b,_c(c[e>>2]|0)|0);l=d;return}function Hd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=g;return}if(c[d>>2]|0){a=c[d>>2]|0;b=c[e>>2]|0;if(c[(c[d>>2]|0)+456>>2]|0){Id(a,b);l=g;return}if(Jd(a,b)|0){c[f>>2]=c[e>>2];c[c[f>>2]>>2]=c[(c[d>>2]|0)+256+28>>2];c[(c[d>>2]|0)+256+28>>2]=c[f>>2];f=(c[d>>2]|0)+256+8|0;c[f>>2]=(c[f>>2]|0)+-1;l=g;return}}Kd(c[e>>2]|0);l=g;return}function Id(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;a=Md(c[e>>2]|0,c[f>>2]|0)|0;b=c[(c[e>>2]|0)+456>>2]|0;c[b>>2]=(c[b>>2]|0)+a;l=d;return}function Jd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if((c[e>>2]|0)>>>0<(c[(c[d>>2]|0)+256+32>>2]|0)>>>0){e=0;e=e&1;l=f;return e|0}e=(c[e>>2]|0)>>>0<(c[(c[d>>2]|0)+256+36>>2]|0)>>>0;e=e&1;l=f;return e|0}function Kd(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}if(c[2]|0){Ld(0,ud(c[b>>2]|0)|0);Ld(9,1);qb[c[52>>2]&255](c[b>>2]|0);l=d;return}else{qb[c[52>>2]&255](c[b>>2]|0);l=d;return}}function Ld(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=46740+(c[f>>2]<<2)|0;c[b>>2]=(c[b>>2]|0)-(c[e>>2]|0);l=d;return}function Md(a,b){a=a|0;b=b|0;var d=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;if(c[f>>2]|0?Jd(c[f>>2]|0,c[g>>2]|0)|0:0){c[d>>2]=e[(c[f>>2]|0)+256+4>>1];g=c[d>>2]|0;l=h;return g|0}c[d>>2]=tb[c[60>>2]&255](c[g>>2]|0)|0;g=c[d>>2]|0;l=h;return g|0}function Nd(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+24|0;i=m+20|0;j=m+16|0;k=m+12|0;f=m+8|0;g=m;c[i>>2]=b;c[j>>2]=e;if(a[(c[i>>2]|0)+24>>0]|0){c[h>>2]=0;k=c[h>>2]|0;l=m;return k|0}b=c[i>>2]|0;if(!(c[(c[i>>2]|0)+20>>2]|0)){c[j>>2]=(c[b+16>>2]|0)-(c[(c[i>>2]|0)+12>>2]|0)-1;nd(c[i>>2]|0,2);c[h>>2]=c[j>>2];k=c[h>>2]|0;l=m;return k|0}if(d[b+25>>0]&4|0)b=c[(c[i>>2]|0)+8>>2]|0;else b=0;c[f>>2]=b;b=g;c[b>>2]=c[(c[i>>2]|0)+12>>2];c[b+4>>2]=0;b=(c[j>>2]|0)+1|0;e=g;b=IR(c[e>>2]|0,c[e+4>>2]|0,b|0,((b|0)<0)<<31>>31|0)|0;e=g;c[e>>2]=b;c[e+4>>2]=z;e=g;e=IR(c[e>>2]|0,c[e+4>>2]|0,c[(c[i>>2]|0)+12>>2]|0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return}function Pd(a,b,d,f){a=a|0;b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k+12|0;i=k+8|0;j=k;c[h>>2]=a;c[i>>2]=b;a=j;c[a>>2]=d;c[a+4>>2]=f;a=c[h>>2]|0;if(!(c[i>>2]|0)){c[g>>2]=od(a,c[j>>2]|0,c[j+4>>2]|0)|0;j=c[g>>2]|0;l=k;return j|0}if(Jd(a,c[i>>2]|0)|0?(f=j,d=c[f+4>>2]|0,d>>>0<0|((d|0)==0?(c[f>>2]|0)>>>0<=(e[(c[h>>2]|0)+256+4>>1]|0)>>>0:0)):0){c[g>>2]=c[i>>2];j=c[g>>2]|0;l=k;return j|0}c[g>>2]=Ej(c[h>>2]|0,c[i>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;j=c[g>>2]|0;l=k;return j|0}function Qd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h+8|0;g=h;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;if(Rd()|0){c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}else{c[e>>2]=Sd(c[f>>2]|0,c[g>>2]|0,c[g+4>>2]|0)|0;g=c[e>>2]|0;l=h;return g|0}return 0}function Rd(){var a=0,b=0,d=0,e=0,f=0;e=l;l=l+16|0;a=e+4|0;b=e;if(c[59]|0){c[a>>2]=0;f=c[a>>2]|0;l=e;return f|0}c[b>>2]=0;if(c[b>>2]|0){c[a>>2]=c[b>>2];f=c[a>>2]|0;l=e;return f|0}c[61]=1;if(!(c[62]|0))c[b>>2]=Td()|0;if(((c[b>>2]|0)==0?(c[62]=1,(c[65]|0)==0):0)?(c[65]=8,!((c[3]|0)==0|(c[65]|0)!=0)):0)c[b>>2]=7;if(!(c[b>>2]|0))c[64]=(c[64]|0)+1;if(c[b>>2]|0){c[a>>2]=c[b>>2];f=c[a>>2]|0;l=e;return f|0}if((c[59]|0)==0&(c[60]|0)==0){c[60]=1;d=46920;f=d+92|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(f|0));Ud();if(!(c[63]|0))c[b>>2]=Vd()|0;if(!(c[b>>2]|0)){c[63]=1;c[b>>2]=Wd()|0}if(!(c[b>>2]|0)){Xd(c[53]|0,c[54]|0,c[55]|0);c[59]=1}c[60]=0}c[64]=(c[64]|0)+-1;if((c[64]|0)<=0)c[65]=0;c[a>>2]=c[b>>2];f=c[a>>2]|0;l=e;return f|0}function Sd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;e=m+28|0;f=m+24|0;g=m;h=m+20|0;i=m+16|0;j=m+12|0;k=m+8|0;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;b=g;a=c[b>>2]|0;b=c[b+4>>2]|0;if(!(c[f>>2]|0)){c[e>>2]=pd(a,b)|0;k=c[e>>2]|0;l=m;return k|0}if((a|0)==0&(b|0)==0){Kd(c[f>>2]|0);c[e>>2]=0;k=c[e>>2]|0;l=m;return k|0}d=g;b=c[d+4>>2]|0;if(b>>>0>0|(b|0)==0&(c[d>>2]|0)>>>0>=2147483392){c[e>>2]=0;k=c[e>>2]|0;l=m;return k|0}c[h>>2]=ud(c[f>>2]|0)|0;c[i>>2]=tb[c[64>>2]&255](c[g>>2]|0)|0;do if((c[h>>2]|0)!=(c[i>>2]|0)){if(!(c[2]|0)){c[k>>2]=yb[c[56>>2]&255](c[f>>2]|0,c[i>>2]|0)|0;break}rd(5,c[g>>2]|0);c[j>>2]=(c[i>>2]|0)-(c[h>>2]|0);b=sd(0)|0;n=z;a=46712;d=c[j>>2]|0;d=FR(c[a>>2]|0,c[a+4>>2]|0,d|0,((d|0)<0)<<31>>31|0)|0;a=z;if((n|0)>(a|0)|(n|0)==(a|0)&b>>>0>=d>>>0)td(c[j>>2]|0);c[k>>2]=yb[c[56>>2]&255](c[f>>2]|0,c[i>>2]|0)|0;n=46712;j=c[n+4>>2]|0;if((c[k>>2]|0)==0&((j|0)>0|(j|0)==0&(c[n>>2]|0)>>>0>0)){td(c[g>>2]|0);c[k>>2]=yb[c[56>>2]&255](c[f>>2]|0,c[i>>2]|0)|0}if(c[k>>2]|0){c[i>>2]=ud(c[k>>2]|0)|0;vd(0,(c[i>>2]|0)-(c[h>>2]|0)|0)}}else c[k>>2]=c[f>>2];while(0);c[e>>2]=c[k>>2];n=c[e>>2]|0;l=m;return n|0}function Td(){var a=0,b=0,d=0,e=0,f=0,g=0;g=l;l=l+32|0;a=g+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;if(!(c[12]|0))Tf();c[11676]=0;c[11677]=0;c[11678]=0;c[11679]=0;c[11680]=0;c[11681]=0;c[11682]=0;c[11683]=0;c[11676]=8;if((c[50]|0)!=0&(c[51]|0)>=100&(c[52]|0)>0){c[e>>2]=c[51]&-8;c[51]=c[e>>2];c[f>>2]=c[50];c[d>>2]=c[52];c[11681]=c[f>>2];c[11682]=c[d>>2];c[b>>2]=0;while(1){if((c[b>>2]|0)>=((c[d>>2]|0)-1|0))break;c[c[f>>2]>>2]=(c[f>>2]|0)+(c[e>>2]|0);c[f>>2]=c[c[f>>2]>>2];c[b>>2]=(c[b>>2]|0)+1}c[c[f>>2]>>2]=0;c[11680]=(c[f>>2]|0)+4}else{c[11680]=0;c[50]=0;c[51]=0;c[52]=0}if((c[53]|0)==0|(c[54]|0)<512|(c[55]|0)<=0){c[53]=0;c[54]=0}c[a>>2]=tb[c[68>>2]&255](c[19]|0)|0;if(!(c[a>>2]|0)){f=c[a>>2]|0;l=g;return f|0};c[11676]=0;c[11677]=0;c[11678]=0;c[11679]=0;c[11680]=0;c[11681]=0;c[11682]=0;c[11683]=0;f=c[a>>2]|0;l=g;return f|0}function Ud(){Eg();Fg();Gg(2012,57);return}function Vd(){if(!(c[31]|0))Rf();return tb[c[124>>2]&255](c[30]|0)|0}function Wd(){var a=0,b=0,d=0;d=l;l=l+16|0;a=d+4|0;b=d;c[b>>2]=Yd(10)|0;if(!(c[b>>2]|0)){c[a>>2]=7;b=c[a>>2]|0;l=d;return b|0}else{Kd(c[b>>2]|0);c[a>>2]=Zd()|0;b=c[a>>2]|0;l=d;return b|0}return 0}function Xd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(!(c[11718]|0)){l=i;return}if(!(c[e>>2]|0)){c[g>>2]=0;c[f>>2]=0}c[f>>2]=c[f>>2]&-8;c[11721]=c[f>>2];d=c[g>>2]|0;c[11728]=d;c[11722]=d;if((c[g>>2]|0)>90)a=10;else a=((c[g>>2]|0)/10|0)+1|0;c[11723]=a;c[11724]=c[e>>2];c[11727]=0;c[11729]=0;while(1){d=c[g>>2]|0;c[g>>2]=d+-1;a=c[e>>2]|0;if(!d)break;c[h>>2]=a;c[c[h>>2]>>2]=c[11727];c[11727]=c[h>>2];c[e>>2]=(c[e>>2]|0)+(c[f>>2]|0)}c[11725]=a;l=i;return}function Yd(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;d=e+4|0;b=e;c[b>>2]=a;if(Rd()|0){c[d>>2]=0;d=c[d>>2]|0;l=e;return d|0}if((c[b>>2]|0)<=0)a=0;else{a=c[b>>2]|0;a=pd(a,((a|0)<0)<<31>>31)|0}c[d>>2]=a;d=c[d>>2]|0;l=e;return d|0}function Zd(){var a=0,b=0;b=l;l=l+16|0;a=b;c[a>>2]=0;while(1){if((c[a>>2]|0)>>>0>=4)break;_d(972+((c[a>>2]|0)*88|0)|0,(c[a>>2]|0)==0&1)|0;c[a>>2]=(c[a>>2]|0)+1}l=b;return 0}function _d(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h+8|0;g=h+4|0;d=h;c[f>>2]=a;c[g>>2]=b;c[d>>2]=Rd()|0;if(c[d>>2]|0){c[e>>2]=c[d>>2];g=c[e>>2]|0;l=h;return g|0}$d(c[f>>2]|0);a=c[11753]|0;if((c[g>>2]|0)!=0|(c[11753]|0)==0){c[(c[f>>2]|0)+12>>2]=a;c[11753]=c[f>>2]}else{c[(c[f>>2]|0)+12>>2]=c[a+12>>2];c[(c[11753]|0)+12>>2]=c[f>>2]}c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}function $d(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;if(!(c[d>>2]|0)){l=f;return}if((c[11753]|0)==(c[d>>2]|0)){c[11753]=c[(c[d>>2]|0)+12>>2];l=f;return}if(!(c[11753]|0)){l=f;return}c[e>>2]=c[11753];while(1){if(c[(c[e>>2]|0)+12>>2]|0)b=(c[(c[e>>2]|0)+12>>2]|0)!=(c[d>>2]|0);else b=0;a=c[(c[e>>2]|0)+12>>2]|0;if(!b)break;c[e>>2]=a}if((a|0)!=(c[d>>2]|0)){l=f;return}c[(c[e>>2]|0)+12>>2]=c[(c[d>>2]|0)+12>>2];l=f;return}function ae(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;H=l;l=l+624|0;B=H+92|0;C=H+88|0;D=H+84|0;E=H+80|0;F=H+76|0;g=H+72|0;h=H+68|0;i=H+64|0;j=H+60|0;k=H+56|0;m=H+52|0;n=H+48|0;o=H+44|0;p=H+40|0;q=H+36|0;r=H+32|0;s=H+28|0;t=H+24|0;u=H+20|0;v=H+96|0;w=H+16|0;x=H+12|0;y=H+8|0;z=H+4|0;A=H;c[C>>2]=a;c[D>>2]=b;c[E>>2]=d;c[F>>2]=e;c[g>>2]=f;c[h>>2]=c[E>>2];c[i>>2]=-1;c[j>>2]=0;c[k>>2]=c[F>>2]&-256;c[n>>2]=0;c[o>>2]=0;c[p>>2]=c[F>>2]&16;c[q>>2]=c[F>>2]&8;c[r>>2]=c[F>>2]&4;c[s>>2]=c[F>>2]&1;c[t>>2]=c[F>>2]&2;if(c[r>>2]|0)if((c[k>>2]|0)==16384|(c[k>>2]|0)==2048)a=1;else a=(c[k>>2]|0)==524288;else a=0;c[u>>2]=a&1;c[w>>2]=c[D>>2];f=c[11754]|0;if((f|0)!=(mR()|0)){c[11754]=mR()|0;Ze(0,0)}a=c[h>>2]|0;b=a+44|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));a=c[w>>2]|0;do if((c[k>>2]|0)!=256){if(!a){c[n>>2]=We(c[(c[C>>2]|0)+8>>2]|0,v)|0;if(!(c[n>>2]|0)){c[w>>2]=v;break}c[B>>2]=c[n>>2];G=c[B>>2]|0;l=H;return G|0}}else{c[x>>2]=qf(a,c[F>>2]|0)|0;if(!(c[x>>2]|0)){c[x>>2]=Ve(12,0)|0;if(!(c[x>>2]|0)){c[B>>2]=7;G=c[B>>2]|0;l=H;return G|0}}else c[i>>2]=c[c[x>>2]>>2];c[(c[h>>2]|0)+28>>2]=c[x>>2]}while(0);if(c[s>>2]|0)c[j>>2]=c[j>>2];if(c[t>>2]|0)c[j>>2]=c[j>>2]|2;if(c[r>>2]|0)c[j>>2]=c[j>>2]|64;if(c[p>>2]|0)c[j>>2]=c[j>>2]|131200;c[j>>2]=c[j>>2];do if((c[i>>2]|0)<0){c[n>>2]=rf(c[w>>2]|0,c[F>>2]|0,y,z,A)|0;if(c[n>>2]|0){c[B>>2]=c[n>>2];G=c[B>>2]|0;l=H;return G|0}c[i>>2]=Oe(c[w>>2]|0,c[j>>2]|0,c[y>>2]|0)|0;if((c[i>>2]|0)<0?(x=(c[(_P()|0)>>2]|0)!=21,x&(c[t>>2]|0)!=0):0){c[F>>2]=c[F>>2]&-7;c[j>>2]=c[j>>2]&-67;c[F>>2]=c[F>>2]|1;c[j>>2]=c[j>>2];c[s>>2]=1;c[i>>2]=Oe(c[w>>2]|0,c[j>>2]|0,c[y>>2]|0)|0}if((c[i>>2]|0)<0){F=Pe(35186)|0;c[n>>2]=Je(F,17932,c[w>>2]|0,35186)|0;break}if(c[F>>2]&526336|0){sf(c[i>>2]|0,c[z>>2]|0,c[A>>2]|0)|0;G=34}else G=34}else G=34;while(0);if((G|0)==34){if(c[g>>2]|0)c[c[g>>2]>>2]=c[F>>2];if(c[(c[h>>2]|0)+28>>2]|0){c[c[(c[h>>2]|0)+28>>2]>>2]=c[i>>2];c[(c[(c[h>>2]|0)+28>>2]|0)+4>>2]=c[F>>2]}if(c[q>>2]|0)tb[c[1608>>2]&255](c[w>>2]|0)|0;if(c[q>>2]|0)c[o>>2]=c[o>>2]|32;if(c[s>>2]|0)c[o>>2]=c[o>>2]|2;c[m>>2]=(c[k>>2]|0)!=256&1;if(c[m>>2]|0)c[o>>2]=c[o>>2]|128;if(c[u>>2]|0)c[o>>2]=c[o>>2]|8;if(c[F>>2]&64|0)c[o>>2]=c[o>>2]|64;c[n>>2]=tf(c[C>>2]|0,c[i>>2]|0,c[E>>2]|0,c[D>>2]|0,c[o>>2]|0)|0}if(c[n>>2]|0)Kd(c[(c[h>>2]|0)+28>>2]|0);c[B>>2]=c[n>>2];G=c[B>>2]|0;l=H;return G|0}function be(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+20|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[j+16>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;if((tb[c[1608>>2]&255](c[f>>2]|0)|0)==-1){if((c[(_P()|0)>>2]|0)==2)c[h>>2]=5898;else c[h>>2]=Je(2570,18036,c[f>>2]|0,35312)|0;c[e>>2]=c[h>>2];i=c[e>>2]|0;l=j;return i|0}do if(c[g>>2]&1|0){c[h>>2]=yb[c[1620>>2]&255](c[f>>2]|0,i)|0;if(c[h>>2]|0){c[h>>2]=0;break}if(ff(c[i>>2]|0,0,0)|0)c[h>>2]=Je(1290,18288,c[f>>2]|0,35322)|0;Ie(0,c[i>>2]|0,35324)}while(0);c[e>>2]=c[h>>2];i=c[e>>2]|0;l=j;return i|0}function ce(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;i=l;l=l+96|0;f=i+84|0;j=i+80|0;h=i+76|0;g=i;c[i+88>>2]=a;c[f>>2]=b;c[j>>2]=d;c[h>>2]=e;if(c[j>>2]|0){j=(yb[c[1440>>2]&255](c[f>>2]|0,6)|0)==0&1;c[c[h>>2]>>2]=j;l=i;return 0}if(!(yb[c[1464>>2]&255](c[f>>2]|0,g)|0))a=(c[g+36>>2]|0)>0;else a=0;c[c[h>>2]>>2]=a&1;l=i;return 0}function de(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+128|0;s=r+112|0;m=r+108|0;n=r+104|0;q=r+100|0;o=r+96|0;g=r+92|0;h=r+88|0;p=r+84|0;i=r+80|0;j=r+4|0;k=r;c[r+116>>2]=b;c[s>>2]=d;c[m>>2]=e;c[n>>2]=f;c[q>>2]=0;c[g>>2]=1;c[h>>2]=c[s>>2];c[p>>2]=0;while(1){c[i>>2]=0;if(yb[c[1740>>2]&255](c[h>>2]|0,j)|0){if((c[(_P()|0)>>2]|0)!=2){s=Pe(35436)|0;c[q>>2]=Je(s,18124,c[h>>2]|0,35436)|0}}else c[i>>2]=(c[j+12>>2]&61440|0)==40960&1;if(c[i>>2]|0){if(!(c[p>>2]|0)){c[p>>2]=Yd(c[m>>2]|0)|0;if(!(c[p>>2]|0))c[q>>2]=7}else{s=(c[g>>2]|0)+1|0;c[g>>2]=s;if((s|0)>100)c[q>>2]=Pe(35447)|0}do if(!(c[q>>2]|0)){c[o>>2]=ob[c[1728>>2]&255](c[h>>2]|0,c[p>>2]|0,(c[m>>2]|0)-1|0)|0;if((c[o>>2]|0)<0){s=Pe(35453)|0;c[q>>2]=Je(s,18115,c[h>>2]|0,35453)|0;break}do if((a[c[p>>2]>>0]|0)!=47){c[k>>2]=_c(c[h>>2]|0)|0;while(1){if((c[k>>2]|0)<=0)break;if((a[(c[h>>2]|0)+((c[k>>2]|0)-1)>>0]|0)==47)break;c[k>>2]=(c[k>>2]|0)+-1}if(((c[o>>2]|0)+(c[k>>2]|0)+1|0)>(c[m>>2]|0)){c[q>>2]=Pe(35459)|0;break}else{TR((c[p>>2]|0)+(c[k>>2]|0)|0,c[p>>2]|0,(c[o>>2]|0)+1|0)|0;MR(c[p>>2]|0,c[h>>2]|0,c[k>>2]|0)|0;c[o>>2]=(c[o>>2]|0)+(c[k>>2]|0);break}}while(0);a[(c[p>>2]|0)+(c[o>>2]|0)>>0]=0}while(0);c[h>>2]=c[p>>2]}if((c[q>>2]|0)==0?(c[h>>2]|0)!=(c[n>>2]|0):0)c[q>>2]=pf(c[h>>2]|0,c[n>>2]|0,c[m>>2]|0)|0;if(!(c[i>>2]|0)){b=30;break}c[h>>2]=c[n>>2];if(c[q>>2]|0){b=30;break}}if((b|0)==30){Kd(c[p>>2]|0);l=r;return c[q>>2]|0}return 0}function ee(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[k+20>>2]=b;c[f>>2]=d;c[g>>2]=e;GR(c[g>>2]|0,0,c[f>>2]|0)|0;c[11754]=mR()|0;c[h>>2]=Oe(18275,0,0)|0;if((c[h>>2]|0)<0){gb(j|0)|0;i=c[g>>2]|0;a[i>>0]=a[j>>0]|0;a[i+1>>0]=a[j+1>>0]|0;a[i+2>>0]=a[j+2>>0]|0;a[i+3>>0]=a[j+3>>0]|0;j=(c[g>>2]|0)+4|0;a[j>>0]=a[47016]|0;a[j+1>>0]=a[47017]|0;a[j+2>>0]=a[47018]|0;a[j+3>>0]=a[47019]|0;c[f>>2]=8;j=c[f>>2]|0;l=k;return j|0}do{c[i>>2]=ob[c[1512>>2]&255](c[h>>2]|0,c[g>>2]|0,c[f>>2]|0)|0;if((c[i>>2]|0)>=0)break}while((c[(_P()|0)>>2]|0)==4);Ie(0,c[h>>2]|0,35583);j=c[f>>2]|0;l=k;return j|0}function fe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[e+8>>2]=a;c[f>>2]=b;c[d>>2]=((c[f>>2]|0)+999999|0)/1e6|0;eR(c[d>>2]|0)|0;l=e;return (c[d>>2]|0)*1e6|0}function ge(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+32|0;f=e+12|0;g=e;d=e+8|0;c[e+16>>2]=a;c[f>>2]=b;b=g;c[b>>2]=0;c[b+4>>2]=0;c[d>>2]=ie(0,g)|0;b=g;h[c[f>>2]>>3]=(+((c[b>>2]|0)>>>0)+4294967296.0*+(c[b+4>>2]|0))/864.0e5;l=e;return c[d>>2]|0}function he(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=l;l=l+16|0;c[e+8>>2]=a;c[e+4>>2]=b;c[e>>2]=d;d=c[(_P()|0)>>2]|0;l=e;return d|0}function ie(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+32|0;f=e+12|0;d=e+8|0;g=e;c[e+16>>2]=a;c[f>>2]=b;c[d>>2]=0;hb(g|0,0)|0;b=c[g>>2]|0;b=RR(1e3,0,b|0,((b|0)<0)<<31>>31|0)|0;b=IR(1045635584,49096,b|0,z|0)|0;a=(c[g+4>>2]|0)/1e3|0;a=IR(b|0,z|0,a|0,((a|0)<0)<<31>>31|0)|0;b=c[f>>2]|0;c[b>>2]=a;c[b+4>>2]=z;l=e;return c[d>>2]|0}function je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+12|0;f=j+8|0;g=j+4|0;h=j;c[j+16>>2]=a;c[e>>2]=b;c[f>>2]=d;c[h>>2]=12;if(!(c[e>>2]|0)){c[h>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>>>0>=28)break;if(c[1412+((c[g>>2]|0)*12|0)+8>>2]|0)c[1412+((c[g>>2]|0)*12|0)+4>>2]=c[1412+((c[g>>2]|0)*12|0)+8>>2];c[g>>2]=(c[g>>2]|0)+1}i=c[h>>2]|0;l=j;return i|0}c[g>>2]=0;while(1){if((c[g>>2]|0)>>>0>=28){i=16;break}d=(vQ(c[e>>2]|0,c[1412+((c[g>>2]|0)*12|0)>>2]|0)|0)==0;a=c[g>>2]|0;if(d)break;c[g>>2]=a+1}if((i|0)==16){i=c[h>>2]|0;l=j;return i|0}if(!(c[1412+(a*12|0)+8>>2]|0))c[1412+((c[g>>2]|0)*12|0)+8>>2]=c[1412+((c[g>>2]|0)*12|0)+4>>2];c[h>>2]=0;if(!(c[f>>2]|0))c[f>>2]=c[1412+((c[g>>2]|0)*12|0)+8>>2];c[1412+((c[g>>2]|0)*12|0)+4>>2]=c[f>>2];i=c[h>>2]|0;l=j;return i|0}function ke(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;f=g+12|0;d=g+4|0;e=g;c[g+8>>2]=a;c[d>>2]=b;c[e>>2]=0;while(1){if((c[e>>2]|0)>>>0>=28){a=6;break}a=(vQ(c[d>>2]|0,c[1412+((c[e>>2]|0)*12|0)>>2]|0)|0)==0;b=c[e>>2]|0;if(a){a=4;break}c[e>>2]=b+1}if((a|0)==4){c[f>>2]=c[1412+(b*12|0)+4>>2];f=c[f>>2]|0;l=g;return f|0}else if((a|0)==6){c[f>>2]=0;f=c[f>>2]|0;l=g;return f|0}return 0}function le(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;f=g+12|0;d=g+4|0;e=g;c[g+8>>2]=a;c[d>>2]=b;c[e>>2]=-1;a:do if(c[d>>2]|0){c[e>>2]=0;while(1){if((c[e>>2]|0)>=27)break a;if(!(vQ(c[d>>2]|0,c[1412+((c[e>>2]|0)*12|0)>>2]|0)|0))break a;c[e>>2]=(c[e>>2]|0)+1}}while(0);c[e>>2]=(c[e>>2]|0)+1;while(1){if((c[e>>2]|0)>=28){a=11;break}b=c[e>>2]|0;if(c[1412+((c[e>>2]|0)*12|0)+4>>2]|0){a=9;break}c[e>>2]=b+1}if((a|0)==9){c[f>>2]=c[1412+(b*12|0)>>2];f=c[f>>2]|0;l=g;return f|0}else if((a|0)==11){c[f>>2]=0;f=c[f>>2]|0;l=g;return f|0}return 0}function me(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 1336}function ne(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];ue(c[d>>2]|0,0)|0;Kd(c[(c[e>>2]|0)+24>>2]|0);a=jf(c[d>>2]|0)|0;l=b;return a|0}function oe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;m=l;l=l+32|0;i=m+28|0;o=m+24|0;j=m+20|0;k=m+16|0;n=m;g=m+12|0;h=m+8|0;c[o>>2]=a;c[j>>2]=b;c[k>>2]=d;d=n;c[d>>2]=e;c[d+4>>2]=f;c[g>>2]=c[o>>2];f=n;c[h>>2]=hf(c[g>>2]|0,c[f>>2]|0,c[f+4>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;if((c[h>>2]|0)==(c[k>>2]|0)){c[i>>2]=0;o=c[i>>2]|0;l=m;return o|0}if((c[h>>2]|0)<0){c[i>>2]=266;o=c[i>>2]|0;l=m;return o|0}else{df(c[g>>2]|0,0);GR((c[j>>2]|0)+(c[h>>2]|0)|0,0,(c[k>>2]|0)-(c[h>>2]|0)|0)|0;c[i>>2]=522;o=c[i>>2]|0;l=m;return o|0}return 0}function pe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+32|0;i=n+28|0;o=n+24|0;j=n+20|0;k=n+16|0;m=n;g=n+12|0;h=n+8|0;c[o>>2]=a;c[j>>2]=b;c[k>>2]=d;d=m;c[d>>2]=e;c[d+4>>2]=f;c[g>>2]=c[o>>2];c[h>>2]=0;while(1){o=m;o=bf(c[g>>2]|0,c[o>>2]|0,c[o+4>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;c[h>>2]=o;if(!((o|0)<(c[k>>2]|0)?(c[h>>2]|0)>0:0))break;c[k>>2]=(c[k>>2]|0)-(c[h>>2]|0);f=c[h>>2]|0;o=m;f=IR(c[o>>2]|0,c[o+4>>2]|0,f|0,((f|0)<0)<<31>>31|0)|0;o=m;c[o>>2]=f;c[o+4>>2]=z;c[j>>2]=(c[j>>2]|0)+(c[h>>2]|0)}if((c[k>>2]|0)<=(c[h>>2]|0)){c[i>>2]=0;o=c[i>>2]|0;l=n;return o|0}if((c[h>>2]|0)<0?(c[(c[g>>2]|0)+20>>2]|0)!=28:0){c[i>>2]=778;o=c[i>>2]|0;l=n;return o|0}df(c[g>>2]|0,0);c[i>>2]=13;o=c[i>>2]|0;l=n;return o|0}function qe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+20|0;j=i+16|0;f=i;g=i+12|0;h=i+8|0;c[j>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;c[g>>2]=c[j>>2];if((c[(c[g>>2]|0)+40>>2]|0)>0){j=f;d=c[(c[g>>2]|0)+40>>2]|0;d=IR(c[j>>2]|0,c[j+4>>2]|0,d|0,((d|0)<0)<<31>>31|0)|0;d=FR(d|0,z|0,1,0)|0;j=c[(c[g>>2]|0)+40>>2]|0;j=LR(d|0,z|0,j|0,((j|0)<0)<<31>>31|0)|0;d=c[(c[g>>2]|0)+40>>2]|0;d=RR(j|0,z|0,d|0,((d|0)<0)<<31>>31|0)|0;j=f;c[j>>2]=d;c[j+4>>2]=z}j=f;c[h>>2]=gf(c[(c[g>>2]|0)+12>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;if(c[h>>2]|0){j=c[g>>2]|0;df(j,c[(_P()|0)>>2]|0);c[e>>2]=Je(1546,17962,c[(c[g>>2]|0)+32>>2]|0,32998)|0;j=c[e>>2]|0;l=i;return j|0}else{c[e>>2]=0;j=c[e>>2]|0;l=i;return j|0}return 0}function re(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;j=l;l=l+32|0;f=j+28|0;o=j+24|0;n=j+20|0;g=j+16|0;h=j+12|0;k=j+8|0;m=j+4|0;i=j;c[o>>2]=a;c[n>>2]=d;c[h>>2]=c[o>>2];c[k>>2]=c[n>>2]&16;c[m>>2]=(c[n>>2]&15|0)==3&1;c[g>>2]=ff(c[(c[h>>2]|0)+12>>2]|0,c[m>>2]|0,c[k>>2]|0)|0;a=c[h>>2]|0;if(c[g>>2]|0){df(a,c[(_P()|0)>>2]|0);c[f>>2]=Je(1034,18264,c[(c[h>>2]|0)+32>>2]|0,32953)|0;o=c[f>>2]|0;l=j;return o|0}if((e[a+18>>1]|0)&8|0){c[g>>2]=yb[c[1620>>2]&255](c[(c[h>>2]|0)+32>>2]|0,i)|0;if(!(c[g>>2]|0)){ff(c[i>>2]|0,0,0)|0;Ie(c[h>>2]|0,c[i>>2]|0,32967)}else c[g>>2]=0;o=(c[h>>2]|0)+18|0;b[o>>1]=(e[o>>1]|0)&-9}c[f>>2]=c[g>>2];o=c[f>>2]|0;l=j;return o|0}function se(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+96|0;d=h+88|0;e=h+84|0;f=h+80|0;i=h+76|0;g=h;c[e>>2]=a;c[f>>2]=b;c[i>>2]=yb[c[1476>>2]&255](c[(c[e>>2]|0)+12>>2]|0,g)|0;if(c[i>>2]|0){i=c[e>>2]|0;df(i,c[(_P()|0)>>2]|0);c[d>>2]=1802;i=c[d>>2]|0;l=h;return i|0}g=c[g+36>>2]|0;i=c[f>>2]|0;c[i>>2]=g;c[i+4>>2]=((g|0)<0)<<31>>31;i=c[f>>2]|0;if((c[i>>2]|0)==1&(c[i+4>>2]|0)==0){i=c[f>>2]|0;c[i>>2]=0;c[i+4>>2]=0}c[d>>2]=0;i=c[d>>2]|0;l=h;return i|0}function te(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;f=m+24|0;n=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[n>>2]=b;c[g>>2]=e;c[h>>2]=c[n>>2];c[i>>2]=c[(c[h>>2]|0)+24>>2];c[j>>2]=0;if((d[(c[h>>2]|0)+16>>0]|0|0)>0){a[(c[h>>2]|0)+16>>0]=c[g>>2];xa(c[i>>2]|0,0)|0;c[f>>2]=0;n=c[f>>2]|0;l=m;return n|0}c[j>>2]=yb[c[1632>>2]&255](c[i>>2]|0,511)|0;if((c[j>>2]|0)>=0){a[(c[h>>2]|0)+16>>0]=c[g>>2];c[f>>2]=c[j>>2];n=c[f>>2]|0;l=m;return n|0}c[k>>2]=c[(_P()|0)>>2];if(17!=(c[k>>2]|0)){c[j>>2]=ef(c[k>>2]|0,3850)|0;if((c[j>>2]|0)!=5)df(c[h>>2]|0,c[k>>2]|0)}else c[j>>2]=5;c[f>>2]=c[j>>2];n=c[f>>2]|0;l=m;return n|0}function ue(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;f=m+24|0;n=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[n>>2]=b;c[g>>2]=e;c[h>>2]=c[n>>2];c[i>>2]=c[(c[h>>2]|0)+24>>2];if((d[(c[h>>2]|0)+16>>0]|0|0)==(c[g>>2]|0)){c[f>>2]=0;n=c[f>>2]|0;l=m;return n|0}if((c[g>>2]|0)==1){a[(c[h>>2]|0)+16>>0]=1;c[f>>2]=0;n=c[f>>2]|0;l=m;return n|0}c[j>>2]=tb[c[1644>>2]&255](c[i>>2]|0)|0;if((c[j>>2]|0)>=0){a[(c[h>>2]|0)+16>>0]=0;c[f>>2]=0;n=c[f>>2]|0;l=m;return n|0}c[k>>2]=c[(_P()|0)>>2];if((c[k>>2]|0)==2)c[j>>2]=0;else{c[j>>2]=2058;df(c[h>>2]|0,c[k>>2]|0)}c[f>>2]=c[j>>2];n=c[f>>2]|0;l=m;return n|0}function ve(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=l;l=l+32|0;i=e+16|0;f=e+12|0;d=e+8|0;g=e+4|0;h=e;c[i>>2]=a;c[f>>2]=b;c[d>>2]=0;c[g>>2]=0;c[h>>2]=c[i>>2];c[g>>2]=(yb[c[1440>>2]&255](c[(c[h>>2]|0)+24>>2]|0,0)|0)==0&1;c[c[f>>2]>>2]=c[g>>2];l=e;return c[d>>2]|0}function we(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;m=l;l=l+32|0;k=m;f=m+28|0;o=m+24|0;n=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;c[o>>2]=a;c[n>>2]=b;c[g>>2]=e;c[h>>2]=c[o>>2];do switch(c[n>>2]|0){case 1:{c[c[g>>2]>>2]=d[(c[h>>2]|0)+16>>0];c[f>>2]=0;break}case 4:{c[c[g>>2]>>2]=c[(c[h>>2]|0)+20>>2];c[f>>2]=0;break}case 6:{c[(c[h>>2]|0)+40>>2]=c[c[g>>2]>>2];c[f>>2]=0;break}case 5:{o=c[g>>2]|0;c[i>>2]=Se(c[h>>2]|0,c[o>>2]|0,c[o+4>>2]|0)|0;c[f>>2]=c[i>>2];break}case 10:{Te(c[h>>2]|0,4,c[g>>2]|0);c[f>>2]=0;break}case 13:{Te(c[h>>2]|0,16,c[g>>2]|0);c[f>>2]=0;break}case 12:{c[k>>2]=c[(c[(c[h>>2]|0)+4>>2]|0)+16>>2];o=Ue(18130,k)|0;c[c[g>>2]>>2]=o;c[f>>2]=0;break}case 16:{o=c[(c[(c[h>>2]|0)+4>>2]|0)+8>>2]|0;c[j>>2]=Ve(o,((o|0)<0)<<31>>31)|0;if(c[j>>2]|0){We(c[(c[(c[h>>2]|0)+4>>2]|0)+8>>2]|0,c[j>>2]|0)|0;c[c[g>>2]>>2]=c[j>>2]}c[f>>2]=0;break}case 20:{o=Xe(c[h>>2]|0)|0;c[c[g>>2]>>2]=o;c[f>>2]=0;break}default:c[f>>2]=12}while(0);l=m;return c[f>>2]|0}function xe(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;l=b;return 4096}function ye(a){a=a|0;var b=0,d=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;f=d+4|0;b=d;c[g>>2]=a;c[f>>2]=c[g>>2];c[b>>2]=0;if(!((e[(c[f>>2]|0)+18>>1]|0)&16)){g=c[b>>2]|0;l=d;return g|0}c[b>>2]=c[b>>2]|4096;g=c[b>>2]|0;l=d;return g|0}function ze(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;v=u+32|0;o=u+28|0;p=u+24|0;q=u+20|0;r=u+16|0;s=u+12|0;h=u+8|0;i=u+4|0;j=u;k=u+40|0;m=u+38|0;n=u+36|0;c[v>>2]=a;c[o>>2]=d;c[p>>2]=f;c[q>>2]=g;c[r>>2]=c[v>>2];c[s>>2]=c[(c[r>>2]|0)+36>>2];c[i>>2]=c[c[s>>2]>>2];c[j>>2]=0;b[k>>1]=(1<<(c[o>>2]|0)+(c[p>>2]|0))-(1<>2]);if(c[q>>2]&1|0){b[m>>1]=0;c[h>>2]=c[(c[i>>2]|0)+32>>2];while(1){if(!(c[h>>2]|0))break;if((c[h>>2]|0)!=(c[s>>2]|0))b[m>>1]=e[m>>1]|0|(e[(c[h>>2]|0)+10>>1]|0);c[h>>2]=c[(c[h>>2]|0)+4>>2]}if(!((e[k>>1]|0)&(e[m>>1]|0)))c[j>>2]=Re(c[r>>2]|0,2,(c[o>>2]|0)+120|0,c[p>>2]|0)|0;else c[j>>2]=0;if(c[j>>2]|0){v=c[j>>2]|0;l=u;return v|0}v=(c[s>>2]|0)+12|0;b[v>>1]=(e[v>>1]|0)&~(e[k>>1]|0);v=(c[s>>2]|0)+10|0;b[v>>1]=(e[v>>1]|0)&~(e[k>>1]|0);v=c[j>>2]|0;l=u;return v|0}if(!(c[q>>2]&4)){c[h>>2]=c[(c[i>>2]|0)+32>>2];while(1){if(!(c[h>>2]|0))break;if((e[(c[h>>2]|0)+12>>1]|0)&(e[k>>1]|0)|0){t=28;break}if((e[(c[h>>2]|0)+10>>1]|0)&(e[k>>1]|0)|0){t=28;break}c[h>>2]=c[(c[h>>2]|0)+4>>2]}if((t|0)==28)c[j>>2]=5;if(c[j>>2]|0){v=c[j>>2]|0;l=u;return v|0}c[j>>2]=Re(c[r>>2]|0,1,(c[o>>2]|0)+120|0,c[p>>2]|0)|0;if(c[j>>2]|0){v=c[j>>2]|0;l=u;return v|0}v=(c[s>>2]|0)+12|0;b[v>>1]=e[v>>1]|0|(e[k>>1]|0);v=c[j>>2]|0;l=u;return v|0}b[n>>1]=0;c[h>>2]=c[(c[i>>2]|0)+32>>2];while(1){if(!(c[h>>2]|0))break;if((e[(c[h>>2]|0)+12>>1]|0)&(e[k>>1]|0)|0){t=16;break}b[n>>1]=e[n>>1]|0|(e[(c[h>>2]|0)+10>>1]|0);c[h>>2]=c[(c[h>>2]|0)+4>>2]}if((t|0)==16)c[j>>2]=5;do if(!(c[j>>2]|0))if(!((e[n>>1]|0)&(e[k>>1]|0))){c[j>>2]=Re(c[r>>2]|0,0,(c[o>>2]|0)+120|0,c[p>>2]|0)|0;break}else{c[j>>2]=0;break}while(0);if(c[j>>2]|0){v=c[j>>2]|0;l=u;return v|0}v=(c[s>>2]|0)+10|0;b[v>>1]=e[v>>1]|0|(e[k>>1]|0);v=c[j>>2]|0;l=u;return v|0}function Ae(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;Ee();Ge();l=b;return}function Be(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;d=j+24|0;k=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[k>>2]=a;c[e>>2]=b;c[i>>2]=c[k>>2];c[f>>2]=c[(c[i>>2]|0)+36>>2];if(!(c[f>>2]|0)){c[d>>2]=0;k=c[d>>2]|0;l=j;return k|0}c[g>>2]=c[c[f>>2]>>2];c[h>>2]=(c[g>>2]|0)+32;while(1){if((c[c[h>>2]>>2]|0)==(c[f>>2]|0))break;c[h>>2]=(c[c[h>>2]>>2]|0)+4}c[c[h>>2]>>2]=c[(c[f>>2]|0)+4>>2];Kd(c[f>>2]|0);c[(c[i>>2]|0)+36>>2]=0;Ee();k=(c[g>>2]|0)+28|0;c[k>>2]=(c[k>>2]|0)+-1;if(!(c[(c[g>>2]|0)+28>>2]|0)){if(c[e>>2]|0?(c[(c[g>>2]|0)+12>>2]|0)>=0:0)tb[c[1608>>2]&255](c[(c[g>>2]|0)+8>>2]|0)|0;Fe(c[i>>2]|0)}Ge();c[d>>2]=0;k=c[d>>2]|0;l=j;return k|0}function Ce(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=l;l=l+32|0;h=g+8|0;c[g+16>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;c[g+12>>2]=e;c[h>>2]=f;c[c[h>>2]>>2]=0;l=g;return 0}function De(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=l;l=l+16|0;c[f+12>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;c[f+8>>2]=e;l=f;return 0}function Ee(){return}function Fe(a){a=a|0;var b=0,d=0,f=0,g=0,h=0;h=l;l=l+16|0;b=h+12|0;d=h+8|0;f=h+4|0;g=h;c[b>>2]=a;c[d>>2]=c[(c[(c[b>>2]|0)+8>>2]|0)+20>>2];if(!(c[d>>2]|0)){l=h;return}if(c[(c[d>>2]|0)+28>>2]|0){l=h;return}c[f>>2]=He()|0;c[g>>2]=0;while(1){a=c[d>>2]|0;if((c[g>>2]|0)>=(e[(c[d>>2]|0)+20>>1]|0|0))break;if((c[a+12>>2]|0)>=0)yb[c[1692>>2]&255](c[(c[(c[d>>2]|0)+24>>2]|0)+(c[g>>2]<<2)>>2]|0,c[(c[d>>2]|0)+16>>2]|0)|0;else Kd(c[(c[(c[d>>2]|0)+24>>2]|0)+(c[g>>2]<<2)>>2]|0);c[g>>2]=(c[g>>2]|0)+(c[f>>2]|0)}Kd(c[a+24>>2]|0);if((c[(c[d>>2]|0)+12>>2]|0)>=0){Ie(c[b>>2]|0,c[(c[d>>2]|0)+12>>2]|0,33574);c[(c[d>>2]|0)+12>>2]=-1}c[(c[c[d>>2]>>2]|0)+20>>2]=0;Kd(c[d>>2]|0);l=h;return}function Ge(){return}function He(){var a=0,b=0,d=0,e=0;e=l;l=l+16|0;a=e+8|0;b=e+4|0;d=e;c[b>>2]=32768;c[d>>2]=pb[c[1716>>2]&255]()|0;if((c[d>>2]|0)<(c[b>>2]|0)){c[a>>2]=1;d=c[a>>2]|0;l=e;return d|0}else{c[a>>2]=(c[d>>2]|0)/(c[b>>2]|0)|0;d=c[a>>2]|0;l=e;return d|0}return 0}function Ie(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;h=g+4|0;f=g;c[e>>2]=a;c[h>>2]=b;c[f>>2]=d;if(!(tb[c[1428>>2]&255](c[h>>2]|0)|0)){l=g;return}if(c[e>>2]|0)a=c[(c[e>>2]|0)+32>>2]|0;else a=0;Je(4106,17895,a,c[f>>2]|0)|0;l=g;return}function Je(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+48|0;m=n;f=n+40|0;g=n+36|0;h=n+32|0;i=n+28|0;j=n+24|0;k=n+20|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[k>>2]=c[(_P()|0)>>2];c[j>>2]=oQ(c[k>>2]|0)|0;if(!(c[h>>2]|0))c[h>>2]=47636;e=c[f>>2]|0;d=c[k>>2]|0;g=c[g>>2]|0;h=c[h>>2]|0;k=c[j>>2]|0;c[m>>2]=c[i>>2];c[m+4>>2]=d;c[m+8>>2]=g;c[m+12>>2]=h;c[m+16>>2]=k;hd(e,17901,m);l=n;return c[f>>2]|0}function Ke(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;f=e;i=e+12|0;h=e+8|0;g=e+4|0;c[i>>2]=a;c[h>>2]=b;c[g>>2]=d;b=c[i>>2]|0;d=c[h>>2]|0;c[f>>2]=c[g>>2];d=QQ(b,d,f)|0;l=e;return d|0}function Le(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+544|0;k=j;f=j+20|0;m=j+16|0;g=j+12|0;e=j+8|0;h=j+4|0;i=j+24|0;c[m>>2]=b;c[g>>2]=d;c[h>>2]=-1;c[k>>2]=c[m>>2];Ne(512,i,18130,k)|0;c[e>>2]=lQ(i)|0;while(1){if((c[e>>2]|0)<=0)break;if((a[i+(c[e>>2]|0)>>0]|0)==47)break;c[e>>2]=(c[e>>2]|0)+-1}if((c[e>>2]|0)<=0)if((a[i>>0]|0)!=47){a[i>>0]=46;b=1}else b=1;else b=c[e>>2]|0;a[i+b>>0]=0;c[h>>2]=Oe(i,0,0)|0;c[c[g>>2]>>2]=c[h>>2];if((c[h>>2]|0)>=0){c[f>>2]=0;m=c[f>>2]|0;l=j;return m|0}else{c[f>>2]=Je(Pe(32912)|0,18043,i,32912)|0;m=c[f>>2]|0;l=j;return m|0}return 0}function Me(){return Qa(30)|0}function Ne(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;g=l;l=l+32|0;k=g+28|0;j=g+24|0;i=g+20|0;f=g+16|0;h=g;c[k>>2]=a;c[j>>2]=b;c[i>>2]=d;c[h>>2]=e;c[f>>2]=Qe(c[k>>2]|0,c[j>>2]|0,c[i>>2]|0,h)|0;l=g;return c[f>>2]|0}function Oe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+112|0;k=m;e=m+100|0;f=m+96|0;g=m+92|0;h=m+88|0;i=m+84|0;j=m+8|0;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[i>>2]=c[g>>2]|0?c[g>>2]|0:420;while(1){c[h>>2]=ob[c[1416>>2]&255](c[e>>2]|0,c[f>>2]|524288,c[i>>2]|0)|0;if((c[h>>2]|0)<0)if((c[(_P()|0)>>2]|0)==4)continue;else break;if((c[h>>2]|0)>=3)break;tb[c[1428>>2]&255](c[h>>2]|0)|0;d=c[h>>2]|0;c[k>>2]=c[e>>2];c[k+4>>2]=d;hd(28,18150,k);c[h>>2]=-1;if((ob[c[1416>>2]&255](18193,c[f>>2]|0,c[g>>2]|0)|0)<0)break}if(!((c[h>>2]|0)>=0&(c[g>>2]|0)!=0)){k=c[h>>2]|0;l=m;return k|0}if(yb[c[1476>>2]&255](c[h>>2]|0,j)|0){k=c[h>>2]|0;l=m;return k|0}if(c[j+36>>2]|0){k=c[h>>2]|0;l=m;return k|0}if((c[j+12>>2]&511|0)==(c[g>>2]|0)){k=c[h>>2]|0;l=m;return k|0}yb[c[1584>>2]&255](c[h>>2]|0,c[g>>2]|0)|0;k=c[h>>2]|0;l=m;return k|0}function Pe(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=fd(14,c[d>>2]|0,18133)|0;l=b;return a|0}function Qe(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+48|0;f=k+44|0;g=k+40|0;m=k+36|0;h=k+32|0;i=k+28|0;j=k;c[g>>2]=a;c[m>>2]=b;c[h>>2]=d;c[i>>2]=e;a=c[m>>2]|0;if((c[g>>2]|0)<=0){c[f>>2]=a;m=c[f>>2]|0;l=k;return m|0}else{jd(j,0,a,c[g>>2]|0,0);kd(j,c[h>>2]|0,c[i>>2]|0);c[f>>2]=ld(j)|0;m=c[f>>2]|0;l=k;return m|0}return 0}function Re(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+48|0;n=o;p=o+40|0;h=o+36|0;i=o+32|0;j=o+28|0;k=o+24|0;m=o+8|0;g=o+4|0;c[p>>2]=a;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;c[g>>2]=0;c[k>>2]=c[(c[(c[p>>2]|0)+8>>2]|0)+20>>2];if((c[(c[k>>2]|0)+12>>2]|0)<0){p=c[g>>2]|0;l=o;return p|0};c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;b[m>>1]=c[h>>2];b[m+2>>1]=0;c[m+4>>2]=c[i>>2];c[m+8>>2]=c[j>>2];j=c[375]|0;p=c[(c[k>>2]|0)+12>>2]|0;c[n>>2]=m;c[g>>2]=ob[j&255](p,13,n)|0;c[g>>2]=(c[g>>2]|0)!=-1?0:5;p=c[g>>2]|0;l=o;return p|0}function Se(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+128|0;f=n+112|0;g=n+108|0;h=n+16|0;i=n+8|0;j=n+32|0;k=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|0)!=1)break;h=c[k>>2]|0;j=e;h=IR(c[j>>2]|0,c[j+4>>2]|0,h|0,((h|0)<0)<<31>>31|0)|0;j=e;c[j>>2]=h;c[j+4>>2]=z}c[f>>2]=778;m=c[f>>2]|0;l=n;return m|0}}while(0);c[f>>2]=0;m=c[f>>2]|0;l=n;return m|0}function Te(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m+4|0;i=m+8|0;k=m;c[j>>2]=f;a[i>>0]=g;c[k>>2]=h;if((c[c[k>>2]>>2]|0)<0){c[c[k>>2]>>2]=((e[(c[j>>2]|0)+18>>1]|0)&(d[i>>0]|0)|0)!=0&1;l=m;return}f=d[i>>0]|0;if(!(c[c[k>>2]>>2]|0)){k=(c[j>>2]|0)+18|0;g=k;f=(e[k>>1]|0)&~f}else{k=(c[j>>2]|0)+18|0;g=k;f=e[k>>1]|0|f}b[g>>1]=f;l=m;return}function Ue(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;d=h+28|0;e=h+24|0;f=h+8|0;g=h;c[e>>2]=a;if(Rd()|0){c[d>>2]=0;b=c[d>>2]|0;l=h;return b|0}else{c[f>>2]=b;c[g>>2]=af(c[e>>2]|0,f)|0;c[d>>2]=c[g>>2];b=c[d>>2]|0;l=h;return b|0}return 0}function Ve(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;e=f;g=e;c[g>>2]=a;c[g+4>>2]=b;if(Rd()|0){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}else{g=e;c[d>>2]=pd(c[g>>2]|0,c[g+4>>2]|0)|0;g=c[d>>2]|0;l=f;return g|0}return 0}function We(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;m=l;l=l+64|0;j=m+8|0;k=m+48|0;e=m+44|0;f=m+40|0;g=m+36|0;h=m+32|0;i=m;c[e>>2]=b;c[f>>2]=d;c[h>>2]=0;a[c[f>>2]>>0]=0;c[g>>2]=Ye()|0;if(!(c[g>>2]|0)){c[k>>2]=6410;k=c[k>>2]|0;l=m;return k|0}while(1){Ze(8,i);a[(c[f>>2]|0)+((c[e>>2]|0)-2)>>0]=0;b=c[e>>2]|0;d=c[f>>2]|0;o=i;p=c[o>>2]|0;o=c[o+4>>2]|0;c[j>>2]=c[g>>2];n=j+8|0;c[n>>2]=p;c[n+4>>2]=o;c[j+16>>2]=0;Ne(b,d,18203,j)|0;if(a[(c[f>>2]|0)+((c[e>>2]|0)-2)>>0]|0){b=5;break}p=c[h>>2]|0;c[h>>2]=p+1;if((p|0)>10){b=5;break}if(yb[c[1440>>2]&255](c[f>>2]|0,0)|0){b=7;break}}if((b|0)==5){c[k>>2]=1;p=c[k>>2]|0;l=m;return p|0}else if((b|0)==7){c[k>>2]=0;p=c[k>>2]|0;l=m;return p|0}return 0}function Xe(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+80|0;b=e+76|0;d=e;c[b>>2]=a;if(!(c[(c[b>>2]|0)+8>>2]|0)){d=0;d=d&1;l=e;return d|0}if(yb[c[1464>>2]&255](c[(c[b>>2]|0)+32>>2]|0,d)|0){d=1;d=d&1;l=e;return d|0}d=(c[d+72>>2]|0)!=(c[(c[(c[b>>2]|0)+8>>2]|0)+4>>2]|0);d=d&1;l=e;return d|0}function Ye(){var a=0,b=0,d=0,e=0,f=0,g=0;f=l;l=l+96|0;d=f+84|0;a=f+80|0;b=f+4|0;e=f;c[a>>2]=0;c[e>>2]=c[11684];if(!(c[437]|0))c[437]=Va(18220)|0;if(!(c[438]|0))c[438]=Va(18234)|0;while(1){if(((c[e>>2]|0?(yb[c[1464>>2]&255](c[e>>2]|0,b)|0)==0:0)?(c[b+12>>2]&61440|0)==16384:0)?(yb[c[1440>>2]&255](c[e>>2]|0,3)|0)==0:0){a=9;break}if((c[a>>2]|0)>>>0>=6){a=12;break}g=c[a>>2]|0;c[a>>2]=g+1;c[e>>2]=c[1748+(g<<2)>>2]}if((a|0)==9){c[d>>2]=c[e>>2];g=c[d>>2]|0;l=f;return g|0}else if((a|0)==12){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}return 0}function Ze(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+288|0;f=m+12|0;g=m+8|0;h=m+272|0;i=m+4|0;j=m;k=m+16|0;c[f>>2]=b;c[g>>2]=e;c[i>>2]=c[g>>2];if(Rd()|0){l=m;return}if((c[f>>2]|0)<=0|(c[g>>2]|0)==0){a[47637]=0;l=m;return}if(!(a[47637]|0)){a[47639]=0;a[47638]=0;$e(_e(0)|0,256,k)|0;c[j>>2]=0;while(1){if((c[j>>2]|0)>=256)break;a[47640+(c[j>>2]|0)>>0]=c[j>>2];c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=0;while(1){if((c[j>>2]|0)>=256)break;a[47639]=(d[47639]|0)+((d[47640+(c[j>>2]|0)>>0]|0)+(a[k+(c[j>>2]|0)>>0]|0));a[h>>0]=a[47640+(d[47639]|0)>>0]|0;a[47640+(d[47639]|0)>>0]=a[47640+(c[j>>2]|0)>>0]|0;a[47640+(c[j>>2]|0)>>0]=a[h>>0]|0;c[j>>2]=(c[j>>2]|0)+1}a[47637]=1}do{a[47638]=(a[47638]|0)+1<<24>>24;a[h>>0]=a[47640+(d[47638]|0)>>0]|0;a[47639]=(d[47639]|0)+(d[h>>0]|0);a[47640+(d[47638]|0)>>0]=a[47640+(d[47639]|0)>>0]|0;a[47640+(d[47639]|0)>>0]=a[h>>0]|0;a[h>>0]=(d[h>>0]|0)+(d[47640+(d[47638]|0)>>0]|0);j=a[47640+(d[h>>0]|0)>>0]|0;k=c[i>>2]|0;c[i>>2]=k+1;a[k>>0]=j;k=(c[f>>2]|0)+-1|0;c[f>>2]=k}while((k|0)!=0);l=m;return}function _e(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;b=f+12|0;d=f+8|0;e=f+4|0;g=f;c[d>>2]=a;c[e>>2]=0;c[g>>2]=Rd()|0;if(c[g>>2]|0){c[b>>2]=0;g=c[b>>2]|0;l=f;return g|0}c[e>>2]=c[11753];while(1){if((c[e>>2]|0)==0|(c[d>>2]|0)==0)break;if(!(vQ(c[d>>2]|0,c[(c[e>>2]|0)+16>>2]|0)|0))break;c[e>>2]=c[(c[e>>2]|0)+12>>2]}c[b>>2]=c[e>>2];g=c[b>>2]|0;l=f;return g|0}function $e(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;d=ob[c[(c[h>>2]|0)+56>>2]&255](c[h>>2]|0,c[g>>2]|0,c[f>>2]|0)|0;l=e;return d|0}function af(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+128|0;d=i+40|0;e=i+36|0;f=i+32|0;g=i+28|0;h=i;c[e>>2]=a;c[f>>2]=b;if(Rd()|0){c[d>>2]=0;h=c[d>>2]|0;l=i;return h|0}else{jd(h,0,i+44|0,70,1e9);kd(h,c[e>>2]|0,c[f>>2]|0);c[g>>2]=ld(h)|0;c[d>>2]=c[g>>2];h=c[d>>2]|0;l=i;return h|0}return 0}function bf(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;g=l;l=l+32|0;h=g+16|0;k=g;j=g+12|0;i=g+8|0;c[h>>2]=a;a=k;c[a>>2]=b;c[a+4>>2]=d;c[j>>2]=e;c[i>>2]=f;f=k;f=cf(c[(c[h>>2]|0)+12>>2]|0,c[f>>2]|0,c[f+4>>2]|0,c[j>>2]|0,c[i>>2]|0,(c[h>>2]|0)+20|0)|0;l=g;return f|0}function cf(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;k=q+32|0;m=q+8|0;n=q+28|0;o=q+24|0;h=q+20|0;i=q+16|0;j=q;c[k>>2]=a;a=m;c[a>>2]=b;c[a+4>>2]=d;c[n>>2]=e;c[o>>2]=f;c[h>>2]=g;c[i>>2]=0;c[o>>2]=c[o>>2]&131071;do{f=ZQ(c[k>>2]|0,c[m>>2]|0,0)|0;g=j;c[g>>2]=f;c[g+4>>2]=((f|0)<0)<<31>>31;if((c[j+4>>2]|0)<0){p=3;break}c[i>>2]=ob[c[1548>>2]&255](c[k>>2]|0,c[n>>2]|0,c[o>>2]|0)|0;if((c[i>>2]|0)>=0)break}while((c[(_P()|0)>>2]|0)==4);if((p|0)==3)c[i>>2]=-1;if((c[i>>2]|0)>=0){p=c[i>>2]|0;l=q;return p|0}p=c[(_P()|0)>>2]|0;c[c[h>>2]>>2]=p;p=c[i>>2]|0;l=q;return p|0}function df(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[(c[e>>2]|0)+20>>2]=c[f>>2];l=d;return}function ef(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[g>>2]=a;c[e>>2]=b;switch(c[g>>2]|0){case 37:case 4:case 16:case 110:case 11:case 13:{c[d>>2]=5;break}case 1:{c[d>>2]=3;break}default:c[d>>2]=c[e>>2]}l=f;return c[d>>2]|0}function ff(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+16|0;g=f+12|0;e=f;c[g>>2]=a;c[f+8>>2]=b;c[f+4>>2]=d;c[e>>2]=jR(c[g>>2]|0)|0;l=f;return c[e>>2]|0}function gf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h;g=h+8|0;c[e>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;while(1){c[g>>2]=yb[c[1488>>2]&255](c[e>>2]|0,c[f>>2]|0)|0;if((c[g>>2]|0)>=0){a=4;break}if((c[(_P()|0)>>2]|0)!=4){a=4;break}}if((a|0)==4){l=h;return c[g>>2]|0}return 0}function hf(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;j=q+36|0;k=q+32|0;m=q+8|0;n=q+28|0;o=q+24|0;g=q+20|0;h=q+16|0;i=q;c[k>>2]=a;a=m;c[a>>2]=b;c[a+4>>2]=d;c[n>>2]=e;c[o>>2]=f;c[h>>2]=0;do{e=ZQ(c[(c[k>>2]|0)+12>>2]|0,c[m>>2]|0,0)|0;f=i;c[f>>2]=e;c[f+4>>2]=((e|0)<0)<<31>>31;if((c[i+4>>2]|0)<0){p=3;break}c[g>>2]=ob[c[1512>>2]&255](c[(c[k>>2]|0)+12>>2]|0,c[n>>2]|0,c[o>>2]|0)|0;if((c[g>>2]|0)==(c[o>>2]|0))break;if((c[g>>2]|0)>=0){if((c[g>>2]|0)>0){c[o>>2]=(c[o>>2]|0)-(c[g>>2]|0);e=c[g>>2]|0;f=m;e=IR(c[f>>2]|0,c[f+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;f=m;c[f>>2]=e;c[f+4>>2]=z;c[h>>2]=(c[h>>2]|0)+(c[g>>2]|0);c[n>>2]=(c[n>>2]|0)+(c[g>>2]|0)}}else{if((c[(_P()|0)>>2]|0)!=4){p=8;break}c[g>>2]=1}}while((c[g>>2]|0)>0);if((p|0)==3){p=c[k>>2]|0;df(p,c[(_P()|0)>>2]|0);c[j>>2]=-1;p=c[j>>2]|0;l=q;return p|0}else if((p|0)==8){c[h>>2]=0;p=c[k>>2]|0;df(p,c[(_P()|0)>>2]|0)}c[j>>2]=(c[g>>2]|0)+(c[h>>2]|0);p=c[j>>2]|0;l=q;return p|0}function jf(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];if((c[(c[b>>2]|0)+12>>2]|0)>=0){Ie(c[b>>2]|0,c[(c[b>>2]|0)+12>>2]|0,31321);c[(c[b>>2]|0)+12>>2]=-1}Kd(c[(c[b>>2]|0)+28>>2]|0);a=c[b>>2]|0;b=a+44|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));l=d;return 0}function kf(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 1772}function lf(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=jf(c[d>>2]|0)|0;l=b;return a|0}function mf(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 0}function nf(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 0}function of(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[d+4>>2]=a;c[e>>2]=b;c[c[e>>2]>>2]=0;l=d;return 0}function pf(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n;f=n+24|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[j>>2]=_c(c[g>>2]|0)|0;c[k>>2]=0;do if((a[c[g>>2]>>0]|0)!=47){if(yb[c[1452>>2]&255](c[h>>2]|0,(c[i>>2]|0)-2|0)|0){c[k>>2]=_c(c[h>>2]|0)|0;d=c[h>>2]|0;e=c[k>>2]|0;c[k>>2]=e+1;a[d+e>>0]=47;break}m=Pe(35379)|0;c[f>>2]=Je(m,17944,c[g>>2]|0,35379)|0;m=c[f>>2]|0;l=n;return m|0}while(0);if(((c[k>>2]|0)+(c[j>>2]|0)+1|0)>(c[i>>2]|0)){a[(c[h>>2]|0)+(c[k>>2]|0)>>0]=0;c[f>>2]=Pe(35388)|0;m=c[f>>2]|0;l=n;return m|0}else{j=(c[i>>2]|0)-(c[k>>2]|0)|0;k=(c[h>>2]|0)+(c[k>>2]|0)|0;c[m>>2]=c[g>>2];Ne(j,k,18130,m)|0;c[f>>2]=0;m=c[f>>2]|0;l=n;return m|0}return 0}function qf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+96|0;j=i+92|0;d=i+88|0;e=i+84|0;f=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[d>>2]=b;c[e>>2]=0;if(yb[c[1464>>2]&255](c[j>>2]|0,f)|0){j=c[e>>2]|0;l=i;return j|0}Ee();c[g>>2]=c[11755];while(1){if(c[g>>2]|0)if((c[c[g>>2]>>2]|0)!=(c[f>>2]|0))b=1;else b=(c[(c[g>>2]|0)+4>>2]|0)!=(c[f+72>>2]|0);else b=0;a=c[g>>2]|0;if(!b)break;c[g>>2]=c[a+32>>2]}if(a|0){c[h>>2]=(c[g>>2]|0)+28;while(1){if(!(c[c[h>>2]>>2]|0))break;if((c[(c[c[h>>2]>>2]|0)+4>>2]|0)==(c[d>>2]|0))break;c[h>>2]=(c[c[h>>2]>>2]|0)+8}c[e>>2]=c[c[h>>2]>>2];if(c[e>>2]|0)c[c[h>>2]>>2]=c[(c[e>>2]|0)+8>>2]}Ge();j=c[e>>2]|0;l=i;return j|0}function rf(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+560|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;q=r+12|0;h=r+8|0;i=r+32|0;j=r+4|0;k=r;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[h>>2]=0;c[c[o>>2]>>2]=0;c[c[p>>2]>>2]=0;c[c[q>>2]>>2]=0;if(c[n>>2]&526336|0){c[j>>2]=(_c(c[m>>2]|0)|0)-1;while(1){if((a[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)==45)break;c[j>>2]=(c[j>>2]|0)+-1}MR(i|0,c[m>>2]|0,c[j>>2]|0)|0;a[i+(c[j>>2]|0)>>0]=0;c[h>>2]=Pf(i,c[o>>2]|0,c[p>>2]|0,c[q>>2]|0)|0;q=c[h>>2]|0;l=r;return q|0}if(c[n>>2]&8|0){c[c[o>>2]>>2]=384;q=c[h>>2]|0;l=r;return q|0}if(!(c[n>>2]&64)){q=c[h>>2]|0;l=r;return q|0}c[k>>2]=Jf(c[m>>2]|0,18484)|0;if(!(c[k>>2]|0)){q=c[h>>2]|0;l=r;return q|0}c[h>>2]=Pf(c[k>>2]|0,c[o>>2]|0,c[p>>2]|0,c[q>>2]|0)|0;q=c[h>>2]|0;l=r;return q|0}function sf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(pb[c[1668>>2]&255]()|0){g=0;l=h;return g|0}g=ob[c[1656>>2]&255](c[e>>2]|0,c[f>>2]|0,c[g>>2]|0)|0;l=h;return g|0}function tf(a,d,f,g,h){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+48|0;s=t;o=t+40|0;p=t+36|0;u=t+32|0;q=t+28|0;r=t+24|0;i=t+20|0;j=t+16|0;k=t+12|0;m=t+8|0;n=t+4|0;c[o>>2]=a;c[p>>2]=d;c[u>>2]=f;c[q>>2]=g;c[r>>2]=h;c[j>>2]=c[u>>2];c[k>>2]=0;c[(c[j>>2]|0)+12>>2]=c[p>>2];c[(c[j>>2]|0)+4>>2]=c[o>>2];c[(c[j>>2]|0)+32>>2]=c[q>>2];b[(c[j>>2]|0)+18>>1]=c[r>>2]&255;if(uf(c[r>>2]&64|0?c[q>>2]|0:0,18294,1)|0){u=(c[j>>2]|0)+18|0;b[u>>1]=e[u>>1]|0|16}if(!(vQ(c[(c[o>>2]|0)+16>>2]|0,17885)|0)){u=(c[j>>2]|0)+18|0;b[u>>1]=e[u>>1]|0|1}if(c[r>>2]&128|0)c[i>>2]=1772;else c[i>>2]=yb[c[c[(c[o>>2]|0)+20>>2]>>2]&255](c[q>>2]|0,c[j>>2]|0)|0;if((c[i>>2]|0)!=1848){if((c[i>>2]|0)==1336){c[n>>2]=(lQ(c[q>>2]|0)|0)+6;u=c[n>>2]|0;c[m>>2]=Ve(u,((u|0)<0)<<31>>31)|0;if(!(c[m>>2]|0))c[k>>2]=7;else{r=c[n>>2]|0;u=c[m>>2]|0;c[s>>2]=c[q>>2];Ne(r,u,18299,s)|0}c[(c[j>>2]|0)+24>>2]=c[m>>2]}}else{Ee();c[k>>2]=vf(c[j>>2]|0,(c[j>>2]|0)+8|0)|0;if(c[k>>2]|0){Ie(c[j>>2]|0,c[p>>2]|0,34692);c[p>>2]=-1}Ge()}df(c[j>>2]|0,0);if(!(c[k>>2]|0)){c[c[j>>2]>>2]=c[i>>2];wf(c[j>>2]|0);u=c[k>>2]|0;l=t;return u|0}if((c[p>>2]|0)<0){u=c[k>>2]|0;l=t;return u|0}Ie(c[j>>2]|0,c[p>>2]|0,34777);u=c[k>>2]|0;l=t;return u|0}function uf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;i=g+12|0;h=g+8|0;e=g+4|0;f=g;c[i>>2]=a;c[h>>2]=b;c[e>>2]=d;c[f>>2]=Jf(c[i>>2]|0,c[h>>2]|0)|0;c[e>>2]=(c[e>>2]|0)!=0&1;if(c[f>>2]|0){i=(Kf(c[f>>2]|0,c[e>>2]&255)|0)&255;l=g;return i|0}else{i=c[e>>2]|0;l=g;return i|0}return 0}function vf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+112|0;f=j+104|0;d=j+100|0;g=j+96|0;k=j+92|0;m=j+88|0;h=j+80|0;e=j+4|0;i=j;c[d>>2]=a;c[g>>2]=b;c[i>>2]=0;c[m>>2]=c[(c[d>>2]|0)+12>>2];c[k>>2]=yb[c[1476>>2]&255](c[m>>2]|0,e)|0;if(c[k>>2]|0){m=c[d>>2]|0;df(m,c[(_P()|0)>>2]|0);if((c[(c[d>>2]|0)+20>>2]|0)==75){c[f>>2]=22;m=c[f>>2]|0;l=j;return m|0}else{c[f>>2]=10;m=c[f>>2]|0;l=j;return m|0}};c[h>>2]=0;c[h+4>>2]=0;c[h>>2]=c[e>>2];c[h+4>>2]=c[e+72>>2];c[i>>2]=c[11755];while(1){if(c[i>>2]|0)b=(wQ(h,c[i>>2]|0,8)|0)!=0;else b=0;a=c[i>>2]|0;if(!b)break;c[i>>2]=c[a+32>>2]}if(!a){c[i>>2]=Ve(40,0)|0;if(!(c[i>>2]|0)){c[f>>2]=7;m=c[f>>2]|0;l=j;return m|0}a=c[i>>2]|0;b=a+40|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));m=c[i>>2]|0;c[m>>2]=c[h>>2];c[m+4>>2]=c[h+4>>2];c[(c[i>>2]|0)+16>>2]=1;c[(c[i>>2]|0)+32>>2]=c[11755];c[(c[i>>2]|0)+36>>2]=0;if(c[11755]|0)c[(c[11755]|0)+36>>2]=c[i>>2];c[11755]=c[i>>2]}else{m=(c[i>>2]|0)+16|0;c[m>>2]=(c[m>>2]|0)+1}c[c[g>>2]>>2]=c[i>>2];c[f>>2]=0;m=c[f>>2]|0;l=j;return m|0}function wf(a){a=a|0;var b=0,d=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+112|0;j=k+24|0;i=k+16|0;f=k+8|0;d=k;g=k+108|0;h=k+32|0;b=k+28|0;c[g>>2]=a;if((e[(c[g>>2]|0)+18>>1]|0)&128|0){l=k;return}c[b>>2]=yb[c[1476>>2]&255](c[(c[g>>2]|0)+12>>2]|0,h)|0;if(c[b>>2]|0){c[d>>2]=c[(c[g>>2]|0)+32>>2];hd(28,18307,d);l=k;return}if(!(c[h+16>>2]|0)){c[f>>2]=c[(c[g>>2]|0)+32>>2];hd(28,18331,f);l=k;return}a=c[g>>2]|0;if((c[h+16>>2]|0)>>>0>1){c[i>>2]=c[a+32>>2];hd(28,18360,i);l=k;return}if(!(Xe(a)|0)){l=k;return}c[j>>2]=c[(c[g>>2]|0)+32>>2];hd(28,18387,j);l=k;return}function xf(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=0;c[e>>2]=c[b>>2];wf(c[e>>2]|0);zf(c[b>>2]|0,0)|0;Ee();if(c[(c[e>>2]|0)+8>>2]|0?c[(c[(c[e>>2]|0)+8>>2]|0)+24>>2]|0:0)Hf(c[e>>2]|0);If(c[e>>2]|0);c[d>>2]=jf(c[b>>2]|0)|0;Ge();l=f;return c[d>>2]|0}function yf(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;j=p+44|0;q=p+40|0;k=p+36|0;m=p+32|0;n=p+28|0;o=p+24|0;g=p+8|0;h=p;c[q>>2]=e;c[k>>2]=f;c[m>>2]=0;c[n>>2]=c[q>>2];c[h>>2]=0;if((d[(c[n>>2]|0)+16>>0]|0|0)>=(c[k>>2]|0)){c[j>>2]=0;q=c[j>>2]|0;l=p;return q|0}Ee();c[o>>2]=c[(c[n>>2]|0)+8>>2];if((d[(c[n>>2]|0)+16>>0]|0|0)!=(d[(c[o>>2]|0)+12>>0]|0|0)?((c[k>>2]|0)>1?1:(d[(c[o>>2]|0)+12>>0]|0|0)>=3):0)c[m>>2]=5;else i=6;a:do if((i|0)==6){do if((c[k>>2]|0)==1){if((d[(c[o>>2]|0)+12>>0]|0|0)!=1?(d[(c[o>>2]|0)+12>>0]|0|0)!=2:0)break;a[(c[n>>2]|0)+16>>0]=1;q=(c[o>>2]|0)+8|0;c[q>>2]=(c[q>>2]|0)+1;q=(c[o>>2]|0)+24|0;c[q>>2]=(c[q>>2]|0)+1;break a}while(0);c[g+8>>2]=1;b[g+2>>1]=0;if((c[k>>2]|0)!=1){if((c[k>>2]|0)==4?(d[(c[n>>2]|0)+16>>0]|0|0)<3:0)i=13}else i=13;if((i|0)==13?(b[g>>1]=(c[k>>2]|0)==1?0:1,c[g+4>>2]=c[481],Ff(c[n>>2]|0,g)|0):0){c[h>>2]=c[(_P()|0)>>2];c[m>>2]=ef(c[h>>2]|0,3850)|0;if((c[m>>2]|0)==5)break;df(c[n>>2]|0,c[h>>2]|0);break}do if((c[k>>2]|0)!=1){if((c[k>>2]|0)==4?(c[(c[o>>2]|0)+8>>2]|0)>1:0){c[m>>2]=5;break}b[g>>1]=1;q=(c[k>>2]|0)==2;c[g+4>>2]=(c[481]|0)+(q?1:2);c[g+8>>2]=q?1:510;if(Ff(c[n>>2]|0,g)|0?(c[h>>2]=c[(_P()|0)>>2],c[m>>2]=ef(c[h>>2]|0,3850)|0,(c[m>>2]|0)!=5):0)df(c[n>>2]|0,c[h>>2]|0)}else{c[g+4>>2]=(c[481]|0)+2;c[g+8>>2]=510;if(Ff(c[n>>2]|0,g)|0){c[h>>2]=c[(_P()|0)>>2];c[m>>2]=ef(c[h>>2]|0,3850)|0}c[g+4>>2]=c[481];c[g+8>>2]=1;b[g>>1]=2;q=(Ff(c[n>>2]|0,g)|0)!=0;if(q&(c[m>>2]|0)==0){c[h>>2]=c[(_P()|0)>>2];c[m>>2]=2058}if(!(c[m>>2]|0)){a[(c[n>>2]|0)+16>>0]=1;q=(c[o>>2]|0)+24|0;c[q>>2]=(c[q>>2]|0)+1;c[(c[o>>2]|0)+8>>2]=1;break}if((c[m>>2]|0)==5)break a;df(c[n>>2]|0,c[h>>2]|0);break a}while(0);e=c[k>>2]|0;if(!(c[m>>2]|0)){a[(c[n>>2]|0)+16>>0]=e;a[(c[o>>2]|0)+12>>0]=c[k>>2];break}if((e|0)==4){a[(c[n>>2]|0)+16>>0]=3;a[(c[o>>2]|0)+12>>0]=3}}while(0);Ge();c[j>>2]=c[m>>2];q=c[j>>2]|0;l=p;return q|0}function zf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=Ef(c[f>>2]|0,c[e>>2]|0,0)|0;l=d;return b|0}function Af(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+48|0;m=n;o=n+40|0;g=n+36|0;h=n+32|0;i=n+28|0;j=n+24|0;k=n+8|0;c[o>>2]=e;c[g>>2]=f;c[h>>2]=0;c[i>>2]=0;c[j>>2]=c[o>>2];Ee();if((d[(c[(c[j>>2]|0)+8>>2]|0)+12>>0]|0)>1)c[i>>2]=1;do if((c[i>>2]|0)==0?(a[(c[(c[j>>2]|0)+8>>2]|0)+13>>0]|0)==0:0){b[k+2>>1]=0;c[k+4>>2]=(c[481]|0)+1;c[k+8>>2]=1;b[k>>1]=1;f=c[375]|0;o=c[(c[j>>2]|0)+12>>2]|0;c[m>>2]=k;if(ob[f&255](o,12,m)|0){c[h>>2]=3594;o=c[j>>2]|0;df(o,c[(_P()|0)>>2]|0);break}if((b[k>>1]|0)!=2)c[i>>2]=1}while(0);Ge();c[c[g>>2]>>2]=c[i>>2];l=n;return c[h>>2]|0}function Bf(a,f,g,h,i){a=a|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;E=l;l=l+160|0;C=E+152|0;F=E+148|0;D=E+144|0;x=E+140|0;y=E+136|0;z=E+132|0;j=E+128|0;k=E+124|0;A=E+120|0;B=E+116|0;m=E+112|0;n=E+108|0;o=E+104|0;p=E+100|0;q=E+24|0;r=E+20|0;s=E+16|0;t=E+12|0;u=E+8|0;v=E+4|0;w=E;c[F>>2]=a;c[D>>2]=f;c[x>>2]=g;c[y>>2]=h;c[z>>2]=i;c[j>>2]=c[F>>2];c[B>>2]=0;c[m>>2]=He()|0;if((c[(c[j>>2]|0)+36>>2]|0)==0?(c[B>>2]=Cf(c[j>>2]|0)|0,c[B>>2]|0):0){c[C>>2]=c[B>>2];F=c[C>>2]|0;l=E;return F|0}c[k>>2]=c[(c[j>>2]|0)+36>>2];c[A>>2]=c[c[k>>2]>>2];c[n>>2]=O(((c[D>>2]|0)+(c[m>>2]|0)|0)/(c[m>>2]|0)|0,c[m>>2]|0)|0;a:do if((e[(c[A>>2]|0)+20>>1]|0|0)<(c[n>>2]|0)){c[p>>2]=O(c[n>>2]|0,c[x>>2]|0)|0;c[(c[A>>2]|0)+16>>2]=c[x>>2];b:do if((c[(c[A>>2]|0)+12>>2]|0)>=0){if(yb[c[1476>>2]&255](c[(c[A>>2]|0)+12>>2]|0,q)|0){c[B>>2]=4874;break a}if((c[q+36>>2]|0)<(c[p>>2]|0)){if(!(c[y>>2]|0))break a;c[r>>2]=(c[q+36>>2]|0)/4096|0;while(1){if((c[r>>2]|0)>=((c[p>>2]|0)/4096|0|0))break b;c[s>>2]=0;F=(c[r>>2]<<12)+4096-1|0;if((cf(c[(c[A>>2]|0)+12>>2]|0,F,((F|0)<0)<<31>>31,47636,1,s)|0)!=1)break;c[r>>2]=(c[r>>2]|0)+1}c[t>>2]=c[(c[A>>2]|0)+8>>2];c[B>>2]=Je(4874,17997,c[t>>2]|0,33839)|0;break a}}while(0);c[o>>2]=Df(c[(c[A>>2]|0)+24>>2]|0,c[n>>2]<<2)|0;if(!(c[o>>2]|0)){c[B>>2]=3082;break}c[(c[A>>2]|0)+24>>2]=c[o>>2];while(1){if((e[(c[A>>2]|0)+20>>1]|0|0)>=(c[n>>2]|0))break a;c[u>>2]=O(c[x>>2]|0,c[m>>2]|0)|0;if((c[(c[A>>2]|0)+12>>2]|0)>=0){t=c[420]|0;h=c[u>>2]|0;i=d[(c[A>>2]|0)+22>>0]|0|0?1:3;y=c[(c[A>>2]|0)+12>>2]|0;F=c[x>>2]|0;F=RR(F|0,((F|0)<0)<<31>>31|0,e[(c[A>>2]|0)+20>>1]|0|0,0)|0;c[w>>2]=sb[t&255](0,h,i,1,y,F)|0;if((c[w>>2]|0)==(-1|0)){a=21;break}}else{F=c[x>>2]|0;c[w>>2]=Ve(F,((F|0)<0)<<31>>31)|0;if(!(c[w>>2]|0)){a=23;break}GR(c[w>>2]|0,0,c[x>>2]|0)|0}c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[m>>2]|0))break;F=(c[w>>2]|0)+(O(c[x>>2]|0,c[v>>2]|0)|0)|0;c[(c[(c[A>>2]|0)+24>>2]|0)+((e[(c[A>>2]|0)+20>>1]|0)+(c[v>>2]|0)<<2)>>2]=F;c[v>>2]=(c[v>>2]|0)+1}F=(c[A>>2]|0)+20|0;b[F>>1]=(e[F>>1]|0)+(c[m>>2]|0)}if((a|0)==21){c[B>>2]=Je(5386,18084,c[(c[A>>2]|0)+8>>2]|0,33866)|0;break}else if((a|0)==23){c[B>>2]=7;break}}while(0);if((e[(c[A>>2]|0)+20>>1]|0|0)>(c[D>>2]|0))c[c[z>>2]>>2]=c[(c[(c[A>>2]|0)+24>>2]|0)+(c[D>>2]<<2)>>2];else c[c[z>>2]>>2]=0;if((c[B>>2]|0)==0?(d[(c[A>>2]|0)+22>>0]|0|0)!=0:0)c[B>>2]=8;c[C>>2]=c[B>>2];F=c[C>>2]|0;l=E;return F|0}function Cf(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+128|0;q=r;e=r+116|0;h=r+112|0;i=r+108|0;j=r+104|0;k=r+100|0;m=r+96|0;n=r+92|0;o=r+88|0;p=r+12|0;f=r+8|0;g=r+4|0;c[h>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>2]|0)+12>>2]|0,0,0)|0:0)c[k>>2]=Je(4618,17962,c[n>>2]|0,33707)|0;if(!(c[k>>2]|0))c[k>>2]=Re(c[h>>2]|0,0,128,1)|0;if(!(c[k>>2]|0))break a}else c[k>>2]=1802;while(0);Fe(c[h>>2]|0);Kd(c[i>>2]|0);Ge();c[e>>2]=c[k>>2];q=c[e>>2]|0;l=r;return q|0}while(0);c[c[i>>2]>>2]=c[j>>2];q=(c[j>>2]|0)+28|0;c[q>>2]=(c[q>>2]|0)+1;c[(c[h>>2]|0)+36>>2]=c[i>>2];Ge();c[(c[i>>2]|0)+4>>2]=c[(c[j>>2]|0)+32>>2];c[(c[j>>2]|0)+32>>2]=c[i>>2];c[e>>2]=0;q=c[e>>2]|0;l=r;return q|0}function Df(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=b;if(Rd()|0){c[d>>2]=0;f=c[d>>2]|0;l=g;return f|0}if((c[f>>2]|0)<0)c[f>>2]=0;f=c[f>>2]|0;c[d>>2]=Sd(c[e>>2]|0,f,((f|0)<0)<<31>>31)|0;f=c[d>>2]|0;l=g;return f|0}function Ef(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;k=p+44|0;q=p+40|0;m=p+36|0;n=p+28|0;o=p+24|0;h=p+8|0;j=p;c[q>>2]=e;c[m>>2]=f;c[p+32>>2]=g;c[n>>2]=c[q>>2];c[j>>2]=0;if((d[(c[n>>2]|0)+16>>0]|0|0)<=(c[m>>2]|0)){c[k>>2]=0;q=c[k>>2]|0;l=p;return q|0}Ee();c[o>>2]=c[(c[n>>2]|0)+8>>2];do if((d[(c[n>>2]|0)+16>>0]|0|0)>1){if((c[m>>2]|0)==1?(b[h>>1]=0,b[h+2>>1]=0,c[h+4>>2]=(c[481]|0)+2,c[h+8>>2]=510,Ff(c[n>>2]|0,h)|0):0){c[j>>2]=2314;q=c[n>>2]|0;df(q,c[(_P()|0)>>2]|0);break}b[h>>1]=2;b[h+2>>1]=0;c[h+4>>2]=c[481];c[h+8>>2]=2;if(!(Ff(c[n>>2]|0,h)|0)){a[(c[o>>2]|0)+12>>0]=1;i=10;break}else{c[j>>2]=2058;q=c[n>>2]|0;df(q,c[(_P()|0)>>2]|0);break}}else i=10;while(0);if((i|0)==10?(c[m>>2]|0)==0:0){q=(c[o>>2]|0)+8|0;c[q>>2]=(c[q>>2]|0)+-1;if(!(c[(c[o>>2]|0)+8>>2]|0)){b[h>>1]=2;b[h+2>>1]=0;c[h+8>>2]=0;c[h+4>>2]=0;if(!(Ff(c[n>>2]|0,h)|0))e=(c[o>>2]|0)+12|0;else{c[j>>2]=2058;e=c[n>>2]|0;df(e,c[(_P()|0)>>2]|0);a[(c[o>>2]|0)+12>>0]=0;e=(c[n>>2]|0)+16|0}a[e>>0]=0}q=(c[o>>2]|0)+24|0;c[q>>2]=(c[q>>2]|0)+-1;if(!(c[(c[o>>2]|0)+24>>2]|0))Gf(c[n>>2]|0)}Ge();if(!(c[j>>2]|0))a[(c[n>>2]|0)+16>>0]=c[m>>2];c[k>>2]=c[j>>2];q=c[k>>2]|0;l=p;return q|0}function Ff(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+64|0;p=q+8|0;o=q;h=q+48|0;i=q+44|0;j=q+40|0;k=q+36|0;m=q+32|0;n=q+16|0;c[i>>2]=f;c[j>>2]=g;c[m>>2]=c[(c[i>>2]|0)+8>>2];do if(((e[(c[i>>2]|0)+18>>1]|0)&3|0)==1){if(d[(c[m>>2]|0)+13>>0]|0|0){c[k>>2]=0;break}b[n+2>>1]=0;c[n+4>>2]=(c[481]|0)+2;c[n+8>>2]=510;b[n>>1]=1;j=c[375]|0;p=c[(c[i>>2]|0)+12>>2]|0;c[o>>2]=n;c[k>>2]=ob[j&255](p,13,o)|0;if((c[k>>2]|0)>=0){a[(c[m>>2]|0)+13>>0]=1;p=(c[m>>2]|0)+24|0;c[p>>2]=(c[p>>2]|0)+1;break}c[h>>2]=c[k>>2];p=c[h>>2]|0;l=q;return p|0}else{n=c[375]|0;o=c[(c[i>>2]|0)+12>>2]|0;c[p>>2]=c[j>>2];c[k>>2]=ob[n&255](o,13,p)|0}while(0);c[h>>2]=c[k>>2];p=c[h>>2]|0;l=q;return p|0}function Gf(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+8>>2];c[e>>2]=c[(c[d>>2]|0)+28>>2];while(1){if(!(c[e>>2]|0))break;c[f>>2]=c[(c[e>>2]|0)+8>>2];Ie(c[b>>2]|0,c[c[e>>2]>>2]|0,30592);Kd(c[e>>2]|0);c[e>>2]=c[f>>2]}c[(c[d>>2]|0)+28>>2]=0;l=g;return}function Hf(a){a=a|0;var b=0,d=0,e=0,f=0;b=l;l=l+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=c[(c[d>>2]|0)+8>>2];c[f>>2]=c[(c[d>>2]|0)+28>>2];c[(c[f>>2]|0)+8>>2]=c[(c[e>>2]|0)+28>>2];c[(c[e>>2]|0)+28>>2]=c[f>>2];c[(c[d>>2]|0)+12>>2]=-1;c[(c[d>>2]|0)+28>>2]=0;l=b;return}function If(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+8>>2];if(!(c[d>>2]|0)){l=e;return}a=(c[d>>2]|0)+16|0;c[a>>2]=(c[a>>2]|0)+-1;if(c[(c[d>>2]|0)+16>>2]|0){l=e;return}Gf(c[b>>2]|0);if(c[(c[d>>2]|0)+36>>2]|0)a=(c[(c[d>>2]|0)+36>>2]|0)+32|0;else a=47020;c[a>>2]=c[(c[d>>2]|0)+32>>2];if(c[(c[d>>2]|0)+32>>2]|0)c[(c[(c[d>>2]|0)+32>>2]|0)+36>>2]=c[(c[d>>2]|0)+36>>2];Kd(c[d>>2]|0);l=e;return}function Jf(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;e=i+8|0;f=i+4|0;g=i;c[e>>2]=b;c[f>>2]=d;if((c[e>>2]|0)==0|(c[f>>2]|0)==0){c[h>>2]=0;h=c[h>>2]|0;l=i;return h|0}d=(_c(c[e>>2]|0)|0)+1|0;c[e>>2]=(c[e>>2]|0)+d;while(1){if(!(a[c[e>>2]>>0]|0)){b=8;break}c[g>>2]=vQ(c[e>>2]|0,c[f>>2]|0)|0;d=(_c(c[e>>2]|0)|0)+1|0;c[e>>2]=(c[e>>2]|0)+d;d=c[e>>2]|0;if(!(c[g>>2]|0)){b=6;break}d=(_c(d)|0)+1|0;c[e>>2]=(c[e>>2]|0)+d}if((b|0)==6){c[h>>2]=d;h=c[h>>2]|0;l=i;return h|0}else if((b|0)==8){c[h>>2]=0;h=c[h>>2]|0;l=i;return h|0}return 0}function Kf(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;g=e;f=e+4|0;c[g>>2]=b;a[f>>0]=d;d=((Lf(c[g>>2]|0,1,a[f>>0]|0)|0)&255|0)!=0&255;l=e;return d|0}function Lf(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;j=n+17|0;g=n+12|0;h=n+8|0;k=n+16|0;m=n+4|0;i=n;c[g>>2]=b;c[h>>2]=e;a[k>>0]=f;b=c[g>>2]|0;if((d[16965+(d[c[g>>2]>>0]|0)>>0]|0)&4|0){a[j>>0]=Mf(b)|0;m=a[j>>0]|0;l=n;return m|0}c[i>>2]=_c(b)|0;c[m>>2]=0;while(1){if((c[m>>2]|0)>=8){b=11;break}if((d[18435+(c[m>>2]|0)>>0]|0|0)==(c[i>>2]|0)?(Zc(18451+(d[18443+(c[m>>2]|0)>>0]|0)|0,c[g>>2]|0,c[i>>2]|0)|0)==0:0){if(!(c[h>>2]|0)){b=9;break}if((d[18476+(c[m>>2]|0)>>0]|0|0)<=1){b=9;break}}c[m>>2]=(c[m>>2]|0)+1}if((b|0)==9){a[j>>0]=a[18476+(c[m>>2]|0)>>0]|0;m=a[j>>0]|0;l=n;return m|0}else if((b|0)==11){a[j>>0]=a[k>>0]|0;m=a[j>>0]|0;l=n;return m|0}return 0}function Mf(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=0;if(c[b>>2]|0)Nf(c[b>>2]|0,d)|0;l=e;return c[d>>2]|0}function Nf(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;i=o+32|0;j=o+28|0;k=o+24|0;f=o;m=o+20|0;g=o+16|0;h=o+12|0;n=o+8|0;c[j>>2]=b;c[k>>2]=e;e=f;c[e>>2]=0;c[e+4>>2]=0;c[h>>2]=0;do if((a[c[j>>2]>>0]|0)!=45){b=c[j>>2]|0;if((a[c[j>>2]>>0]|0)==43){c[j>>2]=b+1;break}if((a[b>>0]|0)==48){if((a[(c[j>>2]|0)+1>>0]|0)!=120?(a[(c[j>>2]|0)+1>>0]|0)!=88:0)break;if(d[16965+(d[(c[j>>2]|0)+2>>0]|0)>>0]&8|0){c[n>>2]=0;c[j>>2]=(c[j>>2]|0)+2;while(1){if((a[c[j>>2]>>0]|0)!=48)break;c[j>>2]=(c[j>>2]|0)+1}c[m>>2]=0;while(1){b=c[n>>2]|0;if(!(d[16965+(d[(c[j>>2]|0)+(c[m>>2]|0)>>0]|0)>>0]&8|0?(c[m>>2]|0)<8:0))break;c[n>>2]=(b<<4)+((Of(a[(c[j>>2]|0)+(c[m>>2]|0)>>0]|0)|0)&255);c[m>>2]=(c[m>>2]|0)+1}if((b&-2147483648|0)==0?(d[16965+(d[(c[j>>2]|0)+(c[m>>2]|0)>>0]|0)>>0]&8|0)==0:0){c[c[k>>2]>>2]=c[n>>2];c[i>>2]=1;n=c[i>>2]|0;l=o;return n|0}c[i>>2]=0;n=c[i>>2]|0;l=o;return n|0}}}else{c[h>>2]=1;c[j>>2]=(c[j>>2]|0)+1}while(0);while(1){if((a[c[j>>2]>>0]|0)!=48)break;c[j>>2]=(c[j>>2]|0)+1}c[m>>2]=0;while(1){if((c[m>>2]|0)>=11)break;n=(a[(c[j>>2]|0)+(c[m>>2]|0)>>0]|0)-48|0;c[g>>2]=n;if(!((n|0)>=0&(c[g>>2]|0)<=9))break;n=f;n=RR(c[n>>2]|0,c[n+4>>2]|0,10,0)|0;e=c[g>>2]|0;e=IR(n|0,z|0,e|0,((e|0)<0)<<31>>31|0)|0;n=f;c[n>>2]=e;c[n+4>>2]=z;c[m>>2]=(c[m>>2]|0)+1}if((c[m>>2]|0)>10){c[i>>2]=0;n=c[i>>2]|0;l=o;return n|0}m=f;n=c[h>>2]|0;n=FR(c[m>>2]|0,c[m+4>>2]|0,n|0,((n|0)<0)<<31>>31|0)|0;m=z;if((m|0)>0|(m|0)==0&n>>>0>2147483647){c[i>>2]=0;n=c[i>>2]|0;l=o;return n|0}if(c[h>>2]|0){m=f;m=FR(0,0,c[m>>2]|0,c[m+4>>2]|0)|0;n=f;c[n>>2]=m;c[n+4>>2]=z}c[c[k>>2]>>2]=c[f>>2];c[i>>2]=1;n=c[i>>2]|0;l=o;return n|0}function Of(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;c[b>>2]=(c[b>>2]|0)+((1&c[b>>2]>>6)*9|0);l=d;return c[b>>2]&15|0}function Pf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+96|0;m=k+92|0;f=k+88|0;g=k+84|0;h=k+80|0;i=k+4|0;j=k;c[m>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;c[j>>2]=0;if(!(yb[c[1464>>2]&255](c[m>>2]|0,i)|0)){c[c[f>>2]>>2]=c[i+12>>2]&511;c[c[g>>2]>>2]=c[i+20>>2];c[c[h>>2]>>2]=c[i+24>>2];m=c[j>>2]|0;l=k;return m|0}else{c[j>>2]=1802;m=c[j>>2]|0;l=k;return m|0}return 0}function Qf(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 1848}function Rf(){var a=0,b=0;a=l;l=l+16|0;b=a;c[b>>2]=1928;Sf(18,b)|0;l=a;return}function Sf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l;l=l+144|0;E=G+140|0;n=G+136|0;x=G+120|0;F=G+112|0;y=G+108|0;z=G+104|0;A=G+100|0;B=G+96|0;C=G+92|0;d=G+88|0;e=G+84|0;f=G+80|0;g=G+76|0;h=G+72|0;D=G+68|0;i=G+64|0;j=G+60|0;k=G+56|0;m=G+52|0;o=G+48|0;p=G+44|0;q=G+40|0;r=G+24|0;s=G+16|0;t=G+8|0;u=G;v=G+36|0;w=G+32|0;c[n>>2]=a;c[F>>2]=0;if(c[59]|0){c[E>>2]=cd(138190)|0;F=c[E>>2]|0;l=G;return F|0}c[x>>2]=b;do switch(c[n>>2]|0){case 4:{b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[y>>2]=D;D=c[y>>2]|0;c[12]=c[D>>2];c[13]=c[D+4>>2];c[14]=c[D+8>>2];c[15]=c[D+12>>2];c[16]=c[D+16>>2];c[17]=c[D+20>>2];c[18]=c[D+24>>2];c[19]=c[D+28>>2];break}case 5:{if(!(c[12]|0))Tf();b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[z>>2]=D;D=c[z>>2]|0;c[D>>2]=c[12];c[D+4>>2]=c[13];c[D+8>>2]=c[14];c[D+12>>2]=c[15];c[D+16>>2]=c[16];c[D+20>>2]=c[17];c[D+24>>2]=c[18];c[D+28>>2]=c[19];break}case 9:{b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[A>>2]=D;c[2]=c[A>>2];break}case 6:{b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[B>>2]=D;c[50]=c[B>>2];D=(c[x>>2]|0)+(4-1)&~(4-1);b=c[D>>2]|0;c[x>>2]=D+4;c[C>>2]=b;c[51]=c[C>>2];b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[d>>2]=D;c[52]=c[d>>2];break}case 7:{b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[e>>2]=D;c[53]=c[e>>2];D=(c[x>>2]|0)+(4-1)&~(4-1);b=c[D>>2]|0;c[x>>2]=D+4;c[f>>2]=b;c[54]=c[f>>2];b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[g>>2]=D;c[55]=c[g>>2];break}case 24:{D=(Uf()|0)+(Vf()|0)+(Wf()|0)|0;C=(c[x>>2]|0)+(4-1)&~(4-1);b=c[C>>2]|0;c[x>>2]=C+4;c[h>>2]=b;c[c[h>>2]>>2]=D;break}case 14:break;case 15:{c[F>>2]=1;break}case 18:{a=(c[x>>2]|0)+(4-1)&~(4-1);e=c[a>>2]|0;c[x>>2]=a+4;c[D>>2]=e;e=116;a=c[D>>2]|0;d=e+52|0;do{c[e>>2]=c[a>>2];e=e+4|0;a=a+4|0}while((e|0)<(d|0));break}case 19:{if(!(c[31]|0))Rf();a=(c[x>>2]|0)+(4-1)&~(4-1);e=c[a>>2]|0;c[x>>2]=a+4;c[i>>2]=e;e=c[i>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==(C|0)?(c[b>>2]|0)>>>0>(c[D>>2]|0)>>>0:0)){C=t;b=c[C+4>>2]|0;D=r;c[D>>2]=c[C>>2];c[D+4>>2]=b}D=t;b=c[D+4>>2]|0;C=192;c[C>>2]=c[D>>2];c[C+4>>2]=b;C=r;b=c[C+4>>2]|0;D=184;c[D>>2]=c[C>>2];c[D+4>>2]=b;break}case 25:{b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[v>>2]=D;c[58]=c[v>>2];break}case 26:{b=(c[x>>2]|0)+(4-1)&~(4-1);D=c[b>>2]|0;c[x>>2]=b+4;c[w>>2]=D;c[11]=c[w>>2];break}default:c[F>>2]=1}while(0);c[E>>2]=c[F>>2];F=c[E>>2]|0;l=G;return F|0}function Tf(){var a=0,b=0;a=l;l=l+16|0;b=a;c[b>>2]=1980;Sf(4,b)|0;l=a;return}function Uf(){return 88}function Vf(){return 40}function Wf(){return 32}function Xf(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;d=e;f=e+8|0;b=e+4|0;c[f>>2]=a;c[f>>2]=(c[f>>2]|0)+7&-8;c[b>>2]=wR((c[f>>2]|0)+8|0)|0;a=c[f>>2]|0;if(c[b>>2]|0){f=c[b>>2]|0;c[f>>2]=a;c[f+4>>2]=((a|0)<0)<<31>>31;c[b>>2]=(c[b>>2]|0)+8;f=c[b>>2]|0;l=e;return f|0}else{c[d>>2]=a;hd(7,18527,d);f=c[b>>2]|0;l=e;return f|0}return 0}function Yf(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];c[d>>2]=(c[d>>2]|0)+-8;xR(c[d>>2]|0);l=b;return}function Zf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;g=h;d=h+16|0;e=h+12|0;f=h+8|0;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[d>>2];c[f>>2]=(c[f>>2]|0)+-8;c[f>>2]=zR(c[f>>2]|0,(c[e>>2]|0)+8|0)|0;if(c[f>>2]|0){e=c[e>>2]|0;g=c[f>>2]|0;c[g>>2]=e;c[g+4>>2]=((e|0)<0)<<31>>31;c[f>>2]=(c[f>>2]|0)+8;g=c[f>>2]|0;l=h;return g|0}else{d=_f(c[d>>2]|0)|0;e=c[e>>2]|0;c[g>>2]=d;c[g+4>>2]=e;hd(7,18491,g);g=c[f>>2]|0;l=h;return g|0}return 0}function _f(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];c[b>>2]=(c[b>>2]|0)+-8;l=d;return c[c[b>>2]>>2]|0}function $f(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[b>>2]|0)+7&-8|0}function ag(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;l=b;return 0}function bg(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;l=b;return}function cg(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;c[d>>2]=a;a=46820;b=a+100|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[11719]=(c[53]|0)==0&1;c[11720]=(c[11719]|0)!=0&(c[55]|0)!=0&(c[53]|0)==0?c[55]|0:0;c[11708]=10;c[11718]=1;l=d;return 0}function dg(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;c[d>>2]=a;a=46820;b=a+100|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));l=d;return}function eg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;g=m+20|0;h=m+16|0;i=m+12|0;j=m+8|0;k=m+4|0;n=m;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;c[n>>2]=60+((c[11719]|0)*52|0);f=c[n>>2]|0;c[j>>2]=Cg(f,((f|0)<0)<<31>>31)|0;if(!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9|0)>>>0)/10|0;ng(c[e>>2]|0);l=g;return}function gg(a){a=a|0;var b=0,d=0,e=0,f=0;d=l;l=l+16|0;f=d+8|0;b=d+4|0;e=d;c[f>>2]=a;c[e>>2]=c[f>>2];c[b>>2]=c[(c[e>>2]|0)+40>>2];l=d;return c[b>>2]|0}function hg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;d=tg(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0)|0;l=e;return d|0}function ig(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;j=l;l=l+32|0;n=j+24|0;m=j+20|0;k=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[n>>2]=b;c[m>>2]=d;c[k>>2]=e;c[f>>2]=c[n>>2];c[g>>2]=c[m>>2];c[h>>2]=c[c[f>>2]>>2];if((c[k>>2]|0)==0?(c[(c[h>>2]|0)+16>>2]|0)>>>0<=(c[(c[h>>2]|0)+4>>2]|0)>>>0:0){c[i>>2]=(c[h>>2]|0)+20+24;c[(c[g>>2]|0)+28>>2]=(c[h>>2]|0)+20;m=c[g>>2]|0;n=c[c[i>>2]>>2]|0;c[(c[g>>2]|0)+24>>2]=n;c[n+28>>2]=m;c[c[i>>2]>>2]=c[g>>2];n=(c[f>>2]|0)+36|0;c[n>>2]=(c[n>>2]|0)+1;a[(c[g>>2]|0)+12>>0]=0;l=j;return}pg(c[g>>2]|0,1);l=j;return}function jg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;k=l;l=l+32|0;o=k+28|0;n=k+24|0;m=k+20|0;h=k+16|0;i=k+12|0;j=k+8|0;f=k+4|0;g=k;c[o>>2]=a;c[n>>2]=b;c[m>>2]=d;c[h>>2]=e;c[i>>2]=c[o>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+10-(c[(c[d>>2]|0)+8>>2]|0);ng(c[b>>2]|0);Kd(c[(c[b>>2]|0)+56>>2]|0);Kd(c[(c[b>>2]|0)+48>>2]|0);Kd(c[b>>2]|0);l=e;return}function mg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+12|0;b=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[b>>2]=c[g>>2];if(!(c[(c[b>>2]|0)+16>>2]|0)){l=f;return}c[d>>2]=c[c[b>>2]>>2];c[e>>2]=c[(c[d>>2]|0)+4>>2];c[(c[d>>2]|0)+4>>2]=0;ng(c[b>>2]|0);c[(c[d>>2]|0)+4>>2]=c[e>>2];l=f;return}function ng(a){a=a|0;var b=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[e>>2]=c[c[b>>2]>>2];while(1){if((c[(c[e>>2]|0)+16>>2]|0)>>>0<=(c[(c[e>>2]|0)+4>>2]|0)>>>0)break;a=c[(c[e>>2]|0)+20+28>>2]|0;c[f>>2]=a;if(d[a+14>>0]|0|0)break;og(c[f>>2]|0)|0;pg(c[f>>2]|0,1)}if(c[(c[b>>2]|0)+40>>2]|0){l=g;return}if(!(c[(c[b>>2]|0)+56>>2]|0)){l=g;return}Kd(c[(c[b>>2]|0)+56>>2]|0);c[(c[b>>2]|0)+52>>2]=0;c[(c[b>>2]|0)+56>>2]=0;l=g;return}function og(b){b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e+4|0;f=e;c[d>>2]=b;c[f>>2]=c[(c[d>>2]|0)+20>>2];c[(c[(c[d>>2]|0)+28>>2]|0)+24>>2]=c[(c[d>>2]|0)+24>>2];c[(c[(c[d>>2]|0)+24>>2]|0)+28>>2]=c[(c[d>>2]|0)+28>>2];c[(c[d>>2]|0)+24>>2]=0;c[(c[d>>2]|0)+28>>2]=0;a[(c[d>>2]|0)+12>>0]=1;b=(c[f>>2]|0)+36|0;c[b>>2]=(c[b>>2]|0)+-1;l=e;return c[d>>2]|0}function pg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+32|0;d=h+16|0;e=h+12|0;i=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[(c[d>>2]|0)+20>>2];c[i>>2]=((c[(c[d>>2]|0)+8>>2]|0)>>>0)%((c[(c[f>>2]|0)+44>>2]|0)>>>0)|0;c[g>>2]=(c[(c[f>>2]|0)+48>>2]|0)+(c[i>>2]<<2);while(1){a=(c[c[g>>2]>>2]|0)+16|0;if((c[c[g>>2]>>2]|0)==(c[d>>2]|0))break;c[g>>2]=a}c[c[g>>2]>>2]=c[a>>2];i=(c[f>>2]|0)+40|0;c[i>>2]=(c[i>>2]|0)+-1;if(!(c[e>>2]|0)){l=h;return}qg(c[d>>2]|0);l=h;return}function qg(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=c[(c[d>>2]|0)+20>>2];if(a[(c[d>>2]|0)+13>>0]|0){c[(c[d>>2]|0)+16>>2]=c[(c[e>>2]|0)+52>>2];c[(c[e>>2]|0)+52>>2]=c[d>>2]}else rg(c[c[d>>2]>>2]|0);if(!(c[(c[e>>2]|0)+16>>2]|0)){l=f;return}e=(c[c[e>>2]>>2]|0)+16|0;c[e>>2]=(c[e>>2]|0)+-1;l=f;return}function rg(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;if(!(c[b>>2]|0)){l=f;return}if((c[b>>2]|0)>>>0>=(c[11724]|0)>>>0?(c[b>>2]|0)>>>0<(c[11725]|0)>>>0:0){Ld(1,1);c[d>>2]=c[b>>2];c[c[d>>2]>>2]=c[11727];c[11727]=c[d>>2];c[11728]=(c[11728]|0)+1;c[11729]=(c[11728]|0)<(c[11723]|0)&1;l=f;return}c[e>>2]=0;c[e>>2]=ud(c[b>>2]|0)|0;Ld(2,c[e>>2]|0);Kd(c[b>>2]|0);l=f;return}function sg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[e>>2]=b;c[f>>2]=d;if(((c[(c[e>>2]|0)+32>>2]|0)-(c[f>>2]|0)|0)>>>0<(c[(c[e>>2]|0)+44>>2]|0)>>>0){c[g>>2]=((c[f>>2]|0)>>>0)%((c[(c[e>>2]|0)+44>>2]|0)>>>0)|0;c[h>>2]=((c[(c[e>>2]|0)+32>>2]|0)>>>0)%((c[(c[e>>2]|0)+44>>2]|0)>>>0)|0}else{c[g>>2]=((c[(c[e>>2]|0)+44>>2]|0)>>>0)/2|0;c[h>>2]=(c[g>>2]|0)-1}while(1){c[i>>2]=(c[(c[e>>2]|0)+48>>2]|0)+(c[g>>2]<<2);while(1){d=c[c[i>>2]>>2]|0;c[j>>2]=d;if(!d)break;if((c[(c[j>>2]|0)+8>>2]|0)>>>0<(c[f>>2]|0)>>>0){c[i>>2]=(c[j>>2]|0)+16;continue}d=(c[e>>2]|0)+40|0;c[d>>2]=(c[d>>2]|0)+-1;c[c[i>>2]>>2]=c[(c[j>>2]|0)+16>>2];if(!(a[(c[j>>2]|0)+12>>0]|0))og(c[j>>2]|0)|0;qg(c[j>>2]|0)}if((c[g>>2]|0)==(c[h>>2]|0))break;c[g>>2]=(((c[g>>2]|0)+1|0)>>>0)%((c[(c[e>>2]|0)+44>>2]|0)>>>0)|0}l=k;return}function tg(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;i=k+20|0;m=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;j=k;c[m>>2]=b;c[f>>2]=d;c[g>>2]=e;c[h>>2]=c[m>>2];c[j>>2]=0;c[j>>2]=c[(c[(c[h>>2]|0)+48>>2]|0)+((((c[f>>2]|0)>>>0)%((c[(c[h>>2]|0)+44>>2]|0)>>>0)|0)<<2)>>2];while(1){if(c[j>>2]|0)d=(c[(c[j>>2]|0)+8>>2]|0)!=(c[f>>2]|0);else d=0;b=c[j>>2]|0;if(!d)break;c[j>>2]=c[b+16>>2]}if(b|0){b=c[j>>2]|0;if(a[(c[j>>2]|0)+12>>0]|0){c[i>>2]=b;m=c[i>>2]|0;l=k;return m|0}else{c[i>>2]=og(b)|0;m=c[i>>2]|0;l=k;return m|0}}else if(c[g>>2]|0){c[i>>2]=ug(c[h>>2]|0,c[f>>2]|0,c[g>>2]|0)|0;m=c[i>>2]|0;l=k;return m|0}else{c[i>>2]=0;m=c[i>>2]|0;l=k;return m|0}return 0}function ug(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;h=p+32|0;i=p+28|0;j=p+24|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;f=p+4|0;g=p;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[n>>2]=c[c[i>>2]>>2];c[o>>2]=0;c[m>>2]=(c[(c[i>>2]|0)+40>>2]|0)-(c[(c[i>>2]|0)+36>>2]|0);do if((c[k>>2]|0)==1){if((c[m>>2]|0)>>>0<(c[(c[n>>2]|0)+12>>2]|0)>>>0?(c[m>>2]|0)>>>0<(c[(c[i>>2]|0)+28>>2]|0)>>>0:0){if(!(vg(c[i>>2]|0)|0))break;if((c[(c[i>>2]|0)+36>>2]|0)>>>0>=(c[m>>2]|0)>>>0)break}c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}while(0);if((c[(c[i>>2]|0)+40>>2]|0)>>>0>=(c[(c[i>>2]|0)+44>>2]|0)>>>0)wg(c[i>>2]|0);do if(c[(c[i>>2]|0)+16>>2]|0?(a[(c[(c[n>>2]|0)+20+28>>2]|0)+14>>0]|0)==0:0){if(((c[(c[i>>2]|0)+40>>2]|0)+1|0)>>>0<(c[(c[i>>2]|0)+24>>2]|0)>>>0?(vg(c[i>>2]|0)|0)==0:0)break;c[o>>2]=c[(c[n>>2]|0)+20+28>>2];pg(c[o>>2]|0,0);og(c[o>>2]|0)|0;c[f>>2]=c[(c[o>>2]|0)+20>>2];if((c[(c[f>>2]|0)+12>>2]|0)!=(c[(c[i>>2]|0)+12>>2]|0)){qg(c[o>>2]|0);c[o>>2]=0;break}else{n=(c[n>>2]|0)+16|0;c[n>>2]=(c[n>>2]|0)-((c[(c[f>>2]|0)+16>>2]|0)-(c[(c[i>>2]|0)+16>>2]|0));break}}while(0);if(!(c[o>>2]|0))c[o>>2]=xg(c[i>>2]|0,(c[k>>2]|0)==1&1)|0;if(c[o>>2]|0?(c[g>>2]=((c[j>>2]|0)>>>0)%((c[(c[i>>2]|0)+44>>2]|0)>>>0)|0,n=(c[i>>2]|0)+40|0,c[n>>2]=(c[n>>2]|0)+1,c[(c[o>>2]|0)+8>>2]=c[j>>2],c[(c[o>>2]|0)+16>>2]=c[(c[(c[i>>2]|0)+48>>2]|0)+(c[g>>2]<<2)>>2],c[(c[o>>2]|0)+20>>2]=c[i>>2],c[(c[o>>2]|0)+28>>2]=0,c[(c[o>>2]|0)+24>>2]=0,a[(c[o>>2]|0)+12>>0]=1,c[c[(c[o>>2]|0)+4>>2]>>2]=0,c[(c[(c[i>>2]|0)+48>>2]|0)+(c[g>>2]<<2)>>2]=c[o>>2],(c[j>>2]|0)>>>0>(c[(c[i>>2]|0)+32>>2]|0)>>>0):0)c[(c[i>>2]|0)+32>>2]=c[j>>2];c[h>>2]=c[o>>2];o=c[h>>2]|0;l=p;return o|0}function vg(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d+4|0;e=d;c[e>>2]=a;if(c[11722]|0?((c[(c[e>>2]|0)+4>>2]|0)+(c[(c[e>>2]|0)+8>>2]|0)|0)<=(c[11721]|0):0){c[b>>2]=c[11729];e=c[b>>2]|0;l=d;return e|0}c[b>>2]=Dg()|0;e=c[b>>2]|0;l=d;return e|0}function wg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;b=j+24|0;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[b>>2]=a;a=c[(c[b>>2]|0)+44>>2]<<1;c[e>>2]=a;c[e>>2]=(c[e>>2]|0)>>>0<256?256:a;if(c[(c[b>>2]|0)+44>>2]|0)zg();c[d>>2]=Cg(c[e>>2]<<2,0)|0;if(c[(c[b>>2]|0)+44>>2]|0)Bg();if(!(c[d>>2]|0)){l=j;return}c[f>>2]=0;while(1){a=c[(c[b>>2]|0)+48>>2]|0;if((c[f>>2]|0)>>>0>=(c[(c[b>>2]|0)+44>>2]|0)>>>0)break;c[h>>2]=c[a+(c[f>>2]<<2)>>2];while(1){a=c[h>>2]|0;c[g>>2]=a;if(!a)break;c[i>>2]=((c[(c[g>>2]|0)+8>>2]|0)>>>0)%((c[e>>2]|0)>>>0)|0;c[h>>2]=c[(c[g>>2]|0)+16>>2];c[(c[g>>2]|0)+16>>2]=c[(c[d>>2]|0)+(c[i>>2]<<2)>>2];c[(c[d>>2]|0)+(c[i>>2]<<2)>>2]=c[g>>2]}c[f>>2]=(c[f>>2]|0)+1}Kd(a);c[(c[b>>2]|0)+48>>2]=c[d>>2];c[(c[b>>2]|0)+44>>2]=c[e>>2];l=j;return}function xg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;i=k;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;do if(c[(c[f>>2]|0)+52>>2]|0)j=4;else{if((c[(c[f>>2]|0)+40>>2]|0)==0?yg(c[f>>2]|0)|0:0){j=4;break}if(c[g>>2]|0)zg();c[i>>2]=Ag(c[(c[f>>2]|0)+12>>2]|0)|0;c[h>>2]=(c[i>>2]|0)+(c[(c[f>>2]|0)+4>>2]|0);if(c[g>>2]|0)Bg();if(c[i>>2]|0){c[c[h>>2]>>2]=c[i>>2];c[(c[h>>2]|0)+4>>2]=(c[h>>2]|0)+32;a[(c[h>>2]|0)+13>>0]=0;a[(c[h>>2]|0)+14>>0]=0;break}c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}while(0);if((j|0)==4){c[h>>2]=c[(c[f>>2]|0)+52>>2];c[(c[f>>2]|0)+52>>2]=c[(c[h>>2]|0)+16>>2];c[(c[h>>2]|0)+16>>2]=0}if(c[(c[f>>2]|0)+16>>2]|0){j=(c[c[f>>2]>>2]|0)+16|0;c[j>>2]=(c[j>>2]|0)+1}c[e>>2]=c[h>>2];j=c[e>>2]|0;l=k;return j|0}function yg(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;k=l;l=l+32|0;d=k+28|0;e=k+24|0;f=k;g=k+20|0;h=k+16|0;i=k+12|0;j=k+8|0;c[e>>2]=b;if(!(c[11720]|0)){c[d>>2]=0;j=c[d>>2]|0;l=k;return j|0}if((c[(c[e>>2]|0)+24>>2]|0)>>>0<3){c[d>>2]=0;j=c[d>>2]|0;l=k;return j|0}zg();if((c[11720]|0)>0){b=c[(c[e>>2]|0)+12>>2]|0;m=c[11720]|0;m=RR(b|0,((b|0)<0)<<31>>31|0,m|0,((m|0)<0)<<31>>31|0)|0;b=f;c[b>>2]=m;c[b+4>>2]=z}else{b=c[11720]|0;b=RR(-1024,-1,b|0,((b|0)<0)<<31>>31|0)|0;m=f;c[m>>2]=b;c[m+4>>2]=z}o=f;b=c[o>>2]|0;o=c[o+4>>2]|0;m=c[(c[e>>2]|0)+12>>2]|0;m=RR(m|0,((m|0)<0)<<31>>31|0,c[(c[e>>2]|0)+24>>2]|0,0)|0;n=z;if((o|0)>(n|0)|(o|0)==(n|0)&b>>>0>m>>>0){n=c[(c[e>>2]|0)+12>>2]|0;n=RR(n|0,((n|0)<0)<<31>>31|0,c[(c[e>>2]|0)+24>>2]|0,0)|0;o=f;c[o>>2]=n;c[o+4>>2]=z}o=f;o=pd(c[o>>2]|0,c[o+4>>2]|0)|0;c[(c[e>>2]|0)+56>>2]=o;c[g>>2]=o;Bg();a:do if(c[g>>2]|0){o=ud(c[g>>2]|0)|0;c[h>>2]=(o|0)/(c[(c[e>>2]|0)+12>>2]|0)|0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[h>>2]|0))break a;c[j>>2]=(c[g>>2]|0)+(c[(c[e>>2]|0)+4>>2]|0);c[c[j>>2]>>2]=c[g>>2];c[(c[j>>2]|0)+4>>2]=(c[j>>2]|0)+32;a[(c[j>>2]|0)+13>>0]=1;a[(c[j>>2]|0)+14>>0]=0;c[(c[j>>2]|0)+16>>2]=c[(c[e>>2]|0)+52>>2];c[(c[e>>2]|0)+52>>2]=c[j>>2];c[g>>2]=(c[g>>2]|0)+(c[(c[e>>2]|0)+12>>2]|0);c[i>>2]=(c[i>>2]|0)+1}}while(0);c[d>>2]=(c[(c[e>>2]|0)+52>>2]|0)!=0&1;o=c[d>>2]|0;l=k;return o|0}function zg(){if(!(c[11756]|0))return;vb[c[11756]&255]();return}function Ag(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=0;if((c[b>>2]|0)<=(c[11721]|0)?(c[d>>2]=c[11727],c[d>>2]|0):0){c[11727]=c[c[11727]>>2];c[11728]=(c[11728]|0)+-1;c[11729]=(c[11728]|0)<(c[11723]|0)&1;rd(7,c[b>>2]|0);vd(1,1)}if(c[d>>2]|0){e=c[d>>2]|0;l=f;return e|0}a=c[b>>2]|0;c[d>>2]=pd(a,((a|0)<0)<<31>>31)|0;if(!(c[d>>2]|0)){e=c[d>>2]|0;l=f;return e|0}c[e>>2]=ud(c[d>>2]|0)|0;rd(7,c[b>>2]|0);vd(2,c[e>>2]|0);e=c[d>>2]|0;l=f;return e|0}function Bg(){if(!(c[11757]|0))return;vb[c[47028>>2]&255]();return}function Cg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;e=f+8|0;g=d;c[g>>2]=a;c[g+4>>2]=b;b=d;c[e>>2]=pd(c[b>>2]|0,c[b+4>>2]|0)|0;if(!(c[e>>2]|0)){g=c[e>>2]|0;l=f;return g|0}GR(c[e>>2]|0,0,c[d>>2]|0)|0;g=c[e>>2]|0;l=f;return g|0}function Dg(){return c[11683]|0}function Eg(){Gg(3944,3);return}function Fg(){Gg(3720,8);return}function Gg(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[f>>2]|0))break;c[i>>2]=c[(c[e>>2]|0)+((c[g>>2]|0)*28|0)+20>>2];c[j>>2]=_c(c[i>>2]|0)|0;c[k>>2]=((d[17348+(d[c[i>>2]>>0]|0)>>0]|0)+(c[j>>2]|0)|0)%23|0;c[h>>2]=Hg(c[k>>2]|0,c[i>>2]|0)|0;if(c[h>>2]|0){c[(c[e>>2]|0)+((c[g>>2]|0)*28|0)+8>>2]=c[(c[h>>2]|0)+8>>2];c[(c[h>>2]|0)+8>>2]=(c[e>>2]|0)+((c[g>>2]|0)*28|0)}else{c[(c[e>>2]|0)+((c[g>>2]|0)*28|0)+8>>2]=0;c[(c[e>>2]|0)+((c[g>>2]|0)*28|0)+24>>2]=c[46920+(c[k>>2]<<2)>>2];c[46920+(c[k>>2]<<2)>>2]=(c[e>>2]|0)+((c[g>>2]|0)*28|0)}c[g>>2]=(c[g>>2]|0)+1}l=m;return}function Hg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;f=g+12|0;h=g+8|0;d=g+4|0;e=g;c[h>>2]=a;c[d>>2]=b;c[e>>2]=c[46920+(c[h>>2]<<2)>>2];while(1){if(!(c[e>>2]|0)){a=6;break}h=(Ig(c[(c[e>>2]|0)+20>>2]|0,c[d>>2]|0)|0)==0;b=c[e>>2]|0;if(h){a=4;break}c[e>>2]=c[b+24>>2]}if((a|0)==4){c[f>>2]=b;h=c[f>>2]|0;l=g;return h|0}else if((a|0)==6){c[f>>2]=0;h=c[f>>2]|0;l=g;return h|0}return 0}function Ig(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;j=h+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[j>>2]=a;c[i>>2]=b;c[e>>2]=c[j>>2];c[f>>2]=c[i>>2];while(1){c[g>>2]=(d[17348+(d[c[e>>2]>>0]|0)>>0]|0)-(d[17348+(d[c[f>>2]>>0]|0)>>0]|0);if(c[g>>2]|0){a=5;break}if(!(d[c[e>>2]>>0]|0)){a=5;break}c[e>>2]=(c[e>>2]|0)+1;c[f>>2]=(c[f>>2]|0)+1}if((a|0)==5){l=h;return c[g>>2]|0}return 0}function Jg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+12|0;h=g+4|0;f=g;c[e>>2]=a;c[g+8>>2]=b;c[h>>2]=d;d=wh(c[c[h>>2]>>2]|0)|0;c[f>>2]=d;if(!d){l=g;return}h=c[e>>2]|0;Ch(h,Yc(c[f>>2]|0)|0);l=g;return}function Kg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;g=e+12|0;h=e+4|0;f=e;c[g>>2]=a;c[e+8>>2]=b;c[h>>2]=d;c[f>>2]=vi(c[c[h>>2]>>2]|0)|0;d=c[g>>2]|0;ci(d,ad(c[f>>2]|0)|0,-1,0);l=e;return}function Lg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+8|0;c[f>>2]=a;c[e+4>>2]=b;c[e>>2]=d;d=c[f>>2]|0;ci(d,Xi()|0,-1,0);l=e;return}function Mg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;o=v+52|0;p=v+48|0;q=v+44|0;r=v+40|0;s=v+36|0;t=v+32|0;u=v+28|0;g=v+24|0;h=v+20|0;i=v+16|0;j=v+12|0;k=v+8|0;m=v+4|0;n=v;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;c[h>>2]=0;c[i>>2]=0;if((fi(c[c[q>>2]>>2]|0)|0)==5){l=v;return}c[r>>2]=wh(c[c[q>>2]>>2]|0)|0;if(!(c[r>>2]|0)){l=v;return}c[t>>2]=xh(c[c[q>>2]>>2]|0)|0;a:do if((c[p>>2]|0)!=1){q=wh(c[(c[q>>2]|0)+4>>2]|0)|0;c[s>>2]=q;if(!q){l=v;return}c[k>>2]=c[s>>2];c[j>>2]=0;while(1){if(!(a[c[k>>2]>>0]|0))break;q=c[k>>2]|0;c[k>>2]=q+1;b:do if((d[q>>0]|0)>=192)while(1){if((d[c[k>>2]>>0]&192|0)!=128)break b;c[k>>2]=(c[k>>2]|0)+1}while(0);c[j>>2]=(c[j>>2]|0)+1}if((c[j>>2]|0)>0){p=c[o>>2]|0;q=c[j>>2]|0;q=RR(q|0,((q|0)<0)<<31>>31|0,5,0)|0;c[i>>2]=Fi(p,q,z)|0;if(!(c[i>>2]|0)){l=v;return}c[h>>2]=(c[i>>2]|0)+(c[j>>2]<<2);c[k>>2]=c[s>>2];c[j>>2]=0;while(1){if(!(a[c[k>>2]>>0]|0))break a;c[(c[i>>2]|0)+(c[j>>2]<<2)>>2]=c[k>>2];q=c[k>>2]|0;c[k>>2]=q+1;c:do if((d[q>>0]|0)>=192)while(1){if((d[c[k>>2]>>0]&192|0)!=128)break c;c[k>>2]=(c[k>>2]|0)+1}while(0);a[(c[h>>2]|0)+(c[j>>2]|0)>>0]=(c[k>>2]|0)-(c[(c[i>>2]|0)+(c[j>>2]<<2)>>2]|0);c[j>>2]=(c[j>>2]|0)+1}}}else{c[j>>2]=1;c[h>>2]=19910;c[i>>2]=3716;c[s>>2]=0}while(0);if((c[j>>2]|0)>0){c[u>>2]=vh(c[o>>2]|0)|0;d:do if((c[u>>2]&1|0)!=0&(c[t>>2]|0)>0)do{c[m>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[j>>2]|0))break;c[m>>2]=d[(c[h>>2]|0)+(c[g>>2]|0)>>0];if((c[m>>2]|0)<=(c[t>>2]|0)?(wQ(c[r>>2]|0,c[(c[i>>2]|0)+(c[g>>2]<<2)>>2]|0,c[m>>2]|0)|0)==0:0)break;c[g>>2]=(c[g>>2]|0)+1}if((c[g>>2]|0)>=(c[j>>2]|0))break d;c[r>>2]=(c[r>>2]|0)+(c[m>>2]|0);c[t>>2]=(c[t>>2]|0)-(c[m>>2]|0)}while((c[t>>2]|0)>0);while(0);e:do if((c[u>>2]&2|0)!=0&(c[t>>2]|0)>0)do{c[n>>2]=0;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[j>>2]|0))break;c[n>>2]=d[(c[h>>2]|0)+(c[g>>2]|0)>>0];if((c[n>>2]|0)<=(c[t>>2]|0)?(wQ((c[r>>2]|0)+((c[t>>2]|0)-(c[n>>2]|0))|0,c[(c[i>>2]|0)+(c[g>>2]<<2)>>2]|0,c[n>>2]|0)|0)==0:0)break;c[g>>2]=(c[g>>2]|0)+1}if((c[g>>2]|0)>=(c[j>>2]|0))break e;c[t>>2]=(c[t>>2]|0)-(c[n>>2]|0)}while((c[t>>2]|0)>0);while(0);if(c[s>>2]|0)Kd(c[i>>2]|0)}ci(c[o>>2]|0,c[r>>2]|0,c[t>>2]|0,-1);l=v;return}function Ng(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;e=n+24|0;f=n+20|0;g=n+16|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;d=(vh(c[e>>2]|0)|0)==0;c[i>>2]=d?0:-1;c[k>>2]=Ki(c[e>>2]|0)|0;c[j>>2]=0;if((fi(c[c[g>>2]>>2]|0)|0)==5){l=n;return}c[h>>2]=1;while(1){if((c[h>>2]|0)>=(c[f>>2]|0))break;if((fi(c[(c[g>>2]|0)+(c[h>>2]<<2)>>2]|0)|0)==5){m=9;break}d=Li(c[(c[g>>2]|0)+(c[j>>2]<<2)>>2]|0,c[(c[g>>2]|0)+(c[h>>2]<<2)>>2]|0,c[k>>2]|0)|0;if((d^c[i>>2]|0)>=0)c[j>>2]=c[h>>2];c[h>>2]=(c[h>>2]|0)+1}if((m|0)==9){l=n;return}Ei(c[e>>2]|0,c[(c[g>>2]|0)+(c[j>>2]<<2)>>2]|0);l=n;return}function Og(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+28|0;f=n+20|0;i=n+16|0;j=n+12|0;k=n+8|0;m=n+4|0;g=n;c[h>>2]=a;c[n+24>>2]=d;c[f>>2]=e;c[i>>2]=c[c[f>>2]>>2];c[j>>2]=$h(c[h>>2]|0,40)|0;if(!(c[j>>2]|0)){l=n;return}f=(fi(c[c[f>>2]>>2]|0)|0)==5;a=(b[(c[j>>2]|0)+8>>1]|0)!=0;if(f){if(!a){l=n;return}Wi(c[h>>2]|0);l=n;return}d=c[h>>2]|0;if(!a){m=uh(d)|0;c[(c[j>>2]|0)+32>>2]=m;Gi(c[j>>2]|0,c[i>>2]|0)|0;l=n;return}c[g>>2]=Ki(d)|0;c[k>>2]=(vh(c[h>>2]|0)|0)!=0&1;c[m>>2]=Li(c[j>>2]|0,c[i>>2]|0,c[g>>2]|0)|0;if(!((c[k>>2]|0)!=0&(c[m>>2]|0)<0)?!((c[k>>2]|0)==0&(c[m>>2]|0)>0):0){Wi(c[h>>2]|0);l=n;return}Gi(c[j>>2]|0,c[i>>2]|0)|0;l=n;return}function Pg(a){a=a|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=$h(c[d>>2]|0,0)|0;if(!(c[e>>2]|0)){l=f;return}if(b[(c[e>>2]|0)+8>>1]|0)Ei(c[d>>2]|0,c[e>>2]|0);Lh(c[e>>2]|0);l=f;return}function Qg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+12|0;h=g+4|0;f=g;c[e>>2]=a;c[g+8>>2]=b;c[h>>2]=d;c[f>>2]=0;switch(fi(c[c[h>>2]>>2]|0)|0){case 1:{c[f>>2]=19882;break}case 3:{c[f>>2]=19890;break}case 2:{c[f>>2]=19895;break}case 4:{c[f>>2]=19900;break}default:c[f>>2]=19905}ci(c[e>>2]|0,c[f>>2]|0,-1,0);l=g;return}function Rg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[k+12>>2]=e;c[h>>2]=f;switch(fi(c[c[h>>2]>>2]|0)|0){case 2:case 1:case 4:{Ch(c[g>>2]|0,xh(c[c[h>>2]>>2]|0)|0);l=k;return}case 3:{c[j>>2]=wh(c[c[h>>2]>>2]|0)|0;if(!(c[j>>2]|0)){l=k;return}c[i>>2]=0;a:while(1){if(!(a[c[j>>2]>>0]|0))break;c[i>>2]=(c[i>>2]|0)+1;h=c[j>>2]|0;c[j>>2]=h+1;if((d[h>>0]|0)<192)continue;while(1){if((d[c[j>>2]>>0]&192|0)!=128)continue a;c[j>>2]=(c[j>>2]|0)+1}}Ch(c[g>>2]|0,c[i>>2]|0);l=k;return}default:{Ui(c[g>>2]|0);l=k;return}}}function Sg(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;j=q+40|0;k=q+32|0;m=q+28|0;n=q+24|0;o=q+20|0;p=q+16|0;f=q+12|0;g=q+8|0;h=q+4|0;i=q;c[j>>2]=a;c[q+36>>2]=b;c[k>>2]=e;c[h>>2]=1;c[f>>2]=fi(c[c[k>>2]>>2]|0)|0;c[g>>2]=fi(c[(c[k>>2]|0)+4>>2]|0)|0;if((c[f>>2]|0)==5|(c[g>>2]|0)==5){l=q;return}c[o>>2]=xh(c[c[k>>2]>>2]|0)|0;c[p>>2]=xh(c[(c[k>>2]|0)+4>>2]|0)|0;a=c[c[k>>2]>>2]|0;if((c[f>>2]|0)==4&(c[g>>2]|0)==4){c[m>>2]=wi(a)|0;c[n>>2]=wi(c[(c[k>>2]|0)+4>>2]|0)|0;c[i>>2]=0}else{c[m>>2]=wh(a)|0;c[n>>2]=wh(c[(c[k>>2]|0)+4>>2]|0)|0;c[i>>2]=1}a:while(1){if((c[p>>2]|0)>(c[o>>2]|0))break;if(!(wQ(c[m>>2]|0,c[n>>2]|0,c[p>>2]|0)|0))break;c[h>>2]=(c[h>>2]|0)+1;while(1){c[o>>2]=(c[o>>2]|0)+-1;c[m>>2]=(c[m>>2]|0)+1;if(!(c[i>>2]|0))continue a;if(((d[c[m>>2]>>0]|0)&192|0)!=128)continue a}}if((c[p>>2]|0)>(c[o>>2]|0))c[h>>2]=0;Ch(c[j>>2]|0,c[h>>2]|0);l=q;return}function Tg(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+80|0;o=p;g=p+64|0;h=p+60|0;i=p+56|0;j=p+44|0;k=p+16|0;m=p+12|0;n=p+8|0;f=p+4|0;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[f>>2]=uh(c[g>>2]|0)|0;if((c[h>>2]|0)<1){l=p;return}e=wh(c[c[i>>2]>>2]|0)|0;c[m>>2]=e;if(!e){l=p;return}c[j>>2]=(c[h>>2]|0)-1;c[j+4>>2]=0;c[j+8>>2]=(c[i>>2]|0)+4;jd(k,c[f>>2]|0,0,0,c[(c[f>>2]|0)+96>>2]|0);a[k+25>>0]=2;m=c[m>>2]|0;c[o>>2]=j;Vi(k,m,o);c[n>>2]=c[k+12>>2];m=c[g>>2]|0;o=ld(k)|0;ci(m,o,c[n>>2]|0,169);l=p;return}function Ug(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0;h=l;l=l+16|0;f=h+12|0;i=h+4|0;g=h;c[f>>2]=a;c[h+8>>2]=b;c[i>>2]=e;c[g>>2]=wh(c[c[i>>2]>>2]|0)|0;if(!(c[g>>2]|0)){l=h;return}if(!(d[c[g>>2]>>0]|0)){l=h;return}i=c[f>>2]|0;Ch(i,Ah(g)|0);l=h;return}function Vg(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+48|0;g=o+32|0;h=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;m=o+12|0;n=o;f=o+8|0;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;e=(c[h>>2]<<2)+1|0;e=Ve(e,((e|0)<0)<<31>>31)|0;c[j>>2]=e;c[k>>2]=e;if(!(c[j>>2]|0)){bi(c[g>>2]|0);l=o;return}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[h>>2]|0))break;p=ki(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0)|0;e=z;d=n;c[d>>2]=p;c[d+4>>2]=e;d=n;b=c[d+4>>2]|0;d=(c[n+4>>2]|0)<0|((b|0)>0|(b|0)==0&(c[d>>2]|0)>>>0>1114111);b=n;c[b>>2]=d?65533:p;c[b+4>>2]=d?0:e;c[f>>2]=c[n>>2]&2097151;b=c[f>>2]|0;do if((c[f>>2]|0)>>>0>=128){d=c[f>>2]|0;if(b>>>0<2048){e=c[k>>2]|0;c[k>>2]=e+1;a[e>>0]=192+(d>>>6&31);e=128+(c[f>>2]&63)&255;p=c[k>>2]|0;c[k>>2]=p+1;a[p>>0]=e;break}b=c[f>>2]|0;if(d>>>0<65536){p=c[k>>2]|0;c[k>>2]=p+1;a[p>>0]=224+(b>>>12&15);p=128+((c[f>>2]|0)>>>6&63)&255;e=c[k>>2]|0;c[k>>2]=e+1;a[e>>0]=p;e=128+(c[f>>2]&63)&255;p=c[k>>2]|0;c[k>>2]=p+1;a[p>>0]=e;break}else{e=c[k>>2]|0;c[k>>2]=e+1;a[e>>0]=240+(b>>>18&7);e=128+((c[f>>2]|0)>>>12&63)&255;p=c[k>>2]|0;c[k>>2]=p+1;a[p>>0]=e;p=128+((c[f>>2]|0)>>>6&63)&255;e=c[k>>2]|0;c[k>>2]=e+1;a[e>>0]=p;e=128+(c[f>>2]&63)&255;p=c[k>>2]|0;c[k>>2]=p+1;a[p>>0]=e;break}}else{p=c[k>>2]|0;c[k>>2]=p+1;a[p>>0]=b}while(0);c[m>>2]=(c[m>>2]|0)+1}p=(c[k>>2]|0)-(c[j>>2]|0)|0;xi(c[g>>2]|0,c[j>>2]|0,p,((p|0)<0)<<31>>31,148,1);l=o;return}function Wg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0;j=l;l=l+32|0;e=j+24|0;f=j+16|0;g=j+8|0;i=j;c[e>>2]=a;c[j+20>>2]=b;c[f>>2]=d;switch(fi(c[c[f>>2]>>2]|0)|0){case 1:{i=g;c[i>>2]=ki(c[c[f>>2]>>2]|0)|0;c[i+4>>2]=z;do if((c[g+4>>2]|0)<0){i=g;if(!((c[i>>2]|0)==0?(c[i+4>>2]|0)==-2147483648:0)){f=g;f=FR(0,0,c[f>>2]|0,c[f+4>>2]|0)|0;i=g;c[i>>2]=f;c[i+4>>2]=z;break}yh(c[e>>2]|0,19150,-1);l=j;return}while(0);i=g;gi(c[e>>2]|0,c[i>>2]|0,c[i+4>>2]|0);l=j;return}case 5:{Ui(c[e>>2]|0);l=j;return}default:{h[i>>3]=+mi(c[c[f>>2]>>2]|0);if(+h[i>>3]<0.0)h[i>>3]=-+h[i>>3];hi(c[e>>2]|0,+h[i>>3]);l=j;return}}}function Xg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0.0;m=l;l=l+48|0;k=m+8|0;e=m+40|0;n=m+36|0;f=m+32|0;g=m+28|0;i=m;j=m+24|0;c[e>>2]=a;c[n>>2]=b;c[f>>2]=d;c[g>>2]=0;do if((c[n>>2]|0)==2)if(5==(fi(c[(c[f>>2]|0)+4>>2]|0)|0)){l=m;return}else{n=vi(c[(c[f>>2]|0)+4>>2]|0)|0;c[g>>2]=n;n=(c[g>>2]|0)>30?30:n;c[g>>2]=n;c[g>>2]=(c[g>>2]|0)<0?0:n;break}while(0);if((fi(c[c[f>>2]>>2]|0)|0)==5){l=m;return}h[i>>3]=+mi(c[c[f>>2]>>2]|0);do if((c[g>>2]|0)==0&+h[i>>3]>=0.0&+h[i>>3]<9223372036854775808.0){o=+h[i>>3]+.5;h[i>>3]=+(~~o>>>0>>>0)+4294967296.0*+((+B(o)>=1.0?(o>0.0?~~+P(+A(o/4294967296.0),4294967295.0)>>>0:~~+N((o-+(~~o>>>0))/4294967296.0)>>>0):0)|0)}else{if((c[g>>2]|0)==0&+h[i>>3]<0.0?-+h[i>>3]<9223372036854775808.0:0){o=-+h[i>>3]+.5;h[i>>3]=-(+(~~o>>>0>>>0)+4294967296.0*+((+B(o)>=1.0?(o>0.0?~~+P(+A(o/4294967296.0),4294967295.0)>>>0:~~+N((o-+(~~o>>>0))/4294967296.0)>>>0):0)|0));break}o=+h[i>>3];c[k>>2]=c[g>>2];h[k+8>>3]=o;c[j>>2]=Ue(19877,k)|0;if(c[j>>2]|0){n=c[j>>2]|0;oi(n,i,_c(c[j>>2]|0)|0,1)|0;Kd(c[j>>2]|0);break}bi(c[e>>2]|0);l=m;return}while(0);hi(c[e>>2]|0,+h[i>>3]);l=m;return}function Yg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;g=m+24|0;n=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[m+20>>2]=e;c[n>>2]=f;c[i>>2]=wh(c[c[n>>2]>>2]|0)|0;c[k>>2]=xh(c[c[n>>2]>>2]|0)|0;if(!(c[i>>2]|0)){l=m;return}f=c[g>>2]|0;n=c[k>>2]|0;n=IR(n|0,((n|0)<0)<<31>>31|0,1,0)|0;c[h>>2]=Fi(f,n,z)|0;if(!(c[h>>2]|0)){l=m;return}c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0))break;a[(c[h>>2]|0)+(c[j>>2]|0)>>0]=a[(c[i>>2]|0)+(c[j>>2]|0)>>0]&~(d[16965+(d[(c[i>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&32);c[j>>2]=(c[j>>2]|0)+1}ci(c[g>>2]|0,c[h>>2]|0,c[k>>2]|0,148);l=m;return}function Zg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;g=m+24|0;n=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[m+20>>2]=e;c[n>>2]=f;c[i>>2]=wh(c[c[n>>2]>>2]|0)|0;c[k>>2]=xh(c[c[n>>2]>>2]|0)|0;if(!(c[i>>2]|0)){l=m;return}f=c[g>>2]|0;n=c[k>>2]|0;n=IR(n|0,((n|0)<0)<<31>>31|0,1,0)|0;c[h>>2]=Fi(f,n,z)|0;if(!(c[h>>2]|0)){l=m;return}c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[k>>2]|0))break;a[(c[h>>2]|0)+(c[j>>2]|0)>>0]=a[17348+(d[(c[i>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]|0;c[j>>2]=(c[j>>2]|0)+1}ci(c[g>>2]|0,c[h>>2]|0,c[k>>2]|0,148);l=m;return}function _g(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h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>2]|0)<1?1:d;d=c[f>>2]|0;c[g>>2]=Fi(c[e>>2]|0,d,((d|0)<0)<<31>>31)|0;if(!(c[g>>2]|0)){l=h;return}Ze(c[f>>2]|0,c[g>>2]|0);Ti(c[e>>2]|0,c[g>>2]|0,c[f>>2]|0,148);l=h;return}function bh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+12|0;f=g+4|0;h=g;c[e>>2]=a;c[g+8>>2]=b;c[f>>2]=d;c[h>>2]=Ki(c[e>>2]|0)|0;if(!(Li(c[c[f>>2]>>2]|0,c[(c[f>>2]|0)+4>>2]|0,c[h>>2]|0)|0)){l=g;return}Ei(c[e>>2]|0,c[c[f>>2]>>2]|0);l=g;return}function ch(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+8|0;c[f>>2]=a;c[e+4>>2]=b;c[e>>2]=d;d=c[f>>2]|0;ci(d,gd()|0,-1,0);l=e;return}function dh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e;g=e+4|0;c[e+12>>2]=a;c[e+8>>2]=b;c[g>>2]=d;d=vi(c[c[g>>2]>>2]|0)|0;c[f>>2]=wh(c[(c[g>>2]|0)+4>>2]|0)|0;hd(d,18130,f);l=e;return}function eh(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+144|0;x=y+32|0;w=y+24|0;q=y+80|0;r=y+72|0;s=y+16|0;t=y+8|0;u=y+84|0;v=y+68|0;g=y+64|0;i=y+60|0;j=y+56|0;k=y+52|0;m=y+48|0;n=y;o=y+44|0;p=y+40|0;c[q>>2]=b;c[y+76>>2]=e;c[r>>2]=f;switch(fi(c[c[r>>2]>>2]|0)|0){case 2:{h[s>>3]=+mi(c[c[r>>2]>>2]|0);h[w>>3]=+h[s>>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31>>31|0,c[x>>2]|0,c[x+4>>2]|0)|0;x=IR(x|0,z|0,3,0)|0;c[p>>2]=Fi(w,x,z)|0;if(!(c[p>>2]|0)){l=y;return}a[c[p>>2]>>0]=39;c[k>>2]=0;c[m>>2]=1;while(1){if(!(a[(c[o>>2]|0)+(c[k>>2]|0)>>0]|0))break;v=a[(c[o>>2]|0)+(c[k>>2]|0)>>0]|0;w=c[p>>2]|0;x=c[m>>2]|0;c[m>>2]=x+1;a[w+x>>0]=v;if((d[(c[o>>2]|0)+(c[k>>2]|0)>>0]|0)==39){w=c[p>>2]|0;x=c[m>>2]|0;c[m>>2]=x+1;a[w+x>>0]=39}c[k>>2]=(c[k>>2]|0)+1}w=c[p>>2]|0;x=c[m>>2]|0;c[m>>2]=x+1;a[w+x>>0]=39;a[(c[p>>2]|0)+(c[m>>2]|0)>>0]=0;ci(c[q>>2]|0,c[p>>2]|0,c[m>>2]|0,148);l=y;return}default:{ci(c[q>>2]|0,17843,4,0);l=y;return}}}function fh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;g=e+12|0;f=e;c[g>>2]=a;c[e+8>>2]=b;c[e+4>>2]=d;c[f>>2]=uh(c[g>>2]|0)|0;b=c[g>>2]|0;d=Ji(c[f>>2]|0)|0;gi(b,d,z);l=e;return}function gh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;g=e+12|0;f=e;c[g>>2]=a;c[e+8>>2]=b;c[e+4>>2]=d;c[f>>2]=uh(c[g>>2]|0)|0;d=c[g>>2]|0;Ch(d,Ii(c[f>>2]|0)|0);l=e;return}function hh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;g=e+12|0;f=e;c[g>>2]=a;c[e+8>>2]=b;c[e+4>>2]=d;c[f>>2]=uh(c[g>>2]|0)|0;d=c[g>>2]|0;Ch(d,Hi(c[f>>2]|0)|0);l=e;return}function ih(b,e,f){b=b|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0)){l=g;return}Bi(c[e>>2]|0,c[f>>2]|0);l=g;return}function kh(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;o=r+44|0;h=r+40|0;i=r+36|0;p=r+32|0;q=r+28|0;j=r+24|0;k=r+20|0;m=r+8|0;n=r;g=r+16|0;c[o>>2]=b;c[h>>2]=e;c[i>>2]=f;c[g>>2]=0;if((fi(c[(c[i>>2]|0)+4>>2]|0)|0)==5){l=r;return}if((c[h>>2]|0)==3?(fi(c[(c[i>>2]|0)+8>>2]|0)|0)==5:0){l=r;return}c[k>>2]=fi(c[c[i>>2]>>2]|0)|0;f=vi(c[(c[i>>2]|0)+4>>2]|0)|0;b=m;c[b>>2]=f;c[b+4>>2]=((f|0)<0)<<31>>31;b=c[c[i>>2]>>2]|0;a:do if((c[k>>2]|0)==4){c[j>>2]=xh(b)|0;c[p>>2]=wi(c[c[i>>2]>>2]|0)|0;if(!(c[p>>2]|0)){l=r;return}}else{c[p>>2]=wh(b)|0;if(!(c[p>>2]|0)){l=r;return}c[j>>2]=0;if((c[m+4>>2]|0)<0){c[q>>2]=c[p>>2];while(1){if(!(a[c[q>>2]>>0]|0))break a;f=c[q>>2]|0;c[q>>2]=f+1;b:do if((d[f>>0]|0)>=192)while(1){if((d[c[q>>2]>>0]&192|0)!=128)break b;c[q>>2]=(c[q>>2]|0)+1}while(0);c[j>>2]=(c[j>>2]|0)+1}}}while(0);if((c[h>>2]|0)==3){h=vi(c[(c[i>>2]|0)+8>>2]|0)|0;i=n;c[i>>2]=h;c[i+4>>2]=((h|0)<0)<<31>>31;if((c[n+4>>2]|0)<0){h=n;h=FR(0,0,c[h>>2]|0,c[h+4>>2]|0)|0;i=n;c[i>>2]=h;c[i+4>>2]=z;c[g>>2]=1}}else{h=c[(uh(c[o>>2]|0)|0)+96>>2]|0;i=n;c[i>>2]=h;c[i+4>>2]=((h|0)<0)<<31>>31}do if((c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0)<0;q=n;c[q>>2]=j?0:i;c[q+4>>2]=j?0:k}q=n;yi(c[o>>2]|0,(c[p>>2]|0)+(c[m>>2]|0)|0,c[q>>2]|0,c[q+4>>2]|0,-1);l=r;return}while(1){k=m;b=c[p>>2]|0;if(!(d[c[p>>2]>>0]|0?(c[k>>2]|0)!=0|(c[k+4>>2]|0)!=0:0))break;c[p>>2]=b+1;c:do if((d[b>>0]|0)>=192)while(1){if((d[c[p>>2]>>0]&192|0)!=128)break c;c[p>>2]=(c[p>>2]|0)+1}while(0);j=m;j=IR(c[j>>2]|0,c[j+4>>2]|0,-1,-1)|0;k=m;c[k>>2]=j;c[k+4>>2]=z}c[q>>2]=b;while(1){m=n;if(!(d[c[q>>2]>>0]|0?(c[m>>2]|0)!=0|(c[m+4>>2]|0)!=0:0))break;m=c[q>>2]|0;c[q>>2]=m+1;d:do if((d[m>>0]|0)>=192)while(1){if((d[c[q>>2]>>0]&192|0)!=128)break d;c[q>>2]=(c[q>>2]|0)+1}while(0);k=n;k=IR(c[k>>2]|0,c[k+4>>2]|0,-1,-1)|0;m=n;c[m>>2]=k;c[m+4>>2]=z}q=(c[q>>2]|0)-(c[p>>2]|0)|0;xi(c[o>>2]|0,c[p>>2]|0,q,((q|0)<0)<<31>>31,-1,1);l=r;return}function lh(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,m=0,n=0,o=0.0;m=l;l=l+32|0;n=m+24|0;g=m+16|0;i=m+12|0;j=m+8|0;k=m;c[n>>2]=b;c[m+20>>2]=e;c[g>>2]=f;c[i>>2]=$h(c[n>>2]|0,32)|0;c[j>>2]=ji(c[c[g>>2]>>2]|0)|0;if(!((c[i>>2]|0)!=0&(c[j>>2]|0)!=5)){l=m;return}b=(c[i>>2]|0)+16|0;n=b;n=IR(c[n>>2]|0,c[n+4>>2]|0,1,0)|0;c[b>>2]=n;c[b+4>>2]=z;b=c[c[g>>2]>>2]|0;if((c[j>>2]|0)!=1){o=+mi(b);n=c[i>>2]|0;h[n>>3]=+h[n>>3]+o;a[(c[i>>2]|0)+25>>0]=1;l=m;return}n=ki(b)|0;j=k;c[j>>2]=n;c[j+4>>2]=z;j=k;n=c[i>>2]|0;h[n>>3]=+h[n>>3]+(+((c[j>>2]|0)>>>0)+4294967296.0*+(c[j+4>>2]|0));if(d[(c[i>>2]|0)+25>>0]|0|(d[(c[i>>2]|0)+24>>0]|0)|0){l=m;return}n=k;if(!(li((c[i>>2]|0)+8|0,c[n>>2]|0,c[n+4>>2]|0)|0)){l=m;return}a[(c[i>>2]|0)+24>>0]=1;l=m;return}function mh(b){b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=$h(c[d>>2]|0,0)|0;if(!(c[e>>2]|0)){l=f;return}b=(c[e>>2]|0)+16|0;g=c[b+4>>2]|0;if(!((g|0)>0|(g|0)==0&(c[b>>2]|0)>>>0>0)){l=f;return}if(a[(c[e>>2]|0)+24>>0]|0){yh(c[d>>2]|0,19150,-1);l=f;return}b=c[d>>2]|0;d=c[e>>2]|0;if(a[(c[e>>2]|0)+25>>0]|0){hi(b,+h[d>>3]);l=f;return}else{g=d+8|0;gi(b,c[g>>2]|0,c[g+4>>2]|0);l=f;return}}function nh(a){a=a|0;var b=0,d=0,e=0,f=0.0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=$h(c[e>>2]|0,0)|0;a=c[e>>2]|0;if(!(c[b>>2]|0)){f=0.0;hi(a,f);l=d;return}f=+h[c[b>>2]>>3];hi(a,f);l=d;return}function oh(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=$h(c[b>>2]|0,0)|0;if(!(c[d>>2]|0)){l=e;return}a=(c[d>>2]|0)+16|0;f=c[a+4>>2]|0;if(!((f|0)>0|(f|0)==0&(c[a>>2]|0)>>>0>0)){l=e;return}f=(c[d>>2]|0)+16|0;hi(c[b>>2]|0,+h[c[d>>2]>>3]/(+((c[f>>2]|0)>>>0)+4294967296.0*+(c[f+4>>2]|0)));l=e;return}function ph(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;i=g+12|0;h=g+8|0;e=g+4|0;f=g;c[i>>2]=a;c[h>>2]=b;c[e>>2]=d;c[f>>2]=$h(c[i>>2]|0,8)|0;if(!(c[h>>2]|0)){if(!(c[f>>2]|0)){l=g;return}}else{i=5!=(fi(c[c[e>>2]>>2]|0)|0);if(!(i&(c[f>>2]|0)!=0)){l=g;return}}i=c[f>>2]|0;h=i;h=IR(c[h>>2]|0,c[h+4>>2]|0,1,0)|0;c[i>>2]=h;c[i+4>>2]=z;l=g;return}function qh(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=$h(c[e>>2]|0,0)|0;a=c[e>>2]|0;if(!(c[b>>2]|0)){b=0;e=0;gi(a,b,e);l=d;return}e=c[b>>2]|0;b=c[e>>2]|0;e=c[e+4>>2]|0;gi(a,b,e);l=d;return}function rh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;h=p+36|0;i=p+32|0;j=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;o=p+12|0;e=p+8|0;f=p+4|0;g=p;c[h>>2]=a;c[i>>2]=b;c[j>>2]=d;if((fi(c[c[j>>2]>>2]|0)|0)==5){l=p;return}c[m>>2]=$h(c[h>>2]|0,28)|0;if(!(c[m>>2]|0)){l=p;return}c[f>>2]=uh(c[h>>2]|0)|0;c[g>>2]=(c[(c[m>>2]|0)+20>>2]|0)==0&1;c[(c[m>>2]|0)+20>>2]=c[(c[f>>2]|0)+96>>2];if(!(c[g>>2]|0)){if((c[i>>2]|0)==2){c[n>>2]=wh(c[(c[j>>2]|0)+4>>2]|0)|0;c[e>>2]=xh(c[(c[j>>2]|0)+4>>2]|0)|0}else{c[n>>2]=19116;c[e>>2]=1}if(c[e>>2]|0)zd(c[m>>2]|0,c[n>>2]|0,c[e>>2]|0)}c[k>>2]=wh(c[c[j>>2]>>2]|0)|0;c[o>>2]=xh(c[c[j>>2]>>2]|0)|0;if(!(c[k>>2]|0)){l=p;return}zd(c[m>>2]|0,c[k>>2]|0,c[o>>2]|0);l=p;return}function sh(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;c[e>>2]=$h(c[b>>2]|0,0)|0;if(!(c[e>>2]|0)){l=f;return}if((d[(c[e>>2]|0)+24>>0]|0|0)==2){ai(c[b>>2]|0);l=f;return}a=c[b>>2]|0;if((d[(c[e>>2]|0)+24>>0]|0|0)==1){bi(a);l=f;return}else{ci(a,ld(c[e>>2]|0)|0,-1,148);l=f;return}}function th(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;o=l;l=l+48|0;h=o+36|0;i=o+32|0;j=o+28|0;k=o+24|0;m=o+20|0;n=o+16|0;q=o+12|0;p=o+8|0;f=o+4|0;g=o;c[h>>2]=a;c[i>>2]=b;c[j>>2]=e;c[p>>2]=uh(c[h>>2]|0)|0;c[f>>2]=vh(c[h>>2]|0)|0;c[m>>2]=wh(c[c[j>>2]>>2]|0)|0;c[k>>2]=wh(c[(c[j>>2]|0)+4>>2]|0)|0;c[q>>2]=xh(c[c[j>>2]>>2]|0)|0;if((c[q>>2]|0)>(c[(c[p>>2]|0)+96+32>>2]|0)){yh(c[h>>2]|0,18939,-1);l=o;return}do if((c[i>>2]|0)==3){c[g>>2]=wh(c[(c[j>>2]|0)+8>>2]|0)|0;if(!(c[g>>2]|0)){l=o;return}if((zh(c[g>>2]|0,-1)|0)==1){c[n>>2]=Ah(g)|0;break}yh(c[h>>2]|0,18972,-1);l=o;return}else c[n>>2]=d[(c[f>>2]|0)+2>>0];while(0);if(!((c[k>>2]|0)!=0&(c[m>>2]|0)!=0)){l=o;return}q=c[h>>2]|0;Ch(q,Bh(c[m>>2]|0,c[k>>2]|0,c[f>>2]|0,c[n>>2]|0)|0);l=o;return}function uh(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[c[b>>2]>>2]|0)+32>>2]|0}function vh(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[(c[b>>2]|0)+4>>2]|0)+4>>2]|0}function wh(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=_h(c[d>>2]|0,1)|0;l=b;return a|0}function xh(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Sh(c[d>>2]|0,1)|0;l=b;return a|0}function yh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=l;l=l+16|0;i=f+8|0;h=f+4|0;g=f;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;c[(c[i>>2]|0)+20>>2]=1;a[(c[i>>2]|0)+25>>0]=1;Jh(c[c[i>>2]>>2]|0,c[h>>2]|0,c[g>>2]|0,1,-1)|0;l=f;return}function zh(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;j=i+16|0;e=i+12|0;h=i+8|0;f=i+4|0;g=i;c[j>>2]=a;c[e>>2]=b;c[h>>2]=0;c[f>>2]=c[j>>2];if((c[e>>2]|0)>=0)c[g>>2]=(c[f>>2]|0)+(c[e>>2]|0);else c[g>>2]=-1;while(1){if(!(d[c[f>>2]>>0]|0)){a=10;break}if((c[f>>2]|0)>>>0>=(c[g>>2]|0)>>>0){a=10;break}j=c[f>>2]|0;c[f>>2]=j+1;a:do if((d[j>>0]|0|0)>=192)while(1){if(((d[c[f>>2]>>0]|0)&192|0)!=128)break a;c[f>>2]=(c[f>>2]|0)+1}while(0);c[h>>2]=(c[h>>2]|0)+1}if((a|0)==10){l=i;return c[h>>2]|0}return 0}function Ah(a){a=a|0;var b=0,e=0,f=0,g=0,h=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;g=c[b>>2]|0;a=c[g>>2]|0;c[g>>2]=a+1;c[e>>2]=d[a>>0];if((c[e>>2]|0)>>>0<192){g=c[e>>2]|0;l=f;return g|0}c[e>>2]=d[19017+((c[e>>2]|0)-192)>>0];while(1){a=c[e>>2]|0;if(((d[c[c[b>>2]>>2]>>0]|0)&192|0)!=128)break;h=c[b>>2]|0;g=c[h>>2]|0;c[h>>2]=g+1;c[e>>2]=(a<<6)+(63&(d[g>>0]|0))}if((a>>>0>=128?(c[e>>2]&-2048|0)!=55296:0)?(c[e>>2]&-2|0)!=65534:0){h=c[e>>2]|0;l=f;return h|0}c[e>>2]=65533;h=c[e>>2]|0;l=f;return h|0} +function Bh(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+64|0;s=x+52|0;t=x+48|0;u=x+44|0;v=x+40|0;w=x+36|0;r=x+32|0;q=x+28|0;m=x+24|0;n=x+20|0;o=x+56|0;h=x+16|0;p=x+12|0;i=x+8|0;j=x+4|0;k=x;c[t>>2]=b;c[u>>2]=e;c[v>>2]=f;c[w>>2]=g;c[m>>2]=d[(c[v>>2]|0)+1>>0];c[n>>2]=d[c[v>>2]>>0];a[o>>0]=a[(c[v>>2]|0)+3>>0]|0;c[h>>2]=0;a:while(1){if((d[c[t>>2]>>0]|0)<128){b=c[t>>2]|0;c[t>>2]=b+1;b=d[b>>0]|0}else b=Ah(t)|0;c[r>>2]=b;if(!b){f=83;break}if((c[r>>2]|0)==(c[n>>2]|0)){f=7;break}do if((c[r>>2]|0)==(c[w>>2]|0)){if(!(d[(c[v>>2]|0)+2>>0]|0)){c[r>>2]=Ah(t)|0;if(!(c[r>>2]|0)){f=49;break a}c[h>>2]=c[t>>2];break}c[i>>2]=0;c[j>>2]=0;c[k>>2]=0;c[r>>2]=Ah(u)|0;if(!(c[r>>2]|0)){f=52;break a}c[q>>2]=Ah(t)|0;if((c[q>>2]|0)==94){c[k>>2]=1;c[q>>2]=Ah(t)|0}if((c[q>>2]|0)==93){if((c[r>>2]|0)==93)c[j>>2]=1;c[q>>2]=Ah(t)|0}while(1){b=c[q>>2]|0;if(!(c[q>>2]|0?(c[q>>2]|0)!=93:0))break;if(((b|0)==45?(d[c[t>>2]>>0]|0)!=93:0)?((c[i>>2]|0)>>>0>0?(d[c[t>>2]>>0]|0)!=0:0):0){c[q>>2]=Ah(t)|0;if((c[r>>2]|0)>>>0>=(c[i>>2]|0)>>>0?(c[r>>2]|0)>>>0<=(c[q>>2]|0)>>>0:0)c[j>>2]=1;c[i>>2]=0}else{if((c[r>>2]|0)==(c[q>>2]|0))c[j>>2]=1;c[i>>2]=c[q>>2]}c[q>>2]=Ah(t)|0}if(!b){f=73;break a}if(!(c[j>>2]^c[k>>2])){f=73;break a}else continue a}while(0);if((d[c[u>>2]>>0]|0)<128){b=c[u>>2]|0;c[u>>2]=b+1;b=d[b>>0]|0}else b=Ah(u)|0;c[q>>2]=b;if((c[r>>2]|0)==(c[q>>2]|0))continue;if(d[o>>0]|0?((c[r>>2]|0)>>>0<128?(d[17348+(c[r>>2]&255)>>0]|0)==(d[17348+(c[q>>2]&255)>>0]|0):0)&(c[q>>2]|0)>>>0<128:0)continue;if((c[r>>2]|0)!=(c[m>>2]|0)){f=82;break}if(!(c[q>>2]|0?(c[t>>2]|0)!=(c[h>>2]|0):0)){f=82;break}}if((f|0)==7){while(1){f=0;if((d[c[t>>2]>>0]|0)<128){b=c[t>>2]|0;c[t>>2]=b+1;b=d[b>>0]|0}else b=Ah(t)|0;c[r>>2]=b;if((b|0)==(c[n>>2]|0))b=1;else b=(c[r>>2]|0)==(c[m>>2]|0);e=c[r>>2]|0;if(!b)break;if((e|0)!=(c[m>>2]|0)){f=7;continue}if(!(Ah(u)|0)){f=15;break}else f=7}if((f|0)==15){c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}if(!e){c[s>>2]=1;w=c[s>>2]|0;l=x;return w|0}do if((c[r>>2]|0)==(c[w>>2]|0)){if(!(d[(c[v>>2]|0)+2>>0]|0)){c[r>>2]=Ah(t)|0;if(c[r>>2]|0)break;c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}b:while(1){if(d[c[u>>2]>>0]|0)b=(Bh((c[t>>2]|0)+-1|0,c[u>>2]|0,c[v>>2]|0,c[w>>2]|0)|0)==0;else b=0;e=c[u>>2]|0;if(!b)break;c[u>>2]=e+1;if((d[e>>0]|0)<192)continue;while(1){if((d[c[u>>2]>>0]&192|0)!=128)continue b;c[u>>2]=(c[u>>2]|0)+1}}c[s>>2]=(d[e>>0]|0)!=0&1;w=c[s>>2]|0;l=x;return w|0}while(0);c:do if((c[r>>2]|0)>>>0<=128){b=c[r>>2]|0;if(a[o>>0]|0){c[p>>2]=b&~(d[16965+(c[r>>2]&255)>>0]&32);c[r>>2]=d[17348+(c[r>>2]&255)>>0]}else c[p>>2]=b;while(1){o=c[u>>2]|0;c[u>>2]=o+1;o=d[o>>0]|0;c[q>>2]=o;if(!o)break c;if((c[q>>2]|0)!=(c[r>>2]|0)?(c[q>>2]|0)!=(c[p>>2]|0):0)continue;if(Bh(c[t>>2]|0,c[u>>2]|0,c[v>>2]|0,c[w>>2]|0)|0)break}c[s>>2]=1;w=c[s>>2]|0;l=x;return w|0}else{while(1){if((d[c[u>>2]>>0]|0)<128){b=c[u>>2]|0;c[u>>2]=b+1;b=d[b>>0]|0}else b=Ah(u)|0;c[q>>2]=b;if(!b)break c;if((c[q>>2]|0)!=(c[r>>2]|0))continue;if(Bh(c[t>>2]|0,c[u>>2]|0,c[v>>2]|0,c[w>>2]|0)|0)break}c[s>>2]=1;w=c[s>>2]|0;l=x;return w|0}while(0);c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}else if((f|0)==49){c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}else if((f|0)==52){c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}else if((f|0)==73){c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}else if((f|0)==82){c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}else if((f|0)==83){c[s>>2]=(d[c[u>>2]>>0]|0)==0&1;w=c[s>>2]|0;l=x;return w|0}return 0}function Ch(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=c[f>>2]|0;Dh(c[c[e>>2]>>2]|0,b,((b|0)<0)<<31>>31);l=d;return}function Dh(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0;i=l;l=l+16|0;g=i+8|0;h=i;c[g>>2]=a;a=h;c[a>>2]=d;c[a+4>>2]=f;if((e[(c[g>>2]|0)+8>>1]|0)&9312|0){Eh(c[g>>2]|0,c[h>>2]|0,c[h+4>>2]|0);l=i;return}else{d=h;f=c[d+4>>2]|0;h=c[g>>2]|0;c[h>>2]=c[d>>2];c[h+4>>2]=f;b[(c[g>>2]|0)+8>>1]=4;l=i;return}}function Eh(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=l;l=l+16|0;g=f+8|0;h=f;c[g>>2]=a;a=h;c[a>>2]=d;c[a+4>>2]=e;Fh(c[g>>2]|0);a=h;d=c[a+4>>2]|0;e=c[g>>2]|0;c[e>>2]=c[a>>2];c[e+4>>2]=d;b[(c[g>>2]|0)+8>>1]=4;l=f;return}function Fh(a){a=a|0;var d=0,f=0;d=l;l=l+16|0;f=d;c[f>>2]=a;a=c[f>>2]|0;if((e[(c[f>>2]|0)+8>>1]|0)&9312|0){Gh(a);l=d;return}else{b[a+8>>1]=1;l=d;return}}function Gh(a){a=a|0;var d=0,f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=a;if((e[(c[f>>2]|0)+8>>1]|0)&8192|0)Hh(c[f>>2]|0,c[c[f>>2]>>2]|0)|0;a=c[f>>2]|0;do if(!((e[(c[f>>2]|0)+8>>1]|0)&1024|0)){d=c[f>>2]|0;if((e[a+8>>1]|0)&32|0){Ih(c[d>>2]|0);break}if((e[d+8>>1]|0)&64|0){c[g>>2]=c[c[f>>2]>>2];c[(c[g>>2]|0)+4>>2]=c[(c[c[g>>2]>>2]|0)+188>>2];c[(c[c[g>>2]>>2]|0)+188>>2]=c[g>>2]}}else qb[c[a+36>>2]&255](c[(c[f>>2]|0)+16>>2]|0);while(0);b[(c[f>>2]|0)+8>>1]=1;l=h;return}function Hh(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+96|0;f=j+80|0;g=j+76|0;h=j+72|0;i=j+40|0;e=j;c[f>>2]=a;c[g>>2]=d;c[h>>2]=0;if(!(c[g>>2]|0)){i=c[h>>2]|0;l=j;return i|0}if(!(c[(c[g>>2]|0)+16>>2]|0)){i=c[h>>2]|0;l=j;return i|0};c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;c[i+16>>2]=0;c[i+20>>2]=0;c[i+24>>2]=0;c[i+28>>2]=0;a=e;d=a+40|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(d|0));b[e+8>>1]=1;c[e+32>>2]=c[(c[f>>2]|0)+32>>2];c[i>>2]=e;c[i+8>>2]=c[f>>2];c[i+4>>2]=c[g>>2];qb[c[(c[g>>2]|0)+16>>2]&255](i);if((c[(c[f>>2]|0)+24>>2]|0)>0)Hd(c[(c[f>>2]|0)+32>>2]|0,c[(c[f>>2]|0)+20>>2]|0);a=c[f>>2]|0;d=a+40|0;do{c[a>>2]=c[e>>2];a=a+4|0;e=e+4|0}while((a|0)<(d|0));c[h>>2]=c[i+20>>2];i=c[h>>2]|0;l=j;return i|0}function Ih(a){a=a|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=c[c[d>>2]>>2];while(1){if(!(c[e>>2]|0))break;c[f>>2]=c[c[e>>2]>>2];Hd(c[(c[d>>2]|0)+4>>2]|0,c[e>>2]|0);c[e>>2]=c[f>>2]}c[c[d>>2]>>2]=0;b[(c[d>>2]|0)+24>>1]=0;c[(c[d>>2]|0)+8>>2]=0;c[(c[d>>2]|0)+12>>2]=0;c[(c[d>>2]|0)+20>>2]=0;b[(c[d>>2]|0)+26>>1]=1;l=g;return}function Jh(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;r=u+28|0;s=u+24|0;m=u+20|0;v=u+16|0;t=u+34|0;n=u+12|0;o=u+8|0;p=u+4|0;q=u+32|0;k=u;c[s>>2]=f;c[m>>2]=g;c[v>>2]=h;a[t>>0]=i;c[n>>2]=j;c[o>>2]=c[v>>2];b[q>>1]=0;f=c[s>>2]|0;if(!(c[m>>2]|0)){Fh(f);c[r>>2]=0;v=c[r>>2]|0;l=u;return v|0}if(c[f+32>>2]|0)c[p>>2]=c[(c[(c[s>>2]|0)+32>>2]|0)+96>>2];else c[p>>2]=1e9;b[q>>1]=(d[t>>0]|0)==0?16:2;if((c[o>>2]|0)<0){a:do if((d[t>>0]|0)==1){c[o>>2]=_c(c[m>>2]|0)|0;if((c[o>>2]|0)>(c[p>>2]|0))c[o>>2]=(c[p>>2]|0)+1}else{c[o>>2]=0;while(1){if((c[o>>2]|0)>(c[p>>2]|0))break a;if(!(a[(c[m>>2]|0)+(c[o>>2]|0)>>0]|a[(c[m>>2]|0)+((c[o>>2]|0)+1)>>0]))break a;c[o>>2]=(c[o>>2]|0)+2}}while(0);b[q>>1]=e[q>>1]|512}do if((c[n>>2]|0)!=(-1|0)){v=(c[n>>2]|0)==169;Lh(c[s>>2]|0);f=c[m>>2]|0;c[(c[s>>2]|0)+16>>2]=f;if(v){c[(c[s>>2]|0)+20>>2]=f;v=Md(c[(c[s>>2]|0)+32>>2]|0,c[(c[s>>2]|0)+20>>2]|0)|0;c[(c[s>>2]|0)+24>>2]=v;break}else{c[(c[s>>2]|0)+36>>2]=c[n>>2];b[q>>1]=e[q>>1]|((c[n>>2]|0)==0?2048:1024);break}}else{c[k>>2]=c[o>>2];if(e[q>>1]&512|0)c[k>>2]=(c[k>>2]|0)+((d[t>>0]|0)==1?1:2);if((c[o>>2]|0)>(c[p>>2]|0)){c[r>>2]=18;v=c[r>>2]|0;l=u;return v|0}if(!(Kh(c[s>>2]|0,(c[k>>2]|0)>32?c[k>>2]|0:32)|0)){MR(c[(c[s>>2]|0)+16>>2]|0,c[m>>2]|0,c[k>>2]|0)|0;break}c[r>>2]=7;v=c[r>>2]|0;l=u;return v|0}while(0);c[(c[s>>2]|0)+12>>2]=c[o>>2];b[(c[s>>2]|0)+8>>1]=b[q>>1]|0;a[(c[s>>2]|0)+10>>0]=(d[t>>0]|0)==0?1:d[t>>0]|0;if((d[(c[s>>2]|0)+10>>0]|0)!=1?Mh(c[s>>2]|0)|0:0){c[r>>2]=7;v=c[r>>2]|0;l=u;return v|0}if((c[o>>2]|0)>(c[p>>2]|0)){c[r>>2]=18;v=c[r>>2]|0;l=u;return v|0}else{c[r>>2]=0;v=c[r>>2]|0;l=u;return v|0}return 0}function Kh(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[g>>2]=a;c[h>>2]=d;a=c[g>>2]|0;if((c[(c[g>>2]|0)+24>>2]|0)<(c[h>>2]|0)){c[f>>2]=Ph(a,c[h>>2]|0,0)|0;h=c[f>>2]|0;l=i;return h|0}else{c[(c[g>>2]|0)+16>>2]=c[a+20>>2];h=(c[g>>2]|0)+8|0;b[h>>1]=(e[h>>1]|0)&13;c[f>>2]=0;h=c[f>>2]|0;l=i;return h|0}return 0}function Lh(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(((e[(c[b>>2]|0)+8>>1]|0)&9312|0)==0?(c[(c[b>>2]|0)+24>>2]|0)==0:0){l=d;return}Rh(c[b>>2]|0);l=d;return}function Mh(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;g=m+4|0;h=m;i=m+10|0;j=m+9|0;k=m+8|0;c[g>>2]=f;c[h>>2]=0;a[i>>0]=0;if((c[(c[g>>2]|0)+12>>2]|0)>1){a[j>>0]=a[c[(c[g>>2]|0)+16>>2]>>0]|0;a[k>>0]=a[(c[(c[g>>2]|0)+16>>2]|0)+1>>0]|0;if((d[j>>0]|0)==254?(d[k>>0]|0)==255:0)a[i>>0]=3;if((d[j>>0]|0)==255?(d[k>>0]|0)==254:0)a[i>>0]=2}if(!(a[i>>0]|0)){k=c[h>>2]|0;l=m;return k|0}c[h>>2]=Nh(c[g>>2]|0)|0;if(c[h>>2]|0){k=c[h>>2]|0;l=m;return k|0}k=(c[g>>2]|0)+12|0;c[k>>2]=(c[k>>2]|0)-2;TR(c[(c[g>>2]|0)+16>>2]|0,(c[(c[g>>2]|0)+16>>2]|0)+2|0,c[(c[g>>2]|0)+12>>2]|0)|0;a[(c[(c[g>>2]|0)+16>>2]|0)+(c[(c[g>>2]|0)+12>>2]|0)>>0]=0;a[(c[(c[g>>2]|0)+16>>2]|0)+((c[(c[g>>2]|0)+12>>2]|0)+1)>>0]=0;k=(c[g>>2]|0)+8|0;b[k>>1]=e[k>>1]|512;a[(c[g>>2]|0)+10>>0]=a[i>>0]|0;k=c[h>>2]|0;l=m;return k|0}function Nh(d){d=d|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[g>>2]=d;do if((e[(c[g>>2]|0)+8>>1]|0)&18|0){if((e[(c[g>>2]|0)+8>>1]|0)&16384|0?Oh(c[g>>2]|0)|0:0){c[f>>2]=7;g=c[f>>2]|0;l=h;return g|0}if(c[(c[g>>2]|0)+24>>2]|0?(c[(c[g>>2]|0)+16>>2]|0)==(c[(c[g>>2]|0)+20>>2]|0):0)break;if(!(Ph(c[g>>2]|0,(c[(c[g>>2]|0)+12>>2]|0)+2|0,1)|0)){a[(c[(c[g>>2]|0)+16>>2]|0)+(c[(c[g>>2]|0)+12>>2]|0)>>0]=0;a[(c[(c[g>>2]|0)+16>>2]|0)+((c[(c[g>>2]|0)+12>>2]|0)+1)>>0]=0;d=(c[g>>2]|0)+8|0;b[d>>1]=e[d>>1]|0|512;break}c[f>>2]=7;g=c[f>>2]|0;l=h;return g|0}while(0);g=(c[g>>2]|0)+8|0;b[g>>1]=(e[g>>1]|0)&-4097;c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}function Oh(a){a=a|0;var d=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+8|0;f=g+4|0;h=g;c[f>>2]=a;a=(c[(c[f>>2]|0)+12>>2]|0)+(c[c[f>>2]>>2]|0)|0;c[h>>2]=a;c[h>>2]=(c[h>>2]|0)<=0?1:a;if(Ph(c[f>>2]|0,c[h>>2]|0,1)|0){c[d>>2]=7;h=c[d>>2]|0;l=g;return h|0}else{GR((c[(c[f>>2]|0)+16>>2]|0)+(c[(c[f>>2]|0)+12>>2]|0)|0,0,c[c[f>>2]>>2]|0)|0;h=(c[f>>2]|0)+12|0;c[h>>2]=(c[h>>2]|0)+(c[c[f>>2]>>2]|0);h=(c[f>>2]|0)+8|0;b[h>>1]=(e[h>>1]|0)&-16897;c[d>>2]=0;h=c[d>>2]|0;l=g;return h|0}return 0}function Ph(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;h=k+12|0;i=k+8|0;g=k+4|0;j=k;c[i>>2]=a;c[g>>2]=d;c[j>>2]=f;do if((c[(c[i>>2]|0)+24>>2]|0)<(c[g>>2]|0)){if((c[g>>2]|0)<32)c[g>>2]=32;if((c[j>>2]|0?(c[(c[i>>2]|0)+24>>2]|0)>0:0)?(c[(c[i>>2]|0)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[f>>2]|0,c[g>>2]|0,c[e>>2]|0,c[e+4>>2]|0)|0;if(c[h>>2]|0){j=c[h>>2]|0;l=i;return j|0}Hd(c[f>>2]|0,c[g>>2]|0);j=c[h>>2]|0;l=i;return j|0}function Rh(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if((e[(c[b>>2]|0)+8>>1]|0)&9312|0)Gh(c[b>>2]|0);if(!(c[(c[b>>2]|0)+24>>2]|0)){b=c[b>>2]|0;b=b+16|0;c[b>>2]=0;l=d;return}Hd(c[(c[b>>2]|0)+32>>2]|0,c[(c[b>>2]|0)+20>>2]|0);c[(c[b>>2]|0)+24>>2]=0;b=c[b>>2]|0;b=b+16|0;c[b>>2]=0;l=d;return}function Sh(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+8|0;g=k+4|0;h=k+12|0;j=k;c[g>>2]=b;a[h>>0]=f;c[j>>2]=c[g>>2];if((e[(c[j>>2]|0)+8>>1]|0)&2|0?(d[(c[g>>2]|0)+10>>0]|0|0)==(d[h>>0]|0|0):0){c[i>>2]=c[(c[j>>2]|0)+12>>2];j=c[i>>2]|0;l=k;return j|0}f=e[(c[j>>2]|0)+8>>1]|0;if((e[(c[j>>2]|0)+8>>1]|0)&16|0){b=c[(c[j>>2]|0)+12>>2]|0;if(f&16384|0){c[i>>2]=b+(c[c[j>>2]>>2]|0);j=c[i>>2]|0;l=k;return j|0}else{c[i>>2]=b;j=c[i>>2]|0;l=k;return j|0}}else if(f&1|0){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else{c[i>>2]=Th(c[g>>2]|0,a[h>>0]|0)|0;j=c[i>>2]|0;l=k;return j|0}return 0}function Th(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+16|0;e=f;g=f+4|0;c[e>>2]=b;a[g>>0]=d;if(!(Uh(c[e>>2]|0,a[g>>0]|0)|0)){g=0;l=f;return g|0}g=c[(c[e>>2]|0)+12>>2]|0;l=f;return g|0}function Uh(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0;k=l;l=l+16|0;h=k+4|0;i=k;j=k+8|0;c[i>>2]=f;a[j>>0]=g;f=c[i>>2]|0;if((e[(c[i>>2]|0)+8>>1]|0)&18|0){g=f+8|0;b[g>>1]=e[g>>1]|0|2;if((d[(c[i>>2]|0)+10>>0]|0|0)!=((d[j>>0]|0)&-9|0))Vh(c[i>>2]|0,(d[j>>0]|0)&-9)|0;if(((d[j>>0]|0)&8|0?1==(1&c[(c[i>>2]|0)+16>>2]|0):0)?Nh(c[i>>2]|0)|0:0){c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}Wh(c[i>>2]|0)|0}else Xh(f,a[j>>0]|0,0)|0;if((d[(c[i>>2]|0)+10>>0]|0|0)==((d[j>>0]|0)&-9|0)){c[h>>2]=c[(c[i>>2]|0)+16>>2];j=c[h>>2]|0;l=k;return j|0}else{c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}return 0}function Vh(a,b){a=a|0;b=b|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[h>>2]=b;if((e[(c[g>>2]|0)+8>>1]|0)&2|0?(d[(c[g>>2]|0)+10>>0]|0|0)!=(c[h>>2]|0):0){c[i>>2]=Zh(c[g>>2]|0,c[h>>2]&255)|0;c[f>>2]=c[i>>2];i=c[f>>2]|0;l=j;return i|0}c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}function Wh(a){a=a|0;var b=0,d=0,f=0;f=l;l=l+16|0;b=f+4|0;d=f;c[d>>2]=a;if(((e[(c[d>>2]|0)+8>>1]|0)&514|0)!=2){c[b>>2]=0;d=c[b>>2]|0;l=f;return d|0}else{c[b>>2]=Yh(c[d>>2]|0)|0;d=c[b>>2]|0;l=f;return d|0}return 0}function Xh(f,g,i){f=f|0;g=g|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0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0;j=v+32|0;r=v+28|0;s=v+24|0;t=v+20|0;u=v+16|0;n=v+12|0;h=v+44|0;i=v+8|0;k=v+4|0;m=v;c[p>>2]=f;a[q>>0]=g;if((d[(c[p>>2]|0)+10>>0]|0|0)!=1?(d[q>>0]|0|0)!=1:0){c[i>>2]=Nh(c[p>>2]|0)|0;if(c[i>>2]|0){c[o>>2]=7;u=c[o>>2]|0;l=v;return u|0}c[s>>2]=c[(c[p>>2]|0)+16>>2];c[t>>2]=(c[s>>2]|0)+(c[(c[p>>2]|0)+12>>2]&-2);while(1){if((c[s>>2]|0)>>>0>=(c[t>>2]|0)>>>0)break;a[h>>0]=a[c[s>>2]>>0]|0;a[c[s>>2]>>0]=a[(c[s>>2]|0)+1>>0]|0;c[s>>2]=(c[s>>2]|0)+1;r=a[h>>0]|0;u=c[s>>2]|0;c[s>>2]=u+1;a[u>>0]=r}a[(c[p>>2]|0)+10>>0]=a[q>>0]|0}else{f=(c[p>>2]|0)+12|0;g=c[f>>2]|0;if((d[q>>0]|0|0)==1){c[f>>2]=g&-2;c[j>>2]=(c[(c[p>>2]|0)+12>>2]<<1)+1}else c[j>>2]=(g<<1)+2;c[s>>2]=c[(c[p>>2]|0)+16>>2];c[t>>2]=(c[s>>2]|0)+(c[(c[p>>2]|0)+12>>2]|0);j=c[j>>2]|0;c[r>>2]=md(c[(c[p>>2]|0)+32>>2]|0,j,((j|0)<0)<<31>>31)|0;if(!(c[r>>2]|0)){c[o>>2]=7;u=c[o>>2]|0;l=v;return u|0}c[u>>2]=c[r>>2];if((d[(c[p>>2]|0)+10>>0]|0|0)==1){a:do if((d[q>>0]|0|0)==2)while(1){if((c[s>>2]|0)>>>0>=(c[t>>2]|0)>>>0)break a;m=c[s>>2]|0;c[s>>2]=m+1;c[n>>2]=d[m>>0];do if((c[n>>2]|0)>>>0>=192){c[n>>2]=d[19017+((c[n>>2]|0)-192)>>0];while(1){if((c[s>>2]|0)!=(c[t>>2]|0))g=((d[c[s>>2]>>0]|0)&192|0)==128;else g=0;f=c[n>>2]|0;if(!g)break;m=c[s>>2]|0;c[s>>2]=m+1;c[n>>2]=(f<<6)+(63&(d[m>>0]|0))}if((f>>>0>=128?(c[n>>2]&-2048|0)!=55296:0)?(c[n>>2]&-2|0)!=65534:0)break;c[n>>2]=65533}while(0);f=c[n>>2]|0;if((c[n>>2]|0)>>>0<=65535){k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=f;k=(c[n>>2]|0)>>>8&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=k;continue}else{m=(f>>>10&63)+(((c[n>>2]|0)-65536|0)>>>10&192)&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=m;k=216+(((c[n>>2]|0)-65536|0)>>>18&3)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=k;m=c[n>>2]&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=m;k=220+((c[n>>2]|0)>>>8&3)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=k;continue}}else while(1){if((c[s>>2]|0)>>>0>=(c[t>>2]|0)>>>0)break a;m=c[s>>2]|0;c[s>>2]=m+1;c[n>>2]=d[m>>0];do if((c[n>>2]|0)>>>0>=192){c[n>>2]=d[19017+((c[n>>2]|0)-192)>>0];while(1){if((c[s>>2]|0)!=(c[t>>2]|0))g=((d[c[s>>2]>>0]|0)&192|0)==128;else g=0;f=c[n>>2]|0;if(!g)break;m=c[s>>2]|0;c[s>>2]=m+1;c[n>>2]=(f<<6)+(63&(d[m>>0]|0))}if((f>>>0>=128?(c[n>>2]&-2048|0)!=55296:0)?(c[n>>2]&-2|0)!=65534:0)break;c[n>>2]=65533}while(0);f=c[n>>2]|0;if((c[n>>2]|0)>>>0<=65535){k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=f>>>8;k=c[n>>2]&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=k;continue}else{k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=216+((f-65536|0)>>>18&3);k=((c[n>>2]|0)>>>10&63)+(((c[n>>2]|0)-65536|0)>>>10&192)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=k;m=220+((c[n>>2]|0)>>>8&3)&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=m;k=c[n>>2]&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=k;continue}}while(0);c[(c[p>>2]|0)+12>>2]=(c[u>>2]|0)-(c[r>>2]|0);t=c[u>>2]|0;c[u>>2]=t+1;a[t>>0]=0}else{b:do if((d[(c[p>>2]|0)+10>>0]|0|0)==2)while(1){if((c[s>>2]|0)>>>0>=(c[t>>2]|0)>>>0)break b;m=c[s>>2]|0;c[s>>2]=m+1;c[n>>2]=d[m>>0];m=c[s>>2]|0;c[s>>2]=m+1;c[n>>2]=(c[n>>2]|0)+((d[m>>0]|0)<<8);if((c[n>>2]|0)>>>0>=55296&(c[n>>2]|0)>>>0<57344?(c[s>>2]|0)>>>0<(c[t>>2]|0)>>>0:0){m=c[s>>2]|0;c[s>>2]=m+1;c[k>>2]=d[m>>0];m=c[s>>2]|0;c[s>>2]=m+1;c[k>>2]=(c[k>>2]|0)+((d[m>>0]|0)<<8);c[n>>2]=(c[k>>2]&1023)+((c[n>>2]&63)<<10)+((c[n>>2]&960)+64<<10)}f=c[n>>2]|0;if((c[n>>2]|0)>>>0<128){m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=f;continue}g=c[n>>2]|0;if(f>>>0<2048){j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=192+(g>>>6&31);j=128+(c[n>>2]&63)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=j;continue}f=c[n>>2]|0;if(g>>>0<65536){m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=224+(f>>>12&15);m=128+((c[n>>2]|0)>>>6&63)&255;j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=m;j=128+(c[n>>2]&63)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=j;continue}else{j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=240+(f>>>18&7);j=128+((c[n>>2]|0)>>>12&63)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=j;m=128+((c[n>>2]|0)>>>6&63)&255;j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=m;j=128+(c[n>>2]&63)&255;m=c[u>>2]|0;c[u>>2]=m+1;a[m>>0]=j;continue}}else while(1){if((c[s>>2]|0)>>>0>=(c[t>>2]|0)>>>0)break b;k=c[s>>2]|0;c[s>>2]=k+1;c[n>>2]=(d[k>>0]|0)<<8;k=c[s>>2]|0;c[s>>2]=k+1;c[n>>2]=(c[n>>2]|0)+(d[k>>0]|0);if((c[n>>2]|0)>>>0>=55296&(c[n>>2]|0)>>>0<57344?(c[s>>2]|0)>>>0<(c[t>>2]|0)>>>0:0){k=c[s>>2]|0;c[s>>2]=k+1;c[m>>2]=(d[k>>0]|0)<<8;k=c[s>>2]|0;c[s>>2]=k+1;c[m>>2]=(c[m>>2]|0)+(d[k>>0]|0);c[n>>2]=(c[m>>2]&1023)+((c[n>>2]&63)<<10)+((c[n>>2]&960)+64<<10)}f=c[n>>2]|0;if((c[n>>2]|0)>>>0<128){k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=f;continue}g=c[n>>2]|0;if(f>>>0<2048){j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=192+(g>>>6&31);j=128+(c[n>>2]&63)&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=j;continue}f=c[n>>2]|0;if(g>>>0<65536){k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=224+(f>>>12&15);k=128+((c[n>>2]|0)>>>6&63)&255;j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=k;j=128+(c[n>>2]&63)&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=j;continue}else{j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=240+(f>>>18&7);j=128+((c[n>>2]|0)>>>12&63)&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=j;k=128+((c[n>>2]|0)>>>6&63)&255;j=c[u>>2]|0;c[u>>2]=j+1;a[j>>0]=k;j=128+(c[n>>2]&63)&255;k=c[u>>2]|0;c[u>>2]=k+1;a[k>>0]=j;continue}}while(0);c[(c[p>>2]|0)+12>>2]=(c[u>>2]|0)-(c[r>>2]|0)}a[c[u>>2]>>0]=0;c[n>>2]=e[(c[p>>2]|0)+8>>1];Lh(c[p>>2]|0);b[(c[p>>2]|0)+8>>1]=514|c[n>>2]&32799;a[(c[p>>2]|0)+10>>0]=a[q>>0]|0;c[(c[p>>2]|0)+16>>2]=c[r>>2];c[(c[p>>2]|0)+20>>2]=c[(c[p>>2]|0)+16>>2];u=Md(c[(c[p>>2]|0)+32>>2]|0,c[(c[p>>2]|0)+16>>2]|0)|0;c[(c[p>>2]|0)+24>>2]=u}c[o>>2]=0;u=c[o>>2]|0;l=v;return u|0}function _h(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+4|0;h=j;i=j+8|0;c[h>>2]=b;a[i>>0]=f;do if(c[h>>2]|0){if(((e[(c[h>>2]|0)+8>>1]|0)&514|0)==514?(d[(c[h>>2]|0)+10>>0]|0|0)==(d[i>>0]|0|0):0){c[g>>2]=c[(c[h>>2]|0)+16>>2];break}if((e[(c[h>>2]|0)+8>>1]|0)&1|0){c[g>>2]=0;break}else{c[g>>2]=Uh(c[h>>2]|0,a[i>>0]|0)|0;break}}else c[g>>2]=0;while(0);l=j;return c[g>>2]|0}function $h(a,b){a=a|0;b=b|0;var d=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+8|0;h=g+4|0;f=g;c[h>>2]=a;c[f>>2]=b;a=c[h>>2]|0;if(!((e[(c[(c[h>>2]|0)+8>>2]|0)+8>>1]|0)&8192)){c[d>>2]=ei(a,c[f>>2]|0)|0;h=c[d>>2]|0;l=g;return h|0}else{c[d>>2]=c[(c[a+8>>2]|0)+16>>2];h=c[d>>2]|0;l=g;return h|0}return 0}function ai(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;c[(c[e>>2]|0)+20>>2]=18;a[(c[e>>2]|0)+25>>0]=1;Jh(c[c[e>>2]>>2]|0,19093,-1,1,0)|0;l=d;return}function bi(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;Fh(c[c[e>>2]>>2]|0);c[(c[e>>2]|0)+20>>2]=7;a[(c[e>>2]|0)+25>>0]=1;yd(c[(c[c[e>>2]>>2]|0)+32>>2]|0);l=d;return}function ci(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;di(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,1,c[g>>2]|0);l=f;return}function di(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;i=l;l=l+32|0;h=i+12|0;n=i+8|0;m=i+4|0;k=i+16|0;j=i;c[h>>2]=b;c[n>>2]=d;c[m>>2]=e;a[k>>0]=f;c[j>>2]=g;if((Jh(c[c[h>>2]>>2]|0,c[n>>2]|0,c[m>>2]|0,a[k>>0]|0,c[j>>2]|0)|0)!=18){l=i;return}ai(c[h>>2]|0);l=i;return}function ei(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=d;c[g>>2]=c[(c[e>>2]|0)+8>>2];a=c[g>>2]|0;if((c[f>>2]|0)>0){Kh(a,c[f>>2]|0)|0;b[(c[g>>2]|0)+8>>1]=8192;c[c[g>>2]>>2]=c[(c[e>>2]|0)+4>>2];if(c[(c[g>>2]|0)+16>>2]|0)GR(c[(c[g>>2]|0)+16>>2]|0,0,c[f>>2]|0)|0}else{Fh(a);c[(c[g>>2]|0)+16>>2]=0}l=h;return c[(c[g>>2]|0)+16>>2]|0}function fi(a){a=a|0;var b=0,f=0;f=l;l=l+16|0;b=f;c[b>>2]=a;l=f;return d[19118+((e[(c[b>>2]|0)+8>>1]|0)&31)>>0]|0|0}function gi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;d=g;Dh(c[c[f>>2]>>2]|0,c[d>>2]|0,c[d+4>>2]|0);l=e;return}function hi(a,b){a=a|0;b=+b;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+8|0;e=d;c[f>>2]=a;h[e>>3]=b;ii(c[c[f>>2]>>2]|0,+h[e>>3]);l=d;return}function ii(a,d){a=a|0;d=+d;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;f=g;c[e>>2]=a;h[f>>3]=d;Fh(c[e>>2]|0);if(Cd(+h[f>>3])|0){l=g;return}h[c[e>>2]>>3]=+h[f>>3];b[(c[e>>2]|0)+8>>1]=8;l=g;return}function ji(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=fi(c[b>>2]|0)|0;if((c[d>>2]|0)!=3){e=c[d>>2]|0;l=f;return e|0}c[e>>2]=c[b>>2];ti(c[e>>2]|0,0);c[d>>2]=fi(c[b>>2]|0)|0;e=c[d>>2]|0;l=f;return e|0}function ki(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=pi(c[d>>2]|0)|0;l=b;return a|0}function li(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+20|0;f=i+16|0;g=i+8|0;h=i;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;a=c[f>>2]|0;j=c[a+4>>2]|0;d=h;c[d>>2]=c[a>>2];c[d+4>>2]=j;d=g;j=c[d+4>>2]|0;a=h;b=c[a+4>>2]|0;if((j|0)>0|(j|0)==0&(c[d>>2]|0)>>>0>=0){if((b|0)>0|(b|0)==0&(c[a>>2]|0)>>>0>0?(h,h=FR(-1,2147483647,c[h>>2]|0,c[h+4>>2]|0)|0,b=z,j=g,d=c[j+4>>2]|0,(b|0)<(d|0)|((b|0)==(d|0)?h>>>0<(c[j>>2]|0)>>>0:0)):0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}}else if((b|0)<0?(h,h=IR(c[h>>2]|0,c[h+4>>2]|0,-1,2147483647)|0,h=FR(0,0,h|0,z|0)|0,b=z,j=g,j=IR(c[j>>2]|0,c[j+4>>2]|0,1,0)|0,d=z,(b|0)>(d|0)|(b|0)==(d|0)&h>>>0>j>>>0):0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}h=g;j=c[f>>2]|0;g=j;h=IR(c[g>>2]|0,c[g+4>>2]|0,c[h>>2]|0,c[h+4>>2]|0)|0;c[j>>2]=h;c[j+4>>2]=z;c[e>>2]=0;j=c[e>>2]|0;l=i;return j|0}function mi(a){a=a|0;var b=0.0,d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;b=+ni(c[e>>2]|0);l=d;return +b}function ni(b){b=b|0;var d=0,f=0,g=0,i=0,j=0,k=0.0;j=l;l=l+32|0;f=j+8|0;g=j+16|0;i=j;c[g>>2]=b;b=c[g>>2]|0;if((e[(c[g>>2]|0)+8>>1]|0)&8|0){h[f>>3]=+h[b>>3];k=+h[f>>3];l=j;return +k}d=c[g>>2]|0;if((e[b+8>>1]|0)&4|0){i=d;h[f>>3]=+((c[i>>2]|0)>>>0)+4294967296.0*+(c[i+4>>2]|0);k=+h[f>>3];l=j;return +k}if((e[d+8>>1]|0)&18|0){h[i>>3]=0.0;oi(c[(c[g>>2]|0)+16>>2]|0,i,c[(c[g>>2]|0)+12>>2]|0,a[(c[g>>2]|0)+10>>0]|0)|0;h[f>>3]=+h[i>>3];k=+h[f>>3];l=j;return +k}else{h[f>>3]=0.0;k=+h[f>>3];l=j;return +k}return 0.0}function oi(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var i=0.0,j=0.0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l;l=l+96|0;F=G+76|0;D=G+72|0;E=G+68|0;m=G+64|0;n=G+80|0;q=G+60|0;w=G+56|0;r=G+52|0;s=G+16|0;p=G+48|0;x=G+44|0;u=G+40|0;y=G+36|0;A=G+8|0;B=G+32|0;C=G+28|0;k=G+24|0;v=G;c[D>>2]=b;c[E>>2]=e;c[m>>2]=f;a[n>>0]=g;c[w>>2]=(c[D>>2]|0)+(c[m>>2]|0);c[r>>2]=1;g=s;c[g>>2]=0;c[g+4>>2]=0;c[p>>2]=0;c[x>>2]=1;c[u>>2]=0;c[y>>2]=1;c[B>>2]=0;c[C>>2]=0;h[c[E>>2]>>3]=0.0;if((d[n>>0]|0)==1)c[q>>2]=1;else{c[q>>2]=2;c[k>>2]=3-(d[n>>0]|0);while(1){if((c[k>>2]|0)>=(c[m>>2]|0))break;if(a[(c[D>>2]|0)+(c[k>>2]|0)>>0]|0)break;c[k>>2]=(c[k>>2]|0)+2}c[C>>2]=(c[k>>2]|0)<(c[m>>2]|0)&1;c[w>>2]=(c[D>>2]|0)+(c[k>>2]^1);c[D>>2]=(c[D>>2]|0)+(d[n>>0]&1)}while(1){if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break;if(!(d[16965+(d[c[D>>2]>>0]|0)>>0]&1))break;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0)}if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0){c[F>>2]=0;F=c[F>>2]|0;l=G;return F|0}if((a[c[D>>2]>>0]|0)!=45){if((a[c[D>>2]>>0]|0)==43)c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0)}else{c[r>>2]=-1;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0)}while(1){if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break;n=s;m=c[n+4>>2]|0;if(!((d[16965+(d[c[D>>2]>>0]|0)>>0]&4|0)!=0&((m|0)<214748364|(m|0)==214748364&(c[n>>2]|0)>>>0<3435973835)))break;n=s;n=RR(c[n>>2]|0,c[n+4>>2]|0,10,0)|0;m=(a[c[D>>2]>>0]|0)-48|0;m=IR(n|0,z|0,m|0,((m|0)<0)<<31>>31|0)|0;n=s;c[n>>2]=m;c[n+4>>2]=z;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0);c[B>>2]=(c[B>>2]|0)+1}while(1){if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break;if(!(d[16965+(d[c[D>>2]>>0]|0)>>0]&4))break;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0);c[B>>2]=(c[B>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+1}a:do if((c[D>>2]|0)>>>0<(c[w>>2]|0)>>>0){b:do if((a[c[D>>2]>>0]|0)==46){c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0);while(1){if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break b;if(!(d[16965+(d[c[D>>2]>>0]|0)>>0]&4))break b;n=s;m=c[n+4>>2]|0;if((m|0)<214748364|(m|0)==214748364&(c[n>>2]|0)>>>0<3435973835){n=s;n=RR(c[n>>2]|0,c[n+4>>2]|0,10,0)|0;m=(a[c[D>>2]>>0]|0)-48|0;m=IR(n|0,z|0,m|0,((m|0)<0)<<31>>31|0)|0;n=s;c[n>>2]=m;c[n+4>>2]=z;c[p>>2]=(c[p>>2]|0)+-1}c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0);c[B>>2]=(c[B>>2]|0)+1}}while(0);if((c[D>>2]|0)>>>0<(c[w>>2]|0)>>>0){if(!((a[c[D>>2]>>0]|0)!=101?(a[c[D>>2]>>0]|0)!=69:0))o=34;c:do if((o|0)==34){c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0);c[y>>2]=0;if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break a;if((a[c[D>>2]>>0]|0)!=45){if((a[c[D>>2]>>0]|0)==43)c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0)}else{c[x>>2]=-1;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0)}while(1){if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break c;if(!(d[16965+(d[c[D>>2]>>0]|0)>>0]&4))break c;if((c[u>>2]|0)<1e4)b=((c[u>>2]|0)*10|0)+((a[c[D>>2]>>0]|0)-48)|0;else b=1e4;c[u>>2]=b;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0);c[y>>2]=1}}while(0);while(1){if((c[D>>2]|0)>>>0>=(c[w>>2]|0)>>>0)break a;if(!(d[16965+(d[c[D>>2]>>0]|0)>>0]&1))break a;c[D>>2]=(c[D>>2]|0)+(c[q>>2]|0)}}}while(0);q=O(c[u>>2]|0,c[x>>2]|0)|0;c[u>>2]=q+(c[p>>2]|0);if((c[u>>2]|0)<0){c[x>>2]=-1;c[u>>2]=O(c[u>>2]|0,-1)|0}else c[x>>2]=1;q=s;do if(!((c[q>>2]|0)==0&(c[q+4>>2]|0)==0)){while(1){if((c[u>>2]|0)<=0)break;e=s;b=c[e>>2]|0;e=c[e+4>>2]|0;if((c[x>>2]|0)>0){if((e|0)>214748364|(e|0)==214748364&b>>>0>=3435973836)break;p=s;p=RR(c[p>>2]|0,c[p+4>>2]|0,10,0)|0;q=s;c[q>>2]=p;c[q+4>>2]=z}else{q=VR(b|0,e|0,10,0)|0;if((q|0)!=0|(z|0)!=0)break;p=s;p=LR(c[p>>2]|0,c[p+4>>2]|0,10,0)|0;q=s;c[q>>2]=p;c[q+4>>2]=z}c[u>>2]=(c[u>>2]|0)+-1}p=(c[r>>2]|0)<0;q=s;o=c[q>>2]|0;q=c[q+4>>2]|0;n=FR(0,0,o|0,q|0)|0;r=s;c[r>>2]=p?n:o;c[r+4>>2]=p?z:q;if(!(c[u>>2]|0)){x=s;h[A>>3]=+((c[x>>2]|0)>>>0)+4294967296.0*+(c[x+4>>2]|0);break}h[v>>3]=1.0;if((c[u>>2]|0)<=307){while(1){if(!((c[u>>2]|0)%22|0))break;h[v>>3]=+h[v>>3]*10.0;c[u>>2]=(c[u>>2]|0)-1}while(1){if((c[u>>2]|0)<=0)break;h[v>>3]=+h[v>>3]*1.0e22;c[u>>2]=(c[u>>2]|0)-22}u=s;j=+((c[u>>2]|0)>>>0)+4294967296.0*+(c[u+4>>2]|0);i=+h[v>>3];if((c[x>>2]|0)<0){h[A>>3]=j/i;break}else{h[A>>3]=j*i;break}}if((c[u>>2]|0)>=342){v=s;i=+((c[v>>2]|0)>>>0)+4294967296.0*+(c[v+4>>2]|0);if((c[x>>2]|0)<0){h[A>>3]=0.0*i;break}else{h[A>>3]=t*i;break}}while(1){if(!((c[u>>2]|0)%308|0))break;h[v>>3]=+h[v>>3]*10.0;c[u>>2]=(c[u>>2]|0)-1}u=s;j=+((c[u>>2]|0)>>>0)+4294967296.0*+(c[u+4>>2]|0);i=+h[v>>3];if((c[x>>2]|0)<0){h[A>>3]=j/i;h[A>>3]=+h[A>>3]/1.e+308;break}else{h[A>>3]=j*i;h[A>>3]=+h[A>>3]*1.e+308;break}}else h[A>>3]=(c[r>>2]|0)<0?-0.0:0.0;while(0);h[c[E>>2]>>3]=+h[A>>3];if(((c[B>>2]|0)>0?(c[D>>2]|0)==(c[w>>2]|0):0)&(c[y>>2]|0)!=0)b=(c[C>>2]|0)==0;else b=0;c[F>>2]=b&1;F=c[F>>2]|0;l=G;return F|0}function pi(b){b=b|0;var d=0,f=0,g=0,i=0,j=0;j=l;l=l+32|0;d=j+8|0;f=j+20|0;g=j+16|0;i=j;c[f>>2]=b;c[g>>2]=e[(c[f>>2]|0)+8>>1];do if(!(c[g>>2]&4|0)){if(c[g>>2]&8|0){g=qi(+h[c[f>>2]>>3])|0;i=d;c[i>>2]=g;c[i+4>>2]=z;break}if(c[g>>2]&18|0){g=i;c[g>>2]=0;c[g+4>>2]=0;ri(c[(c[f>>2]|0)+16>>2]|0,i,c[(c[f>>2]|0)+12>>2]|0,a[(c[f>>2]|0)+10>>0]|0)|0;f=i;g=c[f+4>>2]|0;i=d;c[i>>2]=c[f>>2];c[i+4>>2]=g;break}else{i=d;c[i>>2]=0;c[i+4>>2]=0;break}}else{f=c[f>>2]|0;g=c[f+4>>2]|0;i=d;c[i>>2]=c[f>>2];c[i+4>>2]=g}while(0);i=d;z=c[i+4>>2]|0;l=j;return c[i>>2]|0}function qi(a){a=+a;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e+8|0;d=e;h[d>>3]=a;do if(!(+h[d>>3]<=-9223372036854775808.0))if(+h[d>>3]>=9223372036854775808.0){d=b;c[d>>2]=-1;c[d+4>>2]=2147483647;break}else{a=+h[d>>3];f=+B(a)>=1.0?(a>0.0?~~+P(+A(a/4294967296.0),4294967295.0)>>>0:~~+N((a-+(~~a>>>0))/4294967296.0)>>>0):0;d=b;c[d>>2]=~~a>>>0;c[d+4>>2]=f;break}else{f=b;c[f>>2]=0;c[f+4>>2]=-2147483648}while(0);f=b;z=c[f+4>>2]|0;l=e;return c[f>>2]|0}function ri(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;r=v+48|0;s=v+44|0;t=v+40|0;h=v+36|0;i=v+52|0;u=v+32|0;j=v;k=v+28|0;m=v+24|0;n=v+20|0;o=v+16|0;p=v+12|0;q=v+8|0;c[s>>2]=b;c[t>>2]=e;c[h>>2]=f;a[i>>0]=g;g=j;c[g>>2]=0;c[g+4>>2]=0;c[k>>2]=0;c[n>>2]=0;c[o>>2]=0;c[q>>2]=(c[s>>2]|0)+(c[h>>2]|0);if((d[i>>0]|0)==1)c[u>>2]=1;else{c[u>>2]=2;c[m>>2]=3-(d[i>>0]|0);while(1){if((c[m>>2]|0)>=(c[h>>2]|0))break;if(a[(c[s>>2]|0)+(c[m>>2]|0)>>0]|0)break;c[m>>2]=(c[m>>2]|0)+2}c[o>>2]=(c[m>>2]|0)<(c[h>>2]|0)&1;c[q>>2]=(c[s>>2]|0)+(c[m>>2]^1);c[s>>2]=(c[s>>2]|0)+(d[i>>0]&1)}while(1){if((c[s>>2]|0)>>>0>=(c[q>>2]|0)>>>0)break;if(!(d[16965+(d[c[s>>2]>>0]|0)>>0]&1))break;c[s>>2]=(c[s>>2]|0)+(c[u>>2]|0)}do if((c[s>>2]|0)>>>0<(c[q>>2]|0)>>>0){if((a[c[s>>2]>>0]|0)==45){c[k>>2]=1;c[s>>2]=(c[s>>2]|0)+(c[u>>2]|0);break}if((a[c[s>>2]>>0]|0)==43)c[s>>2]=(c[s>>2]|0)+(c[u>>2]|0)}while(0);c[p>>2]=c[s>>2];while(1){if((c[s>>2]|0)>>>0>=(c[q>>2]|0)>>>0)break;if((a[c[s>>2]>>0]|0)!=48)break;c[s>>2]=(c[s>>2]|0)+(c[u>>2]|0)}c[m>>2]=0;while(1){if(((c[s>>2]|0)+(c[m>>2]|0)|0)>>>0<(c[q>>2]|0)>>>0?(i=a[(c[s>>2]|0)+(c[m>>2]|0)>>0]|0,c[n>>2]=i,(i|0)>=48):0)b=(c[n>>2]|0)<=57;else b=0;f=j;e=c[f>>2]|0;f=c[f+4>>2]|0;if(!b)break;i=RR(e|0,f|0,10,0)|0;h=c[n>>2]|0;h=IR(i|0,z|0,h|0,((h|0)<0)<<31>>31|0)|0;h=FR(h|0,z|0,48,0)|0;i=j;c[i>>2]=h;c[i+4>>2]=z;c[m>>2]=(c[m>>2]|0)+(c[u>>2]|0)}g=(c[k>>2]|0)!=0;do if(!(f>>>0>2147483647|(f|0)==2147483647&e>>>0>4294967295)){e=j;b=c[e>>2]|0;e=c[e+4>>2]|0;if(g){j=FR(0,0,b|0,e|0)|0;t=c[t>>2]|0;c[t>>2]=j;c[t+4>>2]=z;break}else{t=c[t>>2]|0;c[t>>2]=b;c[t+4>>2]=e;break}}else{t=c[t>>2]|0;c[t>>2]=g?0:-1;c[t+4>>2]=g?-2147483648:2147483647}while(0);do if(((c[s>>2]|0)+(c[m>>2]|0)|0)>>>0>=(c[q>>2]|0)>>>0){if((c[m>>2]|0)==0?(c[p>>2]|0)==(c[s>>2]|0):0)break;if(!(c[o>>2]|0?1:(c[m>>2]|0)>((c[u>>2]|0)*19|0))){if((c[m>>2]|0)<((c[u>>2]|0)*19|0)){c[r>>2]=0;u=c[r>>2]|0;l=v;return u|0}c[n>>2]=si(c[s>>2]|0,c[u>>2]|0)|0;if((c[n>>2]|0)<0){c[r>>2]=0;u=c[r>>2]|0;l=v;return u|0}if((c[n>>2]|0)>0){c[r>>2]=1;u=c[r>>2]|0;l=v;return u|0}else{c[r>>2]=c[k>>2]|0?0:2;u=c[r>>2]|0;l=v;return u|0}}}while(0);c[r>>2]=1;u=c[r>>2]|0;l=v;return u|0}function si(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=b;c[f>>2]=d;c[g>>2]=0;c[i>>2]=19167;c[h>>2]=0;while(1){if(!((c[g>>2]|0)==0?(c[h>>2]|0)<18:0))break;d=a[(c[e>>2]|0)+(O(c[h>>2]|0,c[f>>2]|0)|0)>>0]|0;c[g>>2]=(d-(a[(c[i>>2]|0)+(c[h>>2]|0)>>0]|0)|0)*10;c[h>>2]=(c[h>>2]|0)+1}if(c[g>>2]|0){i=c[g>>2]|0;l=j;return i|0}c[g>>2]=(a[(c[e>>2]|0)+((c[f>>2]|0)*18|0)>>0]|0)-56;i=c[g>>2]|0;l=j;return i|0}function ti(d,f){d=d|0;f=f|0;var g=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;i=n+16|0;j=n+8|0;k=n;m=n+24|0;c[g>>2]=d;c[i>>2]=f;a[m>>0]=a[(c[g>>2]|0)+10>>0]|0;if(!(oi(c[(c[g>>2]|0)+16>>2]|0,j,c[(c[g>>2]|0)+12>>2]|0,a[m>>0]|0)|0)){l=n;return}if(!(ri(c[(c[g>>2]|0)+16>>2]|0,k,c[(c[g>>2]|0)+12>>2]|0,a[m>>0]|0)|0)){j=k;k=c[j+4>>2]|0;m=c[g>>2]|0;c[m>>2]=c[j>>2];c[m+4>>2]=k;m=(c[g>>2]|0)+8|0;b[m>>1]=e[m>>1]|0|4;l=n;return}h[c[g>>2]>>3]=+h[j>>3];m=(c[g>>2]|0)+8|0;b[m>>1]=e[m>>1]|0|8;if(!(c[i>>2]|0)){l=n;return}ui(c[g>>2]|0);l=n;return}function ui(a){a=a|0;var d=0,f=0,g=0,i=0,j=0,k=0,m=0;g=l;l=l+16|0;d=g+8|0;f=g;c[d>>2]=a;j=qi(+h[c[d>>2]>>3])|0;m=f;c[m>>2]=j;c[m+4>>2]=z;m=f;j=f;k=c[j+4>>2]|0;a=f;i=c[a+4>>2]|0;if(!(+h[c[d>>2]>>3]==+((c[m>>2]|0)>>>0)+4294967296.0*+(c[m+4>>2]|0)&((k|0)>-2147483648|(k|0)==-2147483648&(c[j>>2]|0)>>>0>0)&((i|0)<2147483647|(i|0)==2147483647&(c[a>>2]|0)>>>0<4294967295))){l=g;return}j=f;k=c[j+4>>2]|0;m=c[d>>2]|0;c[m>>2]=c[j>>2];c[m+4>>2]=k;b[(c[d>>2]|0)+8>>1]=(e[(c[d>>2]|0)+8>>1]|0)&-49664|4;l=g;return}function vi(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=pi(c[d>>2]|0)|0;l=b;return a|0}function wi(a){a=a|0;var d=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;d=h+4|0;f=h;c[d>>2]=a;c[f>>2]=c[d>>2];if(!((e[(c[f>>2]|0)+8>>1]|0)&18)){c[g>>2]=wh(c[d>>2]|0)|0;g=c[g>>2]|0;l=h;return g|0}if((e[(c[f>>2]|0)+8>>1]|0)&16384|0)a=Oh(c[f>>2]|0)|0;else a=0;if(a|0){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}d=(c[f>>2]|0)+8|0;b[d>>1]=e[d>>1]|0|16;if(c[(c[f>>2]|0)+12>>2]|0)a=c[(c[f>>2]|0)+16>>2]|0;else a=0;c[g>>2]=a;g=c[g>>2]|0;l=h;return g|0}function xi(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;k=p+16|0;m=p+12|0;n=p;o=p+8|0;j=p+20|0;c[k>>2]=b;c[m>>2]=e;e=n;c[e>>2]=f;c[e+4>>2]=g;c[o>>2]=h;a[j>>0]=i;if((d[j>>0]|0)==4)a[j>>0]=(a[936]|0)==0?3:2;i=n;h=c[i+4>>2]|0;if(h>>>0>0|(h|0)==0&(c[i>>2]|0)>>>0>2147483647){zi(c[m>>2]|0,c[o>>2]|0,c[k>>2]|0)|0;l=p;return}else{di(c[k>>2]|0,c[m>>2]|0,c[n>>2]|0,a[j>>0]|0,c[o>>2]|0);l=p;return}}function yi(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k+12|0;i=k;j=k+8|0;c[g>>2]=a;c[h>>2]=b;b=i;c[b>>2]=d;c[b+4>>2]=e;c[j>>2]=f;f=i;e=c[f+4>>2]|0;if(e>>>0>0|(e|0)==0&(c[f>>2]|0)>>>0>2147483647){zi(c[h>>2]|0,c[j>>2]|0,c[g>>2]|0)|0;l=k;return}else{di(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0,0,c[j>>2]|0);l=k;return}}function zi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(!((c[f>>2]|0)==0|(c[f>>2]|0)==(-1|0)))qb[c[f>>2]&255](c[e>>2]|0);if(!(c[g>>2]|0)){l=h;return 18}ai(c[g>>2]|0);l=h;return 18}function Ai(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;e=h+16|0;f=h+12|0;g=h;j=h+8|0;c[f>>2]=a;i=g;c[i>>2]=b;c[i+4>>2]=d;c[j>>2]=c[c[f>>2]>>2];b=g;i=c[b+4>>2]|0;d=c[(c[(c[j>>2]|0)+32>>2]|0)+96>>2]|0;a=((d|0)<0)<<31>>31;if(i>>>0>a>>>0|((i|0)==(a|0)?(c[b>>2]|0)>>>0>d>>>0:0)){c[e>>2]=18;j=c[e>>2]|0;l=h;return j|0}else{Di(c[c[f>>2]>>2]|0,c[g>>2]|0);c[e>>2]=0;j=c[e>>2]|0;l=h;return j|0}return 0}function Bi(b,d){b=b|0;d=d|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=d;c[(c[f>>2]|0)+20>>2]=c[g>>2];a[(c[f>>2]|0)+25>>0]=1;if(!((e[(c[c[f>>2]>>2]|0)+8>>1]|0)&1)){l=h;return}f=c[c[f>>2]>>2]|0;Jh(f,Ci(c[g>>2]|0)|0,-1,1,0)|0;l=h;return}function Ci(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=19186;if((c[b>>2]|0)!=516){c[b>>2]=c[b>>2]&255;if((c[b>>2]|0)>=0&(c[b>>2]|0)<27?c[3608+(c[b>>2]<<2)>>2]|0:0)c[d>>2]=c[3608+(c[b>>2]<<2)>>2]}else c[d>>2]=19200;l=e;return c[d>>2]|0}function Di(d,e){d=d|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=d;c[g>>2]=e;Lh(c[f>>2]|0);b[(c[f>>2]|0)+8>>1]=16400;c[(c[f>>2]|0)+12>>2]=0;if((c[g>>2]|0)<0)c[g>>2]=0;c[c[f>>2]>>2]=c[g>>2];a[(c[f>>2]|0)+10>>0]=1;c[(c[f>>2]|0)+16>>2]=0;l=h;return}function Ei(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;Gi(c[c[f>>2]>>2]|0,c[e>>2]|0)|0;l=d;return}function Fi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;e=h+16|0;f=h;g=h+12|0;j=h+8|0;c[e>>2]=a;i=f;c[i>>2]=b;c[i+4>>2]=d;c[j>>2]=uh(c[e>>2]|0)|0;b=f;i=c[b+4>>2]|0;d=c[(c[j>>2]|0)+96>>2]|0;a=((d|0)<0)<<31>>31;if((i|0)>(a|0)|((i|0)==(a|0)?(c[b>>2]|0)>>>0>d>>>0:0)){ai(c[e>>2]|0);c[g>>2]=0;j=c[g>>2]|0;l=h;return j|0}j=f;c[g>>2]=pd(c[j>>2]|0,c[j+4>>2]|0)|0;if(c[g>>2]|0){j=c[g>>2]|0;l=h;return j|0}bi(c[e>>2]|0);j=c[g>>2]|0;l=h;return j|0}function Gi(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=a;c[g>>2]=d;c[h>>2]=0;if((e[(c[f>>2]|0)+8>>1]|0)&9312|0)Gh(c[f>>2]|0);d=c[f>>2]|0;a=c[g>>2]|0;c[d>>2]=c[a>>2];c[d+4>>2]=c[a+4>>2];c[d+8>>2]=c[a+8>>2];c[d+12>>2]=c[a+12>>2];c[d+16>>2]=c[a+16>>2];d=(c[f>>2]|0)+8|0;b[d>>1]=(e[d>>1]|0)&-1025;if(!((e[(c[f>>2]|0)+8>>1]|0)&18)){h=c[h>>2]|0;l=i;return h|0}if((e[(c[g>>2]|0)+8>>1]|0)&2048){h=c[h>>2]|0;l=i;return h|0}g=(c[f>>2]|0)+8|0;b[g>>1]=e[g>>1]|0|4096;c[h>>2]=Nh(c[f>>2]|0)|0;h=c[h>>2]|0;l=i;return h|0}function Hi(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+92>>2]|0}function Ii(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+88>>2]|0}function Ji(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)+32|0;z=c[a+4>>2]|0;l=b;return c[a>>2]|0}function Ki(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=(c[(c[(c[e>>2]|0)+12>>2]|0)+88>>2]|0)+(((c[(c[e>>2]|0)+16>>2]|0)-1|0)*20|0);l=d;return c[(c[b>>2]|0)+16>>2]|0}function Li(a,b,d){a=a|0;b=b|0;d=d|0;var f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;f=o+24|0;g=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o;c[g>>2]=a;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e[(c[g>>2]|0)+8>>1];c[m>>2]=e[(c[i>>2]|0)+8>>1];c[n>>2]=c[k>>2]|c[m>>2];do if(!(c[n>>2]&1|0)){if(!(c[n>>2]&12)){if(c[n>>2]&2|0){if(!(c[k>>2]&2)){c[f>>2]=1;break}if(!(c[m>>2]&2)){c[f>>2]=-1;break}if(c[j>>2]|0){c[f>>2]=Ni(c[g>>2]|0,c[i>>2]|0,c[j>>2]|0,0)|0;break}}c[f>>2]=Oi(c[g>>2]|0,c[i>>2]|0)|0;break}if(c[k>>2]&c[m>>2]&4|0){m=c[g>>2]|0;j=c[m+4>>2]|0;n=c[i>>2]|0;k=c[n+4>>2]|0;if((j|0)<(k|0)|((j|0)==(k|0)?(c[m>>2]|0)>>>0<(c[n>>2]|0)>>>0:0)){c[f>>2]=-1;break}m=c[g>>2]|0;j=c[m+4>>2]|0;n=c[i>>2]|0;k=c[n+4>>2]|0;if((j|0)>(k|0)|((j|0)==(k|0)?(c[m>>2]|0)>>>0>(c[n>>2]|0)>>>0:0)){c[f>>2]=1;break}else{c[f>>2]=0;break}}if(c[k>>2]&c[m>>2]&8|0){if(+h[c[g>>2]>>3]<+h[c[i>>2]>>3]){c[f>>2]=-1;break}if(+h[c[g>>2]>>3]>+h[c[i>>2]>>3]){c[f>>2]=1;break}else{c[f>>2]=0;break}}if(c[k>>2]&4|0)if(c[m>>2]&8|0){n=c[g>>2]|0;c[f>>2]=Mi(c[n>>2]|0,c[n+4>>2]|0,+h[c[i>>2]>>3])|0;break}else{c[f>>2]=-1;break}if(!(c[k>>2]&8)){c[f>>2]=1;break}if(c[m>>2]&4|0){n=c[i>>2]|0;c[f>>2]=0-(Mi(c[n>>2]|0,c[n+4>>2]|0,+h[c[g>>2]>>3])|0);break}else{c[f>>2]=-1;break}}else c[f>>2]=(c[m>>2]&1)-(c[k>>2]&1);while(0);l=o;return c[f>>2]|0}function Mi(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+48|0;e=k+32|0;f=k+24|0;g=k+16|0;i=k+8|0;j=k;m=f;c[m>>2]=a;c[m+4>>2]=b;h[g>>3]=d;if(+h[g>>3]<-9223372036854775808.0){c[e>>2]=1;m=c[e>>2]|0;l=k;return m|0}if(+h[g>>3]>9223372036854775808.0){c[e>>2]=-1;m=c[e>>2]|0;l=k;return m|0}d=+h[g>>3];n=+B(d)>=1.0?(d>0.0?~~+P(+A(d/4294967296.0),4294967295.0)>>>0:~~+N((d-+(~~d>>>0))/4294967296.0)>>>0):0;b=i;c[b>>2]=~~d>>>0;c[b+4>>2]=n;b=f;n=c[b+4>>2]|0;m=i;a=c[m+4>>2]|0;if((n|0)<(a|0)|((n|0)==(a|0)?(c[b>>2]|0)>>>0<(c[m>>2]|0)>>>0:0)){c[e>>2]=-1;n=c[e>>2]|0;l=k;return n|0}m=f;a=c[m+4>>2]|0;n=i;b=c[n+4>>2]|0;if((a|0)>(b|0)|((a|0)==(b|0)?(c[m>>2]|0)>>>0>(c[n>>2]|0)>>>0:0)){n=i;if(((c[n>>2]|0)==0?(c[n+4>>2]|0)==-2147483648:0)&+h[g>>3]>0.0){c[e>>2]=-1;n=c[e>>2]|0;l=k;return n|0}else{c[e>>2]=1;n=c[e>>2]|0;l=k;return n|0}}n=f;h[j>>3]=+((c[n>>2]|0)>>>0)+4294967296.0*+(c[n+4>>2]|0);if(+h[j>>3]<+h[g>>3]){c[e>>2]=-1;n=c[e>>2]|0;l=k;return n|0}if(+h[j>>3]>+h[g>>3]){c[e>>2]=1;n=c[e>>2]|0;l=k;return n|0}else{c[e>>2]=0;n=c[e>>2]|0;l=k;return n|0}return 0}function Ni(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+128|0;o=u+116|0;p=u+112|0;q=u+108|0;r=u+104|0;s=u+100|0;t=u+96|0;h=u+92|0;i=u+88|0;j=u+84|0;k=u+80|0;m=u+40|0;n=u;c[p>>2]=b;c[q>>2]=e;c[r>>2]=f;c[s>>2]=g;if((d[(c[p>>2]|0)+10>>0]|0|0)==(d[(c[r>>2]|0)+4>>0]|0|0)){c[o>>2]=zb[c[(c[r>>2]|0)+12>>2]&255](c[(c[r>>2]|0)+8>>2]|0,c[(c[p>>2]|0)+12>>2]|0,c[(c[p>>2]|0)+16>>2]|0,c[(c[q>>2]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2]|0)-(c[c[h>>2]>>2]|0);j=c[f>>2]|0;l=k;return j|0}if((e[a+8>>1]|0)&16384|0)if(Pi(c[(c[h>>2]|0)+16>>2]|0,c[(c[h>>2]|0)+12>>2]|0)|0){c[f>>2]=(c[c[g>>2]>>2]|0)-(c[j>>2]|0);j=c[f>>2]|0;l=k;return j|0}else{c[f>>2]=-1;j=c[f>>2]|0;l=k;return j|0}else if(Pi(c[(c[g>>2]|0)+16>>2]|0,c[(c[g>>2]|0)+12>>2]|0)|0){c[f>>2]=(c[i>>2]|0)-(c[c[h>>2]>>2]|0);j=c[f>>2]|0;l=k;return j|0}else{c[f>>2]=1;j=c[f>>2]|0;l=k;return j|0}return 0}function Pi(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i+12|0;e=i+8|0;f=i+4|0;g=i;c[e>>2]=b;c[f>>2]=d;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[f>>2]|0)){b=6;break}if(a[(c[e>>2]|0)+(c[g>>2]|0)>>0]|0){b=4;break}c[g>>2]=(c[g>>2]|0)+1}if((b|0)==4){c[h>>2]=0;h=c[h>>2]|0;l=i;return h|0}else if((b|0)==6){c[h>>2]=1;h=c[h>>2]|0;l=i;return h|0}return 0}function Qi(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=l;l=l+16|0;g=f+4|0;h=f;i=f+8|0;c[g>>2]=a;c[h>>2]=d;b[i>>1]=e;b[(c[g>>2]|0)+8>>1]=b[i>>1]|0;c[(c[g>>2]|0)+32>>2]=c[h>>2];c[(c[g>>2]|0)+24>>2]=0;l=f;return}function Ri(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[h>>2]=d;c[i>>2]=f;a=c[g>>2]|0;if((e[(c[g>>2]|0)+8>>1]|0)&9312|0){Si(a,c[h>>2]|0,c[i>>2]|0);l=j;return}f=c[h>>2]|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];c[a+16>>2]=c[f+16>>2];if((e[(c[h>>2]|0)+8>>1]|0)&2048|0){l=j;return}h=(c[g>>2]|0)+8|0;b[h>>1]=(e[h>>1]|0)&-7169;h=(c[g>>2]|0)+8|0;b[h>>1]=e[h>>1]|0|c[i>>2];l=j;return}function Si(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;Gh(c[h>>2]|0);Ri(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0);l=e;return}function Ti(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;di(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,0,c[g>>2]|0);l=f;return}function Ui(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Fh(c[c[d>>2]>>2]|0);l=b;return}function Vi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+32|0;h=e+20|0;g=e+16|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;kd(c[h>>2]|0,c[g>>2]|0,f);l=e;return}function Wi(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;a[(c[e>>2]|0)+24>>0]=1;l=d;return}function Xi(){return 16950}function Yi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+64|0;e=g+56|0;i=g+52|0;h=g+48|0;f=g;c[e>>2]=a;c[i>>2]=b;c[h>>2]=d;if(ej(c[e>>2]|0,c[i>>2]|0,c[h>>2]|0,f)|0){l=g;return}fj(f);i=f;hi(c[e>>2]|0,(+((c[i>>2]|0)>>>0)+4294967296.0*+(c[i+4>>2]|0))/864.0e5);l=g;return}function Zi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+176|0;h=i+48|0;e=i+68|0;k=i+64|0;j=i+60|0;f=i;g=i+72|0;c[e>>2]=a;c[k>>2]=b;c[j>>2]=d;if(ej(c[e>>2]|0,c[k>>2]|0,c[j>>2]|0,f)|0){l=i;return}hj(f);j=c[f+12>>2]|0;k=c[f+16>>2]|0;c[h>>2]=c[f+8>>2];c[h+4>>2]=j;c[h+8>>2]=k;Ne(100,g,20204,h)|0;ci(c[e>>2]|0,g,-1,-1);l=i;return}function _i(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0;j=l;l=l+176|0;i=j+48|0;e=j+68|0;m=j+64|0;k=j+60|0;f=j;g=j+72|0;c[e>>2]=a;c[m>>2]=b;c[k>>2]=d;if(ej(c[e>>2]|0,c[m>>2]|0,c[k>>2]|0,f)|0){l=j;return}ij(f);k=c[f+24>>2]|0;m=~~+h[f+32>>3];c[i>>2]=c[f+20>>2];c[i+4>>2]=k;c[i+8>>2]=m;Ne(100,g,20189,i)|0;ci(c[e>>2]|0,g,-1,-1);l=j;return}function $i(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,m=0;j=l;l=l+192|0;i=j+48|0;e=j+80|0;m=j+76|0;k=j+72|0;f=j;g=j+84|0;c[e>>2]=a;c[m>>2]=b;c[k>>2]=d;if(ej(c[e>>2]|0,c[m>>2]|0,c[k>>2]|0,f)|0){l=j;return}gj(f);a=c[f+12>>2]|0;b=c[f+16>>2]|0;d=c[f+20>>2]|0;k=c[f+24>>2]|0;m=~~+h[f+32>>3];c[i>>2]=c[f+8>>2];c[i+4>>2]=a;c[i+8>>2]=b;c[i+12>>2]=d;c[i+16>>2]=k;c[i+20>>2]=m;Ne(100,g,20159,i)|0;ci(c[e>>2]|0,g,-1,-1);l=j;return}function aj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+336|0;G=J+192|0;F=J+184|0;E=J+176|0;D=J+168|0;C=J+160|0;B=J+152|0;A=J+144|0;I=J+136|0;H=J+128|0;y=J+120|0;x=J+112|0;t=J+232|0;g=J+228|0;i=J+224|0;u=J+64|0;j=J+56|0;v=J+220|0;w=J+216|0;m=J+212|0;f=J+208|0;n=J+204|0;o=J+236|0;p=J+48|0;q=J+200|0;r=J;s=J+196|0;c[t>>2]=b;c[g>>2]=d;c[i>>2]=e;if(!(c[g>>2]|0)){l=J;return}c[n>>2]=wh(c[c[i>>2]>>2]|0)|0;if(!(c[n>>2]|0)){l=J;return}if(ej(c[t>>2]|0,(c[g>>2]|0)-1|0,(c[i>>2]|0)+4|0,u)|0){l=J;return}c[f>>2]=uh(c[t>>2]|0)|0;c[v>>2]=0;i=j;c[i>>2]=1;c[i+4>>2]=0;a:while(1){if(!(a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0))break;if((a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0)==37){switch(a[(c[n>>2]|0)+((c[v>>2]|0)+1)>>0]|0){case 87:case 83:case 77:case 109:case 72:case 100:{g=j;i=j;c[i>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[i+4>>2]=z;break}case 37:case 119:break;case 102:{g=j;i=j;c[i>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,8,0)|0;c[i+4>>2]=z;break}case 106:{g=j;i=j;c[i>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,3,0)|0;c[i+4>>2]=z;break}case 89:{g=j;i=j;c[i>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,8,0)|0;c[i+4>>2]=z;break}case 74:case 115:{g=j;i=j;c[i>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,50,0)|0;c[i+4>>2]=z;break}default:{k=44;break a}}c[v>>2]=(c[v>>2]|0)+1}c[v>>2]=(c[v>>2]|0)+1;g=j;g=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;i=j;c[i>>2]=g;c[i+4>>2]=z}if((k|0)==44){l=J;return}k=j;i=c[k+4>>2]|0;if(!(i>>>0<0|(i|0)==0&(c[k>>2]|0)>>>0<100)){i=j;e=c[i+4>>2]|0;k=c[(c[f>>2]|0)+96>>2]|0;g=((k|0)<0)<<31>>31;if(e>>>0>g>>>0|((e|0)==(g|0)?(c[i>>2]|0)>>>0>k>>>0:0)){ai(c[t>>2]|0);l=J;return}k=c[j>>2]|0;c[m>>2]=od(c[f>>2]|0,k,((k|0)<0)<<31>>31)|0;if(!(c[m>>2]|0)){bi(c[t>>2]|0);l=J;return}}else c[m>>2]=o;fj(u);gj(u);c[w>>2]=0;c[v>>2]=0;while(1){if(!(a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0))break;b:do if((a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0)!=37){i=a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0;j=c[m>>2]|0;k=c[w>>2]|0;c[w>>2]=k+1;a[j+k>>0]=i}else{c[v>>2]=(c[v>>2]|0)+1;do switch(a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0){case 100:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[x>>2]=c[u+16>>2];Ne(3,k,19995,x)|0;c[w>>2]=(c[w>>2]|0)+2;break b}case 102:{h[p>>3]=+h[u+32>>3];if(+h[p>>3]>59.999)h[p>>3]=59.999;k=(c[m>>2]|0)+(c[w>>2]|0)|0;h[y>>3]=+h[p>>3];Ne(7,k,2e4,y)|0;c[w>>2]=(_c((c[m>>2]|0)+(c[w>>2]|0)|0)|0)+(c[w>>2]|0);break b}case 72:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[H>>2]=c[u+20>>2];Ne(3,k,19995,H)|0;c[w>>2]=(c[w>>2]|0)+2;break b}case 106:case 87:{b=r;d=u;f=b+48|0;do{c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}while((b|0)<(f|0));a[r+42>>0]=0;c[r+12>>2]=1;c[r+16>>2]=1;fj(r);j=u;k=r;c[q>>2]=LR(IR(FR(c[j>>2]|0,c[j+4>>2]|0,c[k>>2]|0,c[k+4>>2]|0)|0,z|0,432e5,0)|0,z|0,864e5,0)|0;if((a[(c[n>>2]|0)+(c[v>>2]|0)>>0]|0)==87){k=u;k=IR(c[k>>2]|0,c[k+4>>2]|0,432e5,0)|0;k=LR(k|0,z|0,864e5,0)|0;k=VR(k|0,z|0,7,0)|0;c[s>>2]=k;k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[I>>2]=((c[q>>2]|0)+7-(c[s>>2]|0)|0)/7|0;Ne(3,k,19995,I)|0;c[w>>2]=(c[w>>2]|0)+2;break b}else{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[A>>2]=(c[q>>2]|0)+1;Ne(4,k,20007,A)|0;c[w>>2]=(c[w>>2]|0)+3;break b}}case 74:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;j=u;h[B>>3]=(+((c[j>>2]|0)>>>0)+4294967296.0*+(c[j+4>>2]|0))/864.0e5;Ne(20,k,20012,B)|0;c[w>>2]=(_c((c[m>>2]|0)+(c[w>>2]|0)|0)|0)+(c[w>>2]|0);break b}case 109:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[C>>2]=c[u+12>>2];Ne(3,k,19995,C)|0;c[w>>2]=(c[w>>2]|0)+2;break b}case 77:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[D>>2]=c[u+24>>2];Ne(3,k,19995,D)|0;c[w>>2]=(c[w>>2]|0)+2;break b}case 115:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;i=u;j=E;c[j>>2]=FR(LR(c[i>>2]|0,c[i+4>>2]|0,1e3,0)|0,z|0,413362496,49)|0;c[j+4>>2]=z;Ne(30,k,19081,E)|0;c[w>>2]=(_c((c[m>>2]|0)+(c[w>>2]|0)|0)|0)+(c[w>>2]|0);break b}case 83:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[F>>2]=~~+h[u+32>>3];Ne(3,k,19995,F)|0;c[w>>2]=(c[w>>2]|0)+2;break b}case 119:{i=u;i=VR(LR(IR(c[i>>2]|0,c[i+4>>2]|0,1296e5,0)|0,z|0,864e5,0)|0,z|0,7,0)|0;j=c[m>>2]|0;k=c[w>>2]|0;c[w>>2]=k+1;a[j+k>>0]=((i&255)<<24>>24)+48;break b}case 89:{k=(c[m>>2]|0)+(c[w>>2]|0)|0;c[G>>2]=c[u+8>>2];Ne(5,k,20018,G)|0;c[w>>2]=(_c((c[m>>2]|0)+(c[w>>2]|0)|0)|0)+(c[w>>2]|0);break b}default:{j=c[m>>2]|0;k=c[w>>2]|0;c[w>>2]=k+1;a[j+k>>0]=37;break b}}while(0)}while(0);c[v>>2]=(c[v>>2]|0)+1}a[(c[m>>2]|0)+(c[w>>2]|0)>>0]=0;ci(c[t>>2]|0,c[m>>2]|0,-1,(c[m>>2]|0)==(o|0)?-1:169);l=J;return}function bj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+8|0;c[f>>2]=a;c[e+4>>2]=b;c[e>>2]=d;_i(c[f>>2]|0,0,0);l=e;return}function cj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+8|0;c[f>>2]=a;c[e+4>>2]=b;c[e>>2]=d;$i(c[f>>2]|0,0,0);l=e;return}function dj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e+8|0;c[f>>2]=a;c[e+4>>2]=b;c[e>>2]=d;Zi(c[f>>2]|0,0,0);l=e;return}function ej(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0.0;p=l;l=l+32|0;o=p+28|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;n=p+8|0;g=p+4|0;h=p;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=f;b=c[m>>2]|0;d=b+48|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(d|0));if(!(c[j>>2]|0)){c[o>>2]=jj(c[i>>2]|0,c[m>>2]|0)|0;o=c[o>>2]|0;l=p;return o|0}f=fi(c[c[k>>2]>>2]|0)|0;c[h>>2]=f;b=c[c[k>>2]>>2]|0;do if((f|0)==2|(c[h>>2]|0)==1){q=+mi(b)*864.0e5+.5;f=+B(q)>=1.0?(q>0.0?~~+P(+A(q/4294967296.0),4294967295.0)>>>0:~~+N((q-+(~~q>>>0))/4294967296.0)>>>0):0;h=c[m>>2]|0;c[h>>2]=~~q>>>0;c[h+4>>2]=f;a[(c[m>>2]|0)+42>>0]=1}else{c[g>>2]=wh(b)|0;if(c[g>>2]|0?(kj(c[i>>2]|0,c[g>>2]|0,c[m>>2]|0)|0)==0:0)break;c[o>>2]=1;o=c[o>>2]|0;l=p;return o|0}while(0);c[n>>2]=1;while(1){if((c[n>>2]|0)>=(c[j>>2]|0)){b=14;break}c[g>>2]=wh(c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]|0)|0;if(!(c[g>>2]|0)){b=12;break}if(lj(c[i>>2]|0,c[g>>2]|0,c[m>>2]|0)|0){b=12;break}c[n>>2]=(c[n>>2]|0)+1}if((b|0)==12){c[o>>2]=1;o=c[o>>2]|0;l=p;return o|0}else if((b|0)==14){c[o>>2]=0;o=c[o>>2]|0;l=p;return o|0}return 0}function fj(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0.0;n=l;l=l+32|0;d=n+28|0;e=n+24|0;f=n+20|0;g=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[d>>2]=b;if(a[(c[d>>2]|0)+42>>0]|0){l=n;return}if(a[(c[d>>2]|0)+40>>0]|0){c[e>>2]=c[(c[d>>2]|0)+8>>2];c[f>>2]=c[(c[d>>2]|0)+12>>2];c[g>>2]=c[(c[d>>2]|0)+16>>2]}else{c[e>>2]=2e3;c[f>>2]=1;c[g>>2]=1}if((c[f>>2]|0)<=2){c[e>>2]=(c[e>>2]|0)+-1;c[f>>2]=(c[f>>2]|0)+12}c[i>>2]=(c[e>>2]|0)/100|0;c[j>>2]=2-(c[i>>2]|0)+((c[i>>2]|0)/4|0);c[k>>2]=(((c[e>>2]|0)+4716|0)*36525|0)/100|0;c[m>>2]=(((c[f>>2]|0)+1|0)*306001|0)/1e4|0;o=(+((c[k>>2]|0)+(c[m>>2]|0)+(c[g>>2]|0)+(c[j>>2]|0)|0)-1524.5)*864.0e5;k=+B(o)>=1.0?(o>0.0?~~+P(+A(o/4294967296.0),4294967295.0)>>>0:~~+N((o-+(~~o>>>0))/4294967296.0)>>>0):0;m=c[d>>2]|0;c[m>>2]=~~o>>>0;c[m+4>>2]=k;a[(c[d>>2]|0)+42>>0]=1;if(!(a[(c[d>>2]|0)+41>>0]|0)){l=n;return}k=O(c[(c[d>>2]|0)+20>>2]|0,36e5)|0;k=k+((c[(c[d>>2]|0)+24>>2]|0)*6e4|0)|0;o=+h[(c[d>>2]|0)+32>>3]*1.0e3;k=IR(k|0,((k|0)<0)<<31>>31|0,~~o>>>0|0,(+B(o)>=1.0?(o>0.0?~~+P(+A(o/4294967296.0),4294967295.0)>>>0:~~+N((o-+(~~o>>>0))/4294967296.0)>>>0):0)|0)|0;m=c[d>>2]|0;j=m;k=IR(c[j>>2]|0,c[j+4>>2]|0,k|0,z|0)|0;c[m>>2]=k;c[m+4>>2]=z;if(!(a[(c[d>>2]|0)+43>>0]|0)){l=n;return}k=(c[(c[d>>2]|0)+28>>2]|0)*6e4|0;m=c[d>>2]|0;j=m;k=FR(c[j>>2]|0,c[j+4>>2]|0,k|0,((k|0)<0)<<31>>31|0)|0;c[m>>2]=k;c[m+4>>2]=z;a[(c[d>>2]|0)+40>>0]=0;a[(c[d>>2]|0)+41>>0]=0;a[(c[d>>2]|0)+43>>0]=0;l=n;return}function gj(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;hj(c[d>>2]|0);ij(c[d>>2]|0);l=b;return}function hj(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[d>>2]=b;if(a[(c[d>>2]|0)+40>>0]|0){l=m;return}b=c[d>>2]|0;if(a[(c[d>>2]|0)+42>>0]|0){b=IR(c[b>>2]|0,c[b+4>>2]|0,432e5,0)|0;b=LR(b|0,z|0,864e5,0)|0;c[e>>2]=b;c[f>>2]=~~((+(c[e>>2]|0)-1867216.25)/36524.25);c[f>>2]=(c[e>>2]|0)+1+(c[f>>2]|0)-((c[f>>2]|0)/4|0);c[g>>2]=(c[f>>2]|0)+1524;c[h>>2]=~~((+(c[g>>2]|0)-122.1)/365.25);c[i>>2]=((c[h>>2]&32767)*36525|0)/100|0;c[j>>2]=~~(+((c[g>>2]|0)-(c[i>>2]|0)|0)/30.6001);c[k>>2]=~~(+(c[j>>2]|0)*30.6001);c[(c[d>>2]|0)+16>>2]=(c[g>>2]|0)-(c[i>>2]|0)-(c[k>>2]|0);c[(c[d>>2]|0)+12>>2]=(c[j>>2]|0)-((c[j>>2]|0)<14?1:13);c[(c[d>>2]|0)+8>>2]=(c[h>>2]|0)-((c[(c[d>>2]|0)+12>>2]|0)>2?4716:4715)}else{c[b+8>>2]=2e3;c[(c[d>>2]|0)+12>>2]=1;c[(c[d>>2]|0)+16>>2]=1}a[(c[d>>2]|0)+40>>0]=1;l=m;return}function ij(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;if(a[(c[d>>2]|0)+41>>0]|0){l=f;return}fj(c[d>>2]|0);b=c[d>>2]|0;b=IR(c[b>>2]|0,c[b+4>>2]|0,432e5,0)|0;b=VR(b|0,z|0,864e5,0)|0;c[e>>2]=b;h[(c[d>>2]|0)+32>>3]=+(c[e>>2]|0)/1.0e3;c[e>>2]=~~+h[(c[d>>2]|0)+32>>3];b=(c[d>>2]|0)+32|0;h[b>>3]=+h[b>>3]-+(c[e>>2]|0);c[(c[d>>2]|0)+20>>2]=(c[e>>2]|0)/3600|0;c[e>>2]=(c[e>>2]|0)-((c[(c[d>>2]|0)+20>>2]|0)*3600|0);c[(c[d>>2]|0)+24>>2]=(c[e>>2]|0)/60|0;b=(c[d>>2]|0)+32|0;h[b>>3]=+h[b>>3]+ +((c[e>>2]|0)-((c[(c[d>>2]|0)+24>>2]|0)*60|0)|0);a[(c[d>>2]|0)+41>>0]=1;l=f;return}function jj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;h=g+4|0;f=g;c[h>>2]=b;c[f>>2]=d;b=tj(c[h>>2]|0)|0;d=c[f>>2]|0;c[d>>2]=b;c[d+4>>2]=z;d=c[f>>2]|0;b=c[d+4>>2]|0;if((b|0)>0|(b|0)==0&(c[d>>2]|0)>>>0>0){a[(c[f>>2]|0)+42>>0]=1;c[e>>2]=0;h=c[e>>2]|0;l=g;return h|0}else{c[e>>2]=1;h=c[e>>2]|0;l=g;return h|0}return 0}function kj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,m=0,n=0.0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;i=m+12|0;j=m+8|0;k=m;c[g>>2]=b;c[i>>2]=d;c[j>>2]=e;if(!(sj(c[i>>2]|0,c[j>>2]|0)|0)){c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}if(!(oj(c[i>>2]|0,c[j>>2]|0)|0)){c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}if(!(Ig(c[i>>2]|0,20143)|0)){c[f>>2]=jj(c[g>>2]|0,c[j>>2]|0)|0;k=c[f>>2]|0;l=m;return k|0}g=c[i>>2]|0;if(oi(g,k,_c(c[i>>2]|0)|0,1)|0){n=+h[k>>3]*864.0e5+.5;i=+B(n)>=1.0?(n>0.0?~~+P(+A(n/4294967296.0),4294967295.0)>>>0:~~+N((n-+(~~n>>>0))/4294967296.0)>>>0):0;k=c[j>>2]|0;c[k>>2]=~~n>>>0;c[k+4>>2]=i;a[(c[j>>2]|0)+42>>0]=1;c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}else{c[f>>2]=1;k=c[f>>2]|0;l=m;return k|0}return 0}function lj(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,C=0,D=0.0;C=l;l=l+160|0;j=C+124|0;k=C+120|0;w=C+116|0;x=C+112|0;q=C+108|0;r=C+80|0;y=C+104|0;g=C+72|0;i=C+64|0;m=C+56|0;t=C+100|0;u=C+8|0;v=C;n=C+96|0;o=C+92|0;p=C+88|0;c[j>>2]=b;c[k>>2]=e;c[w>>2]=f;c[x>>2]=1;c[y>>2]=C+128;c[q>>2]=0;while(1){if((c[q>>2]|0)>=29)break;if(!(a[(c[k>>2]|0)+(c[q>>2]|0)>>0]|0))break;a[(c[y>>2]|0)+(c[q>>2]|0)>>0]=a[17348+(d[(c[k>>2]|0)+(c[q>>2]|0)>>0]|0)>>0]|0;c[q>>2]=(c[q>>2]|0)+1}a[(c[y>>2]|0)+(c[q>>2]|0)>>0]=0;switch(a[c[y>>2]>>0]|0){case 108:{if(vQ(c[y>>2]|0,20023)|0){y=c[x>>2]|0;l=C;return y|0}fj(c[w>>2]|0);v=mj(c[w>>2]|0,c[j>>2]|0,x)|0;y=c[w>>2]|0;u=y;c[y>>2]=IR(c[u>>2]|0,c[u+4>>2]|0,v|0,z|0)|0;c[y+4>>2]=z;nj(c[w>>2]|0);y=c[x>>2]|0;l=C;return y|0}case 117:{if((vQ(c[y>>2]|0,20033)|0)==0?a[(c[w>>2]|0)+42>>0]|0:0){v=c[w>>2]|0;v=IR(c[v>>2]|0,c[v+4>>2]|0,43200,0)|0;v=LR(v|0,z|0,86400,0)|0;v=IR(v|0,z|0,1045635584,49096)|0;y=c[w>>2]|0;c[y>>2]=v;c[y+4>>2]=z;nj(c[w>>2]|0);c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}if(vQ(c[y>>2]|0,20043)|0){y=c[x>>2]|0;l=C;return y|0}if(a[(c[w>>2]|0)+44>>0]|0){c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}fj(c[w>>2]|0);y=g;c[y>>2]=mj(c[w>>2]|0,c[j>>2]|0,x)|0;c[y+4>>2]=z;if(!(c[x>>2]|0)){u=g;y=c[w>>2]|0;v=y;u=FR(c[v>>2]|0,c[v+4>>2]|0,c[u>>2]|0,c[u+4>>2]|0)|0;c[y>>2]=u;c[y+4>>2]=z;nj(c[w>>2]|0);y=g;u=c[y>>2]|0;y=c[y+4>>2]|0;v=mj(c[w>>2]|0,c[j>>2]|0,x)|0;v=FR(u|0,y|0,v|0,z|0)|0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,v|0,z|0)|0;c[y>>2]=v;c[y+4>>2]=z}a[(c[w>>2]|0)+44>>0]=1;y=c[x>>2]|0;l=C;return y|0}case 119:{if(AQ(c[y>>2]|0,20047,8)|0){y=c[x>>2]|0;l=C;return y|0}if(!(oi((c[y>>2]|0)+8|0,r,_c((c[y>>2]|0)+8|0)|0,1)|0)){y=c[x>>2]|0;l=C;return y|0}y=~~+h[r>>3];c[q>>2]=y;if(!(((c[q>>2]|0)>=0?+(y|0)==+h[r>>3]:0)&+h[r>>3]<7.0)){y=c[x>>2]|0;l=C;return y|0}gj(c[w>>2]|0);a[(c[w>>2]|0)+43>>0]=0;a[(c[w>>2]|0)+42>>0]=0;fj(c[w>>2]|0);t=c[w>>2]|0;v=i;c[v>>2]=VR(LR(IR(c[t>>2]|0,c[t+4>>2]|0,1296e5,0)|0,z|0,864e5,0)|0,z|0,7,0)|0;c[v+4>>2]=z;v=i;t=c[v+4>>2]|0;y=c[q>>2]|0;u=((y|0)<0)<<31>>31;if((t|0)>(u|0)|((t|0)==(u|0)?(c[v>>2]|0)>>>0>y>>>0:0)){v=i;v=FR(c[v>>2]|0,c[v+4>>2]|0,7,0)|0;y=i;c[y>>2]=v;c[y+4>>2]=z}y=c[q>>2]|0;v=i;v=RR(FR(y|0,((y|0)<0)<<31>>31|0,c[v>>2]|0,c[v+4>>2]|0)|0,z|0,864e5,0)|0;y=c[w>>2]|0;u=y;c[y>>2]=IR(c[u>>2]|0,c[u+4>>2]|0,v|0,z|0)|0;c[y+4>>2]=z;nj(c[w>>2]|0);c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}case 115:{if(AQ(c[y>>2]|0,20056,9)|0){y=c[x>>2]|0;l=C;return y|0}c[y>>2]=(c[y>>2]|0)+9;hj(c[w>>2]|0);a[(c[w>>2]|0)+41>>0]=1;c[(c[w>>2]|0)+24>>2]=0;c[(c[w>>2]|0)+20>>2]=0;h[(c[w>>2]|0)+32>>3]=0.0;a[(c[w>>2]|0)+43>>0]=0;a[(c[w>>2]|0)+42>>0]=0;if(!(vQ(c[y>>2]|0,20066)|0)){c[(c[w>>2]|0)+16>>2]=1;c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}if(!(vQ(c[y>>2]|0,20072)|0)){hj(c[w>>2]|0);c[(c[w>>2]|0)+12>>2]=1;c[(c[w>>2]|0)+16>>2]=1;c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}if(vQ(c[y>>2]|0,20077)|0){y=c[x>>2]|0;l=C;return y|0}c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}case 57:case 56:case 55:case 54:case 53:case 52:case 51:case 50:case 49:case 48:case 45:case 43:{c[q>>2]=1;while(1){if(!(a[(c[y>>2]|0)+(c[q>>2]|0)>>0]|0))break;if((a[(c[y>>2]|0)+(c[q>>2]|0)>>0]|0)==58)break;if(!((d[16965+(d[(c[y>>2]|0)+(c[q>>2]|0)>>0]|0)>>0]&1|0)!=0^1))break;c[q>>2]=(c[q>>2]|0)+1}if(!(oi(c[y>>2]|0,r,c[q>>2]|0,1)|0)){c[x>>2]=1;y=c[x>>2]|0;l=C;return y|0}if((a[(c[y>>2]|0)+(c[q>>2]|0)>>0]|0)==58){c[t>>2]=c[y>>2];if(!(d[16965+(d[c[t>>2]>>0]|0)>>0]&4))c[t>>2]=(c[t>>2]|0)+1;b=u;e=b+48|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(e|0));if(oj(c[t>>2]|0,u)|0){y=c[x>>2]|0;l=C;return y|0}fj(u);t=u;t=FR(c[t>>2]|0,c[t+4>>2]|0,432e5,0)|0;s=u;c[s>>2]=t;c[s+4>>2]=z;s=u;s=LR(c[s>>2]|0,c[s+4>>2]|0,864e5,0)|0;t=v;c[t>>2]=s;c[t+4>>2]=z;t=v;t=RR(c[t>>2]|0,c[t+4>>2]|0,864e5,0)|0;v=u;t=FR(c[v>>2]|0,c[v+4>>2]|0,t|0,z|0)|0;v=u;c[v>>2]=t;c[v+4>>2]=z;if((a[c[y>>2]>>0]|0)==45){v=u;v=FR(0,0,c[v>>2]|0,c[v+4>>2]|0)|0;y=u;c[y>>2]=v;c[y+4>>2]=z}fj(c[w>>2]|0);nj(c[w>>2]|0);v=u;y=c[w>>2]|0;w=y;w=IR(c[w>>2]|0,c[w+4>>2]|0,c[v>>2]|0,c[v+4>>2]|0)|0;c[y>>2]=w;c[y+4>>2]=z;c[x>>2]=0;y=c[x>>2]|0;l=C;return y|0}c[y>>2]=(c[y>>2]|0)+(c[q>>2]|0);while(1){b=c[y>>2]|0;if(!(d[16965+(d[c[y>>2]>>0]|0)>>0]&1))break;c[y>>2]=b+1}c[q>>2]=_c(b)|0;if((c[q>>2]|0)>10|(c[q>>2]|0)<3){y=c[x>>2]|0;l=C;return y|0}if((a[(c[y>>2]|0)+((c[q>>2]|0)-1)>>0]|0)==115){a[(c[y>>2]|0)+((c[q>>2]|0)-1)>>0]=0;c[q>>2]=(c[q>>2]|0)+-1}fj(c[w>>2]|0);c[x>>2]=0;h[m>>3]=+h[r>>3]<0.0?-.5:.5;if((c[q>>2]|0)==3?(vQ(c[y>>2]|0,20077)|0)==0:0){D=+h[r>>3]*864.0e5+ +h[m>>3];v=+B(D)>=1.0?(D>0.0?~~+P(+A(D/4294967296.0),4294967295.0)>>>0:~~+N((D-+(~~D>>>0))/4294967296.0)>>>0):0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,~~D>>>0|0,v|0)|0;c[y>>2]=v;c[y+4>>2]=z}else s=53;do if((s|0)==53){if((c[q>>2]|0)==4?(vQ(c[y>>2]|0,20081)|0)==0:0){D=+h[r>>3]*36.0e5+ +h[m>>3];v=+B(D)>=1.0?(D>0.0?~~+P(+A(D/4294967296.0),4294967295.0)>>>0:~~+N((D-+(~~D>>>0))/4294967296.0)>>>0):0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,~~D>>>0|0,v|0)|0;c[y>>2]=v;c[y+4>>2]=z;break}if((c[q>>2]|0)==6?(vQ(c[y>>2]|0,20086)|0)==0:0){D=+h[r>>3]*6.0e4+ +h[m>>3];v=+B(D)>=1.0?(D>0.0?~~+P(+A(D/4294967296.0),4294967295.0)>>>0:~~+N((D-+(~~D>>>0))/4294967296.0)>>>0):0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,~~D>>>0|0,v|0)|0;c[y>>2]=v;c[y+4>>2]=z;break}if((c[q>>2]|0)==6?(vQ(c[y>>2]|0,20093)|0)==0:0){D=+h[r>>3]*1.0e3+ +h[m>>3];v=+B(D)>=1.0?(D>0.0?~~+P(+A(D/4294967296.0),4294967295.0)>>>0:~~+N((D-+(~~D>>>0))/4294967296.0)>>>0):0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,~~D>>>0|0,v|0)|0;c[y>>2]=v;c[y+4>>2]=z;break}if((c[q>>2]|0)==5?(vQ(c[y>>2]|0,20066)|0)==0:0){gj(c[w>>2]|0);y=(c[w>>2]|0)+12|0;c[y>>2]=(c[y>>2]|0)+~~+h[r>>3];c[n>>2]=((c[(c[w>>2]|0)+12>>2]|0)-((c[(c[w>>2]|0)+12>>2]|0)>0?1:12)|0)/12|0;y=(c[w>>2]|0)+8|0;c[y>>2]=(c[y>>2]|0)+(c[n>>2]|0);y=(c[w>>2]|0)+12|0;c[y>>2]=(c[y>>2]|0)-((c[n>>2]|0)*12|0);a[(c[w>>2]|0)+42>>0]=0;fj(c[w>>2]|0);c[o>>2]=~~+h[r>>3];if(!(+(c[o>>2]|0)!=+h[r>>3]))break;D=(+h[r>>3]-+(c[o>>2]|0))*30.0*864.0e5+ +h[m>>3];v=+B(D)>=1.0?(D>0.0?~~+P(+A(D/4294967296.0),4294967295.0)>>>0:~~+N((D-+(~~D>>>0))/4294967296.0)>>>0):0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,~~D>>>0|0,v|0)|0;c[y>>2]=v;c[y+4>>2]=z;break}if((c[q>>2]|0)==4?(vQ(c[y>>2]|0,20072)|0)==0:0){c[p>>2]=~~+h[r>>3];gj(c[w>>2]|0);y=(c[w>>2]|0)+8|0;c[y>>2]=(c[y>>2]|0)+(c[p>>2]|0);a[(c[w>>2]|0)+42>>0]=0;fj(c[w>>2]|0);if(!(+(c[p>>2]|0)!=+h[r>>3]))break;D=(+h[r>>3]-+(c[p>>2]|0))*365.0*864.0e5+ +h[m>>3];v=+B(D)>=1.0?(D>0.0?~~+P(+A(D/4294967296.0),4294967295.0)>>>0:~~+N((D-+(~~D>>>0))/4294967296.0)>>>0):0;y=c[w>>2]|0;u=y;v=IR(c[u>>2]|0,c[u+4>>2]|0,~~D>>>0|0,v|0)|0;c[y>>2]=v;c[y+4>>2]=z;break}c[x>>2]=1}while(0);nj(c[w>>2]|0);y=c[x>>2]|0;l=C;return y|0}default:{y=c[x>>2]|0;l=C;return y|0}}return 0}function mj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0.0,g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+176|0;k=r+96|0;g=r+164|0;m=r+160|0;n=r+156|0;o=r+48|0;p=r;q=r+152|0;j=r+108|0;i=r+104|0;c[g>>2]=b;c[m>>2]=d;c[n>>2]=e;d=j;e=d+44|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(e|0));d=o;b=c[g>>2]|0;e=d+48|0;do{c[d>>2]=c[b>>2];d=d+4|0;b=b+4|0}while((d|0)<(e|0));gj(o);if((c[o+8>>2]|0)>=1971?(c[o+8>>2]|0)<2038:0){c[i>>2]=~~(+h[o+32>>3]+.5);f=+(c[i>>2]|0)}else{c[o+8>>2]=2e3;c[o+12>>2]=1;c[o+16>>2]=1;c[o+20>>2]=0;c[o+24>>2]=0;f=0.0}h[o+32>>3]=f;c[o+28>>2]=0;a[o+42>>0]=0;fj(o);i=o;i=LR(c[i>>2]|0,c[i+4>>2]|0,1e3,0)|0;i=FR(i|0,z|0,413362496,49)|0;c[q>>2]=i;if(rj(q,j)|0){yh(c[m>>2]|0,20120,-1);c[c[n>>2]>>2]=1;p=k;c[p>>2]=0;c[p+4>>2]=0;p=k;q=p;q=c[q>>2]|0;p=p+4|0;p=c[p>>2]|0;z=p;l=r;return q|0}else{c[p+8>>2]=(c[j+20>>2]|0)+1900;c[p+12>>2]=(c[j+16>>2]|0)+1;c[p+16>>2]=c[j+12>>2];c[p+20>>2]=c[j+8>>2];c[p+24>>2]=c[j+4>>2];h[p+32>>3]=+(c[j>>2]|0);a[p+40>>0]=1;a[p+41>>0]=1;a[p+42>>0]=0;a[p+43>>0]=0;fj(p);c[c[n>>2]>>2]=0;q=o;q=FR(c[p>>2]|0,c[p+4>>2]|0,c[q>>2]|0,c[q+4>>2]|0)|0;p=k;c[p>>2]=q;c[p+4>>2]=z;p=k;q=p;q=c[q>>2]|0;p=p+4|0;p=c[p>>2]|0;z=p;l=r;return q|0}return 0}function nj(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;a[(c[e>>2]|0)+40>>0]=0;a[(c[e>>2]|0)+41>>0]=0;a[(c[e>>2]|0)+43>>0]=0;l=d;return}function oj(b,e){b=b|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+64|0;p=q+24|0;r=q+16|0;f=q+48|0;g=q+44|0;i=q+40|0;j=q+36|0;k=q+32|0;m=q+28|0;n=q+8|0;o=q;c[g>>2]=b;c[i>>2]=e;h[n>>3]=0.0;e=c[g>>2]|0;c[r>>2]=j;c[r+4>>2]=k;if((pj(e,20100,r)|0)!=2){c[f>>2]=1;r=c[f>>2]|0;l=q;return r|0}c[g>>2]=(c[g>>2]|0)+5;if((a[c[g>>2]>>0]|0)==58){c[g>>2]=(c[g>>2]|0)+1;r=c[g>>2]|0;c[p>>2]=m;if((pj(r,20108,p)|0)!=1){c[f>>2]=1;r=c[f>>2]|0;l=q;return r|0}c[g>>2]=(c[g>>2]|0)+2;if((a[c[g>>2]>>0]|0)==46?d[16965+(d[(c[g>>2]|0)+1>>0]|0)>>0]&4|0:0){h[o>>3]=1.0;c[g>>2]=(c[g>>2]|0)+1;while(1){if(!(d[16965+(d[c[g>>2]>>0]|0)>>0]&4))break;h[n>>3]=+h[n>>3]*10.0+ +(a[c[g>>2]>>0]|0)-48.0;h[o>>3]=+h[o>>3]*10.0;c[g>>2]=(c[g>>2]|0)+1}h[n>>3]=+h[n>>3]/+h[o>>3]}}else c[m>>2]=0;a[(c[i>>2]|0)+42>>0]=0;a[(c[i>>2]|0)+41>>0]=1;c[(c[i>>2]|0)+20>>2]=c[j>>2];c[(c[i>>2]|0)+24>>2]=c[k>>2];h[(c[i>>2]|0)+32>>3]=+(c[m>>2]|0)+ +h[n>>3];if(qj(c[g>>2]|0,c[i>>2]|0)|0){c[f>>2]=1;r=c[f>>2]|0;l=q;return r|0}else{a[(c[i>>2]|0)+43>>0]=c[(c[i>>2]|0)+28>>2]|0?1:0;c[f>>2]=0;r=c[f>>2]|0;l=q;return r|0}return 0}function pj(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;k=t+36|0;m=t+32|0;n=t+16|0;s=t+8|0;o=t+44|0;p=t+43|0;q=t+42|0;r=t+4|0;i=t+40|0;j=t;c[k>>2]=f;c[m>>2]=g;c[s>>2]=0;c[n>>2]=h;a:while(1){a[p>>0]=(a[c[m>>2]>>0]|0)-48;a[q>>0]=(a[(c[m>>2]|0)+1>>0]|0)-48;c[r>>2]=0;b[i>>1]=b[8876+((a[(c[m>>2]|0)+2>>0]|0)-97<<1)>>1]|0;a[o>>0]=a[(c[m>>2]|0)+3>>0]|0;c[r>>2]=0;while(1){h=a[p>>0]|0;a[p>>0]=h+-1<<24>>24;if(!(h<<24>>24))break;if(!(d[16965+(d[c[k>>2]>>0]|0)>>0]&4)){f=11;break a}c[r>>2]=((c[r>>2]|0)*10|0)+(a[c[k>>2]>>0]|0)-48;c[k>>2]=(c[k>>2]|0)+1}if((c[r>>2]|0)<(a[q>>0]|0)){f=11;break}if((c[r>>2]|0)>(e[i>>1]|0)){f=11;break}if(a[o>>0]|0?(a[o>>0]|0)!=(a[c[k>>2]>>0]|0):0){f=11;break}h=c[r>>2]|0;f=(c[n>>2]|0)+(4-1)&~(4-1);g=c[f>>2]|0;c[n>>2]=f+4;c[j>>2]=g;c[c[j>>2]>>2]=h;c[k>>2]=(c[k>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+1;c[m>>2]=(c[m>>2]|0)+4;if(!(a[o>>0]|0)){f=11;break}}if((f|0)==11){l=t;return c[s>>2]|0}return 0}function qj(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;n=p;f=p+32|0;g=p+28|0;h=p+24|0;i=p+20|0;j=p+16|0;k=p+12|0;m=p+8|0;c[g>>2]=b;c[h>>2]=e;c[i>>2]=0;while(1){if(!(d[16965+(d[c[g>>2]>>0]|0)>>0]&1))break;c[g>>2]=(c[g>>2]|0)+1}c[(c[h>>2]|0)+28>>2]=0;c[m>>2]=a[c[g>>2]>>0];do if((c[m>>2]|0)==45){c[i>>2]=-1;o=11}else{if((c[m>>2]|0)==43){c[i>>2]=1;o=11;break}if((c[m>>2]|0)==90|(c[m>>2]|0)==122){c[g>>2]=(c[g>>2]|0)+1;break}c[f>>2]=(c[m>>2]|0)!=0&1;o=c[f>>2]|0;l=p;return o|0}while(0);do if((o|0)==11){c[g>>2]=(c[g>>2]|0)+1;o=c[g>>2]|0;c[n>>2]=j;c[n+4>>2]=k;if((pj(o,20112,n)|0)==2){c[g>>2]=(c[g>>2]|0)+5;o=O(c[i>>2]|0,(c[k>>2]|0)+((c[j>>2]|0)*60|0)|0)|0;c[(c[h>>2]|0)+28>>2]=o;break}c[f>>2]=1;o=c[f>>2]|0;l=p;return o|0}while(0);while(1){if(!(d[16965+(d[c[g>>2]>>0]|0)>>0]&1))break;c[g>>2]=(c[g>>2]|0)+1}a[(c[h>>2]|0)+44>>0]=1;c[f>>2]=(a[c[g>>2]>>0]|0)!=0&1;o=c[f>>2]|0;l=p;return o|0}function rj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;h=g+12|0;d=g+8|0;e=g+4|0;f=g;c[h>>2]=a;c[d>>2]=b;b=kb(c[h>>2]|0)|0;c[f>>2]=b;c[f>>2]=c[69]|0?0:b;if(c[f>>2]|0){a=c[d>>2]|0;b=c[f>>2]|0;d=a+44|0;do{c[a>>2]=c[b>>2];a=a+4|0;b=b+4|0}while((a|0)<(d|0))}c[e>>2]=(c[f>>2]|0)==0&1;l=g;return c[e>>2]|0}function sj(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;f=o;g=o+36|0;h=o+32|0;i=o+28|0;j=o+24|0;k=o+20|0;m=o+16|0;n=o+12|0;c[h>>2]=b;c[i>>2]=e;if((a[c[h>>2]>>0]|0)==45){c[h>>2]=(c[h>>2]|0)+1;c[n>>2]=1}else c[n>>2]=0;e=c[h>>2]|0;c[f>>2]=j;c[f+4>>2]=k;c[f+8>>2]=m;if((pj(e,20147,f)|0)!=3){c[g>>2]=1;n=c[g>>2]|0;l=o;return n|0}c[h>>2]=(c[h>>2]|0)+10;while(1){if(d[16965+(d[c[h>>2]>>0]|0)>>0]&1|0)e=1;else e=84==(d[c[h>>2]>>0]|0);b=c[h>>2]|0;if(!e)break;c[h>>2]=b+1}do if(oj(b,c[i>>2]|0)|0){if(!(a[c[h>>2]>>0]|0)){a[(c[i>>2]|0)+41>>0]=0;break}c[g>>2]=1;n=c[g>>2]|0;l=o;return n|0}while(0);a[(c[i>>2]|0)+42>>0]=0;a[(c[i>>2]|0)+40>>0]=1;j=c[j>>2]|0;c[(c[i>>2]|0)+8>>2]=c[n>>2]|0?0-j|0:j;c[(c[i>>2]|0)+12>>2]=c[k>>2];c[(c[i>>2]|0)+16>>2]=c[m>>2];if(a[(c[i>>2]|0)+43>>0]|0)fj(c[i>>2]|0);c[g>>2]=0;n=c[g>>2]|0;l=o;return n|0}function tj(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[e>>2]=(c[(c[b>>2]|0)+12>>2]|0)+56;a=c[e>>2]|0;if((c[a>>2]|0)==0&(c[a+4>>2]|0)==0?(c[d>>2]=uj(c[c[(c[c[b>>2]>>2]|0)+32>>2]>>2]|0,c[e>>2]|0)|0,c[d>>2]|0):0){d=c[e>>2]|0;c[d>>2]=0;c[d+4>>2]=0}e=c[e>>2]|0;z=c[e+4>>2]|0;l=f;return c[e>>2]|0}function uj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0.0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i;c[d>>2]=a;c[e>>2]=b;if((c[c[d>>2]>>2]|0)>=2?c[(c[d>>2]|0)+72>>2]|0:0){c[f>>2]=yb[c[(c[d>>2]|0)+72>>2]&255](c[d>>2]|0,c[e>>2]|0)|0;g=c[f>>2]|0;l=i;return g|0}c[f>>2]=yb[c[(c[d>>2]|0)+64>>2]&255](c[d>>2]|0,g)|0;j=+h[g>>3]*864.0e5;d=+B(j)>=1.0?(j>0.0?~~+P(+A(j/4294967296.0),4294967295.0)>>>0:~~+N((j-+(~~j>>>0))/4294967296.0)>>>0):0;g=c[e>>2]|0;c[g>>2]=~~j>>>0;c[g+4>>2]=d;g=c[f>>2]|0;l=i;return g|0}function vj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+64|0;p=r;j=r+60|0;s=r+52|0;k=r+48|0;m=r+44|0;n=r+40|0;o=r+32|0;f=r+28|0;g=r+24|0;h=r+20|0;i=r+16|0;c[j>>2]=b;c[r+56>>2]=d;c[s>>2]=e;c[k>>2]=wh(c[c[s>>2]>>2]|0)|0;c[m>>2]=wh(c[(c[s>>2]|0)+4>>2]|0)|0;c[f>>2]=c[k>>2];c[g>>2]=0;c[i>>2]=uh(c[j>>2]|0)|0;if(!(c[k>>2]|0)){l=r;return}do{if(!(a[c[f>>2]>>0]|0)){q=7;break}c[o>>2]=c[f>>2];c[o+4>>2]=c[g>>2];do{c[f>>2]=(c[f>>2]|0)+(c[g>>2]|0);c[g>>2]=yj(c[f>>2]|0,n)|0}while((c[n>>2]|0)==162)}while((c[n>>2]|0)!=22?(c[n>>2]|0)!=125:0);if((q|0)==7){l=r;return}s=c[i>>2]|0;e=c[k>>2]|0;n=c[m>>2]|0;q=(c[o>>2]|0)+(c[o+4>>2]|0)|0;c[p>>2]=(c[o>>2]|0)-(c[k>>2]|0);c[p+4>>2]=e;c[p+8>>2]=n;c[p+12>>2]=q;c[h>>2]=Bj(s,21606,p)|0;ci(c[j>>2]|0,c[h>>2]|0,-1,169);l=r;return}function wj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+80|0;q=s;k=s+68|0;t=s+60|0;m=s+56|0;n=s+52|0;o=s+48|0;p=s+40|0;f=s+32|0;g=s+28|0;h=s+24|0;i=s+20|0;j=s+16|0;c[k>>2]=b;c[s+64>>2]=d;c[t>>2]=e;c[m>>2]=wh(c[c[t>>2]>>2]|0)|0;c[n>>2]=wh(c[(c[t>>2]|0)+4>>2]|0)|0;c[f>>2]=3;c[g>>2]=c[m>>2];c[h>>2]=0;c[j>>2]=uh(c[k>>2]|0)|0;if(!(c[m>>2]|0)){l=s;return}while(1){if(!(a[c[g>>2]>>0]|0)){r=8;break}c[p>>2]=c[g>>2];c[p+4>>2]=c[h>>2];do{c[g>>2]=(c[g>>2]|0)+(c[h>>2]|0);c[h>>2]=yj(c[g>>2]|0,o)|0}while((c[o>>2]|0)==162);t=(c[f>>2]|0)+1|0;c[f>>2]=t;c[f>>2]=(c[o>>2]|0)==122|(c[o>>2]|0)==107?0:t;if((c[f>>2]|0)!=2)continue;if(!((c[o>>2]|0)!=137&(c[o>>2]|0)!=74&(c[o>>2]|0)!=5))break}if((r|0)==8){l=s;return}t=c[j>>2]|0;e=c[m>>2]|0;o=c[n>>2]|0;r=(c[p>>2]|0)+(c[p+4>>2]|0)|0;c[q>>2]=(c[p>>2]|0)-(c[m>>2]|0);c[q+4>>2]=e;c[q+8>>2]=o;c[q+12>>2]=r;c[i>>2]=Bj(t,21606,q)|0;ci(c[k>>2]|0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}v=c[o>>2]|0;s=c[r>>2]|0;c[t>>2]=c[p>>2]|0?c[p>>2]|0:47636;c[t+4>>2]=s;c[q>>2]=Bj(v,20293,t)|0;ci(c[n>>2]|0,c[q>>2]|0,-1,169);Hd(c[o>>2]|0,c[p>>2]|0);l=u;return}function yj(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;n=o+24|0;m=o+20|0;f=o+16|0;j=o+12|0;k=o+8|0;g=o+4|0;h=o;c[m>>2]=b;c[f>>2]=e;a:do switch(d[20298+(d[c[m>>2]>>0]|0)>>0]|0){case 7:{c[j>>2]=1;while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&1))break;c[j>>2]=(c[j>>2]|0)+1}c[c[f>>2]>>2]=162;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}case 11:{if((d[(c[m>>2]|0)+1>>0]|0)!=45){c[c[f>>2]>>2]=48;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}c[j>>2]=2;while(1){i=d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0;c[k>>2]=i;if(!(i|0?(c[k>>2]|0)!=10:0))break;c[j>>2]=(c[j>>2]|0)+1}c[c[f>>2]>>2]=162;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}case 17:{c[c[f>>2]>>2]=22;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 18:{c[c[f>>2]>>2]=23;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 19:{c[c[f>>2]>>2]=1;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 20:{c[c[f>>2]>>2]=47;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 21:{c[c[f>>2]>>2]=49;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 16:{if((d[(c[m>>2]|0)+1>>0]|0)==42?d[(c[m>>2]|0)+2>>0]|0:0){c[j>>2]=3;c[k>>2]=d[(c[m>>2]|0)+2>>0];while(1){if((c[k>>2]|0)==42?(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)==47:0)break;i=d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0;c[k>>2]=i;if(!i)break;c[j>>2]=(c[j>>2]|0)+1}if(c[k>>2]|0)c[j>>2]=(c[j>>2]|0)+1;c[c[f>>2]>>2]=162;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}c[c[f>>2]>>2]=50;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 22:{c[c[f>>2]>>2]=51;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 14:{c[c[f>>2]>>2]=37;c[n>>2]=1+((d[(c[m>>2]|0)+1>>0]|0)==61&1);n=c[n>>2]|0;l=o;return n|0}case 12:{m=d[(c[m>>2]|0)+1>>0]|0;c[k>>2]=m;if((m|0)==61){c[c[f>>2]>>2]=39;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}if((c[k>>2]|0)==62){c[c[f>>2]>>2]=36;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}b=c[f>>2]|0;if((c[k>>2]|0)==60){c[b>>2]=45;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}else{c[b>>2]=40;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}}case 13:{m=d[(c[m>>2]|0)+1>>0]|0;c[k>>2]=m;if((m|0)==61){c[c[f>>2]>>2]=41;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}b=c[f>>2]|0;if((c[k>>2]|0)==62){c[b>>2]=46;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}else{c[b>>2]=38;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}}case 15:{b=c[f>>2]|0;if((d[(c[m>>2]|0)+1>>0]|0)!=61){c[b>>2]=163;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}else{c[b>>2]=36;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}}case 10:{b=c[f>>2]|0;if((d[(c[m>>2]|0)+1>>0]|0)!=124){c[b>>2]=44;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}else{c[b>>2]=52;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}}case 23:{c[c[f>>2]>>2]=26;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 24:{c[c[f>>2]>>2]=43;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 25:{c[c[f>>2]>>2]=54;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}case 8:{c[g>>2]=d[c[m>>2]>>0];c[j>>2]=1;while(1){i=d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0;c[k>>2]=i;if(!i)break;if((c[k>>2]|0)==(c[g>>2]|0)){if((d[(c[m>>2]|0)+((c[j>>2]|0)+1)>>0]|0)!=(c[g>>2]|0))break;c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=(c[j>>2]|0)+1}if((c[k>>2]|0)==39){c[c[f>>2]>>2]=97;c[n>>2]=(c[j>>2]|0)+1;n=c[n>>2]|0;l=o;return n|0}b=c[f>>2]|0;if(c[k>>2]|0){c[b>>2]=55;c[n>>2]=(c[j>>2]|0)+1;n=c[n>>2]|0;l=o;return n|0}else{c[b>>2]=163;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}}case 26:{if(d[16965+(d[(c[m>>2]|0)+1>>0]|0)>>0]&4|0)i=64;else{c[c[f>>2]>>2]=122;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}break}case 3:{i=64;break}case 9:{c[j>>2]=1;c[k>>2]=d[c[m>>2]>>0];while(1){if((c[k>>2]|0)==93)break;i=d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0;c[k>>2]=i;if(!i)break;c[j>>2]=(c[j>>2]|0)+1}c[c[f>>2]>>2]=(c[k>>2]|0)==93?55:163;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}case 6:{c[c[f>>2]>>2]=135;c[j>>2]=1;while(1){b=c[j>>2]|0;if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&4))break;c[j>>2]=b+1}c[n>>2]=b;n=c[n>>2]|0;l=o;return n|0}case 5:case 4:{c[h>>2]=0;c[c[f>>2]>>2]=135;c[j>>2]=1;while(1){g=d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0;c[k>>2]=g;if(!g)break;if(d[16965+(c[k>>2]&255)>>0]&70|0)c[h>>2]=(c[h>>2]|0)+1;else{if((c[k>>2]|0)==40&(c[h>>2]|0)>0){i=107;break}if((c[k>>2]|0)!=58)break;if((d[(c[m>>2]|0)+((c[j>>2]|0)+1)>>0]|0)!=58)break;c[j>>2]=(c[j>>2]|0)+1}c[j>>2]=(c[j>>2]|0)+1}do if((i|0)==107){while(1){c[j>>2]=(c[j>>2]|0)+1;i=d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0;c[k>>2]=i;if(!i)break;if((c[k>>2]|0)!=41?(d[16965+(c[k>>2]&255)>>0]&1|0)==0:0)i=107;else break}if((c[k>>2]|0)==41){c[j>>2]=(c[j>>2]|0)+1;break}else{c[c[f>>2]>>2]=163;break}}while(0);if(!(c[h>>2]|0))c[c[f>>2]>>2]=163;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}case 1:{c[j>>2]=1;while(1){if((d[20298+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]|0)>1)break;c[j>>2]=(c[j>>2]|0)+1}if(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&70|0){c[j>>2]=(c[j>>2]|0)+1;break a}c[c[f>>2]>>2]=55;c[n>>2]=Dj(c[m>>2]|0,c[j>>2]|0,c[f>>2]|0)|0;n=c[n>>2]|0;l=o;return n|0}case 0:{if((d[(c[m>>2]|0)+1>>0]|0)==39){c[c[f>>2]>>2]=133;c[j>>2]=2;while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&8))break;c[j>>2]=(c[j>>2]|0)+1}if(!((d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)==39?!((c[j>>2]|0)%2|0|0):0))i=131;b:do if((i|0)==131){c[c[f>>2]>>2]=163;while(1){if(!(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0))break b;if((d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)==39)break b;c[j>>2]=(c[j>>2]|0)+1}}while(0);if(a[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)c[j>>2]=(c[j>>2]|0)+1;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}else i=138;break}case 2:{i=138;break}default:{c[c[f>>2]>>2]=163;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}}while(0);if((i|0)==64){c[c[f>>2]>>2]=134;do if((d[c[m>>2]>>0]|0)==48){if((d[(c[m>>2]|0)+1>>0]|0)!=120?(d[(c[m>>2]|0)+1>>0]|0)!=88:0)break;if(d[16965+(d[(c[m>>2]|0)+2>>0]|0)>>0]&8|0){c[j>>2]=3;while(1){b=c[j>>2]|0;if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&8))break;c[j>>2]=b+1}c[n>>2]=b;n=c[n>>2]|0;l=o;return n|0}}while(0);c[j>>2]=0;while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&4))break;c[j>>2]=(c[j>>2]|0)+1}if((d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)==46){c[j>>2]=(c[j>>2]|0)+1;while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&4))break;c[j>>2]=(c[j>>2]|0)+1}c[c[f>>2]>>2]=132}if(!((d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)!=101?(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)!=69:0))i=82;do if((i|0)==82){if(!(d[16965+(d[(c[m>>2]|0)+((c[j>>2]|0)+1)>>0]|0)>>0]&4)){if((d[(c[m>>2]|0)+((c[j>>2]|0)+1)>>0]|0)!=43?(d[(c[m>>2]|0)+((c[j>>2]|0)+1)>>0]|0)!=45:0)break;if(!(d[16965+(d[(c[m>>2]|0)+((c[j>>2]|0)+2)>>0]|0)>>0]&4))break}c[j>>2]=(c[j>>2]|0)+2;while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&4))break;c[j>>2]=(c[j>>2]|0)+1}c[c[f>>2]>>2]=132}while(0);while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&70))break;c[c[f>>2]>>2]=163;c[j>>2]=(c[j>>2]|0)+1}c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}else if((i|0)==138)c[j>>2]=1;while(1){if(!(d[16965+(d[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)>>0]&70))break;c[j>>2]=(c[j>>2]|0)+1}c[c[f>>2]>>2]=55;c[n>>2]=c[j>>2];n=c[n>>2]|0;l=o;return n|0}function zj(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+20|0;h=m+16|0;i=m+12|0;j=m;k=m+8|0;c[h>>2]=b;c[i>>2]=d;d=j;c[d>>2]=e;c[d+4>>2]=f;if(!(c[i>>2]|0)){c[g>>2]=0;k=c[g>>2]|0;l=m;return k|0}f=c[h>>2]|0;h=j;h=IR(c[h>>2]|0,c[h+4>>2]|0,1,0)|0;c[k>>2]=od(f,h,z)|0;if(c[k>>2]|0){MR(c[k>>2]|0,c[i>>2]|0,c[j>>2]|0)|0;a[(c[k>>2]|0)+(c[j>>2]|0)>>0]=0}c[g>>2]=c[k>>2];k=c[g>>2]|0;l=m;return k|0}function Aj(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;f=j+8|0;g=j+12|0;h=j+4|0;i=j;c[f>>2]=b;if(!(c[f>>2]|0)){l=j;return}a[g>>0]=a[c[f>>2]>>0]|0;if(!(d[16965+(d[g>>0]|0)>>0]&128)){l=j;return}if((a[g>>0]|0)==91)a[g>>0]=93;c[h>>2]=1;c[i>>2]=0;while(1){b=c[f>>2]|0;e=c[h>>2]|0;if((a[(c[f>>2]|0)+(c[h>>2]|0)>>0]|0)==(a[g>>0]|0)){if((a[b+(e+1)>>0]|0)!=(a[g>>0]|0))break;k=a[g>>0]|0;b=c[f>>2]|0;e=c[i>>2]|0;c[i>>2]=e+1;a[b+e>>0]=k;c[h>>2]=(c[h>>2]|0)+1}else{b=a[b+e>>0]|0;e=c[f>>2]|0;k=c[i>>2]|0;c[i>>2]=k+1;a[e+k>>0]=b}c[h>>2]=(c[h>>2]|0)+1}a[(c[f>>2]|0)+(c[i>>2]|0)>>0]=0;l=j;return}function Bj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+32|0;i=f+28|0;h=f+24|0;g=f+8|0;e=f;c[i>>2]=a;c[h>>2]=b;c[g>>2]=d;c[e>>2]=Cj(c[i>>2]|0,c[h>>2]|0,g)|0;l=f;return c[e>>2]|0}function Cj(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;i=l;l=l+128|0;g=i+40|0;m=i+36|0;k=i+32|0;h=i+28|0;j=i;c[g>>2]=b;c[m>>2]=e;c[k>>2]=f;jd(j,c[g>>2]|0,i+44|0,70,c[(c[g>>2]|0)+96>>2]|0);a[j+25>>0]=1;kd(j,c[m>>2]|0,c[k>>2]|0);c[h>>2]=ld(j)|0;if((d[j+24>>0]|0|0)!=1){m=c[h>>2]|0;l=i;return m|0}yd(c[g>>2]|0);m=c[h>>2]|0;l=i;return m|0}function Dj(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;h=p+20|0;i=p+16|0;j=p+12|0;k=p+8|0;m=p+4|0;n=p;c[h>>2]=b;c[i>>2]=f;c[j>>2]=g;if((c[i>>2]|0)<2){o=c[i>>2]|0;l=p;return o|0}c[k>>2]=(d[17348+(d[c[h>>2]>>0]|0)>>0]<<2^(d[17348+(d[(c[h>>2]|0)+((c[i>>2]|0)-1)>>0]|0)>>0]|0)*3^c[i>>2]|0)%127|0;c[k>>2]=(d[20554+(c[k>>2]|0)>>0]|0)-1;while(1){if((c[k>>2]|0)<0){o=13;break}if((d[20681+(c[k>>2]|0)>>0]|0)==(c[i>>2]|0)){c[m>>2]=0;c[n>>2]=20805+(e[8888+(c[k>>2]<<1)>>1]|0);while(1){if((c[m>>2]|0)<(c[i>>2]|0))f=(a[(c[h>>2]|0)+(c[m>>2]|0)>>0]&-33|0)==(a[(c[n>>2]|0)+(c[m>>2]|0)>>0]|0);else f=0;b=c[m>>2]|0;if(!f)break;c[m>>2]=b+1}if((b|0)>=(c[i>>2]|0))break}c[k>>2]=(d[21482+(c[k>>2]|0)>>0]|0)-1}if((o|0)==13){o=c[i>>2]|0;l=p;return o|0}c[c[j>>2]>>2]=d[21358+(c[k>>2]|0)>>0];o=c[i>>2]|0;l=p;return o|0}function Ej(a,b,f,g){a=a|0;b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+16|0;i=m+12|0;j=m;k=m+8|0;c[h>>2]=a;c[i>>2]=b;b=j;c[b>>2]=f;c[b+4>>2]=g;c[k>>2]=0;if(d[(c[h>>2]|0)+69>>0]|0|0){k=c[k>>2]|0;l=m;return k|0}if(Jd(c[h>>2]|0,c[i>>2]|0)|0){c[k>>2]=od(c[h>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;if(!(c[k>>2]|0)){k=c[k>>2]|0;l=m;return k|0}MR(c[k>>2]|0,c[i>>2]|0,e[(c[h>>2]|0)+256+4>>1]|0|0)|0;Hd(c[h>>2]|0,c[i>>2]|0);k=c[k>>2]|0;l=m;return k|0}else{c[k>>2]=Qd(c[i>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;if(c[k>>2]|0){k=c[k>>2]|0;l=m;return k|0}yd(c[h>>2]|0);k=c[k>>2]|0;l=m;return k|0}return 0}function Fj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[g>>2]=Nd(c[e>>2]|0,c[g>>2]|0)|0;if((c[g>>2]|0)<=0){l=h;return}MR((c[(c[e>>2]|0)+8>>2]|0)+(c[(c[e>>2]|0)+12>>2]|0)|0,c[f>>2]|0,c[g>>2]|0)|0;f=(c[e>>2]|0)+12|0;c[f>>2]=(c[f>>2]|0)+(c[g>>2]|0);l=h;return}function Gj(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0))break;c[e>>2]=c[(c[(c[b>>2]|0)+16>>2]|0)+(c[d>>2]<<4)+4>>2];if(c[e>>2]|0)c[(c[(c[e>>2]|0)+4>>2]|0)+4>>2]=c[c[e>>2]>>2];c[d>>2]=(c[d>>2]|0)+1}l=f;return}function Hj(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[(c[b>>2]|0)+4>>2]>>2]|0}function Ij(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=f;return}qk(c[d>>2]|0,c[(c[e>>2]|0)+28>>2]|0);Hd(c[d>>2]|0,c[c[e>>2]>>2]|0);Hd(c[d>>2]|0,c[(c[e>>2]|0)+4>>2]|0);ck(c[d>>2]|0,c[(c[e>>2]|0)+12>>2]|0);hk(c[d>>2]|0,c[(c[e>>2]|0)+16>>2]|0);Hd(c[d>>2]|0,c[e>>2]|0);l=f;return}function Jj(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+4|0;f=h;c[e>>2]=a;c[f>>2]=d;if(!(c[f>>2]|0)){l=h;return}if(!(c[e>>2]|0?(c[(c[e>>2]|0)+456>>2]|0)!=0:0))g=4;if((g|0)==4?(d=(c[f>>2]|0)+36|0,g=(b[d>>1]|0)+-1<<16>>16,b[d>>1]=g,(g&65535|0)>0):0){l=h;return}Uj(c[e>>2]|0,c[f>>2]|0);l=h;return}function Kj(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;h=k+16|0;i=k+12|0;f=k+8|0;g=k+4|0;j=k;c[h>>2]=a;c[i>>2]=d;Lj(c[(c[i>>2]|0)+100>>2]|0,e[(c[i>>2]|0)+140>>1]<<1);c[f>>2]=c[(c[i>>2]|0)+200>>2];while(1){if(!(c[f>>2]|0))break;c[g>>2]=c[(c[f>>2]|0)+20>>2];Mj(c[h>>2]|0,c[c[f>>2]>>2]|0,c[(c[f>>2]|0)+4>>2]|0);Hd(c[h>>2]|0,c[f>>2]|0);c[f>>2]=c[g>>2]}if((c[(c[i>>2]|0)+20>>2]|0)!=381479589){Lj(c[(c[i>>2]|0)+116>>2]|0,b[(c[i>>2]|0)+16>>1]|0);c[j>>2]=(b[(c[i>>2]|0)+18>>1]|0)-1;while(1){a=c[h>>2]|0;d=c[(c[i>>2]|0)+120>>2]|0;if((c[j>>2]|0)<0)break;Hd(a,c[d+(c[j>>2]<<2)>>2]|0);c[j>>2]=(c[j>>2]|0)+-1}Hd(a,d);Hd(c[h>>2]|0,c[(c[i>>2]|0)+180>>2]|0)}Mj(c[h>>2]|0,c[(c[i>>2]|0)+88>>2]|0,c[(c[i>>2]|0)+136>>2]|0);Hd(c[h>>2]|0,c[(c[i>>2]|0)+100>>2]|0);Hd(c[h>>2]|0,c[(c[i>>2]|0)+176>>2]|0);l=k;return}function Lj(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+12|0;f=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[f>>2]=d;if(!((c[g>>2]|0)!=0&(c[f>>2]|0)!=0)){l=j;return}c[h>>2]=(c[g>>2]|0)+((c[f>>2]|0)*40|0);c[i>>2]=c[(c[g>>2]|0)+32>>2];if(c[(c[i>>2]|0)+456>>2]|0){do{if(c[(c[g>>2]|0)+24>>2]|0)Hd(c[i>>2]|0,c[(c[g>>2]|0)+20>>2]|0);f=(c[g>>2]|0)+40|0;c[g>>2]=f}while(f>>>0<(c[h>>2]|0)>>>0);l=j;return}do{a=c[g>>2]|0;if(!((e[(c[g>>2]|0)+8>>1]|0)&9312|0)){if(c[a+24>>2]|0){Hd(c[i>>2]|0,c[(c[g>>2]|0)+20>>2]|0);c[(c[g>>2]|0)+24>>2]=0}}else Lh(a);b[(c[g>>2]|0)+8>>1]=128;f=(c[g>>2]|0)+40|0;c[g>>2]=f}while(f>>>0<(c[h>>2]|0)>>>0);l=j;return}function Mj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;if(!(c[g>>2]|0)){h=c[f>>2]|0;i=c[g>>2]|0;Hd(h,i);l=j;return}c[i>>2]=c[g>>2];while(1){if((c[i>>2]|0)>>>0>=((c[g>>2]|0)+((c[h>>2]|0)*20|0)|0)>>>0)break;if(a[(c[i>>2]|0)+1>>0]|0)Nj(c[f>>2]|0,a[(c[i>>2]|0)+1>>0]|0,c[(c[i>>2]|0)+16>>2]|0);c[i>>2]=(c[i>>2]|0)+20}h=c[f>>2]|0;i=c[g>>2]|0;Hd(h,i);l=j;return}function Nj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;h=g+4|0;f=g;c[e>>2]=a;c[h>>2]=b;c[f>>2]=d;a:do switch(c[h>>2]|0){case -21:{Oj(c[e>>2]|0,c[f>>2]|0);break}case -15:case -1:case -13:case -12:{Hd(c[e>>2]|0,c[f>>2]|0);break}case -6:{if(!(c[(c[e>>2]|0)+456>>2]|0))Pj(c[f>>2]|0);break}case -11:{if(!(c[(c[e>>2]|0)+456>>2]|0))Kd(c[f>>2]|0);break}case -5:{Qj(c[e>>2]|0,c[f>>2]|0);break}case -8:if(!(c[(c[e>>2]|0)+456>>2]|0)){Rj(c[f>>2]|0);break a}else{Sj(c[e>>2]|0,c[f>>2]|0);break a}case -10:{if(!(c[(c[e>>2]|0)+456>>2]|0))Tj(c[f>>2]|0);break}default:{}}while(0);l=g;return}function Oj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;Qj(c[f>>2]|0,c[(c[e>>2]|0)+4>>2]|0);Hd(c[f>>2]|0,c[e>>2]|0);l=d;return}function Pj(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}a=c[b>>2]|0;c[a>>2]=(c[a>>2]|0)+-1;if(c[c[b>>2]>>2]|0){l=d;return}Hd(c[(c[b>>2]|0)+12>>2]|0,c[b>>2]|0);l=d;return}function Qj(a,b){a=a|0;b=b|0;var d=0,f=0,g=0;g=l;l=l+16|0;d=g+4|0;f=g;c[d>>2]=a;c[f>>2]=b;if(!((e[(c[f>>2]|0)+2>>1]|0)&16)){l=g;return}Hd(c[d>>2]|0,c[f>>2]|0);l=g;return}function Rj(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}Lh(c[b>>2]|0);Hd(c[(c[b>>2]|0)+32>>2]|0,c[b>>2]|0);l=d;return}function Sj(a,b){a=a|0;b=b|0;var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+4>>2]|0;c[h>>2]=d;if(!d){l=i;return}c[g>>2]=0;while(1){a=c[e>>2]|0;if((c[g>>2]|0)>=(b[(c[f>>2]|0)+34>>1]|0))break;Hd(a,c[c[h>>2]>>2]|0);ck(c[e>>2]|0,c[(c[h>>2]|0)+4>>2]|0);Hd(c[e>>2]|0,c[(c[h>>2]|0)+8>>2]|0);c[g>>2]=(c[g>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+16}Hd(a,c[(c[f>>2]|0)+4>>2]|0);l=i;return}function Zj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=f;return}ek(c[d>>2]|0,c[e>>2]|0,1);l=f;return}function _j(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=f;return}bk(c[d>>2]|0,c[e>>2]|0);l=f;return}function $j(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(!(c[d>>2]|0?(c[(c[d>>2]|0)+456>>2]|0)!=0:0))ak(0,c[e>>2]|0)|0;if(!(c[(c[e>>2]|0)+52>>2]|0)){l=g;return}c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[e>>2]|0)+48>>2]|0))break;if((c[f>>2]|0)!=1)Hd(c[d>>2]|0,c[(c[(c[e>>2]|0)+52>>2]|0)+(c[f>>2]<<2)>>2]|0);c[f>>2]=(c[f>>2]|0)+1}Hd(c[d>>2]|0,c[(c[e>>2]|0)+52>>2]|0);l=g;return}function ak(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;c[g>>2]=c[(c[e>>2]|0)+56>>2];c[(c[e>>2]|0)+56>>2]=0;while(1){if(!(c[g>>2]|0))break;c[h>>2]=c[c[g>>2]>>2];c[i>>2]=c[(c[g>>2]|0)+24>>2];if((c[h>>2]|0)==(c[d>>2]|0)){c[f>>2]=c[g>>2];c[(c[e>>2]|0)+56>>2]=c[f>>2];c[(c[f>>2]|0)+24>>2]=0}else{c[(c[g>>2]|0)+24>>2]=c[(c[h>>2]|0)+344>>2];c[(c[h>>2]|0)+344>>2]=c[g>>2]}c[g>>2]=c[i>>2]}l=j;return c[f>>2]|0}function bk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;c[g>>2]=c[(c[e>>2]|0)+4>>2];c[f>>2]=0;while(1){a=c[d>>2]|0;if((c[f>>2]|0)>=(c[c[e>>2]>>2]|0))break;ck(a,c[c[g>>2]>>2]|0);Hd(c[d>>2]|0,c[(c[g>>2]|0)+4>>2]|0);Hd(c[d>>2]|0,c[(c[g>>2]|0)+8>>2]|0);c[f>>2]=(c[f>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+20}Hd(a,c[(c[e>>2]|0)+4>>2]|0);Hd(c[d>>2]|0,c[e>>2]|0);l=h;return}function ck(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=f;return}dk(c[d>>2]|0,c[e>>2]|0);l=f;return}function dk(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=b;do if(!(c[(c[f>>2]|0)+4>>2]&8404992)){if(c[(c[f>>2]|0)+12>>2]|0?(d[c[f>>2]>>0]|0|0)!=159:0)dk(c[e>>2]|0,c[(c[f>>2]|0)+12>>2]|0);ck(c[e>>2]|0,c[(c[f>>2]|0)+16>>2]|0);a=c[e>>2]|0;b=(c[f>>2]|0)+20|0;if(c[(c[f>>2]|0)+4>>2]&2048|0){Zj(a,c[b>>2]|0);break}else{_j(a,c[b>>2]|0);break}}while(0);if(c[(c[f>>2]|0)+4>>2]&65536|0)Hd(c[e>>2]|0,c[(c[f>>2]|0)+8>>2]|0);if(c[(c[f>>2]|0)+4>>2]&32768|0){l=g;return}Hd(c[e>>2]|0,c[f>>2]|0);l=g;return}function ek(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;while(1){if(!(c[f>>2]|0))break;c[h>>2]=c[(c[f>>2]|0)+48>>2];_j(c[e>>2]|0,c[c[f>>2]>>2]|0);fk(c[e>>2]|0,c[(c[f>>2]|0)+28>>2]|0);ck(c[e>>2]|0,c[(c[f>>2]|0)+32>>2]|0);_j(c[e>>2]|0,c[(c[f>>2]|0)+36>>2]|0);ck(c[e>>2]|0,c[(c[f>>2]|0)+40>>2]|0);_j(c[e>>2]|0,c[(c[f>>2]|0)+44>>2]|0);ck(c[e>>2]|0,c[(c[f>>2]|0)+56>>2]|0);ck(c[e>>2]|0,c[(c[f>>2]|0)+60>>2]|0);if(c[(c[f>>2]|0)+64>>2]|0)gk(c[e>>2]|0,c[(c[f>>2]|0)+64>>2]|0);if(c[g>>2]|0)Hd(c[e>>2]|0,c[f>>2]|0);c[f>>2]=c[h>>2];c[g>>2]=1}l=i;return}function fk(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){l=i;return}c[h>>2]=(c[f>>2]|0)+8;c[g>>2]=0;while(1){a=c[e>>2]|0;if((c[g>>2]|0)>=(c[c[f>>2]>>2]|0))break;Hd(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[f>>2]=(c[f>>2]|0)+1}Hd(a,b);Hd(c[d>>2]|0,c[e>>2]|0);l=g;return}function ik(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=g;return}c[f>>2]=c[(c[e>>2]|0)+28>>2];ck(c[d>>2]|0,c[(c[f>>2]|0)+16>>2]|0);_j(c[d>>2]|0,c[(c[f>>2]|0)+20>>2]|0);Zj(c[d>>2]|0,c[(c[f>>2]|0)+8>>2]|0);ck(c[d>>2]|0,c[(c[e>>2]|0)+12>>2]|0);Hd(c[d>>2]|0,c[e>>2]|0);l=g;return}function jk(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return}function kk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+28|0;f=n+24|0;i=n+20|0;g=n+16|0;j=n+12|0;k=n+8|0;h=n+4|0;e=n;c[f>>2]=a;c[i>>2]=b;c[g>>2]=d;if(c[(c[f>>2]|0)+12>>2]|0){d=nk(c[i>>2]|0)|0;c[h>>2]=(d>>>0)%((c[c[f>>2]>>2]|0)>>>0)|0;c[e>>2]=(c[(c[f>>2]|0)+12>>2]|0)+(c[h>>2]<<3);c[j>>2]=c[(c[e>>2]|0)+4>>2];c[k>>2]=c[c[e>>2]>>2]}else{c[h>>2]=0;c[j>>2]=c[(c[f>>2]|0)+8>>2];c[k>>2]=c[(c[f>>2]|0)+4>>2]}c[c[g>>2]>>2]=c[h>>2];while(1){h=c[k>>2]|0;c[k>>2]=h+-1;if(!h){a=9;break}h=(Ig(c[(c[j>>2]|0)+12>>2]|0,c[i>>2]|0)|0)==0;b=c[j>>2]|0;if(h){a=7;break}c[j>>2]=c[b>>2]}if((a|0)==7){c[m>>2]=b;m=c[m>>2]|0;l=n;return m|0}else if((a|0)==9){c[m>>2]=0;m=c[m>>2]|0;l=n;return m|0}return 0}function lk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[(c[f>>2]|0)+4>>2]|0)a=c[(c[f>>2]|0)+4>>2]|0;else a=(c[e>>2]|0)+8|0;c[a>>2]=c[c[f>>2]>>2];if(c[c[f>>2]>>2]|0)c[(c[c[f>>2]>>2]|0)+4>>2]=c[(c[f>>2]|0)+4>>2];if(c[(c[e>>2]|0)+12>>2]|0){c[h>>2]=(c[(c[e>>2]|0)+12>>2]|0)+(c[g>>2]<<3);if((c[(c[h>>2]|0)+4>>2]|0)==(c[f>>2]|0))c[(c[h>>2]|0)+4>>2]=c[c[f>>2]>>2];h=c[h>>2]|0;c[h>>2]=(c[h>>2]|0)+-1}Kd(c[f>>2]|0);h=(c[e>>2]|0)+4|0;c[h>>2]=(c[h>>2]|0)+-1;if(c[(c[e>>2]|0)+4>>2]|0){l=i;return}pk(c[e>>2]|0);l=i;return}function mk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[e>>2]=a;c[f>>2]=b;c[f>>2]=c[f>>2]<<3>>>0>1024?128:b;if((c[f>>2]|0)==(c[c[e>>2]>>2]|0)){c[d>>2]=0;j=c[d>>2]|0;l=k;return j|0}zg();c[g>>2]=pd(c[f>>2]<<3,0)|0;Bg();if(!(c[g>>2]|0)){c[d>>2]=0;j=c[d>>2]|0;l=k;return j|0}Kd(c[(c[e>>2]|0)+12>>2]|0);c[(c[e>>2]|0)+12>>2]=c[g>>2];b=((ud(c[g>>2]|0)|0)>>>0)/8|0;c[f>>2]=b;c[c[e>>2]>>2]=b;GR(c[g>>2]|0,0,c[f>>2]<<3|0)|0;c[h>>2]=c[(c[e>>2]|0)+8>>2];c[(c[e>>2]|0)+8>>2]=0;while(1){if(!(c[h>>2]|0))break;b=nk(c[(c[h>>2]|0)+12>>2]|0)|0;c[j>>2]=(b>>>0)%((c[f>>2]|0)>>>0)|0;c[i>>2]=c[c[h>>2]>>2];ok(c[e>>2]|0,(c[g>>2]|0)+(c[j>>2]<<3)|0,c[h>>2]|0);c[h>>2]=c[i>>2]}c[d>>2]=1;j=c[d>>2]|0;l=k;return j|0}function nk(b){b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+4|0;f=h;g=h+8|0;c[e>>2]=b;c[f>>2]=0;while(1){b=c[e>>2]|0;c[e>>2]=b+1;b=a[b>>0]|0;a[g>>0]=b;if(!(b&255))break;c[f>>2]=(c[f>>2]|0)+(d[17348+(d[g>>0]|0)>>0]|0);c[f>>2]=O(c[f>>2]|0,-1640531535)|0}l=h;return c[f>>2]|0}function ok(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[f>>2]|0){if(c[c[f>>2]>>2]|0)a=c[(c[f>>2]|0)+4>>2]|0;else a=0;c[h>>2]=a;d=c[f>>2]|0;c[d>>2]=(c[d>>2]|0)+1;c[(c[f>>2]|0)+4>>2]=c[g>>2]}else c[h>>2]=0;if(!(c[h>>2]|0)){c[c[g>>2]>>2]=c[(c[e>>2]|0)+8>>2];if(c[(c[e>>2]|0)+8>>2]|0)c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]=c[g>>2];c[(c[g>>2]|0)+4>>2]=0;c[(c[e>>2]|0)+8>>2]=c[g>>2];l=i;return}c[c[g>>2]>>2]=c[h>>2];c[(c[g>>2]|0)+4>>2]=c[(c[h>>2]|0)+4>>2];if(c[(c[h>>2]|0)+4>>2]|0)a=c[(c[h>>2]|0)+4>>2]|0;else a=(c[e>>2]|0)+8|0;c[a>>2]=c[g>>2];c[(c[h>>2]|0)+4>>2]=c[g>>2];l=i;return}function pk(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+8>>2];c[(c[b>>2]|0)+8>>2]=0;Kd(c[(c[b>>2]|0)+12>>2]|0);c[(c[b>>2]|0)+12>>2]=0;c[c[b>>2]>>2]=0;while(1){if(!(c[d>>2]|0))break;c[e>>2]=c[c[d>>2]>>2];Kd(c[d>>2]|0);c[d>>2]=c[e>>2]}c[(c[b>>2]|0)+4>>2]=0;l=f;return}function qk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;while(1){if(!(c[e>>2]|0))break;c[f>>2]=c[e>>2];c[e>>2]=c[(c[e>>2]|0)+28>>2];ck(c[d>>2]|0,c[(c[f>>2]|0)+16>>2]|0);_j(c[d>>2]|0,c[(c[f>>2]|0)+20>>2]|0);Zj(c[d>>2]|0,c[(c[f>>2]|0)+8>>2]|0);hk(c[d>>2]|0,c[(c[f>>2]|0)+24>>2]|0);Hd(c[d>>2]|0,c[f>>2]|0)}l=g;return}function rk(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=tb[c[140>>2]&255](c[(c[d>>2]|0)+44>>2]|0)|0;l=b;return a|0}function sk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+48|0;e=i+32|0;f=i+24|0;g=i+16|0;h=i+8|0;d=i;j=i+40|0;k=f;c[k>>2]=a;c[k+4>>2]=b;c[j>>2]=Rd()|0;if(c[j>>2]|0){j=e;c[j>>2]=-1;c[j+4>>2]=-1;j=e;k=j;k=c[k>>2]|0;j=j+4|0;j=c[j>>2]|0;z=j;l=i;return k|0}b=46712;j=c[b+4>>2]|0;k=g;c[k>>2]=c[b>>2];c[k+4>>2]=j;if((c[f+4>>2]|0)<0){h=g;k=c[h+4>>2]|0;j=e;c[j>>2]=c[h>>2];c[j+4>>2]=k;j=e;k=j;k=c[k>>2]|0;j=j+4|0;j=c[j>>2]|0;z=j;l=i;return k|0}b=f;k=c[b+4>>2]|0;j=46712;c[j>>2]=c[b>>2];c[j+4>>2]=k;j=sd(0)|0;k=d;c[k>>2]=j;c[k+4>>2]=z;k=f;j=c[k+4>>2]|0;if((j|0)>0|(j|0)==0&(c[k>>2]|0)>>>0>0){k=f;b=c[k+4>>2]|0;a=d;j=c[a+4>>2]|0;a=(b|0)<(j|0)|((b|0)==(j|0)?(c[k>>2]|0)>>>0<=(c[a>>2]|0)>>>0:0)}else a=0;c[11683]=a&1;k=tk()|0;j=f;j=FR(k|0,z|0,c[j>>2]|0,c[j+4>>2]|0)|0;k=h;c[k>>2]=j;c[k+4>>2]=z;k=h;j=c[k+4>>2]|0;if((j|0)>0|(j|0)==0&(c[k>>2]|0)>>>0>0)wd(c[h>>2]&2147483647)|0;h=g;k=c[h+4>>2]|0;j=e;c[j>>2]=c[h>>2];c[j+4>>2]=k;j=e;k=j;k=c[k>>2]|0;j=j+4|0;j=c[j>>2]|0;z=j;l=i;return k|0}function tk(){var a=0,b=0;b=l;l=l+16|0;a=b+8|0;bd(0,a,b,0)|0;z=c[a+4>>2]|0;l=b;return c[a>>2]|0}function uk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=b;a=c[f>>2]|0;do if(c[e>>2]|0)if(!a){c[d>>2]=1;break}else{c[d>>2]=Ig(c[e>>2]|0,c[f>>2]|0)|0;break}else c[d>>2]=a|0?-1:0;while(0);l=g;return c[d>>2]|0}function vk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+28|0;g=k+24|0;h=k+20|0;i=k+16|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[(c[f>>2]|0)+52>>2]=c[g>>2];Mo(c[f>>2]|0,c[g>>2]|0);a=c[f>>2]|0;if(!(c[h>>2]|0)){wk(a,c[g>>2]|0);l=k;return}if((c[a+244>>2]|0)==0?(g=Oo(c[f>>2]|0)|0,c[(c[f>>2]|0)+244>>2]=g,(g|0)==0):0){l=k;return}c[j>>2]=e;c[i>>2]=Cj(c[f>>2]|0,c[h>>2]|0,j)|0;Po(c[(c[f>>2]|0)+244>>2]|0,-1,c[i>>2]|0,1,169);l=k;return}function wk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;c[(c[d>>2]|0)+52>>2]=c[e>>2];if((c[e>>2]|0)==0?(c[(c[d>>2]|0)+244>>2]|0)==0:0){l=f;return}Ko(c[d>>2]|0,c[e>>2]|0);l=f;return}function xk(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return (d[(c[b>>2]|0)+8>>0]|0|0)!=0|0}function yk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;g=h+4|0;f=h;c[d>>2]=a;c[e>>2]=b;c[g>>2]=-1;if(!(c[e>>2]|0)){g=c[g>>2]|0;l=h;return g|0}c[g>>2]=(c[(c[d>>2]|0)+20>>2]|0)-1;c[f>>2]=(c[(c[d>>2]|0)+16>>2]|0)+(c[g>>2]<<4);while(1){if((c[g>>2]|0)<0){a=6;break}if(!(Ig(c[c[f>>2]>>2]|0,c[e>>2]|0)|0)){a=6;break}c[g>>2]=(c[g>>2]|0)+-1;c[f>>2]=(c[f>>2]|0)+-16}if((a|0)==6){g=c[g>>2]|0;l=h;return g|0}return 0}function zk(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;i=j;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;c[e>>2]=b;c[f>>2]=c[c[e>>2]>>2];if((c[(c[(c[f>>2]|0)+16>>2]|0)+16+4>>2]|0)==0?(a[(c[e>>2]|0)+409>>0]|0)==0:0){c[g>>2]=Bk(c[c[f>>2]>>2]|0,0,c[f>>2]|0,h,0,542)|0;if(c[g>>2]|0){Ck(c[e>>2]|0,21678,i);c[(c[e>>2]|0)+12>>2]=c[g>>2];c[d>>2]=1;i=c[d>>2]|0;l=j;return i|0}c[(c[(c[f>>2]|0)+16>>2]|0)+16+4>>2]=c[h>>2];if(7==(Dk(c[h>>2]|0,c[(c[f>>2]|0)+80>>2]|0,-1,0)|0)){yd(c[f>>2]|0);c[d>>2]=1;i=c[d>>2]|0;l=j;return i|0}}c[d>>2]=0;i=c[d>>2]|0;l=j;return i|0}function Ak(b){b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;if(!(c[e>>2]|0)){l=g;return}c[f>>2]=c[c[e>>2]>>2];Hd(c[f>>2]|0,c[(c[e>>2]|0)+76>>2]|0);_j(c[f>>2]|0,c[(c[e>>2]|0)+80>>2]|0);if(c[f>>2]|0){f=(c[f>>2]|0)+256|0;c[f>>2]=(c[f>>2]|0)-(d[(c[e>>2]|0)+24>>0]|0)}a[(c[e>>2]|0)+24>>0]=0;l=g;return}function Bk(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;I=l;l=l+192|0;H=I+76|0;y=I+72|0;z=I+68|0;A=I+64|0;C=I+60|0;m=I+56|0;n=I+52|0;D=I+48|0;E=I+44|0;F=I+36|0;o=I+180|0;p=I+80|0;q=I+32|0;r=I+28|0;s=I+24|0;t=I+20|0;u=I+16|0;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0;c[D>>2]=c[11758];while(1){if(!(c[D>>2]|0))break;t=c[u>>2]|0;if(0==(vQ(t,Xk(c[c[D>>2]>>2]|0,0)|0)|0)?(t=Yk(c[c[D>>2]>>2]|0)|0,(t|0)==(c[y>>2]|0)):0){B=29;break}c[D>>2]=c[(c[D>>2]|0)+68>>2]}do if((B|0)==29){c[v>>2]=(c[(c[A>>2]|0)+20>>2]|0)-1;while(1){if((c[v>>2]|0)<0){B=35;break}c[w>>2]=c[(c[(c[A>>2]|0)+16>>2]|0)+(c[v>>2]<<4)+4>>2];if(c[w>>2]|0?(c[(c[w>>2]|0)+4>>2]|0)==(c[D>>2]|0):0)break;c[v>>2]=(c[v>>2]|0)+-1}if((B|0)==35){c[(c[E>>2]|0)+4>>2]=c[D>>2];w=(c[D>>2]|0)+64|0;c[w>>2]=(c[w>>2]|0)+1;break}Kd(c[u>>2]|0);Kd(c[E>>2]|0);c[H>>2]=19;H=c[H>>2]|0;l=I;return H|0}while(0);Kd(c[u>>2]|0)}}while(0);do if(!(c[D>>2]|0)){c[D>>2]=Cg(84,0)|0;if(!(c[D>>2]|0)){c[F>>2]=7;break}c[F>>2]=_k(c[y>>2]|0,c[D>>2]|0,c[z>>2]|0,88,c[m>>2]|0,c[n>>2]|0,149)|0;if(!(c[F>>2]|0)){y=(c[A>>2]|0)+40|0;$k(c[c[D>>2]>>2]|0,c[y>>2]|0,c[y+4>>2]|0);c[F>>2]=al(c[c[D>>2]>>2]|0,100,p)|0}if(!(c[F>>2]|0)){a[(c[D>>2]|0)+16>>0]=c[m>>2];c[(c[D>>2]|0)+4>>2]=c[A>>2];cl(c[c[D>>2]>>2]|0,170,c[D>>2]|0);c[(c[E>>2]|0)+4>>2]=c[D>>2];c[(c[D>>2]|0)+8>>2]=0;c[(c[D>>2]|0)+12>>2]=0;if((dl(c[c[D>>2]>>2]|0)|0)<<24>>24){y=(c[D>>2]|0)+22|0;b[y>>1]=e[y>>1]|1}c[(c[D>>2]|0)+32>>2]=d[p+16>>0]<<8|d[p+17>>0]<<16;if(((c[(c[D>>2]|0)+32>>2]|0)>>>0>=512?(c[(c[D>>2]|0)+32>>2]|0)>>>0<=65536:0)?!((c[(c[D>>2]|0)+32>>2]|0)-1&c[(c[D>>2]|0)+32>>2]|0):0){a[o>>0]=a[p+20>>0]|0;z=(c[D>>2]|0)+22|0;b[z>>1]=e[z>>1]|2;z=(el(p+52|0)|0)!=0;a[(c[D>>2]|0)+17>>0]=z?1:0;z=(el(p+64|0)|0)!=0;a[(c[D>>2]|0)+18>>0]=z?1:0}else{c[(c[D>>2]|0)+32>>2]=0;if(!((c[z>>2]|0)==0|(c[r>>2]|0)!=0)){a[(c[D>>2]|0)+17>>0]=0;a[(c[D>>2]|0)+18>>0]=0}a[o>>0]=0}c[F>>2]=Gk(c[c[D>>2]>>2]|0,(c[D>>2]|0)+32|0,d[o>>0]|0)|0;if(!(c[F>>2]|0)){c[(c[D>>2]|0)+36>>2]=(c[(c[D>>2]|0)+32>>2]|0)-(d[o>>0]|0);c[(c[D>>2]|0)+64>>2]=1;if(a[(c[E>>2]|0)+9>>0]|0){c[(c[D>>2]|0)+68>>2]=c[11758];c[11758]=c[D>>2];B=56}else B=56}}}else B=56;while(0);if((B|0)==56){a:do if(a[(c[E>>2]|0)+9>>0]|0){c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[A>>2]|0)+20>>2]|0))break a;B=c[(c[(c[A>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2]|0;c[G>>2]=B;if(B|0?d[(c[G>>2]|0)+9>>0]|0:0)break;c[x>>2]=(c[x>>2]|0)+1}while(1){if(!(c[(c[G>>2]|0)+28>>2]|0))break;c[G>>2]=c[(c[G>>2]|0)+28>>2]}if((c[(c[E>>2]|0)+4>>2]|0)>>>0<(c[(c[G>>2]|0)+4>>2]|0)>>>0){c[(c[E>>2]|0)+24>>2]=c[G>>2];c[(c[E>>2]|0)+28>>2]=0;c[(c[G>>2]|0)+28>>2]=c[E>>2];break}while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|0;h=o;c[p>>2]=a;c[j>>2]=d;c[k>>2]=f;c[m>>2]=g;c[n>>2]=0;c[h>>2]=c[(c[p>>2]|0)+4>>2];Ek(c[p>>2]|0);if((e[(c[h>>2]|0)+22>>1]|0)&2|0){c[i>>2]=8;p=c[i>>2]|0;l=o;return p|0}if((c[k>>2]|0)<0)c[k>>2]=(c[(c[h>>2]|0)+32>>2]|0)-(c[(c[h>>2]|0)+36>>2]|0);if((c[j>>2]|0)>=512&(c[j>>2]|0)<=65536?((c[j>>2]|0)-1&c[j>>2]|0)==0:0){c[(c[h>>2]|0)+32>>2]=c[j>>2];Fk(c[h>>2]|0)}c[n>>2]=Gk(c[c[h>>2]>>2]|0,(c[h>>2]|0)+32|0,c[k>>2]|0)|0;c[(c[h>>2]|0)+36>>2]=(c[(c[h>>2]|0)+32>>2]|0)-(c[k>>2]&65535);if(c[m>>2]|0){p=(c[h>>2]|0)+22|0;b[p>>1]=e[p>>1]|0|2}c[i>>2]=c[n>>2];p=c[i>>2]|0;l=o;return p|0}function Ek(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[(c[(c[d>>2]|0)+4>>2]|0)+4>>2]=c[c[d>>2]>>2];l=b;return}function Fk(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[(c[b>>2]|0)+80>>2]|0)){l=d;return}a=(c[b>>2]|0)+80|0;c[a>>2]=(c[a>>2]|0)+-4;Mk(c[(c[b>>2]|0)+80>>2]|0);c[(c[b>>2]|0)+80>>2]=0;l=d;return}function Gk(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;g=p+28|0;h=p+24|0;i=p+20|0;j=p+16|0;k=p+12|0;m=p+8|0;n=p;c[g>>2]=a;c[h>>2]=e;c[i>>2]=f;c[j>>2]=0;c[k>>2]=c[c[h>>2]>>2];if(!((d[(c[g>>2]|0)+16>>0]|0)!=0?(c[(c[g>>2]|0)+28>>2]|0)!=0:0))o=3;do if(((o|0)==3?(o=(Hk(c[(c[g>>2]|0)+212>>2]|0)|0)==0,o&(c[k>>2]|0)!=0):0)?(c[k>>2]|0)!=(c[(c[g>>2]|0)+160>>2]|0):0){c[m>>2]=0;o=n;c[o>>2]=0;c[o+4>>2]=0;if((d[(c[g>>2]|0)+17>>0]|0)>0?c[c[(c[g>>2]|0)+64>>2]>>2]|0:0)c[j>>2]=Ik(c[(c[g>>2]|0)+64>>2]|0,n)|0;if((c[j>>2]|0)==0?(c[m>>2]=Jk(c[k>>2]|0)|0,(c[m>>2]|0)==0):0)c[j>>2]=7;if(!(c[j>>2]|0)){Kk(c[g>>2]|0);c[j>>2]=Lk(c[(c[g>>2]|0)+212>>2]|0,c[k>>2]|0)|0}if(!(c[j>>2]|0)){Mk(c[(c[g>>2]|0)+208>>2]|0);c[(c[g>>2]|0)+208>>2]=c[m>>2];o=n;o=IR(c[o>>2]|0,c[o+4>>2]|0,c[k>>2]|0,0)|0;o=FR(o|0,z|0,1,0)|0;o=LR(o|0,z|0,c[k>>2]|0,0)|0;c[(c[g>>2]|0)+28>>2]=o;c[(c[g>>2]|0)+160>>2]=c[k>>2];break}else{Mk(c[m>>2]|0);break}}while(0);c[c[h>>2]>>2]=c[(c[g>>2]|0)+160>>2];if(c[j>>2]|0){o=c[j>>2]|0;l=p;return o|0}if((c[i>>2]|0)<0)c[i>>2]=b[(c[g>>2]|0)+150>>1];b[(c[g>>2]|0)+150>>1]=c[i>>2];Nk(c[g>>2]|0);o=c[j>>2]|0;l=p;return o|0}function Hk(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+12>>2]|0}function Ik(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=yb[c[(c[c[f>>2]>>2]|0)+24>>2]&255](c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function Jk(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Ag(c[d>>2]|0)|0;l=b;return a|0}function Kk(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)+108|0;c[a>>2]=(c[a>>2]|0)+1;Pk(c[(c[d>>2]|0)+96>>2]|0);Qk(c[(c[d>>2]|0)+212>>2]|0);l=b;return}function Lk(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=a;c[g>>2]=b;if(c[(c[f>>2]|0)+24>>2]|0){c[h>>2]=ob[c[132>>2]&255](c[g>>2]|0,(c[(c[f>>2]|0)+28>>2]|0)+40|0,d[(c[f>>2]|0)+32>>0]|0)|0;if(!(c[h>>2]|0)){c[e>>2]=7;h=c[e>>2]|0;l=i;return h|0}j=c[34]|0;a=c[h>>2]|0;b=Ok(c[f>>2]|0)|0;rb[j&255](a,b);if(c[(c[f>>2]|0)+44>>2]|0)qb[c[160>>2]&255](c[(c[f>>2]|0)+44>>2]|0);c[(c[f>>2]|0)+44>>2]=c[h>>2];c[(c[f>>2]|0)+24>>2]=c[g>>2]}c[e>>2]=0;j=c[e>>2]|0;l=i;return j|0}function Mk(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;rg(c[d>>2]|0);l=b;return}function Nk(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;l=b;return}function Ok(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;a=c[(c[d>>2]|0)+16>>2]|0;if((c[(c[d>>2]|0)+16>>2]|0)>=0){c[b>>2]=a;d=c[b>>2]|0;l=e;return d|0}else{a=RR(-1024,-1,a|0,((a|0)<0)<<31>>31|0)|0;d=(c[(c[d>>2]|0)+24>>2]|0)+(c[(c[d>>2]|0)+28>>2]|0)|0;d=LR(a|0,z|0,d|0,((d|0)<0)<<31>>31|0)|0;c[b>>2]=d;d=c[b>>2]|0;l=e;return d|0}return 0}function Pk(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];while(1){if(!(c[b>>2]|0))break;c[(c[b>>2]|0)+16>>2]=1;c[b>>2]=c[(c[b>>2]|0)+44>>2]}l=d;return}function Qk(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Rk(c[d>>2]|0,0);l=b;return}function Rk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[d>>2]=a;c[e>>2]=b;if(!(c[(c[d>>2]|0)+44>>2]|0)){l=i;return}c[f>>2]=c[c[d>>2]>>2];while(1){if(!(c[f>>2]|0))break;c[g>>2]=c[(c[f>>2]|0)+32>>2];if((c[(c[f>>2]|0)+20>>2]|0)>>>0>(c[e>>2]|0)>>>0)Sk(c[f>>2]|0);c[f>>2]=c[g>>2]}if(((c[e>>2]|0)==0?c[(c[d>>2]|0)+12>>2]|0:0)?(c[h>>2]=ob[c[144>>2]&255](c[(c[d>>2]|0)+44>>2]|0,1,0)|0,c[h>>2]|0):0){GR(c[c[h>>2]>>2]|0,0,c[(c[d>>2]|0)+24>>2]|0)|0;c[e>>2]=1}rb[c[156>>2]&255](c[(c[d>>2]|0)+44>>2]|0,(c[e>>2]|0)+1|0);l=i;return}function Sk(a){a=a|0;var d=0,f=0;f=l;l=l+16|0;d=f;c[d>>2]=a;if(!(e[(c[d>>2]|0)+24>>1]&2)){l=f;return}Tk(c[d>>2]|0,1);a=(c[d>>2]|0)+24|0;b[a>>1]=e[a>>1]&-15;a=(c[d>>2]|0)+24|0;b[a>>1]=e[a>>1]|1;if(b[(c[d>>2]|0)+26>>1]|0){l=f;return}Uk(c[d>>2]|0);l=f;return}function Tk(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;h=j+4|0;g=j+8|0;i=j;c[h>>2]=b;a[g>>0]=f;c[i>>2]=c[(c[h>>2]|0)+28>>2];if(d[g>>0]&1|0){if((c[(c[i>>2]|0)+8>>2]|0)==(c[h>>2]|0))c[(c[i>>2]|0)+8>>2]=c[(c[h>>2]|0)+36>>2];if(c[(c[h>>2]|0)+32>>2]|0)b=(c[(c[h>>2]|0)+32>>2]|0)+36|0;else b=(c[i>>2]|0)+4|0;c[b>>2]=c[(c[h>>2]|0)+36>>2];b=c[(c[h>>2]|0)+32>>2]|0;if(!(c[(c[h>>2]|0)+36>>2]|0)){c[c[i>>2]>>2]=b;if(!(c[c[i>>2]>>2]|0))a[(c[i>>2]|0)+33>>0]=2}else c[(c[(c[h>>2]|0)+36>>2]|0)+32>>2]=b;c[(c[h>>2]|0)+32>>2]=0;c[(c[h>>2]|0)+36>>2]=0}if(!(d[g>>0]&2)){l=j;return}c[(c[h>>2]|0)+32>>2]=c[c[i>>2]>>2];b=c[h>>2]|0;if(!(c[(c[h>>2]|0)+32>>2]|0)){c[(c[i>>2]|0)+4>>2]=b;if(a[(c[i>>2]|0)+32>>0]|0)a[(c[i>>2]|0)+33>>0]=1}else c[(c[(c[h>>2]|0)+32>>2]|0)+36>>2]=b;c[c[i>>2]>>2]=c[h>>2];if(c[(c[i>>2]|0)+8>>2]|0){l=j;return}if(e[(c[h>>2]|0)+24>>1]&8){l=j;return}c[(c[i>>2]|0)+8>>2]=c[h>>2];l=j;return}function Uk(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;if(!(a[(c[(c[d>>2]|0)+28>>2]|0)+32>>0]|0)){l=e;return}ub[c[148>>2]&255](c[(c[(c[d>>2]|0)+28>>2]|0)+44>>2]|0,c[c[d>>2]>>2]|0,0);l=e;return}function Vk(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return (d[(c[b>>2]|0)+68>>0]|0|0)==2|0}function Wk(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;g=l;l=l+16|0;k=g+12|0;j=g+8|0;i=g+4|0;h=g;c[k>>2]=b;c[j>>2]=d;c[i>>2]=e;c[h>>2]=f;a[c[h>>2]>>0]=0;f=wb[c[(c[k>>2]|0)+36>>2]&255](c[k>>2]|0,c[j>>2]|0,c[i>>2]|0,c[h>>2]|0)|0;l=g;return f|0}function Xk(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;f=l;l=l+16|0;e=f+4|0;g=f;c[e>>2]=a;c[g>>2]=b;if(c[g>>2]|0?d[(c[e>>2]|0)+16>>0]|0|0:0){g=47636;l=f;return g|0}g=c[(c[e>>2]|0)+176>>2]|0;l=f;return g|0}function Yk(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[b>>2]>>2]|0}function Zk(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=Vm(c[d>>2]|0)|0;if(!(a[c[e>>2]>>0]|0)){l=f;return}a[c[e>>2]>>0]=0;if((Ao(c[d>>2]|0)|0)<=1){l=f;return}Bo(c[e>>2]|0)|0;l=f;return}function _k(d,e,f,g,h,i,j){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;K=l;l=l+112|0;H=K+96|0;E=K+92|0;I=K+88|0;r=K+84|0;s=K+80|0;L=K+76|0;t=K+72|0;F=K+68|0;k=K+64|0;G=K+60|0;u=K+56|0;v=K+52|0;w=K+48|0;x=K+44|0;m=K+40|0;y=K+36|0;z=K+32|0;A=K+28|0;n=K+24|0;B=K+20|0;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0)|0;L=(c[(c[G>>2]|0)+220>>2]|0)+(c[z>>2]|0)|0;a[L>>0]=a[21885]|0;a[L+1>>0]=a[21886]|0;a[L+2>>0]=a[21887]|0;a[L+3>>0]=a[21888]|0;a[L+4>>0]=a[21889]|0;Hd(0,c[y>>2]|0)}c[c[G>>2]>>2]=c[E>>2];c[(c[G>>2]|0)+152>>2]=c[t>>2];do if(c[r>>2]|0?a[c[r>>2]>>0]|0:0){c[C>>2]=0;c[u>>2]=Zl(c[E>>2]|0,c[(c[G>>2]|0)+176>>2]|0,c[(c[G>>2]|0)+64>>2]|0,c[t>>2]|0,C)|0;c[x>>2]=c[C>>2]&1;if(!(c[u>>2]|0)){c[D>>2]=hm(c[(c[G>>2]|0)+64>>2]|0)|0;do if((c[x>>2]|0)==0?(gm(c[G>>2]|0),(c[B>>2]|0)>>>0<(c[(c[G>>2]|0)+156>>2]|0)>>>0):0)if((c[(c[G>>2]|0)+156>>2]|0)>>>0>8192){c[B>>2]=8192;break}else{c[B>>2]=c[(c[G>>2]|0)+156>>2];break}while(0);L=(uf(c[r>>2]|0,21891,0)|0)&255;a[(c[G>>2]|0)+14>>0]=L;if((c[D>>2]&8192|0)==0?(uf(c[r>>2]|0,21898,0)|0)==0:0)break;c[t>>2]=c[t>>2]|1;J=36}}else J=36;while(0);if((J|0)==36){c[v>>2]=1;a[(c[G>>2]|0)+17>>0]=1;a[(c[G>>2]|0)+18>>0]=4;a[(c[G>>2]|0)+14>>0]=1;c[x>>2]=c[t>>2]&1}if(!(c[u>>2]|0))c[u>>2]=Gk(c[G>>2]|0,B,-1)|0;if(!(c[u>>2]|0)){c[s>>2]=(c[s>>2]|0)+7&-8;c[u>>2]=io(c[B>>2]|0,c[s>>2]|0,((c[w>>2]|0)!=0^1)&1,(c[w>>2]|0)!=0^1?178:0,c[G>>2]|0,c[(c[G>>2]|0)+212>>2]|0)|0}if(c[u>>2]|0){ql(c[(c[G>>2]|0)+64>>2]|0);Mk(c[(c[G>>2]|0)+208>>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;if(!(c[c[(c[e>>2]|0)+64>>2]>>2]|0)){h=c[h>>2]|0;l=i;return h|0}g=km(c[(c[e>>2]|0)+64>>2]|0,c[g>>2]|0,c[f>>2]|0,0,0)|0;c[h>>2]=g;c[h>>2]=(c[h>>2]|0)==522?0:g;h=c[h>>2]|0;l=i;return h|0}function bl(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];a=co((c[(c[d>>2]|0)+4>>2]|0)+380|0)|0;l=b;return a|0}function cl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;e=g+12|0;i=g+8|0;h=g+4|0;f=g;c[e>>2]=a;c[i>>2]=b;c[h>>2]=d;c[(c[e>>2]|0)+184>>2]=c[i>>2];c[(c[e>>2]|0)+188>>2]=c[h>>2];if(!(c[c[(c[e>>2]|0)+64>>2]>>2]|0)){l=g;return}c[f>>2]=(c[e>>2]|0)+184;Gn(c[(c[e>>2]|0)+64>>2]|0,15,c[f>>2]|0);l=g;return}function dl(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;l=e;return a[(c[d>>2]|0)+15>>0]|0}function el(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return (d[c[b>>2]>>0]|0)<<24|(d[(c[b>>2]|0)+1>>0]|0)<<16|(d[(c[b>>2]|0)+2>>0]|0)<<8|(d[(c[b>>2]|0)+3>>0]|0)|0}function fl(b){b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=c[(c[e>>2]|0)+208>>2];zg();kl(c[e>>2]|0);a[(c[e>>2]|0)+4>>0]=0;ll(c[(c[e>>2]|0)+216>>2]|0,d[(c[e>>2]|0)+10>>0]|0,c[(c[e>>2]|0)+160>>2]|0,c[f>>2]|0)|0;c[(c[e>>2]|0)+216>>2]=0;Kk(c[e>>2]|0);b=c[e>>2]|0;if(a[(c[e>>2]|0)+16>>0]|0)ml(b);else{if(c[c[b+68>>2]>>2]|0){b=c[e>>2]|0;ol(b,nl(c[e>>2]|0)|0)|0}pl(c[e>>2]|0)}Bg();ql(c[(c[e>>2]|0)+68>>2]|0);ql(c[(c[e>>2]|0)+64>>2]|0);Mk(c[f>>2]|0);rl(c[(c[e>>2]|0)+212>>2]|0);Kd(c[e>>2]|0);l=g;return 0}function gl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[i>>2]=a;c[e>>2]=b;c[f>>2]=d;c[g>>2]=c[(c[i>>2]|0)+4>>2];Ek(c[i>>2]|0);if(!(c[e>>2]|0?(c[(c[g>>2]|0)+48>>2]|0)==0:0)){i=c[g>>2]|0;i=i+48|0;i=c[i>>2]|0;l=h;return i|0}i=c[e>>2]|0;i=jl(0,i,((i|0)<0)<<31>>31)|0;c[(c[g>>2]|0)+48>>2]=i;c[(c[g>>2]|0)+52>>2]=c[f>>2];i=c[g>>2]|0;i=i+48|0;i=c[i>>2]|0;l=h;return i|0}function hl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;il(c[(c[f>>2]|0)+212>>2]|0,c[e>>2]|0);l=d;return}function il(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;c[(c[f>>2]|0)+16>>2]=c[e>>2];e=c[34]|0;a=c[(c[f>>2]|0)+44>>2]|0;b=Ok(c[f>>2]|0)|0;rb[e&255](a,b);l=d;return}function jl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;h=g+12|0;e=g;f=g+8|0;c[h>>2]=a;a=e;c[a>>2]=b;c[a+4>>2]=d;d=e;c[f>>2]=md(c[h>>2]|0,c[d>>2]|0,c[d+4>>2]|0)|0;if(!(c[f>>2]|0)){h=c[f>>2]|0;l=g;return h|0}GR(c[f>>2]|0,0,c[e>>2]|0)|0;h=c[f>>2]|0;l=g;return h|0}function kl(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;f=e+8|0;b=e+4|0;d=e;c[f>>2]=a;c[b>>2]=c[(c[f>>2]|0)+144>>2];while(1){if(!(c[b>>2]|0))break;c[d>>2]=c[(c[b>>2]|0)+12>>2];Kd(c[b>>2]|0);c[b>>2]=c[d>>2]}l=e;return}function ll(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;n=p+8|0;o=p+4|0;h=p;c[i>>2]=b;c[j>>2]=e;c[k>>2]=f;c[m>>2]=g;c[n>>2]=0;if(!(c[i>>2]|0)){o=c[n>>2]|0;l=p;return o|0}c[o>>2]=0;c[n>>2]=En(c[(c[i>>2]|0)+4>>2]|0,4)|0;do if(!(c[n>>2]|0)){if(!(d[(c[i>>2]|0)+43>>0]|0))a[(c[i>>2]|0)+43>>0]=1;c[n>>2]=Fn(c[i>>2]|0,0,0,0,c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,0,0)|0;if(!(c[n>>2]|0)){c[h>>2]=-1;Gn(c[(c[i>>2]|0)+4>>2]|0,10,h);if((c[h>>2]|0)!=1){c[o>>2]=1;break}m=(c[i>>2]|0)+16|0;k=c[m+4>>2]|0;if((k|0)>0|(k|0)==0&(c[m>>2]|0)>>>0>=0)Hn(c[i>>2]|0,0,0)}}while(0);In(c[i>>2]|0,c[o>>2]|0);ql(c[(c[i>>2]|0)+8>>2]|0);if(c[o>>2]|0){zg();zl(c[c[i>>2]>>2]|0,c[(c[i>>2]|0)+108>>2]|0,0)|0;Bg()}Kd(c[(c[i>>2]|0)+32>>2]|0);Kd(c[i>>2]|0);o=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0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=0;if(!(a[(c[d>>2]|0)+7>>0]|0))c[e>>2]=xl(c[(c[d>>2]|0)+68>>2]|0,2)|0;if(c[e>>2]|0){e=c[e>>2]|0;l=f;return e|0}c[e>>2]=Ik(c[(c[d>>2]|0)+68>>2]|0,(c[d>>2]|0)+88|0)|0;e=c[e>>2]|0;l=f;return e|0}function ol(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;f=g+4|0;h=g;c[e>>2]=b;c[f>>2]=d;c[h>>2]=c[f>>2]&255;if(!((c[h>>2]|0)==13|(c[h>>2]|0)==10)){h=c[f>>2]|0;l=g;return h|0}c[(c[e>>2]|0)+44>>2]=c[f>>2];a[(c[e>>2]|0)+17>>0]=6;h=c[f>>2]|0;l=g;return h|0}function pl(b){b=b|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=b;do if((d[(c[e>>2]|0)+17>>0]|0)!=6?d[(c[e>>2]|0)+17>>0]|0:0){if((d[(c[e>>2]|0)+17>>0]|0)>=2){zg();sl(c[e>>2]|0)|0;Bg();break}if(!(a[(c[e>>2]|0)+4>>0]|0))tl(c[e>>2]|0,0,0)|0}while(0);ml(c[e>>2]|0);l=f;return}function ql(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[c[b>>2]>>2]|0)){l=d;return}tb[c[(c[c[b>>2]>>2]|0)+4>>2]&255](c[b>>2]|0)|0;c[c[b>>2]>>2]=0;l=d;return}function rl(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;qb[c[160>>2]&255](c[(c[d>>2]|0)+44>>2]|0);l=b;return}function sl(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=0;b=c[f>>2]|0;if((d[(c[f>>2]|0)+17>>0]|0)==6){c[e>>2]=c[b+44>>2];i=c[e>>2]|0;l=j;return i|0}if((d[b+17>>0]|0)<=1){c[e>>2]=0;i=c[e>>2]|0;l=j;return i|0}k=(El(c[f>>2]|0)|0)!=0;b=c[f>>2]|0;do if(k){c[g>>2]=_l(b,2,-1)|0;c[h>>2]=tl(c[f>>2]|0,d[(c[f>>2]|0)+20>>0]|0,0)|0;if(!(c[g>>2]|0))c[g>>2]=c[h>>2]}else{if(c[c[b+68>>2]>>2]|0?(d[(c[f>>2]|0)+17>>0]|0)!=2:0){c[g>>2]=$l(c[f>>2]|0,0)|0;break}c[i>>2]=d[(c[f>>2]|0)+17>>0];c[g>>2]=tl(c[f>>2]|0,0,0)|0;if((c[i>>2]|0)>2?(a[(c[f>>2]|0)+16>>0]|0)==0:0){c[(c[f>>2]|0)+44>>2]=4;a[(c[f>>2]|0)+17>>0]=6;c[e>>2]=c[g>>2];k=c[e>>2]|0;l=j;return k|0}}while(0);c[e>>2]=ol(c[f>>2]|0,c[g>>2]|0)|0;k=c[e>>2]|0;l=j;return k|0}function tl(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;i=o+24|0;j=o+20|0;g=o+16|0;k=o+12|0;m=o+8|0;n=o+4|0;h=o;c[j>>2]=b;c[g>>2]=e;c[k>>2]=f;c[m>>2]=0;c[n>>2]=0;if((d[(c[j>>2]|0)+17>>0]|0)<2?(d[(c[j>>2]|0)+18>>0]|0)<2:0){c[i>>2]=0;n=c[i>>2]|0;l=o;return n|0}ul(c[j>>2]|0);a:do if(c[c[(c[j>>2]|0)+68>>2]>>2]|0){f=(vl(c[(c[j>>2]|0)+68>>2]|0)|0)!=0;b=c[j>>2]|0;if(f){ql(c[b+68>>2]|0);break}e=c[j>>2]|0;if((d[b+5>>0]|0)==3){h=e+80|0;if(!((c[h>>2]|0)==0&(c[h+4>>2]|0)==0)){c[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64>>2]|0,22,0)|0;c[m>>2]=k;c[m>>2]=(c[m>>2]|0)==12?0:k}do if(!(a[(c[j>>2]|0)+4>>0]|0)){if(El(c[j>>2]|0)|0?(Il(c[(c[j>>2]|0)+216>>2]|0,0)|0)==0:0)break;c[n>>2]=Jl(c[j>>2]|0,1)|0;a[(c[j>>2]|0)+19>>0]=0}while(0);a[(c[j>>2]|0)+17>>0]=1;a[(c[j>>2]|0)+20>>0]=0;c[i>>2]=(c[m>>2]|0)==0?c[n>>2]|0:c[m>>2]|0;n=c[i>>2]|0;l=o;return n|0}function ul(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=0;while(1){b=c[d>>2]|0;if((c[e>>2]|0)>=(c[(c[d>>2]|0)+104>>2]|0))break;Al(c[(c[b+100>>2]|0)+((c[e>>2]|0)*48|0)+16>>2]|0);c[e>>2]=(c[e>>2]|0)+1}if(!(a[b+4>>0]|0?!(vl(c[(c[d>>2]|0)+72>>2]|0)|0):0))ql(c[(c[d>>2]|0)+72>>2]|0);Kd(c[(c[d>>2]|0)+100>>2]|0);c[(c[d>>2]|0)+100>>2]=0;c[(c[d>>2]|0)+104>>2]=0;c[(c[d>>2]|0)+56>>2]=0;l=f;return}function vl(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[c[b>>2]>>2]|0)==4028|0}function wl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;d=g;d=ob[c[(c[c[f>>2]>>2]|0)+16>>2]&255](c[f>>2]|0,c[d>>2]|0,c[d+4>>2]|0)|0;l=e;return d|0}function xl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=yb[c[(c[c[f>>2]>>2]|0)+20>>2]&255](c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function yl(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;f=k+24|0;g=k+20|0;h=k+16|0;i=k+8|0;j=k;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;e=(c[f>>2]|0)+80|0;if(!((c[e>>2]|0)!=0|(c[e+4>>2]|0)!=0)){j=c[h>>2]|0;l=k;return j|0}m=(c[f>>2]|0)+168|0;b=c[m+4>>2]|0;e=i;c[e>>2]=c[m>>2];c[e+4>>2]=b;e=i;b=c[(c[f>>2]|0)+68>>2]|0;if((c[g>>2]|0)!=0|(c[e>>2]|0)==0&(c[e+4>>2]|0)==0)c[h>>2]=wl(b,0,0)|0;else c[h>>2]=Ol(b,47896,28,0,0)|0;if((c[h>>2]|0)==0?(a[(c[f>>2]|0)+7>>0]|0)==0:0)c[h>>2]=xl(c[(c[f>>2]|0)+68>>2]|0,16|d[(c[f>>2]|0)+12>>0])|0;m=i;g=c[m+4>>2]|0;if(!((c[h>>2]|0)==0&((g|0)>0|(g|0)==0&(c[m>>2]|0)>>>0>0))){m=c[h>>2]|0;l=k;return m|0}c[h>>2]=Ik(c[(c[f>>2]|0)+68>>2]|0,j)|0;if(c[h>>2]|0){m=c[h>>2]|0;l=k;return m|0}e=c[j+4>>2]|0;m=i;g=c[m+4>>2]|0;if(!((e|0)>(g|0)|((e|0)==(g|0)?(c[j>>2]|0)>>>0>(c[m>>2]|0)>>>0:0))){m=c[h>>2]|0;l=k;return m|0}m=i;c[h>>2]=wl(c[(c[f>>2]|0)+68>>2]|0,c[m>>2]|0,c[m+4>>2]|0)|0;m=c[h>>2]|0;l=k;return m|0}function zl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;d=ob[c[(c[h>>2]|0)+28>>2]&255](c[h>>2]|0,c[g>>2]|0,c[f>>2]|0)|0;l=e;return d|0}function Al(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(!(c[b>>2]|0)){l=e;return}a:do if(c[(c[b>>2]|0)+8>>2]|0){c[d>>2]=0;while(1){if((c[d>>2]|0)>>>0>=125)break a;Al(c[(c[b>>2]|0)+12+(c[d>>2]<<2)>>2]|0);c[d>>2]=(c[d>>2]|0)+1}}while(0);Kd(c[b>>2]|0);l=e;return}function Bl(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;do if(d[(c[f>>2]|0)+13>>0]|0){if(!(c[g>>2]|0)){c[e>>2]=0;break}if(c[c[(c[f>>2]|0)+64>>2]>>2]|0){c[e>>2]=(Ql(c[(c[f>>2]|0)+212>>2]|0)|0)>=25&1;break}else{c[e>>2]=0;break}}else c[e>>2]=1;while(0);l=h;return c[e>>2]|0}function Cl(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;while(1){a=c[c[b>>2]>>2]|0;c[d>>2]=a;if(!a)break;Sk(c[d>>2]|0)}l=e;return}function Dl(a){a=a|0;var d=0,f=0,g=0;g=l;l=l+16|0;d=g+4|0;f=g;c[d>>2]=a;c[f>>2]=c[c[d>>2]>>2];while(1){if(!(c[f>>2]|0))break;a=(c[f>>2]|0)+24|0;b[a>>1]=(e[a>>1]|0)&-13;c[f>>2]=c[(c[f>>2]|0)+32>>2]}c[(c[d>>2]|0)+8>>2]=c[(c[d>>2]|0)+4>>2];l=g;return}function El(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[(c[b>>2]|0)+216>>2]|0)!=0|0}function Fl(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;if(!(a[(c[d>>2]|0)+44>>0]|0)){l=e;return 0}Pl(c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o|0)<0)<<31>>31|0)|0;c[g>>2]=Ol(h,k,n,o,z)|0}}else{o=i;c[g>>2]=wl(c[(c[e>>2]|0)+64>>2]|0,c[o>>2]|0,c[o+4>>2]|0)|0}if(c[g>>2]|0){o=c[g>>2]|0;l=m;return o|0}c[(c[e>>2]|0)+36>>2]=c[f>>2];o=c[g>>2]|0;l=m;return o|0}function Hl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;d=ob[c[(c[c[h>>2]>>2]|0)+40>>2]&255](c[h>>2]|0,c[g>>2]|0,c[f>>2]|0)|0;l=e;return d|0}function Il(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+8|0;h=j+4|0;i=j;c[g>>2]=e;c[h>>2]=f;if(c[h>>2]|0){e=c[g>>2]|0;if((c[h>>2]|0)>0){Ml(e,3+(b[(c[g>>2]|0)+40>>1]|0)|0);a[(c[g>>2]|0)+43>>0]=1;c[i>>2]=1;i=c[i>>2]|0;l=j;return i|0}else{c[i>>2]=(d[e+43>>0]|0)==0&1;i=c[i>>2]|0;l=j;return i|0}}if(!(a[(c[g>>2]|0)+43>>0]|0)){c[i>>2]=0;i=c[i>>2]|0;l=j;return i|0}a[(c[g>>2]|0)+43>>0]=0;if(Ll(c[g>>2]|0,3+(b[(c[g>>2]|0)+40>>1]|0)|0)|0)a[(c[g>>2]|0)+43>>0]=1;c[i>>2]=(d[(c[g>>2]|0)+43>>0]|0)==0&1;i=c[i>>2]|0;l=j;return i|0}function Jl(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;if(!(c[c[(c[f>>2]|0)+64>>2]>>2]|0)){h=c[h>>2]|0;l=i;return h|0}if(d[(c[f>>2]|0)+14>>0]|0|0)b=0;else b=Kl(c[(c[f>>2]|0)+64>>2]|0,c[g>>2]|0)|0;c[h>>2]=b;if((d[(c[f>>2]|0)+18>>0]|0|0)==5){h=c[h>>2]|0;l=i;return h|0}a[(c[f>>2]|0)+18>>0]=c[g>>2];h=c[h>>2]|0;l=i;return h|0}function Kl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=yb[c[(c[c[f>>2]>>2]|0)+32>>2]&255](c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function Ll(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=d;if(a[(c[f>>2]|0)+43>>0]|0){c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}else{c[h>>2]=Nl(c[(c[f>>2]|0)+4>>2]|0,c[g>>2]|0,1,6)|0;c[e>>2]=c[h>>2];h=c[e>>2]|0;l=i;return h|0}return 0}function Ml(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=d;if(a[(c[e>>2]|0)+43>>0]|0){l=g;return}Nl(c[(c[e>>2]|0)+4>>2]|0,c[f>>2]|0,1,5)|0;l=g;return}function Nl(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;e=wb[c[(c[c[j>>2]>>2]|0)+56>>2]&255](c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0)|0;l=f;return e|0}function Ol(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;g=l;l=l+32|0;j=g+16|0;i=g+12|0;h=g+8|0;k=g;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;d=k;c[d>>2]=e;c[d+4>>2]=f;f=k;f=zb[c[(c[c[j>>2]>>2]|0)+12>>2]&255](c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[f>>2]|0,c[f+4>>2]|0)|0;l=g;return f|0}function Pl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;if(a[(c[f>>2]|0)+43>>0]|0){l=i;return}Nl(c[(c[f>>2]|0)+4>>2]|0,c[g>>2]|0,c[h>>2]|0,9)|0;l=i;return}function Ql(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+12|0;b=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[d>>2]=0;c[e>>2]=Ok(c[g>>2]|0)|0;c[b>>2]=c[c[g>>2]>>2];while(1){if(!(c[b>>2]|0))break;c[d>>2]=(c[d>>2]|0)+1;c[b>>2]=c[(c[b>>2]|0)+32>>2]}if(!(c[e>>2]|0)){g=0;l=f;return g|0}d=c[d>>2]|0;d=RR(d|0,((d|0)<0)<<31>>31|0,100,0)|0;g=c[e>>2]|0;g=LR(d|0,z|0,g|0,((g|0)<0)<<31>>31|0)|0;l=f;return g|0}function Rl(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];Xl(c[d>>2]|0);l=b;return 0}function Sl(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=l;l=l+64|0;t=r+52|0;s=r+48|0;o=r+44|0;p=r+8|0;q=r+40|0;h=r+36|0;i=r+32|0;j=r+28|0;k=r+24|0;g=r;m=r+20|0;n=r+16|0;c[t>>2]=a;c[s>>2]=b;c[o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0)+24+8>>2]=0;h=(c[e>>2]|0)+24|0;c[h>>2]=0;c[h+4>>2]=0;c[(c[e>>2]|0)+40+8>>2]=0;h=(c[e>>2]|0)+40|0;c[h>>2]=0;c[h+4>>2]=0;l=f;return 0}function Vl(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 0}function Wl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;f=d+4|0;e=d;c[g>>2]=a;c[f>>2]=b;c[e>>2]=c[g>>2];e=(c[e>>2]|0)+24|0;a=c[e+4>>2]|0;b=c[f>>2]|0;c[b>>2]=c[e>>2];c[b+4>>2]=a;l=d;return 0}function Xl(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+16>>2];while(1){if(!(c[d>>2]|0))break;c[e>>2]=c[c[d>>2]>>2];Kd(c[d>>2]|0);c[d>>2]=c[e>>2]}c[(c[b>>2]|0)+16>>2]=0;l=f;return}function Yl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+112|0;e=m+96|0;f=m+92|0;g=m+88|0;h=m+8|0;i=m+84|0;j=m;k=m+80|0;c[e>>2]=a;c[g>>2]=c[e>>2];a=h;b=c[e>>2]|0;d=a+72|0;do{c[a>>2]=c[b>>2];a=a+4|0;b=b+4|0}while((a|0)<(d|0));a=c[e>>2]|0;d=a+72|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(d|0));c[f>>2]=Zl(c[h+60>>2]|0,c[h+64>>2]|0,c[g>>2]|0,c[h+56>>2]|0,0)|0;if(!(c[f>>2]|0)){c[i>>2]=c[h+4>>2];d=j;c[d>>2]=0;c[d+4>>2]=0;c[k>>2]=c[h+16>>2];while(1){if(!(c[k>>2]|0))break;n=j;b=c[i>>2]|0;b=IR(c[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if(c[j>>2]|0){k=c[j>>2]|0;l=m;return k|0}if((c[f>>2]|0)>=(c[(c[i>>2]|0)+104>>2]|0)){k=c[j>>2]|0;l=m;return k|0}c[h>>2]=(c[f>>2]|0)+((c[e>>2]|0)==1?0:1);c[g>>2]=c[h>>2];while(1){if((c[g>>2]|0)>=(c[(c[i>>2]|0)+104>>2]|0))break;Al(c[(c[(c[i>>2]|0)+100>>2]|0)+((c[g>>2]|0)*48|0)+16>>2]|0);c[g>>2]=(c[g>>2]|0)+1}c[(c[i>>2]|0)+104>>2]=c[h>>2];if((c[e>>2]|0)!=1){if((El(c[i>>2]|0)|0)==0?(c[c[(c[i>>2]|0)+68>>2]>>2]|0)==0:0){k=c[j>>2]|0;l=m;return k|0}if(!(c[h>>2]|0))a=0;else a=(c[(c[i>>2]|0)+100>>2]|0)+(((c[h>>2]|0)-1|0)*48|0)|0;c[k>>2]=a;c[j>>2]=rn(c[i>>2]|0,c[k>>2]|0)|0;k=c[j>>2]|0;l=m;return k|0}if(c[h>>2]|0){k=c[j>>2]|0;l=m;return k|0}if(!(c[c[(c[i>>2]|0)+72>>2]>>2]|0)){k=c[j>>2]|0;l=m;return k|0}if(vl(c[(c[i>>2]|0)+72>>2]|0)|0)c[j>>2]=wl(c[(c[i>>2]|0)+72>>2]|0,0,0)|0;c[(c[i>>2]|0)+56>>2]=0;k=c[j>>2]|0;l=m;return k|0}function $l(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+64|0;s=t+8|0;p=t+56|0;q=t+52|0;g=t+48|0;h=t;i=t+44|0;j=t+40|0;k=t+36|0;r=t+32|0;m=t+28|0;n=t+24|0;f=t+20|0;o=t+16|0;c[p>>2]=b;c[q>>2]=e;c[g>>2]=c[c[p>>2]>>2];c[k>>2]=0;c[m>>2]=1;c[n>>2]=0;c[o>>2]=0;c[r>>2]=Ik(c[(c[p>>2]|0)+68>>2]|0,h)|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>>>0>=(c[i>>2]|0)>>>0)continue b;if(c[f>>2]|0){Kk(c[p>>2]|0);c[f>>2]=0}c[r>>2]=dm(c[p>>2]|0,(c[p>>2]|0)+80|0,0,1,0)|0;if(c[r>>2]|0)break;c[o>>2]=(c[o>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+1}if((c[r>>2]|0)!=101){b=26;break}b=h;e=c[b+4>>2]|0;g=(c[p>>2]|0)+80|0;c[g>>2]=c[b>>2];c[g+4>>2]=e}if((b|0)==8){if((c[r>>2]|0)!=101)break;c[r>>2]=0;break}else if((b|0)==26){if((c[r>>2]|0)!=522)break;c[r>>2]=0;break}}}while(0);a[(c[p>>2]|0)+19>>0]=a[(c[p>>2]|0)+13>>0]|0;if(!(c[r>>2]|0)){c[n>>2]=c[(c[p>>2]|0)+208>>2];c[r>>2]=am(c[(c[p>>2]|0)+68>>2]|0,c[n>>2]|0,(c[(c[c[p>>2]>>2]|0)+8>>2]|0)+1|0)|0}do if(!(c[r>>2]|0)){if((d[(c[p>>2]|0)+17>>0]|0)<4?d[(c[p>>2]|0)+17>>0]|0:0)break;c[r>>2]=em(c[p>>2]|0,0)|0}while(0);if(!(c[r>>2]|0))c[r>>2]=tl(c[p>>2]|0,(a[c[n>>2]>>0]|0)!=0&1,0)|0;if((c[r>>2]|0)==0?(c[m>>2]|0?(a[c[n>>2]>>0]|0)!=0:0):0)c[r>>2]=fm(c[p>>2]|0,c[n>>2]|0)|0;if(!((c[q>>2]|0)!=0&(c[o>>2]|0)!=0)){s=c[p>>2]|0;gm(s);s=c[r>>2]|0;l=t;return s|0}q=c[(c[p>>2]|0)+180>>2]|0;c[s>>2]=c[o>>2];c[s+4>>2]=q;hd(539,21757,s);s=c[p>>2]|0;gm(s);s=c[r>>2]|0;l=t;return s|0}function am(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;i=q+36|0;j=q+32|0;k=q+28|0;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]=t;if((0==(t|0)?(r=c[(c[q>>2]|0)+68>>2]|0,t=m,t=IR(c[t>>2]|0,c[t+4>>2]|0,12,0)|0,t=lm(r,t,z,(c[q>>2]|0)+52|0)|0,c[j>>2]=t,0==(t|0)):0)?(r=c[(c[q>>2]|0)+68>>2]|0,t=m,t=IR(c[t>>2]|0,c[t+4>>2]|0,16,0)|0,t=lm(r,t,z,c[i>>2]|0)|0,c[j>>2]=t,0==(t|0)):0){t=(c[q>>2]|0)+80|0;do if((c[t>>2]|0)==0&(c[t+4>>2]|0)==0){r=c[(c[q>>2]|0)+68>>2]|0;t=m;t=IR(c[t>>2]|0,c[t+4>>2]|0,20,0)|0;t=lm(r,t,z,o)|0;c[j>>2]=t;if(0==(t|0)?(r=c[(c[q>>2]|0)+68>>2]|0,t=m,t=IR(c[t>>2]|0,c[t+4>>2]|0,24,0)|0,t=lm(r,t,z,n)|0,c[j>>2]=t,0==(t|0)):0){if(!(c[n>>2]|0))c[n>>2]=c[(c[q>>2]|0)+160>>2];if((!((c[n>>2]|0)>>>0<512|(c[o>>2]|0)>>>0<32|(c[n>>2]|0)>>>0>65536|(c[o>>2]|0)>>>0>65536)?((c[n>>2]|0)-1&c[n>>2]|0)==0:0)?((c[o>>2]|0)-1&c[o>>2]|0)==0:0){c[j>>2]=Gk(c[q>>2]|0,n,-1)|0;c[(c[q>>2]|0)+156>>2]=c[o>>2];break}c[p>>2]=101;t=c[p>>2]|0;l=s;return t|0}c[p>>2]=c[j>>2];t=c[p>>2]|0;l=s;return t|0}while(0);t=(c[q>>2]|0)+80|0;r=t;r=IR(c[r>>2]|0,c[r+4>>2]|0,c[(c[q>>2]|0)+156>>2]|0,0)|0;c[t>>2]=r;c[t+4>>2]=z;c[p>>2]=c[j>>2];t=c[p>>2]|0;l=s;return t|0}c[p>>2]=c[j>>2];t=c[p>>2]|0;l=s;return t|0}function dm(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0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n=nm(c[u>>2]|0,c[r>>2]|0)|0,(n|0)!=(c[m>>2]|0)):0){c[B>>2]=101;B=c[B>>2]|0;l=C;return B|0}}if(c[p>>2]|0?(p=om(c[p>>2]|0,c[q>>2]|0)|0,c[y>>2]=p,p|0):0){c[B>>2]=c[y>>2];B=c[B>>2]|0;l=C;return B|0}if((c[q>>2]|0)==1?(b[(c[u>>2]|0)+150>>1]|0)!=(d[(c[r>>2]|0)+20>>0]|0):0)b[(c[u>>2]|0)+150>>1]=d[(c[r>>2]|0)+20>>0]|0;if(El(c[u>>2]|0)|0)c[A>>2]=0;else c[A>>2]=pm(c[u>>2]|0,c[q>>2]|0)|0;if(c[v>>2]|0){if(d[(c[u>>2]|0)+7>>0]|0)f=1;else{p=c[o>>2]|0;n=c[p+4>>2]|0;f=(c[u>>2]|0)+88|0;o=c[f+4>>2]|0;f=(n|0)<(o|0)|((n|0)==(o|0)?(c[p>>2]|0)>>>0<=(c[f>>2]|0)>>>0:0)}c[s>>2]=f&1}else{if(!(c[A>>2]|0))f=1;else f=0==(e[(c[A>>2]|0)+24>>1]&8|0);c[s>>2]=f&1}do if(c[c[(c[u>>2]|0)+64>>2]>>2]|0){if((d[(c[u>>2]|0)+17>>0]|0)>=4){if(!(c[s>>2]|0)){w=44;break}}else if(!(c[s>>2]|0?(d[(c[u>>2]|0)+17>>0]|0)==0:0)){w=44;break}p=c[(c[u>>2]|0)+160>>2]|0;p=RR((c[q>>2]|0)-1|0,0,p|0,((p|0)<0)<<31>>31|0)|0;s=t;c[s>>2]=p;c[s+4>>2]=z;c[y>>2]=Ol(c[(c[u>>2]|0)+64>>2]|0,c[r>>2]|0,c[(c[u>>2]|0)+160>>2]|0,c[t>>2]|0,c[t+4>>2]|0)|0;if((c[q>>2]|0)>>>0>(c[(c[u>>2]|0)+36>>2]|0)>>>0)c[(c[u>>2]|0)+36>>2]=c[q>>2];if(c[(c[u>>2]|0)+96>>2]|0){qm(c[(c[u>>2]|0)+96>>2]|0,c[q>>2]|0,c[r>>2]|0);c[r>>2]=c[r>>2]}}else w=44;while(0);do if((w|0)==44?(c[v>>2]|0)==0&(c[A>>2]|0)==0:0){w=(c[u>>2]|0)+21|0;a[w>>0]=d[w>>0]|2;c[y>>2]=rm(c[u>>2]|0,c[q>>2]|0,A,1)|0;w=(c[u>>2]|0)+21|0;a[w>>0]=d[w>>0]&-3;if(!(c[y>>2]|0)){sm(c[A>>2]|0);break}c[B>>2]=c[y>>2];B=c[B>>2]|0;l=C;return B|0}while(0);if(c[A>>2]|0){c[x>>2]=c[(c[A>>2]|0)+4>>2];MR(c[x>>2]|0,c[r>>2]|0,c[(c[u>>2]|0)+160>>2]|0)|0;qb[c[(c[u>>2]|0)+204>>2]&255](c[A>>2]|0);if((c[q>>2]|0)==1){h=(c[u>>2]|0)+112|0;f=(c[x>>2]|0)+24|0;g=h+16|0;do{a[h>>0]=a[f>>0]|0;h=h+1|0;f=f+1|0}while((h|0)<(g|0))}tm(c[A>>2]|0)}c[B>>2]=c[y>>2];B=c[B>>2]|0;l=C;return B|0}c[B>>2]=0;B=c[B>>2]|0;l=C;return B|0}c[B>>2]=101;B=c[B>>2]|0;l=C;return B|0}function em(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;if(c[c[(c[f>>2]|0)+64>>2]>>2]|0){c[i>>2]=c[g>>2];i=Hl(c[(c[f>>2]|0)+64>>2]|0,21,c[i>>2]|0)|0;c[h>>2]=i;c[h>>2]=(c[h>>2]|0)==12?0:i}if(c[h>>2]|0){i=c[h>>2]|0;l=j;return i|0}if(a[(c[f>>2]|0)+7>>0]|0){i=c[h>>2]|0;l=j;return i|0}c[h>>2]=xl(c[(c[f>>2]|0)+64>>2]|0,d[(c[f>>2]|0)+12>>0]|0)|0;i=c[h>>2]|0;l=j;return i|0}function fm(b,d){b=b|0;d=d|0;var e=0,f=0,g=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2]|0,c[e>>2]|0,c[p>>2]|0,c[j>>2]|0,0)|0;if(c[n>>2]|0)break a;c[n>>2]=am(c[p>>2]|0,c[f>>2]|0,c[g>>2]|0)|0;ql(c[p>>2]|0);if(c[n>>2]|0)break a;if(a[c[f>>2]>>0]|0)b=(vQ(c[f>>2]|0,c[k>>2]|0)|0)==0;else b=0;c[i>>2]=b&1;if(c[i>>2]|0)break a}u=(_c(c[e>>2]|0)|0)+1|0;c[e>>2]=(c[e>>2]|0)+u}ql(c[o>>2]|0);c[n>>2]=zl(c[m>>2]|0,c[k>>2]|0,0)|0}}while(0);Kd(c[q>>2]|0);if(!(c[o>>2]|0)){u=c[n>>2]|0;l=s;return u|0}ql(c[o>>2]|0);Kd(c[o>>2]|0);u=c[n>>2]|0;l=s;return u|0}function gm(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if((d[(c[b>>2]|0)+13>>0]|0|0)==0?((hm(c[(c[b>>2]|0)+64>>2]|0)|0)&4096|0)==0:0){a=im(c[(c[b>>2]|0)+64>>2]|0)|0;b=c[b>>2]|0;b=b+156|0;c[b>>2]=a;l=e;return}a=512;b=c[b>>2]|0;b=b+156|0;c[b>>2]=a;l=e;return}function hm(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=tb[c[(c[c[d>>2]>>2]|0)+48>>2]&255](c[d>>2]|0)|0;l=b;return a|0}function im(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=jm(c[e>>2]|0)|0;if((c[b>>2]|0)>=32){if((c[b>>2]|0)>65536)c[b>>2]=65536}else c[b>>2]=512;l=d;return c[b>>2]|0}function jm(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=c[(c[c[b>>2]>>2]|0)+44>>2];if(!(c[d>>2]|0)){d=4096;l=e;return d|0}d=tb[c[d>>2]&255](c[b>>2]|0)|0;l=e;return d|0}function km(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;g=l;l=l+32|0;j=g+16|0;i=g+12|0;h=g+8|0;k=g;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;d=k;c[d>>2]=e;c[d+4>>2]=f;f=k;f=zb[c[(c[c[j>>2]>>2]|0)+8>>2]&255](c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[f>>2]|0,c[f+4>>2]|0)|0;l=g;return f|0}function lm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+32|0;j=i+16|0;k=i;f=i+12|0;g=i+20|0;h=i+8|0;c[j>>2]=a;a=k;c[a>>2]=b;c[a+4>>2]=d;c[f>>2]=e;e=k;c[h>>2]=km(c[j>>2]|0,g,4,c[e>>2]|0,c[e+4>>2]|0)|0;if(c[h>>2]|0){k=c[h>>2]|0;l=i;return k|0}k=el(g)|0;c[c[f>>2]>>2]=k;k=c[h>>2]|0;l=i;return k|0}function mm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[d>>2]|0)){e=0;e=e&1;l=f;return e|0}e=(en(c[d>>2]|0,c[e>>2]|0)|0)!=0;e=e&1;l=f;return e|0}function nm(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[i>>2]=a;c[e>>2]=b;c[f>>2]=c[(c[i>>2]|0)+52>>2];c[g>>2]=(c[(c[i>>2]|0)+160>>2]|0)-200;while(1){if((c[g>>2]|0)<=0)break;c[f>>2]=(c[f>>2]|0)+(d[(c[e>>2]|0)+(c[g>>2]|0)>>0]|0);c[g>>2]=(c[g>>2]|0)-200}l=h;return c[f>>2]|0}function om(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;j=p+28|0;k=p+24|0;g=p+20|0;h=p+16|0;f=p+12|0;m=p+8|0;n=p+4|0;o=p;c[k>>2]=b;c[g>>2]=e;if(!(c[k>>2]|0)){c[j>>2]=0;o=c[j>>2]|0;l=p;return o|0}c[g>>2]=(c[g>>2]|0)+-1;while(1){if((c[c[k>>2]>>2]|0)>>>0<=4e3)break;if(!(c[(c[k>>2]|0)+8>>2]|0))break;c[f>>2]=((c[g>>2]|0)>>>0)/((c[(c[k>>2]|0)+8>>2]|0)>>>0)|0;c[g>>2]=((c[g>>2]|0)>>>0)%((c[(c[k>>2]|0)+8>>2]|0)>>>0)|0;if((c[(c[k>>2]|0)+12+(c[f>>2]<<2)>>2]|0)==0?(e=hn(c[(c[k>>2]|0)+8>>2]|0)|0,c[(c[k>>2]|0)+12+(c[f>>2]<<2)>>2]=e,(c[(c[k>>2]|0)+12+(c[f>>2]<<2)>>2]|0)==0):0){i=8;break}c[k>>2]=c[(c[k>>2]|0)+12+(c[f>>2]<<2)>>2]}if((i|0)==8){c[j>>2]=7;o=c[j>>2]|0;l=p;return o|0}b=c[g>>2]|0;if((c[c[k>>2]>>2]|0)>>>0<=4e3){o=(c[k>>2]|0)+12+(((c[g>>2]|0)>>>0)/8|0)|0;a[o>>0]=d[o>>0]|0|1<<(b&7);c[j>>2]=0;o=c[j>>2]|0;l=p;return o|0}c[g>>2]=b+1;c[h>>2]=(b>>>0)%125|0;a:do if(!(c[(c[k>>2]|0)+12+(c[h>>2]<<2)>>2]|0)){if((c[(c[k>>2]|0)+4>>2]|0)>>>0>=124)i=17}else{while(1){if((c[(c[k>>2]|0)+12+(c[h>>2]<<2)>>2]|0)==(c[g>>2]|0))break;i=(c[h>>2]|0)+1|0;c[h>>2]=i;c[h>>2]=(c[h>>2]|0)>>>0>=125?0:i;if(!(c[(c[k>>2]|0)+12+(c[h>>2]<<2)>>2]|0)){i=17;break a}}c[j>>2]=0;o=c[j>>2]|0;l=p;return o|0}while(0);if((i|0)==17?(c[(c[k>>2]|0)+4>>2]|0)>>>0>=62:0){c[o>>2]=md(0,500,0)|0;if(!(c[o>>2]|0)){c[j>>2]=7;o=c[j>>2]|0;l=p;return o|0}MR(c[o>>2]|0,(c[k>>2]|0)+12|0,500)|0;GR((c[k>>2]|0)+12|0,0,500)|0;c[(c[k>>2]|0)+8>>2]=(((c[c[k>>2]>>2]|0)+125-1|0)>>>0)/125|0;c[n>>2]=om(c[k>>2]|0,c[g>>2]|0)|0;c[m>>2]=0;while(1){b=c[o>>2]|0;if((c[m>>2]|0)>>>0>=125)break;if(c[b+(c[m>>2]<<2)>>2]|0){i=om(c[k>>2]|0,c[(c[o>>2]|0)+(c[m>>2]<<2)>>2]|0)|0;c[n>>2]=c[n>>2]|i}c[m>>2]=(c[m>>2]|0)+1}Hd(0,b);c[j>>2]=c[n>>2];o=c[j>>2]|0;l=p;return o|0}o=(c[k>>2]|0)+4|0;c[o>>2]=(c[o>>2]|0)+1;c[(c[k>>2]|0)+12+(c[h>>2]<<2)>>2]=c[g>>2];c[j>>2]=0;o=c[j>>2]|0;l=p;return o|0}function pm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=zm(c[(c[e>>2]|0)+212>>2]|0,c[f>>2]|0,0)|0;if(!(c[g>>2]|0)){c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}else{c[d>>2]=Bm(c[(c[e>>2]|0)+212>>2]|0,c[f>>2]|0,c[g>>2]|0)|0;g=c[d>>2]|0;l=h;return g|0}return 0}function qm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(!(c[e>>2]|0)){l=h;return}Om(c[e>>2]|0,c[f>>2]|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[r>>2]>>2]=c[j>>2];c[o>>2]=0;u=c[o>>2]|0;l=t;return u|0}}if(c[s>>2]|0)break}c[h>>2]=zm(c[(c[p>>2]|0)+212>>2]|0,c[q>>2]|0,3)|0;if(!(c[h>>2]|0)){c[s>>2]=Am(c[(c[p>>2]|0)+212>>2]|0,c[q>>2]|0,h)|0;if(c[s>>2]|0)break;if(!(c[h>>2]|0)){c[c[r>>2]>>2]=0;c[j>>2]=0;c[s>>2]=7;break}}i=Bm(c[(c[p>>2]|0)+212>>2]|0,c[q>>2]|0,c[h>>2]|0)|0;c[c[r>>2]>>2]=i;c[j>>2]=i;i=24}while(0);do if((i|0)==24){if(c[s>>2]|0){c[j>>2]=0;break}a=c[p>>2]|0;if(!(c[m>>2]|0?1:(c[(c[j>>2]|0)+16>>2]|0)==0)){u=a+192|0;c[u>>2]=(c[u>>2]|0)+1;c[o>>2]=0;u=c[o>>2]|0;l=t;return u|0}c[(c[j>>2]|0)+16>>2]=a;if((c[q>>2]|0)>>>0<=2147483647?(c[q>>2]|0)!=(((c[481]|0)/(c[(c[p>>2]|0)+160>>2]|0)|0)+1|0):0){if(c[c[(c[p>>2]|0)+64>>2]>>2]|0?!(c[m>>2]|0?1:(c[(c[p>>2]|0)+28>>2]|0)>>>0<(c[q>>2]|0)>>>0):0){u=(El(c[p>>2]|0)|0)!=0;if(u&(c[n>>2]|0)==0?(c[s>>2]=vm(c[(c[p>>2]|0)+216>>2]|0,c[q>>2]|0,k)|0,c[s>>2]|0):0)break;u=(c[p>>2]|0)+192+4|0;c[u>>2]=(c[u>>2]|0)+1;c[s>>2]=Dm(c[j>>2]|0,c[k>>2]|0)|0;if(c[s>>2]|0)break}else{if((c[q>>2]|0)>>>0>(c[(c[p>>2]|0)+164>>2]|0)>>>0){c[s>>2]=13;break}if(c[m>>2]|0){zg();if((c[q>>2]|0)>>>0<=(c[(c[p>>2]|0)+32>>2]|0)>>>0)om(c[(c[p>>2]|0)+60>>2]|0,c[q>>2]|0)|0;Cm(c[p>>2]|0,c[q>>2]|0)|0;Bg()}GR(c[(c[j>>2]|0)+4>>2]|0,0,c[(c[p>>2]|0)+160>>2]|0)|0}c[o>>2]=0;u=c[o>>2]|0;l=t;return u|0}c[s>>2]=um(51793)|0}while(0);if(c[j>>2]|0)Em(c[j>>2]|0);Fm(c[p>>2]|0);c[c[r>>2]>>2]=0;c[o>>2]=c[s>>2];u=c[o>>2]|0;l=t;return u|0}function sm(a){a=a|0;var d=0,f=0;f=l;l=l+16|0;d=f;c[d>>2]=a;if(!((e[(c[d>>2]|0)+24>>1]|0)&17)){l=f;return}a=(c[d>>2]|0)+24|0;b[a>>1]=(e[a>>1]|0)&-17;if(!((e[(c[d>>2]|0)+24>>1]|0)&1)){l=f;return}a=(c[d>>2]|0)+24|0;b[a>>1]=(e[a>>1]|0)^3;Tk(c[d>>2]|0,2);l=f;return}function tm(a){a=a|0;var d=0,f=0,g=0;f=l;l=l+16|0;d=f;c[d>>2]=a;g=(c[(c[d>>2]|0)+28>>2]|0)+12|0;c[g>>2]=(c[g>>2]|0)+-1;g=(c[d>>2]|0)+26|0;a=(b[g>>1]|0)+-1<<16>>16;b[g>>1]=a;if(a<<16>>16|0){l=f;return}a=c[d>>2]|0;if((e[(c[d>>2]|0)+24>>1]|0)&1|0){Uk(a);l=f;return}if(!(c[a+36>>2]|0)){l=f;return}Tk(c[d>>2]|0,3);l=f;return}function um(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=fd(11,c[d>>2]|0,21784)|0;l=b;return a|0}function vm(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+64|0;t=w+56|0;o=w+52|0;p=w+48|0;u=w+44|0;v=w+40|0;q=w+36|0;r=w+32|0;g=w+28|0;h=w+24|0;i=w+20|0;j=w+16|0;k=w+12|0;m=w+8|0;s=w+4|0;n=w;c[o>>2]=a;c[p>>2]=d;c[u>>2]=f;c[v>>2]=0;c[q>>2]=c[(c[o>>2]|0)+52+16>>2];if(c[q>>2]|0?b[(c[o>>2]|0)+40>>1]|0:0){c[g>>2]=Im(c[(c[o>>2]|0)+100>>2]|0)|0;c[r>>2]=Im(c[q>>2]|0)|0;a:while(1){if(!((c[r>>2]|0)>=(c[g>>2]|0)?(c[v>>2]|0)==0:0)){a=18;break}c[s>>2]=Jm(c[o>>2]|0,c[r>>2]|0,h,i,j)|0;if(c[s>>2]|0){a=7;break}c[m>>2]=8192;c[k>>2]=Km(c[p>>2]|0)|0;while(1){if(!(b[(c[h>>2]|0)+(c[k>>2]<<1)>>1]|0))break;c[n>>2]=(e[(c[h>>2]|0)+(c[k>>2]<<1)>>1]|0)+(c[j>>2]|0);if(((c[n>>2]|0)>>>0<=(c[q>>2]|0)>>>0?(c[n>>2]|0)>>>0>=(c[(c[o>>2]|0)+100>>2]|0)>>>0:0)?(c[(c[i>>2]|0)+(e[(c[h>>2]|0)+(c[k>>2]<<1)>>1]<<2)>>2]|0)==(c[p>>2]|0):0)c[v>>2]=c[n>>2];f=c[m>>2]|0;c[m>>2]=f+-1;if(!f){a=15;break a}c[k>>2]=Lm(c[k>>2]|0)|0}c[r>>2]=(c[r>>2]|0)+-1}if((a|0)==7){c[t>>2]=c[s>>2];v=c[t>>2]|0;l=w;return v|0}else if((a|0)==15){c[t>>2]=um(56344)|0;v=c[t>>2]|0;l=w;return v|0}else if((a|0)==18){c[c[u>>2]>>2]=c[v>>2];c[t>>2]=0;v=c[t>>2]|0;l=w;return v|0}}c[c[u>>2]>>2]=0;c[t>>2]=0;v=c[t>>2]|0;l=w;return v|0}function wm(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=l;l=l+32|0;h=g+8|0;c[g+16>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;c[g+12>>2]=e;c[h>>2]=f;c[c[h>>2]>>2]=0;l=g;return 0}function xm(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o;c[i>>2]=a;c[j>>2]=d;c[k>>2]=f;c[m>>2]=g;a=c[i>>2]|0;do if(c[(c[i>>2]|0)+144>>2]|0){g=c[a+144>>2]|0;c[n>>2]=g;c[c[m>>2]>>2]=g;c[(c[i>>2]|0)+144>>2]=c[(c[n>>2]|0)+12>>2];c[(c[n>>2]|0)+12>>2]=0;GR(c[(c[n>>2]|0)+8>>2]|0,0,e[(c[i>>2]|0)+148>>1]|0|0)|0}else{g=Cg(40+(e[a+148>>1]|0)|0,0)|0;c[n>>2]=g;c[c[m>>2]>>2]=g;if(c[n>>2]|0){c[(c[n>>2]|0)+8>>2]=(c[n>>2]|0)+40;b[(c[n>>2]|0)+24>>1]=32;b[(c[n>>2]|0)+26>>1]=1;c[(c[n>>2]|0)+16>>2]=c[i>>2];break}m=c[(c[i>>2]|0)+64>>2]|0;n=c[(c[i>>2]|0)+160>>2]|0;n=RR((c[j>>2]|0)-1|0,0,n|0,((n|0)<0)<<31>>31|0)|0;ym(m,n,z,c[k>>2]|0)|0;c[h>>2]=7;n=c[h>>2]|0;l=o;return n|0}while(0);c[(c[n>>2]|0)+20>>2]=c[j>>2];c[(c[n>>2]|0)+4>>2]=c[k>>2];n=(c[i>>2]|0)+128|0;c[n>>2]=(c[n>>2]|0)+1;c[h>>2]=0;n=c[h>>2]|0;l=o;return n|0}function ym(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=l;l=l+16|0;c[f+12>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;c[f+8>>2]=e;l=f;return 0}function zm(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;g=l;l=l+32|0;j=g+16|0;i=g+12|0;k=g+8|0;h=g+4|0;f=g;c[j>>2]=a;c[i>>2]=b;c[k>>2]=e;c[h>>2]=c[k>>2]&(d[(c[j>>2]|0)+33>>0]|0);c[f>>2]=ob[c[144>>2]&255](c[(c[j>>2]|0)+44>>2]|0,c[i>>2]|0,c[h>>2]|0)|0;l=g;return c[f>>2]|0}function Am(a,f,g){a=a|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o;c[i>>2]=a;c[j>>2]=f;c[k>>2]=g;if((d[(c[i>>2]|0)+33>>0]|0)==2){c[h>>2]=0;n=c[h>>2]|0;l=o;return n|0}g=rk(c[i>>2]|0)|0;if((g|0)>(c[(c[i>>2]|0)+20>>2]|0)){c[m>>2]=c[(c[i>>2]|0)+8>>2];while(1){if(!(c[m>>2]|0))break;if((b[(c[m>>2]|0)+26>>1]|0)==0?(e[(c[m>>2]|0)+24>>1]&8|0)==0:0)break;c[m>>2]=c[(c[m>>2]|0)+36>>2]}c[(c[i>>2]|0)+8>>2]=c[m>>2];a:do if(!(c[m>>2]|0)){c[m>>2]=c[(c[i>>2]|0)+4>>2];while(1){if(!(c[m>>2]|0))break a;if(!(b[(c[m>>2]|0)+26>>1]|0))break a;c[m>>2]=c[(c[m>>2]|0)+36>>2]}}while(0);if(c[m>>2]|0?(c[n>>2]=yb[c[(c[i>>2]|0)+36>>2]&255](c[(c[i>>2]|0)+40>>2]|0,c[m>>2]|0)|0,(c[n>>2]|0)!=0&(c[n>>2]|0)!=5):0){c[h>>2]=c[n>>2];n=c[h>>2]|0;l=o;return n|0}}n=ob[c[144>>2]&255](c[(c[i>>2]|0)+44>>2]|0,c[j>>2]|0,2)|0;c[c[k>>2]>>2]=n;c[h>>2]=(c[c[k>>2]>>2]|0)==0?7:0;n=c[h>>2]|0;l=o;return n|0}function Bm(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;f=j+16|0;k=j+12|0;g=j+8|0;h=j+4|0;i=j;c[k>>2]=a;c[g>>2]=d;c[h>>2]=e;c[i>>2]=c[(c[h>>2]|0)+4>>2];a=c[k>>2]|0;if(c[c[i>>2]>>2]|0){k=a+12|0;c[k>>2]=(c[k>>2]|0)+1;k=(c[i>>2]|0)+26|0;b[k>>1]=(b[k>>1]|0)+1<<16>>16;c[f>>2]=c[i>>2];k=c[f>>2]|0;l=j;return k|0}else{c[f>>2]=Hm(a,c[g>>2]|0,c[h>>2]|0)|0;k=c[f>>2]|0;l=j;return k|0}return 0}function Cm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[d>>2]=a;c[e>>2]=b;c[g>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[d>>2]|0)+104>>2]|0))break;c[h>>2]=(c[(c[d>>2]|0)+100>>2]|0)+((c[f>>2]|0)*48|0);if((c[e>>2]|0)>>>0<=(c[(c[h>>2]|0)+20>>2]|0)>>>0){b=om(c[(c[h>>2]|0)+16>>2]|0,c[e>>2]|0)|0;c[g>>2]=c[g>>2]|b}c[f>>2]=(c[f>>2]|0)+1}l=i;return c[g>>2]|0}function Dm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+48|0;e=n+32|0;f=n+28|0;g=n+24|0;h=n+20|0;m=n+16|0;i=n+12|0;j=n;k=n+8|0;c[e>>2]=b;c[f>>2]=d;c[g>>2]=c[(c[e>>2]|0)+16>>2];c[h>>2]=c[(c[e>>2]|0)+20>>2];c[m>>2]=0;c[i>>2]=c[(c[g>>2]|0)+160>>2];if(c[f>>2]|0)c[m>>2]=Gm(c[(c[g>>2]|0)+216>>2]|0,c[f>>2]|0,c[i>>2]|0,c[(c[e>>2]|0)+4>>2]|0)|0;else{d=c[(c[g>>2]|0)+160>>2]|0;d=RR((c[h>>2]|0)-1|0,0,d|0,((d|0)<0)<<31>>31|0)|0;f=j;c[f>>2]=d;c[f+4>>2]=z;j=km(c[(c[g>>2]|0)+64>>2]|0,c[(c[e>>2]|0)+4>>2]|0,c[i>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;c[m>>2]=j;c[m>>2]=(c[m>>2]|0)==522?0:j}if((c[h>>2]|0)!=1){m=c[m>>2]|0;l=n;return m|0}if(c[m>>2]|0){k=(c[g>>2]|0)+112|0;c[k>>2]=-1;c[k+4>>2]=-1;c[k+8>>2]=-1;c[k+12>>2]=-1;m=c[m>>2]|0;l=n;return m|0}else{c[k>>2]=(c[(c[e>>2]|0)+4>>2]|0)+24;e=(c[g>>2]|0)+112|0;b=c[k>>2]|0;d=e+16|0;do{a[e>>0]=a[b>>0]|0;e=e+1|0;b=b+1|0}while((e|0)<(d|0));m=c[m>>2]|0;l=n;return m|0}return 0}function Em(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if((e[(c[b>>2]|0)+24>>1]|0)&2|0)Tk(c[b>>2]|0,1);a=(c[(c[b>>2]|0)+28>>2]|0)+12|0;c[a>>2]=(c[a>>2]|0)+-1;ub[c[148>>2]&255](c[(c[(c[b>>2]|0)+28>>2]|0)+44>>2]|0,c[c[b>>2]>>2]|0,1);l=d;return}function Fm(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(c[(c[b>>2]|0)+128>>2]|0){l=d;return}if(Hk(c[(c[b>>2]|0)+212>>2]|0)|0){l=d;return}pl(c[b>>2]|0);l=d;return}function Gm(a,b,d,f){a=a|0;b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;g=l;l=l+32|0;k=g+24|0;n=g+20|0;h=g+16|0;j=g+12|0;i=g+8|0;m=g;c[k>>2]=a;c[n>>2]=b;c[h>>2]=d;c[j>>2]=f;c[i>>2]=e[(c[k>>2]|0)+52+14>>1];c[i>>2]=(c[i>>2]&65024)+((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|0;g=p+12|0;h=p+8|0;i=p+4|0;j=p;c[q>>2]=a;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[g>>2]=Mm(c[q>>2]|0,c[k>>2]|0,h)|0;if(c[g>>2]|0){q=c[g>>2]|0;l=p;return q|0}c[j>>2]=(c[h>>2]|0)+16384;if(!(c[k>>2]|0)){c[h>>2]=(c[h>>2]|0)+136;c[i>>2]=0}else c[i>>2]=4062+((c[k>>2]|0)-1<<12);c[c[n>>2]>>2]=(c[h>>2]|0)+-4;c[c[m>>2]>>2]=c[j>>2];c[c[o>>2]>>2]=c[i>>2];q=c[g>>2]|0;l=p;return q|0}function Km(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[b>>2]|0)*383&8191|0}function Lm(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[b>>2]|0)+1&8191|0}function Mm(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;g=o+24|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o;c[h>>2]=b;c[i>>2]=e;c[j>>2]=f;c[k>>2]=0;do if((c[(c[h>>2]|0)+24>>2]|0)<=(c[i>>2]|0)){c[m>>2]=(c[i>>2]|0)+1<<2;m=c[m>>2]|0;c[n>>2]=Qd(c[(c[h>>2]|0)+32>>2]|0,m,((m|0)<0)<<31>>31)|0;if(c[n>>2]|0){GR((c[n>>2]|0)+(c[(c[h>>2]|0)+24>>2]<<2)|0,0,(c[i>>2]|0)+1-(c[(c[h>>2]|0)+24>>2]|0)<<2|0)|0;c[(c[h>>2]|0)+32>>2]=c[n>>2];c[(c[h>>2]|0)+24>>2]=(c[i>>2]|0)+1;break}c[c[j>>2]>>2]=0;c[g>>2]=7;n=c[g>>2]|0;l=o;return n|0}while(0);do if(!(c[(c[(c[h>>2]|0)+32>>2]|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;c[e>>2]=d}while((d|0)!=0);l=i;return}function Pm(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!((c[b>>2]|0)!=0&(c[b>>2]|0)!=5)){b=0;b=b&1;l=d;return b|0}b=(c[b>>2]|0)!=6;b=b&1;l=d;return b|0} +function sG(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+64|0;q=r+8|0;p=r;i=r+44|0;j=r+40|0;k=r+49|0;m=r+36|0;n=r+32|0;o=r+48|0;h=r+28|0;c[i>>2]=b;c[j>>2]=e;a[k>>0]=f;c[m>>2]=g;c[n>>2]=lp(c[c[i>>2]>>2]|0,c[j>>2]|0,o,h)|0;if(c[n>>2]|0){if((c[n>>2]|0)==7|(c[n>>2]|0)==3082)c[(c[i>>2]|0)+24>>2]=1;q=c[i>>2]|0;c[p>>2]=c[j>>2];vG(q,37292,p);l=r;return}if((d[o>>0]|0|0)==(d[k>>0]|0|0)?(c[h>>2]|0)==(c[m>>2]|0):0){l=r;return}p=c[i>>2]|0;k=d[k>>0]|0;m=c[m>>2]|0;n=d[o>>0]|0;o=c[h>>2]|0;c[q>>2]=c[j>>2];c[q+4>>2]=k;c[q+8>>2]=m;c[q+12>>2]=n;c[q+16>>2]=o;vG(p,37321,q);l=r;return}function tG(b,f,g,h,i){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;ca=l;l=l+256|0;_=ca+96|0;Z=ca+88|0;Y=ca+80|0;X=ca+72|0;aa=ca+64|0;$=ca+48|0;m=ca+40|0;k=ca+32|0;S=ca+240|0;T=ca+236|0;U=ca+232|0;V=ca+228|0;W=ca+24|0;n=ca+224|0;o=ca+220|0;j=ca+216|0;p=ca+212|0;q=ca+208|0;r=ca+204|0;s=ca+200|0;t=ca+196|0;u=ca+192|0;v=ca+188|0;w=ca+184|0;x=ca+180|0;y=ca+176|0;z=ca+172|0;A=ca+168|0;B=ca+164|0;C=ca+160|0;D=ca+156|0;E=ca+152|0;F=ca+148|0;G=ca+144|0;H=ca+140|0;I=ca+136|0;J=ca+132|0;K=ca+128|0;L=ca+244|0;M=ca;N=ca+124|0;O=ca+120|0;P=ca+116|0;Q=ca+112|0;R=ca+108|0;c[T>>2]=b;c[U>>2]=f;c[V>>2]=g;g=W;c[g>>2]=h;c[g+4>>2]=i;c[n>>2]=0;c[p>>2]=-1;c[w>>2]=1;c[x>>2]=1;c[F>>2]=0;c[H>>2]=0;c[I>>2]=c[(c[T>>2]|0)+28>>2];c[J>>2]=c[(c[T>>2]|0)+32>>2];c[K>>2]=c[(c[T>>2]|0)+36>>2];a[L>>0]=0;c[B>>2]=c[c[T>>2]>>2];c[D>>2]=c[(c[B>>2]|0)+36>>2];if(!(c[U>>2]|0)){c[S>>2]=0;ba=c[S>>2]|0;l=ca;return ba|0}if(wG(c[T>>2]|0,c[U>>2]|0)|0){c[S>>2]=0;ba=c[S>>2]|0;l=ca;return ba|0}c[(c[T>>2]|0)+28>>2]=36912;c[(c[T>>2]|0)+32>>2]=c[U>>2];i=op(c[B>>2]|0,c[U>>2]|0,n,0)|0;c[j>>2]=i;do if(!(i|0)){a[L>>0]=a[c[n>>2]>>0]|0;a[c[n>>2]>>0]=0;k=Bo(c[n>>2]|0)|0;c[j>>2]=k;if(k|0){ba=c[T>>2]|0;c[m>>2]=c[j>>2];vG(ba,36960,m);break}c[y>>2]=c[(c[n>>2]|0)+56>>2];c[t>>2]=d[(c[n>>2]|0)+5>>0];c[(c[T>>2]|0)+28>>2]=36998;c[E>>2]=((d[(c[y>>2]|0)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>>2]|0)!=(d[(c[y>>2]|0)+((c[t>>2]|0)+7)>>0]|0):0){ba=c[T>>2]|0;$=d[(c[y>>2]|0)+((c[t>>2]|0)+7)>>0]|0;aa=c[U>>2]|0;c[_>>2]=c[s>>2];c[_+4>>2]=$;c[_+8>>2]=aa;vG(ba,37192,_)}}}else{ba=c[T>>2]|0;c[k>>2]=c[j>>2];vG(ba,36922,k)}while(0);if(!(c[w>>2]|0))a[c[n>>2]>>0]=a[L>>0]|0;np(c[n>>2]|0);c[(c[T>>2]|0)+28>>2]=c[I>>2];c[(c[T>>2]|0)+32>>2]=c[J>>2];c[(c[T>>2]|0)+36>>2]=c[K>>2];c[S>>2]=(c[p>>2]|0)+1;ba=c[S>>2]|0;l=ca;return ba|0}function uG(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;f=g+4|0;e=g;c[f>>2]=a;c[e>>2]=b;l=g;return (d[(c[(c[f>>2]|0)+8>>2]|0)+(((c[e>>2]|0)>>>0)/8|0)>>0]|0)&1<<(c[e>>2]&7)|0}function vG(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;i=j;f=j+28|0;g=j+24|0;h=j+8|0;c[f>>2]=a;c[g>>2]=b;if(!(c[(c[f>>2]|0)+16>>2]|0)){l=j;return}b=(c[f>>2]|0)+16|0;c[b>>2]=(c[b>>2]|0)+-1;b=(c[f>>2]|0)+20|0;c[b>>2]=(c[b>>2]|0)+1;c[h>>2]=e;if(c[(c[f>>2]|0)+40+12>>2]|0)zd((c[f>>2]|0)+40|0,36910,1);if(c[(c[f>>2]|0)+28>>2]|0){b=(c[f>>2]|0)+40|0;e=c[(c[f>>2]|0)+28>>2]|0;a=c[(c[f>>2]|0)+36>>2]|0;c[i>>2]=c[(c[f>>2]|0)+32>>2];c[i+4>>2]=a;Vi(b,e,i)}kd((c[f>>2]|0)+40|0,c[g>>2]|0,h);if((d[(c[f>>2]|0)+40+24>>0]|0|0)!=1){l=j;return}c[(c[f>>2]|0)+24>>2]=1;l=j;return}function wG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;h=i+8|0;e=i;g=i+20|0;d=i+16|0;f=i+12|0;c[d>>2]=a;c[f>>2]=b;do if(c[f>>2]|0){a=c[d>>2]|0;b=c[f>>2]|0;if((c[f>>2]|0)>>>0>(c[(c[d>>2]|0)+12>>2]|0)>>>0){c[e>>2]=b;vG(a,37244,e);c[g>>2]=1;break}e=(uG(a,b)|0)!=0;b=c[d>>2]|0;a=c[f>>2]|0;if(e){c[h>>2]=a;vG(b,37267,h);c[g>>2]=1;break}else{qG(b,a);c[g>>2]=0;break}}else c[g>>2]=1;while(0);l=i;return c[g>>2]|0}function xG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;a=c[d>>2]|0;b=(c[a>>2]|0)+1|0;c[a>>2]=b;c[g>>2]=b;c[(c[d>>2]|0)+(c[g>>2]<<2)>>2]=c[e>>2];while(1){b=((c[g>>2]|0)>>>0)/2|0;c[f>>2]=b;if(b>>>0<=0){a=5;break}if((c[(c[d>>2]|0)+(c[f>>2]<<2)>>2]|0)>>>0<=(c[(c[d>>2]|0)+(c[g>>2]<<2)>>2]|0)>>>0){a=5;break}c[e>>2]=c[(c[d>>2]|0)+(c[f>>2]<<2)>>2];c[(c[d>>2]|0)+(c[f>>2]<<2)>>2]=c[(c[d>>2]|0)+(c[g>>2]<<2)>>2];c[(c[d>>2]|0)+(c[g>>2]<<2)>>2]=c[e>>2];c[g>>2]=c[f>>2]}if((a|0)==5){l=h;return}}function yG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[f>>2]=b;b=c[c[e>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+4>>2]|0)==(c[g+4>>2]|0):0)):0)break;a[(c[k>>2]|0)+66>>0]=0}while(0);c[k>>2]=c[(c[k>>2]|0)+8>>2]}l=m;return}function AG(b,f,g,h){b=b|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;r=u+36|0;n=u+32|0;i=u+28|0;s=u+24|0;o=u+20|0;t=u+16|0;p=u+12|0;j=u+8|0;k=u+4|0;q=u;m=u+40|0;c[n>>2]=b;c[i>>2]=f;c[s>>2]=g;c[o>>2]=h;h=c[i>>2]|0;if(h>>>0>($m(c[n>>2]|0)|0)>>>0){c[r>>2]=um(66688)|0;t=c[r>>2]|0;l=u;return t|0}c[p>>2]=aD(c[n>>2]|0,c[i>>2]|0,t,0,0)|0;if(c[p>>2]|0){c[r>>2]=c[p>>2];t=c[r>>2]|0;l=u;return t|0}a:do if(!(a[(c[t>>2]|0)+8>>0]|0)){a[(c[t>>2]|0)+8>>0]=1;c[q>>2]=d[(c[t>>2]|0)+5>>0];c[k>>2]=0;while(1){b=c[t>>2]|0;if((c[k>>2]|0)>=(e[(c[t>>2]|0)+18>>1]|0))break;c[j>>2]=(c[b+56>>2]|0)+(e[(c[t>>2]|0)+20>>1]&(d[(c[(c[t>>2]|0)+64>>2]|0)+(c[k>>2]<<1)>>0]<<8|d[(c[(c[t>>2]|0)+64>>2]|0)+(c[k>>2]<<1)+1>>0]));if((a[(c[t>>2]|0)+4>>0]|0)==0?(h=c[n>>2]|0,i=el(c[j>>2]|0)|0,c[p>>2]=AG(h,i,1,c[o>>2]|0)|0,c[p>>2]|0):0)break a;c[p>>2]=BG(c[t>>2]|0,c[j>>2]|0,m)|0;if(c[p>>2]|0)break a;c[k>>2]=(c[k>>2]|0)+1}if(a[b+4>>0]|0){if(c[o>>2]|0){o=c[o>>2]|0;c[o>>2]=(c[o>>2]|0)+(e[(c[t>>2]|0)+18>>1]|0)}}else{m=c[n>>2]|0;n=el((c[(c[t>>2]|0)+56>>2]|0)+((c[q>>2]|0)+8)|0)|0;c[p>>2]=AG(m,n,1,c[o>>2]|0)|0;if(c[p>>2]|0)break}b=c[t>>2]|0;if(c[s>>2]|0){CG(b,p);break}s=Tm(c[b+72>>2]|0)|0;c[p>>2]=s;if(!s)cq(c[t>>2]|0,d[(c[(c[t>>2]|0)+56>>2]|0)+(c[q>>2]|0)>>0]|8)}else c[p>>2]=um(66693)|0;while(0);a[(c[t>>2]|0)+8>>0]=0;np(c[t>>2]|0);c[r>>2]=c[p>>2];t=c[r>>2]|0;l=u;return t|0}function BG(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+80|0;m=t+64|0;n=t+60|0;o=t+56|0;u=t+52|0;p=t+48|0;q=t;r=t+44|0;g=t+40|0;h=t+36|0;i=t+32|0;j=t+28|0;k=t+24|0;c[n>>2]=a;c[o>>2]=d;c[u>>2]=f;c[p>>2]=c[(c[n>>2]|0)+52>>2];ub[c[(c[n>>2]|0)+80>>2]&255](c[n>>2]|0,c[o>>2]|0,q);b[c[u>>2]>>1]=b[q+18>>1]|0;if((e[q+16>>1]|0|0)==(c[q+12>>2]|0)){c[m>>2]=0;u=c[m>>2]|0;l=t;return u|0}if(((c[o>>2]|0)+(e[q+18>>1]|0)+-1|0)>>>0>((c[(c[n>>2]|0)+56>>2]|0)+(e[(c[n>>2]|0)+20>>1]|0)|0)>>>0){c[m>>2]=um(64249)|0;u=c[m>>2]|0;l=t;return u|0}c[r>>2]=el((c[o>>2]|0)+(e[q+18>>1]|0)+-4|0)|0;c[i>>2]=(c[(c[p>>2]|0)+36>>2]|0)-4;c[h>>2]=(((c[q+12>>2]|0)-(e[q+16>>1]|0)+(c[i>>2]|0)-1|0)>>>0)/((c[i>>2]|0)>>>0)|0;while(1){u=c[h>>2]|0;c[h>>2]=u+-1;if(!u){s=23;break}c[j>>2]=0;c[k>>2]=0;if((c[r>>2]|0)>>>0<2){s=9;break}u=c[r>>2]|0;if(u>>>0>($m(c[p>>2]|0)|0)>>>0){s=9;break}if(c[h>>2]|0?(c[g>>2]=Np(c[p>>2]|0,c[r>>2]|0,k,j)|0,c[g>>2]|0):0){s=12;break}if(!(c[k>>2]|0)?(u=FG(c[p>>2]|0,c[r>>2]|0)|0,c[k>>2]=u,!(u|0)):0)s=17;else if((Ao(c[(c[k>>2]|0)+72>>2]|0)|0)!=1)c[g>>2]=um(64285)|0;else s=17;if((s|0)==17){s=0;c[g>>2]=DG(c[p>>2]|0,c[k>>2]|0,c[r>>2]|0)|0}if(c[k>>2]|0)Ym(c[(c[k>>2]|0)+72>>2]|0);if(c[g>>2]|0){s=21;break}c[r>>2]=c[j>>2]}if((s|0)==9){c[m>>2]=um(64265)|0;u=c[m>>2]|0;l=t;return u|0}else if((s|0)==12){c[m>>2]=c[g>>2];u=c[m>>2]|0;l=t;return u|0}else if((s|0)==21){c[m>>2]=c[g>>2];u=c[m>>2]|0;l=t;return u|0}else if((s|0)==23){c[m>>2]=0;u=c[m>>2]|0;l=t;return u|0}return 0}function CG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(c[c[e>>2]>>2]|0){l=f;return}d=DG(c[(c[d>>2]|0)+52>>2]|0,c[d>>2]|0,c[(c[d>>2]|0)+84>>2]|0)|0;c[c[e>>2]>>2]=d;l=f;return}function DG(b,d,f){b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;k=s+40|0;m=s+36|0;n=s+32|0;o=s+28|0;p=s+24|0;q=s+20|0;r=s+16|0;g=s+12|0;h=s+8|0;i=s+4|0;j=s;c[m>>2]=b;c[n>>2]=d;c[o>>2]=f;c[p>>2]=0;c[q>>2]=0;c[r>>2]=c[(c[m>>2]|0)+12>>2];if((c[o>>2]|0)>>>0<2){c[k>>2]=um(64103)|0;r=c[k>>2]|0;l=s;return r|0}if(c[n>>2]|0){c[g>>2]=c[n>>2];EG(c[(c[g>>2]|0)+72>>2]|0)}else c[g>>2]=FG(c[m>>2]|0,c[o>>2]|0)|0;c[h>>2]=Tm(c[(c[r>>2]|0)+72>>2]|0)|0;do if(!(c[h>>2]|0)){c[i>>2]=el((c[(c[r>>2]|0)+56>>2]|0)+36|0)|0;Xm((c[(c[r>>2]|0)+56>>2]|0)+36|0,(c[i>>2]|0)+1|0);if(e[(c[m>>2]|0)+22>>1]&4|0){if((c[g>>2]|0)==0?(n=op(c[m>>2]|0,c[o>>2]|0,g,0)|0,c[h>>2]=n,n|0):0)break;n=Tm(c[(c[g>>2]|0)+72>>2]|0)|0;c[h>>2]=n;if(n|0)break;GR(c[(c[g>>2]|0)+56>>2]|0,0,c[(c[(c[g>>2]|0)+52>>2]|0)+32>>2]|0)|0}if(a[(c[m>>2]|0)+17>>0]|0?(sp(c[m>>2]|0,c[o>>2]|0,2,0,h),c[h>>2]|0):0)break;if(c[i>>2]|0){c[q>>2]=el((c[(c[r>>2]|0)+56>>2]|0)+32|0)|0;c[h>>2]=op(c[m>>2]|0,c[q>>2]|0,p,0)|0;if(c[h>>2]|0)break;c[j>>2]=el((c[(c[p>>2]|0)+56>>2]|0)+4|0)|0;if((c[j>>2]|0)>>>0>((((c[(c[m>>2]|0)+36>>2]|0)>>>0)/4|0)-2|0)>>>0){c[h>>2]=um(64156)|0;break}if((c[j>>2]|0)>>>0<((((c[(c[m>>2]|0)+36>>2]|0)>>>0)/4|0)-8|0)>>>0){c[h>>2]=Tm(c[(c[p>>2]|0)+72>>2]|0)|0;if(c[h>>2]|0)break;Xm((c[(c[p>>2]|0)+56>>2]|0)+4|0,(c[j>>2]|0)+1|0);Xm((c[(c[p>>2]|0)+56>>2]|0)+(8+(c[j>>2]<<2))|0,c[o>>2]|0);if(c[g>>2]|0?(e[(c[m>>2]|0)+22>>1]&4|0)==0:0)GG(c[(c[g>>2]|0)+72>>2]|0);c[h>>2]=HG(c[m>>2]|0,c[o>>2]|0)|0;break}}if((c[g>>2]|0)==0?(n=op(c[m>>2]|0,c[o>>2]|0,g,0)|0,c[h>>2]=n,0!=(n|0)):0)break;c[h>>2]=Tm(c[(c[g>>2]|0)+72>>2]|0)|0;if(!(c[h>>2]|0)){Xm(c[(c[g>>2]|0)+56>>2]|0,c[q>>2]|0);Xm((c[(c[g>>2]|0)+56>>2]|0)+4|0,0);Xm((c[(c[r>>2]|0)+56>>2]|0)+32|0,c[o>>2]|0)}}while(0);if(c[g>>2]|0)a[c[g>>2]>>0]=0;np(c[g>>2]|0);np(c[p>>2]|0);c[k>>2]=c[h>>2];r=c[k>>2]|0;l=s;return r|0}function EG(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;IG(c[d>>2]|0);l=b;return}function FG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=pm(c[c[e>>2]>>2]|0,c[f>>2]|0)|0;if(c[g>>2]|0){c[d>>2]=xp(c[g>>2]|0,c[f>>2]|0,c[e>>2]|0)|0;g=c[d>>2]|0;l=h;return g|0}else{c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}return 0}function GG(d){d=d|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=d;c[g>>2]=c[(c[f>>2]|0)+16>>2];if(a[(c[g>>2]|0)+13>>0]|0){l=h;return}if(!(e[(c[f>>2]|0)+24>>1]&2)){l=h;return}if(c[(c[g>>2]|0)+104>>2]|0){l=h;return}g=(c[f>>2]|0)+24|0;b[g>>1]=e[g>>1]|16;g=(c[f>>2]|0)+24|0;b[g>>1]=e[g>>1]&-5;l=h;return}function HG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;if((c[(c[d>>2]|0)+60>>2]|0)==0?(b=hn(c[(c[d>>2]|0)+44>>2]|0)|0,c[(c[d>>2]|0)+60>>2]=b,(c[(c[d>>2]|0)+60>>2]|0)==0):0)c[f>>2]=7;if(c[f>>2]|0){f=c[f>>2]|0;l=g;return f|0}b=c[e>>2]|0;if(b>>>0>(Cp(c[(c[d>>2]|0)+60>>2]|0)|0)>>>0){f=c[f>>2]|0;l=g;return f|0}c[f>>2]=om(c[(c[d>>2]|0)+60>>2]|0,c[e>>2]|0)|0;f=c[f>>2]|0;l=g;return f|0}function IG(a){a=a|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;a=(c[e>>2]|0)+26|0;b[a>>1]=(b[a>>1]|0)+1<<16>>16;a=(c[(c[e>>2]|0)+28>>2]|0)+12|0;c[a>>2]=(c[a>>2]|0)+1;l=d;return}function JG(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;h=p+32|0;i=p+28|0;j=p+24|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;f=p+4|0;g=p;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[n>>2]=0;c[o>>2]=c[(c[i>>2]|0)+4>>2];if(c[(c[o>>2]|0)+8>>2]|0){c[h>>2]=262;o=c[h>>2]|0;l=p;return o|0}if((c[j>>2]|0)>>>0<2){c[h>>2]=um(66814)|0;o=c[h>>2]|0;l=p;return o|0}c[m>>2]=op(c[o>>2]|0,c[j>>2]|0,n,0)|0;if(c[m>>2]|0){c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}c[m>>2]=EF(c[i>>2]|0,c[j>>2]|0,0)|0;if(c[m>>2]|0){np(c[n>>2]|0);c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}c[c[k>>2]>>2]=0;if(a[(c[o>>2]|0)+17>>0]|0){To(c[i>>2]|0,4,f);b=c[n>>2]|0;do if((c[j>>2]|0)==(c[f>>2]|0)){CG(b,m);np(c[n>>2]|0);if(c[m>>2]|0){c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}}else{np(b);c[m>>2]=op(c[o>>2]|0,c[f>>2]|0,g,0)|0;if(c[m>>2]|0){c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}c[m>>2]=pp(c[o>>2]|0,c[g>>2]|0,1,0,c[j>>2]|0,0)|0;np(c[g>>2]|0);if(c[m>>2]|0){c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}c[g>>2]=0;c[m>>2]=op(c[o>>2]|0,c[f>>2]|0,g,0)|0;CG(c[g>>2]|0,m);np(c[g>>2]|0);if(!(c[m>>2]|0)){c[c[k>>2]>>2]=c[f>>2];break}c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}while(0);c[f>>2]=(c[f>>2]|0)+-1;while(1){if((c[f>>2]|0)!=((((c[481]|0)>>>0)/((c[(c[o>>2]|0)+32>>2]|0)>>>0)|0)+1|0)?(n=hp(c[o>>2]|0,c[f>>2]|0)|0,(n|0)!=(c[f>>2]|0)):0)break;c[f>>2]=(c[f>>2]|0)+-1}c[m>>2]=Xo(c[i>>2]|0,4,c[f>>2]|0)|0}else{CG(c[n>>2]|0,m);np(c[n>>2]|0)}c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}function KG(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;a[(c[e>>2]|0)+56>>0]=1;b=LG((c[e>>2]|0)+64|0,(c[e>>2]|0)+36|0)|0;l=d;return b|0}function LG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+64|0;e=k+60|0;f=k+56|0;d=k+52|0;g=k+48|0;h=k;i=k+44|0;j=k+40|0;c[e>>2]=a;c[f>>2]=b;c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0,18,j)}c[f>>2]=c[i>>2];j=c[f>>2]|0;l=k;return j|0}function NG(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+28|0;h=n+24|0;i=n+20|0;j=n+16|0;k=n+12|0;m=n+8|0;e=n+4|0;f=n;c[h>>2]=a;c[i>>2]=b;c[e>>2]=SG(c[h>>2]|0)|0;if(c[e>>2]|0){c[g>>2]=c[e>>2];m=c[g>>2]|0;l=n;return m|0}c[m>>2]=c[c[i>>2]>>2];e=TG(c[(c[h>>2]|0)+8>>2]|0)|0;c[(c[h>>2]|0)+32>>2]=e;c[k>>2]=Cg(256,0)|0;if(!(c[k>>2]|0)){c[g>>2]=7;m=c[g>>2]|0;l=n;return m|0}while(1){if(!(c[m>>2]|0))break;a=c[m>>2]|0;do if(c[(c[i>>2]|0)+4>>2]|0)if((a|0)==(c[(c[i>>2]|0)+4>>2]|0)){c[f>>2]=0;break}else{c[f>>2]=(c[(c[i>>2]|0)+4>>2]|0)+(c[(c[m>>2]|0)+4>>2]|0);break}else c[f>>2]=c[a+4>>2];while(0);c[(c[m>>2]|0)+4>>2]=0;c[j>>2]=0;while(1){if(!(c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]|0))break;c[m>>2]=UG(c[h>>2]|0,c[m>>2]|0,c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]|0)|0;c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]=0;c[j>>2]=(c[j>>2]|0)+1}c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]=c[m>>2];c[m>>2]=c[f>>2]}c[m>>2]=0;c[j>>2]=0;while(1){if((c[j>>2]|0)>=64)break;if(c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]|0){if(c[m>>2]|0)a=UG(c[h>>2]|0,c[m>>2]|0,c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]|0)|0;else a=c[(c[k>>2]|0)+(c[j>>2]<<2)>>2]|0;c[m>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0)!=1)if((d[(c[e>>2]|0)+60>>0]|0|0)==2){c[b>>2]=139;break}else{c[b>>2]=140;break}else c[b>>2]=138;while(0);l=f;return c[b>>2]|0}function UG(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+24|0;h=m+20|0;i=m+16|0;j=m+12|0;k=m+8|0;f=m+4|0;g=m;c[e>>2]=a;c[h>>2]=b;c[i>>2]=d;c[j>>2]=0;c[k>>2]=j;c[f>>2]=0;while(1){c[g>>2]=sb[c[(c[e>>2]|0)+32>>2]&255](c[e>>2]|0,f,(c[h>>2]|0)+8|0,c[c[h>>2]>>2]|0,(c[i>>2]|0)+8|0,c[c[i>>2]>>2]|0)|0;if((c[g>>2]|0)<=0){c[c[k>>2]>>2]=c[h>>2];c[k>>2]=(c[h>>2]|0)+4;c[h>>2]=c[(c[h>>2]|0)+4>>2];if(!(c[h>>2]|0)){a=4;break}else continue}else{c[c[k>>2]>>2]=c[i>>2];c[k>>2]=(c[i>>2]|0)+4;c[i>>2]=c[(c[i>>2]|0)+4>>2];c[f>>2]=0;if(!(c[i>>2]|0)){a=6;break}else continue}}if((a|0)==4){c[c[k>>2]>>2]=c[i>>2];k=c[j>>2]|0;l=m;return k|0}else if((a|0)==6){c[c[k>>2]>>2]=c[h>>2];k=c[j>>2]|0;l=m;return k|0}return 0}function VG(b,f,g,h,i,j){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;x=l;l=l+64|0;t=x+52|0;u=x+48|0;v=x+44|0;w=x+40|0;q=x+36|0;r=x+32|0;z=x+28|0;y=x+24|0;k=x+20|0;m=x+16|0;n=x+12|0;o=x+8|0;s=x+4|0;p=x;c[t>>2]=b;c[u>>2]=f;c[v>>2]=g;c[w>>2]=h;c[q>>2]=i;c[r>>2]=j;c[z>>2]=c[v>>2];c[y>>2]=c[q>>2];c[k>>2]=d[(c[z>>2]|0)+1>>0];c[m>>2]=d[(c[y>>2]|0)+1>>0];c[n>>2]=(c[z>>2]|0)+(d[c[z>>2]>>0]|0);c[o>>2]=(c[y>>2]|0)+(d[c[y>>2]>>0]|0);b=c[k>>2]|0;f=c[m>>2]|0;a:do if(!((c[k>>2]|0)>7&(c[m>>2]|0)>7)){if((b|0)==(f|0)){if((d[c[n>>2]>>0]^d[c[o>>2]>>0])&128|0){c[s>>2]=d[c[n>>2]>>0]&128|0?-1:1;break}c[s>>2]=0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(d[37532+(c[k>>2]|0)>>0]|0))break a;z=(d[(c[n>>2]|0)+(c[p>>2]|0)>>0]|0)-(d[(c[o>>2]|0)+(c[p>>2]|0)>>0]|0)|0;c[s>>2]=z;if(z|0)break a;c[p>>2]=(c[p>>2]|0)+1}}do if((c[m>>2]|0)<=7)if((c[k>>2]|0)>7){c[s>>2]=-1;break}else{c[s>>2]=(c[k>>2]|0)-(c[m>>2]|0);break}else c[s>>2]=1;while(0);if((c[s>>2]|0)>0){if(!(d[c[n>>2]>>0]&128))break;c[s>>2]=-1;break}else{if(!(d[c[o>>2]>>0]&128))break;c[s>>2]=1;break}}else c[s>>2]=b-f;while(0);b=c[(c[(c[t>>2]|0)+8>>2]|0)+28>>2]|0;if(!(c[s>>2]|0)){if((e[b+6>>1]|0)<=1){z=c[s>>2]|0;l=x;return z|0}c[s>>2]=YG(c[t>>2]|0,c[u>>2]|0,c[v>>2]|0,c[w>>2]|0,c[q>>2]|0,c[r>>2]|0)|0;z=c[s>>2]|0;l=x;return z|0}else{if(!(a[c[b+16>>2]>>0]|0)){z=c[s>>2]|0;l=x;return z|0}c[s>>2]=O(c[s>>2]|0,-1)|0;z=c[s>>2]|0;l=x;return z|0}return 0}function WG(b,f,g,h,i,j){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0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]=c[(c[g>>2]|0)+4>>2];c[i>>2]=_G((c[(c[g>>2]|0)+12>>2]|0)+((c[j>>2]|0)*56|0)|0)|0;if(!(c[i>>2]|0)){c[e>>2]=0;c[n>>2]=(c[(c[g>>2]|0)+12>>2]|0)+((c[j>>2]&65534)*56|0);c[o>>2]=(c[(c[g>>2]|0)+12>>2]|0)+((c[j>>2]|1)*56|0);c[m>>2]=((c[c[g>>2]>>2]|0)+(c[j>>2]|0)|0)/2|0;while(1){if((c[m>>2]|0)<=0)break;do if(c[(c[n>>2]|0)+24>>2]|0)if(!(c[(c[o>>2]|0)+24>>2]|0)){c[f>>2]=-1;break}else{c[f>>2]=sb[c[(c[k>>2]|0)+32>>2]&255](c[k>>2]|0,e,c[(c[n>>2]|0)+32>>2]|0,c[(c[n>>2]|0)+20>>2]|0,c[(c[o>>2]|0)+32>>2]|0,c[(c[o>>2]|0)+20>>2]|0)|0;break}else c[f>>2]=1;while(0);do if((c[f>>2]|0)<0)p=12;else{if((c[f>>2]|0)==0?(c[n>>2]|0)>>>0<(c[o>>2]|0)>>>0:0){p=12;break}if(c[(c[n>>2]|0)+24>>2]|0)c[e>>2]=0;c[(c[(c[g>>2]|0)+8>>2]|0)+(c[m>>2]<<2)>>2]=((c[o>>2]|0)-(c[(c[g>>2]|0)+12>>2]|0)|0)/56|0;c[n>>2]=(c[(c[g>>2]|0)+12>>2]|0)+((c[(c[(c[g>>2]|0)+8>>2]|0)+((c[m>>2]^1)<<2)>>2]|0)*56|0)}while(0);if((p|0)==12){p=0;c[(c[(c[g>>2]|0)+8>>2]|0)+(c[m>>2]<<2)>>2]=((c[n>>2]|0)-(c[(c[g>>2]|0)+12>>2]|0)|0)/56|0;c[o>>2]=(c[(c[g>>2]|0)+12>>2]|0)+((c[(c[(c[g>>2]|0)+8>>2]|0)+((c[m>>2]^1)<<2)>>2]|0)*56|0);c[e>>2]=0}c[m>>2]=(c[m>>2]|0)/2|0}c[c[h>>2]>>2]=(c[(c[(c[g>>2]|0)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r+4>>2]|0,v|0,((v|0)<0)<<31>>31|0)|0;c[w>>2]=v;c[w+4>>2]=z;c[g>>2]=(c[p>>2]|0)-(c[s>>2]|0);while(1){if((c[g>>2]|0)<=0){t=27;break}c[k>>2]=c[g>>2];if((c[g>>2]|0)>(c[(c[o>>2]|0)+40>>2]|0))c[k>>2]=c[(c[o>>2]|0)+40>>2];c[j>>2]=cH(c[o>>2]|0,c[k>>2]|0,m)|0;if(c[j>>2]|0)break;MR((c[(c[o>>2]|0)+28>>2]|0)+((c[p>>2]|0)-(c[g>>2]|0))|0,c[m>>2]|0,c[k>>2]|0)|0;c[g>>2]=(c[g>>2]|0)-(c[k>>2]|0)}if((t|0)==27){c[c[q>>2]>>2]=c[(c[o>>2]|0)+28>>2];break}c[n>>2]=c[j>>2];w=c[n>>2]|0;l=u;return w|0}while(0);c[n>>2]=0;w=c[n>>2]|0;l=u;return w|0}function dH(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=l;l=l+32|0;k=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[k>>2]=a;c[e>>2]=b;c[f>>2]=d;c[g>>2]=0;b=(c[e>>2]|0)+8|0;j=c[b+4>>2]|0;d=c[(c[(c[(c[k>>2]|0)+8>>2]|0)+24>>2]|0)+144>>2]|0;a=((d|0)<0)<<31>>31;if(!((j|0)<(a|0)|((j|0)==(a|0)?(c[b>>2]|0)>>>0<=d>>>0:0))){k=c[g>>2]|0;l=i;return k|0}c[h>>2]=c[c[e>>2]>>2];if((c[c[c[h>>2]>>2]>>2]|0)<3){k=c[g>>2]|0;l=i;return k|0}c[g>>2]=wm(c[h>>2]|0,0,0,c[(c[e>>2]|0)+8>>2]|0,c[f>>2]|0)|0;k=c[g>>2]|0;l=i;return k|0}function eH(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;o=l;l=l+96|0;b=o+88|0;g=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=c[g>>2]|0;l=o;return r|0}function fH(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[e>>2]=(c[b>>2]|0)+64;c[f>>2]=0;c[d>>2]=gH(c[b>>2]|0,f)|0;if(!(c[d>>2]|0)){c[d>>2]=hH(c[e>>2]|0,c[f>>2]|0,0)|0;c[(c[b>>2]|0)+20>>2]=c[f>>2];c[f>>2]=0}if(!(c[d>>2]|0)){f=c[d>>2]|0;l=g;return f|0}zr(c[f>>2]|0);f=c[d>>2]|0;l=g;return f|0}function gH(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+64|0;j=s+52|0;k=s+48|0;m=s+44|0;n=s+40|0;o=s+36|0;p=s+32|0;q=s+28|0;r=s+24|0;e=s;f=s+20|0;g=s+16|0;h=s+12|0;i=s+8|0;c[j>>2]=a;c[k>>2]=b;c[m>>2]=0;c[n>>2]=0;c[o>>2]=0;while(1){if(c[n>>2]|0)break;if((c[o>>2]|0)>=(d[(c[j>>2]|0)+59>>0]|0|0))break;c[p>>2]=(c[j>>2]|0)+64+((c[o>>2]|0)*72|0);c[q>>2]=0;c[r>>2]=lH(c[(c[p>>2]|0)+28>>2]|0)|0;b=e;c[b>>2]=0;c[b+4>>2]=0;a:do if((c[(c[p>>2]|0)+28>>2]|0)<=16)c[n>>2]=mH(c[p>>2]|0,c[(c[p>>2]|0)+28>>2]|0,e,q)|0;else{c[g>>2]=0;c[q>>2]=nH(16)|0;if(!(c[q>>2]|0))c[n>>2]=7;c[f>>2]=0;while(1){if(!((c[f>>2]|0)<(c[(c[p>>2]|0)+28>>2]|0)?(c[n>>2]|0)==0:0))break a;c[h>>2]=0;if(((c[(c[p>>2]|0)+28>>2]|0)-(c[f>>2]|0)|0)<16)a=(c[(c[p>>2]|0)+28>>2]|0)-(c[f>>2]|0)|0;else a=16;c[i>>2]=a;c[n>>2]=mH(c[p>>2]|0,c[i>>2]|0,e,h)|0;if(!(c[n>>2]|0)){t=c[p>>2]|0;a=c[r>>2]|0;b=c[g>>2]|0;c[g>>2]=b+1;c[n>>2]=oH(t,a,b,c[q>>2]|0,c[h>>2]|0)|0}c[f>>2]=(c[f>>2]|0)+16}}while(0);a=c[q>>2]|0;if(!(c[n>>2]|0))c[m>>2]=a;else zr(a);c[o>>2]=(c[o>>2]|0)+1}if(!(c[n>>2]|0)){r=c[m>>2]|0;t=c[k>>2]|0;c[t>>2]=r;t=c[n>>2]|0;l=s;return t|0}zr(c[m>>2]|0);c[m>>2]=0;r=c[m>>2]|0;t=c[k>>2]|0;c[t>>2]=r;t=c[n>>2]|0;l=s;return t|0}function hH(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+24|0;g=n+20|0;h=n+16|0;i=n+8|0;j=n+4|0;k=n;c[g>>2]=a;c[h>>2]=b;c[n+12>>2]=e;c[i>>2]=0;c[k>>2]=c[c[h>>2]>>2];c[(c[h>>2]|0)+4>>2]=c[g>>2];c[j>>2]=0;while(1){a=c[h>>2]|0;if((c[j>>2]|0)>=(c[k>>2]|0))break;c[i>>2]=iH((c[a+12>>2]|0)+((c[j>>2]|0)*56|0)|0,0)|0;if(c[i>>2]|0){m=4;break}c[j>>2]=(c[j>>2]|0)+1}if((m|0)==4){c[f>>2]=c[i>>2];m=c[f>>2]|0;l=n;return m|0}c[j>>2]=(c[a>>2]|0)-1;while(1){if((c[j>>2]|0)<=0)break;jH(c[h>>2]|0,c[j>>2]|0);c[j>>2]=(c[j>>2]|0)+-1}c[f>>2]=d[(c[(c[g>>2]|0)+12>>2]|0)+11>>0];m=c[f>>2]|0;l=n;return m|0}function iH(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+12|0;e=g+8|0;h=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[h>>2]=c[(c[d>>2]|0)+48>>2];c[f>>2]=0;if(!(c[h>>2]|0)){h=c[f>>2]|0;l=g;return h|0}c[f>>2]=kH(c[d>>2]|0,c[e>>2]|0)|0;h=c[f>>2]|0;l=g;return h|0}function jH(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;f=o+36|0;g=o+32|0;h=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;m=o+12|0;n=o+8|0;d=o+4|0;e=o;c[f>>2]=a;c[g>>2]=b;if((c[g>>2]|0)>=((c[c[f>>2]>>2]|0)/2|0|0)){c[h>>2]=(c[g>>2]|0)-((c[c[f>>2]>>2]|0)/2|0)<<1;c[i>>2]=(c[h>>2]|0)+1}else{c[h>>2]=c[(c[(c[f>>2]|0)+8>>2]|0)+(c[g>>2]<<1<<2)>>2];c[i>>2]=c[(c[(c[f>>2]|0)+8>>2]|0)+((c[g>>2]<<1)+1<<2)>>2]}c[k>>2]=(c[(c[f>>2]|0)+12>>2]|0)+((c[h>>2]|0)*56|0);c[m>>2]=(c[(c[f>>2]|0)+12>>2]|0)+((c[i>>2]|0)*56|0);do if(c[(c[k>>2]|0)+24>>2]|0){if(!(c[(c[m>>2]|0)+24>>2]|0)){c[j>>2]=c[h>>2];break}c[n>>2]=c[(c[f>>2]|0)+4>>2];c[d>>2]=0;c[e>>2]=sb[c[(c[n>>2]|0)+32>>2]&255](c[n>>2]|0,d,c[(c[k>>2]|0)+32>>2]|0,c[(c[k>>2]|0)+20>>2]|0,c[(c[m>>2]|0)+32>>2]|0,c[(c[m>>2]|0)+20>>2]|0)|0;if((c[e>>2]|0)<=0){c[j>>2]=c[h>>2];break}else{c[j>>2]=c[i>>2];break}}else c[j>>2]=c[i>>2];while(0);c[(c[(c[f>>2]|0)+8>>2]|0)+(c[g>>2]<<2)>>2]=c[j>>2];l=o;return}function kH(a,b){a=a|0;b=b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0;b=g+12|0;e=g+8|0;d=g+4|0;f=g;c[b>>2]=a;c[e>>2]=2;while(1){a=c[e>>2]|0;if((c[e>>2]|0)>=(c[b>>2]|0))break;c[e>>2]=(c[e>>2]|0)+a}c[d>>2]=16+(a*60|0);if(Vp(100)|0)a=0;else{a=c[d>>2]|0;a=Cg(a,((a|0)<0)<<31>>31)|0}c[f>>2]=a;if(!(c[f>>2]|0)){f=c[f>>2]|0;l=g;return f|0}c[c[f>>2]>>2]=c[e>>2];c[(c[f>>2]|0)+4>>2]=0;c[(c[f>>2]|0)+12>>2]=(c[f>>2]|0)+16;c[(c[f>>2]|0)+8>>2]=(c[(c[f>>2]|0)+12>>2]|0)+((c[e>>2]|0)*56|0);f=c[f>>2]|0;l=g;return f|0}function oH(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=l;l=l+64|0;n=s+48|0;o=s+44|0;r=s+40|0;u=s+36|0;t=s+32|0;p=s+28|0;g=s+24|0;h=s+20|0;q=s+16|0;i=s+12|0;j=s+8|0;k=s+4|0;m=s;c[n>>2]=a;c[o>>2]=b;c[r>>2]=d;c[u>>2]=e;c[t>>2]=f;c[p>>2]=0;c[g>>2]=1;c[q>>2]=c[u>>2];c[p>>2]=pH(c[n>>2]|0,c[t>>2]|0,i)|0;c[h>>2]=1;while(1){if((c[h>>2]|0)>=(c[o>>2]|0))break;c[g>>2]=c[g>>2]<<4;c[h>>2]=(c[h>>2]|0)+1}c[h>>2]=1;while(1){if(!((c[h>>2]|0)<(c[o>>2]|0)?(c[p>>2]|0)==0:0))break;c[j>>2]=((c[r>>2]|0)/(c[g>>2]|0)|0|0)%16|0;c[k>>2]=(c[(c[q>>2]|0)+12>>2]|0)+((c[j>>2]|0)*56|0);do if(!(c[(c[k>>2]|0)+48>>2]|0)){c[m>>2]=nH(16)|0;if(!(c[m>>2]|0)){c[p>>2]=7;break}else{c[p>>2]=pH(c[n>>2]|0,c[m>>2]|0,(c[k>>2]|0)+48|0)|0;break}}while(0);if(!(c[p>>2]|0)){c[q>>2]=c[(c[(c[k>>2]|0)+48>>2]|0)+4>>2];c[g>>2]=(c[g>>2]|0)/16|0}c[h>>2]=(c[h>>2]|0)+1}a=c[i>>2]|0;if(!(c[p>>2]|0)){c[(c[(c[q>>2]|0)+12>>2]|0)+(((c[r>>2]|0)%16|0)*56|0)+48>>2]=a;u=c[p>>2]|0;l=s;return u|0}else{Dr(a);u=c[p>>2]|0;l=s;return u|0}return 0}function pH(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;g=j+16|0;e=j+12|0;f=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[e>>2]=b;c[f>>2]=d;c[h>>2]=0;if(Vp(100)|0)a=0;else a=Cg(64,0)|0;c[c[f>>2]>>2]=a;c[i>>2]=a;a=c[e>>2]|0;if(!(c[i>>2]|0)){zr(a);c[h>>2]=7;i=c[h>>2]|0;l=j;return i|0}c[(c[i>>2]|0)+4>>2]=a;c[c[i>>2]>>2]=c[g>>2];a=c[(c[g>>2]|0)+8>>2]|0;if(((c[(c[(c[g>>2]|0)+8>>2]|0)+8>>2]|0)+9|0)>((c[(c[(c[g>>2]|0)+8>>2]|0)+4>>2]|0)/2|0|0))a=(c[a+8>>2]|0)+9|0;else a=(c[a+4>>2]|0)/2|0;c[(c[i>>2]|0)+16>>2]=a;f=c[(c[i>>2]|0)+16>>2]|0;i=(c[g>>2]|0)+56+8|0;g=i;g=IR(c[g>>2]|0,c[g+4>>2]|0,f|0,((f|0)<0)<<31>>31|0)|0;c[i>>2]=g;c[i+4>>2]=z;i=c[h>>2]|0;l=j;return i|0}function qH(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;m=l;l=l+48|0;o=m+32|0;n=m+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=c[e>>2]|0;l=i;return h|0}else{c[c[g>>2]>>2]=(d[(c[f>>2]|0)+66>>0]|0|0)!=1?1:0;c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}return 0}function uH(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=b;c[f>>2]=d;b=c[e>>2]|0;if(a[(c[e>>2]|0)+56>>0]|0){c[h>>2]=(c[(c[b+20>>2]|0)+12>>2]|0)+((c[(c[(c[(c[e>>2]|0)+20>>2]|0)+8>>2]|0)+4>>2]|0)*56|0);c[c[f>>2]>>2]=c[(c[h>>2]|0)+20>>2];c[g>>2]=c[(c[h>>2]|0)+32>>2];h=c[g>>2]|0;l=i;return h|0}else{c[c[f>>2]>>2]=c[c[b+36>>2]>>2];c[g>>2]=(c[(c[e>>2]|0)+36>>2]|0)+8;h=c[g>>2]|0;l=i;return h|0}return 0}function vH(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;n=t+32|0;o=t+28|0;p=t+24|0;q=t+20|0;r=t+16|0;s=t+12|0;j=t+8|0;k=t+4|0;m=t;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;c[q>>2]=i;if(c[c[q>>2]>>2]|0){l=t;return}c[s>>2]=c[(c[n>>2]|0)+56>>2];c[j>>2]=(c[(c[n>>2]|0)+64>>2]|0)+(c[o>>2]<<1);c[r>>2]=(d[c[j>>2]>>0]|0)<<8|(d[(c[j>>2]|0)+1>>0]|0);c[m>>2]=d[(c[n>>2]|0)+5>>0];if((c[r>>2]|0)>>>0>=((d[(c[s>>2]|0)+((c[m>>2]|0)+5)>>0]|0)<<8|(d[(c[s>>2]|0)+((c[m>>2]|0)+5)+1>>0]|0))>>>0?((c[r>>2]|0)+(c[p>>2]|0)|0)>>>0<=(c[(c[(c[n>>2]|0)+52>>2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F=Da+360|0;ka=Da+356|0;la=Da+430|0;ma=Da+352|0;na=Da+348|0;G=Da+344|0;o=Da+340|0;H=Da+336|0;p=Da+332|0;oa=Da+320|0;pa=Da+300|0;I=Da+296|0;q=Da+288|0;qa=Da+264|0;ra=Da+244|0;sa=Da+224|0;r=Da+220|0;J=Da+216|0;ta=Da+432|0;K=Da+196|0;L=Da+176|0;M=Da+420|0;ua=Da+160|0;m=Da+152|0;s=Da+148|0;t=Da+144|0;u=Da+140|0;v=Da+418|0;w=Da+136|0;x=Da+132|0;y=Da+416|0;z=Da+128|0;A=Da+124|0;B=Da+120|0;N=Da+116|0;O=Da+112|0;P=Da+108|0;Q=Da+104|0;R=Da+100|0;S=Da+96|0;T=Da+92|0;U=Da+88|0;V=Da+84|0;W=Da+80|0;X=Da+76|0;Y=Da+72|0;Z=Da+68|0;_=Da+64|0;$=Da+60|0;aa=Da+56|0;ba=Da+52|0;ca=Da+48|0;da=Da+44|0;ea=Da;xa=Da+40|0;ya=Da+36|0;za=Da+32|0;Aa=Da+28|0;Ba=Da+24|0;c[wa>>2]=f;c[k>>2]=g;c[fa>>2]=h;c[Ca>>2]=i;c[C>>2]=j;c[n>>2]=0;c[ha>>2]=0;c[ka>>2]=0;c[o>>2]=0;c[H>>2]=0;a[ta>>0]=0;a[ta+1>>0]=0;a[ta+2>>0]=0;a[ta+3>>0]=0;a[ta+4>>0]=0;c[ua>>2]=0;c[ua+8>>2]=0;c[ga>>2]=c[(c[wa>>2]|0)+52>>2];if(!(c[fa>>2]|0)){c[va>>2]=7;Ca=c[va>>2]|0;l=Da;return Ca|0}c[ja>>2]=(d[(c[wa>>2]|0)+1>>0]|0)+(e[(c[wa>>2]|0)+18>>1]|0);if((c[ja>>2]|0)<2)c[F>>2]=0;else{do if(c[k>>2]|0)if((c[k>>2]|0)==(c[ja>>2]|0)){c[F>>2]=(c[ja>>2]|0)-2+(c[C>>2]|0);break}else{c[F>>2]=(c[k>>2]|0)-1;break}else c[F>>2]=0;while(0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2]<<2)>>2];c[sa+(c[ja>>2]<<2)>>2]=(c[na>>2]|0)-(e[(c[A>>2]|0)+16>>1]|0);if((c[sa+(c[ja>>2]<<2)>>2]|0)<0){g=52;break}c[D>>2]=0;while(1){if((c[D>>2]|0)>=(d[(c[A>>2]|0)+1>>0]|0))break;y=2+((yb[c[(c[A>>2]|0)+76>>2]&255](c[A>>2]|0,c[(c[A>>2]|0)+32+(c[D>>2]<<2)>>2]|0)|0)&65535)|0;z=sa+(c[ja>>2]<<2)|0;c[z>>2]=(c[z>>2]|0)+y;c[D>>2]=(c[D>>2]|0)+1}c[qa+(c[ja>>2]<<2)>>2]=c[ra+(c[ja>>2]<<2)>>2];c[ja>>2]=(c[ja>>2]|0)+1}if((g|0)==52){c[ka>>2]=um(65512)|0;break}c[E>>2]=c[ia>>2];c[ja>>2]=0;d:while(1){if((c[ja>>2]|0)>=(c[E>>2]|0)){g=83;break}while(1){if((c[sa+(c[ja>>2]<<2)>>2]|0)<=(c[na>>2]|0))break;if(((c[ja>>2]|0)+1|0)>=(c[E>>2]|0)){c[E>>2]=(c[ja>>2]|0)+2;if((c[E>>2]|0)>5){g=62;break d}c[sa+((c[E>>2]|0)-1<<2)>>2]=0;c[qa+((c[E>>2]|0)-1<<2)>>2]=c[ua>>2]}c[B>>2]=2+((CH(ua,(c[qa+(c[ja>>2]<<2)>>2]|0)-1|0)|0)&65535);A=sa+(c[ja>>2]<<2)|0;c[A>>2]=(c[A>>2]|0)-(c[B>>2]|0);do if(!(c[ma>>2]|0))if((c[qa+(c[ja>>2]<<2)>>2]|0)<(c[ua>>2]|0)){c[B>>2]=2+((CH(ua,c[qa+(c[ja>>2]<<2)>>2]|0)|0)&65535);break}else{c[B>>2]=0;break}while(0);A=sa+((c[ja>>2]|0)+1<<2)|0;c[A>>2]=(c[A>>2]|0)+(c[B>>2]|0);A=qa+(c[ja>>2]<<2)|0;c[A>>2]=(c[A>>2]|0)+-1}while(1){if((c[qa+(c[ja>>2]<<2)>>2]|0)>=(c[ua>>2]|0))break;c[B>>2]=2+((CH(ua,c[qa+(c[ja>>2]<<2)>>2]|0)|0)&65535);if(((c[sa+(c[ja>>2]<<2)>>2]|0)+(c[B>>2]|0)|0)>(c[na>>2]|0))break;A=sa+(c[ja>>2]<<2)|0;c[A>>2]=(c[A>>2]|0)+(c[B>>2]|0);A=qa+(c[ja>>2]<<2)|0;c[A>>2]=(c[A>>2]|0)+1;do if(!(c[ma>>2]|0))if((c[qa+(c[ja>>2]<<2)>>2]|0)<(c[ua>>2]|0)){c[B>>2]=2+((CH(ua,c[qa+(c[ja>>2]<<2)>>2]|0)|0)&65535);break}else{c[B>>2]=0;break}while(0);A=sa+((c[ja>>2]|0)+1<<2)|0;c[A>>2]=(c[A>>2]|0)-(c[B>>2]|0)}f=c[ja>>2]|0;if((c[qa+(c[ja>>2]<<2)>>2]|0)<(c[ua>>2]|0)){if((c[ja>>2]|0)>0)g=c[qa+((c[ja>>2]|0)-1<<2)>>2]|0;else g=0;if((c[qa+(f<<2)>>2]|0)<=(g|0)){g=81;break}}else c[E>>2]=f+1;c[ja>>2]=(c[ja>>2]|0)+1}if((g|0)==62){c[ka>>2]=um(65524)|0;break}else if((g|0)==81){c[ka>>2]=um(65557)|0;break}else if((g|0)==83){c[ja>>2]=(c[E>>2]|0)-1;while(1){if((c[ja>>2]|0)<=0)break;c[N>>2]=c[sa+(c[ja>>2]<<2)>>2];c[O>>2]=c[sa+((c[ja>>2]|0)-1<<2)>>2];c[P>>2]=(c[qa+((c[ja>>2]|0)-1<<2)>>2]|0)-1;c[Q>>2]=(c[P>>2]|0)+1-(c[ma>>2]|0);CH(ua,c[Q>>2]|0)|0;do{CH(ua,c[P>>2]|0)|0;if(c[N>>2]|0){if(c[C>>2]|0)break;if(((c[N>>2]|0)+(e[(c[ua+12>>2]|0)+(c[Q>>2]<<1)>>1]|0)+2|0)>((c[O>>2]|0)-((e[(c[ua+12>>2]|0)+(c[P>>2]<<1)>>1]|0)+((c[ja>>2]|0)==((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[la>>1]|0?1:(d[(c[ga>>2]|0)+17>>0]|0)==0):0){c[ja>>2]=0;while(1){if((c[ja>>2]|0)>=(c[ha>>2]|0))break g;c[Ba>>2]=el((c[(c[pa+(c[ja>>2]<<2)>>2]|0)+56>>2]|0)+8|0)|0;sp(c[ga>>2]|0,c[Ba>>2]|0,5,c[(c[pa+(c[ja>>2]<<2)>>2]|0)+84>>2]|0,ka);c[ja>>2]=(c[ja>>2]|0)+1}}while(0);c[ja>>2]=c[ha>>2];while(1){if((c[ja>>2]|0)>=(c[ia>>2]|0))break a;CG(c[oa+(c[ja>>2]<<2)>>2]|0,ka);c[ja>>2]=(c[ja>>2]|0)+1}}}while(0);HH(c[ua+8>>2]|0);c[ja>>2]=0;while(1){if((c[ja>>2]|0)>=(c[ia>>2]|0))break;np(c[oa+(c[ja>>2]<<2)>>2]|0);c[ja>>2]=(c[ja>>2]|0)+1}c[ja>>2]=0;while(1){if((c[ja>>2]|0)>=(c[ha>>2]|0))break;np(c[pa+(c[ja>>2]<<2)>>2]|0);c[ja>>2]=(c[ja>>2]|0)+1}c[va>>2]=c[ka>>2];Ca=c[va>>2]|0;l=Da;return Ca|0}function BH(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;rd(8,c[b>>2]|0);if(c[11682]|0?(c[51]|0)>=(c[b>>2]|0):0){c[d>>2]=c[11681];c[11681]=c[c[11681]>>2];c[11682]=(c[11682]|0)+-1;vd(3,1);d=c[d>>2]|0;l=e;return d|0}b=c[b>>2]|0;c[d>>2]=pd(b,((b|0)<0)<<31>>31)|0;if(!((c[2]|0)!=0&(c[d>>2]|0)!=0)){d=c[d>>2]|0;l=e;return d|0}vd(4,ud(c[d>>2]|0)|0);d=c[d>>2]|0;l=e;return d|0}function CH(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;h=g+4|0;f=g;c[h>>2]=a;c[f>>2]=d;a=c[h>>2]|0;if(b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]|0)+36>>2];c[w>>2]=c[u>>2];c[k>>2]=(c[v>>2]|0)+(c[g>>2]<<1);c[m>>2]=(c[u>>2]|0)-4;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[g>>2]|0)){x=14;break}c[n>>2]=(c[h>>2]|0)+((c[v>>2]|0)+(c[q>>2]<<1));c[r>>2]=(d[c[n>>2]>>0]|0)<<8|(d[(c[n>>2]|0)+1>>0]|0);if((c[r>>2]|0)<(c[k>>2]|0)){x=5;break}if((c[r>>2]|0)>(c[m>>2]|0)){x=5;break}c[t>>2]=(yb[c[(c[p>>2]|0)+76>>2]&255](c[p>>2]|0,(c[j>>2]|0)+(c[r>>2]|0)|0)|0)&65535;c[w>>2]=(c[w>>2]|0)-(c[t>>2]|0);if((c[w>>2]|0)<(c[k>>2]|0)){x=8;break}if(((c[r>>2]|0)+(c[t>>2]|0)|0)>(c[u>>2]|0)){x=8;break}a[c[n>>2]>>0]=c[w>>2]>>8;a[(c[n>>2]|0)+1>>0]=c[w>>2];if(!(c[i>>2]|0)){if((c[w>>2]|0)!=(c[r>>2]|0)){c[i>>2]=IH(c[c[(c[p>>2]|0)+52>>2]>>2]|0)|0;c[o>>2]=(d[(c[h>>2]|0)+((c[s>>2]|0)+5)>>0]|0)<<8|(d[(c[h>>2]|0)+((c[s>>2]|0)+5)+1>>0]|0);MR((c[i>>2]|0)+(c[o>>2]|0)|0,(c[h>>2]|0)+(c[o>>2]|0)|0,(c[w>>2]|0)+(c[t>>2]|0)-(c[o>>2]|0)|0)|0;c[j>>2]=c[i>>2];x=12}}else x=12;if((x|0)==12){x=0;MR((c[h>>2]|0)+(c[w>>2]|0)|0,(c[j>>2]|0)+(c[r>>2]|0)|0,c[t>>2]|0)|0}c[q>>2]=(c[q>>2]|0)+1}if((x|0)==5){c[f>>2]=um(59617)|0;x=c[f>>2]|0;l=y;return x|0}else if((x|0)==8){c[f>>2]=um(59623)|0;x=c[f>>2]|0;l=y;return x|0}else if((x|0)==14){a[(c[h>>2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>0]=0;c[i>>2]=Bo(c[m>>2]|0)|0;if(c[i>>2]|0){c[c[n>>2]>>2]=c[i>>2];l=s;return}if(!(a[(c[o>>2]|0)+17>>0]|0)){l=s;return}r=rp(c[m>>2]|0)|0;c[c[n>>2]>>2]=r;l=s;return}function HH(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;if(!(c[b>>2]|0)){l=f;return}if((c[b>>2]|0)>>>0>=(c[50]|0)>>>0?(c[b>>2]|0)>>>0<(c[11680]|0)>>>0:0){c[d>>2]=c[b>>2];c[c[d>>2]>>2]=c[11681];c[11681]=c[d>>2];c[11682]=(c[11682]|0)+1;Ld(3,1);l=f;return}if(c[2]|0){c[e>>2]=ud(c[b>>2]|0)|0;Ld(4,c[e>>2]|0);Ld(0,c[e>>2]|0);Ld(9,1);qb[c[52>>2]&255](c[b>>2]|0);l=f;return}else{qb[c[52>>2]&255](c[b>>2]|0);l=f;return}}function IH(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+208>>2]|0}function JH(a,b,f,g){a=a|0;b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;w=l;l=l+64|0;r=w+56|0;s=w+52|0;x=w+48|0;y=w+44|0;t=w+40|0;u=w+36|0;h=w+32|0;i=w+28|0;j=w+24|0;k=w+20|0;m=w+16|0;n=w+12|0;o=w+8|0;p=w+4|0;q=w;c[s>>2]=a;c[x>>2]=b;c[y>>2]=f;c[t>>2]=g;c[u>>2]=c[(c[s>>2]|0)+56>>2];c[h>>2]=(c[u>>2]|0)+(c[(c[(c[s>>2]|0)+52>>2]|0)+36>>2]|0);c[i>>2]=(c[u>>2]|0)+((d[(c[s>>2]|0)+5>>0]|0)+8+(d[(c[s>>2]|0)+6>>0]|0));c[j>>2]=0;c[m>>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w>>2]|0)+56>>2];c[q>>2]=c[c[k>>2]>>2];c[r>>2]=(c[z>>2]|0)+(c[A>>2]|0);c[o>>2]=c[z>>2];while(1){if((c[o>>2]|0)>=(c[r>>2]|0)){b=10;break}c[s>>2]=(CH(c[n>>2]|0,c[o>>2]|0)|0)&65535;if((d[(c[p>>2]|0)+1>>0]|0|0)==0?(d[(c[p>>2]|0)+2>>0]|0|0)==0:0)b=6;else b=5;if((b|0)==5?(b=0,A=NH(c[w>>2]|0,c[s>>2]|0,t)|0,c[u>>2]=A,(A|0)==0):0)b=6;if((b|0)==6){if(((c[q>>2]|0)-(c[x>>2]|0)|0)<(c[s>>2]|0)){b=7;break}c[q>>2]=(c[q>>2]|0)+(0-(c[s>>2]|0));c[u>>2]=c[q>>2]}TR(c[u>>2]|0,c[(c[(c[n>>2]|0)+8>>2]|0)+(c[o>>2]<<2)>>2]|0,c[s>>2]|0)|0;a[c[m>>2]>>0]=(c[u>>2]|0)-(c[p>>2]|0)>>8;a[(c[m>>2]|0)+1>>0]=(c[u>>2]|0)-(c[p>>2]|0);c[m>>2]=(c[m>>2]|0)+2;c[o>>2]=(c[o>>2]|0)+1}if((b|0)==7){c[v>>2]=1;A=c[v>>2]|0;l=y;return A|0}else if((b|0)==10){c[c[k>>2]>>2]=c[q>>2];c[v>>2]=0;A=c[v>>2]|0;l=y;return A|0}return 0}function LH(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[h>>2]=d;c[i>>2]=f;while(1){if((c[i>>2]|0)<=0)break;if(!(e[(c[(c[g>>2]|0)+12>>2]|0)+(c[h>>2]<<1)>>1]|0)){f=yb[c[(c[(c[g>>2]|0)+4>>2]|0)+76>>2]&255](c[(c[g>>2]|0)+4>>2]|0,c[(c[(c[g>>2]|0)+8>>2]|0)+(c[h>>2]<<2)>>2]|0)|0;b[(c[(c[g>>2]|0)+12>>2]|0)+(c[h>>2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+36>>2];while(1){if((c[i>>2]|0)>((c[k>>2]|0)-4|0)){b=4;break}if((c[i>>2]|0)<((c[s>>2]|0)+4|0)){b=4;break}c[m>>2]=(d[(c[r>>2]|0)+((c[i>>2]|0)+2)>>0]|0)<<8|(d[(c[r>>2]|0)+((c[i>>2]|0)+2)+1>>0]|0);g=(c[m>>2]|0)-(c[h>>2]|0)|0;c[j>>2]=g;f=c[i>>2]|0;if((g|0)>=0){b=6;break}c[s>>2]=f;c[i>>2]=(d[(c[r>>2]|0)+(c[i>>2]|0)>>0]|0)<<8|(d[(c[r>>2]|0)+(c[i>>2]|0)+1>>0]|0);if(!(c[i>>2]|0)){b=16;break}}if((b|0)==4){s=um(59680)|0;c[c[p>>2]>>2]=s;c[n>>2]=0;s=c[n>>2]|0;l=t;return s|0}else if((b|0)==6){if((f|0)>=((e[(c[o>>2]|0)+14>>1]|0)+((e[(c[o>>2]|0)+18>>1]|0)<<1)|0)?((c[m>>2]|0)+(c[i>>2]|0)|0)<=(c[k>>2]|0):0){do if((c[j>>2]|0)<4){if((d[(c[r>>2]|0)+((c[q>>2]|0)+7)>>0]|0|0)<=57){s=(c[r>>2]|0)+(c[s>>2]|0)|0;p=(c[r>>2]|0)+(c[i>>2]|0)|0;a[s>>0]=a[p>>0]|0;a[s+1>>0]=a[p+1>>0]|0;s=(c[r>>2]|0)+((c[q>>2]|0)+7)|0;a[s>>0]=(d[s>>0]|0)+(c[j>>2]&255);break}c[n>>2]=0;s=c[n>>2]|0;l=t;return s|0}else{a[(c[r>>2]|0)+((c[i>>2]|0)+2)>>0]=c[j>>2]>>8;a[(c[r>>2]|0)+((c[i>>2]|0)+2)+1>>0]=c[j>>2]}while(0);c[n>>2]=(c[r>>2]|0)+((c[i>>2]|0)+(c[j>>2]|0));s=c[n>>2]|0;l=t;return s|0}s=um(59691)|0;c[c[p>>2]>>2]=s;c[n>>2]=0;s=c[n>>2]|0;l=t;return s|0}else if((b|0)==16){c[n>>2]=0;s=c[n>>2]|0;l=t;return s|0}return 0}function OH(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;y=l;l=l+48|0;w=y+20|0;x=y+16|0;t=y+32|0;n=y+30|0;o=y+28|0;p=y+26|0;u=y+35|0;i=y+34|0;v=y+24|0;j=y+12|0;k=y+8|0;s=y+4|0;m=y;c[x>>2]=f;b[t>>1]=g;b[n>>1]=h;a[i>>0]=0;b[v>>1]=b[n>>1]|0;c[j>>2]=(c[(c[(c[x>>2]|0)+52>>2]|0)+36>>2]|0)-4;c[k>>2]=(e[t>>1]|0)+(e[n>>1]|0);c[s>>2]=c[(c[x>>2]|0)+56>>2];if((e[(c[(c[x>>2]|0)+52>>2]|0)+22>>1]|0)&4|0)GR((c[s>>2]|0)+(e[t>>1]|0)|0,0,e[n>>1]|0|0)|0;a[u>>0]=a[(c[x>>2]|0)+5>>0]|0;b[o>>1]=(d[u>>0]|0)+1;if((d[(c[s>>2]|0)+((e[o>>1]|0)+1)>>0]|0|0)==0?(d[(c[s>>2]|0)+(e[o>>1]|0)>>0]|0|0)==0:0)b[p>>1]=0;else r=6;do if((r|0)==6){while(1){r=0;h=((d[(c[s>>2]|0)+(e[o>>1]|0)>>0]|0)<<8|(d[(c[s>>2]|0)+(e[o>>1]|0)+1>>0]|0))&65535;b[p>>1]=h;if((h&65535|0)>=(e[t>>1]|0|0))break;q=b[p>>1]|0;if((e[p>>1]|0|0)<((e[o>>1]|0)+4|0)){r=8;break}b[o>>1]=q;r=6}if((r|0)==8?q&65535|0:0){c[w>>2]=um(59854)|0;x=c[w>>2]|0;l=y;return x|0}if((e[p>>1]|0)>>>0>(c[j>>2]|0)>>>0){c[w>>2]=um(59858)|0;x=c[w>>2]|0;l=y;return x|0}do if(e[p>>1]|0|0?((c[k>>2]|0)+3|0)>>>0>=(e[p>>1]|0)>>>0:0){a[i>>0]=(e[p>>1]|0)-(c[k>>2]|0);if((c[k>>2]|0)>>>0>(e[p>>1]|0)>>>0){c[w>>2]=um(59869)|0;x=c[w>>2]|0;l=y;return x|0}c[k>>2]=(e[p>>1]|0)+((d[(c[s>>2]|0)+((e[p>>1]|0)+2)>>0]|0)<<8|(d[(c[s>>2]|0)+((e[p>>1]|0)+2)+1>>0]|0));if((c[k>>2]|0)>>>0<=(c[(c[(c[x>>2]|0)+52>>2]|0)+36>>2]|0)>>>0){b[n>>1]=(c[k>>2]|0)-(e[t>>1]|0);b[p>>1]=(d[(c[s>>2]|0)+(e[p>>1]|0)>>0]|0)<<8|(d[(c[s>>2]|0)+(e[p>>1]|0)+1>>0]|0);break}c[w>>2]=um(59871)|0;x=c[w>>2]|0;l=y;return x|0}while(0);do if((e[o>>1]|0|0)>((d[u>>0]|0)+1|0)?(c[m>>2]=(e[o>>1]|0)+((d[(c[s>>2]|0)+((e[o>>1]|0)+2)>>0]|0)<<8|(d[(c[s>>2]|0)+((e[o>>1]|0)+2)+1>>0]|0)),((c[m>>2]|0)+3|0)>=(e[t>>1]|0|0)):0){if((c[m>>2]|0)<=(e[t>>1]|0|0)){a[i>>0]=(d[i>>0]|0)+((e[t>>1]|0)-(c[m>>2]|0));b[n>>1]=(c[k>>2]|0)-(e[o>>1]|0);b[t>>1]=b[o>>1]|0;break}c[w>>2]=um(59883)|0;x=c[w>>2]|0;l=y;return x|0}while(0);if((d[i>>0]|0|0)<=(d[(c[s>>2]|0)+((d[u>>0]|0)+7)>>0]|0|0)){r=(c[s>>2]|0)+((d[u>>0]|0)+7)|0;a[r>>0]=(d[r>>0]|0)-(d[i>>0]|0);break}c[w>>2]=um(59889)|0;x=c[w>>2]|0;l=y;return x|0}while(0);do if((e[t>>1]|0|0)==((d[(c[s>>2]|0)+((d[u>>0]|0)+5)>>0]|0)<<8|(d[(c[s>>2]|0)+((d[u>>0]|0)+5)+1>>0]|0)|0)){if((e[o>>1]|0|0)==((d[u>>0]|0)+1|0)){a[(c[s>>2]|0)+((d[u>>0]|0)+1)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g;c[p>>2]=d[(c[m>>2]|0)+5>>0];c[q>>2]=c[(c[m>>2]|0)+56>>2];c[h>>2]=0;c[i>>2]=(e[(c[m>>2]|0)+14>>1]|0)+((e[(c[m>>2]|0)+18>>1]|0)<<1);c[r>>2]=(d[(c[q>>2]|0)+((c[p>>2]|0)+5)>>0]|0)<<8|(d[(c[q>>2]|0)+((c[p>>2]|0)+5)+1>>0]|0);do if((c[i>>2]|0)>(c[r>>2]|0)){if((c[r>>2]|0)==0?(c[(c[(c[m>>2]|0)+52>>2]|0)+36>>2]|0)==65536:0){c[r>>2]=65536;break}c[k>>2]=um(59758)|0;s=c[k>>2]|0;l=t;return s|0}while(0);if(!(!(d[(c[q>>2]|0)+((c[p>>2]|0)+2)>>0]|0|0)?!(d[(c[q>>2]|0)+((c[p>>2]|0)+1)>>0]|0|0):0))s=8;if((s|0)==8?((c[i>>2]|0)+2|0)<=(c[r>>2]|0):0){c[j>>2]=NH(c[m>>2]|0,c[n>>2]|0,h)|0;if(c[j>>2]|0){c[c[o>>2]>>2]=(c[j>>2]|0)-(c[q>>2]|0);c[k>>2]=0;s=c[k>>2]|0;l=t;return s|0}if(c[h>>2]|0){c[k>>2]=c[h>>2];s=c[k>>2]|0;l=t;return s|0}}do if(((c[i>>2]|0)+2+(c[n>>2]|0)|0)>(c[r>>2]|0)){c[h>>2]=FH(c[m>>2]|0)|0;if(!(c[h>>2]|0)){c[r>>2]=(((d[(c[q>>2]|0)+((c[p>>2]|0)+5)>>0]|0)<<8|(d[(c[q>>2]|0)+((c[p>>2]|0)+5)+1>>0]|0))-1&65535)+1;break}c[k>>2]=c[h>>2];s=c[k>>2]|0;l=t;return s|0}while(0);c[r>>2]=(c[r>>2]|0)-(c[n>>2]|0);a[(c[q>>2]|0)+((c[p>>2]|0)+5)>>0]=c[r>>2]>>8;a[(c[q>>2]|0)+((c[p>>2]|0)+5)+1>>0]=c[r>>2];c[c[o>>2]>>2]=c[r>>2];c[k>>2]=0;s=c[k>>2]|0;l=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]|0)+36>>2]|0)-4}c[m>>2]=c[A>>2];if((c[m>>2]|0)>(c[n>>2]|0))c[m>>2]=c[n>>2];if((c[k>>2]|0)>0){if((c[m>>2]|0)>(c[k>>2]|0))c[m>>2]=c[k>>2];MR(c[q>>2]|0,c[j>>2]|0,c[m>>2]|0)|0}else GR(c[q>>2]|0,0,c[m>>2]|0)|0;c[A>>2]=(c[A>>2]|0)-(c[m>>2]|0);c[q>>2]=(c[q>>2]|0)+(c[m>>2]|0);c[j>>2]=(c[j>>2]|0)+(c[m>>2]|0);c[k>>2]=(c[k>>2]|0)-(c[m>>2]|0);c[n>>2]=(c[n>>2]|0)-(c[m>>2]|0)}if((b|0)==25){np(c[C>>2]|0);c[D>>2]=c[B>>2];D=c[D>>2]|0;l=E;return D|0}else if((b|0)==35){np(c[C>>2]|0);c[D>>2]=0;D=c[D>>2]|0;l=E;return D|0}return 0}function SH(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+64|0;n=u+44|0;o=u+40|0;p=u+36|0;q=u+32|0;r=u+28|0;s=u+24|0;t=u+20|0;g=u+16|0;h=u+12|0;i=u+8|0;j=u+4|0;k=u+48|0;m=u;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;c[r>>2]=c[(c[o>>2]|0)+4>>2];b=c[r>>2]|0;if(a[(c[r>>2]|0)+17>>0]|0){gp(b);To(c[o>>2]|0,4,t);c[t>>2]=(c[t>>2]|0)+1;while(1){f=c[t>>2]|0;if((f|0)!=(hp(c[r>>2]|0,c[t>>2]|0)|0)?(c[t>>2]|0)!=((((c[481]|0)>>>0)/((c[(c[r>>2]|0)+32>>2]|0)>>>0)|0)+1|0):0)break;c[t>>2]=(c[t>>2]|0)+1}c[g>>2]=mp(c[r>>2]|0,j,i,c[t>>2]|0,1)|0;if(c[g>>2]|0){c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}if((c[i>>2]|0)!=(c[t>>2]|0)){a[k>>0]=0;c[m>>2]=0;c[g>>2]=jp(c[r>>2]|0,0,0)|0;np(c[j>>2]|0);if(c[g>>2]|0){c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}c[g>>2]=op(c[r>>2]|0,c[t>>2]|0,s,0)|0;if(c[g>>2]|0){c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}c[g>>2]=lp(c[r>>2]|0,c[t>>2]|0,k,m)|0;if(!((d[k>>0]|0)!=1?(d[k>>0]|0)!=2:0))c[g>>2]=um(66598)|0;if(c[g>>2]|0){np(c[s>>2]|0);c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}c[g>>2]=pp(c[r>>2]|0,c[s>>2]|0,a[k>>0]|0,c[m>>2]|0,c[i>>2]|0,0)|0;np(c[s>>2]|0);if(c[g>>2]|0){c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}c[g>>2]=op(c[r>>2]|0,c[t>>2]|0,s,0)|0;if(c[g>>2]|0){c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}c[g>>2]=Tm(c[(c[s>>2]|0)+72>>2]|0)|0;if(c[g>>2]|0){np(c[s>>2]|0);c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}}else c[s>>2]=c[j>>2];sp(c[r>>2]|0,c[t>>2]|0,1,0,g);if(c[g>>2]|0){np(c[s>>2]|0);c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}c[g>>2]=Xo(c[o>>2]|0,4,c[t>>2]|0)|0;if(c[g>>2]|0){np(c[s>>2]|0);c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}}else{c[g>>2]=mp(b,s,t,1,0)|0;if(c[g>>2]|0){c[n>>2]=c[g>>2];t=c[n>>2]|0;l=u;return t|0}}if(c[q>>2]&1|0)c[h>>2]=13;else c[h>>2]=10;cq(c[s>>2]|0,c[h>>2]|0);Ym(c[(c[s>>2]|0)+72>>2]|0);c[c[p>>2]>>2]=c[t>>2];c[n>>2]=0;t=c[n>>2]|0;l=u;return t|0}function TH(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+32|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;q=r+12|0;i=r+8|0;j=r+4|0;k=r;c[n>>2]=b;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[i>>2]=h;c[j>>2]=c[(c[n>>2]|0)+4>>2];if(c[p>>2]|0?(UH(c[j>>2]|0),(c[(c[j>>2]|0)+80>>2]|0)==0):0){c[m>>2]=7;q=c[m>>2]|0;l=r;return q|0}if((c[o>>2]|0)==1?($m(c[j>>2]|0)|0)==0:0)c[o>>2]=0;c[(c[i>>2]|0)+52>>2]=c[o>>2];a[(c[i>>2]|0)+68>>0]=-1;c[(c[i>>2]|0)+72>>2]=c[q>>2];c[c[i>>2]>>2]=c[n>>2];c[(c[i>>2]|0)+4>>2]=c[j>>2];a[(c[i>>2]|0)+64>>0]=c[p>>2]|0?1:0;a[(c[i>>2]|0)+65>>0]=c[p>>2]|0?0:2;c[k>>2]=c[(c[j>>2]|0)+8>>2];while(1){if(!(c[k>>2]|0))break;if((c[(c[k>>2]|0)+52>>2]|0)==(c[o>>2]|0)){q=(c[k>>2]|0)+64|0;a[q>>0]=d[q>>0]|0|32;q=(c[i>>2]|0)+64|0;a[q>>0]=d[q>>0]|0|32}c[k>>2]=c[(c[k>>2]|0)+8>>2]}c[(c[i>>2]|0)+8>>2]=c[(c[j>>2]|0)+8>>2];c[(c[j>>2]|0)+8>>2]=c[i>>2];a[(c[i>>2]|0)+66>>0]=0;c[m>>2]=0;q=c[m>>2]|0;l=r;return q|0}function UH(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;if(c[(c[d>>2]|0)+80>>2]|0){l=e;return}b=Jk(c[(c[d>>2]|0)+32>>2]|0)|0;c[(c[d>>2]|0)+80>>2]=b;if(!(c[(c[d>>2]|0)+80>>2]|0)){l=e;return}b=c[(c[d>>2]|0)+80>>2]|0;a[b>>0]=0;a[b+1>>0]=0;a[b+2>>0]=0;a[b+3>>0]=0;a[b+4>>0]=0;a[b+5>>0]=0;a[b+6>>0]=0;a[b+7>>0]=0;d=(c[d>>2]|0)+80|0;c[d>>2]=(c[d>>2]|0)+4;l=e;return}function VH(){return 200}function WH(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;a=c[b>>2]|0;b=a+68|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));l=d;return}function XH(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;g=o+24|0;h=o+20|0;i=o;j=o+16|0;k=o+12|0;m=o+8|0;n=o+28|0;c[h>>2]=b;b=i;c[b>>2]=e;c[b+4>>2]=f;if(0?1:(c[i+4>>2]&-16777216|0)!=0){a[(c[h>>2]|0)+8>>0]=c[i>>2];m=i;m=OR(c[m>>2]|0,c[m+4>>2]|0,8)|0;n=i;c[n>>2]=m;c[n+4>>2]=z;c[j>>2]=7;while(1){if((c[j>>2]|0)<0)break;a[(c[h>>2]|0)+(c[j>>2]|0)>>0]=c[i>>2]&127|128;m=i;m=OR(c[m>>2]|0,c[m+4>>2]|0,7)|0;n=i;c[n>>2]=m;c[n+4>>2]=z;c[j>>2]=(c[j>>2]|0)+-1}c[g>>2]=9;n=c[g>>2]|0;l=o;return n|0}c[m>>2]=0;do{f=(c[i>>2]&127|128)&255;e=c[m>>2]|0;c[m>>2]=e+1;a[n+e>>0]=f;e=i;e=OR(c[e>>2]|0,c[e+4>>2]|0,7)|0;f=i;c[f>>2]=e;c[f+4>>2]=z;f=i}while((c[f>>2]|0)!=0|(c[f+4>>2]|0)!=0);a[n>>0]=(d[n>>0]|0)&127;c[j>>2]=0;c[k>>2]=(c[m>>2]|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>>2]>>2]=c[h>>2];l=i;return c[(c[f>>2]|0)+16+8>>2]|0}function _H(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=b;b=(c[e>>2]|0)+40|0;c[g>>2]=eD(c[(c[e>>2]|0)+16>>2]|0,0,c[b>>2]|0,c[b+4>>2]|0,0,f)|0;if(c[g>>2]|0){c[d>>2]=c[g>>2];g=c[d>>2]|0;l=h;return g|0}if(c[f>>2]|0){c[d>>2]=um(73491)|0;g=c[d>>2]|0;l=h;return g|0}else{a[(c[e>>2]|0)+3>>0]=0;c[(c[e>>2]|0)+56>>2]=0;c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}return 0}function $H(d){d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[f>>2]=d;if(!(oi(c[(c[f>>2]|0)+16>>2]|0,c[f>>2]|0,c[(c[f>>2]|0)+12>>2]|0,a[(c[f>>2]|0)+10>>0]|0)|0)){b[e>>1]=0;f=b[e>>1]|0;l=g;return f|0}if(!(ri(c[(c[f>>2]|0)+16>>2]|0,c[f>>2]|0,c[(c[f>>2]|0)+12>>2]|0,a[(c[f>>2]|0)+10>>0]|0)|0)){b[e>>1]=4;f=b[e>>1]|0;l=g;return f|0}else{b[e>>1]=8;f=b[e>>1]|0;l=g;return f|0}return 0}function aI(a){a=a|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=a;Fh(c[d>>2]|0);b[(c[d>>2]|0)+8>>1]=4;l=e;return c[d>>2]|0}function bI(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[5532+(c[b>>2]<<2)>>2]|0}function cI(b,f,g){b=b|0;f=f|0;g=g|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;L=l;l=l+192|0;y=L+96|0;x=L+88|0;w=L+80|0;v=L+72|0;I=L+64|0;H=L+56|0;u=L+48|0;t=L+40|0;s=L+32|0;A=L+24|0;z=L+16|0;F=L+8|0;r=L;p=L+184|0;q=L+180|0;M=L+176|0;J=L+172|0;K=L+144|0;D=L+140|0;E=L+136|0;B=L+132|0;C=L+128|0;i=L+124|0;j=L+120|0;G=L+116|0;k=L+112|0;m=L+108|0;n=L+104|0;o=L+100|0;c[p>>2]=b;c[q>>2]=f;c[M>>2]=g;c[J>>2]=c[q>>2];jd(K,0,c[q>>2]|0,c[M>>2]|0,0);a:do switch(a[(c[p>>2]|0)+1>>0]|0){case -6:{c[E>>2]=c[(c[p>>2]|0)+16>>2];c[r>>2]=e[(c[E>>2]|0)+6>>1];Vi(K,37578,r);c[D>>2]=0;while(1){if((c[D>>2]|0)>=(e[(c[E>>2]|0)+6>>1]|0))break;c[B>>2]=c[(c[E>>2]|0)+20+(c[D>>2]<<2)>>2];if(c[B>>2]|0)b=c[c[B>>2]>>2]|0;else b=47636;c[C>>2]=b;M=(vQ(c[C>>2]|0,31345)|0)==0;c[C>>2]=M?37583:b;M=c[C>>2]|0;c[F>>2]=d[(c[(c[E>>2]|0)+16>>2]|0)+(c[D>>2]|0)>>0]|0?24574:47636;c[F+4>>2]=M;Vi(K,37585,F);c[D>>2]=(c[D>>2]|0)+1}zd(K,31212,1);break}case -4:{c[i>>2]=c[(c[p>>2]|0)+16>>2];c[z>>2]=c[c[i>>2]>>2];Vi(K,37591,z);break}case -5:{c[j>>2]=c[(c[p>>2]|0)+16>>2];M=a[c[j>>2]>>0]|0;c[A>>2]=c[(c[j>>2]|0)+20>>2];c[A+4>>2]=M;Vi(K,37599,A);break}case -13:{H=c[(c[p>>2]|0)+16>>2]|0;I=c[H+4>>2]|0;M=s;c[M>>2]=c[H>>2];c[M+4>>2]=I;Vi(K,19081,s);break}case -14:{c[t>>2]=c[(c[p>>2]|0)+16>>2];Vi(K,37606,t);break}case -12:{h[u>>3]=+h[c[(c[p>>2]|0)+16>>2]>>3];Vi(K,20012,u);break}case -8:{c[G>>2]=c[(c[p>>2]|0)+16>>2];b=c[G>>2]|0;if(e[(c[G>>2]|0)+8>>1]&2|0){c[J>>2]=c[b+16>>2];break a}f=c[G>>2]|0;if(e[b+8>>1]&4|0){G=f;I=c[G+4>>2]|0;M=H;c[M>>2]=c[G>>2];c[M+4>>2]=I;Vi(K,19081,H);break a}b=c[G>>2]|0;if(e[f+8>>1]&8|0){h[I>>3]=+h[b>>3];Vi(K,20012,I);break a}if(e[b+8>>1]&1|0){c[J>>2]=17843;break a}else{c[J>>2]=37609;break a}}case -10:{c[k>>2]=c[(c[(c[p>>2]|0)+16>>2]|0)+8>>2];c[v>>2]=c[k>>2];Vi(K,37616,v);break}case -15:{c[n>>2]=c[(c[p>>2]|0)+16>>2];c[o>>2]=c[c[n>>2]>>2];c[m>>2]=1;while(1){if((c[m>>2]|0)>=(c[o>>2]|0))break;c[w>>2]=c[(c[n>>2]|0)+(c[m>>2]<<2)>>2];Vi(K,37624,w);c[m>>2]=(c[m>>2]|0)+1}a[c[q>>2]>>0]=91;zd(K,37628,1);break}case -18:{Vi(K,37630,x);break}case -19:{a[c[q>>2]>>0]=0;break}case -20:{c[y>>2]=c[c[(c[p>>2]|0)+16>>2]>>2];Vi(K,18130,y);break}default:{c[J>>2]=c[(c[p>>2]|0)+16>>2];if(!(c[J>>2]|0)){c[J>>2]=c[q>>2];a[c[q>>2]>>0]=0}}}while(0);ld(K)|0;l=L;return c[J>>2]|0}function dI(a){a=a|0;var b=0,d=0,f=0,g=0;f=l;l=l+16|0;b=f+8|0;g=f+4|0;d=f;c[g>>2]=a;c[d>>2]=c[g>>2];if(c[d>>2]|0?c[(c[d>>2]|0)+104>>2]|0:0){c[b>>2]=e[(c[d>>2]|0)+140>>1];g=c[b>>2]|0;l=f;return g|0}c[b>>2]=0;g=c[b>>2]|0;l=f;return g|0}function eI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=wi(Nu(c[f>>2]|0,c[g>>2]|0)|0)|0;Ou(c[f>>2]|0);l=e;return c[d>>2]|0}function fI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=xh(Nu(c[f>>2]|0,c[g>>2]|0)|0)|0;Ou(c[f>>2]|0);l=e;return c[d>>2]|0}function gI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+12|0;g=e+8|0;d=e;c[f>>2]=a;c[g>>2]=b;h[d>>3]=+mi(Nu(c[f>>2]|0,c[g>>2]|0)|0);Ou(c[f>>2]|0);l=e;return +(+h[d>>3])}function hI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=vi(Nu(c[f>>2]|0,c[g>>2]|0)|0)|0;Ou(c[f>>2]|0);l=e;return c[d>>2]|0}function iI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;f=d+12|0;g=d+8|0;e=d;c[f>>2]=a;c[g>>2]=b;a=ki(Nu(c[f>>2]|0,c[g>>2]|0)|0)|0;b=e;c[b>>2]=a;c[b+4>>2]=z;Ou(c[f>>2]|0);b=e;z=c[b+4>>2]|0;l=d;return c[b>>2]|0}function jI(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0;h=l;l=l+16|0;f=h+8|0;i=h+4|0;g=h;c[f>>2]=a;c[i>>2]=d;c[g>>2]=Nu(c[f>>2]|0,c[i>>2]|0)|0;if(!((e[(c[g>>2]|0)+8>>1]|0)&2048)){i=c[f>>2]|0;Ou(i);i=c[g>>2]|0;l=h;return i|0}i=(c[g>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c[c[m>>2]>>2]|0,c[o>>2]|0)|0;t=c[o>>2]|0;l=s;return t|0}function mI(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m;f=m+16|0;g=m+12|0;h=m+8|0;i=m+4|0;c[g>>2]=a;c[h>>2]=d;if(Ir(c[g>>2]|0)|0){c[f>>2]=cd(76348)|0;k=c[f>>2]|0;l=m;return k|0}if((c[(c[g>>2]|0)+20>>2]|0)==770837923?(c[(c[g>>2]|0)+36>>2]|0)<0:0){if((c[h>>2]|0)>=1?(c[h>>2]|0)<=(b[(c[g>>2]|0)+16>>1]|0):0){c[h>>2]=(c[h>>2]|0)+-1;c[i>>2]=(c[(c[g>>2]|0)+116>>2]|0)+((c[h>>2]|0)*40|0);Lh(c[i>>2]|0);b[(c[i>>2]|0)+8>>1]=1;wk(c[c[g>>2]>>2]|0,0);do if((e[(c[g>>2]|0)+144>>1]|0)>>>9&1|0){if(!((c[h>>2]|0)<32?(c[(c[g>>2]|0)+196>>2]&1<>2]|0)!=0:0))k=12;if((k|0)==12?(c[(c[g>>2]|0)+196>>2]|0)!=-1:0)break;k=(c[g>>2]|0)+144|0;b[k>>1]=b[k>>1]&-2|1}while(0);c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}wk(c[c[g>>2]>>2]|0,25);c[f>>2]=25;k=c[f>>2]|0;l=m;return k|0}wk(c[c[g>>2]>>2]|0,21);c[j>>2]=c[(c[g>>2]|0)+176>>2];hd(21,39035,j);c[f>>2]=cd(76356)|0;k=c[f>>2]|0;l=m;return k|0}function nI(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+20|0;e=j+16|0;f=j;g=j+12|0;i=j+8|0;c[k>>2]=a;c[e>>2]=b;h[f>>3]=d;c[i>>2]=c[k>>2];c[g>>2]=mI(c[i>>2]|0,c[e>>2]|0)|0;if(c[g>>2]|0){k=c[g>>2]|0;l=j;return k|0}ii((c[(c[i>>2]|0)+116>>2]|0)+(((c[e>>2]|0)-1|0)*40|0)|0,+h[f>>3]);k=c[g>>2]|0;l=j;return k|0}function oI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;g=e+8|0;f=e+4|0;h=e;c[g>>2]=a;c[f>>2]=b;c[h>>2]=d;d=c[h>>2]|0;d=pI(c[g>>2]|0,c[f>>2]|0,d,((d|0)<0)<<31>>31)|0;l=e;return d|0}function pI(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+20|0;f=j+16|0;g=j;h=j+12|0;i=j+8|0;c[k>>2]=a;c[f>>2]=b;b=g;c[b>>2]=d;c[b+4>>2]=e;c[i>>2]=c[k>>2];c[h>>2]=mI(c[i>>2]|0,c[f>>2]|0)|0;if(c[h>>2]|0){k=c[h>>2]|0;l=j;return k|0}k=g;Dh((c[(c[i>>2]|0)+116>>2]|0)+(((c[f>>2]|0)-1|0)*40|0)|0,c[k>>2]|0,c[k+4>>2]|0);k=c[h>>2]|0;l=j;return k|0}function qI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+12|0;f=e+8|0;d=e+4|0;g=e;c[h>>2]=a;c[f>>2]=b;c[g>>2]=c[h>>2];c[d>>2]=mI(c[g>>2]|0,c[f>>2]|0)|0;l=e;return c[d>>2]|0}function rI(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;g=l;l=l+32|0;m=g+16|0;k=g+12|0;j=g+8|0;i=g+4|0;h=g;c[m>>2]=a;c[k>>2]=b;c[j>>2]=d;c[i>>2]=e;c[h>>2]=f;f=lI(c[m>>2]|0,c[k>>2]|0,c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,1)|0;l=g;return f|0}function sI(b,d,f){b=b|0;d=d|0;f=f|0;var g=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;g=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[i>>2]=d;c[j>>2]=f;switch(fi(c[j>>2]|0)|0){case 1:{j=c[j>>2]|0;c[k>>2]=pI(c[g>>2]|0,c[i>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;k=c[k>>2]|0;l=m;return k|0}case 2:{c[k>>2]=nI(c[g>>2]|0,c[i>>2]|0,+h[c[j>>2]>>3])|0;k=c[k>>2]|0;l=m;return k|0}case 4:{f=c[g>>2]|0;b=c[i>>2]|0;d=c[j>>2]|0;if((e[(c[j>>2]|0)+8>>1]|0)&16384|0){c[k>>2]=tI(f,b,c[d>>2]|0)|0;k=c[k>>2]|0;l=m;return k|0}else{c[k>>2]=kI(f,b,c[d+16>>2]|0,c[(c[j>>2]|0)+12>>2]|0,-1)|0;k=c[k>>2]|0;l=m;return k|0}}case 3:{c[k>>2]=lI(c[g>>2]|0,c[i>>2]|0,c[(c[j>>2]|0)+16>>2]|0,c[(c[j>>2]|0)+12>>2]|0,-1,a[(c[j>>2]|0)+10>>0]|0)|0;k=c[k>>2]|0;l=m;return k|0}default:{c[k>>2]=qI(c[g>>2]|0,c[i>>2]|0)|0;k=c[k>>2]|0;l=m;return k|0}}return 0}function tI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;j=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[e>>2]=b;c[f>>2]=d;c[h>>2]=c[j>>2];c[g>>2]=mI(c[h>>2]|0,c[e>>2]|0)|0;if(c[g>>2]|0){j=c[g>>2]|0;l=i;return j|0}Di((c[(c[h>>2]|0)+116>>2]|0)+(((c[e>>2]|0)-1|0)*40|0)|0,c[f>>2]|0);j=c[g>>2]|0;l=i;return j|0}function uI(a){a=a|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[f>>2]=a;c[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=ku(c[J>>2]|0,0,c[o>>2]|0,c[B>>2]|0)|0;if(c[t>>2]|0?d[(c[t>>2]|0)+42>>0]&16|0:0){c[t>>2]=0;n=c[J>>2]|0;c[C>>2]=c[o>>2];Ck(n,39075,C)}if(c[t>>2]|0?d[(c[t>>2]|0)+42>>0]&32|0:0){c[t>>2]=0;n=c[J>>2]|0;c[D>>2]=c[o>>2];Ck(n,39105,D)}if(c[t>>2]|0?c[(c[t>>2]|0)+12>>2]|0:0){c[t>>2]=0;n=c[J>>2]|0;c[E>>2]=c[o>>2];Ck(n,39141,E)}if(!(c[t>>2]|0)){f=13;break}c[(c[K>>2]|0)+32>>2]=c[t>>2];n=c[(c[M>>2]|0)+16>>2]|0;n=c[n+((Nt(c[M>>2]|0,c[(c[t>>2]|0)+64>>2]|0)|0)<<4)>>2]|0;c[(c[K>>2]|0)+28>>2]=n;c[s>>2]=0;while(1){if((c[s>>2]|0)>=(b[(c[t>>2]|0)+34>>1]|0))break;if(!(Ig(c[(c[(c[t>>2]|0)+4>>2]|0)+(c[s>>2]<<4)>>2]|0,c[F>>2]|0)|0))break;c[s>>2]=(c[s>>2]|0)+1}if((c[s>>2]|0)==(b[(c[t>>2]|0)+34>>1]|0)){f=21;break}if(c[q>>2]|0){c[L>>2]=0;b:do if(c[(c[M>>2]|0)+24>>2]&524288|0){c[v>>2]=c[(c[t>>2]|0)+16>>2];while(1){if(!(c[v>>2]|0))break b;c[w>>2]=0;while(1){f=c[v>>2]|0;if((c[w>>2]|0)>=(c[(c[v>>2]|0)+20>>2]|0))break;if((c[f+36+(c[w>>2]<<3)>>2]|0)==(c[s>>2]|0))c[L>>2]=39183;c[w>>2]=(c[w>>2]|0)+1}c[v>>2]=c[f+4>>2]}}while(0);c[u>>2]=c[(c[t>>2]|0)+8>>2];while(1){if(!(c[u>>2]|0))break;c[x>>2]=0;while(1){f=c[u>>2]|0;if((c[x>>2]|0)>=(e[(c[u>>2]|0)+50>>1]|0))break;if(!((b[(c[f+4>>2]|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r>>2]=q;r=c[o>>2]|0;l=s;return r|0}if(!(c[(c[k>>2]|0)+20>>2]|0)){q=c[p>>2]|0;r=c[n>>2]|0;c[r>>2]=q;r=c[o>>2]|0;l=s;return r|0}c[o>>2]=Qq(c[(c[k>>2]|0)+20>>2]|0)|0;c[(c[k>>2]|0)+20>>2]=0;a=c[(c[k>>2]|0)+24>>2]|0;if(!(c[o>>2]|0)){k=m;m=c[k+4>>2]|0;r=q;c[r>>2]=c[k>>2];c[r+4>>2]=m;c[p>>2]=Bj(a,39302,q)|0;c[o>>2]=1;q=c[p>>2]|0;r=c[n>>2]|0;c[r>>2]=q;r=c[o>>2]|0;l=s;return r|0}else{c[r>>2]=Ku(c[(c[k>>2]|0)+24>>2]|0)|0;c[p>>2]=Bj(a,18130,r)|0;q=c[p>>2]|0;r=c[n>>2]|0;c[r>>2]=q;r=c[o>>2]|0;l=s;return r|0}return 0}function yI(b){b=b|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=b;b=(c[f>>2]|0)+64|0;a[b>>0]=d[b>>0]|0|16;a[(c[c[f>>2]>>2]|0)+11>>0]=1;l=e;return}function zI(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+12|0;b=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[b>>2]=c[g>>2];if(c[b>>2]|0){c[e>>2]=c[(c[b>>2]|0)+24>>2];c[d>>2]=Qq(c[(c[b>>2]|0)+20>>2]|0)|0;Hd(c[e>>2]|0,c[b>>2]|0);g=c[d>>2]|0;l=f;return g|0}else{c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}return 0}function AI(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;e=BI(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0,141)|0;l=f;return e|0}function BI(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+48|0;m=r+36|0;s=r+32|0;n=r+28|0;o=r+24|0;p=r+20|0;g=r+16|0;h=r+12|0;i=r+8|0;j=r+4|0;k=r;c[s>>2]=a;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[g>>2]=f;c[i>>2]=c[s>>2];if(!(c[i>>2]|0)){c[m>>2]=cd(84716)|0;s=c[m>>2]|0;l=r;return s|0}c[k>>2]=c[(c[i>>2]|0)+24>>2];c[j>>2]=c[(c[i>>2]|0)+20>>2];do if(!((c[o>>2]|0)<0|(c[p>>2]|0)<0)?(d=c[p>>2]|0,f=c[o>>2]|0,f=IR(d|0,((d|0)<0)<<31>>31|0,f|0,((f|0)<0)<<31>>31|0)|0,d=z,s=c[(c[i>>2]|0)+4>>2]|0,e=((s|0)<0)<<31>>31,!((d|0)>(e|0)|(d|0)==(e|0)&f>>>0>s>>>0)):0){if(!(c[j>>2]|0)){c[h>>2]=4;break}CI(c[(c[i>>2]|0)+16>>2]|0);c[h>>2]=wb[c[g>>2]&255](c[(c[i>>2]|0)+16>>2]|0,(c[p>>2]|0)+(c[(c[i>>2]|0)+8>>2]|0)|0,c[o>>2]|0,c[n>>2]|0)|0;if((c[h>>2]|0)==4){Tq(c[j>>2]|0)|0;c[(c[i>>2]|0)+20>>2]=0;break}else{c[(c[j>>2]|0)+40>>2]=c[h>>2];break}}else q=5;while(0);if((q|0)==5)c[h>>2]=1;wk(c[k>>2]|0,c[h>>2]|0);c[h>>2]=Uq(c[k>>2]|0,c[h>>2]|0)|0;c[m>>2]=c[h>>2];s=c[m>>2]|0;l=r;return s|0}function CI(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Ek(c[c[d>>2]>>2]|0);l=b;return}function DI(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];if(!(c[b>>2]|0)){e=0;l=d;return e|0}if(!(c[(c[b>>2]|0)+20>>2]|0)){e=0;l=d;return e|0}e=c[(c[b>>2]|0)+4>>2]|0;l=d;return e|0}function EI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+48|0;k=m+8|0;e=m+32|0;n=m+28|0;f=m;g=m+24|0;h=m+20|0;i=m+16|0;j=m+12|0;c[n>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;c[h>>2]=c[n>>2];if(!(c[h>>2]|0)){c[e>>2]=cd(84814)|0;n=c[e>>2]|0;l=m;return n|0}c[i>>2]=c[(c[h>>2]|0)+24>>2];if(c[(c[h>>2]|0)+20>>2]|0){n=f;c[g>>2]=xI(c[h>>2]|0,c[n>>2]|0,c[n+4>>2]|0,j)|0;if(c[g>>2]|0){f=c[i>>2]|0;h=c[g>>2]|0;n=c[j>>2]|0?18130:0;c[k>>2]=c[j>>2];vk(f,h,n,k);Hd(c[i>>2]|0,c[j>>2]|0)}}else c[g>>2]=4;c[g>>2]=Uq(c[i>>2]|0,c[g>>2]|0)|0;c[e>>2]=c[g>>2];n=c[e>>2]|0;l=m;return n|0}function FI(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;e=GI(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0,0)|0;l=f;return e|0}function GI(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;m=r+36|0;n=r+32|0;o=r+28|0;p=r+24|0;q=r+20|0;g=r+16|0;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|0)+8>>2]|0)Tq(c[(c[n>>2]|0)+8>>2]|0)|0;Jj(c[j>>2]|0,c[(c[n>>2]|0)+440>>2]|0);Ak(c[n>>2]|0);Hd(c[j>>2]|0,c[n>>2]|0)}c[o>>2]=Uq(c[j>>2]|0,c[o>>2]|0)|0;c[i>>2]=c[o>>2];r=c[i>>2]|0;l=s;return r|0}wk(c[j>>2]|0,21);c[i>>2]=cd(123278)|0;r=c[i>>2]|0;l=s;return r|0}function JI(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[39322+((d[(c[b>>2]|0)+74>>0]|0)-1)>>0]|0|0}function KI(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+48|0;f=k+36|0;m=k+32|0;g=k+16|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=b;c[m>>2]=d;c[h>>2]=0;c[g>>2]=e;do if((c[m>>2]|0)==1){c[i>>2]=c[(c[f>>2]|0)+336>>2];if(c[i>>2]|0){e=(c[g>>2]|0)+(4-1)&~(4-1);m=c[e>>2]|0;c[g>>2]=e+4;c[j>>2]=m;a[(c[c[i>>2]>>2]|0)+16>>0]=c[j>>2];break}else{c[h>>2]=cd(123749)|0;break}}else c[h>>2]=cd(123757)|0;while(0);if(!(c[h>>2]|0)){m=c[h>>2]|0;l=k;return m|0}wk(c[f>>2]|0,c[h>>2]|0);m=c[h>>2]|0;l=k;return m|0}function LI(){return 3015001}function MI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+80|0;o=x+76|0;p=x+72|0;q=x+56|0;r=x+52|0;s=x+48|0;t=x+44|0;u=x+40|0;v=x+36|0;e=x+32|0;f=x+28|0;g=x+24|0;h=x+20|0;i=x+16|0;j=x+12|0;k=x+8|0;m=x+4|0;n=x;c[o>>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(c[(c[o>>2]|0)+24>>2]&c[6184+(c[h>>2]<<3)+4>>2]|0)!=0&1;c[r>>2]=0;w=c[r>>2]|0;l=x;return w|0}}return 0}function NI(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;p=q+28|0;o=q+24|0;j=q+20|0;k=q+16|0;m=q+12|0;n=q+8|0;h=q+4|0;i=q;c[o>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=g;if(c[(c[o>>2]|0)+256+8>>2]|0){c[p>>2]=5;p=c[p>>2]|0;l=q;return p|0}if(a[(c[o>>2]|0)+256+6>>0]|0)Kd(c[(c[o>>2]|0)+256+32>>2]|0);g=c[k>>2]&-8;c[k>>2]=g;c[k>>2]=(c[k>>2]|0)<=4?0:g;if((c[m>>2]|0)<0)c[m>>2]=0;do if(!((c[k>>2]|0)==0|(c[m>>2]|0)==0)){if(c[j>>2]|0){c[n>>2]=c[j>>2];break}zg();g=O(c[k>>2]|0,c[m>>2]|0)|0;c[n>>2]=pd(g,((g|0)<0)<<31>>31)|0;Bg();if(c[n>>2]|0){g=ud(c[n>>2]|0)|0;c[m>>2]=(g|0)/(c[k>>2]|0)|0}}else{c[k>>2]=0;c[n>>2]=0}while(0);c[(c[o>>2]|0)+256+32>>2]=c[n>>2];c[(c[o>>2]|0)+256+28>>2]=0;b[(c[o>>2]|0)+256+4>>1]=c[k>>2];if(c[n>>2]|0){c[i>>2]=c[n>>2];c[h>>2]=(c[m>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;c[c[i>>2]>>2]=c[(c[o>>2]|0)+256+28>>2];c[(c[o>>2]|0)+256+28>>2]=c[i>>2];c[i>>2]=(c[i>>2]|0)+(c[k>>2]|0);c[h>>2]=(c[h>>2]|0)+-1}c[(c[o>>2]|0)+256+36>>2]=c[i>>2];c[(c[o>>2]|0)+256>>2]=0;e=((c[j>>2]|0)==0?1:0)&255;d=c[o>>2]|0}else{c[(c[o>>2]|0)+256+32>>2]=c[o>>2];c[(c[o>>2]|0)+256+36>>2]=c[o>>2];c[(c[o>>2]|0)+256>>2]=1;e=0;d=c[o>>2]|0}a[d+256+6>>0]=e;c[p>>2]=0;p=c[p>>2]|0;l=q;return p|0}function OI(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=PI(c[d>>2]|0,0)|0;l=b;return a|0}function PI(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;h=i;e=i+12|0;f=i+8|0;g=i+4|0;c[f>>2]=a;c[g>>2]=b;if(!(c[f>>2]|0)){c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}if(!(Lu(c[f>>2]|0)|0)){c[e>>2]=cd(138867)|0;h=c[e>>2]|0;l=i;return h|0}if((d[(c[f>>2]|0)+76>>0]|0)&8|0)wb[c[(c[f>>2]|0)+184>>2]&255](8,c[(c[f>>2]|0)+188>>2]|0,c[f>>2]|0,0)|0;QI(c[f>>2]|0);Mq(c[f>>2]|0)|0;if((c[g>>2]|0)==0?Cq(c[f>>2]|0)|0:0){vk(c[f>>2]|0,5,39332,h);c[e>>2]=5;h=c[e>>2]|0;l=i;return h|0}c[(c[f>>2]|0)+84>>2]=1691352191;Bq(c[f>>2]|0);c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}function QI(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;b=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[b>>2]=a;Gj(c[b>>2]|0);c[e>>2]=0;while(1){a=c[b>>2]|0;if((c[e>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0))break;c[g>>2]=c[(c[a+16>>2]|0)+(c[e>>2]<<4)+12>>2];a:do if(c[(c[(c[b>>2]|0)+16>>2]|0)+(c[e>>2]<<4)+12>>2]|0){c[f>>2]=c[(c[g>>2]|0)+8+8>>2];while(1){if(!(c[f>>2]|0))break a;c[h>>2]=c[(c[f>>2]|0)+8>>2];if((d[(c[h>>2]|0)+42>>0]|0)&16|0)RI(c[b>>2]|0,c[h>>2]|0);c[f>>2]=c[c[f>>2]>>2]}}while(0);c[e>>2]=(c[e>>2]|0)+1}c[f>>2]=c[a+320+8>>2];while(1){if(!(c[f>>2]|0))break;c[i>>2]=c[(c[f>>2]|0)+8>>2];if(c[(c[i>>2]|0)+16>>2]|0)RI(c[b>>2]|0,c[(c[i>>2]|0)+16>>2]|0);c[f>>2]=c[c[f>>2]>>2]}Zp(c[b>>2]|0);l=j;return}function RI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;d=h+12|0;i=h+8|0;e=h+4|0;f=h;c[d>>2]=a;c[i>>2]=b;c[e>>2]=(c[i>>2]|0)+56;while(1){if(!(c[c[e>>2]>>2]|0)){g=6;break}a=c[c[e>>2]>>2]|0;if((c[c[c[e>>2]>>2]>>2]|0)==(c[d>>2]|0))break;c[e>>2]=a+24}if((g|0)==6){l=h;return}c[f>>2]=a;c[c[e>>2]>>2]=c[(c[f>>2]|0)+24>>2];Tj(c[f>>2]|0);l=h;return}function SI(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=PI(c[d>>2]|0,1)|0;l=b;return a|0}function TI(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;j=l;l=l+32|0;s=j+28|0;r=j+24|0;q=j+20|0;p=j+16|0;o=j+12|0;n=j+8|0;m=j+4|0;k=j;c[s>>2]=a;c[r>>2]=b;c[q>>2]=d;c[p>>2]=e;c[o>>2]=f;c[n>>2]=g;c[m>>2]=h;c[k>>2]=i;i=UI(c[s>>2]|0,c[r>>2]|0,c[q>>2]|0,c[p>>2]|0,c[o>>2]|0,c[n>>2]|0,c[m>>2]|0,c[k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c[h>>2]|0}function WI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+32|0;h=e;g=e+20|0;i=e+8|0;f=e+4|0;c[g>>2]=a;c[e+16>>2]=b;c[e+12>>2]=d;c[i>>2]=c[(c[(c[g>>2]|0)+4>>2]|0)+20>>2];c[h>>2]=c[i>>2];c[f>>2]=Ue(39400,h)|0;yh(c[g>>2]|0,c[f>>2]|0,-1);Kd(c[f>>2]|0);l=e;return}function XI(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[e>>2]=a;if(c[e>>2]|0?(Lu(c[e>>2]|0)|0)==0:0){c[b>>2]=cd(140115)|0;e=c[b>>2]|0;l=f;return e|0}if(c[e>>2]|0?(d[(c[e>>2]|0)+69>>0]|0|0)==0:0){c[b>>2]=c[(c[e>>2]|0)+52>>2]&c[(c[e>>2]|0)+56>>2];e=c[b>>2]|0;l=f;return e|0}c[b>>2]=7;e=c[b>>2]|0;l=f;return e|0}function YI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=ZI(c[f>>2]|0,c[e>>2]|0,6,0)|0;l=d;return b|0}function ZI(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;r=s;k=s+40|0;m=s+36|0;n=s+32|0;o=s+28|0;p=s+24|0;q=s+20|0;h=s+16|0;g=s+12|0;i=s+8|0;j=s+4|0;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;c[i>>2]=0;c[j>>2]=0;c[c[n>>2]>>2]=0;c[h>>2]=Rd()|0;if(c[h>>2]|0){c[k>>2]=c[h>>2];r=c[k>>2]|0;l=s;return r|0}if(!(1<<(c[o>>2]&7)&70)){c[k>>2]=cd(140621)|0;r=c[k>>2]|0;l=s;return r|0}do if(c[3]|0){if(c[o>>2]&32768|0){c[g>>2]=0;break}if(c[o>>2]&65536|0){c[g>>2]=1;break}else{c[g>>2]=c[4];break}}else c[g>>2]=0;while(0);if(!(c[o>>2]&262144|0)){if(c[57]|0)c[o>>2]=c[o>>2]|131072}else c[o>>2]=c[o>>2]&-131073;c[o>>2]=c[o>>2]&-655129;c[q>>2]=Cg(464,0)|0;do if(c[q>>2]|0){if(c[g>>2]|0?(c[(c[q>>2]|0)+12>>2]=8,(c[(c[q>>2]|0)+12>>2]|0)==0):0){Kd(c[q>>2]|0);c[q>>2]=0;break}c[(c[q>>2]|0)+56>>2]=255;c[(c[q>>2]|0)+20>>2]=2;c[(c[q>>2]|0)+84>>2]=-264537850;c[(c[q>>2]|0)+16>>2]=(c[q>>2]|0)+392;b=(c[q>>2]|0)+96|0;d=5364;g=b+48|0;do{c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}while((b|0)<(g|0));c[(c[q>>2]|0)+96+44>>2]=0;a[(c[q>>2]|0)+67>>0]=1;a[(c[q>>2]|0)+72>>0]=-1;g=184;e=c[g+4>>2]|0;f=(c[q>>2]|0)+40|0;c[f>>2]=c[g>>2];c[f+4>>2]=e;c[(c[q>>2]|0)+80>>2]=0;c[(c[q>>2]|0)+144>>2]=2147483647;f=(c[q>>2]|0)+24|0;c[f>>2]=c[f>>2]|17825888;aq((c[q>>2]|0)+364|0);aq((c[q>>2]|0)+320|0);$I(c[q>>2]|0,31345,1,0,141,0)|0;$I(c[q>>2]|0,31345,3,0,141,0)|0;$I(c[q>>2]|0,31345,2,0,141,0)|0;$I(c[q>>2]|0,31338,1,0,142,0)|0;$I(c[q>>2]|0,39451,1,1,141,0)|0;if(!(a[(c[q>>2]|0)+69>>0]|0)){f=zv(c[q>>2]|0,1,31345,0)|0;c[(c[q>>2]|0)+8>>2]=f;c[(c[q>>2]|0)+48>>2]=c[o>>2];c[h>>2]=Yy(c[p>>2]|0,c[m>>2]|0,o,c[q>>2]|0,i,j)|0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==8)c[o>>2]=(a[936]|0)==0?3:2;if((c[o>>2]|0)<1|(c[o>>2]|0)>3){c[s>>2]=cd(140172)|0;w=c[s>>2]|0;l=x;return w|0}c[n>>2]=zv(c[t>>2]|0,c[o>>2]&255,c[u>>2]|0,0)|0;a:do if(c[n>>2]|0?c[(c[n>>2]|0)+12>>2]|0:0){b=c[t>>2]|0;if(c[(c[t>>2]|0)+156>>2]|0){vk(b,5,44727,w);c[s>>2]=5;w=c[s>>2]|0;l=x;return w|0}$p(b);if((d[(c[n>>2]|0)+4>>0]&-9|0)==(c[o>>2]|0)){c[p>>2]=nu((c[t>>2]|0)+364|0,c[u>>2]|0)|0;c[q>>2]=0;while(1){if((c[q>>2]|0)>=3)break a;c[r>>2]=(c[p>>2]|0)+((c[q>>2]|0)*20|0);if((d[(c[r>>2]|0)+4>>0]|0)==(d[(c[n>>2]|0)+4>>0]|0)){if(c[(c[r>>2]|0)+16>>2]|0)qb[c[(c[r>>2]|0)+16>>2]&255](c[(c[r>>2]|0)+8>>2]|0);c[(c[r>>2]|0)+12>>2]=0}c[q>>2]=(c[q>>2]|0)+1}}}while(0);c[n>>2]=zv(c[t>>2]|0,c[o>>2]&255,c[u>>2]|0,1)|0;if(!(c[n>>2]|0)){c[s>>2]=7;w=c[s>>2]|0;l=x;return w|0}else{c[(c[n>>2]|0)+12>>2]=c[k>>2];c[(c[n>>2]|0)+8>>2]=c[j>>2];c[(c[n>>2]|0)+16>>2]=c[m>>2];a[(c[n>>2]|0)+4>>0]=c[o>>2]|d[v>>0]&8;wk(c[t>>2]|0,0);c[s>>2]=0;w=c[s>>2]|0;l=x;return w|0}return 0}function aJ(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+32|0;h=j+16|0;m=j+12|0;i=j+8|0;k=j+4|0;g=j;c[j+20>>2]=a;c[h>>2]=b;c[m>>2]=d;c[i>>2]=e;c[k>>2]=f;c[g>>2]=Zc(c[m>>2]|0,c[k>>2]|0,(c[h>>2]|0)<(c[i>>2]|0)?c[h>>2]|0:c[i>>2]|0)|0;if(c[g>>2]|0){m=c[g>>2]|0;l=j;return m|0}c[g>>2]=(c[h>>2]|0)-(c[i>>2]|0);m=c[g>>2]|0;l=j;return m|0}function bJ(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d+4|0;e=d;c[b>>2]=a;c[e>>2]=VI(c[b>>2]|0,44721,2)|0;if((c[e>>2]|0)!=7){l=d;return}yd(c[b>>2]|0);l=d;return}function cJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;j=k;b=k+28|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;c[b>>2]=a;c[e>>2]=1;if(!(c[11764]|0)){l=k;return}c[d>>2]=0;while(1){if(!(c[e>>2]|0))break;c[i>>2]=0;if((c[d>>2]|0)>>>0>=(c[11764]|0)>>>0){c[g>>2]=0;c[e>>2]=0}else c[g>>2]=c[(c[11765]|0)+(c[d>>2]<<2)>>2];c[h>>2]=0;if(c[g>>2]|0?(a=ob[c[g>>2]&255](c[b>>2]|0,h,c[i>>2]|0)|0,c[f>>2]=a,a|0):0){m=c[b>>2]|0;a=c[f>>2]|0;c[j>>2]=c[h>>2];vk(m,a,44682,j);c[e>>2]=0}Kd(c[h>>2]|0);c[d>>2]=(c[d>>2]|0)+1}l=k;return}function dJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;b=j+24|0;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[d>>2]=a;c[e>>2]=0;c[f>>2]=0;c[g>>2]=0;c[h>>2]=0;c[i>>2]=0;eJ(i);c[e>>2]=fJ(c[d>>2]|0)|0;if(c[e>>2]|0){c[b>>2]=c[e>>2];i=c[b>>2]|0;l=j;return i|0}gJ(g);hJ(h);c[f>>2]=Yd(20)|0;if(c[f>>2]|0)iJ(c[f>>2]|0,1,1);else c[e>>2]=7;do if(!(c[e>>2]|0)){if(((jJ(c[f>>2]|0,39462,7,c[g>>2]|0)|0)==0?(jJ(c[f>>2]|0,39469,7,c[h>>2]|0)|0)==0:0)?(jJ(c[f>>2]|0,39476,10,c[i>>2]|0)|0)==0:0)break;c[e>>2]=7}while(0);if((((((0==(c[e>>2]|0)?(i=kJ(c[d>>2]|0,c[f>>2]|0,39486)|0,c[e>>2]=i,0==(i|0)):0)?(i=VI(c[d>>2]|0,39501,-1)|0,c[e>>2]=i,0==(i|0)):0)?(i=VI(c[d>>2]|0,39509,1)|0,c[e>>2]=i,0==(i|0)):0)?(i=VI(c[d>>2]|0,39517,1)|0,c[e>>2]=i,0==(i|0)):0)?(i=VI(c[d>>2]|0,39517,2)|0,c[e>>2]=i,0==(i|0)):0)?(i=VI(c[d>>2]|0,39527,1)|0,c[e>>2]=i,0==(i|0)):0){c[e>>2]=HI(c[d>>2]|0,39536,6216,c[f>>2]|0,152)|0;if(!(c[e>>2]|0))c[e>>2]=HI(c[d>>2]|0,39541,6216,c[f>>2]|0,0)|0;if(!(c[e>>2]|0))c[e>>2]=mJ(c[d>>2]|0,c[f>>2]|0)|0;c[b>>2]=c[e>>2];i=c[b>>2]|0;l=j;return i|0}if(c[f>>2]|0){nJ(c[f>>2]|0);Kd(c[f>>2]|0)}c[b>>2]=c[e>>2];i=c[b>>2]|0;l=j;return i|0}function eJ(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[c[d>>2]>>2]=6836;l=b;return}function fJ(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=FI(c[e>>2]|0,44399,6744,0)|0;l=d;return c[b>>2]|0}function gJ(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[c[d>>2]>>2]=6716;l=b;return}function hJ(a){a=a|0;var b=0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ZO(c[n>>2]|0,c[(c[n>>2]|0)+12>>2]<<1)|0:0)break;c[k>>2]=_O(20)|0;if(!(c[k>>2]|0)){c[m>>2]=c[q>>2];t=c[m>>2]|0;l=s;return t|0}do if(c[o>>2]|0?(a[(c[n>>2]|0)+1>>0]|0)!=0:0){b=_O(c[p>>2]|0)|0;c[(c[k>>2]|0)+12>>2]=b;b=c[k>>2]|0;if(c[(c[k>>2]|0)+12>>2]|0){MR(c[b+12>>2]|0,c[o>>2]|0,c[p>>2]|0)|0;break}oJ(b);c[m>>2]=c[q>>2];t=c[m>>2]|0;l=s;return t|0}else c[(c[k>>2]|0)+12>>2]=c[o>>2];while(0);c[(c[k>>2]|0)+16>>2]=c[p>>2];t=(c[n>>2]|0)+4|0;c[t>>2]=(c[t>>2]|0)+1;c[j>>2]=c[r>>2]&(c[(c[n>>2]|0)+12>>2]|0)-1;$O(c[n>>2]|0,(c[(c[n>>2]|0)+16>>2]|0)+(c[j>>2]<<3)|0,c[k>>2]|0);c[(c[k>>2]|0)+8>>2]=c[q>>2];c[m>>2]=0;t=c[m>>2]|0;l=s;return t|0}while(0);c[(c[n>>2]|0)+4>>2]=0;c[m>>2]=c[q>>2];t=c[m>>2]|0;l=s;return t|0}function kJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+20|0;j=i+16|0;f=i+12|0;g=i+8|0;h=i+4|0;c[e>>2]=a;c[j>>2]=b;c[f>>2]=d;c[g>>2]=0;c[h>>2]=c[j>>2];c[i>>2]=5;if(!(c[g>>2]|0))c[g>>2]=TI(c[e>>2]|0,c[f>>2]|0,1,5,c[h>>2]|0,228,0,0)|0;if(c[g>>2]|0){j=c[g>>2]|0;l=i;return j|0}c[g>>2]=TI(c[e>>2]|0,c[f>>2]|0,2,5,c[h>>2]|0,228,0,0)|0;j=c[g>>2]|0;l=i;return j|0}function lJ(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];nJ(c[d>>2]|0);Kd(c[d>>2]|0);l=b;return}function mJ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+8|0;f=e+4|0;d=e;c[g>>2]=a;c[f>>2]=b;c[d>>2]=FI(c[g>>2]|0,39546,6308,c[f>>2]|0)|0;l=e;return c[d>>2]|0}function nJ(b){b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=b;c[e>>2]=c[(c[d>>2]|0)+8>>2];c[(c[d>>2]|0)+8>>2]=0;oJ(c[(c[d>>2]|0)+16>>2]|0);c[(c[d>>2]|0)+16>>2]=0;c[(c[d>>2]|0)+12>>2]=0;while(1){if(!(c[e>>2]|0))break;c[f>>2]=c[c[e>>2]>>2];if(a[(c[d>>2]|0)+1>>0]|0?c[(c[e>>2]|0)+12>>2]|0:0)oJ(c[(c[e>>2]|0)+12>>2]|0);oJ(c[e>>2]|0);c[e>>2]=c[f>>2]}c[(c[d>>2]|0)+4>>2]=0;l=g;return}function oJ(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Kd(c[d>>2]|0);l=b;return}function pJ(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=l;l=l+64|0;t=w+56|0;x=w+52|0;u=w+48|0;v=w+44|0;h=w+40|0;i=w+36|0;j=w+32|0;k=w+28|0;m=w+24|0;n=w+20|0;o=w+16|0;p=w+12|0;q=w+8|0;r=w+4|0;s=w;c[x>>2]=a;c[u>>2]=b;c[v>>2]=d;c[h>>2]=e;c[i>>2]=f;c[j>>2]=g;c[k>>2]=0;c[m>>2]=0;c[n>>2]=0;c[p>>2]=0;c[o>>2]=II(c[x>>2]|0,39559)|0;if(c[o>>2]|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c[(c[(c[g>>2]|0)+16>>2]|0)+(c[i>>2]<<3)>>2]=1;a[(c[(c[g>>2]|0)+16>>2]|0)+(c[i>>2]<<3)+4>>0]=1;h[(c[g>>2]|0)+40>>3]=1.0;c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}else if((e|0)==8){c[b+20>>2]=0;c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}return 0}function rJ(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];tb[c[(c[(c[d>>2]|0)+12>>2]|0)+8>>2]&255](c[(c[d>>2]|0)+16>>2]|0)|0;Kd(c[d>>2]|0);l=b;return 0}function sJ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+12|0;e=g+4|0;f=g;c[g+8>>2]=a;c[e>>2]=b;c[f>>2]=Yd(36)|0;if(!(c[f>>2]|0)){c[d>>2]=7;f=c[d>>2]|0;l=g;return f|0}else{a=c[f>>2]|0;b=a+36|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[c[e>>2]>>2]=c[f>>2];c[d>>2]=0;f=c[d>>2]|0;l=g;return f|0}return 0}function tJ(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];zJ(c[d>>2]|0);Kd(c[d>>2]|0);l=b;return 0}function uJ(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+48|0;o=q+40|0;p=q+36|0;r=q+32|0;h=q+20|0;i=q+16|0;j=q+12|0;k=q+8|0;m=q+4|0;n=q;c[p>>2]=b;c[r>>2]=d;c[q+28>>2]=e;c[q+24>>2]=f;c[h>>2]=g;c[i>>2]=1;c[j>>2]=c[p>>2];c[k>>2]=c[c[p>>2]>>2];zJ(c[j>>2]|0);do if((c[r>>2]|0)==1){c[m>>2]=wh(c[c[h>>2]>>2]|0)|0;c[n>>2]=xh(c[c[h>>2]>>2]|0)|0;r=Yd((c[n>>2]|0)+1|0)|0;c[(c[j>>2]|0)+4>>2]=r;if(!(c[(c[j>>2]|0)+4>>2]|0)){c[i>>2]=7;break}MR(c[(c[j>>2]|0)+4>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;a[(c[(c[j>>2]|0)+4>>2]|0)+(c[n>>2]|0)>>0]=0;c[i>>2]=wb[c[(c[(c[k>>2]|0)+12>>2]|0)+12>>2]&255](c[(c[k>>2]|0)+16>>2]|0,c[(c[j>>2]|0)+4>>2]|0,c[n>>2]|0,(c[j>>2]|0)+8|0)|0;if(!(c[i>>2]|0))c[c[(c[j>>2]|0)+8>>2]>>2]=c[(c[k>>2]|0)+16>>2]}while(0);if(c[i>>2]|0){c[o>>2]=c[i>>2];r=c[o>>2]|0;l=q;return r|0}else{c[o>>2]=vJ(c[p>>2]|0)|0;r=c[o>>2]|0;l=q;return r|0}return 0}function vJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+12|0;b=e+8|0;f=e+4|0;d=e;c[g>>2]=a;c[b>>2]=c[g>>2];c[f>>2]=c[c[g>>2]>>2];a=(c[b>>2]|0)+12|0;c[a>>2]=(c[a>>2]|0)+1;c[d>>2]=sb[c[(c[(c[f>>2]|0)+12>>2]|0)+20>>2]&255](c[(c[b>>2]|0)+8>>2]|0,(c[b>>2]|0)+16|0,(c[b>>2]|0)+20|0,(c[b>>2]|0)+24|0,(c[b>>2]|0)+28|0,(c[b>>2]|0)+32|0)|0;if(!(c[d>>2]|0)){g=c[d>>2]|0;l=e;return g|0}zJ(c[b>>2]|0);if((c[d>>2]|0)!=101){g=c[d>>2]|0;l=e;return g|0}c[d>>2]=0;g=c[d>>2]|0;l=e;return g|0}function wJ(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];l=d;return (c[(c[b>>2]|0)+16>>2]|0)==0|0}function xJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;i=g+12|0;e=g+8|0;h=g+4|0;f=g;c[i>>2]=a;c[e>>2]=b;c[h>>2]=d;c[f>>2]=c[i>>2];switch(c[h>>2]|0){case 0:{ci(c[e>>2]|0,c[(c[f>>2]|0)+4>>2]|0,-1,-1);l=g;return 0}case 1:{ci(c[e>>2]|0,c[(c[f>>2]|0)+16>>2]|0,c[(c[f>>2]|0)+20>>2]|0,-1);l=g;return 0}case 2:{Ch(c[e>>2]|0,c[(c[f>>2]|0)+24>>2]|0);l=g;return 0}case 3:{Ch(c[e>>2]|0,c[(c[f>>2]|0)+28>>2]|0);l=g;return 0}default:{Ch(c[e>>2]|0,c[(c[f>>2]|0)+32>>2]|0);l=g;return 0}}return 0}function yJ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;e=d+4|0;f=d;c[g>>2]=a;c[e>>2]=b;c[f>>2]=c[g>>2];a=c[(c[f>>2]|0)+12>>2]|0;b=c[e>>2]|0;c[b>>2]=a;c[b+4>>2]=((a|0)<0)<<31>>31;l=d;return 0}function zJ(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(c[(c[b>>2]|0)+8>>2]|0){c[d>>2]=c[c[b>>2]>>2];tb[c[(c[(c[d>>2]|0)+12>>2]|0)+16>>2]&255](c[(c[b>>2]|0)+8>>2]|0)|0;c[(c[b>>2]|0)+8>>2]=0}Kd(c[(c[b>>2]|0)+4>>2]|0);c[(c[b>>2]|0)+4>>2]=0;c[(c[b>>2]|0)+16>>2]=0;c[(c[b>>2]|0)+20>>2]=0;c[(c[b>>2]|0)+24>>2]=0;c[(c[b>>2]|0)+28>>2]=0;c[(c[b>>2]|0)+32>>2]=0;c[(c[b>>2]|0)+12>>2]=0;l=e;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>2]=CJ(c[o>>2]|0,c[g>>2]|0,(c[n>>2]|0)+1|0)|0;if(c[j>>2]|0){c[c[h>>2]>>2]=c[j>>2];c[f>>2]=0;o=c[f>>2]|0;l=m;return o|0}else{o=c[i>>2]|0;c[k>>2]=c[g>>2];DJ(o,39610,k);c[f>>2]=1;o=c[f>>2]|0;l=m;return o|0}return 0}function CJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+16|0;i=f+12|0;h=f+8|0;g=f+4|0;e=f;c[i>>2]=a;c[h>>2]=b;c[g>>2]=d;c[e>>2]=EJ(c[i>>2]|0,c[h>>2]|0,c[g>>2]|0)|0;if(!(c[e>>2]|0)){i=0;l=f;return i|0}i=c[(c[e>>2]|0)+8>>2]|0;l=f;return i|0}function DJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+32|0;f=e+20|0;h=e+16|0;g=e;c[f>>2]=a;c[h>>2]=b;Kd(c[c[f>>2]>>2]|0);c[g>>2]=d;d=af(c[h>>2]|0,g)|0;c[c[f>>2]>>2]=d;l=e;return}function EJ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;if(c[g>>2]|0?c[(c[g>>2]|0)+16>>2]|0:0){c[k>>2]=FJ(a[c[g>>2]>>0]|0)|0;c[j>>2]=yb[c[k>>2]&255](c[h>>2]|0,c[i>>2]|0)|0;c[f>>2]=GJ(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0,c[j>>2]&(c[(c[g>>2]|0)+12>>2]|0)-1)|0;k=c[f>>2]|0;l=m;return k|0}c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}function FJ(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d+4|0;e=d;c[e>>2]=a;if((c[e>>2]|0)==1)c[b>>2]=199;else c[b>>2]=200;l=d;return c[b>>2]|0}function GJ(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;m=q+32|0;h=q+28|0;n=q+24|0;o=q+20|0;i=q+16|0;p=q+12|0;j=q+8|0;k=q+4|0;g=q;c[h>>2]=b;c[n>>2]=d;c[o>>2]=e;c[i>>2]=f;a:do if(c[(c[h>>2]|0)+16>>2]|0){c[g>>2]=(c[(c[h>>2]|0)+16>>2]|0)+(c[i>>2]<<3);c[p>>2]=c[(c[g>>2]|0)+4>>2];c[j>>2]=c[c[g>>2]>>2];c[k>>2]=HJ(a[c[h>>2]>>0]|0)|0;while(1){i=c[j>>2]|0;c[j>>2]=i+-1;if(!(i|0?(c[p>>2]|0)!=0:0))break a;i=(wb[c[k>>2]&255](c[(c[p>>2]|0)+12>>2]|0,c[(c[p>>2]|0)+16>>2]|0,c[n>>2]|0,c[o>>2]|0)|0)==0;b=c[p>>2]|0;if(i)break;c[p>>2]=c[b>>2]}c[m>>2]=b;p=c[m>>2]|0;l=q;return p|0}while(0);c[m>>2]=0;p=c[m>>2]|0;l=q;return p|0}function HJ(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d+4|0;e=d;c[e>>2]=a;if((c[e>>2]|0)==1)c[b>>2]=142;else c[b>>2]=143;l=d;return c[b>>2]|0}function IJ(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;f=j+16|0;g=j+12|0;h=j+8|0;i=j+4|0;k=j;c[g>>2]=a;c[h>>2]=b;c[i>>2]=d;c[k>>2]=e;if((c[h>>2]|0)!=(c[k>>2]|0)){c[f>>2]=1;k=c[f>>2]|0;l=j;return k|0}else{c[f>>2]=AQ(c[g>>2]|0,c[i>>2]|0,c[h>>2]|0)|0;k=c[f>>2]|0;l=j;return k|0}return 0}function JJ(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;f=j+16|0;g=j+12|0;h=j+8|0;i=j+4|0;k=j;c[g>>2]=a;c[h>>2]=b;c[i>>2]=d;c[k>>2]=e;if((c[h>>2]|0)!=(c[k>>2]|0)){c[f>>2]=1;k=c[f>>2]|0;l=j;return k|0}else{c[f>>2]=wQ(c[g>>2]|0,c[i>>2]|0,c[h>>2]|0)|0;k=c[f>>2]|0;l=j;return k|0}return 0}function KJ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[i>>2]=b;c[e>>2]=d;c[f>>2]=c[i>>2];c[g>>2]=0;if((c[e>>2]|0)<=0)c[e>>2]=lQ(c[f>>2]|0)|0;while(1){b=c[g>>2]|0;if((c[e>>2]|0)<=0)break;d=b<<3^c[g>>2];i=c[f>>2]|0;c[f>>2]=i+1;c[g>>2]=d^a[i>>0];c[e>>2]=(c[e>>2]|0)+-1}l=h;return b&2147483647|0}function LJ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[i>>2]=b;c[e>>2]=d;c[f>>2]=0;c[g>>2]=c[i>>2];while(1){i=c[e>>2]|0;c[e>>2]=i+-1;b=c[f>>2]|0;if((i|0)<=0)break;d=b<<3^c[f>>2];i=c[g>>2]|0;c[g>>2]=i+1;c[f>>2]=d^a[i>>0]}l=h;return b&2147483647|0}function MJ(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+8|0;g=j+12|0;h=j+4|0;i=j;c[f>>2]=b;a[g>>0]=a[c[f>>2]>>0]|0;if((((a[g>>0]|0)!=91?(a[g>>0]|0)!=39:0)?(a[g>>0]|0)!=34:0)?(a[g>>0]|0)!=96:0){l=j;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,v=0;u=l;l=l+64|0;m=u+48|0;v=u+44|0;n=u+40|0;o=u+36|0;p=u+32|0;q=u+28|0;r=u+24|0;s=u+20|0;f=u+16|0;g=u+12|0;i=u+8|0;j=u+4|0;k=u;c[v>>2]=b;c[n>>2]=e;c[o>>2]=c[v>>2];c[q>>2]=-1;c[r>>2]=-1;c[s>>2]=-1;c[f>>2]=-1;c[(c[n>>2]|0)+20>>2]=0;h[(c[n>>2]|0)+40>>3]=5.0e6;c[p>>2]=0;a:while(1){b=c[n>>2]|0;if((c[p>>2]|0)>=(c[c[n>>2]>>2]|0))break;c[j>>2]=(c[b+4>>2]|0)+((c[p>>2]|0)*12|0);b=c[j>>2]|0;b:do if(!(d[(c[j>>2]|0)+5>>0]|0)){if((d[b+4>>0]|0)==64){t=5;break a}}else{if((c[b>>2]|0)<0)b=1;else b=(c[c[j>>2]>>2]|0)==((c[(c[o>>2]|0)+24>>2]|0)+1|0);c[i>>2]=b&1;if((c[q>>2]|0)<0?(c[i>>2]|0?(d[(c[j>>2]|0)+4>>0]|0)==2:0):0){c[(c[n>>2]|0)+20>>2]=1;h[(c[n>>2]|0)+40>>3]=1.0;c[q>>2]=c[p>>2]}if(((d[(c[j>>2]|0)+4>>0]|0)==64?(c[c[j>>2]>>2]|0)>=0:0)?(c[c[j>>2]>>2]|0)<=(c[(c[o>>2]|0)+24>>2]|0):0){c[(c[n>>2]|0)+20>>2]=2+(c[c[j>>2]>>2]|0);h[(c[n>>2]|0)+40>>3]=2.0;c[q>>2]=c[p>>2]}if((d[(c[j>>2]|0)+4>>0]|0)==2?(c[c[j>>2]>>2]|0)==((c[(c[o>>2]|0)+24>>2]|0)+2|0):0)c[r>>2]=c[p>>2];if(c[i>>2]|0){v=(d[(c[j>>2]|0)+4>>0]|0)-4|0;switch(v>>>2|v<<30|0){case 0:case 7:{c[s>>2]=c[p>>2];break b}case 3:case 1:{c[f>>2]=c[p>>2];break b}default:break b}}}while(0);c[p>>2]=(c[p>>2]|0)+1}if((t|0)==5){c[(c[n>>2]|0)+20>>2]=0;h[(c[n>>2]|0)+40>>3]=1.e+50;FO(c[n>>2]|0,0,262144);c[m>>2]=0;v=c[m>>2]|0;l=u;return v|0}if((c[b+20>>2]|0)==1)GO(c[n>>2]|0);c[g>>2]=1;if((c[q>>2]|0)>=0){v=c[g>>2]|0;c[g>>2]=v+1;c[(c[(c[n>>2]|0)+16>>2]|0)+(c[q>>2]<<3)>>2]=v;a[(c[(c[n>>2]|0)+16>>2]|0)+(c[q>>2]<<3)+4>>0]=1}if((c[r>>2]|0)>=0){v=(c[n>>2]|0)+20|0;c[v>>2]=c[v>>2]|65536;v=c[g>>2]|0;c[g>>2]=v+1;c[(c[(c[n>>2]|0)+16>>2]|0)+(c[r>>2]<<3)>>2]=v}if((c[s>>2]|0)>=0){v=(c[n>>2]|0)+20|0;c[v>>2]=c[v>>2]|131072;v=c[g>>2]|0;c[g>>2]=v+1;c[(c[(c[n>>2]|0)+16>>2]|0)+(c[s>>2]<<3)>>2]=v}if((c[f>>2]|0)>=0){v=(c[n>>2]|0)+20|0;c[v>>2]=c[v>>2]|262144;v=c[g>>2]|0;c[g>>2]=v+1;c[(c[(c[n>>2]|0)+16>>2]|0)+(c[f>>2]<<3)>>2]=v}do if((c[(c[n>>2]|0)+8>>2]|0)==1){c[k>>2]=c[(c[n>>2]|0)+12>>2];if((c[c[k>>2]>>2]|0)>=0?(c[c[k>>2]>>2]|0)!=((c[(c[o>>2]|0)+24>>2]|0)+1|0):0)break;c[(c[n>>2]|0)+24>>2]=a[(c[k>>2]|0)+4>>0]|0?42639:42644;c[(c[n>>2]|0)+32>>2]=1}while(0);c[m>>2]=0;v=c[m>>2]|0;l=u;return v|0}function QJ(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;f=e+8|0;b=e+4|0;d=e;c[f>>2]=a;c[b>>2]=c[f>>2];c[d>>2]=0;while(1){a=c[b>>2]|0;if((c[d>>2]|0)>=40)break;Qq(c[a+56+(c[d>>2]<<2)>>2]|0)|0;c[d>>2]=(c[d>>2]|0)+1}Kd(c[a+240>>2]|0);Kd(c[(c[b>>2]|0)+216>>2]|0);Kd(c[(c[b>>2]|0)+220>>2]|0);Kd(c[(c[b>>2]|0)+40>>2]|0);Kd(c[(c[b>>2]|0)+44>>2]|0);tb[c[(c[c[(c[b>>2]|0)+36>>2]>>2]|0)+8>>2]&255](c[(c[b>>2]|0)+36>>2]|0)|0;Kd(c[b>>2]|0);l=e;return 0}function RJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+64|0;j=n+32|0;i=n+24|0;m=n+16|0;k=n+8|0;h=n;b=n+56|0;d=n+52|0;e=n+48|0;f=n+44|0;g=n+40|0;c[b>>2]=a;c[d>>2]=c[b>>2];c[e>>2]=0;c[f>>2]=c[(c[d>>2]|0)+16>>2];c[g>>2]=c[(c[d>>2]|0)+12>>2];if(!(c[(c[d>>2]|0)+40>>2]|0)){a=c[g>>2]|0;o=c[(c[d>>2]|0)+20>>2]|0;c[h>>2]=c[f>>2];c[h+4>>2]=o;lK(e,a,42839,h)}o=c[g>>2]|0;h=c[(c[d>>2]|0)+20>>2]|0;c[k>>2]=c[f>>2];c[k+4>>2]=h;lK(e,o,42876,k);o=c[g>>2]|0;k=c[(c[d>>2]|0)+20>>2]|0;c[m>>2]=c[f>>2];c[m+4>>2]=k;lK(e,o,42914,m);o=c[g>>2]|0;m=c[(c[d>>2]|0)+20>>2]|0;c[i>>2]=c[f>>2];c[i+4>>2]=m;lK(e,o,42950,i);o=c[g>>2]|0;m=c[(c[d>>2]|0)+20>>2]|0;c[j>>2]=c[f>>2];c[j+4>>2]=m;lK(e,o,42987,j);if(!(c[e>>2]|0)){o=QJ(c[b>>2]|0)|0;l=n;return o|0}else{o=c[e>>2]|0;l=n;return o|0}return 0}function SJ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;e=f+12|0;g=f+4|0;d=f;c[f+8>>2]=a;c[g>>2]=b;b=Yd(96)|0;c[d>>2]=b;c[c[g>>2]>>2]=b;if(c[d>>2]|0){a=c[d>>2]|0;b=a+96|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[e>>2]=0;g=c[e>>2]|0;l=f;return g|0}else{c[e>>2]=7;g=c[e>>2]|0;l=f;return g|0}return 0}function TJ(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];Qq(c[(c[d>>2]|0)+8>>2]|0)|0;cO(c[(c[d>>2]|0)+12>>2]|0);EO(c[d>>2]|0);Kd(c[(c[d>>2]|0)+44>>2]|0);xL(c[(c[d>>2]|0)+92>>2]|0);Kd(c[d>>2]|0);l=b;return 0}function UJ(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+112|0;D=E+32|0;C=E;A=E+108|0;B=E+104|0;m=E+100|0;n=E+96|0;j=E+88|0;t=E+84|0;u=E+80|0;o=E+76|0;v=E+72|0;w=E+68|0;p=E+64|0;q=E+60|0;x=E+56|0;y=E+52|0;k=E+48|0;r=E+44|0;s=E+40|0;c[B>>2]=e;c[m>>2]=f;c[n>>2]=g;c[E+92>>2]=h;c[j>>2]=i;c[t>>2]=0;c[v>>2]=c[c[B>>2]>>2];c[w>>2]=c[B>>2];c[p>>2]=0;c[q>>2]=0;c[x>>2]=0;c[y>>2]=0;c[o>>2]=c[m>>2]&65535;c[k>>2]=0;if(c[o>>2]|0){h=c[j>>2]|0;i=c[k>>2]|0;c[k>>2]=i+1;c[p>>2]=c[h+(i<<2)>>2]}if(c[m>>2]&65536|0){h=c[j>>2]|0;i=c[k>>2]|0;c[k>>2]=i+1;c[q>>2]=c[h+(i<<2)>>2]}if(c[m>>2]&131072|0){h=c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(c[v>>2]|0);if(!(c[t>>2]|0)){c[(c[w>>2]|0)+40>>2]=c[(c[w>>2]|0)+44>>2];s=(c[w>>2]|0)+32|0;c[s>>2]=0;c[s+4>>2]=0;break}c[A>>2]=c[t>>2];D=c[A>>2]|0;l=E;return D|0}while(0);do if(!(c[o>>2]|0)){e=c[(c[v>>2]|0)+216>>2]|0;f=c[w>>2]|0;if((c[x>>2]|0)!=0|(c[y>>2]|0)!=0){r=f+72|0;q=c[r>>2]|0;r=c[r+4>>2]|0;x=(c[w>>2]|0)+80|0;s=c[x>>2]|0;x=c[x+4>>2]|0;D=d[(c[w>>2]|0)+52>>0]|0?42639:42644;c[C>>2]=e;y=C+8|0;c[y>>2]=q;c[y+4>>2]=r;y=C+16|0;c[y>>2]=s;c[y+4>>2]=x;c[C+24>>2]=D;c[u>>2]=Ue(42648,C)|0}else{C=d[f+52>>0]|0?42639:42644;c[D>>2]=e;c[D+4>>2]=C;c[u>>2]=Ue(42710,D)|0}if(c[u>>2]|0){c[t>>2]=Fu(c[(c[v>>2]|0)+12>>2]|0,c[u>>2]|0,-1,(c[w>>2]|0)+8|0,0)|0;Kd(c[u>>2]|0);break}else{c[t>>2]=7;break}}else if((c[o>>2]|0)==1?(c[t>>2]=CM(c[w>>2]|0,(c[w>>2]|0)+8|0)|0,(c[t>>2]|0)==0):0)c[t>>2]=sI(c[(c[w>>2]|0)+8>>2]|0,1,c[p>>2]|0)|0;while(0);if(c[t>>2]|0){c[A>>2]=c[t>>2];D=c[A>>2]|0;l=E;return D|0}else{c[A>>2]=VJ(c[B>>2]|0)|0;D=c[A>>2]|0;l=E;return D|0}return 0}function VJ(d){d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=d;c[g>>2]=c[e>>2];if((b[(c[g>>2]|0)+4>>1]|0)!=1?b[(c[g>>2]|0)+4>>1]|0:0){c[f>>2]=bO(c[e>>2]|0)|0;g=c[f>>2]|0;l=h;return g|0}e=100!=(Hr(c[(c[g>>2]|0)+8>>2]|0)|0);d=c[g>>2]|0;if(e){a[d+6>>0]=1;c[f>>2]=Er(c[(c[g>>2]|0)+8>>2]|0)|0;g=c[f>>2]|0;l=h;return g|0}else{e=iI(c[d+8>>2]|0,0)|0;g=(c[g>>2]|0)+32|0;c[g>>2]=e;c[g+4>>2]=z;c[f>>2]=0;g=c[f>>2]|0;l=h;return g|0}return 0}function WJ(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[(c[b>>2]|0)+6>>0]|0|0}function XJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;m=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[m>>2]=a;c[e>>2]=b;c[f>>2]=d;c[g>>2]=0;c[h>>2]=c[m>>2];c[i>>2]=c[c[m>>2]>>2];if((c[f>>2]|0)==((c[(c[i>>2]|0)+24>>2]|0)+1|0)){m=(c[h>>2]|0)+32|0;gi(c[e>>2]|0,c[m>>2]|0,c[m+4>>2]|0);m=c[g>>2]|0;l=k;return m|0}if((c[f>>2]|0)==(c[(c[i>>2]|0)+24>>2]|0)){Ti(c[e>>2]|0,h,4,-1);m=c[g>>2]|0;l=k;return m|0}if((c[f>>2]|0)==((c[(c[i>>2]|0)+24>>2]|0)+2|0)?c[(c[h>>2]|0)+12>>2]|0:0){m=c[(c[h>>2]|0)+16>>2]|0;gi(c[e>>2]|0,m,((m|0)<0)<<31>>31);m=c[g>>2]|0;l=k;return m|0}c[g>>2]=qM(0,c[h>>2]|0)|0;if(c[g>>2]|0){m=c[g>>2]|0;l=k;return m|0}if((c[f>>2]|0)==((c[(c[i>>2]|0)+24>>2]|0)+2|0)){c[j>>2]=0;if(c[(c[i>>2]|0)+44>>2]|0)c[j>>2]=hI(c[(c[h>>2]|0)+8>>2]|0,(c[(c[i>>2]|0)+24>>2]|0)+1|0)|0;Ch(c[e>>2]|0,c[j>>2]|0);m=c[g>>2]|0;l=k;return m|0}else{m=dI(c[(c[h>>2]|0)+8>>2]|0)|0;if((m|0)<=((c[f>>2]|0)+1|0)){m=c[g>>2]|0;l=k;return m|0}m=c[e>>2]|0;Ei(m,jI(c[(c[h>>2]|0)+8>>2]|0,(c[f>>2]|0)+1|0)|0);m=c[g>>2]|0;l=k;return m|0}return 0}function YJ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;f=d+4|0;e=d;c[g>>2]=a;c[f>>2]=b;c[e>>2]=c[g>>2];e=(c[e>>2]|0)+32|0;a=c[e+4>>2]|0;b=c[f>>2]|0;c[b>>2]=c[e>>2];c[b+4>>2]=a;l=d;return 0}function ZJ(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;e=CN(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0)|0;l=f;return e|0}function _J(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];c[(c[d>>2]|0)+52>>2]=0;a=jK(c[d>>2]|0)|0;l=b;return a|0}function $J(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;g=l;l=l+32|0;h=g+20|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[h>>2]=a;c[g+16>>2]=64;c[b>>2]=c[h>>2];c[d>>2]=kK(c[b>>2]|0)|0;if(((((c[d>>2]|0)==0?(c[(c[b>>2]|0)+52>>2]|0)>>>0>4:0)?c[(c[b>>2]|0)+48>>2]|0:0)?(c[(c[b>>2]|0)+48>>2]|0)!=255:0)?(c[e>>2]=0,c[d>>2]=bN(c[b>>2]|0,e)|0,c[f>>2]=O(c[(c[b>>2]|0)+52>>2]|0,c[e>>2]|0)|0,c[f>>2]=(c[f>>2]|0)+((c[f>>2]|0)/2|0),(c[f>>2]|0)>64):0)c[d>>2]=cN(c[b>>2]|0,c[f>>2]|0,c[(c[b>>2]|0)+48>>2]|0)|0;wL(c[b>>2]|0);l=g;return c[d>>2]|0}function aK(a){a=a|0;var b=0;b=l;l=l+16|0;c[b>>2]=a;l=b;return 0}function bK(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];hK(c[d>>2]|0);l=b;return 0}function cK(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+64|0;j=m+60|0;h=m+48|0;k=m+44|0;i=m+8|0;g=m;c[m+56>>2]=a;c[m+52>>2]=b;c[h>>2]=d;c[k>>2]=e;c[m+40>>2]=f;c[i>>2]=c[1640];c[i+4>>2]=c[1641];c[i+8>>2]=c[1642];c[i+12>>2]=c[1643];c[i+16>>2]=c[1644];c[i+20>>2]=c[1645];c[i+24>>2]=c[1646];c[i+28>>2]=c[1647];c[g>>2]=0;while(1){if((c[g>>2]|0)>=4){a=6;break}f=(vQ(c[h>>2]|0,c[i+(c[g>>2]<<3)>>2]|0)|0)==0;b=c[g>>2]|0;if(f){a=4;break}c[g>>2]=b+1}if((a|0)==4){c[c[k>>2]>>2]=c[i+(b<<3)+4>>2];c[j>>2]=1;k=c[j>>2]|0;l=m;return k|0}else if((a|0)==6){c[j>>2]=0;k=c[j>>2]|0;l=m;return k|0}return 0}function dK(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+96|0;k=o+64|0;j=o+48|0;n=o+32|0;m=o+16|0;i=o;p=o+92|0;e=o+88|0;f=o+84|0;g=o+80|0;h=o+76|0;c[p>>2]=b;c[e>>2]=d;c[f>>2]=c[p>>2];c[g>>2]=c[(c[f>>2]|0)+12>>2];c[h>>2]=jK(c[f>>2]|0)|0;if(!(c[h>>2]|0))c[h>>2]=kK(c[f>>2]|0)|0;if(!(c[(c[f>>2]|0)+40>>2]|0)){p=c[g>>2]|0;b=c[(c[f>>2]|0)+20>>2]|0;d=c[e>>2]|0;c[i>>2]=c[(c[f>>2]|0)+16>>2];c[i+4>>2]=b;c[i+8>>2]=d;lK(h,p,39632,i)}if(a[(c[f>>2]|0)+230>>0]|0){p=c[g>>2]|0;d=c[(c[f>>2]|0)+20>>2]|0;i=c[e>>2]|0;c[m>>2]=c[(c[f>>2]|0)+16>>2];c[m+4>>2]=d;c[m+8>>2]=i;lK(h,p,39685,m)}if(a[(c[f>>2]|0)+229>>0]|0){p=c[g>>2]|0;i=c[(c[f>>2]|0)+20>>2]|0;m=c[e>>2]|0;c[n>>2]=c[(c[f>>2]|0)+16>>2];c[n+4>>2]=i;c[n+8>>2]=m;lK(h,p,39738,n)}p=c[g>>2]|0;n=c[(c[f>>2]|0)+20>>2]|0;m=c[e>>2]|0;c[j>>2]=c[(c[f>>2]|0)+16>>2];c[j+4>>2]=n;c[j+8>>2]=m;lK(h,p,39785,j);p=c[g>>2]|0;m=c[(c[f>>2]|0)+20>>2]|0;n=c[e>>2]|0;c[k>>2]=c[(c[f>>2]|0)+16>>2];c[k+4>>2]=m;c[k+8>>2]=n;lK(h,p,39839,k);l=o;return c[h>>2]|0}function eK(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;f=g;c[e>>2]=a;c[g+4>>2]=b;c[f>>2]=0;if(d[(c[e>>2]|0)+232>>0]|0|0){f=c[f>>2]|0;l=g;return f|0}c[f>>2]=$J(c[e>>2]|0)|0;f=c[f>>2]|0;l=g;return f|0}function fK(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 0}function gK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+8|0;e=d;c[f>>2]=a;c[d+4>>2]=b;c[e>>2]=c[f>>2];hK(c[e>>2]|0);l=d;return 0}function hK(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;b=h+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[b>>2]=a;c[d>>2]=0;while(1){a=c[b>>2]|0;if((c[d>>2]|0)>=(c[(c[b>>2]|0)+248>>2]|0))break;c[f>>2]=(c[a+252>>2]|0)+((c[d>>2]|0)*24|0)+4;c[e>>2]=c[(c[f>>2]|0)+8>>2];while(1){if(!(c[e>>2]|0))break;c[g>>2]=c[(c[e>>2]|0)+8>>2];iK(c[g>>2]|0);c[e>>2]=c[c[e>>2]>>2]}nJ(c[f>>2]|0);c[d>>2]=(c[d>>2]|0)+1}c[a+260>>2]=0;l=h;return}function iK(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Kd(c[d>>2]|0);l=b;return}function jK(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m;e=m+28|0;f=m+24|0;g=m+20|0;h=m+16|0;i=m+12|0;j=m+8|0;c[e>>2]=b;c[f>>2]=0;if((d[(c[e>>2]|0)+229>>0]|0|0)!=2){k=c[f>>2]|0;l=m;return k|0}c[g>>2]=42196;g=c[g>>2]|0;b=c[(c[e>>2]|0)+20>>2]|0;c[k>>2]=c[(c[e>>2]|0)+16>>2];c[k+4>>2]=b;c[h>>2]=Ue(g,k)|0;if(!(c[h>>2]|0)){c[f>>2]=7;k=c[f>>2]|0;l=m;return k|0}c[i>>2]=0;c[f>>2]=Fu(c[(c[e>>2]|0)+12>>2]|0,c[h>>2]|0,-1,i,0)|0;if((c[f>>2]|0)==0?(c[j>>2]=(Hr(c[i>>2]|0)|0)==100&1,c[f>>2]=Qq(c[i>>2]|0)|0,(c[f>>2]|0)==0):0)a[(c[e>>2]|0)+229>>0]=c[j>>2];Kd(c[h>>2]|0);k=c[f>>2]|0;l=m;return k|0}function kK(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=0;c[g>>2]=0;while(1){if(!(c[f>>2]|0))b=(c[g>>2]|0)<(c[(c[e>>2]|0)+248>>2]|0);else b=0;a=c[e>>2]|0;if(!b)break;b=mK(a,c[(c[e>>2]|0)+272>>2]|0,c[g>>2]|0,-1)|0;c[f>>2]=b;c[f>>2]=(c[f>>2]|0)==101?0:b;c[g>>2]=(c[g>>2]|0)+1}hK(a);if(c[f>>2]|0){h=c[f>>2]|0;l=i;return h|0}if(!(d[(c[e>>2]|0)+229>>0]|0)){h=c[f>>2]|0;l=i;return h|0}if((c[(c[e>>2]|0)+48>>2]|0)!=255){h=c[f>>2]|0;l=i;return h|0}if((c[(c[e>>2]|0)+52>>2]|0)>>>0<=0){h=c[f>>2]|0;l=i;return h|0}c[h>>2]=0;c[f>>2]=nK(c[e>>2]|0,22,h,0)|0;if(c[f>>2]|0){h=c[f>>2]|0;l=i;return h|0}oI(c[h>>2]|0,1,2)|0;c[f>>2]=Hr(c[h>>2]|0)|0;if((c[f>>2]|0)==100){g=hI(c[h>>2]|0,0)|0;c[(c[e>>2]|0)+48>>2]=g;if((c[(c[e>>2]|0)+48>>2]|0)==1)c[(c[e>>2]|0)+48>>2]=8}else if((c[f>>2]|0)==101)c[(c[e>>2]|0)+48>>2]=0;c[f>>2]=Er(c[h>>2]|0)|0;h=c[f>>2]|0;l=i;return h|0}function lK(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+48|0;f=k+32|0;g=k+28|0;h=k+24|0;i=k+8|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(c[c[f>>2]>>2]|0){l=k;return}c[i>>2]=e;c[j>>2]=af(c[h>>2]|0,i)|0;if(!(c[j>>2]|0)){c[c[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+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+12>>2]=1;e=h+12|0;c[e>>2]=c[e>>2]|(c[j>>2]|0?2:0);c[q>>2]=sK(c[m>>2]|0,i,h)|0;while(1){if(c[q>>2]|0)break;c[q>>2]=tK(c[m>>2]|0,i)|0;if((c[q>>2]|0)!=100)break;c[q>>2]=uK(c[m>>2]|0,g,1,c[i+40>>2]|0,c[i+44>>2]|0,c[i+48>>2]|0,c[i+52>>2]|0)|0}if(!(c[q>>2]|0)){if((c[p>>2]|0)!=-1){c[q>>2]=vK(c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[i>>2]|0,c[i+4>>2]|0)|0;if(!((c[q>>2]|0)==0&(c[g>>2]|0)!=0))break}else if(!(c[g>>2]|0))break;o=f;c[q>>2]=wK(c[m>>2]|0,c[g>>2]|0,c[o>>2]|0,c[o+4>>2]|0,c[r>>2]|0)|0;if(!(c[q>>2]|0)){if((c[p>>2]|0)!=-1?(p=f,n=c[p+4>>2]|0,r=k,o=c[r+4>>2]|0,!((n|0)<(o|0)|((n|0)==(o|0)?(c[p>>2]|0)>>>0<(c[r>>2]|0)>>>0:0))):0)break;p=f;r=(c[g>>2]|0)+56|0;c[q>>2]=xK(c[m>>2]|0,c[p>>2]|0,c[p+4>>2]|0,c[r>>2]|0,c[r+4>>2]|0)|0}}}}while(0);yK(c[g>>2]|0);zK(i);l=s;return c[q>>2]|0}function nK(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+240|0;p=t+24|0;o=t+16|0;g=t;k=t+228|0;m=t+224|0;r=t+220|0;n=t+216|0;f=t+56|0;s=t+48|0;q=t+44|0;h=t+40|0;i=t+36|0;j=t+32|0;c[k>>2]=a;c[m>>2]=b;c[r>>2]=d;c[n>>2]=e;MR(f|0,6400,160)|0;c[s>>2]=0;c[q>>2]=c[(c[k>>2]|0)+56+(c[m>>2]<<2)>>2];do if(!(c[q>>2]|0)){d=c[m>>2]|0;do if((c[m>>2]|0)!=18){a=c[f+(c[m>>2]<<2)>>2]|0;b=c[k>>2]|0;if((d|0)==7){c[o>>2]=c[b+216>>2];c[h>>2]=Ue(a,o)|0;break}else{o=c[(c[k>>2]|0)+20>>2]|0;c[p>>2]=c[b+16>>2];c[p+4>>2]=o;c[h>>2]=Ue(a,p)|0;break}}else{p=c[f+(d<<2)>>2]|0;f=c[(c[k>>2]|0)+20>>2]|0;o=c[(c[k>>2]|0)+220>>2]|0;c[g>>2]=c[(c[k>>2]|0)+16>>2];c[g+4>>2]=f;c[g+8>>2]=o;c[h>>2]=Ue(p,g)|0}while(0);if(c[h>>2]|0){c[s>>2]=Fu(c[(c[k>>2]|0)+12>>2]|0,c[h>>2]|0,-1,q,0)|0;Kd(c[h>>2]|0);c[(c[k>>2]|0)+56+(c[m>>2]<<2)>>2]=c[q>>2];break}else{c[s>>2]=7;break}}while(0);if(!(c[n>>2]|0)){q=c[q>>2]|0;r=c[r>>2]|0;c[r>>2]=q;s=c[s>>2]|0;l=t;return s|0}c[j>>2]=uI(c[q>>2]|0)|0;c[i>>2]=0;while(1){if(c[s>>2]|0){a=15;break}if((c[i>>2]|0)>=(c[j>>2]|0)){a=15;break}c[s>>2]=sI(c[q>>2]|0,(c[i>>2]|0)+1|0,c[(c[n>>2]|0)+(c[i>>2]<<2)>>2]|0)|0;c[i>>2]=(c[i>>2]|0)+1}if((a|0)==15){q=c[q>>2]|0;r=c[r>>2]|0;c[r>>2]=q;s=c[s>>2]|0;l=t;return s|0}return 0}function oK(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;t=u+32|0;k=u+28|0;m=u+24|0;n=u+20|0;o=u+16|0;p=u+12|0;q=u+8|0;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|0,e|0,((e|0)<0)<<31>>31|0)|0;e=RR(e|0,z|0,1024,0)|0;d=h;c[d>>2]=e;c[d+4>>2]=z;d=h;e=c[g>>2]|0;e=IR(c[d>>2]|0,c[d+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;l=f;return e|0}function rK(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;j=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;o=p+12|0;g=p+8|0;h=p+4|0;i=p;c[j>>2]=a;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[i>>2]=0;c[g>>2]=nK(c[j>>2]|0,8,h,0)|0;if(!(c[g>>2]|0)){e=c[h>>2]|0;f=qK(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;pI(e,1,f,z)|0;if(100==(Hr(c[h>>2]|0)|0))c[i>>2]=hI(c[h>>2]|0,0)|0;c[g>>2]=Er(c[h>>2]|0)|0}if(c[g>>2]|0){o=c[g>>2]|0;l=p;return o|0}if((c[i>>2]|0)>=16){c[g>>2]=mK(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;c[c[o>>2]>>2]=0;o=c[g>>2]|0;l=p;return o|0}else{c[c[o>>2]>>2]=c[i>>2];o=c[g>>2]|0;l=p;return o|0}return 0}function sK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;c[(c[g>>2]|0)+12>>2]=c[f>>2];d=fL(c[h>>2]|0,c[g>>2]|0,c[c[f>>2]>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0;l=e;return d|0}function tK(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,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1|0:0);if(((c[p>>2]|0)+(c[v>>2]|0)|0)>(c[(c[D>>2]|0)+20>>2]|0)){c[(c[D>>2]|0)+20>>2]=(c[p>>2]|0)+(c[v>>2]|0)<<1;c[y>>2]=Df(c[(c[D>>2]|0)+16>>2]|0,c[(c[D>>2]|0)+20>>2]|0)|0;if(!(c[y>>2]|0)){J=50;break a}c[(c[D>>2]|0)+16>>2]=c[y>>2]}b=(c[(c[D>>2]|0)+16>>2]|0)+(c[p>>2]|0)|0;if(c[g>>2]|0){c[A>>2]=b;L=x;c[B>>2]=WK(c[L>>2]|0,c[L+4>>2]|0,c[t>>2]|0,c[u>>2]|0,c[A>>2]|0)|0;if(!(c[B>>2]|0))break;b=w;e=c[b+4>>2]|0;L=r;c[L>>2]=c[b>>2];c[L+4>>2]=e;c[p>>2]=(c[p>>2]|0)+(c[B>>2]|0);break}else{e=x;b=IK(b,c[e>>2]|0,c[e+4>>2]|0)|0;c[p>>2]=(c[p>>2]|0)+b;b=w;e=c[b+4>>2]|0;L=r;c[L>>2]=c[b>>2];c[L+4>>2]=e;if(!(c[G>>2]|0))break;MR((c[(c[D>>2]|0)+16>>2]|0)+(c[p>>2]|0)|0,c[t>>2]|0,c[u>>2]|0)|0;c[p>>2]=(c[p>>2]|0)+(c[u>>2]|0);e=c[(c[D>>2]|0)+16>>2]|0;L=c[p>>2]|0;c[p>>2]=L+1;a[e+L>>0]=0;break}}while(0);RK(c[h>>2]|0,c[m>>2]|0,c[s>>2]|0,c[k>>2]|0)}if((c[p>>2]|0)>0){c[(c[D>>2]|0)+48>>2]=c[(c[D>>2]|0)+16>>2];c[(c[D>>2]|0)+52>>2]=c[p>>2];c[E>>2]=100}}c[(c[D>>2]|0)+8>>2]=c[m>>2];if(c[E>>2]|0){J=61;break}}if((J|0)==9){c[q>>2]=c[E>>2];L=c[q>>2]|0;l=K;return L|0}else if((J|0)==50){c[q>>2]=7;L=c[q>>2]|0;l=K;return L|0}else if((J|0)==61){c[q>>2]=c[E>>2];L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2]|0)+104>>2]|0){c[d>>2]=an(c[b>>2]|0)|0;f=c[d>>2]|0;l=g;return f|0}else{c[d>>2]=0;f=c[d>>2]|0;l=g;return f|0}a=c[b>>2]|0;if((c[(c[f>>2]|0)+156>>2]|0)>>>0>(c[(c[f>>2]|0)+160>>2]|0)>>>0){c[d>>2]=bn(a)|0;f=c[d>>2]|0;l=g;return f|0}else{c[d>>2]=cn(a)|0;f=c[d>>2]|0;l=g;return f|0}return 0}function Um(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+4>>2]|0}function Vm(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+8>>2]|0}function Wm(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=$m(c[(c[d>>2]|0)+4>>2]|0)|0;l=b;return a|0}function Xm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e+4|0;g=e;c[f>>2]=b;c[g>>2]=d;a[c[f>>2]>>0]=(c[g>>2]|0)>>>24;a[(c[f>>2]|0)+1>>0]=(c[g>>2]|0)>>>16;a[(c[f>>2]|0)+2>>0]=(c[g>>2]|0)>>>8;a[(c[f>>2]|0)+3>>0]=c[g>>2];l=e;return}function Ym(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}Zm(c[b>>2]|0);l=d;return}function Zm(a){a=a|0;var b=0,d=0,f=0;d=l;l=l+16|0;f=d+4|0;b=d;c[f>>2]=a;c[b>>2]=c[(c[f>>2]|0)+16>>2];a=c[f>>2]|0;if((e[(c[f>>2]|0)+24>>1]|0)&32|0){_m(a);f=c[b>>2]|0;Fm(f);l=d;return}else{tm(a);f=c[b>>2]|0;Fm(f);l=d;return}}function _m(a){a=a|0;var b=0,d=0,e=0,f=0;b=l;l=l+16|0;d=b+4|0;f=b;c[d>>2]=a;c[f>>2]=c[(c[d>>2]|0)+16>>2];e=(c[f>>2]|0)+128|0;c[e>>2]=(c[e>>2]|0)+-1;c[(c[d>>2]|0)+12>>2]=c[(c[f>>2]|0)+144>>2];c[(c[f>>2]|0)+144>>2]=c[d>>2];e=c[(c[f>>2]|0)+64>>2]|0;a=c[(c[f>>2]|0)+160>>2]|0;a=RR((c[(c[d>>2]|0)+20>>2]|0)-1|0,0,a|0,((a|0)<0)<<31>>31|0)|0;ym(e,a,z,c[(c[d>>2]|0)+4>>2]|0)|0;l=b;return}function $m(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+44>>2]|0}function an(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;if(on(c[d>>2]|0)|0){c[b>>2]=pn(c[d>>2]|0)|0;d=c[b>>2]|0;l=e;return d|0}else{c[b>>2]=0;d=c[b>>2]|0;l=e;return d|0}return 0}function bn(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;g=u+44|0;k=u+40|0;m=u+36|0;n=u+32|0;o=u+28|0;p=u+24|0;q=u+20|0;r=u+16|0;s=u+12|0;h=u+8|0;i=u+4|0;j=u;c[g>>2]=f;c[k>>2]=0;c[o>>2]=0;c[q>>2]=0;c[r>>2]=c[(c[g>>2]|0)+16>>2];c[s>>2]=((c[(c[r>>2]|0)+156>>2]|0)>>>0)/((c[(c[r>>2]|0)+160>>2]|0)>>>0)|0;f=(c[r>>2]|0)+21|0;a[f>>0]=d[f>>0]|0|4;c[n>>2]=((c[(c[g>>2]|0)+20>>2]|0)-1&~((c[s>>2]|0)-1))+1;c[m>>2]=c[(c[r>>2]|0)+28>>2];do if((c[(c[g>>2]|0)+20>>2]|0)>>>0<=(c[m>>2]|0)>>>0)if(((c[n>>2]|0)+(c[s>>2]|0)-1|0)>>>0>(c[m>>2]|0)>>>0){c[o>>2]=(c[m>>2]|0)+1-(c[n>>2]|0);break}else{c[o>>2]=c[s>>2];break}else c[o>>2]=(c[(c[g>>2]|0)+20>>2]|0)-(c[n>>2]|0)+1;while(0);c[p>>2]=0;while(1){if(!((c[p>>2]|0)<(c[o>>2]|0)?(c[k>>2]|0)==0:0))break;c[h>>2]=(c[n>>2]|0)+(c[p>>2]|0);if((c[h>>2]|0)!=(c[(c[g>>2]|0)+20>>2]|0)?mm(c[(c[r>>2]|0)+60>>2]|0,c[h>>2]|0)|0:0){s=pm(c[r>>2]|0,c[h>>2]|0)|0;c[i>>2]=s;if(s|0){if((e[(c[i>>2]|0)+24>>1]|0)&8|0)c[q>>2]=1;Zm(c[i>>2]|0)}}else t=10;if(((t|0)==10?(t=0,(c[h>>2]|0)!=(((c[481]|0)/(c[(c[r>>2]|0)+160>>2]|0)|0)+1|0)):0)?(c[k>>2]=rm(c[r>>2]|0,c[h>>2]|0,i,0)|0,(c[k>>2]|0)==0):0){c[k>>2]=cn(c[i>>2]|0)|0;if((e[(c[i>>2]|0)+24>>1]|0)&8|0)c[q>>2]=1;Zm(c[i>>2]|0)}c[p>>2]=(c[p>>2]|0)+1}if(!((c[k>>2]|0)==0&(c[q>>2]|0)!=0)){t=c[r>>2]|0;t=t+21|0;s=a[t>>0]|0;s=s&255;s=s&-5;s=s&255;a[t>>0]=s;t=c[k>>2]|0;l=u;return t|0}c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[o>>2]|0))break;c[j>>2]=pm(c[r>>2]|0,(c[n>>2]|0)+(c[p>>2]|0)|0)|0;if(c[j>>2]|0){t=(c[j>>2]|0)+24|0;b[t>>1]=e[t>>1]|0|8;Zm(c[j>>2]|0)}c[p>>2]=(c[p>>2]|0)+1}t=c[r>>2]|0;t=t+21|0;s=a[t>>0]|0;s=s&255;s=s&-5;s=s&255;a[t>>0]=s;t=c[k>>2]|0;l=u;return t|0}function cn(a){a=a|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[h>>2]=c[(c[g>>2]|0)+16>>2];c[i>>2]=0;if((d[(c[h>>2]|0)+17>>0]|0|0)==2?(c[i>>2]=dn(c[h>>2]|0)|0,c[i>>2]|0):0){c[f>>2]=c[i>>2];i=c[f>>2]|0;l=j;return i|0}sm(c[g>>2]|0);do if(c[(c[h>>2]|0)+60>>2]|0?(en(c[(c[h>>2]|0)+60>>2]|0,c[(c[g>>2]|0)+20>>2]|0)|0)==0:0){if((c[(c[g>>2]|0)+20>>2]|0)>>>0>(c[(c[h>>2]|0)+32>>2]|0)>>>0){if((d[(c[h>>2]|0)+17>>0]|0|0)==4)break;a=(c[g>>2]|0)+24|0;b[a>>1]=e[a>>1]|0|8;break}c[i>>2]=fn(c[g>>2]|0)|0;if(c[i>>2]|0){c[f>>2]=c[i>>2];i=c[f>>2]|0;l=j;return i|0}}while(0);a=(c[g>>2]|0)+24|0;b[a>>1]=e[a>>1]|0|4;if((c[(c[h>>2]|0)+104>>2]|0)>0)c[i>>2]=an(c[g>>2]|0)|0;if((c[(c[h>>2]|0)+28>>2]|0)>>>0<(c[(c[g>>2]|0)+20>>2]|0)>>>0)c[(c[h>>2]|0)+28>>2]=c[(c[g>>2]|0)+20>>2];c[f>>2]=c[i>>2];i=c[f>>2]|0;l=j;return i|0}function dn(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;h=k+20|0;i=k+16|0;j=k+12|0;e=k+8|0;f=k+4|0;g=k;c[i>>2]=b;c[j>>2]=0;c[e>>2]=c[c[i>>2]>>2];b=c[i>>2]|0;if(c[(c[i>>2]|0)+44>>2]|0){c[h>>2]=c[b+44>>2];j=c[h>>2]|0;l=k;return j|0}if((El(b)|0)==0?(d[(c[i>>2]|0)+5>>0]|0)!=2:0){b=hn(c[(c[i>>2]|0)+28>>2]|0)|0;c[(c[i>>2]|0)+60>>2]=b;if(!(c[(c[i>>2]|0)+60>>2]|0)){c[h>>2]=7;j=c[h>>2]|0;l=k;return j|0}do if(!(c[c[(c[i>>2]|0)+68>>2]>>2]|0)){if((d[(c[i>>2]|0)+5>>0]|0)==4){jn(c[(c[i>>2]|0)+68>>2]|0);break}c[f>>2]=6;b=c[f>>2]|0;if(a[(c[i>>2]|0)+13>>0]|0){c[f>>2]=b|4104;c[g>>2]=c[11]}else{c[f>>2]=b|2048;c[g>>2]=0}c[j>>2]=kn(c[i>>2]|0)|0;if(!(c[j>>2]|0))c[j>>2]=ln(c[e>>2]|0,c[(c[i>>2]|0)+180>>2]|0,c[(c[i>>2]|0)+68>>2]|0,c[f>>2]|0,c[g>>2]|0)|0}while(0);if(!(c[j>>2]|0)){c[(c[i>>2]|0)+48>>2]=0;g=(c[i>>2]|0)+80|0;c[g>>2]=0;c[g+4>>2]=0;a[(c[i>>2]|0)+20>>0]=0;g=(c[i>>2]|0)+88|0;c[g>>2]=0;c[g+4>>2]=0;c[j>>2]=mn(c[i>>2]|0)|0}}b=c[i>>2]|0;if(c[j>>2]|0){Al(c[b+60>>2]|0);c[(c[i>>2]|0)+60>>2]=0}else a[b+17>>0]=3;c[h>>2]=c[j>>2];j=c[h>>2]|0;l=k;return j|0}function en(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;i=k;c[f>>2]=a;c[g>>2]=b;c[g>>2]=(c[g>>2]|0)+-1;if((c[g>>2]|0)>>>0>=(c[c[f>>2]>>2]|0)>>>0){c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}while(1){if(!(c[(c[f>>2]|0)+8>>2]|0))break;c[h>>2]=((c[g>>2]|0)>>>0)/((c[(c[f>>2]|0)+8>>2]|0)>>>0)|0;c[g>>2]=((c[g>>2]|0)>>>0)%((c[(c[f>>2]|0)+8>>2]|0)>>>0)|0;c[f>>2]=c[(c[f>>2]|0)+12+(c[h>>2]<<2)>>2];if(!(c[f>>2]|0)){j=5;break}}if((j|0)==5){c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}if((c[c[f>>2]>>2]|0)>>>0<=4e3){c[e>>2]=((d[(c[f>>2]|0)+12+(((c[g>>2]|0)>>>0)/8|0)>>0]|0)&1<<(c[g>>2]&7)|0)!=0&1;j=c[e>>2]|0;l=k;return j|0}j=c[g>>2]|0;c[g>>2]=j+1;c[i>>2]=(j>>>0)%125|0;while(1){if(!(c[(c[f>>2]|0)+12+(c[i>>2]<<2)>>2]|0)){j=13;break}if((c[(c[f>>2]|0)+12+(c[i>>2]<<2)>>2]|0)==(c[g>>2]|0)){j=11;break}c[i>>2]=(((c[i>>2]|0)+1|0)>>>0)%125|0}if((j|0)==11){c[e>>2]=1;j=c[e>>2]|0;l=k;return j|0}else if((j|0)==13){c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}return 0}function fn(a){a=a|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;m=l;l=l+32|0;d=m+28|0;f=m+24|0;g=m+20|0;h=m+16|0;i=m+12|0;j=m+8|0;k=m;c[f>>2]=a;c[g>>2]=c[(c[f>>2]|0)+16>>2];o=(c[g>>2]|0)+80|0;n=c[o+4>>2]|0;a=k;c[a>>2]=c[o>>2];c[a+4>>2]=n;c[j>>2]=c[(c[f>>2]|0)+4>>2];c[i>>2]=nm(c[g>>2]|0,c[j>>2]|0)|0;a=(c[f>>2]|0)+24|0;b[a>>1]=e[a>>1]|0|8;a=k;c[h>>2]=gn(c[(c[g>>2]|0)+68>>2]|0,c[a>>2]|0,c[a+4>>2]|0,c[(c[f>>2]|0)+20>>2]|0)|0;if(c[h>>2]|0){c[d>>2]=c[h>>2];o=c[d>>2]|0;l=m;return o|0}a=c[(c[g>>2]|0)+68>>2]|0;j=c[j>>2]|0;n=c[(c[g>>2]|0)+160>>2]|0;o=k;o=IR(c[o>>2]|0,c[o+4>>2]|0,4,0)|0;c[h>>2]=Ol(a,j,n,o,z)|0;if(c[h>>2]|0){c[d>>2]=c[h>>2];o=c[d>>2]|0;l=m;return o|0}n=c[(c[g>>2]|0)+68>>2]|0;o=c[(c[g>>2]|0)+160>>2]|0;o=IR(c[k>>2]|0,c[k+4>>2]|0,o|0,((o|0)<0)<<31>>31|0)|0;o=IR(o|0,z|0,4,0)|0;c[h>>2]=gn(n,o,z,c[i>>2]|0)|0;if(c[h>>2]|0){c[d>>2]=c[h>>2];o=c[d>>2]|0;l=m;return o|0}else{n=8+(c[(c[g>>2]|0)+160>>2]|0)|0;o=(c[g>>2]|0)+80|0;k=o;n=IR(c[k>>2]|0,c[k+4>>2]|0,n|0,((n|0)<0)<<31>>31|0)|0;c[o>>2]=n;c[o+4>>2]=z;o=(c[g>>2]|0)+48|0;c[o>>2]=(c[o>>2]|0)+1;c[h>>2]=om(c[(c[g>>2]|0)+60>>2]|0,c[(c[f>>2]|0)+20>>2]|0)|0;o=Cm(c[g>>2]|0,c[(c[f>>2]|0)+20>>2]|0)|0;c[h>>2]=c[h>>2]|o;c[d>>2]=c[h>>2];o=c[d>>2]|0;l=m;return o|0}return 0}function gn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+32|0;h=f+12|0;i=f;j=f+8|0;g=f+16|0;c[h>>2]=a;a=i;c[a>>2]=b;c[a+4>>2]=d;c[j>>2]=e;Xm(g,c[j>>2]|0);e=i;e=Ol(c[h>>2]|0,g,4,c[e>>2]|0,c[e+4>>2]|0)|0;l=f;return e|0}function hn(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=Cg(512,0)|0;if(!(c[d>>2]|0)){d=c[d>>2]|0;l=e;return d|0}c[c[d>>2]>>2]=c[b>>2];d=c[d>>2]|0;l=e;return d|0}function jn(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;ln(0,0,c[d>>2]|0,0,-1)|0;l=b;return}function kn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=b;c[f>>2]=0;if(a[(c[e>>2]|0)+13>>0]|0){c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}if(!(c[(c[e>>2]|0)+28>>2]|0)){c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}c[g>>2]=Hl(c[(c[e>>2]|0)+64>>2]|0,20,f)|0;if((c[g>>2]|0)!=12){if((c[g>>2]|0)==0&(c[f>>2]|0)!=0)c[g>>2]=1032}else c[g>>2]=0;c[d>>2]=c[g>>2];g=c[d>>2]|0;l=h;return g|0}function ln(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;i=o+24|0;j=o+20|0;k=o+16|0;m=o+12|0;n=o+8|0;g=o+4|0;h=o;c[j>>2]=a;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;c[g>>2]=f;c[h>>2]=c[m>>2];a=c[h>>2]|0;b=a+72|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));if(!(c[g>>2]|0)){c[i>>2]=Zl(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0,0)|0;n=c[i>>2]|0;l=o;return n|0}else{m=(c[g>>2]|0)>0;c[(m?c[h>>2]|0:c[h>>2]|0)+4>>2]=m?c[g>>2]|0:1020;c[c[h>>2]>>2]=4028;c[(c[h>>2]|0)+8>>2]=c[g>>2];c[(c[h>>2]|0)+56>>2]=c[n>>2];c[(c[h>>2]|0)+64>>2]=c[k>>2];c[(c[h>>2]|0)+60>>2]=c[j>>2];c[i>>2]=0;n=c[i>>2]|0;l=o;return n|0}return 0}function mn(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+32|0;f=k+20|0;j=k+16|0;g=k+12|0;h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0;while(1){if((c[f>>2]|0)>=(c[(c[b>>2]|0)+104>>2]|0)){a=7;break}c[d>>2]=(c[(c[b>>2]|0)+100>>2]|0)+((c[f>>2]|0)*48|0);if((c[(c[d>>2]|0)+20>>2]|0)>>>0>=(c[e>>2]|0)>>>0?0==(en(c[(c[d>>2]|0)+16>>2]|0,c[e>>2]|0)|0):0){a=5;break}c[f>>2]=(c[f>>2]|0)+1}if((a|0)==5){c[g>>2]=1;i=c[g>>2]|0;l=h;return i|0}else if((a|0)==7){c[g>>2]=0;i=c[g>>2]|0;l=h;return i|0}return 0}function pn(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;b=j+24|0;e=j+20|0;f=j+16|0;g=j+12|0;h=j;i=j+8|0;c[b>>2]=a;c[e>>2]=0;c[f>>2]=c[(c[b>>2]|0)+16>>2];if(((d[(c[f>>2]|0)+5>>0]|0|0)!=2?(c[e>>2]=qn(c[f>>2]|0)|0,(c[e>>2]|0)==0):0)?(c[g>>2]=c[(c[b>>2]|0)+4>>2],k=4+(c[(c[f>>2]|0)+160>>2]|0)|0,k=RR(c[(c[f>>2]|0)+56>>2]|0,0,k|0,((k|0)<0)<<31>>31|0)|0,a=h,c[a>>2]=k,c[a+4>>2]=z,c[i>>2]=c[g>>2],g=h,c[e>>2]=gn(c[(c[f>>2]|0)+72>>2]|0,c[g>>2]|0,c[g+4>>2]|0,c[(c[b>>2]|0)+20>>2]|0)|0,(c[e>>2]|0)==0):0){a=c[(c[f>>2]|0)+72>>2]|0;g=c[i>>2]|0;i=c[(c[f>>2]|0)+160>>2]|0;k=h;k=IR(c[k>>2]|0,c[k+4>>2]|0,4,0)|0;c[e>>2]=Ol(a,g,i,k,z)|0}if(c[e>>2]|0){k=c[e>>2]|0;l=j;return k|0}k=(c[f>>2]|0)+56|0;c[k>>2]=(c[k>>2]|0)+1;c[e>>2]=Cm(c[f>>2]|0,c[(c[b>>2]|0)+20>>2]|0)|0;k=c[e>>2]|0;l=j;return k|0}function qn(a){a=a|0;var b=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;e=g+8|0;f=g;c[b>>2]=a;c[e>>2]=0;if(c[c[(c[b>>2]|0)+72>>2]>>2]|0){f=c[e>>2]|0;l=g;return f|0}c[g+4>>2]=8222;c[f>>2]=c[11];if(!((d[(c[b>>2]|0)+5>>0]|0|0)!=4?!(d[(c[b>>2]|0)+22>>0]|0|0):0))c[f>>2]=-1;c[e>>2]=ln(c[c[b>>2]>>2]|0,0,c[(c[b>>2]|0)+72>>2]|0,8222,c[f>>2]|0)|0;f=c[e>>2]|0;l=g;return f|0}function rn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;s=l;l=l+64|0;i=s+56|0;j=s+52|0;k=s+48|0;m=s+16|0;n=s+8|0;o=s+44|0;p=s+40|0;q=s+36|0;e=s+32|0;f=s+28|0;g=s+24|0;h=s;c[j>>2]=b;c[k>>2]=d;c[o>>2]=0;c[p>>2]=0;if(c[k>>2]|0?(c[p>>2]=hn(c[(c[k>>2]|0)+20>>2]|0)|0,(c[p>>2]|0)==0):0){c[i>>2]=7;r=c[i>>2]|0;l=s;return r|0}if(c[k>>2]|0)b=c[(c[k>>2]|0)+20>>2]|0;else b=c[(c[j>>2]|0)+32>>2]|0;c[(c[j>>2]|0)+28>>2]=b;a[(c[j>>2]|0)+19>>0]=a[(c[j>>2]|0)+13>>0]|0;if((c[k>>2]|0)==0?El(c[j>>2]|0)|0:0){c[i>>2]=sn(c[j>>2]|0)|0;r=c[i>>2]|0;l=s;return r|0}t=(c[j>>2]|0)+80|0;b=c[t+4>>2]|0;d=m;c[d>>2]=c[t>>2];c[d+4>>2]=b;a:do if(c[k>>2]|0?!(El(c[j>>2]|0)|0):0){t=(c[k>>2]|0)+8|0;if((c[t>>2]|0)!=0|(c[t+4>>2]|0)!=0){d=(c[k>>2]|0)+8|0;b=c[d>>2]|0;d=c[d+4>>2]|0}else{d=m;b=c[d>>2]|0;d=c[d+4>>2]|0}t=n;c[t>>2]=b;c[t+4>>2]=d;b=c[k>>2]|0;d=c[b+4>>2]|0;t=(c[j>>2]|0)+80|0;c[t>>2]=c[b>>2];c[t+4>>2]=d;while(1){if(c[o>>2]|0)break a;d=(c[j>>2]|0)+80|0;u=c[d+4>>2]|0;t=n;b=c[t+4>>2]|0;if(!((u|0)<(b|0)|((u|0)==(b|0)?(c[d>>2]|0)>>>0<(c[t>>2]|0)>>>0:0)))break a;c[o>>2]=dm(c[j>>2]|0,(c[j>>2]|0)+80|0,c[p>>2]|0,1,1)|0}}else r=19;while(0);if((r|0)==19){u=(c[j>>2]|0)+80|0;c[u>>2]=0;c[u+4>>2]=0}b:while(1){if(c[o>>2]|0)break;t=(c[j>>2]|0)+80|0;n=c[t+4>>2]|0;u=m;r=c[u+4>>2]|0;if(!((n|0)<(r|0)|((n|0)==(r|0)?(c[t>>2]|0)>>>0<(c[u>>2]|0)>>>0:0)))break;c[e>>2]=0;u=m;c[o>>2]=cm(c[j>>2]|0,0,c[u>>2]|0,c[u+4>>2]|0,e,f)|0;if((c[e>>2]|0)==0?(t=(c[j>>2]|0)+88|0,t=IR(c[t>>2]|0,c[t+4>>2]|0,c[(c[j>>2]|0)+156>>2]|0,0)|0,u=(c[j>>2]|0)+80|0,(t|0)==(c[u>>2]|0)?(z|0)==(c[u+4>>2]|0):0):0){u=m;t=(c[j>>2]|0)+80|0;t=FR(c[u>>2]|0,c[u+4>>2]|0,c[t>>2]|0,c[t+4>>2]|0)|0;u=(c[(c[j>>2]|0)+160>>2]|0)+8|0;u=LR(t|0,z|0,u|0,((u|0)<0)<<31>>31|0)|0;c[e>>2]=u}c[q>>2]=0;while(1){if(c[o>>2]|0)continue b;if((c[q>>2]|0)>>>0>=(c[e>>2]|0)>>>0)continue b;t=(c[j>>2]|0)+80|0;n=c[t+4>>2]|0;u=m;r=c[u+4>>2]|0;if(!((n|0)<(r|0)|((n|0)==(r|0)?(c[t>>2]|0)>>>0<(c[u>>2]|0)>>>0:0)))continue b;c[o>>2]=dm(c[j>>2]|0,(c[j>>2]|0)+80|0,c[p>>2]|0,1,1)|0;c[q>>2]=(c[q>>2]|0)+1}}c:do if(c[k>>2]|0){t=4+(c[(c[j>>2]|0)+160>>2]|0)|0;t=RR(c[(c[k>>2]|0)+24>>2]|0,0,t|0,((t|0)<0)<<31>>31|0)|0;u=h;c[u>>2]=t;c[u+4>>2]=z;if(El(c[j>>2]|0)|0)c[o>>2]=tn(c[(c[j>>2]|0)+216>>2]|0,(c[k>>2]|0)+28|0)|0;c[g>>2]=c[(c[k>>2]|0)+24>>2];while(1){if(c[o>>2]|0)break c;if((c[g>>2]|0)>>>0>=(c[(c[j>>2]|0)+56>>2]|0)>>>0)break c;c[o>>2]=dm(c[j>>2]|0,h,c[p>>2]|0,0,1)|0;c[g>>2]=(c[g>>2]|0)+1}}while(0);Al(c[p>>2]|0);if(!(c[o>>2]|0)){r=m;t=c[r+4>>2]|0;u=(c[j>>2]|0)+80|0;c[u>>2]=c[r>>2];c[u+4>>2]=t}c[i>>2]=c[o>>2];u=c[i>>2]|0;l=s;return u|0}function sn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[(c[b>>2]|0)+28>>2]=c[(c[b>>2]|0)+32>>2];c[d>>2]=wn(c[(c[b>>2]|0)+216>>2]|0,179,c[b>>2]|0)|0;c[e>>2]=xn(c[(c[b>>2]|0)+212>>2]|0)|0;while(1){if(!(c[e>>2]|0?(c[d>>2]|0)==0:0))break;c[f>>2]=c[(c[e>>2]|0)+12>>2];c[d>>2]=vn(c[b>>2]|0,c[(c[e>>2]|0)+20>>2]|0)|0;c[e>>2]=c[f>>2]}l=g;return c[d>>2]|0}function tn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;if((c[(c[e>>2]|0)+12>>2]|0)!=(c[(c[d>>2]|0)+112>>2]|0)){c[c[e>>2]>>2]=0;c[(c[e>>2]|0)+12>>2]=c[(c[d>>2]|0)+112>>2]}if((c[c[e>>2]>>2]|0)>>>0>=(c[(c[d>>2]|0)+52+16>>2]|0)>>>0){f=c[f>>2]|0;l=g;return f|0}c[(c[d>>2]|0)+52+16>>2]=c[c[e>>2]>>2];c[(c[d>>2]|0)+52+24>>2]=c[(c[e>>2]|0)+4>>2];c[(c[d>>2]|0)+52+24+4>>2]=c[(c[e>>2]|0)+8>>2];un(c[d>>2]|0);f=c[f>>2]|0;l=g;return f|0}function un(a){a=a|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+24|0;g=m+20|0;h=m+16|0;f=m+12|0;i=m+8|0;j=m+4|0;k=m;c[d>>2]=a;c[g>>2]=0;c[h>>2]=0;c[f>>2]=0;c[i>>2]=0;if(!(c[(c[d>>2]|0)+52+16>>2]|0)){l=m;return}a=c[d>>2]|0;Jm(a,Im(c[(c[d>>2]|0)+52+16>>2]|0)|0,g,h,f)|0;c[i>>2]=(c[(c[d>>2]|0)+52+16>>2]|0)-(c[f>>2]|0);c[k>>2]=0;while(1){a=c[g>>2]|0;if((c[k>>2]|0)>=8192)break;if((e[a+(c[k>>2]<<1)>>1]|0|0)>(c[i>>2]|0))b[(c[g>>2]|0)+(c[k>>2]<<1)>>1]=0;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=a-((c[h>>2]|0)+((c[i>>2]|0)+1<<2));GR((c[h>>2]|0)+((c[i>>2]|0)+1<<2)|0,0,c[j>>2]|0)|0;l=m;return}function vn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;j=h+20|0;i=h+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[j>>2]=a;c[i>>2]=b;c[d>>2]=0;c[e>>2]=c[j>>2];c[f>>2]=pm(c[e>>2]|0,c[i>>2]|0)|0;do if(c[f>>2]|0){if((Cn(c[f>>2]|0)|0)==1){Em(c[f>>2]|0);break}c[g>>2]=0;c[d>>2]=vm(c[(c[e>>2]|0)+216>>2]|0,c[(c[f>>2]|0)+20>>2]|0,g)|0;if(!(c[d>>2]|0))c[d>>2]=Dm(c[f>>2]|0,c[g>>2]|0)|0;if(!(c[d>>2]|0))qb[c[(c[e>>2]|0)+204>>2]&255](c[f>>2]|0);Zm(c[f>>2]|0)}while(0);Pk(c[(c[e>>2]|0)+96>>2]|0);l=h;return c[d>>2]|0}function wn(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;c[i>>2]=0;if(!(a[(c[f>>2]|0)+44>>0]|0)){k=c[i>>2]|0;l=m;return k|0}c[j>>2]=c[(c[f>>2]|0)+52+16>>2];b=(c[f>>2]|0)+52|0;d=An(c[f>>2]|0)|0;e=b+48|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(e|0));c[k>>2]=(c[(c[f>>2]|0)+52+16>>2]|0)+1;while(1){if(c[i>>2]|0)break;if((c[k>>2]|0)>>>0>(c[j>>2]|0)>>>0)break;b=c[g>>2]|0;d=c[h>>2]|0;e=Bn(c[f>>2]|0,c[k>>2]|0)|0;c[i>>2]=yb[b&255](d,e)|0;c[k>>2]=(c[k>>2]|0)+1}if((c[j>>2]|0)==(c[(c[f>>2]|0)+52+16>>2]|0)){k=c[i>>2]|0;l=m;return k|0}un(c[f>>2]|0);k=c[i>>2]|0;l=m;return k|0}function xn(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=c[c[b>>2]>>2];while(1){if(!(c[d>>2]|0))break;c[(c[d>>2]|0)+12>>2]=c[(c[d>>2]|0)+32>>2];c[d>>2]=c[(c[d>>2]|0)+32>>2]}d=yn(c[c[b>>2]>>2]|0)|0;l=e;return d|0}function yn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+144|0;d=i+136|0;f=i+8|0;g=i+4|0;h=i;c[d>>2]=a;a=f;b=a+128|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));while(1){if(!(c[d>>2]|0))break;c[g>>2]=c[d>>2];c[d>>2]=c[(c[g>>2]|0)+12>>2];c[(c[g>>2]|0)+12>>2]=0;c[h>>2]=0;while(1){if((c[h>>2]|0)>=31)break;if(!(c[f+(c[h>>2]<<2)>>2]|0)){e=6;break}c[g>>2]=zn(c[f+(c[h>>2]<<2)>>2]|0,c[g>>2]|0)|0;c[f+(c[h>>2]<<2)>>2]=0;c[h>>2]=(c[h>>2]|0)+1}if((e|0)==6){e=0;c[f+(c[h>>2]<<2)>>2]=c[g>>2]}if((c[h>>2]|0)!=31)continue;b=zn(c[f+(c[h>>2]<<2)>>2]|0,c[g>>2]|0)|0;c[f+(c[h>>2]<<2)>>2]=b}c[g>>2]=c[f>>2];c[h>>2]=1;while(1){if((c[h>>2]|0)>=32)break;if(c[f+(c[h>>2]<<2)>>2]|0){if(c[g>>2]|0)a=zn(c[g>>2]|0,c[f+(c[h>>2]<<2)>>2]|0)|0;else a=c[f+(c[h>>2]<<2)>>2]|0;c[g>>2]=a}c[h>>2]=(c[h>>2]|0)+1}l=i;return c[g>>2]|0}function zn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+64|0;d=h+52|0;e=h+48|0;f=h+8|0;g=h;c[d>>2]=a;c[e>>2]=b;c[g>>2]=f;while(1)if((c[(c[d>>2]|0)+20>>2]|0)>>>0<(c[(c[e>>2]|0)+20>>2]|0)>>>0){c[(c[g>>2]|0)+12>>2]=c[d>>2];c[g>>2]=c[d>>2];c[d>>2]=c[(c[d>>2]|0)+12>>2];if(!(c[d>>2]|0)){a=4;break}else continue}else{c[(c[g>>2]|0)+12>>2]=c[e>>2];c[g>>2]=c[e>>2];c[e>>2]=c[(c[e>>2]|0)+12>>2];if(!(c[e>>2]|0)){a=6;break}else continue}if((a|0)==4){e=c[e>>2]|0;g=c[g>>2]|0;g=g+12|0;c[g>>2]=e;g=f+12|0;g=c[g>>2]|0;l=h;return g|0}else if((a|0)==6){e=c[d>>2]|0;g=c[g>>2]|0;g=g+12|0;c[g>>2]=e;g=f+12|0;g=c[g>>2]|0;l=h;return g|0}return 0}function An(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[(c[b>>2]|0)+32>>2]>>2]|0}function Bn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+12|0;h=g+8|0;e=g+4|0;f=g;c[h>>2]=a;c[e>>2]=b;c[f>>2]=Im(c[e>>2]|0)|0;a=c[(c[h>>2]|0)+32>>2]|0;if(!(c[f>>2]|0)){c[d>>2]=c[(c[a>>2]|0)+(34+(c[e>>2]|0)-1<<2)>>2];h=c[d>>2]|0;l=g;return h|0}else{c[d>>2]=c[(c[a+(c[f>>2]<<2)>>2]|0)+(((((c[e>>2]|0)-1-4062|0)>>>0)%4096|0)<<2)>>2];h=c[d>>2]|0;l=g;return h|0}return 0}function Cn(a){a=a|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=a;l=e;return b[(c[d>>2]|0)+26>>1]|0}function Dn(a){a=a|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=a;Fl(c[d>>2]|0)|0;if((b[(c[d>>2]|0)+40>>1]|0)<0){l=e;return}Ml(c[d>>2]|0,3+(b[(c[d>>2]|0)+40>>1]|0)|0);b[(c[d>>2]|0)+40>>1]=-1;l=e;return}function En(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;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;return}function In(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;if((d[(c[e>>2]|0)+43>>0]|0|0)!=2){Jn(c[(c[e>>2]|0)+4>>2]|0,c[f>>2]|0)|0;l=h;return}c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[(c[e>>2]|0)+24>>2]|0))break;Kd(c[(c[(c[e>>2]|0)+32>>2]|0)+(c[g>>2]<<2)>>2]|0);c[(c[(c[e>>2]|0)+32>>2]|0)+(c[g>>2]<<2)>>2]=0;c[g>>2]=(c[g>>2]|0)+1}l=h;return}function Jn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=yb[c[(c[c[f>>2]>>2]|0)+64>>2]&255](c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function Kn(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;if(a[(c[g>>2]|0)+43>>0]|0){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}else{c[j>>2]=Nl(c[(c[g>>2]|0)+4>>2]|0,c[h>>2]|0,c[i>>2]|0,10)|0;c[f>>2]=c[j>>2];j=c[f>>2]|0;l=k;return j|0}return 0}function Ln(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[g>>2]=a;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;while(1){c[m>>2]=Kn(c[g>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;if(!((c[h>>2]|0)!=0&(c[m>>2]|0)==5)){a=4;break}if(!(tb[c[h>>2]&255](c[i>>2]|0)|0)){a=4;break}}if((a|0)==4){l=n;return c[m>>2]|0}return 0}function Mn(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[h>>2]=e;c[i>>2]=Mm(c[g>>2]|0,0,k)|0;if(c[i>>2]|0){c[f>>2]=c[i>>2];k=c[f>>2]|0;l=m;return k|0}if(c[k>>2]|0)b=_n(c[g>>2]|0,c[h>>2]|0)|0;else b=1;c[j>>2]=b;do if(c[j>>2]|0){b=c[g>>2]|0;if((d[(c[g>>2]|0)+46>>0]|0)&2|0){k=Ll(b,0)|0;c[i>>2]=k;if(k)break;Ml(c[g>>2]|0,0);c[i>>2]=264;break}e=Kn(b,0,1)|0;c[i>>2]=e;if(!e){a[(c[g>>2]|0)+44>>0]=1;k=Mm(c[g>>2]|0,0,k)|0;c[i>>2]=k;if(0==(k|0)?(c[j>>2]=_n(c[g>>2]|0,c[h>>2]|0)|0,c[j>>2]|0):0){c[i>>2]=$n(c[g>>2]|0)|0;c[c[h>>2]>>2]=1}a[(c[g>>2]|0)+44>>0]=0;Pl(c[g>>2]|0,0,1)}}while(0);if((c[j>>2]|0)==0?(c[(c[g>>2]|0)+52>>2]|0)!=3007e3:0)c[i>>2]=Pe(55897)|0;c[f>>2]=c[i>>2];k=c[f>>2]|0;l=m;return k|0}function Nn(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return ((e[(c[b>>2]|0)+52+14>>1]|0)&65024)+(((e[(c[b>>2]|0)+52+14>>1]|0)&1)<<16)|0}function On(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,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m>>2]|0,y=RR(c[(c[D>>2]|0)+52+20>>2]|0,0,y|0,((y|0)<0)<<31>>31|0)|0,G=A,c[G>>2]=y,c[G+4>>2]=z,G=A,c[k>>2]=wl(c[(c[D>>2]|0)+4>>2]|0,c[G>>2]|0,c[G+4>>2]|0)|0,(c[k>>2]|0)==0&(c[i>>2]|0)!=0):0)c[k>>2]=xl(c[(c[D>>2]|0)+4>>2]|0,c[i>>2]|0)|0;if(!(c[k>>2]|0))c[c[t>>2]>>2]=c[q>>2]}Pl(c[D>>2]|0,3,1)}if((c[k>>2]|0)==5){c[k>>2]=0;G=36}else G=36}else G=36;while(0);do if((G|0)==36?(c[k>>2]|0)==0&(c[E>>2]|0)!=0:0){if((c[c[t>>2]>>2]|0)>>>0<(c[(c[D>>2]|0)+52+16>>2]|0)>>>0){c[k>>2]=5;break}if((c[E>>2]|0)>=2?(Ze(4,B),c[k>>2]=Ln(c[D>>2]|0,c[F>>2]|0,c[h>>2]|0,4,4)|0,(c[k>>2]|0)==0):0){if((c[E>>2]|0)==3){Sn(c[D>>2]|0,c[B>>2]|0);c[k>>2]=wl(c[(c[D>>2]|0)+8>>2]|0,0,0)|0}Pl(c[D>>2]|0,4,4)}}while(0);Tn(c[n>>2]|0);c[C>>2]=c[k>>2];G=c[C>>2]|0;l=H;return G|0}function Pn(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[c[(c[b>>2]|0)+32>>2]>>2]|0)+96|0}function Qn(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;n=v+60|0;o=v+56|0;p=v+52|0;q=v+48|0;r=v+44|0;s=v+40|0;t=v+36|0;u=v+32|0;e=v+28|0;f=v+24|0;g=v+20|0;h=v+16|0;i=v+12|0;j=v+8|0;k=v+4|0;m=v;c[o>>2]=a;c[p>>2]=d;c[f>>2]=0;c[s>>2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0)+52+16>>2]=0;b=c[i>>2]|0;Xm(b,1+(el(c[i>>2]|0)|0)|0);c[(c[g>>2]|0)+52+32+4>>2]=c[h>>2];Un(c[g>>2]|0);c[c[d>>2]>>2]=0;c[(c[d>>2]|0)+32>>2]=0;c[(c[d>>2]|0)+4+4>>2]=0;c[e>>2]=2;while(1){if((c[e>>2]|0)>=5)break;c[(c[d>>2]|0)+4+(c[e>>2]<<2)>>2]=-1;c[e>>2]=(c[e>>2]|0)+1}l=f;return}function Tn(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Kd(c[d>>2]|0);l=b;return}function Un(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;f=h+8|0;g=h+4|0;c[f>>2]=b;c[g>>2]=An(c[f>>2]|0)|0;c[h>>2]=40;a[(c[f>>2]|0)+52+12>>0]=1;c[(c[f>>2]|0)+52>>2]=3007e3;Vn(1,(c[f>>2]|0)+52|0,40,0,(c[f>>2]|0)+52+40|0);b=(c[g>>2]|0)+48|0;d=(c[f>>2]|0)+52|0;e=b+48|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(e|0));Wn(c[f>>2]|0);b=c[g>>2]|0;d=(c[f>>2]|0)+52|0;e=b+48|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(e|0));l=h;return}function Vn(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;o=l;l=l+48|0;k=o+32|0;q=o+28|0;p=o+24|0;m=o+20|0;n=o+16|0;g=o+12|0;h=o+8|0;i=o+4|0;j=o;c[k>>2]=a;c[q>>2]=b;c[p>>2]=d;c[m>>2]=e;c[n>>2]=f;c[i>>2]=c[q>>2];c[j>>2]=(c[q>>2]|0)+(c[p>>2]|0);if(c[m>>2]|0){c[g>>2]=c[c[m>>2]>>2];c[h>>2]=c[(c[m>>2]|0)+4>>2]}else{c[h>>2]=0;c[g>>2]=0}if(c[k>>2]|0){do{q=c[i>>2]|0;c[i>>2]=q+4;c[g>>2]=(c[g>>2]|0)+((c[q>>2]|0)+(c[h>>2]|0));q=c[i>>2]|0;c[i>>2]=q+4;c[h>>2]=(c[h>>2]|0)+((c[q>>2]|0)+(c[g>>2]|0))}while((c[i>>2]|0)>>>0<(c[j>>2]|0)>>>0);q=c[g>>2]|0;p=c[n>>2]|0;c[p>>2]=q;p=c[h>>2]|0;q=c[n>>2]|0;q=q+4|0;c[q>>2]=p;l=o;return}else{do{c[g>>2]=(c[g>>2]|0)+(((c[c[i>>2]>>2]&255)<<24)+((c[c[i>>2]>>2]&65280)<<8)+((c[c[i>>2]>>2]&16711680)>>>8)+((c[c[i>>2]>>2]&-16777216)>>>24)+(c[h>>2]|0));c[h>>2]=(c[h>>2]|0)+(((c[(c[i>>2]|0)+4>>2]&255)<<24)+((c[(c[i>>2]|0)+4>>2]&65280)<<8)+((c[(c[i>>2]|0)+4>>2]&16711680)>>>8)+((c[(c[i>>2]|0)+4>>2]&-16777216)>>>24)+(c[g>>2]|0));c[i>>2]=(c[i>>2]|0)+8}while((c[i>>2]|0)>>>0<(c[j>>2]|0)>>>0);q=c[g>>2]|0;p=c[n>>2]|0;c[p>>2]=q;p=c[h>>2]|0;q=c[n>>2]|0;q=q+4|0;c[q>>2]=p;l=o;return}}function Wn(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if((d[(c[b>>2]|0)+43>>0]|0|0)==2){l=e;return}Xn(c[(c[b>>2]|0)+4>>2]|0);l=e;return}function Xn(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;qb[c[(c[c[d>>2]>>2]|0)+60>>2]&255](c[d>>2]|0);l=b;return}function Yn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;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0)<(g|0));Wn(c[i>>2]|0);b=n;f=(c[o>>2]|0)+48|0;g=b+48|0;do{a[b>>0]=a[f>>0]|0;b=b+1|0;f=f+1|0}while((b|0)<(g|0));if(wQ(m,n,48)|0){c[h>>2]=1;o=c[h>>2]|0;l=p;return o|0}if(!(d[m+12>>0]|0)){c[h>>2]=1;o=c[h>>2]|0;l=p;return o|0}Vn(1,m,40,0,k);if((c[k>>2]|0)==(c[m+40>>2]|0)?(c[k+4>>2]|0)==(c[m+40+4>>2]|0):0){if(wQ((c[i>>2]|0)+52|0,m,48)|0){c[c[j>>2]>>2]=1;b=(c[i>>2]|0)+52|0;f=m;g=b+48|0;do{c[b>>2]=c[f>>2];b=b+4|0;f=f+4|0}while((b|0)<(g|0));c[(c[i>>2]|0)+36>>2]=((e[(c[i>>2]|0)+52+14>>1]|0)&65024)+(((e[(c[i>>2]|0)+52+14>>1]|0)&1)<<16)}c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}c[h>>2]=1;o=c[h>>2]|0;l=p;return o|0}function $n(e){e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+144|0;D=E+16|0;g=E+96|0;s=E+92|0;v=E+88|0;w=E+8|0;x=E+80|0;y=E+76|0;A=E+72|0;B=E+104|0;C=E+68|0;h=E+64|0;i=E+60|0;j=E+56|0;k=E;m=E+52|0;n=E+48|0;o=E+44|0;p=E+40|0;q=E+36|0;r=E+32|0;t=E+28|0;u=E+24|0;c[s>>2]=e;c[x>>2]=0;c[x+4>>2]=0;c[y>>2]=1+(d[(c[s>>2]|0)+45>>0]|0);c[A>>2]=8-(c[y>>2]|0);c[v>>2]=Kn(c[s>>2]|0,c[y>>2]|0,c[A>>2]|0)|0;if(c[v>>2]|0){c[g>>2]=c[v>>2];D=c[g>>2]|0;l=E;return D|0}e=(c[s>>2]|0)+52|0;f=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(f|0));c[v>>2]=Ik(c[(c[s>>2]|0)+8>>2]|0,w)|0;a:do if(!(c[v>>2]|0)){f=w;e=c[f+4>>2]|0;do if((e|0)>0|(e|0)==0&(c[f>>2]|0)>>>0>32){c[C>>2]=0;c[v>>2]=km(c[(c[s>>2]|0)+8>>2]|0,B,32,0,0)|0;if(c[v>>2]|0)break a;c[n>>2]=el(B)|0;c[m>>2]=el(B+8|0)|0;if((((c[n>>2]&-2|0)==931071618?!(((c[m>>2]|0)>65536?1:(c[m>>2]&(c[m>>2]|0)-1|0)!=0)|(c[m>>2]|0)<512):0)?(a[(c[s>>2]|0)+52+13>>0]=c[n>>2]&1,c[(c[s>>2]|0)+36>>2]=c[m>>2],n=el(B+12|0)|0,c[(c[s>>2]|0)+112>>2]=n,n=(c[s>>2]|0)+52+32|0,f=B+16|0,a[n>>0]=a[f>>0]|0,a[n+1>>0]=a[f+1>>0]|0,a[n+2>>0]=a[f+2>>0]|0,a[n+3>>0]=a[f+3>>0]|0,a[n+4>>0]=a[f+4>>0]|0,a[n+5>>0]=a[f+5>>0]|0,a[n+6>>0]=a[f+6>>0]|0,a[n+7>>0]=a[f+7>>0]|0,Vn((d[(c[s>>2]|0)+52+13>>0]|0)==((a[936]|0)==0|0)&1,B,24,0,(c[s>>2]|0)+52+24|0),n=c[(c[s>>2]|0)+52+24>>2]|0,(n|0)==(el(B+24|0)|0)):0)?(n=c[(c[s>>2]|0)+52+24+4>>2]|0,(n|0)==(el(B+28|0)|0)):0){c[o>>2]=el(B+4|0)|0;if((c[o>>2]|0)!=3007e3){c[v>>2]=Pe(54951)|0;break}c[h>>2]=(c[m>>2]|0)+24;B=c[h>>2]|0;c[C>>2]=Ve(B,((B|0)<0)<<31>>31)|0;if(!(c[C>>2]|0)){c[v>>2]=7;break a}c[i>>2]=(c[C>>2]|0)+24;c[j>>2]=0;B=k;c[B>>2]=32;c[B+4>>2]=0;while(1){f=k;o=c[h>>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>2]|0)+52+20>>2]|0){C=c[(c[s>>2]|0)+108>>2]|0;c[D>>2]=c[(c[s>>2]|0)+52+16>>2];c[D+4>>2]=C;hd(283,21838,D)}}}while(0);Pl(c[s>>2]|0,c[y>>2]|0,c[A>>2]|0);c[g>>2]=c[v>>2];D=c[g>>2]|0;l=E;return D|0}function ao(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;n=s+32|0;o=s+28|0;p=s+24|0;q=s+20|0;r=s+16|0;i=s+12|0;j=s+8|0;k=s+4|0;m=s;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;c[r>>2]=g;c[i>>2]=h;c[k>>2]=(c[o>>2]|0)+52+24;if(wQ((c[o>>2]|0)+52+32|0,(c[i>>2]|0)+8|0,8)|0){c[n>>2]=0;r=c[n>>2]|0;l=s;return r|0}c[m>>2]=el(c[i>>2]|0)|0;if(!(c[m>>2]|0)){c[n>>2]=0;r=c[n>>2]|0;l=s;return r|0}c[j>>2]=(d[(c[o>>2]|0)+52+13>>0]|0)==((a[936]|0)==0|0)&1;Vn(c[j>>2]|0,c[i>>2]|0,8,c[k>>2]|0,c[k>>2]|0);Vn(c[j>>2]|0,c[r>>2]|0,c[(c[o>>2]|0)+36>>2]|0,c[k>>2]|0,c[k>>2]|0);r=c[c[k>>2]>>2]|0;if((r|0)==(el((c[i>>2]|0)+16|0)|0)?(r=c[(c[k>>2]|0)+4>>2]|0,(r|0)==(el((c[i>>2]|0)+20|0)|0)):0){c[c[p>>2]>>2]=c[m>>2];r=el((c[i>>2]|0)+4|0)|0;c[c[q>>2]>>2]=r;c[n>>2]=1;r=c[n>>2]|0;l=s;return r|0}c[n>>2]=0;r=c[n>>2]|0;l=s;return r|0}function bo(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;k=t+44|0;m=t+40|0;n=t+36|0;o=t+32|0;p=t+28|0;q=t+24|0;r=t+20|0;f=t+16|0;g=t+12|0;h=t+8|0;i=t+4|0;j=t;c[m>>2]=a;c[n>>2]=d;c[o>>2]=e;c[q>>2]=0;c[r>>2]=0;c[f>>2]=0;e=c[m>>2]|0;c[p>>2]=Jm(e,Im(c[n>>2]|0)|0,f,r,q)|0;do if(!(c[p>>2]|0)){c[h>>2]=(c[n>>2]|0)-(c[q>>2]|0);if((c[h>>2]|0)==1){c[j>>2]=(c[f>>2]|0)+16384-((c[r>>2]|0)+4);GR((c[r>>2]|0)+4|0,0,c[j>>2]|0)|0}if(c[(c[r>>2]|0)+(c[h>>2]<<2)>>2]|0)un(c[m>>2]|0);c[i>>2]=c[h>>2];c[g>>2]=Km(c[o>>2]|0)|0;while(1){if(!(b[(c[f>>2]|0)+(c[g>>2]<<1)>>1]|0)){s=11;break}q=c[i>>2]|0;c[i>>2]=q+-1;if(!q)break;c[g>>2]=Lm(c[g>>2]|0)|0}if((s|0)==11){c[(c[r>>2]|0)+(c[h>>2]<<2)>>2]=c[o>>2];b[(c[f>>2]|0)+(c[g>>2]<<1)>>1]=c[h>>2];break}c[k>>2]=um(54820)|0;s=c[k>>2]|0;l=t;return s|0}while(0);c[k>>2]=c[p>>2];s=c[k>>2]|0;l=t;return s|0}function co(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f+8|0;b=f+4|0;e=f;c[b>>2]=a;if((c[b>>2]|0?c[c[b>>2]>>2]|0:0)?(c[(c[b>>2]|0)+8>>2]|0)>=0:0){c[e>>2]=yb[c[c[b>>2]>>2]&255](c[(c[b>>2]|0)+4>>2]|0,c[(c[b>>2]|0)+8>>2]|0)|0;b=(c[b>>2]|0)+8|0;if(!(c[e>>2]|0))a=-1;else a=(c[b>>2]|0)+1|0;c[b>>2]=a;c[d>>2]=c[e>>2];e=c[d>>2]|0;l=f;return e|0}c[d>>2]=0;e=c[d>>2]|0;l=f;return e|0}function eo(){return 48}function fo(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if((c[(c[b>>2]|0)+4>>2]|0)<=72){b=72;l=d;return b|0}b=c[(c[b>>2]|0)+4>>2]|0;l=d;return b|0}function go(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){c[d>>2]=0;h=c[d>>2]|0;l=i;return h|0}c[h>>2]=(_c(c[f>>2]|0)|0)+1;b=c[h>>2]|0;c[g>>2]=md(c[e>>2]|0,b,((b|0)<0)<<31>>31)|0;if(c[g>>2]|0)MR(c[g>>2]|0,c[f>>2]|0,c[h>>2]|0)|0;c[d>>2]=c[g>>2];h=c[d>>2]|0;l=i;return h|0}function ho(a,b){a=a|0;b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;f=j+16|0;k=j+12|0;g=j+8|0;h=j+4|0;i=j;c[k>>2]=a;c[g>>2]=b;c[h>>2]=c[k>>2];c[i>>2]=0;if(c[(c[h>>2]|0)+44>>2]|0){c[f>>2]=0;k=c[f>>2]|0;l=j;return k|0}do if(d[(c[h>>2]|0)+21>>0]|0|0){if(((d[(c[h>>2]|0)+21>>0]|0)&3|0)==0?((e[(c[g>>2]|0)+24>>1]|0)&8|0)==0:0)break;c[f>>2]=0;k=c[f>>2]|0;l=j;return k|0}while(0);c[(c[g>>2]|0)+12>>2]=0;k=(El(c[h>>2]|0)|0)!=0;a=c[g>>2]|0;if(k){c[i>>2]=an(a)|0;if(!(c[i>>2]|0))c[i>>2]=jo(c[h>>2]|0,c[g>>2]|0,0,0)|0}else{if(!(!((e[a+24>>1]|0)&8|0)?(d[(c[h>>2]|0)+17>>0]|0|0)!=3:0))c[i>>2]=ko(c[h>>2]|0,1)|0;if(!(c[i>>2]|0))c[i>>2]=lo(c[h>>2]|0,c[g>>2]|0)|0}if(!(c[i>>2]|0))Sk(c[g>>2]|0);c[f>>2]=ol(c[h>>2]|0,c[i>>2]|0)|0;k=c[f>>2]|0;l=j;return k|0}function io(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;i=p+4|0;j=p;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[i>>2]=g;c[j>>2]=h;b=c[j>>2]|0;d=b+48|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(d|0));c[(c[j>>2]|0)+24>>2]=1;c[(c[j>>2]|0)+28>>2]=c[m>>2];a[(c[j>>2]|0)+32>>0]=c[n>>2];a[(c[j>>2]|0)+33>>0]=2;c[(c[j>>2]|0)+36>>2]=c[o>>2];c[(c[j>>2]|0)+40>>2]=c[i>>2];c[(c[j>>2]|0)+16>>2]=100;c[(c[j>>2]|0)+20>>2]=1;o=Lk(c[j>>2]|0,c[k>>2]|0)|0;l=p;return o|0}function jo(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;i=p+28|0;j=p+24|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;g=p+4|0;h=p;c[i>>2]=a;c[j>>2]=b;c[k>>2]=e;c[m>>2]=f;a:do if(c[m>>2]|0){c[h>>2]=j;c[o>>2]=0;c[g>>2]=c[j>>2];while(1){f=c[g>>2]|0;c[c[h>>2]>>2]=f;if(!f)break a;if((c[(c[g>>2]|0)+20>>2]|0)>>>0<=(c[k>>2]|0)>>>0){c[h>>2]=(c[g>>2]|0)+12;c[o>>2]=(c[o>>2]|0)+1}c[g>>2]=c[(c[g>>2]|0)+12>>2]}}else c[o>>2]=1;while(0);f=(c[i>>2]|0)+192+8|0;c[f>>2]=(c[f>>2]|0)+(c[o>>2]|0);if((c[(c[j>>2]|0)+20>>2]|0)==1)no(c[j>>2]|0);c[n>>2]=so(c[(c[i>>2]|0)+216>>2]|0,c[(c[i>>2]|0)+160>>2]|0,c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,d[(c[i>>2]|0)+11>>0]|0)|0;if(c[n>>2]|0){o=c[n>>2]|0;l=p;return o|0}if(!(c[(c[i>>2]|0)+96>>2]|0)){o=c[n>>2]|0;l=p;return o|0}c[g>>2]=c[j>>2];while(1){if(!(c[g>>2]|0))break;qm(c[(c[i>>2]|0)+96>>2]|0,c[(c[g>>2]|0)+20>>2]|0,c[(c[g>>2]|0)+4>>2]|0);c[g>>2]=c[(c[g>>2]|0)+12>>2]}o=c[n>>2]|0;l=p;return o|0}function ko(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;f=o+24|0;g=o+20|0;h=o+16|0;i=o+12|0;j=o+8|0;k=o;m=o+40|0;n=o+28|0;c[g>>2]=b;c[h>>2]=e;c[i>>2]=oo(c[g>>2]|0)|0;if(c[i>>2]|0){c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}do if(!(a[(c[g>>2]|0)+7>>0]|0)){if(c[c[(c[g>>2]|0)+68>>2]>>2]|0?(d[(c[g>>2]|0)+5>>0]|0)!=4:0){c[j>>2]=hm(c[(c[g>>2]|0)+64>>2]|0)|0;if(!(c[j>>2]&512)){a[n>>0]=a[21804]|0;a[n+1>>0]=a[21805]|0;a[n+2>>0]=a[21806]|0;a[n+3>>0]=a[21807]|0;a[n+4>>0]=a[21808]|0;a[n+5>>0]=a[21809]|0;a[n+6>>0]=a[21810]|0;a[n+7>>0]=a[21811]|0;Xm(n+8|0,c[(c[g>>2]|0)+48>>2]|0);b=nn(c[g>>2]|0)|0;e=k;c[e>>2]=b;c[e+4>>2]=z;e=k;c[i>>2]=km(c[(c[g>>2]|0)+68>>2]|0,m,8,c[e>>2]|0,c[e+4>>2]|0)|0;if((c[i>>2]|0)==0?0==(wQ(m,21804,8)|0):0){m=k;c[i>>2]=Ol(c[(c[g>>2]|0)+68>>2]|0,47924,1,c[m>>2]|0,c[m+4>>2]|0)|0}if((c[i>>2]|0)!=0&(c[i>>2]|0)!=522){c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}if((d[(c[g>>2]|0)+8>>0]|0?0==(c[j>>2]&1024|0):0)?(c[i>>2]=xl(c[(c[g>>2]|0)+68>>2]|0,d[(c[g>>2]|0)+12>>0]|0)|0,c[i>>2]|0):0){c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}m=(c[g>>2]|0)+88|0;c[i>>2]=Ol(c[(c[g>>2]|0)+68>>2]|0,n,12,c[m>>2]|0,c[m+4>>2]|0)|0;if(c[i>>2]|0){c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}}if(0==(c[j>>2]&1024|0)?(c[i>>2]=xl(c[(c[g>>2]|0)+68>>2]|0,d[(c[g>>2]|0)+12>>0]|((d[(c[g>>2]|0)+12>>0]|0)==3?16:0))|0,c[i>>2]|0):0){c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}k=(c[g>>2]|0)+80|0;m=c[k+4>>2]|0;n=(c[g>>2]|0)+88|0;c[n>>2]=c[k>>2];c[n+4>>2]=m;if(!(c[h>>2]|0))break;if(c[j>>2]&512)break;c[(c[g>>2]|0)+48>>2]=0;c[i>>2]=mn(c[g>>2]|0)|0;if(!(c[i>>2]|0))break;c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}k=(c[g>>2]|0)+80|0;m=c[k+4>>2]|0;n=(c[g>>2]|0)+88|0;c[n>>2]=c[k>>2];c[n+4>>2]=m}while(0);po(c[(c[g>>2]|0)+212>>2]|0);a[(c[g>>2]|0)+17>>0]=4;c[f>>2]=0;n=c[f>>2]|0;l=o;return n|0}function lo(b,d){b=b|0;d=d|0;var f=0,g=0,h=0,i=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d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(f|0))}if((c[j>>2]|0)>>>0>(c[(c[g>>2]|0)+36>>2]|0)>>>0)c[(c[g>>2]|0)+36>>2]=c[j>>2];f=(c[g>>2]|0)+192+8|0;c[f>>2]=(c[f>>2]|0)+1;qm(c[(c[g>>2]|0)+96>>2]|0,c[j>>2]|0,c[(c[h>>2]|0)+4>>2]|0)}c[h>>2]=c[(c[h>>2]|0)+12>>2]}l=n;return c[i>>2]|0}function mo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+16|0;i=f+12|0;h=f+8|0;g=f+4|0;e=f;c[i>>2]=a;c[h>>2]=b;c[g>>2]=d;c[g>>2]=c[g>>2]|30;c[e>>2]=Zl(c[c[i>>2]>>2]|0,0,c[h>>2]|0,c[g>>2]|0,0)|0;l=f;return c[e>>2]|0}function no(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=(el((c[(c[d>>2]|0)+16>>2]|0)+112|0)|0)+1;Xm((c[(c[d>>2]|0)+4>>2]|0)+24|0,c[e>>2]|0);Xm((c[(c[d>>2]|0)+4>>2]|0)+92|0,c[e>>2]|0);Xm((c[(c[d>>2]|0)+4>>2]|0)+96|0,3015001);l=b;return}function oo(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+44>>2];if((c[d>>2]|0)==0?0==(El(c[b>>2]|0)|0):0)c[d>>2]=qo(c[b>>2]|0,4)|0;l=e;return c[d>>2]|0}function po(a){a=a|0;var d=0,f=0,g=0;g=l;l=l+16|0;d=g+4|0;f=g;c[d>>2]=a;c[f>>2]=c[c[d>>2]>>2];while(1){if(!(c[f>>2]|0))break;a=(c[f>>2]|0)+24|0;b[a>>1]=(e[a>>1]|0)&-9;c[f>>2]=c[(c[f>>2]|0)+32>>2]}c[(c[d>>2]|0)+8>>2]=c[(c[d>>2]|0)+4>>2];l=g;return}function qo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;while(1){c[f>>2]=ro(c[d>>2]|0,c[e>>2]|0)|0;if((c[f>>2]|0)!=5){a=4;break}if(!(tb[c[(c[d>>2]|0)+184>>2]&255](c[(c[d>>2]|0)+188>>2]|0)|0)){a=4;break}}if((a|0)==4){l=g;return c[f>>2]|0}return 0}function ro(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;if((d[(c[f>>2]|0)+18>>0]|0|0)>=(c[g>>2]|0)?(d[(c[f>>2]|0)+18>>0]|0|0)!=5:0){h=c[h>>2]|0;l=i;return h|0}if(d[(c[f>>2]|0)+14>>0]|0|0)b=0;else b=En(c[(c[f>>2]|0)+64>>2]|0,c[g>>2]|0)|0;c[h>>2]=b;if(c[h>>2]|0){h=c[h>>2]|0;l=i;return h|0}if(!((c[g>>2]|0)==4?1:(d[(c[f>>2]|0)+18>>0]|0|0)!=5)){h=c[h>>2]|0;l=i;return h|0}a[(c[f>>2]|0)+18>>0]=c[g>>2];h=c[h>>2]|0;l=i;return h|0}function so(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=l;l=l+176|0;J=N+136|0;K=N+132|0;L=N+128|0;M=N+124|0;u=N+120|0;v=N+116|0;w=N+112|0;x=N+108|0;y=N+104|0;A=N+100|0;B=N+96|0;C=N+92|0;D=N+88|0;E=N+40|0;F=N+16|0;p=N+84|0;m=N+80|0;n=N+144|0;o=N+72|0;q=N+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>2]=(c[C>>2]|0)+-1;c[x>>2]=bo(c[K>>2]|0,c[y>>2]|0,c[(c[B>>2]|0)+20>>2]|0)|0}if(!(c[x>>2]|0)){b[(c[K>>2]|0)+52+14>>1]=c[L>>2]&65280|c[L>>2]>>16;c[(c[K>>2]|0)+52+16>>2]=c[y>>2];if(c[v>>2]|0){M=(c[K>>2]|0)+52+8|0;c[M>>2]=(c[M>>2]|0)+1;c[(c[K>>2]|0)+52+20>>2]=c[u>>2]}if(c[v>>2]|0){Un(c[K>>2]|0);c[(c[K>>2]|0)+12>>2]=c[y>>2]}}c[J>>2]=c[x>>2];M=c[J>>2]|0;l=N;return M|0}return 0}function to(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[e>>2]=a;c[f>>2]=0;if(!(b[(c[e>>2]|0)+40>>1]|0)){c[h>>2]=Pn(c[e>>2]|0)|0;do if((c[c[h>>2]>>2]|0)>>>0>0){Ze(4,i);c[f>>2]=Kn(c[e>>2]|0,4,4)|0;if(!(c[f>>2]|0)){Sn(c[e>>2]|0,c[i>>2]|0);Pl(c[e>>2]|0,4,4);break}if((c[f>>2]|0)!=5){c[d>>2]=c[f>>2];j=c[d>>2]|0;l=k;return j|0}}while(0);Ml(c[e>>2]|0,3);b[(c[e>>2]|0)+40>>1]=-1;c[g>>2]=0;do{h=c[e>>2]|0;i=(c[g>>2]|0)+1|0;c[g>>2]=i;c[f>>2]=yo(h,j,1,i)|0}while((c[f>>2]|0)==-1)}c[d>>2]=c[f>>2];j=c[d>>2]|0;l=k;return j|0}function uo(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;m=l;l=l+64|0;i=m+28|0;j=m+24|0;p=m+20|0;o=m+16|0;k=m;g=m+12|0;h=m+8|0;n=m+32|0;c[j>>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>>2]|0)==5)c[k>>2]=261}while(0);if(c[k>>2]|0){c[v>>2]=c[k>>2];v=c[v>>2]|0;l=w;return v|0}}c[t>>2]=Pn(c[p>>2]|0)|0;do if((c[r>>2]|0)==0?(c[c[t>>2]>>2]|0)==(c[(c[p>>2]|0)+52+16>>2]|0):0){c[k>>2]=Ll(c[p>>2]|0,3)|0;Wn(c[p>>2]|0);if(c[k>>2]|0){if((c[k>>2]|0)==5)break;c[v>>2]=c[k>>2];v=c[v>>2]|0;l=w;return v|0}u=An(c[p>>2]|0)|0;u=(wQ(u,(c[p>>2]|0)+52|0,48)|0)!=0;a=c[p>>2]|0;if(u){Ml(a,3);c[v>>2]=-1;v=c[v>>2]|0;l=w;return v|0}else{b[a+40>>1]=0;c[v>>2]=0;v=c[v>>2]|0;l=w;return v|0}}while(0);c[h>>2]=0;c[i>>2]=0;c[m>>2]=c[(c[p>>2]|0)+52+16>>2];c[j>>2]=1;while(1){if((c[j>>2]|0)>=5)break;c[o>>2]=c[(c[t>>2]|0)+4+(c[j>>2]<<2)>>2];if((c[h>>2]|0)>>>0<=(c[o>>2]|0)>>>0?(c[o>>2]|0)>>>0<=(c[m>>2]|0)>>>0:0){c[h>>2]=c[o>>2];c[i>>2]=c[j>>2]}c[j>>2]=(c[j>>2]|0)+1}a:do if(((d[(c[p>>2]|0)+46>>0]|0)&2|0)==0?((c[i>>2]|0)==0?1:(c[h>>2]|0)>>>0<(c[m>>2]|0)>>>0):0){c[j>>2]=1;while(1){if((c[j>>2]|0)>=5)break a;c[k>>2]=Kn(c[p>>2]|0,3+(c[j>>2]|0)|0,1)|0;if(!(c[k>>2]|0)){u=36;break}if((c[k>>2]|0)!=5)break;c[j>>2]=(c[j>>2]|0)+1}if((u|0)==36){u=c[m>>2]|0;c[(c[t>>2]|0)+4+(c[j>>2]<<2)>>2]=u;c[h>>2]=u;c[i>>2]=c[j>>2];Pl(c[p>>2]|0,3+(c[j>>2]|0)|0,1);break}c[v>>2]=c[k>>2];v=c[v>>2]|0;l=w;return v|0}while(0);if(!(c[i>>2]|0)){c[v>>2]=(c[k>>2]|0)==5?-1:520;v=c[v>>2]|0;l=w;return v|0}c[k>>2]=Ll(c[p>>2]|0,3+(c[i>>2]|0)|0)|0;if(c[k>>2]|0){c[v>>2]=(c[k>>2]|0)==5?-1:c[k>>2]|0;v=c[v>>2]|0;l=w;return v|0}c[(c[p>>2]|0)+100>>2]=(c[c[t>>2]>>2]|0)+1;Wn(c[p>>2]|0);if((c[(c[t>>2]|0)+4+(c[i>>2]<<2)>>2]|0)==(c[h>>2]|0)?(u=An(c[p>>2]|0)|0,(wQ(u,(c[p>>2]|0)+52|0,48)|0)==0):0){b[(c[p>>2]|0)+40>>1]=c[i>>2];c[v>>2]=c[k>>2];v=c[v>>2]|0;l=w;return v|0}Ml(c[p>>2]|0,3+(c[i>>2]|0)|0);c[v>>2]=-1;v=c[v>>2]|0;l=w;return v|0}function zo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=yb[c[(c[f>>2]|0)+60>>2]&255](c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function Ao(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Cn(c[d>>2]|0)|0;l=b;return a|0}function Bo(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+64|0;k=x+40|0;r=x+36|0;s=x+50|0;t=x+52|0;u=x+32|0;i=x+28|0;v=x+24|0;j=x+48|0;w=x+20|0;m=x+16|0;n=x+12|0;o=x+8|0;g=x+4|0;h=x;p=x+46|0;q=x+44|0;c[r>>2]=f;do if(!(a[c[r>>2]>>0]|0)){c[i>>2]=c[(c[r>>2]|0)+52>>2];a[t>>0]=a[(c[r>>2]|0)+5>>0]|0;c[u>>2]=c[(c[r>>2]|0)+56>>2];if(Co(c[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e[s>>1]|0)>(c[o>>2]|0)){f=13;break}c[h>>2]=(yb[c[(c[r>>2]|0)+76>>2]&255](c[r>>2]|0,(c[u>>2]|0)+(e[s>>1]|0)|0)|0)&65535;if(((e[s>>1]|0)+(c[h>>2]|0)|0)>(c[v>>2]|0)){f=15;break}c[g>>2]=(c[g>>2]|0)+1}if((f|0)==13){c[k>>2]=um(60052)|0;w=c[k>>2]|0;l=x;return w|0}else if((f|0)==15){c[k>>2]=um(60057)|0;w=c[k>>2]|0;l=x;return w|0}else if((f|0)==17){if(a[(c[r>>2]|0)+4>>0]|0)break;c[o>>2]=(c[o>>2]|0)+1;break}}while(0);b[s>>1]=d[(c[u>>2]|0)+((d[t>>0]|0)+1)>>0]<<8|d[(c[u>>2]|0)+((d[t>>0]|0)+1)+1>>0];c[w>>2]=(d[(c[u>>2]|0)+((d[t>>0]|0)+7)>>0]|0)+(c[m>>2]|0);while(1){if((e[s>>1]|0)<=0){f=29;break}if((e[s>>1]|0)<(c[n>>2]|0)){f=23;break}if((e[s>>1]|0)>(c[o>>2]|0)){f=23;break}b[p>>1]=d[(c[u>>2]|0)+(e[s>>1]|0)>>0]<<8|d[(c[u>>2]|0)+(e[s>>1]|0)+1>>0];b[q>>1]=d[(c[u>>2]|0)+((e[s>>1]|0)+2)>>0]<<8|d[(c[u>>2]|0)+((e[s>>1]|0)+2)+1>>0];if((e[p>>1]|0)>0?(e[p>>1]|0)<=((e[s>>1]|0)+(e[q>>1]|0)+3|0):0){f=27;break}if(((e[s>>1]|0)+(e[q>>1]|0)|0)>(c[v>>2]|0)){f=27;break}c[w>>2]=(c[w>>2]|0)+(e[q>>1]|0);b[s>>1]=b[p>>1]|0}if((f|0)==23){c[k>>2]=um(60077)|0;w=c[k>>2]|0;l=x;return w|0}else if((f|0)==27){c[k>>2]=um(60084)|0;w=c[k>>2]|0;l=x;return w|0}else if((f|0)==29){if((c[w>>2]|0)<=(c[v>>2]|0)){b[(c[r>>2]|0)+16>>1]=(c[w>>2]|0)-(c[n>>2]|0);a[c[r>>2]>>0]=1;break}c[k>>2]=um(60098)|0;w=c[k>>2]|0;l=x;return w|0}}while(0);c[k>>2]=0;w=c[k>>2]|0;l=x;return w|0}function Co(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;h=k+12|0;i=k+8|0;g=k+4|0;j=k;c[i>>2]=e;c[g>>2]=f;a[(c[i>>2]|0)+4>>0]=c[g>>2]>>3;c[g>>2]=c[g>>2]&-9;a[(c[i>>2]|0)+6>>0]=4-(d[(c[i>>2]|0)+4>>0]<<2);c[(c[i>>2]|0)+76>>2]=180;c[j>>2]=c[(c[i>>2]|0)+52>>2];do if((c[g>>2]|0)==5){a[(c[i>>2]|0)+2>>0]=1;e=(c[i>>2]|0)+3|0;if(a[(c[i>>2]|0)+4>>0]|0){a[e>>0]=1;e=c[i>>2]|0;f=225}else{a[e>>0]=0;c[(c[i>>2]|0)+76>>2]=181;e=c[i>>2]|0;f=226}c[e+80>>2]=f;b[(c[i>>2]|0)+10>>1]=b[(c[j>>2]|0)+28>>1]|0;e=b[(c[j>>2]|0)+30>>1]|0;f=c[i>>2]|0}else{if((c[g>>2]|0)==2){a[(c[i>>2]|0)+2>>0]=0;a[(c[i>>2]|0)+3>>0]=0;c[(c[i>>2]|0)+80>>2]=224;b[(c[i>>2]|0)+10>>1]=b[(c[j>>2]|0)+24>>1]|0;e=b[(c[j>>2]|0)+26>>1]|0;f=c[i>>2]|0;break}c[h>>2]=um(59964)|0;j=c[h>>2]|0;l=k;return j|0}while(0);b[f+12>>1]=e;a[(c[i>>2]|0)+7>>0]=a[(c[j>>2]|0)+21>>0]|0;c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}function Do(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[g>>2]=b;c[h>>2]=f;c[i>>2]=(c[h>>2]|0)+(d[(c[g>>2]|0)+6>>0]|0);c[k>>2]=d[c[i>>2]>>0];a:do if((c[k>>2]|0)>>>0>=128){c[j>>2]=(c[i>>2]|0)+8;c[k>>2]=c[k>>2]&127;do{b=c[k>>2]<<7;f=(c[i>>2]|0)+1|0;c[i>>2]=f;c[k>>2]=b|d[f>>0]&127;if((d[c[i>>2]>>0]|0)<128)break a}while((c[i>>2]|0)>>>0<(c[j>>2]|0)>>>0)}while(0);c[i>>2]=(c[i>>2]|0)+1;b:do if(a[(c[g>>2]|0)+2>>0]|0){c[j>>2]=(c[i>>2]|0)+9;do{f=c[i>>2]|0;c[i>>2]=f+1;if(!(d[f>>0]&128))break b}while((c[i>>2]|0)>>>0<(c[j>>2]|0)>>>0)}while(0);if((c[k>>2]|0)>>>0<=(e[(c[g>>2]|0)+10>>1]|0)>>>0){m=(c[k>>2]|0)+((c[i>>2]|0)-(c[h>>2]|0))|0;c[k>>2]=m;c[k>>2]=(c[k>>2]|0)>>>0<4?4:m;m=c[k>>2]|0;m=m&65535;l=n;return m|0}c[m>>2]=e[(c[g>>2]|0)+12>>1];c[k>>2]=(c[m>>2]|0)+((((c[k>>2]|0)-(c[m>>2]|0)|0)>>>0)%(((c[(c[(c[g>>2]|0)+52>>2]|0)+36>>2]|0)-4|0)>>>0)|0);if((c[k>>2]|0)>>>0>(e[(c[g>>2]|0)+10>>1]|0)>>>0)c[k>>2]=c[m>>2];c[k>>2]=(c[k>>2]|0)+(4+((c[i>>2]|0)-(c[h>>2]|0)&65535));m=c[k>>2]|0;m=m&65535;l=n;return m|0}function Eo(a,f,g){a=a|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;i=q+32|0;j=q+28|0;k=q+24|0;m=q+20|0;n=q+16|0;o=q;p=q+12|0;h=q+8|0;c[i>>2]=a;c[j>>2]=f;c[k>>2]=g;c[m>>2]=c[j>>2];c[n>>2]=d[c[m>>2]>>0];a:do if((c[n>>2]|0)>>>0>=128){c[p>>2]=(c[m>>2]|0)+8;c[n>>2]=c[n>>2]&127;do{f=c[n>>2]<<7;g=(c[m>>2]|0)+1|0;c[m>>2]=g;c[n>>2]=f|(d[g>>0]|0)&127;if((d[c[m>>2]>>0]|0|0)<128)break a}while((c[m>>2]|0)>>>0<(c[p>>2]|0)>>>0)}while(0);c[m>>2]=(c[m>>2]|0)+1;p=o;c[p>>2]=d[c[m>>2]>>0];c[p+4>>2]=0;p=o;g=c[p+4>>2]|0;b:do if(g>>>0>0|(g|0)==0&(c[p>>2]|0)>>>0>=128){c[h>>2]=(c[m>>2]|0)+7;p=o;c[p>>2]=c[o>>2]&127;c[p+4>>2]=0;do{f=o;f=HR(c[f>>2]|0,c[f+4>>2]|0,7)|0;g=(c[m>>2]|0)+1|0;c[m>>2]=g;g=(d[g>>0]|0)&127;p=o;c[p>>2]=f|g;c[p+4>>2]=z|((g|0)<0)<<31>>31;if((d[c[m>>2]>>0]|0|0)<128)break b}while((c[m>>2]|0)>>>0<(c[h>>2]|0)>>>0);h=o;h=HR(c[h>>2]|0,c[h+4>>2]|0,8)|0;g=(c[m>>2]|0)+1|0;c[m>>2]=g;p=o;c[p>>2]=h|(d[g>>0]|0);c[p+4>>2]=z}while(0);c[m>>2]=(c[m>>2]|0)+1;g=o;o=c[g+4>>2]|0;p=c[k>>2]|0;c[p>>2]=c[g>>2];c[p+4>>2]=o;c[(c[k>>2]|0)+12>>2]=c[n>>2];c[(c[k>>2]|0)+8>>2]=c[m>>2];if((c[n>>2]|0)>>>0>(e[(c[i>>2]|0)+10>>1]|0)>>>0){Io(c[i>>2]|0,c[j>>2]|0,c[k>>2]|0);l=q;return}b[(c[k>>2]|0)+18>>1]=(c[n>>2]|0)+((c[m>>2]|0)-(c[j>>2]|0)&65535);if((e[(c[k>>2]|0)+18>>1]|0|0)<4)b[(c[k>>2]|0)+18>>1]=4;b[(c[k>>2]|0)+16>>1]=c[n>>2];l=q;return}function Fo(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[h+12>>2]=a;c[e>>2]=b;c[f>>2]=(c[e>>2]|0)+4;c[g>>2]=(c[f>>2]|0)+9;do{b=c[f>>2]|0;c[f>>2]=b+1;if(!((d[b>>0]|0)&128))break}while((c[f>>2]|0)>>>0<(c[g>>2]|0)>>>0);l=h;return (c[f>>2]|0)-(c[e>>2]|0)&65535|0}function Go(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=l;l=l+16|0;h=f+4|0;g=f;c[f+8>>2]=a;c[h>>2]=d;c[g>>2]=e;e=4+((Jo((c[h>>2]|0)+4|0,c[g>>2]|0)|0)&255)&65535;b[(c[g>>2]|0)+18>>1]=e;c[(c[g>>2]|0)+12>>2]=0;b[(c[g>>2]|0)+16>>1]=0;c[(c[g>>2]|0)+8>>2]=0;l=f;return}function Ho(a,f,g){a=a|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o;c[h>>2]=a;c[i>>2]=f;c[j>>2]=g;c[k>>2]=(c[i>>2]|0)+(d[(c[h>>2]|0)+6>>0]|0);c[m>>2]=d[c[k>>2]>>0];a:do if((c[m>>2]|0)>>>0>=128){c[n>>2]=(c[k>>2]|0)+8;c[m>>2]=c[m>>2]&127;do{f=c[m>>2]<<7;g=(c[k>>2]|0)+1|0;c[k>>2]=g;c[m>>2]=f|(d[g>>0]|0)&127;if((d[c[k>>2]>>0]|0|0)<128)break a}while((c[k>>2]|0)>>>0<(c[n>>2]|0)>>>0)}while(0);c[k>>2]=(c[k>>2]|0)+1;n=c[j>>2]|0;c[n>>2]=c[m>>2];c[n+4>>2]=0;c[(c[j>>2]|0)+12>>2]=c[m>>2];c[(c[j>>2]|0)+8>>2]=c[k>>2];if((c[m>>2]|0)>>>0>(e[(c[h>>2]|0)+10>>1]|0)>>>0){Io(c[h>>2]|0,c[i>>2]|0,c[j>>2]|0);l=o;return}b[(c[j>>2]|0)+18>>1]=(c[m>>2]|0)+((c[k>>2]|0)-(c[i>>2]|0)&65535);if((e[(c[j>>2]|0)+18>>1]|0|0)<4)b[(c[j>>2]|0)+18>>1]=4;b[(c[j>>2]|0)+16>>1]=c[m>>2];l=o;return}function Io(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+32|0;n=k+20|0;i=k+16|0;j=k+12|0;g=k+8|0;m=k+4|0;h=k;c[n>>2]=a;c[i>>2]=d;c[j>>2]=f;c[g>>2]=e[(c[n>>2]|0)+12>>1];c[m>>2]=e[(c[n>>2]|0)+10>>1];c[h>>2]=(c[g>>2]|0)+((((c[(c[j>>2]|0)+12>>2]|0)-(c[g>>2]|0)|0)>>>0)%(((c[(c[(c[n>>2]|0)+52>>2]|0)+36>>2]|0)-4|0)>>>0)|0);if((c[h>>2]|0)<=(c[m>>2]|0)){a=c[h>>2]&65535;d=c[j>>2]|0}else{a=c[g>>2]&65535;d=c[j>>2]|0}b[d+16>>1]=a;b[(c[j>>2]|0)+18>>1]=((c[(c[j>>2]|0)+8>>2]|0)+(e[(c[j>>2]|0)+16>>1]|0)-(c[i>>2]|0)&65535)+4;l=k;return}function Jo(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[h>>2]=e;c[i>>2]=d[c[g>>2]>>0];if(!(c[i>>2]&128)){k=c[h>>2]|0;c[k>>2]=c[i>>2];c[k+4>>2]=0;a[f>>0]=1;k=a[f>>0]|0;l=m;return k|0}c[g>>2]=(c[g>>2]|0)+1;c[j>>2]=d[c[g>>2]>>0];if(!(c[j>>2]&128)){c[i>>2]=c[i>>2]&127;c[i>>2]=c[i>>2]<<7;c[i>>2]=c[i>>2]|c[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0;e=f;c[d>>2]=a;c[e>>2]=b;if(c[(c[d>>2]|0)+244>>2]|0)Lo(c[(c[d>>2]|0)+244>>2]|0);Mo(c[d>>2]|0,c[e>>2]|0);l=f;return}function Lo(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Fh(c[d>>2]|0);l=b;return}function Mo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if((c[e>>2]|0)==3082){l=f;return}c[e>>2]=c[e>>2]&255;if(!((c[e>>2]|0)==14|(c[e>>2]|0)==10)){l=f;return}e=No(c[c[d>>2]>>2]|0)|0;c[(c[d>>2]|0)+60>>2]=e;l=f;return}function No(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[(c[b>>2]|0)+68>>2]|0)){b=0;l=d;return b|0}b=ob[c[(c[b>>2]|0)+68>>2]&255](c[b>>2]|0,0,0)|0;l=d;return b|0}function Oo(a){a=a|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=jl(c[d>>2]|0,40,0)|0;if(!(c[e>>2]|0)){e=c[e>>2]|0;l=f;return e|0}b[(c[e>>2]|0)+8>>1]=1;c[(c[e>>2]|0)+32>>2]=c[d>>2];e=c[e>>2]|0;l=f;return e|0}function Po(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n+16|0;m=n;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;a[k>>0]=f;c[m>>2]=g;if(!(c[h>>2]|0)){l=n;return}Jh(c[h>>2]|0,c[j>>2]|0,c[i>>2]|0,a[k>>0]|0,c[m>>2]|0)|0;l=n;return}function Qo(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o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o=p;c[h>>2]=f;c[i>>2]=g;c[j>>2]=c[(c[h>>2]|0)+4>>2];c[k>>2]=0;Ek(c[h>>2]|0);do if((d[(c[h>>2]|0)+8>>0]|0)!=2?(c[i>>2]|0?1:(d[(c[h>>2]|0)+8>>0]|0)!=1):0){if(c[i>>2]|0?(e[(c[j>>2]|0)+22>>1]&1|0)!=0:0){c[k>>2]=8;break}c[m>>2]=0;if(c[i>>2]|0?(d[(c[j>>2]|0)+20>>0]|0)==2:0)g=8;else g=7;a:do if((g|0)==7)if(!(e[(c[j>>2]|0)+22>>1]&64|0)){if((c[i>>2]|0)>1){c[n>>2]=c[(c[j>>2]|0)+72>>2];while(1){if(!(c[n>>2]|0))break a;f=c[n>>2]|0;if((c[c[n>>2]>>2]|0)!=(c[h>>2]|0))break;c[n>>2]=c[f+12>>2]}c[m>>2]=c[c[f>>2]>>2]}}else g=8;while(0);if((g|0)==8)c[m>>2]=c[c[(c[j>>2]|0)+76>>2]>>2];if(c[m>>2]|0){c[k>>2]=262;break}c[k>>2]=fq(c[h>>2]|0,1,1)|0;if(!(c[k>>2]|0)){n=(c[j>>2]|0)+22|0;b[n>>1]=e[n>>1]&-9;if(!(c[(c[j>>2]|0)+44>>2]|0)){n=(c[j>>2]|0)+22|0;b[n>>1]=e[n>>1]|8}do{do{if(c[(c[j>>2]|0)+12>>2]|0)break;n=gq(c[j>>2]|0)|0;c[k>>2]=n}while(0==(n|0));do if((c[k>>2]|0)==0&(c[i>>2]|0)!=0){if(e[(c[j>>2]|0)+22>>1]&1|0){c[k>>2]=8;break}m=c[c[j>>2]>>2]|0;n=(c[i>>2]|0)>1&1;c[k>>2]=hq(m,n,Vk(c[c[h>>2]>>2]|0)|0)|0;if(!(c[k>>2]|0))c[k>>2]=bq(c[j>>2]|0)|0}while(0);if(c[k>>2]|0)Up(c[j>>2]|0);if((c[k>>2]&255|0)!=5)break;if(d[(c[j>>2]|0)+20>>0]|0)break}while((bl(c[j>>2]|0)|0)!=0);if(!(c[k>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h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[i>>2]=c[(c[e>>2]|0)+4>>2];Ek(c[e>>2]|0);a=c[i>>2]|0;if((c[f>>2]|0)==15){i=eq(c[a>>2]|0)|0;c[c[g>>2]>>2]=i+(c[(c[e>>2]|0)+20>>2]|0);l=h;return}else{i=el((c[(c[a+12>>2]|0)+56>>2]|0)+(36+(c[f>>2]<<2))|0)|0;c[c[g>>2]>>2]=i;l=h;return}}function Uo(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[(c[b>>2]|0)+5>>0]|0|0}function Vo(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=dq(Hj(c[(c[d>>2]|0)+24>>2]|0)|0)|0;c[(c[d>>2]|0)+44>>2]=c[c[e>>2]>>2];c[c[e>>2]>>2]=c[d>>2];c[(c[d>>2]|0)+40>>2]=1;l=b;return}function Wo(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;Ek(c[e>>2]|0);c[(c[(c[e>>2]|0)+4>>2]|0)+44>>2]=0;c[b>>2]=bq(c[(c[e>>2]|0)+4>>2]|0)|0;l=d;return c[b>>2]|0}function Xo(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;m=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[m>>2]=b;c[f>>2]=d;c[g>>2]=e;c[h>>2]=c[(c[m>>2]|0)+4>>2];Ek(c[m>>2]|0);c[i>>2]=c[(c[(c[h>>2]|0)+12>>2]|0)+56>>2];c[j>>2]=Tm(c[(c[(c[h>>2]|0)+12>>2]|0)+72>>2]|0)|0;if(c[j>>2]|0){m=c[j>>2]|0;l=k;return m|0}Xm((c[i>>2]|0)+(36+(c[f>>2]<<2))|0,c[g>>2]|0);if((c[f>>2]|0)!=7){m=c[j>>2]|0;l=k;return m|0}a[(c[h>>2]|0)+18>>0]=c[g>>2];m=c[j>>2]|0;l=k;return m|0}function Yo(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;Gj(c[b>>2]|0);c[d>>2]=0;while(1){a=c[b>>2]|0;if((c[d>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0))break;c[e>>2]=(c[a+16>>2]|0)+(c[d>>2]<<4);if(c[(c[e>>2]|0)+12>>2]|0)Yp(c[(c[e>>2]|0)+12>>2]|0);c[d>>2]=(c[d>>2]|0)+1}e=a+24|0;c[e>>2]=c[e>>2]&-3;Zp(c[b>>2]|0);_p(c[b>>2]|0);l=f;return}function Zo(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[h>>2]=f;c[i>>2]=g;c[j>>2]=c[(c[h>>2]|0)+4>>2];g=(c[j>>2]|0)+22|0;b[g>>1]=(e[g>>1]|0)&-17;if((c[i>>2]|0)==1){g=(c[j>>2]|0)+22|0;b[g>>1]=e[g>>1]|0|16}c[k>>2]=Ro(c[h>>2]|0,0)|0;do if(!(c[k>>2]|0)){c[m>>2]=c[(c[(c[j>>2]|0)+12>>2]|0)+56>>2];if((d[(c[m>>2]|0)+18>>0]|0|0)==(c[i>>2]&255|0)?(d[(c[m>>2]|0)+19>>0]|0|0)==(c[i>>2]&255|0):0)break;c[k>>2]=Ro(c[h>>2]|0,2)|0;if((c[k>>2]|0)==0?(c[k>>2]=Tm(c[(c[(c[j>>2]|0)+12>>2]|0)+72>>2]|0)|0,(c[k>>2]|0)==0):0){a[(c[m>>2]|0)+18>>0]=c[i>>2];a[(c[m>>2]|0)+19>>0]=c[i>>2]}}while(0);m=(c[j>>2]|0)+22|0;b[m>>1]=(e[m>>1]|0)&-17;l=n;return c[k>>2]|0}function _o(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+64>>2]|0}function $o(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;c[c[e>>2]>>2]=c[(c[f>>2]|0)+28>>2];l=d;return}function ap(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;h=p+28|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;n=p+8|0;o=p+4|0;g=p;c[i>>2]=b;c[j>>2]=e;c[k>>2]=f;c[m>>2]=0;if(c[(c[i>>2]|0)+44>>2]|0){c[h>>2]=c[(c[i>>2]|0)+44>>2];o=c[h>>2]|0;l=p;return o|0}if(Vp(400)|0){c[h>>2]=10;o=c[h>>2]|0;l=p;return o|0}if((d[(c[i>>2]|0)+17>>0]|0|0)<3){c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}f=0==(Bl(c[i>>2]|0,1)|0);b=c[i>>2]|0;do if(!f){f=(El(b)|0)!=0;b=c[i>>2]|0;if(f){c[n>>2]=xn(c[b+212>>2]|0)|0;c[o>>2]=0;if(!(c[n>>2]|0)){c[m>>2]=rm(c[i>>2]|0,1,o,0)|0;c[n>>2]=c[o>>2];c[(c[n>>2]|0)+12>>2]=0}if(c[n>>2]|0)c[m>>2]=jo(c[i>>2]|0,c[n>>2]|0,c[(c[i>>2]|0)+28>>2]|0,1)|0;Ym(c[o>>2]|0);if(c[m>>2]|0)break;Cl(c[(c[i>>2]|0)+212>>2]|0);break}c[m>>2]=Wp(b,0)|0;if((((c[m>>2]|0)==0?(c[m>>2]=Xp(c[i>>2]|0,c[j>>2]|0)|0,(c[m>>2]|0)==0):0)?(c[m>>2]=ko(c[i>>2]|0,0)|0,(c[m>>2]|0)==0):0)?(o=c[i>>2]|0,c[m>>2]=lo(o,xn(c[(c[i>>2]|0)+212>>2]|0)|0)|0,(c[m>>2]|0)==0):0){Cl(c[(c[i>>2]|0)+212>>2]|0);if((c[(c[i>>2]|0)+28>>2]|0)>>>0>(c[(c[i>>2]|0)+36>>2]|0)>>>0){c[g>>2]=(c[(c[i>>2]|0)+28>>2]|0)-((c[(c[i>>2]|0)+28>>2]|0)==(((c[481]|0)/(c[(c[i>>2]|0)+160>>2]|0)|0)+1|0)&1);c[m>>2]=Gl(c[i>>2]|0,c[g>>2]|0)|0;if((c[m>>2]|0)!=0|(c[k>>2]|0)!=0)break}else if(c[k>>2]|0)break;c[m>>2]=em(c[i>>2]|0,c[j>>2]|0)|0}}else Pk(c[b+96>>2]|0);while(0);if((c[m>>2]|0)==0?(El(c[i>>2]|0)|0)==0:0)a[(c[i>>2]|0)+17>>0]=5;c[h>>2]=c[m>>2];o=c[h>>2]|0;l=p;return o|0}function bp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;e=i+20|0;f=i+8|0;g=i;h=i+16|0;c[e>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;c[h>>2]=Ik(c[e>>2]|0,g)|0;if(c[h>>2]|0){h=c[h>>2]|0;l=i;return h|0}d=g;a=c[d+4>>2]|0;g=f;b=c[g+4>>2]|0;if(!((a|0)>(b|0)|((a|0)==(b|0)?(c[d>>2]|0)>>>0>(c[g>>2]|0)>>>0:0))){h=c[h>>2]|0;l=i;return h|0}g=f;c[h>>2]=wl(c[e>>2]|0,c[g>>2]|0,c[g+4>>2]|0)|0;h=c[h>>2]|0;l=i;return h|0}function cp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[(c[e>>2]|0)+28>>2]=c[f>>2];l=d;return}function dp(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=e;if(!(d[(c[g>>2]|0)+8>>0]|0)){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}Ek(c[g>>2]|0);do if((d[(c[g>>2]|0)+8>>0]|0|0)==2){c[j>>2]=c[(c[g>>2]|0)+4>>2];c[i>>2]=Pp(c[c[j>>2]>>2]|0)|0;if(!((c[i>>2]|0)!=0&(c[h>>2]|0)==0)){i=(c[g>>2]|0)+20|0;c[i>>2]=(c[i>>2]|0)+-1;a[(c[j>>2]|0)+20>>0]=1;Qp(c[j>>2]|0);break}c[f>>2]=c[i>>2];j=c[f>>2]|0;l=k;return j|0}while(0);Rp(c[g>>2]|0);c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}function ep(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=e;c[i>>2]=0;if((d[(c[g>>2]|0)+8>>0]|0)==2){c[j>>2]=c[(c[g>>2]|0)+4>>2];Ek(c[g>>2]|0);if(a[(c[j>>2]|0)+17>>0]|0?(c[i>>2]=fp(c[j>>2]|0)|0,c[i>>2]|0):0){c[f>>2]=c[i>>2];j=c[f>>2]|0;l=k;return j|0}if(a[(c[j>>2]|0)+19>>0]|0)cp(c[c[j>>2]>>2]|0,c[(c[j>>2]|0)+44>>2]|0);c[i>>2]=ap(c[c[j>>2]>>2]|0,c[h>>2]|0,0)|0}c[f>>2]=c[i>>2];j=c[f>>2]|0;l=k;return j|0}function fp(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[e>>2]=b;c[f>>2]=0;c[g>>2]=c[c[e>>2]>>2];gp(c[e>>2]|0);do if(!(a[(c[e>>2]|0)+18>>0]|0)){c[k>>2]=$m(c[e>>2]|0)|0;b=hp(c[e>>2]|0,c[k>>2]|0)|0;if((b|0)!=(c[k>>2]|0)?(c[k>>2]|0)!=((((c[481]|0)>>>0)/((c[(c[e>>2]|0)+32>>2]|0)>>>0)|0)+1|0):0){c[i>>2]=el((c[(c[(c[e>>2]|0)+12>>2]|0)+56>>2]|0)+36|0)|0;c[h>>2]=ip(c[e>>2]|0,c[k>>2]|0,c[i>>2]|0)|0;if((c[h>>2]|0)>>>0>(c[k>>2]|0)>>>0){c[d>>2]=um(61919)|0;k=c[d>>2]|0;l=m;return k|0}if((c[h>>2]|0)>>>0<(c[k>>2]|0)>>>0)c[f>>2]=jp(c[e>>2]|0,0,0)|0;c[j>>2]=c[k>>2];while(1){if(!((c[j>>2]|0)>>>0>(c[h>>2]|0)>>>0?(c[f>>2]|0)==0:0))break;c[f>>2]=kp(c[e>>2]|0,c[h>>2]|0,c[j>>2]|0,1)|0;c[j>>2]=(c[j>>2]|0)+-1}if(((c[f>>2]|0)==101|(c[f>>2]|0)==0)&(c[i>>2]|0)>>>0>0){c[f>>2]=Tm(c[(c[(c[e>>2]|0)+12>>2]|0)+72>>2]|0)|0;Xm((c[(c[(c[e>>2]|0)+12>>2]|0)+56>>2]|0)+32|0,0);Xm((c[(c[(c[e>>2]|0)+12>>2]|0)+56>>2]|0)+36|0,0);Xm((c[(c[(c[e>>2]|0)+12>>2]|0)+56>>2]|0)+28|0,c[h>>2]|0);a[(c[e>>2]|0)+19>>0]=1;c[(c[e>>2]|0)+44>>2]=c[h>>2]}if(!(c[f>>2]|0))break;sl(c[g>>2]|0)|0;break}c[d>>2]=um(61914)|0;k=c[d>>2]|0;l=m;return k|0}while(0);c[d>>2]=c[f>>2];k=c[d>>2]|0;l=m;return k|0}function gp(b){b=b|0;var e=0,f=0,g=0;f=l;l=l+16|0;g=f+4|0;e=f;c[g>>2]=b;c[e>>2]=c[(c[g>>2]|0)+8>>2];while(1){if(!(c[e>>2]|0))break;g=(c[e>>2]|0)+64|0;a[g>>0]=(d[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c[f>>2]|0))b=1;else b=(c[f>>2]|0)==((((c[481]|0)>>>0)/((c[(c[e>>2]|0)+32>>2]|0)>>>0)|0)+1|0);a=c[f>>2]|0;if(!b)break;c[f>>2]=a+-1}l=g;return a|0}function jp(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;g=k+16|0;m=k+12|0;h=k+8|0;i=k+4|0;j=k;c[m>>2]=b;c[h>>2]=e;c[i>>2]=f;c[j>>2]=c[(c[m>>2]|0)+8>>2];while(1){if(!(c[j>>2]|0))break;if((c[j>>2]|0)!=(c[i>>2]|0)){if(!(c[h>>2]|0))break;if((c[(c[j>>2]|0)+52>>2]|0)==(c[h>>2]|0))break}c[j>>2]=c[(c[j>>2]|0)+8>>2]}if(c[j>>2]|0){c[g>>2]=Dp(c[j>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;m=c[g>>2]|0;l=k;return m|0}if(c[i>>2]|0){m=(c[i>>2]|0)+64|0;a[m>>0]=(d[m>>0]|0)&-33}c[g>>2]=0;m=c[g>>2]|0;l=k;return m|0}function kp(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=l;l=l+64|0;s=z+52|0;t=z+48|0;u=z+44|0;v=z+40|0;w=z+36|0;x=z+32|0;h=z+28|0;i=z+57|0;j=z+24|0;k=z+20|0;m=z+16|0;n=z+12|0;o=z+8|0;p=z+56|0;q=z+4|0;r=z;c[t>>2]=b;c[u>>2]=e;c[v>>2]=f;c[w>>2]=g;g=hp(c[t>>2]|0,c[v>>2]|0)|0;do if((g|0)!=(c[v>>2]|0)?(c[v>>2]|0)!=((((c[481]|0)>>>0)/((c[(c[t>>2]|0)+32>>2]|0)>>>0)|0)+1|0):0){c[x>>2]=el((c[(c[(c[t>>2]|0)+12>>2]|0)+56>>2]|0)+36|0)|0;if(!(c[x>>2]|0)){c[s>>2]=101;y=c[s>>2]|0;l=z;return y|0}c[h>>2]=lp(c[t>>2]|0,c[v>>2]|0,i,j)|0;if(c[h>>2]|0){c[s>>2]=c[h>>2];y=c[s>>2]|0;l=z;return y|0}if((d[i>>0]|0|0)==1){c[s>>2]=um(61751)|0;y=c[s>>2]|0;l=z;return y|0}if((d[i>>0]|0|0)==2){if(c[w>>2]|0)break;c[h>>2]=mp(c[t>>2]|0,m,k,c[v>>2]|0,1)|0;if(!(c[h>>2]|0)){np(c[m>>2]|0);break}c[s>>2]=c[h>>2];y=c[s>>2]|0;l=z;return y|0}a[p>>0]=0;c[q>>2]=0;c[h>>2]=op(c[t>>2]|0,c[v>>2]|0,o,0)|0;if(c[h>>2]|0){c[s>>2]=c[h>>2];y=c[s>>2]|0;l=z;return y|0}if(!(c[w>>2]|0)){a[p>>0]=2;c[q>>2]=c[u>>2]}do{c[h>>2]=mp(c[t>>2]|0,r,n,c[q>>2]|0,a[p>>0]|0)|0;if(c[h>>2]|0){y=19;break}np(c[r>>2]|0);if(!(c[w>>2]|0))break}while((c[n>>2]|0)>>>0>(c[u>>2]|0)>>>0);if((y|0)==19){np(c[o>>2]|0);c[s>>2]=c[h>>2];y=c[s>>2]|0;l=z;return y|0}c[h>>2]=pp(c[t>>2]|0,c[o>>2]|0,a[i>>0]|0,c[j>>2]|0,c[n>>2]|0,c[w>>2]|0)|0;np(c[o>>2]|0);if(c[h>>2]|0){c[s>>2]=c[h>>2];y=c[s>>2]|0;l=z;return y|0}}while(0);if(!(c[w>>2]|0)){while(1){c[v>>2]=(c[v>>2]|0)+-1;if((c[v>>2]|0)==((((c[481]|0)>>>0)/((c[(c[t>>2]|0)+32>>2]|0)>>>0)|0)+1|0))continue;y=hp(c[t>>2]|0,c[v>>2]|0)|0;if((y|0)!=(c[v>>2]|0))break}a[(c[t>>2]|0)+19>>0]=1;c[(c[t>>2]|0)+44>>2]=c[v>>2]}c[s>>2]=0;y=c[s>>2]|0;l=z;return y|0}function lp(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+48|0;m=r+36|0;s=r+32|0;n=r+28|0;o=r+24|0;p=r+20|0;q=r+16|0;h=r+12|0;i=r+8|0;j=r+4|0;k=r;c[s>>2]=b;c[n>>2]=e;c[o>>2]=f;c[p>>2]=g;c[h>>2]=hp(c[s>>2]|0,c[n>>2]|0)|0;c[k>>2]=rm(c[c[s>>2]>>2]|0,c[h>>2]|0,q,0)|0;if(c[k>>2]|0){c[m>>2]=c[k>>2];s=c[m>>2]|0;l=r;return s|0}c[i>>2]=Um(c[q>>2]|0)|0;c[j>>2]=((c[n>>2]|0)-(c[h>>2]|0)-1|0)*5;if((c[j>>2]|0)<0){Ym(c[q>>2]|0);c[m>>2]=um(59240)|0;s=c[m>>2]|0;l=r;return s|0}a[c[o>>2]>>0]=a[(c[i>>2]|0)+(c[j>>2]|0)>>0]|0;if(c[p>>2]|0){s=el((c[i>>2]|0)+((c[j>>2]|0)+1)|0)|0;c[c[p>>2]>>2]=s}Ym(c[q>>2]|0);if((d[c[o>>2]>>0]|0|0)>=1?(d[c[o>>2]>>0]|0|0)<=5:0){c[m>>2]=0;s=c[m>>2]|0;l=r;return s|0}c[m>>2]=um(59248)|0;s=c[m>>2]|0;l=r;return s|0}function mp(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=l;l=l+112|0;K=L+96|0;D=L+92|0;E=L+88|0;F=L+84|0;G=L+80|0;m=L+102|0;n=L+76|0;H=L+72|0;o=L+68|0;p=L+64|0;I=L+60|0;J=L+56|0;q=L+52|0;r=L+48|0;s=L+101|0;t=L+44|0;i=L+100|0;u=L+40|0;v=L+36|0;w=L+32|0;x=L+28|0;y=L+24|0;z=L+20|0;A=L+16|0;B=L+12|0;C=L+8|0;j=L+4|0;k=L;c[D>>2]=b;c[E>>2]=e;c[F>>2]=f;c[G>>2]=g;a[m>>0]=h;c[I>>2]=0;c[J>>2]=0;c[n>>2]=c[(c[D>>2]|0)+12>>2];c[q>>2]=$m(c[D>>2]|0)|0;c[o>>2]=el((c[(c[n>>2]|0)+56>>2]|0)+36|0)|0;if((c[o>>2]|0)>>>0>=(c[q>>2]|0)>>>0){c[K>>2]=um(63793)|0;K=c[K>>2]|0;l=L;return K|0}a:do if((c[o>>2]|0)>>>0>0){a[s>>0]=0;c[t>>2]=0;do if((d[m>>0]|0)==1){if((c[G>>2]|0)>>>0<=(c[q>>2]|0)>>>0){c[H>>2]=lp(c[D>>2]|0,c[G>>2]|0,i,0)|0;if(c[H>>2]|0){c[K>>2]=c[H>>2];K=c[K>>2]|0;l=L;return K|0}else{if((d[i>>0]|0)!=2)break;a[s>>0]=1;break}}}else if((d[m>>0]|0)==2)a[s>>0]=1;while(0);c[H>>2]=Tm(c[(c[n>>2]|0)+72>>2]|0)|0;if(c[H>>2]|0){c[K>>2]=c[H>>2];K=c[K>>2]|0;l=L;return K|0}Xm((c[(c[n>>2]|0)+56>>2]|0)+36|0,(c[o>>2]|0)-1|0);b:while(1){c[J>>2]=c[I>>2];if(c[J>>2]|0)c[r>>2]=el(c[(c[J>>2]|0)+56>>2]|0)|0;else c[r>>2]=el((c[(c[n>>2]|0)+56>>2]|0)+32|0)|0;if((c[r>>2]|0)>>>0<=(c[q>>2]|0)>>>0?(h=c[t>>2]|0,c[t>>2]=h+1,h>>>0<=(c[o>>2]|0)>>>0):0)c[H>>2]=zp(c[D>>2]|0,c[r>>2]|0,I,0)|0;else c[H>>2]=um(63849)|0;if(c[H>>2]|0){b=23;break}c[p>>2]=el((c[(c[I>>2]|0)+56>>2]|0)+4|0)|0;c:do if((c[p>>2]|0)!=0|(a[s>>0]|0)!=0){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[(c[I>>2]|0)+56>>2]|0)+12|0,(c[p>>2]|0)-1<<2|0)|0;np(c[u>>2]|0);if(!(c[J>>2]|0)){Xm((c[(c[n>>2]|0)+56>>2]|0)+32|0,c[v>>2]|0);break}c[H>>2]=Tm(c[(c[J>>2]|0)+72>>2]|0)|0;if(c[H>>2]|0)break a;Xm(c[(c[J>>2]|0)+56>>2]|0,c[v>>2]|0)}while(0);c[I>>2]=0;break c}while(0);if((c[p>>2]|0)>>>0>0){c[y>>2]=c[(c[I>>2]|0)+56>>2];h=(c[G>>2]|0)>>>0>0;c[w>>2]=0;d:do if(h)if((d[m>>0]|0)==2){c[z>>2]=0;while(1){if((c[z>>2]|0)>>>0>=(c[p>>2]|0)>>>0)break d;c[x>>2]=el((c[y>>2]|0)+(8+(c[z>>2]<<2))|0)|0;b=c[z>>2]|0;if((c[x>>2]|0)>>>0<=(c[G>>2]|0)>>>0)break;c[z>>2]=b+1}c[w>>2]=b;break}else{h=el((c[y>>2]|0)+8|0)|0;c[A>>2]=Ap(h-(c[G>>2]|0)|0)|0;c[z>>2]=1;while(1){if((c[z>>2]|0)>>>0>=(c[p>>2]|0)>>>0)break d;h=el((c[y>>2]|0)+(8+(c[z>>2]<<2))|0)|0;c[B>>2]=Ap(h-(c[G>>2]|0)|0)|0;if((c[B>>2]|0)<(c[A>>2]|0)){c[w>>2]=c[z>>2];c[A>>2]=c[B>>2]}c[z>>2]=(c[z>>2]|0)+1}}while(0);c[x>>2]=el((c[y>>2]|0)+(8+(c[w>>2]<<2))|0)|0;if((c[x>>2]|0)>>>0>(c[q>>2]|0)>>>0){b=63;break b}if(a[s>>0]|0?(c[x>>2]|0)!=(c[G>>2]|0):0){if((c[x>>2]|0)>>>0>=(c[G>>2]|0)>>>0)break;if((d[m>>0]|0)!=2)break}c[c[F>>2]>>2]=c[x>>2];c[H>>2]=Tm(c[(c[I>>2]|0)+72>>2]|0)|0;if(c[H>>2]|0)break a;if((c[w>>2]|0)>>>0<((c[p>>2]|0)-1|0)>>>0){h=(c[y>>2]|0)+(8+(c[w>>2]<<2))|0;k=(c[y>>2]|0)+(4+(c[p>>2]<<2))|0;a[h>>0]=a[k>>0]|0;a[h+1>>0]=a[k+1>>0]|0;a[h+2>>0]=a[k+2>>0]|0;a[h+3>>0]=a[k+3>>0]|0}Xm((c[y>>2]|0)+4|0,(c[p>>2]|0)-1|0);h=(Bp(c[D>>2]|0,c[c[F>>2]>>2]|0)|0)!=0^1;c[C>>2]=h?1:0;c[H>>2]=zp(c[D>>2]|0,c[c[F>>2]>>2]|0,c[E>>2]|0,c[C>>2]|0)|0;do if(!(c[H>>2]|0)){c[H>>2]=Tm(c[(c[c[E>>2]>>2]|0)+72>>2]|0)|0;if(!(c[H>>2]|0))break;np(c[c[E>>2]>>2]|0);c[c[E>>2]>>2]=0}while(0);a[s>>0]=0}}else{c[H>>2]=Tm(c[(c[I>>2]|0)+72>>2]|0)|0;if(c[H>>2]|0)break a;c[c[F>>2]>>2]=c[r>>2];h=(c[(c[n>>2]|0)+56>>2]|0)+32|0;k=c[(c[I>>2]|0)+56>>2]|0;a[h>>0]=a[k>>0]|0;a[h+1>>0]=a[k+1>>0]|0;a[h+2>>0]=a[k+2>>0]|0;a[h+3>>0]=a[k+3>>0]|0;c[c[E>>2]>>2]=c[I>>2];c[I>>2]=0}while(0);np(c[J>>2]|0);c[J>>2]=0;if(!(a[s>>0]|0))break a}if((b|0)==23){c[I>>2]=0;break}else if((b|0)==28){c[H>>2]=um(63878)|0;break}else if((b|0)==40){c[H>>2]=um(63912)|0;break}else if((b|0)==43){np(e);break}else if((b|0)==63){c[H>>2]=um(63977)|0;break}}else{c[j>>2]=0==(d[(c[D>>2]|0)+19>>0]|0)?1:0;c[H>>2]=Tm(c[(c[(c[D>>2]|0)+12>>2]|0)+72>>2]|0)|0;if(c[H>>2]|0){c[K>>2]=c[H>>2];K=c[K>>2]|0;l=L;return K|0}G=(c[D>>2]|0)+44|0;c[G>>2]=(c[G>>2]|0)+1;if((c[(c[D>>2]|0)+44>>2]|0)==((((c[481]|0)>>>0)/((c[(c[D>>2]|0)+32>>2]|0)>>>0)|0)+1|0)){G=(c[D>>2]|0)+44|0;c[G>>2]=(c[G>>2]|0)+1}do if(d[(c[D>>2]|0)+17>>0]|0?(G=hp(c[D>>2]|0,c[(c[D>>2]|0)+44>>2]|0)|0,(G|0)==(c[(c[D>>2]|0)+44>>2]|0)):0){c[k>>2]=0;c[H>>2]=zp(c[D>>2]|0,c[(c[D>>2]|0)+44>>2]|0,k,c[j>>2]|0)|0;if(!(c[H>>2]|0)){c[H>>2]=Tm(c[(c[k>>2]|0)+72>>2]|0)|0;np(c[k>>2]|0)}if(c[H>>2]|0){c[K>>2]=c[H>>2];K=c[K>>2]|0;l=L;return K|0}else{G=(c[D>>2]|0)+44|0;c[G>>2]=(c[G>>2]|0)+1;if((c[(c[D>>2]|0)+44>>2]|0)!=((((c[481]|0)>>>0)/((c[(c[D>>2]|0)+32>>2]|0)>>>0)|0)+1|0))break;G=(c[D>>2]|0)+44|0;c[G>>2]=(c[G>>2]|0)+1;break}}while(0);Xm((c[(c[(c[D>>2]|0)+12>>2]|0)+56>>2]|0)+28|0,c[(c[D>>2]|0)+44>>2]|0);c[c[F>>2]>>2]=c[(c[D>>2]|0)+44>>2];c[H>>2]=zp(c[D>>2]|0,c[c[F>>2]>>2]|0,c[E>>2]|0,c[j>>2]|0)|0;if(c[H>>2]|0){c[K>>2]=c[H>>2];K=c[K>>2]|0;l=L;return K|0}else{c[H>>2]=Tm(c[(c[c[E>>2]>>2]|0)+72>>2]|0)|0;if(!(c[H>>2]|0))break;np(c[c[E>>2]>>2]|0);c[c[E>>2]>>2]=0;break}}while(0);np(c[I>>2]|0);np(c[J>>2]|0);c[K>>2]=c[H>>2];K=c[K>>2]|0;l=L;return K|0}function np(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}yp(c[b>>2]|0);l=d;return}function op(a,b,d,e){a=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r>>2]|0):0){c[s>>2]=c[r>>2];x=c[s>>2]|0;l=v;return x|0}do if((d[u>>0]|0|0)!=1){c[r>>2]=op(c[t>>2]|0,c[n>>2]|0,p,0)|0;if(c[r>>2]|0){c[s>>2]=c[r>>2];x=c[s>>2]|0;l=v;return x|0}c[r>>2]=Tm(c[(c[p>>2]|0)+72>>2]|0)|0;b=c[p>>2]|0;if(c[r>>2]|0){np(b);c[s>>2]=c[r>>2];x=c[s>>2]|0;l=v;return x|0}else{c[r>>2]=tp(b,c[q>>2]|0,c[o>>2]|0,a[u>>0]|0)|0;np(c[p>>2]|0);if(c[r>>2]|0)break;sp(c[t>>2]|0,c[o>>2]|0,a[u>>0]|0,c[n>>2]|0,r);break}}while(0);c[s>>2]=c[r>>2];x=c[s>>2]|0;l=v;return x|0}function qp(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;p=u+36|0;q=u+32|0;r=u+28|0;s=u+24|0;j=u+20|0;t=u+16|0;k=u+12|0;m=u+8|0;n=u+4|0;o=u;c[q>>2]=f;c[r>>2]=g;c[s>>2]=h;c[j>>2]=i;c[k>>2]=0;if(a[(c[q>>2]|0)+13>>0]|0?(c[m>>2]=Tm(c[r>>2]|0)|0,c[m>>2]|0):0){c[p>>2]=c[m>>2];t=c[p>>2]|0;l=u;return t|0}if(e[(c[r>>2]|0)+24>>1]&2|0?(i=an(c[r>>2]|0)|0,c[m>>2]=i,0!=(i|0)):0){c[p>>2]=c[m>>2];t=c[p>>2]|0;l=u;return t|0}if(!(c[j>>2]|0?1:(e[(c[r>>2]|0)+24>>1]&8|0)==0))c[k>>2]=c[(c[r>>2]|0)+20>>2];j=(c[r>>2]|0)+24|0;b[j>>1]=e[j>>1]&-9;c[t>>2]=pm(c[q>>2]|0,c[s>>2]|0)|0;do if(c[t>>2]|0){f=(c[r>>2]|0)+24|0;b[f>>1]=e[f>>1]|e[(c[t>>2]|0)+24>>1]&8;f=c[t>>2]|0;if(a[(c[q>>2]|0)+13>>0]|0){vp(f,(c[(c[q>>2]|0)+28>>2]|0)+1|0);break}else{Em(f);break}}while(0);c[n>>2]=c[(c[r>>2]|0)+20>>2];vp(c[r>>2]|0,c[s>>2]|0);sm(c[r>>2]|0);if(c[t>>2]|0?(d[(c[q>>2]|0)+13>>0]|0)!=0:0){vp(c[t>>2]|0,c[n>>2]|0);Zm(c[t>>2]|0)}do if(c[k>>2]|0){c[m>>2]=rm(c[q>>2]|0,c[k>>2]|0,o,0)|0;if(!(c[m>>2]|0)){t=(c[o>>2]|0)+24|0;b[t>>1]=e[t>>1]|8;sm(c[o>>2]|0);Zm(c[o>>2]|0);break}if((c[k>>2]|0)>>>0<=(c[(c[q>>2]|0)+32>>2]|0)>>>0)wp(c[(c[q>>2]|0)+60>>2]|0,c[k>>2]|0,c[(c[q>>2]|0)+208>>2]|0);c[p>>2]=c[m>>2];t=c[p>>2]|0;l=u;return t|0}while(0);c[p>>2]=0;t=c[p>>2]|0;l=u;return t|0}function rp(b){b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;f=q+32|0;h=q+28|0;i=q+24|0;j=q+20|0;k=q+16|0;m=q+36|0;n=q+12|0;o=q+8|0;p=q+4|0;g=q;c[f>>2]=b;c[k>>2]=c[(c[f>>2]|0)+52>>2];a[m>>0]=a[c[f>>2]>>0]|0;c[n>>2]=c[(c[f>>2]|0)+84>>2];c[j>>2]=Bo(c[f>>2]|0)|0;if(c[j>>2]|0){o=a[m>>0]|0;p=c[f>>2]|0;a[p>>0]=o;p=c[j>>2]|0;l=q;return p|0}c[i>>2]=e[(c[f>>2]|0)+18>>1];c[h>>2]=0;while(1){b=c[f>>2]|0;if((c[h>>2]|0)>=(c[i>>2]|0))break;c[o>>2]=(c[b+56>>2]|0)+(e[(c[f>>2]|0)+20>>1]&(d[(c[(c[f>>2]|0)+64>>2]|0)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)):0)break;p=Tm(c[i>>2]|0)|0;c[n>>2]=p;c[c[s>>2]>>2]=p;if(!(c[n>>2]|0)){a[(c[j>>2]|0)+(c[m>>2]|0)>>0]=a[q>>0]|0;Xm((c[j>>2]|0)+((c[m>>2]|0)+1)|0,c[r>>2]|0)}}else{r=um(59195)|0;c[c[s>>2]>>2]=r}while(0);Ym(c[i>>2]|0);l=t;return}function tp(b,f,g,h){b=b|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;o=v+52|0;p=v+48|0;q=v+44|0;r=v+40|0;s=v+57|0;t=v+56|0;i=v+36|0;j=v+32|0;k=v+28|0;m=v+24|0;n=v;c[p>>2]=b;c[q>>2]=f;c[r>>2]=g;a[s>>0]=h;b=c[p>>2]|0;do if((d[s>>0]|0|0)==4){u=el(c[b+56>>2]|0)|0;if((u|0)==(c[q>>2]|0)){Xm(c[(c[p>>2]|0)+56>>2]|0,c[r>>2]|0);break}c[o>>2]=um(61581)|0;u=c[o>>2]|0;l=v;return u|0}else{a[t>>0]=a[b>>0]|0;c[k>>2]=Bo(c[p>>2]|0)|0;if(c[k>>2]|0){c[o>>2]=c[k>>2];u=c[o>>2]|0;l=v;return u|0}c[j>>2]=e[(c[p>>2]|0)+18>>1];c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[j>>2]|0))break;c[m>>2]=(c[(c[p>>2]|0)+56>>2]|0)+((e[(c[p>>2]|0)+20>>1]|0)&((d[(c[(c[p>>2]|0)+64>>2]|0)+(c[i>>2]<<1)>>0]|0)<<8|(d[(c[(c[p>>2]|0)+64>>2]|0)+(c[i>>2]<<1)+1>>0]|0)));if((d[s>>0]|0|0)==3){ub[c[(c[p>>2]|0)+80>>2]&255](c[p>>2]|0,c[m>>2]|0,n);if(((e[n+16>>1]|0)>>>0<(c[n+12>>2]|0)>>>0?((c[m>>2]|0)+(e[n+18>>1]|0)+-1|0)>>>0<=((c[(c[p>>2]|0)+56>>2]|0)+(e[(c[p>>2]|0)+20>>1]|0)|0)>>>0:0)?(k=c[q>>2]|0,(k|0)==(el((c[m>>2]|0)+(e[n+18>>1]|0)+-4|0)|0)):0){u=13;break}}else{k=el(c[m>>2]|0)|0;if((k|0)==(c[q>>2]|0)){u=15;break}}c[i>>2]=(c[i>>2]|0)+1}if((u|0)==13)Xm((c[m>>2]|0)+(e[n+18>>1]|0)+-4|0,c[r>>2]|0);else if((u|0)==15)Xm(c[m>>2]|0,c[r>>2]|0);do if((c[i>>2]|0)==(c[j>>2]|0)){if((d[s>>0]|0|0)==5?(u=el((c[(c[p>>2]|0)+56>>2]|0)+((d[(c[p>>2]|0)+5>>0]|0)+8)|0)|0,(u|0)==(c[q>>2]|0)):0){Xm((c[(c[p>>2]|0)+56>>2]|0)+((d[(c[p>>2]|0)+5>>0]|0)+8)|0,c[r>>2]|0);break}c[o>>2]=um(61617)|0;u=c[o>>2]|0;l=v;return u|0}while(0);a[c[p>>2]>>0]=a[t>>0]|0}while(0);c[o>>2]=0;u=c[o>>2]|0;l=v;return u|0}function up(a,b,d){a=a|0;b=b|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+48|0;f=k+36|0;g=k+32|0;h=k+28|0;i=k;j=k+24|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(c[c[h>>2]>>2]|0){l=k;return}ub[c[(c[f>>2]|0)+80>>2]&255](c[f>>2]|0,c[g>>2]|0,i);if((e[i+16>>1]|0)>>>0>=(c[i+12>>2]|0)>>>0){l=k;return}c[j>>2]=el((c[g>>2]|0)+((e[i+18>>1]|0)-4)|0)|0;sp(c[(c[f>>2]|0)+52>>2]|0,c[j>>2]|0,3,c[(c[f>>2]|0)+84>>2]|0,c[h>>2]|0);l=k;return}function vp(a,b){a=a|0;b=b|0;var d=0,f=0,g=0,h=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;h=f;c[d>>2]=a;c[g>>2]=b;c[h>>2]=c[(c[d>>2]|0)+28>>2];Ab[c[152>>2]&255](c[(c[h>>2]|0)+44>>2]|0,c[c[d>>2]>>2]|0,c[(c[d>>2]|0)+20>>2]|0,c[g>>2]|0);c[(c[d>>2]|0)+20>>2]=c[g>>2];if(!((e[(c[d>>2]|0)+24>>1]|0)&2)){l=f;return}if(!((e[(c[d>>2]|0)+24>>1]|0)&8)){l=f;return}Tk(c[d>>2]|0,3);l=f;return}function wp(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;g=p+24|0;h=p+20|0;i=p+16|0;j=p+12|0;k=p+8|0;m=p+4|0;n=p;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;if(!(c[g>>2]|0)){l=p;return}c[h>>2]=(c[h>>2]|0)+-1;while(1){if(!(c[(c[g>>2]|0)+8>>2]|0))break;c[j>>2]=((c[h>>2]|0)>>>0)/((c[(c[g>>2]|0)+8>>2]|0)>>>0)|0;c[h>>2]=((c[h>>2]|0)>>>0)%((c[(c[g>>2]|0)+8>>2]|0)>>>0)|0;c[g>>2]=c[(c[g>>2]|0)+12+(c[j>>2]<<2)>>2];if(!(c[g>>2]|0)){o=16;break}}if((o|0)==16){l=p;return}if((c[c[g>>2]>>2]|0)>>>0<=4e3){o=(c[g>>2]|0)+12+(((c[h>>2]|0)>>>0)/8|0)|0;a[o>>0]=(d[o>>0]|0)&~(1<<(c[h>>2]&7));l=p;return}c[m>>2]=c[i>>2];MR(c[m>>2]|0,(c[g>>2]|0)+12|0,500)|0;GR((c[g>>2]|0)+12|0,0,500)|0;c[(c[g>>2]|0)+4>>2]=0;c[k>>2]=0;while(1){if((c[k>>2]|0)>>>0>=125)break;if(c[(c[m>>2]|0)+(c[k>>2]<<2)>>2]|0?(c[(c[m>>2]|0)+(c[k>>2]<<2)>>2]|0)!=((c[h>>2]|0)+1|0):0){c[n>>2]=(((c[(c[m>>2]|0)+(c[k>>2]<<2)>>2]|0)-1|0)>>>0)%125|0;o=(c[g>>2]|0)+4|0;c[o>>2]=(c[o>>2]|0)+1;while(1){if(!(c[(c[g>>2]|0)+12+(c[n>>2]<<2)>>2]|0))break;o=(c[n>>2]|0)+1|0;c[n>>2]=o;c[n>>2]=(c[n>>2]|0)>>>0>=125?0:o}c[(c[g>>2]|0)+12+(c[n>>2]<<2)>>2]=c[(c[m>>2]|0)+(c[k>>2]<<2)>>2]}c[k>>2]=(c[k>>2]|0)+1}l=p;return}function xp(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;c[i>>2]=Vm(c[f>>2]|0)|0;if((c[g>>2]|0)==(c[(c[i>>2]|0)+84>>2]|0)){i=c[i>>2]|0;l=j;return i|0}e=Um(c[f>>2]|0)|0;c[(c[i>>2]|0)+56>>2]=e;c[(c[i>>2]|0)+72>>2]=c[f>>2];c[(c[i>>2]|0)+52>>2]=c[h>>2];c[(c[i>>2]|0)+84>>2]=c[g>>2];a[(c[i>>2]|0)+5>>0]=(c[g>>2]|0)==1?100:0;i=c[i>>2]|0;l=j;return i|0}function yp(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Zm(c[(c[d>>2]|0)+72>>2]|0);l=b;return}function zp(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;j=l;l=l+32|0;g=j+20|0;n=j+16|0;m=j+12|0;h=j+8|0;k=j+4|0;i=j;c[n>>2]=b;c[m>>2]=d;c[h>>2]=e;c[k>>2]=f;c[i>>2]=op(c[n>>2]|0,c[m>>2]|0,c[h>>2]|0,c[k>>2]|0)|0;b=c[h>>2]|0;do if(!(c[i>>2]|0)){n=(Ao(c[(c[b>>2]|0)+72>>2]|0)|0)>1;b=c[c[h>>2]>>2]|0;if(!n){a[b>>0]=0;break}np(b);c[c[h>>2]>>2]=0;c[g>>2]=um(60316)|0;n=c[g>>2]|0;l=j;return n|0}else c[b>>2]=0;while(0);c[g>>2]=c[i>>2];n=c[g>>2]|0;l=j;return n|0}function Ap(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;a=c[d>>2]|0;do if((c[d>>2]|0)<0)if((a|0)==-2147483648){c[b>>2]=2147483647;break}else{c[b>>2]=0-(c[d>>2]|0);break}else c[b>>2]=a;while(0);l=e;return c[b>>2]|0}function Bp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[d>>2]=b;c[e>>2]=c[(c[g>>2]|0)+60>>2];if(!(c[e>>2]|0)){g=0;g=g&1;l=f;return g|0}g=c[d>>2]|0;if(g>>>0>(Cp(c[e>>2]|0)|0)>>>0){g=1;g=g&1;l=f;return g|0}g=(mm(c[e>>2]|0,c[d>>2]|0)|0)!=0;g=g&1;l=f;return g|0}function Cp(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[b>>2]>>2]|0}function Dp(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;i=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=e;a:while(1){do if((c[f>>2]|0)!=(c[h>>2]|0)){if(0!=(c[g>>2]|0)?(c[(c[f>>2]|0)+52>>2]|0)!=(c[g>>2]|0):0)break;if((d[(c[f>>2]|0)+66>>0]|0|0)!=1?(d[(c[f>>2]|0)+66>>0]|0|0)!=2:0){Fp(c[f>>2]|0);break}c[j>>2]=Ep(c[f>>2]|0)|0;if(c[j>>2]|0){a=8;break a}}while(0);c[f>>2]=c[(c[f>>2]|0)+8>>2];if(!(c[f>>2]|0)){a=11;break}}if((a|0)==8){c[i>>2]=c[j>>2];j=c[i>>2]|0;l=k;return j|0}else if((a|0)==11){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}return 0}function Ep(b){b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;b=c[e>>2]|0;if((d[(c[e>>2]|0)+66>>0]|0|0)==2)a[b+66>>0]=1;else c[b+60>>2]=0;c[f>>2]=Gp(c[e>>2]|0)|0;if(!(c[f>>2]|0)){Fp(c[e>>2]|0);a[(c[e>>2]|0)+66>>0]=3}e=(c[e>>2]|0)+64|0;a[e>>0]=(d[e>>0]|0)&-15;l=g;return c[f>>2]|0}function Fp(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=0;while(1){b=c[d>>2]|0;if((c[e>>2]|0)>(a[(c[d>>2]|0)+68>>0]|0))break;np(c[b+120+(c[e>>2]<<2)>>2]|0);c[(c[d>>2]|0)+120+(c[e>>2]<<2)>>2]=0;c[e>>2]=(c[e>>2]|0)+1}a[b+68>>0]=-1;l=f;return}function Gp(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;f=g+4|0;d=g;c[e>>2]=b;c[f>>2]=0;b=c[e>>2]|0;if(a[(c[e>>2]|0)+69>>0]|0){d=Hp(b)|0;e=(c[e>>2]|0)+40|0;c[e>>2]=d;c[e+4>>2]=z;f=c[f>>2]|0;l=g;return f|0}h=Ip(b)|0;b=(c[e>>2]|0)+40|0;c[b>>2]=h;c[b+4>>2]=0;b=(c[e>>2]|0)+40|0;c[d>>2]=pd(c[b>>2]|0,c[b+4>>2]|0)|0;if(!(c[d>>2]|0)){c[f>>2]=7;h=c[f>>2]|0;l=g;return h|0}c[f>>2]=Jp(c[e>>2]|0,0,c[(c[e>>2]|0)+40>>2]|0,c[d>>2]|0)|0;b=c[d>>2]|0;if(!(c[f>>2]|0)){c[(c[e>>2]|0)+48>>2]=b;h=c[f>>2]|0;l=g;return h|0}else{Kd(b);h=c[f>>2]|0;l=g;return h|0}return 0}function Hp(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Lp(c[d>>2]|0);a=(c[d>>2]|0)+16|0;z=c[a+4>>2]|0;l=b;return c[a>>2]|0}function Ip(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;Lp(c[b>>2]|0);l=d;return c[(c[b>>2]|0)+16+12>>2]|0}function Jp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;e=Kp(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0,0)|0;l=f;return e|0}function Kp(b,f,g,h,i){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;C=l;l=l+80|0;x=C+68|0;y=C+64|0;z=C+60|0;A=C+56|0;B=C+52|0;j=C+48|0;k=C+44|0;m=C+40|0;n=C+36|0;o=C+32|0;p=C+28|0;q=C+24|0;r=C+20|0;s=C+16|0;t=C+12|0;u=C+8|0;v=C+4|0;w=C;c[y>>2]=b;c[z>>2]=f;c[A>>2]=g;c[B>>2]=h;c[j>>2]=i;c[m>>2]=0;c[n>>2]=0;c[o>>2]=c[(c[y>>2]|0)+120+(a[(c[y>>2]|0)+68>>0]<<2)>>2];c[p>>2]=c[(c[y>>2]|0)+4>>2];Lp(c[y>>2]|0);c[k>>2]=c[(c[y>>2]|0)+16+8>>2];if(((c[k>>2]|0)-(c[(c[o>>2]|0)+56>>2]|0)|0)>>>0>((c[(c[p>>2]|0)+36>>2]|0)-(e[(c[y>>2]|0)+16+16>>1]|0)|0)>>>0){c[x>>2]=um(62723)|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x>>2]|0;l=C;return B|0}return 0}function Lp(b){b=b|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=b;if(e[(c[f>>2]|0)+16+18>>1]|0){l=h;return}c[g>>2]=a[(c[f>>2]|0)+68>>0];b=(c[f>>2]|0)+64|0;a[b>>0]=d[b>>0]|2;Op(c[(c[f>>2]|0)+120+(c[g>>2]<<2)>>2]|0,e[(c[f>>2]|0)+80+(c[g>>2]<<1)>>1]|0,(c[f>>2]|0)+16|0);l=h;return}function Mp(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+32|0;i=n+24|0;j=n+20|0;k=n+16|0;m=n+12|0;o=n+8|0;g=n+4|0;h=n;c[j>>2]=a;c[k>>2]=b;c[m>>2]=d;c[o>>2]=e;c[g>>2]=f;do if(c[o>>2]|0){c[h>>2]=Tm(c[g>>2]|0)|0;if(!(c[h>>2]|0)){MR(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0)|0;break}c[i>>2]=c[h>>2];o=c[i>>2]|0;l=n;return o|0}else MR(c[k>>2]|0,c[j>>2]|0,c[m>>2]|0)|0;while(0);c[i>>2]=0;o=c[i>>2]|0;l=n;return o|0}function Np(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;k=s+32|0;m=s+28|0;r=s+24|0;n=s+20|0;o=s+16|0;p=s+12|0;q=s+8|0;h=s+4|0;i=s;j=s+36|0;c[k>>2]=b;c[m>>2]=e;c[r>>2]=f;c[n>>2]=g;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;if(a[(c[k>>2]|0)+17>>0]|0){c[i>>2]=(c[m>>2]|0)+1;while(1){g=hp(c[k>>2]|0,c[i>>2]|0)|0;if((g|0)==(c[i>>2]|0))e=1;else e=(c[i>>2]|0)==((((c[481]|0)>>>0)/((c[(c[k>>2]|0)+32>>2]|0)>>>0)|0)+1|0);b=c[i>>2]|0;if(!e)break;c[i>>2]=b+1}if(((b>>>0<=($m(c[k>>2]|0)|0)>>>0?(c[q>>2]=lp(c[k>>2]|0,c[i>>2]|0,j,h)|0,(c[q>>2]|0)==0):0)?(d[j>>0]|0)==4:0)?(c[h>>2]|0)==(c[m>>2]|0):0){c[o>>2]=c[i>>2];c[q>>2]=101}}if((c[q>>2]|0)==0?(c[q>>2]=op(c[k>>2]|0,c[m>>2]|0,p,(c[r>>2]|0)==0?2:0)|0,(c[q>>2]|0)==0):0)c[o>>2]=el(c[(c[p>>2]|0)+56>>2]|0)|0;c[c[n>>2]>>2]=c[o>>2];b=c[p>>2]|0;if(c[r>>2]|0){c[c[r>>2]>>2]=b;p=c[q>>2]|0;p=(p|0)==101;r=c[q>>2]|0;r=p?0:r;l=s;return r|0}else{np(b);p=c[q>>2]|0;p=(p|0)==101;r=c[q>>2]|0;r=p?0:r;l=s;return r|0}return 0}function Op(a,b,f){a=a|0;b=b|0;f=f|0;var g=0,h=0,i=0,j=0;g=l;l=l+16|0;j=g+8|0;i=g+4|0;h=g;c[j>>2]=a;c[i>>2]=b;c[h>>2]=f;ub[c[(c[j>>2]|0)+80>>2]&255](c[j>>2]|0,(c[(c[j>>2]|0)+56>>2]|0)+((e[(c[j>>2]|0)+20>>1]|0)&((d[(c[(c[j>>2]|0)+64>>2]|0)+(c[i>>2]<<1)>>0]|0)<<8|(d[(c[(c[j>>2]|0)+64>>2]|0)+(c[i>>2]<<1)+1>>0]|0)))|0,c[h>>2]|0);l=g;return}function Pp(b){b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=0;b=c[f>>2]|0;if(c[(c[f>>2]|0)+44>>2]|0){c[e>>2]=c[b+44>>2];g=c[e>>2]|0;l=h;return g|0}if(((d[b+17>>0]|0|0)==2?d[(c[f>>2]|0)+4>>0]|0|0:0)?(d[(c[f>>2]|0)+5>>0]|0|0)==1:0){a[(c[f>>2]|0)+17>>0]=1;c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}b=(c[f>>2]|0)+108|0;c[b>>2]=(c[b>>2]|0)+1;c[g>>2]=tl(c[f>>2]|0,d[(c[f>>2]|0)+20>>0]|0,1)|0;c[e>>2]=ol(c[f>>2]|0,c[g>>2]|0)|0;g=c[e>>2]|0;l=h;return g|0}function Qp(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Al(c[(c[d>>2]|0)+60>>2]|0);c[(c[d>>2]|0)+60>>2]=0;l=b;return}function Rp(b){b=b|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;f=g+4|0;h=g;c[e>>2]=b;c[f>>2]=c[(c[e>>2]|0)+4>>2];c[h>>2]=c[c[e>>2]>>2];a[(c[f>>2]|0)+19>>0]=0;if((d[(c[e>>2]|0)+8>>0]|0|0)>0?(c[(c[h>>2]|0)+160>>2]|0)>1:0){Sp(c[e>>2]|0);a[(c[e>>2]|0)+8>>0]=1;l=g;return}if(d[(c[e>>2]|0)+8>>0]|0|0?(Tp(c[e>>2]|0),h=(c[f>>2]|0)+40|0,c[h>>2]=(c[h>>2]|0)+-1,0==(c[(c[f>>2]|0)+40>>2]|0)):0)a[(c[f>>2]|0)+20>>0]=0;a[(c[e>>2]|0)+8>>0]=0;Up(c[f>>2]|0);l=g;return}function Sp(d){d=d|0;var f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+8|0;f=h+4|0;g=h;c[i>>2]=d;c[f>>2]=c[(c[i>>2]|0)+4>>2];if((c[(c[f>>2]|0)+76>>2]|0)!=(c[i>>2]|0)){l=h;return}c[(c[f>>2]|0)+76>>2]=0;i=(c[f>>2]|0)+22|0;b[i>>1]=(e[i>>1]|0)&-97;c[g>>2]=c[(c[f>>2]|0)+72>>2];while(1){if(!(c[g>>2]|0))break;a[(c[g>>2]|0)+8>>0]=1;c[g>>2]=c[(c[g>>2]|0)+12>>2]}l=h;return}function Tp(a){a=a|0;var d=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;g=i+12|0;h=i+8|0;d=i+4|0;f=i;c[g>>2]=a;c[h>>2]=c[(c[g>>2]|0)+4>>2];c[d>>2]=(c[h>>2]|0)+72;while(1){if(!(c[c[d>>2]>>2]|0))break;c[f>>2]=c[c[d>>2]>>2];a=(c[f>>2]|0)+12|0;if((c[c[f>>2]>>2]|0)!=(c[g>>2]|0)){c[d>>2]=a;continue}c[c[d>>2]>>2]=c[a>>2];if((c[(c[f>>2]|0)+4>>2]|0)==1)continue;Kd(c[f>>2]|0)}a=c[h>>2]|0;do if((c[(c[h>>2]|0)+76>>2]|0)!=(c[g>>2]|0))if((c[a+40>>2]|0)==2){d=-65;a=c[h>>2]|0;break}else{l=i;return}else{c[a+76>>2]=0;d=-97;a=c[h>>2]|0}while(0);h=a+22|0;b[h>>1]=(e[h>>1]|0)&d;l=i;return}function Up(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[b>>2]=a;if(d[(c[b>>2]|0)+20>>0]|0|0){l=f;return}if(!(c[(c[b>>2]|0)+12>>2]|0)){l=f;return}c[e>>2]=c[(c[b>>2]|0)+12>>2];c[(c[b>>2]|0)+12>>2]=0;yp(c[e>>2]|0);l=f;return}function Vp(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=c[68];if(!(c[d>>2]|0)){d=0;l=e;return d|0}d=tb[c[d>>2]&255](c[b>>2]|0)|0;l=e;return d|0}function Wp(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h+4|0;g=h;c[e>>2]=b;c[h+8>>2]=d;c[f>>2]=0;if(a[(c[e>>2]|0)+19>>0]|0){g=c[f>>2]|0;l=h;return g|0}if((c[(c[e>>2]|0)+28>>2]|0)>>>0<=0){g=c[f>>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2]=c[a>>2];c[d+4>>2]=c[a+4>>2];c[d+8>>2]=c[a+8>>2];c[d+12>>2]=c[a+12>>2];a=(c[h>>2]|0)+40|0;c[f>>2]=c[a>>2];c[f+4>>2]=c[a+4>>2];c[f+8>>2]=c[a+8>>2];c[f+12>>2]=c[a+12>>2];aq((c[h>>2]|0)+40|0);pk((c[h>>2]|0)+24|0);c[g>>2]=c[f+8>>2];while(1){if(!(c[g>>2]|0))break;Ij(0,c[(c[g>>2]|0)+8>>2]|0);c[g>>2]=c[c[g>>2]>>2]}pk(f);aq((c[h>>2]|0)+8|0);c[g>>2]=c[d+8>>2];while(1){if(!(c[g>>2]|0))break;c[i>>2]=c[(c[g>>2]|0)+8>>2];Jj(0,c[i>>2]|0);c[g>>2]=c[c[g>>2]>>2]}pk(d);pk((c[h>>2]|0)+56|0);c[(c[h>>2]|0)+72>>2]=0;if(!((e[(c[h>>2]|0)+78>>1]|0)&1)){l=j;return}k=(c[h>>2]|0)+4|0;c[k>>2]=(c[k>>2]|0)+1;k=(c[h>>2]|0)+78|0;b[k>>1]=(e[k>>1]|0)&-2;l=j;return}function Zp(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+344>>2];c[(c[b>>2]|0)+344>>2]=0;if(!(c[d>>2]|0)){l=f;return}$p(c[b>>2]|0);do{c[e>>2]=c[(c[d>>2]|0)+24>>2];Tj(c[d>>2]|0);c[d>>2]=c[e>>2]}while((c[d>>2]|0)!=0);l=f;return}function _p(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[e>>2]=2;c[d>>2]=2;while(1){if((c[d>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0))break;c[f>>2]=(c[(c[b>>2]|0)+16>>2]|0)+(c[d>>2]<<4);if(!(c[(c[f>>2]|0)+4>>2]|0)){Hd(c[b>>2]|0,c[c[f>>2]>>2]|0);c[c[f>>2]>>2]=0}else{if((c[e>>2]|0)<(c[d>>2]|0)){a=(c[(c[b>>2]|0)+16>>2]|0)+(c[e>>2]<<4)|0;h=(c[(c[b>>2]|0)+16>>2]|0)+(c[d>>2]<<4)|0;c[a>>2]=c[h>>2];c[a+4>>2]=c[h+4>>2];c[a+8>>2]=c[h+8>>2];c[a+12>>2]=c[h+12>>2]}c[e>>2]=(c[e>>2]|0)+1}c[d>>2]=(c[d>>2]|0)+1}c[(c[b>>2]|0)+20>>2]=c[e>>2];if((c[(c[b>>2]|0)+20>>2]|0)>2){l=g;return}if((c[(c[b>>2]|0)+16>>2]|0)==((c[b>>2]|0)+392|0)){l=g;return}h=(c[b>>2]|0)+392|0;f=c[(c[b>>2]|0)+16>>2]|0;c[h>>2]=c[f>>2];c[h+4>>2]=c[f+4>>2];c[h+8>>2]=c[f+8>>2];c[h+12>>2]=c[f+12>>2];c[h+16>>2]=c[f+16>>2];c[h+20>>2]=c[f+20>>2];c[h+24>>2]=c[f+24>>2];c[h+28>>2]=c[f+28>>2];Hd(c[b>>2]|0,c[(c[b>>2]|0)+16>>2]|0);c[(c[b>>2]|0)+16>>2]=(c[b>>2]|0)+392;l=g;return}function $p(a){a=a|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[f>>2]=a;c[d>>2]=c[(c[f>>2]|0)+4>>2];while(1){if(!(c[d>>2]|0))break;f=(c[d>>2]|0)+144|0;b[f>>1]=b[f>>1]&-2|1;c[d>>2]=c[(c[d>>2]|0)+8>>2]}l=e;return}function aq(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[(c[d>>2]|0)+8>>2]=0;c[(c[d>>2]|0)+4>>2]=0;c[c[d>>2]>>2]=0;c[(c[d>>2]|0)+12>>2]=0;l=b;return}function bq(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;i=n+16|0;j=n+12|0;k=n+8|0;m=n+4|0;g=n;c[j>>2]=f;if((c[(c[j>>2]|0)+44>>2]|0)>>>0>0){c[i>>2]=0;m=c[i>>2]|0;l=n;return m|0}c[k>>2]=c[(c[j>>2]|0)+12>>2];c[m>>2]=c[(c[k>>2]|0)+56>>2];c[g>>2]=Tm(c[(c[k>>2]|0)+72>>2]|0)|0;if(c[g>>2]|0){c[i>>2]=c[g>>2];m=c[i>>2]|0;l=n;return m|0}else{f=c[m>>2]|0;g=21908;h=f+16|0;do{a[f>>0]=a[g>>0]|0;f=f+1|0;g=g+1|0}while((f|0)<(h|0));a[(c[m>>2]|0)+16>>0]=(c[(c[j>>2]|0)+32>>2]|0)>>>8;a[(c[m>>2]|0)+17>>0]=(c[(c[j>>2]|0)+32>>2]|0)>>>16;a[(c[m>>2]|0)+18>>0]=1;a[(c[m>>2]|0)+19>>0]=1;a[(c[m>>2]|0)+20>>0]=(c[(c[j>>2]|0)+32>>2]|0)-(c[(c[j>>2]|0)+36>>2]|0);a[(c[m>>2]|0)+21>>0]=64;a[(c[m>>2]|0)+22>>0]=32;a[(c[m>>2]|0)+23>>0]=32;f=(c[m>>2]|0)+24|0;h=f+76|0;do{a[f>>0]=0;f=f+1|0}while((f|0)<(h|0));cq(c[k>>2]|0,13);k=(c[j>>2]|0)+22|0;b[k>>1]=e[k>>1]|0|2;Xm((c[m>>2]|0)+52|0,d[(c[j>>2]|0)+17>>0]|0);Xm((c[m>>2]|0)+64|0,d[(c[j>>2]|0)+18>>0]|0);c[(c[j>>2]|0)+44>>2]=1;a[(c[m>>2]|0)+31>>0]=1;c[i>>2]=0;m=c[i>>2]|0;l=n;return m|0}return 0}function cq(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+12|0;i=o+8|0;j=o+4|0;k=o;m=o+18|0;n=o+16|0;c[h>>2]=f;c[i>>2]=g;c[j>>2]=c[(c[h>>2]|0)+56>>2];c[k>>2]=c[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0,q=0;q=l;l=l+32|0;i=q+16|0;j=q+12|0;k=q+8|0;m=q+20|0;n=q+4|0;o=q;c[j>>2]=f;c[k>>2]=g;a[m>>0]=h;c[n>>2]=c[(c[j>>2]|0)+4>>2];if(!(a[(c[j>>2]|0)+9>>0]|0)){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}if((c[(c[n>>2]|0)+76>>2]|0)!=(c[j>>2]|0)?e[(c[n>>2]|0)+22>>1]&32|0:0){c[i>>2]=262;p=c[i>>2]|0;l=q;return p|0}c[o>>2]=c[(c[n>>2]|0)+72>>2];while(1){if(!(c[o>>2]|0)){p=15;break}if(((c[c[o>>2]>>2]|0)!=(c[j>>2]|0)?(c[(c[o>>2]|0)+4>>2]|0)==(c[k>>2]|0):0)?(d[(c[o>>2]|0)+8>>0]|0)!=(d[m>>0]|0):0)break;c[o>>2]=c[(c[o>>2]|0)+12>>2]}if((p|0)==15){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}if((d[m>>0]|0)==2){p=(c[n>>2]|0)+22|0;b[p>>1]=e[p>>1]|64}c[i>>2]=262;p=c[i>>2]|0;l=q;return p|0}function gq(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;n=r+40|0;o=r+36|0;i=r+32|0;p=r+28|0;q=r+24|0;j=r+20|0;k=r+12|0;m=r+8|0;g=r+4|0;h=r;c[o>>2]=f;c[j>>2]=0;c[i>>2]=mq(c[c[o>>2]>>2]|0)|0;if(c[i>>2]|0){c[n>>2]=c[i>>2];q=c[n>>2]|0;l=r;return q|0}c[i>>2]=op(c[o>>2]|0,1,p,0)|0;if(c[i>>2]|0){c[n>>2]=c[i>>2];q=c[n>>2]|0;l=r;return q|0}f=el((c[(c[p>>2]|0)+56>>2]|0)+28|0)|0;c[r+16>>2]=f;c[q>>2]=f;$o(c[c[o>>2]>>2]|0,j);if(!((c[q>>2]|0)!=0?!(wQ((c[(c[p>>2]|0)+56>>2]|0)+24|0,(c[(c[p>>2]|0)+56>>2]|0)+92|0,4)|0):0))c[q>>2]=c[j>>2];a:do if((c[q>>2]|0)>0){c[g>>2]=c[(c[p>>2]|0)+56>>2];c[i>>2]=26;b:do if(!(wQ(c[g>>2]|0,21908,16)|0)){if((d[(c[g>>2]|0)+18>>0]|0|0)>2){f=(c[o>>2]|0)+22|0;b[f>>1]=e[f>>1]|0|1}if((d[(c[g>>2]|0)+19>>0]|0|0)<=2){do if((d[(c[g>>2]|0)+19>>0]|0|0)==2?((e[(c[o>>2]|0)+22>>1]|0)&16|0)==0:0){c[h>>2]=0;c[i>>2]=nq(c[c[o>>2]>>2]|0,h)|0;if(c[i>>2]|0)break b;if(c[h>>2]|0){c[i>>2]=26;break}np(c[p>>2]|0);c[n>>2]=0;q=c[n>>2]|0;l=r;return q|0}while(0);if((wQ((c[g>>2]|0)+21|0,21924,3)|0)==0?(c[k>>2]=(d[(c[g>>2]|0)+16>>0]|0)<<8|(d[(c[g>>2]|0)+17>>0]|0)<<16,!(((c[k>>2]|0)>>>0>65536?1:((c[k>>2]|0)-1&c[k>>2]|0)!=0)|(c[k>>2]|0)>>>0<=256)):0){c[m>>2]=(c[k>>2]|0)-(d[(c[g>>2]|0)+20>>0]|0);if((c[k>>2]|0)!=(c[(c[o>>2]|0)+32>>2]|0)){np(c[p>>2]|0);c[(c[o>>2]|0)+36>>2]=c[m>>2];c[(c[o>>2]|0)+32>>2]=c[k>>2];Fk(c[o>>2]|0);c[i>>2]=Gk(c[c[o>>2]>>2]|0,(c[o>>2]|0)+32|0,(c[k>>2]|0)-(c[m>>2]|0)|0)|0;c[n>>2]=c[i>>2];q=c[n>>2]|0;l=r;return q|0}if((c[(c[(c[o>>2]|0)+4>>2]|0)+24>>2]&65536|0)==0?(c[q>>2]|0)>(c[j>>2]|0):0){c[i>>2]=um(61191)|0;break}if((c[m>>2]|0)>>>0>=480){c[(c[o>>2]|0)+32>>2]=c[k>>2];c[(c[o>>2]|0)+36>>2]=c[m>>2];m=(el((c[g>>2]|0)+52|0)|0)!=0;a[(c[o>>2]|0)+17>>0]=m?1:0;m=(el((c[g>>2]|0)+64|0)|0)!=0;a[(c[o>>2]|0)+18>>0]=m?1:0;break a}}}}while(0);np(c[p>>2]|0);c[(c[o>>2]|0)+12>>2]=0;c[n>>2]=c[i>>2];q=c[n>>2]|0;l=r;return q|0}while(0);b[(c[o>>2]|0)+24>>1]=(((c[(c[o>>2]|0)+36>>2]|0)-12<<6>>>0)/255|0)-23;b[(c[o>>2]|0)+26>>1]=(((c[(c[o>>2]|0)+36>>2]|0)-12<<5>>>0)/255|0)-23;b[(c[o>>2]|0)+28>>1]=(c[(c[o>>2]|0)+36>>2]|0)-35;b[(c[o>>2]|0)+30>>1]=(((c[(c[o>>2]|0)+36>>2]|0)-12<<5>>>0)/255|0)-23;f=c[o>>2]|0;if((e[(c[o>>2]|0)+24>>1]|0|0)>127)g=127;else{g=b[f+24>>1]&255;f=c[o>>2]|0}a[f+21>>0]=g;c[(c[o>>2]|0)+12>>2]=c[p>>2];c[(c[o>>2]|0)+44>>2]=c[q>>2];c[n>>2]=0;q=c[n>>2]|0;l=r;return q|0}function hq(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;h=m+16|0;i=m+12|0;j=m+8|0;g=m+4|0;k=m;c[i>>2]=b;c[j>>2]=e;c[g>>2]=f;c[k>>2]=0;if(c[(c[i>>2]|0)+44>>2]|0){c[h>>2]=c[(c[i>>2]|0)+44>>2];k=c[h>>2]|0;l=m;return k|0}a[(c[i>>2]|0)+22>>0]=c[g>>2];if((d[(c[i>>2]|0)+17>>0]|0|0)==1){g=(El(c[i>>2]|0)|0)!=0;b=c[i>>2]|0;if(!g){c[k>>2]=ro(b,2)|0;if((c[k>>2]|0)==0&(c[j>>2]|0)!=0)c[k>>2]=qo(c[i>>2]|0,4)|0}else{do if(d[b+4>>0]|0|0?Il(c[(c[i>>2]|0)+216>>2]|0,-1)|0:0){c[k>>2]=ro(c[i>>2]|0,4)|0;if(!(c[k>>2]|0)){Il(c[(c[i>>2]|0)+216>>2]|0,1)|0;break}c[h>>2]=c[k>>2];k=c[h>>2]|0;l=m;return k|0}while(0);c[k>>2]=lq(c[(c[i>>2]|0)+216>>2]|0)|0}if(!(c[k>>2]|0)){a[(c[i>>2]|0)+17>>0]=2;c[(c[i>>2]|0)+40>>2]=c[(c[i>>2]|0)+28>>2];c[(c[i>>2]|0)+36>>2]=c[(c[i>>2]|0)+28>>2];c[(c[i>>2]|0)+32>>2]=c[(c[i>>2]|0)+28>>2];j=(c[i>>2]|0)+80|0;c[j>>2]=0;c[j+4>>2]=0}}c[h>>2]=c[k>>2];k=c[h>>2]|0;l=m;return k|0}function iq(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;if((c[g>>2]|0)>(c[(c[f>>2]|0)+104>>2]|0)?d[(c[f>>2]|0)+6>>0]|0|0:0){c[e>>2]=jq(c[f>>2]|0,c[g>>2]|0)|0;g=c[e>>2]|0;l=h;return g|0}c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}function jq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;i=k+24|0;e=k+20|0;f=k+16|0;j=k+12|0;d=k+8|0;g=k+4|0;h=k;c[e>>2]=a;c[f>>2]=b;c[j>>2]=0;c[d>>2]=c[(c[e>>2]|0)+104>>2];c[h>>2]=Sd(c[(c[e>>2]|0)+100>>2]|0,(c[f>>2]|0)*48|0,0)|0;if(!(c[h>>2]|0)){c[i>>2]=7;j=c[i>>2]|0;l=k;return j|0}GR((c[h>>2]|0)+((c[d>>2]|0)*48|0)|0,0,((c[f>>2]|0)-(c[d>>2]|0)|0)*48|0)|0;c[(c[e>>2]|0)+100>>2]=c[h>>2];c[g>>2]=c[d>>2];while(1){if((c[g>>2]|0)>=(c[f>>2]|0)){a=14;break}c[(c[h>>2]|0)+((c[g>>2]|0)*48|0)+20>>2]=c[(c[e>>2]|0)+28>>2];if(c[c[(c[e>>2]|0)+68>>2]>>2]|0?(d=(c[e>>2]|0)+80|0,b=c[d+4>>2]|0,(b|0)>0|(b|0)==0&(c[d>>2]|0)>>>0>0):0){d=(c[e>>2]|0)+80|0;a=(c[h>>2]|0)+((c[g>>2]|0)*48|0)|0;b=c[d>>2]|0;d=c[d+4>>2]|0}else{a=(c[h>>2]|0)+((c[g>>2]|0)*48|0)|0;b=c[(c[e>>2]|0)+156>>2]|0;d=0}c[a>>2]=b;c[a+4>>2]=d;c[(c[h>>2]|0)+((c[g>>2]|0)*48|0)+24>>2]=c[(c[e>>2]|0)+56>>2];d=hn(c[(c[e>>2]|0)+28>>2]|0)|0;c[(c[h>>2]|0)+((c[g>>2]|0)*48|0)+16>>2]=d;if(!(c[(c[h>>2]|0)+((c[g>>2]|0)*48|0)+16>>2]|0)){a=10;break}if(El(c[e>>2]|0)|0)kq(c[(c[e>>2]|0)+216>>2]|0,(c[h>>2]|0)+((c[g>>2]|0)*48|0)+28|0);c[(c[e>>2]|0)+104>>2]=(c[g>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+1}if((a|0)==10){c[i>>2]=7;j=c[i>>2]|0;l=k;return j|0}else if((a|0)==14){c[i>>2]=c[j>>2];j=c[i>>2]|0;l=k;return j|0}return 0}function kq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;c[c[e>>2]>>2]=c[(c[f>>2]|0)+52+16>>2];c[(c[e>>2]|0)+4>>2]=c[(c[f>>2]|0)+52+24>>2];c[(c[e>>2]|0)+8>>2]=c[(c[f>>2]|0)+52+24+4>>2];c[(c[e>>2]|0)+12>>2]=c[(c[f>>2]|0)+112>>2];l=d;return}function lq(b){b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8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>>2]|0)+68>>2]|0)}b=c[n>>2]|0;if(c[c[(c[n>>2]|0)+68>>2]>>2]|0){c[o>>2]=nl(b)|0;if(!(c[o>>2]|0)){c[o>>2]=$l(c[n>>2]|0,((a[(c[n>>2]|0)+13>>0]|0)!=0^1)&1)|0;a[(c[n>>2]|0)+17>>0]=0}}else if(!(a[b+4>>0]|0))Jl(c[n>>2]|0,1)|0;if(c[o>>2]|0){ol(c[n>>2]|0,c[o>>2]|0)|0;break}}if((a[(c[n>>2]|0)+13>>0]|0)==0?d[(c[n>>2]|0)+24>>0]|0:0){c[j>>2]=0;c[o>>2]=tq(c[n>>2]|0,j)|0;if(c[o>>2]|0)break;if((c[j>>2]|0)>>>0>0){c[o>>2]=km(c[(c[n>>2]|0)+64>>2]|0,m,16,24,0)|0;if((c[o>>2]|0)!=0&(c[o>>2]|0)!=522)break}else{b=m;e=b+16|0;do{a[b>>0]=0;b=b+1|0}while((b|0)<(e|0))}if(wQ((c[n>>2]|0)+112|0,m,16)|0)Kk(c[n>>2]|0)}c[o>>2]=uq(c[n>>2]|0)|0;k=32}}}else k=32;while(0);if((k|0)==32){if(El(c[n>>2]|0)|0)c[o>>2]=vq(c[n>>2]|0)|0;if((d[(c[n>>2]|0)+13>>0]|0)==0?((c[o>>2]|0)==0?(d[(c[n>>2]|0)+17>>0]|0)==0:0):0)c[o>>2]=tq(c[n>>2]|0,(c[n>>2]|0)+28|0)|0}b=c[n>>2]|0;if(c[o>>2]|0){ml(b);o=c[o>>2]|0;l=p;return o|0}else{a[b+17>>0]=1;a[(c[n>>2]|0)+24>>0]=1;o=c[o>>2]|0;l=p;return o|0}return 0}function nq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;e=j+12|0;f=j+8|0;g=j+4|0;h=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;do if(!(a[(c[f>>2]|0)+13>>0]|0)?!(c[(c[f>>2]|0)+216>>2]|0):0)if(oq(c[f>>2]|0)|0){ql(c[(c[f>>2]|0)+68>>2]|0);c[h>>2]=pq(c[f>>2]|0)|0;if(c[h>>2]|0)break;a[(c[f>>2]|0)+5>>0]=5;a[(c[f>>2]|0)+17>>0]=0;break}else{c[e>>2]=14;i=c[e>>2]|0;l=j;return i|0}else i=7;while(0);if((i|0)==7)c[c[g>>2]>>2]=1;c[e>>2]=c[h>>2];i=c[e>>2]|0;l=j;return i|0}function oq(b){b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;e=h+4|0;f=h;c[e>>2]=b;c[f>>2]=c[c[(c[e>>2]|0)+64>>2]>>2];if(a[(c[e>>2]|0)+14>>0]|0){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}if(!(d[(c[e>>2]|0)+4>>0]|0))if((c[c[f>>2]>>2]|0)>=2)b=(c[(c[f>>2]|0)+52>>2]|0)!=0;else b=0;else b=1;c[g>>2]=b&1;g=c[g>>2]|0;l=h;return g|0}function pq(b){b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=0;if(a[(c[e>>2]|0)+4>>0]|0)c[f>>2]=qq(c[e>>2]|0)|0;if(c[f>>2]|0){e=c[e>>2]|0;Nk(e);f=c[f>>2]|0;l=g;return f|0}b=(c[e>>2]|0)+168|0;c[f>>2]=rq(c[c[e>>2]>>2]|0,c[(c[e>>2]|0)+64>>2]|0,c[(c[e>>2]|0)+220>>2]|0,d[(c[e>>2]|0)+4>>0]|0,c[b>>2]|0,c[b+4>>2]|0,(c[e>>2]|0)+216|0)|0;e=c[e>>2]|0;Nk(e);f=c[f>>2]|0;l=g;return f|0}function qq(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=ro(c[b>>2]|0,4)|0;if(c[d>>2]|0)Jl(c[b>>2]|0,1)|0;l=e;return c[d>>2]|0}function rq(d,e,f,g,h,i,j){d=d|0;e=e|0;f=f|0;g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>2]>>2]=1;c[k>>2]=0;p=c[k>>2]|0;l=q;return p|0}return 0}function tq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;d=j+24|0;e=j+20|0;f=j+16|0;g=j+12|0;h=j;i=j+8|0;c[e>>2]=a;c[f>>2]=b;c[g>>2]=xq(c[(c[e>>2]|0)+216>>2]|0)|0;do if((c[g>>2]|0)==0?c[c[(c[e>>2]|0)+64>>2]>>2]|0:0){b=h;c[b>>2]=0;c[b+4>>2]=0;c[i>>2]=Ik(c[(c[e>>2]|0)+64>>2]|0,h)|0;if(!(c[i>>2]|0)){i=h;h=c[(c[e>>2]|0)+160>>2]|0;h=IR(c[i>>2]|0,c[i+4>>2]|0,h|0,((h|0)<0)<<31>>31|0)|0;h=FR(h|0,z|0,1,0)|0;i=c[(c[e>>2]|0)+160>>2]|0;i=LR(h|0,z|0,i|0,((i|0)<0)<<31>>31|0)|0;c[g>>2]=i;break}c[d>>2]=c[i>>2];i=c[d>>2]|0;l=j;return i|0}while(0);if((c[g>>2]|0)>>>0>(c[(c[e>>2]|0)+164>>2]|0)>>>0)c[(c[e>>2]|0)+164>>2]=c[g>>2];c[c[f>>2]>>2]=c[g>>2];c[d>>2]=0;i=c[d>>2]|0;l=j;return i|0}function uq(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k+12|0;i=k+8|0;j=k+4|0;f=k;c[h>>2]=b;c[i>>2]=0;do if(!(a[(c[h>>2]|0)+13>>0]|0)){c[i>>2]=tq(c[h>>2]|0,f)|0;if(c[i>>2]|0){c[g>>2]=c[i>>2];j=c[g>>2]|0;l=k;return j|0}b=c[c[h>>2]>>2]|0;e=c[(c[h>>2]|0)+220>>2]|0;if(!(c[f>>2]|0)){f=zl(b,e,0)|0;c[i>>2]=f;c[i>>2]=(c[i>>2]|0)==5898?0:f;c[j>>2]=0}else c[i>>2]=bm(b,e,0,j)|0;if(!(c[i>>2]|0)){b=c[h>>2]|0;if(c[j>>2]|0){c[i>>2]=nq(b,0)|0;break}if((d[b+5>>0]|0)==5)a[(c[h>>2]|0)+5>>0]=0}}while(0);c[g>>2]=c[i>>2];j=c[g>>2]|0;l=k;return j|0}function vq(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;b=e+8|0;d=e+4|0;f=e;c[b>>2]=a;c[f>>2]=0;Dn(c[(c[b>>2]|0)+216>>2]|0);c[d>>2]=wq(c[(c[b>>2]|0)+216>>2]|0,f)|0;if(!((c[d>>2]|0)!=0|(c[f>>2]|0)!=0)){f=c[d>>2]|0;l=e;return f|0}Kk(c[b>>2]|0);f=c[d>>2]|0;l=e;return f|0}function wq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;c[g>>2]=0;do{i=c[d>>2]|0;a=c[e>>2]|0;b=(c[g>>2]|0)+1|0;c[g>>2]=b;c[f>>2]=yo(i,a,0,b)|0}while((c[f>>2]|0)==-1);l=h;return c[f>>2]|0}function xq(a){a=a|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[e>>2]=a;if(c[e>>2]|0?(b[(c[e>>2]|0)+40>>1]|0)>=0:0){c[d>>2]=c[(c[e>>2]|0)+52+20>>2];e=c[d>>2]|0;l=f;return e|0}c[d>>2]=0;e=c[d>>2]|0;l=f;return e|0}function yq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=yb[c[(c[c[f>>2]>>2]|0)+36>>2]&255](c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function zq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;d=h+16|0;e=h+12|0;b=h+8|0;f=h+4|0;g=h;c[e>>2]=a;if(!(c[e>>2]|0)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0;l=q;return p|0}c[g>>2]=sl(c[c[n>>2]>>2]|0)|0;if(c[g>>2]|0)c[m>>2]=c[g>>2];if(!(op(c[n>>2]|0,1,o,0)|0)){c[h>>2]=el((c[(c[o>>2]|0)+56>>2]|0)+28|0)|0;if(!(c[h>>2]|0))$o(c[c[n>>2]>>2]|0,h);c[(c[n>>2]|0)+44>>2]=c[h>>2];np(c[o>>2]|0)}a[(c[n>>2]|0)+20>>0]=1;Qp(c[n>>2]|0);p=c[i>>2]|0;Rp(p);p=c[m>>2]|0;l=q;return p|0}function Bq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[d>>2]=b;if((c[(c[d>>2]|0)+84>>2]|0)!=1691352191){l=m;return}if(Cq(c[d>>2]|0)|0){l=m;return}Dq(c[d>>2]|0,0);Eq(c[d>>2]|0);c[f>>2]=0;while(1){b=c[(c[d>>2]|0)+16>>2]|0;if((c[f>>2]|0)>=(c[(c[d>>2]|0)+20>>2]|0))break;c[g>>2]=b+(c[f>>2]<<4);if(c[(c[g>>2]|0)+4>>2]|0?(Fq(c[(c[g>>2]|0)+4>>2]|0)|0,c[(c[g>>2]|0)+4>>2]=0,(c[f>>2]|0)!=1):0)c[(c[g>>2]|0)+12>>2]=0;c[f>>2]=(c[f>>2]|0)+1}if(c[b+16+12>>2]|0)Yp(c[(c[(c[d>>2]|0)+16>>2]|0)+16+12>>2]|0);Zp(c[d>>2]|0);_p(c[d>>2]|0);c[e>>2]=c[(c[d>>2]|0)+348+8>>2];while(1){if(!(c[e>>2]|0))break;c[i>>2]=c[(c[e>>2]|0)+8>>2];do{Gq(c[d>>2]|0,c[i>>2]|0);c[h>>2]=c[(c[i>>2]|0)+8>>2];Hd(c[d>>2]|0,c[i>>2]|0);c[i>>2]=c[h>>2]}while((c[i>>2]|0)!=0);c[e>>2]=c[c[e>>2]>>2]}pk((c[d>>2]|0)+348|0);c[e>>2]=c[(c[d>>2]|0)+364+8>>2];while(1){if(!(c[e>>2]|0))break;c[j>>2]=c[(c[e>>2]|0)+8>>2];c[f>>2]=0;while(1){if((c[f>>2]|0)>=3)break;if(c[(c[j>>2]|0)+((c[f>>2]|0)*20|0)+16>>2]|0)qb[c[(c[j>>2]|0)+((c[f>>2]|0)*20|0)+16>>2]&255](c[(c[j>>2]|0)+((c[f>>2]|0)*20|0)+8>>2]|0);c[f>>2]=(c[f>>2]|0)+1}Hd(c[d>>2]|0,c[j>>2]|0);c[e>>2]=c[c[e>>2]>>2]}pk((c[d>>2]|0)+364|0);c[e>>2]=c[(c[d>>2]|0)+320+8>>2];while(1){if(!(c[e>>2]|0))break;c[k>>2]=c[(c[e>>2]|0)+8>>2];if(c[(c[k>>2]|0)+12>>2]|0)qb[c[(c[k>>2]|0)+12>>2]&255](c[(c[k>>2]|0)+8>>2]|0);Hq(c[d>>2]|0,c[k>>2]|0);Hd(c[d>>2]|0,c[k>>2]|0);c[e>>2]=c[c[e>>2]>>2]}pk((c[d>>2]|0)+320|0);wk(c[d>>2]|0,0);Rj(c[(c[d>>2]|0)+244>>2]|0);c[(c[d>>2]|0)+84>>2]=-1254786768;Hd(c[d>>2]|0,c[(c[(c[d>>2]|0)+16>>2]|0)+16+12>>2]|0);c[(c[d>>2]|0)+84>>2]=-1623446221;if(a[(c[d>>2]|0)+256+6>>0]|0)Kd(c[(c[d>>2]|0)+256+32>>2]|0);Kd(c[d>>2]|0);l=m;return}function Cq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;f=g+12|0;b=g+8|0;d=g+4|0;e=g;c[b>>2]=a;if(c[(c[b>>2]|0)+4>>2]|0){c[f>>2]=1;f=c[f>>2]|0;l=g;return f|0}c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[(c[b>>2]|0)+20>>2]|0)){a=9;break}c[e>>2]=c[(c[(c[b>>2]|0)+16>>2]|0)+(c[d>>2]<<4)+4>>2];if(c[e>>2]|0?Oq(c[e>>2]|0)|0:0){a=7;break}c[d>>2]=(c[d>>2]|0)+1}if((a|0)==7){c[f>>2]=1;f=c[f>>2]|0;l=g;return f|0}else if((a|0)==9){c[f>>2]=0;f=c[f>>2]|0;l=g;return f|0}return 0}function Dq(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=b;c[g>>2]=e;c[i>>2]=0;zg();Gj(c[f>>2]|0);if(c[(c[f>>2]|0)+24>>2]&2|0)b=(d[(c[f>>2]|0)+148+5>>0]|0)==0;else b=0;c[j>>2]=b&1;c[h>>2]=0;while(1){b=c[f>>2]|0;if((c[h>>2]|0)>=(c[(c[f>>2]|0)+20>>2]|0))break;c[k>>2]=c[(c[b+16>>2]|0)+(c[h>>2]<<4)+4>>2];if(c[k>>2]|0){if(Lq(c[k>>2]|0)|0)c[i>>2]=1;Aq(c[k>>2]|0,c[g>>2]|0,((c[j>>2]|0)!=0^1)&1)|0}c[h>>2]=(c[h>>2]|0)+1}Mq(b)|0;Bg();if(c[(c[f>>2]|0)+24>>2]&2|0?(d[(c[f>>2]|0)+148+5>>0]|0)==0:0){$p(c[f>>2]|0);Yo(c[f>>2]|0)}k=(c[f>>2]|0)+440|0;c[k>>2]=0;c[k+4>>2]=0;k=(c[f>>2]|0)+448|0;c[k>>2]=0;c[k+4>>2]=0;k=(c[f>>2]|0)+24|0;c[k>>2]=c[k>>2]&-33554433;if(!(c[(c[f>>2]|0)+212>>2]|0)){l=m;return}if((c[i>>2]|0)==0?a[(c[f>>2]|0)+67>>0]|0:0){l=m;return}qb[c[(c[f>>2]|0)+212>>2]&255](c[(c[f>>2]|0)+208>>2]|0);l=m;return}function Eq(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;while(1){b=c[d>>2]|0;if(!(c[(c[d>>2]|0)+424>>2]|0))break;c[e>>2]=c[b+424>>2];c[(c[d>>2]|0)+424>>2]=c[(c[e>>2]|0)+24>>2];Hd(c[d>>2]|0,c[e>>2]|0)}c[b+432>>2]=0;c[(c[d>>2]|0)+436>>2]=0;a[(c[d>>2]|0)+75>>0]=0;l=f;return}function Fq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=b;c[e>>2]=c[(c[d>>2]|0)+4>>2];Ek(c[d>>2]|0);c[f>>2]=c[(c[e>>2]|0)+8>>2];while(1){if(!(c[f>>2]|0))break;c[g>>2]=c[f>>2];c[f>>2]=c[(c[f>>2]|0)+8>>2];if((c[c[g>>2]>>2]|0)!=(c[d>>2]|0))continue;Iq(c[g>>2]|0)|0}Aq(c[d>>2]|0,0,0)|0;if(!(a[(c[d>>2]|0)+9>>0]|0?!(Jq(c[e>>2]|0)|0):0)){fl(c[c[e>>2]>>2]|0)|0;if(c[(c[e>>2]|0)+52>>2]|0?c[(c[e>>2]|0)+48>>2]|0:0)qb[c[(c[e>>2]|0)+52>>2]&255](c[(c[e>>2]|0)+48>>2]|0);Hd(0,c[(c[e>>2]|0)+48>>2]|0);Fk(c[e>>2]|0);Kd(c[e>>2]|0)}if(c[(c[d>>2]|0)+28>>2]|0)c[(c[(c[d>>2]|0)+28>>2]|0)+24>>2]=c[(c[d>>2]|0)+24>>2];if(!(c[(c[d>>2]|0)+24>>2]|0)){g=c[d>>2]|0;Kd(g);l=h;return 0}c[(c[(c[d>>2]|0)+24>>2]|0)+28>>2]=c[(c[d>>2]|0)+28>>2];g=c[d>>2]|0;Kd(g);l=h;return 0}function Gq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;c[e>>2]=c[(c[g>>2]|0)+24>>2];if(!(c[e>>2]|0)){l=f;return}g=c[e>>2]|0;c[g>>2]=(c[g>>2]|0)+-1;if(c[c[e>>2]>>2]|0){l=f;return}qb[c[(c[e>>2]|0)+4>>2]&255](c[(c[e>>2]|0)+8>>2]|0);Hd(c[d>>2]|0,c[e>>2]|0);l=f;return}function Hq(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=e;c[h>>2]=c[(c[g>>2]|0)+16>>2];if(!(c[h>>2]|0)){l=i;return}e=(c[h>>2]|0)+42|0;a[e>>0]=d[e>>0]|0|2;Jj(c[f>>2]|0,c[h>>2]|0);c[(c[g>>2]|0)+16>>2]=0;l=i;return}function Iq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[d>>2]=b;c[e>>2]=c[c[d>>2]>>2];if(!(c[e>>2]|0)){l=i;return 0}c[g>>2]=c[(c[d>>2]|0)+4>>2];Ek(c[e>>2]|0);Kq(c[d>>2]|0);a:do if((c[(c[g>>2]|0)+8>>2]|0)==(c[d>>2]|0))c[(c[g>>2]|0)+8>>2]=c[(c[d>>2]|0)+8>>2];else{c[h>>2]=c[(c[g>>2]|0)+8>>2];while(1){if((c[(c[h>>2]|0)+8>>2]|0)==(c[d>>2]|0))break;c[h>>2]=c[(c[h>>2]|0)+8>>2];if(!(c[h>>2]|0))break a}c[(c[h>>2]|0)+8>>2]=c[(c[d>>2]|0)+8>>2]}while(0);c[f>>2]=0;while(1){if((c[f>>2]|0)>(a[(c[d>>2]|0)+68>>0]|0))break;np(c[(c[d>>2]|0)+120+(c[f>>2]<<2)>>2]|0);c[f>>2]=(c[f>>2]|0)+1}Up(c[g>>2]|0);Kd(c[(c[d>>2]|0)+12>>2]|0);l=i;return 0}function Jq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[f>>2]=0;b=(c[d>>2]|0)+64|0;c[b>>2]=(c[b>>2]|0)+-1;if((c[(c[d>>2]|0)+64>>2]|0)>0){f=c[f>>2]|0;l=g;return f|0}if((c[11758]|0)!=(c[d>>2]|0)){c[e>>2]=c[11758];while(1){if(c[e>>2]|0)b=(c[(c[e>>2]|0)+68>>2]|0)!=(c[d>>2]|0);else b=0;a=c[e>>2]|0;if(!b)break;c[e>>2]=c[a+68>>2]}if(a|0)c[(c[e>>2]|0)+68>>2]=c[(c[d>>2]|0)+68>>2]}else c[11758]=c[(c[d>>2]|0)+68>>2];c[f>>2]=1;f=c[f>>2]|0;l=g;return f|0}function Kq(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;Kd(c[(c[e>>2]|0)+48>>2]|0);c[(c[e>>2]|0)+48>>2]=0;a[(c[e>>2]|0)+66>>0]=0;l=d;return}function Lq(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if(!(c[b>>2]|0)){b=0;b=b&1;l=e;return b|0}b=(d[(c[b>>2]|0)+8>>0]|0|0)==2;b=b&1;l=e;return b|0}function Mq(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Nq(c[d>>2]|0,68);l=b;return 0}function Nq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[d>>2]=a;c[e>>2]=b;if(!(c[(c[d>>2]|0)+340>>2]|0)){l=k;return}c[g>>2]=c[(c[d>>2]|0)+340>>2];c[(c[d>>2]|0)+340>>2]=0;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[d>>2]|0)+316>>2]|0))break;c[h>>2]=c[(c[g>>2]|0)+(c[f>>2]<<2)>>2];c[i>>2]=c[(c[h>>2]|0)+8>>2];if(c[i>>2]|0?(c[j>>2]=c[(c[c[i>>2]>>2]|0)+(c[e>>2]|0)>>2],c[j>>2]|0):0)tb[c[j>>2]&255](c[i>>2]|0)|0;c[(c[h>>2]|0)+20>>2]=0;Tj(c[h>>2]|0);c[f>>2]=(c[f>>2]|0)+1}Hd(c[d>>2]|0,c[g>>2]|0);c[(c[d>>2]|0)+316>>2]=0;l=k;return}function Oq(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return (c[(c[b>>2]|0)+16>>2]|0)!=0|0}function Pq(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;g=o+20|0;h=o+16|0;i=o+12|0;j=o+8|0;k=o+4|0;m=o;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;c[k>>2]=0;if(!(c[g>>2]|0)){n=c[k>>2]|0;l=o;return n|0}Ek(c[g>>2]|0);c[j>>2]=c[(c[(c[g>>2]|0)+4>>2]|0)+8>>2];a:while(1){if(!(c[j>>2]|0)){n=15;break}do if(c[i>>2]|0?(d[(c[j>>2]|0)+64>>0]&1|0)==0:0){if((d[(c[j>>2]|0)+66>>0]|0)!=1?(d[(c[j>>2]|0)+66>>0]|0)!=2:0)break;c[k>>2]=Ep(c[j>>2]|0)|0;if(c[k>>2]|0)break a}else n=10;while(0);if((n|0)==10){n=0;Kq(c[j>>2]|0);a[(c[j>>2]|0)+66>>0]=4;c[(c[j>>2]|0)+60>>2]=c[h>>2]}c[m>>2]=0;while(1){b=c[j>>2]|0;if((c[m>>2]|0)>(a[(c[j>>2]|0)+68>>0]|0))break;np(c[b+120+(c[m>>2]<<2)>>2]|0);c[(c[j>>2]|0)+120+(c[m>>2]<<2)>>2]=0;c[m>>2]=(c[m>>2]|0)+1}c[j>>2]=c[b+8>>2]}if((n|0)==15){n=c[k>>2]|0;l=o;return n|0}Pq(c[g>>2]|0,c[k>>2]|0,0)|0;n=c[k>>2]|0;l=o;return n|0}function Qq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;b=h+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;if(!(c[d>>2]|0))c[e>>2]=0;else{c[f>>2]=c[d>>2];c[g>>2]=c[c[f>>2]>>2];if(Rq(c[f>>2]|0)|0){c[b>>2]=cd(75223)|0;g=c[b>>2]|0;l=h;return g|0}d=(c[f>>2]|0)+128|0;a=c[d+4>>2]|0;if((a|0)>0|(a|0)==0&(c[d>>2]|0)>>>0>0)Sq(c[g>>2]|0,c[f>>2]|0);c[e>>2]=Tq(c[f>>2]|0)|0;c[e>>2]=Uq(c[g>>2]|0,c[e>>2]|0)|0;Bq(c[g>>2]|0)}c[b>>2]=c[e>>2];g=c[b>>2]|0;l=h;return g|0}function Rq(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;b=d+8|0;e=d+4|0;c[e>>2]=a;if(!(c[c[e>>2]>>2]|0)){hd(21,22022,d);c[b>>2]=1;e=c[b>>2]|0;l=d;return e|0}else{c[b>>2]=0;e=c[b>>2]|0;l=d;return e|0}return 0}function Sq(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+32|0;e=h+20|0;f=h+16|0;i=h+8|0;g=h;c[e>>2]=a;c[f>>2]=b;uj(c[c[e>>2]>>2]|0,i)|0;b=i;a=(c[f>>2]|0)+128|0;a=FR(c[b>>2]|0,c[b+4>>2]|0,c[a>>2]|0,c[a+4>>2]|0)|0;a=RR(a|0,z|0,1e6,0)|0;b=g;c[b>>2]=a;c[b+4>>2]=z;if(c[(c[e>>2]|0)+192>>2]|0){i=g;Ab[c[(c[e>>2]|0)+192>>2]&255](c[(c[e>>2]|0)+196>>2]|0,c[(c[f>>2]|0)+176>>2]|0,c[i>>2]|0,c[i+4>>2]|0)}if(!((d[(c[e>>2]|0)+76>>0]|0)&2)){i=c[f>>2]|0;i=i+128|0;g=i;c[g>>2]=0;i=i+4|0;c[i>>2]=0;l=h;return}wb[c[(c[e>>2]|0)+184>>2]&255](2,c[(c[e>>2]|0)+188>>2]|0,c[f>>2]|0,g)|0;i=c[f>>2]|0;i=i+128|0;g=i;c[g>>2]=0;i=i+4|0;c[i>>2]=0;l=h;return}function Tq(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=0;if(!((c[(c[b>>2]|0)+20>>2]|0)!=770837923?(c[(c[b>>2]|0)+20>>2]|0)!=832317811:0))c[d>>2]=Xq(c[b>>2]|0)|0;Yq(c[b>>2]|0);l=e;return c[d>>2]|0}function Uq(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;if((c[g>>2]|0)==3082?1:(d[(c[f>>2]|0)+69>>0]|0|0)!=0){c[e>>2]=Vq(c[f>>2]|0)|0;g=c[e>>2]|0;l=h;return g|0}else{c[e>>2]=c[g>>2]&c[(c[f>>2]|0)+56>>2];g=c[e>>2]|0;l=h;return g|0}return 0}function Vq(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Wq(c[d>>2]|0);wk(c[d>>2]|0,7);l=b;return 7}function Wq(b){b=b|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=b;if(!(d[(c[e>>2]|0)+69>>0]|0)){l=f;return}if(c[(c[e>>2]|0)+168>>2]|0){l=f;return}a[(c[e>>2]|0)+69>>0]=0;c[(c[e>>2]|0)+248>>2]=0;e=(c[e>>2]|0)+256|0;c[e>>2]=(c[e>>2]|0)+-1;l=f;return}function Xq(a){a=a|0;var d=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+16|0;g=h;d=h+8|0;f=h+4|0;c[d>>2]=a;c[f>>2]=c[c[d>>2]>>2];Zq(c[d>>2]|0)|0;a=c[d>>2]|0;if((c[(c[d>>2]|0)+36>>2]|0)>=0){_q(a)|0;Hd(c[f>>2]|0,c[(c[d>>2]|0)+108>>2]|0);c[(c[d>>2]|0)+108>>2]=0;if((e[(c[d>>2]|0)+144>>1]|0)>>>5&1|0){g=(c[d>>2]|0)+144|0;b[g>>1]=b[g>>1]&-2|1}}else if(c[a+40>>2]|0?b[(c[d>>2]|0)+144>>1]&1|0:0){j=c[f>>2]|0;i=c[(c[d>>2]|0)+40>>2]|0;a=c[(c[d>>2]|0)+108>>2]|0?18130:0;c[g>>2]=c[(c[d>>2]|0)+108>>2];vk(j,i,a,g);Hd(c[f>>2]|0,c[(c[d>>2]|0)+108>>2]|0);c[(c[d>>2]|0)+108>>2]=0}$q(c[d>>2]|0);j=(c[d>>2]|0)+56|0;c[j>>2]=0;c[j+4>>2]=0;c[(c[d>>2]|0)+20>>2]=1224384374;l=h;return c[(c[d>>2]|0)+40>>2]&c[(c[f>>2]|0)+56>>2]|0}function Yq(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(!(c[b>>2]|0)){l=e;return}c[d>>2]=c[c[b>>2]>>2];Kj(c[d>>2]|0,c[b>>2]|0);a=c[(c[b>>2]|0)+8>>2]|0;if(c[(c[b>>2]|0)+4>>2]|0)c[(c[(c[b>>2]|0)+4>>2]|0)+8>>2]=a;else c[(c[d>>2]|0)+4>>2]=a;if(c[(c[b>>2]|0)+8>>2]|0)c[(c[(c[b>>2]|0)+8>>2]|0)+4>>2]=c[(c[b>>2]|0)+4>>2];c[(c[b>>2]|0)+20>>2]=1443283912;c[c[b>>2]>>2]=0;Hd(c[d>>2]|0,c[b>>2]|0);l=e;return}function Zq(b){b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;j=o+24|0;k=o+20|0;f=o+16|0;m=o+12|0;g=o+8|0;n=o+4|0;h=o;c[k>>2]=b;c[m>>2]=c[c[k>>2]>>2];if(a[(c[m>>2]|0)+69>>0]|0)c[(c[k>>2]|0)+40>>2]=7;ar(c[k>>2]|0);if((c[(c[k>>2]|0)+20>>2]|0)!=770837923){c[j>>2]=0;n=c[j>>2]|0;l=o;return n|0}if((c[(c[k>>2]|0)+36>>2]|0)>=0?(e[(c[k>>2]|0)+144>>1]|0)>>>8&1|0:0){c[n>>2]=0;br(c[k>>2]|0);c[g>>2]=c[(c[k>>2]|0)+40>>2]&255;if((c[g>>2]|0)==7|(c[g>>2]|0)==10|(c[g>>2]|0)==9)b=1;else b=(c[g>>2]|0)==13;c[h>>2]=b&1;do if(c[h>>2]|0?((c[g>>2]|0)!=9?1:((e[(c[k>>2]|0)+144>>1]|0)>>>7&1|0)==0):0){if((c[g>>2]|0)==7|(c[g>>2]|0)==13?(e[(c[k>>2]|0)+144>>1]|0)>>>6&1|0:0){c[n>>2]=2;break}Dq(c[m>>2]|0,516);Eq(c[m>>2]|0);a[(c[m>>2]|0)+67>>0]=1;c[(c[k>>2]|0)+44>>2]=0}while(0);if(!(c[(c[k>>2]|0)+40>>2]|0))cr(c[k>>2]|0,0)|0;if((c[(c[m>>2]|0)+316>>2]|0)>0?(c[(c[m>>2]|0)+340>>2]|0)==0:0)i=36;else if(d[(c[m>>2]|0)+67>>0]|0?(c[(c[m>>2]|0)+164>>2]|0)==(((e[(c[k>>2]|0)+144>>1]|0)>>>7&1|0)==0|0):0){if((c[(c[k>>2]|0)+40>>2]|0)!=0?(c[h>>2]|0?1:(d[(c[k>>2]|0)+142>>0]|0)!=3):0){Dq(c[m>>2]|0,0);c[(c[k>>2]|0)+44>>2]=0}else i=23;do if((i|0)==23){c[f>>2]=cr(c[k>>2]|0,1)|0;do if(c[f>>2]|0){if(!((e[(c[k>>2]|0)+144>>1]|0)>>>7&1)){c[f>>2]=787;break}c[j>>2]=1;n=c[j>>2]|0;l=o;return n|0}else c[f>>2]=dr(c[m>>2]|0,c[k>>2]|0)|0;while(0);if((c[f>>2]|0)==5?(e[(c[k>>2]|0)+144>>1]|0)>>>7&1|0:0){c[j>>2]=5;n=c[j>>2]|0;l=o;return n|0}if(c[f>>2]|0){c[(c[k>>2]|0)+40>>2]=c[f>>2];Dq(c[m>>2]|0,0);c[(c[k>>2]|0)+44>>2]=0;break}else{h=(c[m>>2]|0)+440|0;c[h>>2]=0;c[h+4>>2]=0;h=(c[m>>2]|0)+448|0;c[h>>2]=0;c[h+4>>2]=0;h=(c[m>>2]|0)+24|0;c[h>>2]=c[h>>2]&-33554433;er(c[m>>2]|0);break}}while(0);c[(c[m>>2]|0)+436>>2]=0}else i=36;do if((i|0)==36?(c[n>>2]|0)==0:0){if(c[(c[k>>2]|0)+40>>2]|0?(d[(c[k>>2]|0)+142>>0]|0)!=3:0)if((d[(c[k>>2]|0)+142>>0]|0)==2){c[n>>2]=2;break}else{Dq(c[m>>2]|0,516);Eq(c[m>>2]|0);a[(c[m>>2]|0)+67>>0]=1;c[(c[k>>2]|0)+44>>2]=0;break}c[n>>2]=1}while(0);if(c[n>>2]|0?(c[f>>2]=fr(c[k>>2]|0,c[n>>2]|0)|0,c[f>>2]|0):0){if(!((c[(c[k>>2]|0)+40>>2]|0)!=0?(c[(c[k>>2]|0)+40>>2]&255|0)!=19:0)){c[(c[k>>2]|0)+40>>2]=c[f>>2];Hd(c[m>>2]|0,c[(c[k>>2]|0)+108>>2]|0);c[(c[k>>2]|0)+108>>2]=0}Dq(c[m>>2]|0,516);Eq(c[m>>2]|0);a[(c[m>>2]|0)+67>>0]=1;c[(c[k>>2]|0)+44>>2]=0}if((e[(c[k>>2]|0)+144>>1]|0)>>>4&1|0){b=c[m>>2]|0;if((c[n>>2]|0)!=2)gr(b,c[(c[k>>2]|0)+44>>2]|0);else gr(b,0);c[(c[k>>2]|0)+44>>2]=0}}if((c[(c[k>>2]|0)+36>>2]|0)>=0){n=(c[m>>2]|0)+156|0;c[n>>2]=(c[n>>2]|0)+-1;if(!((e[(c[k>>2]|0)+144>>1]|0)>>>7&1)){n=(c[m>>2]|0)+164|0;c[n>>2]=(c[n>>2]|0)+-1}if((e[(c[k>>2]|0)+144>>1]|0)>>>8&1|0){n=(c[m>>2]|0)+160|0;c[n>>2]=(c[n>>2]|0)+-1}}c[(c[k>>2]|0)+20>>2]=832317811;if(a[(c[m>>2]|0)+69>>0]|0)c[(c[k>>2]|0)+40>>2]=7;c[j>>2]=(c[(c[k>>2]|0)+40>>2]|0)==5?5:0;n=c[j>>2]|0;l=o;return n|0}function _q(b){b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=b;c[e>>2]=c[c[d>>2]>>2];c[f>>2]=c[(c[d>>2]|0)+40>>2];b=c[e>>2]|0;if(!(c[(c[d>>2]|0)+108>>2]|0)){wk(b,c[f>>2]|0);f=c[f>>2]|0;l=g;return f|0}b=b+70|0;a[b>>0]=(a[b>>0]|0)+1<<24>>24;zg();if(!(c[(c[e>>2]|0)+244>>2]|0)){b=Oo(c[e>>2]|0)|0;c[(c[e>>2]|0)+244>>2]=b}Po(c[(c[e>>2]|0)+244>>2]|0,-1,c[(c[d>>2]|0)+108>>2]|0,1,-1);Bg();d=(c[e>>2]|0)+70|0;a[d>>0]=(a[d>>0]|0)+-1<<24>>24;c[(c[e>>2]|0)+52>>2]=c[f>>2];f=c[f>>2]|0;l=g;return f|0}function $q(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[c[d>>2]>>2];Hd(c[e>>2]|0,c[(c[d>>2]|0)+108>>2]|0);c[(c[d>>2]|0)+108>>2]=0;c[(c[d>>2]|0)+104>>2]=0;l=b;return}function ar(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f+8|0;b=f+4|0;e=f;c[d>>2]=a;if(c[(c[d>>2]|0)+184>>2]|0){c[b>>2]=c[(c[d>>2]|0)+184>>2];while(1){a=c[b>>2]|0;if(!(c[(c[b>>2]|0)+4>>2]|0))break;c[b>>2]=c[a+4>>2]}sr(a)|0;c[(c[d>>2]|0)+184>>2]=0;c[(c[d>>2]|0)+192>>2]=0}tr(c[d>>2]|0);if(c[(c[d>>2]|0)+92>>2]|0)Lj(c[(c[d>>2]|0)+92>>2]|0,c[(c[d>>2]|0)+24>>2]|0);while(1){a=c[d>>2]|0;if(!(c[(c[d>>2]|0)+188>>2]|0))break;c[e>>2]=c[a+188>>2];c[(c[d>>2]|0)+188>>2]=c[(c[e>>2]|0)+4>>2];ur(c[e>>2]|0)}if(!(c[a+204>>2]|0)){l=f;return}vr(c[c[d>>2]>>2]|0,(c[d>>2]|0)+204|0,-1,0);l=f;return}function br(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;b=h+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[b>>2]=a;if(!(c[(c[b>>2]|0)+152>>2]|0)){l=h;return}c[e>>2]=c[c[b>>2]>>2];c[f>>2]=c[(c[e>>2]|0)+16>>2];c[g>>2]=c[(c[e>>2]|0)+20>>2];c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[g>>2]|0))break;if(((c[d>>2]|0)!=1?c[(c[b>>2]|0)+152>>2]&1<>2]|0:0)?c[(c[f>>2]|0)+(c[d>>2]<<4)+4>>2]|0:0)Ek(c[(c[f>>2]|0)+(c[d>>2]<<4)+4>>2]|0);c[d>>2]=(c[d>>2]|0)+1}l=h;return}function cr(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;i=k;e=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[c[f>>2]>>2];if(!(c[g>>2]|0?(d=(c[h>>2]|0)+440|0,h=(c[h>>2]|0)+448|0,h=IR(c[d>>2]|0,c[d+4>>2]|0,c[h>>2]|0,c[h+4>>2]|0)|0,d=z,(d|0)>0|(d|0)==0&h>>>0>0):0))j=3;do if((j|0)==3){if((c[g>>2]|0)==0?(j=(c[f>>2]|0)+64|0,h=c[j+4>>2]|0,(h|0)>0|(h|0)==0&(c[j>>2]|0)>>>0>0):0)break;c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}while(0);c[(c[f>>2]|0)+40>>2]=787;a[(c[f>>2]|0)+142>>0]=2;rr(c[f>>2]|0,21992,i);c[e>>2]=1;j=c[e>>2]|0;l=k;return j|0}function dr(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;I=l;l=l+144|0;E=I+32|0;G=I+24|0;F=I+16|0;D=I+8|0;p=I+128|0;w=I+124|0;J=I+120|0;x=I+116|0;y=I+112|0;A=I+108|0;B=I+104|0;C=I+100|0;e=I+96|0;f=I+92|0;g=I+88|0;h=I+84|0;i=I+80|0;j=I+76|0;k=I+72|0;m=I;n=I+68|0;o=I+64|0;q=I+60|0;r=I+56|0;s=I+52|0;t=I+48|0;u=I+44|0;v=I+40|0;c[w>>2]=a;c[J>>2]=b;c[y>>2]=0;c[A>>2]=0;c[B>>2]=0;c[A>>2]=jr(c[w>>2]|0,c[J>>2]|0)|0;c[x>>2]=0;while(1){if(c[A>>2]|0)break;if((c[x>>2]|0)>=(c[(c[w>>2]|0)+20>>2]|0))break;c[C>>2]=c[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2];if(Lq(c[C>>2]|0)|0){c[B>>2]=1;Ek(c[C>>2]|0);c[e>>2]=Hj(c[C>>2]|0)|0;if((d[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+8>>0]|0|0)!=1?d[21928+(Uo(c[e>>2]|0)|0)>>0]|0|0:0)c[y>>2]=(c[y>>2]|0)+1;c[A>>2]=oo(c[e>>2]|0)|0}c[x>>2]=(c[x>>2]|0)+1}if(c[A>>2]|0){c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}if((c[B>>2]|0?c[(c[w>>2]|0)+204>>2]|0:0)?(c[A>>2]=tb[c[(c[w>>2]|0)+204>>2]&255](c[(c[w>>2]|0)+200>>2]|0)|0,c[A>>2]|0):0){c[p>>2]=531;J=c[p>>2]|0;l=I;return J|0}J=0==(_c(kr(c[(c[(c[w>>2]|0)+16>>2]|0)+4>>2]|0)|0)|0);if(J|(c[y>>2]|0)<=1){c[x>>2]=0;while(1){if(c[A>>2]|0)break;if((c[x>>2]|0)>=(c[(c[w>>2]|0)+20>>2]|0))break;c[f>>2]=c[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2];if(c[f>>2]|0)c[A>>2]=ep(c[f>>2]|0,0)|0;c[x>>2]=(c[x>>2]|0)+1}c[x>>2]=0;while(1){if(c[A>>2]|0)break;if((c[x>>2]|0)>=(c[(c[w>>2]|0)+20>>2]|0))break;c[g>>2]=c[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2];if(c[g>>2]|0)c[A>>2]=dp(c[g>>2]|0,0)|0;c[x>>2]=(c[x>>2]|0)+1}if(!(c[A>>2]|0))lr(c[w>>2]|0)|0}else{c[h>>2]=c[c[w>>2]>>2];c[i>>2]=0;c[j>>2]=kr(c[(c[(c[w>>2]|0)+16>>2]|0)+4>>2]|0)|0;c[k>>2]=0;J=m;c[J>>2]=0;c[J+4>>2]=0;c[o>>2]=0;c[q>>2]=_c(c[j>>2]|0)|0;J=c[w>>2]|0;c[D>>2]=c[j>>2];c[i>>2]=Bj(J,21934,D)|0;if(!(c[i>>2]|0)){c[p>>2]=7;J=c[p>>2]|0;l=I;return J|0}do{if(c[o>>2]|0){if((c[o>>2]|0)>100){H=35;break}if((c[o>>2]|0)==1){c[G>>2]=c[i>>2];hd(13,21964,G)}}c[o>>2]=(c[o>>2]|0)+1;Ze(4,r);J=(c[i>>2]|0)+(c[q>>2]|0)|0;D=c[r>>2]&255;c[E>>2]=(c[r>>2]|0)>>>8&16777215;c[E+4>>2]=D;Ne(13,J,21979,E)|0;c[A>>2]=bm(c[h>>2]|0,c[i>>2]|0,0,n)|0}while((c[A>>2]|0)==0?(c[n>>2]|0)!=0:0);if((H|0)==35){c[F>>2]=c[i>>2];hd(13,21950,F);zl(c[h>>2]|0,c[i>>2]|0,0)|0}if(!(c[A>>2]|0))c[A>>2]=mr(c[h>>2]|0,c[i>>2]|0,k,16406,0)|0;if(c[A>>2]|0){Hd(c[w>>2]|0,c[i>>2]|0);c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[w>>2]|0)+20>>2]|0))break;c[s>>2]=c[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2];if((Lq(c[s>>2]|0)|0?(c[t>>2]=nr(c[s>>2]|0)|0,c[t>>2]|0):0)?(E=c[k>>2]|0,F=c[t>>2]|0,J=(_c(c[t>>2]|0)|0)+1|0,G=m,c[A>>2]=Ol(E,F,J,c[G>>2]|0,c[G+4>>2]|0)|0,G=(_c(c[t>>2]|0)|0)+1|0,J=m,G=IR(c[J>>2]|0,c[J+4>>2]|0,G|0,((G|0)<0)<<31>>31|0)|0,J=m,c[J>>2]=G,c[J+4>>2]=z,c[A>>2]|0):0){H=48;break}c[x>>2]=(c[x>>2]|0)+1}if((H|0)==48){or(c[k>>2]|0);zl(c[h>>2]|0,c[i>>2]|0,0)|0;Hd(c[w>>2]|0,c[i>>2]|0);c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}if(0==((hm(c[k>>2]|0)|0)&1024|0)?(J=xl(c[k>>2]|0,2)|0,c[A>>2]=J,0!=(J|0)):0){or(c[k>>2]|0);zl(c[h>>2]|0,c[i>>2]|0,0)|0;Hd(c[w>>2]|0,c[i>>2]|0);c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}c[x>>2]=0;while(1){if(c[A>>2]|0)break;if((c[x>>2]|0)>=(c[(c[w>>2]|0)+20>>2]|0))break;c[u>>2]=c[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2];if(c[u>>2]|0)c[A>>2]=ep(c[u>>2]|0,c[i>>2]|0)|0;c[x>>2]=(c[x>>2]|0)+1}or(c[k>>2]|0);if(c[A>>2]|0){Hd(c[w>>2]|0,c[i>>2]|0);c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}c[A>>2]=zl(c[h>>2]|0,c[i>>2]|0,1)|0;Hd(c[w>>2]|0,c[i>>2]|0);c[i>>2]=0;if(c[A>>2]|0){c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}zg();c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[(c[w>>2]|0)+20>>2]|0))break;c[v>>2]=c[(c[(c[w>>2]|0)+16>>2]|0)+(c[x>>2]<<4)+4>>2];if(c[v>>2]|0)dp(c[v>>2]|0,1)|0;c[x>>2]=(c[x>>2]|0)+1}Bg();lr(c[w>>2]|0)|0}c[p>>2]=c[A>>2];J=c[p>>2]|0;l=I;return J|0}function er(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)+24|0;c[a>>2]=c[a>>2]&-3;l=b;return}function fr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[c[d>>2]>>2];c[g>>2]=0;if(!(c[(c[f>>2]|0)+436>>2]|0)){k=c[g>>2]|0;l=m;return k|0}if(!(c[(c[d>>2]|0)+48>>2]|0)){k=c[g>>2]|0;l=m;return k|0}c[i>>2]=(c[(c[d>>2]|0)+48>>2]|0)-1;c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[(c[f>>2]|0)+20>>2]|0))break;c[j>>2]=0;c[k>>2]=c[(c[(c[f>>2]|0)+16>>2]|0)+(c[h>>2]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>>2]|0,c[i>>2]|0)|0;if(c[j>>2]|0){k=c[j>>2]|0;l=m;return k|0}if((c[i>>2]|0)<0?(e[(c[k>>2]|0)+22>>1]|0)&8|0:0)c[(c[k>>2]|0)+44>>2]=0;c[j>>2]=bq(c[k>>2]|0)|0;i=el((c[(c[(c[k>>2]|0)+12>>2]|0)+56>>2]|0)+28|0)|0;c[(c[k>>2]|0)+44>>2]=i;k=c[j>>2]|0;l=m;return k|0}function ir(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+28|0;g=n+24|0;h=n+20|0;m=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;e=n;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[m>>2]=0;if(!(c[(c[f>>2]|0)+340>>2]|0)){m=c[m>>2]|0;l=n;return m|0}c[i>>2]=0;while(1){if(c[m>>2]|0){a=15;break}if((c[i>>2]|0)>=(c[(c[f>>2]|0)+316>>2]|0)){a=15;break}c[j>>2]=c[(c[(c[f>>2]|0)+340>>2]|0)+(c[i>>2]<<2)>>2];c[k>>2]=c[c[(c[j>>2]|0)+4>>2]>>2];if(c[(c[j>>2]|0)+8>>2]|0?(c[c[k>>2]>>2]|0)>=2:0){switch(c[g>>2]|0){case 0:{c[e>>2]=c[(c[k>>2]|0)+80>>2];c[(c[j>>2]|0)+20>>2]=(c[h>>2]|0)+1;break}case 2:{c[e>>2]=c[(c[k>>2]|0)+88>>2];break}default:c[e>>2]=c[(c[k>>2]|0)+84>>2]}if(c[e>>2]|0?(c[(c[j>>2]|0)+20>>2]|0)>(c[h>>2]|0):0)c[m>>2]=yb[c[e>>2]&255](c[(c[j>>2]|0)+8>>2]|0,c[h>>2]|0)|0}c[i>>2]=(c[i>>2]|0)+1}if((a|0)==15){m=c[m>>2]|0;l=n;return m|0}return 0}function jr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[d>>2]=a;c[e>>2]=b;c[g>>2]=0;c[h>>2]=c[(c[d>>2]|0)+340>>2];c[(c[d>>2]|0)+340>>2]=0;c[f>>2]=0;while(1){if(!(c[g>>2]|0))b=(c[f>>2]|0)<(c[(c[d>>2]|0)+316>>2]|0);else b=0;a=c[h>>2]|0;if(!b)break;c[j>>2]=c[(c[a+(c[f>>2]<<2)>>2]|0)+8>>2];if(c[j>>2]|0?(b=c[(c[c[j>>2]>>2]|0)+60>>2]|0,c[i>>2]=b,b|0):0){c[g>>2]=tb[c[i>>2]&255](c[j>>2]|0)|0;qr(c[e>>2]|0,c[j>>2]|0)}c[f>>2]=(c[f>>2]|0)+1}c[(c[d>>2]|0)+340>>2]=a;l=k;return c[g>>2]|0}function kr(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=Xk(c[c[(c[d>>2]|0)+4>>2]>>2]|0,1)|0;l=b;return a|0}function lr(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Nq(c[d>>2]|0,64);l=b;return 0}function mr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+24|0;i=o+20|0;n=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;g=o;c[h>>2]=a;c[i>>2]=b;c[n>>2]=d;c[j>>2]=e;c[k>>2]=f;f=c[(c[h>>2]|0)+4>>2]|0;c[g>>2]=Cg(f,((f|0)<0)<<31>>31)|0;if(!(c[g>>2]|0)){c[m>>2]=7;n=c[m>>2]|0;l=o;return n|0}c[m>>2]=Zl(c[h>>2]|0,c[i>>2]|0,c[g>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;a=c[g>>2]|0;if(c[m>>2]|0){Kd(a);n=c[m>>2]|0;l=o;return n|0}else{c[c[n>>2]>>2]=a;n=c[m>>2]|0;l=o;return n|0}return 0}function nr(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=pr(c[c[(c[d>>2]|0)+4>>2]>>2]|0)|0;l=b;return a|0}function or(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;ql(c[d>>2]|0);Kd(c[d>>2]|0);l=b;return}function pr(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+180>>2]|0}function qr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(!(c[(c[e>>2]|0)+8>>2]|0)){l=g;return}c[f>>2]=c[c[d>>2]>>2];Hd(c[f>>2]|0,c[(c[d>>2]|0)+108>>2]|0);f=go(c[f>>2]|0,c[(c[e>>2]|0)+8>>2]|0)|0;c[(c[d>>2]|0)+108>>2]=f;Kd(c[(c[e>>2]|0)+8>>2]|0);c[(c[e>>2]|0)+8>>2]=0;l=g;return}function rr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+32|0;f=e+20|0;h=e+16|0;g=e;c[f>>2]=a;c[h>>2]=b;Hd(c[c[f>>2]>>2]|0,c[(c[f>>2]|0)+108>>2]|0);c[g>>2]=d;d=Cj(c[c[f>>2]>>2]|0,c[h>>2]|0,g)|0;c[(c[f>>2]|0)+108>>2]=d;l=e;return} +function bt(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+64|0;s=u+16|0;r=u+8|0;j=u+44|0;k=u+40|0;m=u+36|0;n=u+32|0;o=u+28|0;p=u+50|0;q=u;g=u+24|0;h=u+48|0;i=u+20|0;c[j>>2]=d;c[k>>2]=e;c[m>>2]=f;c[n>>2]=c[c[j>>2]>>2];if(!(c[k>>2]|0)){l=u;return}c[o>>2]=c[(c[k>>2]|0)+8>>2];if(a[(c[o>>2]|0)+1>>0]|0){do if((a[c[o>>2]>>0]|0)!=63){b[p>>1]=0;b[h>>1]=0;while(1){if((b[h>>1]|0)>=(c[(c[j>>2]|0)+404>>2]|0))break;if(c[(c[(c[j>>2]|0)+428>>2]|0)+(b[h>>1]<<2)>>2]|0?(vQ(c[(c[(c[j>>2]|0)+428>>2]|0)+(b[h>>1]<<2)>>2]|0,c[o>>2]|0)|0)==0:0){t=14;break}b[h>>1]=(b[h>>1]|0)+1<<16>>16}if((t|0)==14)b[p>>1]=(b[h>>1]|0)+1;if(!(b[p>>1]|0)){r=(c[j>>2]|0)+400|0;t=(b[r>>1]|0)+1<<16>>16;b[r>>1]=t;b[p>>1]=t}}else{c[g>>2]=0==(ri((c[o>>2]|0)+1|0,q,(c[m>>2]|0)-1|0,1)|0)&1;b[p>>1]=c[q>>2];t=q;f=c[t+4>>2]|0;if(!((c[g>>2]|0)==0|((f|0)<0|(f|0)==0&(c[t>>2]|0)>>>0<1))?(f=q,g=c[f+4>>2]|0,t=c[(c[n>>2]|0)+96+36>>2]|0,h=((t|0)<0)<<31>>31,!((g|0)>(h|0)|((g|0)==(h|0)?(c[f>>2]|0)>>>0>t>>>0:0))):0){r=q;h=c[r+4>>2]|0;t=b[(c[j>>2]|0)+400>>1]|0;f=((t|0)<0)<<31>>31;if(!((h|0)>(f|0)|((h|0)==(f|0)?(c[r>>2]|0)>>>0>t>>>0:0)))break;b[(c[j>>2]|0)+400>>1]=c[q>>2];break}t=c[j>>2]|0;c[r>>2]=c[(c[n>>2]|0)+96+36>>2];Ck(t,30701,r);l=u;return}while(0);b[(c[k>>2]|0)+32>>1]=b[p>>1]|0;do if((b[p>>1]|0)>(c[(c[j>>2]|0)+404>>2]|0)){c[i>>2]=Pd(c[n>>2]|0,c[(c[j>>2]|0)+428>>2]|0,b[p>>1]<<2,0)|0;if(!(c[i>>2]|0)){l=u;return}else{c[(c[j>>2]|0)+428>>2]=c[i>>2];GR((c[i>>2]|0)+(c[(c[j>>2]|0)+404>>2]<<2)|0,0,(b[p>>1]|0)-(c[(c[j>>2]|0)+404>>2]|0)<<2|0)|0;c[(c[j>>2]|0)+404>>2]=b[p>>1];break}}while(0);if(!(c[(c[(c[j>>2]|0)+428>>2]|0)+((b[p>>1]|0)-1<<2)>>2]|0)){t=zj(c[n>>2]|0,c[o>>2]|0,c[m>>2]|0,0)|0;c[(c[(c[j>>2]|0)+428>>2]|0)+((b[p>>1]|0)-1<<2)>>2]=t}}else{r=(c[j>>2]|0)+400|0;t=(b[r>>1]|0)+1<<16>>16;b[r>>1]=t;b[(c[k>>2]|0)+32>>1]=t}if((b[(c[j>>2]|0)+400>>1]|0)<=(c[(c[n>>2]|0)+96+36>>2]|0)){l=u;return}Ck(c[j>>2]|0,30744,s);l=u;return}function ct(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;if((c[(c[h>>2]|0)+4>>2]|0)>>>0<=0){j=c[g>>2]|0;l=k;return j|0}c[j>>2]=at(c[c[f>>2]>>2]|0,53,c[h>>2]|0,c[i>>2]|0)|0;if(!(c[j>>2]|0)){j=c[g>>2]|0;l=k;return j|0}c[(c[j>>2]|0)+12>>2]=c[g>>2];i=(c[j>>2]|0)+4|0;c[i>>2]=c[i>>2]|4352;c[g>>2]=c[j>>2];j=c[g>>2]|0;l=k;return j|0}function dt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+20|0;f=j+16|0;g=j+12|0;k=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[k>>2]=d;c[i>>2]=c[c[f>>2]>>2];c[h>>2]=at(c[i>>2]|0,151,c[k>>2]|0,1)|0;if(!(c[h>>2]|0)){_j(c[i>>2]|0,c[g>>2]|0);c[e>>2]=0;k=c[e>>2]|0;l=j;return k|0}else{c[(c[h>>2]|0)+20>>2]=c[g>>2];jt(c[f>>2]|0,c[h>>2]|0);c[e>>2]=c[h>>2];k=c[e>>2]|0;l=j;return k|0}return 0}function et(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;g=f+4|0;h=f;c[j>>2]=a;c[i>>2]=b;c[g>>2]=d;c[h>>2]=e;e=vs(c[j>>2]|0,c[i>>2]|0,c[c[g>>2]>>2]|0,c[c[h>>2]>>2]|0,0)|0;c[c[g>>2]>>2]=e;c[(c[g>>2]|0)+8>>2]=c[(c[h>>2]|0)+8>>2];l=f;return}function ft(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+8|0;h=g+4|0;f=g;c[e>>2]=a;c[h>>2]=b;c[f>>2]=d;if(!(c[h>>2]|0)){l=g;return}h=vs(c[e>>2]|0,19,c[c[f>>2]>>2]|0,0,0)|0;c[c[f>>2]>>2]=h;l=g;return}function gt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;g=f+4|0;h=f;c[j>>2]=a;c[i>>2]=b;c[g>>2]=d;c[h>>2]=e;e=vs(c[j>>2]|0,c[i>>2]|0,c[c[g>>2]>>2]|0,0,0)|0;c[c[g>>2]>>2]=e;c[(c[g>>2]|0)+8>>2]=(c[c[h>>2]>>2]|0)+(c[(c[h>>2]|0)+4>>2]|0);l=f;return}function ht(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;n=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[n>>2]=b;c[h>>2]=e;c[i>>2]=f;c[j>>2]=g;c[k>>2]=c[c[n>>2]>>2];if(!((c[i>>2]|0)!=0&(c[h>>2]|0)!=0)){l=m;return}if((d[c[h>>2]>>0]|0|0)!=101){l=m;return}a[c[i>>2]>>0]=c[j>>2];ck(c[k>>2]|0,c[(c[i>>2]|0)+16>>2]|0);c[(c[i>>2]|0)+16>>2]=0;l=m;return}function it(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;g=l;l=l+32|0;h=g+16|0;k=g+12|0;j=g+8|0;i=g+4|0;m=g;c[h>>2]=a;c[k>>2]=b;c[j>>2]=d;c[i>>2]=e;c[m>>2]=f;c[(c[h>>2]|0)+4>>2]=c[c[m>>2]>>2];f=vs(c[k>>2]|0,c[j>>2]|0,c[c[i>>2]>>2]|0,0,0)|0;c[c[h>>2]>>2]=f;c[(c[h>>2]|0)+8>>2]=c[(c[i>>2]|0)+8>>2];l=g;return}function jt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(c[(c[d>>2]|0)+36>>2]|0){l=f;return}Vw(c[e>>2]|0);rw(c[d>>2]|0,c[(c[e>>2]|0)+24>>2]|0)|0;l=f;return}function kt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[f>>2]|0){c[(c[f>>2]|0)+20>>2]=c[g>>2];g=(c[f>>2]|0)+4|0;c[g>>2]=c[g>>2]|2099200;jt(c[e>>2]|0,c[f>>2]|0);l=h;return}else{Zj(c[c[e>>2]>>2]|0,c[g>>2]|0);l=h;return}}function lt(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;m=l;l=l+32|0;k=m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+184|0;ya=fc+160|0;Zb=fc+144|0;Yb=fc+128|0;xa=fc+112|0;wa=fc+96|0;Xb=fc+72|0;va=fc+64|0;ua=fc+56|0;ta=fc+48|0;r=fc+40|0;p=fc+32|0;ac=fc+808|0;m=fc+804|0;ia=fc+800|0;n=fc+796|0;o=fc+792|0;cc=fc+788|0;dc=fc+784|0;Ha=fc+780|0;k=fc+776|0;q=fc+760|0;$b=fc+756|0;A=fc+752|0;B=fc+748|0;C=fc+744|0;D=fc+740|0;ec=fc+736|0;Ea=fc+732|0;bc=fc+728|0;Lb=fc+724|0;E=fc+720|0;F=fc+716|0;G=fc+712|0;Fa=fc+708|0;H=fc+704|0;I=fc+700|0;J=fc+696|0;_a=fc+692|0;K=fc+688|0;L=fc+684|0;M=fc+680|0;N=fc+676|0;O=fc+672|0;P=fc+668|0;Q=fc+664|0;R=fc+660|0;S=fc+656|0;T=fc+24|0;U=fc+652|0;V=fc+648|0;W=fc+644|0;X=fc+640|0;Y=fc+636|0;Z=fc+632|0;_=fc+628|0;$=fc+624|0;aa=fc+16|0;ba=fc+620|0;ca=fc+616|0;Ga=fc+612|0;Mb=fc+608|0;Nb=fc+604|0;Ob=fc+600|0;Pb=fc+596|0;Qb=fc+592|0;Rb=fc+588|0;da=fc+584|0;ea=fc+580|0;fa=fc+576|0;Sb=fc+572|0;Tb=fc+568|0;Ub=fc+564|0;Vb=fc+560|0;Wb=fc+812|0;ga=fc+556|0;ha=fc+552|0;ja=fc+548|0;ka=fc+536|0;la=fc+532|0;ma=fc+528|0;na=fc+524|0;oa=fc+520|0;pa=fc+516|0;qa=fc+512|0;ra=fc+508|0;sa=fc+504|0;Ja=fc+500|0;Ka=fc+496|0;La=fc+492|0;Ma=fc+488|0;Na=fc+484|0;Oa=fc+480|0;Pa=fc+476|0;Qa=fc+472|0;Ra=fc+468|0;Sa=fc+464|0;Ta=fc+460|0;Ua=fc+456|0;Va=fc+452|0;Wa=fc+448|0;Xa=fc+444|0;Eb=fc+440|0;Fb=fc+436|0;Gb=fc+432|0;Hb=fc+428|0;Ib=fc+424|0;$a=fc+420|0;ab=fc+416|0;bb=fc+412|0;cb=fc+408|0;db=fc+404|0;eb=fc+400|0;fb=fc+396|0;gb=fc+392|0;hb=fc+388|0;ib=fc+384|0;jb=fc+380|0;kb=fc+376|0;lb=fc+372|0;mb=fc+368|0;nb=fc+364|0;ob=fc+360|0;pb=fc+356|0;qb=fc+352|0;rb=fc+348|0;sb=fc+344|0;tb=fc+340|0;ub=fc+336|0;vb=fc+332|0;wb=fc+328|0;xb=fc+324|0;yb=fc+320|0;zb=fc+316|0;Ab=fc+312|0;Bb=fc+308|0;Cb=fc+304|0;Db=fc+300|0;Ia=fc+296|0;s=fc+292|0;t=fc+288|0;u=fc+284|0;Ca=fc+280|0;Da=fc+276|0;v=fc+272|0;w=fc+268|0;x=fc+8|0;y=fc;c[ac>>2]=f;c[m>>2]=g;c[ia>>2]=h;c[n>>2]=i;c[o>>2]=j;c[cc>>2]=0;c[dc>>2]=0;c[Ha>>2]=0;c[C>>2]=0;c[ec>>2]=c[c[ac>>2]>>2];c[bc>>2]=Rt(c[ac>>2]|0)|0;if(!(c[bc>>2]|0)){l=fc;return}oz(c[bc>>2]|0);c[(c[ac>>2]|0)+44>>2]=2;c[$b>>2]=gx(c[ac>>2]|0,c[m>>2]|0,c[ia>>2]|0,k)|0;if((c[$b>>2]|0)<0){l=fc;return}c[Ea>>2]=(c[(c[ec>>2]|0)+16>>2]|0)+(c[$b>>2]<<4);if((c[$b>>2]|0)==1?zk(c[ac>>2]|0)|0:0){l=fc;return}c[cc>>2]=Kt(c[ec>>2]|0,c[k>>2]|0)|0;if(!(c[cc>>2]|0)){l=fc;return}g=c[ec>>2]|0;f=c[n>>2]|0;if(c[o>>2]|0){c[p>>2]=f;c[dc>>2]=Bj(g,28446,p)|0}else c[dc>>2]=Kt(g,f)|0;if((c[(c[ia>>2]|0)+4>>2]|0)>>>0>0)f=c[c[Ea>>2]>>2]|0;else f=0;c[Ha>>2]=f;a:do if(!(Ot(c[ac>>2]|0,19,c[cc>>2]|0,c[dc>>2]|0,c[Ha>>2]|0)|0)){c[q>>2]=0;c[q+4>>2]=c[cc>>2];c[q+8>>2]=c[dc>>2];c[q+12>>2]=0;c[(c[ec>>2]|0)+380+8>>2]=0;c[D>>2]=pz(c[ec>>2]|0,c[Ha>>2]|0,14,q)|0;if(!(c[D>>2]|0)){qz(c[bc>>2]|0,28450,c[q>>2]|0);Kd(c[q>>2]|0);break}if((c[D>>2]|0)!=12){if(c[q>>2]|0){bc=c[ac>>2]|0;c[r>>2]=c[q>>2];Ck(bc,18130,r);Kd(c[q>>2]|0)}bc=(c[ac>>2]|0)+36|0;c[bc>>2]=(c[bc>>2]|0)+1;c[(c[ac>>2]|0)+12>>2]=c[D>>2];break}c[A>>2]=0;c[B>>2]=57;while(1){if((c[A>>2]|0)>(c[B>>2]|0))break;c[C>>2]=((c[A>>2]|0)+(c[B>>2]|0)|0)/2|0;c[D>>2]=uk(c[cc>>2]|0,c[4420+((c[C>>2]|0)*12|0)>>2]|0)|0;if(!(c[D>>2]|0))break;f=c[C>>2]|0;if((c[D>>2]|0)<0){c[B>>2]=f-1;continue}else{c[A>>2]=f+1;continue}}if((c[A>>2]|0)<=(c[B>>2]|0)){c[Lb>>2]=4420+((c[C>>2]|0)*12|0);if(d[(c[Lb>>2]|0)+5>>0]&1|0?lu(c[ac>>2]|0)|0:0)break;do switch(d[(c[Lb>>2]|0)+4>>0]|0){case 11:{cu(c[bc>>2]|0,c[$b>>2]|0);if(c[dc>>2]|0){c[F>>2]=Ap(Mf(c[dc>>2]|0)|0)|0;iu(c[ac>>2]|0,0,c[$b>>2]|0);Xt(c[bc>>2]|0,102,c[$b>>2]|0,3,c[F>>2]|0)|0;c[(c[(c[Ea>>2]|0)+12>>2]|0)+80>>2]=c[F>>2];vu(c[(c[Ea>>2]|0)+4>>2]|0,c[(c[(c[Ea>>2]|0)+12>>2]|0)+80>>2]|0)|0;break a}else{rz(c[bc>>2]|0,28457);ac=(c[ac>>2]|0)+44|0;c[ac>>2]=(c[ac>>2]|0)+2;c[E>>2]=sz(c[bc>>2]|0,9,28468,0)|0;c[(c[E>>2]|0)+4>>2]=c[$b>>2];c[(c[E>>2]|0)+20+4>>2]=c[$b>>2];c[(c[E>>2]|0)+120+4>>2]=-2e3;break a}}case 25:{c[G>>2]=c[(c[Ea>>2]|0)+4>>2];if(c[dc>>2]|0){bc=Mf(c[dc>>2]|0)|0;c[(c[ec>>2]|0)+80>>2]=bc;if(7!=(Dk(c[G>>2]|0,c[(c[ec>>2]|0)+80>>2]|0,-1,0)|0))break a;yd(c[ec>>2]|0);break a}if(c[G>>2]|0)f=Rm(c[G>>2]|0)|0;else f=0;c[Fa>>2]=f;ac=c[Fa>>2]|0;tz(c[bc>>2]|0,28504,ac,((ac|0)<0)<<31>>31);break a}case 26:{c[H>>2]=c[(c[Ea>>2]|0)+4>>2];c[I>>2]=-1;if(c[dc>>2]|0)c[I>>2]=(Kf(c[dc>>2]|0,0)|0)&255;b:do if((c[I>>2]|0)>=0?(c[(c[ia>>2]|0)+4>>2]|0)==0:0){c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[(c[ec>>2]|0)+20>>2]|0))break b;$y(c[(c[(c[ec>>2]|0)+16>>2]|0)+(c[J>>2]<<4)+4>>2]|0,c[I>>2]|0)|0;c[J>>2]=(c[J>>2]|0)+1}}while(0);c[I>>2]=$y(c[H>>2]|0,c[I>>2]|0)|0;ac=c[I>>2]|0;tz(c[bc>>2]|0,28514,ac,((ac|0)<0)<<31>>31);break a}case 23:{ju(c[ac>>2]|0,c[$b>>2]|0);f=(c[ac>>2]|0)+44|0;k=(c[f>>2]|0)+1|0;c[f>>2]=k;c[_a>>2]=k;k=c[bc>>2]|0;f=c[$b>>2]|0;g=c[_a>>2]|0;if((d[17348+(d[c[cc>>2]>>0]|0)>>0]|0)==112)Wt(k,158,f,g)|0;else Xt(k,159,f,g,Ap(Mf(c[dc>>2]|0)|0)|0)|0;Wt(c[bc>>2]|0,87,c[_a>>2]|0,1)|0;Xr(c[bc>>2]|0,1);Yr(c[bc>>2]|0,0,0,c[cc>>2]|0,-1)|0;break a}case 22:{c[K>>2]=28528;c[L>>2]=uz(c[dc>>2]|0)|0;if((c[L>>2]|0)==-1?(c[(c[ia>>2]|0)+4>>2]|0)==0:0)c[L>>2]=d[(c[ec>>2]|0)+71>>0];else{if(!(c[(c[ia>>2]|0)+4>>2]|0)){c[N>>2]=2;while(1){if((c[N>>2]|0)>=(c[(c[ec>>2]|0)+20>>2]|0))break;c[M>>2]=Hj(c[(c[(c[ec>>2]|0)+16>>2]|0)+(c[N>>2]<<4)+4>>2]|0)|0;_y(c[M>>2]|0,c[L>>2]|0)|0;c[N>>2]=(c[N>>2]|0)+1}a[(c[ec>>2]|0)+71>>0]=c[L>>2]}c[M>>2]=Hj(c[(c[Ea>>2]|0)+4>>2]|0)|0;c[L>>2]=_y(c[M>>2]|0,c[L>>2]|0)|0}if((c[L>>2]|0)==1)c[K>>2]=28535;qz(c[bc>>2]|0,28545,c[K>>2]|0);break a}case 19:{rz(c[bc>>2]|0,28558);if(c[dc>>2]|0){c[R>>2]=_c(c[dc>>2]|0)|0;c[O>>2]=0;while(1){ac=vz(c[O>>2]|0)|0;c[Q>>2]=ac;if(!ac)break;if(!(Zc(c[dc>>2]|0,c[Q>>2]|0,c[R>>2]|0)|0))break;c[O>>2]=(c[O>>2]|0)+1}if(!(c[Q>>2]|0))c[O>>2]=-1}else c[O>>2]=-1;if((c[O>>2]|0)==-1?(c[(c[ia>>2]|0)+4>>2]|0)==0:0){c[$b>>2]=0;c[(c[ia>>2]|0)+4>>2]=1}c[P>>2]=(c[(c[ec>>2]|0)+20>>2]|0)-1;while(1){if((c[P>>2]|0)<0)break;do if(c[(c[(c[ec>>2]|0)+16>>2]|0)+(c[P>>2]<<4)+4>>2]|0){if((c[P>>2]|0)!=(c[$b>>2]|0)?c[(c[ia>>2]|0)+4>>2]|0:0)break;cu(c[b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]=2147483647;iu(c[ac>>2]|0,0,c[$b>>2]|0);Wt(c[bc>>2]|0,76,c[Y>>2]|0,1)|0;c[Z>>2]=kx(c[bc>>2]|0,69,c[$b>>2]|0)|0;kx(c[bc>>2]|0,87,1)|0;Wt(c[bc>>2]|0,91,1,-1)|0;Wt(c[bc>>2]|0,66,1,c[Z>>2]|0)|0;tx(c[bc>>2]|0,c[Z>>2]|0);break a}case 4:if(c[dc>>2]|0){c[_>>2]=Mf(c[dc>>2]|0)|0;c[(c[(c[Ea>>2]|0)+12>>2]|0)+80>>2]=c[_>>2];vu(c[(c[Ea>>2]|0)+4>>2]|0,c[(c[(c[Ea>>2]|0)+12>>2]|0)+80>>2]|0)|0;break a}else{ac=c[(c[(c[Ea>>2]|0)+12>>2]|0)+80>>2]|0;tz(c[bc>>2]|0,28457,ac,((ac|0)<0)<<31>>31);break a}case 5:if(c[dc>>2]|0){c[$>>2]=1;if(Nf(c[dc>>2]|0,$)|0)Az(c[(c[Ea>>2]|0)+4>>2]|0,c[$>>2]|0)|0;$b=(Kf(c[dc>>2]|0,(c[$>>2]|0)!=0&255)|0)<<24>>24!=0;bc=(c[ec>>2]|0)+24|0;ac=c[bc>>2]|0;c[bc>>2]=$b?ac|32:ac&-33;Bz(c[ec>>2]|0);break a}else{g=c[bc>>2]|0;if(!(c[(c[ec>>2]|0)+24>>2]&32))f=0;else f=Az(c[(c[Ea>>2]|0)+4>>2]|0,0)|0;tz(g,28622,f,((f|0)<0)<<31>>31);break a}case 24:{$b=aa;c[$b>>2]=0;c[$b+4>>2]=0;c[D>>2]=0;if(!(c[D>>2]|0)){ac=aa;tz(c[bc>>2]|0,28634,c[ac>>2]|0,c[ac+4>>2]|0);break a}if((c[D>>2]|0)==12)break a;bc=(c[ac>>2]|0)+36|0;c[bc>>2]=(c[bc>>2]|0)+1;c[(c[ac>>2]|0)+12>>2]=c[D>>2];break a}case 32:if(c[dc>>2]|0){Cz(c[ac>>2]|0,c[dc>>2]|0)|0;break a}else{tz(c[bc>>2]|0,28644,d[(c[ec>>2]|0)+68>>0]|0,0);break a}case 33:{if(!(c[dc>>2]|0)){qz(c[bc>>2]|0,28655,c[11684]|0);break a}if(a[c[dc>>2]>>0]|0?(c[D>>2]=bm(c[c[ec>>2]>>2]|0,c[dc>>2]|0,1,ba)|0,(c[D>>2]|0)!=0|(c[ba>>2]|0)==0):0){Ck(c[ac>>2]|0,28676,ta);break a}if((d[(c[ec>>2]|0)+68>>0]|0)<=1)Dz(c[ac>>2]|0)|0;Kd(c[11684]|0);if(a[c[dc>>2]>>0]|0){c[ua>>2]=c[dc>>2];f=Ue(18130,ua)|0}else f=0;c[11684]=f;break a}case 30:{if(!(c[dc>>2]|0)){ac=(d[(c[Ea>>2]|0)+8>>0]|0)-1|0;tz(c[bc>>2]|0,28701,ac,((ac|0)<0)<<31>>31);break a}if(a[(c[ec>>2]|0)+67>>0]|0){bc=((Lf(c[dc>>2]|0,0,1)|0)&255)+1&7;c[ca>>2]=bc;c[ca>>2]=(c[ca>>2]|0)==0?1:bc;a[(c[Ea>>2]|0)+8>>0]=c[ca>>2];a[(c[Ea>>2]|0)+9>>0]=1;Bz(c[ec>>2]|0);break a}else{Ck(c[ac>>2]|0,28713,va);break a}}case 2:{if(!(c[dc>>2]|0)){ac=(c[(c[ec>>2]|0)+24>>2]&c[(c[Lb>>2]|0)+8>>2]|0)!=0&1;tz(c[bc>>2]|0,c[c[Lb>>2]>>2]|0,ac,((ac|0)<0)<<31>>31);break a}c[Ga>>2]=c[(c[Lb>>2]|0)+8>>2];if(!(d[(c[ec>>2]|0)+67>>0]|0))c[Ga>>2]=c[Ga>>2]&-524289;ac=(Kf(c[dc>>2]|0,0)|0)<<24>>24!=0;f=c[Ga>>2]|0;if(!ac){ac=(c[ec>>2]|0)+24|0;c[ac>>2]=c[ac>>2]&~f;if((c[Ga>>2]|0)==33554432){ac=(c[ec>>2]|0)+448|0;c[ac>>2]=0;c[ac+4>>2]=0}}else{ac=(c[ec>>2]|0)+24|0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+16>>2]=$b;Fz(ac,1,28790,ya);Wt(c[bc>>2]|0,87,1,5)|0;c[ga>>2]=c[(c[ga>>2]|0)+20>>2];c[ja>>2]=(c[ja>>2]|0)+1}}case 10:{c[(c[ac>>2]|0)+44>>2]=3;Ez(c[bc>>2]|0,3,5212);c[la>>2]=0;while(1){if((c[la>>2]|0)>=(c[(c[ec>>2]|0)+20>>2]|0))break a;if(c[(c[(c[ec>>2]|0)+16>>2]|0)+(c[la>>2]<<4)+4>>2]|0){ac=c[bc>>2]|0;Zb=c[la>>2]|0;_b=c[(c[(c[ec>>2]|0)+16>>2]|0)+(c[la>>2]<<4)>>2]|0;$b=kr(c[(c[(c[ec>>2]|0)+16>>2]|0)+(c[la>>2]<<4)+4>>2]|0)|0;c[za>>2]=Zb;c[za+4>>2]=_b;c[za+8>>2]=$b;Fz(ac,1,28796,za);Wt(c[bc>>2]|0,87,1,3)|0}c[la>>2]=(c[la>>2]|0)+1}}case 7:{c[ma>>2]=0;c[(c[ac>>2]|0)+44>>2]=2;Ez(c[bc>>2]|0,2,5224);c[na>>2]=c[(c[ec>>2]|0)+364+8>>2];while(1){if(!(c[na>>2]|0))break a;c[oa>>2]=c[(c[na>>2]|0)+8>>2];ac=c[bc>>2]|0;_b=c[ma>>2]|0;c[ma>>2]=_b+1;$b=c[c[oa>>2]>>2]|0;c[Aa>>2]=_b;c[Aa+4>>2]=$b;Fz(ac,1,28800,Aa);Wt(c[bc>>2]|0,87,1,2)|0;c[na>>2]=c[c[na>>2]>>2]}}case 14:{if(!(c[dc>>2]|0))break a;c[qa>>2]=mu(c[ec>>2]|0,c[dc>>2]|0,c[Ha>>2]|0)|0;if(!(c[qa>>2]|0))break a;c[bc>>2]=Rt(c[ac>>2]|0)|0;c[pa>>2]=c[(c[qa>>2]|0)+16>>2];if(!(c[pa>>2]|0))break a;c[ra>>2]=0;c[(c[ac>>2]|0)+44>>2]=8;ju(c[ac>>2]|0,c[$b>>2]|0);Ez(c[bc>>2]|0,8,5232);while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]|0,29050)|0)){c[w>>2]=1;break}if(!(Ig(c[dc>>2]|0,29055)|0)){c[w>>2]=2;break}if(!(Ig(c[dc>>2]|0,29063)|0))c[w>>2]=3}while(0);Ez(c[bc>>2]|0,3,5352);c[(c[ac>>2]|0)+44>>2]=3;Xt(c[bc>>2]|0,8,c[v>>2]|0,c[w>>2]|0,1)|0;Wt(c[bc>>2]|0,87,1,3)|0;break a}case 35:{if(c[dc>>2]|0){ac=c[ec>>2]|0;Nz(ac,Mf(c[dc>>2]|0)|0)|0}if((c[(c[ec>>2]|0)+224>>2]|0)==138)f=c[(c[ec>>2]|0)+228>>2]|0;else f=0;tz(c[bc>>2]|0,29072,f,((f|0)<0)<<31>>31);break a}case 27:{Pz(c[ec>>2]|0)|0;break a}case 28:{if(c[dc>>2]|0?(Qy(c[dc>>2]|0,x)|0)==0:0){ac=x;sk(c[ac>>2]|0,c[ac+4>>2]|0)|0}ac=c[bc>>2]|0;bc=sk(-1,-1)|0;tz(ac,29099,bc,z);break a}case 34:{if(c[dc>>2]|0?(_b=(Qy(c[dc>>2]|0,y)|0)==0,ac=y,$b=c[ac+4>>2]|0,_b&(($b|0)>0|($b|0)==0&(c[ac>>2]|0)>>>0>=0)):0)Rz(c[ec>>2]|0,11,c[y>>2]&2147483647)|0;ac=c[bc>>2]|0;bc=Rz(c[ec>>2]|0,11,-1)|0;tz(ac,29115,bc,((bc|0)<0)<<31>>31);break a}default:{if(c[dc>>2]|0){ac=c[ec>>2]|0;Qz(ac,Mf(c[dc>>2]|0)|0)|0}ac=c[(c[ec>>2]|0)+428>>2]|0;tz(c[bc>>2]|0,29091,ac,((ac|0)<0)<<31>>31);break a}}while(0)}}while(0);Hd(c[ec>>2]|0,c[cc>>2]|0);Hd(c[ec>>2]|0,c[dc>>2]|0);l=fc;return}function pt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=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2];do if(c[z>>2]|0)if((c[(c[p>>2]|0)+4>>2]|0)>>>0<=0){c[P>>2]=1;c[C>>2]=c[o>>2];if(c[K>>2]|0){w=6;break}else break}else{Ck(c[I>>2]|0,28028,r);break}else{c[P>>2]=gx(c[I>>2]|0,c[o>>2]|0,c[p>>2]|0,C)|0;if((c[P>>2]|0)>=0&(c[K>>2]|0)!=0)w=6}while(0);do if((w|0)==6?(d[(c[O>>2]|0)+69>>0]|0)==0:0){if((c[P>>2]|0)!=1?(d[(c[O>>2]|0)+148+5>>0]|0)!=0:0){Hd(c[O>>2]|0,c[(c[K>>2]|0)+8+4>>2]|0);c[(c[K>>2]|0)+8+4>>2]=0}c[B>>2]=hz(c[I>>2]|0,c[K>>2]|0)|0;if(((d[(c[O>>2]|0)+148+5>>0]|0)==0?(c[B>>2]|0?(c[(c[p>>2]|0)+4>>2]|0)==0:0):0)?(c[(c[B>>2]|0)+64>>2]|0)==(c[(c[(c[O>>2]|0)+16>>2]|0)+16+12>>2]|0):0)c[P>>2]=1;if((a[(c[O>>2]|0)+69>>0]|0)==0?(iz(q,c[I>>2]|0,c[P>>2]|0,28074,c[C>>2]|0),(jz(q,c[K>>2]|0)|0)==0):0){c[B>>2]=hz(c[I>>2]|0,c[K>>2]|0)|0;if(!(c[B>>2]|0)){if((d[(c[O>>2]|0)+148+4>>0]|0)!=1)break;a[(c[O>>2]|0)+148+6>>0]=1;break}if(d[(c[B>>2]|0)+42>>0]&16|0){Ck(c[I>>2]|0,28082,s);break}c[N>>2]=Kt(c[O>>2]|0,c[C>>2]|0)|0;if(c[N>>2]|0?0==(jv(c[I>>2]|0,c[N>>2]|0)|0):0){if(nu((c[(c[(c[O>>2]|0)+16>>2]|0)+(c[P>>2]<<4)+12>>2]|0)+40|0,c[N>>2]|0)|0){b=c[I>>2]|0;if(c[A>>2]|0){ju(b,c[P>>2]|0);break}else{c[H>>2]=c[C>>2];Ck(b,28123,H);break}}if(!(Zc(c[c[B>>2]>>2]|0,23554,7)|0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);m=c[i>>2]|0;o=c[k>>2]|0;Zj(m,o);o=c[h>>2]|0;l=n;return o|0}return 0}function tt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;i=l;l=l+16|0;f=i+12|0;j=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[j>>2]=d;c[g>>2]=e;c[h>>2]=gz(c[f>>2]|0,109,c[j>>2]|0)|0;if(c[h>>2]|0){j=aw(c[f>>2]|0,c[g>>2]|0,1)|0;c[(c[h>>2]|0)+16>>2]=j;a[(c[h>>2]|0)+1>>0]=10}ck(c[f>>2]|0,c[g>>2]|0);l=i;return c[h>>2]|0}function ut(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=d;c[h>>2]=jl(c[f>>2]|0,36,0)|0;if(!(c[h>>2]|0)){Zj(c[f>>2]|0,c[g>>2]|0);c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}else{a[c[h>>2]>>0]=119;c[(c[h>>2]|0)+8>>2]=c[g>>2];a[(c[h>>2]|0)+1>>0]=10;c[e>>2]=c[h>>2];h=c[e>>2]|0;l=i;return h|0}return 0}function vt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;q=r;m=r+40|0;n=r+36|0;o=r+32|0;g=r+28|0;h=r+24|0;p=r+20|0;i=r+16|0;k=r+12|0;f=r+8|0;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[g>>2]=0;c[k>>2]=c[c[m>>2]>>2];if(a[(c[k>>2]|0)+69>>0]|0){p=c[k>>2]|0;q=c[n>>2]|0;fk(p,q);l=r;return}if(lu(c[m>>2]|0)|0){p=c[k>>2]|0;q=c[n>>2]|0;fk(p,q);l=r;return}c[p>>2]=c[(c[n>>2]|0)+8+4>>2];c[i>>2]=c[(c[n>>2]|0)+8+8>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[(c[k>>2]|0)+20>>2]|0))break;e=c[h>>2]|0;c[f>>2]=(c[h>>2]|0)<2?e^1:e;if(!(c[p>>2]|0?(Ig(c[(c[(c[k>>2]|0)+16>>2]|0)+(c[f>>2]<<4)>>2]|0,c[p>>2]|0)|0)!=0:0))j=7;if((j|0)==7?(j=0,c[g>>2]=nu((c[(c[(c[k>>2]|0)+16>>2]|0)+(c[f>>2]<<4)+12>>2]|0)+40|0,c[i>>2]|0)|0,c[g>>2]|0):0)break;c[h>>2]=(c[h>>2]|0)+1}if(c[g>>2]|0){ez(c[m>>2]|0,c[g>>2]|0);p=c[k>>2]|0;q=c[n>>2]|0;fk(p,q);l=r;return}b=c[m>>2]|0;if(c[o>>2]|0)dz(b,c[p>>2]|0);else{c[q>>2]=c[n>>2];c[q+4>>2]=0;Ck(b,27957,q)}a[(c[m>>2]|0)+17>>0]=1;p=c[k>>2]|0;q=c[n>>2]|0;fk(p,q);l=r;return}function wt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;j=f+12|0;i=f+8|0;h=f+4|0;g=f;c[j>>2]=a;c[i>>2]=b;c[h>>2]=d;c[g>>2]=e;Uy(c[j>>2]|0,24,4328,c[i>>2]|0,c[i>>2]|0,c[h>>2]|0,c[g>>2]|0);l=f;return}function xt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;Uy(c[f>>2]|0,25,4300,c[e>>2]|0,0,0,c[e>>2]|0);l=d;return}function yt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+64|0;t=u;s=u+48|0;i=u+44|0;j=u+40|0;k=u+36|0;m=u+32|0;n=u+28|0;o=u+24|0;q=u+20|0;r=u+16|0;f=u+12|0;g=u+8|0;h=u+4|0;c[s>>2]=b;c[i>>2]=d;c[j>>2]=e;c[f>>2]=c[c[s>>2]>>2];if(lu(c[s>>2]|0)|0){l=u;return}if(!(c[i>>2]|0)){Gx(c[s>>2]|0,0);l=u;return}if(!((c[j>>2]|0)!=0?(c[c[j>>2]>>2]|0)!=0:0))p=6;do if((p|0)==6){c[h>>2]=Kt(c[c[s>>2]>>2]|0,c[i>>2]|0)|0;if(!(c[h>>2]|0)){l=u;return}c[k>>2]=zv(c[f>>2]|0,a[(c[f>>2]|0)+66>>0]|0,c[h>>2]|0,0)|0;if(!(c[k>>2]|0)){Hd(c[f>>2]|0,c[h>>2]|0);break}Gx(c[s>>2]|0,c[h>>2]|0);Hd(c[f>>2]|0,c[h>>2]|0);l=u;return}while(0);c[r>>2]=gx(c[s>>2]|0,c[i>>2]|0,c[j>>2]|0,g)|0;if((c[r>>2]|0)<0){l=u;return}c[m>>2]=Kt(c[f>>2]|0,c[g>>2]|0)|0;if(!(c[m>>2]|0)){l=u;return}c[n>>2]=c[(c[(c[f>>2]|0)+16>>2]|0)+(c[r>>2]<<4)>>2];c[o>>2]=mu(c[f>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;if(c[o>>2]|0){Hx(c[s>>2]|0,c[o>>2]|0,0);Hd(c[f>>2]|0,c[m>>2]|0);l=u;return}c[q>>2]=Bu(c[f>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;Hd(c[f>>2]|0,c[m>>2]|0);b=c[s>>2]|0;if(c[q>>2]|0){iu(b,0,c[r>>2]|0);Ix(c[s>>2]|0,c[q>>2]|0,-1);l=u;return}else{Ck(b,27191,t);l=u;return}}function zt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;o=r+44|0;f=r+40|0;g=r+36|0;p=r+32|0;h=r+28|0;i=r+24|0;q=r+20|0;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=r;return}function At(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+176|0;C=E+96|0;B=E+80|0;A=E+40|0;D=E+16|0;z=E+8|0;h=E;t=E+172|0;u=E+168|0;g=E+164|0;v=E+160|0;w=E+156|0;x=E+152|0;y=E+148|0;i=E+144|0;j=E+140|0;k=E+136|0;m=E+132|0;n=E+128|0;o=E+124|0;p=E+120|0;q=E+116|0;r=E+112|0;s=E+108|0;c[t>>2]=b;c[u>>2]=e;c[g>>2]=f;c[y>>2]=0;c[i>>2]=c[c[t>>2]>>2];c[n>>2]=0;c[o>>2]=0;c[p>>2]=c[(c[i>>2]|0)+24>>2];do if(((a[(c[i>>2]|0)+69>>0]|0)==0?(c[x>>2]=gu(c[t>>2]|0,0,(c[u>>2]|0)+8|0)|0,c[x>>2]|0):0)?(c[v>>2]=Nt(c[c[t>>2]>>2]|0,c[(c[x>>2]|0)+64>>2]|0)|0,c[w>>2]=c[(c[(c[i>>2]|0)+16>>2]|0)+(c[v>>2]<<4)>>2],f=(c[i>>2]|0)+24|0,c[f>>2]=c[f>>2]|2097152,c[y>>2]=Kt(c[i>>2]|0,c[g>>2]|0)|0,c[y>>2]|0):0){if((mu(c[i>>2]|0,c[y>>2]|0,c[w>>2]|0)|0)==0?(Bu(c[i>>2]|0,c[y>>2]|0,c[w>>2]|0)|0)==0:0){if(hu(c[t>>2]|0,c[c[x>>2]>>2]|0)|0)break;if(jv(c[t>>2]|0,c[y>>2]|0)|0)break;b=c[t>>2]|0;if(c[(c[x>>2]|0)+12>>2]|0){c[z>>2]=c[c[x>>2]>>2];Ck(b,24635,z);break}if(Ot(b,26,c[w>>2]|0,c[c[x>>2]>>2]|0,0)|0)break;if(kv(c[t>>2]|0,c[x>>2]|0)|0)break;if(d[(c[x>>2]|0)+42>>0]&16|0?(c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,c[x>>2]|0)|0;c[n>>2]=D;if(D|0){D=c[t>>2]|0;A=c[y>>2]|0;B=c[n>>2]|0;c[C>>2]=c[y>>2];c[C+4>>2]=A;c[C+8>>2]=B;Qt(D,25189,C);Hd(c[i>>2]|0,c[n>>2]|0)}a:do if(c[(c[i>>2]|0)+24>>2]&524288|0){c[r>>2]=ov(c[x>>2]|0)|0;while(1){if(!(c[r>>2]|0))break a;c[s>>2]=c[c[r>>2]>>2];if((c[s>>2]|0)!=(c[x>>2]|0))Xu(c[t>>2]|0,c[c[r>>2]>>2]|0,c[c[s>>2]>>2]|0);c[r>>2]=c[(c[r>>2]|0)+12>>2]}}while(0);Xu(c[t>>2]|0,c[x>>2]|0,c[y>>2]|0);break}D=c[t>>2]|0;c[h>>2]=c[y>>2];Ck(D,24576,h)}while(0);fk(c[i>>2]|0,c[u>>2]|0);Hd(c[i>>2]|0,c[y>>2]|0);c[(c[i>>2]|0)+24>>2]=c[p>>2];l=E;return}function Bt(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+144|0;A=E+40|0;z=E+32|0;D=E+24|0;C=E+16|0;B=E+8|0;y=E;q=E+128|0;r=E+124|0;s=E+120|0;t=E+116|0;u=E+112|0;v=E+108|0;w=E+104|0;x=E+100|0;g=E+96|0;h=E+92|0;i=E+88|0;j=E+84|0;k=E+80|0;m=E+76|0;n=E+72|0;o=E+68|0;p=E+64|0;c[q>>2]=e;c[r>>2]=f;c[j>>2]=c[(c[q>>2]|0)+8>>2];c[i>>2]=c[c[q>>2]>>2];if(c[(c[q>>2]|0)+36>>2]|0){l=E;return}if(d[(c[i>>2]|0)+69>>0]|0){l=E;return}c[s>>2]=c[(c[q>>2]|0)+440>>2];c[u>>2]=Nt(c[i>>2]|0,c[(c[s>>2]|0)+64>>2]|0)|0;c[v>>2]=c[(c[(c[i>>2]|0)+16>>2]|0)+(c[u>>2]<<4)>>2];c[w>>2]=(c[c[s>>2]>>2]|0)+16;c[g>>2]=(c[(c[s>>2]|0)+4>>2]|0)+((b[(c[s>>2]|0)+34>>1]|0)-1<<4);c[h>>2]=c[(c[g>>2]|0)+4>>2];c[t>>2]=mu(c[i>>2]|0,c[w>>2]|0,c[v>>2]|0)|0;if(Ot(c[q>>2]|0,26,c[v>>2]|0,c[c[t>>2]>>2]|0,0)|0){l=E;return}if(c[h>>2]|0?(d[c[(c[h>>2]|0)+12>>2]>>0]|0)==101:0)c[h>>2]=0;if(d[(c[g>>2]|0)+15>>0]&1|0){Ck(c[q>>2]|0,24190,y);l=E;return}if(c[(c[s>>2]|0)+8>>2]|0){Ck(c[q>>2]|0,24222,B);l=E;return}if(c[(c[i>>2]|0)+24>>2]&524288|0?(c[h>>2]|0?(c[(c[s>>2]|0)+16>>2]|0)!=0:0):0){Ck(c[q>>2]|0,24249,C);l=E;return}if(!(c[h>>2]|0?1:(d[(c[g>>2]|0)+12>>0]|0)==0)){Ck(c[q>>2]|0,24308,D);l=E;return}do if(c[h>>2]|0){c[m>>2]=0;c[n>>2]=Tu(c[i>>2]|0,c[h>>2]|0,1,65,m)|0;if(c[n>>2]|0){l=E;return}if(c[m>>2]|0){Rj(c[m>>2]|0);break}Ck(c[q>>2]|0,24361,z);l=E;return}while(0);c[x>>2]=zj(c[i>>2]|0,c[c[r>>2]>>2]|0,c[(c[r>>2]|0)+4>>2]|0,0)|0;if(c[x>>2]|0){c[o>>2]=(c[x>>2]|0)+((c[(c[r>>2]|0)+4>>2]|0)-1);c[p>>2]=c[(c[i>>2]|0)+24>>2];while(1){if((c[o>>2]|0)>>>0<=(c[x>>2]|0)>>>0)break;if((a[c[o>>2]>>0]|0)!=59?(d[16965+(d[c[o>>2]>>0]|0)>>0]&1|0)==0:0)break;D=c[o>>2]|0;c[o>>2]=D+-1;a[D>>0]=0}D=(c[i>>2]|0)+24|0;c[D>>2]=c[D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>>0]|0){_j(c[h>>2]|0,c[p>>2]|0);Zj(c[h>>2]|0,c[q>>2]|0);Hd(c[h>>2]|0,c[j>>2]|0);c[i>>2]=c[o>>2];t=c[i>>2]|0;l=s;return t|0}else{c[(c[i>>2]|0)+8+(c[c[i>>2]>>2]<<4)+8>>2]=c[q>>2];c[(c[i>>2]|0)+8+(c[c[i>>2]>>2]<<4)+4>>2]=c[p>>2];c[(c[i>>2]|0)+8+(c[c[i>>2]>>2]<<4)>>2]=c[j>>2];c[(c[i>>2]|0)+8+(c[c[i>>2]>>2]<<4)+12>>2]=0;t=c[i>>2]|0;c[t>>2]=(c[t>>2]|0)+1;t=c[i>>2]|0;l=s;return t|0}return 0}function It(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0;i=l;l=l+16|0;k=i+4|0;j=i+8|0;h=i;c[k>>2]=f;a[j>>0]=g;c[h>>2]=b[9136+(c[k>>2]<<1)>>1];c[h>>2]=(c[h>>2]|0)+(d[j>>0]|0);l=i;return e[9786+(c[h>>2]<<1)>>1]|0}function Jt(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[(c[d>>2]|0)+4>>2];c[(c[d>>2]|0)+4>>2]=c[e>>2];l=b;return}function Kt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;if(c[e>>2]|0){c[f>>2]=zj(c[d>>2]|0,c[c[e>>2]>>2]|0,c[(c[e>>2]|0)+4>>2]|0,0)|0;Aj(c[f>>2]|0);f=c[f>>2]|0;l=g;return f|0}else{c[f>>2]=0;f=c[f>>2]|0;l=g;return f|0}return 0}function Lt(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;if(!(c[(c[b>>2]|0)+452>>2]|0)){l=g;return}if(!(c[(c[b>>2]|0)+440>>2]|0)){l=g;return}c[d>>2]=c[(c[b>>2]|0)+452>>2];c[e>>2]=c[(c[b>>2]|0)+452+4>>2];c[f>>2]=c[c[b>>2]>>2];a=c[f>>2]|0;b=c[(c[b>>2]|0)+440>>2]|0;e=c[e>>2]|0;Mt(a,b,zj(c[f>>2]|0,c[d>>2]|0,e,((e|0)<0)<<31>>31)|0);l=g;return}function Mt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+20|0;f=j+16|0;g=j+12|0;k=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[k>>2]=2+(c[(c[f>>2]|0)+48>>2]|0)<<2;d=c[k>>2]|0;c[h>>2]=Pd(c[e>>2]|0,c[(c[f>>2]|0)+52>>2]|0,d,((d|0)<0)<<31>>31)|0;if(!(c[h>>2]|0)){Hd(c[e>>2]|0,c[g>>2]|0);l=j;return}else{e=(c[f>>2]|0)+48|0;k=c[e>>2]|0;c[e>>2]=k+1;c[i>>2]=k;c[(c[h>>2]|0)+(c[i>>2]<<2)>>2]=c[g>>2];c[(c[h>>2]|0)+((c[i>>2]|0)+1<<2)>>2]=0;c[(c[f>>2]|0)+52>>2]=c[h>>2];l=j;return}}function Nt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=-1e6;if(!(c[e>>2]|0)){f=c[f>>2]|0;l=g;return f|0}c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[(c[d>>2]|0)+20>>2]|0)){a=6;break}if((c[(c[(c[d>>2]|0)+16>>2]|0)+(c[f>>2]<<4)+12>>2]|0)==(c[e>>2]|0)){a=6;break}c[f>>2]=(c[f>>2]|0)+1}if((a|0)==6){f=c[f>>2]|0;l=g;return f|0}return 0}function Ot(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;q=r;k=r+32|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;h=r+12|0;i=r+8|0;j=r+4|0;c[m>>2]=a;c[n>>2]=b;c[o>>2]=e;c[p>>2]=f;c[h>>2]=g;c[i>>2]=c[c[m>>2]>>2];if((d[(c[i>>2]|0)+148+5>>0]|0|0)==0?(d[(c[m>>2]|0)+410>>0]|0|0)==0:0){if(!(c[(c[i>>2]|0)+296>>2]|0)){c[k>>2]=0;q=c[k>>2]|0;l=r;return q|0}c[j>>2]=sb[c[(c[i>>2]|0)+296>>2]&255](c[(c[i>>2]|0)+300>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[h>>2]|0,c[(c[m>>2]|0)+448>>2]|0)|0;if((c[j>>2]|0)!=1){if((c[j>>2]|0)!=0&(c[j>>2]|0)!=2){c[j>>2]=1;Pt(c[m>>2]|0)}}else{Ck(c[m>>2]|0,23261,q);c[(c[m>>2]|0)+12>>2]=23}c[k>>2]=c[j>>2];q=c[k>>2]|0;l=r;return q|0}c[k>>2]=0;q=c[k>>2]|0;l=r;return q|0}function Pt(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b+4|0;c[d>>2]=a;Ck(c[d>>2]|0,23276,b);c[(c[d>>2]|0)+12>>2]=1;l=b;return}function Qt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+128|0;h=n+36|0;f=n+32|0;g=n+16|0;i=n+8|0;j=n+4|0;k=n;m=n+40|0;c[h>>2]=b;c[f>>2]=d;c[j>>2]=0;c[k>>2]=c[c[h>>2]>>2];if(c[(c[h>>2]|0)+36>>2]|0){l=n;return}c[g>>2]=e;c[i>>2]=Cj(c[k>>2]|0,c[f>>2]|0,g)|0;if(!(c[i>>2]|0)){l=n;return}b=(c[h>>2]|0)+18|0;a[b>>0]=(a[b>>0]|0)+1<<24>>24;b=m;d=(c[h>>2]|0)+400|0;f=b+80|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(f|0));b=(c[h>>2]|0)+400|0;f=b+80|0;do{a[b>>0]=0;b=b+1|0}while((b|0)<(f|0));Vr(c[h>>2]|0,c[i>>2]|0,j)|0;Hd(c[k>>2]|0,c[j>>2]|0);Hd(c[k>>2]|0,c[i>>2]|0);b=(c[h>>2]|0)+400|0;d=m;f=b+80|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(f|0));m=(c[h>>2]|0)+18|0;a[m>>0]=(a[m>>0]|0)+-1<<24>>24;l=n;return}function Rt(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+8>>2];if(c[d>>2]|0){d=c[d>>2]|0;l=e;return d|0}else{d=eu(c[b>>2]|0)|0;l=e;return d|0}return 0}function St(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=l;l=l+16|0;h=d+12|0;e=d+8|0;f=d+4|0;g=d;c[h>>2]=a;c[e>>2]=b;c[f>>2]=c[c[h>>2]>>2];c[g>>2]=c[(c[h>>2]|0)+8>>2];Xt(c[g>>2]|0,102,c[e>>2]|0,1,(c[c[(c[(c[f>>2]|0)+16>>2]|0)+(c[e>>2]<<4)+12>>2]>>2]|0)+1|0)|0;l=d;return}function Tt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=Xt(c[f>>2]|0,c[e>>2]|0,0,0,0)|0;l=d;return b|0}function Ut(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;e=g+12|0;i=g+8|0;h=g+4|0;f=g;c[e>>2]=a;c[i>>2]=b;c[h>>2]=d;_t(c[e>>2]|0,136,c[i>>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>2]|0)+8>>2]=c[p>>2];c[(c[j>>2]|0)+12>>2]=c[h>>2];c[(c[j>>2]|0)+16>>2]=0;a[(c[j>>2]|0)+1>>0]=0;c[k>>2]=c[i>>2];p=c[k>>2]|0;l=q;return p|0}return 0}function Yt(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+20|0;i=n+16|0;j=n+12|0;k=n+8|0;m=n+4|0;g=n;c[i>>2]=a;c[j>>2]=b;c[k>>2]=d;c[m>>2]=e;c[g>>2]=f;if(Zt(c[i>>2]|0,1)|0){c[h>>2]=1;m=c[h>>2]|0;l=n;return m|0}else{c[h>>2]=Xt(c[i>>2]|0,c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[g>>2]|0)|0;m=c[h>>2]|0;l=n;return m|0}return 0}function Zt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;d=h+16|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[h+12>>2]=b;c[f>>2]=c[(c[d>>2]|0)+12>>2];if(c[(c[f>>2]|0)+48>>2]|0)a=c[(c[f>>2]|0)+48>>2]<<1;else a=51;c[g>>2]=a;c[e>>2]=Pd(c[c[f>>2]>>2]|0,c[(c[d>>2]|0)+88>>2]|0,(c[g>>2]|0)*20|0,0)|0;if(!(c[e>>2]|0)){g=c[e>>2]|0;g=(g|0)!=0;g=g?0:7;l=h;return g|0}g=Md(c[c[f>>2]>>2]|0,c[e>>2]|0)|0;c[(c[f>>2]|0)+52>>2]=g;c[(c[f>>2]|0)+48>>2]=((c[(c[f>>2]|0)+52>>2]|0)>>>0)/20|0;c[(c[d>>2]|0)+88>>2]=c[e>>2];g=c[e>>2]|0;g=(g|0)!=0;g=g?0:7;l=h;return g|0}function _t(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;j=l;l=l+32|0;n=j+28|0;r=j+24|0;q=j+20|0;p=j+16|0;o=j+12|0;m=j+8|0;k=j+4|0;i=j;c[n>>2]=a;c[r>>2]=b;c[q>>2]=d;c[p>>2]=e;c[o>>2]=f;c[m>>2]=g;c[k>>2]=h;c[i>>2]=Xt(c[n>>2]|0,c[r>>2]|0,c[q>>2]|0,c[p>>2]|0,c[o>>2]|0)|0;$t(c[n>>2]|0,c[i>>2]|0,c[m>>2]|0,c[k>>2]|0);l=j;return c[i>>2]|0}function $t(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;j=n+12|0;k=n+8|0;m=n+4|0;i=n;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=f;c[i>>2]=c[c[g>>2]>>2];if(a[(c[i>>2]|0)+69>>0]|0){if((c[k>>2]|0)==-10){l=n;return}Nj(c[i>>2]|0,c[k>>2]|0,c[j>>2]|0);l=n;return}if((c[h>>2]|0)<0)c[h>>2]=(c[(c[g>>2]|0)+136>>2]|0)-1;c[m>>2]=(c[(c[g>>2]|0)+88>>2]|0)+((c[h>>2]|0)*20|0);if((c[k>>2]|0)<0?(a[(c[m>>2]|0)+1>>0]|0)==0:0){b=c[j>>2]|0;if((c[k>>2]|0)==-14){c[(c[m>>2]|0)+16>>2]=b;a[(c[m>>2]|0)+1>>0]=-14;l=n;return}if(!b){l=n;return}c[(c[m>>2]|0)+16>>2]=c[j>>2];a[(c[m>>2]|0)+1>>0]=c[k>>2];if((c[k>>2]|0)!=-10){l=n;return}bu(c[j>>2]|0);l=n;return}au(c[g>>2]|0,c[m>>2]|0,c[j>>2]|0,c[k>>2]|0);l=n;return}function au(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;if(a[(c[h>>2]|0)+1>>0]|0){Nj(c[c[g>>2]>>2]|0,a[(c[h>>2]|0)+1>>0]|0,c[(c[h>>2]|0)+16>>2]|0);a[(c[h>>2]|0)+1>>0]=0;c[(c[h>>2]|0)+16>>2]=0}if((c[j>>2]|0)<0){$t(c[g>>2]|0,((c[h>>2]|0)-(c[(c[g>>2]|0)+88>>2]|0)|0)/20|0,c[i>>2]|0,c[j>>2]|0);l=k;return}if(!(c[j>>2]|0))c[j>>2]=_c(c[i>>2]|0)|0;j=c[j>>2]|0;j=zj(c[c[g>>2]>>2]|0,c[i>>2]|0,j,((j|0)<0)<<31>>31)|0;c[(c[h>>2]|0)+16>>2]=j;a[(c[h>>2]|0)+1>>0]=-1;l=k;return}function bu(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)+12|0;c[a>>2]=(c[a>>2]|0)+1;l=b;return}function cu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;b=(c[d>>2]|0)+148|0;c[b>>2]=c[b>>2]|1<>2];if((c[e>>2]|0)==1){l=f;return}if(!(du(c[(c[(c[c[d>>2]>>2]|0)+16>>2]|0)+(c[e>>2]<<4)+4>>2]|0)|0)){l=f;return}d=(c[d>>2]|0)+152|0;c[d>>2]=c[d>>2]|1<>2];l=f;return}function du(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[(c[b>>2]|0)+9>>0]|0|0}function eu(b){b=b|0;var d=0,f=0,g=0;g=l;l=l+16|0;d=g+4|0;f=g;c[d>>2]=b;b=fu(c[d>>2]|0)|0;c[(c[d>>2]|0)+8>>2]=b;c[f>>2]=b;if(c[f>>2]|0)Wt(c[f>>2]|0,71,0,1)|0;if(c[(c[d>>2]|0)+124>>2]|0){f=c[f>>2]|0;l=g;return f|0}if((e[(c[c[d>>2]>>2]|0)+64>>1]|0)&8|0){f=c[f>>2]|0;l=g;return f|0}a[(c[d>>2]|0)+23>>0]=1;f=c[f>>2]|0;l=g;return f|0}function fu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=c[c[e>>2]>>2];c[g>>2]=od(c[f>>2]|0,208,0)|0;if(!(c[g>>2]|0)){c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}a=(c[g>>2]|0)+88|0;b=a+120|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[c[g>>2]>>2]=c[f>>2];if(c[(c[f>>2]|0)+4>>2]|0)c[(c[(c[f>>2]|0)+4>>2]|0)+4>>2]=c[g>>2];c[(c[g>>2]|0)+8>>2]=c[(c[f>>2]|0)+4>>2];c[(c[g>>2]|0)+4>>2]=0;c[(c[f>>2]|0)+4>>2]=c[g>>2];c[(c[g>>2]|0)+20>>2]=381479589;c[(c[g>>2]|0)+12>>2]=c[e>>2];c[d>>2]=c[g>>2];g=c[d>>2]|0;l=h;return g|0}function gu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[c[g>>2]>>2]|0){c[i>>2]=Nt(c[c[e>>2]>>2]|0,c[c[g>>2]>>2]|0)|0;c[h>>2]=c[(c[(c[c[e>>2]>>2]|0)+16>>2]|0)+(c[i>>2]<<4)>>2]}else c[h>>2]=c[(c[g>>2]|0)+4>>2];i=ku(c[e>>2]|0,c[f>>2]|0,c[(c[g>>2]|0)+8>>2]|0,c[h>>2]|0)|0;l=j;return i|0}function hu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h;d=h+12|0;e=h+8|0;f=h+4|0;c[e>>2]=a;c[f>>2]=b;if((_c(c[f>>2]|0)|0)>6?0==(Zc(c[f>>2]|0,23554,7)|0):0){e=c[e>>2]|0;c[g>>2]=c[f>>2];Ck(e,23562,g);c[d>>2]=1;g=c[d>>2]|0;l=h;return g|0}c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}function iu(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;b=c[g>>2]|0;if(c[(c[g>>2]|0)+124>>2]|0)b=c[b+124>>2]|0;c[j>>2]=b;ju(c[g>>2]|0,c[i>>2]|0);g=(c[j>>2]|0)+92|0;c[g>>2]=c[g>>2]|1<>2];j=(c[j>>2]|0)+20|0;a[j>>0]=d[j>>0]|0|c[h>>2];l=k;return}function ju(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[d>>2]=b;a=c[g>>2]|0;if(c[(c[g>>2]|0)+124>>2]|0)a=c[a+124>>2]|0;c[e>>2]=a;if((c[(c[e>>2]|0)+96>>2]&1<>2]|0)!=0|0){l=f;return}g=(c[e>>2]|0)+96|0;c[g>>2]=c[g>>2]|1<>2];if((c[d>>2]|0)!=1){l=f;return}zk(c[e>>2]|0)|0;l=f;return}function ku(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+64|0;q=r+16|0;p=r;j=r+52|0;k=r+48|0;h=r+44|0;m=r+40|0;n=r+36|0;o=r+32|0;i=r+28|0;g=r+24|0;c[k>>2]=b;c[h>>2]=d;c[m>>2]=e;c[n>>2]=f;if(lu(c[k>>2]|0)|0){c[j>>2]=0;q=c[j>>2]|0;l=r;return q|0}c[o>>2]=mu(c[c[k>>2]>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;if(!(c[o>>2]|0)){c[i>>2]=c[h>>2]&1|0?23590:23603;if(((yk(c[c[k>>2]>>2]|0,c[n>>2]|0)|0)<1?(c[g>>2]=nu((c[c[k>>2]>>2]|0)+320|0,c[m>>2]|0)|0,c[g>>2]|0):0)?ou(c[k>>2]|0,c[g>>2]|0)|0:0){c[j>>2]=c[(c[g>>2]|0)+16>>2];q=c[j>>2]|0;l=r;return q|0}if(!(c[h>>2]&2)){d=c[k>>2]|0;b=c[i>>2]|0;if(c[n>>2]|0){n=c[n>>2]|0;q=c[m>>2]|0;c[p>>2]=b;c[p+4>>2]=n;c[p+8>>2]=q;Ck(d,23617,p)}else{p=c[m>>2]|0;c[q>>2]=b;c[q+4>>2]=p;Ck(d,23627,q)}a[(c[k>>2]|0)+17>>0]=1}}c[j>>2]=c[o>>2];q=c[j>>2]|0;l=r;return q|0}function lu(b){b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=b;c[e>>2]=0;c[f>>2]=c[c[d>>2]>>2];if(!(a[(c[f>>2]|0)+148+5>>0]|0))c[e>>2]=ru(c[f>>2]|0,(c[d>>2]|0)+4|0)|0;if(!(c[e>>2]|0)){f=c[e>>2]|0;l=g;return f|0}c[(c[d>>2]|0)+12>>2]=c[e>>2];f=(c[d>>2]|0)+36|0;c[f>>2]=(c[f>>2]|0)+1;f=c[e>>2]|0;l=g;return f|0}function mu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+20|0;f=m+16|0;g=m+12|0;h=m+8|0;i=m+4|0;j=m;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[(c[e>>2]|0)+20>>2]|0)){k=7;break}d=c[i>>2]|0;c[j>>2]=(c[i>>2]|0)<2?d^1:d;if(!((c[g>>2]|0)!=0?(Ig(c[g>>2]|0,c[(c[(c[e>>2]|0)+16>>2]|0)+(c[j>>2]<<4)>>2]|0)|0)!=0:0))k=5;if((k|0)==5?(k=0,c[h>>2]=nu((c[(c[(c[e>>2]|0)+16>>2]|0)+(c[j>>2]<<4)+12>>2]|0)+8|0,c[f>>2]|0)|0,c[h>>2]|0):0){k=7;break}c[i>>2]=(c[i>>2]|0)+1}if((k|0)==7){l=m;return c[h>>2]|0}return 0}function nu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+12|0;f=e+8|0;d=e+4|0;c[g>>2]=a;c[f>>2]=b;c[d>>2]=kk(c[g>>2]|0,c[f>>2]|0,e)|0;if(!(c[d>>2]|0)){g=0;l=e;return g|0}g=c[(c[d>>2]|0)+8>>2]|0;l=e;return g|0}function ou(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;p=q;g=q+32|0;h=q+28|0;i=q+24|0;j=q+20|0;k=q+16|0;m=q+12|0;n=q+8|0;o=q+4|0;c[h>>2]=e;c[i>>2]=f;c[j>>2]=c[c[i>>2]>>2];c[m>>2]=0;c[o>>2]=c[c[h>>2]>>2];if(c[(c[i>>2]|0)+16>>2]|0){c[g>>2]=1;p=c[g>>2]|0;l=q;return p|0}if(c[(c[j>>2]|0)+4>>2]|0?(c[(c[j>>2]|0)+4>>2]|0)!=(c[(c[j>>2]|0)+8>>2]|0):0){c[g>>2]=0;p=c[g>>2]|0;l=q;return p|0}c[k>>2]=jl(c[o>>2]|0,72,0)|0;if(!(c[k>>2]|0)){c[g>>2]=0;p=c[g>>2]|0;l=q;return p|0}f=go(c[o>>2]|0,c[(c[i>>2]|0)+4>>2]|0)|0;c[c[k>>2]>>2]=f;if(!(c[c[k>>2]>>2]|0)){Hd(c[o>>2]|0,c[k>>2]|0);c[g>>2]=0;p=c[g>>2]|0;l=q;return p|0}c[(c[i>>2]|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[x>>2]|0)+12>>2]=1;if(!(c[o+12>>2]|0)){c[s>>2]=23706;H=c[M>>2]|0;I=c[s>>2]|0;c[v>>2]=c[c[G>>2]>>2];I=Bj(H,I,v)|0;c[c[w>>2]>>2]=I;Tj(c[x>>2]|0);c[J>>2]=1;break}a[A>>0]=0;c[(c[x>>2]|0)+24>>2]=c[(c[G>>2]|0)+56>>2];c[(c[G>>2]|0)+56>>2]=c[x>>2];c[z>>2]=0;while(1){if((c[z>>2]|0)>=(b[(c[G>>2]|0)+34>>1]|0))break a;c[B>>2]=qu((c[(c[G>>2]|0)+4>>2]|0)+(c[z>>2]<<4)|0,47636)|0;c[D>>2]=0;c[C>>2]=_c(c[B>>2]|0)|0;c[D>>2]=0;b:while(1){if((c[D>>2]|0)>=(c[C>>2]|0))break;do if(!(Zc(23752,(c[B>>2]|0)+(c[D>>2]|0)|0,6)|0)){if(c[D>>2]|0?(a[(c[B>>2]|0)+((c[D>>2]|0)-1)>>0]|0)!=32:0)break;if(!(a[(c[B>>2]|0)+((c[D>>2]|0)+6)>>0]|0))break b;if((a[(c[B>>2]|0)+((c[D>>2]|0)+6)>>0]|0)==32)break b}while(0);c[D>>2]=(c[D>>2]|0)+1}if((c[D>>2]|0)<(c[C>>2]|0)){c[F>>2]=6+(a[(c[B>>2]|0)+((c[D>>2]|0)+6)>>0]|0?1:0);c[E>>2]=c[D>>2];while(1){e=c[B>>2]|0;if(((c[E>>2]|0)+(c[F>>2]|0)|0)>(c[C>>2]|0))break;a[(c[B>>2]|0)+(c[E>>2]|0)>>0]=a[e+((c[E>>2]|0)+(c[F>>2]|0))>>0]|0;c[E>>2]=(c[E>>2]|0)+1}if((c[D>>2]|0)>0?(a[e+(c[D>>2]|0)>>0]|0)==0:0)a[(c[B>>2]|0)+((c[D>>2]|0)-1)>>0]=0;I=(c[(c[G>>2]|0)+4>>2]|0)+(c[z>>2]<<4)+15|0;a[I>>0]=d[I>>0]|2;a[A>>0]=-128}else{I=(c[G>>2]|0)+42|0;a[I>>0]=d[I>>0]|d[A>>0]}c[z>>2]=(c[z>>2]|0)+1}}}else{e=c[M>>2]|0;if(!(c[y>>2]|0)){c[H>>2]=c[K>>2];I=Bj(e,23676,H)|0;c[c[w>>2]>>2]=I}else{c[I>>2]=c[y>>2];I=Bj(e,18130,I)|0;c[c[w>>2]>>2]=I;Kd(c[y>>2]|0)}Hd(c[M>>2]|0,c[x>>2]|0)}while(0);Hd(c[M>>2]|0,c[K>>2]|0);c[L>>2]=c[J>>2];M=c[L>>2]|0;l=N;return M|0}function qu(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;if(!((d[(c[f>>2]|0)+15>>0]|0)&4)){c[e>>2]=c[g>>2];g=c[e>>2]|0;l=h;return g|0}else{g=c[c[f>>2]>>2]|0;c[e>>2]=g+(lQ(c[c[f>>2]>>2]|0)|0)+1;g=c[e>>2]|0;l=h;return g|0}return 0}function ru(b,d){b=b|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=b;c[g>>2]=d;c[j>>2]=((c[(c[f>>2]|0)+24>>2]&2|0)!=0^1)&1;c[i>>2]=0;a[(c[f>>2]|0)+148+5>>0]=1;a[(c[f>>2]|0)+66>>0]=a[(c[(c[(c[f>>2]|0)+16>>2]|0)+12>>2]|0)+77>>0]|0;c[h>>2]=0;while(1){if(c[i>>2]|0)break;if((c[h>>2]|0)>=(c[(c[f>>2]|0)+20>>2]|0))break;if(!((c[h>>2]|0)==1?1:((e[(c[(c[(c[f>>2]|0)+16>>2]|0)+(c[h>>2]<<4)+12>>2]|0)+78>>1]|0)&1|0)==1)?(c[i>>2]=su(c[f>>2]|0,c[h>>2]|0,c[g>>2]|0)|0,c[i>>2]|0):0)$r(c[f>>2]|0,c[h>>2]|0);c[h>>2]=(c[h>>2]|0)+1}if(((c[i>>2]|0)==0?((e[(c[(c[(c[f>>2]|0)+16>>2]|0)+16+12>>2]|0)+78>>1]|0)&1|0)!=1:0)?(c[i>>2]=su(c[f>>2]|0,1,c[g>>2]|0)|0,c[i>>2]|0):0)$r(c[f>>2]|0,1);a[(c[f>>2]|0)+148+5>>0]=0;if(!((c[i>>2]|0)==0&(c[j>>2]|0)!=0)){j=c[i>>2]|0;l=k;return j|0}er(c[f>>2]|0);j=c[i>>2]|0;l=k;return j|0}function su(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;A=l;l=l+128|0;z=A;t=A+108|0;u=A+104|0;v=A+100|0;w=A+96|0;x=A+92|0;i=A+88|0;y=A+84|0;k=A+80|0;B=A+64|0;m=A+40|0;n=A+24|0;o=A+20|0;p=A+16|0;q=A+112|0;r=A+12|0;s=A+8|0;c[u>>2]=f;c[v>>2]=g;c[w>>2]=h;c[p>>2]=0;h=(c[v>>2]|0)==1?23323:23342;c[o>>2]=h;c[B>>2]=h;c[B+4>>2]=23759;c[B+8>>2]=23761;c[B+12>>2]=0;c[n>>2]=c[u>>2];c[n+8>>2]=c[v>>2];c[n+12>>2]=0;c[n+4>>2]=c[w>>2];tu(n,3,B,0)|0;if(!(c[n+12>>2]|0)){c[k>>2]=(c[(c[u>>2]|0)+16>>2]|0)+(c[v>>2]<<4);if(!(c[(c[k>>2]|0)+4>>2]|0)){if((c[v>>2]|0)==1){B=(c[(c[(c[u>>2]|0)+16>>2]|0)+16+12>>2]|0)+78|0;b[B>>1]=e[B>>1]|1}c[t>>2]=0;B=c[t>>2]|0;l=A;return B|0}Ek(c[(c[k>>2]|0)+4>>2]|0);do if(!(xk(c[(c[k>>2]|0)+4>>2]|0)|0)){c[x>>2]=Ro(c[(c[k>>2]|0)+4>>2]|0,0)|0;if(c[x>>2]|0){z=c[w>>2]|0;B=c[u>>2]|0;uu(z,B,Ci(c[x>>2]|0)|0);break}else{c[p>>2]=1;j=11;break}}else j=11;while(0);a:do if((j|0)==11){c[i>>2]=0;while(1){if((c[i>>2]|0)>=5)break;To(c[(c[k>>2]|0)+4>>2]|0,(c[i>>2]|0)+1|0,m+(c[i>>2]<<2)|0);c[i>>2]=(c[i>>2]|0)+1}c[c[(c[k>>2]|0)+12>>2]>>2]=c[m>>2];do if(c[m+16>>2]|0){f=c[m+16>>2]|0;if(!(c[v>>2]|0)){B=f&3;a[q>>0]=B;a[q>>0]=(d[q>>0]|0)==0?1:B;a[(c[u>>2]|0)+66>>0]=a[q>>0]|0;break}if((f|0)!=(d[(c[u>>2]|0)+66>>0]|0)){uu(c[w>>2]|0,c[u>>2]|0,23837);c[x>>2]=1;break a}}else{B=(c[(c[(c[u>>2]|0)+16>>2]|0)+(c[v>>2]<<4)+12>>2]|0)+78|0;b[B>>1]=e[B>>1]|4}while(0);a[(c[(c[k>>2]|0)+12>>2]|0)+77>>0]=a[(c[u>>2]|0)+66>>0]|0;if(!(c[(c[(c[k>>2]|0)+12>>2]|0)+80>>2]|0)){B=Ap(c[m+8>>2]|0)|0;c[y>>2]=B;c[y>>2]=(c[y>>2]|0)==0?-2e3:B;c[(c[(c[k>>2]|0)+12>>2]|0)+80>>2]=c[y>>2];vu(c[(c[k>>2]|0)+4>>2]|0,c[(c[(c[k>>2]|0)+12>>2]|0)+80>>2]|0)|0}a[(c[(c[k>>2]|0)+12>>2]|0)+76>>0]=c[m+4>>2];if(!(d[(c[(c[k>>2]|0)+12>>2]|0)+76>>0]|0))a[(c[(c[k>>2]|0)+12>>2]|0)+76>>0]=1;if((d[(c[(c[k>>2]|0)+12>>2]|0)+76>>0]|0)>4){uu(c[w>>2]|0,c[u>>2]|0,23905);c[x>>2]=1;break}if((c[v>>2]|0)==0?(c[m+4>>2]|0)>=4:0){B=(c[u>>2]|0)+24|0;c[B>>2]=c[B>>2]&-32769}B=c[u>>2]|0;y=c[o>>2]|0;c[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1;t=c[p>>2]|0;l=s;return t|0}if(!(c[q>>2]|0)){c[p>>2]=0;t=c[p>>2]|0;l=s;return t|0}a:do if(!(c[(c[q>>2]|0)+4>>2]|0))Ru(c[r>>2]|0,c[c[q>>2]>>2]|0,0);else{if(Zc(c[(c[q>>2]|0)+8>>2]|0,24124,7)|0){do if(c[c[q>>2]>>2]|0){if(c[(c[q>>2]|0)+8>>2]|0?a[c[(c[q>>2]|0)+8>>2]>>0]|0:0)break;c[o>>2]=Bu(c[i>>2]|0,c[c[q>>2]>>2]|0,c[(c[(c[i>>2]|0)+16>>2]|0)+(c[j>>2]<<4)>>2]|0)|0;if(!(c[o>>2]|0))break a;if(Nf(c[(c[q>>2]|0)+4>>2]|0,(c[o>>2]|0)+44|0)|0)break a;Ru(c[r>>2]|0,c[c[q>>2]>>2]|0,24132);break a}while(0);Ru(c[r>>2]|0,c[c[q>>2]>>2]|0,0);break}a[m>>0]=a[(c[i>>2]|0)+148+4>>0]|0;a[(c[i>>2]|0)+148+4>>0]=c[j>>2];t=Mf(c[(c[q>>2]|0)+4>>2]|0)|0;c[(c[i>>2]|0)+148>>2]=t;a[(c[i>>2]|0)+148+6>>0]=0;Su(c[i>>2]|0,c[(c[q>>2]|0)+8>>2]|0,-1,n,0)|0;c[k>>2]=c[(c[i>>2]|0)+52>>2];a[(c[i>>2]|0)+148+4>>0]=a[m>>0]|0;do if(0!=(c[k>>2]|0)?(a[(c[i>>2]|0)+148+6>>0]|0)==0:0){c[(c[r>>2]|0)+12>>2]=c[k>>2];if((c[k>>2]|0)==7){yd(c[i>>2]|0);break}if((c[k>>2]|0)!=9?(c[k>>2]&255|0)!=6:0){r=c[r>>2]|0;t=c[c[q>>2]>>2]|0;Ru(r,t,Ku(c[i>>2]|0)|0)}}while(0);Qq(c[n>>2]|0)|0}while(0);c[p>>2]=0;t=c[p>>2]|0;l=s;return t|0}function uu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;Hd(c[h>>2]|0,c[c[f>>2]>>2]|0);d=go(c[h>>2]|0,c[g>>2]|0)|0;c[c[f>>2]>>2]=d;l=e;return}function vu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;e=d+4|0;f=d;c[g>>2]=a;c[e>>2]=b;c[f>>2]=c[(c[g>>2]|0)+4>>2];Ek(c[g>>2]|0);hl(c[c[f>>2]>>2]|0,c[e>>2]|0);l=d;return 0}function wu(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=l;l=l+64|0;t=z+56|0;u=z+52|0;v=z+48|0;w=z+44|0;x=z+40|0;i=z+36|0;j=z+32|0;k=z+28|0;m=z+24|0;n=z+20|0;o=z+16|0;p=z+12|0;q=z+8|0;r=z+4|0;s=z;c[u>>2]=b;c[v>>2]=e;c[w>>2]=f;c[x>>2]=g;c[i>>2]=h;c[j>>2]=0;c[m>>2]=0;c[n>>2]=0;if(!(Sr(c[u>>2]|0)|0)){c[t>>2]=cd(109597)|0;y=c[t>>2]|0;l=z;return y|0}if(!(c[v>>2]|0))c[v>>2]=47636;wk(c[u>>2]|0,0);a:while(1){if(c[j>>2]|0)break;if(!(a[c[v>>2]>>0]|0))break;c[q>>2]=0;c[m>>2]=0;c[j>>2]=Fu(c[u>>2]|0,c[v>>2]|0,-1,m,k)|0;if(c[j>>2]|0)continue;if(!(c[m>>2]|0)){c[v>>2]=c[k>>2];continue}c[o>>2]=0;c[p>>2]=Gu(c[m>>2]|0)|0;do{c[j>>2]=Hr(c[m>>2]|0)|0;do if(c[w>>2]|0){if(100!=(c[j>>2]|0)){if(101!=(c[j>>2]|0)|(c[o>>2]|0)!=0)break;if(!(c[(c[u>>2]|0)+24>>2]&256))break}if(!(c[o>>2]|0)){c[n>>2]=jl(c[u>>2]|0,(c[p>>2]<<1<<2)+1|0,0)|0;if(!(c[n>>2]|0))break a;c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[p>>2]|0))break;h=Hu(c[m>>2]|0,c[r>>2]|0)|0;c[(c[n>>2]|0)+(c[r>>2]<<2)>>2]=h;c[r>>2]=(c[r>>2]|0)+1}c[o>>2]=1}b:do if((c[j>>2]|0)==100){c[q>>2]=(c[n>>2]|0)+(c[p>>2]<<2);c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[p>>2]|0))break b;h=Iu(c[m>>2]|0,c[r>>2]|0)|0;c[(c[q>>2]|0)+(c[r>>2]<<2)>>2]=h;if((c[(c[q>>2]|0)+(c[r>>2]<<2)>>2]|0)==0?(Ju(c[m>>2]|0,c[r>>2]|0)|0)!=5:0){y=27;break a}c[r>>2]=(c[r>>2]|0)+1}}while(0);if(wb[c[w>>2]&255](c[x>>2]|0,c[p>>2]|0,c[q>>2]|0,c[n>>2]|0)|0){y=30;break a}}while(0)}while((c[j>>2]|0)==100);c[j>>2]=Tq(c[m>>2]|0)|0;c[m>>2]=0;c[v>>2]=c[k>>2];while(1){if(!(d[16965+(d[c[v>>2]>>0]|0)>>0]&1))break;c[v>>2]=(c[v>>2]|0)+1}Hd(c[u>>2]|0,c[n>>2]|0);c[n>>2]=0}if((y|0)==27)yd(c[u>>2]|0);else if((y|0)==30){c[j>>2]=4;Tq(c[m>>2]|0)|0;c[m>>2]=0;wk(c[u>>2]|0,4)}if(c[m>>2]|0)Tq(c[m>>2]|0)|0;Hd(c[u>>2]|0,c[n>>2]|0);c[j>>2]=Uq(c[u>>2]|0,c[j>>2]|0)|0;do if((c[j>>2]|0)!=0&(c[i>>2]|0)!=0){c[s>>2]=1+(_c(Ku(c[u>>2]|0)|0)|0);y=c[s>>2]|0;y=pd(y,((y|0)<0)<<31>>31)|0;c[c[i>>2]>>2]=y;if(c[c[i>>2]>>2]|0){x=c[c[i>>2]>>2]|0;y=Ku(c[u>>2]|0)|0;MR(x|0,y|0,c[s>>2]|0)|0;break}else{c[j>>2]=7;wk(c[u>>2]|0,7);break}}else if(c[i>>2]|0)c[c[i>>2]>>2]=0;while(0);c[t>>2]=c[j>>2];y=c[t>>2]|0;l=z;return y|0}function xu(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o;e=o+36|0;f=o+32|0;g=o+24|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;c[e>>2]=a;c[f>>2]=d;c[j>>2]=0;c[h>>2]=c[(c[(c[(c[e>>2]|0)+16>>2]|0)+(c[f>>2]<<4)+12>>2]|0)+24+8>>2];while(1){if(!(c[h>>2]|0))break;c[k>>2]=c[(c[h>>2]|0)+8>>2];b[c[(c[k>>2]|0)+8>>2]>>1]=0;c[h>>2]=c[c[h>>2]>>2]}c[g>>2]=c[e>>2];c[g+4>>2]=c[(c[(c[e>>2]|0)+16>>2]|0)+(c[f>>2]<<4)>>2];do if(mu(c[e>>2]|0,23984,c[g+4>>2]|0)|0){k=c[e>>2]|0;c[n>>2]=c[g+4>>2];c[i>>2]=Bj(k,23997,n)|0;if(!(c[i>>2]|0)){c[j>>2]=7;break}else{c[j>>2]=wu(c[e>>2]|0,c[i>>2]|0,140,g,0)|0;Hd(c[e>>2]|0,c[i>>2]|0);break}}while(0);c[h>>2]=c[(c[(c[(c[e>>2]|0)+16>>2]|0)+(c[f>>2]<<4)+12>>2]|0)+24+8>>2];while(1){if(!(c[h>>2]|0))break;c[m>>2]=c[(c[h>>2]|0)+8>>2];if(!(b[c[(c[m>>2]|0)+8>>2]>>1]|0))zu(c[m>>2]|0);c[h>>2]=c[c[h>>2]>>2]}if((c[j>>2]|0)!=7){n=c[j>>2]|0;l=o;return n|0}yd(c[e>>2]|0);n=c[j>>2]|0;l=o;return n|0}function yu(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i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0;f=k+12|0;g=k+16|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=a;b[g>>1]=b[6460]|0;b[g+2>>1]=b[6461]|0;b[g+4>>1]=b[6462]|0;b[g+6>>1]=b[6463]|0;b[g+8>>1]=b[6464]|0;c[h>>2]=c[(c[f>>2]|0)+8>>2];if(5<(e[(c[f>>2]|0)+50>>1]|0))a=5;else a=e[(c[f>>2]|0)+50>>1]|0;c[i>>2]=a;b[c[h>>2]>>1]=b[(c[(c[f>>2]|0)+12>>2]|0)+38>>1]|0;if(c[(c[f>>2]|0)+36>>2]|0){a=c[h>>2]|0;b[a>>1]=(b[a>>1]|0)-10}if((b[c[h>>2]>>1]|0)<33)b[c[h>>2]>>1]=33;MR((c[h>>2]|0)+2|0,g|0,c[i>>2]<<1|0)|0;c[j>>2]=(c[i>>2]|0)+1;while(1){if((c[j>>2]|0)>(e[(c[f>>2]|0)+50>>1]|0))break;b[(c[h>>2]|0)+(c[j>>2]<<1)>>1]=23;c[j>>2]=(c[j>>2]|0)+1}if(!(d[(c[f>>2]|0)+54>>0]|0)){l=k;return}b[(c[h>>2]|0)+(e[(c[f>>2]|0)+50>>1]<<1)>>1]=0;l=k;return}function Au(b){b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[f>>2]=b;c[d>>2]=c[(c[f>>2]|0)+8>>2];while(1){if(!(c[d>>2]|0)){b=5;break}if(!((a[(c[d>>2]|0)+55>>0]&3|0)==2^1)){b=5;break}c[d>>2]=c[(c[d>>2]|0)+20>>2]}if((b|0)==5){l=e;return c[d>>2]|0}return 0}function Bu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;e=n+24|0;f=n+20|0;g=n+16|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[(c[e>>2]|0)+20>>2]|0)){m=7;break}d=c[i>>2]|0;c[j>>2]=(c[i>>2]|0)<2?d^1:d;c[k>>2]=c[(c[(c[e>>2]|0)+16>>2]|0)+(c[j>>2]<<4)+12>>2];if(!(c[g>>2]|0?(Ig(c[g>>2]|0,c[(c[(c[e>>2]|0)+16>>2]|0)+(c[j>>2]<<4)>>2]|0)|0)!=0:0))m=5;if((m|0)==5?(m=0,c[h>>2]=nu((c[k>>2]|0)+24|0,c[f>>2]|0)|0,c[h>>2]|0):0){m=7;break}c[i>>2]=(c[i>>2]|0)+1}if((m|0)==7){l=n;return c[h>>2]|0}return 0}function Cu(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+48|0;r=q+32|0;m=q+28|0;n=q+20|0;p=q+16|0;o=q+12|0;i=q+8|0;j=q+4|0;k=q;c[r>>2]=d;c[m>>2]=e;c[q+24>>2]=f;c[n>>2]=g;c[p>>2]=h;c[o>>2]=c[r>>2];c[j>>2]=0;while(1){if(!(a[c[o>>2]>>0]|0))break;if((c[j>>2]|0)>=(c[m>>2]|0))break;c[k>>2]=0;while(1){r=a[c[o>>2]>>0]|0;c[i>>2]=r;if(!((r|0)>=48?(c[i>>2]|0)<=57:0))break;c[k>>2]=((c[k>>2]|0)*10|0)+(c[i>>2]|0)-48;c[o>>2]=(c[o>>2]|0)+1}r=Du(c[k>>2]|0,0)|0;b[(c[n>>2]|0)+(c[j>>2]<<1)>>1]=r;if((a[c[o>>2]>>0]|0)==32)c[o>>2]=(c[o>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+1}r=(c[p>>2]|0)+55|0;a[r>>0]=a[r>>0]&-5;r=(c[p>>2]|0)+55|0;a[r>>0]=a[r>>0]&-65;a:while(1){if(!(a[c[o>>2]>>0]|0))break;do if(Eu(24038,c[o>>2]|0)|0){r=(Eu(24049,c[o>>2]|0)|0)==0;d=c[o>>2]|0;if(r){r=Mf(d+3|0)|0;r=Du(r,((r|0)<0)<<31>>31)|0;b[(c[p>>2]|0)+48>>1]=r;break}if(!(Eu(24059,d)|0)){r=(c[p>>2]|0)+55|0;a[r>>0]=a[r>>0]&-65|64}}else{r=(c[p>>2]|0)+55|0;a[r>>0]=a[r>>0]&-5|4}while(0);while(1){if(!(a[c[o>>2]>>0]|0))break;if((a[c[o>>2]>>0]|0)==32)break;c[o>>2]=(c[o>>2]|0)+1}while(1){if((a[c[o>>2]>>0]|0)!=32)continue a;c[o>>2]=(c[o>>2]|0)+1}}l=q;return}function Du(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;e=h+10|0;f=h;g=h+8|0;i=f;c[i>>2]=a;c[i+4>>2]=d;b[g>>1]=40;d=f;a=c[d+4>>2]|0;a:do if(a>>>0<0|(a|0)==0&(c[d>>2]|0)>>>0<8){i=f;d=c[i+4>>2]|0;if(d>>>0<0|(d|0)==0&(c[i>>2]|0)>>>0<2){b[e>>1]=0;i=b[e>>1]|0;l=h;return i|0}else while(1){i=f;d=c[i+4>>2]|0;if(!(d>>>0<0|(d|0)==0&(c[i>>2]|0)>>>0<8))break a;b[g>>1]=(b[g>>1]|0)-10;d=f;d=HR(c[d>>2]|0,c[d+4>>2]|0,1)|0;i=f;c[i>>2]=d;c[i+4>>2]=z}}else{while(1){i=f;d=c[i+4>>2]|0;if(!(d>>>0>0|(d|0)==0&(c[i>>2]|0)>>>0>255))break;b[g>>1]=(b[g>>1]|0)+40;d=f;d=OR(c[d>>2]|0,c[d+4>>2]|0,4)|0;i=f;c[i>>2]=d;c[i+4>>2]=z}while(1){i=f;d=c[i+4>>2]|0;if(!(d>>>0>0|(d|0)==0&(c[i>>2]|0)>>>0>15))break a;b[g>>1]=(b[g>>1]|0)+10;d=f;d=OR(c[d>>2]|0,c[d+4>>2]|0,1)|0;i=f;c[i>>2]=d;c[i+4>>2]=z}}while(0);b[e>>1]=(b[12930+((c[f>>2]&7)<<1)>>1]|0)+(b[g>>1]|0)-10;i=b[e>>1]|0;l=h;return i|0}function Eu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=(Bh(c[f>>2]|0,c[e>>2]|0,18912,91)|0)==0&1;l=d;return b|0}function Fu(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+32|0;n=h+20|0;m=h+16|0;k=h+12|0;j=h+8|0;i=h+4|0;g=h;c[n>>2]=a;c[m>>2]=b;c[k>>2]=d;c[j>>2]=e;c[i>>2]=f;c[g>>2]=Nr(c[n>>2]|0,c[m>>2]|0,c[k>>2]|0,1,0,c[j>>2]|0,c[i>>2]|0)|0;l=h;return c[g>>2]|0}function Gu(a){a=a|0;var b=0,d=0,f=0;d=l;l=l+16|0;f=d+4|0;b=d;c[f>>2]=a;c[b>>2]=c[f>>2];if(!(c[b>>2]|0)){f=0;l=d;return f|0}f=e[(c[b>>2]|0)+140>>1]|0;l=d;return f|0}function Hu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=Qu(c[f>>2]|0,c[e>>2]|0,171,0)|0;l=d;return b|0}function Iu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=wh(Nu(c[f>>2]|0,c[g>>2]|0)|0)|0;Ou(c[f>>2]|0);l=e;return c[d>>2]|0}function Ju(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;d=e;c[f>>2]=a;c[g>>2]=b;c[d>>2]=fi(Nu(c[f>>2]|0,c[g>>2]|0)|0)|0;Ou(c[f>>2]|0);l=e;return c[d>>2]|0}function Ku(b){b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[e>>2]=b;if(!(c[e>>2]|0)){c[d>>2]=Ci(7)|0;f=c[d>>2]|0;l=g;return f|0}if(!(Lu(c[e>>2]|0)|0)){c[d>>2]=Ci(cd(140046)|0)|0;f=c[d>>2]|0;l=g;return f|0}if(!(a[(c[e>>2]|0)+69>>0]|0)){c[f>>2]=wh(c[(c[e>>2]|0)+244>>2]|0)|0;if(!(c[f>>2]|0))c[f>>2]=Ci(c[(c[e>>2]|0)+52>>2]|0)|0}else c[f>>2]=Ci(7)|0;c[d>>2]=c[f>>2];f=c[d>>2]|0;l=g;return f|0}function Lu(a){a=a|0;var b=0,d=0,e=0,f=0;d=l;l=l+16|0;b=d+8|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=c[(c[f>>2]|0)+84>>2];if((c[e>>2]|0)!=1266094736&(c[e>>2]|0)!=-1607883113&(c[e>>2]|0)!=-264537850){Mu(24071);c[b>>2]=0;f=c[b>>2]|0;l=d;return f|0}else{c[b>>2]=1;f=c[b>>2]|0;l=d;return f|0}return 0}function Mu(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;d=b;e=b+4|0;c[e>>2]=a;c[d>>2]=c[e>>2];hd(21,24079,d);l=b;return}function Nu(a,b){a=a|0;b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;d=i+16|0;j=i+12|0;f=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[f>>2]=b;c[g>>2]=c[j>>2];if(!(c[g>>2]|0)){c[d>>2]=Pu()|0;j=c[d>>2]|0;l=i;return j|0}if(c[(c[g>>2]|0)+104>>2]|0?((c[f>>2]|0)>=0?(c[f>>2]|0)<(e[(c[g>>2]|0)+140>>1]|0|0):0):0)c[h>>2]=(c[(c[g>>2]|0)+104>>2]|0)+((c[f>>2]|0)*40|0);else{wk(c[c[g>>2]>>2]|0,25);c[h>>2]=Pu()|0}c[d>>2]=c[h>>2];j=c[d>>2]|0;l=i;return j|0}function Ou(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];if(!(c[b>>2]|0)){l=d;return}e=Uq(c[c[b>>2]>>2]|0,c[(c[b>>2]|0)+40>>2]|0)|0;c[(c[b>>2]|0)+40>>2]=e;l=d;return}function Pu(){return 288}function Qu(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+32|0;p=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;m=o+12|0;n=o+8|0;g=o+4|0;h=o;c[p>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=0;c[n>>2]=c[p>>2];c[h>>2]=c[c[n>>2]>>2];c[g>>2]=Gu(c[p>>2]|0)|0;if(!((c[i>>2]|0)>=0?(c[i>>2]|0)<(c[g>>2]|0):0)){p=c[m>>2]|0;l=o;return p|0}p=O(c[k>>2]|0,c[g>>2]|0)|0;c[i>>2]=(c[i>>2]|0)+p;c[m>>2]=tb[c[j>>2]&255]((c[(c[n>>2]|0)+100>>2]|0)+((c[i>>2]|0)*40|0)|0)|0;if(!(a[(c[h>>2]|0)+69>>0]|0)){p=c[m>>2]|0;l=o;return p|0}Wq(c[h>>2]|0);c[m>>2]=0;p=c[m>>2]|0;l=o;return p|0}function Ru(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o+8|0;m=o;g=o+32|0;h=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;c[j>>2]=c[c[g>>2]>>2];if((a[(c[j>>2]|0)+69>>0]|0)==0?(c[(c[j>>2]|0)+24>>2]&65536|0)==0:0){if(!(c[h>>2]|0))c[h>>2]=24149;f=c[j>>2]|0;c[m>>2]=c[h>>2];c[k>>2]=Bj(f,24151,m)|0;if(c[i>>2]|0){m=c[j>>2]|0;i=c[i>>2]|0;c[n>>2]=c[k>>2];c[n+4>>2]=i;c[k>>2]=Bj(m,24182,n)|0}Hd(c[j>>2]|0,c[c[(c[g>>2]|0)+4>>2]>>2]|0);c[c[(c[g>>2]|0)+4>>2]>>2]=c[k>>2]}if(d[(c[j>>2]|0)+69>>0]|0){m=7;n=c[g>>2]|0;n=n+12|0;c[n>>2]=m;l=o;return}m=um(113554)|0;n=c[g>>2]|0;n=n+12|0;c[n>>2]=m;l=o;return}function Su(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;h=l;l=l+32|0;n=h+20|0;m=h+16|0;k=h+12|0;j=h+8|0;i=h+4|0;g=h;c[n>>2]=a;c[m>>2]=b;c[k>>2]=d;c[j>>2]=e;c[i>>2]=f;c[g>>2]=Nr(c[n>>2]|0,c[m>>2]|0,c[k>>2]|0,0,0,c[j>>2]|0,c[i>>2]|0)|0;l=h;return c[g>>2]|0}function Tu(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+16|0;h=n+8|0;i=n+4|0;j=n+13|0;k=n+12|0;m=n;c[h>>2]=b;c[i>>2]=d;a[j>>0]=e;a[k>>0]=f;c[m>>2]=g;if(!(c[i>>2]|0)){m=0;l=n;return m|0}m=$u(c[h>>2]|0,c[i>>2]|0,a[j>>0]|0,a[k>>0]|0,c[m>>2]|0,0)|0;l=n;return m|0}function Uu(b){b=b|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+4|0;f=g;c[f>>2]=b;b=c[f>>2]|0;if(!(d[(c[f>>2]|0)+19>>0]|0)){b=b+44|0;f=(c[b>>2]|0)+1|0;c[b>>2]=f;c[e>>2]=f;f=c[e>>2]|0;l=g;return f|0}else{h=(c[f>>2]|0)+19|0;f=(a[h>>0]|0)+-1<<24>>24;a[h>>0]=f;c[e>>2]=c[b+352+((f&255)<<2)>>2];f=c[e>>2]|0;l=g;return f|0}return 0}function Vu(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+136>>2]|0}function Wu(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+12|0;h=j+8|0;f=j+4|0;i=j;c[g>>2]=b;c[h>>2]=e;if(!(c[h>>2]|0)){l=j;return}if((d[(c[g>>2]|0)+19>>0]|0|0)>=8){l=j;return}c[f>>2]=0;c[i>>2]=(c[g>>2]|0)+152;while(1){if((c[f>>2]|0)>=(d[(c[g>>2]|0)+25>>0]|0|0)){b=8;break}if((c[(c[i>>2]|0)+12>>2]|0)==(c[h>>2]|0)){b=6;break}c[f>>2]=(c[f>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+20}if((b|0)==6){a[(c[i>>2]|0)+6>>0]=1;l=j;return}else if((b|0)==8){f=c[h>>2]|0;h=(c[g>>2]|0)+352|0;g=(c[g>>2]|0)+19|0;i=a[g>>0]|0;a[g>>0]=i+1<<24>>24;c[h+((i&255)<<2)>>2]=f;l=j;return}}function Xu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o;f=o+32|0;g=o+28|0;h=o+24|0;i=o+20|0;j=o+16|0;k=o+12|0;m=o+8|0;e=o+4|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=Rt(c[f>>2]|0)|0;if(!(c[i>>2]|0)){l=o;return}c[k>>2]=Nt(c[c[f>>2]>>2]|0,c[(c[g>>2]|0)+64>>2]|0)|0;c[m>>2]=Yu(c[f>>2]|0,c[g>>2]|0)|0;while(1){if(!(c[m>>2]|0))break;c[e>>2]=Nt(c[c[f>>2]>>2]|0,c[(c[m>>2]|0)+20>>2]|0)|0;_t(c[i>>2]|0,140,c[e>>2]|0,0,0,c[c[m>>2]>>2]|0,0)|0;c[m>>2]=c[(c[m>>2]|0)+32>>2]}_t(c[i>>2]|0,138,c[k>>2]|0,0,0,c[c[g>>2]>>2]|0,0)|0;m=c[c[f>>2]>>2]|0;c[n>>2]=c[h>>2];c[j>>2]=Bj(m,24516,n)|0;if(!(c[j>>2]|0)){l=o;return}Ut(c[i>>2]|0,c[k>>2]|0,c[j>>2]|0);n=Zu(c[f>>2]|0,c[g>>2]|0)|0;c[j>>2]=n;if(!n){l=o;return}Ut(c[i>>2]|0,1,c[j>>2]|0);l=o;return}function Yu(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;j=k+24|0;m=k+20|0;f=k+16|0;e=k+12|0;g=k+8|0;h=k+4|0;i=k;c[m>>2]=b;c[f>>2]=d;c[e>>2]=c[(c[(c[c[m>>2]>>2]|0)+16>>2]|0)+16+12>>2];c[g>>2]=0;if(a[(c[m>>2]|0)+150>>0]|0){c[j>>2]=0;m=c[j>>2]|0;l=k;return m|0}a:do if((c[e>>2]|0)!=(c[(c[f>>2]|0)+64>>2]|0)){c[h>>2]=c[(c[e>>2]|0)+40+8>>2];while(1){if(!(c[h>>2]|0))break a;c[i>>2]=c[(c[h>>2]|0)+8>>2];if((c[(c[i>>2]|0)+24>>2]|0)==(c[(c[f>>2]|0)+64>>2]|0)?0==(Ig(c[(c[i>>2]|0)+4>>2]|0,c[c[f>>2]>>2]|0)|0):0){if(c[g>>2]|0)b=c[g>>2]|0;else b=c[(c[f>>2]|0)+60>>2]|0;c[(c[i>>2]|0)+32>>2]=b;c[g>>2]=c[i>>2]}c[h>>2]=c[c[h>>2]>>2]}}while(0);if(c[g>>2]|0)b=c[g>>2]|0;else b=c[(c[f>>2]|0)+60>>2]|0;c[j>>2]=b;m=c[j>>2]|0;l=k;return m|0}function Zu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;c[d>>2]=a;c[e>>2]=b;c[g>>2]=0;c[h>>2]=c[(c[(c[c[d>>2]>>2]|0)+16>>2]|0)+16+12>>2];a:do if((c[(c[e>>2]|0)+64>>2]|0)!=(c[h>>2]|0)){c[i>>2]=c[c[d>>2]>>2];c[f>>2]=Yu(c[d>>2]|0,c[e>>2]|0)|0;while(1){if(!(c[f>>2]|0))break a;if((c[(c[f>>2]|0)+20>>2]|0)==(c[h>>2]|0))c[g>>2]=_u(c[i>>2]|0,c[g>>2]|0,c[c[f>>2]>>2]|0)|0;c[f>>2]=c[(c[f>>2]|0)+32>>2]}}while(0);if(!(c[g>>2]|0)){k=c[g>>2]|0;l=m;return k|0}i=c[c[d>>2]>>2]|0;c[k>>2]=c[g>>2];c[j>>2]=Bj(i,24528,k)|0;Hd(c[c[d>>2]>>2]|0,c[g>>2]|0);c[g>>2]=c[j>>2];k=c[g>>2]|0;l=m;return k|0}function _u(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+8|0;i=k;e=k+28|0;f=k+24|0;g=k+20|0;h=k+16|0;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;a=c[e>>2]|0;if(c[f>>2]|0){i=c[g>>2]|0;c[j>>2]=c[f>>2];c[j+4>>2]=i;c[h>>2]=Bj(a,24560,j)|0;Hd(c[e>>2]|0,c[f>>2]|0);j=c[h>>2]|0;l=k;return j|0}else{c[i>>2]=c[g>>2];c[h>>2]=Bj(a,24552,i)|0;j=c[h>>2]|0;l=k;return j|0}return 0}function $u(f,g,i,j,k,m){f=f|0;g=g|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+64|0;u=E;D=E+52|0;w=E+48|0;t=E+44|0;y=E+58|0;x=E+57|0;A=E+40|0;n=E+36|0;o=E+32|0;v=E+28|0;B=E+24|0;p=E+20|0;q=E+16|0;C=E+12|0;r=E+56|0;s=E+8|0;c[w>>2]=f;c[t>>2]=g;a[y>>0]=i;a[x>>0]=j;c[A>>2]=k;c[n>>2]=m;c[v>>2]=0;c[B>>2]=0;c[p>>2]=1;c[q>>2]=47636;c[C>>2]=0;while(1){m=d[c[t>>2]>>0]|0;c[o>>2]=m;if(!((m|0)==156?1:(c[o>>2]|0)==161))break;c[t>>2]=c[(c[t>>2]|0)+12>>2]}if((c[o>>2]|0)==157)c[o>>2]=d[(c[t>>2]|0)+38>>0];if((c[o>>2]|0)==66){a[r>>0]=av(c[(c[t>>2]|0)+8>>2]|0,0)|0;c[C>>2]=$u(c[w>>2]|0,c[(c[t>>2]|0)+12>>2]|0,a[y>>0]|0,a[r>>0]|0,c[A>>2]|0,c[n>>2]|0)|0;if(c[c[A>>2]>>2]|0){bv(c[c[A>>2]>>2]|0,a[r>>0]|0,1);cv(c[c[A>>2]>>2]|0,a[x>>0]|0,1)}c[D>>2]=c[C>>2];D=c[D>>2]|0;l=E;return D|0}do if((c[o>>2]|0)==155){if((d[c[(c[t>>2]|0)+12>>2]>>0]|0|0)!=134?(d[c[(c[t>>2]|0)+12>>2]>>0]|0|0)!=132:0)break;c[t>>2]=c[(c[t>>2]|0)+12>>2];c[o>>2]=d[c[t>>2]>>0];c[p>>2]=-1;c[q>>2]=24574}while(0);do if((c[o>>2]|0)==97|(c[o>>2]|0)==132|(c[o>>2]|0)==134){c[B>>2]=dv(c[w>>2]|0,c[n>>2]|0)|0;if(c[B>>2]|0){if(c[(c[t>>2]|0)+4>>2]&1024|0){v=c[B>>2]|0;u=c[(c[t>>2]|0)+8>>2]|0;w=c[p>>2]|0;w=RR(u|0,((u|0)<0)<<31>>31|0,w|0,((w|0)<0)<<31>>31|0)|0;Dh(v,w,z)}else{m=c[w>>2]|0;t=c[(c[t>>2]|0)+8>>2]|0;c[u>>2]=c[q>>2];c[u+4>>2]=t;c[v>>2]=Bj(m,20293,u)|0;if(!(c[v>>2]|0)){f=42;break}Po(c[B>>2]|0,-1,c[v>>2]|0,1,169)}if((c[o>>2]|0)==134|(c[o>>2]|0)==132?(d[x>>0]|0|0)==65:0)cv(c[B>>2]|0,67,1);else cv(c[B>>2]|0,a[x>>0]|0,1);if((e[(c[B>>2]|0)+8>>1]|0)&12|0){x=(c[B>>2]|0)+8|0;b[x>>1]=(e[x>>1]|0)&-3}if((d[y>>0]|0|0)!=1){c[C>>2]=Vh(c[B>>2]|0,d[y>>0]|0)|0;f=41}else f=41}else f=42}else{if((c[o>>2]|0)!=155){if((c[o>>2]|0)==101){c[B>>2]=dv(c[w>>2]|0,c[n>>2]|0)|0;if(!(c[B>>2]|0)){f=42;break}else{f=41;break}}if((c[o>>2]|0)!=133){f=41;break}c[B>>2]=dv(c[w>>2]|0,c[n>>2]|0)|0;if(!(c[B>>2]|0)){f=42;break}c[v>>2]=(c[(c[t>>2]|0)+8>>2]|0)+2;c[s>>2]=(_c(c[v>>2]|0)|0)-1;y=c[B>>2]|0;f=fv(c[w>>2]|0,c[v>>2]|0,c[s>>2]|0)|0;Jh(y,f,(c[s>>2]|0)/2|0,0,169)|0;f=41;break}w=0==(Tu(c[w>>2]|0,c[(c[t>>2]|0)+12>>2]|0,a[y>>0]|0,a[x>>0]|0,B)|0);if(w&(c[B>>2]|0)!=0){ev(c[B>>2]|0)|0;f=c[B>>2]|0;do if(!((e[(c[B>>2]|0)+8>>1]|0)&8|0)){w=f;f=c[B>>2]|0;if((c[w>>2]|0)==0?(c[w+4>>2]|0)==-2147483648:0){h[f>>3]=9223372036854775808.0;b[(c[B>>2]|0)+8>>1]=(e[(c[B>>2]|0)+8>>1]|0)&-49664|8;break}else{v=f;v=FR(0,0,c[v>>2]|0,c[v+4>>2]|0)|0;w=c[B>>2]|0;c[w>>2]=v;c[w+4>>2]=z;break}}else h[c[B>>2]>>3]=-+h[f>>3];while(0);cv(c[B>>2]|0,a[x>>0]|0,a[y>>0]|0);f=41}else f=41}while(0);if((f|0)==41){c[c[A>>2]>>2]=c[B>>2];c[D>>2]=c[C>>2];D=c[D>>2]|0;l=E;return D|0}else if((f|0)==42){yd(c[w>>2]|0);Hd(c[w>>2]|0,c[v>>2]|0);Rj(c[B>>2]|0);c[D>>2]=7;D=c[D>>2]|0;l=E;return D|0}return 0}function av(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+16|0;g=n+12|0;h=n+8|0;i=n+20|0;j=n+4|0;k=n;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;a[i>>0]=67;c[j>>2]=0;a:while(1){if(!(a[c[f>>2]>>0]|0))break;c[h>>2]=(c[h>>2]<<8)+(d[17348+(a[c[f>>2]>>0]&255)>>0]|0);c[f>>2]=(c[f>>2]|0)+1;if((c[h>>2]|0)==1667785074){a[i>>0]=66;c[j>>2]=c[f>>2];continue}if((c[h>>2]|0)==1668050786){a[i>>0]=66;continue}if((c[h>>2]|0)==1952807028){a[i>>0]=66;continue}do if((c[h>>2]|0)==1651273570){if((a[i>>0]|0)!=67?(a[i>>0]|0)!=69:0)break;a[i>>0]=65;if((a[c[f>>2]>>0]|0)!=40)continue a;c[j>>2]=c[f>>2];continue a}while(0);if((c[h>>2]|0)==1919246700?(a[i>>0]|0)==67:0){a[i>>0]=69;continue}if((c[h>>2]|0)==1718382433?(a[i>>0]|0)==67:0){a[i>>0]=69;continue}if((c[h>>2]|0)==1685026146?(a[i>>0]|0)==67:0){a[i>>0]=69;continue}if((c[h>>2]&16777215|0)==6909556){m=24;break}}if((m|0)==24)a[i>>0]=68;if(!(c[g>>2]|0)){m=a[i>>0]|0;l=n;return m|0}a[c[g>>2]>>0]=1;if((a[i>>0]|0)>=67){m=a[i>>0]|0;l=n;return m|0}if(!(c[j>>2]|0)){a[c[g>>2]>>0]=5;m=a[i>>0]|0;l=n;return m|0}while(1){if(!(a[c[j>>2]>>0]|0)){m=33;break}if(d[16965+(d[c[j>>2]>>0]|0)>>0]&4|0)break;c[j>>2]=(c[j>>2]|0)+1}if((m|0)==33){m=a[i>>0]|0;l=n;return m|0}c[k>>2]=0;Nf(c[j>>2]|0,k)|0;m=((c[k>>2]|0)/4|0)+1|0;c[k>>2]=m;c[k>>2]=(c[k>>2]|0)>255?255:m;a[c[g>>2]>>0]=c[k>>2];m=a[i>>0]|0;l=n;return m|0}function bv(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0;m=l;l=l+16|0;j=m;i=m+5|0;k=m+4|0;c[j>>2]=f;a[i>>0]=g;a[k>>0]=h;if((e[(c[j>>2]|0)+8>>1]|0)&1|0){l=m;return}switch(d[i>>0]|0|0){case 65:{f=c[j>>2]|0;if((e[(c[j>>2]|0)+8>>1]|0)&16|0){k=f+8|0;b[k>>1]=(e[k>>1]|0)&-33264;l=m;return}cv(f,66,a[k>>0]|0);if(!((e[(c[j>>2]|0)+8>>1]|0)&2)){l=m;return}b[(c[j>>2]|0)+8>>1]=(e[(c[j>>2]|0)+8>>1]|0)&-49664|16;l=m;return}case 67:{ev(c[j>>2]|0)|0;l=m;return}case 68:{hv(c[j>>2]|0)|0;l=m;return}case 69:{iv(c[j>>2]|0)|0;l=m;return}default:{i=(c[j>>2]|0)+8|0;b[i>>1]=e[i>>1]|0|((e[(c[j>>2]|0)+8>>1]|0)&16)>>3;cv(c[j>>2]|0,66,a[k>>0]|0);k=(c[j>>2]|0)+8|0;b[k>>1]=(e[k>>1]|0)&-16413;l=m;return}}}function cv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=l;l=l+16|0;i=f;h=f+5|0;g=f+4|0;c[i>>2]=b;a[h>>0]=d;a[g>>0]=e;gv(c[i>>2]|0,a[h>>0]|0,a[g>>0]|0);l=f;return}function dv(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d+4|0;c[e>>2]=a;c[d>>2]=b;b=Oo(c[e>>2]|0)|0;l=d;return b|0}function ev(d){d=d|0;var f=0,g=0,i=0,j=0.0;g=l;l=l+16|0;f=g;c[f>>2]=d;do if(!((e[(c[f>>2]|0)+8>>1]|0)&13)){i=0==(ri(c[(c[f>>2]|0)+16>>2]|0,c[f>>2]|0,c[(c[f>>2]|0)+12>>2]|0,a[(c[f>>2]|0)+10>>0]|0)|0);d=c[f>>2]|0;if(i){b[(c[f>>2]|0)+8>>1]=(e[d+8>>1]|0)&-49664|4;break}else{j=+ni(d);h[c[f>>2]>>3]=j;b[(c[f>>2]|0)+8>>1]=(e[(c[f>>2]|0)+8>>1]|0)&-49664|8;ui(c[f>>2]|0);break}}while(0);i=(c[f>>2]|0)+8|0;b[i>>1]=(e[i>>1]|0)&-16403;l=g;return 0}function fv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[k>>2]=b;c[f>>2]=d;c[g>>2]=e;e=((c[g>>2]|0)/2|0)+1|0;c[h>>2]=od(c[k>>2]|0,e,((e|0)<0)<<31>>31)|0;c[g>>2]=(c[g>>2]|0)+-1;if(!(c[h>>2]|0)){k=c[h>>2]|0;l=j;return k|0}c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[g>>2]|0))break;k=((Of(a[(c[f>>2]|0)+(c[i>>2]|0)>>0]|0)|0)&255)<<4;k=(k|(Of(a[(c[f>>2]|0)+((c[i>>2]|0)+1)>>0]|0)|0)&255)&255;a[(c[h>>2]|0)+((c[i>>2]|0)/2|0)>>0]=k;c[i>>2]=(c[i>>2]|0)+2}a[(c[h>>2]|0)+((c[i>>2]|0)/2|0)>>0]=0;k=c[h>>2]|0;l=j;return k|0}function gv(d,f,g){d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;k=l;l=l+16|0;j=k;h=k+5|0;i=k+4|0;c[j>>2]=d;a[h>>0]=f;a[i>>0]=g;if((a[h>>0]|0)<67){if((a[h>>0]|0)!=66){l=k;return}if(0==(e[(c[j>>2]|0)+8>>1]&2|0)?e[(c[j>>2]|0)+8>>1]&12|0:0)Xh(c[j>>2]|0,a[i>>0]|0,1)|0;j=(c[j>>2]|0)+8|0;b[j>>1]=e[j>>1]&-13;l=k;return}if(e[(c[j>>2]|0)+8>>1]&4|0){l=k;return}d=c[j>>2]|0;if(e[(c[j>>2]|0)+8>>1]&8|0){ui(d);l=k;return}if(!(e[d+8>>1]&2)){l=k;return}ti(c[j>>2]|0,1);l=k;return}function hv(a){a=a|0;var d=0,f=0,g=0;d=l;l=l+16|0;f=d;c[f>>2]=a;g=pi(c[f>>2]|0)|0;a=c[f>>2]|0;c[a>>2]=g;c[a+4>>2]=z;b[(c[f>>2]|0)+8>>1]=(e[(c[f>>2]|0)+8>>1]|0)&-49664|4;l=d;return 0}function iv(a){a=a|0;var d=0,f=0,g=0.0;d=l;l=l+16|0;f=d;c[f>>2]=a;g=+ni(c[f>>2]|0);h[c[f>>2]>>3]=g;b[(c[f>>2]|0)+8>>1]=(e[(c[f>>2]|0)+8>>1]|0)&-49664|8;l=d;return 0}function jv(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j;f=j+12|0;g=j+8|0;h=j+4|0;c[g>>2]=b;c[h>>2]=e;if((((a[(c[c[g>>2]>>2]|0)+148+5>>0]|0)==0?(d[(c[g>>2]|0)+18>>0]|0)==0:0)?(c[(c[c[g>>2]>>2]|0)+24>>2]&2048|0)==0:0)?0==(Zc(c[h>>2]|0,23554,7)|0):0){g=c[g>>2]|0;c[i>>2]=c[h>>2];Ck(g,26959,i);c[f>>2]=1;i=c[f>>2]|0;l=j;return i|0}c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}function kv(a,f){a=a|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;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|0;c[(c[j>>2]|0)+4>>2]=c[(c[k>>2]|0)+4>>2];b[(c[k>>2]|0)+34>>1]=0;c[(c[k>>2]|0)+4>>2]=0;break}else{b[(c[j>>2]|0)+34>>1]=0;c[n>>2]=(c[n>>2]|0)+1;break}while(0);Jj(c[p>>2]|0,c[k>>2]|0);Zj(c[p>>2]|0,c[m>>2]|0);q=(c[p>>2]|0)+256|0;c[q>>2]=(c[q>>2]|0)+-1}else c[n>>2]=(c[n>>2]|0)+1;q=(c[(c[j>>2]|0)+64>>2]|0)+78|0;b[q>>1]=e[q>>1]|2;c[h>>2]=c[n>>2];q=c[h>>2]|0;l=r;return q|0}function lv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;c[e>>2]=c[(c[g>>2]|0)+56>>2];while(1){if(!(c[e>>2]|0)){a=5;break}if((c[c[e>>2]>>2]|0)==(c[d>>2]|0)){a=5;break}c[e>>2]=c[(c[e>>2]|0)+24>>2]}if((a|0)==5){l=f;return c[e>>2]|0}return 0}function mv(b){b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[f>>2]=b;b=c[f>>2]|0;if(c[(c[f>>2]|0)+124>>2]|0)b=c[b+124>>2]|0;c[d>>2]=b;a[(c[d>>2]|0)+21>>0]=1;l=e;return}function nv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+12|0;h=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[h>>2]=b;c[f>>2]=0;c[e>>2]=ov(c[h>>2]|0)|0;while(1){if(!(c[e>>2]|0))break;c[f>>2]=_u(c[c[d>>2]>>2]|0,c[f>>2]|0,c[c[c[e>>2]>>2]>>2]|0)|0;c[e>>2]=c[(c[e>>2]|0)+12>>2]}l=g;return c[f>>2]|0}function ov(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=nu((c[(c[d>>2]|0)+64>>2]|0)+56|0,c[c[d>>2]>>2]|0)|0;l=b;return a|0}function pv(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;p=q+8|0;o=q;f=q+44|0;g=q+40|0;h=q+36|0;i=q+32|0;j=q+28|0;k=q+24|0;m=q+20|0;n=q+16|0;e=q+12|0;c[g>>2]=a;c[h>>2]=b;c[i>>2]=c[c[g>>2]>>2];if((d[(c[h>>2]|0)+42>>0]|0)&16|0?(lv(c[i>>2]|0,c[h>>2]|0)|0)==0:0){c[j>>2]=c[c[(c[h>>2]|0)+52>>2]>>2];c[k>>2]=nu((c[i>>2]|0)+320|0,c[j>>2]|0)|0;if(c[k>>2]|0){c[e>>2]=0;c[m>>2]=pu(c[i>>2]|0,c[h>>2]|0,c[k>>2]|0,c[(c[c[k>>2]>>2]|0)+8>>2]|0,e)|0;if(c[m>>2]|0){o=c[g>>2]|0;c[p>>2]=c[e>>2];Ck(o,18130,p)}Hd(c[i>>2]|0,c[e>>2]|0)}else{c[n>>2]=c[c[(c[h>>2]|0)+52>>2]>>2];p=c[g>>2]|0;c[o>>2]=c[n>>2];Ck(p,26940,o);c[m>>2]=1}c[f>>2]=c[m>>2];p=c[f>>2]|0;l=q;return p|0}c[f>>2]=0;p=c[f>>2]|0;l=q;return p|0}function qv(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;if(!(c[i>>2]|0)){c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}c[k>>2]=od(c[h>>2]|0,68,0)|0;if(!(c[k>>2]|0)){c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}f=iw(c[h>>2]|0,c[c[i>>2]>>2]|0,c[j>>2]|0)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h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=h;return}c[f>>2]=0;c[g>>2]=(c[e>>2]|0)+8;while(1){if((c[f>>2]|0)>=(c[c[e>>2]>>2]|0)){a=8;break}if((c[(c[g>>2]|0)+44>>2]|0)>=0){a=8;break}a=(c[d>>2]|0)+40|0;b=c[a>>2]|0;c[a>>2]=b+1;c[(c[g>>2]|0)+44>>2]=b;if(c[(c[g>>2]|0)+20>>2]|0)rv(c[d>>2]|0,c[(c[(c[g>>2]|0)+20>>2]|0)+28>>2]|0);c[f>>2]=(c[f>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+72}if((a|0)==8){l=h;return}}function sv(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=d;c[h>>2]=e;c[j>>2]=c[c[g>>2]>>2];c[k>>2]=c[(c[j>>2]|0)+24>>2];e=(c[j>>2]|0)+24|0;c[e>>2]=c[e>>2]&-5;e=(c[j>>2]|0)+24|0;c[e>>2]=c[e>>2]|64;Gv(c[g>>2]|0,c[h>>2]|0,0);if(c[(c[g>>2]|0)+36>>2]|0){c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}while(1){if(!(c[(c[h>>2]|0)+48>>2]|0))break;c[h>>2]=c[(c[h>>2]|0)+48>>2]}c[(c[j>>2]|0)+24>>2]=c[k>>2];c[i>>2]=jl(c[j>>2]|0,72,0)|0;if(!(c[i>>2]|0)){c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}b[(c[i>>2]|0)+36>>1]=1;c[c[i>>2]>>2]=0;b[(c[i>>2]|0)+38>>1]=200;tv(c[g>>2]|0,c[c[h>>2]>>2]|0,(c[i>>2]|0)+34|0,(c[i>>2]|0)+4|0)|0;uv(c[g>>2]|0,c[i>>2]|0,c[h>>2]|0);b[(c[i>>2]|0)+32>>1]=-1;if(a[(c[j>>2]|0)+69>>0]|0){Jj(c[j>>2]|0,c[i>>2]|0);c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}else{c[f>>2]=c[i>>2];k=c[f>>2]|0;l=m;return k|0}return 0}function tv(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;D=l;l=l+112|0;v=D+8|0;u=D;z=D+104|0;E=D+100|0;t=D+96|0;A=D+92|0;B=D+88|0;C=D+84|0;w=D+80|0;x=D+76|0;i=D+72|0;y=D+68|0;j=D+64|0;k=D+60|0;m=D+56|0;n=D+52|0;o=D+48|0;p=D+32|0;q=D+28|0;r=D+24|0;s=D+20|0;c[E>>2]=e;c[t>>2]=f;c[A>>2]=g;c[B>>2]=h;c[C>>2]=c[c[E>>2]>>2];aq(p);if(c[t>>2]|0){c[k>>2]=c[c[t>>2]>>2];c[y>>2]=jl(c[C>>2]|0,c[k>>2]<<4,0)|0}else{c[k>>2]=0;c[y>>2]=0}b[c[A>>2]>>1]=c[k>>2];c[c[B>>2]>>2]=c[y>>2];c[w>>2]=0;c[j>>2]=c[y>>2];while(1){if((c[w>>2]|0)>=(c[k>>2]|0))break;if(!((a[(c[C>>2]|0)+69>>0]|0)!=0^1))break;c[m>>2]=Ev(c[(c[(c[t>>2]|0)+4>>2]|0)+((c[w>>2]|0)*20|0)>>2]|0)|0;E=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[w>>2]|0)*20|0)+4>>2]|0;c[n>>2]=E;do if(!E){c[q>>2]=c[m>>2];while(1){e=c[q>>2]|0;if((d[c[q>>2]>>0]|0)!=122)break;c[q>>2]=c[e+16>>2]}if((d[e>>0]|0)==152?c[(c[q>>2]|0)+44>>2]|0:0){c[s>>2]=b[(c[q>>2]|0)+32>>1];c[r>>2]=c[(c[q>>2]|0)+44>>2];if((c[s>>2]|0)<0)c[s>>2]=b[(c[r>>2]|0)+32>>1];if((c[s>>2]|0)>=0)e=c[(c[(c[r>>2]|0)+4>>2]|0)+(c[s>>2]<<4)>>2]|0;else e=22891;c[n>>2]=e;break}if((d[c[q>>2]>>0]|0)==55){c[n>>2]=c[(c[q>>2]|0)+8>>2];break}else{c[n>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[w>>2]|0)*20|0)+8>>2];break}}while(0);E=c[C>>2]|0;c[u>>2]=c[n>>2];c[n>>2]=Bj(E,18130,u)|0;c[i>>2]=0;while(1){if(c[n>>2]|0)f=(nu(p,c[n>>2]|0)|0)!=0;else f=0;e=c[n>>2]|0;if(!f)break;c[o>>2]=_c(e)|0;if((c[o>>2]|0)>0){c[x>>2]=(c[o>>2]|0)-1;while(1){if((c[x>>2]|0)<=0)break;if(!(d[16965+(d[(c[n>>2]|0)+(c[x>>2]|0)>>0]|0)>>0]&4))break;c[x>>2]=(c[x>>2]|0)+-1}if((a[(c[n>>2]|0)+(c[x>>2]|0)>>0]|0)==58)c[o>>2]=c[x>>2]}E=c[C>>2]|0;f=c[o>>2]|0;g=c[n>>2]|0;h=(c[i>>2]|0)+1|0;c[i>>2]=h;c[v>>2]=f;c[v+4>>2]=g;c[v+8>>2]=h;c[n>>2]=Bj(E,25353,v)|0;if((c[i>>2]|0)>>>0<=3)continue;Ze(4,i)}c[c[j>>2]>>2]=e;if(c[n>>2]|0?(E=Vj(p,c[n>>2]|0,c[j>>2]|0)|0,(E|0)==(c[j>>2]|0)):0)yd(c[C>>2]|0);c[w>>2]=(c[w>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+16}pk(p);if(!(a[(c[C>>2]|0)+69>>0]|0)){c[z>>2]=0;E=c[z>>2]|0;l=D;return E|0}c[x>>2]=0;while(1){e=c[C>>2]|0;f=c[y>>2]|0;if((c[x>>2]|0)>=(c[w>>2]|0))break;Hd(e,c[f+(c[x>>2]<<4)>>2]|0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>>2]>>2]=r,c[c[u>>2]>>2]|0):0){MR((c[c[u>>2]>>2]|0)+((c[n>>2]|0)+1)|0,c[m>>2]|0,(c[o>>2]|0)+1|0)|0;r=(c[u>>2]|0)+15|0;a[r>>0]=d[r>>0]|4}if(!(a[(c[u>>2]|0)+13>>0]|0))a[(c[u>>2]|0)+13>>0]=65;c[v>>2]=xv(c[p>>2]|0,c[i>>2]|0)|0;if(c[v>>2]|0?(c[(c[u>>2]|0)+8>>2]|0)==0:0){r=go(c[s>>2]|0,c[c[v>>2]>>2]|0)|0;c[(c[u>>2]|0)+8>>2]=r}c[h>>2]=(c[h>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+16}v=k;v=RR(c[v>>2]|0,c[v+4>>2]|0,4,0)|0;v=Du(v,z)|0;b[(c[q>>2]|0)+40>>1]=v;l=w;return}function vv(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+128|0;q=x+112|0;r=x+108|0;s=x+104|0;t=x+100|0;u=x+96|0;v=x+116|0;w=x+92|0;h=x+88|0;i=x+84|0;j=x+80|0;k=x+48|0;m=x+40|0;n=x+8|0;o=x+4|0;p=x;c[q>>2]=e;c[r>>2]=f;c[s>>2]=g;c[t>>2]=0;a[v>>0]=1;a:do switch(d[c[r>>2]>>0]|0){case 152:case 154:{c[w>>2]=0;c[h>>2]=0;c[i>>2]=b[(c[r>>2]|0)+32>>1];while(1){if(!(c[q>>2]|0))break;if(!((c[w>>2]|0)!=0^1))break;c[j>>2]=c[(c[q>>2]|0)+4>>2];c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[c[j>>2]>>2]|0))break;if((c[(c[j>>2]|0)+8+((c[u>>2]|0)*72|0)+44>>2]|0)==(c[(c[r>>2]|0)+28>>2]|0))break;c[u>>2]=(c[u>>2]|0)+1}if((c[u>>2]|0)<(c[c[j>>2]>>2]|0)){c[w>>2]=c[(c[j>>2]|0)+8+((c[u>>2]|0)*72|0)+16>>2];c[h>>2]=c[(c[j>>2]|0)+8+((c[u>>2]|0)*72|0)+20>>2];continue}else{c[q>>2]=c[(c[q>>2]|0)+16>>2];continue}}if(c[w>>2]|0){if(c[h>>2]|0){if((c[i>>2]|0)<0)break a;if((c[i>>2]|0)>=(c[c[c[h>>2]>>2]>>2]|0))break a;c[m>>2]=c[(c[(c[c[h>>2]>>2]|0)+4>>2]|0)+((c[i>>2]|0)*20|0)>>2];c[k+4>>2]=c[(c[h>>2]|0)+28>>2];c[k+16>>2]=c[q>>2];c[k>>2]=c[c[q>>2]>>2];c[t>>2]=vv(k,c[m>>2]|0,v)|0;break a}if(c[(c[w>>2]|0)+64>>2]|0){if((c[i>>2]|0)<0)c[i>>2]=b[(c[w>>2]|0)+32>>1];if((c[i>>2]|0)<0){c[t>>2]=25345;break a}else{c[t>>2]=qu((c[(c[w>>2]|0)+4>>2]|0)+(c[i>>2]<<4)|0,0)|0;a[v>>0]=a[(c[(c[w>>2]|0)+4>>2]|0)+(c[i>>2]<<4)+14>>0]|0;break a}}}break}case 119:{c[o>>2]=c[(c[r>>2]|0)+20>>2];c[p>>2]=c[c[(c[c[o>>2]>>2]|0)+4>>2]>>2];c[n+4>>2]=c[(c[o>>2]|0)+28>>2];c[n+16>>2]=c[q>>2];c[n>>2]=c[c[q>>2]>>2];c[t>>2]=vv(n,c[p>>2]|0,v)|0;break}default:{}}while(0);if(!(c[s>>2]|0)){w=c[t>>2]|0;l=x;return w|0}a[c[s>>2]>>0]=a[v>>0]|0;w=c[t>>2]|0;l=x;return w|0}function wv(e){e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[g>>2]=e;c[g>>2]=Ev(c[g>>2]|0)|0;if(c[(c[g>>2]|0)+4>>2]&512|0){a[f>>0]=0;h=a[f>>0]|0;l=i;return h|0}c[h>>2]=d[c[g>>2]>>0];if((c[h>>2]|0)==119){a[f>>0]=wv(c[c[(c[c[(c[g>>2]|0)+20>>2]>>2]|0)+4>>2]>>2]|0)|0;h=a[f>>0]|0;l=i;return h|0}if((c[h>>2]|0)==157)c[h>>2]=d[(c[g>>2]|0)+38>>0];if((c[h>>2]|0)==66){a[f>>0]=av(c[(c[g>>2]|0)+8>>2]|0,0)|0;h=a[f>>0]|0;l=i;return h|0}if((c[h>>2]|0)==154|(c[h>>2]|0)==152){a[f>>0]=Fv(c[(c[g>>2]|0)+44>>2]|0,b[(c[g>>2]|0)+32>>1]|0)|0;h=a[f>>0]|0;l=i;return h|0}e=c[g>>2]|0;if((c[h>>2]|0)==159){a[f>>0]=wv(c[(c[(c[c[(c[e+12>>2]|0)+20>>2]>>2]|0)+4>>2]|0)+((b[(c[g>>2]|0)+32>>1]|0)*20|0)>>2]|0)|0;h=a[f>>0]|0;l=i;return h|0}else{a[f>>0]=a[e+1>>0]|0;h=a[f>>0]|0;l=i;return h|0}return 0}function xv(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+48|0;i=r+36|0;s=r+32|0;j=r+28|0;k=r+24|0;m=r+20|0;n=r+16|0;o=r+12|0;p=r+8|0;g=r+4|0;h=r;c[i>>2]=e;c[s>>2]=f;c[j>>2]=c[c[i>>2]>>2];c[k>>2]=0;c[m>>2]=c[s>>2];while(1){if(!(c[m>>2]|0))break;c[n>>2]=d[c[m>>2]>>0];if(c[(c[m>>2]|0)+4>>2]&512|0)break;if((c[n>>2]|0)==66|(c[n>>2]|0)==156){c[m>>2]=c[(c[m>>2]|0)+12>>2];continue}if((c[n>>2]|0)==53){q=9;break}if((c[n>>2]|0)==157?(d[(c[m>>2]|0)+38>>0]|0)==53:0){q=9;break}if((c[n>>2]|0)==154|(c[n>>2]|0)==152|(c[n>>2]|0)==157|(c[n>>2]|0)==88?c[(c[m>>2]|0)+44>>2]|0:0){q=12;break}if(!(c[(c[m>>2]|0)+4>>2]&256))break;if(c[(c[m>>2]|0)+12>>2]|0?c[(c[(c[m>>2]|0)+12>>2]|0)+4>>2]&256|0:0){c[m>>2]=c[(c[m>>2]|0)+12>>2];continue}c[g>>2]=c[(c[m>>2]|0)+16>>2];a:do if(c[(c[m>>2]|0)+20>>2]|0?(c[(c[m>>2]|0)+4>>2]&2048|0)==0:0){c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[(c[m>>2]|0)+20>>2]>>2]|0))break a;if(c[(c[(c[(c[(c[m>>2]|0)+20>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0)+4>>2]&256|0)break;c[h>>2]=(c[h>>2]|0)+1}c[g>>2]=c[(c[(c[(c[m>>2]|0)+20>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]}while(0);c[m>>2]=c[g>>2]}if((q|0)==9)c[k>>2]=yv(c[i>>2]|0,a[(c[j>>2]|0)+66>>0]|0,0,c[(c[m>>2]|0)+8>>2]|0)|0;else if((q|0)==12?(c[o>>2]=b[(c[m>>2]|0)+32>>1],(c[o>>2]|0)>=0):0){c[p>>2]=c[(c[(c[(c[m>>2]|0)+44>>2]|0)+4>>2]|0)+(c[o>>2]<<4)+8>>2];c[k>>2]=zv(c[j>>2]|0,a[(c[j>>2]|0)+66>>0]|0,c[p>>2]|0,0)|0}if(!(Av(c[i>>2]|0,c[k>>2]|0)|0)){s=c[k>>2]|0;l=r;return s|0}c[k>>2]=0;s=c[k>>2]|0;l=r;return s|0}function yv(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+32|0;n=o;h=o+20|0;i=o+24|0;p=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;c[h>>2]=b;a[i>>0]=e;c[p>>2]=f;c[j>>2]=g;c[m>>2]=c[c[h>>2]>>2];c[k>>2]=c[p>>2];if(!(c[k>>2]|0))c[k>>2]=zv(c[m>>2]|0,a[i>>0]|0,c[j>>2]|0,0)|0;if(!(c[k>>2]|0?(c[(c[k>>2]|0)+12>>2]|0)!=0:0)){Cv(c[m>>2]|0,d[i>>0]|0,c[j>>2]|0);c[k>>2]=zv(c[m>>2]|0,a[i>>0]|0,c[j>>2]|0,0)|0}if((c[k>>2]|0?(c[(c[k>>2]|0)+12>>2]|0)==0:0)?Dv(c[m>>2]|0,c[k>>2]|0)|0:0)c[k>>2]=0;if(c[k>>2]|0){p=c[k>>2]|0;l=o;return p|0}p=c[h>>2]|0;c[n>>2]=c[j>>2];Ck(p,25311,n);p=c[k>>2]|0;l=o;return p|0}function zv(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;n=m+12|0;h=m+16|0;i=m+8|0;j=m+4|0;k=m;c[n>>2]=b;a[h>>0]=e;c[i>>2]=f;c[j>>2]=g;b=c[n>>2]|0;if(c[i>>2]|0)c[k>>2]=Bv(b,c[i>>2]|0,c[j>>2]|0)|0;else c[k>>2]=c[b+8>>2];if(!(c[k>>2]|0)){n=c[k>>2]|0;l=m;return n|0}c[k>>2]=(c[k>>2]|0)+(((d[h>>0]|0)-1|0)*20|0);n=c[k>>2]|0;l=m;return n|0}function Av(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=b;c[g>>2]=d;if(c[g>>2]|0?(c[h>>2]=c[c[g>>2]>>2],c[i>>2]=c[c[f>>2]>>2],c[j>>2]=yv(c[f>>2]|0,a[(c[i>>2]|0)+66>>0]|0,c[g>>2]|0,c[h>>2]|0)|0,(c[j>>2]|0)==0):0){c[e>>2]=1;j=c[e>>2]|0;l=k;return j|0}c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}function Bv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=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);if(!(c[(c[g>>2]|0)+236>>2]|0)){l=n;return}c[m>>2]=Oo(c[g>>2]|0)|0;Po(c[m>>2]|0,-1,c[i>>2]|0,1,0);c[k>>2]=_h(c[m>>2]|0,((a[936]|0)==0?3:2)&255)|0;if(c[k>>2]|0)Ab[c[(c[g>>2]|0)+236>>2]&255](c[(c[g>>2]|0)+240>>2]|0,c[g>>2]|0,d[(c[g>>2]|0)+66>>0]|0,c[k>>2]|0);Rj(c[m>>2]|0);l=n;return}function Dv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;h=k+20|0;e=k+16|0;i=k+12|0;j=k+8|0;f=k+4|0;g=k;c[e>>2]=b;c[i>>2]=d;c[f>>2]=c[c[i>>2]>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=3){b=6;break}c[j>>2]=zv(c[e>>2]|0,a[25342+(c[g>>2]|0)>>0]|0,c[f>>2]|0,0)|0;if(c[(c[j>>2]|0)+12>>2]|0){b=4;break}c[g>>2]=(c[g>>2]|0)+1}if((b|0)==4){g=c[i>>2]|0;j=c[j>>2]|0;c[g>>2]=c[j>>2];c[g+4>>2]=c[j+4>>2];c[g+8>>2]=c[j+8>>2];c[g+12>>2]=c[j+12>>2];c[g+16>>2]=c[j+16>>2];c[(c[i>>2]|0)+16>>2]=0;c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}else if((b|0)==6){c[h>>2]=1;j=c[h>>2]|0;l=k;return j|0}return 0}function Ev(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=a;while(1){if(c[d>>2]|0)a=(c[(c[d>>2]|0)+4>>2]&4096|0)!=0;else a=0;b=c[d>>2]|0;if(!a)break;a=c[d>>2]|0;if(c[b+4>>2]&262144|0){c[d>>2]=c[c[(c[a+20>>2]|0)+4>>2]>>2];continue}else{c[d>>2]=c[a+12>>2];continue}}l=e;return b|0}function Fv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=d;if((c[f>>2]|0)<0){f=68;f=f&255;l=g;return f|0}f=a[(c[(c[e>>2]|0)+4>>2]|0)+(c[f>>2]<<4)+13>>0]|0;f=f&255;l=g;return f|0}function Gv(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;if(!(c[h>>2]|0)){l=k;return}c[j>>2]=c[c[g>>2]>>2];if(a[(c[j>>2]|0)+69>>0]|0){l=k;return}if(c[(c[h>>2]|0)+8>>2]&128|0){l=k;return}Hv(c[g>>2]|0,c[h>>2]|0);if(c[(c[g>>2]|0)+36>>2]|0){l=k;return}if(d[(c[j>>2]|0)+69>>0]|0){l=k;return}Iv(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0);if(c[(c[g>>2]|0)+36>>2]|0){l=k;return}if(d[(c[j>>2]|0)+69>>0]|0){l=k;return}Jv(c[g>>2]|0,c[h>>2]|0);l=k;return}function Hv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+48|0;h=g+32|0;e=g+28|0;f=g;c[h>>2]=b;c[e>>2]=d;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[f+4>>2]=183;c[f>>2]=c[h>>2];if(a[(c[h>>2]|0)+22>>0]|0){c[f+8>>2]=184;Mv(f,c[e>>2]|0)|0}c[f+8>>2]=185;if(c[(c[e>>2]|0)+8>>2]&1024|0){h=c[e>>2]|0;Mv(f,h)|0;l=g;return}c[f+12>>2]=132;h=c[e>>2]|0;Mv(f,h)|0;l=g;return}function Iv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+48|0;i=e+36|0;f=e+32|0;h=e+28|0;g=e;c[i>>2]=a;c[f>>2]=b;c[h>>2]=d;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;c[g+4>>2]=186;c[g+8>>2]=187;c[g>>2]=c[i>>2];c[g+24>>2]=c[h>>2];Mv(g,c[f>>2]|0)|0;l=e;return}function Jv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+48|0;g=d+32|0;e=d+28|0;f=d;c[g>>2]=a;c[e>>2]=b;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[f+12>>2]=133;c[f+4>>2]=183;c[f>>2]=c[g>>2];Mv(f,c[e>>2]|0)|0;l=d;return}function Kv(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+32|0;n=k+28|0;m=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[n>>2]=a;c[m>>2]=b;b=(c[m>>2]|0)+8|0;c[b>>2]=c[b>>2]|128;c[e>>2]=c[c[n>>2]>>2];c[g>>2]=c[(c[m>>2]|0)+28>>2];c[f>>2]=0;c[h>>2]=(c[g>>2]|0)+8;while(1){if((c[f>>2]|0)>=(c[c[g>>2]>>2]|0))break;c[i>>2]=c[(c[h>>2]|0)+16>>2];if((d[(c[i>>2]|0)+42>>0]|0)&2|0?(c[j>>2]=c[(c[h>>2]|0)+20>>2],c[j>>2]|0):0){while(1){if(!(c[(c[j>>2]|0)+48>>2]|0))break;c[j>>2]=c[(c[j>>2]|0)+48>>2]}uv(c[e>>2]|0,c[i>>2]|0,c[j>>2]|0)}c[f>>2]=(c[f>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+72}l=k;return}function Lv(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 0}function Mv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h+8|0;d=h+4|0;g=h;c[f>>2]=a;c[d>>2]=b;do if(c[d>>2]|0){if((c[(c[f>>2]|0)+8>>2]|0)==0?(c[(c[f>>2]|0)+12>>2]|0)==0:0)break;c[g>>2]=0;b=(c[f>>2]|0)+16|0;c[b>>2]=(c[b>>2]|0)+1;while(1){if(!(c[d>>2]|0)){a=15;break}if(c[(c[f>>2]|0)+8>>2]|0?(c[g>>2]=yb[c[(c[f>>2]|0)+8>>2]&255](c[f>>2]|0,c[d>>2]|0)|0,c[g>>2]|0):0){a=15;break}if(Nv(c[f>>2]|0,c[d>>2]|0)|0){a=11;break}if(Ov(c[f>>2]|0,c[d>>2]|0)|0){a=11;break}if(c[(c[f>>2]|0)+12>>2]|0)rb[c[(c[f>>2]|0)+12>>2]&255](c[f>>2]|0,c[d>>2]|0);c[d>>2]=c[(c[d>>2]|0)+48>>2]}if((a|0)==11){g=(c[f>>2]|0)+16|0;c[g>>2]=(c[g>>2]|0)+-1;c[e>>2]=2;g=c[e>>2]|0;l=h;return g|0}else if((a|0)==15){f=(c[f>>2]|0)+16|0;c[f>>2]=(c[f>>2]|0)+-1;c[e>>2]=c[g>>2]&2;g=c[e>>2]|0;l=h;return g|0}}while(0);c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}function Nv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=b;do if(!(Pv(c[e>>2]|0,c[c[f>>2]>>2]|0)|0)){if(Qv(c[e>>2]|0,c[(c[f>>2]|0)+32>>2]|0)|0){c[d>>2]=2;break}if(Pv(c[e>>2]|0,c[(c[f>>2]|0)+36>>2]|0)|0){c[d>>2]=2;break}if(Qv(c[e>>2]|0,c[(c[f>>2]|0)+40>>2]|0)|0){c[d>>2]=2;break}if(Pv(c[e>>2]|0,c[(c[f>>2]|0)+44>>2]|0)|0){c[d>>2]=2;break}if(Qv(c[e>>2]|0,c[(c[f>>2]|0)+56>>2]|0)|0){c[d>>2]=2;break}if(Qv(c[e>>2]|0,c[(c[f>>2]|0)+60>>2]|0)|0){c[d>>2]=2;break}else{c[d>>2]=0;break}}else c[d>>2]=2;while(0);l=g;return c[d>>2]|0}function Ov(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;i=j+20|0;e=j+16|0;k=j+12|0;f=j+8|0;g=j+4|0;h=j;c[e>>2]=a;c[k>>2]=b;c[f>>2]=c[(c[k>>2]|0)+28>>2];a:do if(c[f>>2]|0){c[g>>2]=c[c[f>>2]>>2];c[h>>2]=(c[f>>2]|0)+8;while(1){if((c[g>>2]|0)<=0)break a;if(Mv(c[e>>2]|0,c[(c[h>>2]|0)+20>>2]|0)|0){a=5;break}if((d[(c[h>>2]|0)+36+1>>0]|0)>>>2&1|0?Pv(c[e>>2]|0,c[(c[h>>2]|0)+64>>2]|0)|0:0){a=8;break}c[g>>2]=(c[g>>2]|0)+-1;c[h>>2]=(c[h>>2]|0)+72}if((a|0)==5){c[i>>2]=2;k=c[i>>2]|0;l=j;return k|0}else if((a|0)==8){c[i>>2]=2;k=c[i>>2]|0;l=j;return k|0}}while(0);c[i>>2]=0;k=c[i>>2]|0;l=j;return k|0}function Pv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;a:do if(c[f>>2]|0){c[g>>2]=c[c[f>>2]>>2];c[h>>2]=c[(c[f>>2]|0)+4>>2];while(1){if((c[g>>2]|0)<=0)break a;if(Qv(c[e>>2]|0,c[c[h>>2]>>2]|0)|0)break;c[g>>2]=(c[g>>2]|0)+-1;c[h>>2]=(c[h>>2]|0)+20}c[d>>2]=2;h=c[d>>2]|0;l=i;return h|0}while(0);c[d>>2]=0;h=c[d>>2]|0;l=i;return h|0}function Qv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){e=0;l=f;return e|0}e=Rv(c[d>>2]|0,c[e>>2]|0)|0;l=f;return e|0}function Rv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=yb[c[(c[e>>2]|0)+4>>2]&255](c[e>>2]|0,c[f>>2]|0)|0;if((c[g>>2]|0)==0?(c[(c[f>>2]|0)+4>>2]&8404992|0)==0:0){if(c[(c[f>>2]|0)+12>>2]|0?Rv(c[e>>2]|0,c[(c[f>>2]|0)+12>>2]|0)|0:0){c[d>>2]=2;g=c[d>>2]|0;l=h;return g|0}if(c[(c[f>>2]|0)+16>>2]|0?Rv(c[e>>2]|0,c[(c[f>>2]|0)+16>>2]|0)|0:0){c[d>>2]=2;g=c[d>>2]|0;l=h;return g|0}if(c[(c[f>>2]|0)+4>>2]&2048|0){if(Mv(c[e>>2]|0,c[(c[f>>2]|0)+20>>2]|0)|0){c[d>>2]=2;g=c[d>>2]|0;l=h;return g|0}}else if(c[(c[f>>2]|0)+20>>2]|0?Pv(c[e>>2]|0,c[(c[f>>2]|0)+20>>2]|0)|0:0){c[d>>2]=2;g=c[d>>2]|0;l=h;return g|0}c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}c[d>>2]=c[g>>2]&2;g=c[d>>2]|0;l=h;return g|0}function Sv(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;M=l;l=l+144|0;p=M+40|0;H=M+32|0;J=M+24|0;I=M+16|0;G=M+8|0;F=M;L=M+128|0;B=M+124|0;C=M+120|0;D=M+116|0;E=M+112|0;m=M+108|0;n=M+104|0;o=M+100|0;h=M+96|0;q=M+92|0;r=M+88|0;s=M+84|0;t=M+80|0;u=M+76|0;v=M+72|0;w=M+68|0;x=M+64|0;y=M+132|0;z=M+60|0;A=M+56|0;i=M+52|0;j=M+48|0;k=M+44|0;c[B>>2]=f;c[C>>2]=g;c[D>>2]=c[(c[B>>2]|0)+24>>2];c[E>>2]=c[c[D>>2]>>2];if(c[(c[C>>2]|0)+4>>2]&4|0){c[L>>2]=1;L=c[L>>2]|0;l=M;return L|0}g=(c[C>>2]|0)+4|0;c[g>>2]=c[g>>2]|4;switch(d[c[C>>2]>>0]|0){case 55:{c[L>>2]=sw(c[E>>2]|0,0,0,c[(c[C>>2]|0)+8>>2]|0,c[D>>2]|0,c[C>>2]|0)|0;L=c[L>>2]|0;l=M;return L|0}case 122:{tw(c[E>>2]|0,c[D>>2]|0,25867,32);c[h>>2]=c[(c[C>>2]|0)+16>>2];if((d[c[h>>2]>>0]|0)==55){c[o>>2]=0;c[n>>2]=c[(c[(c[C>>2]|0)+12>>2]|0)+8>>2];c[m>>2]=c[(c[h>>2]|0)+8>>2]}else{c[o>>2]=c[(c[(c[C>>2]|0)+12>>2]|0)+8>>2];c[n>>2]=c[(c[(c[h>>2]|0)+12>>2]|0)+8>>2];c[m>>2]=c[(c[(c[h>>2]|0)+16>>2]|0)+8>>2]}c[L>>2]=sw(c[E>>2]|0,c[o>>2]|0,c[n>>2]|0,c[m>>2]|0,c[D>>2]|0,c[C>>2]|0)|0;L=c[L>>2]|0;l=M;return L|0}case 151:{c[q>>2]=c[(c[C>>2]|0)+20>>2];if(c[q>>2]|0)f=c[c[q>>2]>>2]|0;else f=0;c[r>>2]=f;c[s>>2]=0;c[t>>2]=0;c[u>>2]=0;a[y>>0]=a[(c[c[E>>2]>>2]|0)+66>>0]|0;c[w>>2]=c[(c[C>>2]|0)+8>>2];c[v>>2]=_c(c[w>>2]|0)|0;c[x>>2]=uw(c[c[E>>2]>>2]|0,c[w>>2]|0,c[r>>2]|0,a[y>>0]|0,0)|0;do if(!(c[x>>2]|0)){c[x>>2]=uw(c[c[E>>2]>>2]|0,c[w>>2]|0,-2,a[y>>0]|0,0)|0;if(!(c[x>>2]|0)){c[s>>2]=1;break}else{c[t>>2]=1;break}}else{c[u>>2]=(c[(c[x>>2]|0)+16>>2]|0)!=0&1;do if(e[(c[x>>2]|0)+2>>1]&1024|0){y=(c[C>>2]|0)+4|0;c[y>>2]=c[y>>2]|266240;if((c[r>>2]|0)!=2){c[(c[C>>2]|0)+28>>2]=(a[c[(c[x>>2]|0)+20>>2]>>0]|0)==117?8388608:125829120;break}y=vw(c[(c[(c[q>>2]|0)+4>>2]|0)+20>>2]|0)|0;c[(c[C>>2]|0)+28>>2]=y;if((c[(c[C>>2]|0)+28>>2]|0)<0){Ck(c[E>>2]|0,25884,F);F=(c[D>>2]|0)+24|0;c[F>>2]=(c[F>>2]|0)+1}}while(0);c[z>>2]=Ot(c[E>>2]|0,31,0,c[(c[x>>2]|0)+20>>2]|0,0)|0;if(c[z>>2]|0){if((c[z>>2]|0)==1){K=c[E>>2]|0;c[G>>2]=c[(c[x>>2]|0)+20>>2];Ck(K,25955,G);K=(c[D>>2]|0)+24|0;c[K>>2]=(c[K>>2]|0)+1}a[c[C>>2]>>0]=101;c[L>>2]=1;L=c[L>>2]|0;l=M;return L|0}else{if(e[(c[x>>2]|0)+2>>1]&10240|0){G=(c[C>>2]|0)+4|0;c[G>>2]=c[G>>2]|524288}if(e[(c[x>>2]|0)+2>>1]&2048|0)break;tw(c[E>>2]|0,c[D>>2]|0,25990,34);break}}while(0);if(c[u>>2]|0?(e[(c[D>>2]|0)+28>>1]&1|0)==0:0){J=c[E>>2]|0;H=c[w>>2]|0;c[I>>2]=c[v>>2];c[I+4>>2]=H;Ck(J,26018,I);J=(c[D>>2]|0)+24|0;c[J>>2]=(c[J>>2]|0)+1;c[u>>2]=0}else K=31;do if((K|0)==31){if(c[s>>2]|0?(d[(c[c[E>>2]>>2]|0)+148+5>>0]|0)==0:0){K=c[E>>2]|0;I=c[w>>2]|0;c[J>>2]=c[v>>2];c[J+4>>2]=I;Ck(K,26054,J);K=(c[D>>2]|0)+24|0;c[K>>2]=(c[K>>2]|0)+1;break}if(c[t>>2]|0){K=c[E>>2]|0;J=c[w>>2]|0;c[H>>2]=c[v>>2];c[H+4>>2]=J;Ck(K,26077,H);K=(c[D>>2]|0)+24|0;c[K>>2]=(c[K>>2]|0)+1}}while(0);if(c[u>>2]|0){K=(c[D>>2]|0)+28|0;b[K>>1]=e[K>>1]&-2}Pv(c[B>>2]|0,c[q>>2]|0)|0;if(c[u>>2]|0){c[A>>2]=c[D>>2];a[c[C>>2]>>0]=-103;a[(c[C>>2]|0)+38>>0]=0;while(1){if(!(c[A>>2]|0))break;if(!((ww(c[C>>2]|0,c[(c[A>>2]|0)+4>>2]|0)|0)!=0^1))break;K=(c[C>>2]|0)+38|0;a[K>>0]=(a[K>>0]|0)+1<<24>>24;c[A>>2]=c[(c[A>>2]|0)+16>>2]}if(c[A>>2]|0){K=(c[A>>2]|0)+28|0;b[K>>1]=e[K>>1]|(16|e[(c[x>>2]|0)+2>>1]&4096)}K=(c[D>>2]|0)+28|0;b[K>>1]=e[K>>1]|1}c[L>>2]=1;L=c[L>>2]|0;l=M;return L|0}case 33:case 20:case 119:{if(c[(c[C>>2]|0)+4>>2]&2048|0?(c[i>>2]=c[(c[D>>2]|0)+20>>2],tw(c[E>>2]|0,c[D>>2]|0,26122,38),Mv(c[B>>2]|0,c[(c[C>>2]|0)+20>>2]|0)|0,(c[i>>2]|0)!=(c[(c[D>>2]|0)+20>>2]|0)):0){K=(c[C>>2]|0)+4|0;c[K>>2]=c[K>>2]|32;K=(c[D>>2]|0)+28|0;b[K>>1]=e[K>>1]|64}break}case 135:{tw(c[E>>2]|0,c[D>>2]|0,26133,38);break}case 148:case 29:case 41:case 38:case 39:case 40:case 36:case 37:{if((a[(c[c[E>>2]>>2]|0)+69>>0]|0)==0?(c[j>>2]=xw(c[(c[C>>2]|0)+12>>2]|0)|0,c[k>>2]=xw(c[(c[C>>2]|0)+16>>2]|0)|0,(c[j>>2]|0)!=(c[k>>2]|0)):0)Ck(c[E>>2]|0,26144,p);break}default:{}}if(c[(c[E>>2]|0)+36>>2]|0)f=1;else f=(d[(c[c[E>>2]>>2]|0)+69>>0]|0)!=0;c[L>>2]=f?2:0;L=c[L>>2]|0;l=M;return L|0}function Tv(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+128|0;C=E+8|0;B=E;D=E+116|0;t=E+112|0;y=E+108|0;u=E+104|0;v=E+72|0;z=E+68|0;w=E+64|0;A=E+60|0;h=E+56|0;i=E+52|0;x=E+48|0;j=E+44|0;k=E+40|0;m=E+36|0;n=E+32|0;o=E+28|0;p=E+24|0;q=E+20|0;r=E+16|0;s=E+12|0;c[t>>2]=f;c[y>>2]=g;if(c[(c[y>>2]|0)+8>>2]&4|0){c[D>>2]=1;D=c[D>>2]|0;l=E;return D|0}c[u>>2]=c[(c[t>>2]|0)+24>>2];c[A>>2]=c[c[t>>2]>>2];c[j>>2]=c[c[A>>2]>>2];if(!(c[(c[y>>2]|0)+8>>2]&64)){Gv(c[A>>2]|0,c[y>>2]|0,c[u>>2]|0);if(c[(c[A>>2]|0)+36>>2]|0)f=1;else f=(d[(c[j>>2]|0)+69>>0]|0)!=0;c[D>>2]=f?2:1;D=c[D>>2]|0;l=E;return D|0}c[z>>2]=(c[(c[y>>2]|0)+48>>2]|0)!=0&1;c[w>>2]=0;c[x>>2]=c[y>>2];a:while(1){if(!(c[y>>2]|0)){f=68;break}t=(c[y>>2]|0)+8|0;c[t>>2]=c[t>>2]|4;c[v>>2]=0;c[v+4>>2]=0;c[v+8>>2]=0;c[v+12>>2]=0;c[v+16>>2]=0;c[v+20>>2]=0;c[v+24>>2]=0;c[v+28>>2]=0;c[v>>2]=c[A>>2];if(Uv(v,c[(c[y>>2]|0)+56>>2]|0)|0){f=11;break}if(Uv(v,c[(c[y>>2]|0)+60>>2]|0)|0){f=11;break}if(c[(c[y>>2]|0)+8>>2]&65536|0){c[k>>2]=c[(c[(c[y>>2]|0)+28>>2]|0)+8+20>>2];c[(c[k>>2]|0)+44>>2]=c[(c[y>>2]|0)+44>>2];c[(c[y>>2]|0)+44>>2]=0}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[(c[y>>2]|0)+28>>2]>>2]|0))break;c[m>>2]=(c[(c[y>>2]|0)+28>>2]|0)+8+((c[h>>2]|0)*72|0);if(c[(c[m>>2]|0)+20>>2]|0){c[o>>2]=0;c[p>>2]=c[(c[A>>2]|0)+448>>2];c[n>>2]=c[u>>2];while(1){if(!(c[n>>2]|0))break;c[o>>2]=(c[o>>2]|0)+(c[(c[n>>2]|0)+20>>2]|0);c[n>>2]=c[(c[n>>2]|0)+16>>2]}if(c[(c[m>>2]|0)+8>>2]|0)c[(c[A>>2]|0)+448>>2]=c[(c[m>>2]|0)+8>>2];Iv(c[A>>2]|0,c[(c[m>>2]|0)+20>>2]|0,c[u>>2]|0);c[(c[A>>2]|0)+448>>2]=c[p>>2];if(c[(c[A>>2]|0)+36>>2]|0){f=24;break a}if(d[(c[j>>2]|0)+69>>0]|0){f=24;break a}c[n>>2]=c[u>>2];while(1){if(!(c[n>>2]|0))break;c[o>>2]=(c[o>>2]|0)-(c[(c[n>>2]|0)+20>>2]|0);c[n>>2]=c[(c[n>>2]|0)+16>>2]}t=(c[m>>2]|0)+36+1|0;a[t>>0]=a[t>>0]&-9|((c[o>>2]|0)!=0&1)<<3&255}c[h>>2]=(c[h>>2]|0)+1}b[v+28>>1]=1;c[v+4>>2]=c[(c[y>>2]|0)+28>>2];c[v+16>>2]=c[u>>2];if(Vv(v,c[c[y>>2]>>2]|0)|0){f=31;break}c[i>>2]=c[(c[y>>2]|0)+36>>2];if(!(c[i>>2]|0)?!(e[v+28>>1]&16|0):0){t=v+28|0;b[t>>1]=e[t>>1]&-2}else{t=(c[y>>2]|0)+8|0;c[t>>2]=c[t>>2]|(8|e[v+28>>1]&4096)}if(!(c[i>>2]|0?1:(c[(c[y>>2]|0)+40>>2]|0)==0)){f=37;break}c[v+8>>2]=c[c[y>>2]>>2];if(Uv(v,c[(c[y>>2]|0)+40>>2]|0)|0){f=39;break}if(Uv(v,c[(c[y>>2]|0)+32>>2]|0)|0){f=41;break}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[(c[y>>2]|0)+28>>2]>>2]|0))break;c[q>>2]=(c[(c[y>>2]|0)+28>>2]|0)+8+((c[h>>2]|0)*72|0);if((d[(c[q>>2]|0)+36+1>>0]|0)>>>2&1|0?Vv(v,c[(c[q>>2]|0)+64>>2]|0)|0:0){f=46;break a}c[h>>2]=(c[h>>2]|0)+1}c[v+16>>2]=0;t=v+28|0;b[t>>1]=e[t>>1]|1;if(c[(c[y>>2]|0)+8>>2]&65536|0){c[r>>2]=c[(c[(c[y>>2]|0)+28>>2]|0)+8+20>>2];c[(c[y>>2]|0)+44>>2]=c[(c[r>>2]|0)+44>>2];c[(c[r>>2]|0)+44>>2]=0}if((c[z>>2]|0)<=(c[w>>2]|0)?Wv(v,c[y>>2]|0,c[(c[y>>2]|0)+44>>2]|0,25405)|0:0){f=52;break}if(a[(c[j>>2]|0)+69>>0]|0){f=54;break}b:do if(c[i>>2]|0){if(Wv(v,c[y>>2]|0,c[i>>2]|0,25411)|0){f=58;break a}if(d[(c[j>>2]|0)+69>>0]|0){f=58;break a}c[h>>2]=0;c[s>>2]=c[(c[i>>2]|0)+4>>2];while(1){if((c[h>>2]|0)>=(c[c[i>>2]>>2]|0))break b;if(c[(c[c[s>>2]>>2]|0)+4>>2]&2|0){f=62;break a}c[h>>2]=(c[h>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+20}}while(0);if(c[(c[y>>2]|0)+52>>2]|0?(c[c[c[y>>2]>>2]>>2]|0)!=(c[c[c[(c[y>>2]|0)+52>>2]>>2]>>2]|0):0){f=66;break}c[y>>2]=c[(c[y>>2]|0)+48>>2];c[w>>2]=(c[w>>2]|0)+1}switch(f|0){case 11:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 24:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 31:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 37:{Ck(c[A>>2]|0,25361,B);c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 39:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 41:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 46:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 52:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 54:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 58:{c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 62:{Ck(c[A>>2]|0,25417,C);c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 66:{Xv(c[A>>2]|0,c[(c[y>>2]|0)+52>>2]|0);c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}case 68:{if(c[z>>2]|0?Yv(c[A>>2]|0,c[x>>2]|0)|0:0){c[D>>2]=2;D=c[D>>2]|0;l=E;return D|0}c[D>>2]=1;D=c[D>>2]|0;l=E;return D|0}}return 0}function Uv(d,f){d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+48|0;g=n+40|0;h=n+36|0;i=n+32|0;j=n+44|0;k=n+4|0;m=n;c[h>>2]=d;c[i>>2]=f;if(!(c[i>>2]|0)){c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}c[m>>2]=c[c[h>>2]>>2];if(rw(c[m>>2]|0,(c[(c[i>>2]|0)+24>>2]|0)+(c[(c[c[h>>2]>>2]|0)+416>>2]|0)|0)|0){c[g>>2]=1;m=c[g>>2]|0;l=n;return m|0}m=(c[m>>2]|0)+416|0;c[m>>2]=(c[m>>2]|0)+(c[(c[i>>2]|0)+24>>2]|0);b[j>>1]=(e[(c[h>>2]|0)+28>>1]|0)&4112;m=(c[h>>2]|0)+28|0;b[m>>1]=(e[m>>1]|0)&-4113;c[k>>2]=c[c[h>>2]>>2];c[k+4>>2]=186;c[k+8>>2]=187;c[k+12>>2]=0;c[k+16>>2]=0;a[k+20>>0]=0;c[k+24>>2]=c[h>>2];Qv(k,c[i>>2]|0)|0;m=(c[c[h>>2]>>2]|0)+416|0;c[m>>2]=(c[m>>2]|0)-(c[(c[i>>2]|0)+24>>2]|0);if(!((c[(c[h>>2]|0)+24>>2]|0)<=0?(c[(c[k>>2]|0)+36>>2]|0)<=0:0)){m=(c[i>>2]|0)+4|0;c[m>>2]=c[m>>2]|8}if((e[(c[h>>2]|0)+28>>1]|0)&16|0){m=(c[i>>2]|0)+4|0;c[m>>2]=c[m>>2]|2}m=(c[h>>2]|0)+28|0;b[m>>1]=e[m>>1]|0|(e[j>>1]|0);c[g>>2]=(c[(c[i>>2]|0)+4>>2]&8|0)!=0&1;m=c[g>>2]|0;l=n;return m|0}function Vv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;a:do if(c[f>>2]|0){c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[c[f>>2]>>2]|0))break a;if(Uv(c[e>>2]|0,c[(c[(c[f>>2]|0)+4>>2]|0)+((c[g>>2]|0)*20|0)>>2]|0)|0)break;c[g>>2]=(c[g>>2]|0)+1}c[d>>2]=2;g=c[d>>2]|0;l=h;return g|0}while(0);c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}function Wv(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;p=v+48|0;q=v+44|0;r=v+40|0;s=v+36|0;t=v+32|0;u=v+28|0;h=v+24|0;i=v+20|0;j=v+16|0;k=v+12|0;m=v+8|0;n=v+4|0;o=v;c[q>>2]=d;c[r>>2]=e;c[s>>2]=f;c[t>>2]=g;if(!(c[s>>2]|0)){c[p>>2]=0;u=c[p>>2]|0;l=v;return u|0}c[m>>2]=c[c[c[r>>2]>>2]>>2];c[k>>2]=c[c[q>>2]>>2];c[u>>2]=0;c[j>>2]=c[(c[s>>2]|0)+4>>2];a:while(1){if((c[u>>2]|0)>=(c[c[s>>2]>>2]|0)){f=21;break}c[n>>2]=c[c[j>>2]>>2];c[o>>2]=Ev(c[n>>2]|0)|0;if((a[c[t>>2]>>0]|0)!=71?(c[i>>2]=$v(c[k>>2]|0,c[c[r>>2]>>2]|0,c[o>>2]|0)|0,(c[i>>2]|0)>0):0){d=c[i>>2]&65535;e=c[j>>2]|0;f=19}else f=8;b:do if((f|0)==8){f=0;if(Zv(c[o>>2]|0,i)|0){if((c[i>>2]|0)<1|(c[i>>2]|0)>65535){f=10;break a}d=c[i>>2]&65535;e=c[j>>2]|0;f=19;break}b[(c[j>>2]|0)+16>>1]=0;if(Uv(c[q>>2]|0,c[n>>2]|0)|0){f=13;break a}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[c[r>>2]>>2]>>2]|0))break b;if(!(cw(c[n>>2]|0,c[(c[(c[c[r>>2]>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0,-1)|0))b[(c[j>>2]|0)+16>>1]=(c[h>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+1}}while(0);if((f|0)==19)b[e+16>>1]=d;c[u>>2]=(c[u>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+20}if((f|0)==10){_v(c[k>>2]|0,c[t>>2]|0,(c[u>>2]|0)+1|0,c[m>>2]|0);c[p>>2]=1;u=c[p>>2]|0;l=v;return u|0}else if((f|0)==13){c[p>>2]=1;u=c[p>>2]|0;l=v;return u|0}else if((f|0)==21){c[p>>2]=lw(c[k>>2]|0,c[r>>2]|0,c[s>>2]|0,c[t>>2]|0)|0;u=c[p>>2]|0;l=v;return u|0}return 0}function Xv(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;g=l;l=l+32|0;f=g+8|0;h=g+16|0;e=g+12|0;c[h>>2]=a;c[e>>2]=b;a=c[h>>2]|0;if(c[(c[e>>2]|0)+8>>2]&512|0){Ck(a,25627,g);l=g;return}else{c[f>>2]=kw(d[(c[e>>2]|0)+4>>0]|0)|0;Ck(a,25673,f);l=g;return}}function Yv(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+80|0;v=w+8|0;q=w+64|0;r=w+60|0;n=w+56|0;s=w+52|0;t=w+48|0;u=w+44|0;o=w+40|0;p=w+36|0;g=w+32|0;h=w+28|0;i=w+24|0;j=w+20|0;k=w+16|0;m=w+12|0;c[r>>2]=e;c[n>>2]=f;c[p>>2]=1;c[t>>2]=c[(c[n>>2]|0)+44>>2];if(!(c[t>>2]|0)){c[q>>2]=0;v=c[q>>2]|0;l=w;return v|0}c[o>>2]=c[c[r>>2]>>2];if((c[c[t>>2]>>2]|0)>(c[(c[o>>2]|0)+96+8>>2]|0)){Ck(c[r>>2]|0,25476,w);c[q>>2]=1;v=c[q>>2]|0;l=w;return v|0}c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[c[t>>2]>>2]|0))break;f=(c[(c[t>>2]|0)+4>>2]|0)+((c[s>>2]|0)*20|0)+13|0;a[f>>0]=a[f>>0]&-2;c[s>>2]=(c[s>>2]|0)+1}c[(c[n>>2]|0)+52>>2]=0;while(1){if(!(c[(c[n>>2]|0)+48>>2]|0))break;c[(c[(c[n>>2]|0)+48>>2]|0)+52>>2]=c[n>>2];c[n>>2]=c[(c[n>>2]|0)+48>>2]}a:while(1){if(!(c[n>>2]|0?(c[p>>2]|0)!=0:0)){e=36;break}c[p>>2]=0;c[u>>2]=c[c[n>>2]>>2];c[s>>2]=0;c[g>>2]=c[(c[t>>2]|0)+4>>2];while(1){if((c[s>>2]|0)>=(c[c[t>>2]>>2]|0))break;c[h>>2]=-1;do if(!(a[(c[g>>2]|0)+13>>0]&1)){c[i>>2]=Ev(c[c[g>>2]>>2]|0)|0;if(Zv(c[i>>2]|0,h)|0){if((c[h>>2]|0)<=0){e=18;break a}if((c[h>>2]|0)>(c[c[u>>2]>>2]|0)){e=18;break a}}else{c[h>>2]=$v(c[r>>2]|0,c[u>>2]|0,c[i>>2]|0)|0;if(!(c[h>>2]|0)){c[j>>2]=aw(c[o>>2]|0,c[i>>2]|0,0)|0;if(!(a[(c[o>>2]|0)+69>>0]|0))c[h>>2]=bw(c[r>>2]|0,c[n>>2]|0,c[j>>2]|0)|0;ck(c[o>>2]|0,c[j>>2]|0)}}if((c[h>>2]|0)<=0){c[p>>2]=1;break}c[k>>2]=Ns(c[o>>2]|0,134,0)|0;if(!(c[k>>2]|0)){e=25;break a}f=(c[k>>2]|0)+4|0;c[f>>2]=c[f>>2]|1024;c[(c[k>>2]|0)+8>>2]=c[h>>2];if((c[c[g>>2]>>2]|0)==(c[i>>2]|0))c[c[g>>2]>>2]=c[k>>2];else{c[m>>2]=c[c[g>>2]>>2];while(1){if((d[c[(c[m>>2]|0)+12>>2]>>0]|0)!=53)break;c[m>>2]=c[(c[m>>2]|0)+12>>2]}c[(c[m>>2]|0)+12>>2]=c[k>>2]}ck(c[o>>2]|0,c[i>>2]|0);b[(c[g>>2]|0)+16>>1]=c[h>>2];f=(c[g>>2]|0)+13|0;a[f>>0]=a[f>>0]&-2|1}while(0);c[s>>2]=(c[s>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+20}c[n>>2]=c[(c[n>>2]|0)+52>>2]}if((e|0)==18){_v(c[r>>2]|0,25405,(c[s>>2]|0)+1|0,c[c[u>>2]>>2]|0);c[q>>2]=1;v=c[q>>2]|0;l=w;return v|0}else if((e|0)==25){c[q>>2]=1;v=c[q>>2]|0;l=w;return v|0}else if((e|0)==36){c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[c[t>>2]>>2]|0)){e=41;break}if(!(a[(c[(c[t>>2]|0)+4>>2]|0)+((c[s>>2]|0)*20|0)+13>>0]&1)){e=39;break}c[s>>2]=(c[s>>2]|0)+1}if((e|0)==39){u=c[r>>2]|0;c[v>>2]=(c[s>>2]|0)+1;Ck(u,25510,v);c[q>>2]=1;v=c[q>>2]|0;l=w;return v|0}else if((e|0)==41){c[q>>2]=0;v=c[q>>2]|0;l=w;return v|0}}return 0}function Zv(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[h>>2]=0;a=c[f>>2]|0;if(c[(c[f>>2]|0)+4>>2]&1024|0){c[c[g>>2]>>2]=c[a+8>>2];c[e>>2]=1;i=c[e>>2]|0;l=j;return i|0}switch(d[a>>0]|0|0){case 156:{c[h>>2]=Zv(c[(c[f>>2]|0)+12>>2]|0,c[g>>2]|0)|0;break}case 155:{if(Zv(c[(c[f>>2]|0)+12>>2]|0,i)|0){c[c[g>>2]>>2]=0-(c[i>>2]|0);c[h>>2]=1}break}default:{}}c[e>>2]=c[h>>2];i=c[e>>2]|0;l=j;return i|0}function _v(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=l;l=l+32|0;g=f;k=f+24|0;j=f+20|0;h=f+16|0;i=f+12|0;c[k>>2]=a;c[j>>2]=b;c[h>>2]=d;c[i>>2]=e;e=c[k>>2]|0;b=c[j>>2]|0;d=c[i>>2]|0;c[g>>2]=c[h>>2];c[g+4>>2]=b;c[g+8>>2]=d;Ck(e,25571,g);l=f;return}function $v(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+24|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[m+20>>2]=a;c[g>>2]=b;c[h>>2]=e;a:do if((d[c[h>>2]>>0]|0|0)==55){c[j>>2]=c[(c[h>>2]|0)+8>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[c[g>>2]>>2]|0))break a;c[k>>2]=c[(c[(c[g>>2]|0)+4>>2]|0)+((c[i>>2]|0)*20|0)+4>>2];if(c[k>>2]|0?(Ig(c[k>>2]|0,c[j>>2]|0)|0)==0:0)break;c[i>>2]=(c[i>>2]|0)+1}c[f>>2]=(c[i>>2]|0)+1;k=c[f>>2]|0;l=m;return k|0}while(0);c[f>>2]=0;k=c[f>>2]|0;l=m;return k|0}function aw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(!(c[f>>2]|0)){g=0;l=h;return g|0}g=ew(c[e>>2]|0,c[f>>2]|0,c[g>>2]|0,0)|0;l=h;return g|0}function bw(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;k=l;l=l+80|0;j=k+60|0;q=k+56|0;r=k+52|0;g=k+48|0;h=k+44|0;i=k+40|0;p=k+8|0;n=k+4|0;m=k;o=k+64|0;c[q>>2]=d;c[r>>2]=e;c[g>>2]=f;c[i>>2]=c[c[r>>2]>>2];c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[p+16>>2]=0;c[p+20>>2]=0;c[p+24>>2]=0;c[p+28>>2]=0;c[p>>2]=c[q>>2];c[p+4>>2]=c[(c[r>>2]|0)+28>>2];c[p+8>>2]=c[i>>2];b[p+28>>1]=1;c[p+24>>2]=0;c[n>>2]=c[c[q>>2]>>2];a[o>>0]=a[(c[n>>2]|0)+73>>0]|0;a[(c[n>>2]|0)+73>>0]=1;c[m>>2]=Uv(p,c[g>>2]|0)|0;a[(c[n>>2]|0)+73>>0]=a[o>>0]|0;if(c[m>>2]|0){c[j>>2]=0;r=c[j>>2]|0;l=k;return r|0}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[i>>2]>>2]|0)){d=8;break}r=(cw(c[(c[(c[i>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0,c[g>>2]|0,-1)|0)<2;e=(c[h>>2]|0)+1|0;if(r){d=6;break}c[h>>2]=e}if((d|0)==6){c[j>>2]=e;r=c[j>>2]|0;l=k;return r|0}else if((d|0)==8){c[j>>2]=0;r=c[j>>2]|0;l=k;return r|0}return 0}function cw(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[h>>2]=a;c[i>>2]=e;c[j>>2]=f;if((c[h>>2]|0)==0|(c[i>>2]|0)==0){c[g>>2]=(c[i>>2]|0)==(c[h>>2]|0)?0:2;k=c[g>>2]|0;l=m;return k|0}c[k>>2]=c[(c[h>>2]|0)+4>>2]|c[(c[i>>2]|0)+4>>2];a=c[h>>2]|0;if(c[k>>2]&1024|0){if(c[a+4>>2]&c[(c[i>>2]|0)+4>>2]&1024|0?(c[(c[h>>2]|0)+8>>2]|0)==(c[(c[i>>2]|0)+8>>2]|0):0){c[g>>2]=0;k=c[g>>2]|0;l=m;return k|0}c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}e=d[c[h>>2]>>0]|0;if((d[a>>0]|0)!=(d[c[i>>2]>>0]|0)){if((e|0)==53?(cw(c[(c[h>>2]|0)+12>>2]|0,c[i>>2]|0,c[j>>2]|0)|0)<2:0){c[g>>2]=1;k=c[g>>2]|0;l=m;return k|0}if((d[c[i>>2]>>0]|0)==53?(cw(c[h>>2]|0,c[(c[i>>2]|0)+12>>2]|0,c[j>>2]|0)|0)<2:0){c[g>>2]=1;k=c[g>>2]|0;l=m;return k|0}c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}do if(((e|0)!=152?(d[c[h>>2]>>0]|0)!=154:0)?c[(c[h>>2]|0)+8>>2]|0:0){a=c[(c[h>>2]|0)+8>>2]|0;e=c[(c[i>>2]|0)+8>>2]|0;if((d[c[h>>2]>>0]|0)==151){if(!(Ig(a,e)|0))break;c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}else{if(!(vQ(a,e)|0))break;c[g>>2]=(d[c[h>>2]>>0]|0)==53?1:2;k=c[g>>2]|0;l=m;return k|0}}while(0);if((c[(c[h>>2]|0)+4>>2]&16|0)!=(c[(c[i>>2]|0)+4>>2]&16|0)){c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}do if(!(c[k>>2]&16384)){if(c[k>>2]&2048|0){c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}if(cw(c[(c[h>>2]|0)+12>>2]|0,c[(c[i>>2]|0)+12>>2]|0,c[j>>2]|0)|0){c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}if(cw(c[(c[h>>2]|0)+16>>2]|0,c[(c[i>>2]|0)+16>>2]|0,c[j>>2]|0)|0){c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}if(dw(c[(c[h>>2]|0)+20>>2]|0,c[(c[i>>2]|0)+20>>2]|0,c[j>>2]|0)|0){c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}if((c[k>>2]&8192|0)==0?(d[c[h>>2]>>0]|0)!=97:0){if((b[(c[h>>2]|0)+32>>1]|0)!=(b[(c[i>>2]|0)+32>>1]|0)){c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}if((c[(c[h>>2]|0)+28>>2]|0)!=(c[(c[i>>2]|0)+28>>2]|0)){if((c[(c[h>>2]|0)+28>>2]|0)==(c[j>>2]|0)?(c[(c[i>>2]|0)+28>>2]|0)<0:0)break;c[g>>2]=2;k=c[g>>2]|0;l=m;return k|0}}}while(0);c[g>>2]=0;k=c[g>>2]|0;l=m;return k|0}function dw(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+24|0;f=n+20|0;g=n+16|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n;c[f>>2]=a;c[g>>2]=b;c[h>>2]=e;if((c[f>>2]|0)==0&(c[g>>2]|0)==0){c[m>>2]=0;m=c[m>>2]|0;l=n;return m|0}if((c[f>>2]|0)==0|(c[g>>2]|0)==0){c[m>>2]=1;m=c[m>>2]|0;l=n;return m|0}if((c[c[f>>2]>>2]|0)!=(c[c[g>>2]>>2]|0)){c[m>>2]=1;m=c[m>>2]|0;l=n;return m|0}c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[c[f>>2]>>2]|0)){a=14;break}c[j>>2]=c[(c[(c[f>>2]|0)+4>>2]|0)+((c[i>>2]|0)*20|0)>>2];c[k>>2]=c[(c[(c[g>>2]|0)+4>>2]|0)+((c[i>>2]|0)*20|0)>>2];if((d[(c[(c[f>>2]|0)+4>>2]|0)+((c[i>>2]|0)*20|0)+12>>0]|0|0)!=(d[(c[(c[g>>2]|0)+4>>2]|0)+((c[i>>2]|0)*20|0)+12>>0]|0|0)){a=10;break}if(cw(c[j>>2]|0,c[k>>2]|0,c[h>>2]|0)|0){a=12;break}c[i>>2]=(c[i>>2]|0)+1}if((a|0)==10){c[m>>2]=1;m=c[m>>2]|0;l=n;return m|0}else if((a|0)==12){c[m>>2]=1;m=c[m>>2]|0;l=n;return m|0}else if((a|0)==14){c[m>>2]=0;m=c[m>>2]|0;l=n;return m|0}return 0}function ew(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;q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0)|0;c[(c[s>>2]|0)+20>>2]=f;break}else{f=iw(a,c[b>>2]|0,c[n>>2]|0)|0;c[(c[s>>2]|0)+20>>2]=f;break}}while(0);a=c[r>>2]|0;if(!(c[(c[s>>2]|0)+4>>2]&24576)){if(c[a+4>>2]&8404992|0){s=c[s>>2]|0;l=t;return s|0}if((d[c[s>>2]>>0]|0|0)==159){a=c[(c[r>>2]|0)+12>>2]|0;b=c[s>>2]|0}else{a=aw(c[q>>2]|0,c[(c[r>>2]|0)+12>>2]|0,0)|0;b=c[s>>2]|0}c[b+12>>2]=a;r=aw(c[q>>2]|0,c[(c[r>>2]|0)+16>>2]|0,0)|0;c[(c[s>>2]|0)+16>>2]=r;s=c[s>>2]|0;l=t;return s|0}n=jw(a,c[n>>2]|0)|0;c[p>>2]=(c[p>>2]|0)+n;if(!(c[(c[s>>2]|0)+4>>2]&8404992)){if(c[(c[r>>2]|0)+12>>2]|0)a=ew(c[q>>2]|0,c[(c[r>>2]|0)+12>>2]|0,1,p)|0;else a=0;c[(c[s>>2]|0)+12>>2]=a;if(c[(c[r>>2]|0)+16>>2]|0)a=ew(c[q>>2]|0,c[(c[r>>2]|0)+16>>2]|0,1,p)|0;else a=0;c[(c[s>>2]|0)+16>>2]=a}if(!(c[o>>2]|0)){s=c[s>>2]|0;l=t;return s|0}c[c[o>>2]>>2]=c[p>>2];s=c[s>>2]|0;l=t;return s|0}function fw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;if(!(c[d>>2]|0)){f=c[f>>2]|0;l=g;return f|0}c[f>>2]=jw(c[d>>2]|0,c[e>>2]|0)|0;if(!(c[e>>2]&1)){f=c[f>>2]|0;l=g;return f|0}b=fw(c[(c[d>>2]|0)+12>>2]|0,c[e>>2]|0)|0;e=b+(fw(c[(c[d>>2]|0)+16>>2]|0,c[e>>2]|0)|0)|0;c[f>>2]=(c[f>>2]|0)+e;f=c[f>>2]|0;l=g;return f|0}function gw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;do if(!(c[g>>2]|0))c[e>>2]=48;else{if((c[(c[d>>2]|0)+12>>2]|0)==0?(c[(c[d>>2]|0)+20>>2]|0)==0:0){c[e>>2]=16396;break}c[e>>2]=8220}while(0);l=f;return c[e>>2]|0}function hw(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;do if(!(c[(c[d>>2]|0)+4>>2]&16384|0))if(c[(c[d>>2]|0)+4>>2]&8192|0){c[b>>2]=28;break}else{c[b>>2]=48;break}else c[b>>2]=12;while(0);l=e;return c[b>>2]|0}function iw(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;i=q+32|0;j=q+28|0;k=q+24|0;m=q+20|0;n=q+16|0;o=q+12|0;p=q+8|0;g=q+4|0;h=q;c[j>>2]=b;c[k>>2]=e;c[m>>2]=f;if(!(c[k>>2]|0)){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}c[n>>2]=od(c[j>>2]|0,8,0)|0;if(!(c[n>>2]|0)){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}f=c[c[k>>2]>>2]|0;c[g>>2]=f;c[c[n>>2]>>2]=f;a:do if(!(c[m>>2]&1)){c[g>>2]=1;while(1){if((c[g>>2]|0)>=(c[c[k>>2]>>2]|0))break a;c[g>>2]=(c[g>>2]|0)+(c[g>>2]|0)}}while(0);f=od(c[j>>2]|0,(c[g>>2]|0)*20|0,0)|0;c[o>>2]=f;c[(c[n>>2]|0)+4>>2]=f;if(!(c[o>>2]|0)){Hd(c[j>>2]|0,c[n>>2]|0);c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}c[p>>2]=c[(c[k>>2]|0)+4>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[c[k>>2]>>2]|0))break;c[h>>2]=c[c[p>>2]>>2];f=aw(c[j>>2]|0,c[h>>2]|0,c[m>>2]|0)|0;c[c[o>>2]>>2]=f;f=go(c[j>>2]|0,c[(c[p>>2]|0)+4>>2]|0)|0;c[(c[o>>2]|0)+4>>2]=f;f=go(c[j>>2]|0,c[(c[p>>2]|0)+8>>2]|0)|0;c[(c[o>>2]|0)+8>>2]=f;a[(c[o>>2]|0)+12>>0]=a[(c[p>>2]|0)+12>>0]|0;f=(c[o>>2]|0)+13|0;a[f>>0]=a[f>>0]&-2;f=(c[o>>2]|0)+13|0;a[f>>0]=a[f>>0]&-3|((d[(c[p>>2]|0)+13>>0]|0)>>>1&1)<<1&255;c[(c[o>>2]|0)+16>>2]=c[(c[p>>2]|0)+16>>2];c[g>>2]=(c[g>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+20;c[p>>2]=(c[p>>2]|0)+20}c[i>>2]=c[n>>2];p=c[i>>2]|0;l=q;return p|0}function jw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;c[e>>2]=(gw(c[d>>2]|0,c[g>>2]|0)|0)&4095;if((c[(c[d>>2]|0)+4>>2]&1024|0)==0?c[(c[d>>2]|0)+8>>2]|0:0){g=(_c(c[(c[d>>2]|0)+8>>2]|0)|0)+1|0;c[e>>2]=(c[e>>2]|0)+g}l=f;return (c[e>>2]|0)+7&-8|0}function kw(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;switch(c[e>>2]|0){case 116:{c[b>>2]=25755;break}case 118:{c[b>>2]=25765;break}case 117:{c[b>>2]=25775;break}default:c[b>>2]=25782}l=d;return c[b>>2]|0}function lw(a,f,g,h){a=a|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;k=t;q=t+36|0;n=t+32|0;j=t+28|0;o=t+24|0;r=t+20|0;s=t+16|0;i=t+12|0;p=t+8|0;m=t+4|0;c[n>>2]=a;c[j>>2]=f;c[o>>2]=g;c[r>>2]=h;c[i>>2]=c[c[n>>2]>>2];if(c[o>>2]|0?(d[(c[c[n>>2]>>2]|0)+69>>0]|0)==0:0){if((c[c[o>>2]>>2]|0)>(c[(c[i>>2]|0)+96+8>>2]|0)){s=c[n>>2]|0;c[k>>2]=c[r>>2];Ck(s,25788,k);c[q>>2]=1;s=c[q>>2]|0;l=t;return s|0}c[p>>2]=c[c[j>>2]>>2];c[s>>2]=0;c[m>>2]=c[(c[o>>2]|0)+4>>2];while(1){if((c[s>>2]|0)>=(c[c[o>>2]>>2]|0)){a=13;break}if(b[(c[m>>2]|0)+16>>1]|0){f=c[n>>2]|0;if((e[(c[m>>2]|0)+16>>1]|0)>(c[c[p>>2]>>2]|0)){a=10;break}mw(f,c[p>>2]|0,(e[(c[m>>2]|0)+16>>1]|0)-1|0,c[c[m>>2]>>2]|0,c[r>>2]|0,0)}c[s>>2]=(c[s>>2]|0)+1;c[m>>2]=(c[m>>2]|0)+20}if((a|0)==10){_v(f,c[r>>2]|0,(c[s>>2]|0)+1|0,c[c[p>>2]>>2]|0);c[q>>2]=1;s=c[q>>2]|0;l=t;return s|0}else if((a|0)==13){c[q>>2]=0;s=c[q>>2]|0;l=t;return s|0}}c[q>>2]=0;s=c[q>>2]|0;l=t;return s|0}function mw(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;q=l;l=l+48|0;m=q+32|0;t=q+28|0;s=q+24|0;p=q+20|0;j=q+16|0;k=q+12|0;r=q+8|0;n=q+4|0;o=q;c[m>>2]=b;c[t>>2]=e;c[s>>2]=f;c[p>>2]=g;c[j>>2]=h;c[k>>2]=i;c[r>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[s>>2]|0)*20|0)>>2];c[o>>2]=c[c[m>>2]>>2];c[n>>2]=aw(c[o>>2]|0,c[r>>2]|0,0)|0;if(!(c[n>>2]|0)){l=q;return}if((a[c[j>>2]>>0]|0)!=71)nw(c[n>>2]|0,c[k>>2]|0);if((d[c[p>>2]>>0]|0)==53)c[n>>2]=ow(c[m>>2]|0,c[n>>2]|0,c[(c[p>>2]|0)+8>>2]|0)|0;b=(c[n>>2]|0)+4|0;c[b>>2]=c[b>>2]|4194304;b=(c[p>>2]|0)+4|0;c[b>>2]=c[b>>2]|32768;ck(c[o>>2]|0,c[p>>2]|0);b=c[p>>2]|0;e=c[n>>2]|0;j=b+48|0;do{c[b>>2]=c[e>>2];b=b+4|0;e=e+4|0}while((b|0)<(j|0));if((c[(c[p>>2]|0)+4>>2]&1024|0)==0?c[(c[p>>2]|0)+8>>2]|0:0){t=go(c[o>>2]|0,c[(c[p>>2]|0)+8>>2]|0)|0;c[(c[p>>2]|0)+8>>2]=t;t=(c[p>>2]|0)+4|0;c[t>>2]=c[t>>2]|65536}Hd(c[o>>2]|0,c[n>>2]|0);l=q;return}function nw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+48|0;d=g+32|0;e=g+28|0;f=g;c[d>>2]=a;c[e>>2]=b;if((c[e>>2]|0)<=0){l=g;return};c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[f+4>>2]=188;c[f+24>>2]=c[e>>2];Qv(f,c[d>>2]|0)|0;l=g;return}function ow(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+32|0;h=e+16|0;g=e+12|0;i=e+8|0;f=e;c[h>>2]=a;c[g>>2]=b;c[i>>2]=d;pw(f,c[i>>2]|0);d=ct(c[h>>2]|0,c[g>>2]|0,f,0)|0;l=e;return d|0}function pw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[c[e>>2]>>2]=c[f>>2];b=_c(c[f>>2]|0)|0;c[(c[e>>2]|0)+4>>2]=b;l=d;return}function qw(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=e;if((d[c[g>>2]>>0]|0|0)!=153){l=h;return 0}g=(c[g>>2]|0)+38|0;a[g>>0]=(d[g>>0]|0)+(c[(c[f>>2]|0)+24>>2]|0);l=h;return 0}function rw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+32|0;g=h;d=h+16|0;i=h+12|0;e=h+8|0;f=h+4|0;c[d>>2]=a;c[i>>2]=b;c[e>>2]=0;c[f>>2]=c[(c[c[d>>2]>>2]|0)+96+12>>2];if((c[i>>2]|0)<=(c[f>>2]|0)){i=c[e>>2]|0;l=h;return i|0}i=c[d>>2]|0;c[g>>2]=c[f>>2];Ck(i,25819,g);c[e>>2]=1;i=c[e>>2]|0;l=h;return i|0}function sw(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;X=l;l=l+176|0;W=X+40|0;V=X+24|0;F=X+8|0;E=X;S=X+164|0;T=X+160|0;D=X+156|0;U=X+152|0;I=X+148|0;J=X+144|0;K=X+140|0;m=X+136|0;n=X+132|0;L=X+128|0;o=X+124|0;p=X+120|0;M=X+116|0;q=X+112|0;N=X+108|0;O=X+104|0;P=X+100|0;Q=X+96|0;r=X+92|0;s=X+88|0;t=X+84|0;u=X+80|0;v=X+76|0;w=X+72|0;y=X+68|0;A=X+64|0;B=X+60|0;C=X+56|0;H=X+52|0;R=X+48|0;c[T>>2]=f;c[D>>2]=g;c[U>>2]=h;c[I>>2]=i;c[J>>2]=j;c[K>>2]=k;c[L>>2]=0;c[o>>2]=0;c[p>>2]=0;c[M>>2]=c[c[T>>2]>>2];c[N>>2]=0;c[O>>2]=c[J>>2];c[P>>2]=0;c[Q>>2]=0;c[r>>2]=0;c[(c[K>>2]|0)+28>>2]=-1;c[(c[K>>2]|0)+44>>2]=0;a:do if(c[D>>2]|0){if(e[(c[J>>2]|0)+28>>1]&6|0){c[D>>2]=0;break}c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[(c[M>>2]|0)+20>>2]|0))break a;if(!(Ig(c[(c[(c[M>>2]|0)+16>>2]|0)+(c[m>>2]<<4)>>2]|0,c[D>>2]|0)|0))break;c[m>>2]=(c[m>>2]|0)+1}c[P>>2]=c[(c[(c[M>>2]|0)+16>>2]|0)+(c[m>>2]<<4)+12>>2]}while(0);b:while(1){if(!(c[J>>2]|0?(c[L>>2]|0)==0:0)){G=84;break}c[u>>2]=c[(c[J>>2]|0)+4>>2];if(c[u>>2]|0){c[m>>2]=0;c[q>>2]=(c[u>>2]|0)+8;while(1){if((c[m>>2]|0)>=(c[c[u>>2]>>2]|0))break;c[r>>2]=c[(c[q>>2]|0)+16>>2];if(c[(c[q>>2]|0)+20>>2]|0?c[(c[(c[q>>2]|0)+20>>2]|0)+8>>2]&2048|0:0){c[v>>2]=0;c[t>>2]=c[c[(c[q>>2]|0)+20>>2]>>2];c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[c[t>>2]>>2]|0))break;if(Aw(c[(c[(c[t>>2]|0)+4>>2]|0)+((c[n>>2]|0)*20|0)+8>>2]|0,c[I>>2]|0,c[U>>2]|0,c[D>>2]|0)|0){c[L>>2]=(c[L>>2]|0)+1;c[o>>2]=2;c[N>>2]=c[q>>2];b[(c[K>>2]|0)+32>>1]=c[n>>2];c[v>>2]=1}c[n>>2]=(c[n>>2]|0)+1}if(!((c[v>>2]|0)!=0|(c[U>>2]|0)==0))G=21}else G=21;c:do if((G|0)==21){G=0;if(c[D>>2]|0?(c[(c[r>>2]|0)+64>>2]|0)!=(c[P>>2]|0):0)break;if(c[U>>2]|0?(c[w>>2]=c[(c[(c[q>>2]|0)+12>>2]|0?(c[q>>2]|0)+12|0:c[r>>2]|0)>>2],Ig(c[w>>2]|0,c[U>>2]|0)|0):0)break;k=c[o>>2]|0;c[o>>2]=k+1;if(!k)c[N>>2]=c[q>>2];c[n>>2]=0;c[s>>2]=c[(c[r>>2]|0)+4>>2];while(1){if((c[n>>2]|0)>=(b[(c[r>>2]|0)+34>>1]|0))break c;if(!(Ig(c[c[s>>2]>>2]|0,c[I>>2]|0)|0)){if((c[L>>2]|0)!=1)break;if((d[(c[q>>2]|0)+36>>0]&4|0)==0?(Bw(c[(c[q>>2]|0)+52>>2]|0,c[I>>2]|0)|0)==0:0)break}c[n>>2]=(c[n>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+16}c[L>>2]=(c[L>>2]|0)+1;c[N>>2]=c[q>>2];if((c[n>>2]|0)==(b[(c[r>>2]|0)+32>>1]|0))f=-1;else f=(c[n>>2]&65535)<<16>>16;b[(c[K>>2]|0)+32>>1]=f}while(0);c[m>>2]=(c[m>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+72}if(c[N>>2]|0){c[(c[K>>2]|0)+28>>2]=c[(c[N>>2]|0)+44>>2];c[(c[K>>2]|0)+44>>2]=c[(c[N>>2]|0)+16>>2];if(d[(c[N>>2]|0)+36>>0]&8|0){k=(c[K>>2]|0)+4|0;c[k>>2]=c[k>>2]|1048576}c[P>>2]=c[(c[(c[K>>2]|0)+44>>2]|0)+64>>2]}}if((c[D>>2]|0)==0&(c[U>>2]|0)!=0&(c[o>>2]|0)==0?c[(c[T>>2]|0)+128>>2]|0:0){c[y>>2]=d[(c[T>>2]|0)+148>>0];if((c[y>>2]|0)!=109?(Ig(26246,c[U>>2]|0)|0)==0:0){c[(c[K>>2]|0)+28>>2]=1;c[r>>2]=c[(c[T>>2]|0)+128>>2]}else G=47;do if((G|0)==47){G=0;if((c[y>>2]|0)!=108?(Ig(26250,c[U>>2]|0)|0)==0:0){c[(c[K>>2]|0)+28>>2]=0;c[r>>2]=c[(c[T>>2]|0)+128>>2];break}c[r>>2]=0}while(0);if(c[r>>2]|0){c[P>>2]=c[(c[r>>2]|0)+64>>2];c[o>>2]=(c[o>>2]|0)+1;c[A>>2]=0;c[s>>2]=c[(c[r>>2]|0)+4>>2];while(1){if((c[A>>2]|0)>=(b[(c[r>>2]|0)+34>>1]|0))break;k=(Ig(c[c[s>>2]>>2]|0,c[I>>2]|0)|0)==0;x=c[A>>2]|0;if(k){G=55;break}c[A>>2]=x+1;c[s>>2]=(c[s>>2]|0)+16}if((G|0)==55?(G=0,(x|0)==(b[(c[r>>2]|0)+32>>1]|0)):0)c[A>>2]=-1;if(((c[A>>2]|0)>=(b[(c[r>>2]|0)+34>>1]|0)?Cw(c[I>>2]|0)|0:0)?(d[(c[r>>2]|0)+42>>0]&64|0)==0:0)c[A>>2]=-1;if((c[A>>2]|0)<(b[(c[r>>2]|0)+34>>1]|0)){c[L>>2]=(c[L>>2]|0)+1;f=c[K>>2]|0;if((c[A>>2]|0)<0)a[f+1>>0]=68;else{k=(c[f+28>>2]|0)==0?(c[T>>2]|0)+140|0:(c[T>>2]|0)+144|0;c[k>>2]=c[k>>2]|((c[A>>2]|0)>=32?-1:1<>2])}b[(c[K>>2]|0)+32>>1]=c[A>>2];c[(c[K>>2]|0)+44>>2]=c[r>>2];c[Q>>2]=1}}}if((((c[L>>2]|0)==0&(c[o>>2]|0)==1&(c[N>>2]|0)!=0?(e[(c[J>>2]|0)+28>>1]&32|0)==0:0)?Cw(c[I>>2]|0)|0:0)?(d[(c[(c[N>>2]|0)+16>>2]|0)+42>>0]&64|0)==0:0){c[L>>2]=1;b[(c[K>>2]|0)+32>>1]=-1;a[(c[K>>2]|0)+1>>0]=68}k=c[(c[J>>2]|0)+8>>2]|0;c[t>>2]=k;d:do if((k|0)!=0&(c[U>>2]|0)==0&(c[L>>2]|0)==0){c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[c[t>>2]>>2]|0))break d;c[B>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[n>>2]|0)*20|0)+4>>2];if(c[B>>2]|0?(Ig(c[B>>2]|0,c[I>>2]|0)|0)==0:0){G=77;break b}c[n>>2]=(c[n>>2]|0)+1}}while(0);if(c[L>>2]|0)continue;c[J>>2]=c[(c[J>>2]|0)+16>>2];c[p>>2]=(c[p>>2]|0)+1}if((G|0)==77){c[C>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[n>>2]|0)*20|0)>>2];if((e[(c[J>>2]|0)+28>>1]&1|0)==0?c[(c[C>>2]|0)+4>>2]&2|0:0){W=c[T>>2]|0;c[E>>2]=c[B>>2];Ck(W,26254,E);c[S>>2]=2;W=c[S>>2]|0;l=X;return W|0}mw(c[T>>2]|0,c[t>>2]|0,c[n>>2]|0,c[K>>2]|0,47636,c[p>>2]|0);c[L>>2]=1;c[N>>2]=0}else if((G|0)==84){if((c[L>>2]|0)==0&(c[U>>2]|0)==0?c[(c[K>>2]|0)+4>>2]&64|0:0){a[c[K>>2]>>0]=97;c[(c[K>>2]|0)+44>>2]=0;c[S>>2]=1;W=c[S>>2]|0;l=X;return W|0}if((c[L>>2]|0)!=1){c[H>>2]=(c[L>>2]|0)==0?26285:26300;do if(!(c[D>>2]|0)){g=c[T>>2]|0;f=c[H>>2]|0;if(c[U>>2]|0){U=c[U>>2]|0;W=c[I>>2]|0;c[V>>2]=f;c[V+4>>2]=U;c[V+8>>2]=W;Ck(g,23617,V);break}else{V=c[I>>2]|0;c[W>>2]=f;c[W+4>>2]=V;Ck(g,23627,W);break}}else{W=c[T>>2]|0;G=c[D>>2]|0;U=c[U>>2]|0;V=c[I>>2]|0;c[F>>2]=c[H>>2];c[F+4>>2]=G;c[F+8>>2]=U;c[F+12>>2]=V;Ck(W,26322,F)}while(0);a[(c[T>>2]|0)+17>>0]=1;W=(c[O>>2]|0)+24|0;c[W>>2]=(c[W>>2]|0)+1}if(c[N>>2]|0?(b[(c[K>>2]|0)+32>>1]|0)>=0:0){U=b[(c[K>>2]|0)+32>>1]|0;c[R>>2]=U;c[R>>2]=(c[R>>2]|0)>=64?63:U;U=HR(1,0,c[R>>2]|0)|0;W=(c[N>>2]|0)+56|0;R=W;V=c[R+4>>2]|z;c[W>>2]=c[R>>2]|U;c[W+4>>2]=V}ck(c[M>>2]|0,c[(c[K>>2]|0)+12>>2]|0);c[(c[K>>2]|0)+12>>2]=0;ck(c[M>>2]|0,c[(c[K>>2]|0)+16>>2]|0);c[(c[K>>2]|0)+16>>2]=0;a[c[K>>2]>>0]=c[Q>>2]|0?88:152}if((c[L>>2]|0)!=1){c[S>>2]=2;W=c[S>>2]|0;l=X;return W|0}if(!(c[(c[K>>2]|0)+4>>2]&4194304))Dw(c[T>>2]|0,c[K>>2]|0,c[P>>2]|0,c[(c[J>>2]|0)+4>>2]|0);while(1){W=(c[O>>2]|0)+20|0;c[W>>2]=(c[W>>2]|0)+1;if((c[O>>2]|0)==(c[J>>2]|0))break;c[O>>2]=c[(c[O>>2]|0)+16>>2]}c[S>>2]=1;W=c[S>>2]|0;l=X;return W|0}function tw(a,b,d,f){a=a|0;b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;k=m;g=m+24|0;h=m+20|0;i=m+16|0;n=m+12|0;j=m+8|0;c[g>>2]=a;c[h>>2]=b;c[i>>2]=d;c[n>>2]=f;if(!((e[(c[h>>2]|0)+28>>1]|0)&c[n>>2])){l=m;return}c[j>>2]=26162;if(!((e[(c[h>>2]|0)+28>>1]|0)&32|0)){if((e[(c[h>>2]|0)+28>>1]|0)&4|0)c[j>>2]=26208}else c[j>>2]=26190;n=c[g>>2]|0;j=c[j>>2]|0;c[k>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>1]=d[x>>0]|0;MR((c[m>>2]|0)+28|0,c[v>>2]|0,(c[p>>2]|0)+1|0)|0;c[s>>2]=Vj((c[u>>2]|0)+348|0,c[(c[m>>2]|0)+20>>2]|0,c[m>>2]|0)|0;if((c[s>>2]|0)!=(c[m>>2]|0)){c[(c[m>>2]|0)+8>>2]=c[s>>2];break}Hd(c[u>>2]|0,c[m>>2]|0);yd(c[u>>2]|0);c[t>>2]=0;x=c[t>>2]|0;l=y;return x|0}while(0);do if(c[m>>2]|0){if((c[(c[m>>2]|0)+12>>2]|0)==0?(d[j>>0]|0)==0:0)break;c[t>>2]=c[m>>2];x=c[t>>2]|0;l=y;return x|0}while(0);c[t>>2]=0;x=c[t>>2]|0;l=y;return x|0}function vw(a){a=a|0;var b=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;e=g+8|0;f=g;c[e>>2]=a;h[f>>3]=-1.0;if((d[c[e>>2]>>0]|0|0)!=132){c[b>>2]=-1;f=c[b>>2]|0;l=g;return f|0}a=c[(c[e>>2]|0)+8>>2]|0;oi(a,f,_c(c[(c[e>>2]|0)+8>>2]|0)|0,1)|0;if(+h[f>>3]>1.0){c[b>>2]=-1;f=c[b>>2]|0;l=g;return f|0}else{c[b>>2]=~~(+h[f>>3]*134217728.0);f=c[b>>2]|0;l=g;return f|0}return 0}function ww(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=l;l=l+48|0;f=e+44|0;h=e+40|0;g=e+12|0;d=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;c[g+4>>2]=189;c[g+24>>2]=d;c[d>>2]=c[h>>2];c[d+4>>2]=0;c[d+8>>2]=0;Pv(g,c[(c[f>>2]|0)+20>>2]|0)|0;if((c[d+4>>2]|0)>0){h=1;h=h&1;l=e;return h|0}h=(c[d+8>>2]|0)==0;h=h&1;l=e;return h|0}function xw(b){b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+4|0;f=h;g=h+8|0;c[f>>2]=b;a[g>>0]=a[c[f>>2]>>0]|0;if((d[g>>0]|0|0)==157)a[g>>0]=a[(c[f>>2]|0)+38>>0]|0;if((d[g>>0]|0|0)==158){c[e>>2]=c[c[(c[f>>2]|0)+20>>2]>>2];g=c[e>>2]|0;l=h;return g|0}if((d[g>>0]|0|0)==119){c[e>>2]=c[c[c[(c[f>>2]|0)+20>>2]>>2]>>2];g=c[e>>2]|0;l=h;return g|0}else{c[e>>2]=1;g=c[e>>2]|0;l=h;return g|0}return 0}function yw(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[e>>2]=a;c[f>>2]=b;if((d[c[f>>2]>>0]|0|0)!=152?(d[c[f>>2]>>0]|0|0)!=154:0){l=k;return 0}c[h>>2]=c[(c[e>>2]|0)+24>>2];c[i>>2]=c[c[h>>2]>>2];if(c[i>>2]|0)a=c[c[i>>2]>>2]|0;else a=0;c[j>>2]=a;c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[j>>2]|0))break;if((c[(c[f>>2]|0)+28>>2]|0)==(c[(c[i>>2]|0)+8+((c[g>>2]|0)*72|0)+44>>2]|0))break;c[g>>2]=(c[g>>2]|0)+1}i=c[h>>2]|0;j=(c[g>>2]|0)<(c[j>>2]|0)?i+4|0:i+8|0;c[j>>2]=(c[j>>2]|0)+1;l=k;return 0}function zw(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n+16|0;m=n;c[i>>2]=b;c[j>>2]=f;a[k>>0]=g;b=c[i>>2]|0;if((c[j>>2]|0)==-2){c[h>>2]=(c[b+12>>2]|0)==0?0:6;m=c[h>>2]|0;l=n;return m|0}if((a[b>>0]|0)!=(c[j>>2]|0)?(a[c[i>>2]>>0]|0)>=0:0){c[h>>2]=0;m=c[h>>2]|0;l=n;return m|0}if((a[c[i>>2]>>0]|0)==(c[j>>2]|0))c[m>>2]=4;else c[m>>2]=1;if((d[k>>0]|0)!=(e[(c[i>>2]|0)+2>>1]&3|0)){if(d[k>>0]&e[(c[i>>2]|0)+2>>1]&2|0)c[m>>2]=(c[m>>2]|0)+1}else c[m>>2]=(c[m>>2]|0)+2;c[h>>2]=c[m>>2];m=c[h>>2]|0;l=n;return m|0}function Aw(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=0;while(1){if(!(a[(c[h>>2]|0)+(c[m>>2]|0)>>0]|0))break;if((a[(c[h>>2]|0)+(c[m>>2]|0)>>0]|0)==46)break;c[m>>2]=(c[m>>2]|0)+1}do if(c[k>>2]|0){if((Zc(c[h>>2]|0,c[k>>2]|0,c[m>>2]|0)|0)==0?(a[(c[k>>2]|0)+(c[m>>2]|0)>>0]|0)==0:0)break;c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}while(0);c[h>>2]=(c[h>>2]|0)+((c[m>>2]|0)+1);c[m>>2]=0;while(1){if(!(a[(c[h>>2]|0)+(c[m>>2]|0)>>0]|0))break;if((a[(c[h>>2]|0)+(c[m>>2]|0)>>0]|0)==46)break;c[m>>2]=(c[m>>2]|0)+1}do if(c[j>>2]|0){if((Zc(c[h>>2]|0,c[j>>2]|0,c[m>>2]|0)|0)==0?(a[(c[j>>2]|0)+(c[m>>2]|0)>>0]|0)==0:0)break;c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}while(0);c[h>>2]=(c[h>>2]|0)+((c[m>>2]|0)+1);if(c[i>>2]|0?Ig(c[h>>2]|0,c[i>>2]|0)|0:0){c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}c[g>>2]=1;m=c[g>>2]|0;l=n;return m|0}function Bw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;a:do if(c[e>>2]|0){c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[(c[e>>2]|0)+4>>2]|0))break a;if(!(Ig(c[(c[c[e>>2]>>2]|0)+(c[g>>2]<<3)>>2]|0,c[f>>2]|0)|0))break;c[g>>2]=(c[g>>2]|0)+1}c[d>>2]=1;g=c[d>>2]|0;l=h;return g|0}while(0);c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}function Cw(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;do if(Ig(c[d>>2]|0,26404)|0){if(!(Ig(c[d>>2]|0,26335)|0)){c[b>>2]=1;break}if(!(Ig(c[d>>2]|0,26412)|0)){c[b>>2]=1;break}else{c[b>>2]=0;break}}else c[b>>2]=1;while(0);l=e;return c[b>>2]|0}function Dw(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+48|0;p=s+36|0;q=s+32|0;j=s+28|0;k=s+24|0;t=s+20|0;r=s+16|0;m=s+12|0;i=s+8|0;n=s+4|0;o=s;c[p>>2]=e;c[q>>2]=f;c[j>>2]=g;c[k>>2]=h;c[t>>2]=c[c[p>>2]>>2];c[r>>2]=0;if(!(c[(c[t>>2]|0)+296>>2]|0)){l=s;return}c[n>>2]=Nt(c[c[p>>2]>>2]|0,c[j>>2]|0)|0;if((c[n>>2]|0)<0){l=s;return}a:do if((d[c[q>>2]>>0]|0)==88)c[r>>2]=c[(c[p>>2]|0)+128>>2];else{c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[c[k>>2]>>2]|0))break a;if((c[(c[q>>2]|0)+28>>2]|0)==(c[(c[k>>2]|0)+8+((c[i>>2]|0)*72|0)+44>>2]|0))break;c[i>>2]=(c[i>>2]|0)+1}c[r>>2]=c[(c[k>>2]|0)+8+((c[i>>2]|0)*72|0)+16>>2]}while(0);c[o>>2]=b[(c[q>>2]|0)+32>>1];if(!(c[r>>2]|0)){l=s;return}e=c[r>>2]|0;do if((c[o>>2]|0)<0)if((b[e+32>>1]|0)>=0){c[m>>2]=c[(c[(c[r>>2]|0)+4>>2]|0)+(b[(c[r>>2]|0)+32>>1]<<4)>>2];break}else{c[m>>2]=26335;break}else c[m>>2]=c[(c[e+4>>2]|0)+(c[o>>2]<<4)>>2];while(0);if(2!=(Ew(c[p>>2]|0,c[c[r>>2]>>2]|0,c[m>>2]|0,c[n>>2]|0)|0)){l=s;return}a[c[q>>2]>>0]=101;l=s;return}function Ew(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+64|0;q=r+16|0;p=r;i=r+52|0;j=r+48|0;k=r+44|0;m=r+40|0;n=r+36|0;o=r+32|0;g=r+28|0;h=r+24|0;c[j>>2]=b;c[k>>2]=d;c[m>>2]=e;c[n>>2]=f;c[o>>2]=c[c[j>>2]>>2];c[g>>2]=c[(c[(c[o>>2]|0)+16>>2]|0)+(c[n>>2]<<4)>>2];if(a[(c[o>>2]|0)+148+5>>0]|0){c[i>>2]=0;q=c[i>>2]|0;l=r;return q|0}c[h>>2]=sb[c[(c[o>>2]|0)+296>>2]&255](c[(c[o>>2]|0)+300>>2]|0,20,c[k>>2]|0,c[m>>2]|0,c[g>>2]|0,c[(c[j>>2]|0)+448>>2]|0)|0;if((c[h>>2]|0)!=1){if((c[h>>2]|0)!=2&(c[h>>2]|0)!=0)Pt(c[j>>2]|0)}else{b=c[j>>2]|0;if(c[n>>2]|0?1:(c[(c[o>>2]|0)+20>>2]|0)>2){o=c[k>>2]|0;q=c[m>>2]|0;c[p>>2]=c[g>>2];c[p+4>>2]=o;c[p+8>>2]=q;Ck(b,26341,p)}else{p=c[m>>2]|0;c[q>>2]=c[k>>2];c[q+4>>2]=p;Ck(b,26374,q)}c[(c[j>>2]|0)+12>>2]=23}c[i>>2]=c[h>>2];q=c[i>>2]|0;l=r;return q|0}function Fw(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;n=r+44|0;g=r+40|0;o=r+36|0;h=r+32|0;p=r+28|0;i=r+24|0;q=r+20|0;j=r+16|0;k=r+12|0;m=r+8|0;f=r;c[g>>2]=b;c[o>>2]=e;if(!(c[(c[o>>2]|0)+48>>2]|0)){c[n>>2]=0;q=c[n>>2]|0;l=r;return q|0}if(!(c[(c[o>>2]|0)+44>>2]|0)){c[n>>2]=0;q=c[n>>2]|0;l=r;return q|0}c[i>>2]=c[o>>2];while(1){if(!(c[i>>2]|0))break;if((d[(c[i>>2]|0)+4>>0]|0|0)!=116?(d[(c[i>>2]|0)+4>>0]|0|0)!=119:0)break;c[i>>2]=c[(c[i>>2]|0)+48>>2]}if(!(c[i>>2]|0)){c[n>>2]=0;q=c[n>>2]|0;l=r;return q|0}c[j>>2]=c[(c[(c[o>>2]|0)+44>>2]|0)+4>>2];c[h>>2]=(c[c[(c[o>>2]|0)+44>>2]>>2]|0)-1;while(1){if((c[h>>2]|0)<0)break;if(c[(c[(c[j>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0)+4>>2]&256|0)break;c[h>>2]=(c[h>>2]|0)+-1}if((c[h>>2]|0)<0){c[n>>2]=0;q=c[n>>2]|0;l=r;return q|0}c[m>>2]=c[c[g>>2]>>2];c[q>>2]=c[c[m>>2]>>2];c[p>>2]=jl(c[q>>2]|0,68,0)|0;if(!(c[p>>2]|0)){c[n>>2]=2;q=c[n>>2]|0;l=r;return q|0};c[f>>2]=0;c[f+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|0;h=j;c[e>>2]=a;c[k>>2]=b;c[g>>2]=wh(c[k>>2]|0)|0;c[h>>2]=xh(c[k>>2]|0)|0;if(!(c[g>>2]|0)){c[d>>2]=7;k=c[d>>2]|0;l=j;return k|0}if((c[h>>2]|0)==8?0==(Zc(c[g>>2]|0,39527,8)|0):0)c[f>>2]=QM(c[e>>2]|0,0)|0;else i=6;do if((i|0)==6){if((c[h>>2]|0)==7?0==(Zc(c[g>>2]|0,42510,7)|0):0){c[f>>2]=UN(c[e>>2]|0)|0;break}if((c[h>>2]|0)==15?0==(Zc(c[g>>2]|0,42518,15)|0):0){c[f>>2]=VN(c[e>>2]|0)|0;break}if((c[h>>2]|0)>6?0==(Zc(c[g>>2]|0,42534,6)|0):0){c[f>>2]=WN(c[e>>2]|0,(c[g>>2]|0)+6|0)|0;break}if((c[h>>2]|0)>10?0==(Zc(c[g>>2]|0,42541,10)|0):0){c[f>>2]=XN(c[e>>2]|0,(c[g>>2]|0)+10|0)|0;break}c[f>>2]=1}while(0);c[d>>2]=c[f>>2];k=c[d>>2]|0;l=j;return k|0}function EN(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=0;if((c[(c[b>>2]|0)+260>>2]|0)==0?(c[d>>2]=nK(c[b>>2]|0,16,e,0)|0,(c[d>>2]|0)==0):0){qI(c[e>>2]|0,1)|0;Hr(c[e>>2]|0)|0;c[d>>2]=Er(c[e>>2]|0)|0}l=f;return c[d>>2]|0}function FN(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+32|0;h=n+24|0;i=n+20|0;j=n+16|0;k=n+12|0;m=n+8|0;o=n+4|0;g=n;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=0;c[o>>2]=0;PN(m,c[h>>2]|0,c[i>>2]|0,c[k>>2]|0,o);if(!((c[o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<2)>>2]|0)|0)|0}if(c[i>>2]|0){c[e>>2]=c[i>>2];k=c[e>>2]|0;l=m;return k|0}if(5!=(fi(c[(c[g>>2]|0)+(3+(c[(c[f>>2]|0)+24>>2]|0)<<2)>>2]|0)|0)){if(5==(fi(c[c[g>>2]>>2]|0)|0)?5!=(fi(c[(c[g>>2]|0)+4>>2]|0)|0):0){c[e>>2]=1;k=c[e>>2]|0;l=m;return k|0}c[i>>2]=sI(c[j>>2]|0,1,c[(c[g>>2]|0)+(3+(c[(c[f>>2]|0)+24>>2]|0)<<2)>>2]|0)|0;if(c[i>>2]|0){c[e>>2]=c[i>>2];k=c[e>>2]|0;l=m;return k|0}}Hr(c[j>>2]|0)|0;c[i>>2]=Er(c[j>>2]|0)|0;j=Ji(c[(c[f>>2]|0)+12>>2]|0)|0;k=c[h>>2]|0;c[k>>2]=j;c[k+4>>2]=z;c[e>>2]=c[i>>2];k=c[e>>2]|0;l=m;return k|0}function HN(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+24|0;i=o+20|0;j=o+16|0;k=o+12|0;m=o;g=o+8|0;c[i>>2]=a;c[j>>2]=b;c[k>>2]=d;b=m;c[b>>2]=e;c[b+4>>2]=f;e=m;b=c[e+4>>2]|0;f=(c[i>>2]|0)+264|0;d=c[f+4>>2]|0;do if(!((b|0)<(d|0)|((b|0)==(d|0)?(c[e>>2]|0)>>>0<(c[f>>2]|0)>>>0:0))){e=m;f=(c[i>>2]|0)+264|0;if(((c[e>>2]|0)==(c[f>>2]|0)?(c[e+4>>2]|0)==(c[f+4>>2]|0):0)?(c[(c[i>>2]|0)+276>>2]|0)==0:0){n=6;break}if(!((c[(c[i>>2]|0)+272>>2]|0)==(c[k>>2]|0)?(c[(c[i>>2]|0)+260>>2]|0)<=(c[(c[i>>2]|0)+256>>2]|0):0))n=6}else n=6;while(0);if((n|0)==6?(c[g>>2]=kK(c[i>>2]|0)|0,c[g>>2]|0):0){c[h>>2]=c[g>>2];n=c[h>>2]|0;l=o;return n|0}f=m;m=c[f+4>>2]|0;n=(c[i>>2]|0)+264|0;c[n>>2]=c[f>>2];c[n+4>>2]=m;c[(c[i>>2]|0)+272>>2]=c[k>>2];c[(c[i>>2]|0)+276>>2]=c[j>>2];c[h>>2]=0;n=c[h>>2]|0;l=o;return n|0}function IN(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;p=q+32|0;i=q+28|0;j=q+24|0;k=q+20|0;m=q+16|0;n=q+12|0;g=q+8|0;h=q+4|0;o=q;c[i>>2]=a;c[j>>2]=b;c[k>>2]=e;c[m>>2]=f;c[n>>2]=2;while(1){if((c[n>>2]|0)>=((c[(c[i>>2]|0)+24>>2]|0)+2|0)){a=8;break}c[g>>2]=(c[n>>2]|0)-2;if(!(d[(c[(c[i>>2]|0)+32>>2]|0)+(c[g>>2]|0)>>0]|0)){c[h>>2]=wh(c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]|0)|0;c[o>>2]=NN(c[i>>2]|0,c[j>>2]|0,c[h>>2]|0,c[g>>2]|0,(c[m>>2]|0)+(c[g>>2]<<2)|0)|0;if(c[o>>2]|0){a=5;break}e=xh(c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]|0)|0;f=(c[m>>2]|0)+(c[(c[i>>2]|0)+24>>2]<<2)|0;c[f>>2]=(c[f>>2]|0)+e}c[n>>2]=(c[n>>2]|0)+1}if((a|0)==5){c[p>>2]=c[o>>2];p=c[p>>2]|0;l=q;return p|0}else if((a|0)==8){c[p>>2]=0;p=c[p>>2]|0;l=q;return p|0}return 0}function JN(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0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|0}c[h>>2]=zM(c[p>>2]|0,c[x>>2]|0,c[y>>2]|0,-1,r)|0;if(c[h>>2]|0){c[v>>2]=c[h>>2];A=c[v>>2]|0;l=B;return A|0}c[s>>2]=c[(c[q>>2]|0)+20>>2];a:while(1){if(c[h>>2]|0)break;y=sb[c[s>>2]&255](c[r>>2]|0,n,o,i,j,k)|0;c[h>>2]=y;if(y)break;if((c[k>>2]|0)>=(c[m>>2]|0))c[m>>2]=(c[k>>2]|0)+1;if((c[k>>2]|0)>=0&(c[n>>2]|0)!=0^1|(c[o>>2]|0)<=0){A=11;break}c[h>>2]=ON(c[w>>2]|0,c[z>>2]|0,c[k>>2]|0,(c[(c[w>>2]|0)+252>>2]|0)+4|0,c[n>>2]|0,c[o>>2]|0)|0;c[t>>2]=1;while(1){if(c[h>>2]|0)continue a;if((c[t>>2]|0)>=(c[(c[w>>2]|0)+248>>2]|0))continue a;c[u>>2]=(c[(c[w>>2]|0)+252>>2]|0)+((c[t>>2]|0)*24|0);if((c[o>>2]|0)>=(c[c[u>>2]>>2]|0))c[h>>2]=ON(c[w>>2]|0,c[z>>2]|0,c[k>>2]|0,(c[u>>2]|0)+4|0,c[n>>2]|0,c[c[u>>2]>>2]|0)|0;c[t>>2]=(c[t>>2]|0)+1}}if((A|0)==11)c[h>>2]=1;tb[c[(c[q>>2]|0)+16>>2]&255](c[r>>2]|0)|0;A=c[g>>2]|0;c[A>>2]=(c[A>>2]|0)+(c[m>>2]|0);c[v>>2]=(c[h>>2]|0)==101?0:c[h>>2]|0;A=c[v>>2]|0;l=B;return A|0}function ON(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;m=q+28|0;n=q+24|0;o=q+20|0;p=q+16|0;h=q+12|0;i=q+8|0;j=q+4|0;k=q;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[h>>2]=f;c[i>>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);if(!(a[(c[e>>2]|0)+229>>0]|0)){h=c[f>>2]|0;l=g;return h|0}SN(f,c[e>>2]|0,6,0);h=c[f>>2]|0;l=g;return h|0}function SN(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;if(c[c[f>>2]>>2]|0){l=m;return}c[k>>2]=nK(c[g>>2]|0,c[h>>2]|0,j,c[i>>2]|0)|0;if(!(c[k>>2]|0)){Hr(c[j>>2]|0)|0;c[k>>2]=Er(c[j>>2]|0)|0}c[c[f>>2]>>2]=c[k>>2];l=m;return}function TN(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;if(!(c[(c[d>>2]|0)+44>>2]|0)){f=c[f>>2]|0;l=g;return f|0}c[f>>2]=hI(c[e>>2]|0,(c[(c[d>>2]|0)+24>>2]|0)+1|0)|0;f=c[f>>2]|0;l=g;return f|0}function UN(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+64|0;g=t;h=t+52|0;n=t+48|0;o=t+44|0;p=t+40|0;q=t+36|0;r=t+32|0;s=t+28|0;e=t+24|0;f=t+20|0;i=t+16|0;j=t+12|0;k=t+8|0;m=t+4|0;c[h>>2]=b;c[n>>2]=RN(c[h>>2]|0,0)|0;if(c[n>>2]|0){s=c[n>>2]|0;l=t;return s|0}c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[r>>2]=0;c[s>>2]=0;c[g>>2]=c[(c[h>>2]|0)+216>>2];c[e>>2]=Ue(42629,g)|0;if(c[e>>2]|0){c[n>>2]=Fu(c[(c[h>>2]|0)+12>>2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continue a;g=(c[p>>2]|0)+(c[i>>2]<<2)|0;c[g>>2]=(c[g>>2]|0)+(c[(c[o>>2]|0)+(c[i>>2]<<2)>>2]|0);c[i>>2]=(c[i>>2]|0)+1}}if(a[e+228>>0]|0)KN(n,c[h>>2]|0,c[p>>2]|0,c[q>>2]|0,c[s>>2]|0);Kd(c[o>>2]|0);if(!(c[r>>2]|0)){s=c[n>>2]|0;l=t;return s|0}c[m>>2]=Qq(c[r>>2]|0)|0;if(c[n>>2]|0){s=c[n>>2]|0;l=t;return s|0}c[n>>2]=c[m>>2];s=c[n>>2]|0;l=t;return s|0}function VN(a){a=a|0;var b=0,d=0,e=0,f=0;d=l;l=l+16|0;f=d+8|0;b=d+4|0;e=d;c[f>>2]=a;c[e>>2]=0;a=_N(c[f>>2]|0,e)|0;c[b>>2]=a;c[b>>2]=(c[b>>2]|0)==0&(c[e>>2]|0)==0?267:a;l=d;return c[b>>2]|0}function WN(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;e=j+20|0;k=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=b;c[k>>2]=d;c[g>>2]=8;c[h>>2]=0;c[i>>2]=c[k>>2];c[h>>2]=YN(i)|0;if((a[c[i>>2]>>0]|0)==44?a[(c[i>>2]|0)+1>>0]|0:0){c[i>>2]=(c[i>>2]|0)+1;c[g>>2]=YN(i)|0}if((c[g>>2]|0)<2?1:(a[c[i>>2]>>0]|0)!=0){c[f>>2]=1;k=c[f>>2]|0;l=j;return k|0}c[f>>2]=0;if(!(a[(c[e>>2]|0)+229>>0]|0))ZN(f,c[e>>2]|0);if(!(c[f>>2]|0))c[f>>2]=cN(c[e>>2]|0,c[h>>2]|0,c[g>>2]|0)|0;wL(c[e>>2]|0);k=c[f>>2]|0;l=j;return k|0}function XN(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+16|0;f=i+12|0;j=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[j>>2]=d;c[g>>2]=0;c[h>>2]=0;d=YN(j)|0;c[(c[f>>2]|0)+48>>2]=d;if(!((c[(c[f>>2]|0)+48>>2]|0)!=1?(c[(c[f>>2]|0)+48>>2]|0)<=16:0))c[(c[f>>2]|0)+48>>2]=8;if((a[(c[f>>2]|0)+229>>0]|0)==0?(ZN(g,c[f>>2]|0),c[g>>2]|0):0){c[e>>2]=c[g>>2];j=c[e>>2]|0;l=i;return j|0}c[g>>2]=nK(c[f>>2]|0,23,h,0)|0;if(c[g>>2]|0){c[e>>2]=c[g>>2];j=c[e>>2]|0;l=i;return j|0}else{oI(c[h>>2]|0,1,2)|0;oI(c[h>>2]|0,2,c[(c[f>>2]|0)+48>>2]|0)|0;Hr(c[h>>2]|0)|0;c[g>>2]=Er(c[h>>2]|0)|0;c[e>>2]=c[g>>2];j=c[e>>2]|0;l=i;return j|0}return 0}function YN(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=b;c[e>>2]=c[c[d>>2]>>2];c[f>>2]=0;while(1){if((a[c[e>>2]>>0]|0)<48){b=5;break}if((a[c[e>>2]>>0]|0)>57){b=5;break}h=(c[f>>2]|0)*10|0;b=c[e>>2]|0;c[e>>2]=b+1;c[f>>2]=h+(a[b>>0]|0)-48}if((b|0)==5){c[c[d>>2]>>2]=c[e>>2];l=g;return c[f>>2]|0}return 0}function ZN(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+16|0;h=f;g=f+12|0;e=f+8|0;c[g>>2]=b;c[e>>2]=d;b=c[g>>2]|0;d=c[(c[e>>2]|0)+12>>2]|0;i=c[(c[e>>2]|0)+20>>2]|0;c[h>>2]=c[(c[e>>2]|0)+16>>2];c[h+4>>2]=i;lK(b,d,42552,h);if(c[c[g>>2]>>2]|0){l=f;return}a[(c[e>>2]|0)+229>>0]=1;l=f;return}function _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;l=F;return H|0}c[k>>2]=c[c[(c[t>>2]|0)+36>>2]>>2];c[m>>2]=0;c[j>>2]=c[(c[t>>2]|0)+216>>2];c[f>>2]=Ue(42629,j)|0;if(c[f>>2]|0){c[C>>2]=Fu(c[(c[t>>2]|0)+12>>2]|0,c[f>>2]|0,-1,m,0)|0;Kd(c[f>>2]|0)}else c[C>>2]=7;b:while(1){if(!(c[C>>2]|0))b=100==(Hr(c[m>>2]|0)|0);else b=0;a=c[m>>2]|0;if(!b)break;G=iI(a,0)|0;H=n;c[H>>2]=G;c[H+4>>2]=z;c[o>>2]=TN(c[t>>2]|0,c[m>>2]|0)|0;c[p>>2]=0;while(1){if(c[C>>2]|0)continue b;if((c[p>>2]|0)>=(c[(c[t>>2]|0)+24>>2]|0))continue b;if(!(d[(c[(c[t>>2]|0)+32>>2]|0)+(c[p>>2]|0)>>0]|0)){c[q>>2]=Iu(c[m>>2]|0,(c[p>>2]|0)+1|0)|0;c[r>>2]=fI(c[m>>2]|0,(c[p>>2]|0)+1|0)|0;c[s>>2]=0;c[C>>2]=zM(c[(c[t>>2]|0)+36>>2]|0,c[o>>2]|0,c[q>>2]|0,c[r>>2]|0,s)|0;c:while(1){if(c[C>>2]|0)break;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[C>>2]=sb[c[(c[k>>2]|0)+20>>2]&255](c[s>>2]|0,u,v,w,x,y)|0;if(c[C>>2]|0)continue;G=E;i=c[G>>2]|0;G=c[G+4>>2]|0;j=n;j=aO(c[u>>2]|0,c[v>>2]|0,c[o>>2]|0,0,c[j>>2]|0,c[j+4>>2]|0,c[p>>2]|0,c[y>>2]|0)|0;H=E;c[H>>2]=i^j;c[H+4>>2]=G^z;c[A>>2]=1;while(1){if((c[A>>2]|0)>=(c[(c[t>>2]|0)+248>>2]|0))continue c;if((c[(c[(c[t>>2]|0)+252>>2]|0)+((c[A>>2]|0)*24|0)>>2]|0)<=(c[v>>2]|0)){G=E;i=c[G>>2]|0;G=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if(!((b|0)<(g|0)|((b|0)==(g|0)?(c[i>>2]|0)>>>0<(c[j>>2]|0)>>>0:0))){j=c[f>>2]|0;l=h;return j|0}}a[(c[e>>2]|0)+6>>0]=1;j=c[f>>2]|0;l=h;return j|0}function cO(a){a=a|0;var b=0,d=0,e=0,f=0;e=l;l=l+16|0;f=e+8|0;b=e+4|0;d=e;c[f>>2]=a;c[b>>2]=c[f>>2];while(1){if(!(c[b>>2]|0))break;if((c[(c[b>>2]|0)+12>>2]|0)==0?(c[(c[b>>2]|0)+16>>2]|0)==0:0)break;a=c[b>>2]|0;if(c[(c[b>>2]|0)+12>>2]|0)a=c[a+12>>2]|0;else a=c[a+16>>2]|0;c[b>>2]=a}a:while(1){if(!(c[b>>2]|0))break;c[d>>2]=c[(c[b>>2]|0)+8>>2];CO(c[b>>2]|0);if((c[d>>2]|0?(c[b>>2]|0)==(c[(c[d>>2]|0)+12>>2]|0):0)?c[(c[d>>2]|0)+16>>2]|0:0){c[b>>2]=c[(c[d>>2]|0)+16>>2];while(1){if(!(c[b>>2]|0))continue a;if((c[(c[b>>2]|0)+12>>2]|0)==0?(c[(c[b>>2]|0)+16>>2]|0)==0:0)continue a;a=c[b>>2]|0;if(c[(c[b>>2]|0)+12>>2]|0)a=c[a+12>>2]|0;else a=c[a+16>>2]|0;c[b>>2]=a}}c[b>>2]=c[d>>2]}l=e;return}function dO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;e=i+8|0;f=i+20|0;g=i;h=i+16|0;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;if(c[f>>2]|0?(c[h>>2]=ji(c[f>>2]|0)|0,(c[h>>2]|0)==1):0){h=ki(c[f>>2]|0)|0;g=e;c[g>>2]=h;c[g+4>>2]=z;g=e;h=g;h=c[h>>2]|0;g=g+4|0;g=c[g>>2]|0;z=g;l=i;return h|0}f=g;h=c[f+4>>2]|0;g=e;c[g>>2]=c[f>>2];c[g+4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]=a;c[o>>2]=c[c[b>>2]>>2];c[f>>2]=0;c[g>>2]=0;c[h>>2]=0;gO(c[b>>2]|0,c[(c[b>>2]|0)+12>>2]|0,g,h,f);do if((c[f>>2]|0)==0&(c[g>>2]|0)>1?d[(c[o>>2]|0)+228>>0]|0|0:0){c[i>>2]=Yd(((c[g>>2]|0)*24|0)+(c[h>>2]<<2<<1)|0)|0;c[j>>2]=(c[i>>2]|0)+((c[g>>2]|0)*24|0);if(!(c[i>>2]|0)){c[f>>2]=7;break}c[m>>2]=c[i>>2];c[e>>2]=c[j>>2];hO(c[b>>2]|0,0,c[(c[b>>2]|0)+12>>2]|0,m,e,f);c[g>>2]=((c[m>>2]|0)-(c[i>>2]|0)|0)/24|0;c[h>>2]=((c[e>>2]|0)-(c[j>>2]|0)|0)/4|0;a:do if(!(c[f>>2]|0)){c[f>>2]=iO(c[b>>2]|0,0,c[i>>2]|0,c[g>>2]|0)|0;c[k>>2]=0;while(1){if(c[f>>2]|0)break a;if((c[k>>2]|0)>=(c[h>>2]|0))break a;c[f>>2]=iO(c[b>>2]|0,c[(c[j>>2]|0)+(c[k>>2]<<2)>>2]|0,c[i>>2]|0,c[g>>2]|0)|0;c[k>>2]=(c[k>>2]|0)+1}}while(0);Kd(c[i>>2]|0)}while(0);jO(c[b>>2]|0,c[(c[b>>2]|0)+12>>2]|0,f);l=n;return c[f>>2]|0}function gO(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;m=q+32|0;n=q+28|0;g=q+24|0;h=q+20|0;p=q+16|0;i=q+12|0;j=q+8|0;k=q+4|0;o=q;c[m>>2]=a;c[n>>2]=b;c[g>>2]=d;c[h>>2]=e;c[p>>2]=f;if(!(c[n>>2]|0)){l=q;return}if(c[c[p>>2]>>2]|0){l=q;return}a=c[n>>2]|0;if((c[c[n>>2]>>2]|0)!=5){o=c[h>>2]|0;c[o>>2]=(c[o>>2]|0)+((c[a>>2]|0)==4&1);gO(c[m>>2]|0,c[(c[n>>2]|0)+12>>2]|0,c[g>>2]|0,c[h>>2]|0,c[p>>2]|0);gO(c[m>>2]|0,c[(c[n>>2]|0)+16>>2]|0,c[g>>2]|0,c[h>>2]|0,c[p>>2]|0);l=q;return}c[j>>2]=c[(c[a+20>>2]|0)+64>>2];h=c[g>>2]|0;c[h>>2]=(c[h>>2]|0)+(c[j>>2]|0);c[i>>2]=0;while(1){b=c[(c[n>>2]|0)+20>>2]|0;if((c[i>>2]|0)>=(c[j>>2]|0)){a=9;break}c[k>>2]=b+72+((c[i>>2]|0)*24|0);c[o>>2]=oO(c[m>>2]|0,c[c[k>>2]>>2]|0,c[(c[k>>2]|0)+4>>2]|0,c[(c[k>>2]|0)+8>>2]|0,(c[k>>2]|0)+20|0)|0;if(c[o>>2]|0){a=7;break}c[i>>2]=(c[i>>2]|0)+1}if((a|0)==7){c[c[p>>2]>>2]=c[o>>2];l=q;return}else if((a|0)==9){c[b+44>>2]=-1;l=q;return}}function hO(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;n=r+32|0;o=r+28|0;p=r+24|0;q=r+20|0;k=r+16|0;m=r+12|0;h=r+8|0;i=r+4|0;j=r;c[n>>2]=a;c[o>>2]=b;c[p>>2]=d;c[q>>2]=e;c[k>>2]=f;c[m>>2]=g;if(c[c[m>>2]>>2]|0){l=r;return}b=c[p>>2]|0;if((c[c[p>>2]>>2]|0)==5){c[h>>2]=c[b+20>>2];c[i>>2]=0;while(1){if(c[c[m>>2]>>2]|0){a=13;break}if((c[i>>2]|0)>=(c[(c[h>>2]|0)+64>>2]|0)){a=13;break}k=c[q>>2]|0;p=c[k>>2]|0;c[k>>2]=p+24;c[j>>2]=p;c[c[j>>2]>>2]=c[h>>2];c[(c[j>>2]|0)+4>>2]=c[i>>2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]=0;c[k>>2]=0;c[m>>2]=1;if(c[(c[z>>2]|0)+40>>2]|0){c[u>>2]=0;A=c[u>>2]|0;l=B;return A|0}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[y>>2]|0))break;if((c[(c[x>>2]|0)+((c[h>>2]|0)*24|0)+12>>2]|0)==(c[w>>2]|0)){c[i>>2]=(c[i>>2]|0)+(c[(c[x>>2]|0)+((c[h>>2]|0)*24|0)+16>>2]|0);c[j>>2]=(c[j>>2]|0)+1}c[h>>2]=(c[h>>2]|0)+1}if((c[i>>2]|0)==0|(c[j>>2]|0)<2){c[u>>2]=0;A=c[u>>2]|0;l=B;return A|0}c[g>>2]=kO(c[v>>2]|0,f)|0;c[h>>2]=0;while(1){if(!((c[h>>2]|0)<(c[j>>2]|0)?(c[g>>2]|0)==0:0))break;c[o>>2]=0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[y>>2]|0))break;do if(c[(c[x>>2]|0)+((c[n>>2]|0)*24|0)+8>>2]|0?(c[(c[x>>2]|0)+((c[n>>2]|0)*24|0)+12>>2]|0)==(c[w>>2]|0):0){if(c[o>>2]|0?(c[(c[x>>2]|0)+((c[n>>2]|0)*24|0)+16>>2]|0)>=(c[(c[o>>2]|0)+16>>2]|0):0)break;c[o>>2]=(c[x>>2]|0)+((c[n>>2]|0)*24|0)}while(0);c[n>>2]=(c[n>>2]|0)+1}if(c[h>>2]|0?(c[(c[o>>2]|0)+16>>2]|0)>=(O(((c[k>>2]|0)+((c[m>>2]|0)/4|0)-1|0)/((c[m>>2]|0)/4|0|0)|0,c[f>>2]|0)|0):0){c[p>>2]=c[(c[o>>2]|0)+8>>2];c[g>>2]=lO(c[v>>2]|0,c[p>>2]|0,c[(c[o>>2]|0)+20>>2]|0)|0;lM(c[(c[p>>2]|0)+20>>2]|0);c[(c[p>>2]|0)+20>>2]=0}else A=23;do if((A|0)==23){A=0;if((c[h>>2]|0)<12)c[m>>2]=c[m>>2]<<2;if(c[h>>2]|0){if((c[(c[c[o>>2]>>2]|0)+64>>2]|0)<=1)break;if((c[h>>2]|0)==((c[j>>2]|0)-1|0))break}c[q>>2]=c[(c[o>>2]|0)+8>>2];c[r>>2]=0;c[s>>2]=0;c[g>>2]=eM(c[z>>2]|0,c[q>>2]|0,c[(c[o>>2]|0)+20>>2]|0,r,s)|0;if(!(c[g>>2]|0))c[g>>2]=fM(c[z>>2]|0,c[c[o>>2]>>2]|0,c[(c[o>>2]|0)+4>>2]|0,c[s>>2]|0,c[r>>2]|0)|0;if(!(c[g>>2]|0)){c[t>>2]=mO(c[c[c[o>>2]>>2]>>2]|0,c[(c[c[o>>2]>>2]|0)+4>>2]|0)|0;if(c[h>>2]|0?(c[t>>2]|0)>=(c[k>>2]|0):0)break;c[k>>2]=c[t>>2]}}while(0);c[(c[o>>2]|0)+8>>2]=0;c[h>>2]=(c[h>>2]|0)+1}c[u>>2]=c[g>>2];A=c[u>>2]|0;l=B;return A|0}function jO(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;g=m+16|0;k=m+12|0;h=m+8|0;i=m+4|0;j=m;c[g>>2]=b;c[k>>2]=e;c[h>>2]=f;if(!(c[k>>2]|0)){l=m;return}if(c[c[h>>2]>>2]|0){l=m;return}if((c[c[k>>2]>>2]|0)!=5){jO(c[g>>2]|0,c[(c[k>>2]|0)+12>>2]|0,c[h>>2]|0);jO(c[g>>2]|0,c[(c[k>>2]|0)+16>>2]|0,c[h>>2]|0);if(d[(c[(c[k>>2]|0)+12>>2]|0)+34>>0]|0|0)b=(d[(c[(c[k>>2]|0)+16>>2]|0)+34>>0]|0|0)!=0;else b=0;a[(c[k>>2]|0)+34>>0]=b&1;l=m;return}c[i>>2]=c[(c[(c[k>>2]|0)+20>>2]|0)+64>>2];if(c[i>>2]|0){c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[i>>2]|0))break;if(!(c[(c[(c[k>>2]|0)+20>>2]|0)+72+((c[j>>2]|0)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,((n|0)<0)<<31>>31|0)|0;c[(c[g>>2]|0)+60>>2]=n;c[i>>2]=Er(c[k>>2]|0)|0;if(c[i>>2]|0){c[f>>2]=c[i>>2];n=c[f>>2]|0;l=o;return n|0}}c[c[h>>2]>>2]=c[(c[g>>2]|0)+60>>2];c[f>>2]=0;n=c[f>>2]|0;l=o;return n|0}function lO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=Yd(16)|0;if(c[i>>2]|0){d=c[i>>2]|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;c[c[i>>2]>>2]=c[g>>2];c[(c[i>>2]|0)+8>>2]=c[(c[f>>2]|0)+24>>2];c[(c[i>>2]|0)+4>>2]=c[h>>2];c[(c[f>>2]|0)+24>>2]=c[i>>2];c[(c[g>>2]|0)+16>>2]=c[i>>2];c[e>>2]=0;i=c[e>>2]|0;l=j;return i|0}else{c[e>>2]=7;i=c[e>>2]|0;l=j;return i|0}return 0}function mO(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=b;c[f>>2]=d;c[g>>2]=0;if(!(c[e>>2]|0)){i=c[g>>2]|0;l=j;return i|0}c[h>>2]=(c[e>>2]|0)+(c[f>>2]|0);c[i>>2]=c[e>>2];while(1){if((c[i>>2]|0)>>>0>=(c[h>>2]|0)>>>0)break;c[g>>2]=(c[g>>2]|0)+1;do{f=c[i>>2]|0;c[i>>2]=f+1}while((a[f>>0]&128|0)!=0);bL(0,i)}i=c[g>>2]|0;l=j;return i|0}function nO(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+48|0;r=q+44|0;j=q+40|0;n=q+36|0;k=q+32|0;o=q+28|0;m=q+24|0;p=q+20|0;f=q+16|0;g=q+12|0;h=q;i=q+8|0;c[r>>2]=a;c[j>>2]=b;c[n>>2]=e;c[k>>2]=c[c[r>>2]>>2];c[o>>2]=0;c[p>>2]=0;c[f>>2]=c[(c[k>>2]|0)+236>>2];c[m>>2]=0;while(1){if(c[p>>2]|0){a=13;break}if((c[m>>2]|0)>=(c[(c[j>>2]|0)+4>>2]|0)){a=13;break}c[g>>2]=c[(c[c[j>>2]>>2]|0)+(c[m>>2]<<2)>>2];a:do if((c[(c[g>>2]|0)+56>>2]|0)==0?(d[(c[g>>2]|0)+5>>0]|0|0)==0:0){b=(c[g>>2]|0)+8|0;e=c[b+4>>2]|0;r=h;c[r>>2]=c[b>>2];c[r+4>>2]=e;while(1){e=h;a=c[e+4>>2]|0;r=(c[g>>2]|0)+16|0;b=c[r+4>>2]|0;if(!((a|0)<(b|0)|((a|0)==(b|0)?(c[e>>2]|0)>>>0<=(c[r>>2]|0)>>>0:0)))break a;r=h;c[p>>2]=eL(c[k>>2]|0,c[r>>2]|0,c[r+4>>2]|0,0,i,0)|0;if(c[p>>2]|0)break a;if(((c[i>>2]|0)+35|0)>(c[f>>2]|0))c[o>>2]=(c[o>>2]|0)+(((c[i>>2]|0)+34|0)/(c[f>>2]|0)|0);e=h;e=IR(c[e>>2]|0,c[e+4>>2]|0,1,0)|0;r=h;c[r>>2]=e;c[r+4>>2]=z}}while(0);c[m>>2]=(c[m>>2]|0)+1}if((a|0)==13){c[c[n>>2]>>2]=c[o>>2];l=q;return c[p>>2]|0}return 0}function oO(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;m=r+36|0;n=r+32|0;o=r+28|0;p=r+24|0;q=r+20|0;g=r+16|0;h=r+12|0;i=r+8|0;j=r+4|0;k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(k,(c[n>>2]|0)-1|0)|0;if(c[o>>2]|0)break;c[f>>2]=0;while(1){if(!(c[k>>2]|0))break;if((c[f>>2]|0)>=(c[n>>2]|0))break;if(!(c[(c[r>>2]|0)+(c[f>>2]<<2)>>2]|0)){c[(c[r>>2]|0)+(c[f>>2]<<2)>>2]=c[k>>2];c[k>>2]=0}else{c[(c[q>>2]|0)+12>>2]=c[(c[r>>2]|0)+(c[f>>2]<<2)>>2];c[(c[q>>2]|0)+16>>2]=c[k>>2];c[(c[(c[q>>2]|0)+12>>2]|0)+8>>2]=c[q>>2];c[(c[(c[q>>2]|0)+16>>2]|0)+8>>2]=c[q>>2];c[k>>2]=c[q>>2];c[q>>2]=c[(c[q>>2]|0)+8>>2];c[(c[k>>2]|0)+8>>2]=0;c[(c[r>>2]|0)+(c[f>>2]<<2)>>2]=0}c[f>>2]=(c[f>>2]|0)+1}if(c[k>>2]|0){j=24;break}if(!(c[g>>2]|0))break;c[k>>2]=c[(c[g>>2]|0)+16>>2];while(1){if((c[c[k>>2]>>2]|0)!=(c[i>>2]|0))break;c[k>>2]=c[(c[k>>2]|0)+12>>2]}c[(c[(c[g>>2]|0)+16>>2]|0)+8>>2]=c[(c[g>>2]|0)+8>>2];a=c[(c[g>>2]|0)+16>>2]|0;if(c[(c[g>>2]|0)+8>>2]|0)c[(c[(c[g>>2]|0)+8>>2]|0)+12>>2]=a;else c[p>>2]=a;c[(c[g>>2]|0)+8>>2]=c[q>>2];c[q>>2]=c[g>>2]}if((j|0)==24){cO(c[k>>2]|0);c[o>>2]=18}a:do if(!(c[o>>2]|0)){c[k>>2]=0;c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[n>>2]|0))break;if(c[(c[r>>2]|0)+(c[s>>2]<<2)>>2]|0){if(!(c[k>>2]|0)){c[k>>2]=c[(c[r>>2]|0)+(c[s>>2]<<2)>>2];a=c[k>>2]|0}else{c[(c[q>>2]|0)+16>>2]=c[k>>2];c[(c[q>>2]|0)+12>>2]=c[(c[r>>2]|0)+(c[s>>2]<<2)>>2];c[(c[(c[q>>2]|0)+12>>2]|0)+8>>2]=c[q>>2];c[(c[(c[q>>2]|0)+16>>2]|0)+8>>2]=c[q>>2];c[k>>2]=c[q>>2];c[q>>2]=c[(c[q>>2]|0)+8>>2];a=c[k>>2]|0}c[a+8>>2]=0}c[s>>2]=(c[s>>2]|0)+1}c[p>>2]=c[k>>2]}else{c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[n>>2]|0))break;cO(c[(c[r>>2]|0)+(c[s>>2]<<2)>>2]|0);c[s>>2]=(c[s>>2]|0)+1}while(1){s=c[q>>2]|0;c[h>>2]=s;if(!s)break a;c[q>>2]=c[(c[h>>2]|0)+8>>2];Kd(c[h>>2]|0)}}while(0);Kd(c[r>>2]|0)}}while(0);if(!(c[o>>2]|0)){r=c[p>>2]|0;s=c[m>>2]|0;c[s>>2]=r;s=c[o>>2]|0;l=t;return s|0}cO(c[p>>2]|0);c[p>>2]=0;r=c[p>>2]|0;s=c[m>>2]|0;c[s>>2]=r;s=c[o>>2]|0;l=t;return s|0}function sO(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;do if(c[d>>2]|0){if((c[e>>2]|0)<0){c[f>>2]=18;break}c[f>>2]=sO(c[(c[d>>2]|0)+12>>2]|0,(c[e>>2]|0)-1|0)|0;if(!(c[f>>2]|0))c[f>>2]=sO(c[(c[d>>2]|0)+16>>2]|0,(c[e>>2]|0)-1|0)|0}while(0);l=g;return c[f>>2]|0}function tO(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;x=l;l=l+80|0;n=x+64|0;y=x+60|0;u=x+56|0;v=x+52|0;w=x+48|0;o=x+44|0;g=x+40|0;p=x+36|0;q=x+32|0;h=x+28|0;r=x+24|0;s=x+20|0;t=x+16|0;i=x+12|0;j=x+8|0;k=x+4|0;m=x;c[n>>2]=a;c[y>>2]=b;c[u>>2]=d;c[v>>2]=e;c[w>>2]=f;c[o>>2]=0;c[g>>2]=0;c[p>>2]=0;c[q>>2]=c[u>>2];c[h>>2]=c[y>>2];c[r>>2]=0;c[s>>2]=1;while(1){if(c[r>>2]|0){a=25;break}c[t>>2]=0;c[i>>2]=0;c[r>>2]=uO(c[n>>2]|0,c[h>>2]|0,c[q>>2]|0,t,i)|0;if((c[r>>2]|0)==0&(c[t>>2]|0)!=0){c[k>>2]=c[c[t>>2]>>2];if((c[k>>2]|0)==5)a=1;else a=(c[(c[t>>2]|0)+12>>2]|0)!=0;c[j>>2]=a&1;if((c[j>>2]|0)==0&(c[s>>2]|0)!=0){a=7;break}if(!((c[j>>2]|0)==0|(c[s>>2]|0)!=0)){c[m>>2]=vO(48)|0;if(!(c[m>>2]|0)){a=10;break}c[c[m>>2]>>2]=3;wO(o,c[g>>2]|0,c[m>>2]|0);c[g>>2]=c[m>>2]}if(c[g>>2]|0){if(!((c[k>>2]|0)!=1|(c[j>>2]|0)!=0)?(c[c[g>>2]>>2]|0)!=5:0){a=17;break}if((c[k>>2]|0)!=5&(c[j>>2]|0)!=0?(c[c[g>>2]>>2]|0)==1:0){a=17;break}}do if(c[j>>2]|0){a=c[t>>2]|0;if(c[o>>2]|0){c[(c[g>>2]|0)+16>>2]=a;c[(c[t>>2]|0)+8>>2]=c[g>>2];break}else{c[o>>2]=a;break}}else wO(o,c[g>>2]|0,c[t>>2]|0);while(0);c[s>>2]=((c[j>>2]|0)!=0^1)&1;c[g>>2]=c[t>>2]}c[q>>2]=(c[q>>2]|0)-(c[i>>2]|0);c[h>>2]=(c[h>>2]|0)+(c[i>>2]|0)}if((a|0)==7){cO(c[t>>2]|0);c[r>>2]=1}else if((a|0)==10){cO(c[t>>2]|0);c[r>>2]=7}else if((a|0)==17){cO(c[t>>2]|0);c[r>>2]=1}else if((a|0)==25){if((c[r>>2]|0)==101&(c[o>>2]|0)!=0&(c[s>>2]|0)!=0)c[r>>2]=1;if((c[r>>2]|0)==101)c[r>>2]=0;c[c[w>>2]>>2]=(c[u>>2]|0)-(c[q>>2]|0)}if(!(c[r>>2]|0)){w=c[o>>2]|0;y=c[v>>2]|0;c[y>>2]=w;y=c[r>>2]|0;l=x;return y|0}cO(c[o>>2]|0);cO(c[p>>2]|0);c[o>>2]=0;w=c[o>>2]|0;y=c[v>>2]|0;c[y>>2]=w;y=c[r>>2]|0;l=x;return y|0}function uO(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+80|0;y=E+72|0;z=E+68|0;A=E+64|0;B=E+60|0;C=E+56|0;p=E+52|0;q=E+48|0;r=E+44|0;s=E+40|0;t=E+36|0;i=E+32|0;u=E+28|0;v=E+24|0;j=E+20|0;k=E+16|0;m=E+12|0;n=E+76|0;o=E+8|0;w=E+4|0;x=E;c[z>>2]=b;c[A>>2]=e;c[B>>2]=f;c[C>>2]=g;c[p>>2]=h;c[i>>2]=0;c[u>>2]=c[A>>2];c[v>>2]=c[B>>2];c[(c[z>>2]|0)+24>>2]=0;while(1){if((c[v>>2]|0)>0)b=(yO(a[c[u>>2]>>0]|0)|0)!=0;else b=0;e=c[v>>2]|0;if(!b)break;c[v>>2]=e+-1;c[u>>2]=(c[u>>2]|0)+1}if(!e){c[y>>2]=101;D=c[y>>2]|0;l=E;return D|0}c[q>>2]=0;while(1){if((c[q>>2]|0)>=4)break;c[j>>2]=6592+(c[q>>2]<<3);if(((d[(c[j>>2]|0)+5>>0]&-2|0)==0?(c[v>>2]|0)>=(d[(c[j>>2]|0)+4>>0]|0):0)?0==(wQ(c[u>>2]|0,c[c[j>>2]>>2]|0,d[(c[j>>2]|0)+4>>0]|0)|0):0){c[k>>2]=10;c[m>>2]=d[(c[j>>2]|0)+4>>0];a:do if((((d[(c[j>>2]|0)+6>>0]|0)==1?(a[(c[u>>2]|0)+4>>0]|0)==47:0)?(a[(c[u>>2]|0)+5>>0]|0)>=48:0)?(a[(c[u>>2]|0)+5>>0]|0)<=57:0){c[k>>2]=0;c[m>>2]=5;while(1){if((a[(c[u>>2]|0)+(c[m>>2]|0)>>0]|0)<48)break a;if((a[(c[u>>2]|0)+(c[m>>2]|0)>>0]|0)>57)break a;c[k>>2]=((c[k>>2]|0)*10|0)+((a[(c[u>>2]|0)+(c[m>>2]|0)>>0]|0)-48);c[m>>2]=(c[m>>2]|0)+1}}while(0);a[n>>0]=a[(c[u>>2]|0)+(c[m>>2]|0)>>0]|0;if(yO(a[n>>0]|0)|0){D=26;break}if((a[n>>0]|0)==34){D=26;break}if((a[n>>0]|0)==40){D=26;break}if((a[n>>0]|0)==41){D=26;break}if(!(a[n>>0]|0)){D=26;break}}c[q>>2]=(c[q>>2]|0)+1}if((D|0)==26){c[i>>2]=vO(48)|0;if(c[i>>2]|0){c[c[i>>2]>>2]=d[(c[j>>2]|0)+6>>0];c[(c[i>>2]|0)+4>>2]=c[k>>2];c[c[C>>2]>>2]=c[i>>2];c[c[p>>2]>>2]=(c[u>>2]|0)-(c[A>>2]|0)+(c[m>>2]|0);c[y>>2]=0;D=c[y>>2]|0;l=E;return D|0}else{c[y>>2]=7;D=c[y>>2]|0;l=E;return D|0}}if((a[c[u>>2]>>0]|0)==34){c[q>>2]=1;while(1){if((c[q>>2]|0)>=(c[v>>2]|0))break;if((a[(c[u>>2]|0)+(c[q>>2]|0)>>0]|0)==34)break;c[q>>2]=(c[q>>2]|0)+1}c[c[p>>2]>>2]=(c[u>>2]|0)-(c[A>>2]|0)+(c[q>>2]|0)+1;if((c[q>>2]|0)==(c[v>>2]|0)){c[y>>2]=1;D=c[y>>2]|0;l=E;return D|0}else{c[y>>2]=zO(c[z>>2]|0,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]|0;l=E;return D|0}function vO(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;c[d>>2]=Yd(c[b>>2]|0)|0;if(!(c[d>>2]|0)){d=c[d>>2]|0;l=e;return d|0}GR(c[d>>2]|0,0,c[b>>2]|0)|0;d=c[d>>2]|0;l=e;return d|0}function wO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;e=h+12|0;i=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[i>>2]=b;c[f>>2]=d;c[g>>2]=c[i>>2];while(1){if(c[(c[g>>2]|0)+8>>2]|0){a=xO(c[(c[g>>2]|0)+8>>2]|0)|0;a=(a|0)<=(xO(c[f>>2]|0)|0)}else a=0;b=c[(c[g>>2]|0)+8>>2]|0;if(!a)break;c[g>>2]=b}a=c[f>>2]|0;if(b|0){c[(c[(c[g>>2]|0)+8>>2]|0)+16>>2]=a;c[(c[f>>2]|0)+8>>2]=c[(c[g>>2]|0)+8>>2];e=c[g>>2]|0;i=c[f>>2]|0;i=i+12|0;c[i>>2]=e;f=c[f>>2]|0;i=c[g>>2]|0;i=i+8|0;c[i>>2]=f;l=h;return}else{c[c[e>>2]>>2]=a;e=c[g>>2]|0;i=c[f>>2]|0;i=i+12|0;c[i>>2]=e;f=c[f>>2]|0;i=c[g>>2]|0;i=i+8|0;c[i>>2]=f;l=h;return}}function xO(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[b>>2]>>2]|0}function yO(b){b=b|0;var c=0,d=0;d=l;l=l+16|0;c=d;a[c>>0]=b;if(((((a[c>>0]|0)!=32?(a[c>>0]|0)!=9:0)?(a[c>>0]|0)!=10:0)?(a[c>>0]|0)!=13:0)?(a[c>>0]|0)!=11:0)b=(a[c>>0]|0)==12;else b=1;l=d;return b&1|0}function zO(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=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(c[z>>2]|0)+(c[s>>2]|0)>>0]|0)==42;else b=0;c[(c[u>>2]|0)+8>>2]=b&1;if((c[r>>2]|0)>0)b=(a[(c[z>>2]|0)+((c[r>>2]|0)-1)>>0]|0)==94;else b=0;c[(c[u>>2]|0)+12>>2]=b&1;c[n>>2]=(c[o>>2]|0)+1}c[o>>2]=(c[o>>2]|0)+1}tb[c[(c[g>>2]|0)+16>>2]&255](c[j>>2]|0)|0;c[j>>2]=0;C=14}else C=14;while(0);do if((C|0)==14){if((c[h>>2]|0)==101){c[w>>2]=0;c[i>>2]=BO(c[i>>2]|0,144+((c[n>>2]|0)*24|0)+(c[m>>2]|0)|0)|0;if(!(c[i>>2]|0))break;GR(c[i>>2]|0,0,(c[i>>2]|0)+48+72-(c[i>>2]|0)|0)|0;c[c[i>>2]>>2]=5;c[(c[i>>2]|0)+20>>2]=(c[i>>2]|0)+48;c[(c[(c[i>>2]|0)+20>>2]|0)+68>>2]=c[(c[y>>2]|0)+20>>2];c[(c[(c[i>>2]|0)+20>>2]|0)+64>>2]=c[n>>2];c[w>>2]=(c[(c[i>>2]|0)+20>>2]|0)+72+((c[n>>2]|0)*24|0);if(c[k>>2]|0){MR(c[w>>2]|0,c[k>>2]|0,c[m>>2]|0)|0;Kd(c[k>>2]|0)}c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[(c[(c[i>>2]|0)+20>>2]|0)+64>>2]|0))break;c[(c[(c[i>>2]|0)+20>>2]|0)+72+((c[v>>2]|0)*24|0)>>2]=c[w>>2];c[w>>2]=(c[w>>2]|0)+(c[(c[(c[i>>2]|0)+20>>2]|0)+72+((c[v>>2]|0)*24|0)+4>>2]|0);c[v>>2]=(c[v>>2]|0)+1}c[h>>2]=0}c[c[B>>2]>>2]=c[i>>2];c[x>>2]=c[h>>2];E=c[x>>2]|0;l=D;return E|0}while(0);if(c[j>>2]|0)tb[c[(c[g>>2]|0)+16>>2]&255](c[j>>2]|0)|0;Kd(c[k>>2]|0);Kd(c[i>>2]|0);c[c[B>>2]>>2]=0;c[x>>2]=7;E=c[x>>2]|0;l=D;return E|0}function AO(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;B=l;l=l+80|0;x=B+68|0;y=B+64|0;z=B+60|0;A=B+56|0;i=B+52|0;j=B+48|0;k=B+44|0;m=B+40|0;n=B+36|0;o=B+32|0;p=B+28|0;q=B+24|0;r=B+20|0;s=B+16|0;t=B+12|0;u=B+8|0;v=B+4|0;w=B;c[x>>2]=b;c[y>>2]=d;c[z>>2]=e;c[A>>2]=f;c[i>>2]=g;c[j>>2]=h;c[k>>2]=c[c[x>>2]>>2];c[m>>2]=c[c[k>>2]>>2];c[p>>2]=0;c[q>>2]=0;c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[A>>2]|0))break;if((a[(c[z>>2]|0)+(c[q>>2]|0)>>0]|0)==40)break;if((a[(c[z>>2]|0)+(c[q>>2]|0)>>0]|0)==41)break;if((a[(c[z>>2]|0)+(c[q>>2]|0)>>0]|0)==34)break;c[q>>2]=(c[q>>2]|0)+1}c[c[j>>2]>>2]=c[q>>2];c[n>>2]=zM(c[k>>2]|0,c[(c[x>>2]|0)+4>>2]|0,c[z>>2]|0,c[q>>2]|0,o)|0;if(c[n>>2]|0){z=c[p>>2]|0;A=c[i>>2]|0;c[A>>2]=z;A=c[n>>2]|0;l=B;return A|0}c[s>>2]=0;c[t>>2]=0;c[u>>2]=0;c[v>>2]=0;c[n>>2]=sb[c[(c[m>>2]|0)+20>>2]&255](c[o>>2]|0,r,s,t,u,v)|0;if(c[n>>2]|0){if((c[q>>2]|0)!=0&(c[n>>2]|0)==101)c[n>>2]=0}else{c[w>>2]=144+(c[s>>2]|0);c[p>>2]=vO(c[w>>2]|0)|0;a:do if(c[p>>2]|0){c[c[p>>2]>>2]=5;c[(c[p>>2]|0)+20>>2]=(c[p>>2]|0)+48;c[(c[(c[p>>2]|0)+20>>2]|0)+64>>2]=1;c[(c[(c[p>>2]|0)+20>>2]|0)+68>>2]=c[y>>2];c[(c[(c[p>>2]|0)+20>>2]|0)+72+4>>2]=c[s>>2];c[(c[(c[p>>2]|0)+20>>2]|0)+72>>2]=(c[(c[p>>2]|0)+20>>2]|0)+96;MR(c[(c[(c[p>>2]|0)+20>>2]|0)+72>>2]|0,c[r>>2]|0,c[s>>2]|0)|0;if((c[u>>2]|0)<(c[A>>2]|0)?(a[(c[z>>2]|0)+(c[u>>2]|0)>>0]|0)==42:0){c[(c[(c[p>>2]|0)+20>>2]|0)+72+8>>2]=1;c[u>>2]=(c[u>>2]|0)+1}while(1){if(!((c[t>>2]|0)>0?(c[(c[x>>2]|0)+12>>2]|0)!=0:0))break a;if((a[(c[z>>2]|0)+((c[t>>2]|0)-1)>>0]|0)!=94)break a;c[(c[(c[p>>2]|0)+20>>2]|0)+72+12>>2]=1;c[t>>2]=(c[t>>2]|0)+-1}}else c[n>>2]=7;while(0);c[c[j>>2]>>2]=c[u>>2]}tb[c[(c[m>>2]|0)+16>>2]&255](c[o>>2]|0)|0;z=c[p>>2]|0;A=c[i>>2]|0;c[A>>2]=z;A=c[n>>2]|0;l=B;return A|0}function BO(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;c[e>>2]=Df(c[d>>2]|0,c[g>>2]|0)|0;if(c[e>>2]|0){g=c[e>>2]|0;l=f;return g|0}Kd(c[d>>2]|0);g=c[e>>2]|0;l=f;return g|0}function CO(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;DO(c[(c[d>>2]|0)+20>>2]|0);Kd(c[(c[d>>2]|0)+40>>2]|0);Kd(c[d>>2]|0);l=b;return}function DO(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;if(!(c[d>>2]|0)){l=f;return}Kd(c[c[d>>2]>>2]|0);TL(c[d>>2]|0);a=c[d>>2]|0;b=a+40|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[e>>2]=0;while(1){if((c[e>>2]|0)>=(c[(c[d>>2]|0)+64>>2]|0))break;lM(c[(c[d>>2]|0)+72+((c[e>>2]|0)*24|0)+20>>2]|0);c[(c[d>>2]|0)+72+((c[e>>2]|0)*24|0)+20>>2]=0;c[e>>2]=(c[e>>2]|0)+1}l=f;return}function EO(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+24>>2];while(1){if(!(c[d>>2]|0))break;c[e>>2]=c[(c[d>>2]|0)+8>>2];iK(c[(c[d>>2]|0)+12>>2]|0);Kd(c[d>>2]|0);c[d>>2]=c[e>>2]}c[(c[b>>2]|0)+24>>2]=0;l=f;return}function FO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+8|0;f=g;c[e>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;if((LI()|0)<3008002){l=g;return}b=f;d=c[b+4>>2]|0;f=(c[e>>2]|0)+48|0;c[f>>2]=c[b>>2];c[f+4>>2]=d;l=g;return}function GO(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if((LI()|0)<3008012){l=d;return}b=(c[b>>2]|0)+56|0;c[b>>2]=c[b>>2]|1;l=d;return}function HO(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,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d(c[w>>2]|0)|0}if(c[V>>2]|0)GR(c[V>>2]|0,0,c[w>>2]|0)|0;do if((c[N>>2]|0)!=0&(c[V>>2]|0)!=0){c[G>>2]=3;while(1){if(c[fa>>2]|0)break;if((c[G>>2]|0)>=(c[j>>2]|0))break;c[k>>2]=c[(c[E>>2]|0)+(c[G>>2]<<2)>>2];if(((!(c[ga>>2]|0)?(lQ(c[k>>2]|0)|0)>>>0>8:0)?0==(Zc(c[k>>2]|0,43021,8)|0):0)?0==(IO(a[(c[k>>2]|0)+8>>0]|0)|0):0)c[fa>>2]=JO(c[v>>2]|0,(c[k>>2]|0)+9|0,ga,c[F>>2]|0)|0;else u=15;do if((u|0)==15){u=0;if(c[M>>2]|0?KO(c[k>>2]|0,m,n)|0:0){b=o;d=6624;e=b+64|0;do{c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}while((b|0)<(e|0));if(!(c[n>>2]|0)){c[fa>>2]=7;break}c[p>>2]=0;while(1){if((c[p>>2]|0)>=8)break;c[q>>2]=o+(c[p>>2]<<3);if((c[m>>2]|0)==(c[(c[q>>2]|0)+4>>2]|0)?(Zc(c[k>>2]|0,c[c[q>>2]>>2]|0,c[(c[q>>2]|0)+4>>2]|0)|0)==0:0)break;c[p>>2]=(c[p>>2]|0)+1}a:do if((c[p>>2]|0)==8){ia=c[F>>2]|0;c[r>>2]=c[k>>2];DJ(ia,43030,r);c[fa>>2]=1}else switch(c[p>>2]|0){case 0:{if(!((lQ(c[n>>2]|0)|0)==4?!(Zc(c[n>>2]|0,39536,4)|0):0)){ia=c[F>>2]|0;c[t>>2]=c[n>>2];DJ(ia,43057,t);c[fa>>2]=1}c[y>>2]=1;break a}case 1:{Kd(c[Q>>2]|0);c[Q>>2]=c[n>>2];c[n>>2]=0;break a}case 2:{Kd(c[R>>2]|0);c[R>>2]=c[n>>2];c[n>>2]=0;break a}case 3:{Kd(c[S>>2]|0);c[S>>2]=c[n>>2];c[n>>2]=0;break a}case 4:{if(!((lQ(c[n>>2]|0)|0)==3?!(Zc(c[n>>2]|0,43084,3)|0):0))u=36;do if((u|0)==36){u=0;if((lQ(c[n>>2]|0)|0)==4?(Zc(c[n>>2]|0,29487,4)|0)==0:0)break;ia=c[F>>2]|0;c[s>>2]=c[n>>2];DJ(ia,43088,s);c[fa>>2]=1}while(0);if((a[c[n>>2]>>0]|0)==100)b=1;else b=(a[c[n>>2]>>0]|0)==68;c[z>>2]=b&1;break a}case 5:{Kd(c[T>>2]|0);c[T>>2]=c[n>>2];c[n>>2]=0;break a}case 6:{Kd(c[U>>2]|0);c[U>>2]=c[n>>2];c[n>>2]=0;break a}case 7:{h=c[n>>2]|0;i=c[V>>2]|0;ia=c[W>>2]|0;c[W>>2]=ia+1;c[i+(ia<<2)>>2]=h;c[n>>2]=0;break a}default:break a}while(0);Kd(c[n>>2]|0);break}h=(lQ(c[k>>2]|0)|0)+1|0;c[x>>2]=(c[x>>2]|0)+h;h=c[k>>2]|0;i=c[N>>2]|0;ia=c[I>>2]|0;c[I>>2]=ia+1;c[i+(ia<<2)>>2]=h}while(0);c[G>>2]=(c[G>>2]|0)+1}b:do if(((c[fa>>2]|0)==0&(c[T>>2]|0)!=0?(Kd(c[R>>2]|0),Kd(c[S>>2]|0),c[R>>2]=0,c[S>>2]=0,(c[I>>2]|0)==0):0)?(Kd(c[N>>2]|0),c[N>>2]=0,c[fa>>2]=LO(c[C>>2]|0,c[(c[E>>2]|0)+4>>2]|0,c[T>>2]|0,N,I,x,c[F>>2]|0)|0,(c[fa>>2]|0)==0&(c[U>>2]|0)!=0):0){c[A>>2]=0;while(1){if((c[A>>2]|0)>=(c[I>>2]|0))break b;ia=(uk(c[U>>2]|0,c[(c[N>>2]|0)+(c[A>>2]<<2)>>2]|0)|0)==0;b=c[A>>2]|0;if(ia)break;c[A>>2]=b+1}c[B>>2]=b;while(1){if((c[B>>2]|0)>=(c[I>>2]|0))break;c[(c[N>>2]|0)+(c[B>>2]<<2)>>2]=c[(c[N>>2]|0)+((c[B>>2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]>>2]=b;ia=c[fa>>2]|0;l=ha;return ia|0}if(b|0){QJ(c[ea>>2]|0)|0;ia=c[fa>>2]|0;l=ha;return ia|0}if(!(c[ga>>2]|0)){ia=c[fa>>2]|0;l=ha;return ia|0}tb[c[(c[c[ga>>2]>>2]|0)+8>>2]&255](c[ga>>2]|0)|0;ia=c[fa>>2]|0;l=ha;return ia|0}function IO(b){b=b|0;var c=0,d=0;d=l;l=l+16|0;c=d;a[c>>0]=b;if(a[c>>0]&128|0){c=1;c=c&1;l=d;return c|0}c=(a[43839+(a[c>>0]|0)>>0]|0)!=0;c=c&1;l=d;return c|0}function JO(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;y=l;l=l+80|0;w=y+16|0;v=y+8|0;z=y;q=y+76|0;r=y+72|0;A=y+68|0;s=y+64|0;t=y+60|0;u=y+56|0;g=y+52|0;h=y+48|0;i=y+44|0;j=y+40|0;k=y+36|0;m=y+32|0;n=y+28|0;o=y+24|0;p=y+20|0;c[r>>2]=b;c[A>>2]=d;c[s>>2]=e;c[t>>2]=f;c[g>>2]=c[A>>2];c[h>>2]=0;c[z>>2]=c[A>>2];c[i>>2]=Ue(18130,z)|0;if(!(c[i>>2]|0)){c[q>>2]=7;A=c[q>>2]|0;l=y;return A|0}A=c[i>>2]|0;c[j>>2]=A+(lQ(c[i>>2]|0)|0);c[g>>2]=NO(c[i>>2]|0,h)|0;if(!(c[g>>2]|0))c[g>>2]=c[i>>2];a[(c[g>>2]|0)+(c[h>>2]|0)>>0]=0;MJ(c[g>>2]|0);z=c[r>>2]|0;A=c[g>>2]|0;c[k>>2]=CJ(z,A,(lQ(c[g>>2]|0)|0)+1|0)|0;if(c[k>>2]|0){c[m>>2]=0;c[n>>2]=0;c[g>>2]=(c[g>>2]|0)+((c[h>>2]|0)+1);while(1){if((c[g>>2]|0)>>>0>=(c[j>>2]|0)>>>0)break;A=NO(c[g>>2]|0,h)|0;c[g>>2]=A;if(!A)break;c[o>>2]=(c[n>>2]|0)+1<<2;c[p>>2]=Df(c[m>>2]|0,c[o>>2]|0)|0;if(!(c[p>>2]|0)){x=11;break}c[m>>2]=c[p>>2];v=c[g>>2]|0;z=c[m>>2]|0;A=c[n>>2]|0;c[n>>2]=A+1;c[z+(A<<2)>>2]=v;a[(c[g>>2]|0)+(c[h>>2]|0)>>0]=0;MJ(c[g>>2]|0);c[g>>2]=(c[g>>2]|0)+((c[h>>2]|0)+1)}if((x|0)==11){Kd(c[i>>2]|0);Kd(c[m>>2]|0);c[q>>2]=7;A=c[q>>2]|0;l=y;return A|0}c[u>>2]=ob[c[(c[k>>2]|0)+4>>2]&255](c[n>>2]|0,c[m>>2]|0,c[s>>2]|0)|0;if(c[u>>2]|0)DJ(c[t>>2]|0,43821,w);else c[c[c[s>>2]>>2]>>2]=c[k>>2];Kd(c[m>>2]|0)}else{A=c[t>>2]|0;c[v>>2]=c[g>>2];DJ(A,39610,v);c[u>>2]=1}Kd(c[i>>2]|0);c[q>>2]=c[u>>2];A=c[q>>2]|0;l=y;return A|0}function KO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;m=o;f=o+24|0;g=o+20|0;h=o+16|0;i=o+12|0;j=o+8|0;k=o+4|0;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[k>>2]=c[g>>2];while(1){b=c[k>>2]|0;if((a[c[k>>2]>>0]|0)==61)break;if(!(a[b>>0]|0)){n=4;break}c[k>>2]=(c[k>>2]|0)+1}if((n|0)==4){c[f>>2]=0;n=c[f>>2]|0;l=o;return n|0}c[c[h>>2]>>2]=b-(c[g>>2]|0);c[m>>2]=(c[k>>2]|0)+1;c[j>>2]=Ue(18130,m)|0;if(c[j>>2]|0)MJ(c[j>>2]|0);c[c[i>>2]>>2]=c[j>>2];c[f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x>>2]=(lQ(c[w>>2]|0)|0)+1;MR(c[v>>2]|0,c[w>>2]|0,c[x>>2]|0)|0;c[(c[q>>2]|0)+(c[t>>2]<<2)>>2]=c[v>>2];c[v>>2]=(c[v>>2]|0)+(c[x>>2]|0);c[t>>2]=(c[t>>2]|0)+1}}while(0);Qq(c[p>>2]|0)|0;c[c[j>>2]>>2]=c[s>>2];c[c[k>>2]>>2]=c[r>>2];c[c[i>>2]>>2]=c[q>>2];D=c[n>>2]|0;l=A;return D|0}function MO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;i=q+36|0;j=q+32|0;k=q+28|0;m=q+24|0;n=q+20|0;o=q+16|0;p=q+12|0;f=q+8|0;g=q+4|0;h=q;c[j>>2]=b;c[k>>2]=d;c[m>>2]=e;c[o>>2]=1;a:do if(c[j>>2]|0?a[c[j>>2]>>0]|0:0){c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=c[j>>2];while(1){if(!(a[c[p>>2]>>0]|0))break a;if((a[c[p>>2]>>0]|0)==44)c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+1}}while(0);c[n>>2]=Yd((c[o>>2]|0)*24|0)|0;c[c[m>>2]>>2]=c[n>>2];if(!(c[n>>2]|0)){c[i>>2]=7;p=c[i>>2]|0;l=q;return p|0}GR(c[n>>2]|0,0,(c[o>>2]|0)*24|0)|0;b:do if(c[j>>2]|0){c[f>>2]=c[j>>2];c[g>>2]=1;while(1){if((c[g>>2]|0)>=(c[o>>2]|0))break b;c[h>>2]=0;if(VO(f,h)|0)break;if(!(c[h>>2]|0)){c[o>>2]=(c[o>>2]|0)+-1;c[g>>2]=(c[g>>2]|0)+-1}else c[(c[n>>2]|0)+((c[g>>2]|0)*24|0)>>2]=c[h>>2];c[f>>2]=(c[f>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+1}c[i>>2]=1;p=c[i>>2]|0;l=q;return p|0}while(0);c[c[k>>2]>>2]=c[o>>2];c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}function NO(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;f=j+16|0;k=j+12|0;g=j+8|0;h=j+4|0;i=j;e=j+20|0;c[k>>2]=b;c[g>>2]=d;c[i>>2]=0;c[h>>2]=c[k>>2];a:while(1){if(c[i>>2]|0){b=21;break}a[e>>0]=a[c[h>>2]>>0]|0;switch(a[e>>0]|0){case 0:{b=4;break a}case 96:case 34:case 39:{c[i>>2]=c[h>>2];while(1){k=(c[i>>2]|0)+1|0;c[i>>2]=k;if(!(a[k>>0]|0))continue a;if((a[c[i>>2]>>0]|0)!=(a[e>>0]|0))continue;k=(c[i>>2]|0)+1|0;c[i>>2]=k;if((a[k>>0]|0)!=(a[e>>0]|0))continue a}}case 91:{c[i>>2]=(c[h>>2]|0)+1;while(1){if(a[c[i>>2]>>0]|0)d=(a[c[i>>2]>>0]|0)!=93;else d=0;b=c[i>>2]|0;if(!d)break;c[i>>2]=b+1}if(!(a[b>>0]|0))continue a;c[i>>2]=(c[i>>2]|0)+1;continue a}default:{k=(IO(a[c[h>>2]>>0]|0)|0)!=0;b=(c[h>>2]|0)+1|0;if(!k){c[h>>2]=b;continue a}c[i>>2]=b;while(1){if(!(IO(a[c[i>>2]>>0]|0)|0))continue a;c[i>>2]=(c[i>>2]|0)+1}}}}if((b|0)==4){c[f>>2]=0;k=c[f>>2]|0;l=j;return k|0}else if((b|0)==21){c[c[g>>2]>>2]=(c[i>>2]|0)-(c[h>>2]|0);c[f>>2]=c[h>>2];k=c[f>>2]|0;l=j;return k|0}return 0}function OO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+96|0;s=t+56|0;n=t+48|0;m=t+40|0;p=t+32|0;o=t+24|0;k=t+8|0;j=t;q=t+92|0;e=t+88|0;f=t+84|0;r=t+80|0;g=t+76|0;h=t+72|0;i=t+68|0;c[q>>2]=a;c[e>>2]=b;c[f>>2]=d;c[r>>2]=0;c[g>>2]=0;if(c[(c[q>>2]|0)+40>>2]|0){UO(c[f>>2]|0,r,22891,p);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[(c[q>>2]|0)+24>>2]|0))break;p=c[f>>2]|0;c[m>>2]=c[(c[(c[q>>2]|0)+28>>2]|0)+(c[i>>2]<<2)>>2];UO(p,r,43731,m);c[i>>2]=(c[i>>2]|0)+1}if(c[(c[q>>2]|0)+44>>2]|0){p=c[f>>2]|0;c[n>>2]=c[(c[q>>2]|0)+44>>2];UO(p,r,43717,n)}}else{if(c[e>>2]|0){p=TO(c[e>>2]|0)|0;c[h>>2]=p;c[g>>2]=p}else c[h>>2]=47636;UO(c[f>>2]|0,r,43696,j);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[(c[q>>2]|0)+24>>2]|0))break;p=c[f>>2]|0;m=c[i>>2]|0;n=c[(c[(c[q>>2]|0)+28>>2]|0)+(c[i>>2]<<2)>>2]|0;c[k>>2]=c[h>>2];c[k+4>>2]=m;c[k+8>>2]=n;UO(p,r,43702,k);c[i>>2]=(c[i>>2]|0)+1}if(c[(c[q>>2]|0)+44>>2]|0){p=c[f>>2]|0;c[o>>2]=43724;UO(p,r,43717,o)}Kd(c[g>>2]|0)}a=c[f>>2]|0;b=c[(c[q>>2]|0)+16>>2]|0;d=c[q>>2]|0;if(c[(c[q>>2]|0)+40>>2]|0){o=c[d+40>>2]|0;p=c[q>>2]|0;p=p+40|0;p=c[p>>2]|0;p=(p|0)!=0;p=p?47636:43740;c[s>>2]=b;q=s+4|0;c[q>>2]=o;q=s+8|0;c[q>>2]=p;UO(a,r,43749,s);s=c[r>>2]|0;l=t;return s|0}else{o=c[d+20>>2]|0;p=c[q>>2]|0;p=p+40|0;p=c[p>>2]|0;p=(p|0)!=0;p=p?47636:43740;c[s>>2]=b;q=s+4|0;c[q>>2]=o;q=s+8|0;c[q>>2]=p;UO(a,r,43749,s);s=c[r>>2]|0;l=t;return s|0}return 0}function PO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o+16|0;m=o+8|0;e=o+44|0;f=o+40|0;g=o+36|0;h=o+32|0;i=o+28|0;j=o+24|0;k=o+20|0;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;c[i>>2]=0;if(c[f>>2]|0){f=TO(c[f>>2]|0)|0;c[j>>2]=f;c[i>>2]=f}else c[j>>2]=47636;UO(c[g>>2]|0,h,24149,o);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[e>>2]|0)+24>>2]|0))break;f=c[g>>2]|0;c[m>>2]=c[j>>2];UO(f,h,43685,m);c[k>>2]=(c[k>>2]|0)+1}if(!(c[(c[e>>2]|0)+44>>2]|0)){n=c[i>>2]|0;Kd(n);n=c[h>>2]|0;l=o;return n|0}UO(c[g>>2]|0,h,43692,n);n=c[i>>2]|0;Kd(n);n=c[h>>2]|0;l=o;return n|0}function QO(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;r=l;l=l+112|0;p=r+64|0;n=r+56|0;m=r+48|0;k=r+32|0;q=r+24|0;o=r+8|0;d=r+96|0;e=r+92|0;f=r+88|0;g=r+84|0;h=r+80|0;i=r+76|0;j=r+72|0;c[d>>2]=b;c[e>>2]=0;c[g>>2]=c[(c[d>>2]|0)+12>>2];if(!(c[(c[d>>2]|0)+40>>2]|0)){c[h>>2]=c[(c[d>>2]|0)+44>>2];c[i>>2]=Ue(43310,r)|0;c[f>>2]=0;while(1){if(!(c[i>>2]|0))break;if((c[f>>2]|0)>=(c[(c[d>>2]|0)+24>>2]|0))break;c[j>>2]=c[(c[(c[d>>2]|0)+28>>2]|0)+(c[f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hI(c[h>>2]|0,0)|0;c[(c[e>>2]|0)+236>>2]=i;c[f>>2]=Qq(c[h>>2]|0)|0;break}if((c[f>>2]|0)==23){c[(c[e>>2]|0)+236>>2]=1024;c[f>>2]=0}}else c[f>>2]=7;while(0);Kd(c[g>>2]|0);c[c[d>>2]>>2]=c[f>>2];l=j;return}function SO(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+64|0;o=p+24|0;n=p+16|0;e=p+8|0;d=p;f=p+60|0;g=p+56|0;h=p+52|0;i=p+48|0;j=p+44|0;k=p+40|0;m=p+36|0;c[f>>2]=a;c[g>>2]=b;if(c[c[f>>2]>>2]|0){l=p;return}if(c[(c[g>>2]|0)+44>>2]|0)a=c[(c[g>>2]|0)+44>>2]|0;else a=43215;c[m>>2]=a;b=c[(c[g>>2]|0)+12>>2]|0;c[d>>2]=1;KI(b,1,d)|0;c[e>>2]=c[c[(c[g>>2]|0)+28>>2]>>2];c[k>>2]=Ue(43224,e)|0;c[h>>2]=1;while(1){if(c[k>>2]|0)d=(c[h>>2]|0)<(c[(c[g>>2]|0)+24>>2]|0);else d=0;a=c[k>>2]|0;b=c[g>>2]|0;if(!d)break;e=c[(c[b+28>>2]|0)+(c[h>>2]<<2)>>2]|0;c[n>>2]=a;c[n+4>>2]=e;c[k>>2]=Ue(43229,n)|0;c[h>>2]=(c[h>>2]|0)+1}h=c[b+20>>2]|0;n=c[m>>2]|0;c[o>>2]=a;c[o+4>>2]=h;c[o+8>>2]=n;c[j>>2]=Ue(43236,o)|0;if((c[k>>2]|0)!=0&(c[j>>2]|0)!=0)c[i>>2]=II(c[(c[g>>2]|0)+12>>2]|0,c[j>>2]|0)|0;else c[i>>2]=7;Kd(c[j>>2]|0);Kd(c[k>>2]|0);c[c[f>>2]>>2]=c[i>>2];l=p;return}function TO(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+32|0;d=h+16|0;i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;c[k+8>>2]=1e7;c[i>>2]=0;c[h>>2]=c[c[f>>2]>>2];while(1){if((a[c[h>>2]>>0]|0)<48)break;if((a[c[h>>2]>>0]|0)>57)break;c[i>>2]=((c[i>>2]|0)*10|0)+((a[c[h>>2]>>0]|0)-48);if((c[i>>2]|0)>1e7){j=5;break}c[h>>2]=(c[h>>2]|0)+1}if((j|0)==5)c[i>>2]=0;if((c[h>>2]|0)==(c[c[f>>2]>>2]|0)){c[e>>2]=1;j=c[e>>2]|0;l=k;return j|0}else{c[c[g>>2]>>2]=c[i>>2];c[c[f>>2]>>2]=c[h>>2];c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}return 0}function WO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+48|0;o=p;h=p+40|0;q=p+36|0;i=p+32|0;j=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;e=p+12|0;f=p+8|0;g=p+4|0;c[h>>2]=a;c[q>>2]=b;c[i>>2]=d;c[k>>2]=0;c[j>>2]=vh(c[h>>2]|0)|0;c[m>>2]=wh(c[c[i>>2]>>2]|0)|0;c[n>>2]=(xh(c[c[i>>2]>>2]|0)|0)+1;do if((c[q>>2]|0)==2){if(!(XO(c[h>>2]|0)|0)){yh(c[h>>2]|0,43990,-1);l=p;return}c[f>>2]=xh(c[(c[i>>2]|0)+4>>2]|0)|0;if((c[m>>2]|0)==0|(c[f>>2]|0)!=4){yh(c[h>>2]|0,43967,-1);l=p;return}else{c[k>>2]=c[(wi(c[(c[i>>2]|0)+4>>2]|0)|0)>>2];c[e>>2]=jJ(c[j>>2]|0,c[m>>2]|0,c[n>>2]|0,c[k>>2]|0)|0;if((c[e>>2]|0)!=(c[k>>2]|0))break;yh(c[h>>2]|0,19371,-1);break}}else{if(c[m>>2]|0)c[k>>2]=CJ(c[j>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;if(!(c[k>>2]|0)){c[o>>2]=c[m>>2];c[g>>2]=Ue(39610,o)|0;yh(c[h>>2]|0,c[g>>2]|0,-1);Kd(c[g>>2]|0);l=p;return}}while(0);Ti(c[h>>2]|0,k,4,-1);l=p;return}function XO(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;d=l;l=l+32|0;e=d;g=d+16|0;f=d+12|0;b=d+8|0;c[g>>2]=a;c[f>>2]=uh(c[g>>2]|0)|0;c[b>>2]=0;a=c[f>>2]|0;c[e>>2]=-1;c[e+4>>2]=b;MI(a,1004,e)|0;l=d;return c[b>>2]|0}function YO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;if(c[(c[g>>2]|0)+4>>2]|0)b=c[(c[g>>2]|0)+4>>2]|0;else b=(c[f>>2]|0)+8|0;c[b>>2]=c[c[g>>2]>>2];if(c[c[g>>2]>>2]|0)c[(c[c[g>>2]>>2]|0)+4>>2]=c[(c[g>>2]|0)+4>>2];c[i>>2]=(c[(c[f>>2]|0)+16>>2]|0)+(c[h>>2]<<3);if((c[(c[i>>2]|0)+4>>2]|0)==(c[g>>2]|0))c[(c[i>>2]|0)+4>>2]=c[c[g>>2]>>2];h=c[i>>2]|0;c[h>>2]=(c[h>>2]|0)+-1;if((c[c[i>>2]>>2]|0)<=0)c[(c[i>>2]|0)+4>>2]=0;if(a[(c[f>>2]|0)+1>>0]|0?c[(c[g>>2]|0)+12>>2]|0:0)oJ(c[(c[g>>2]|0)+12>>2]|0);oJ(c[g>>2]|0);i=(c[f>>2]|0)+4|0;c[i>>2]=(c[i>>2]|0)+-1;if((c[(c[f>>2]|0)+4>>2]|0)>0){l=j;return}nJ(c[f>>2]|0);l=j;return}function ZO(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;e=n+28|0;f=n+24|0;g=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c[h>>2]=e;g=c[g>>2]|0;h=c[f>>2]|0;h=h+4|0;c[h>>2]=g;l=i;return}c[c[g>>2]>>2]=c[h>>2];c[(c[g>>2]|0)+4>>2]=c[(c[h>>2]|0)+4>>2];if(c[(c[h>>2]|0)+4>>2]|0)a=c[(c[h>>2]|0)+4>>2]|0;else a=(c[e>>2]|0)+8|0;c[a>>2]=c[g>>2];c[(c[h>>2]|0)+4>>2]=c[g>>2];h=c[f>>2]|0;e=c[h>>2]|0;e=e+1|0;c[h>>2]=e;g=c[g>>2]|0;h=c[f>>2]|0;h=h+4|0;c[h>>2]=g;l=i;return}function aP(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+32|0;e=h+16|0;f=h+4|0;g=h;c[h+12>>2]=a;c[h+8>>2]=b;c[f>>2]=d;c[g>>2]=Yd(4)|0;if(!(c[g>>2]|0)){c[e>>2]=7;g=c[e>>2]|0;l=h;return g|0}else{c[c[g>>2]>>2]=0;c[c[f>>2]>>2]=c[g>>2];c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}return 0}function bP(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Kd(c[d>>2]|0);l=b;return 0}function cP(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;h=k+20|0;f=k+12|0;g=k+8|0;i=k+4|0;j=k;c[k+16>>2]=a;c[f>>2]=b;c[g>>2]=d;c[i>>2]=e;c[j>>2]=Yd(28)|0;if(!(c[j>>2]|0)){c[h>>2]=7;j=c[h>>2]|0;l=k;return j|0}c[(c[j>>2]|0)+4>>2]=c[f>>2];do if(c[f>>2]|0)if((c[g>>2]|0)<0){a=lQ(c[f>>2]|0)|0;b=c[j>>2]|0;break}else{a=c[g>>2]|0;b=c[j>>2]|0;break}else{a=0;b=c[j>>2]|0}while(0);c[b+8>>2]=a;c[(c[j>>2]|0)+12>>2]=0;c[(c[j>>2]|0)+16>>2]=0;c[(c[j>>2]|0)+20>>2]=0;c[(c[j>>2]|0)+24>>2]=0;c[c[i>>2]>>2]=c[j>>2];c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}function dP(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];Kd(c[(c[d>>2]|0)+20>>2]|0);Kd(c[d>>2]|0);l=b;return 0}function eP(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;w=l;l=l+64|0;s=w+48|0;x=w+44|0;t=w+40|0;u=w+36|0;i=w+32|0;j=w+28|0;k=w+24|0;m=w+20|0;n=w+16|0;o=w+12|0;p=w+8|0;q=w+4|0;r=w;c[x>>2]=b;c[t>>2]=d;c[u>>2]=e;c[i>>2]=f;c[j>>2]=g;c[k>>2]=h;c[m>>2]=c[x>>2];c[n>>2]=c[(c[m>>2]|0)+4>>2];do{if((c[(c[m>>2]|0)+12>>2]|0)>=(c[(c[m>>2]|0)+8>>2]|0)){v=23;break}while(1){if((c[(c[m>>2]|0)+12>>2]|0)<(c[(c[m>>2]|0)+8>>2]|0)?(x=a[(c[n>>2]|0)+(c[(c[m>>2]|0)+12>>2]|0)>>0]|0,c[p>>2]=x,(x&128|0)==0):0)if((c[p>>2]|0)<48)b=1;else b=(a[44012+((c[p>>2]|0)-48)>>0]|0)!=0^1;else b=0;d=(c[m>>2]|0)+12|0;e=c[d>>2]|0;if(!b)break;c[d>>2]=e+1}c[o>>2]=e;while(1){if((c[(c[m>>2]|0)+12>>2]|0)<(c[(c[m>>2]|0)+8>>2]|0)){x=a[(c[n>>2]|0)+(c[(c[m>>2]|0)+12>>2]|0)>>0]|0;c[p>>2]=x;if(!(x&128))if((c[p>>2]|0)<48)b=1;else b=(a[44012+((c[p>>2]|0)-48)>>0]|0)!=0^1;else b=0;b=b^1}else b=0;d=(c[m>>2]|0)+12|0;e=c[d>>2]|0;if(!b)break;c[d>>2]=e+1}}while((e|0)<=(c[o>>2]|0));if((v|0)==23){c[s>>2]=101;x=c[s>>2]|0;l=w;return x|0}c[q>>2]=(c[(c[m>>2]|0)+12>>2]|0)-(c[o>>2]|0);do if((c[q>>2]|0)>(c[(c[m>>2]|0)+24>>2]|0)){c[(c[m>>2]|0)+24>>2]=(c[q>>2]|0)+20;c[r>>2]=Df(c[(c[m>>2]|0)+20>>2]|0,c[(c[m>>2]|0)+24>>2]|0)|0;if(c[r>>2]|0){c[(c[m>>2]|0)+20>>2]=c[r>>2];break}c[s>>2]=7;x=c[s>>2]|0;l=w;return x|0}while(0);fP((c[n>>2]|0)+(c[o>>2]|0)|0,c[q>>2]|0,c[(c[m>>2]|0)+20>>2]|0,c[u>>2]|0);c[c[t>>2]>>2]=c[(c[m>>2]|0)+20>>2];c[c[i>>2]>>2]=c[o>>2];c[c[j>>2]>>2]=c[(c[m>>2]|0)+12>>2];v=(c[m>>2]|0)+16|0;x=c[v>>2]|0;c[v>>2]=x+1;c[c[k>>2]>>2]=x;c[s>>2]=0;x=c[s>>2]|0;l=w;return x|0}function fP(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+64|0;j=s+28|0;k=s+24|0;q=s+20|0;o=s+16|0;r=s+12|0;m=s+8|0;g=s+36|0;p=s+4|0;h=s;i=s+32|0;c[j>>2]=b;c[k>>2]=d;c[q>>2]=e;c[o>>2]=f;if((c[k>>2]|0)<3|(c[k>>2]|0)>=21){gP(c[j>>2]|0,c[k>>2]|0,c[q>>2]|0,c[o>>2]|0);l=s;return}c[r>>2]=0;c[m>>2]=22;while(1){if((c[r>>2]|0)>=(c[k>>2]|0))break;a[i>>0]=a[(c[j>>2]|0)+(c[r>>2]|0)>>0]|0;if((a[i>>0]|0)>=65?(a[i>>0]|0)<=90:0){b=(a[i>>0]|0)+97-65&255;d=c[m>>2]|0}else{if((a[i>>0]|0)<97){n=11;break}if((a[i>>0]|0)>122){n=11;break}b=a[i>>0]|0;d=c[m>>2]|0}a[g+d>>0]=b;c[r>>2]=(c[r>>2]|0)+1;c[m>>2]=(c[m>>2]|0)+-1}if((n|0)==11){gP(c[j>>2]|0,c[k>>2]|0,c[q>>2]|0,c[o>>2]|0);l=s;return}n=g+23|0;a[n>>0]=0;a[n+1>>0]=0;a[n+2>>0]=0;a[n+3>>0]=0;a[n+4>>0]=0;c[p>>2]=g+((c[m>>2]|0)+1);if((((a[c[p>>2]>>0]|0)==115?(hP(p,44092,44097,0)|0)==0:0)?(hP(p,44100,44104,0)|0)==0:0)?(hP(p,44097,44097,0)|0)==0:0)c[p>>2]=(c[p>>2]|0)+1;c[h>>2]=c[p>>2];do if(!(hP(p,44106,44110,172)|0)){if((hP(p,44113,47636,173)|0)==0?(hP(p,44117,47636,173)|0)==0:0)break;if((((c[p>>2]|0)!=(c[h>>2]|0)?(hP(p,44120,44123,0)|0)==0:0)?(hP(p,44127,44130,0)|0)==0:0)?(hP(p,44134,44137,0)|0)==0:0){if(((kP(c[p>>2]|0)|0?(a[c[p>>2]>>0]|0)!=108:0)?(a[c[p>>2]>>0]|0)!=115:0)?(a[c[p>>2]>>0]|0)!=122:0){c[p>>2]=(c[p>>2]|0)+1;break}if(lP(c[p>>2]|0)|0?mP(c[p>>2]|0)|0:0){n=(c[p>>2]|0)+-1|0;c[p>>2]=n;a[n>>0]=101}}}while(0);if((a[c[p>>2]>>0]|0)==121?jP((c[p>>2]|0)+1|0)|0:0)a[c[p>>2]>>0]=105;switch(a[(c[p>>2]|0)+1>>0]|0){case 97:{if(!(hP(p,44141,44123,172)|0))hP(p,44149,44156,172)|0;break}case 99:{if(!(hP(p,44161,44166,172)|0))hP(p,44171,44176,172)|0;break}case 101:{hP(p,44181,44137,172)|0;break}case 103:{hP(p,44186,29149,172)|0;break}case 108:{if((((hP(p,44191,44130,172)|0)==0?(hP(p,44195,44200,172)|0)==0:0)?(hP(p,44203,44209,172)|0)==0:0)?(hP(p,44213,44217,172)|0)==0:0)hP(p,44219,44225,172)|0;break}case 111:{if((hP(p,44229,44137,172)|0)==0?(hP(p,44237,44123,172)|0)==0:0)hP(p,44243,44123,172)|0;break}case 115:{if(((hP(p,44248,44200,172)|0)==0?(hP(p,44254,44262,172)|0)==0:0)?(hP(p,44266,44274,172)|0)==0:0)hP(p,44278,44225,172)|0;break}case 116:{if((hP(p,44286,44200,172)|0)==0?(hP(p,44292,44262,172)|0)==0:0)hP(p,44298,44130,172)|0;break}default:{}}switch(a[c[p>>2]>>0]|0){case 101:{if((hP(p,44305,44311,172)|0)==0?(hP(p,44314,47636,172)|0)==0:0)hP(p,44320,44200,172)|0;break}case 105:{hP(p,44326,44311,172)|0;break}case 108:{if(!(hP(p,44332,44311,172)|0))hP(p,44337,47636,172)|0;break}case 115:{hP(p,44341,47636,172)|0;break}default:{}}a:do switch(a[(c[p>>2]|0)+1>>0]|0){case 97:{if((a[c[p>>2]>>0]|0)==108?nP((c[p>>2]|0)+2|0)|0:0)c[p>>2]=(c[p>>2]|0)+2;break}case 99:{if((a[c[p>>2]>>0]|0)==101?(a[(c[p>>2]|0)+2>>0]|0)==110:0){if((a[(c[p>>2]|0)+3>>0]|0)!=97?(a[(c[p>>2]|0)+3>>0]|0)!=101:0)break a;if(nP((c[p>>2]|0)+4|0)|0)c[p>>2]=(c[p>>2]|0)+4}break}case 101:{if((a[c[p>>2]>>0]|0)==114?nP((c[p>>2]|0)+2|0)|0:0)c[p>>2]=(c[p>>2]|0)+2;break}case 105:{if((a[c[p>>2]>>0]|0)==99?nP((c[p>>2]|0)+2|0)|0:0)c[p>>2]=(c[p>>2]|0)+2;break}case 108:{if((a[c[p>>2]>>0]|0)==101?(a[(c[p>>2]|0)+2>>0]|0)==98:0){if((a[(c[p>>2]|0)+3>>0]|0)!=97?(a[(c[p>>2]|0)+3>>0]|0)!=105:0)break a;if(nP((c[p>>2]|0)+4|0)|0)c[p>>2]=(c[p>>2]|0)+4}break}case 110:{if((a[c[p>>2]>>0]|0)==116){b=c[p>>2]|0;if((a[(c[p>>2]|0)+2>>0]|0)==97){if(!(nP(b+3|0)|0))break a;c[p>>2]=(c[p>>2]|0)+3;break a}if(((a[b+2>>0]|0)==101?(hP(p,44346,47636,174)|0)==0:0)?(hP(p,44352,47636,174)|0)==0:0)hP(p,44357,47636,174)|0}break}case 111:{b=c[p>>2]|0;if((a[c[p>>2]>>0]|0)==117){if(!(nP(b+2|0)|0))break a;c[p>>2]=(c[p>>2]|0)+2;break a}if((a[b+3>>0]|0)!=115?(a[(c[p>>2]|0)+3>>0]|0)!=116:0)break a;hP(p,44361,47636,174)|0;break}case 115:{if(((a[c[p>>2]>>0]|0)==109?(a[(c[p>>2]|0)+2>>0]|0)==105:0)?nP((c[p>>2]|0)+3|0)|0:0)c[p>>2]=(c[p>>2]|0)+3;break}case 116:{if(!(hP(p,44365,47636,174)|0))hP(p,44369,47636,174)|0;break}case 117:{if(((a[c[p>>2]>>0]|0)==115?(a[(c[p>>2]|0)+2>>0]|0)==111:0)?nP((c[p>>2]|0)+3|0)|0:0)c[p>>2]=(c[p>>2]|0)+3;break}case 122:case 118:{if(((a[c[p>>2]>>0]|0)==101?(a[(c[p>>2]|0)+2>>0]|0)==105:0)?nP((c[p>>2]|0)+3|0)|0:0)c[p>>2]=(c[p>>2]|0)+3;break}default:{}}while(0);do if((a[c[p>>2]>>0]|0)==101){n=(nP((c[p>>2]|0)+1|0)|0)!=0;b=(c[p>>2]|0)+1|0;if(n){c[p>>2]=b;break}if(lP(b)|0?(mP((c[p>>2]|0)+1|0)|0)==0:0)c[p>>2]=(c[p>>2]|0)+1}while(0);if((nP(c[p>>2]|0)|0?(a[c[p>>2]>>0]|0)==108:0)?(a[(c[p>>2]|0)+1>>0]|0)==108:0)c[p>>2]=(c[p>>2]|0)+1;b=lQ(c[p>>2]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o>>2]|0;p=m+p|0;a[p>>0]=0;o=c[o>>2]|0;p=c[n>>2]|0;c[p>>2]=o;l=q;return}function hP(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=c[c[h>>2]>>2];while(1){if(!(a[c[i>>2]>>0]|0))break;if((a[c[i>>2]>>0]|0)!=(a[c[m>>2]>>0]|0))break;c[m>>2]=(c[m>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+1}if(a[c[i>>2]>>0]|0){c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}if(c[k>>2]|0?(tb[c[k>>2]&255](c[m>>2]|0)|0)==0:0){c[g>>2]=1;m=c[g>>2]|0;l=n;return m|0}while(1){if(!(a[c[j>>2]>>0]|0))break;i=c[j>>2]|0;c[j>>2]=i+1;i=a[i>>0]|0;k=(c[m>>2]|0)+-1|0;c[m>>2]=k;a[k>>0]=i}c[c[h>>2]>>2]=c[m>>2];c[g>>2]=1;m=c[g>>2]|0;l=n;return m|0}function iP(b){b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+4|0;e=f;c[e>>2]=b;while(1){g=(oP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}while(1){g=(pP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}c[d>>2]=(a[b>>0]|0)!=0&1;g=c[d>>2]|0;l=f;return g|0}function jP(b){b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;d=e;c[d>>2]=b;while(1){f=(pP(c[d>>2]|0)|0)!=0;b=c[d>>2]|0;if(!f)break;c[d>>2]=b+1}l=e;return (a[b>>0]|0)!=0|0}function kP(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;if(!(pP(c[d>>2]|0)|0)){d=0;d=d&1;l=e;return d|0}d=(a[c[d>>2]>>0]|0)==(a[(c[d>>2]|0)+1>>0]|0);d=d&1;l=e;return d|0}function lP(b){b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+4|0;e=f;c[e>>2]=b;while(1){g=(oP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}while(1){g=(pP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}while(1){g=(oP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=1;g=c[d>>2]|0;l=f;return g|0}while(1){g=(pP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}c[d>>2]=(a[b>>0]|0)==0&1;g=c[d>>2]|0;l=f;return g|0}function mP(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;if((((pP(c[d>>2]|0)|0?(a[c[d>>2]>>0]|0)!=119:0)?(a[c[d>>2]>>0]|0)!=120:0)?(a[c[d>>2]>>0]|0)!=121:0)?oP((c[d>>2]|0)+1|0)|0:0)b=(pP((c[d>>2]|0)+2|0)|0)!=0;else b=0;l=e;return b&1|0}function nP(b){b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+4|0;e=f;c[e>>2]=b;while(1){g=(oP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}while(1){g=(pP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}while(1){g=(oP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}if(!(a[b>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=f;return g|0}while(1){g=(pP(c[e>>2]|0)|0)!=0;b=c[e>>2]|0;if(!g)break;c[e>>2]=b+1}c[d>>2]=(a[b>>0]|0)!=0&1;g=c[d>>2]|0;l=f;return g|0}function oP(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+8|0;e=h+4|0;f=h;g=h+12|0;c[e>>2]=b;a[g>>0]=a[c[e>>2]>>0]|0;if(!(a[g>>0]|0)){c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}c[f>>2]=a[44373+((a[g>>0]|0)-97)>>0];if((c[f>>2]|0)<2){c[d>>2]=1-(c[f>>2]|0);g=c[d>>2]|0;l=h;return g|0}else{c[d>>2]=pP((c[e>>2]|0)+1|0)|0;g=c[d>>2]|0;l=h;return g|0}return 0}function pP(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+8|0;d=h+4|0;e=h;f=h+12|0;c[d>>2]=b;a[f>>0]=a[c[d>>2]>>0]|0;if(!(a[f>>0]|0)){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}c[e>>2]=a[44373+((a[f>>0]|0)-97)>>0];if((c[e>>2]|0)<2){c[g>>2]=c[e>>2];g=c[g>>2]|0;l=h;return g|0}if(!(a[(c[d>>2]|0)+1>>0]|0))b=1;else b=(oP((c[d>>2]|0)+1|0)|0)!=0;c[g>>2]=b&1;g=c[g>>2]|0;l=h;return g|0}function qP(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;j=q+28|0;h=q+24|0;k=q+20|0;m=q+16|0;n=q+12|0;o=q+8|0;p=q+4|0;i=q+32|0;g=q;c[h>>2]=b;c[k>>2]=e;c[m>>2]=f;c[n>>2]=Yd(132)|0;if(!(c[n>>2]|0)){c[j>>2]=7;p=c[j>>2]|0;l=q;return p|0}GR(c[n>>2]|0,0,132)|0;a:do if((c[h>>2]|0)>1){c[p>>2]=lQ(c[(c[k>>2]|0)+4>>2]|0)|0;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[p>>2]|0))break a;a[i>>0]=a[(c[(c[k>>2]|0)+4>>2]|0)+(c[o>>2]|0)>>0]|0;b=c[n>>2]|0;if((d[i>>0]|0|0)>=128)break;a[b+4+(d[i>>0]|0)>>0]=1;c[o>>2]=(c[o>>2]|0)+1}Kd(b);c[j>>2]=1;p=c[j>>2]|0;l=q;return p|0}else{c[g>>2]=1;while(1){if((c[g>>2]|0)>=128)break a;p=(wP(c[g>>2]|0)|0)!=0^1;a[(c[n>>2]|0)+4+(c[g>>2]|0)>>0]=p?-1:0;c[g>>2]=(c[g>>2]|0)+1}}while(0);c[c[m>>2]>>2]=c[n>>2];c[j>>2]=0;p=c[j>>2]|0;l=q;return p|0}function rP(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;Kd(c[d>>2]|0);l=b;return 0}function sP(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;h=k+20|0;f=k+12|0;g=k+8|0;i=k+4|0;j=k;c[k+16>>2]=a;c[f>>2]=b;c[g>>2]=d;c[i>>2]=e;c[j>>2]=Yd(28)|0;if(!(c[j>>2]|0)){c[h>>2]=7;j=c[h>>2]|0;l=k;return j|0}c[(c[j>>2]|0)+4>>2]=c[f>>2];do if(c[f>>2]|0)if((c[g>>2]|0)<0){a=lQ(c[f>>2]|0)|0;b=c[j>>2]|0;break}else{a=c[g>>2]|0;b=c[j>>2]|0;break}else{a=0;b=c[j>>2]|0}while(0);c[b+8>>2]=a;c[(c[j>>2]|0)+12>>2]=0;c[(c[j>>2]|0)+16>>2]=0;c[(c[j>>2]|0)+20>>2]=0;c[(c[j>>2]|0)+24>>2]=0;c[c[i>>2]>>2]=c[j>>2];c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}function tP(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];Kd(c[(c[d>>2]|0)+20>>2]|0);Kd(c[d>>2]|0);l=b;return 0}function uP(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;z=l;l=l+64|0;w=z+52|0;A=z+48|0;x=z+44|0;y=z+40|0;n=z+36|0;o=z+32|0;p=z+28|0;q=z+24|0;j=z+20|0;r=z+16|0;s=z+12|0;t=z+8|0;u=z+4|0;k=z;v=z+56|0;c[A>>2]=b;c[x>>2]=e;c[y>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=i;c[q>>2]=c[A>>2];c[j>>2]=c[c[A>>2]>>2];c[r>>2]=c[(c[q>>2]|0)+4>>2];do{if((c[(c[q>>2]|0)+12>>2]|0)>=(c[(c[q>>2]|0)+8>>2]|0)){m=25;break}while(1){if((c[(c[q>>2]|0)+12>>2]|0)<(c[(c[q>>2]|0)+8>>2]|0))b=(vP(c[j>>2]|0,a[(c[r>>2]|0)+(c[(c[q>>2]|0)+12>>2]|0)>>0]|0)|0)!=0;else b=0;e=(c[q>>2]|0)+12|0;f=c[e>>2]|0;if(!b)break;c[e>>2]=f+1}c[s>>2]=f;while(1){if((c[(c[q>>2]|0)+12>>2]|0)<(c[(c[q>>2]|0)+8>>2]|0))b=(vP(c[j>>2]|0,a[(c[r>>2]|0)+(c[(c[q>>2]|0)+12>>2]|0)>>0]|0)|0)!=0^1;else b=0;e=(c[q>>2]|0)+12|0;f=c[e>>2]|0;if(!b)break;c[e>>2]=f+1}}while((f|0)<=(c[s>>2]|0));if((m|0)==25){c[w>>2]=101;A=c[w>>2]|0;l=z;return A|0}c[u>>2]=(c[(c[q>>2]|0)+12>>2]|0)-(c[s>>2]|0);do if((c[u>>2]|0)>(c[(c[q>>2]|0)+24>>2]|0)){c[(c[q>>2]|0)+24>>2]=(c[u>>2]|0)+20;c[k>>2]=Df(c[(c[q>>2]|0)+20>>2]|0,c[(c[q>>2]|0)+24>>2]|0)|0;if(c[k>>2]|0){c[(c[q>>2]|0)+20>>2]=c[k>>2];break}c[w>>2]=7;A=c[w>>2]|0;l=z;return A|0}while(0);c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[u>>2]|0))break;a[v>>0]=a[(c[r>>2]|0)+((c[s>>2]|0)+(c[t>>2]|0))>>0]|0;if((d[v>>0]|0|0)>=65?(d[v>>0]|0|0)<=90:0)b=(d[v>>0]|0)-65+97|0;else b=d[v>>0]|0;a[(c[(c[q>>2]|0)+20>>2]|0)+(c[t>>2]|0)>>0]=b;c[t>>2]=(c[t>>2]|0)+1}c[c[x>>2]>>2]=c[(c[q>>2]|0)+20>>2];c[c[y>>2]>>2]=c[u>>2];c[c[n>>2]>>2]=c[s>>2];c[c[o>>2]>>2]=c[(c[q>>2]|0)+12>>2];y=(c[q>>2]|0)+16|0;A=c[y>>2]|0;c[y>>2]=A+1;c[c[p>>2]>>2]=A;c[w>>2]=0;A=c[w>>2]|0;l=z;return A|0}function vP(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h;g=h+4|0;c[f>>2]=b;a[g>>0]=e;if((d[g>>0]|0)>=128){g=0;g=g&1;l=h;return g|0}g=(a[(c[f>>2]|0)+4+(d[g>>0]|0)>>0]|0)!=0;g=g&1;l=h;return g|0}function wP(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!((c[b>>2]|0)>=48&(c[b>>2]|0)<=57)?!((c[b>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)+12>>2]=c[t>>2];c[(c[(c[r>>2]|0)+12>>2]|0)+248>>2]=1;MR(c[(c[(c[r>>2]|0)+12>>2]|0)+16>>2]|0,c[k>>2]|0,c[n>>2]|0)|0;MR(c[(c[(c[r>>2]|0)+12>>2]|0)+20>>2]|0,c[m>>2]|0,c[o>>2]|0)|0;MJ(c[(c[(c[r>>2]|0)+12>>2]|0)+20>>2]|0);c[c[i>>2]>>2]=c[r>>2];c[s>>2]=0;v=c[s>>2]|0;l=w;return v|0}else{c[s>>2]=7;v=c[s>>2]|0;l=w;return v|0}}while(0);DJ(c[j>>2]|0,44476,v);c[s>>2]=1;v=c[s>>2]|0;l=w;return v|0}function yP(b,e){b=b|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;j=q+32|0;i=q+28|0;k=q+24|0;m=q+20|0;n=q+16|0;o=q+12|0;p=q+8|0;f=q+4|0;g=q;c[q+36>>2]=b;c[j>>2]=e;c[k>>2]=-1;c[m>>2]=-1;c[n>>2]=-1;c[o>>2]=-1;c[p>>2]=1;if(((c[(c[j>>2]|0)+8>>2]|0)==1?(c[c[(c[j>>2]|0)+12>>2]>>2]|0)==0:0)?(d[(c[(c[j>>2]|0)+12>>2]|0)+4>>0]|0)==0:0)c[(c[j>>2]|0)+32>>2]=1;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[c[j>>2]>>2]|0))break;if(a[(c[(c[j>>2]|0)+4>>2]|0)+((c[i>>2]|0)*12|0)+5>>0]|0){c[f>>2]=d[(c[(c[j>>2]|0)+4>>2]|0)+((c[i>>2]|0)*12|0)+4>>0];c[g>>2]=c[(c[(c[j>>2]|0)+4>>2]|0)+((c[i>>2]|0)*12|0)>>2];if(!(c[g>>2]|0)){if((c[f>>2]|0)==2)c[k>>2]=c[i>>2];if((c[f>>2]|0)==16)c[n>>2]=c[i>>2];if((c[f>>2]|0)==8)c[n>>2]=c[i>>2];if((c[f>>2]|0)==4)c[m>>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0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+12|0;e=g+4|0;f=g;c[g+8>>2]=a;c[e>>2]=b;c[f>>2]=Yd(120)|0;if(c[f>>2]|0){a=c[f>>2]|0;b=a+120|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[c[e>>2]>>2]=c[f>>2];c[d>>2]=0;f=c[d>>2]|0;l=g;return f|0}else{c[d>>2]=7;f=c[d>>2]|0;l=g;return f|0}return 0}function BP(a){a=a|0;var b=0,d=0,e=0,f=0;b=l;l=l+16|0;f=b+8|0;e=b+4|0;d=b;c[f>>2]=a;c[e>>2]=c[(c[c[f>>2]>>2]|0)+12>>2];c[d>>2]=c[f>>2];wL(c[e>>2]|0);zK((c[d>>2]|0)+4|0);Kd(c[(c[d>>2]|0)+60>>2]|0);Kd(c[(c[d>>2]|0)+76>>2]|0);Kd(c[(c[d>>2]|0)+112>>2]|0);Kd(c[d>>2]|0);l=b;return 0}function CP(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;z=l;l=l+80|0;y=z+8|0;x=z;t=z+76|0;u=z+72|0;v=z+68|0;w=z+60|0;g=z+56|0;h=z+52|0;i=z+48|0;j=z+44|0;k=z+40|0;m=z+36|0;n=z+32|0;o=z+28|0;p=z+24|0;q=z+20|0;r=z+16|0;s=z+12|0;c[u>>2]=a;c[v>>2]=b;c[z+64>>2]=d;c[w>>2]=e;c[g>>2]=f;c[h>>2]=c[u>>2];c[i>>2]=c[(c[c[u>>2]>>2]|0)+12>>2];c[k>>2]=0;c[m>>2]=0;c[n>>2]=-1;c[o>>2]=-1;c[p>>2]=-1;c[q>>2]=-1;c[r>>2]=0;if((c[v>>2]|0)!=1){c[k>>2]=1;if(c[v>>2]&2|0){f=c[r>>2]|0;c[r>>2]=f+1;c[o>>2]=f}if(c[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)|0;if(!(c[j>>2]|0))c[j>>2]=sK(c[i>>2]|0,(c[h>>2]|0)+4|0,(c[h>>2]|0)+60|0)|0;if(!(c[j>>2]|0))c[j>>2]=DP(c[u>>2]|0)|0;c[t>>2]=c[j>>2];y=c[t>>2]|0;l=z;return y|0}function DP(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+64|0;d=q+52|0;r=q+48|0;i=q+44|0;b=q+40|0;j=q+36|0;k=q+32|0;m=q+28|0;n=q+24|0;o=q+20|0;e=q+16|0;f=q+12|0;g=q+8|0;h=q;c[r>>2]=a;c[i>>2]=c[r>>2];c[b>>2]=c[(c[c[r>>2]>>2]|0)+12>>2];a=(c[i>>2]|0)+96|0;r=a;r=IR(c[r>>2]|0,c[r+4>>2]|0,1,0)|0;c[a>>2]=r;c[a+4>>2]=z;a=c[i>>2]|0;while(1){r=a+104|0;c[r>>2]=(c[r>>2]|0)+1;if((c[(c[i>>2]|0)+104>>2]|0)>=(c[(c[i>>2]|0)+108>>2]|0))break;r=(c[(c[i>>2]|0)+112>>2]|0)+(c[(c[i>>2]|0)+104>>2]<<4)|0;a=c[r+4>>2]|0;if((a|0)>0|(a|0)==0&(c[r>>2]|0)>>>0>0){p=4;break}a=c[i>>2]|0}if((p|0)==4){c[d>>2]=0;r=c[d>>2]|0;l=q;return r|0}c[j>>2]=tK(c[b>>2]|0,(c[i>>2]|0)+4|0)|0;do if((c[j>>2]|0)==100){c[k>>2]=0;c[m>>2]=c[(c[i>>2]|0)+4+52>>2];c[n>>2]=c[(c[i>>2]|0)+4+48>>2];c[e>>2]=0;do if(c[(c[i>>2]|0)+76>>2]|0){a=c[i>>2]|0;if((c[(c[i>>2]|0)+80>>2]|0)<(c[(c[i>>2]|0)+4+44>>2]|0))a=c[a+80>>2]|0;else a=c[a+4+44>>2]|0;c[f>>2]=a;c[g>>2]=wQ(c[(c[i>>2]|0)+76>>2]|0,c[(c[i>>2]|0)+4+40>>2]|0,c[f>>2]|0)|0;if((c[g>>2]|0)>=0){if(c[g>>2]|0)break;if((c[(c[i>>2]|0)+4+44>>2]|0)<=(c[(c[i>>2]|0)+80>>2]|0))break}c[(c[i>>2]|0)+88>>2]=1;c[d>>2]=0;r=c[d>>2]|0;l=q;return r|0}while(0);if(HP(c[i>>2]|0,2)|0){c[d>>2]=7;r=c[d>>2]|0;l=q;return r|0}GR(c[(c[i>>2]|0)+112>>2]|0,0,c[(c[i>>2]|0)+108>>2]<<4|0)|0;c[o>>2]=0;a:while(1){if((c[k>>2]|0)>=(c[m>>2]|0)){p=32;break}r=h;c[r>>2]=0;c[r+4>>2]=0;r=YK((c[n>>2]|0)+(c[k>>2]|0)|0,h)|0;c[k>>2]=(c[k>>2]|0)+r;switch(c[e>>2]|0){case 0:{r=c[(c[i>>2]|0)+112>>2]|0;g=r;c[r>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[r+4>>2]=z;c[e>>2]=1;c[o>>2]=0;continue a}case 1:{r=h;g=c[r+4>>2]|0;if((g|0)>0|(g|0)==0&(c[r>>2]|0)>>>0>1){r=(c[(c[i>>2]|0)+112>>2]|0)+16|0;g=r;g=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[r>>2]=g;c[r+4>>2]=z}c[e>>2]=2;break}case 2:break;default:{c[o>>2]=c[h>>2];if(HP(c[i>>2]|0,(c[o>>2]|0)+2|0)|0)break a;r=(c[(c[i>>2]|0)+112>>2]|0)+((c[o>>2]|0)+1<<4)|0;g=r;c[r>>2]=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[r+4>>2]=z;c[e>>2]=2;continue a}}r=h;if((c[r>>2]|0)==0&(c[r+4>>2]|0)==0){c[e>>2]=0;continue}r=h;if((c[r>>2]|0)==1&(c[r+4>>2]|0)==0){c[e>>2]=3;continue}else{r=(c[(c[i>>2]|0)+112>>2]|0)+((c[o>>2]|0)+1<<4)+8|0;g=r;g=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[r>>2]=g;c[r+4>>2]=z;r=(c[(c[i>>2]|0)+112>>2]|0)+8|0;g=r;g=IR(c[g>>2]|0,c[g+4>>2]|0,1,0)|0;c[r>>2]=g;c[r+4>>2]=z;continue}}if((p|0)==32){c[(c[i>>2]|0)+104>>2]=0;c[j>>2]=0;break}c[d>>2]=7;r=c[d>>2]|0;l=q;return r|0}else c[(c[i>>2]|0)+88>>2]=1;while(0);c[d>>2]=c[j>>2];r=c[d>>2]|0;l=q;return r|0}function EP(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];l=d;return c[(c[b>>2]|0)+88>>2]|0}function FP(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;i=g+12|0;e=g+8|0;h=g+4|0;f=g;c[i>>2]=a;c[e>>2]=b;c[h>>2]=d;c[f>>2]=c[i>>2];switch(c[h>>2]|0){case 0:{ci(c[e>>2]|0,c[(c[f>>2]|0)+4+40>>2]|0,c[(c[f>>2]|0)+4+44>>2]|0,-1);l=g;return 0}case 1:{a=c[e>>2]|0;if(c[(c[f>>2]|0)+104>>2]|0){Ch(a,(c[(c[f>>2]|0)+104>>2]|0)-1|0);l=g;return 0}else{ci(a,26468,-1,0);l=g;return 0}}case 2:{i=(c[(c[f>>2]|0)+112>>2]|0)+(c[(c[f>>2]|0)+104>>2]<<4)|0;gi(c[e>>2]|0,c[i>>2]|0,c[i+4>>2]|0);l=g;return 0}case 3:{i=(c[(c[f>>2]|0)+112>>2]|0)+(c[(c[f>>2]|0)+104>>2]<<4)+8|0;gi(c[e>>2]|0,c[i>>2]|0,c[i+4>>2]|0);l=g;return 0}default:{Ch(c[e>>2]|0,c[(c[f>>2]|0)+84>>2]|0);l=g;return 0}}return 0}function GP(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+8|0;f=d+4|0;e=d;c[g>>2]=a;c[f>>2]=b;c[e>>2]=c[g>>2];e=(c[e>>2]|0)+96|0;a=c[e+4>>2]|0;b=c[f>>2]|0;c[b>>2]=c[e>>2];c[b+4>>2]=a;l=d;return 0}function HP(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;do if((c[f>>2]|0)>(c[(c[e>>2]|0)+108>>2]|0)){c[g>>2]=Df(c[(c[e>>2]|0)+112>>2]|0,c[f>>2]<<4)|0;if(c[g>>2]|0){GR((c[g>>2]|0)+(c[(c[e>>2]|0)+108>>2]<<4)|0,0,(c[f>>2]|0)-(c[(c[e>>2]|0)+108>>2]|0)<<4|0)|0;c[(c[e>>2]|0)+112>>2]=c[g>>2];c[(c[e>>2]|0)+108>>2]=c[f>>2];break}c[d>>2]=7;g=c[d>>2]|0;l=h;return g|0}while(0);c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}function IP(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;g=p+32|0;h=p+28|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;n=p+8|0;e=p+4|0;f=p;c[h>>2]=a;c[i>>2]=b;c[j>>2]=d;c[n>>2]=0;c[k>>2]=Yd(16)|0;if(!(c[k>>2]|0)){c[g>>2]=7;o=c[g>>2]|0;l=p;return o|0}d=c[k>>2]|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;c[(c[k>>2]|0)+4>>2]=1;c[m>>2]=0;while(1){if(c[n>>2]|0)break;if((c[m>>2]|0)>=(c[h>>2]|0))break;c[e>>2]=c[(c[i>>2]|0)+(c[m>>2]<<2)>>2];c[f>>2]=lQ(c[e>>2]|0)|0;if((c[f>>2]|0)==19?(wQ(44618,c[e>>2]|0,19)|0)==0:0)c[(c[k>>2]|0)+4>>2]=1;else o=9;do if((o|0)==9){o=0;if((c[f>>2]|0)==19?(wQ(44638,c[e>>2]|0,19)|0)==0:0){c[(c[k>>2]|0)+4>>2]=0;break}if((c[f>>2]|0)>=11?(wQ(44658,c[e>>2]|0,11)|0)==0:0){c[n>>2]=TP(c[k>>2]|0,1,(c[e>>2]|0)+11|0,(c[f>>2]|0)-11|0)|0;break}if((c[f>>2]|0)>=11?(wQ(44670,c[e>>2]|0,11)|0)==0:0){c[n>>2]=TP(c[k>>2]|0,0,(c[e>>2]|0)+11|0,(c[f>>2]|0)-11|0)|0;break}c[n>>2]=1}while(0);c[m>>2]=(c[m>>2]|0)+1}if(c[n>>2]|0){JP(c[k>>2]|0)|0;c[k>>2]=0}c[c[j>>2]>>2]=c[k>>2];c[g>>2]=c[n>>2];o=c[g>>2]|0;l=p;return o|0}function JP(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(!(c[b>>2]|0)){l=e;return 0}c[d>>2]=c[b>>2];Kd(c[(c[d>>2]|0)+12>>2]|0);Kd(c[d>>2]|0);l=e;return 0}function KP(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;h=k+20|0;f=k+12|0;g=k+8|0;i=k+4|0;j=k;c[k+16>>2]=a;c[f>>2]=b;c[g>>2]=d;c[i>>2]=e;c[j>>2]=Yd(28)|0;if(!(c[j>>2]|0)){c[h>>2]=7;j=c[h>>2]|0;l=k;return j|0}e=c[j>>2]|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=0;c[e+24>>2]=0;c[(c[j>>2]|0)+4>>2]=c[f>>2];do if(c[f>>2]|0)if((c[g>>2]|0)<0){a=lQ(c[f>>2]|0)|0;b=c[j>>2]|0;break}else{a=c[g>>2]|0;b=c[j>>2]|0;break}else{a=0;b=c[j>>2]|0}while(0);c[b+8>>2]=a;c[c[i>>2]>>2]=c[j>>2];c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}function LP(a){a=a|0;var b=0,d=0,e=0;b=l;l=l+16|0;e=b+4|0;d=b;c[e>>2]=a;c[d>>2]=c[e>>2];Kd(c[(c[d>>2]|0)+20>>2]|0);Kd(c[d>>2]|0);l=b;return 0}function MP(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;A=l;l=l+80|0;x=A+64|0;B=A+60|0;y=A+56|0;z=A+52|0;p=A+48|0;q=A+44|0;r=A+40|0;s=A+36|0;j=A+32|0;k=A+28|0;t=A+24|0;u=A+20|0;v=A+16|0;w=A+12|0;m=A+8|0;n=A+4|0;o=A;c[B>>2]=b;c[y>>2]=e;c[z>>2]=f;c[p>>2]=g;c[q>>2]=h;c[r>>2]=i;c[s>>2]=c[B>>2];c[j>>2]=c[c[s>>2]>>2];c[k>>2]=0;c[u>>2]=(c[(c[s>>2]|0)+4>>2]|0)+(c[(c[s>>2]|0)+12>>2]|0);c[v>>2]=c[u>>2];c[m>>2]=(c[(c[s>>2]|0)+4>>2]|0)+(c[(c[s>>2]|0)+8>>2]|0);while(1){if((c[u>>2]|0)>>>0>=(c[m>>2]|0)>>>0)break;B=c[u>>2]|0;c[u>>2]=B+1;c[k>>2]=d[B>>0];do if((c[k>>2]|0)>=192){c[k>>2]=d[19017+((c[k>>2]|0)-192)>>0];while(1){if((c[u>>2]|0)!=(c[m>>2]|0))b=((d[c[u>>2]>>0]|0)&192|0)==128;else b=0;e=c[k>>2]|0;if(!b)break;B=c[u>>2]|0;c[u>>2]=B+1;c[k>>2]=(e<<6)+(63&(d[B>>0]|0))}if(((e|0)>=128?(c[k>>2]&-2048|0)!=55296:0)?(c[k>>2]&-2|0)!=65534:0)break;c[k>>2]=65533}while(0);if(NP(c[j>>2]|0,c[k>>2]|0)|0)break;c[v>>2]=c[u>>2]}if((c[v>>2]|0)>>>0>=(c[m>>2]|0)>>>0){c[x>>2]=101;B=c[x>>2]|0;l=A;return B|0}c[t>>2]=c[(c[s>>2]|0)+20>>2];while(1){if(((c[t>>2]|0)-(c[(c[s>>2]|0)+20>>2]|0)|0)>=((c[(c[s>>2]|0)+24>>2]|0)-4|0)){c[o>>2]=Df(c[(c[s>>2]|0)+20>>2]|0,(c[(c[s>>2]|0)+24>>2]|0)+64|0)|0;if(!(c[o>>2]|0)){b=20;break}c[t>>2]=(c[o>>2]|0)+((c[t>>2]|0)-(c[(c[s>>2]|0)+20>>2]|0));c[(c[s>>2]|0)+20>>2]=c[o>>2];B=(c[s>>2]|0)+24|0;c[B>>2]=(c[B>>2]|0)+64}c[w>>2]=c[u>>2];c[n>>2]=OP(c[k>>2]|0,c[(c[j>>2]|0)+4>>2]|0)|0;do if(c[n>>2]|0){b=c[n>>2]|0;if((c[n>>2]|0)<128){B=c[t>>2]|0;c[t>>2]=B+1;a[B>>0]=b;break}e=c[n>>2]|0;if((b|0)<2048){i=c[t>>2]|0;c[t>>2]=i+1;a[i>>0]=192+(e>>6&31);i=128+(c[n>>2]&63)&255;B=c[t>>2]|0;c[t>>2]=B+1;a[B>>0]=i;break}b=c[n>>2]|0;if((e|0)<65536){B=c[t>>2]|0;c[t>>2]=B+1;a[B>>0]=224+(b>>12&15);B=128+(c[n>>2]>>6&63)&255;i=c[t>>2]|0;c[t>>2]=i+1;a[i>>0]=B;i=128+(c[n>>2]&63)&255;B=c[t>>2]|0;c[t>>2]=B+1;a[B>>0]=i;break}else{i=c[t>>2]|0;c[t>>2]=i+1;a[i>>0]=240+(b>>18&7);i=128+(c[n>>2]>>12&63)&255;B=c[t>>2]|0;c[t>>2]=B+1;a[B>>0]=i;B=128+(c[n>>2]>>6&63)&255;i=c[t>>2]|0;c[t>>2]=i+1;a[i>>0]=B;i=128+(c[n>>2]&63)&255;B=c[t>>2]|0;c[t>>2]=B+1;a[B>>0]=i;break}}while(0);if((c[u>>2]|0)>>>0>=(c[m>>2]|0)>>>0){b=43;break}B=c[u>>2]|0;c[u>>2]=B+1;c[k>>2]=d[B>>0];do if((c[k>>2]|0)>=192){c[k>>2]=d[19017+((c[k>>2]|0)-192)>>0];while(1){if((c[u>>2]|0)!=(c[m>>2]|0))e=((d[c[u>>2]>>0]|0)&192|0)==128;else e=0;b=c[k>>2]|0;if(!e)break;B=c[u>>2]|0;c[u>>2]=B+1;c[k>>2]=(b<<6)+(63&(d[B>>0]|0))}if(((b|0)>=128?(c[k>>2]&-2048|0)!=55296:0)?(c[k>>2]&-2|0)!=65534:0)break;c[k>>2]=65533}while(0);if(NP(c[j>>2]|0,c[k>>2]|0)|0)continue;if(!(PP(c[k>>2]|0)|0)){b=43;break}}if((b|0)==20){c[x>>2]=7;B=c[x>>2]|0;l=A;return B|0}else if((b|0)==43){c[(c[s>>2]|0)+12>>2]=(c[u>>2]|0)-(c[(c[s>>2]|0)+4>>2]|0);c[c[y>>2]>>2]=c[(c[s>>2]|0)+20>>2];c[c[z>>2]>>2]=(c[t>>2]|0)-(c[(c[s>>2]|0)+20>>2]|0);c[c[p>>2]>>2]=(c[v>>2]|0)-(c[(c[s>>2]|0)+4>>2]|0);c[c[q>>2]>>2]=(c[w>>2]|0)-(c[(c[s>>2]|0)+4>>2]|0);z=(c[s>>2]|0)+16|0;B=c[z>>2]|0;c[z>>2]=B+1;c[c[r>>2]>>2]=B;c[x>>2]=0;B=c[x>>2]|0;l=A;return B|0}return 0}function NP(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=RP(c[e>>2]|0)|0;b=b^(SP(c[f>>2]|0,c[e>>2]|0)|0);l=d;return b|0}function OP(a,b){a=a|0;b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;g=p+32|0;h=p+28|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;n=p+8|0;o=p+4|0;f=p;c[g>>2]=a;c[h>>2]=b;c[i>>2]=c[g>>2];a=c[g>>2]|0;if((c[g>>2]|0)<128){if(!((a|0)>=65&(c[g>>2]|0)<=90)){o=c[i>>2]|0;l=p;return o|0}c[i>>2]=(c[g>>2]|0)+32;o=c[i>>2]|0;l=p;return o|0}if((a|0)>=65536){if(!((c[g>>2]|0)>=66560&(c[g>>2]|0)<66600)){o=c[i>>2]|0;l=p;return o|0}c[i>>2]=(c[g>>2]|0)+40;o=c[i>>2]|0;l=p;return o|0}c[j>>2]=162;c[k>>2]=0;c[m>>2]=-1;while(1){if((c[j>>2]|0)<(c[k>>2]|0))break;c[n>>2]=((c[j>>2]|0)+(c[k>>2]|0)|0)/2|0;c[o>>2]=(c[g>>2]|0)-(e[14778+(c[n>>2]<<2)>>1]|0);a=c[n>>2]|0;if((c[o>>2]|0)>=0){c[m>>2]=a;c[k>>2]=(c[n>>2]|0)+1;continue}else{c[j>>2]=a-1;continue}}if(((c[m>>2]|0)>=0?(c[f>>2]=14778+(c[m>>2]<<2),(c[g>>2]|0)<((e[c[f>>2]>>1]|0)+(d[(c[f>>2]|0)+3>>0]|0)|0)):0)?0==(1&(d[(c[f>>2]|0)+2>>0]|0)&((e[c[f>>2]>>1]|0)^c[g>>2])|0):0)c[i>>2]=(c[g>>2]|0)+(e[15430+((d[(c[f>>2]|0)+2>>0]|0)>>1<<1)>>1]|0)&65535;if(!(c[h>>2]|0)){o=c[i>>2]|0;l=p;return o|0}c[i>>2]=QP(c[i>>2]|0)|0;o=c[i>>2]|0;l=p;return o|0}function PP(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;f=g+12|0;e=g+8|0;b=g+4|0;d=g;c[e>>2]=a;c[b>>2]=134389727;c[d>>2]=221688;if((c[e>>2]|0)<768|(c[e>>2]|0)>817){c[f>>2]=0;f=c[f>>2]|0;l=g;return f|0}if((c[e>>2]|0)<800){b=c[b>>2]|0;a=(c[e>>2]|0)-768|0}else{b=c[d>>2]|0;a=(c[e>>2]|0)-768-32|0}c[f>>2]=b&1<>2]|0;l=g;return f|0}function QP(b){b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+336|0;g=p+20|0;h=p+24|0;i=p+226|0;j=p+16|0;k=p+12|0;m=p+8|0;n=p+4|0;o=p;c[g>>2]=b;MR(h|0,15584,202)|0;b=i;d=44517;f=b+101|0;do{a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}while((b|0)<(f|0));c[j>>2]=c[g>>2]<<3|7;c[k>>2]=0;c[m>>2]=100;c[n>>2]=0;while(1){if((c[m>>2]|0)<(c[n>>2]|0))break;c[o>>2]=((c[m>>2]|0)+(c[n>>2]|0)|0)/2|0;b=c[o>>2]|0;if((c[j>>2]|0)>>>0>=(e[h+(c[o>>2]<<1)>>1]|0)>>>0){c[k>>2]=b;c[n>>2]=(c[o>>2]|0)+1;continue}else{c[m>>2]=b-1;continue}}if((c[g>>2]|0)>((e[h+(c[k>>2]<<1)>>1]>>3)+(e[h+(c[k>>2]<<1)>>1]&7)|0)){o=c[g>>2]|0;l=p;return o|0}else{o=a[i+(c[k>>2]|0)>>0]|0;l=p;return o|0}return 0}function RP(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;b=j+24|0;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[d>>2]=a;a=c[d>>2]|0;if((c[d>>2]|0)<128){c[b>>2]=(c[6864+(a>>5<<2)>>2]&1<<(c[d>>2]&31)|0)==0&1;i=c[b>>2]|0;l=j;return i|0}if((a|0)>=4194304){c[b>>2]=1;i=c[b>>2]|0;l=j;return i|0}c[e>>2]=c[d>>2]<<10|1023;c[f>>2]=0;c[g>>2]=405;c[h>>2]=0;while(1){if((c[g>>2]|0)<(c[h>>2]|0))break;c[i>>2]=((c[g>>2]|0)+(c[h>>2]|0)|0)/2|0;a=c[i>>2]|0;if((c[e>>2]|0)>>>0>=(c[6880+(c[i>>2]<<2)>>2]|0)>>>0){c[f>>2]=a;c[h>>2]=(c[i>>2]|0)+1;continue}else{c[g>>2]=a-1;continue}}c[b>>2]=(c[d>>2]|0)>>>0>=(((c[6880+(c[f>>2]<<2)>>2]|0)>>>10)+(c[6880+(c[f>>2]<<2)>>2]&1023)|0)>>>0&1;i=c[b>>2]|0;l=j;return i|0}function SP(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+24|0;d=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[d>>2]=a;c[f>>2]=b;a:do if((c[(c[d>>2]|0)+8>>2]|0)>0){c[g>>2]=c[(c[d>>2]|0)+12>>2];c[h>>2]=0;c[i>>2]=(c[(c[d>>2]|0)+8>>2]|0)-1;while(1){if((c[i>>2]|0)<(c[h>>2]|0))break a;c[j>>2]=((c[i>>2]|0)+(c[h>>2]|0)|0)/2|0;if((c[f>>2]|0)==(c[(c[g>>2]|0)+(c[j>>2]<<2)>>2]|0))break;a=c[j>>2]|0;if((c[f>>2]|0)>(c[(c[g>>2]|0)+(c[j>>2]<<2)>>2]|0)){c[h>>2]=a+1;continue}else{c[i>>2]=a-1;continue}}c[e>>2]=1;j=c[e>>2]|0;l=k;return j|0}while(0);c[e>>2]=0;j=c[e>>2]|0;l=k;return j|0}function TP(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+64|0;p=t+48|0;q=t+44|0;r=t+40|0;h=t+36|0;u=t+32|0;s=t+28|0;i=t+24|0;j=t+20|0;g=t+16|0;k=t+12|0;m=t+8|0;n=t+4|0;o=t;c[q>>2]=a;c[r>>2]=b;c[h>>2]=e;c[u>>2]=f;c[s>>2]=c[h>>2];c[i>>2]=(c[s>>2]|0)+(c[u>>2]|0);c[g>>2]=0;while(1){if((c[s>>2]|0)>>>0>=(c[i>>2]|0)>>>0)break;u=c[s>>2]|0;c[s>>2]=u+1;c[j>>2]=d[u>>0];do if((c[j>>2]|0)>=192){c[j>>2]=d[19017+((c[j>>2]|0)-192)>>0];while(1){if((c[s>>2]|0)!=(c[i>>2]|0))a=((d[c[s>>2]>>0]|0)&192|0)==128;else a=0;b=c[j>>2]|0;if(!a)break;u=c[s>>2]|0;c[s>>2]=u+1;c[j>>2]=(b<<6)+(63&(d[u>>0]|0))}if(((b|0)>=128?(c[j>>2]&-2048|0)!=55296:0)?(c[j>>2]&-2|0)!=65534:0)break;c[j>>2]=65533}while(0);u=RP(c[j>>2]|0)|0;if((u|0)==(c[r>>2]|0))continue;if(PP(c[j>>2]|0)|0)continue;c[g>>2]=(c[g>>2]|0)+1}if(c[g>>2]|0){c[k>>2]=Df(c[(c[q>>2]|0)+12>>2]|0,(c[(c[q>>2]|0)+8>>2]|0)+(c[g>>2]|0)<<2)|0;if(!(c[k>>2]|0)){c[p>>2]=7;u=c[p>>2]|0;l=t;return u|0}c[m>>2]=c[(c[q>>2]|0)+8>>2];c[s>>2]=c[h>>2];while(1){if((c[s>>2]|0)>>>0>=(c[i>>2]|0)>>>0)break;u=c[s>>2]|0;c[s>>2]=u+1;c[j>>2]=d[u>>0];do if((c[j>>2]|0)>=192){c[j>>2]=d[19017+((c[j>>2]|0)-192)>>0];while(1){if((c[s>>2]|0)!=(c[i>>2]|0))b=((d[c[s>>2]>>0]|0)&192|0)==128;else b=0;a=c[j>>2]|0;if(!b)break;u=c[s>>2]|0;c[s>>2]=u+1;c[j>>2]=(a<<6)+(63&(d[u>>0]|0))}if(((a|0)>=128?(c[j>>2]&-2048|0)!=55296:0)?(c[j>>2]&-2|0)!=65534:0)break;c[j>>2]=65533}while(0);u=RP(c[j>>2]|0)|0;if((u|0)==(c[r>>2]|0))continue;if(PP(c[j>>2]|0)|0)continue;c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[m>>2]|0))break;if((c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]|0)>=(c[j>>2]|0))break;c[n>>2]=(c[n>>2]|0)+1}c[o>>2]=c[m>>2];while(1){if((c[o>>2]|0)<=(c[n>>2]|0))break;c[(c[k>>2]|0)+(c[o>>2]<<2)>>2]=c[(c[k>>2]|0)+((c[o>>2]|0)-1<<2)>>2];c[o>>2]=(c[o>>2]|0)+-1}c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]=c[j>>2];c[m>>2]=(c[m>>2]|0)+1}c[(c[q>>2]|0)+12>>2]=c[k>>2];c[(c[q>>2]|0)+8>>2]=c[m>>2]}c[p>>2]=0;u=c[p>>2]|0;l=t;return u|0}function UP(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=d;while(1){if((c[f>>2]|0)>0)d=(a[(c[e>>2]|0)+((c[f>>2]|0)-1)>>0]|0)==32;else d=0;b=c[f>>2]|0;if(!d)break;c[f>>2]=b+-1}l=g;return (b|0)==0|0}function VP(){return 47064}function WP(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=cQ(c[a+60>>2]|0)|0;a=ZP(za(6,d|0)|0)|0;l=b;return a|0}function XP(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;g=l;l=l+32|0;f=g;c[b+36>>2]=163;if((c[b>>2]&64|0)==0?(c[f>>2]=c[b+60>>2],c[f+4>>2]=21523,c[f+8>>2]=g+16,Xa(54,f|0)|0):0)a[b+75>>0]=-1;f=bQ(b,d,e)|0;l=g;return f|0}function YP(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+32|0;g=f;e=f+20|0;c[g>>2]=c[a+60>>2];c[g+4>>2]=0;c[g+8>>2]=b;c[g+12>>2]=e;c[g+16>>2]=d;if((ZP(Za(140,g|0)|0)|0)<0){c[e>>2]=-1;a=-1}else a=c[e>>2]|0;l=f;return a|0}function ZP(a){a=a|0;if(a>>>0>4294963200){c[(_P()|0)>>2]=0-a;a=-1}return a|0}function _P(){return ($P()|0)+64|0}function $P(){return aQ()|0}function aQ(){return 8628}function bQ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;n=l;l=l+48|0;k=n+16|0;g=n;f=n+32|0;i=a+28|0;e=c[i>>2]|0;c[f>>2]=e;j=a+20|0;e=(c[j>>2]|0)-e|0;c[f+4>>2]=e;c[f+8>>2]=b;c[f+12>>2]=d;e=e+d|0;h=a+60|0;c[g>>2]=c[h>>2];c[g+4>>2]=f;c[g+8>>2]=2;g=ZP(mb(146,g|0)|0)|0;a:do if((e|0)!=(g|0)){b=2;while(1){if((g|0)<0)break;e=e-g|0;p=c[f+4>>2]|0;o=g>>>0>p>>>0;f=o?f+8|0:f;b=(o<<31>>31)+b|0;p=g-(o?p:0)|0;c[f>>2]=(c[f>>2]|0)+p;o=f+4|0;c[o>>2]=(c[o>>2]|0)-p;c[k>>2]=c[h>>2];c[k+4>>2]=f;c[k+8>>2]=b;g=ZP(mb(146,k|0)|0)|0;if((e|0)==(g|0)){m=3;break a}}c[a+16>>2]=0;c[i>>2]=0;c[j>>2]=0;c[a>>2]=c[a>>2]|32;if((b|0)==2)d=0;else d=d-(c[f+4>>2]|0)|0}else m=3;while(0);if((m|0)==3){p=c[a+44>>2]|0;c[a+16>>2]=p+(c[a+48>>2]|0);c[i>>2]=p;c[j>>2]=p}l=n;return d|0}function cQ(a){a=a|0;return a|0}function dQ(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+208|0;j=m+8|0;k=m;h=O(d,b)|0;i=k;c[i>>2]=1;c[i+4>>2]=0;a:do if(h|0){i=0-d|0;c[j+4>>2]=d;c[j>>2]=d;f=2;b=d;g=d;while(1){b=b+d+g|0;c[j+(f<<2)>>2]=b;if(b>>>0>>0){n=g;f=f+1|0;g=b;b=n}else break}g=a+h+i|0;if(g>>>0>a>>>0){h=g;f=1;b=1;do{do if((b&3|0)!=3){b=f+-1|0;if((c[j+(b<<2)>>2]|0)>>>0<(h-a|0)>>>0)eQ(a,d,e,f,j);else gQ(a,d,e,k,f,0,j);if((f|0)==1){hQ(k,1);f=0;break}else{hQ(k,b);f=1;break}}else{eQ(a,d,e,f,j);fQ(k,2);f=f+2|0}while(0);b=c[k>>2]|1;c[k>>2]=b;a=a+d|0}while(a>>>0>>0)}else{f=1;b=1}gQ(a,d,e,k,f,0,j);g=k+4|0;while(1){if((f|0)==1&(b|0)==1){if(!(c[g>>2]|0))break a}else if((f|0)>=2){hQ(k,2);n=f+-2|0;c[k>>2]=c[k>>2]^7;fQ(k,1);gQ(a+(0-(c[j+(n<<2)>>2]|0))+i|0,d,e,k,f+-1|0,1,j);hQ(k,1);b=c[k>>2]|1;c[k>>2]=b;h=a+i|0;gQ(h,d,e,k,n,1,j);a=h;f=n;continue}b=iQ(k)|0;fQ(k,b);a=a+i|0;f=b+f|0;b=c[k>>2]|0}}while(0);l=m;return}function eQ(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+240|0;m=n;c[m>>2]=a;a:do if((e|0)>1){k=0-b|0;g=a;j=e;e=1;while(1){h=g+k|0;i=j+-2|0;g=h+(0-(c[f+(i<<2)>>2]|0))|0;if((yb[d&255](a,g)|0)>-1?(yb[d&255](a,h)|0)>-1:0)break a;a=e+1|0;e=m+(e<<2)|0;if((yb[d&255](g,h)|0)>-1){c[e>>2]=g;e=j+-1|0}else{c[e>>2]=h;g=h;e=i}if((e|0)<=1){e=a;break a}j=e;e=a;a=c[m>>2]|0}}else e=1;while(0);kQ(b,m,e);l=n;return}function fQ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=a+4|0;if(b>>>0>31){e=c[f>>2]|0;c[a>>2]=e;c[f>>2]=0;b=b+-32|0;d=0}else{d=c[f>>2]|0;e=c[a>>2]|0}c[a>>2]=d<<32-b|e>>>b;c[f>>2]=d>>>b;return}function gQ(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+240|0;n=p+232|0;o=p;q=c[e>>2]|0;c[n>>2]=q;j=c[e+4>>2]|0;k=n+4|0;c[k>>2]=j;c[o>>2]=a;a:do if((q|0)!=1|(j|0)!=0?(m=0-b|0,i=a+(0-(c[h+(f<<2)>>2]|0))|0,(yb[d&255](i,a)|0)>=1):0){e=1;g=(g|0)==0;j=i;while(1){if(g&(f|0)>1){g=a+m|0;i=c[h+(f+-2<<2)>>2]|0;if((yb[d&255](g,j)|0)>-1){i=10;break a}if((yb[d&255](g+(0-i)|0,j)|0)>-1){i=10;break a}}g=e+1|0;c[o+(e<<2)>>2]=j;q=iQ(n)|0;fQ(n,q);f=q+f|0;if(!((c[n>>2]|0)!=1|(c[k>>2]|0)!=0)){e=g;a=j;i=10;break a}a=j+(0-(c[h+(f<<2)>>2]|0))|0;if((yb[d&255](a,c[o>>2]|0)|0)<1){a=j;e=g;g=0;i=9;break}else{q=j;e=g;g=1;j=a;a=q}}}else{e=1;i=9}while(0);if((i|0)==9?(g|0)==0:0)i=10;if((i|0)==10){kQ(b,o,e);eQ(a,b,d,f,h)}l=p;return}function hQ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=a+4|0;if(b>>>0>31){e=c[a>>2]|0;c[f>>2]=e;c[a>>2]=0;b=b+-32|0;d=0}else{d=c[a>>2]|0;e=c[f>>2]|0}c[f>>2]=d>>>(32-b|0)|e<>2]=d<>2]|0)+-1|0)|0;if(!b){b=jQ(c[a+4>>2]|0)|0;return ((b|0)==0?0:b+32|0)|0}else return b|0;return 0}function jQ(a){a=a|0;var b=0;if(a)if(!(a&1)){b=a;a=0;do{a=a+1|0;b=b>>>1}while(!(b&1|0))}else a=0;else a=32;return a|0}function kQ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+256|0;e=h;a:do if((d|0)>=2?(g=b+(d<<2)|0,c[g>>2]=e,a|0):0)while(1){f=a>>>0<256?a:256;MR(e|0,c[b>>2]|0,f|0)|0;e=0;do{i=b+(e<<2)|0;e=e+1|0;MR(c[i>>2]|0,c[b+(e<<2)>>2]|0,f|0)|0;c[i>>2]=(c[i>>2]|0)+f}while((e|0)!=(d|0));a=a-f|0;if(!a)break a;e=c[g>>2]|0}while(0);l=h;return}function lQ(b){b=b|0;var d=0,e=0,f=0;f=b;a:do if(!(f&3))e=4;else{d=f;while(1){if(!(a[b>>0]|0)){b=d;break a}b=b+1|0;d=b;if(!(d&3)){e=4;break}}}while(0);if((e|0)==4){while(1){d=c[b>>2]|0;if(!((d&-2139062144^-2139062144)&d+-16843009))b=b+4|0;else break}if((d&255)<<24>>24)do b=b+1|0;while((a[b>>0]|0)!=0)}return b-f|0}function mQ(a){a=a|0;return 0}function nQ(a){a=a|0;return}function oQ(a){a=a|0;return qQ(a,c[(pQ()|0)+188>>2]|0)|0}function pQ(){return aQ()|0}function qQ(b,e){b=b|0;e=e|0;var f=0,g=0;g=0;while(1){if((d[44795+g>>0]|0)==(b|0)){b=2;break}f=g+1|0;if((f|0)==87){f=44883;g=87;b=5;break}else g=f}if((b|0)==2)if(!g)f=44883;else{f=44883;b=5}if((b|0)==5)while(1){do{b=f;f=f+1|0}while((a[b>>0]|0)!=0);g=g+-1|0;if(!g)break;else b=5}return rQ(f,c[e+20>>2]|0)|0}function rQ(a,b){a=a|0;b=b|0;return sQ(a,b)|0}function sQ(a,b){a=a|0;b=b|0;if(!b)b=0;else b=tQ(c[b>>2]|0,c[b+4>>2]|0,a)|0;return (b|0?b:a)|0}function tQ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;o=(c[b>>2]|0)+1794895138|0;h=uQ(c[b+8>>2]|0,o)|0;f=uQ(c[b+12>>2]|0,o)|0;g=uQ(c[b+16>>2]|0,o)|0;a:do if((h>>>0>>2>>>0?(n=d-(h<<2)|0,f>>>0>>0&g>>>0>>0):0)?((g|f)&3|0)==0:0){n=f>>>2;m=g>>>2;l=0;while(1){j=h>>>1;k=l+j|0;i=k<<1;g=i+n|0;f=uQ(c[b+(g<<2)>>2]|0,o)|0;g=uQ(c[b+(g+1<<2)>>2]|0,o)|0;if(!(g>>>0>>0&f>>>0<(d-g|0)>>>0)){f=0;break a}if(a[b+(g+f)>>0]|0){f=0;break a}f=vQ(e,b+g|0)|0;if(!f)break;f=(f|0)<0;if((h|0)==1){f=0;break a}else{l=f?l:k;h=f?j:h-j|0}}f=i+m|0;g=uQ(c[b+(f<<2)>>2]|0,o)|0;f=uQ(c[b+(f+1<<2)>>2]|0,o)|0;if(f>>>0>>0&g>>>0<(d-f|0)>>>0)f=(a[b+(f+g)>>0]|0)==0?b+f|0:0;else f=0}else f=0;while(0);return f|0}function uQ(a,b){a=a|0;b=b|0;var c=0;c=NR(a|0)|0;return ((b|0)==0?a:c)|0}function vQ(b,c){b=b|0;c=c|0;var d=0,e=0;d=a[b>>0]|0;e=a[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24)b=e;else{do{b=b+1|0;c=c+1|0;d=a[b>>0]|0;e=a[c>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=e<<24>>24));b=e}return (d&255)-(b&255)|0}function wQ(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;a:do if(!d)b=0;else{while(1){e=a[b>>0]|0;f=a[c>>0]|0;if(e<<24>>24!=f<<24>>24)break;d=d+-1|0;if(!d){b=0;break a}else{b=b+1|0;c=c+1|0}}b=(e&255)-(f&255)|0}while(0);return b|0}function xQ(a,b){a=a|0;b=b|0;yQ(a,b)|0;return a|0}function yQ(b,d){b=b|0;d=d|0;var e=0,f=0;e=d;a:do if(!((e^b)&3)){if(e&3)do{e=a[d>>0]|0;a[b>>0]=e;if(!(e<<24>>24))break a;d=d+1|0;b=b+1|0}while((d&3|0)!=0);e=c[d>>2]|0;if(!((e&-2139062144^-2139062144)&e+-16843009)){f=b;while(1){d=d+4|0;b=f+4|0;c[f>>2]=e;e=c[d>>2]|0;if((e&-2139062144^-2139062144)&e+-16843009|0)break;else f=b}}f=8}else f=8;while(0);if((f|0)==8){f=a[d>>0]|0;a[b>>0]=f;if(f<<24>>24)do{d=d+1|0;b=b+1|0;f=a[d>>0]|0;a[b>>0]=f}while(f<<24>>24!=0)}return b|0}function zQ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=d;do if(!((g^b)&3)){f=(e|0)!=0;a:do if(f&(g&3|0)!=0)while(1){g=a[d>>0]|0;a[b>>0]=g;if(!(g<<24>>24))break a;e=e+-1|0;d=d+1|0;b=b+1|0;f=(e|0)!=0;if(!(f&(d&3|0)!=0)){h=5;break}}else h=5;while(0);if((h|0)==5)if(!f){e=0;break}if(a[d>>0]|0){b:do if(e>>>0>3){f=d;while(1){d=c[f>>2]|0;if((d&-2139062144^-2139062144)&d+-16843009|0){d=f;break b}c[b>>2]=d;e=e+-4|0;d=f+4|0;b=b+4|0;if(e>>>0>3)f=d;else break}}while(0);h=11}}else h=11;while(0);c:do if((h|0)==11)if(!e)e=0;else while(1){h=a[d>>0]|0;a[b>>0]=h;if(!(h<<24>>24))break c;e=e+-1|0;b=b+1|0;if(!e){e=0;break}else d=d+1|0}while(0);GR(b|0,0,e|0)|0;return b|0}function AQ(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;if(!d)e=0;else{h=a[b>>0]|0;e=h&255;g=a[c>>0]|0;f=g&255;a:do if(h<<24>>24)do{d=d+-1|0;if(!(h<<24>>24==g<<24>>24&((d|0)!=0&g<<24>>24!=0)))break a;b=b+1|0;c=c+1|0;h=a[b>>0]|0;e=h&255;g=a[c>>0]|0;f=g&255}while(h<<24>>24!=0);while(0);e=e-f|0}return e|0}function BQ(a){a=a|0;var b=0;b=(CQ(a)|0)==0;return (b?a:a|32)|0}function CQ(a){a=a|0;return (a+-65|0)>>>0<26|0}function DQ(a){a=a|0;var b=0,c=0;c=(lQ(a)|0)+1|0;b=wR(c)|0;if(!b)b=0;else MR(b|0,a|0,c|0)|0;return b|0}function EQ(a,b,c){a=a|0;b=b|0;c=c|0;zQ(a,b,c)|0;return a|0}function FQ(a){a=+a;var b=0,d=0,e=0,f=0,g=0.0,i=0.0,k=0.0,l=0.0,m=0.0;h[j>>3]=a;b=c[j>>2]|0;d=c[j+4>>2]|0;e=(d|0)<0;do if(e|d>>>0<1048576){if((b|0)==0&(d&2147483647|0)==0){a=-1.0/(a*a);break}if(e){a=(a-a)/0.0;break}else{h[j>>3]=a*18014398509481984.0;d=c[j+4>>2]|0;e=-1077;b=c[j>>2]|0;f=9;break}}else if(d>>>0<=2146435071)if((b|0)==0&0==0&(d|0)==1072693248)a=0.0;else{e=-1023;f=9}while(0);if((f|0)==9){f=d+614242|0;c[j>>2]=b;c[j+4>>2]=(f&1048575)+1072079006;k=+h[j>>3]+-1.0;i=k*(k*.5);l=k/(k+2.0);m=l*l;a=m*m;h[j>>3]=k-i;d=c[j+4>>2]|0;c[j>>2]=0;c[j+4>>2]=d;g=+h[j>>3];a=k-g-i+l*(i+(a*(a*(a*.15313837699209373+.22222198432149784)+.3999999999940942)+m*(a*(a*(a*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));m=g*.4342944818781689;i=+(e+(f>>>20)|0);l=i*.30102999566361177;k=l+m;a=k+(m+(l-k)+(a*.4342944818781689+(i*3.694239077158931e-13+(g+a)*2.5082946711645275e-11)))}return +a}function GQ(a){a=+a;var b=0,d=0,e=0,f=0.0;h[j>>3]=a;e=c[j>>2]|0;d=c[j+4>>2]|0;b=OR(e|0,d|0,52)|0;b=b&2047;c[j>>2]=e;c[j+4>>2]=d&2147483647;a=+h[j>>3];do if(b>>>0<=1048){if(b>>>0>1023){a=+M(+(a*2.0+1.0/(a+ +C(+(a*a+1.0)))));break}if(b>>>0>996){f=a*a;a=+HQ(a+f/(+C(+(f+1.0))+1.0))}}else a=+M(+a)+.6931471805599453;while(0);return +((d|0)<0?-a:a)}function HQ(a){a=+a;var b=0,d=0.0,e=0,f=0.0,g=0,i=0.0,k=0.0,l=0.0,m=0.0;h[j>>3]=a;b=c[j+4>>2]|0;do if((b|0)<0|b>>>0<1071284858)if(b>>>0<=3220176895){g=HR(b|0,0,1)|0;if(g>>>0<2034237440)break;if(b>>>0<3218259653){f=0.0;d=0.0;e=11;break}else{e=8;break}}else{if(a==-1.0){a=-t;break}a=(a-a)/0.0;break}else if(b>>>0<=2146435071)e=8;while(0);if((e|0)==8){d=a+1.0;h[j>>3]=d;b=(c[j+4>>2]|0)+614242|0;e=(b>>>20)+-1023|0;if((e|0)<54){g=(e|0)>1;d=((g?1.0:a)-(d+(g?-a:-1.0)))/d}else d=0.0;c[j>>2]=c[j>>2];c[j+4>>2]=(b&1048575)+1072079006;f=+(e|0);a=+h[j>>3]+-1.0;e=11}if((e|0)==11){i=a*(a*.5);m=a/(a+2.0);l=m*m;k=l*l;a=f*.6931471803691238+(a+(d+f*1.9082149292705877e-10+m*(i+(k*(k*(k*.15313837699209373+.22222198432149784)+.3999999999940942)+l*(k*(k*(k*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)))-i))}return +a}function IQ(a){a=+a;var b=0,d=0.0,e=0.0,f=0,g=0.0,i=0,k=0,l=0.0;h[j>>3]=a;b=c[j+4>>2]|0;f=b&2147483647;b=OR(c[j>>2]|0,b|0,63)|0;do if(f>>>0>1078159481){f=JQ(a)|0;k=z&2147483647;if(!(k>>>0>2146435072|(k|0)==2146435072&f>>>0>0))if(!b)if(a>709.782712893384)a=a*8988465674311579538646525.0e283;else{d=.5;i=12}else a=-1.0}else{if(f>>>0<=1071001154)if(f>>>0<1016070144)break;else{g=0.0;b=0;i=15;break}b=(b|0)!=0;if(f>>>0>=1072734898){d=b?-.5:.5;i=12;break}if(b){b=-1;d=a+.6931471803691238;e=-1.9082149292705877e-10;i=13;break}else{b=1;d=a+-.6931471803691238;e=1.9082149292705877e-10;i=13;break}}while(0);if((i|0)==12){b=~~(a*1.4426950408889634+d);e=+(b|0);d=a-e*.6931471803691238;e=e*1.9082149292705877e-10;i=13}if((i|0)==13){g=d-e;a=g;g=d-g-e;i=15}a:do if((i|0)==15){e=a*.5;d=a*e;l=d*(d*(d*(d*(4.008217827329362e-06-d*2.0109921818362437e-07)+-7.93650757867488e-05)+1.5873015872548146e-03)+-.03333333333333313)+1.0;e=3.0-e*l;e=d*((l-e)/(6.0-a*e));if(!b){a=a-(a*e-d);break}d=a*(e-g)-g-d;switch(b|0){case -1:{a=(a-d)*.5+-.5;break a}case 1:if(a<-.25){a=(d-(a+.5))*-2.0;break a}else{a=(a-d)*2.0+1.0;break a}default:{i=HR(b+1023|0,0,52)|0;k=z;c[j>>2]=i;c[j+4>>2]=k;e=+h[j>>3];if(b>>>0>56){a=a-d+1.0;a=((b|0)==1024?a*2.0*8988465674311579538646525.0e283:e*a)+-1.0;break a}else{f=HR(1023-b|0,0,52)|0;i=z;k=(b|0)<20;c[j>>2]=f;c[j+4>>2]=i;l=+h[j>>3];a=e*((k?1.0-l:1.0)+(a-(k?d:l+d)));break a}}}}while(0);return +a}function JQ(a){a=+a;var b=0;h[j>>3]=a;b=c[j>>2]|0;z=c[j+4>>2]|0;return b|0}function KQ(a){a=+a;var b=0,d=0;h[j>>3]=a;d=c[j+4>>2]|0;b=d&2147483647;c[j>>2]=c[j>>2];c[j+4>>2]=b;a=+h[j>>3];do if(b>>>0>1071748074)if(b>>>0>1077149696){a=1.0-0.0/a;break}else{a=1.0-2.0/(+IQ(a*2.0)+2.0);break}else{if(b>>>0>1070618798){a=+IQ(a*2.0);a=a/(a+2.0);break}if(b>>>0>1048575){a=+IQ(a*-2.0);a=-a/(a+2.0)}}while(0);return +((d|0)<0?-a:a)}function LQ(a){a=+a;var b=0;h[j>>3]=a;b=OR(c[j>>2]|0,c[j+4>>2]|0,52)|0;b=b&2047;do if(b>>>0>=1024)if(b>>>0<1049){a=+M(+(a*2.0-1.0/(+C(+(a*a+-1.0))+a)));break}else{a=+M(+a)+.6931471805599453;break}else{a=a+-1.0;a=+HQ(a+ +C(+(a*a+a*2.0)))}while(0);return +a}function MQ(a){a=+a;var b=0.0,d=0.0,e=0;h[j>>3]=a;e=c[j+4>>2]|0;d=(e|0)<0?-.5:.5;e=e&2147483647;c[j>>2]=c[j>>2];c[j+4>>2]=e;b=+h[j>>3];do if(e>>>0<1082535490){b=+IQ(b);if(e>>>0>=1072693248){a=d*(b+b/(b+1.0));break}if(e>>>0>=1045430272)a=d*(b*2.0-b*b/(b+1.0))}else a=d*2.0*+NQ(b);while(0);return +a}function NQ(a){a=+a;return +(+L(+(a+-1416.0996898839683))*2247116418577894884661631.0e283*2247116418577894884661631.0e283)}function OQ(a){a=+a;var b=0,d=0,e=0,f=0,g=0.0;h[j>>3]=a;f=c[j>>2]|0;d=c[j+4>>2]|0;b=OR(f|0,d|0,52)|0;b=b&2047;c[j>>2]=f;c[j+4>>2]=d&2147483647;a=+h[j>>3];if(b>>>0<1022){if(b>>>0>=991){g=a*2.0;a=g+a*g/(1.0-a);e=5}}else{a=a/(1.0-a)*2.0;e=5}if((e|0)==5)a=+HQ(a)*.5;return +((d|0)<0?-a:a)}function PQ(a){a=+a;var b=0;h[j>>3]=a;b=c[j+4>>2]&2147483647;c[j>>2]=c[j>>2];c[j+4>>2]=b;a=+h[j>>3];do if(b>>>0<1072049730)if(b>>>0<1045430272)a=1.0;else{a=+IQ(a);a=a*a/((a+1.0)*2.0)+1.0}else if(b>>>0<1082535490){a=+L(+a);a=(a+1.0/a)*.5;break}else{a=+NQ(a);break}while(0);return +a}function QQ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+48|0;g=h+16|0;f=h;e=h+32|0;if(!(b&4194368))e=0;else{c[e>>2]=d;i=(c[e>>2]|0)+(4-1)&~(4-1);d=c[i>>2]|0;c[e>>2]=i+4;e=d}c[f>>2]=a;c[f+4>>2]=b|32768;c[f+8>>2]=e;e=eb(5,f|0)|0;if(!((b&524288|0)==0|(e|0)<0)){c[g>>2]=e;c[g+4>>2]=2;c[g+8>>2]=1;va(221,g|0)|0}i=ZP(e)|0;l=h;return i|0}function RQ(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=ZP(Na(195,e|0)|0)|0;l=d;return b|0}function SQ(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=ZP($a(39,e|0)|0)|0;l=d;return b|0}function TQ(){return}function UQ(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;j=l;l=l+32|0;i=j;h=((g|0)<0)<<31>>31;do if((g&4095|0)==0&(h&-4096|0)==0){if(b>>>0>2147483646){c[(_P()|0)>>2]=12;a=-1;break}if(e&16|0)TQ();h=OR(g|0,h|0,12)|0;c[i>>2]=a;c[i+4>>2]=b;c[i+8>>2]=d;c[i+12>>2]=e;c[i+16>>2]=f;c[i+20>>2]=h;a=ZP(Ka(192,i|0)|0)|0}else{c[(_P()|0)>>2]=22;a=-1}while(0);l=j;return a|0}function VQ(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=ZP(ab(10,d|0)|0)|0;l=b;return a|0}function WQ(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;TQ();c[e>>2]=a;c[e+4>>2]=b;b=ZP(Ua(91,e|0)|0)|0;l=d;return b|0}function XQ(a){a=a|0;return ((a|0)==32|(a|0)==9)&1|0}function YQ(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=cQ(a)|0;a=za(6,d|0)|0;a=ZP((a|0)==-4?0:a)|0;l=b;return a|0}function ZQ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;f=l;l=l+32|0;g=f;e=f+20|0;c[g>>2]=a;c[g+4>>2]=0;c[g+8>>2]=b;c[g+12>>2]=e;c[g+16>>2]=d;d=(ZP(Za(140,g|0)|0)|0)!=0;l=f;return (d?-1:c[e>>2]|0)|0}function _Q(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+48|0;f=g+40|0;e=g+8|0;d=g;c[d>>2]=a;c[d+4>>2]=b;d=La(197,d|0)|0;if((d|0)==-9?(c[e>>2]=a,c[e+4>>2]=1,(va(221,e|0)|0)>=0):0){aR(e,a);c[f>>2]=e;c[f+4>>2]=b;b=ZP(Na(195,f|0)|0)|0}else b=ZP(d)|0;l=g;return b|0}function $Q(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+192|0;i=s+152|0;h=s+136|0;r=s+120|0;q=s+104|0;p=s+96|0;m=s+80|0;k=s+64|0;f=s+48|0;n=s+32|0;g=s+16|0;e=s;t=s+176|0;j=s+168|0;c[t>>2]=d;d=(c[t>>2]|0)+(4-1)&~(4-1);o=c[d>>2]|0;c[t>>2]=d+4;o=(b|0)==4?o|32768:o;switch(b|0){case 14:{c[e>>2]=a;c[e+4>>2]=14;c[e+8>>2]=o;d=ZP(va(221,e|0)|0)|0;break}case 9:{c[g>>2]=a;c[g+4>>2]=16;c[g+8>>2]=j;d=va(221,g|0)|0;switch(d|0){case -22:{c[n>>2]=a;c[n+4>>2]=9;c[n+8>>2]=o;d=va(221,n|0)|0;break}case 0:{d=c[j+4>>2]|0;d=(c[j>>2]|0)==2?0-d|0:d;break}default:d=ZP(d)|0}break}case 1030:{c[f>>2]=a;c[f+4>>2]=1030;c[f+8>>2]=o;d=va(221,f|0)|0;do if((d|0)==-22){c[m>>2]=a;c[m+4>>2]=1030;c[m+8>>2]=0;d=va(221,m|0)|0;if((d|0)==-22){c[q>>2]=a;c[q+4>>2]=0;c[q+8>>2]=o;d=va(221,q|0)|0;if((d|0)<=-1)break;c[r>>2]=d;c[r+4>>2]=2;c[r+8>>2]=1;va(221,r|0)|0;break}else{if((d|0)<=-1){d=-22;break}c[p>>2]=d;za(6,p|0)|0;d=-22;break}}else if((d|0)>-1){c[k>>2]=d;c[k+4>>2]=2;c[k+8>>2]=1;va(221,k|0)|0}while(0);d=ZP(d)|0;break}case 15:case 16:case 12:case 13:{c[h>>2]=a;c[h+4>>2]=b;c[h+8>>2]=o;d=ZP(va(221,h|0)|0)|0;break}default:{c[i>>2]=a;c[i+4>>2]=b;c[i+8>>2]=o;d=ZP(va(221,i|0)|0)|0}}l=s;return d|0}function aR(b,c){b=b|0;c=c|0;var d=0,e=0,f=0;d=b;e=46687;f=d+15|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));if(!c){a[b+14>>0]=48;a[b+15>>0]=0}else{e=c;d=14;while(1){d=d+1|0;if(e>>>0<10)break;else e=(e>>>0)/10|0}a[b+d>>0]=0;while(1){d=d+-1|0;a[b+d>>0]=(c>>>0)%10|0|48;if(c>>>0<10)break;else c=(c>>>0)/10|0}}return}function bR(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+64|0;g=h+48|0;f=h+16|0;e=h;c[e>>2]=a;c[e+4>>2]=b;c[e+8>>2]=d;e=jb(207,e|0)|0;if((e|0)==-9?(c[f>>2]=a,c[f+4>>2]=1,(va(221,f|0)|0)>=0):0){aR(f,a);c[g>>2]=f;c[g+4>>2]=b;c[g+8>>2]=d;a=ZP(Pa(212,g|0)|0)|0}else a=ZP(e)|0;l=h;return a|0}function cR(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=a;c[f+4>>2]=b;c[f+8>>2]=d;d=ZP(fb(4,f|0)|0)|0;l=e;return d|0}function dR(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[e+4>>2]=0;c[e+8>>2]=b;c[e+12>>2]=((b|0)<0)<<31>>31;b=ZP(Oa(194,e|0)|0)|0;l=d;return b|0}function eR(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;c[b+4>>2]=0;a=(Sa(b|0,b|0)|0)==0;l=d;return (a?0:c[b>>2]|0)|0}function fR(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=a;c[f+4>>2]=b;c[f+8>>2]=d;d=ZP(wa(85,f|0)|0)|0;l=e;return d|0}function gR(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=ZP(Aa(40,d|0)|0)|0;l=b;return a|0}function hR(){var a=0,b=0;b=l;l=l+16|0;a=ib(201,b|0)|0;l=b;return a|0}function iR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+4112|0;e=g;d=g+8|0;if(a)if(!b){c[(_P()|0)>>2]=22;a=0}else f=4;else{b=4096;a=d;f=4}if((f|0)==4){c[e>>2]=a;c[e+4>>2]=b;if((ZP(Da(183,e|0)|0)|0)>=0){if((a|0)==(d|0))a=DQ(d)|0}else a=0}l=g;return a|0}function jR(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=ZP(Ba(118,d|0)|0)|0;l=b;return a|0}function kR(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=l;l=l+16|0;f=e;c[f>>2]=a;c[f+4>>2]=b;c[f+8>>2]=d;d=ZP(bb(3,f|0)|0)|0;l=e;return d|0}function lR(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=ZP(Wa(33,e|0)|0)|0;l=d;return b|0}function mR(){var a=0,b=0;b=l;l=l+16|0;a=Ca(20,b|0)|0;l=b;return a|0}function nR(a){a=a|0;return (a+-97|0)>>>0<26|0}function oR(a){a=a|0;return ((a|32)+-97|0)>>>0<26|0}function pR(a){a=a|0;var b=0;b=(nR(a)|0)==0;return (b?a:a&95)|0}function qR(){cb(47128);return 47136}function rR(){Ya(47128);return}function sR(a){a=a|0;var b=0,d=0;do if(a){if((c[a+76>>2]|0)<=-1){b=tR(a)|0;break}d=(mQ(a)|0)==0;b=tR(a)|0;if(!d)nQ(a)}else{if(!(c[2218]|0))b=0;else b=sR(c[2218]|0)|0;a=c[(qR()|0)>>2]|0;if(a)do{if((c[a+76>>2]|0)>-1)d=mQ(a)|0;else d=0;if((c[a+20>>2]|0)>>>0>(c[a+28>>2]|0)>>>0)b=tR(a)|0|b;if(d|0)nQ(a);a=c[a+56>>2]|0}while((a|0)!=0);rR()}while(0);return b|0}function tR(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a+20|0;h=a+28|0;if((c[b>>2]|0)>>>0>(c[h>>2]|0)>>>0?(ob[c[a+36>>2]&255](a,0,0)|0,(c[b>>2]|0)==0):0)a=-1;else{d=a+4|0;e=c[d>>2]|0;f=a+8|0;g=c[f>>2]|0;if(e>>>0>>0)ob[c[a+40>>2]&255](a,e-g|0,1)|0;c[a+16>>2]=0;c[h>>2]=0;c[b>>2]=0;c[f>>2]=0;c[d>>2]=0;a=0}return a|0}function uR(a,b){a=a|0;b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=ZP(Ma(196,e|0)|0)|0;l=d;return b|0}function vR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+48|0;f=g+40|0;e=g+8|0;d=g;c[d>>2]=a;c[d+4>>2]=b;d=Ra(94,d|0)|0;if((d|0)==-9?(c[e>>2]=a,c[e+4>>2]=1,(va(221,e|0)|0)>=0):0){aR(e,a);c[f>>2]=e;c[f+4>>2]=b;a=ZP(_a(15,f|0)|0)|0}else a=ZP(d)|0;l=g;return a|0}function wR(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;K=l;l=l+16|0;o=K;do if(a>>>0<245){p=a>>>0<11?16:a+11&-8;a=p>>>3;t=c[11785]|0;d=t>>>a;if(d&3|0){a=(d&1^1)+a|0;d=47180+(a<<1<<2)|0;e=d+8|0;f=c[e>>2]|0;g=f+8|0;h=c[g>>2]|0;do if((d|0)!=(h|0)){if(h>>>0<(c[11789]|0)>>>0)db();b=h+12|0;if((c[b>>2]|0)==(f|0)){c[b>>2]=d;c[e>>2]=h;break}else db()}else c[11785]=t&~(1<>2]=J|3;J=f+J+4|0;c[J>>2]=c[J>>2]|1;J=g;l=K;return J|0}s=c[11787]|0;if(p>>>0>s>>>0){if(d|0){i=2<>>12&16;a=a>>>i;e=a>>>5&8;a=a>>>e;g=a>>>2&4;a=a>>>g;d=a>>>1&2;a=a>>>d;b=a>>>1&1;b=(e|i|g|d|b)+(a>>>b)|0;a=47180+(b<<1<<2)|0;d=a+8|0;g=c[d>>2]|0;i=g+8|0;e=c[i>>2]|0;do if((a|0)!=(e|0)){if(e>>>0<(c[11789]|0)>>>0)db();f=e+12|0;if((c[f>>2]|0)==(g|0)){c[f>>2]=a;c[d>>2]=e;j=t;break}else db()}else{j=t&~(1<>2]=p|3;e=g+p|0;c[e+4>>2]=h|1;c[e+h>>2]=h;if(s|0){f=c[11790]|0;b=s>>>3;d=47180+(b<<1<<2)|0;b=1<>2]|0;if(a>>>0<(c[11789]|0)>>>0)db();else{k=a;m=b}}else{c[11785]=j|b;k=d;m=d+8|0}c[m>>2]=f;c[k+12>>2]=f;c[f+8>>2]=k;c[f+12>>2]=d}c[11787]=h;c[11790]=e;J=i;l=K;return J|0}k=c[11786]|0;if(k){a=(k&0-k)+-1|0;I=a>>>12&16;a=a>>>I;H=a>>>5&8;a=a>>>H;J=a>>>2&4;a=a>>>J;d=a>>>1&2;a=a>>>d;b=a>>>1&1;b=c[47444+((H|I|J|d|b)+(a>>>b)<<2)>>2]|0;a=(c[b+4>>2]&-8)-p|0;d=c[b+16+(((c[b+16>>2]|0)==0&1)<<2)>>2]|0;if(!d){j=b;h=a}else{do{I=(c[d+4>>2]&-8)-p|0;J=I>>>0>>0;a=J?I:a;b=J?d:b;d=c[d+16+(((c[d+16>>2]|0)==0&1)<<2)>>2]|0}while((d|0)!=0);j=b;h=a}f=c[11789]|0;if(j>>>0>>0)db();i=j+p|0;if(j>>>0>=i>>>0)db();g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){n=0;break}}while(1){d=b+20|0;e=c[d>>2]|0;if(e|0){b=e;a=d;continue}d=b+16|0;e=c[d>>2]|0;if(!e)break;else{b=e;a=d}}if(a>>>0>>0)db();else{c[a>>2]=0;n=b;break}}else{e=c[j+8>>2]|0;if(e>>>0>>0)db();b=e+12|0;if((c[b>>2]|0)!=(j|0))db();a=d+8|0;if((c[a>>2]|0)==(j|0)){c[b>>2]=d;c[a>>2]=e;n=d;break}else db()}while(0);a:do if(g|0){b=c[j+28>>2]|0;a=47444+(b<<2)|0;do if((j|0)==(c[a>>2]|0)){c[a>>2]=n;if(!n){c[11786]=k&~(1<>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(j|0)&1)<<2)>>2]=n;if(!n)break a;else break}else db();while(0);a=c[11789]|0;if(n>>>0>>0)db();c[n+24>>2]=g;b=c[j+16>>2]|0;do if(b|0)if(b>>>0>>0)db();else{c[n+16>>2]=b;c[b+24>>2]=n;break}while(0);b=c[j+20>>2]|0;if(b|0)if(b>>>0<(c[11789]|0)>>>0)db();else{c[n+20>>2]=b;c[b+24>>2]=n;break}}while(0);if(h>>>0<16){J=h+p|0;c[j+4>>2]=J|3;J=j+J+4|0;c[J>>2]=c[J>>2]|1}else{c[j+4>>2]=p|3;c[i+4>>2]=h|1;c[i+h>>2]=h;if(s|0){e=c[11790]|0;b=s>>>3;d=47180+(b<<1<<2)|0;b=1<>2]|0;if(a>>>0<(c[11789]|0)>>>0)db();else{q=a;r=b}}else{c[11785]=t|b;q=d;r=d+8|0}c[r>>2]=e;c[q+12>>2]=e;c[e+8>>2]=q;c[e+12>>2]=d}c[11787]=h;c[11790]=i}J=j+8|0;l=K;return J|0}}}else if(a>>>0<=4294967231){a=a+11|0;p=a&-8;k=c[11786]|0;if(k){e=0-p|0;a=a>>>8;if(a)if(p>>>0>16777215)i=31;else{r=(a+1048320|0)>>>16&8;C=a<>>16&4;C=C<>>16&2;i=14-(q|r|i)+(C<>>15)|0;i=p>>>(i+7|0)&1|i<<1}else i=0;d=c[47444+(i<<2)>>2]|0;b:do if(!d){d=0;a=0;C=81}else{a=0;h=p<<((i|0)==31?0:25-(i>>>1)|0);g=0;while(1){f=(c[d+4>>2]&-8)-p|0;if(f>>>0>>0)if(!f){a=d;e=0;f=d;C=85;break b}else{a=d;e=f}f=c[d+20>>2]|0;d=c[d+16+(h>>>31<<2)>>2]|0;g=(f|0)==0|(f|0)==(d|0)?g:f;f=(d|0)==0;if(f){d=g;C=81;break}else h=h<<((f^1)&1)}}while(0);if((C|0)==81){if((d|0)==0&(a|0)==0){a=2<>>12&16;r=r>>>m;j=r>>>5&8;r=r>>>j;n=r>>>2&4;r=r>>>n;q=r>>>1&2;r=r>>>q;d=r>>>1&1;a=0;d=c[47444+((j|m|n|q|d)+(r>>>d)<<2)>>2]|0}if(!d){j=a;i=e}else{f=d;C=85}}if((C|0)==85)while(1){C=0;d=(c[f+4>>2]&-8)-p|0;r=d>>>0>>0;d=r?d:e;a=r?f:a;f=c[f+16+(((c[f+16>>2]|0)==0&1)<<2)>>2]|0;if(!f){j=a;i=d;break}else{e=d;C=85}}if((j|0)!=0?i>>>0<((c[11787]|0)-p|0)>>>0:0){f=c[11789]|0;if(j>>>0>>0)db();h=j+p|0;if(j>>>0>=h>>>0)db();g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){a=j+20|0;b=c[a>>2]|0;if(!b){a=j+16|0;b=c[a>>2]|0;if(!b){s=0;break}}while(1){d=b+20|0;e=c[d>>2]|0;if(e|0){b=e;a=d;continue}d=b+16|0;e=c[d>>2]|0;if(!e)break;else{b=e;a=d}}if(a>>>0>>0)db();else{c[a>>2]=0;s=b;break}}else{e=c[j+8>>2]|0;if(e>>>0>>0)db();b=e+12|0;if((c[b>>2]|0)!=(j|0))db();a=d+8|0;if((c[a>>2]|0)==(j|0)){c[b>>2]=d;c[a>>2]=e;s=d;break}else db()}while(0);c:do if(g){b=c[j+28>>2]|0;a=47444+(b<<2)|0;do if((j|0)==(c[a>>2]|0)){c[a>>2]=s;if(!s){t=k&~(1<>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(j|0)&1)<<2)>>2]=s;if(!s){t=k;break c}else break}else db();while(0);a=c[11789]|0;if(s>>>0>>0)db();c[s+24>>2]=g;b=c[j+16>>2]|0;do if(b|0)if(b>>>0>>0)db();else{c[s+16>>2]=b;c[b+24>>2]=s;break}while(0);b=c[j+20>>2]|0;if(b)if(b>>>0<(c[11789]|0)>>>0)db();else{c[s+20>>2]=b;c[b+24>>2]=s;t=k;break}else t=k}else t=k;while(0);do if(i>>>0>=16){c[j+4>>2]=p|3;c[h+4>>2]=i|1;c[h+i>>2]=i;b=i>>>3;if(i>>>0<256){d=47180+(b<<1<<2)|0;a=c[11785]|0;b=1<>2]|0;if(a>>>0<(c[11789]|0)>>>0)db();else{x=a;y=b}}else{c[11785]=a|b;x=d;y=d+8|0}c[y>>2]=h;c[x+12>>2]=h;c[h+8>>2]=x;c[h+12>>2]=d;break}b=i>>>8;if(b)if(i>>>0>16777215)b=31;else{I=(b+1048320|0)>>>16&8;J=b<>>16&4;J=J<>>16&2;b=14-(H|I|b)+(J<>>15)|0;b=i>>>(b+7|0)&1|b<<1}else b=0;d=47444+(b<<2)|0;c[h+28>>2]=b;a=h+16|0;c[a+4>>2]=0;c[a>>2]=0;a=1<>2]=h;c[h+24>>2]=d;c[h+12>>2]=h;c[h+8>>2]=h;break}a=i<<((b|0)==31?0:25-(b>>>1)|0);e=c[d>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(i|0)){C=139;break}d=e+16+(a>>>31<<2)|0;b=c[d>>2]|0;if(!b){C=136;break}else{a=a<<1;e=b}}if((C|0)==136)if(d>>>0<(c[11789]|0)>>>0)db();else{c[d>>2]=h;c[h+24>>2]=e;c[h+12>>2]=h;c[h+8>>2]=h;break}else if((C|0)==139){b=e+8|0;a=c[b>>2]|0;J=c[11789]|0;if(a>>>0>=J>>>0&e>>>0>=J>>>0){c[a+12>>2]=h;c[b>>2]=h;c[h+8>>2]=a;c[h+12>>2]=e;c[h+24>>2]=0;break}else db()}}else{J=i+p|0;c[j+4>>2]=J|3;J=j+J+4|0;c[J>>2]=c[J>>2]|1}while(0);J=j+8|0;l=K;return J|0}}}else p=-1;while(0);d=c[11787]|0;if(d>>>0>=p>>>0){b=d-p|0;a=c[11790]|0;if(b>>>0>15){J=a+p|0;c[11790]=J;c[11787]=b;c[J+4>>2]=b|1;c[J+b>>2]=b;c[a+4>>2]=p|3}else{c[11787]=0;c[11790]=0;c[a+4>>2]=d|3;J=a+d+4|0;c[J>>2]=c[J>>2]|1}J=a+8|0;l=K;return J|0}h=c[11788]|0;if(h>>>0>p>>>0){H=h-p|0;c[11788]=H;J=c[11791]|0;I=J+p|0;c[11791]=I;c[I+4>>2]=H|1;c[J+4>>2]=p|3;J=J+8|0;l=K;return J|0}if(!(c[11903]|0)){c[11905]=4096;c[11904]=4096;c[11906]=-1;c[11907]=-1;c[11908]=0;c[11896]=0;a=o&-16^1431655768;c[o>>2]=a;c[11903]=a;a=4096}else a=c[11905]|0;i=p+48|0;j=p+47|0;g=a+j|0;f=0-a|0;k=g&f;if(k>>>0<=p>>>0){J=0;l=K;return J|0}a=c[11895]|0;if(a|0?(x=c[11893]|0,y=x+k|0,y>>>0<=x>>>0|y>>>0>a>>>0):0){J=0;l=K;return J|0}d:do if(!(c[11896]&4)){d=c[11791]|0;e:do if(d){e=47588;while(1){a=c[e>>2]|0;if(a>>>0<=d>>>0?(w=e+4|0,(a+(c[w>>2]|0)|0)>>>0>d>>>0):0)break;a=c[e+8>>2]|0;if(!a){C=163;break e}else e=a}b=g-h&f;if(b>>>0<2147483647){a=SR(b|0)|0;if((a|0)==((c[e>>2]|0)+(c[w>>2]|0)|0)){if((a|0)!=(-1|0)){h=b;g=a;C=180;break d}}else{e=a;C=171}}else b=0}else C=163;while(0);do if((C|0)==163){d=SR(0)|0;if((d|0)!=(-1|0)?(b=d,u=c[11904]|0,v=u+-1|0,b=((v&b|0)==0?0:(v+b&0-u)-b|0)+k|0,u=c[11893]|0,v=b+u|0,b>>>0>p>>>0&b>>>0<2147483647):0){y=c[11895]|0;if(y|0?v>>>0<=u>>>0|v>>>0>y>>>0:0){b=0;break}a=SR(b|0)|0;if((a|0)==(d|0)){h=b;g=d;C=180;break d}else{e=a;C=171}}else b=0}while(0);do if((C|0)==171){d=0-b|0;if(!(i>>>0>b>>>0&(b>>>0<2147483647&(e|0)!=(-1|0))))if((e|0)==(-1|0)){b=0;break}else{h=b;g=e;C=180;break d}a=c[11905]|0;a=j-b+a&0-a;if(a>>>0>=2147483647){h=b;g=e;C=180;break d}if((SR(a|0)|0)==(-1|0)){SR(d|0)|0;b=0;break}else{h=a+b|0;g=e;C=180;break d}}while(0);c[11896]=c[11896]|4;C=178}else{b=0;C=178}while(0);if(((C|0)==178?k>>>0<2147483647:0)?(B=SR(k|0)|0,y=SR(0)|0,z=y-B|0,A=z>>>0>(p+40|0)>>>0,!((B|0)==(-1|0)|A^1|B>>>0>>0&((B|0)!=(-1|0)&(y|0)!=(-1|0))^1)):0){h=A?z:b;g=B;C=180}if((C|0)==180){b=(c[11893]|0)+h|0;c[11893]=b;if(b>>>0>(c[11894]|0)>>>0)c[11894]=b;k=c[11791]|0;do if(k){b=47588;while(1){a=c[b>>2]|0;d=b+4|0;e=c[d>>2]|0;if((g|0)==(a+e|0)){C=190;break}f=c[b+8>>2]|0;if(!f)break;else b=f}if(((C|0)==190?(c[b+12>>2]&8|0)==0:0)?k>>>0>>0&k>>>0>=a>>>0:0){c[d>>2]=e+h;J=k+8|0;J=(J&7|0)==0?0:0-J&7;I=k+J|0;J=(c[11788]|0)+(h-J)|0;c[11791]=I;c[11788]=J;c[I+4>>2]=J|1;c[I+J+4>>2]=40;c[11792]=c[11907];break}b=c[11789]|0;if(g>>>0>>0){c[11789]=g;i=g}else i=b;d=g+h|0;b=47588;while(1){if((c[b>>2]|0)==(d|0)){C=198;break}a=c[b+8>>2]|0;if(!a)break;else b=a}if((C|0)==198?(c[b+12>>2]&8|0)==0:0){c[b>>2]=g;n=b+4|0;c[n>>2]=(c[n>>2]|0)+h;n=g+8|0;n=g+((n&7|0)==0?0:0-n&7)|0;b=d+8|0;b=d+((b&7|0)==0?0:0-b&7)|0;m=n+p|0;j=b-n-p|0;c[n+4>>2]=p|3;do if((b|0)!=(k|0)){if((b|0)==(c[11790]|0)){J=(c[11787]|0)+j|0;c[11787]=J;c[11790]=m;c[m+4>>2]=J|1;c[m+J>>2]=J;break}a=c[b+4>>2]|0;if((a&3|0)==1){h=a&-8;f=a>>>3;f:do if(a>>>0>=256){g=c[b+24>>2]|0;e=c[b+12>>2]|0;do if((e|0)==(b|0)){e=b+16|0;d=e+4|0;a=c[d>>2]|0;if(!a){a=c[e>>2]|0;if(!a){H=0;break}else d=e}while(1){e=a+20|0;f=c[e>>2]|0;if(f|0){a=f;d=e;continue}e=a+16|0;f=c[e>>2]|0;if(!f)break;else{a=f;d=e}}if(d>>>0>>0)db();else{c[d>>2]=0;H=a;break}}else{f=c[b+8>>2]|0;if(f>>>0>>0)db();a=f+12|0;if((c[a>>2]|0)!=(b|0))db();d=e+8|0;if((c[d>>2]|0)==(b|0)){c[a>>2]=e;c[d>>2]=f;H=e;break}else db()}while(0);if(!g)break;a=c[b+28>>2]|0;d=47444+(a<<2)|0;do if((b|0)!=(c[d>>2]|0))if(g>>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(b|0)&1)<<2)>>2]=H;if(!H)break f;else break}else db();else{c[d>>2]=H;if(H|0)break;c[11786]=c[11786]&~(1<>>0>>0)db();c[H+24>>2]=g;a=b+16|0;d=c[a>>2]|0;do if(d|0)if(d>>>0>>0)db();else{c[H+16>>2]=d;c[d+24>>2]=H;break}while(0);a=c[a+4>>2]|0;if(!a)break;if(a>>>0<(c[11789]|0)>>>0)db();else{c[H+20>>2]=a;c[a+24>>2]=H;break}}else{d=c[b+8>>2]|0;e=c[b+12>>2]|0;a=47180+(f<<1<<2)|0;do if((d|0)!=(a|0)){if(d>>>0>>0)db();if((c[d+12>>2]|0)==(b|0))break;db()}while(0);if((e|0)==(d|0)){c[11785]=c[11785]&~(1<>>0>>0)db();a=e+8|0;if((c[a>>2]|0)==(b|0)){E=a;break}db()}while(0);c[d+12>>2]=e;c[E>>2]=d}while(0);b=b+h|0;f=h+j|0}else f=j;b=b+4|0;c[b>>2]=c[b>>2]&-2;c[m+4>>2]=f|1;c[m+f>>2]=f;b=f>>>3;if(f>>>0<256){d=47180+(b<<1<<2)|0;a=c[11785]|0;b=1<>2]|0;if(a>>>0>=(c[11789]|0)>>>0){I=a;J=b;break}db()}while(0);c[J>>2]=m;c[I+12>>2]=m;c[m+8>>2]=I;c[m+12>>2]=d;break}b=f>>>8;do if(!b)b=0;else{if(f>>>0>16777215){b=31;break}I=(b+1048320|0)>>>16&8;J=b<>>16&4;J=J<>>16&2;b=14-(H|I|b)+(J<>>15)|0;b=f>>>(b+7|0)&1|b<<1}while(0);e=47444+(b<<2)|0;c[m+28>>2]=b;a=m+16|0;c[a+4>>2]=0;c[a>>2]=0;a=c[11786]|0;d=1<>2]=m;c[m+24>>2]=e;c[m+12>>2]=m;c[m+8>>2]=m;break}a=f<<((b|0)==31?0:25-(b>>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(f|0)){C=265;break}d=e+16+(a>>>31<<2)|0;b=c[d>>2]|0;if(!b){C=262;break}else{a=a<<1;e=b}}if((C|0)==262)if(d>>>0<(c[11789]|0)>>>0)db();else{c[d>>2]=m;c[m+24>>2]=e;c[m+12>>2]=m;c[m+8>>2]=m;break}else if((C|0)==265){b=e+8|0;a=c[b>>2]|0;J=c[11789]|0;if(a>>>0>=J>>>0&e>>>0>=J>>>0){c[a+12>>2]=m;c[b>>2]=m;c[m+8>>2]=a;c[m+12>>2]=e;c[m+24>>2]=0;break}else db()}}else{J=(c[11788]|0)+j|0;c[11788]=J;c[11791]=m;c[m+4>>2]=J|1}while(0);J=n+8|0;l=K;return J|0}b=47588;while(1){a=c[b>>2]|0;if(a>>>0<=k>>>0?(D=a+(c[b+4>>2]|0)|0,D>>>0>k>>>0):0)break;b=c[b+8>>2]|0}f=D+-47|0;a=f+8|0;a=f+((a&7|0)==0?0:0-a&7)|0;f=k+16|0;a=a>>>0>>0?k:a;b=a+8|0;d=g+8|0;d=(d&7|0)==0?0:0-d&7;J=g+d|0;d=h+-40-d|0;c[11791]=J;c[11788]=d;c[J+4>>2]=d|1;c[J+d+4>>2]=40;c[11792]=c[11907];d=a+4|0;c[d>>2]=27;c[b>>2]=c[11897];c[b+4>>2]=c[11898];c[b+8>>2]=c[11899];c[b+12>>2]=c[11900];c[11897]=g;c[11898]=h;c[11900]=0;c[11899]=b;b=a+24|0;do{J=b;b=b+4|0;c[b>>2]=7}while((J+8|0)>>>0>>0);if((a|0)!=(k|0)){g=a-k|0;c[d>>2]=c[d>>2]&-2;c[k+4>>2]=g|1;c[a>>2]=g;b=g>>>3;if(g>>>0<256){d=47180+(b<<1<<2)|0;a=c[11785]|0;b=1<>2]|0;if(a>>>0<(c[11789]|0)>>>0)db();else{F=a;G=b}}else{c[11785]=a|b;F=d;G=d+8|0}c[G>>2]=k;c[F+12>>2]=k;c[k+8>>2]=F;c[k+12>>2]=d;break}b=g>>>8;if(b)if(g>>>0>16777215)d=31;else{I=(b+1048320|0)>>>16&8;J=b<>>16&4;J=J<>>16&2;d=14-(H|I|d)+(J<>>15)|0;d=g>>>(d+7|0)&1|d<<1}else d=0;e=47444+(d<<2)|0;c[k+28>>2]=d;c[k+20>>2]=0;c[f>>2]=0;b=c[11786]|0;a=1<>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}a=g<<((d|0)==31?0:25-(d>>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(g|0)){C=292;break}d=e+16+(a>>>31<<2)|0;b=c[d>>2]|0;if(!b){C=289;break}else{a=a<<1;e=b}}if((C|0)==289)if(d>>>0<(c[11789]|0)>>>0)db();else{c[d>>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}else if((C|0)==292){b=e+8|0;a=c[b>>2]|0;J=c[11789]|0;if(a>>>0>=J>>>0&e>>>0>=J>>>0){c[a+12>>2]=k;c[b>>2]=k;c[k+8>>2]=a;c[k+12>>2]=e;c[k+24>>2]=0;break}else db()}}}else{J=c[11789]|0;if((J|0)==0|g>>>0>>0)c[11789]=g;c[11897]=g;c[11898]=h;c[11900]=0;c[11794]=c[11903];c[11793]=-1;b=0;do{J=47180+(b<<1<<2)|0;c[J+12>>2]=J;c[J+8>>2]=J;b=b+1|0}while((b|0)!=32);J=g+8|0;J=(J&7|0)==0?0:0-J&7;I=g+J|0;J=h+-40-J|0;c[11791]=I;c[11788]=J;c[I+4>>2]=J|1;c[I+J+4>>2]=40;c[11792]=c[11907]}while(0);b=c[11788]|0;if(b>>>0>p>>>0){H=b-p|0;c[11788]=H;J=c[11791]|0;I=J+p|0;c[11791]=I;c[I+4>>2]=H|1;c[J+4>>2]=p|3;J=J+8|0;l=K;return J|0}}c[(_P()|0)>>2]=12;J=0;l=K;return J|0}function xR(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if(!a)return;d=a+-8|0;h=c[11789]|0;if(d>>>0>>0)db();a=c[a+-4>>2]|0;b=a&3;if((b|0)==1)db();e=a&-8;o=d+e|0;a:do if(!(a&1)){a=c[d>>2]|0;if(!b)return;k=d+(0-a)|0;j=a+e|0;if(k>>>0>>0)db();if((k|0)==(c[11790]|0)){a=o+4|0;b=c[a>>2]|0;if((b&3|0)!=3){r=k;f=j;m=k;break}c[11787]=j;c[a>>2]=b&-2;c[k+4>>2]=j|1;c[k+j>>2]=j;return}e=a>>>3;if(a>>>0<256){b=c[k+8>>2]|0;d=c[k+12>>2]|0;a=47180+(e<<1<<2)|0;if((b|0)!=(a|0)){if(b>>>0>>0)db();if((c[b+12>>2]|0)!=(k|0))db()}if((d|0)==(b|0)){c[11785]=c[11785]&~(1<>>0>>0)db();a=d+8|0;if((c[a>>2]|0)==(k|0))g=a;else db()}else g=d+8|0;c[b+12>>2]=d;c[g>>2]=b;r=k;f=j;m=k;break}g=c[k+24>>2]|0;d=c[k+12>>2]|0;do if((d|0)==(k|0)){d=k+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){i=0;break}else b=d}while(1){d=a+20|0;e=c[d>>2]|0;if(e|0){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}if(b>>>0>>0)db();else{c[b>>2]=0;i=a;break}}else{e=c[k+8>>2]|0;if(e>>>0>>0)db();a=e+12|0;if((c[a>>2]|0)!=(k|0))db();b=d+8|0;if((c[b>>2]|0)==(k|0)){c[a>>2]=d;c[b>>2]=e;i=d;break}else db()}while(0);if(g){a=c[k+28>>2]|0;b=47444+(a<<2)|0;do if((k|0)==(c[b>>2]|0)){c[b>>2]=i;if(!i){c[11786]=c[11786]&~(1<>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(k|0)&1)<<2)>>2]=i;if(!i){r=k;f=j;m=k;break a}else break}else db();while(0);d=c[11789]|0;if(i>>>0>>0)db();c[i+24>>2]=g;a=k+16|0;b=c[a>>2]|0;do if(b|0)if(b>>>0>>0)db();else{c[i+16>>2]=b;c[b+24>>2]=i;break}while(0);a=c[a+4>>2]|0;if(a)if(a>>>0<(c[11789]|0)>>>0)db();else{c[i+20>>2]=a;c[a+24>>2]=i;r=k;f=j;m=k;break}else{r=k;f=j;m=k}}else{r=k;f=j;m=k}}else{r=d;f=e;m=d}while(0);if(m>>>0>=o>>>0)db();a=o+4|0;b=c[a>>2]|0;if(!(b&1))db();if(!(b&2)){a=c[11790]|0;if((o|0)==(c[11791]|0)){q=(c[11788]|0)+f|0;c[11788]=q;c[11791]=r;c[r+4>>2]=q|1;if((r|0)!=(a|0))return;c[11790]=0;c[11787]=0;return}if((o|0)==(a|0)){q=(c[11787]|0)+f|0;c[11787]=q;c[11790]=m;c[r+4>>2]=q|1;c[m+q>>2]=q;return}f=(b&-8)+f|0;e=b>>>3;b:do if(b>>>0>=256){g=c[o+24>>2]|0;a=c[o+12>>2]|0;do if((a|0)==(o|0)){d=o+16|0;b=d+4|0;a=c[b>>2]|0;if(!a){a=c[d>>2]|0;if(!a){n=0;break}else b=d}while(1){d=a+20|0;e=c[d>>2]|0;if(e|0){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}if(b>>>0<(c[11789]|0)>>>0)db();else{c[b>>2]=0;n=a;break}}else{b=c[o+8>>2]|0;if(b>>>0<(c[11789]|0)>>>0)db();d=b+12|0;if((c[d>>2]|0)!=(o|0))db();e=a+8|0;if((c[e>>2]|0)==(o|0)){c[d>>2]=a;c[e>>2]=b;n=a;break}else db()}while(0);if(g|0){a=c[o+28>>2]|0;b=47444+(a<<2)|0;do if((o|0)==(c[b>>2]|0)){c[b>>2]=n;if(!n){c[11786]=c[11786]&~(1<>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(o|0)&1)<<2)>>2]=n;if(!n)break b;else break}else db();while(0);d=c[11789]|0;if(n>>>0>>0)db();c[n+24>>2]=g;a=o+16|0;b=c[a>>2]|0;do if(b|0)if(b>>>0>>0)db();else{c[n+16>>2]=b;c[b+24>>2]=n;break}while(0);a=c[a+4>>2]|0;if(a|0)if(a>>>0<(c[11789]|0)>>>0)db();else{c[n+20>>2]=a;c[a+24>>2]=n;break}}}else{b=c[o+8>>2]|0;d=c[o+12>>2]|0;a=47180+(e<<1<<2)|0;if((b|0)!=(a|0)){if(b>>>0<(c[11789]|0)>>>0)db();if((c[b+12>>2]|0)!=(o|0))db()}if((d|0)==(b|0)){c[11785]=c[11785]&~(1<>>0<(c[11789]|0)>>>0)db();a=d+8|0;if((c[a>>2]|0)==(o|0))l=a;else db()}else l=d+8|0;c[b+12>>2]=d;c[l>>2]=b}while(0);c[r+4>>2]=f|1;c[m+f>>2]=f;if((r|0)==(c[11790]|0)){c[11787]=f;return}}else{c[a>>2]=b&-2;c[r+4>>2]=f|1;c[m+f>>2]=f}a=f>>>3;if(f>>>0<256){d=47180+(a<<1<<2)|0;b=c[11785]|0;a=1<>2]|0;if(b>>>0<(c[11789]|0)>>>0)db();else{p=b;q=a}}else{c[11785]=b|a;p=d;q=d+8|0}c[q>>2]=r;c[p+12>>2]=r;c[r+8>>2]=p;c[r+12>>2]=d;return}a=f>>>8;if(a)if(f>>>0>16777215)a=31;else{p=(a+1048320|0)>>>16&8;q=a<>>16&4;q=q<>>16&2;a=14-(o|p|a)+(q<>>15)|0;a=f>>>(a+7|0)&1|a<<1}else a=0;e=47444+(a<<2)|0;c[r+28>>2]=a;c[r+20>>2]=0;c[r+16>>2]=0;b=c[11786]|0;d=1<>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(f|0)){a=124;break}d=e+16+(b>>>31<<2)|0;a=c[d>>2]|0;if(!a){a=121;break}else{b=b<<1;e=a}}if((a|0)==121)if(d>>>0<(c[11789]|0)>>>0)db();else{c[d>>2]=r;c[r+24>>2]=e;c[r+12>>2]=r;c[r+8>>2]=r;break}else if((a|0)==124){a=e+8|0;b=c[a>>2]|0;q=c[11789]|0;if(b>>>0>=q>>>0&e>>>0>=q>>>0){c[b+12>>2]=r;c[a>>2]=r;c[r+8>>2]=b;c[r+12>>2]=e;c[r+24>>2]=0;break}else db()}}else{c[11786]=b|d;c[e>>2]=r;c[r+24>>2]=e;c[r+12>>2]=r;c[r+8>>2]=r}while(0);r=(c[11793]|0)+-1|0;c[11793]=r;if(!r)a=47596;else return;while(1){a=c[a>>2]|0;if(!a)break;else a=a+8|0}c[11793]=-1;return}function yR(a,b){a=a|0;b=b|0;var d=0;if(a){d=O(b,a)|0;if((b|a)>>>0>65535)d=((d>>>0)/(a>>>0)|0|0)==(b|0)?d:-1}else d=0;a=wR(d)|0;if(!a)return a|0;if(!(c[a+-4>>2]&3))return a|0;GR(a|0,0,d|0)|0;return a|0}function zR(a,b){a=a|0;b=b|0;var d=0,e=0;if(!a){b=wR(b)|0;return b|0}if(b>>>0>4294967231){c[(_P()|0)>>2]=12;b=0;return b|0}d=AR(a+-8|0,b>>>0<11?16:b+11&-8)|0;if(d|0){b=d+8|0;return b|0}d=wR(b)|0;if(!d){b=0;return b|0}e=c[a+-4>>2]|0;e=(e&-8)-((e&3|0)==0?8:4)|0;MR(d|0,a|0,(e>>>0>>0?e:b)|0)|0;xR(a);b=d;return b|0}function AR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;o=a+4|0;n=c[o>>2]|0;d=n&-8;k=a+d|0;i=c[11789]|0;e=n&3;if(!((e|0)!=1&a>>>0>=i>>>0&a>>>0>>0))db();f=c[k+4>>2]|0;if(!(f&1))db();if(!e){if(b>>>0<256){a=0;return a|0}if(d>>>0>=(b+4|0)>>>0?(d-b|0)>>>0<=c[11905]<<1>>>0:0)return a|0;a=0;return a|0}if(d>>>0>=b>>>0){d=d-b|0;if(d>>>0<=15)return a|0;m=a+b|0;c[o>>2]=n&1|b|2;c[m+4>>2]=d|3;o=m+d+4|0;c[o>>2]=c[o>>2]|1;BR(m,d);return a|0}if((k|0)==(c[11791]|0)){m=(c[11788]|0)+d|0;d=m-b|0;e=a+b|0;if(m>>>0<=b>>>0){a=0;return a|0}c[o>>2]=n&1|b|2;c[e+4>>2]=d|1;c[11791]=e;c[11788]=d;return a|0}if((k|0)==(c[11790]|0)){f=(c[11787]|0)+d|0;if(f>>>0>>0){a=0;return a|0}d=f-b|0;e=n&1;if(d>>>0>15){n=a+b|0;m=n+d|0;c[o>>2]=e|b|2;c[n+4>>2]=d|1;c[m>>2]=d;e=m+4|0;c[e>>2]=c[e>>2]&-2;e=n}else{c[o>>2]=e|f|2;e=a+f+4|0;c[e>>2]=c[e>>2]|1;e=0;d=0}c[11787]=d;c[11790]=e;return a|0}if(f&2|0){a=0;return a|0}l=(f&-8)+d|0;if(l>>>0>>0){a=0;return a|0}m=l-b|0;g=f>>>3;a:do if(f>>>0>=256){h=c[k+24>>2]|0;f=c[k+12>>2]|0;do if((f|0)==(k|0)){f=k+16|0;e=f+4|0;d=c[e>>2]|0;if(!d){d=c[f>>2]|0;if(!d){j=0;break}else e=f}while(1){f=d+20|0;g=c[f>>2]|0;if(g|0){d=g;e=f;continue}f=d+16|0;g=c[f>>2]|0;if(!g)break;else{d=g;e=f}}if(e>>>0>>0)db();else{c[e>>2]=0;j=d;break}}else{g=c[k+8>>2]|0;if(g>>>0>>0)db();d=g+12|0;if((c[d>>2]|0)!=(k|0))db();e=f+8|0;if((c[e>>2]|0)==(k|0)){c[d>>2]=f;c[e>>2]=g;j=f;break}else db()}while(0);if(h|0){d=c[k+28>>2]|0;e=47444+(d<<2)|0;do if((k|0)==(c[e>>2]|0)){c[e>>2]=j;if(!j){c[11786]=c[11786]&~(1<>>0>=(c[11789]|0)>>>0){c[h+16+(((c[h+16>>2]|0)!=(k|0)&1)<<2)>>2]=j;if(!j)break a;else break}else db();while(0);f=c[11789]|0;if(j>>>0>>0)db();c[j+24>>2]=h;d=k+16|0;e=c[d>>2]|0;do if(e|0)if(e>>>0>>0)db();else{c[j+16>>2]=e;c[e+24>>2]=j;break}while(0);d=c[d+4>>2]|0;if(d|0)if(d>>>0<(c[11789]|0)>>>0)db();else{c[j+20>>2]=d;c[d+24>>2]=j;break}}}else{e=c[k+8>>2]|0;f=c[k+12>>2]|0;d=47180+(g<<1<<2)|0;if((e|0)!=(d|0)){if(e>>>0>>0)db();if((c[e+12>>2]|0)!=(k|0))db()}if((f|0)==(e|0)){c[11785]=c[11785]&~(1<>>0>>0)db();d=f+8|0;if((c[d>>2]|0)==(k|0))h=d;else db()}else h=f+8|0;c[e+12>>2]=f;c[h>>2]=e}while(0);d=n&1;if(m>>>0<16){c[o>>2]=l|d|2;o=a+l+4|0;c[o>>2]=c[o>>2]|1;return a|0}else{n=a+b|0;c[o>>2]=d|b|2;c[n+4>>2]=m|3;o=n+m+4|0;c[o>>2]=c[o>>2]|1;BR(n,m);return a|0}return 0}function BR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;o=a+b|0;d=c[a+4>>2]|0;a:do if(!(d&1)){g=c[a>>2]|0;if(!(d&3))return;l=a+(0-g)|0;k=g+b|0;i=c[11789]|0;if(l>>>0>>0)db();if((l|0)==(c[11790]|0)){a=o+4|0;d=c[a>>2]|0;if((d&3|0)!=3){r=l;f=k;break}c[11787]=k;c[a>>2]=d&-2;c[l+4>>2]=k|1;c[l+k>>2]=k;return}e=g>>>3;if(g>>>0<256){d=c[l+8>>2]|0;b=c[l+12>>2]|0;a=47180+(e<<1<<2)|0;if((d|0)!=(a|0)){if(d>>>0>>0)db();if((c[d+12>>2]|0)!=(l|0))db()}if((b|0)==(d|0)){c[11785]=c[11785]&~(1<>>0>>0)db();a=b+8|0;if((c[a>>2]|0)==(l|0))h=a;else db()}else h=b+8|0;c[d+12>>2]=b;c[h>>2]=d;r=l;f=k;break}g=c[l+24>>2]|0;b=c[l+12>>2]|0;do if((b|0)==(l|0)){b=l+16|0;d=b+4|0;a=c[d>>2]|0;if(!a){a=c[b>>2]|0;if(!a){j=0;break}else d=b}while(1){b=a+20|0;e=c[b>>2]|0;if(e|0){a=e;d=b;continue}b=a+16|0;e=c[b>>2]|0;if(!e)break;else{a=e;d=b}}if(d>>>0>>0)db();else{c[d>>2]=0;j=a;break}}else{e=c[l+8>>2]|0;if(e>>>0>>0)db();a=e+12|0;if((c[a>>2]|0)!=(l|0))db();d=b+8|0;if((c[d>>2]|0)==(l|0)){c[a>>2]=b;c[d>>2]=e;j=b;break}else db()}while(0);if(g){a=c[l+28>>2]|0;d=47444+(a<<2)|0;do if((l|0)==(c[d>>2]|0)){c[d>>2]=j;if(!j){c[11786]=c[11786]&~(1<>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(l|0)&1)<<2)>>2]=j;if(!j){r=l;f=k;break a}else break}else db();while(0);b=c[11789]|0;if(j>>>0>>0)db();c[j+24>>2]=g;a=l+16|0;d=c[a>>2]|0;do if(d|0)if(d>>>0>>0)db();else{c[j+16>>2]=d;c[d+24>>2]=j;break}while(0);a=c[a+4>>2]|0;if(a)if(a>>>0<(c[11789]|0)>>>0)db();else{c[j+20>>2]=a;c[a+24>>2]=j;r=l;f=k;break}else{r=l;f=k}}else{r=l;f=k}}else{r=a;f=b}while(0);h=c[11789]|0;if(o>>>0>>0)db();a=o+4|0;d=c[a>>2]|0;if(!(d&2)){a=c[11790]|0;if((o|0)==(c[11791]|0)){q=(c[11788]|0)+f|0;c[11788]=q;c[11791]=r;c[r+4>>2]=q|1;if((r|0)!=(a|0))return;c[11790]=0;c[11787]=0;return}if((o|0)==(a|0)){q=(c[11787]|0)+f|0;c[11787]=q;c[11790]=r;c[r+4>>2]=q|1;c[r+q>>2]=q;return}f=(d&-8)+f|0;e=d>>>3;b:do if(d>>>0>=256){g=c[o+24>>2]|0;b=c[o+12>>2]|0;do if((b|0)==(o|0)){b=o+16|0;d=b+4|0;a=c[d>>2]|0;if(!a){a=c[b>>2]|0;if(!a){n=0;break}else d=b}while(1){b=a+20|0;e=c[b>>2]|0;if(e|0){a=e;d=b;continue}b=a+16|0;e=c[b>>2]|0;if(!e)break;else{a=e;d=b}}if(d>>>0>>0)db();else{c[d>>2]=0;n=a;break}}else{e=c[o+8>>2]|0;if(e>>>0>>0)db();a=e+12|0;if((c[a>>2]|0)!=(o|0))db();d=b+8|0;if((c[d>>2]|0)==(o|0)){c[a>>2]=b;c[d>>2]=e;n=b;break}else db()}while(0);if(g|0){a=c[o+28>>2]|0;d=47444+(a<<2)|0;do if((o|0)==(c[d>>2]|0)){c[d>>2]=n;if(!n){c[11786]=c[11786]&~(1<>>0>=(c[11789]|0)>>>0){c[g+16+(((c[g+16>>2]|0)!=(o|0)&1)<<2)>>2]=n;if(!n)break b;else break}else db();while(0);b=c[11789]|0;if(n>>>0>>0)db();c[n+24>>2]=g;a=o+16|0;d=c[a>>2]|0;do if(d|0)if(d>>>0>>0)db();else{c[n+16>>2]=d;c[d+24>>2]=n;break}while(0);a=c[a+4>>2]|0;if(a|0)if(a>>>0<(c[11789]|0)>>>0)db();else{c[n+20>>2]=a;c[a+24>>2]=n;break}}}else{d=c[o+8>>2]|0;b=c[o+12>>2]|0;a=47180+(e<<1<<2)|0;if((d|0)!=(a|0)){if(d>>>0>>0)db();if((c[d+12>>2]|0)!=(o|0))db()}if((b|0)==(d|0)){c[11785]=c[11785]&~(1<>>0>>0)db();a=b+8|0;if((c[a>>2]|0)==(o|0))m=a;else db()}else m=b+8|0;c[d+12>>2]=b;c[m>>2]=d}while(0);c[r+4>>2]=f|1;c[r+f>>2]=f;if((r|0)==(c[11790]|0)){c[11787]=f;return}}else{c[a>>2]=d&-2;c[r+4>>2]=f|1;c[r+f>>2]=f}a=f>>>3;if(f>>>0<256){b=47180+(a<<1<<2)|0;d=c[11785]|0;a=1<>2]|0;if(d>>>0<(c[11789]|0)>>>0)db();else{p=d;q=a}}else{c[11785]=d|a;p=b;q=b+8|0}c[q>>2]=r;c[p+12>>2]=r;c[r+8>>2]=p;c[r+12>>2]=b;return}a=f>>>8;if(a)if(f>>>0>16777215)a=31;else{p=(a+1048320|0)>>>16&8;q=a<>>16&4;q=q<>>16&2;a=14-(o|p|a)+(q<>>15)|0;a=f>>>(a+7|0)&1|a<<1}else a=0;e=47444+(a<<2)|0;c[r+28>>2]=a;c[r+20>>2]=0;c[r+16>>2]=0;d=c[11786]|0;b=1<>2]=r;c[r+24>>2]=e;c[r+12>>2]=r;c[r+8>>2]=r;return}d=f<<((a|0)==31?0:25-(a>>>1)|0);e=c[e>>2]|0;while(1){if((c[e+4>>2]&-8|0)==(f|0)){a=121;break}b=e+16+(d>>>31<<2)|0;a=c[b>>2]|0;if(!a){a=118;break}else{d=d<<1;e=a}}if((a|0)==118){if(b>>>0<(c[11789]|0)>>>0)db();c[b>>2]=r;c[r+24>>2]=e;c[r+12>>2]=r;c[r+8>>2]=r;return}else if((a|0)==121){a=e+8|0;d=c[a>>2]|0;q=c[11789]|0;if(!(d>>>0>=q>>>0&e>>>0>=q>>>0))db();c[d+12>>2]=r;c[a>>2]=r;c[r+8>>2]=d;c[r+12>>2]=e;c[r+24>>2]=0;return}}function CR(a,b){a=a|0;b=b|0;if(a>>>0<9){b=wR(b)|0;return b|0}else{b=DR(a,b)|0;return b|0}return 0}function DR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;a=a>>>0>16?a:16;if(a+-1&a){d=16;while(1)if(d>>>0>>0)d=d<<1;else{a=d;break}}if((-64-a|0)>>>0<=b>>>0){c[(_P()|0)>>2]=12;h=0;return h|0}g=b>>>0<11?16:b+11&-8;d=wR(g+12+a|0)|0;if(!d){h=0;return h|0}f=d+-8|0;do if(d&a+-1){e=(d+a+-1&0-a)+-8|0;b=f;e=(e-b|0)>>>0>15?e:e+a|0;b=e-b|0;a=d+-4|0;i=c[a>>2]|0;d=(i&-8)-b|0;if(!(i&3)){c[e>>2]=(c[f>>2]|0)+b;c[e+4>>2]=d;a=e;b=e;break}else{i=e+4|0;c[i>>2]=d|c[i>>2]&1|2;d=e+d+4|0;c[d>>2]=c[d>>2]|1;c[a>>2]=b|c[a>>2]&1|2;c[i>>2]=c[i>>2]|1;BR(f,b);a=e;b=e;break}}else{a=f;b=f}while(0);a=a+4|0;d=c[a>>2]|0;if(d&3|0?(h=d&-8,h>>>0>(g+16|0)>>>0):0){i=h-g|0;h=b+g|0;c[a>>2]=g|d&1|2;c[h+4>>2]=i|3;g=h+i+4|0;c[g>>2]=c[g>>2]|1;BR(h,i)}i=b+8|0;return i|0}function ER(){}function FR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (z=d,a-c>>>0|0)|0}function GR(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}f=h&-4|0;g=f-64|0;i=d|d<<8|d<<16|d<<24;while((b|0)<=(g|0)){c[b>>2]=i;c[b+4>>2]=i;c[b+8>>2]=i;c[b+12>>2]=i;c[b+16>>2]=i;c[b+20>>2]=i;c[b+24>>2]=i;c[b+28>>2]=i;c[b+32>>2]=i;c[b+36>>2]=i;c[b+40>>2]=i;c[b+44>>2]=i;c[b+48>>2]=i;c[b+52>>2]=i;c[b+56>>2]=i;c[b+60>>2]=i;b=b+64|0}while((b|0)<(f|0)){c[b>>2]=i;b=b+4|0}}while((b|0)<(h|0)){a[b>>0]=d;b=b+1|0}return h-e|0}function HR(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){z=b<>>32-c;return a<>>0;return (z=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function JR(b){b=b|0;var c=0;c=a[n+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[n+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (a[n+(b>>>24)>>0]|0)+24|0}function KR(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;l=a;j=b;k=j;h=d;n=e;i=n;if(!k){g=(f|0)!=0;if(!i){if(g){c[f>>2]=(l>>>0)%(h>>>0);c[f+4>>2]=0}n=0;f=(l>>>0)/(h>>>0)>>>0;return (z=n,f)|0}else{if(!g){n=0;f=0;return (z=n,f)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;f=0;return (z=n,f)|0}}g=(i|0)==0;do if(h){if(!g){g=(R(i|0)|0)-(R(k|0)|0)|0;if(g>>>0<=31){m=g+1|0;i=31-g|0;b=g-31>>31;h=m;a=l>>>(m>>>0)&b|k<>>(m>>>0)&b;g=0;i=l<>2]=a|0;c[f+4>>2]=j|b&0;n=0;f=0;return (z=n,f)|0}g=h-1|0;if(g&h|0){i=(R(h|0)|0)+33-(R(k|0)|0)|0;p=64-i|0;m=32-i|0;j=m>>31;o=i-32|0;b=o>>31;h=i;a=m-1>>31&k>>>(o>>>0)|(k<>>(i>>>0))&b;b=b&k>>>(i>>>0);g=l<>>(o>>>0))&j|l<>31;break}if(f|0){c[f>>2]=g&l;c[f+4>>2]=0}if((h|0)==1){o=j|b&0;p=a|0|0;return (z=o,p)|0}else{p=JR(h|0)|0;o=k>>>(p>>>0)|0;p=k<<32-p|l>>>(p>>>0)|0;return (z=o,p)|0}}else{if(g){if(f|0){c[f>>2]=(k>>>0)%(h>>>0);c[f+4>>2]=0}o=0;p=(k>>>0)/(h>>>0)>>>0;return (z=o,p)|0}if(!l){if(f|0){c[f>>2]=0;c[f+4>>2]=(k>>>0)%(i>>>0)}o=0;p=(k>>>0)/(i>>>0)>>>0;return (z=o,p)|0}g=i-1|0;if(!(g&i)){if(f|0){c[f>>2]=a|0;c[f+4>>2]=g&k|b&0}o=0;p=k>>>((JR(i|0)|0)>>>0);return (z=o,p)|0}g=(R(i|0)|0)-(R(k|0)|0)|0;if(g>>>0<=30){b=g+1|0;i=31-g|0;h=b;a=k<>>(b>>>0);b=k>>>(b>>>0);g=0;i=l<>2]=a|0;c[f+4>>2]=j|b&0;o=0;p=0;return (z=o,p)|0}while(0);if(!h){k=i;j=0;i=0}else{m=d|0|0;l=n|e&0;k=IR(m|0,l|0,-1,-1)|0;d=z;j=i;i=0;do{e=j;j=g>>>31|j<<1;g=i|g<<1;e=a<<1|e>>>31|0;n=a>>>31|b<<1|0;FR(k|0,d|0,e|0,n|0)|0;p=z;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;a=FR(e|0,n|0,o&m|0,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l|0)|0;b=z;h=h-1|0}while((h|0)!=0);k=j;j=0}h=0;if(f|0){c[f>>2]=a;c[f+4>>2]=b}o=(g|0)>>>31|(k|h)<<1|(h<<1|g>>>31)&0|j;p=(g<<1|0>>>31)&-2|i;return (z=o,p)|0}function LR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=FR(j^a|0,i^b|0,j|0,i|0)|0;g=z;a=f^j;b=e^i;return FR((KR(h,g,FR(f^c|0,e^d|0,f|0,e|0)|0,z,0)|0)^a|0,z^b|0,a|0,b|0)|0}function MR(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192)return Ta(b|0,d|0,e|0)|0;h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function NR(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function OR(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){z=b>>>c;return a>>>c|(b&(1<>>c-32|0}function PR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return KR(a,b,c,d,0)|0}function QR(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=O(e,f)|0;d=a>>>16;a=(c>>>16)+(O(e,d)|0)|0;e=b>>>16;b=O(e,f)|0;return (z=(a>>>16)+(O(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function RR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=QR(e,f)|0;a=z;return (z=(O(b,f)|0)+(O(d,e)|0)+a|a&0,c|0|0)|0}function SR(a){a=a|0;var b=0,d=0;d=a+15&-16|0;b=c[i>>2]|0;a=b+d|0;if((d|0)>0&(a|0)<(b|0)|(a|0)<0){W()|0;Ja(12);return -1}c[i>>2]=a;if((a|0)>(V()|0)?(U()|0)==0:0){c[i>>2]=b;Ja(12);return -1}return b|0}function TR(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else MR(b,c,d)|0;return b|0}function UR(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=l;l=l+16|0;f=g|0;KR(a,b,d,e,f)|0;l=g;return (z=c[f+4>>2]|0,c[f>>2]|0)|0}function VR(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=l;l=l+16|0;i=f|0;h=b>>31|((b|0)<0?-1:0)<<1;g=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;k=e>>31|((e|0)<0?-1:0)<<1;j=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;a=FR(h^a|0,g^b|0,h|0,g|0)|0;b=z;KR(a,b,FR(k^d|0,j^e|0,k|0,j|0)|0,z,i)|0;e=FR(c[i>>2]^h|0,c[i+4>>2]^g|0,h|0,g|0)|0;d=z;l=f;return (z=d,e)|0}function WR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ob[a&255](b|0,c|0,d|0)|0}function XR(a,b,c){a=a|0;b=b|0;c=c|0;return Y(0,a|0,b|0,c|0)|0}function YR(a,b,c){a=a|0;b=b|0;c=c|0;return Y(1,a|0,b|0,c|0)|0}function ZR(a,b,c){a=a|0;b=b|0;c=c|0;return Y(2,a|0,b|0,c|0)|0}function _R(a,b,c){a=a|0;b=b|0;c=c|0;return Y(3,a|0,b|0,c|0)|0}function $R(a,b,c){a=a|0;b=b|0;c=c|0;return Y(4,a|0,b|0,c|0)|0}function aS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(5,a|0,b|0,c|0)|0}function bS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(6,a|0,b|0,c|0)|0}function cS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(7,a|0,b|0,c|0)|0}function dS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(8,a|0,b|0,c|0)|0}function eS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(9,a|0,b|0,c|0)|0}function fS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(10,a|0,b|0,c|0)|0}function gS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(11,a|0,b|0,c|0)|0}function hS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(12,a|0,b|0,c|0)|0} +function uK(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;C=l;l=l+80|0;y=C+68|0;A=C+64|0;B=C+60|0;i=C+56|0;j=C+52|0;k=C+48|0;m=C+44|0;n=C+40|0;o=C+36|0;p=C+32|0;q=C+28|0;r=C+24|0;s=C+20|0;t=C+16|0;u=C+12|0;v=C+8|0;w=C+4|0;x=C;c[A>>2]=a;c[B>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=g;c[n>>2]=h;c[s>>2]=c[c[B>>2]>>2];if(!(c[s>>2]|0)){c[s>>2]=Yd(64)|0;if(!(c[s>>2]|0)){c[y>>2]=7;B=c[y>>2]|0;l=C;return B|0}a=c[s>>2]|0;b=a+64|0;do{c[a>>2]=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48>>2]|0)+(c[r>>2]|0)|0,B,((B|0)<0)<<31>>31)|0;c[r>>2]=(c[r>>2]|0)+B;MR((c[(c[s>>2]|0)+48>>2]|0)+(c[r>>2]|0)|0,c[m>>2]|0,c[n>>2]|0)|0;c[(c[s>>2]|0)+44>>2]=(c[r>>2]|0)+(c[n>>2]|0);if(c[i>>2]|0){do if((c[k>>2]|0)>(c[(c[s>>2]|0)+32>>2]|0)){c[x>>2]=Df(c[(c[s>>2]|0)+36>>2]|0,c[k>>2]<<1)|0;if(c[x>>2]|0){c[(c[s>>2]|0)+32>>2]=c[k>>2]<<1;c[(c[s>>2]|0)+36>>2]=c[x>>2];c[(c[s>>2]|0)+24>>2]=c[x>>2];break}c[y>>2]=7;B=c[y>>2]|0;l=C;return B|0}while(0);MR(c[(c[s>>2]|0)+24>>2]|0,c[j>>2]|0,c[k>>2]|0)|0}else c[(c[s>>2]|0)+24>>2]=c[j>>2];c[(c[s>>2]|0)+28>>2]=c[k>>2];c[y>>2]=0;B=c[y>>2]|0;l=C;return B|0}function vK(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;o=s+36|0;p=s+32|0;q=s+28|0;r=s+24|0;k=s+20|0;h=s+16|0;i=s+12|0;m=s+8|0;j=s+4|0;n=s;c[p>>2]=a;c[q>>2]=b;c[r>>2]=d;c[k>>2]=e;c[h>>2]=f;c[i>>2]=g;c[m>>2]=0;c[n>>2]=0;c[j>>2]=0;while(1){if(c[m>>2]|0)break;if((c[j>>2]|0)>=(c[i>>2]|0))break;c[m>>2]=JK(c[p>>2]|0,c[(c[h>>2]|0)+(c[j>>2]<<2)>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+1}if(c[m>>2]|0){c[o>>2]=c[m>>2];r=c[o>>2]|0;l=s;return r|0}a=c[p>>2]|0;if((c[k>>2]|0)==-2){c[m>>2]=nK(a,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>>2]|0){u=c[s>>2]|0;l=v;return u|0}u=q;pI(c[o>>2]|0,1,c[u>>2]|0,c[u+4>>2]|0)|0;Hr(c[o>>2]|0)|0;c[s>>2]=Er(c[o>>2]|0)|0;u=c[s>>2]|0;l=v;return u|0}function yK(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}Kd(c[(c[b>>2]|0)+48>>2]|0);Kd(c[(c[b>>2]|0)+36>>2]|0);BK(c[c[b>>2]>>2]|0);Kd(c[b>>2]|0);l=d;return}function zK(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(!(c[b>>2]|0)){l=e;return}c[d>>2]=0;while(1){a=c[c[b>>2]>>2]|0;if((c[d>>2]|0)>=(c[(c[b>>2]|0)+4>>2]|0))break;AK(c[a+(c[d>>2]<<2)>>2]|0);c[d>>2]=(c[d>>2]|0)+1}Kd(a);Kd(c[(c[b>>2]|0)+16>>2]|0);c[(c[b>>2]|0)+4>>2]=0;c[c[b>>2]>>2]=0;c[(c[b>>2]|0)+16>>2]=0;l=e;return}function AK(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if(!(c[b>>2]|0)){b=c[b>>2]|0;Kd(b);l=e;return}if(!(c[(c[b>>2]|0)+56>>2]|0))Kd(c[(c[b>>2]|0)+64>>2]|0);if(!(d[(c[b>>2]|0)+5>>0]|0))Kd(c[(c[b>>2]|0)+40>>2]|0);zI(c[(c[b>>2]|0)+52>>2]|0)|0;b=c[b>>2]|0;Kd(b);l=e;return}function BK(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;if(!(c[b>>2]|0)){l=f;return}c[d>>2]=c[(c[b>>2]|0)+8>>2];BK(c[c[d>>2]>>2]|0);while(1){if(!(c[d>>2]|0))break;c[e>>2]=c[(c[d>>2]|0)+4>>2];if((c[(c[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er(c[z>>2]|0)|0}c[q>>2]=c[A>>2];E=c[q>>2]|0;l=D;return E|0}function GK(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;h=l;l=l+32|0;i=h+16|0;k=h+12|0;j=h;g=h+8|0;c[i>>2]=b;c[k>>2]=d;d=j;c[d>>2]=e;c[d+4>>2]=f;f=j;c[g>>2]=10-(HK(c[f>>2]|0,c[f+4>>2]|0)|0);a[(c[(c[i>>2]|0)+36>>2]|0)+(c[g>>2]|0)>>0]=c[k>>2];f=j;IK((c[(c[i>>2]|0)+36>>2]|0)+((c[g>>2]|0)+1)|0,c[f>>2]|0,c[f+4>>2]|0)|0;l=h;return c[g>>2]|0}function HK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f;e=f+8|0;g=d;c[g>>2]=a;c[g+4>>2]=b;c[e>>2]=0;do{c[e>>2]=(c[e>>2]|0)+1;b=d;b=OR(c[b>>2]|0,c[b+4>>2]|0,7)|0;g=d;c[g>>2]=b;c[g+4>>2]=z;g=d}while((c[g>>2]|0)!=0|(c[g+4>>2]|0)!=0);l=f;return c[e>>2]|0}function IK(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;g=j+20|0;k=j+8|0;h=j+16|0;i=j;c[g>>2]=b;b=k;c[b>>2]=e;c[b+4>>2]=f;c[h>>2]=c[g>>2];b=k;e=c[b+4>>2]|0;f=i;c[f>>2]=c[b>>2];c[f+4>>2]=e;do{k=(c[i>>2]&127|128)&255;f=c[h>>2]|0;c[h>>2]=f+1;a[f>>0]=k;f=i;f=OR(c[f>>2]|0,c[f+4>>2]|0,7)|0;k=i;c[k>>2]=f;c[k+4>>2]=z;k=i}while((c[k>>2]|0)!=0|(c[k+4>>2]|0)!=0);k=(c[h>>2]|0)+-1|0;a[k>>0]=(d[k>>0]|0)&127;l=j;return (c[h>>2]|0)-(c[g>>2]|0)|0}function JK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;b=(c[e>>2]|0)+8|0;if(!((c[b>>2]|0)!=0|(c[b+4>>2]|0)!=0)){g=c[f>>2]|0;l=h;return g|0}c[f>>2]=nK(c[d>>2]|0,17,g,0)|0;if(c[f>>2]|0){g=c[f>>2]|0;l=h;return g|0}d=(c[e>>2]|0)+8|0;pI(c[g>>2]|0,1,c[d>>2]|0,c[d+4>>2]|0)|0;e=(c[e>>2]|0)+24|0;pI(c[g>>2]|0,2,c[e>>2]|0,c[e+4>>2]|0)|0;Hr(c[g>>2]|0)|0;c[f>>2]=Er(c[g>>2]|0)|0;g=c[f>>2]|0;l=h;return g|0}function KK(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k+12|0;i=k+8|0;j=k;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[k+4>>2]=f;c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[h>>2]|0)){b=5;break}if((a[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0)!=(a[(c[i>>2]|0)+(c[j>>2]|0)>>0]|0)){b=5;break}c[j>>2]=(c[j>>2]|0)+1}if((b|0)==5){l=k;return c[j>>2]|0}return 0}function LK(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=l;l=l+64|0;v=w+56|0;q=w+52|0;r=w+48|0;s=w+44|0;t=w+40|0;m=w+36|0;u=w+32|0;n=w+28|0;o=w+24|0;g=w+20|0;h=w+16|0;i=w+12|0;j=w+8|0;k=w+4|0;p=w;c[q>>2]=a;c[r>>2]=b;c[s>>2]=d;c[t>>2]=e;c[m>>2]=f;c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>2]|0)+28>>2]=c[k>>2];break}c[v>>2]=7;v=c[v>>2]|0;l=w;return v|0}while(0);c[(c[u>>2]|0)+16>>2]=c[(c[u>>2]|0)+28>>2];MR(c[(c[u>>2]|0)+16>>2]|0,c[t>>2]|0,c[m>>2]|0)|0;b=c[m>>2]|0;a=c[u>>2]|0}else{c[(c[u>>2]|0)+16>>2]=c[t>>2];b=c[m>>2]|0;a=c[u>>2]|0}c[a+20>>2]=b;c[v>>2]=0;v=c[v>>2]|0;l=w;return v|0}while(0);c[o>>2]=Yd(40+(c[(c[q>>2]|0)+224>>2]|0)|0)|0;if(!(c[o>>2]|0)){c[v>>2]=7;v=c[v>>2]|0;l=w;return v|0}a=c[o>>2]|0;b=a+40|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[(c[o>>2]|0)+32>>2]=11;c[(c[o>>2]|0)+36>>2]=(c[o>>2]|0)+40;if(c[u>>2]|0){c[p>>2]=c[c[u>>2]>>2];c[n>>2]=LK(c[q>>2]|0,p,c[s>>2]|0,c[t>>2]|0,c[m>>2]|0)|0;if(!(c[c[u>>2]>>2]|0))c[c[u>>2]>>2]=c[p>>2];c[(c[u>>2]|0)+4>>2]=c[o>>2];c[(c[o>>2]|0)+8>>2]=c[(c[u>>2]|0)+8>>2];c[c[o>>2]>>2]=c[p>>2];c[(c[o>>2]|0)+28>>2]=c[(c[u>>2]|0)+28>>2];c[(c[o>>2]|0)+24>>2]=c[(c[u>>2]|0)+24>>2];c[(c[u>>2]|0)+28>>2]=0}else{c[(c[o>>2]|0)+8>>2]=c[o>>2];c[n>>2]=LK(c[q>>2]|0,o,c[s>>2]|0,c[t>>2]|0,c[m>>2]|0)|0}c[c[r>>2]>>2]=c[o>>2];c[v>>2]=c[n>>2];v=c[v>>2]|0;l=w;return v|0}function MK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=((c[(c[d>>2]|0)+80>>2]|0)==0&1)-((c[(c[e>>2]|0)+80>>2]|0)==0&1);if(c[f>>2]|0){f=c[f>>2]|0;l=g;return f|0}a=(c[d>>2]|0)+88|0;b=(c[e>>2]|0)+88|0;if((c[a>>2]|0)==(c[b>>2]|0)?(c[a+4>>2]|0)==(c[b+4>>2]|0):0){c[f>>2]=(c[c[e>>2]>>2]|0)-(c[c[d>>2]>>2]|0);f=c[f>>2]|0;l=g;return f|0}else{d=(c[d>>2]|0)+88|0;a=c[d+4>>2]|0;e=(c[e>>2]|0)+88|0;b=c[e+4>>2]|0;c[f>>2]=(a|0)<(b|0)|((a|0)==(b|0)?(c[d>>2]|0)>>>0<(c[e>>2]|0)>>>0:0)?1:-1;f=c[f>>2]|0;l=g;return f|0}return 0}function NK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=((c[(c[d>>2]|0)+80>>2]|0)==0&1)-((c[(c[e>>2]|0)+80>>2]|0)==0&1);if(c[f>>2]|0){f=c[f>>2]|0;l=g;return f|0}a=(c[d>>2]|0)+88|0;b=(c[e>>2]|0)+88|0;if((c[a>>2]|0)==(c[b>>2]|0)?(c[a+4>>2]|0)==(c[b+4>>2]|0):0){c[f>>2]=(c[c[e>>2]>>2]|0)-(c[c[d>>2]>>2]|0);f=c[f>>2]|0;l=g;return f|0}else{d=(c[d>>2]|0)+88|0;a=c[d+4>>2]|0;e=(c[e>>2]|0)+88|0;b=c[e+4>>2]|0;c[f>>2]=(a|0)>(b|0)|((a|0)==(b|0)?(c[d>>2]|0)>>>0>(c[e>>2]|0)>>>0:0)?1:-1;f=c[f>>2]|0;l=g;return f|0}return 0}function OK(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if(d[(c[b>>2]|0)+5>>0]|0|0){b=c[b>>2]|0;b=b+40|0;c[b>>2]=0;l=e;return}Kd(c[(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+68>>2]|0)){c[o>>2]=(c[r>>2]|0)+(c[n>>2]|0)<<1;c[p>>2]=Df(c[(c[t>>2]|0)+64>>2]|0,c[o>>2]|0)|0;if(c[p>>2]|0){c[(c[t>>2]|0)+64>>2]=c[p>>2];c[(c[t>>2]|0)+68>>2]=c[o>>2];break}c[s>>2]=7;u=c[s>>2]|0;l=v;return u|0}while(0);c[q>>2]=aL(c[t>>2]|0,c[u>>2]|0,(c[n>>2]|0)+10|0)|0;if(c[q>>2]|0){c[s>>2]=c[q>>2];u=c[s>>2]|0;l=v;return u|0}MR((c[(c[t>>2]|0)+64>>2]|0)+(c[r>>2]|0)|0,c[u>>2]|0,c[n>>2]|0)|0;c[(c[t>>2]|0)+60>>2]=(c[r>>2]|0)+(c[n>>2]|0);c[u>>2]=(c[u>>2]|0)+(c[n>>2]|0);b=c[u>>2]|0;if(d[c[u>>2]>>0]&128|0)b=ZK(b,(c[t>>2]|0)+76|0)|0;else{c[(c[t>>2]|0)+76>>2]=d[b>>0];b=1}c[u>>2]=(c[u>>2]|0)+b;c[(c[t>>2]|0)+72>>2]=c[u>>2];c[(c[t>>2]|0)+80>>2]=0;do if(((c[(c[t>>2]|0)+72>>2]|0)+(c[(c[t>>2]|0)+76>>2]|0)|0)>>>0<=((c[(c[t>>2]|0)+40>>2]|0)+(c[(c[t>>2]|0)+44>>2]|0)|0)>>>0){if((c[(c[t>>2]|0)+48>>2]|0)==0?a[(c[(c[t>>2]|0)+72>>2]|0)+((c[(c[t>>2]|0)+76>>2]|0)-1)>>0]|0:0)break;c[s>>2]=0;u=c[s>>2]|0;l=v;return u|0}while(0);c[s>>2]=267;u=c[s>>2]|0;l=v;return u|0}c[s>>2]=267;u=c[s>>2]|0;l=v;return u|0}function QK(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;if(c[(c[d>>2]|0)+40>>2]|0?c[(c[e>>2]|0)+40>>2]|0:0){c[g>>2]=(c[(c[d>>2]|0)+60>>2]|0)-(c[(c[e>>2]|0)+60>>2]|0);a=c[(c[d>>2]|0)+64>>2]|0;b=c[(c[e>>2]|0)+64>>2]|0;if((c[g>>2]|0)<0)c[f>>2]=wQ(a,b,c[(c[d>>2]|0)+60>>2]|0)|0;else c[f>>2]=wQ(a,b,c[(c[e>>2]|0)+60>>2]|0)|0;if(!(c[f>>2]|0))c[f>>2]=c[g>>2]}else c[f>>2]=((c[(c[d>>2]|0)+40>>2]|0)==0&1)-((c[(c[e>>2]|0)+40>>2]|0)==0&1);if(c[f>>2]|0){g=c[f>>2]|0;l=h;return g|0}c[f>>2]=(c[c[e>>2]>>2]|0)-(c[c[d>>2]>>2]|0);g=c[f>>2]|0;l=h;return g|0}function RK(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+24|0;h=n+20|0;i=n+16|0;j=n+12|0;k=n+8|0;m=n+4|0;f=n;c[g>>2]=a;c[h>>2]=b;c[i>>2]=d;c[j>>2]=e;if((c[i>>2]|0)==(c[h>>2]|0))c[i>>2]=(c[i>>2]|0)+-1;c[k>>2]=(c[i>>2]|0)-1;while(1){if((c[k>>2]|0)<0)break;c[m>>2]=c[k>>2];while(1){if((c[m>>2]|0)>=((c[h>>2]|0)-1|0))break;if((yb[c[j>>2]&255](c[(c[g>>2]|0)+(c[m>>2]<<2)>>2]|0,c[(c[g>>2]|0)+((c[m>>2]|0)+1<<2)>>2]|0)|0)<0)break;c[f>>2]=c[(c[g>>2]|0)+((c[m>>2]|0)+1<<2)>>2];c[(c[g>>2]|0)+((c[m>>2]|0)+1<<2)>>2]=c[(c[g>>2]|0)+(c[m>>2]<<2)>>2];c[(c[g>>2]|0)+(c[m>>2]<<2)>>2]=c[f>>2];c[m>>2]=(c[m>>2]|0)+1}c[k>>2]=(c[k>>2]|0)+-1}l=n;return}function SK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;do if((c[h>>2]|0)>(c[(c[f>>2]|0)+20>>2]|0)){c[(c[f>>2]|0)+20>>2]=c[h>>2]<<1;c[i>>2]=Df(c[(c[f>>2]|0)+16>>2]|0,c[(c[f>>2]|0)+20>>2]|0)|0;if(c[i>>2]|0){c[(c[f>>2]|0)+16>>2]=c[i>>2];break}c[e>>2]=7;i=c[e>>2]|0;l=j;return i|0}while(0);MR(c[(c[f>>2]|0)+16>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;c[e>>2]=0;i=c[e>>2]|0;l=j;return i|0}function TK(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+12|0;f=j+8|0;g=j+4|0;h=j+16|0;i=j;c[k>>2]=b;c[f>>2]=e;c[g>>2]=0;if(d[(c[k>>2]|0)+231>>0]|0|0?c[(c[f>>2]|0)+56>>2]|0:0){a[h>>0]=0;k=(c[f>>2]|0)+88|0;c[k>>2]=0;c[k+4>>2]=0;c[(c[f>>2]|0)+84>>2]=0;_K(0,c[(c[f>>2]|0)+72>>2]|0,c[(c[f>>2]|0)+76>>2]|0,(c[f>>2]|0)+80|0,(c[f>>2]|0)+88|0,(c[f>>2]|0)+84|0,h);k=c[g>>2]|0;l=j;return k|0}c[g>>2]=aL(c[f>>2]|0,c[(c[f>>2]|0)+72>>2]|0,10)|0;if(c[g>>2]|0){k=c[g>>2]|0;l=j;return k|0}c[i>>2]=YK(c[(c[f>>2]|0)+72>>2]|0,(c[f>>2]|0)+88|0)|0;c[(c[f>>2]|0)+80>>2]=(c[(c[f>>2]|0)+72>>2]|0)+(c[i>>2]|0);k=c[g>>2]|0;l=j;return k|0}function UK(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;q=u+36|0;r=u+32|0;s=u+28|0;j=u+24|0;k=u+20|0;t=u+16|0;n=u+12|0;h=u+41|0;i=u+40|0;o=u+8|0;p=u;c[r>>2]=b;c[s>>2]=e;c[j>>2]=f;c[k>>2]=g;c[t>>2]=0;c[n>>2]=c[(c[s>>2]|0)+80>>2];a[h>>0]=0;if(d[(c[r>>2]|0)+231>>0]|0?c[(c[s>>2]|0)+56>>2]|0:0){a[i>>0]=0;if(c[j>>2]|0){c[c[j>>2]>>2]=c[(c[s>>2]|0)+80>>2];c[c[k>>2]>>2]=(c[(c[s>>2]|0)+84>>2]|0)-1}_K(0,c[(c[s>>2]|0)+72>>2]|0,c[(c[s>>2]|0)+76>>2]|0,n,(c[s>>2]|0)+88|0,(c[s>>2]|0)+84|0,i);t=(a[i>>0]|0)!=0;c[(t?c[s>>2]|0:c[s>>2]|0)+80>>2]=t?0:c[n>>2]|0}else m=6;do if((m|0)==6){c[o>>2]=(c[(c[s>>2]|0)+72>>2]|0)+(c[(c[s>>2]|0)+76>>2]|0);while(1){while(1){if(!(a[c[n>>2]>>0]|a[h>>0]))break;g=c[n>>2]|0;c[n>>2]=g+1;a[h>>0]=a[g>>0]&128}if(!(c[(c[s>>2]|0)+52>>2]|0))break;if((c[n>>2]|0)>>>0<((c[(c[s>>2]|0)+40>>2]|0)+(c[(c[s>>2]|0)+48>>2]|0)|0)>>>0)break;c[t>>2]=$K(c[s>>2]|0)|0;if(c[t>>2]|0){m=13;break}}if((m|0)==13){c[q>>2]=c[t>>2];t=c[q>>2]|0;l=u;return t|0}c[n>>2]=(c[n>>2]|0)+1;if(c[j>>2]|0){c[c[j>>2]>>2]=c[(c[s>>2]|0)+80>>2];c[c[k>>2]>>2]=(c[n>>2]|0)-(c[(c[s>>2]|0)+80>>2]|0)-1}while(1){if((c[n>>2]|0)>>>0<(c[o>>2]|0)>>>0)b=(a[c[n>>2]>>0]|0)==0;else b=0;e=c[n>>2]|0;if(!b)break;c[n>>2]=e+1}b=c[s>>2]|0;if(e>>>0>=(c[o>>2]|0)>>>0){c[b+80>>2]=0;break}c[t>>2]=aL(b,c[n>>2]|0,10)|0;if(!(c[t>>2]|0)){o=c[n>>2]|0;o=o+(YK(c[n>>2]|0,p)|0)|0;c[(c[s>>2]|0)+80>>2]=o;r=(a[(c[r>>2]|0)+231>>0]|0)!=0;o=p;n=c[o>>2]|0;o=c[o+4>>2]|0;t=(c[s>>2]|0)+88|0;m=t;k=c[m>>2]|0;m=c[m+4>>2]|0;p=IR(k|0,m|0,n|0,o|0)|0;s=z;o=FR(k|0,m|0,n|0,o|0)|0;c[t>>2]=r?o:p;c[t+4>>2]=r?z:s}}while(0);c[q>>2]=0;t=c[q>>2]|0;l=u;return t|0}function VK(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;m=t+32|0;n=t+28|0;o=t+24|0;p=t+20|0;q=t+16|0;r=t+12|0;h=t+8|0;i=t+4|0;j=t;k=t+36|0;c[m>>2]=b;c[n>>2]=e;c[o>>2]=f;c[p>>2]=g;c[q>>2]=c[c[o>>2]>>2];c[r>>2]=c[c[p>>2]>>2];c[h>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[i>>2]=0;c[j>>2]=c[q>>2];while(1){a[k>>0]=0;while(1){if((c[j>>2]|0)>>>0>=(c[h>>2]|0)>>>0)break;if(!((a[k>>0]|a[c[j>>2]>>0])&254))break;g=c[j>>2]|0;c[j>>2]=g+1;a[k>>0]=a[g>>0]&128}b=(c[j>>2]|0)-(c[q>>2]|0)|0;if((c[m>>2]|0)==(c[i>>2]|0)){s=7;break}c[r>>2]=(c[r>>2]|0)-b;c[q>>2]=c[j>>2];if(!(c[r>>2]|0))break;c[j>>2]=(c[q>>2]|0)+1;b=c[j>>2]|0;if(d[c[j>>2]>>0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+8|0;k=n+16|0;m=n;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[f>>2];b=c[f>>2]|0;c[f>>2]=b+1;c[i>>2]=a[b>>0];b=c[i>>2]|0;if(!(c[i>>2]&128)){m=c[g>>2]|0;c[m>>2]=b;c[m+4>>2]=0;c[e>>2]=1;m=c[e>>2]|0;l=n;return m|0}d=c[f>>2]|0;c[f>>2]=d+1;c[i>>2]=b&127|a[d>>0]<<7;b=c[i>>2]|0;if(!(c[i>>2]&16384)){m=c[g>>2]|0;c[m>>2]=b;c[m+4>>2]=0;c[e>>2]=2;m=c[e>>2]|0;l=n;return m|0}d=c[f>>2]|0;c[f>>2]=d+1;c[i>>2]=b&16383|a[d>>0]<<14;b=c[i>>2]|0;if(!(c[i>>2]&2097152)){m=c[g>>2]|0;c[m>>2]=b;c[m+4>>2]=0;c[e>>2]=3;m=c[e>>2]|0;l=n;return m|0}d=c[f>>2]|0;c[f>>2]=d+1;c[i>>2]=b&2097151|a[d>>0]<<21;b=c[i>>2]|0;if(!(c[i>>2]&268435456)){m=c[g>>2]|0;c[m>>2]=b;c[m+4>>2]=0;c[e>>2]=4;m=c[e>>2]|0;l=n;return m|0}i=j;c[i>>2]=b&268435455;c[i+4>>2]=0;c[k>>2]=28;while(1){if((c[k>>2]|0)>63)break;i=c[f>>2]|0;c[f>>2]=i+1;i=a[i>>0]|0;d=m;c[d>>2]=i;c[d+4>>2]=((i|0)<0)<<31>>31;d=HR(c[m>>2]&127|0,0,c[k>>2]|0)|0;i=j;d=IR(c[i>>2]|0,c[i+4>>2]|0,d|0,z|0)|0;i=j;c[i>>2]=d;c[i+4>>2]=z;if((c[m>>2]&128|0)==0&0==0)break;c[k>>2]=(c[k>>2]|0)+7}k=c[j+4>>2]|0;m=c[g>>2]|0;c[m>>2]=c[j>>2];c[m+4>>2]=k;c[e>>2]=(c[f>>2]|0)-(c[h>>2]|0);m=c[e>>2]|0;l=n;return m|0}function ZK(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;c[g>>2]=d;d=c[f>>2]|0;c[f>>2]=d+1;c[h>>2]=a[d>>0];d=c[h>>2]&127;b=c[f>>2]|0;c[f>>2]=b+1;c[h>>2]=d|a[b>>0]<<7;b=c[h>>2]|0;if(!(c[h>>2]&16384)){c[c[g>>2]>>2]=b;c[e>>2]=2;h=c[e>>2]|0;l=i;return h|0}d=c[f>>2]|0;c[f>>2]=d+1;c[h>>2]=b&16383|a[d>>0]<<14;b=c[h>>2]|0;if(!(c[h>>2]&2097152)){c[c[g>>2]>>2]=b;c[e>>2]=3;h=c[e>>2]|0;l=i;return h|0}d=c[f>>2]|0;c[f>>2]=d+1;c[h>>2]=b&2097151|a[d>>0]<<21;b=c[h>>2]|0;if(!(c[h>>2]&268435456)){c[c[g>>2]>>2]=b;c[e>>2]=4;h=c[e>>2]|0;l=i;return h|0}else{c[h>>2]=b&268435455;c[c[g>>2]>>2]=c[h>>2]|(a[c[f>>2]>>0]&15)<<28;c[e>>2]=5;h=c[e>>2]|0;l=i;return h|0}return 0}function _K(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;C=l;l=l+80|0;y=C+76|0;A=C+72|0;B=C+68|0;j=C+64|0;k=C+60|0;m=C+56|0;n=C+52|0;o=C+48|0;p=C+16|0;q=C+44|0;r=C+40|0;s=C+36|0;t=C+32|0;u=C+8|0;v=C+28|0;w=C;x=C+24|0;c[y>>2]=b;c[A>>2]=d;c[B>>2]=e;c[j>>2]=f;c[k>>2]=g;c[m>>2]=h;c[n>>2]=i;c[o>>2]=c[c[j>>2]>>2];if(c[o>>2]|0){c[v>>2]=c[y>>2]|0?-1:1;cL(o,c[A>>2]|0,w);B=c[v>>2]|0;y=w;y=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(c[(c[e>>2]|0)+52>>2]|0,(c[(c[e>>2]|0)+40>>2]|0)+(c[(c[e>>2]|0)+48>>2]|0)|0,c[d>>2]|0,c[(c[e>>2]|0)+48>>2]|0)|0;if(c[f>>2]|0){f=c[f>>2]|0;l=g;return f|0}b=(c[e>>2]|0)+48|0;c[b>>2]=(c[b>>2]|0)+(c[d>>2]|0);b=(c[(c[e>>2]|0)+40>>2]|0)+(c[(c[e>>2]|0)+48>>2]|0)|0;d=b+20|0;do{a[b>>0]=0;b=b+1|0}while((b|0)<(d|0));if((c[(c[e>>2]|0)+48>>2]|0)!=(c[(c[e>>2]|0)+44>>2]|0)){f=c[f>>2]|0;l=g;return f|0}zI(c[(c[e>>2]|0)+52>>2]|0)|0;c[(c[e>>2]|0)+52>>2]=0;c[(c[e>>2]|0)+48>>2]=0;f=c[f>>2]|0;l=g;return f|0}function aL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;while(1){if(!((c[h>>2]|0)==0?(c[(c[e>>2]|0)+52>>2]|0)!=0:0)){a=5;break}if(((c[f>>2]|0)-(c[(c[e>>2]|0)+40>>2]|0)+(c[g>>2]|0)|0)<=(c[(c[e>>2]|0)+48>>2]|0)){a=5;break}c[h>>2]=$K(c[e>>2]|0)|0}if((a|0)==5){l=i;return c[h>>2]|0}return 0}function bL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+16|0;f=k+12|0;g=k+8|0;h=k+20|0;i=k+4|0;j=k;c[e>>2]=b;c[f>>2]=d;c[g>>2]=c[c[f>>2]>>2];a[h>>0]=0;while(1){d=(a[c[g>>2]>>0]|a[h>>0]|0)!=0;b=c[g>>2]|0;c[g>>2]=b+1;if(!d)break;a[h>>0]=a[b>>0]&128}if(!(c[e>>2]|0)){i=c[g>>2]|0;j=c[f>>2]|0;c[j>>2]=i;l=k;return}c[i>>2]=(c[g>>2]|0)-(c[c[f>>2]>>2]|0);c[j>>2]=c[c[e>>2]>>2];MR(c[j>>2]|0,c[c[f>>2]>>2]|0,c[i>>2]|0)|0;c[j>>2]=(c[j>>2]|0)+(c[i>>2]|0);c[c[e>>2]>>2]=c[j>>2];i=c[g>>2]|0;j=c[f>>2]|0;c[j>>2]=i;l=k;return}function cL(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+20|0;g=k+16|0;h=k+12|0;i=k;j=k+8|0;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;c[j>>2]=(c[c[f>>2]>>2]|0)+-2;while(1){if((c[j>>2]|0)>>>0<(c[g>>2]|0)>>>0)break;if(!(a[c[j>>2]>>0]&128))break;c[j>>2]=(c[j>>2]|0)+-1}c[j>>2]=(c[j>>2]|0)+1;c[c[f>>2]>>2]=c[j>>2];YK(c[j>>2]|0,i)|0;g=i;i=c[g+4>>2]|0;j=c[h>>2]|0;c[j>>2]=c[g>>2];c[j+4>>2]=i;l=k;return}function dL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;e=j+8|0;f=j+4|0;g=j;h=j+12|0;c[e>>2]=b;c[f>>2]=d;c[g>>2]=(c[c[f>>2]>>2]|0)+-2;a[h>>0]=0;do{if((c[g>>2]|0)>>>0<=(c[e>>2]|0)>>>0)break;d=c[g>>2]|0;c[g>>2]=d+-1;d=a[d>>0]|0;a[h>>0]=d}while(!(d<<24>>24|0));while(1){if((c[g>>2]|0)>>>0>(c[e>>2]|0)>>>0)d=(a[c[g>>2]>>0]&128|a[h>>0]|0)!=0;else d=0;b=c[g>>2]|0;if(!d)break;c[g>>2]=b+-1;a[h>>0]=a[b>>0]|0}if(b>>>0<=(c[e>>2]|0)>>>0){if((a[h>>0]|0)==0?(c[c[f>>2]>>2]|0)>>>0>((c[g>>2]|0)+2|0)>>>0:0)i=11}else i=11;if((i|0)==11)c[g>>2]=(c[g>>2]|0)+2;do{i=c[g>>2]|0;c[g>>2]=i+1}while((a[i>>0]&128|0)!=0);c[c[f>>2]>>2]=c[g>>2];l=j;return}function eL(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;o=t+8|0;r=t+40|0;m=t+36|0;n=t;s=t+32|0;i=t+28|0;j=t+24|0;p=t+20|0;k=t+16|0;q=t+12|0;c[m>>2]=b;b=n;c[b>>2]=d;c[b+4>>2]=e;c[s>>2]=f;c[i>>2]=g;c[j>>2]=h;b=c[m>>2]|0;if(c[(c[m>>2]|0)+244>>2]|0){o=n;c[p>>2]=EI(c[b+244>>2]|0,c[o>>2]|0,c[o+4>>2]|0)|0}else{if(0==(c[b+240>>2]|0)?(c[o>>2]=c[(c[m>>2]|0)+20>>2],o=Ue(42178,o)|0,c[(c[m>>2]|0)+240>>2]=o,0==(c[(c[m>>2]|0)+240>>2]|0)):0){c[r>>2]=7;s=c[r>>2]|0;l=t;return s|0}o=n;c[p>>2]=wI(c[(c[m>>2]|0)+12>>2]|0,c[(c[m>>2]|0)+16>>2]|0,c[(c[m>>2]|0)+240>>2]|0,42190,c[o>>2]|0,c[o+4>>2]|0,0,(c[m>>2]|0)+244|0)|0}if((c[p>>2]|0)==0?(c[k>>2]=DI(c[(c[m>>2]|0)+244>>2]|0)|0,c[c[i>>2]>>2]=c[k>>2],c[s>>2]|0):0){c[q>>2]=Yd((c[k>>2]|0)+20|0)|0;if(c[q>>2]|0){if((c[j>>2]|0)!=0&(c[k>>2]|0)>16384){c[k>>2]=4096;c[c[j>>2]>>2]=c[k>>2]}c[p>>2]=AI(c[(c[m>>2]|0)+244>>2]|0,c[q>>2]|0,c[k>>2]|0,0)|0;b=(c[q>>2]|0)+(c[k>>2]|0)|0;d=b+20|0;do{a[b>>0]=0;b=b+1|0}while((b|0)<(d|0));if(c[p>>2]|0){Kd(c[q>>2]|0);c[q>>2]=0}}else c[p>>2]=7;c[c[s>>2]>>2]=c[q>>2]}c[r>>2]=c[p>>2];s=c[r>>2]|0;l=t;return s|0}function fL(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;p=r+36|0;i=r+32|0;q=r+28|0;j=r+24|0;k=r+20|0;m=r+16|0;n=r+12|0;g=r+8|0;h=r+4|0;o=r;c[i>>2]=a;c[q>>2]=b;c[j>>2]=e;c[k>>2]=f;c[n>>2]=c[(c[q>>2]|0)+4>>2];c[m>>2]=0;a:while(1){if(c[(c[q>>2]|0)+28>>2]|0){a=12;break}if((c[m>>2]|0)>=(c[(c[q>>2]|0)+4>>2]|0)){a=12;break}c[g>>2]=0;c[h>>2]=c[(c[c[q>>2]>>2]|0)+(c[m>>2]<<2)>>2];do{c[o>>2]=PK(c[i>>2]|0,c[h>>2]|0,0)|0;if(c[o>>2]|0){a=6;break a}if(!(c[j>>2]|0))break;f=gL(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;c[g>>2]=f}while((f|0)<0);if(c[g>>2]|0?(d[(c[h>>2]|0)+4>>0]|0|0)!=0:0)OK(c[h>>2]|0);c[m>>2]=(c[m>>2]|0)+1}if((a|0)==6){c[p>>2]=c[o>>2];q=c[p>>2]|0;l=r;return q|0}else if((a|0)==12){RK(c[c[q>>2]>>2]|0,c[n>>2]|0,c[n>>2]|0,203);c[p>>2]=0;q=c[p>>2]|0;l=r;return q|0}return 0}function gL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+12|0;e=i+8|0;g=i+4|0;h=i;c[f>>2]=a;c[e>>2]=b;c[g>>2]=d;c[h>>2]=0;if(!(c[(c[f>>2]|0)+40>>2]|0)){h=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c[w>>2];D=c[A>>2]|0;l=B;return D|0}function oL(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;g=l;l=l+32|0;m=g+28|0;k=g+24|0;j=g+20|0;i=g+16|0;d=g+12|0;e=g+8|0;h=g+4|0;f=g;c[m>>2]=a;c[k>>2]=b;c[j>>2]=c[(c[c[m>>2]>>2]|0)+12>>2];c[i>>2]=c[(c[c[k>>2]>>2]|0)+12>>2];c[d>>2]=c[(c[c[m>>2]>>2]|0)+16>>2];c[e>>2]=c[(c[c[k>>2]>>2]|0)+16>>2];c[h>>2]=(c[d>>2]|0)<(c[e>>2]|0)?c[d>>2]|0:c[e>>2]|0;c[f>>2]=wQ(c[j>>2]|0,c[i>>2]|0,c[h>>2]|0)|0;if(c[f>>2]|0){m=c[f>>2]|0;l=g;return m|0}c[f>>2]=(c[d>>2]|0)-(c[e>>2]|0);m=c[f>>2]|0;l=g;return m|0}function pL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;j=p+32|0;e=p+28|0;f=p+24|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;h=p+4|0;i=p;c[j>>2]=a;c[e>>2]=b;c[f>>2]=d;c[m>>2]=42442;c[n>>2]=42446;c[o>>2]=42451;c[h>>2]=-1;c[i>>2]=15;a=c[j>>2]|0;if((c[e>>2]|0)>6){yh(a,42462,-1);l=p;return}if(tL(a,39501,c[c[f>>2]>>2]|0,k)|0){l=p;return}switch(c[e>>2]|0){case 6:{c[i>>2]=vi(c[(c[f>>2]|0)+20>>2]|0)|0;g=6;break}case 5:{g=6;break}case 4:{g=7;break}case 3:{g=8;break}case 2:{g=9;break}default:{}}if((g|0)==6){c[h>>2]=vi(c[(c[f>>2]|0)+16>>2]|0)|0;g=7}if((g|0)==7){c[o>>2]=wh(c[(c[f>>2]|0)+12>>2]|0)|0;g=8}if((g|0)==8){c[n>>2]=wh(c[(c[f>>2]|0)+8>>2]|0)|0;g=9}if((g|0)==9)c[m>>2]=wh(c[(c[f>>2]|0)+4>>2]|0)|0;if(!((c[o>>2]|0)!=0&(c[n>>2]|0)!=0&(c[m>>2]|0)!=0)){bi(c[j>>2]|0);l=p;return}a=c[j>>2]|0;if(!(c[i>>2]|0)){ci(a,47636,-1,0);l=p;return}if(qM(a,c[k>>2]|0)|0){l=p;return}VM(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[h>>2]|0,c[i>>2]|0);l=p;return}function qL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+12|0;h=g+4|0;f=g;c[e>>2]=a;c[g+8>>2]=b;c[h>>2]=d;if(tL(c[e>>2]|0,39509,c[c[h>>2]>>2]|0,f)|0){l=g;return}if(qM(c[e>>2]|0,c[f>>2]|0)|0){l=g;return}RM(c[e>>2]|0,c[f>>2]|0);l=g;return}function rL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+20|0;j=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[i+16>>2]=b;c[j>>2]=d;if(tL(c[e>>2]|0,39527,c[c[j>>2]>>2]|0,h)|0){l=i;return}c[g>>2]=c[c[h>>2]>>2];c[f>>2]=PM(c[g>>2]|0)|0;switch(c[f>>2]|0){case 0:{ci(c[e>>2]|0,42346,-1,0);l=i;return}case 101:{ci(c[e>>2]|0,42362,-1,0);l=i;return}default:{Bi(c[e>>2]|0,c[f>>2]|0);l=i;return}}}function sL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(tL(c[e>>2]|0,39517,c[c[g>>2]>>2]|0,h)|0){l=j;return}c[i>>2]=0;if((c[f>>2]|0)>1)c[i>>2]=wh(c[(c[g>>2]|0)+4>>2]|0)|0;uL(c[e>>2]|0,c[h>>2]|0,c[i>>2]|0);l=j;return}function tL(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;o=p;h=p+28|0;i=p+24|0;j=p+20|0;k=p+16|0;m=p+12|0;n=p+8|0;g=p+4|0;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=f;if((fi(c[k>>2]|0)|0)==4?(xh(c[k>>2]|0)|0)==4:0){o=wi(c[k>>2]|0)|0;a[n>>0]=a[o>>0]|0;a[n+1>>0]=a[o+1>>0]|0;a[n+2>>0]=a[o+2>>0]|0;a[n+3>>0]=a[o+3>>0]|0;c[c[m>>2]>>2]=c[n>>2];c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}c[o>>2]=c[j>>2];c[g>>2]=Ue(42317,o)|0;yh(c[i>>2]|0,c[g>>2]|0,-1);Kd(c[g>>2]|0);c[h>>2]=1;o=c[h>>2]|0;l=p;return o|0}function uL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;g=j+12|0;f=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[g>>2]=b;c[f>>2]=d;c[h>>2]=c[c[g>>2]>>2];if(c[f>>2]|0)c[i>>2]=c[f>>2];else c[i>>2]=42252;a=c[e>>2]|0;if(c[(c[g>>2]|0)+12>>2]|0){vL(a,c[g>>2]|0,c[i>>2]|0);wL(c[h>>2]|0);l=j;return}else{Ti(a,47636,0,0);l=j;return}}function vL(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+80|0;m=u+76|0;n=u+72|0;o=u+68|0;p=u;q=u+64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[f>>2],c[p+8>>2]=c[(c[n>>2]|0)+20>>2],c[r>>2]=DL(c[n>>2]|0,c[s>>2]|0,p,c[o>>2]|0)|0,c[s>>2]|0):0)EL(c[(c[n>>2]|0)+92>>2]|0);if(!(c[r>>2]|0)){c[k>>2]=c[(c[(c[n>>2]|0)+92>>2]|0)+4>>2]<<2;Ti(c[m>>2]|0,c[f>>2]|0,c[k>>2]|0,c[g>>2]|0);l=u;return}Bi(c[m>>2]|0,c[r>>2]|0);if(!(c[g>>2]|0)){l=u;return}qb[c[g>>2]&255](c[f>>2]|0);l=u;return}function wL(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;zI(c[(c[d>>2]|0)+244>>2]|0)|0;c[(c[d>>2]|0)+244>>2]=0;l=b;return}function xL(b){b=b|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=b;if(!(c[e>>2]|0)){l=f;return}a[c[e>>2]>>0]=0;if(d[c[e>>2]>>0]|0|0){l=f;return}if(d[(c[e>>2]|0)+1>>0]|0|0){l=f;return}if(d[(c[e>>2]|0)+2>>0]|0|0){l=f;return}Kd(c[e>>2]|0);l=f;return}function yL(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;LL(c[e>>2]|0,156,b)|0;l=d;return c[b>>2]|0}function zL(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;k=m;g=m+12|0;h=m+8|0;i=m+16|0;j=m+4|0;c[h>>2]=b;a[i>>0]=e;c[j>>2]=f;do if((a[i>>0]|0)!=112?(a[i>>0]|0)!=99:0){if((a[i>>0]|0)==110?d[(c[h>>2]|0)+228>>0]|0:0)break;if((a[i>>0]|0)==97?d[(c[h>>2]|0)+228>>0]|0:0)break;if((a[i>>0]|0)==108?d[(c[h>>2]|0)+230>>0]|0:0)break;if((((a[i>>0]|0)!=115?(a[i>>0]|0)!=120:0)?(a[i>>0]|0)!=121:0)?(a[i>>0]|0)!=98:0){j=c[j>>2]|0;c[k>>2]=a[i>>0];DJ(j,42282,k);c[g>>2]=1;k=c[g>>2]|0;l=m;return k|0}}while(0);c[g>>2]=0;k=c[g>>2]|0;l=m;return k|0}function AL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=l;l=l+16|0;e=g+4|0;h=g+8|0;f=g;c[e>>2]=b;a[h>>0]=d;switch(a[h>>0]|0){case 99:case 112:case 110:{c[f>>2]=1;break}case 115:case 108:case 97:{c[f>>2]=c[(c[e>>2]|0)+4>>2];break}case 121:{c[f>>2]=O(c[(c[e>>2]|0)+4>>2]|0,c[(c[e>>2]|0)+8>>2]|0)|0;break}case 98:{c[f>>2]=O(c[(c[e>>2]|0)+8>>2]|0,((c[(c[e>>2]|0)+4>>2]|0)+31|0)/32|0)|0;break}default:c[f>>2]=(O(c[(c[e>>2]|0)+4>>2]|0,c[(c[e>>2]|0)+8>>2]|0)|0)*3}l=g;return c[f>>2]|0}function BL(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=b;c[f>>2]=d;c[h>>2]=((c[e>>2]<<1)+1<<2)+20;c[i>>2]=lQ(c[f>>2]|0)|0;c[g>>2]=Yd((c[h>>2]|0)+(c[i>>2]|0)+1|0)|0;if(!(c[g>>2]|0)){i=c[g>>2]|0;l=j;return i|0}GR(c[g>>2]|0,0,c[h>>2]|0)|0;c[(c[g>>2]|0)+16>>2]=(c[g>>2]|0)+16+4-(c[g>>2]|0);c[(c[g>>2]|0)+16+(1+(c[e>>2]|0)<<2)>>2]=(c[(c[g>>2]|0)+16>>2]|0)+((c[e>>2]|0)+1<<2);c[(c[g>>2]|0)+4>>2]=c[e>>2];c[(c[g>>2]|0)+12>>2]=(c[g>>2]|0)+(c[h>>2]|0);MR(c[(c[g>>2]|0)+12>>2]|0,c[f>>2]|0,(c[i>>2]|0)+1|0)|0;a[c[g>>2]>>0]=1;i=c[g>>2]|0;l=j;return i|0}function CL(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=e;c[h>>2]=0;c[i>>2]=0;b=c[f>>2]|0;do if(d[(c[f>>2]|0)+1>>0]|0){e=c[f>>2]|0;if(!(d[b+2>>0]|0)){a[e+2>>0]=1;c[i>>2]=(c[f>>2]|0)+16+((c[(c[f>>2]|0)+4>>2]|0)+2<<2);c[h>>2]=153;break}c[i>>2]=Yd(c[e+4>>2]<<2)|0;if(c[i>>2]|0?(c[h>>2]=148,c[(c[f>>2]|0)+8>>2]|0):0)MR(c[i>>2]|0,(c[f>>2]|0)+16+4|0,c[(c[f>>2]|0)+4>>2]<<2|0)|0}else{a[b+1>>0]=1;c[i>>2]=(c[f>>2]|0)+16+4;c[h>>2]=153}while(0);c[c[g>>2]>>2]=c[i>>2];l=j;return c[h>>2]|0}function DL(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;C=l;l=l+96|0;u=C+92|0;v=C+88|0;w=C+84|0;x=C+80|0;B=C+76|0;y=C+72|0;g=C+68|0;A=C+64|0;h=C+24|0;i=C+16|0;j=C+60|0;k=C+56|0;m=C+52|0;n=C+8|0;o=C+48|0;p=C+44|0;q=C+40|0;r=C;s=C+36|0;t=C+32|0;c[u>>2]=b;c[v>>2]=d;c[w>>2]=e;c[x>>2]=f;c[B>>2]=0;c[g>>2]=c[c[u>>2]>>2];c[A>>2]=0;c[y>>2]=0;while(1){if(c[B>>2]|0){b=31;break}if(!(a[(c[x>>2]|0)+(c[y>>2]|0)>>0]|0)){b=31;break}a[(c[w>>2]|0)+24>>0]=a[(c[x>>2]|0)+(c[y>>2]|0)>>0]|0;a:do switch(a[(c[x>>2]|0)+(c[y>>2]|0)>>0]|0){case 112:{if(c[v>>2]|0)c[c[(c[w>>2]|0)+28>>2]>>2]=c[(c[w>>2]|0)+8>>2];break}case 99:{if(c[v>>2]|0)c[c[(c[w>>2]|0)+28>>2]>>2]=c[(c[w>>2]|0)+4>>2];break}case 110:{if(c[v>>2]|0){f=h;c[f>>2]=0;c[f+4>>2]=0;c[B>>2]=FL(c[g>>2]|0,A,h,0)|0;c[c[(c[w>>2]|0)+28>>2]>>2]=c[h>>2]}break}case 97:{if(c[v>>2]|0?(c[B>>2]=FL(c[g>>2]|0,A,i,j)|0,(c[B>>2]|0)==0):0){c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[(c[w>>2]|0)+4>>2]|0))break a;f=YK(c[j>>2]|0,n)|0;c[j>>2]=(c[j>>2]|0)+f;f=c[n>>2]|0;e=i;e=LR(c[e>>2]|0,c[e+4>>2]|0,2,0)|0;e=IR(f|0,0,e|0,z|0)|0;f=i;f=LR(e|0,z|0,c[f>>2]|0,c[f+4>>2]|0)|0;c[m>>2]=f;c[(c[(c[w>>2]|0)+28>>2]|0)+(c[k>>2]<<2)>>2]=c[m>>2];c[k>>2]=(c[k>>2]|0)+1}}break}case 108:{c[o>>2]=0;f=(c[u>>2]|0)+32|0;c[B>>2]=GL(c[g>>2]|0,c[f>>2]|0,c[f+4>>2]|0,o)|0;b:do if(!(c[B>>2]|0)){c[q>>2]=eI(c[o>>2]|0,0)|0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[(c[w>>2]|0)+4>>2]|0))break b;f=YK(c[q>>2]|0,r)|0;c[q>>2]=(c[q>>2]|0)+f;c[(c[(c[w>>2]|0)+28>>2]|0)+(c[p>>2]<<2)>>2]=c[r>>2];c[p>>2]=(c[p>>2]|0)+1}}while(0);Er(c[o>>2]|0)|0;break}case 115:{c[B>>2]=HL(c[u>>2]|0,0,0)|0;if(!(c[B>>2]|0))c[B>>2]=IL(c[u>>2]|0,c[w>>2]|0)|0;break}case 121:case 98:{c[s>>2]=(AL(c[w>>2]|0,a[(c[x>>2]|0)+(c[y>>2]|0)>>0]|0)|0)<<2;GR(c[(c[w>>2]|0)+28>>2]|0,0,c[s>>2]|0)|0;JL(c[(c[u>>2]|0)+12>>2]|0,c[w>>2]|0);break}default:{c[t>>2]=c[(c[u>>2]|0)+12>>2];c[B>>2]=HL(c[u>>2]|0,0,0)|0;if(!(c[B>>2]|0)){if(c[v>>2]|0){if(c[(c[u>>2]|0)+24>>2]|0?(c[B>>2]=FL(c[g>>2]|0,A,(c[w>>2]|0)+16|0,0)|0,c[B>>2]|0):0)break a;c[B>>2]=LL(c[t>>2]|0,157,c[w>>2]|0)|0;ML(c[u>>2]|0,B)|0;if(c[B>>2]|0)break a}LL(c[t>>2]|0,158,c[w>>2]|0)|0}}}while(0);e=AL(c[w>>2]|0,a[(c[x>>2]|0)+(c[y>>2]|0)>>0]|0)|0;f=(c[w>>2]|0)+28|0;c[f>>2]=(c[f>>2]|0)+(e<<2);c[y>>2]=(c[y>>2]|0)+1}if((b|0)==31){Er(c[A>>2]|0)|0;l=C;return c[B>>2]|0}return 0}function EL(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[(c[d>>2]|0)+8>>2]=1;MR((c[d>>2]|0)+16+(2+(c[(c[d>>2]|0)+4>>2]|0)<<2)|0,(c[d>>2]|0)+16+4|0,c[(c[d>>2]|0)+4>>2]<<2|0)|0;l=b;return}function FL(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;i=p+36|0;j=p+32|0;k=p+28|0;m=p+24|0;n=p+20|0;o=p+16|0;f=p+12|0;g=p;h=p+8|0;c[j>>2]=a;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;if((c[c[k>>2]>>2]|0)==0?(c[h>>2]=MM(c[j>>2]|0,c[k>>2]|0)|0,c[h>>2]|0):0){c[i>>2]=c[h>>2];o=c[i>>2]|0;l=p;return o|0}c[o>>2]=c[c[k>>2]>>2];c[f>>2]=eI(c[o>>2]|0,0)|0;o=YK(c[f>>2]|0,g)|0;c[f>>2]=(c[f>>2]|0)+o;o=g;if((c[o>>2]|0)==0&(c[o+4>>2]|0)==0){c[i>>2]=267;o=c[i>>2]|0;l=p;return o|0}o=c[m>>2]|0;c[o>>2]=c[g>>2];c[o+4>>2]=0;if(c[n>>2]|0)c[c[n>>2]>>2]=c[f>>2];c[i>>2]=0;o=c[i>>2]|0;l=p;return o|0}function GL(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=l;l=l+16|0;h=f+12|0;i=f;g=f+8|0;c[h>>2]=a;a=i;c[a>>2]=b;c[a+4>>2]=d;c[g>>2]=e;e=i;e=LM(c[h>>2]|0,c[e>>2]|0,c[e+4>>2]|0,c[g>>2]|0)|0;l=f;return e|0}function HL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;j=i+24|0;e=i+20|0;f=i+16|0;g=i+12|0;h=i;c[j>>2]=a;c[e>>2]=b;c[f>>2]=d;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h>>2]=c[j>>2];c[g>>2]=LL(c[(c[j>>2]|0)+12>>2]|0,159,h)|0;if(c[e>>2]|0)c[c[e>>2]>>2]=c[h+4>>2];if(!(c[f>>2]|0)){j=c[g>>2]|0;l=i;return j|0}c[c[f>>2]>>2]=c[h+8>>2];j=c[g>>2]|0;l=i;return j|0}function IL(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+64|0;r=t+56|0;j=t+52|0;k=t+48|0;s=t+44|0;m=t+40|0;n=t+36|0;o=t+32|0;p=t+28|0;d=t+24|0;e=t+20|0;q=t+16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2]|0):0))c[g>>2]=c[i>>2];if((c[h>>2]|0)!=0?(c[(c[i>>2]|0)+12>>2]|0)!=(c[(c[i>>2]|0)+-16+12>>2]|0):0)c[h>>2]=1;else c[h>>2]=(c[h>>2]|0)+1;if((c[h>>2]|0)>(c[d>>2]|0))c[d>>2]=c[h>>2]}else c[h>>2]=0;c[m>>2]=(c[m>>2]|0)+1}if(!(JM(c[g>>2]|0)|0))continue;c[e>>2]=(c[e>>2]|0)+-1}c[(c[(c[k>>2]|0)+28>>2]|0)+(c[n>>2]<<2)>>2]=c[d>>2];c[n>>2]=(c[n>>2]|0)+1}if((a|0)==11){c[r>>2]=c[q>>2];s=c[r>>2]|0;l=t;return s|0}else if((a|0)==33){Kd(c[s>>2]|0);c[r>>2]=0;s=c[r>>2]|0;l=t;return s|0}return 0}function JL(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=b;if(d[(c[e>>2]|0)+32>>0]|0|0){l=g;return}a=(c[e>>2]|0)+24|0;b=(c[c[f>>2]>>2]|0)+32|0;if(!((c[a>>2]|0)==(c[b>>2]|0)?(c[a+4>>2]|0)==(c[b+4>>2]|0):0)){l=g;return}a=c[e>>2]|0;if(c[(c[e>>2]|0)+12>>2]|0){JL(c[a+12>>2]|0,c[f>>2]|0);JL(c[(c[e>>2]|0)+16>>2]|0,c[f>>2]|0);l=g;return}else{HM(a,c[f>>2]|0);l=g;return}}function KL(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;g=e+8|0;i=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[i>>2]=d;c[f>>2]=c[i>>2];d=EM(c[c[f>>2]>>2]|0,c[h>>2]|0,(c[(c[f>>2]|0)+28>>2]|0)+((O((c[g>>2]|0)*3|0,c[(c[f>>2]|0)+4>>2]|0)|0)<<2)|0)|0;l=e;return d|0}function LL(a,b,d){a=a|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c[r>>2]>>2]|0)==4)c[j>>2]=1;if((c[c[r>>2]>>2]|0)==1)c[m>>2]=c[r>>2];if(a[(c[r>>2]|0)+32>>0]|0)a[k>>0]=1;c[r>>2]=c[(c[r>>2]|0)+8>>2]}if(!(c[j>>2]|0)){c[C>>2]=0;F=c[C>>2]|0;l=G;return F|0}a:do if(c[(c[y>>2]|0)+40>>2]|0){c[n>>2]=d[(c[m>>2]|0)+32>>0];QL(c[x>>2]|0,c[m>>2]|0,i);b:while(1){if(c[i>>2]|0)break a;while(1){if(!((a[(c[m>>2]|0)+32>>0]|0)!=0^1))break a;RL(c[x>>2]|0,c[m>>2]|0,i);if(c[n>>2]|0)continue b;g=(c[m>>2]|0)+24|0;o=p;if(!(((c[g>>2]|0)!=(c[o>>2]|0)?1:(c[g+4>>2]|0)!=(c[o+4>>2]|0))&(c[i>>2]|0)==0))break a}}}while(0);c:do if((a[k>>0]|0)!=0&(c[i>>2]|0)==0)do{if(!((a[(c[m>>2]|0)+32>>0]|0)!=0^1))break c;RL(c[x>>2]|0,c[m>>2]|0,i)}while(!(c[i>>2]|0));while(0);if(c[i>>2]|0){c[C>>2]=c[i>>2];F=c[C>>2]|0;l=G;return F|0}c[s>>2]=1;c[r>>2]=c[m>>2];while(1){if(!(c[r>>2]|0))break;a[t>>0]=0;c[u>>2]=c[r>>2];if((c[c[u>>2]>>2]|0)==1)c[u>>2]=c[(c[u>>2]|0)+16>>2];c[v>>2]=c[(c[u>>2]|0)+20>>2];c[A>>2]=c[(c[v>>2]|0)+48>>2];g=(c[v>>2]|0)+56|0;o=c[g+4>>2]|0;b=p;c[b>>2]=c[g>>2];c[b+4>>2]=o;b=(c[(c[v>>2]|0)+4>>2]|0)!=0;d:do if((d[(c[x>>2]|0)+52>>0]|0)==(c[q>>2]|0)){if(b)b=(c[A>>2]|0)>>>0>=((c[c[v>>2]>>2]|0)+(c[(c[v>>2]|0)+4>>2]|0)|0)>>>0;else b=1;a[t>>0]=b&1;while(1){if(c[A>>2]|0?(g=c[q>>2]|0?-1:1,n=p,o=(c[x>>2]|0)+32|0,o=FR(c[n>>2]|0,c[n+4>>2]|0,c[o>>2]|0,c[o+4>>2]|0)|0,RR(g|0,((g|0)<0)<<31>>31|0,o|0,z|0)|0,(z|0)>=0):0)break d;if(d[t>>0]|0)break d;SL(c[q>>2]|0,c[c[v>>2]>>2]|0,c[(c[v>>2]|0)+4>>2]|0,A,p,t)}}else{if(b)if(c[A>>2]|0)b=(c[A>>2]|0)>>>0<=(c[c[v>>2]>>2]|0)>>>0;else b=0;else b=1;a[t>>0]=b&1;while(1){if(c[A>>2]|0?(g=c[q>>2]|0?-1:1,n=p,o=(c[x>>2]|0)+32|0,o=FR(c[n>>2]|0,c[n+4>>2]|0,c[o>>2]|0,c[o+4>>2]|0)|0,o=RR(g|0,((g|0)<0)<<31>>31|0,o|0,z|0)|0,g=z,!((g|0)>0|(g|0)==0&o>>>0>0)):0)break d;if(d[t>>0]|0)break d;_K(c[q>>2]|0,c[c[v>>2]>>2]|0,c[(c[v>>2]|0)+4>>2]|0,A,p,w,t)}}while(0);c[(c[v>>2]|0)+48>>2]=c[A>>2];n=p;g=c[n+4>>2]|0;o=(c[v>>2]|0)+56|0;c[o>>2]=c[n>>2];c[o+4>>2]=g;if(!(!(d[t>>0]|0)?(g=p,o=(c[x>>2]|0)+32|0,!((c[g>>2]|0)!=(c[o>>2]|0)?1:(c[g+4>>2]|0)!=(c[o+4>>2]|0))):0))c[s>>2]=0;c[r>>2]=c[(c[r>>2]|0)+12>>2]}if(c[s>>2]|0){c[A>>2]=c[(c[y>>2]|0)+48>>2];break}else{c[A>>2]=0;break}}while(0);if(!(c[A>>2]|0)){c[C>>2]=0;F=c[C>>2]|0;l=G;return F|0}if((a[c[A>>2]>>0]|0)==1){c[A>>2]=(c[A>>2]|0)+1;b=c[A>>2]|0;if(d[c[A>>2]>>0]&128|0)b=ZK(b,B)|0;else{c[B>>2]=d[b>>0];b=1}c[A>>2]=(c[A>>2]|0)+b}else c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[D>>2]|0))break;XK(0,A);if(!(a[c[A>>2]>>0]|0)){F=65;break}c[A>>2]=(c[A>>2]|0)+1;b=c[A>>2]|0;if(d[c[A>>2]>>0]&128|0)b=ZK(b,B)|0;else{c[B>>2]=d[b>>0];b=1}c[A>>2]=(c[A>>2]|0)+b}if((F|0)==65){c[C>>2]=0;F=c[C>>2]|0;l=G;return F|0}if(!(a[c[A>>2]>>0]|0))c[A>>2]=0;c[c[E>>2]>>2]=(c[D>>2]|0)==(c[B>>2]|0)?c[A>>2]|0:0;c[C>>2]=0;F=c[C>>2]|0;l=G;return F|0}function PL(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+8|0;e=h+4|0;f=h+12|0;g=h;c[d>>2]=b;c[e>>2]=c[c[d>>2]>>2];a[f>>0]=0;c[g>>2]=0;while(1){b=c[e>>2]|0;if(!(254&(a[c[e>>2]>>0]|a[f>>0])))break;c[e>>2]=b+1;a[f>>0]=a[b>>0]&128;if(a[f>>0]|0)continue;c[g>>2]=(c[g>>2]|0)+1}c[c[d>>2]>>2]=b;l=h;return c[g>>2]|0}function QL(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;if(!(c[g>>2]|0)){l=m;return}if(c[c[h>>2]>>2]|0){l=m;return}c[i>>2]=c[(c[g>>2]|0)+20>>2];if(c[i>>2]|0){TL(c[i>>2]|0);if(c[(c[i>>2]|0)+40>>2]|0){c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[(c[i>>2]|0)+64>>2]|0))break;c[k>>2]=(c[i>>2]|0)+72+((c[j>>2]|0)*24|0);if(c[(c[k>>2]|0)+20>>2]|0)aM(c[(c[k>>2]|0)+20>>2]|0)|0;c[j>>2]=(c[j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24|0;c[v>>2]=c[s>>2];c[v+4>>2]=t;a[(c[w>>2]|0)+32>>0]=a[(c[u>>2]|0)+32>>0]|0;l=x;return}RL(c[r>>2]|0,c[v>>2]|0,c[s>>2]|0);while(1){if(a[(c[u>>2]|0)+32>>0]|0)break;if(a[(c[v>>2]|0)+32>>0]|0)break;if(c[c[s>>2]>>2]|0)break;n=c[t>>2]|0?-1:1;k=(c[u>>2]|0)+24|0;m=(c[v>>2]|0)+24|0;m=FR(c[k>>2]|0,c[k+4>>2]|0,c[m>>2]|0,c[m+4>>2]|0)|0;m=RR(n|0,((n|0)<0)<<31>>31|0,m|0,z|0)|0;n=o;c[n>>2]=m;c[n+4>>2]=z;n=o;if((c[n>>2]|0)==0&(c[n+4>>2]|0)==0)break;b=c[r>>2]|0;if((c[o+4>>2]|0)<0){RL(b,c[u>>2]|0,c[s>>2]|0);continue}else{RL(b,c[v>>2]|0,c[s>>2]|0);continue}}n=(c[u>>2]|0)+24|0;o=c[n+4>>2]|0;t=(c[w>>2]|0)+24|0;c[t>>2]=c[n>>2];c[t+4>>2]=o;if(d[(c[u>>2]|0)+32>>0]|0)b=1;else b=(d[(c[v>>2]|0)+32>>0]|0)!=0;a[(c[w>>2]|0)+32>>0]=b&1;if((c[c[w>>2]>>2]|0)!=1){l=x;return}if(!(d[(c[w>>2]|0)+32>>0]|0)){l=x;return}a:do if(c[(c[v>>2]|0)+20>>2]|0?c[c[(c[v>>2]|0)+20>>2]>>2]|0:0){c[p>>2]=c[(c[v>>2]|0)+20>>2];while(1){if(c[c[s>>2]>>2]|0)break a;if(d[(c[v>>2]|0)+32>>0]|0)break a;GR(c[(c[p>>2]|0)+28>>2]|0,0,c[(c[p>>2]|0)+32>>2]|0)|0;RL(c[r>>2]|0,c[v>>2]|0,c[s>>2]|0)}}while(0);if(!(c[(c[u>>2]|0)+20>>2]|0)){l=x;return}if(!(c[c[(c[u>>2]|0)+20>>2]>>2]|0)){l=x;return}c[q>>2]=c[(c[u>>2]|0)+20>>2];while(1){if(c[c[s>>2]>>2]|0){j=54;break}if(d[(c[u>>2]|0)+32>>0]|0){j=54;break}GR(c[(c[q>>2]|0)+28>>2]|0,0,c[(c[q>>2]|0)+32>>2]|0)|0;RL(c[r>>2]|0,c[u>>2]|0,c[s>>2]|0)}if((j|0)==54){l=x;return}break}case 4:{c[k>>2]=c[(c[w>>2]|0)+12>>2];c[m>>2]=c[(c[w>>2]|0)+16>>2];v=c[t>>2]|0?-1:1;q=(c[k>>2]|0)+24|0;u=(c[m>>2]|0)+24|0;u=FR(c[q>>2]|0,c[q+4>>2]|0,c[u>>2]|0,c[u+4>>2]|0)|0;u=RR(v|0,((v|0)<0)<<31>>31|0,u|0,z|0)|0;v=n;c[v>>2]=u;c[v+4>>2]=z;do if(!(d[(c[m>>2]|0)+32>>0]|0)?!((c[n+4>>2]|0)<0?(d[(c[k>>2]|0)+32>>0]|0)==0:0):0){if((d[(c[k>>2]|0)+32>>0]|0)==0?(v=n,u=c[v+4>>2]|0,!((d[(c[m>>2]|0)+32>>0]|0)==0&((u|0)>0|(u|0)==0&(c[v>>2]|0)>>>0>0))):0){RL(c[r>>2]|0,c[k>>2]|0,c[s>>2]|0);RL(c[r>>2]|0,c[m>>2]|0,c[s>>2]|0);break}RL(c[r>>2]|0,c[m>>2]|0,c[s>>2]|0)}else j=33;while(0);if((j|0)==33)RL(c[r>>2]|0,c[k>>2]|0,c[s>>2]|0);if(d[(c[k>>2]|0)+32>>0]|0)b=(d[(c[m>>2]|0)+32>>0]|0)!=0;else b=0;a[(c[w>>2]|0)+32>>0]=b&1;v=c[t>>2]|0?-1:1;t=(c[k>>2]|0)+24|0;u=(c[m>>2]|0)+24|0;u=FR(c[t>>2]|0,c[t+4>>2]|0,c[u>>2]|0,c[u+4>>2]|0)|0;u=RR(v|0,((v|0)<0)<<31>>31|0,u|0,z|0)|0;v=n;c[v>>2]=u;c[v+4>>2]=z;if(!(d[(c[m>>2]|0)+32>>0]|0)?!((c[n+4>>2]|0)<0?(d[(c[k>>2]|0)+32>>0]|0)==0:0):0){g=(c[m>>2]|0)+24|0;b=c[w>>2]|0;e=c[g>>2]|0;g=c[g+4>>2]|0}else{g=(c[k>>2]|0)+24|0;b=c[w>>2]|0;e=c[g>>2]|0;g=c[g+4>>2]|0}w=b+24|0;c[w>>2]=e;c[w+4>>2]=g;l=x;return}case 2:{c[g>>2]=c[(c[w>>2]|0)+12>>2];c[h>>2]=c[(c[w>>2]|0)+16>>2];if(!(d[(c[h>>2]|0)+33>>0]|0))RL(c[r>>2]|0,c[h>>2]|0,c[s>>2]|0);RL(c[r>>2]|0,c[g>>2]|0,c[s>>2]|0);b:do if(!(d[(c[g>>2]|0)+32>>0]|0))while(1){if(c[c[s>>2]>>2]|0)break b;if(a[(c[h>>2]|0)+32>>0]|0)break b;u=c[t>>2]|0?-1:1;q=(c[g>>2]|0)+24|0;v=(c[h>>2]|0)+24|0;v=FR(c[q>>2]|0,c[q+4>>2]|0,c[v>>2]|0,c[v+4>>2]|0)|0;v=RR(u|0,((u|0)<0)<<31>>31|0,v|0,z|0)|0;u=z;if(!((u|0)>0|(u|0)==0&v>>>0>0))break b;RL(c[r>>2]|0,c[h>>2]|0,c[s>>2]|0)}while(0);t=(c[g>>2]|0)+24|0;u=c[t+4>>2]|0;v=(c[w>>2]|0)+24|0;c[v>>2]=c[t>>2];c[v+4>>2]=u;a[(c[w>>2]|0)+32>>0]=a[(c[g>>2]|0)+32>>0]|0;l=x;return}default:{c[i>>2]=c[(c[w>>2]|0)+20>>2];TL(c[i>>2]|0);u=UL(c[r>>2]|0,c[i>>2]|0,(c[w>>2]|0)+32|0)|0;c[c[s>>2]>>2]=u;u=(c[i>>2]|0)+16|0;v=c[u+4>>2]|0;w=(c[w>>2]|0)+24|0;c[w>>2]=c[u>>2];c[w+4>>2]=v;l=x;return}}}function SL(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r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c[g>>2]=e;c[h>>2]=0;c[i>>2]=c[f>>2];c[j>>2]=c[c[m>>2]>>2];a=c[m>>2]|0;if(c[(c[f>>2]|0)+40>>2]|0){c[h>>2]=VL(a,c[f>>2]|0,c[g>>2]|0)|0;m=c[h>>2]|0;l=k;return m|0}if((d[a+52>>0]|0|0)!=(d[(c[j>>2]|0)+231>>0]|0|0)?c[(c[i>>2]|0)+4>>2]|0:0){_K(d[(c[j>>2]|0)+231>>0]|0,c[c[i>>2]>>2]|0,c[(c[i>>2]|0)+4>>2]|0,(c[i>>2]|0)+8|0,(c[i>>2]|0)+16|0,(c[i>>2]|0)+32|0,c[g>>2]|0);c[(c[i>>2]|0)+28>>2]=c[(c[i>>2]|0)+8>>2];m=c[h>>2]|0;l=k;return m|0}WL(c[j>>2]|0,c[i>>2]|0,c[g>>2]|0);m=c[h>>2]|0;l=k;return m|0}function VL(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+192|0;w=E+172|0;g=E+168|0;x=E+164|0;y=E+160|0;A=E+156|0;B=E+152|0;C=E+148|0;h=E+176|0;i=E+144|0;j=E+8|0;k=E+140|0;m=E;n=E+136|0;o=E+132|0;p=E+128|0;q=E+124|0;r=E+120|0;s=E+116|0;t=E+112|0;u=E+108|0;v=E+104|0;c[g>>2]=b;c[x>>2]=e;c[y>>2]=f;c[A>>2]=0;c[B>>2]=c[x>>2];c[C>>2]=c[c[g>>2]>>2];a[h>>0]=0;if((c[(c[x>>2]|0)+64>>2]|0)==1?c[(c[x>>2]|0)+40>>2]|0:0){c[A>>2]=XL(c[C>>2]|0,c[(c[x>>2]|0)+72+20>>2]|0,(c[B>>2]|0)+16|0,(c[B>>2]|0)+28|0,(c[B>>2]|0)+32|0)|0;if(!(c[(c[B>>2]|0)+28>>2]|0))a[h>>0]=1}else D=5;a:do if((D|0)==5){c[i>>2]=d[(c[g>>2]|0)+52>>0];b=j;e=b+96|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(e|0));while(1){if(d[h>>0]|0|0)break a;c[k>>2]=0;g=m;c[g>>2]=0;c[g+4>>2]=0;c[n>>2]=0;while(1){if(c[A>>2]|0)break;if((c[n>>2]|0)>=(c[(c[x>>2]|0)+64>>2]|0))break;if(d[h>>0]|0|0)break;c[A>>2]=YL(c[C>>2]|0,c[x>>2]|0,c[n>>2]|0,j+((c[n>>2]|0)*24|0)|0,h)|0;do if(!(c[j+((c[n>>2]|0)*24|0)>>2]|0)){if(c[k>>2]|0?(f=c[i>>2]|0?-1:1,e=m,g=j+((c[n>>2]|0)*24|0)+8|0,g=FR(c[e>>2]|0,c[e+4>>2]|0,c[g>>2]|0,c[g+4>>2]|0)|0,RR(f|0,((f|0)<0)<<31>>31|0,g|0,z|0)|0,(z|0)>=0):0)break;e=j+((c[n>>2]|0)*24|0)+8|0;f=c[e+4>>2]|0;g=m;c[g>>2]=c[e>>2];c[g+4>>2]=f;c[k>>2]=1}while(0);c[n>>2]=(c[n>>2]|0)+1}c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[x>>2]|0)+64>>2]|0))break;while(1){if(c[A>>2]|0)break;if(d[h>>0]|0|0)break;if(c[j+((c[n>>2]|0)*24|0)>>2]|0)break;f=c[i>>2]|0?-1:1;e=j+((c[n>>2]|0)*24|0)+8|0;g=m;g=FR(c[e>>2]|0,c[e+4>>2]|0,c[g>>2]|0,c[g+4>>2]|0)|0;RR(f|0,((f|0)<0)<<31>>31|0,g|0,z|0)|0;if((z|0)>=0)break;c[A>>2]=YL(c[C>>2]|0,c[x>>2]|0,c[n>>2]|0,j+((c[n>>2]|0)*24|0)|0,h)|0;f=c[i>>2]|0?-1:1;e=j+((c[n>>2]|0)*24|0)+8|0;g=m;g=FR(c[e>>2]|0,c[e+4>>2]|0,c[g>>2]|0,c[g+4>>2]|0)|0;g=RR(f|0,((f|0)<0)<<31>>31|0,g|0,z|0)|0;f=z;if(!((f|0)>0|(f|0)==0&g>>>0>0))continue;e=j+((c[n>>2]|0)*24|0)+8|0;f=c[e+4>>2]|0;g=m;c[g>>2]=c[e>>2];c[g+4>>2]=f;c[n>>2]=0}c[n>>2]=(c[n>>2]|0)+1}if(d[h>>0]|0|0)continue;c[o>>2]=0;c[p>>2]=c[j+(((c[(c[x>>2]|0)+64>>2]|0)-1|0)*24|0)+20>>2];c[q>>2]=Yd((c[p>>2]|0)+1|0)|0;if(!(c[q>>2]|0))break;MR(c[q>>2]|0,c[j+(((c[(c[x>>2]|0)+64>>2]|0)-1|0)*24|0)+16>>2]|0,(c[p>>2]|0)+1|0)|0;c[n>>2]=0;while(1){if((c[n>>2]|0)>=((c[(c[x>>2]|0)+64>>2]|0)-1|0))break;if(!(c[j+((c[n>>2]|0)*24|0)>>2]|0)){c[r>>2]=c[j+((c[n>>2]|0)*24|0)+16>>2];c[s>>2]=c[q>>2];c[t>>2]=c[q>>2];c[u>>2]=(c[(c[x>>2]|0)+64>>2]|0)-1-(c[n>>2]|0);c[v>>2]=ZL(t,c[u>>2]|0,0,1,r,s)|0;if(!(c[v>>2]|0))break;c[o>>2]=(c[t>>2]|0)-(c[q>>2]|0)}c[n>>2]=(c[n>>2]|0)+1}if((c[n>>2]|0)==((c[(c[x>>2]|0)+64>>2]|0)-1|0)){D=35;break}Kd(c[q>>2]|0)}if((D|0)==35){x=m;C=c[x+4>>2]|0;D=(c[B>>2]|0)+16|0;c[D>>2]=c[x>>2];c[D+4>>2]=C;c[(c[B>>2]|0)+28>>2]=c[q>>2];c[(c[B>>2]|0)+32>>2]=c[o>>2];c[(c[B>>2]|0)+24>>2]=1;break}c[w>>2]=7;D=c[w>>2]|0;l=E;return D|0}while(0);a[c[y>>2]>>0]=a[h>>0]|0;c[w>>2]=c[A>>2];D=c[w>>2]|0;l=E;return D|0}function WL(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0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|0;m=x+8|0;t=x;c[n>>2]=a;c[o>>2]=b;c[v>>2]=e;c[w>>2]=f;c[p>>2]=g;c[h>>2]=c[(c[o>>2]|0)+8>>2];c[i>>2]=c[c[o>>2]>>2];c[j>>2]=d[(c[n>>2]|0)+231>>0]|0|0?201:202;if(!(c[h>>2]|0)){c[c[w>>2]>>2]=0;c[u>>2]=0;w=c[u>>2]|0;l=x;return w|0}while(1){c[k>>2]=c[c[c[o>>2]>>2]>>2];if(!(c[(c[k>>2]|0)+80>>2]|0)){a=4;break}e=(c[c[i>>2]>>2]|0)+88|0;f=c[e+4>>2]|0;g=t;c[g>>2]=c[e>>2];c[g+4>>2]=f;c[q>>2]=UK(c[n>>2]|0,c[c[i>>2]>>2]|0,r,s)|0;c[m>>2]=1;while(1){if(c[q>>2]|0)break;if((c[m>>2]|0)>=(c[h>>2]|0))break;if(!(c[(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0)+80>>2]|0))break;f=(c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0)+88|0;g=t;if(!((c[f>>2]|0)==(c[g>>2]|0)?(c[f+4>>2]|0)==(c[g+4>>2]|0):0))break;c[q>>2]=UK(c[n>>2]|0,c[(c[i>>2]|0)+(c[m>>2]<<2)>>2]|0,0,0)|0;c[m>>2]=(c[m>>2]|0)+1}if(c[q>>2]|0){a=12;break}RK(c[c[o>>2]>>2]|0,c[h>>2]|0,c[m>>2]|0,c[j>>2]|0);if((c[s>>2]|0)>0?c[(c[c[i>>2]>>2]|0)+56>>2]|0:0){c[q>>2]=SK(c[o>>2]|0,c[r>>2]|0,(c[s>>2]|0)+1|0)|0;if(c[q>>2]|0){a=16;break}c[r>>2]=c[(c[o>>2]|0)+16>>2]}if((c[(c[o>>2]|0)+24>>2]|0)>=0)VK(c[(c[o>>2]|0)+24>>2]|0,1,r,s);if((c[s>>2]|0)>0){a=21;break}}if((a|0)==4)c[c[w>>2]>>2]=0;else if((a|0)==12){c[u>>2]=c[q>>2];w=c[u>>2]|0;l=x;return w|0}else if((a|0)==16){c[u>>2]=c[q>>2];w=c[u>>2]|0;l=x;return w|0}else if((a|0)==21){c[c[w>>2]>>2]=c[r>>2];r=t;t=c[r+4>>2]|0;w=c[v>>2]|0;c[w>>2]=c[r>>2];c[w+4>>2]=t;c[c[p>>2]>>2]=c[s>>2]}c[u>>2]=0;w=c[u>>2]|0;l=x;return w|0}function YL(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;j=p+24|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;h=p+4|0;i=p;c[j>>2]=b;c[k>>2]=d;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[h>>2]=0;if((c[(c[k>>2]|0)+44>>2]|0)==(c[m>>2]|0)){WL(c[j>>2]|0,c[k>>2]|0,c[o>>2]|0);c[(c[n>>2]|0)+16>>2]=c[(c[k>>2]|0)+28>>2];c[(c[n>>2]|0)+20>>2]=c[(c[k>>2]|0)+32>>2];k=(c[k>>2]|0)+16|0;m=c[k+4>>2]|0;o=(c[n>>2]|0)+8|0;c[o>>2]=c[k>>2];c[o+4>>2]=m;o=c[h>>2]|0;l=p;return o|0}c[i>>2]=(c[k>>2]|0)+72+((c[m>>2]|0)*24|0);if(!(c[(c[i>>2]|0)+20>>2]|0)){c[c[n>>2]>>2]=1;o=c[h>>2]|0;l=p;return o|0}c[h>>2]=XL(c[j>>2]|0,c[(c[i>>2]|0)+20>>2]|0,(c[n>>2]|0)+8|0,(c[n>>2]|0)+16|0,(c[n>>2]|0)+20|0)|0;if(c[(c[n>>2]|0)+16>>2]|0){o=c[h>>2]|0;l=p;return o|0}a[c[o>>2]>>0]=1;o=c[h>>2]|0;l=p;return o|0}function ZL(b,e,f,g,h,i){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=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0<=i>>>0):0))C=22;if((C|0)==22?(C=0,h=v,f=c[h+4>>2]|0,i=u,g=c[i+4>>2]|0,!((f|0)<(g|0)|((f|0)==(g|0)?(c[h>>2]|0)>>>0<=(c[i>>2]|0)>>>0:0))):0){if(!(a[c[o>>2]>>0]&254))break;_L(o,u);h=u;h=FR(c[h>>2]|0,c[h+4>>2]|0,2,0)|0;i=u;c[i>>2]=h;c[i+4>>2]=z;continue}if(!(a[c[p>>2]>>0]&254))break;_L(p,v);h=v;h=FR(c[h>>2]|0,c[h+4>>2]|0,2,0)|0;i=v;c[i>>2]=h;c[i+4>>2]=z}if(c[s>>2]|0)c[n>>2]=c[s>>2];XK(0,o);XK(0,p);if(!(a[c[o>>2]>>0]|0))break;if(!(a[c[p>>2]>>0]|0))break;c[o>>2]=(c[o>>2]|0)+1;b=c[o>>2]|0;if(d[c[o>>2]>>0]&128|0)b=ZK(b,q)|0;else{c[q>>2]=d[b>>0];b=1}c[o>>2]=(c[o>>2]|0)+b;c[p>>2]=(c[p>>2]|0)+1;b=c[p>>2]|0;if(d[c[p>>2]>>0]&128|0)b=ZK(b,r)|0;else{c[r>>2]=d[b>>0];b=1}c[p>>2]=(c[p>>2]|0)+b}bL(0,p);bL(0,o);c[c[k>>2]>>2]=c[o>>2];c[c[m>>2]>>2]=c[p>>2];if((c[c[y>>2]>>2]|0)==(c[n>>2]|0)){c[x>>2]=0;C=c[x>>2]|0;l=D;return C|0}else{C=c[n>>2]|0;c[n>>2]=C+1;a[C>>0]=0;c[c[y>>2]>>2]=c[n>>2];c[x>>2]=1;C=c[x>>2]|0;l=D;return C|0}return 0}function _L(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+12|0;e=d+8|0;f=d;c[g>>2]=a;c[e>>2]=b;b=YK(c[c[g>>2]>>2]|0,f)|0;a=c[g>>2]|0;c[a>>2]=(c[a>>2]|0)+b;a=f;b=c[e>>2]|0;e=b;a=IR(c[e>>2]|0,c[e+4>>2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]|0)+52>>0]|0|0)==(d[(c[p>>2]|0)+231>>0]|0|0):0)?(c[(c[o>>2]|0)+64>>2]|0)<=4:0)a=(c[(c[o>>2]|0)+64>>2]|0)>0;else a=0;c[f>>2]=a&1;c[q>>2]=0;while(1){if((c[f>>2]|0)!=1)break;if((c[q>>2]|0)>=(c[(c[o>>2]|0)+64>>2]|0))break;c[g>>2]=(c[o>>2]|0)+72+((c[q>>2]|0)*24|0);if(!(c[(c[g>>2]|0)+12>>2]|0)){if(c[(c[g>>2]|0)+20>>2]|0?(c[(c[(c[g>>2]|0)+20>>2]|0)+36>>2]|0)==0:0)j=11}else j=11;if((j|0)==11){j=0;c[f>>2]=0}if(c[(c[g>>2]|0)+20>>2]|0)c[i>>2]=1;c[q>>2]=(c[q>>2]|0)+1}if(!((c[f>>2]|0)!=0&(c[i>>2]|0)!=0)){c[r>>2]=dM(c[h>>2]|0,c[o>>2]|0)|0;q=0;t=c[o>>2]|0;t=t+40|0;c[t>>2]=q;t=c[r>>2]|0;l=s;return t|0}if((c[(c[o>>2]|0)+68>>2]|0)>=(c[(c[p>>2]|0)+24>>2]|0))a=-1;else a=c[(c[o>>2]|0)+68>>2]|0;c[k>>2]=a;c[q>>2]=0;while(1){if(!(c[r>>2]|0))b=(c[q>>2]|0)<(c[(c[o>>2]|0)+64>>2]|0);else b=0;a=c[o>>2]|0;if(!b){b=1;break}c[m>>2]=a+72+((c[q>>2]|0)*24|0);c[n>>2]=c[(c[m>>2]|0)+20>>2];if(c[n>>2]|0)c[r>>2]=cM(c[p>>2]|0,c[n>>2]|0,c[k>>2]|0,c[c[m>>2]>>2]|0,c[(c[m>>2]|0)+4>>2]|0)|0;c[q>>2]=(c[q>>2]|0)+1}t=a+40|0;c[t>>2]=b;t=c[r>>2]|0;l=s;return t|0}function cM(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;q=t+40|0;k=t+36|0;r=t+32|0;s=t+28|0;m=t+24|0;h=t+20|0;n=t+16|0;o=t+12|0;i=t+8|0;p=t+4|0;j=t;c[k>>2]=a;c[r>>2]=b;c[s>>2]=e;c[m>>2]=f;c[h>>2]=g;c[i>>2]=c[(c[r>>2]|0)+4>>2];c[p>>2]=d[(c[k>>2]|0)+231>>0]|0|0?201:202;c[o>>2]=fL(c[k>>2]|0,c[r>>2]|0,c[m>>2]|0,c[h>>2]|0)|0;if(c[o>>2]|0){c[q>>2]=c[o>>2];s=c[q>>2]|0;l=t;return s|0}c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[i>>2]|0))break;c[j>>2]=c[(c[c[r>>2]>>2]|0)+(c[n>>2]<<2)>>2];if(!(c[(c[j>>2]|0)+40>>2]|0))break;if(gL(c[j>>2]|0,c[m>>2]|0,c[h>>2]|0)|0)break;c[n>>2]=(c[n>>2]|0)+1}c[(c[r>>2]|0)+8>>2]=c[n>>2];c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[(c[r>>2]|0)+8>>2]|0)){a=13;break}c[o>>2]=TK(c[k>>2]|0,c[(c[c[r>>2]>>2]|0)+(c[n>>2]<<2)>>2]|0)|0;if(c[o>>2]|0){a=11;break}c[n>>2]=(c[n>>2]|0)+1}if((a|0)==11){c[q>>2]=c[o>>2];s=c[q>>2]|0;l=t;return s|0}else if((a|0)==13){RK(c[c[r>>2]>>2]|0,c[n>>2]|0,c[n>>2]|0,c[p>>2]|0);c[(c[r>>2]|0)+24>>2]=c[s>>2];c[q>>2]=0;s=c[q>>2]|0;l=t;return s|0}return 0}function dM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;m=k+28|0;d=k+24|0;e=k+20|0;f=k+16|0;j=k+12|0;g=k+8|0;h=k+4|0;i=k;c[m>>2]=a;c[d>>2]=b;c[e>>2]=c[c[m>>2]>>2];c[j>>2]=0;c[f>>2]=0;while(1){if(c[j>>2]|0){a=8;break}if((c[f>>2]|0)>=(c[(c[d>>2]|0)+64>>2]|0)){a=8;break}c[g>>2]=(c[d>>2]|0)+72+((c[f>>2]|0)*24|0);if(c[(c[g>>2]|0)+20>>2]|0?(c[h>>2]=0,c[i>>2]=0,c[j>>2]=eM(c[e>>2]|0,c[g>>2]|0,c[(c[d>>2]|0)+68>>2]|0,h,i)|0,(c[j>>2]|0)==0):0)c[j>>2]=fM(c[e>>2]|0,c[d>>2]|0,c[f>>2]|0,c[i>>2]|0,c[h>>2]|0)|0;c[f>>2]=(c[f>>2]|0)+1}if((a|0)==8){l=k;return c[j>>2]|0}return 0}function eM(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+192|0;m=r+176|0;n=r+172|0;o=r+168|0;p=r+164|0;q=r+160|0;g=r+156|0;h=r+152|0;i=r+24|0;j=r+8|0;k=r;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[q>>2]=f;c[h>>2]=c[(c[n>>2]|0)+20>>2];a=i;b=a+128|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[j+12>>2]=3|(c[(c[n>>2]|0)+8>>2]|0?8:0)|(c[(c[n>>2]|0)+12>>2]|0?32:0)|((c[o>>2]|0)<(c[(c[m>>2]|0)+24>>2]|0)?4:0);c[j+8>>2]=c[o>>2];c[j>>2]=c[c[n>>2]>>2];c[j+4>>2]=c[(c[n>>2]|0)+4>>2];c[g>>2]=sK(c[m>>2]|0,c[h>>2]|0,j)|0;while(1){if(c[g>>2]|0)break;o=tK(c[m>>2]|0,c[h>>2]|0)|0;c[g>>2]=o;if(100!=(o|0))break;c[g>>2]=jM(c[m>>2]|0,i,c[(c[h>>2]|0)+48>>2]|0,c[(c[h>>2]|0)+52>>2]|0)|0}if(!(c[g>>2]|0))c[g>>2]=kM(c[m>>2]|0,i)|0;if(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c[c[p>>2]>>2]|0,c[q>>2]|0,c[g>>2]|0)|0;break}c[n>>2]=7;s=c[n>>2]|0;l=t;return s|0}else{c[r>>2]=c[q>>2];c[h>>2]=c[g>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=16)break a;if(!(c[(c[p>>2]|0)+(c[i>>2]<<2)>>2]|0)){s=8;break}c[m>>2]=mM(d[(c[o>>2]|0)+231>>0]|0,c[r>>2]|0,c[h>>2]|0,c[(c[p>>2]|0)+(c[i>>2]<<2)>>2]|0,c[(c[p>>2]|0)+64+(c[i>>2]<<2)>>2]|0,j,k)|0;a=(c[r>>2]|0)!=(c[q>>2]|0);if(c[m>>2]|0)break;if(a)Kd(c[r>>2]|0);Kd(c[(c[p>>2]|0)+(c[i>>2]<<2)>>2]|0);c[(c[p>>2]|0)+(c[i>>2]<<2)>>2]=0;c[r>>2]=c[j>>2];c[h>>2]=c[k>>2];if(((c[i>>2]|0)+1|0)==16){c[(c[p>>2]|0)+(c[i>>2]<<2)>>2]=c[r>>2];c[(c[p>>2]|0)+64+(c[i>>2]<<2)>>2]=c[h>>2]}c[i>>2]=(c[i>>2]|0)+1}if((s|0)==8){c[(c[p>>2]|0)+(c[i>>2]<<2)>>2]=c[r>>2];c[(c[p>>2]|0)+64+(c[i>>2]<<2)>>2]=c[h>>2];break}if(a)Kd(c[r>>2]|0);c[n>>2]=c[m>>2];s=c[n>>2]|0;l=t;return s|0}while(0);c[n>>2]=0;s=c[n>>2]|0;l=t;return s|0}function kM(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;j=o+32|0;e=o+28|0;k=o+24|0;m=o+20|0;n=o+16|0;f=o+12|0;g=o+8|0;h=o+4|0;i=o;c[e>>2]=a;c[k>>2]=b;c[m>>2]=0;c[n>>2]=0;c[f>>2]=0;a:while(1){if((c[f>>2]|0)>=16){a=10;break}do if(c[(c[k>>2]|0)+(c[f>>2]<<2)>>2]|0){if(!(c[m>>2]|0)){c[m>>2]=c[(c[k>>2]|0)+(c[f>>2]<<2)>>2];c[n>>2]=c[(c[k>>2]|0)+64+(c[f>>2]<<2)>>2];c[(c[k>>2]|0)+(c[f>>2]<<2)>>2]=0;break}c[i>>2]=mM(d[(c[e>>2]|0)+231>>0]|0,c[(c[k>>2]|0)+(c[f>>2]<<2)>>2]|0,c[(c[k>>2]|0)+64+(c[f>>2]<<2)>>2]|0,c[m>>2]|0,c[n>>2]|0,h,g)|0;if(c[i>>2]|0){a=7;break a}Kd(c[(c[k>>2]|0)+(c[f>>2]<<2)>>2]|0);Kd(c[m>>2]|0);c[(c[k>>2]|0)+(c[f>>2]<<2)>>2]=0;c[m>>2]=c[h>>2];c[n>>2]=c[g>>2]}while(0);c[f>>2]=(c[f>>2]|0)+1}if((a|0)==7){Kd(c[m>>2]|0);c[j>>2]=c[i>>2];n=c[j>>2]|0;l=o;return n|0}else if((a|0)==10){c[c[k>>2]>>2]=c[m>>2];c[(c[k>>2]|0)+64>>2]=c[n>>2];c[j>>2]=0;n=c[j>>2]|0;l=o;return n|0}return 0}function lM(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;zK(c[d>>2]|0);Kd(c[d>>2]|0);l=b;return}function mM(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0;y=l;l=l+96|0;w=y+88|0;x=y+84|0;D=y+80|0;B=y+76|0;C=y+72|0;A=y+68|0;i=y+64|0;j=y+60|0;k=y+24|0;m=y+16|0;n=y+8|0;o=y+56|0;p=y+52|0;q=y+48|0;r=y+44|0;s=y+40|0;t=y+36|0;u=y+32|0;v=y;c[x>>2]=a;c[D>>2]=b;c[B>>2]=d;c[C>>2]=e;c[A>>2]=f;c[i>>2]=g;c[j>>2]=h;h=k;c[h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|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=l;l=l+64|0;m=t+56|0;n=t+52|0;o=t+48|0;p=t+44|0;q=t+40|0;r=t+36|0;s=t+32|0;g=t+28|0;h=t+16|0;i=t+8|0;j=t;k=t+24|0;c[m>>2]=b;c[n>>2]=e;c[o>>2]=f;c[p>>2]=c[c[m>>2]>>2];c[q>>2]=c[c[n>>2]>>2];c[r>>2]=c[c[o>>2]>>2];a:while(1){if((a[c[q>>2]>>0]|0)==0?(a[c[r>>2]>>0]|0)==0:0)break;b=c[q>>2]|0;do if((a[c[q>>2]>>0]|0)==1){e=(c[q>>2]|0)+1|0;if(d[b+1>>0]&128|0){ZK(e,s)|0;break}else{c[s>>2]=d[e>>0];break}}else if(!(a[b>>0]|0)){c[s>>2]=2147483647;break}else{c[s>>2]=0;break}while(0);b=c[r>>2]|0;do if((a[c[r>>2]>>0]|0)==1){e=(c[r>>2]|0)+1|0;if(d[b+1>>0]&128|0){ZK(e,g)|0;break}else{c[g>>2]=d[e>>0];break}}else if(!(a[b>>0]|0)){c[g>>2]=2147483647;break}else{c[g>>2]=0;break}while(0);if((c[s>>2]|0)!=(c[g>>2]|0))if((c[s>>2]|0)<(c[g>>2]|0)){f=oM(p,c[s>>2]|0)|0;c[q>>2]=(c[q>>2]|0)+f;XK(p,q);continue}else{f=oM(p,c[g>>2]|0)|0;c[r>>2]=(c[r>>2]|0)+f;XK(p,r);continue}f=h;c[f>>2]=0;c[f+4>>2]=0;f=i;c[f>>2]=0;c[f+4>>2]=0;f=j;c[f>>2]=0;c[f+4>>2]=0;c[k>>2]=oM(p,c[s>>2]|0)|0;c[q>>2]=(c[q>>2]|0)+(c[k>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[k>>2]|0);_L(q,h);_L(r,i);while(1){e=h;u=c[e+4>>2]|0;b=i;f=c[b+4>>2]|0;b=(u|0)<(f|0)|((u|0)==(f|0)?(c[e>>2]|0)>>>0<(c[b>>2]|0)>>>0:0);e=h;f=i;$L(p,j,b?c[e>>2]|0:c[f>>2]|0,b?c[e+4>>2]|0:c[f+4>>2]|0);f=j;f=FR(c[f>>2]|0,c[f+4>>2]|0,2,0)|0;e=j;c[e>>2]=f;c[e+4>>2]=z;e=h;f=i;do if(!((c[e>>2]|0)==(c[f>>2]|0)?(c[e+4>>2]|0)==(c[f+4>>2]|0):0)){f=h;b=c[f+4>>2]|0;u=i;e=c[u+4>>2]|0;if((b|0)<(e|0)|((b|0)==(e|0)?(c[f>>2]|0)>>>0<(c[u>>2]|0)>>>0:0)){pM(q,h);break}else{pM(r,i);break}}else{pM(q,h);pM(r,i)}while(0);f=h;u=i;if(!((c[f>>2]|0)!=2147483647|(c[f+4>>2]|0)!=0?1:(c[u>>2]|0)!=2147483647|(c[u+4>>2]|0)!=0))continue a}}u=c[p>>2]|0;c[p>>2]=u+1;a[u>>0]=0;c[c[m>>2]>>2]=c[p>>2];c[c[n>>2]>>2]=(c[q>>2]|0)+1;c[c[o>>2]>>2]=(c[r>>2]|0)+1;l=t;return}function oM(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=b;c[f>>2]=d;c[g>>2]=0;if(!(c[f>>2]|0)){h=c[g>>2]|0;l=i;return h|0}c[h>>2]=c[c[e>>2]>>2];f=c[f>>2]|0;c[g>>2]=1+(IK((c[h>>2]|0)+1|0,f,((f|0)<0)<<31>>31)|0);a[c[h>>2]>>0]=1;c[c[e>>2]>>2]=(c[h>>2]|0)+(c[g>>2]|0);h=c[g>>2]|0;l=i;return h|0}function pM(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=d;if(a[c[c[e>>2]>>2]>>0]&254|0){_L(c[e>>2]|0,c[f>>2]|0);f=c[f>>2]|0;e=f;e=FR(c[e>>2]|0,c[e+4>>2]|0,2,0)|0;c[f>>2]=e;c[f+4>>2]=z;l=g;return}else{f=c[f>>2]|0;c[f>>2]=2147483647;c[f+4>>2]=0;l=g;return}}function qM(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=0;if(a[(c[g>>2]|0)+7>>0]|0?(c[i>>2]=0,c[h>>2]=CM(c[g>>2]|0,i)|0,(c[h>>2]|0)==0):0){i=(c[g>>2]|0)+32|0;pI(c[(c[g>>2]|0)+8>>2]|0,1,c[i>>2]|0,c[i+4>>2]|0)|0;a[(c[g>>2]|0)+7>>0]=0;if(100==(Hr(c[(c[g>>2]|0)+8>>2]|0)|0)){c[e>>2]=0;i=c[e>>2]|0;l=j;return i|0}c[h>>2]=Er(c[(c[g>>2]|0)+8>>2]|0)|0;if((c[h>>2]|0)==0?(c[(c[c[g>>2]>>2]|0)+40>>2]|0)==0:0){c[h>>2]=267;a[(c[g>>2]|0)+6>>0]=1}}if((c[h>>2]|0)!=0&(c[f>>2]|0)!=0)Bi(c[f>>2]|0,c[h>>2]|0);c[e>>2]=c[h>>2];i=c[e>>2]|0;l=j;return i|0}function rM(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;v=l;l=l+80|0;b=v+64|0;m=v+60|0;n=v+56|0;o=v;p=v+52|0;q=v+48|0;r=v+44|0;s=v+40|0;t=v+36|0;e=v+32|0;f=v+28|0;g=v+24|0;h=v+20|0;i=v+16|0;j=v+12|0;k=v+8|0;c[b>>2]=a;c[m>>2]=0;if(!(c[(c[b>>2]|0)+24>>2]|0)){u=c[m>>2]|0;l=v;return u|0}c[q>>2]=c[c[b>>2]>>2];c[r>>2]=c[(c[q>>2]|0)+36>>2];c[s>>2]=c[c[r>>2]>>2];w=iI(c[(c[b>>2]|0)+8>>2]|0,0)|0;a=o;c[a>>2]=w;c[a+4>>2]=z;c[n>>2]=0;while(1){if(!((c[n>>2]|0)<(c[(c[q>>2]|0)+24>>2]|0)?(c[m>>2]|0)==0:0))break;if(!(d[(c[(c[q>>2]|0)+32>>2]|0)+(c[n>>2]|0)>>0]|0)){c[t>>2]=Iu(c[(c[b>>2]|0)+8>>2]|0,(c[n>>2]|0)+1|0)|0;c[e>>2]=0;c[m>>2]=zM(c[r>>2]|0,c[(c[b>>2]|0)+16>>2]|0,c[t>>2]|0,-1,e)|0;a:while(1){if(c[m>>2]|0)break;c[g>>2]=0;c[h>>2]=0;c[i>>2]=0;c[j>>2]=0;c[m>>2]=sb[c[(c[s>>2]|0)+20>>2]&255](c[e>>2]|0,f,g,h,i,j)|0;c[p>>2]=c[(c[b>>2]|0)+24>>2];while(1){if(!(c[p>>2]|0?(c[m>>2]|0)==0:0))continue a;c[k>>2]=c[c[p>>2]>>2];if(!((c[(c[p>>2]|0)+4>>2]|0)<(c[(c[q>>2]|0)+24>>2]|0)?(c[(c[p>>2]|0)+4>>2]|0)!=(c[n>>2]|0):0))u=11;do if((u|0)==11?(u=0,(c[j>>2]|0)==0?1:(c[(c[k>>2]|0)+12>>2]|0)==0):0){if((c[(c[k>>2]|0)+4>>2]|0)!=(c[g>>2]|0)){if(!(c[(c[k>>2]|0)+8>>2]|0))break;if((c[(c[k>>2]|0)+4>>2]|0)>=(c[g>>2]|0))break}if(!(wQ(c[f>>2]|0,c[c[k>>2]>>2]|0,c[(c[k>>2]|0)+4>>2]|0)|0)){x=o;a=c[n>>2]|0;w=c[j>>2]|0;AM((c[p>>2]|0)+12|0,c[x>>2]|0,c[x+4>>2]|0,a,((a|0)<0)<<31>>31,w,((w|0)<0)<<31>>31,m)|0}}while(0);c[p>>2]=c[(c[p>>2]|0)+8>>2]}}if(c[e>>2]|0)tb[c[(c[s>>2]|0)+16>>2]&255](c[e>>2]|0)|0;if((c[m>>2]|0)==101)c[m>>2]=0}c[n>>2]=(c[n>>2]|0)+1}c[p>>2]=c[(c[b>>2]|0)+24>>2];while(1){if(!(c[p>>2]|0?(c[m>>2]|0)==0:0))break;if(c[(c[p>>2]|0)+12>>2]|0)c[m>>2]=BM((c[p>>2]|0)+12|0,0,0)|0;c[p>>2]=c[(c[p>>2]|0)+8>>2]}x=c[m>>2]|0;l=v;return x|0}function sM(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;m=p+28|0;k=p+24|0;h=p+20|0;o=p+16|0;n=p+12|0;i=p+8|0;j=p+4|0;g=p;c[m>>2]=b;c[k>>2]=e;c[h>>2]=f;c[o>>2]=1;if(c[c[h>>2]>>2]|0){o=c[o>>2]|0;l=p;return o|0}switch(c[c[k>>2]>>2]|0){case 3:case 1:{if(sM(c[m>>2]|0,c[(c[k>>2]|0)+12>>2]|0,c[h>>2]|0)|0?sM(c[m>>2]|0,c[(c[k>>2]|0)+16>>2]|0,c[h>>2]|0)|0:0)b=(uM(c[k>>2]|0,c[h>>2]|0)|0)!=0;else b=0;c[o>>2]=b&1;if(c[o>>2]|0){o=c[o>>2]|0;l=p;return o|0}if((c[c[k>>2]>>2]|0)!=1){o=c[o>>2]|0;l=p;return o|0}if(c[(c[k>>2]|0)+8>>2]|0?(c[c[(c[k>>2]|0)+8>>2]>>2]|0)==1:0){o=c[o>>2]|0;l=p;return o|0}c[n>>2]=c[k>>2];while(1){b=c[n>>2]|0;if(c[(c[n>>2]|0)+20>>2]|0)break;j=(c[b+16>>2]|0)+24|0;k=(c[m>>2]|0)+32|0;if((c[j>>2]|0)==(c[k>>2]|0)?(c[j+4>>2]|0)==(c[k+4>>2]|0):0)TL(c[(c[(c[n>>2]|0)+16>>2]|0)+20>>2]|0);c[n>>2]=c[(c[n>>2]|0)+12>>2]}k=b+24|0;m=(c[m>>2]|0)+32|0;if(!((c[k>>2]|0)==(c[m>>2]|0)?(c[k+4>>2]|0)==(c[m+4>>2]|0):0)){o=c[o>>2]|0;l=p;return o|0}TL(c[(c[n>>2]|0)+20>>2]|0);o=c[o>>2]|0;l=p;return o|0}case 4:{c[i>>2]=sM(c[m>>2]|0,c[(c[k>>2]|0)+12>>2]|0,c[h>>2]|0)|0;c[j>>2]=sM(c[m>>2]|0,c[(c[k>>2]|0)+16>>2]|0,c[h>>2]|0)|0;c[o>>2]=(c[i>>2]|0?1:(c[j>>2]|0)!=0)&1;o=c[o>>2]|0;l=p;return o|0}case 2:{if(sM(c[m>>2]|0,c[(c[k>>2]|0)+12>>2]|0,c[h>>2]|0)|0)b=(sM(c[m>>2]|0,c[(c[k>>2]|0)+16>>2]|0,c[h>>2]|0)|0)!=0^1;else b=0;c[o>>2]=b&1;o=c[o>>2]|0;l=p;return o|0}default:{do if(c[(c[m>>2]|0)+24>>2]|0){j=(c[k>>2]|0)+24|0;n=(c[m>>2]|0)+32|0;if(!((c[j>>2]|0)==(c[n>>2]|0)?(c[j+4>>2]|0)==(c[n+4>>2]|0):0)?(d[(c[k>>2]|0)+34>>0]|0)==0:0)break;c[g>>2]=c[(c[k>>2]|0)+20>>2];if(a[(c[k>>2]|0)+34>>0]|0)TL(c[g>>2]|0);j=vM(c[m>>2]|0,c[g>>2]|0)|0;c[c[h>>2]>>2]=j;c[o>>2]=(c[(c[g>>2]|0)+28>>2]|0)!=0&1;j=(c[m>>2]|0)+32|0;m=c[j+4>>2]|0;n=(c[k>>2]|0)+24|0;c[n>>2]=c[j>>2];c[n+4>>2]=m;o=c[o>>2]|0;l=p;return o|0}while(0);if(!(d[(c[k>>2]|0)+32>>0]|0)){n=(c[k>>2]|0)+24|0;b=(c[m>>2]|0)+32|0;b=(c[n>>2]|0)==(c[b>>2]|0)?(c[n+4>>2]|0)==(c[b+4>>2]|0):0}else b=0;c[o>>2]=b&1;o=c[o>>2]|0;l=p;return o|0}}return 0}function tM(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=c[(c[e>>2]|0)+24>>2];while(1){if(!(c[b>>2]|0))break;iK(c[(c[b>>2]|0)+12>>2]|0);c[(c[b>>2]|0)+12>>2]=0;c[b>>2]=c[(c[b>>2]|0)+8>>2]}l=d;return}function uM(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;g=r+44|0;h=r+40|0;m=r+36|0;n=r+32|0;i=r+28|0;o=r+24|0;p=r+20|0;q=r+16|0;e=r+12|0;f=r+8|0;j=r+4|0;k=r;c[g>>2]=a;c[h>>2]=b;c[m>>2]=1;if(c[c[h>>2]>>2]|0){q=c[m>>2]|0;l=r;return q|0}if((c[c[g>>2]>>2]|0)!=1){q=c[m>>2]|0;l=r;return q|0}if(d[(c[g>>2]|0)+32>>0]|0|0){q=c[m>>2]|0;l=r;return q|0}if(c[(c[g>>2]|0)+8>>2]|0?(c[c[(c[g>>2]|0)+8>>2]>>2]|0)==1:0){q=c[m>>2]|0;l=r;return q|0}c[i>>2]=0;c[n>>2]=c[g>>2];while(1){a=c[n>>2]|0;if(!(c[(c[n>>2]|0)+12>>2]|0))break;c[i>>2]=(c[i>>2]|0)+(c[(c[(c[a+16>>2]|0)+20>>2]|0)+32>>2]|0);c[n>>2]=c[(c[n>>2]|0)+12>>2]}c[i>>2]=(c[i>>2]|0)+(c[(c[a+20>>2]|0)+32>>2]|0);if(!(c[i>>2]|0)){c[m>>2]=0;q=c[m>>2]|0;l=r;return q|0}c[o>>2]=Yd(c[i>>2]<<1)|0;a:do if(c[o>>2]|0){c[p>>2]=c[(c[(c[n>>2]|0)+20>>2]|0)+28>>2];c[q>>2]=c[(c[(c[n>>2]|0)+20>>2]|0)+64>>2];c[n>>2]=c[(c[n>>2]|0)+8>>2];while(1){if(!((c[m>>2]|0)!=0&(c[n>>2]|0)!=0))break;if((c[c[n>>2]>>2]|0)!=1)break;c[e>>2]=c[(c[(c[n>>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if(c[m>>2]|0){a=5;break}b=c[x>>2]|0;if(!(c[e>>2]|0)){a=7;break}a=c[e>>2]|0;if(b){c[g>>2]=a;c[h>>2]=c[x>>2];c[i>>2]=c[g>>2];ZL(g,(c[j>>2]|0)-(c[u>>2]|0)|0,0,1,h,i)|0;Kd(c[x>>2]|0);c[x>>2]=c[e>>2];c[t>>2]=(c[g>>2]|0)-(c[x>>2]|0);if(!(c[t>>2]|0)){a=11;break}}else{c[x>>2]=a;c[t>>2]=c[f>>2]}c[u>>2]=c[j>>2]}c[j>>2]=(c[j>>2]|0)+1}if((a|0)==5){c[w>>2]=c[m>>2];x=c[w>>2]|0;l=y;return x|0}else if((a|0)==7){Kd(b);c[(c[v>>2]|0)+28>>2]=0;c[(c[v>>2]|0)+32>>2]=0;c[w>>2]=0;x=c[w>>2]|0;l=y;return x|0}else if((a|0)==11){Kd(c[x>>2]|0);c[(c[v>>2]|0)+28>>2]=0;c[(c[v>>2]|0)+32>>2]=0;c[w>>2]=0;x=c[w>>2]|0;l=y;return x|0}else if((a|0)==14){do if((c[u>>2]|0)>=0){c[n>>2]=c[(c[v>>2]|0)+44>>2];if((c[n>>2]|0)<0){c[(c[v>>2]|0)+28>>2]=c[x>>2];c[(c[v>>2]|0)+32>>2]=c[t>>2];t=(c[s>>2]|0)+32|0;u=c[t+4>>2]|0;x=(c[v>>2]|0)+16|0;c[x>>2]=c[t>>2];c[x+4>>2]=u;c[(c[v>>2]|0)+24>>2]=1;break}if((c[n>>2]|0)>(c[u>>2]|0)){c[p>>2]=c[x>>2];c[q>>2]=c[(c[v>>2]|0)+28>>2];c[o>>2]=(c[n>>2]|0)-(c[u>>2]|0)}else{c[p>>2]=c[(c[v>>2]|0)+28>>2];c[q>>2]=c[x>>2];c[o>>2]=(c[u>>2]|0)-(c[n>>2]|0)}c[r>>2]=Yd((c[t>>2]|0)+8|0)|0;if(!(c[r>>2]|0)){Kd(c[x>>2]|0);c[w>>2]=7;x=c[w>>2]|0;l=y;return x|0}c[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)!=(c[j>>2]|0):0){nM(c[m>>2]|0,n,j);u=c[k>>2]|0;l=o;return u|0}if((c[h>>2]|0)!=(c[n>>2]|0)){bL(c[m>>2]|0,n);u=c[k>>2]|0;l=o;return u|0}if((c[i>>2]|0)!=(c[j>>2]|0)){bL(c[m>>2]|0,j);u=c[k>>2]|0;l=o;return u|0}else{c[k>>2]=0;u=c[k>>2]|0;l=o;return u|0}return 0}function zM(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;n=l;l=l+32|0;j=n+28|0;k=n+24|0;p=n+20|0;o=n+16|0;m=n+12|0;g=n+8|0;h=n+4|0;i=n;c[j>>2]=a;c[k>>2]=b;c[p>>2]=d;c[o>>2]=e;c[m>>2]=f;c[g>>2]=c[c[j>>2]>>2];c[h>>2]=0;c[i>>2]=wb[c[(c[g>>2]|0)+12>>2]&255](c[j>>2]|0,c[p>>2]|0,c[o>>2]|0,h)|0;if(((c[i>>2]|0)==0?(c[c[h>>2]>>2]=c[j>>2],(c[c[g>>2]>>2]|0)>=1):0)?(c[i>>2]=yb[c[(c[g>>2]|0)+24>>2]&255](c[h>>2]|0,c[k>>2]|0)|0,c[i>>2]|0):0){tb[c[(c[g>>2]|0)+16>>2]&255](c[h>>2]|0)|0;c[h>>2]=0}c[c[m>>2]>>2]=c[h>>2];l=n;return c[i>>2]|0}function AM(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+64|0;r=u+48|0;s=u+44|0;j=u+24|0;k=u+16|0;m=u+8|0;n=u+40|0;o=u+36|0;p=u+32|0;q=u;c[s>>2]=a;a=j;c[a>>2]=b;c[a+4>>2]=d;d=k;c[d>>2]=e;c[d+4>>2]=f;f=m;c[f>>2]=g;c[f+4>>2]=h;c[n>>2]=i;c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>>2]|0;t=(c[o>>2]|0)+32|0;c[t>>2]=c[m>>2];c[t+4>>2]=q}}while(0);c[c[n>>2]>>2]=c[p>>2];if((c[o>>2]|0)!=(c[c[s>>2]>>2]|0)){c[c[s>>2]>>2]=c[o>>2];c[r>>2]=1;t=c[r>>2]|0;l=u;return t|0}else{c[r>>2]=0;t=c[r>>2]|0;l=u;return t|0}return 0}function BM(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+20|0;g=k+16|0;h=k;i=k+12|0;j=k+8|0;c[g>>2]=b;b=h;c[b>>2]=d;c[b+4>>2]=e;c[i>>2]=c[c[g>>2]>>2];do if(c[i>>2]|0){if(((c[c[i>>2]>>2]|0)+10+1|0)>(c[(c[i>>2]|0)+8>>2]|0)){c[j>>2]=c[(c[i>>2]|0)+8>>2]<<1;c[i>>2]=Df(c[i>>2]|0,40+(c[j>>2]|0)|0)|0;if(c[i>>2]|0){c[(c[i>>2]|0)+8>>2]=c[j>>2];c[(c[i>>2]|0)+4>>2]=(c[i>>2]|0)+40;break}Kd(c[c[g>>2]>>2]|0);c[c[g>>2]>>2]=0;c[f>>2]=7;j=c[f>>2]|0;l=k;return j|0}}else{c[i>>2]=Yd(140)|0;if(c[i>>2]|0){c[(c[i>>2]|0)+8>>2]=100;c[(c[i>>2]|0)+4>>2]=(c[i>>2]|0)+40;c[c[i>>2]>>2]=0;break}c[f>>2]=7;j=c[f>>2]|0;l=k;return j|0}while(0);h=IK((c[(c[i>>2]|0)+4>>2]|0)+(c[c[i>>2]>>2]|0)|0,c[h>>2]|0,c[h+4>>2]|0)|0;j=c[i>>2]|0;c[j>>2]=(c[j>>2]|0)+h;a[(c[(c[i>>2]|0)+4>>2]|0)+(c[c[i>>2]>>2]|0)>>0]=0;c[c[g>>2]>>2]=c[i>>2];c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}function CM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;do if(!(c[(c[e>>2]|0)+8>>2]|0)){c[h>>2]=c[c[e>>2]>>2];c[j>>2]=c[(c[h>>2]|0)+216>>2];c[i>>2]=Ue(42256,j)|0;if(c[i>>2]|0){c[g>>2]=Fu(c[(c[h>>2]|0)+12>>2]|0,c[i>>2]|0,-1,(c[e>>2]|0)+8|0,0)|0;Kd(c[i>>2]|0);break}c[d>>2]=7;j=c[d>>2]|0;l=k;return j|0}while(0);c[c[f>>2]>>2]=c[(c[e>>2]|0)+8>>2];c[d>>2]=c[g>>2];j=c[d>>2]|0;l=k;return j|0}function DM(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[k>>2]=c[c[f>>2]>>2];if((c[k>>2]|0)==5){c[j>>2]=ob[c[h>>2]&255](c[f>>2]|0,c[c[g>>2]>>2]|0,c[i>>2]|0)|0;k=c[g>>2]|0;c[k>>2]=(c[k>>2]|0)+1;k=c[j>>2]|0;l=m;return k|0}c[j>>2]=DM(c[(c[f>>2]|0)+12>>2]|0,c[g>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;if(!((c[j>>2]|0)==0&(c[k>>2]|0)!=2)){k=c[j>>2]|0;l=m;return k|0}c[j>>2]=DM(c[(c[f>>2]|0)+16>>2]|0,c[g>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;k=c[j>>2]|0;l=m;return k|0}function EM(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j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2]=c[f>>2];while(1){if(c[(c[o>>2]|0)+8>>2]|0)b=(c[c[(c[o>>2]|0)+8>>2]>>2]|0)==1;else b=0;e=c[o>>2]|0;if(!b)break;c[o>>2]=c[e+8>>2]}e=e+24|0;f=c[e+4>>2]|0;t=g;c[t>>2]=c[e>>2];c[t+4>>2]=f;a[h>>0]=a[(c[o>>2]|0)+32>>0]|0;c[p>>2]=c[o>>2];while(1){if(!(c[p>>2]|0))break;b=c[p>>2]|0;if((c[c[p>>2]>>2]|0)!=5)b=c[b+16>>2]|0;c[i>>2]=b;t=Yd((c[(c[n>>2]|0)+24>>2]|0)*3<<2)|0;c[(c[i>>2]|0)+40>>2]=t;if(!(c[(c[i>>2]|0)+40>>2]|0)){r=12;break}GR(c[(c[i>>2]|0)+40>>2]|0,0,(c[(c[n>>2]|0)+24>>2]|0)*3<<2|0)|0;c[p>>2]=c[(c[p>>2]|0)+12>>2]}if((r|0)==12){c[j>>2]=7;t=c[j>>2]|0;l=s;return t|0}QL(c[k>>2]|0,c[o>>2]|0,m);while(1){if(!((d[(c[k>>2]|0)+6>>0]|0)==0?(c[m>>2]|0)==0:0))break;do{if(!(d[(c[k>>2]|0)+7>>0]|0))Er(c[(c[k>>2]|0)+8>>2]|0)|0;RL(c[k>>2]|0,c[o>>2]|0,m);a[(c[k>>2]|0)+6>>0]=a[(c[o>>2]|0)+32>>0]|0;a[(c[k>>2]|0)+7>>0]=1;c[(c[k>>2]|0)+88>>2]=1;p=(c[o>>2]|0)+24|0;r=c[p+4>>2]|0;t=(c[k>>2]|0)+32|0;c[t>>2]=c[p>>2];c[t+4>>2]=r;if(d[(c[k>>2]|0)+6>>0]|0)break;if((c[c[o>>2]>>2]|0)!=1)break}while((ML(c[k>>2]|0,m)|0)!=0);if(c[m>>2]|0)continue;if(d[(c[k>>2]|0)+6>>0]|0)continue;GM(c[o>>2]|0)}a[(c[k>>2]|0)+6>>0]=0;r=c[q+4>>2]|0;t=(c[k>>2]|0)+32|0;c[t>>2]=c[q>>2];c[t+4>>2]=r;if(a[h>>0]|0){a[(c[o>>2]|0)+32>>0]=a[h>>0]|0;break}QL(c[k>>2]|0,c[o>>2]|0,m);do{RL(c[k>>2]|0,c[o>>2]|0,m);r=(c[o>>2]|0)+24|0;t=g}while(((c[r>>2]|0)!=(c[t>>2]|0)?1:(c[r+4>>2]|0)!=(c[t+4>>2]|0))?(c[m>>2]|0)==0:0)}while(0);c[j>>2]=c[m>>2];t=c[j>>2]|0;l=s;return t|0}function GM(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;e=k+12|0;g=k+8|0;h=k+4|0;i=k+20|0;j=k;c[f>>2]=b;if(!(c[f>>2]|0)){l=k;return}c[e>>2]=c[(c[f>>2]|0)+20>>2];a:do if(c[e>>2]|0?c[(c[e>>2]|0)+28>>2]|0:0){c[g>>2]=0;c[h>>2]=c[(c[e>>2]|0)+28>>2];while(1){a[i>>0]=0;c[j>>2]=0;while(1){if(!(254&(a[c[h>>2]>>0]|d[i>>0])))break;if(!(d[i>>0]&128))c[j>>2]=(c[j>>2]|0)+1;e=c[h>>2]|0;c[h>>2]=e+1;a[i>>0]=a[e>>0]&128}e=(c[(c[f>>2]|0)+40>>2]|0)+(((c[g>>2]|0)*3|0)+1<<2)|0;c[e>>2]=(c[e>>2]|0)+(c[j>>2]|0);e=(c[(c[f>>2]|0)+40>>2]|0)+(((c[g>>2]|0)*3|0)+2<<2)|0;c[e>>2]=(c[e>>2]|0)+((c[j>>2]|0)>0&1);if(!(a[c[h>>2]>>0]|0))break a;c[h>>2]=(c[h>>2]|0)+1;b=c[h>>2]|0;if(d[c[h>>2]>>0]&128|0)b=ZK(b,g)|0;else{c[g>>2]=d[b>>0];b=1}c[h>>2]=(c[h>>2]|0)+b}}while(0);GM(c[(c[f>>2]|0)+12>>2]|0);GM(c[(c[f>>2]|0)+16>>2]|0);l=k;return}function HM(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+32|0;p=o+28|0;f=o+24|0;g=o+20|0;h=o+16|0;i=o+12|0;j=o+8|0;k=o+4|0;m=o;c[p>>2]=b;c[f>>2]=e;c[g>>2]=c[c[c[f>>2]>>2]>>2];c[i>>2]=c[(c[p>>2]|0)+20>>2];c[j>>2]=c[(c[i>>2]|0)+28>>2];c[k>>2]=0;b=c[(c[p>>2]|0)+36>>2]|0;e=c[(c[f>>2]|0)+4>>2]|0;if((a[(c[f>>2]|0)+24>>0]|0)==121)c[h>>2]=O(b,e)|0;else c[h>>2]=O(b,(e+31|0)/32|0)|0;while(1){c[m>>2]=PL(j)|0;if(!((c[(c[i>>2]|0)+68>>2]|0)<(c[(c[g>>2]|0)+24>>2]|0)?(c[(c[i>>2]|0)+68>>2]|0)!=(c[k>>2]|0):0))n=6;do if((n|0)==6){n=0;b=c[m>>2]|0;if((a[(c[f>>2]|0)+24>>0]|0)==121){c[(c[(c[f>>2]|0)+28>>2]|0)+((c[h>>2]|0)+(c[k>>2]|0)<<2)>>2]=b;break}if(b|0){p=(c[(c[f>>2]|0)+28>>2]|0)+((c[h>>2]|0)+(((c[k>>2]|0)+1|0)/32|0)<<2)|0;c[p>>2]=c[p>>2]|1<<(c[k>>2]&31)}}while(0);if((a[c[j>>2]>>0]|0)!=1)break;c[j>>2]=(c[j>>2]|0)+1;b=c[j>>2]|0;if(d[c[j>>2]>>0]&128|0)b=ZK(b,k)|0;else{c[k>>2]=d[b>>0];b=1}c[j>>2]=(c[j>>2]|0)+b}l=o;return}function IM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=l;l=l+16|0;h=e+12|0;f=e+8|0;i=e+4|0;g=e;c[h>>2]=a;c[f>>2]=b;c[i>>2]=d;c[g>>2]=c[i>>2];c[(c[g>>2]|0)+(c[f>>2]<<4)>>2]=c[h>>2];l=e;return 0}function JM(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;g=l;l=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[h>>2]|0,0)|0)==4:0){c[i>>2]=0;break}k=Er(c[h>>2]|0)|0;c[i>>2]=k;c[i>>2]=(c[i>>2]|0)==0?267:k;c[h>>2]=0}while(0);c[c[g>>2]>>2]=c[h>>2];l=j;return c[i>>2]|0}function MM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;h=g+12|0;d=g+8|0;e=g+4|0;f=g;c[h>>2]=a;c[d>>2]=b;c[e>>2]=0;c[f>>2]=nK(c[h>>2]|0,22,e,0)|0;do if(!(c[f>>2]|0)){oI(c[e>>2]|0,1,0)|0;if((Hr(c[e>>2]|0)|0)==100?(Ju(c[e>>2]|0,0)|0)==4:0)break;h=Er(c[e>>2]|0)|0;c[f>>2]=h;c[f>>2]=(c[f>>2]|0)==0?267:h;c[e>>2]=0}while(0);c[c[d>>2]>>2]=c[e>>2];l=g;return c[f>>2]|0}function NM(b){b=b|0;var e=0,f=0,g=0;f=l;l=l+16|0;g=f+4|0;e=f;c[g>>2]=b;c[e>>2]=(c[g>>2]|0)+(0-(c[(c[g>>2]|0)+-4>>2]|0));b=c[e>>2]|0;if((c[g>>2]|0)==((c[e>>2]|0)+16+4|0))a[b+1>>0]=0;else a[b+2>>0]=0;if(d[c[e>>2]>>0]|0|0){l=f;return}if(d[(c[e>>2]|0)+1>>0]|0|0){l=f;return}if(d[(c[e>>2]|0)+2>>0]|0|0){l=f;return}Kd(c[e>>2]|0);l=f;return}function OM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=c[h>>2]|0;c[d>>2]=(c[d>>2]|0)+1;c[(c[f>>2]|0)+36>>2]=c[g>>2];l=e;return 0}function PM(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;c[d>>2]=wu(c[(c[b>>2]|0)+12>>2]|0,42384,0,0,0)|0;do if(!(c[d>>2]|0)){c[d>>2]=QM(c[b>>2]|0,1)|0;a=c[(c[b>>2]|0)+12>>2]|0;if(!((c[d>>2]|0)==0|(c[d>>2]|0)==101)){wu(a,42412,0,0,0)|0;wu(c[(c[b>>2]|0)+12>>2]|0,42399,0,0,0)|0;break}c[e>>2]=wu(a,42399,0,0,0)|0;if(c[e>>2]|0)c[d>>2]=c[e>>2]}while(0);wL(c[b>>2]|0);l=f;return c[d>>2]|0}function QM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+28|0;e=m+24|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;c[h>>2]=0;c[g>>2]=nK(c[d>>2]|0,27,h,0)|0;if(!(c[g>>2]|0)){oI(c[h>>2]|0,1,c[(c[d>>2]|0)+272>>2]|0)|0;oI(c[h>>2]|0,2,c[(c[d>>2]|0)+248>>2]|0)|0;a:while(1){b=(Hr(c[h>>2]|0)|0)==100;a=c[h>>2]|0;if(!b)break;c[k>>2]=hI(a,0)|0;c[j>>2]=0;while(1){if(c[g>>2]|0)continue a;if((c[j>>2]|0)>=(c[(c[d>>2]|0)+248>>2]|0))continue a;c[g>>2]=mK(c[d>>2]|0,c[k>>2]|0,c[j>>2]|0,-2)|0;if((c[g>>2]|0)==101){c[f>>2]=1;c[g>>2]=0}c[j>>2]=(c[j>>2]|0)+1}}c[i>>2]=Er(a)|0;if(!(c[g>>2]|0))c[g>>2]=c[i>>2]}wL(c[d>>2]|0);hK(c[d>>2]|0);l=m;return ((c[g>>2]|0)==0&(c[e>>2]|0)!=0&(c[f>>2]|0)!=0?101:c[g>>2]|0)|0}function RM(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=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,c[(c[u>>2]|0)+16>>2]|0,c[m>>2]|0,c[n>>2]|0,f)|0;if(c[A>>2]|0)break a;c[A>>2]=sb[c[(c[w>>2]|0)+20>>2]&255](c[f>>2]|0,g,h,i,j,k)|0;while(1){if(c[A>>2]|0)break;c[q>>2]=2147483647;c[r>>2]=0;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[x>>2]|0))break;c[s>>2]=(c[e+24>>2]|0)+((c[o>>2]|0)*12|0);if(c[c[s>>2]>>2]|0?((c[(c[s>>2]|0)+4>>2]|0)-(c[(c[s>>2]|0)+8>>2]|0)|0)<(c[q>>2]|0):0){c[q>>2]=(c[(c[s>>2]|0)+4>>2]|0)-(c[(c[s>>2]|0)+8>>2]|0);c[r>>2]=c[s>>2]}c[o>>2]=(c[o>>2]|0)+1}if(!(c[r>>2]|0)){c[A>>2]=101;continue}b=c[r>>2]|0;if(!(254&a[c[c[r>>2]>>2]>>0]))c[b>>2]=0;else TM(b,(c[r>>2]|0)+4|0);while(1){if(c[A>>2]|0)break;if((c[k>>2]|0)>=(c[q>>2]|0))break;c[A>>2]=sb[c[(c[w>>2]|0)+20>>2]&255](c[f>>2]|0,g,h,i,j,k)|0}if(!(c[A>>2]|0)){b=((c[r>>2]|0)-(c[e+24>>2]|0)|0)/12|0;d=c[i>>2]|0;D=(c[j>>2]|0)-(c[i>>2]|0)|0;c[z>>2]=c[y>>2];c[z+4>>2]=b;c[z+8>>2]=d;c[z+12>>2]=D;Ne(64,t,42429,z)|0;c[A>>2]=UM(B,t,-1)|0;continue}if((c[A>>2]|0)!=101)continue;if(c[(c[v>>2]|0)+40>>2]|0)continue;c[A>>2]=267}if((c[A>>2]|0)==101)c[A>>2]=0;tb[c[(c[w>>2]|0)+16>>2]&255](c[f>>2]|0)|0;if(c[A>>2]|0)break a}c[y>>2]=(c[y>>2]|0)+1}c[A>>2]=7}while(0);Kd(c[e+24>>2]|0);wL(c[v>>2]|0);b=c[p>>2]|0;if(c[A>>2]|0){Bi(b,c[A>>2]|0);Kd(c[B>>2]|0);l=C;return}else{ci(b,c[B>>2]|0,(c[B+4>>2]|0)-1|0,148);l=C;return}}function SM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;m=l;l=l+48|0;n=m+36|0;o=m+28|0;h=m+24|0;i=m+20|0;j=m+16|0;k=m+12|0;e=m+8|0;f=m+4|0;g=m;c[n>>2]=a;c[m+32>>2]=b;c[o>>2]=d;c[h>>2]=c[o>>2];c[e>>2]=0;c[f>>2]=OL(c[c[h>>2]>>2]|0,c[n>>2]|0,c[(c[h>>2]|0)+4>>2]|0,k)|0;c[i>>2]=c[(c[(c[n>>2]|0)+20>>2]|0)+64>>2];if(c[k>>2]|0)TM(k,e);c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[i>>2]|0))break;n=c[(c[h>>2]|0)+24>>2]|0;d=(c[h>>2]|0)+8|0;o=c[d>>2]|0;c[d>>2]=o+1;c[g>>2]=n+(o*12|0);c[(c[g>>2]|0)+8>>2]=(c[i>>2]|0)-(c[j>>2]|0)-1;c[c[g>>2]>>2]=c[k>>2];c[(c[g>>2]|0)+4>>2]=c[e>>2];c[j>>2]=(c[j>>2]|0)+1}l=m;return c[f>>2]|0}function TM(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;a=c[c[e>>2]>>2]|0;if((d[c[c[e>>2]>>2]>>0]|0)&128|0)a=ZK(a,g)|0;else{c[g>>2]=d[a>>0];a=1}e=c[e>>2]|0;c[e>>2]=(c[e>>2]|0)+a;f=c[f>>2]|0;c[f>>2]=(c[f>>2]|0)+((c[g>>2]|0)-2);l=h;return}function UM(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m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|0)+1}b:do if((D|0)==20){c[o>>2]=0;while(1){if(!((c[o>>2]|0)<(c[p>>2]|0)?(c[E>>2]|0)==0:0))break b;c[E>>2]=XM(c[B>>2]|0,q+((c[o>>2]|0)*24|0)|0,c[o>>2]|0,(c[o>>2]|0)==((c[p>>2]|0)-1|0)&1,c[r>>2]|0,c[C>>2]|0,c[i>>2]|0,c[j>>2]|0,F)|0;c[o>>2]=(c[o>>2]|0)+1}}while(0);wL(c[n>>2]|0);a=c[A>>2]|0;if(c[E>>2]|0){Bi(a,c[E>>2]|0);Kd(c[F>>2]|0);l=G;return}else{ci(a,c[F>>2]|0,-1,148);l=G;return}}function WM(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0;D=l;l=l+112|0;B=D+104|0;C=D+100|0;j=D+96|0;k=D+92|0;m=D+16|0;n=D+88|0;o=D+84|0;p=D+80|0;q=D+76|0;r=D+72|0;s=D+48|0;t=D+40|0;u=D+36|0;v=D+32|0;w=D+28|0;x=D+24|0;y=D+8|0;A=D;c[C>>2]=a;c[j>>2]=b;c[k>>2]=d;d=m;c[d>>2]=e;c[d+4>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=i;c[u>>2]=-1;c[s>>2]=0;c[s+4>>2]=0;c[s+8>>2]=0;c[s+12>>2]=0;c[s+16>>2]=0;c[s+20>>2]=0;c[q>>2]=HL(c[j>>2]|0,r,0)|0;if(c[q>>2]|0){c[B>>2]=c[q>>2];C=c[B>>2]|0;l=D;return C|0}c[t>>2]=(c[r>>2]|0)*24;c[s+16>>2]=Yd(c[t>>2]|0)|0;if(!(c[s+16>>2]|0)){c[B>>2]=7;C=c[B>>2]|0;l=D;return C|0}GR(c[s+16>>2]|0,0,c[t>>2]|0)|0;c[s>>2]=c[j>>2];c[s+4>>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E>>2]|0;l=F;return E|0}else{c[B>>2]=((a|0)==101&1)+(c[C>>2]|0)-(c[w>>2]|0);if((c[B>>2]|0)<=0)break;C=c[x>>2]|0;c[C>>2]=(c[C>>2]|0)+(c[B>>2]|0);C=A;C=OR(c[C>>2]|0,c[C+4>>2]|0,c[B>>2]|0)|0;D=c[y>>2]|0;c[D>>2]=C;c[D+4>>2]=z;break}}}while(0);c[E>>2]=0;E=c[E>>2]|0;l=F;return E|0}function ZM(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;i=l;l=l+32|0;k=i+28|0;m=i+24|0;n=i+20|0;j=i+16|0;f=i+12|0;g=i+8|0;h=i+4|0;e=i;c[k>>2]=a;c[m>>2]=b;c[n>>2]=d;c[j>>2]=c[n>>2];c[f>>2]=(c[(c[j>>2]|0)+16>>2]|0)+((c[m>>2]|0)*24|0);c[c[f>>2]>>2]=c[(c[(c[k>>2]|0)+20>>2]|0)+64>>2];c[h>>2]=OL(c[c[j>>2]>>2]|0,c[k>>2]|0,c[(c[j>>2]|0)+4>>2]|0,g)|0;if(!(c[g>>2]|0)){n=c[h>>2]|0;l=i;return n|0}c[e>>2]=0;c[(c[f>>2]|0)+4>>2]=c[g>>2];TM(g,e);c[(c[f>>2]|0)+12>>2]=c[g>>2];c[(c[f>>2]|0)+20>>2]=c[g>>2];c[(c[f>>2]|0)+8>>2]=c[e>>2];c[(c[f>>2]|0)+16>>2]=c[e>>2];n=c[h>>2]|0;l=i;return n|0}function _M(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;b=k+28|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[d>>2]=a;a:do if((c[(c[d>>2]|0)+20>>2]|0)<0){c[(c[d>>2]|0)+20>>2]=0;c[e>>2]=0;while(1){if((c[e>>2]|0)>=(c[(c[d>>2]|0)+12>>2]|0))break a;c[f>>2]=(c[(c[d>>2]|0)+16>>2]|0)+((c[e>>2]|0)*24|0);aN((c[f>>2]|0)+12|0,(c[f>>2]|0)+8|0,c[(c[d>>2]|0)+8>>2]|0);c[e>>2]=(c[e>>2]|0)+1}}else{c[h>>2]=2147483647;c[e>>2]=0;while(1){if((c[e>>2]|0)>=(c[(c[d>>2]|0)+12>>2]|0))break;c[i>>2]=(c[(c[d>>2]|0)+16>>2]|0)+((c[e>>2]|0)*24|0);if(c[(c[i>>2]|0)+12>>2]|0?(c[(c[i>>2]|0)+8>>2]|0)<(c[h>>2]|0):0)c[h>>2]=c[(c[i>>2]|0)+8>>2];c[e>>2]=(c[e>>2]|0)+1}if((c[h>>2]|0)==2147483647){c[b>>2]=1;j=c[b>>2]|0;l=k;return j|0}i=(c[h>>2]|0)-(c[(c[d>>2]|0)+8>>2]|0)+1|0;c[g>>2]=i;c[(c[d>>2]|0)+20>>2]=i;c[e>>2]=0;while(1){if((c[e>>2]|0)>=(c[(c[d>>2]|0)+12>>2]|0))break a;c[j>>2]=(c[(c[d>>2]|0)+16>>2]|0)+((c[e>>2]|0)*24|0);aN((c[j>>2]|0)+12|0,(c[j>>2]|0)+8|0,(c[h>>2]|0)+1|0);aN((c[j>>2]|0)+20|0,(c[j>>2]|0)+16|0,c[g>>2]|0);c[e>>2]=(c[e>>2]|0)+1}}while(0);c[b>>2]=0;j=c[b>>2]|0;l=k;return j|0}function $M(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;C=l;l=l+96|0;y=C+84|0;A=C+32|0;B=C+80|0;j=C+76|0;k=C+72|0;m=C+68|0;n=C+64|0;o=C+60|0;p=C+56|0;q=C+24|0;r=C+16|0;s=C+52|0;t=C+48|0;u=C+44|0;v=C+40|0;w=C+8|0;x=C;c[y>>2]=b;b=A;c[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]|0;B=c[m>>2]|0;c[B>>2]=c[y>>2];c[B+4>>2]=A;l=C;return}function aN(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+16|0;g=m+12|0;h=m+8|0;i=m+4|0;j=m;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;c[i>>2]=c[c[f>>2]>>2];if(!(c[i>>2]|0)){l=m;return}c[j>>2]=c[c[g>>2]>>2];while(1){if((c[j>>2]|0)>=(c[h>>2]|0))break;if(!(a[c[i>>2]>>0]&254)){k=5;break}TM(i,j)}if((k|0)==5){c[j>>2]=-1;c[i>>2]=0}c[c[g>>2]>>2]=c[j>>2];c[c[f>>2]>>2]=c[i>>2];l=m;return}function bN(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=l;l=l+32|0;i=h+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[i>>2]=a;c[d>>2]=b;c[f>>2]=0;c[g>>2]=0;c[e>>2]=nK(c[i>>2]|0,36,g,0)|0;if(c[e>>2]|0){g=c[f>>2]|0;i=c[d>>2]|0;c[i>>2]=g;i=c[e>>2]|0;l=h;return i|0}if(100==(Hr(c[g>>2]|0)|0))c[f>>2]=hI(c[g>>2]|0,0)|0;c[e>>2]=Er(c[g>>2]|0)|0;g=c[f>>2]|0;i=c[d>>2]|0;c[i>>2]=g;i=c[e>>2]|0;l=h;return i|0}function cN(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0;D=l;l=l+128|0;w=D+112|0;x=D+108|0;E=D+104|0;y=D+100|0;A=D+96|0;B=D+92|0;C=D+88|0;f=D+84|0;g=D+80|0;h=D+76|0;i=D+16|0;j=D+64|0;k=D+60|0;m=D+8|0;n=D+52|0;o=D+48|0;p=D+44|0;q=D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|0,c[h>>2]|0,c[i>>2]|0)|0;c[(c[d>>2]|0)+4>>2]=c[i>>2]}c[g>>2]=Er(c[e>>2]|0)|0;if(c[f>>2]|0){k=c[f>>2]|0;l=j;return k|0}c[f>>2]=c[g>>2];k=c[f>>2]|0;l=j;return k|0}function eN(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;j=n+20|0;h=n+16|0;g=n+12|0;i=n+8|0;k=n+4|0;m=n;c[h>>2]=b;c[g>>2]=e;c[i>>2]=f;c[k>>2]=c[(c[h>>2]|0)+4>>2];c[m>>2]=(c[(c[h>>2]|0)+4>>2]|0)-2;while(1){if((c[m>>2]|0)<=0)break;if(!(a[(c[c[h>>2]>>2]|0)+((c[m>>2]|0)-1)>>0]&128))break;c[m>>2]=(c[m>>2]|0)+-1}while(1){if((c[m>>2]|0)>0)e=(a[(c[c[h>>2]>>2]|0)+((c[m>>2]|0)-1)>>0]&128|0)!=0;else e=0;b=c[m>>2]|0;if(!e)break;c[m>>2]=b+-1}c[(c[h>>2]|0)+4>>2]=b;b=YK((c[c[h>>2]>>2]|0)+(c[m>>2]|0)|0,c[g>>2]|0)|0;c[m>>2]=(c[m>>2]|0)+b;b=(c[c[h>>2]>>2]|0)+(c[m>>2]|0)|0;if(d[(c[c[h>>2]>>2]|0)+(c[m>>2]|0)>>0]&128|0)b=ZK(b,c[i>>2]|0)|0;else{c[c[i>>2]>>2]=d[b>>0];b=1}c[m>>2]=(c[m>>2]|0)+b;if((c[m>>2]|0)!=(c[k>>2]|0)){c[j>>2]=267;m=c[j>>2]|0;l=n;return m|0}else{c[j>>2]=0;m=c[j>>2]|0;l=n;return m|0}return 0}function fN(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+20|0;f=j;g=j+16|0;h=j+12|0;i=j+8|0;c[k>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]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;a=c[o>>2]|0;b=a+56|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));c[h>>2]=c[n>>2]<<2;f=Yd(c[h>>2]|0)|0;c[c[o>>2]>>2]=f;if(!(c[c[o>>2]>>2]|0))c[p>>2]=7;else{GR(c[c[o>>2]>>2]|0,0,c[h>>2]|0)|0;c[p>>2]=nK(c[k>>2]|0,12,g,0)|0}if(c[p>>2]|0){p=c[p>>2]|0;l=q;return p|0}pI(c[g>>2]|0,1,c[m>>2]|0,c[m+4>>2]|0)|0;c[i>>2]=0;while(1){if(c[p>>2]|0)break;if((Hr(c[g>>2]|0)|0)!=100)break;if((c[i>>2]|0)>=(c[n>>2]|0))break;r=c[i>>2]|0;a=iI(c[g>>2]|0,1)|0;b=z;d=iI(c[g>>2]|0,2)|0;e=z;f=iI(c[g>>2]|0,3)|0;h=z;k=eI(c[g>>2]|0,4)|0;m=fI(c[g>>2]|0,4)|0;c[p>>2]=mL(r,0,a,b,d,e,f,h,k,m,(c[c[o>>2]>>2]|0)+(c[i>>2]<<2)|0)|0;m=(c[o>>2]|0)+4|0;c[m>>2]=(c[m>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+1}c[j>>2]=Er(c[g>>2]|0)|0;if(c[p>>2]|0){r=c[p>>2]|0;l=q;return r|0}c[p>>2]=c[j>>2];r=c[p>>2]|0;l=q;return r|0}function iN(b,d,e,f,g,h,i){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;K=l;l=l+208|0;I=K+200|0;J=K+196|0;u=K+120|0;j=K+192|0;k=K+188|0;m=K+184|0;y=K+180|0;A=K+176|0;B=K+172|0;n=K+112|0;o=K+104|0;p=K+96|0;v=K+168|0;w=K+164|0;C=K+160|0;q=K+156|0;r=K+152|0;s=K+148|0;t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c[e>>2]|0,2,c[c[d>>2]>>2]|0,c[(c[d>>2]|0)+4>>2]|0,0)|0;Hr(c[e>>2]|0)|0;c[f>>2]=Er(c[e>>2]|0)|0;h=c[f>>2]|0;l=g;return h|0}function pN(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[c[g>>2]>>2]|0){l=j;return}if((c[f>>2]|0)<=(c[(c[e>>2]|0)+8>>2]|0)){l=j;return}c[h>>2]=c[f>>2];c[i>>2]=Df(c[c[e>>2]>>2]|0,c[h>>2]|0)|0;if(c[i>>2]|0){c[(c[e>>2]|0)+8>>2]=c[h>>2];c[c[e>>2]>>2]=c[i>>2];l=j;return}else{c[c[g>>2]>>2]=7;l=j;return}}function qN(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=l;l=l+32|0;k=j+20|0;f=j;g=j+16|0;h=j+12|0;i=j+8|0;c[k>>2]=a;a=f;c[a>>2]=b;c[a+4>>2]=d;c[g>>2]=e;c[i>>2]=0;c[h>>2]=nK(c[k>>2]|0,30,i,0)|0;if(c[h>>2]|0){k=c[h>>2]|0;l=j;return k|0}k=f;pI(c[i>>2]|0,1,c[k>>2]|0,c[k+4>>2]|0)|0;oI(c[i>>2]|0,2,c[g>>2]|0)|0;Hr(c[i>>2]|0)|0;c[h>>2]=Er(c[i>>2]|0)|0;k=c[h>>2]|0;l=j;return k|0}function rN(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0;C=l;l=l+112|0;x=C+104|0;y=C+24|0;A=C+100|0;B=C+96|0;h=C+92|0;i=C+88|0;j=C+76|0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0,1,c[m>>2]|0,c[m+4>>2]|0)|0;if(100==(Hr(c[i>>2]|0)|0))c[h>>2]=1;c[j>>2]=Er(c[i>>2]|0)|0;i=c[h>>2]|0;m=c[g>>2]|0;c[m>>2]=i;m=c[j>>2]|0;l=k;return m|0} +function kC(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;oa=l;l=l+256|0;F=oa+228|0;Q=oa+224|0;$=oa+220|0;i=oa+216|0;la=oa+212|0;ma=oa+208|0;na=oa+204|0;k=oa+40|0;m=oa+32|0;n=oa+24|0;o=oa+200|0;p=oa+196|0;q=oa+192|0;r=oa+188|0;s=oa+184|0;t=oa+180|0;u=oa+240|0;j=oa+16|0;v=oa+176|0;w=oa+172|0;x=oa+168|0;y=oa+164|0;A=oa+236|0;B=oa+160|0;C=oa+156|0;D=oa+234|0;E=oa+152|0;G=oa+148|0;H=oa+144|0;I=oa+140|0;J=oa+136|0;K=oa+132|0;L=oa+128|0;M=oa+124|0;N=oa+120|0;O=oa+116|0;P=oa+112|0;R=oa+108|0;S=oa+232|0;T=oa+104|0;U=oa+239|0;V=oa+238|0;W=oa+100|0;X=oa+96|0;Y=oa+92|0;Z=oa+88|0;_=oa+84|0;aa=oa+8|0;ba=oa;ca=oa+80|0;da=oa+76|0;ea=oa+72|0;fa=oa+68|0;ga=oa+64|0;ha=oa+60|0;ia=oa+56|0;ja=oa+52|0;ka=oa+48|0;c[F>>2]=f;c[Q>>2]=g;c[$>>2]=h;c[i>>2]=c[c[Q>>2]>>2];h=n;c[h>>2]=0;c[h+4>>2]=0;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[s>>2]=c[c[i>>2]>>2];c[t>>2]=c[c[s>>2]>>2];if(a[(c[t>>2]|0)+69>>0]|0){l=oa;return}c[la>>2]=(c[(c[Q>>2]|0)+20>>2]|0)+((c[$>>2]|0)*48|0);c[ma>>2]=(c[i>>2]|0)+488;c[na>>2]=c[c[la>>2]>>2];h=FB(c[ma>>2]|0,c[(c[na>>2]|0)+12>>2]|0)|0;i=k;c[i>>2]=h;c[i+4>>2]=z;c[r>>2]=d[c[na>>2]>>0];do if((c[r>>2]|0)==33){if(wy(c[s>>2]|0,c[na>>2]|0)|0){l=oa;return}f=c[ma>>2]|0;g=(c[na>>2]|0)+20|0;if(c[(c[na>>2]|0)+4>>2]&2048|0){g=GB(f,c[g>>2]|0)|0;f=c[la>>2]|0;h=z;break}else{g=dB(f,c[g>>2]|0)|0;f=c[la>>2]|0;h=z;break}}else if((c[r>>2]|0)==34){f=c[la>>2]|0;g=0;h=0;break}else{g=FB(c[ma>>2]|0,c[(c[na>>2]|0)+16>>2]|0)|0;f=c[la>>2]|0;h=z;break}while(0);i=f+32|0;c[i>>2]=g;c[i+4>>2]=h;h=FB(c[ma>>2]|0,c[na>>2]|0)|0;i=m;c[i>>2]=h;c[i+4>>2]=z;if(c[(c[na>>2]|0)+4>>2]&1|0){f=hB(c[ma>>2]|0,b[(c[na>>2]|0)+36>>1]|0)|0;g=j;c[g>>2]=f;c[g+4>>2]=z;g=j;f=m;h=c[f+4>>2]|c[g+4>>2];i=m;c[i>>2]=c[f>>2]|c[g>>2];c[i+4>>2]=h;i=j;i=FR(c[i>>2]|0,c[i+4>>2]|0,1,0)|0;j=n;c[j>>2]=i;c[j+4>>2]=z}i=m;f=c[i+4>>2]|0;j=(c[la>>2]|0)+40|0;c[j>>2]=c[i>>2];c[j+4>>2]=f;c[(c[la>>2]|0)+20>>2]=-1;c[(c[la>>2]|0)+16>>2]=-1;b[(c[la>>2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(c[la>>2]|0)+10|0;b[ba>>1]=e[ba>>1]|8;ba=(c[la>>2]|0)+40|0;ca=c[ba+4>>2]|0;ma=(c[_>>2]|0)+40|0;c[ma>>2]=c[ba>>2];c[ma+4>>2]=ca}do if((d[(c[Q>>2]|0)+8>>0]|0)==28){if((d[c[na>>2]>>0]|0)!=37?(d[c[na>>2]>>0]|0)!=29:0)break;if(gy(c[(c[na>>2]|0)+12>>2]|0)|0){if(c[(c[(c[na>>2]|0)+12>>2]|0)+4>>2]&2048|0?c[(c[(c[na>>2]|0)+16>>2]|0)+4>>2]&2048|0:0)break;c[da>>2]=xw(c[(c[na>>2]|0)+12>>2]|0)|0;c[ea>>2]=0;while(1){if((c[ea>>2]|0)>=(c[da>>2]|0))break;c[ha>>2]=wC(c[s>>2]|0,c[(c[na>>2]|0)+12>>2]|0,c[ea>>2]|0)|0;c[ia>>2]=wC(c[s>>2]|0,c[(c[na>>2]|0)+16>>2]|0,c[ea>>2]|0)|0;c[ga>>2]=vs(c[s>>2]|0,d[c[na>>2]>>0]|0,c[ha>>2]|0,c[ia>>2]|0,0)|0;sC(c[ga>>2]|0,c[na>>2]|0);c[fa>>2]=oC(c[Q>>2]|0,c[ga>>2]|0,1)|0;kC(c[F>>2]|0,c[Q>>2]|0,c[fa>>2]|0);c[ea>>2]=(c[ea>>2]|0)+1}c[la>>2]=(c[(c[Q>>2]|0)+20>>2]|0)+((c[$>>2]|0)*48|0);b[(c[la>>2]|0)+10>>1]=6;b[(c[la>>2]|0)+12>>1]=0}}while(0);c:do if(((((d[(c[Q>>2]|0)+8>>0]|0)==28?(d[c[na>>2]>>0]|0)==33:0)?(c[(c[la>>2]|0)+24>>2]|0)==0:0)?(d[c[(c[na>>2]|0)+12>>2]>>0]|0)==158:0)?(c[(c[(c[na>>2]|0)+20>>2]|0)+48>>2]|0)==0:0){c[ja>>2]=0;while(1){ma=c[ja>>2]|0;if((ma|0)>=(xw(c[(c[na>>2]|0)+12>>2]|0)|0))break c;c[ka>>2]=oC(c[Q>>2]|0,c[na>>2]|0,2)|0;c[(c[(c[Q>>2]|0)+20>>2]|0)+((c[ka>>2]|0)*48|0)+24>>2]=(c[ja>>2]|0)+1;kC(c[F>>2]|0,c[Q>>2]|0,c[ka>>2]|0);pC(c[Q>>2]|0,c[ka>>2]|0,c[$>>2]|0);c[ja>>2]=(c[ja>>2]|0)+1}}while(0);ka=n;na=(c[la>>2]|0)+32|0;la=na;ma=c[la+4>>2]|c[ka+4>>2];c[na>>2]=c[la>>2]|c[ka>>2];c[na+4>>2]=ma;l=oa;return}function lC(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if((c[b>>2]|0)!=33?!((c[b>>2]|0)>=37&(c[b>>2]|0)<=41|(c[b>>2]|0)==34):0)a=(c[b>>2]|0)==29;else a=1;l=d;return a&1|0}function mC(a,f,g,h,i,j,k){a=a|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;v=l;l=l+48|0;u=v+40|0;q=v+36|0;w=v+32|0;m=v;n=v+28|0;r=v+24|0;s=v+20|0;o=v+16|0;p=v+12|0;t=v+8|0;c[q>>2]=a;c[w>>2]=f;f=m;c[f>>2]=g;c[f+4>>2]=h;c[n>>2]=i;c[r>>2]=j;c[s>>2]=k;if(((c[w>>2]|0)>=38?(d[c[n>>2]>>0]|0)==158:0)&(c[w>>2]|0)<=41)c[n>>2]=c[c[(c[(c[n>>2]|0)+20>>2]|0)+4>>2]>>2];if((d[c[n>>2]>>0]|0)==152){c[c[r>>2]>>2]=c[(c[n>>2]|0)+28>>2];c[c[s>>2]>>2]=b[(c[n>>2]|0)+32>>1];c[u>>2]=1;w=c[u>>2]|0;l=v;return w|0}w=m;if((c[w>>2]|0)==0&(c[w+4>>2]|0)==0){c[u>>2]=0;w=c[u>>2]|0;l=v;return w|0}w=m;j=c[w>>2]|0;w=c[w+4>>2]|0;k=m;k=FR(c[k>>2]|0,c[k+4>>2]|0,1,0)|0;if((j&k|0)!=0|(w&z|0)!=0){c[u>>2]=0;w=c[u>>2]|0;l=v;return w|0}c[p>>2]=0;while(1){w=m;k=c[w+4>>2]|0;if(!(k>>>0>0|(k|0)==0&(c[w>>2]|0)>>>0>1))break;c[p>>2]=(c[p>>2]|0)+1;k=m;k=OR(c[k>>2]|0,c[k+4>>2]|0,1)|0;w=m;c[w>>2]=k;c[w+4>>2]=z}c[t>>2]=c[(c[q>>2]|0)+8+((c[p>>2]|0)*72|0)+44>>2];c[o>>2]=c[(c[(c[q>>2]|0)+8+((c[p>>2]|0)*72|0)+16>>2]|0)+8>>2];a:while(1){if(!(c[o>>2]|0)){a=22;break}b:do if(c[(c[o>>2]|0)+40>>2]|0){c[p>>2]=0;while(1){if((c[p>>2]|0)>=(e[(c[o>>2]|0)+50>>1]|0))break b;if((b[(c[(c[o>>2]|0)+4>>2]|0)+(c[p>>2]<<1)>>1]|0)==-2?(cw(c[n>>2]|0,c[(c[(c[(c[o>>2]|0)+40>>2]|0)+4>>2]|0)+((c[p>>2]|0)*20|0)>>2]|0,c[t>>2]|0)|0)==0:0){a=19;break a}c[p>>2]=(c[p>>2]|0)+1}}while(0);c[o>>2]=c[(c[o>>2]|0)+20>>2]}if((a|0)==19){c[c[r>>2]>>2]=c[t>>2];c[c[s>>2]>>2]=-2;c[u>>2]=1;w=c[u>>2]|0;l=v;return w|0}else if((a|0)==22){c[u>>2]=0;w=c[u>>2]|0;l=v;return w|0}return 0}function nC(a){a=a|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f;e=f+4|0;c[d>>2]=a;do if((c[d>>2]|0)!=33){if((c[d>>2]|0)==34){b[e>>1]=256;break}if((c[d>>2]|0)==29){b[e>>1]=128;break}else{b[e>>1]=2<<(c[d>>2]|0)-37;break}}else b[e>>1]=1;while(0);l=f;return b[e>>1]|0}function oC(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n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));c[n>>2]=c[o>>2];o=c[n>>2]|0;l=p;return o|0}function pC(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=l;l=l+16|0;i=g+8|0;j=g+4|0;h=g;c[i>>2]=d;c[j>>2]=e;c[h>>2]=f;c[(c[(c[i>>2]|0)+20>>2]|0)+((c[j>>2]|0)*48|0)+16>>2]=c[h>>2];b[(c[(c[i>>2]|0)+20>>2]|0)+((c[j>>2]|0)*48|0)+8>>1]=b[(c[(c[i>>2]|0)+20>>2]|0)+((c[h>>2]|0)*48|0)+8>>1]|0;f=(c[(c[i>>2]|0)+20>>2]|0)+((c[h>>2]|0)*48|0)+14|0;a[f>>0]=(a[f>>0]|0)+1<<24>>24;l=g;return}function qC(b,f){b=b|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;m=p+20|0;i=p+16|0;j=p+12|0;g=p+25|0;h=p+24|0;k=p+8|0;n=p+4|0;o=p;c[i>>2]=b;c[j>>2]=f;if(e[(c[c[i>>2]>>2]|0)+64>>1]&512|0){c[m>>2]=0;o=c[m>>2]|0;l=p;return o|0}if((d[c[j>>2]>>0]|0)!=37?(d[c[j>>2]>>0]|0)!=29:0){c[m>>2]=0;o=c[m>>2]|0;l=p;return o|0}if(c[(c[j>>2]|0)+4>>2]&1|0){c[m>>2]=0;o=c[m>>2]|0;l=p;return o|0}a[g>>0]=wv(c[(c[j>>2]|0)+12>>2]|0)|0;a[h>>0]=wv(c[(c[j>>2]|0)+16>>2]|0)|0;do if((a[g>>0]|0)!=(a[h>>0]|0)){if((a[g>>0]|0)>=67?(a[h>>0]|0)>=67:0)break;c[m>>2]=0;o=c[m>>2]|0;l=p;return o|0}while(0);c[k>>2]=Dy(c[i>>2]|0,c[(c[j>>2]|0)+12>>2]|0,c[(c[j>>2]|0)+16>>2]|0)|0;if(c[k>>2]|0?Ig(c[c[k>>2]>>2]|0,31345)|0:0){c[k>>2]=xv(c[i>>2]|0,c[(c[j>>2]|0)+12>>2]|0)|0;if(c[k>>2]|0)b=c[c[k>>2]>>2]|0;else b=0;c[n>>2]=b;c[k>>2]=xv(c[i>>2]|0,c[(c[j>>2]|0)+16>>2]|0)|0;if(c[k>>2]|0)b=c[c[k>>2]>>2]|0;else b=0;c[o>>2]=b;c[m>>2]=(uk(c[n>>2]|0,c[o>>2]|0)|0)==0&1;o=c[m>>2]|0;l=p;return o|0}c[m>>2]=1;o=c[m>>2]|0;l=p;return o|0}function rC(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+16|0;h=m+8|0;i=m+4|0;j=m+14|0;n=m+12|0;k=m;c[h>>2]=f;c[i>>2]=g;b[j>>1]=c[(c[(c[i>>2]|0)+16>>2]|0)+4>>2]&256;b[n>>1]=c[(c[(c[i>>2]|0)+12>>2]|0)+4>>2]&256;do if((e[j>>1]|0)==(e[n>>1]|0)){if(b[j>>1]|0){n=(c[(c[i>>2]|0)+16>>2]|0)+4|0;c[n>>2]=c[n>>2]&-257;break}if(xv(c[h>>2]|0,c[(c[i>>2]|0)+12>>2]|0)|0){n=(c[(c[i>>2]|0)+12>>2]|0)+4|0;c[n>>2]=c[n>>2]|256}}while(0);c[k>>2]=c[(c[i>>2]|0)+16>>2];c[(c[i>>2]|0)+16>>2]=c[(c[i>>2]|0)+12>>2];c[(c[i>>2]|0)+12>>2]=c[k>>2];if((d[c[i>>2]>>0]|0)<38){l=m;return}a[c[i>>2]>>0]=((d[c[i>>2]>>0]|0)-38^2)+38;l=m;return}function sC(a,d){a=a|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=d;if(!(c[e>>2]|0)){l=g;return}d=(c[e>>2]|0)+4|0;c[d>>2]=c[d>>2]|c[(c[f>>2]|0)+4>>2]&1;b[(c[e>>2]|0)+36>>1]=b[(c[f>>2]|0)+36>>1]|0;l=g;return}function tC(f,g,h){f=f|0;g=g|0;h=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]|z;W=q;c[W>>2]=c[f>>2]|g;c[W+4>>2]=h}g=q;f=j;h=c[f+4>>2]&c[g+4>>2];W=j;c[W>>2]=c[f>>2]&c[g>>2];c[W+4>>2]=h;if(!(e[(c[A>>2]|0)+12>>1]&2)){W=B;c[W>>2]=0;c[W+4>>2]=0;break}else{g=q;f=B;h=c[f+4>>2]&c[g+4>>2];W=B;c[W>>2]=c[f>>2]&c[g>>2];c[W+4>>2]=h;break}}while(0);c[x>>2]=(c[x>>2]|0)+-1;c[A>>2]=(c[A>>2]|0)+48}q=j;r=c[q+4>>2]|0;W=(c[i>>2]|0)+408|0;c[W>>2]=c[q>>2];c[W+4>>2]=r;W=j;b[(c[T>>2]|0)+12>>1]=(c[W>>2]|0)==0&(c[W+4>>2]|0)==0?0:512;W=j;b:do if((c[W>>2]|0)!=0|(c[W+4>>2]|0)!=0?(c[(c[y>>2]|0)+12>>2]|0)==2:0){c[s>>2]=0;c:while(1){r=c[(c[y>>2]|0)+20>>2]|0;W=c[s>>2]|0;c[s>>2]=W+1;W=BC(r,W)|0;c[t>>2]=W;if(!W)break b;c[u>>2]=0;while(1){r=(c[(c[y>>2]|0)+20>>2]|0)+48|0;W=c[u>>2]|0;c[u>>2]=W+1;W=BC(r,W)|0;c[v>>2]=W;if(!W)continue c;CC(c[E>>2]|0,c[O>>2]|0,c[t>>2]|0,c[v>>2]|0)}}}while(0);W=B;if(!((c[W>>2]|0)!=0|(c[W+4>>2]|0)!=0)){l=V;return}c[C>>2]=0;c[D>>2]=-1;c[F>>2]=-1;c[G>>2]=0;c[G>>2]=0;while(1){if((c[G>>2]|0)>=2)break;if(!((c[C>>2]|0)!=0^1))break;c[A>>2]=c[(c[y>>2]|0)+20>>2];c[x>>2]=(c[(c[y>>2]|0)+12>>2]|0)-1;while(1){if((c[x>>2]|0)<0)break;W=(c[A>>2]|0)+10|0;b[W>>1]=e[W>>1]&-65;if((c[(c[A>>2]|0)+20>>2]|0)!=(c[F>>2]|0)?(W=B,u=c[W>>2]|0,W=c[W+4>>2]|0,v=hB((c[Q>>2]|0)+488|0,c[(c[A>>2]|0)+20>>2]|0)|0,!((u&v|0)==0&(W&z|0)==0)):0){U=37;break}c[x>>2]=(c[x>>2]|0)+-1;c[A>>2]=(c[A>>2]|0)+48}if((U|0)==37){U=0;c[D>>2]=c[(c[A>>2]|0)+28>>2];c[F>>2]=c[(c[A>>2]|0)+20>>2]}if((c[x>>2]|0)<0)break;c[C>>2]=1;while(1){if(!((c[x>>2]|0)>=0?(c[C>>2]|0)!=0:0))break;f=c[A>>2]|0;do if((c[(c[A>>2]|0)+20>>2]|0)!=(c[F>>2]|0)){W=f+10|0;b[W>>1]=e[W>>1]&-65}else{if((c[f+28>>2]|0)!=(c[D>>2]|0)){c[C>>2]=0;break}c[I>>2]=(wv(c[(c[c[A>>2]>>2]|0)+16>>2]|0)|0)<<24>>24;c[H>>2]=(wv(c[(c[c[A>>2]>>2]|0)+12>>2]|0)|0)<<24>>24;if(c[I>>2]|0?(c[I>>2]|0)!=(c[H>>2]|0):0){c[C>>2]=0;break}W=(c[A>>2]|0)+10|0;b[W>>1]=e[W>>1]|64}while(0);c[x>>2]=(c[x>>2]|0)+-1;c[A>>2]=(c[A>>2]|0)+48}c[G>>2]=(c[G>>2]|0)+1}if(!(c[C>>2]|0)){l=V;return}c[K>>2]=0;c[L>>2]=0;c[x>>2]=(c[(c[y>>2]|0)+12>>2]|0)-1;c[A>>2]=c[(c[y>>2]|0)+20>>2];while(1){if((c[x>>2]|0)<0)break;if(e[(c[A>>2]|0)+10>>1]&64|0){c[J>>2]=aw(c[S>>2]|0,c[(c[c[A>>2]>>2]|0)+16>>2]|0,0)|0;c[K>>2]=Ks(c[c[Q>>2]>>2]|0,c[K>>2]|0,c[J>>2]|0)|0;c[L>>2]=c[(c[c[A>>2]>>2]|0)+12>>2]}c[x>>2]=(c[x>>2]|0)+-1;c[A>>2]=(c[A>>2]|0)+48}c[J>>2]=aw(c[S>>2]|0,c[L>>2]|0,0)|0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=c[B>>2]|0;l=F;return G|0}c[B>>2]=0;G=c[B>>2]|0;l=F;return G|0}function vC(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;j=m+20|0;h=m+16|0;k=m+12|0;f=m+8|0;g=m+4|0;i=m;c[h>>2]=b;c[k>>2]=e;if((d[c[h>>2]>>0]|0|0)!=151){c[j>>2]=0;k=c[j>>2]|0;l=m;return k|0}c[f>>2]=c[(c[h>>2]|0)+20>>2];if(c[f>>2]|0?(c[c[f>>2]>>2]|0)==2:0){c[g>>2]=c[(c[(c[f>>2]|0)+4>>2]|0)+20>>2];if((d[c[g>>2]>>0]|0|0)==152?(d[(c[(c[g>>2]|0)+44>>2]|0)+42>>0]|0)&16|0:0){c[i>>2]=0;while(1){if((c[i>>2]|0)>=4){b=14;break}g=(Ig(c[(c[h>>2]|0)+8>>2]|0,c[5436+(c[i>>2]<<3)>>2]|0)|0)==0;e=c[i>>2]|0;if(g){b=12;break}c[i>>2]=e+1}if((b|0)==12){a[c[k>>2]>>0]=a[5436+(e<<3)+4>>0]|0;c[j>>2]=1;k=c[j>>2]|0;l=m;return k|0}else if((b|0)==14){c[j>>2]=0;k=c[j>>2]|0;l=m;return k|0}}c[j>>2]=0;k=c[j>>2]|0;l=m;return k|0}c[j>>2]=0;k=c[j>>2]|0;l=m;return k|0}function wC(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=a;c[h>>2]=e;c[i>>2]=f;if((d[c[h>>2]>>0]|0|0)==119){c[j>>2]=vs(c[g>>2]|0,159,0,0,0)|0;if(!(c[j>>2]|0)){j=c[j>>2]|0;l=k;return j|0}b[(c[j>>2]|0)+32>>1]=c[i>>2];c[(c[j>>2]|0)+12>>2]=c[h>>2];j=c[j>>2]|0;l=k;return j|0}else{if((d[c[h>>2]>>0]|0|0)==158)c[h>>2]=c[(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a[j>>0]|0,1)}c[g>>2]=c[m>>2];m=c[g>>2]|0;l=n;return m|0}c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}function zC(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if((c[e>>2]|0)>32){c[(c[d>>2]|0)+196>>2]=-1;l=f;return}else{d=(c[d>>2]|0)+196|0;c[d>>2]=c[d>>2]|1<<(c[e>>2]|0)-1;l=f;return}}function AC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;g=e+8|0;f=e+4|0;h=e;c[g>>2]=a;c[f>>2]=b;c[h>>2]=d;d=c[h>>2]|0;c[(Ax(c[g>>2]|0,c[f>>2]|0)|0)+12>>2]=d;l=e;return}function BC(a,b){a=a|0;b=b|0;var d=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=b;a=c[g>>2]|0;if((e[(c[f>>2]|0)+12>>1]|0|0)!=1024){c[d>>2]=(a|0)==0?c[f>>2]|0:0;g=c[d>>2]|0;l=h;return g|0}if((a|0)<(c[(c[(c[f>>2]|0)+28>>2]|0)+12>>2]|0)){c[d>>2]=(c[(c[(c[f>>2]|0)+28>>2]|0)+20>>2]|0)+((c[g>>2]|0)*48|0);g=c[d>>2]|0;l=h;return g|0}else{c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}return 0}function CC(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;p=s+28|0;q=s+24|0;i=s+20|0;j=s+16|0;r=s+32|0;k=s+12|0;m=s+8|0;n=s+4|0;o=s;c[p>>2]=d;c[q>>2]=f;c[i>>2]=g;c[j>>2]=h;b[r>>1]=e[(c[i>>2]|0)+12>>1]|0|(e[(c[j>>2]|0)+12>>1]|0);if(!((e[(c[i>>2]|0)+12>>1]|0)&62)){l=s;return}if(!((e[(c[j>>2]|0)+12>>1]|0)&62)){l=s;return}if(((e[r>>1]|0)&26|0)!=(e[r>>1]|0|0)?((e[r>>1]|0)&38|0)!=(e[r>>1]|0|0):0){l=s;return}if(cw(c[(c[c[i>>2]>>2]|0)+12>>2]|0,c[(c[c[j>>2]>>2]|0)+12>>2]|0,-1)|0){l=s;return}if(cw(c[(c[c[i>>2]>>2]|0)+16>>2]|0,c[(c[c[j>>2]>>2]|0)+16>>2]|0,-1)|0){l=s;return}do if((e[r>>1]|0)&(e[r>>1]|0)-1|0)if((e[r>>1]|0)&24|0){b[r>>1]=8;break}else{b[r>>1]=32;break}while(0);c[k>>2]=c[c[c[c[q>>2]>>2]>>2]>>2];c[m>>2]=aw(c[k>>2]|0,c[c[i>>2]>>2]|0,0)|0;if(!(c[m>>2]|0)){l=s;return}c[n>>2]=37;while(1){d=c[n>>2]|0;if((e[r>>1]|0|0)==(2<<(c[n>>2]|0)-37|0))break;c[n>>2]=d+1}a[c[m>>2]>>0]=d;c[o>>2]=oC(c[q>>2]|0,c[m>>2]|0,3)|0;kC(c[p>>2]|0,c[q>>2]|0,c[o>>2]|0);l=s;return}function DC(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;h=l;l=l+48|0;j=h+36|0;k=h+32|0;i=h+28|0;g=h;c[j>>2]=b;c[k>>2]=e;c[i>>2]=f;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;a[g+20>>0]=0;c[g+4>>2]=194;c[g+24>>2]=c[k>>2];Qv(g,c[j>>2]|0)|0;if(c[i>>2]|0){k=g+20|0;k=a[k>>0]|0;k=k<<24>>24!=0;k=k^1;k=k&1;l=h;return k|0}k=g+20|0;a[k>>0]=(d[k>>0]|0)&-3;k=g+20|0;k=a[k>>0]|0;k=k<<24>>24!=0;k=k^1;k=k&1;l=h;return k|0}function EC(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n+8|0;k=n;f=n+28|0;g=n+24|0;h=n+20|0;i=n+16|0;j=n+12|0;c[f>>2]=a;c[g>>2]=d;c[h>>2]=e;a=c[c[f>>2]>>2]|0;d=c[c[h>>2]>>2]|0;if((b[(c[h>>2]|0)+32>>1]|0)>=0){h=c[(c[(c[h>>2]|0)+4>>2]|0)+(b[(c[h>>2]|0)+32>>1]<<4)>>2]|0;c[k>>2]=d;c[k+4>>2]=h;c[i>>2]=Bj(a,26470,k)|0;c[j>>2]=1555;h=c[f>>2]|0;j=c[j>>2]|0;k=c[g>>2]|0;m=c[i>>2]|0;Nx(h,j,k,m,-1,2);l=n;return}else{c[m>>2]=d;c[i>>2]=Bj(a,31537,m)|0;c[j>>2]=2579;h=c[f>>2]|0;j=c[j>>2]|0;k=c[g>>2]|0;m=c[i>>2]|0;Nx(h,j,k,m,-1,2);l=n;return}}function FC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;m=l;l=l+32|0;k=m+20|0;n=m+16|0;f=m+12|0;g=m+8|0;h=m+4|0;i=m;c[n>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;a:do if(c[(c[c[n>>2]>>2]|0)+24>>2]&524288|0){a=c[f>>2]|0;if(!(c[g>>2]|0)){if(ov(a)|0)a=1;else a=(c[(c[f>>2]|0)+16>>2]|0)!=0;c[k>>2]=a&1;n=c[k>>2]|0;l=m;return n|0}c[i>>2]=c[a+16>>2];while(1){a=c[f>>2]|0;if(!(c[i>>2]|0))break;if(EA(a,c[i>>2]|0,c[g>>2]|0,c[h>>2]|0)|0){j=9;break}c[i>>2]=c[(c[i>>2]|0)+4>>2]}if((j|0)==9){c[k>>2]=1;n=c[k>>2]|0;l=m;return n|0}c[i>>2]=ov(a)|0;while(1){if(!(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else a=b[a+52>>1]|0;Xt(c[s>>2]|0,127,(c[w>>2]|0)+(c[n>>2]|0)|0,c[o>>2]|0,a&65535)|0;Lx(c[u>>2]|0,c[p>>2]|0);c[r>>2]=c[q>>2]}c[n>>2]=(c[n>>2]|0)+1;c[q>>2]=c[(c[q>>2]|0)+20>>2]}l=y;return}function JC(a,b,e,f,g,h,i){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;s=u+40|0;v=u+36|0;t=u+32|0;j=u+28|0;k=u+24|0;m=u+20|0;n=u+16|0;o=u+12|0;p=u+8|0;q=u+4|0;r=u;c[s>>2]=a;c[v>>2]=b;c[t>>2]=e;c[j>>2]=f;c[k>>2]=g;c[m>>2]=h;c[n>>2]=i;c[o>>2]=c[t>>2]|0?110:109;c[p>>2]=0;c[q>>2]=c[v>>2];while(1){if(!(c[q>>2]|0))break;if((((d[(c[q>>2]|0)+8>>0]|0|0)==(c[o>>2]|0)?c[k>>2]&(d[(c[q>>2]|0)+9>>0]|0)|0:0)?uD(c[(c[q>>2]|0)+16>>2]|0,c[t>>2]|0)|0:0)?(c[r>>2]=OC(c[s>>2]|0,c[q>>2]|0,c[m>>2]|0,c[n>>2]|0)|0,c[r>>2]|0):0)c[p>>2]=c[p>>2]|c[(c[r>>2]|0)+16+(c[j>>2]<<2)>>2];c[q>>2]=c[(c[q>>2]|0)+32>>2]}l=u;return c[p>>2]|0}function KC(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=a;c[g>>2]=d;c[h>>2]=0;if(!(c[(c[c[f>>2]>>2]|0)+24>>2]&524288)){k=c[h>>2]|0;l=m;return k|0}c[i>>2]=c[(c[g>>2]|0)+16>>2];while(1){if(!(c[i>>2]|0))break;c[j>>2]=0;while(1){a=c[i>>2]|0;if((c[j>>2]|0)>=(c[(c[i>>2]|0)+20>>2]|0))break;if((c[a+36+(c[j>>2]<<3)>>2]|0)>31)a=-1;else a=1<>2]|0)+36+(c[j>>2]<<3)>>2];c[h>>2]=c[h>>2]|a;c[j>>2]=(c[j>>2]|0)+1}c[i>>2]=c[a+4>>2]}c[i>>2]=ov(c[g>>2]|0)|0;while(1){if(!(c[i>>2]|0))break;c[k>>2]=0;Hz(c[f>>2]|0,c[g>>2]|0,c[i>>2]|0,k,0)|0;a:do if(c[k>>2]|0){c[j>>2]=0;while(1){if((c[j>>2]|0)>=(e[(c[k>>2]|0)+50>>1]|0))break a;if((b[(c[(c[k>>2]|0)+4>>2]|0)+(c[j>>2]<<1)>>1]|0)>31)a=-1;else a=1<>2]|0)+4>>2]|0)+(c[j>>2]<<1)>>1];c[h>>2]=c[h>>2]|a;c[j>>2]=(c[j>>2]|0)+1}}while(0);c[i>>2]=c[(c[i>>2]|0)+12>>2]}k=c[h>>2]|0;l=m;return k|0}function LC(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+32|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;h=r+12|0;i=r+8|0;j=r+4|0;k=r;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[h>>2]=f;c[i>>2]=g;if(!(c[(c[c[m>>2]>>2]|0)+24>>2]&524288)){l=r;return}c[j>>2]=ov(c[n>>2]|0)|0;while(1){if(!(c[j>>2]|0))break;if(!((c[h>>2]|0)!=0?!(HA(c[n>>2]|0,c[j>>2]|0,c[h>>2]|0,c[i>>2]|0)|0):0))q=6;if((q|0)==6?(q=0,c[k>>2]=MC(c[m>>2]|0,c[n>>2]|0,c[j>>2]|0,c[o>>2]|0)|0,c[k>>2]|0):0)NC(c[m>>2]|0,c[k>>2]|0,c[n>>2]|0,c[p>>2]|0,2,0);c[j>>2]=c[(c[j>>2]|0)+12>>2]}l=r;return}function MC(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=l;l=l+144|0;I=N+136|0;D=N+132|0;J=N+128|0;K=N+124|0;L=N+120|0;E=N+116|0;i=N+112|0;F=N+108|0;G=N+104|0;j=N+100|0;k=N+96|0;m=N+92|0;n=N+88|0;H=N+84|0;o=N+80|0;p=N+76|0;q=N+72|0;r=N+68|0;s=N+64|0;t=N+56|0;u=N+48|0;v=N+40|0;w=N+32|0;x=N+28|0;y=N+24|0;z=N+20|0;A=N+16|0;B=N+8|0;C=N;c[D>>2]=e;c[J>>2]=f;c[K>>2]=g;c[L>>2]=h;c[E>>2]=c[c[D>>2]>>2];c[G>>2]=(c[L>>2]|0)!=0&1;c[i>>2]=d[(c[K>>2]|0)+25+(c[G>>2]|0)>>0];if((c[i>>2]|0)==6?c[(c[E>>2]|0)+24>>2]&33554432|0:0){c[I>>2]=0;M=c[I>>2]|0;l=N;return M|0}c[F>>2]=c[(c[K>>2]|0)+28+(c[G>>2]<<2)>>2];if(!((c[i>>2]|0)==0|(c[F>>2]|0)!=0)){c[m>>2]=0;c[n>>2]=0;c[H>>2]=0;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[s>>2]=0;if(Hz(c[D>>2]|0,c[J>>2]|0,c[K>>2]|0,m,n)|0){c[I>>2]=0;M=c[I>>2]|0;l=N;return M|0}c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[(c[K>>2]|0)+20>>2]|0))break;c[t>>2]=c[1367];c[t+4>>2]=c[1368];c[u>>2]=c[1369];c[u+4>>2]=c[1370];if(c[n>>2]|0)e=(c[n>>2]|0)+(c[r>>2]<<2)|0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=0;M=c[I>>2]|0;l=N;return M|0}switch(c[i>>2]|0){case 6:{e=119;f=c[H>>2]|0;break}case 9:{if(c[L>>2]|0)M=41;else{e=109;f=c[H>>2]|0}break}default:M=41}if((M|0)==41){e=110;f=c[H>>2]|0}a[f>>0]=e;c[(c[H>>2]|0)+4>>2]=c[F>>2];c[(c[F>>2]|0)+20>>2]=c[(c[J>>2]|0)+64>>2];c[(c[F>>2]|0)+24>>2]=c[(c[J>>2]|0)+64>>2];c[(c[K>>2]|0)+28+(c[G>>2]<<2)>>2]=c[F>>2];a[(c[F>>2]|0)+8>>0]=c[L>>2]|0?110:109}c[I>>2]=c[F>>2];M=c[I>>2]|0;l=N;return M|0}function NC(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;p=l;l=l+48|0;n=p+32|0;h=p+28|0;r=p+24|0;o=p+20|0;q=p+16|0;i=p+12|0;j=p+8|0;k=p+4|0;m=p;c[n>>2]=a;c[h>>2]=b;c[r>>2]=d;c[o>>2]=e;c[q>>2]=f;c[i>>2]=g;c[j>>2]=Rt(c[n>>2]|0)|0;c[k>>2]=OC(c[n>>2]|0,c[h>>2]|0,c[r>>2]|0,c[q>>2]|0)|0;if(!(c[k>>2]|0)){l=p;return}if(c[c[h>>2]>>2]|0)a=0==(c[(c[c[n>>2]>>2]|0)+24>>2]&262144|0);else a=0;c[m>>2]=a&1;h=c[j>>2]|0;o=c[o>>2]|0;q=c[i>>2]|0;n=(c[n>>2]|0)+44|0;r=(c[n>>2]|0)+1|0;c[n>>2]=r;_t(h,64,o,q,r,c[(c[k>>2]|0)+8>>2]|0,-18)|0;px(c[j>>2]|0,c[m>>2]&255);l=p;return}function OC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m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>2]|0)+44>>2];c[(c[n>>2]|0)+12>>2]=c[(c[o>>2]|0)+40>>2];c[(c[n>>2]|0)+16>>2]=c[s>>2];c[(c[i>>2]|0)+16>>2]=c[(c[o>>2]|0)+140>>2];c[(c[i>>2]|0)+16+4>>2]=c[(c[o>>2]|0)+144>>2];Yq(c[k>>2]|0)}Ak(c[o>>2]|0);Hd(c[h>>2]|0,c[o>>2]|0);c[q>>2]=c[i>>2];w=c[q>>2]|0;l=x;return w|0}function QC(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[(c[f>>2]|0)+20>>2]=c[(c[e>>2]|0)+200>>2];c[(c[e>>2]|0)+200>>2]=c[f>>2];l=d;return}function RC(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+64|0;h=o+52|0;p=o+48|0;i=o+44|0;j=o+40|0;k=o+36|0;m=o+32|0;n=o+8|0;g=o;c[h>>2]=b;c[p>>2]=e;c[i>>2]=f;c[k>>2]=c[(c[h>>2]|0)+8>>2];c[m>>2]=c[c[h>>2]>>2];c[j>>2]=c[p>>2];while(1){if(!(c[j>>2]|0))break;if((c[i>>2]|0)==10)b=a[(c[j>>2]|0)+1>>0]|0;else b=c[i>>2]&255;a[(c[h>>2]|0)+149>>0]=b;switch(d[c[j>>2]>>0]|0|0){case 110:{e=c[h>>2]|0;f=tD(c[h>>2]|0,c[j>>2]|0)|0;p=iw(c[m>>2]|0,c[(c[j>>2]|0)+20>>2]|0,0)|0;Xs(e,f,p,aw(c[m>>2]|0,c[(c[j>>2]|0)+16>>2]|0,0)|0,d[(c[h>>2]|0)+149>>0]|0);break}case 108:{e=c[h>>2]|0;f=tD(c[h>>2]|0,c[j>>2]|0)|0;p=qv(c[m>>2]|0,c[(c[j>>2]|0)+8>>2]|0,0)|0;Zs(e,f,p,cx(c[m>>2]|0,c[(c[j>>2]|0)+24>>2]|0)|0,d[(c[h>>2]|0)+149>>0]|0);break}case 109:{p=c[h>>2]|0;Vs(p,tD(c[h>>2]|0,c[j>>2]|0)|0,aw(c[m>>2]|0,c[(c[j>>2]|0)+16>>2]|0,0)|0);break}default:{c[g>>2]=qv(c[m>>2]|0,c[(c[j>>2]|0)+8>>2]|0,0)|0;Gy(n,4,0);Gs(c[h>>2]|0,c[g>>2]|0,n)|0;Zj(c[m>>2]|0,c[g>>2]|0)}}if((d[c[j>>2]>>0]|0|0)!=119)Tt(c[k>>2]|0,118)|0;c[j>>2]=c[(c[j>>2]|0)+28>>2]}l=o;return 0}function SC(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;a=c[e>>2]|0;if(!(c[(c[d>>2]|0)+36>>2]|0)){c[(c[d>>2]|0)+4>>2]=c[a+4>>2];c[(c[d>>2]|0)+36>>2]=c[(c[e>>2]|0)+36>>2];c[(c[d>>2]|0)+12>>2]=c[(c[e>>2]|0)+12>>2];l=f;return}else{Hd(c[a>>2]|0,c[(c[e>>2]|0)+4>>2]|0);l=f;return}}function TC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+16|0;g=f+12|0;h=f+8|0;i=f+4|0;e=f;c[g>>2]=a;c[h>>2]=b;c[i>>2]=d;c[e>>2]=c[(c[g>>2]|0)+88>>2];UC(c[g>>2]|0,c[i>>2]|0);c[c[h>>2]>>2]=c[(c[g>>2]|0)+136>>2];c[(c[g>>2]|0)+88>>2]=0;l=f;return c[e>>2]|0}function UC(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;g=p+24|0;h=p+20|0;i=p+16|0;j=p+12|0;k=p+8|0;m=p+4|0;n=p;c[g>>2]=e;c[h>>2]=f;c[i>>2]=c[c[h>>2]>>2];c[k>>2]=c[(c[g>>2]|0)+12>>2];c[m>>2]=c[(c[k>>2]|0)+76>>2];f=(c[g>>2]|0)+144|0;b[f>>1]=b[f>>1]&-129|128;f=(c[g>>2]|0)+144|0;b[f>>1]=b[f>>1]&-257;c[j>>2]=(c[(c[g>>2]|0)+88>>2]|0)+(((c[(c[g>>2]|0)+136>>2]|0)-1|0)*20|0);while(1){if((d[c[j>>2]>>0]|0|0)<=71){switch(d[c[j>>2]>>0]|0|0){case 2:{if(c[(c[j>>2]|0)+8>>2]|0){o=(c[g>>2]|0)+144|0;b[o>>1]=b[o>>1]&-129;o=6}else o=6;break}case 0:case 1:{o=6;break}case 9:case 10:case 8:{f=(c[g>>2]|0)+144|0;b[f>>1]=b[f>>1]&-129;f=(c[g>>2]|0)+144|0;b[f>>1]=b[f>>1]&-257|256;break}case 12:{if((c[(c[j>>2]|0)+8>>2]|0)>(c[i>>2]|0))c[i>>2]=c[(c[j>>2]|0)+8>>2];break}case 11:{c[n>>2]=c[(c[j>>2]|0)+-20+4>>2];if((c[n>>2]|0)>(c[i>>2]|0))c[i>>2]=c[n>>2];break}case 3:case 5:case 7:{c[(c[j>>2]|0)+16>>2]=195;a[(c[j>>2]|0)+1>>0]=-19;break}case 4:case 6:{c[(c[j>>2]|0)+16>>2]=196;a[(c[j>>2]|0)+1>>0]=-19;break}default:{}}if((o|0)==6){o=0;f=(c[g>>2]|0)+144|0;b[f>>1]=b[f>>1]&-257|256}if((d[29646+(d[c[j>>2]>>0]|0)>>0]|0)&1|0?(c[(c[j>>2]|0)+8>>2]|0)<0:0)c[(c[j>>2]|0)+8>>2]=c[(c[m>>2]|0)+(-1-(c[(c[j>>2]|0)+8>>2]|0)<<2)>>2]}if((c[j>>2]|0)==(c[(c[g>>2]|0)+88>>2]|0))break;c[j>>2]=(c[j>>2]|0)+-20}Hd(c[c[g>>2]>>2]|0,c[(c[k>>2]|0)+76>>2]|0);c[(c[k>>2]|0)+76>>2]=0;c[(c[k>>2]|0)+72>>2]=0;c[c[h>>2]>>2]=c[i>>2];l=p;return}function VC(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[i>>2]=f;c[j>>2]=g;b[(c[i>>2]|0)+16+18>>1]=0;f=(c[i>>2]|0)+64|0;a[f>>0]=d[f>>0]&-7;c[c[j>>2]>>2]=0;f=c[i>>2]|0;if((d[(c[i>>2]|0)+66>>0]|0)!=1){c[h>>2]=rD(f,c[j>>2]|0)|0;k=c[h>>2]|0;l=m;return k|0}c[k>>2]=c[f+120+(a[(c[i>>2]|0)+68>>0]<<2)>>2];f=(c[i>>2]|0)+80+(a[(c[i>>2]|0)+68>>0]<<1)|0;g=(b[f>>1]|0)+1<<16>>16;b[f>>1]=g;if((g&65535|0)>=(e[(c[k>>2]|0)+18>>1]|0)){k=(c[i>>2]|0)+80+(a[(c[i>>2]|0)+68>>0]<<1)|0;b[k>>1]=(b[k>>1]|0)+-1<<16>>16;c[h>>2]=rD(c[i>>2]|0,c[j>>2]|0)|0;k=c[h>>2]|0;l=m;return k|0}if(a[(c[k>>2]|0)+4>>0]|0){c[h>>2]=0;k=c[h>>2]|0;l=m;return k|0}else{c[h>>2]=sD(c[i>>2]|0)|0;k=c[h>>2]|0;l=m;return k|0}return 0}function WC(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0;k=l;l=l+16|0;h=k+8|0;i=k+4|0;j=k;c[i>>2]=f;c[j>>2]=g;c[c[j>>2]>>2]=0;g=(c[i>>2]|0)+64|0;a[g>>0]=d[g>>0]&-15;b[(c[i>>2]|0)+16+18>>1]=0;if(((d[(c[i>>2]|0)+66>>0]|0)==1?e[(c[i>>2]|0)+80+(a[(c[i>>2]|0)+68>>0]<<1)>>1]|0:0)?d[(c[(c[i>>2]|0)+120+(a[(c[i>>2]|0)+68>>0]<<2)>>2]|0)+4>>0]|0:0){j=(c[i>>2]|0)+80+(a[(c[i>>2]|0)+68>>0]<<1)|0;b[j>>1]=(b[j>>1]|0)+-1<<16>>16;c[h>>2]=0;j=c[h>>2]|0;l=k;return j|0}c[h>>2]=XC(c[i>>2]|0,c[j>>2]|0)|0;j=c[h>>2]|0;l=k;return j|0}function XC(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;i=p+20|0;j=p+16|0;k=p+12|0;m=p+8|0;n=p+4|0;h=p;c[j>>2]=f;c[k>>2]=g;if((d[(c[j>>2]|0)+66>>0]|0)!=1){if((d[(c[j>>2]|0)+66>>0]|0)>=3)f=YC(c[j>>2]|0)|0;else f=0;c[m>>2]=f;if(c[m>>2]|0){c[i>>2]=c[m>>2];o=c[i>>2]|0;l=p;return o|0}if(!(d[(c[j>>2]|0)+66>>0]|0)){c[c[k>>2]>>2]=1;c[i>>2]=0;o=c[i>>2]|0;l=p;return o|0}if(c[(c[j>>2]|0)+60>>2]|0?(a[(c[j>>2]|0)+66>>0]=1,g=(c[(c[j>>2]|0)+60>>2]|0)<0,c[(c[j>>2]|0)+60>>2]=0,g):0){c[i>>2]=0;o=c[i>>2]|0;l=p;return o|0}}c[n>>2]=c[(c[j>>2]|0)+120+(a[(c[j>>2]|0)+68>>0]<<2)>>2];do if(a[(c[n>>2]|0)+4>>0]|0){while(1){f=c[j>>2]|0;if(e[(c[j>>2]|0)+80+(a[(c[j>>2]|0)+68>>0]<<1)>>1]|0)break;g=c[j>>2]|0;if(!(a[f+68>>0]|0)){o=17;break}$C(g)}if((o|0)==17){a[g+66>>0]=0;c[c[k>>2]>>2]=1;c[i>>2]=0;o=c[i>>2]|0;l=p;return o|0}o=f+80+(a[(c[j>>2]|0)+68>>0]<<1)|0;b[o>>1]=(b[o>>1]|0)+-1<<16>>16;c[n>>2]=c[(c[j>>2]|0)+120+(a[(c[j>>2]|0)+68>>0]<<2)>>2];if(d[(c[n>>2]|0)+2>>0]|0?(a[(c[n>>2]|0)+4>>0]|0)==0:0){c[m>>2]=WC(c[j>>2]|0,c[k>>2]|0)|0;break}c[m>>2]=0}else{c[h>>2]=e[(c[j>>2]|0)+80+(a[(c[j>>2]|0)+68>>0]<<1)>>1];o=c[j>>2]|0;c[m>>2]=ZC(o,el((c[(c[n>>2]|0)+56>>2]|0)+(e[(c[n>>2]|0)+20>>1]&(d[(c[(c[n>>2]|0)+64>>2]|0)+(c[h>>2]<<1)>>0]<<8|d[(c[(c[n>>2]|0)+64>>2]|0)+(c[h>>2]<<1)+1>>0]))|0)|0)|0;if(!(c[m>>2]|0)){c[m>>2]=_C(c[j>>2]|0)|0;break}c[i>>2]=c[m>>2];o=c[i>>2]|0;l=p;return o|0}while(0);c[i>>2]=c[m>>2];o=c[i>>2]|0;l=p;return o|0}function YC(b){b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[f>>2]=b;b=c[f>>2]|0;if((d[(c[f>>2]|0)+66>>0]|0|0)==4){c[e>>2]=c[b+60>>2];h=c[e>>2]|0;l=i;return h|0}a[b+66>>0]=0;b=(c[f>>2]|0)+40|0;c[g>>2]=bD(c[f>>2]|0,c[(c[f>>2]|0)+48>>2]|0,c[b>>2]|0,c[b+4>>2]|0,0,h)|0;if(((c[g>>2]|0)==0?(Kd(c[(c[f>>2]|0)+48>>2]|0),c[(c[f>>2]|0)+48>>2]=0,b=(c[f>>2]|0)+60|0,c[b>>2]=c[b>>2]|c[h>>2],c[(c[f>>2]|0)+60>>2]|0):0)?(d[(c[f>>2]|0)+66>>0]|0|0)==1:0)a[(c[f>>2]|0)+66>>0]=2;c[e>>2]=c[g>>2];h=c[e>>2]|0;l=i;return h|0}function ZC(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[h>>2]=e;c[i>>2]=f;c[j>>2]=c[(c[h>>2]|0)+4>>2];if((a[(c[h>>2]|0)+68>>0]|0)>=19){c[g>>2]=um(63009)|0;j=c[g>>2]|0;l=k;return j|0}else{b[(c[h>>2]|0)+16+18>>1]=0;f=(c[h>>2]|0)+64|0;a[f>>0]=d[f>>0]&-7;f=(c[h>>2]|0)+68|0;a[f>>0]=(a[f>>0]|0)+1<<24>>24;b[(c[h>>2]|0)+80+(a[(c[h>>2]|0)+68>>0]<<1)>>1]=0;c[g>>2]=aD(c[j>>2]|0,c[i>>2]|0,(c[h>>2]|0)+120+(a[(c[h>>2]|0)+68>>0]<<2)|0,c[h>>2]|0,d[(c[h>>2]|0)+65>>0]|0)|0;j=c[g>>2]|0;l=k;return j|0}return 0}function _C(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;j=n+16|0;k=n+12|0;h=n+8|0;m=n+4|0;i=n;c[k>>2]=f;c[m>>2]=0;c[i>>2]=0;while(1){f=c[(c[k>>2]|0)+120+(a[(c[k>>2]|0)+68>>0]<<2)>>2]|0;c[i>>2]=f;g=c[i>>2]|0;if(!((a[f+4>>0]|0)!=0^1)){f=5;break}c[h>>2]=el((c[g+56>>2]|0)+((d[(c[i>>2]|0)+5>>0]|0)+8)|0)|0;b[(c[k>>2]|0)+80+(a[(c[k>>2]|0)+68>>0]<<1)>>1]=b[(c[i>>2]|0)+18>>1]|0;c[m>>2]=ZC(c[k>>2]|0,c[h>>2]|0)|0;if(c[m>>2]|0){f=4;break}}if((f|0)==4){c[j>>2]=c[m>>2];m=c[j>>2]|0;l=n;return m|0}else if((f|0)==5){b[(c[k>>2]|0)+80+(a[(c[k>>2]|0)+68>>0]<<1)>>1]=(e[g+18>>1]|0)-1;c[j>>2]=0;m=c[j>>2]|0;l=n;return m|0}return 0}function $C(e){e=e|0;var f=0,g=0,h=0;f=l;l=l+16|0;h=f;c[h>>2]=e;b[(c[h>>2]|0)+16+18>>1]=0;g=(c[h>>2]|0)+64|0;a[g>>0]=(d[g>>0]|0)&-7;g=(c[h>>2]|0)+120|0;h=(c[h>>2]|0)+68|0;e=a[h>>0]|0;a[h>>0]=e+-1<<24>>24;yp(c[g+(e<<24>>24<<2)>>2]|0);l=f;return}function aD(b,f,g,h,i){b=b|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+32|0;n=s+28|0;o=s+24|0;p=s+20|0;q=s+16|0;r=s+12|0;j=s+8|0;k=s+4|0;m=s;c[o>>2]=b;c[p>>2]=f;c[q>>2]=g;c[r>>2]=h;c[j>>2]=i;i=c[p>>2]|0;a:do if(i>>>0<=($m(c[o>>2]|0)|0)>>>0){c[k>>2]=rm(c[c[o>>2]>>2]|0,c[p>>2]|0,m,c[j>>2]|0)|0;if(!(c[k>>2]|0)){i=Vm(c[m>>2]|0)|0;c[c[q>>2]>>2]=i;if((d[c[c[q>>2]>>2]>>0]|0|0)==0?(xp(c[m>>2]|0,c[p>>2]|0,c[o>>2]|0)|0,c[k>>2]=Bo(c[c[q>>2]>>2]|0)|0,c[k>>2]|0):0){np(c[c[q>>2]>>2]|0);break}do if(c[r>>2]|0){if((e[(c[c[q>>2]>>2]|0)+18>>1]|0|0)>=1?(d[(c[c[q>>2]>>2]|0)+2>>0]|0|0)==(d[(c[r>>2]|0)+69>>0]|0|0):0)break;c[k>>2]=um(60266)|0;np(c[c[q>>2]>>2]|0);break a}while(0);c[n>>2]=0;r=c[n>>2]|0;l=s;return r|0}}else c[k>>2]=um(60244)|0;while(0);if(c[r>>2]|0){r=(c[r>>2]|0)+68|0;a[r>>0]=(a[r>>0]|0)+-1<<24>>24}c[n>>2]=c[k>>2];r=c[n>>2]|0;l=s;return r|0}function bD(a,b,d,f,g,h){a=a|0;b=b|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+432|0;o=s+36|0;p=s+32|0;q=s+28|0;r=s;i=s+24|0;j=s+20|0;k=s+16|0;m=s+12|0;n=s+8|0;c[p>>2]=a;c[q>>2]=b;b=r;c[b>>2]=d;c[b+4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c[o>>2]|0)+8>>1]=(e[(c[k>>2]|0)+6>>1]|0)+1;c[j>>2]=c[o>>2];q=c[j>>2]|0;l=p;return q|0}function dD(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;u=l;l=l+48|0;o=u+36|0;p=u+32|0;v=u+28|0;t=u+24|0;q=u+20|0;r=u+16|0;j=u+12|0;s=u+40|0;k=u+8|0;m=u+4|0;n=u;c[o>>2]=f;c[p>>2]=g;c[v>>2]=h;c[t>>2]=i;c[q>>2]=c[v>>2];c[m>>2]=c[(c[t>>2]|0)+4>>2];a[(c[t>>2]|0)+10>>0]=0;f=c[q>>2]|0;if((d[c[q>>2]>>0]|0|0)<128){c[k>>2]=d[f>>0];f=1}else f=(lD(f,k)|0)&255;c[j>>2]=f&255;c[r>>2]=c[k>>2];b[s>>1]=0;while(1){if((c[j>>2]|0)>>>0>=(c[k>>2]|0)>>>0){f=11;break}if((c[r>>2]|0)>(c[p>>2]|0)){f=11;break}f=(c[q>>2]|0)+(c[j>>2]|0)|0;if((d[(c[q>>2]|0)+(c[j>>2]|0)>>0]|0|0)<128){c[n>>2]=d[f>>0];f=1}else f=(lD(f,n)|0)&255;c[j>>2]=(c[j>>2]|0)+(f&255);a[(c[m>>2]|0)+10>>0]=a[(c[o>>2]|0)+4>>0]|0;c[(c[m>>2]|0)+32>>2]=c[(c[o>>2]|0)+12>>2];c[(c[m>>2]|0)+24>>2]=0;c[(c[m>>2]|0)+16>>2]=0;v=nD((c[q>>2]|0)+(c[r>>2]|0)|0,c[n>>2]|0,c[m>>2]|0)|0;c[r>>2]=(c[r>>2]|0)+v;c[m>>2]=(c[m>>2]|0)+40;v=(b[s>>1]|0)+1<<16>>16;b[s>>1]=v;if((v&65535|0)>=(e[(c[t>>2]|0)+8>>1]|0|0)){f=11;break}}if((f|0)==11){b[(c[t>>2]|0)+8>>1]=b[s>>1]|0;l=u;return}}function eD(f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=(e[(c[v>>2]|0)+18>>1]|0)-1;c[s>>2]=c[r>>2]>>1-(c[m>>2]|0);b[(c[C>>2]|0)+80+(a[(c[C>>2]|0)+68>>0]<<1)>>1]=c[s>>2];b:do if(!(c[p>>2]|0)){while(1){c[w>>2]=(c[(c[v>>2]|0)+68>>2]|0)+(e[(c[v>>2]|0)+20>>1]&(d[(c[(c[v>>2]|0)+64>>2]|0)+(c[s>>2]<<1)>>0]<<8|d[(c[(c[v>>2]|0)+64>>2]|0)+(c[s>>2]<<1)+1>>0]));c:do if(a[(c[v>>2]|0)+3>>0]|0)while(1){k=c[w>>2]|0;c[w>>2]=k+1;if(128>(d[k>>0]|0))break c;if((c[w>>2]|0)>>>0>=(c[(c[v>>2]|0)+60>>2]|0)>>>0){h=20;break a}}while(0);Jo(c[w>>2]|0,x)|0;j=x;h=c[j+4>>2]|0;k=E;i=c[k+4>>2]|0;if((h|0)<(i|0)|((h|0)==(i|0)?(c[j>>2]|0)>>>0<(c[k>>2]|0)>>>0:0)){c[q>>2]=(c[s>>2]|0)+1;if((c[q>>2]|0)>(c[r>>2]|0)){h=23;break}}else{j=x;h=c[j+4>>2]|0;k=E;i=c[k+4>>2]|0;if(!((h|0)>(i|0)|((h|0)==(i|0)?(c[j>>2]|0)>>>0>(c[k>>2]|0)>>>0:0))){h=27;break}c[r>>2]=(c[s>>2]|0)-1;if((c[q>>2]|0)>(c[r>>2]|0)){h=26;break}}c[s>>2]=(c[q>>2]|0)+(c[r>>2]|0)>>1}if((h|0)==23){c[t>>2]=-1;h=51;break}else if((h|0)==26){c[t>>2]=1;h=51;break}else if((h|0)==27){h=0;i=(c[C>>2]|0)+64|0;a[i>>0]=d[i>>0]|2;i=x;j=c[i+4>>2]|0;k=(c[C>>2]|0)+16|0;c[k>>2]=c[i>>2];c[k+4>>2]=j;b[(c[C>>2]|0)+80+(a[(c[C>>2]|0)+68>>0]<<1)>>1]=c[s>>2];if(a[(c[v>>2]|0)+4>>0]|0){h=29;break a}c[q>>2]=c[s>>2];break}}else while(1){c[w>>2]=(c[(c[v>>2]|0)+68>>2]|0)+(e[(c[v>>2]|0)+20>>1]&(d[(c[(c[v>>2]|0)+64>>2]|0)+(c[s>>2]<<1)>>0]<<8|d[(c[(c[v>>2]|0)+64>>2]|0)+(c[s>>2]<<1)+1>>0]));c[y>>2]=d[c[w>>2]>>0];do if((c[y>>2]|0)<=(d[(c[v>>2]|0)+7>>0]|0))c[t>>2]=ob[c[p>>2]&255](c[y>>2]|0,(c[w>>2]|0)+1|0,c[D>>2]|0)|0;else{if((d[(c[w>>2]|0)+1>>0]&128|0)==0?(k=((c[y>>2]&127)<<7)+(d[(c[w>>2]|0)+1>>0]|0)|0,c[y>>2]=k,(k|0)<=(e[(c[v>>2]|0)+10>>1]|0)):0){c[t>>2]=ob[c[p>>2]&255](c[y>>2]|0,(c[w>>2]|0)+2|0,c[D>>2]|0)|0;break}c[A>>2]=(c[w>>2]|0)+(0-(d[(c[v>>2]|0)+6>>0]|0));ub[c[(c[v>>2]|0)+80>>2]&255](c[v>>2]|0,c[A>>2]|0,(c[C>>2]|0)+16|0);c[y>>2]=c[(c[C>>2]|0)+16>>2];if((c[y>>2]|0)<2){h=37;break a}k=(c[y>>2]|0)+18|0;c[z>>2]=pd(k,((k|0)<0)<<31>>31)|0;if(!(c[z>>2]|0)){h=39;break a}b[(c[C>>2]|0)+80+(a[(c[C>>2]|0)+68>>0]<<1)>>1]=c[s>>2];c[o>>2]=Kp(c[C>>2]|0,0,c[y>>2]|0,c[z>>2]|0,2)|0;if(c[o>>2]|0){h=41;break a}c[t>>2]=ob[c[p>>2]&255](c[y>>2]|0,c[z>>2]|0,c[D>>2]|0)|0;Kd(c[z>>2]|0)}while(0);if((c[t>>2]|0)<0)c[q>>2]=(c[s>>2]|0)+1;else{if((c[t>>2]|0)<=0){h=47;break a}c[r>>2]=(c[s>>2]|0)-1}if((c[q>>2]|0)>(c[r>>2]|0)){h=51;break b}c[s>>2]=(c[q>>2]|0)+(c[r>>2]|0)>>1}while(0);if((h|0)==51?(h=0,a[(c[v>>2]|0)+4>>0]|0):0){h=52;break}f=c[(c[v>>2]|0)+56>>2]|0;g=c[v>>2]|0;if((c[q>>2]|0)>=(e[(c[v>>2]|0)+18>>1]|0))c[u>>2]=el(f+((d[g+5>>0]|0)+8)|0)|0;else c[u>>2]=el(f+(e[g+20>>1]&(d[(c[(c[v>>2]|0)+64>>2]|0)+(c[q>>2]<<1)>>0]<<8|d[(c[(c[v>>2]|0)+64>>2]|0)+(c[q>>2]<<1)+1>>0]))|0)|0;b[(c[C>>2]|0)+80+(a[(c[C>>2]|0)+68>>0]<<1)>>1]=c[q>>2];c[o>>2]=ZC(c[C>>2]|0,c[u>>2]|0)|0}while(!(c[o>>2]|0));if((h|0)==20){c[B>>2]=um(63387)|0;E=c[B>>2]|0;l=F;return E|0}else if((h|0)==29){c[c[n>>2]>>2]=0;c[o>>2]=0}else if((h|0)==37)c[o>>2]=um(63460)|0;else if((h|0)==39)c[o>>2]=7;else if((h|0)==41)Kd(c[z>>2]|0);else if((h|0)==47){c[c[n>>2]>>2]=0;c[o>>2]=0;b[(c[C>>2]|0)+80+(a[(c[C>>2]|0)+68>>0]<<1)>>1]=c[s>>2];if(a[(c[D>>2]|0)+11>>0]|0)c[o>>2]=11}else if((h|0)==52){b[(c[C>>2]|0)+80+(a[(c[C>>2]|0)+68>>0]<<1)>>1]=c[s>>2];c[c[n>>2]>>2]=c[t>>2];c[o>>2]=0}b[(c[C>>2]|0)+16+18>>1]=0;E=(c[C>>2]|0)+64|0;a[E>>0]=d[E>>0]&-7;c[B>>2]=c[o>>2];E=c[B>>2]|0;l=F;return E|0}function fD(b){b=b|0;var d=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+8|0;g=i+4|0;h=i;c[g>>2]=b;if(((e[(c[c[g>>2]>>2]|0)+6>>1]|0)+(e[(c[c[g>>2]>>2]|0)+8>>1]|0)|0)<=13){c[h>>2]=e[(c[(c[g>>2]|0)+4>>2]|0)+8>>1];b=(c[g>>2]|0)+12|0;if(a[c[(c[c[g>>2]>>2]|0)+16>>2]>>0]|0){a[b>>0]=1;b=-1;d=c[g>>2]|0}else{a[b>>0]=-1;b=1;d=c[g>>2]|0}a[d+13>>0]=b;if(c[h>>2]&4|0){c[f>>2]=153;h=c[f>>2]|0;l=i;return h|0}if((c[h>>2]&25|0)==0?(c[(c[c[g>>2]>>2]|0)+20>>2]|0)==0:0){c[f>>2]=154;h=c[f>>2]|0;l=i;return h|0}}c[f>>2]=155;h=c[f>>2]|0;l=i;return h|0}function gD(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;m=l;l=l+32|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[h>>2]=f;c[j>>2]=0;do if((d[(c[h>>2]|0)+66>>0]|0)>=3){f=c[h>>2]|0;if((d[(c[h>>2]|0)+66>>0]|0)!=4){Kq(f);break}c[g>>2]=c[f+60>>2];k=c[g>>2]|0;l=m;return k|0}while(0);a:do if((a[(c[h>>2]|0)+68>>0]|0)>=0)while(1){if(!(a[(c[h>>2]|0)+68>>0]|0))break a;n=(c[h>>2]|0)+120|0;o=(c[h>>2]|0)+68|0;f=a[o>>0]|0;a[o>>0]=f+-1<<24>>24;yp(c[n+(f<<24>>24<<2)>>2]|0)}else{f=c[h>>2]|0;if(!(c[(c[h>>2]|0)+52>>2]|0)){a[f+66>>0]=0;c[g>>2]=0;o=c[g>>2]|0;l=m;return o|0}c[j>>2]=aD(c[(c[f>>2]|0)+4>>2]|0,c[(c[h>>2]|0)+52>>2]|0,(c[h>>2]|0)+120|0,0,d[(c[h>>2]|0)+65>>0]|0)|0;f=c[h>>2]|0;if(!(c[j>>2]|0)){a[f+68>>0]=0;a[(c[h>>2]|0)+69>>0]=a[(c[(c[h>>2]|0)+120>>2]|0)+2>>0]|0;break}a[f+66>>0]=0;c[g>>2]=c[j>>2];o=c[g>>2]|0;l=m;return o|0}while(0);c[i>>2]=c[(c[h>>2]|0)+120>>2];if(d[c[i>>2]>>0]|0?((c[(c[h>>2]|0)+72>>2]|0)==0|0)==(d[(c[i>>2]|0)+2>>0]|0):0){b[(c[h>>2]|0)+80>>1]=0;b[(c[h>>2]|0)+16+18>>1]=0;o=(c[h>>2]|0)+64|0;a[o>>0]=d[o>>0]&-15;do if((e[(c[i>>2]|0)+18>>1]|0)>0)a[(c[h>>2]|0)+66>>0]=1;else{if(a[(c[i>>2]|0)+4>>0]|0){a[(c[h>>2]|0)+66>>0]=0;break}if((c[(c[i>>2]|0)+84>>2]|0)==1){c[k>>2]=el((c[(c[i>>2]|0)+56>>2]|0)+((d[(c[i>>2]|0)+5>>0]|0)+8)|0)|0;a[(c[h>>2]|0)+66>>0]=1;c[j>>2]=ZC(c[h>>2]|0,c[k>>2]|0)|0;break}c[g>>2]=um(63147)|0;o=c[g>>2]|0;l=m;return o|0}while(0);c[g>>2]=c[j>>2];o=c[g>>2]|0;l=m;return o|0}c[g>>2]=um(63136)|0;o=c[g>>2]|0;l=m;return o|0}function hD(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+64|0;n=s+52|0;o=s+48|0;p=s+44|0;q=s+40|0;m=s+36|0;t=s+32|0;r=s+28|0;h=s+24|0;i=s+16|0;j=s+8|0;k=s;c[o>>2]=b;c[p>>2]=f;c[q>>2]=g;c[m>>2]=(c[p>>2]|0)+(d[c[p>>2]>>0]&63);c[t>>2]=d[(c[p>>2]|0)+1>>0];do switch(c[t>>2]|0){case 1:{m=a[c[m>>2]>>0]|0;t=k;c[t>>2]=m;c[t+4>>2]=((m|0)<0)<<31>>31;break}case 2:{m=a[c[m>>2]>>0]<<8|d[(c[m>>2]|0)+1>>0];t=k;c[t>>2]=m;c[t+4>>2]=((m|0)<0)<<31>>31;break}case 3:{m=a[c[m>>2]>>0]<<16|d[(c[m>>2]|0)+1>>0]<<8|d[(c[m>>2]|0)+2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|0)|((i|0)==(g|0)?(c[m>>2]|0)>>>0>(c[t>>2]|0)>>>0:0))){m=j;j=c[m+4>>2]|0;t=k;g=c[t+4>>2]|0;b=c[q>>2]|0;if((j|0)<(g|0)|((j|0)==(g|0)?(c[m>>2]|0)>>>0<(c[t>>2]|0)>>>0:0)){c[r>>2]=a[b+13>>0];break}if((e[b+8>>1]|0)>1){c[r>>2]=kD(c[o>>2]|0,c[p>>2]|0,c[q>>2]|0,1)|0;break}else{c[r>>2]=a[(c[q>>2]|0)+10>>0];a[(c[q>>2]|0)+14>>0]=1;break}}else c[r>>2]=a[(c[q>>2]|0)+12>>0];while(0);c[n>>2]=c[r>>2];t=c[n>>2]|0;l=s;return t|0}function iD(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;q=s+36|0;m=s+32|0;n=s+28|0;o=s+24|0;p=s+20|0;h=s+16|0;r=s+12|0;i=s+8|0;j=s+4|0;k=s;c[m>>2]=b;c[n>>2]=f;c[o>>2]=g;c[p>>2]=c[n>>2];b=(c[p>>2]|0)+1|0;if((d[(c[p>>2]|0)+1>>0]|0)<128)c[h>>2]=d[b>>0];else lD(b,h)|0;do if((c[h>>2]|0)>=12){if(!(c[h>>2]&1)){c[r>>2]=a[(c[o>>2]|0)+13>>0];break}c[k>>2]=d[c[p>>2]>>0];c[j>>2]=((c[h>>2]|0)-12|0)/2|0;if(((c[k>>2]|0)+(c[j>>2]|0)|0)>(c[m>>2]|0)){r=(um(74742)|0)&255;a[(c[o>>2]|0)+11>>0]=r;c[q>>2]=0;r=c[q>>2]|0;l=s;return r|0}if((c[(c[(c[o>>2]|0)+4>>2]|0)+12>>2]|0)<(c[j>>2]|0))b=c[(c[(c[o>>2]|0)+4>>2]|0)+12>>2]|0;else b=c[j>>2]|0;c[i>>2]=b;c[r>>2]=wQ((c[p>>2]|0)+(c[k>>2]|0)|0,c[(c[(c[o>>2]|0)+4>>2]|0)+16>>2]|0,c[i>>2]|0)|0;if(c[r>>2]|0){b=c[o>>2]|0;if((c[r>>2]|0)>0){c[r>>2]=a[b+13>>0];break}else{c[r>>2]=a[b+12>>0];break}}c[r>>2]=(c[j>>2]|0)-(c[(c[(c[o>>2]|0)+4>>2]|0)+12>>2]|0);if(!(c[r>>2]|0))if((e[(c[o>>2]|0)+8>>1]|0)>1){c[r>>2]=kD(c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,1)|0;break}else{c[r>>2]=a[(c[o>>2]|0)+10>>0];a[(c[o>>2]|0)+14>>0]=1;break}else{b=c[o>>2]|0;if((c[r>>2]|0)>0){c[r>>2]=a[b+13>>0];break}else{c[r>>2]=a[b+12>>0];break}}}else c[r>>2]=a[(c[o>>2]|0)+12>>0];while(0);c[q>>2]=c[r>>2];r=c[q>>2]|0;l=s;return r|0}function jD(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+8|0;g=e+4|0;f=e;c[h>>2]=a;c[g>>2]=b;c[f>>2]=d;d=kD(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0,0)|0;l=e;return d|0}function kD(f,g,i,j){f=f|0;g=g|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;F=l;l=l+128|0;D=F+124|0;x=F+120|0;H=F+116|0;E=F+112|0;G=F+108|0;y=F+104|0;A=F+100|0;m=F+96|0;n=F+92|0;B=F+88|0;o=F+84|0;C=F+80|0;p=F+76|0;q=F+16|0;k=F+72|0;r=F+68|0;s=F+8|0;t=F;u=F+64|0;v=F+60|0;w=F+56|0;c[x>>2]=f;c[H>>2]=g;c[E>>2]=i;c[G>>2]=j;c[B>>2]=0;c[o>>2]=c[(c[E>>2]|0)+4>>2];c[C>>2]=c[c[E>>2]>>2];c[p>>2]=c[H>>2];g=c[p>>2]|0;do if(c[G>>2]|0){f=(c[p>>2]|0)+1|0;if((d[g+1>>0]|0)<128){c[k>>2]=d[f>>0];f=1}else f=(lD(f,k)|0)&255;c[n>>2]=1+(f&255);c[m>>2]=d[c[p>>2]>>0];H=c[m>>2]|0;c[y>>2]=H+(mD(c[k>>2]|0)|0);c[A>>2]=1;c[o>>2]=(c[o>>2]|0)+40}else{f=c[p>>2]|0;if((d[g>>0]|0)<128){c[m>>2]=d[f>>0];f=1}else f=(lD(f,m)|0)&255;c[n>>2]=f&255;c[y>>2]=c[m>>2];if((c[y>>2]|0)>>>0<=(c[x>>2]|0)>>>0){c[A>>2]=0;break}H=(um(74452)|0)&255;a[(c[E>>2]|0)+11>>0]=H;c[D>>2]=0;H=c[D>>2]|0;l=F;return H|0}while(0);a:while(1){do if(e[(c[o>>2]|0)+8>>1]&4|0){c[r>>2]=d[(c[p>>2]|0)+(c[n>>2]|0)>>0];if((c[r>>2]|0)>>>0>=10){c[B>>2]=1;break}if(!(c[r>>2]|0)){c[B>>2]=-1;break}if((c[r>>2]|0)==7){nD((c[p>>2]|0)+(c[y>>2]|0)|0,c[r>>2]|0,q)|0;H=c[o>>2]|0;c[B>>2]=0-(Mi(c[H>>2]|0,c[H+4>>2]|0,+h[q>>3])|0);break}j=oD(c[r>>2]|0,(c[p>>2]|0)+(c[y>>2]|0)|0)|0;H=s;c[H>>2]=j;c[H+4>>2]=z;H=c[o>>2]|0;j=c[H+4>>2]|0;G=t;c[G>>2]=c[H>>2];c[G+4>>2]=j;G=s;j=c[G+4>>2]|0;H=t;k=c[H+4>>2]|0;if((j|0)<(k|0)|((j|0)==(k|0)?(c[G>>2]|0)>>>0<(c[H>>2]|0)>>>0:0)){c[B>>2]=-1;break}G=s;j=c[G+4>>2]|0;H=t;k=c[H+4>>2]|0;if((j|0)>(k|0)|((j|0)==(k|0)?(c[G>>2]|0)>>>0>(c[H>>2]|0)>>>0:0))c[B>>2]=1}else{if(e[(c[o>>2]|0)+8>>1]&8|0){c[r>>2]=d[(c[p>>2]|0)+(c[n>>2]|0)>>0];if((c[r>>2]|0)>>>0>=10){c[B>>2]=1;break}if(!(c[r>>2]|0)){c[B>>2]=-1;break}nD((c[p>>2]|0)+(c[y>>2]|0)|0,c[r>>2]|0,q)|0;if((c[r>>2]|0)!=7){H=q;c[B>>2]=Mi(c[H>>2]|0,c[H+4>>2]|0,+h[c[o>>2]>>3])|0;break}if(+h[q>>3]<+h[c[o>>2]>>3]){c[B>>2]=-1;break}if(!(+h[q>>3]>+h[c[o>>2]>>3]))break;c[B>>2]=1;break}if(e[(c[o>>2]|0)+8>>1]&2|0){f=(c[p>>2]|0)+(c[n>>2]|0)|0;if((d[(c[p>>2]|0)+(c[n>>2]|0)>>0]|0)<128)c[r>>2]=d[f>>0];else lD(f,r)|0;if((c[r>>2]|0)>>>0<12){c[B>>2]=-1;break}if(!(c[r>>2]&1)){c[B>>2]=1;break}c[q+12>>2]=(((c[r>>2]|0)-12|0)>>>0)/2|0;if(((c[y>>2]|0)+(c[q+12>>2]|0)|0)>>>0>(c[x>>2]|0)>>>0){f=43;break a}if(c[(c[C>>2]|0)+20+(c[A>>2]<<2)>>2]|0){a[q+10>>0]=a[(c[C>>2]|0)+4>>0]|0;c[q+32>>2]=c[(c[C>>2]|0)+12>>2];b[q+8>>1]=2;c[q+16>>2]=(c[p>>2]|0)+(c[y>>2]|0);c[B>>2]=Ni(q,c[o>>2]|0,c[(c[C>>2]|0)+20+(c[A>>2]<<2)>>2]|0,(c[E>>2]|0)+11|0)|0;break}c[u>>2]=c[((c[q+12>>2]|0)<(c[(c[o>>2]|0)+12>>2]|0)?q:c[o>>2]|0)+12>>2];c[B>>2]=wQ((c[p>>2]|0)+(c[y>>2]|0)|0,c[(c[o>>2]|0)+16>>2]|0,c[u>>2]|0)|0;if(c[B>>2]|0)break;c[B>>2]=(c[q+12>>2]|0)-(c[(c[o>>2]|0)+12>>2]|0);break}f=d[(c[p>>2]|0)+(c[n>>2]|0)>>0]|0;if(!(e[(c[o>>2]|0)+8>>1]&16)){c[r>>2]=f;c[B>>2]=(c[r>>2]|0)!=0&1;break}g=(c[p>>2]|0)+(c[n>>2]|0)|0;if((f|0)<128)c[r>>2]=d[g>>0];else lD(g,r)|0;if((c[r>>2]|0)>>>0>=12?(c[r>>2]&1|0)==0:0){c[v>>2]=(((c[r>>2]|0)-12|0)>>>0)/2|0;if(((c[y>>2]|0)+(c[v>>2]|0)|0)>>>0>(c[x>>2]|0)>>>0){f=56;break a}if(e[(c[o>>2]|0)+8>>1]&16384|0)if(Pi((c[p>>2]|0)+(c[y>>2]|0)|0,c[v>>2]|0)|0){c[B>>2]=(c[v>>2]|0)-(c[c[o>>2]>>2]|0);break}else{c[B>>2]=1;break}if((c[v>>2]|0)<(c[(c[o>>2]|0)+12>>2]|0))f=c[v>>2]|0;else f=c[(c[o>>2]|0)+12>>2]|0;c[w>>2]=f;c[B>>2]=wQ((c[p>>2]|0)+(c[y>>2]|0)|0,c[(c[o>>2]|0)+16>>2]|0,c[w>>2]|0)|0;if(c[B>>2]|0)break;c[B>>2]=(c[v>>2]|0)-(c[(c[o>>2]|0)+12>>2]|0);break}c[B>>2]=-1}while(0);if(c[B>>2]|0){f=68;break}c[A>>2]=(c[A>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+40;H=mD(c[r>>2]|0)|0;c[y>>2]=(c[y>>2]|0)+H;H=pD(c[r>>2]|0,0)|0;c[n>>2]=(c[n>>2]|0)+H;if((c[n>>2]|0)>>>0>=(c[m>>2]|0)>>>0){f=74;break}if((c[A>>2]|0)>=(e[(c[E>>2]|0)+8>>1]|0)){f=74;break}if((c[y>>2]|0)>>>0>(c[x>>2]|0)>>>0){f=74;break}}if((f|0)==43){H=(um(74527)|0)&255;a[(c[E>>2]|0)+11>>0]=H;c[D>>2]=0;H=c[D>>2]|0;l=F;return H|0}else if((f|0)==56){H=(um(74557)|0)&255;a[(c[E>>2]|0)+11>>0]=H;c[D>>2]=0;H=c[D>>2]|0;l=F;return H|0}else if((f|0)==68){if(a[(c[(c[C>>2]|0)+16>>2]|0)+(c[A>>2]|0)>>0]|0)c[B>>2]=0-(c[B>>2]|0);c[D>>2]=c[B>>2];H=c[D>>2]|0;l=F;return H|0}else if((f|0)==74){a[(c[E>>2]|0)+14>>0]=1;c[D>>2]=a[(c[E>>2]|0)+10>>0];H=c[D>>2]|0;l=F;return H|0}return 0}function lD(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;f=n+25|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n;m=n+24|0;c[g>>2]=b;c[h>>2]=e;c[i>>2]=d[c[g>>2]>>0];c[g>>2]=(c[g>>2]|0)+1;c[j>>2]=d[c[g>>2]>>0];if(!(c[j>>2]&128)){c[i>>2]=c[i>>2]&127;c[i>>2]=c[i>>2]<<7;c[c[h>>2]>>2]=c[i>>2]|c[j>>2];a[f>>0]=2;m=a[f>>0]|0;l=n;return m|0}c[g>>2]=(c[g>>2]|0)+1;c[i>>2]=c[i>>2]<<14;c[i>>2]=c[i>>2]|(d[c[g>>2]>>0]|0);if(!(c[i>>2]&128)){c[i>>2]=c[i>>2]&2080895;c[j>>2]=c[j>>2]&127;c[j>>2]=c[j>>2]<<7;c[c[h>>2]>>2]=c[i>>2]|c[j>>2];a[f>>0]=3;m=a[f>>0]|0;l=n;return m|0}c[g>>2]=(c[g>>2]|0)+-2;a[m>>0]=Jo(c[g>>2]|0,k)|0;j=k;if(0!=(c[j+4>>2]|0)?1:(c[k>>2]|0)!=(c[j>>2]|0))c[c[h>>2]>>2]=-1;else c[c[h>>2]>>2]=c[k>>2];a[f>>0]=a[m>>0]|0;m=a[f>>0]|0;l=n;return m|0}function mD(a){a=a|0;var b=0,e=0,f=0;e=l;l=l+16|0;b=e+4|0;f=e;c[f>>2]=a;a=c[f>>2]|0;if((c[f>>2]|0)>>>0>=128){c[b>>2]=((a-12|0)>>>0)/2|0;f=c[b>>2]|0;l=e;return f|0}else{c[b>>2]=d[31409+a>>0];f=c[b>>2]|0;l=e;return f|0}return 0}function nD(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[i>>2]=e;c[j>>2]=f;c[k>>2]=g;switch(c[j>>2]|0){case 0:case 11:case 10:{b[(c[k>>2]|0)+8>>1]=1;c[h>>2]=0;k=c[h>>2]|0;l=m;return k|0}case 1:{i=a[c[i>>2]>>0]|0;j=c[k>>2]|0;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;b[(c[k>>2]|0)+8>>1]=4;c[h>>2]=1;k=c[h>>2]|0;l=m;return k|0}case 2:{i=a[c[i>>2]>>0]<<8|d[(c[i>>2]|0)+1>>0];j=c[k>>2]|0;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;b[(c[k>>2]|0)+8>>1]=4;c[h>>2]=2;k=c[h>>2]|0;l=m;return k|0}case 3:{i=a[c[i>>2]>>0]<<16|d[(c[i>>2]|0)+1>>0]<<8|d[(c[i>>2]|0)+2>>0];j=c[k>>2]|0;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;b[(c[k>>2]|0)+8>>1]=4;c[h>>2]=3;k=c[h>>2]|0;l=m;return k|0}case 4:{i=a[c[i>>2]>>0]<<24|d[(c[i>>2]|0)+1>>0]<<16|d[(c[i>>2]|0)+2>>0]<<8|d[(c[i>>2]|0)+3>>0];j=c[k>>2]|0;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;b[(c[k>>2]|0)+8>>1]=4;c[h>>2]=4;k=c[h>>2]|0;l=m;return k|0}case 5:{j=d[(c[i>>2]|0)+2>>0]<<24|d[(c[i>>2]|0)+2+1>>0]<<16|d[(c[i>>2]|0)+2+2>>0]<<8|d[(c[i>>2]|0)+2+3>>0];i=a[c[i>>2]>>0]<<8|d[(c[i>>2]|0)+1>>0];i=IR(j|0,0,RR(0,1,i|0,((i|0)<0)<<31>>31|0)|0,z|0)|0;j=c[k>>2]|0;c[j>>2]=i;c[j+4>>2]=z;b[(c[k>>2]|0)+8>>1]=4;c[h>>2]=6;k=c[h>>2]|0;l=m;return k|0}case 7:case 6:{c[h>>2]=qD(c[i>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;k=c[h>>2]|0;l=m;return k|0}case 9:case 8:{i=c[k>>2]|0;c[i>>2]=(c[j>>2]|0)-8;c[i+4>>2]=0;b[(c[k>>2]|0)+8>>1]=4;c[h>>2]=0;k=c[h>>2]|0;l=m;return k|0}default:{c[(c[k>>2]|0)+16>>2]=c[i>>2];c[(c[k>>2]|0)+12>>2]=(((c[j>>2]|0)-12|0)>>>0)/2|0;b[(c[k>>2]|0)+8>>1]=b[12946+((c[j>>2]&1)<<1)>>1]|0;c[h>>2]=c[(c[k>>2]|0)+12>>2];k=c[h>>2]|0;l=m;return k|0}}return 0}function oD(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+8|0;g=k+24|0;h=k+20|0;i=k+16|0;j=k;c[g>>2]=b;c[h>>2]=e;switch(c[g>>2]|0){case 1:case 0:{i=a[c[h>>2]>>0]|0;j=f;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;break}case 2:{i=a[c[h>>2]>>0]<<8|d[(c[h>>2]|0)+1>>0];j=f;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;break}case 3:{i=a[c[h>>2]>>0]<<16|d[(c[h>>2]|0)+1>>0]<<8|d[(c[h>>2]|0)+2>>0];j=f;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;break}case 4:{c[i>>2]=d[c[h>>2]>>0]<<24|d[(c[h>>2]|0)+1>>0]<<16|d[(c[h>>2]|0)+2>>0]<<8|d[(c[h>>2]|0)+3>>0];i=c[i>>2]|0;j=f;c[j>>2]=i;c[j+4>>2]=((i|0)<0)<<31>>31;break}case 5:{g=d[(c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<<16>>16;b[g>>1]=f;c[m>>2]=f&65535;f=(a[(c[n>>2]|0)+4>>0]|0)!=0;if((c[m>>2]|0)<(e[(c[n>>2]|0)+18>>1]|0))if(f){c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}else{c[h>>2]=sD(c[i>>2]|0)|0;o=c[h>>2]|0;l=p;return o|0}if(!f){o=c[i>>2]|0;c[k>>2]=ZC(o,el((c[(c[n>>2]|0)+56>>2]|0)+((d[(c[n>>2]|0)+5>>0]|0)+8)|0)|0)|0;if(c[k>>2]|0){c[h>>2]=c[k>>2];o=c[h>>2]|0;l=p;return o|0}else{c[h>>2]=sD(c[i>>2]|0)|0;o=c[h>>2]|0;l=p;return o|0}}do{if(!(a[(c[i>>2]|0)+68>>0]|0)){o=17;break}$C(c[i>>2]|0);c[n>>2]=c[(c[i>>2]|0)+120+(a[(c[i>>2]|0)+68>>0]<<2)>>2]}while((e[(c[i>>2]|0)+80+(a[(c[i>>2]|0)+68>>0]<<1)>>1]|0)>=(e[(c[n>>2]|0)+18>>1]|0));if((o|0)==17){c[c[j>>2]>>2]=1;a[(c[i>>2]|0)+66>>0]=0;c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}if(a[(c[n>>2]|0)+2>>0]|0){c[h>>2]=VC(c[i>>2]|0,c[j>>2]|0)|0;o=c[h>>2]|0;l=p;return o|0}else{c[h>>2]=0;o=c[h>>2]|0;l=p;return o|0}return 0}function sD(b){b=b|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;i=j+4|0;h=j;c[f>>2]=b;c[i>>2]=0;while(1){if(c[i>>2]|0){b=5;break}b=c[(c[f>>2]|0)+120+(a[(c[f>>2]|0)+68>>0]<<2)>>2]|0;c[h>>2]=b;if(!((a[b+4>>0]|0)!=0^1)){b=5;break}c[g>>2]=el((c[(c[h>>2]|0)+56>>2]|0)+(e[(c[h>>2]|0)+20>>1]&(d[(c[(c[h>>2]|0)+64>>2]|0)+(e[(c[f>>2]|0)+80+(a[(c[f>>2]|0)+68>>0]<<1)>>1]<<1)>>0]<<8|d[(c[(c[h>>2]|0)+64>>2]|0)+(e[(c[f>>2]|0)+80+(a[(c[f>>2]|0)+68>>0]<<1)>>1]<<1)+1>>0]))|0)|0;c[i>>2]=ZC(c[f>>2]|0,c[g>>2]|0)|0}if((b|0)==5){l=j;return c[i>>2]|0}return 0}function tD(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;j=i+20|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[d>>2]=b;c[e>>2]=c[c[j>>2]>>2];c[g>>2]=Rs(c[e>>2]|0,0,0,0)|0;if(!(c[g>>2]|0)){j=c[g>>2]|0;l=i;return j|0}j=go(c[e>>2]|0,c[(c[d>>2]|0)+12>>2]|0)|0;c[(c[g>>2]|0)+8+(((c[c[g>>2]>>2]|0)-1|0)*72|0)+8>>2]=j;c[f>>2]=Nt(c[e>>2]|0,c[(c[(c[d>>2]|0)+4>>2]|0)+20>>2]|0)|0;if(!((c[f>>2]|0)==0|(c[f>>2]|0)>=2)){j=c[g>>2]|0;l=i;return j|0}c[h>>2]=c[(c[(c[e>>2]|0)+16>>2]|0)+(c[f>>2]<<4)>>2];j=go(c[e>>2]|0,c[h>>2]|0)|0;c[(c[g>>2]|0)+8+(((c[c[g>>2]>>2]|0)-1|0)*72|0)+4>>2]=j;j=c[g>>2]|0;l=i;return j|0}function uD(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;g=h+12|0;d=h+8|0;e=h+4|0;f=h;c[d>>2]=a;c[e>>2]=b;if((c[d>>2]|0)==0|(c[e>>2]|0)==0){c[g>>2]=1;g=c[g>>2]|0;l=h;return g|0}c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[c[e>>2]>>2]|0)){a=8;break}if((Ow(c[d>>2]|0,c[(c[(c[e>>2]|0)+4>>2]|0)+((c[f>>2]|0)*20|0)+4>>2]|0)|0)>=0){a=6;break}c[f>>2]=(c[f>>2]|0)+1}if((a|0)==6){c[g>>2]=1;g=c[g>>2]|0;l=h;return g|0}else if((a|0)==8){c[g>>2]=0;g=c[g>>2]|0;l=h;return g|0}return 0}function vD(e,f){e=e|0;f=f|0;var g=0,h=0,i=0;i=l;l=l+16|0;h=i+4|0;g=i;c[h>>2]=e;c[g>>2]=f;if((d[c[g>>2]>>0]|0)!=152){l=i;return 0}e=c[h>>2]|0;do if((b[(c[g>>2]|0)+32>>1]|0)>=0)if((c[(c[e+24>>2]|0)+(b[(c[g>>2]|0)+32>>1]<<2)>>2]|0)>=0){f=1;e=c[h>>2]|0;break}else{l=i;return 0}else f=2;while(0);h=e+20|0;a[h>>0]=d[h>>0]|f;l=i;return 0}function wD(a,f){a=a|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;i=k+12|0;j=k+8|0;g=k+4|0;h=k;c[j>>2]=a;c[g>>2]=f;if((e[(c[j>>2]|0)+50>>1]|0)!=(e[(c[g>>2]|0)+50>>1]|0)){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}if((d[(c[j>>2]|0)+54>>0]|0)!=(d[(c[g>>2]|0)+54>>0]|0)){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}c[h>>2]=0;while(1){f=c[g>>2]|0;if((c[h>>2]|0)>=(e[(c[g>>2]|0)+50>>1]|0)){a=17;break}if((b[(c[f+4>>2]|0)+(c[h>>2]<<1)>>1]|0)!=(b[(c[(c[j>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]|0)){a=8;break}if((b[(c[(c[g>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]|0)==-2?cw(c[(c[(c[(c[g>>2]|0)+40>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0,c[(c[(c[(c[j>>2]|0)+40>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0,-1)|0:0){a=11;break}if((d[(c[(c[g>>2]|0)+28>>2]|0)+(c[h>>2]|0)>>0]|0)!=(d[(c[(c[j>>2]|0)+28>>2]|0)+(c[h>>2]|0)>>0]|0)){a=13;break}if(uk(c[(c[(c[g>>2]|0)+32>>2]|0)+(c[h>>2]<<2)>>2]|0,c[(c[(c[j>>2]|0)+32>>2]|0)+(c[h>>2]<<2)>>2]|0)|0){a=15;break}c[h>>2]=(c[h>>2]|0)+1}if((a|0)==8){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else if((a|0)==11){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else if((a|0)==13){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else if((a|0)==15){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else if((a|0)==17)if(cw(c[f+36>>2]|0,c[(c[j>>2]|0)+36>>2]|0,-1)|0){c[i>>2]=0;j=c[i>>2]|0;l=k;return j|0}else{c[i>>2]=1;j=c[i>>2]|0;l=k;return j|0}return 0}function xD(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;c[(c[h>>2]|0)+4>>2]=c[f>>2];c[c[h>>2]>>2]=c[(c[f>>2]|0)+448>>2];c[(c[f>>2]|0)+448>>2]=c[g>>2];l=e;return}function yD(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+64|0;i=p+52|0;j=p+48|0;k=p+44|0;m=p+40|0;n=p+16|0;o=p+12|0;f=p+8|0;g=p+4|0;h=p;c[i>>2]=a;c[j>>2]=b;c[k>>2]=d;c[m>>2]=e;c[g>>2]=c[c[i>>2]>>2];c[h>>2]=Nt(c[g>>2]|0,c[(c[j>>2]|0)+64>>2]|0)|0;c[k>>2]=aw(c[g>>2]|0,c[k>>2]|0,0)|0;c[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c[t>>2]|0,96,c[u>>2]|0,c[v>>2]|0,(c[z>>2]|0)+(c[v>>2]|0)|0)|0;c[v>>2]=(c[v>>2]|0)+1}}while(0);yA(c[E>>2]|0,c[r>>2]|0);_t(c[t>>2]|0,12,0,c[y>>2]|0,c[z>>2]|0,c[w>>2]|0,-10)|0;px(c[t>>2]|0,((c[s>>2]|0)==10?2:c[s>>2]|0)&255);mv(c[E>>2]|0);if(!(c[C>>2]|0)){Wt(c[t>>2]|0,7,c[u>>2]|0,(c[D>>2]|0)+1|0)|0;tx(c[t>>2]|0,c[D>>2]|0);Wt(c[t>>2]|0,111,c[u>>2]|0,0)|0;l=F;return}else{MA(c[x>>2]|0);l=F;return}}function AD(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;f=l;l=l+16|0;e=f+4|0;g=f;c[e>>2]=a;c[g>>2]=b;b=c[g>>2]|0;a=(c[e>>2]|0)+20|0;c[b>>2]=c[a>>2];c[b+4>>2]=c[a+4>>2];l=f;return d[(c[e>>2]|0)+45>>0]|0|0}function BD(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[(c[b>>2]|0)+4>>2]|0)){l=d;return}c[(c[(c[b>>2]|0)+4>>2]|0)+448>>2]=c[c[b>>2]>>2];c[(c[b>>2]|0)+4>>2]=0;l=d;return}function CD(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+48|0;j=p+32|0;i=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;o=p+12|0;f=p+8|0;g=p+4|0;h=p;c[i>>2]=a;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;do if(((c[c[k>>2]>>2]|0)+(c[m>>2]|0)|0)>>>0>(c[(c[k>>2]|0)+4>>2]|0)>>>0){c[g>>2]=(c[c[k>>2]>>2]|0)+(c[m>>2]|0);c[f>>2]=Pd(c[i>>2]|0,c[k>>2]|0,80+(((c[g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32|0;q=Q+28|0;r=Q+24|0;s=Q+20|0;v=Q+16|0;w=Q+12|0;K=Q+8|0;L=Q+116|0;M=Q+4|0;N=Q;c[u>>2]=f;c[x>>2]=g;c[P>>2]=h;c[n>>2]=i;c[y>>2]=j;c[k>>2]=c[(c[u>>2]|0)+448>>2];c[J>>2]=c[c[u>>2]>>2];if(e[(c[J>>2]|0)+64>>1]&1|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}c[C>>2]=c[(c[x>>2]|0)+28>>2];c[I>>2]=(c[C>>2]|0)+8+((c[P>>2]|0)*72|0);c[F>>2]=c[(c[I>>2]|0)+44>>2];c[A>>2]=c[(c[I>>2]|0)+20>>2];do if(c[y>>2]|0){if(c[n>>2]|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if((c[c[C>>2]>>2]|0)>1){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(!(c[(c[x>>2]|0)+32>>2]|0?(c[(c[(c[x>>2]|0)+32>>2]|0)+4>>2]&2097152|0)!=0:0))t=10;if(((t|0)==10?((Zw(c[c[x>>2]>>2]|0)|0)&2097152|0)==0:0)?((Zw(c[(c[x>>2]|0)+44>>2]|0)|0)&2097152|0)==0:0)break;c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}while(0);c[D>>2]=c[(c[A>>2]|0)+28>>2];if(c[(c[A>>2]|0)+56>>2]|0?c[(c[x>>2]|0)+56>>2]|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[A>>2]|0)+60>>2]|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[x>>2]|0)+8>>2]&256|0?c[(c[A>>2]|0)+56>>2]|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(!(c[c[D>>2]>>2]|0)){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[A>>2]|0)+8>>2]&1|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[A>>2]|0)+56>>2]|0?(c[n>>2]|0?1:(c[c[C>>2]>>2]|0)>1):0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[y>>2]|0?(c[(c[x>>2]|0)+8>>2]&1|0)!=0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[x>>2]|0)+44>>2]|0?c[(c[A>>2]|0)+44>>2]|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[n>>2]|0?c[(c[A>>2]|0)+44>>2]|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[A>>2]|0)+56>>2]|0?c[(c[x>>2]|0)+32>>2]|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[A>>2]|0)+56>>2]|0?c[(c[x>>2]|0)+8>>2]&1|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[A>>2]|0)+8>>2]&12288|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(c[(c[x>>2]|0)+8>>2]&8192|0?c[(c[A>>2]|0)+48>>2]|0:0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(d[(c[I>>2]|0)+36>>0]&32|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}a:do if(c[(c[A>>2]|0)+48>>2]|0){if(c[(c[A>>2]|0)+44>>2]|0){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}do if(!(c[n>>2]|0)){if(c[(c[x>>2]|0)+8>>2]&1|0)break;if((c[c[C>>2]>>2]|0)!=1)break;c[B>>2]=c[A>>2];while(1){if(!(c[B>>2]|0))break;if(c[(c[B>>2]|0)+8>>2]&9|0){t=62;break}if(c[(c[B>>2]|0)+48>>2]|0?(d[(c[B>>2]|0)+4>>0]|0)!=116:0){t=62;break}if((c[c[(c[B>>2]|0)+28>>2]>>2]|0)<1){t=62;break}c[B>>2]=c[(c[B>>2]|0)+48>>2]}if((t|0)==62){c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}if(!(c[(c[x>>2]|0)+44>>2]|0))break a;c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[c[(c[x>>2]|0)+44>>2]>>2]|0))break a;if(!(e[(c[(c[(c[x>>2]|0)+44>>2]|0)+4>>2]|0)+((c[m>>2]|0)*20|0)+16>>1]|0))break;c[m>>2]=(c[m>>2]|0)+1}c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}while(0);c[O>>2]=0;P=c[O>>2]|0;l=Q;return P|0}while(0);c[(c[u>>2]|0)+448>>2]=c[(c[I>>2]|0)+8>>2];Ot(c[u>>2]|0,21,0,0,0)|0;c[(c[u>>2]|0)+448>>2]=c[k>>2];c[A>>2]=c[(c[A>>2]|0)+48>>2];while(1){if(!(c[A>>2]|0))break;c[p>>2]=c[(c[x>>2]|0)+44>>2];c[q>>2]=c[(c[x>>2]|0)+56>>2];c[r>>2]=c[(c[x>>2]|0)+60>>2];c[s>>2]=c[(c[x>>2]|0)+48>>2];c[(c[x>>2]|0)+44>>2]=0;c[(c[x>>2]|0)+28>>2]=0;c[(c[x>>2]|0)+48>>2]=0;c[(c[x>>2]|0)+56>>2]=0;c[(c[x>>2]|0)+60>>2]=0;c[o>>2]=qv(c[J>>2]|0,c[x>>2]|0,0)|0;c[(c[x>>2]|0)+60>>2]=c[r>>2];c[(c[x>>2]|0)+56>>2]=c[q>>2];c[(c[x>>2]|0)+44>>2]=c[p>>2];c[(c[x>>2]|0)+28>>2]=c[C>>2];a[(c[x>>2]|0)+4>>0]=116;f=c[s>>2]|0;if(!(c[o>>2]|0))g=c[x>>2]|0;else{c[(c[o>>2]|0)+48>>2]=f;if(c[s>>2]|0)c[(c[s>>2]|0)+52>>2]=c[o>>2];c[(c[o>>2]|0)+52>>2]=c[x>>2];f=c[o>>2]|0;g=c[x>>2]|0}c[g+48>>2]=f;if(a[(c[J>>2]|0)+69>>0]|0){t=78;break}c[A>>2]=c[(c[A>>2]|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>>2]|0)+4}c[Q>>2]=c[U>>2];while(1){if(!(c[Q>>2]|0))break;c[N>>2]=0;while(1){if((c[N>>2]|0)>=2)break;c[T>>2]=c[(c[Q>>2]|0)+20+(c[N>>2]<<2)>>2];if((c[T>>2]|0)<0)break;zx(c[Y>>2]|0,c[T>>2]|0,c[S>>2]|0);X=c[Y>>2]|0;Z=c[T>>2]|0;$t(X,Z,Jx(c[P>>2]|0)|0,-6);c[(c[Q>>2]|0)+20+(c[N>>2]<<2)>>2]=-1;c[N>>2]=(c[N>>2]|0)+1}c[Q>>2]=c[(c[Q>>2]|0)+48>>2]}Pj(c[P>>2]|0)}}else{Z=c[O>>2]|0;c[h>>2]=kw(d[(c[U>>2]|0)+4>>0]|0)|0;Ck(Z,32158,h);c[W>>2]=1}while(0);c[(c[V>>2]|0)+12>>2]=c[i+12>>2];c[(c[V>>2]|0)+16>>2]=c[i+16>>2];Zj(c[k>>2]|0,c[j>>2]|0);c[D>>2]=c[W>>2];Z=c[D>>2]|0;l=_;return Z|0}function FD(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=0;Xw(c[e>>2]|0,b);l=d;return c[b>>2]|0}function GD(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;i=q+28|0;j=q+24|0;k=q+20|0;m=q+16|0;n=q+12|0;o=q+8|0;g=q+4|0;h=q;c[j>>2]=a;c[k>>2]=b;c[m>>2]=e;c[n>>2]=f;c[g>>2]=0;if(!(c[m>>2]|0)){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}c[h>>2]=c[k>>2];while(1){if(!(c[h>>2]|0))break;if(c[(c[h>>2]|0)+8>>2]&8200|0){p=6;break}c[h>>2]=c[(c[h>>2]|0)+48>>2]}if((p|0)==6){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}if(c[(c[k>>2]|0)+56>>2]|0){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}while(1){if((d[c[m>>2]>>0]|0|0)!=28)break;p=GD(c[j>>2]|0,c[k>>2]|0,c[(c[m>>2]|0)+16>>2]|0,c[n>>2]|0)|0;c[g>>2]=(c[g>>2]|0)+p;c[m>>2]=c[(c[m>>2]|0)+12>>2]}if(c[(c[m>>2]|0)+4>>2]&1|0){c[i>>2]=0;p=c[i>>2]|0;l=q;return p|0}a:do if(BB(c[m>>2]|0,c[n>>2]|0)|0){c[g>>2]=(c[g>>2]|0)+1;while(1){if(!(c[k>>2]|0))break a;c[o>>2]=aw(c[j>>2]|0,c[m>>2]|0,0)|0;c[o>>2]=lE(c[j>>2]|0,c[o>>2]|0,c[n>>2]|0,c[c[k>>2]>>2]|0)|0;p=Sw(c[j>>2]|0,c[(c[k>>2]|0)+32>>2]|0,c[o>>2]|0)|0;c[(c[k>>2]|0)+32>>2]=p;c[k>>2]=c[(c[k>>2]|0)+48>>2]}}while(0);c[i>>2]=c[g>>2];p=c[i>>2]|0;l=q;return p|0}function HD(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;a[(c[e>>2]|0)+19>>0]=0;c[(c[e>>2]|0)+28>>2]=0;l=d;return}function ID(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+48|0;k=q+36|0;m=q+32|0;n=q+28|0;r=q+24|0;o=q+20|0;p=q+16|0;g=q+12|0;h=q+8|0;i=q+4|0;j=q;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;c[r>>2]=f;c[h>>2]=c[c[k>>2]>>2];c[o>>2]=c[c[m>>2]>>2];c[p>>2]=Ex(c[h>>2]|0,(c[o>>2]|0)-(c[n>>2]|0)|0,(c[r>>2]|0)+1|0)|0;if(!(c[p>>2]|0)){r=c[p>>2]|0;l=q;return r|0}c[i>>2]=c[n>>2];c[g>>2]=(c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c[(c[g>>2]|0)+56>>2]|0,c[j>>2]|0);kx(c[i>>2]|0,17,c[j>>2]|0)|0;Wt(c[i>>2]|0,22,c[j>>2]|0,c[h>>2]|0)|0}while(0);if(!(c[(c[g>>2]|0)+60>>2]|0)){l=n;return}h=(c[f>>2]|0)+44|0;m=(c[h>>2]|0)+1|0;c[h>>2]=m;c[k>>2]=m;c[(c[g>>2]|0)+16>>2]=m;m=(c[f>>2]|0)+44|0;c[m>>2]=(c[m>>2]|0)+1;ay(c[f>>2]|0,c[(c[g>>2]|0)+60>>2]|0,c[k>>2]|0);kx(c[i>>2]|0,17,c[k>>2]|0)|0;Xt(c[i>>2]|0,146,c[j>>2]|0,(c[k>>2]|0)+1|0,c[k>>2]|0)|0;l=n;return}function KD(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=l;l=l+16|0;h=f+4|0;g=f;i=f+8|0;c[h>>2]=b;c[g>>2]=d;a[i>>0]=e;e=a[i>>0]|0;a[(Ax(c[h>>2]|0,c[g>>2]|0)|0)>>0]=e;l=f;return}function LD(a){a=a|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=a;l=e;return b[(c[d>>2]|0)+72>>1]|0}function MD(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[(c[b>>2]|0)+47>>0]|0|0}function ND(b){b=b|0;var d=0,e=0;e=l;l=l+16|0;d=e;c[d>>2]=b;l=e;return a[(c[d>>2]|0)+43>>0]|0}function OD(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[(c[b>>2]|0)+48>>0]|0|0}function PD(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+28>>2]|0}function QD(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[(c[b>>2]|0)+32>>2]|0}function RD(b,f,g,h,i,j,k,m,n){b=b|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[U>>2]|0,c[N>>2]|0)|0;Xt(c[T>>2]|0,99,c[U>>2]|0,c[N>>2]|0,c[B>>2]|0)|0;if((c[D>>2]|0)==8){Wt(c[T>>2]|0,126,(c[P>>2]|0)+1|0,c[B>>2]|0)|0;px(c[T>>2]|0,16)}c[C>>2]=0;while(1){b=c[T>>2]|0;if((c[C>>2]|0)>=(c[H>>2]|0))break;Wt(b,85,(c[U>>2]|0)+(e[(c[(c[L>>2]|0)+4>>2]|0)+((c[C>>2]|0)*20|0)+16>>1]|0)-1|0,(c[J>>2]|0)+(c[C>>2]|0)|0)|0;c[C>>2]=(c[C>>2]|0)+1}Wt(b,113,c[P>>2]|0,(c[J>>2]|0)+(c[H>>2]|0)|0)|0;Xt(c[T>>2]|0,99,c[J>>2]|0,(c[H>>2]|0)+2|0,c[I>>2]|0)|0;Wt(c[T>>2]|0,126,c[P>>2]|0,c[I>>2]|0)|0;if(c[K>>2]|0)tx(c[T>>2]|0,c[K>>2]|0);Wu(c[V>>2]|0,c[I>>2]|0);Vx(c[V>>2]|0,c[J>>2]|0,(c[H>>2]|0)+2|0);break}default:{}}while(0);if(c[R>>2]|0){l=W;return}if(!(c[(c[Q>>2]|0)+12>>2]|0)){l=W;return}Wt(c[T>>2]|0,68,c[(c[Q>>2]|0)+12>>2]|0,c[S>>2]|0)|0;l=W;return}function SD(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+12|0;e=h+8|0;f=h+4|0;g=h;c[d>>2]=a;c[e>>2]=b;if(!(c[e>>2]|0)){l=h;return}c[f>>2]=c[(c[e>>2]|0)+4>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[c[e>>2]>>2]|0))break;TD(c[d>>2]|0,c[c[f>>2]>>2]|0);c[g>>2]=(c[g>>2]|0)+1;c[f>>2]=(c[f>>2]|0)+20}l=h;return}function TD(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+48|0;g=d+32|0;e=d+28|0;f=d;c[g>>2]=a;c[e>>2]=b;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[f+4>>2]=197;c[f+8>>2]=198;c[f+24>>2]=c[g>>2];Qv(f,c[e>>2]|0)|0;l=d;return}function UD(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;i=j;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;c[e>>2]=a;c[f>>2]=b;if((d[(c[e>>2]|0)+409>>0]|0|0)!=2){l=j;return}c[g>>2]=c[(c[e>>2]|0)+8>>2];b=c[c[e>>2]>>2]|0;c[i>>2]=c[f>>2];c[h>>2]=Bj(b,32135,i)|0;_t(c[g>>2]|0,162,c[(c[e>>2]|0)+420>>2]|0,0,0,c[h>>2]|0,-1)|0;l=j;return}function VD(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return d[(c[b>>2]|0)+44>>0]|0|0}function WD(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=l;l=l+16|0;i=f+12|0;h=f+8|0;j=f+4|0;g=f;c[i>>2]=a;c[h>>2]=b;c[j>>2]=d;c[g>>2]=e;Xt(c[(c[i>>2]|0)+8>>2]|0,83,c[h>>2]|0,c[j>>2]|0,c[g>>2]|0)|0;Wx(c[i>>2]|0,c[h>>2]|0,c[g>>2]|0);l=f;return}function XD(b,d){b=b|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;n=v+56|0;o=v+52|0;p=v+48|0;q=v+44|0;r=v+40|0;s=v+36|0;t=v+32|0;u=v+28|0;f=v+24|0;g=v+20|0;h=v+16|0;i=v+12|0;j=v+8|0;k=v+4|0;m=v;c[n>>2]=b;c[o>>2]=d;c[p>>2]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[(c[e>>2]|0)+32>>2]|0);if(!(c[n>>2]|0)){l=m;return}Xt(c[f>>2]|0,79,0,c[(c[e>>2]|0)+16>>2]|0,c[(c[e>>2]|0)+20>>2]|0)|0;c[h>>2]=c[(c[e>>2]|0)+40>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=(c[(c[e>>2]|0)+44>>2]|0))break;do if((c[(c[h>>2]|0)+12>>2]|0)>=0){c[i>>2]=c[c[h>>2]>>2];if(c[(c[i>>2]|0)+20>>2]|0?(c[c[(c[i>>2]|0)+20>>2]>>2]|0)==1:0){c[j>>2]=ID(c[d>>2]|0,c[(c[i>>2]|0)+20>>2]|0,0,0)|0;_t(c[f>>2]|0,107,c[(c[h>>2]|0)+12>>2]|0,0,0,c[j>>2]|0,-6)|0;break}Ck(c[d>>2]|0,32084,k);c[(c[h>>2]|0)+12>>2]=-1}while(0);c[g>>2]=(c[g>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+16}l=m;return}function _D(a,b){a=a|0;b=b|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=a;c[h>>2]=b;if((((c[(c[g>>2]|0)+32>>2]|0)==0?(c[c[c[g>>2]>>2]>>2]|0)==1:0)?(c[c[(c[g>>2]|0)+28>>2]>>2]|0)==1:0)?(c[(c[(c[g>>2]|0)+28>>2]|0)+8+20>>2]|0)==0:0){c[i>>2]=c[(c[(c[g>>2]|0)+28>>2]|0)+8+16>>2];c[j>>2]=c[c[(c[c[g>>2]>>2]|0)+4>>2]>>2];if((d[(c[i>>2]|0)+42>>0]|0)&16|0){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}if((d[c[j>>2]>>0]|0|0)!=153){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}if(!(c[(c[h>>2]|0)+44>>2]|0)){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}if(!((e[(c[(c[(c[h>>2]|0)+40>>2]|0)+4>>2]|0)+2>>1]|0)&256)){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}if(c[(c[j>>2]|0)+4>>2]&16|0){c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}else{c[f>>2]=c[i>>2];j=c[f>>2]|0;l=k;return j|0}}c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}function $D(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;m=n;i=n+28|0;j=n+24|0;g=n+20|0;h=n+16|0;k=n+12|0;c[i>>2]=b;c[j>>2]=e;c[g>>2]=f;if((d[(c[i>>2]|0)+409>>0]|0|0)!=2){l=n;return}if(c[g>>2]|0)if(!((d[(c[j>>2]|0)+42>>0]|0)&32))b=1;else b=(a[(c[g>>2]|0)+55>>0]&3|0)==2^1;else b=0;c[h>>2]=b&1;e=c[c[i>>2]>>2]|0;f=c[h>>2]|0?32043:47636;if(c[h>>2]|0)b=c[c[g>>2]>>2]|0;else b=47636;c[m>>2]=c[c[j>>2]>>2];c[m+4>>2]=f;c[m+8>>2]=b;c[k>>2]=Bj(e,32066,m)|0;_t(c[(c[i>>2]|0)+8>>2]|0,162,c[(c[i>>2]|0)+420>>2]|0,0,0,c[k>>2]|0,-1)|0;l=n;return}function aE(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;c[c[f>>2]>>2]=0;do if((((c[(c[e>>2]|0)+44>>2]|0)==1?(c[h>>2]=c[c[(c[e>>2]|0)+40>>2]>>2],c[i>>2]=c[(c[h>>2]|0)+20>>2],c[i>>2]|0):0)?(c[c[i>>2]>>2]|0)==1:0)?(d[c[c[(c[i>>2]|0)+4>>2]>>2]>>0]|0|0)==154:0){c[j>>2]=c[(c[h>>2]|0)+8>>2];if(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2]|0,c[w>>2]|0)|0;break}case 10:break;default:{a=c[B>>2]|0;b=c[s>>2]|0;if((c[v>>2]|0)==9){Wt(a,87,c[b+12>>2]|0,c[y>>2]|0)|0;fy(c[x>>2]|0,c[(c[s>>2]|0)+12>>2]|0,c[y>>2]|0);break a}else{kx(a,16,c[b+8>>2]|0)|0;break a}}}while(0);if(c[w>>2]|0){b=c[x>>2]|0;a=c[t>>2]|0;if((c[v>>2]|0)==11)Vx(b,a,c[y>>2]|0);else Wu(b,a);Wu(c[x>>2]|0,c[w>>2]|0)}ux(c[B>>2]|0,c[u>>2]|0);h=c[B>>2]|0;b=c[z>>2]|0;a=c[A>>2]|0;if((d[(c[D>>2]|0)+28>>0]|0)&1|0)Wt(h,3,b,a)|0;else Wt(h,7,b,a)|0;if(!(c[(c[D>>2]|0)+12>>2]|0)){B=c[B>>2]|0;D=c[C>>2]|0;ux(B,D);l=E;return}kx(c[B>>2]|0,72,c[(c[D>>2]|0)+12>>2]|0)|0;B=c[B>>2]|0;D=c[C>>2]|0;ux(B,D);l=E;return}function cE(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;A=l;l=l+80|0;z=A+8|0;y=A;r=A+72|0;s=A+68|0;t=A+64|0;u=A+60|0;v=A+56|0;w=A+52|0;x=A+48|0;h=A+44|0;i=A+40|0;j=A+36|0;k=A+32|0;m=A+28|0;n=A+24|0;o=A+20|0;p=A+16|0;q=A+12|0;c[r>>2]=e;c[s>>2]=f;c[t>>2]=g;c[u>>2]=c[(c[r>>2]|0)+8>>2];c[x>>2]=c[c[r>>2]>>2];if(a[(c[r>>2]|0)+409>>0]|0){l=A;return}if(d[(c[r>>2]|0)+16>>0]|0){l=A;return}if(d[(c[x>>2]|0)+69>>0]|0){l=A;return}a[(c[r>>2]|0)+16>>0]=1;c[h>>2]=(c[(c[x>>2]|0)+24>>2]&4|0)!=0&1;c[i>>2]=(c[(c[x>>2]|0)+24>>2]&64|0)!=0&1;Xr(c[u>>2]|0,c[c[t>>2]>>2]|0);c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[c[t>>2]>>2]|0))break;c[j>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[v>>2]|0)*20|0)>>2];do if(c[j>>2]|0){if(c[(c[(c[t>>2]|0)+4>>2]|0)+((c[v>>2]|0)*20|0)+4>>2]|0){c[k>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[v>>2]|0)*20|0)+4>>2];Yr(c[u>>2]|0,c[v>>2]|0,0,c[k>>2]|0,-1)|0;break}if((d[c[j>>2]>>0]|0)!=152?(d[c[j>>2]>>0]|0)!=154:0){c[q>>2]=c[(c[(c[t>>2]|0)+4>>2]|0)+((c[v>>2]|0)*20|0)+8>>2];e=c[x>>2]|0;if(!(c[q>>2]|0)){c[z>>2]=(c[v>>2]|0)+1;e=Bj(e,32034,z)|0}else e=go(e,c[q>>2]|0)|0;c[q>>2]=e;Yr(c[u>>2]|0,c[v>>2]|0,0,c[q>>2]|0,169)|0;break}c[o>>2]=b[(c[j>>2]|0)+32>>1];c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[c[s>>2]>>2]|0))break;if((c[(c[s>>2]|0)+8+((c[w>>2]|0)*72|0)+44>>2]|0)==(c[(c[j>>2]|0)+28>>2]|0))break;c[w>>2]=(c[w>>2]|0)+1}c[m>>2]=c[(c[s>>2]|0)+8+((c[w>>2]|0)*72|0)+16>>2];if((c[o>>2]|0)<0)c[o>>2]=b[(c[m>>2]|0)+32>>1];if((c[o>>2]|0)<0)c[n>>2]=22891;else c[n>>2]=c[(c[(c[m>>2]|0)+4>>2]|0)+(c[o>>2]<<4)>>2];if(!((c[i>>2]|0)!=0|(c[h>>2]|0)!=0)){f=c[u>>2]|0;g=c[v>>2]|0;Yr(f,g,0,go(c[x>>2]|0,c[(c[(c[t>>2]|0)+4>>2]|0)+((c[v>>2]|0)*20|0)+8>>2]|0)|0,169)|0;break}if(c[h>>2]|0){c[p>>2]=0;g=c[x>>2]|0;f=c[n>>2]|0;c[y>>2]=c[c[m>>2]>>2];c[y+4>>2]=f;c[p>>2]=Bj(g,26470,y)|0;Yr(c[u>>2]|0,c[v>>2]|0,0,c[p>>2]|0,169)|0;break}else{Yr(c[u>>2]|0,c[v>>2]|0,0,c[n>>2]|0,-1)|0;break}}while(0);c[v>>2]=(c[v>>2]|0)+1}dE(c[r>>2]|0,c[s>>2]|0,c[t>>2]|0);l=A;return}function dE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+64|0;m=k+56|0;n=k+52|0;f=k+48|0;g=k+44|0;h=k+40|0;i=k+8|0;j=k+4|0;e=k;c[m>>2]=a;c[n>>2]=b;c[f>>2]=d;c[g>>2]=c[(c[m>>2]|0)+8>>2];c[i+4>>2]=c[n>>2];c[i>>2]=c[m>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[c[f>>2]>>2]|0))break;c[j>>2]=c[(c[(c[f>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2];c[e>>2]=vv(i,c[j>>2]|0,0)|0;Yr(c[g>>2]|0,c[h>>2]|0,1,c[e>>2]|0,-1)|0;c[h>>2]=(c[h>>2]|0)+1}l=k;return}function eE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if((c[f>>2]|0)<=0){l=h;return}Xt(c[e>>2]|0,66,c[f>>2]|0,c[g>>2]|0,1)|0;l=h;return}function fE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;g=l;l=l+32|0;i=g+24|0;j=g+20|0;o=g+16|0;m=g+12|0;n=g+8|0;k=g+4|0;h=g;c[i>>2]=a;c[j>>2]=b;c[o>>2]=d;c[m>>2]=e;c[n>>2]=f;c[k>>2]=c[(c[i>>2]|0)+8>>2];c[h>>2]=Uu(c[i>>2]|0)|0;Fx(c[k>>2]|0,31,c[j>>2]|0,c[o>>2]|0,c[n>>2]|0,c[m>>2]|0)|0;Xt(c[k>>2]|0,99,c[n>>2]|0,c[m>>2]|0,c[h>>2]|0)|0;Wt(c[k>>2]|0,126,c[j>>2]|0,c[h>>2]|0)|0;Wu(c[i>>2]|0,c[h>>2]|0);l=g;return}function gE(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;A=l;l=l+80|0;w=A+64|0;q=A+60|0;x=A+56|0;y=A+52|0;r=A+48|0;u=A+44|0;s=A+40|0;z=A+36|0;h=A+32|0;i=A+28|0;j=A+24|0;k=A+20|0;m=A+16|0;n=A+12|0;o=A+8|0;p=A+4|0;v=A;t=A+68|0;c[q>>2]=f;c[x>>2]=g;c[r>>2]=c[(c[q>>2]|0)+24>>2];c[u>>2]=c[c[r>>2]>>2];c[s>>2]=c[(c[r>>2]|0)+4>>2];c[z>>2]=c[(c[r>>2]|0)+12>>2];switch(d[c[x>>2]>>0]|0){case 152:case 154:{a:do if(c[s>>2]|0){c[h>>2]=(c[s>>2]|0)+8;c[y>>2]=0;while(1){if((c[y>>2]|0)>=(c[c[s>>2]>>2]|0))break a;if((c[(c[x>>2]|0)+28>>2]|0)==(c[(c[h>>2]|0)+44>>2]|0))break;c[y>>2]=(c[y>>2]|0)+1;c[h>>2]=(c[h>>2]|0)+72}c[i>>2]=c[(c[z>>2]|0)+28>>2];c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[(c[z>>2]|0)+32>>2]|0))break;if((c[(c[i>>2]|0)+4>>2]|0)==(c[(c[x>>2]|0)+28>>2]|0)?(c[(c[i>>2]|0)+8>>2]|0)==(b[(c[x>>2]|0)+32>>1]|0):0)break;c[j>>2]=(c[j>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+24}if((c[j>>2]|0)>=(c[(c[z>>2]|0)+32>>2]|0)?(y=iE(c[c[u>>2]>>2]|0,c[z>>2]|0)|0,c[j>>2]=y,(y|0)>=0):0){c[i>>2]=(c[(c[z>>2]|0)+28>>2]|0)+((c[j>>2]|0)*24|0);c[c[i>>2]>>2]=c[(c[x>>2]|0)+44>>2];c[(c[i>>2]|0)+4>>2]=c[(c[x>>2]|0)+28>>2];c[(c[i>>2]|0)+8>>2]=b[(c[x>>2]|0)+32>>1];v=(c[u>>2]|0)+44|0;y=(c[v>>2]|0)+1|0;c[v>>2]=y;c[(c[i>>2]|0)+16>>2]=y;c[(c[i>>2]|0)+12>>2]=-1;c[(c[i>>2]|0)+20>>2]=c[x>>2];b:do if(c[(c[z>>2]|0)+24>>2]|0){c[n>>2]=c[(c[z>>2]|0)+24>>2];c[o>>2]=c[(c[n>>2]|0)+4>>2];c[m>>2]=c[c[n>>2]>>2];c[k>>2]=0;while(1){if((c[k>>2]|0)>=(c[m>>2]|0))break b;c[p>>2]=c[c[o>>2]>>2];if(((d[c[p>>2]>>0]|0)==152?(c[(c[p>>2]|0)+28>>2]|0)==(c[(c[x>>2]|0)+28>>2]|0):0)?(b[(c[p>>2]|0)+32>>1]|0)==(b[(c[x>>2]|0)+32>>1]|0):0)break;c[k>>2]=(c[k>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+20}c[(c[i>>2]|0)+12>>2]=c[k>>2]}while(0);if((c[(c[i>>2]|0)+12>>2]|0)<0){v=(c[z>>2]|0)+12|0;y=c[v>>2]|0;c[v>>2]=y+1;c[(c[i>>2]|0)+12>>2]=y}}c[(c[x>>2]|0)+40>>2]=c[z>>2];a[c[x>>2]>>0]=-102;b[(c[x>>2]|0)+34>>1]=c[j>>2]}while(0);c[w>>2]=1;z=c[w>>2]|0;l=A;return z|0}case 153:{if((e[(c[r>>2]|0)+28>>1]&8|0)==0?(c[(c[q>>2]|0)+16>>2]|0)==(d[(c[x>>2]|0)+38>>0]|0):0){c[v>>2]=c[(c[z>>2]|0)+40>>2];c[y>>2]=0;while(1){if((c[y>>2]|0)>=(c[(c[z>>2]|0)+44>>2]|0))break;if(!(cw(c[c[v>>2]>>2]|0,c[x>>2]|0,-1)|0))break;c[y>>2]=(c[y>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+16}if((c[y>>2]|0)>=(c[(c[z>>2]|0)+44>>2]|0)?(a[t>>0]=a[(c[c[u>>2]>>2]|0)+66>>0]|0,c[y>>2]=jE(c[c[u>>2]>>2]|0,c[z>>2]|0)|0,(c[y>>2]|0)>=0):0){c[v>>2]=(c[(c[z>>2]|0)+40>>2]|0)+(c[y>>2]<<4);c[c[v>>2]>>2]=c[x>>2];r=(c[u>>2]|0)+44|0;s=(c[r>>2]|0)+1|0;c[r>>2]=s;c[(c[v>>2]|0)+8>>2]=s;if(c[(c[x>>2]|0)+20>>2]|0)f=c[c[(c[x>>2]|0)+20>>2]>>2]|0;else f=0;t=uw(c[c[u>>2]>>2]|0,c[(c[x>>2]|0)+8>>2]|0,f,a[t>>0]|0,0)|0;c[(c[v>>2]|0)+4>>2]=t;if(c[(c[x>>2]|0)+4>>2]&16|0){f=(c[u>>2]|0)+40|0;g=c[f>>2]|0;c[f>>2]=g+1;f=c[v>>2]|0}else{g=-1;f=c[v>>2]|0}c[f+12>>2]=g}b[(c[x>>2]|0)+34>>1]=c[y>>2];c[(c[x>>2]|0)+40>>2]=c[z>>2];c[w>>2]=1;z=c[w>>2]|0;l=A;return z|0}c[w>>2]=0;z=c[w>>2]|0;l=A;return z|0}default:{c[w>>2]=0;z=c[w>>2]|0;l=A;return z|0}}return 0}function hE(a,b){a=a|0;b=b|0;var d=0;d=l;l=l+16|0;c[d+4>>2]=a;c[d>>2]=b;l=d;return 0}function iE(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+8|0;f=e+4|0;d=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2]=(Vu(c[s>>2]|0)|0)+2;Xt(c[s>>2]|0,37,(c[v>>2]|0)+(c[u>>2]|0)|0,c[I>>2]|0,c[H>>2]|0)|0;px(c[s>>2]|0,-128)}tx(c[s>>2]|0,c[G>>2]|0);l=L;return}function lE(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;m=q+20|0;i=q+16|0;n=q+12|0;o=q+8|0;p=q+4|0;j=q;c[i>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if(!(c[n>>2]|0)){c[m>>2]=0;p=c[m>>2]|0;l=q;return p|0}do if((d[c[n>>2]>>0]|0)==152?(c[(c[n>>2]|0)+28>>2]|0)==(c[o>>2]|0):0)if((b[(c[n>>2]|0)+32>>1]|0)<0){a[c[n>>2]>>0]=101;break}else{c[j>>2]=aw(c[i>>2]|0,c[(c[(c[p>>2]|0)+4>>2]|0)+((b[(c[n>>2]|0)+32>>1]|0)*20|0)>>2]|0,0)|0;ck(c[i>>2]|0,c[n>>2]|0);c[n>>2]=c[j>>2];break}else k=8;while(0);do if((k|0)==8){e=lE(c[i>>2]|0,c[(c[n>>2]|0)+12>>2]|0,c[o>>2]|0,c[p>>2]|0)|0;c[(c[n>>2]|0)+12>>2]=e;e=lE(c[i>>2]|0,c[(c[n>>2]|0)+16>>2]|0,c[o>>2]|0,c[p>>2]|0)|0;c[(c[n>>2]|0)+16>>2]=e;e=c[i>>2]|0;f=(c[n>>2]|0)+20|0;if(c[(c[n>>2]|0)+4>>2]&2048|0){mE(e,c[f>>2]|0,c[o>>2]|0,c[p>>2]|0,1);break}else{nE(e,c[f>>2]|0,c[o>>2]|0,c[p>>2]|0);break}}while(0);c[m>>2]=c[n>>2];p=c[m>>2]|0;l=q;return p|0}function mE(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=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|0)>=(c[c[g>>2]>>2]|0))break;e=lE(c[f>>2]|0,c[(c[(c[g>>2]|0)+4>>2]|0)+((c[j>>2]|0)*20|0)>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;c[(c[(c[g>>2]|0)+4>>2]|0)+((c[j>>2]|0)*20|0)>>2]=e;c[j>>2]=(c[j>>2]|0)+1}l=k;return}function oE(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;f=m+20|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[f>>2]=a;c[g>>2]=d;c[h>>2]=e;c[j>>2]=1;c[k>>2]=0;while(1){if(!(c[(c[g>>2]|0)+48>>2]|0))break;c[g>>2]=c[(c[g>>2]|0)+48>>2];c[j>>2]=(c[j>>2]|0)+1}while(1){if(!(c[g>>2]|0)){a=7;break}c[i>>2]=c[(c[g>>2]|0)+48>>2];c[(c[g>>2]|0)+48>>2]=0;c[k>>2]=Gs(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;c[(c[g>>2]|0)+48>>2]=c[i>>2];if(c[k>>2]|0){a=7;break}b[(c[g>>2]|0)+6>>1]=c[j>>2];c[g>>2]=c[(c[g>>2]|0)+52>>2]}if((a|0)==7){l=m;return c[k>>2]|0}return 0}function pE(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l;l=l+128|0;F=G;A=G+120|0;B=G+116|0;C=G+112|0;g=G+108|0;n=G+104|0;D=G+100|0;E=G+96|0;o=G+92|0;p=G+88|0;q=G+84|0;r=G+80|0;s=G+76|0;t=G+72|0;i=G+68|0;j=G+64|0;u=G+40|0;f=G+32|0;k=G+28|0;v=G+24|0;w=G+20|0;x=G+16|0;y=G+12|0;z=G+8|0;m=G+4|0;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|0)+56>>2]=c[w>>2];c[(c[B>>2]|0)+60>>2]=c[x>>2];l=G;return}function qE(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;ba=l;l=l+224|0;K=ba+220|0;U=ba+216|0;_=ba+212|0;$=ba+208|0;o=ba+204|0;p=ba+200|0;aa=ba+196|0;q=ba+192|0;r=ba+168|0;s=ba+144|0;t=ba+140|0;u=ba+136|0;v=ba+132|0;w=ba+128|0;x=ba+124|0;y=ba+120|0;z=ba+116|0;A=ba+112|0;B=ba+108|0;C=ba+104|0;D=ba+100|0;E=ba+96|0;F=ba+92|0;G=ba+88|0;H=ba+84|0;I=ba+80|0;J=ba+76|0;L=ba+72|0;M=ba+68|0;N=ba+64|0;O=ba+60|0;P=ba+56|0;Q=ba+52|0;R=ba+48|0;S=ba+44|0;T=ba+40|0;i=ba+36|0;V=ba+32|0;W=ba+28|0;X=ba+24|0;Y=ba+20|0;j=ba+16|0;k=ba+12|0;m=ba+8|0;n=ba+4|0;Z=ba;c[U>>2]=f;c[_>>2]=g;c[$>>2]=h;c[A>>2]=0;c[R>>2]=0;c[T>>2]=c[c[U>>2]>>2];c[q>>2]=c[(c[U>>2]|0)+8>>2];c[O>>2]=qx(c[q>>2]|0)|0;c[N>>2]=qx(c[q>>2]|0)|0;c[Q>>2]=d[(c[_>>2]|0)+4>>0];c[aa>>2]=c[(c[_>>2]|0)+48>>2];c[i>>2]=c[(c[_>>2]|0)+44>>2];c[V>>2]=c[c[i>>2]>>2];a:do if((c[Q>>2]|0)!=116){c[o>>2]=1;while(1){if(d[(c[T>>2]|0)+69>>0]|0)break a;if((c[o>>2]|0)>(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>2]|0)+8>>2]|0)|0;break}default:{Wt(c[t>>2]|0,87,c[(c[n>>2]|0)+12>>2]|0,c[(c[n>>2]|0)+16>>2]|0)|0;fy(c[C>>2]|0,c[(c[n>>2]|0)+12>>2]|0,c[(c[n>>2]|0)+16>>2]|0)}}if(c[(c[m>>2]|0)+12>>2]|0)Wt(c[t>>2]|0,68,c[(c[m>>2]|0)+12>>2]|0,c[s>>2]|0)|0;ux(c[t>>2]|0,c[u>>2]|0);kx(c[t>>2]|0,72,c[p>>2]|0)|0;c[B>>2]=c[v>>2];C=c[B>>2]|0;l=D;return C|0}function vE(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;g=o+24|0;h=o+20|0;i=o+16|0;j=o+12|0;k=o+8|0;m=o+4|0;n=o;c[g>>2]=b;c[h>>2]=e;c[i>>2]=f;c[j>>2]=c[c[g>>2]>>2];if(!(c[(c[j>>2]|0)+24>>2]&524288)){l=o;return}if((d[(c[i>>2]|0)+42>>0]|0)&16|0){l=o;return}if(c[(c[i>>2]|0)+12>>2]|0){l=o;return}c[k>>2]=0;c[m>>2]=Rt(c[g>>2]|0)|0;do if(!(ov(c[i>>2]|0)|0)){c[n>>2]=c[(c[i>>2]|0)+16>>2];while(1){if(!(c[n>>2]|0))break;if(d[(c[n>>2]|0)+24>>0]|0|0)break;if(c[(c[j>>2]|0)+24>>2]&33554432|0)break;c[n>>2]=c[(c[n>>2]|0)+4>>2]}if(c[n>>2]|0){c[k>>2]=qx(c[m>>2]|0)|0;Wt(c[m>>2]|0,65,1,c[k>>2]|0)|0;break}else{l=o;return}}while(0);a[(c[g>>2]|0)+150>>0]=1;n=c[g>>2]|0;Vs(n,ax(c[j>>2]|0,c[h>>2]|0,0)|0,0);a[(c[g>>2]|0)+150>>0]=0;if(!(c[(c[j>>2]|0)+24>>2]&33554432)){n=c[m>>2]|0;Wt(n,65,0,(Vu(c[m>>2]|0)|0)+2|0)|0;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0,0,0,c[c[j>>2]>>2]|0,0)|0;n=c[n>>2]|0;p=c[k>>2]|0;q=c[j>>2]|0;q=c[q>>2]|0;_t(n,138,p,0,0,q,0)|0;q=c[i>>2]|0;p=c[k>>2]|0;St(q,p);p=c[o>>2]|0;q=c[k>>2]|0;yE(p,q);l=r;return}function xE(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;d=n+28|0;e=n+24|0;f=n+20|0;g=n+16|0;h=n+12|0;i=n+8|0;j=n+4|0;k=n;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[(c[e>>2]|0)+28>>2];c[g>>2]=0;while(1){c[i>>2]=0;if(!((c[g>>2]|0)!=0?(c[f>>2]|0)>=(c[g>>2]|0):0))c[i>>2]=c[f>>2];c[h>>2]=c[(c[e>>2]|0)+8>>2];while(1){if(!(c[h>>2]|0))break;c[j>>2]=c[(c[h>>2]|0)+44>>2];if(!((c[g>>2]|0)!=0?(c[j>>2]|0)>=(c[g>>2]|0):0))m=9;if((m|0)==9?(m=0,(c[j>>2]|0)>(c[i>>2]|0)):0)c[i>>2]=c[j>>2];c[h>>2]=c[(c[h>>2]|0)+20>>2]}if(!(c[i>>2]|0))break;c[k>>2]=Nt(c[c[d>>2]>>2]|0,c[(c[e>>2]|0)+64>>2]|0)|0;kA(c[d>>2]|0,c[i>>2]|0,c[k>>2]|0);c[g>>2]=c[i>>2]}l=n;return}function yE(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=a;c[g>>2]=d;if(((e[(c[(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4)+12>>2]|0)+78>>1]|0)&2|0)!=2){l=j;return}c[h>>2]=c[(c[(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4)+12>>2]|0)+8+8>>2];while(1){if(!(c[h>>2]|0))break;c[i>>2]=c[(c[h>>2]|0)+8>>2];if(c[(c[i>>2]|0)+12>>2]|0){Yj(c[f>>2]|0,c[i>>2]|0);c[(c[i>>2]|0)+4>>2]=0;b[(c[i>>2]|0)+34>>1]=0}c[h>>2]=c[c[h>>2]>>2]}i=(c[(c[(c[f>>2]|0)+16>>2]|0)+(c[g>>2]<<4)+12>>2]|0)+78|0;b[i>>1]=(e[i>>1]|0)&-3;l=j;return}function zE(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return ((e[(c[(c[b>>2]|0)+4>>2]|0)+22>>1]|0)&1|0)!=0|0}function AE(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+144|0;j=p+128|0;k=p+124|0;m=p+120|0;n=p+116|0;o=p+112|0;h=p;i=p+80|0;c[j>>2]=a;c[k>>2]=d;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;c[i+16>>2]=0;c[i+20>>2]=0;c[i+24>>2]=0;c[i+28>>2]=0;a=h;d=a+80|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(d|0));c[h>>2]=1;c[h+8+8>>2]=c[c[k>>2]>>2];c[h+8+16>>2]=c[k>>2];c[h+8+44>>2]=-1;c[i>>2]=c[j>>2];c[i+4>>2]=h;b[i+28>>1]=c[m>>2];n=(Uv(i,c[n>>2]|0)|0)==0;if(!(n&(c[o>>2]|0)!=0)){l=p;return}Vv(i,c[o>>2]|0)|0;l=p;return}function BE(b){b=b|0;var e=0,f=0;f=l;l=l+16|0;e=f;c[e>>2]=b;b=c[e>>2]|0;if((d[c[e>>2]>>0]|0|0)==97){a[b>>0]=55;l=f;return}if((d[b>>0]|0|0)!=53){l=f;return}if((d[c[(c[e>>2]|0)+12>>2]>>0]|0|0)!=97){l=f;return}a[c[(c[e>>2]|0)+12>>2]>>0]=55;l=f;return}function CE(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;i=j+12|0;f=j+8|0;g=j+4|0;h=j;c[f>>2]=a;c[g>>2]=d;c[h>>2]=e;while(1){e=c[g>>2]|0;c[g>>2]=e+-1;if((e|0)<=0){a=5;break}d=c[h>>2]|0;e=c[f>>2]|0;c[f>>2]=e+2;if((d|0)==(b[e>>1]|0)){a=4;break}}if((a|0)==4){c[i>>2]=1;i=c[i>>2]|0;l=j;return i|0}else if((a|0)==5){c[i>>2]=0;i=c[i>>2]|0;l=j;return i|0}return 0}function DE(a){a=a|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+12|0;g=k+8|0;h=k+4|0;i=k;j=k+16|0;c[f>>2]=a;c[g>>2]=0;c[i>>2]=c[(c[(c[f>>2]|0)+12>>2]|0)+4>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=(e[(c[f>>2]|0)+52>>1]|0))break;b[j>>1]=b[(c[(c[f>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]|0;if((b[j>>1]|0)<0)a=1;else a=d[(c[i>>2]|0)+(b[(c[(c[f>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]<<4)+14>>0]|0;c[g>>2]=(c[g>>2]|0)+a;c[h>>2]=(c[h>>2]|0)+1}j=Du(c[g>>2]<<2,0)|0;b[(c[f>>2]|0)+48>>1]=j;l=k;return}function EE(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;f=l;l=l+16|0;h=f;g=f+4|0;c[h>>2]=b;a[g>>0]=e;e=Iy(c[h>>2]|0,4+(d[g>>0]|0)|0,0)|0;l=f;return e|0}function FE(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=l;l=l+64|0;k=v+52|0;n=v+48|0;o=v+44|0;p=v+40|0;q=v+36|0;r=v+32|0;s=v+28|0;t=v+24|0;h=v+20|0;i=v+16|0;j=v+8|0;m=v;c[k>>2]=f;c[n>>2]=g;c[t>>2]=c[c[k>>2]>>2];c[h>>2]=c[(c[k>>2]|0)+8>>2];a:do if(!(a[(c[t>>2]|0)+148+7>>0]|0)){c[r>>2]=0;while(1){if((c[r>>2]|0)>=(b[(c[n>>2]|0)+34>>1]|0))break a;if(d[(c[(c[n>>2]|0)+4>>2]|0)+(c[r>>2]<<4)+15>>0]&1|0)a[(c[(c[n>>2]|0)+4>>2]|0)+(c[r>>2]<<4)+12>>0]=2;c[r>>2]=(c[r>>2]|0)+1}}while(0);if(a[(c[k>>2]|0)+410>>0]|0){l=v;return}if(c[(c[k>>2]|0)+132>>2]|0)KD(c[h>>2]|0,c[(c[k>>2]|0)+132>>2]|0,-122);f=c[n>>2]|0;do if((b[(c[n>>2]|0)+32>>1]|0)>=0){pw(j,c[(c[f+4>>2]|0)+(b[(c[n>>2]|0)+32>>1]<<4)>>2]|0);h=c[k>>2]|0;c[i>>2]=Ks(h,0,at(c[t>>2]|0,55,j,0)|0)|0;if(!(c[i>>2]|0)){l=v;return}a[(c[(c[i>>2]|0)+4>>2]|0)+12>>0]=a[(c[k>>2]|0)+408>>0]|0;zs(c[k>>2]|0,0,0,0,c[i>>2]|0,d[(c[n>>2]|0)+43>>0]|0,0,0,0,0,2);if(a[(c[t>>2]|0)+69>>0]|0){l=v;return}else{c[p>>2]=Au(c[n>>2]|0)|0;b[(c[n>>2]|0)+32>>1]=-1;break}}else{c[p>>2]=Au(f)|0;if(c[h>>2]|0)KD(c[h>>2]|0,c[(c[p>>2]|0)+44>>2]|0,13);c[s>>2]=1;c[r>>2]=1;while(1){if((c[r>>2]|0)>=(e[(c[p>>2]|0)+50>>1]|0))break;k=(CE(c[(c[p>>2]|0)+4>>2]|0,c[s>>2]|0,b[(c[(c[p>>2]|0)+4>>2]|0)+(c[r>>2]<<1)>>1]|0)|0)!=0;f=c[p>>2]|0;if(k){k=f+52|0;b[k>>1]=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[o>>2]|0)+32>>2]|0)+(c[s>>2]<<2)>>2]=c[(c[(c[p>>2]|0)+32>>2]|0)+(c[r>>2]<<2)>>2];c[s>>2]=(c[s>>2]|0)+1}c[r>>2]=(c[r>>2]|0)+1}}while(0);c[o>>2]=c[(c[o>>2]|0)+20>>2]}if((u|0)==50){l=v;return}if((c[q>>2]|0)>=(b[(c[n>>2]|0)+34>>1]|0)){b[(c[p>>2]|0)+52>>1]=b[(c[n>>2]|0)+34>>1]|0;l=v;return}if(LE(c[t>>2]|0,c[p>>2]|0,b[(c[n>>2]|0)+34>>1]|0)|0){l=v;return}c[r>>2]=0;c[s>>2]=c[q>>2];while(1){if((c[r>>2]|0)>=(b[(c[n>>2]|0)+34>>1]|0))break;if(!(CE(c[(c[p>>2]|0)+4>>2]|0,c[s>>2]|0,c[r>>2]|0)|0)){b[(c[(c[p>>2]|0)+4>>2]|0)+(c[s>>2]<<1)>>1]=c[r>>2];c[(c[(c[p>>2]|0)+32>>2]|0)+(c[s>>2]<<2)>>2]=31345;c[s>>2]=(c[s>>2]|0)+1}c[r>>2]=(c[r>>2]|0)+1}l=v;return}function GE(a){a=a|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=0;c[h>>2]=b[(c[e>>2]|0)+34>>1];c[g>>2]=c[(c[e>>2]|0)+4>>2];while(1){if((c[h>>2]|0)<=0)break;c[f>>2]=(c[f>>2]|0)+(d[(c[g>>2]|0)+14>>0]|0);c[h>>2]=(c[h>>2]|0)+-1;c[g>>2]=(c[g>>2]|0)+16}if((b[(c[e>>2]|0)+32>>1]|0)>=0){g=c[f>>2]|0;g=g<<2;g=Du(g,0)|0;h=c[e>>2]|0;h=h+40|0;b[h>>1]=g;l=i;return}c[f>>2]=(c[f>>2]|0)+1;g=c[f>>2]|0;g=g<<2;g=Du(g,0)|0;h=c[e>>2]|0;h=h+40|0;b[h>>1]=g;l=i;return}function HE(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>>2]|0)|0)|0;c[q>>2]=(c[q>>2]|0)+g;c[t>>2]=c[h>>2];JE(c[s>>2]|0,q,c[c[j>>2]>>2]|0);c[m>>2]=c[5484+((a[(c[j>>2]|0)+13>>0]|0)-65<<2)>>2];c[k>>2]=_c(c[m>>2]|0)|0;MR((c[s>>2]|0)+(c[q>>2]|0)|0,c[m>>2]|0,c[k>>2]|0)|0;c[q>>2]=(c[q>>2]|0)+(c[k>>2]|0);c[p>>2]=(c[p>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+16}c[v>>2]=c[i>>2];Ne(d,e,18130,v)|0;c[n>>2]=c[s>>2];v=c[n>>2]|0;l=w;return v|0}function IE(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;c[e>>2]=0;while(1){if(!(a[c[d>>2]>>0]|0))break;if((a[c[d>>2]>>0]|0)==34)c[e>>2]=(c[e>>2]|0)+1;c[e>>2]=(c[e>>2]|0)+1;c[d>>2]=(c[d>>2]|0)+1}l=f;return (c[e>>2]|0)+2|0}function JE(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;n=l;l=l+32|0;g=n+24|0;h=n+20|0;o=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[g>>2]=b;c[h>>2]=e;c[o>>2]=f;c[i>>2]=c[o>>2];c[j>>2]=c[c[h>>2]>>2];c[k>>2]=0;while(1){if(!(a[(c[i>>2]|0)+(c[k>>2]|0)>>0]|0))break;if((d[16965+(d[(c[i>>2]|0)+(c[k>>2]|0)>>0]|0)>>0]&6|0)==0?(d[(c[i>>2]|0)+(c[k>>2]|0)>>0]|0)!=95:0)break;c[k>>2]=(c[k>>2]|0)+1}if((!(d[16965+(d[c[i>>2]>>0]|0)>>0]&4|0)?(KE(c[i>>2]|0,c[k>>2]|0)|0)==55:0)?!(d[(c[i>>2]|0)+(c[k>>2]|0)>>0]|0):0)b=(c[k>>2]|0)==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]|0,-2)|0;c[e>>2]=(c[e>>2]|0)+1}l=i;return}function OE(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[d>>2]=b;c[f>>2]=c[c[d>>2]>>2];c[i>>2]=c[(c[d>>2]|0)+8>>2];c[e>>2]=c[(c[d>>2]|0)+120>>2];while(1){if(!(c[e>>2]|0)){b=5;break}c[g>>2]=(c[(c[f>>2]|0)+16>>2]|0)+(c[(c[e>>2]|0)+8>>2]<<4);c[h>>2]=c[(c[e>>2]|0)+12>>2];nx(c[d>>2]|0,0,c[(c[e>>2]|0)+8>>2]|0,c[(c[(c[g>>2]|0)+12>>2]|0)+72>>2]|0,104);Vt(c[i>>2]|0,(c[h>>2]|0)-1|0,c[c[(c[e>>2]|0)+4>>2]>>2]|0)|0;c[j>>2]=sz(c[i>>2]|0,10,33884,0)|0;if(!(c[j>>2]|0)){b=5;break}c[(c[j>>2]|0)+8>>2]=c[h>>2];c[(c[j>>2]|0)+12>>2]=(c[h>>2]|0)+1;c[(c[j>>2]|0)+40+12>>2]=c[h>>2];c[(c[j>>2]|0)+60+4>>2]=(c[h>>2]|0)-1;c[(c[j>>2]|0)+60+12>>2]=c[h>>2];a[(c[j>>2]|0)+60+3>>0]=16;c[(c[j>>2]|0)+80+8>>2]=(c[h>>2]|0)+1;c[(c[j>>2]|0)+100+12>>2]=c[h>>2];c[(c[j>>2]|0)+160+8>>2]=c[h>>2];c[e>>2]=c[c[e>>2]>>2]}if((b|0)==5){l=k;return}}function PE(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;i=q+40|0;j=q+36|0;k=q+32|0;m=q+28|0;n=q+24|0;o=q+20|0;p=q+16|0;g=q+12|0;h=q;c[i>>2]=e;c[j>>2]=f;c[k>>2]=c[c[i>>2]>>2];c[m>>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[(c[j>>2]|0)+428>>2];c[(c[j>>2]|0)+404>>2]=0;c[(c[j>>2]|0)+428>>2]=0;p=(c[i>>2]|0)+144|0;b[p>>1]=b[p>>1]&-13|(d[(c[j>>2]|0)+409>>0]&3)<<2&65535;if(a[(c[k>>2]|0)+69>>0]|0){b[(c[i>>2]|0)+16>>1]=0;c[(c[i>>2]|0)+28>>2]=0;c[(c[i>>2]|0)+24>>2]=0;p=c[i>>2]|0;Fr(p);l=q;return}else{c[(c[i>>2]|0)+28>>2]=c[o>>2];b[(c[i>>2]|0)+16>>1]=c[m>>2];_r(c[(c[i>>2]|0)+116>>2]|0,c[m>>2]|0,c[k>>2]|0,1);c[(c[i>>2]|0)+24>>2]=c[n>>2];_r(c[(c[i>>2]|0)+92>>2]|0,c[n>>2]|0,c[k>>2]|0,128);GR(c[(c[i>>2]|0)+112>>2]|0,0,c[o>>2]<<2|0)|0;p=c[i>>2]|0;Fr(p);l=q;return}}function QE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;if(c[f>>2]|0){g=c[f>>2]|0;l=h;return g|0}c[g>>2]=(c[g>>2]|0)+7&-8;a=c[g>>2]|0;b=c[e>>2]|0;if((c[g>>2]|0)<=(c[(c[e>>2]|0)+4>>2]|0)){g=b+4|0;c[g>>2]=(c[g>>2]|0)-a;c[f>>2]=(c[c[e>>2]>>2]|0)+(c[(c[e>>2]|0)+4>>2]|0);g=c[f>>2]|0;l=h;return g|0}else{g=b+8|0;c[g>>2]=(c[g>>2]|0)+a;g=c[f>>2]|0;l=h;return g|0}return 0}function RE(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;y=l;l=l+80|0;x=y+8|0;i=y;r=y+68|0;v=y+64|0;g=y+60|0;n=y+56|0;o=y+52|0;p=y+48|0;h=y+44|0;q=y+40|0;w=y+36|0;s=y+32|0;t=y+28|0;u=y+24|0;j=y+20|0;k=y+16|0;m=y+12|0;c[v>>2]=f;c[n>>2]=0;c[o>>2]=0;c[p>>2]=0;c[h>>2]=c[c[v>>2]>>2];c[w>>2]=0;c[s>>2]=(c[(c[v>>2]|0)+92>>2]|0)+40;Lj(c[s>>2]|0,8);c[(c[v>>2]|0)+104>>2]=0;if((c[(c[v>>2]|0)+40>>2]|0)==7){yd(c[h>>2]|0);c[r>>2]=1;x=c[r>>2]|0;l=y;return x|0}c[g>>2]=c[(c[v>>2]|0)+136>>2];a:do if(((e[(c[v>>2]|0)+144>>1]|0)>>>2&3|0)==1){c[p>>2]=(c[(c[v>>2]|0)+92>>2]|0)+360;if(e[(c[p>>2]|0)+8>>1]&16|0){c[n>>2]=((c[(c[p>>2]|0)+12>>2]|0)>>>0)/4|0;c[o>>2]=c[(c[p>>2]|0)+16>>2]}c[q>>2]=0;while(1){if((c[q>>2]|0)>=(c[n>>2]|0))break a;c[g>>2]=(c[g>>2]|0)+(c[(c[(c[o>>2]|0)+(c[q>>2]<<2)>>2]|0)+4>>2]|0);c[q>>2]=(c[q>>2]|0)+1}}while(0);do{z=(c[v>>2]|0)+36|0;f=c[z>>2]|0;c[z>>2]=f+1;c[q>>2]=f;if((c[q>>2]|0)>=(c[g>>2]|0))break;if(((e[(c[v>>2]|0)+144>>1]|0)>>>2&3|0)!=2)break}while((d[(c[(c[v>>2]|0)+88>>2]|0)+((c[q>>2]|0)*20|0)>>0]|0)!=162);do if((c[q>>2]|0)>=(c[g>>2]|0)){c[(c[v>>2]|0)+40>>2]=0;c[w>>2]=101}else{if(c[(c[h>>2]|0)+248>>2]|0){c[(c[v>>2]|0)+40>>2]=9;c[w>>2]=1;z=c[v>>2]|0;rr(z,Ci(c[(c[v>>2]|0)+40>>2]|0)|0,i);break}f=c[v>>2]|0;if((c[q>>2]|0)<(c[(c[v>>2]|0)+136>>2]|0))c[u>>2]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40;c[(c[v>>2]|0)+40>>2]=0;c[w>>2]=100}while(0);c[r>>2]=c[w>>2];z=c[r>>2]|0;l=y;return z|0} +function sr(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;d=l;l=l+16|0;b=d+4|0;e=d;c[b>>2]=a;c[e>>2]=c[c[b>>2]>>2];tr(c[e>>2]|0);c[(c[e>>2]|0)+88>>2]=c[(c[b>>2]|0)+8>>2];c[(c[e>>2]|0)+136>>2]=c[(c[b>>2]|0)+52>>2];c[(c[e>>2]|0)+92>>2]=c[(c[b>>2]|0)+16>>2];c[(c[e>>2]|0)+24>>2]=c[(c[b>>2]|0)+56>>2];c[(c[e>>2]|0)+112>>2]=c[(c[b>>2]|0)+20>>2];c[(c[e>>2]|0)+28>>2]=c[(c[b>>2]|0)+44>>2];g=(c[b>>2]|0)+32|0;f=c[g+4>>2]|0;a=(c[c[e>>2]>>2]|0)+32|0;c[a>>2]=c[g>>2];c[a+4>>2]=f;c[(c[e>>2]|0)+44>>2]=c[(c[b>>2]|0)+68>>2];c[(c[c[e>>2]>>2]|0)+88>>2]=c[(c[b>>2]|0)+72>>2];vr(c[c[e>>2]>>2]|0,(c[e>>2]|0)+204|0,-1,0);c[(c[e>>2]|0)+204>>2]=c[(c[b>>2]|0)+40>>2];c[(c[b>>2]|0)+40>>2]=0;l=d;return c[(c[b>>2]|0)+48>>2]|0}function tr(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[b>>2]=a;if(!(c[(c[b>>2]|0)+112>>2]|0)){l=f;return}c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[(c[b>>2]|0)+28>>2]|0))break;c[e>>2]=c[(c[(c[b>>2]|0)+112>>2]|0)+(c[d>>2]<<2)>>2];if(c[e>>2]|0){wr(c[b>>2]|0,c[e>>2]|0);c[(c[(c[b>>2]|0)+112>>2]|0)+(c[d>>2]<<2)>>2]=0}c[d>>2]=(c[d>>2]|0)+1}l=f;return}function ur(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[e>>2]=(c[b>>2]|0)+80;c[f>>2]=(c[e>>2]|0)+((c[(c[b>>2]|0)+60>>2]|0)*40|0);c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[(c[b>>2]|0)+64>>2]|0))break;wr(c[c[b>>2]>>2]|0,c[(c[f>>2]|0)+(c[d>>2]<<2)>>2]|0);c[d>>2]=(c[d>>2]|0)+1}Lj(c[e>>2]|0,c[(c[b>>2]|0)+60>>2]|0);vr(c[c[c[b>>2]>>2]>>2]|0,(c[b>>2]|0)+40|0,-1,0);Hd(c[c[c[b>>2]>>2]>>2]|0,c[b>>2]|0);l=g;return}function vr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;a:while(1){if(!(c[c[g>>2]>>2]|0))break;c[j>>2]=c[c[g>>2]>>2];do if((c[h>>2]|0)>=0){if((c[c[j>>2]>>2]|0)==(c[h>>2]|0)){if((c[(c[j>>2]|0)+4>>2]|0)>31)break;if(!(c[i>>2]&1<>2]|0)+4>>2]))break}c[g>>2]=(c[j>>2]|0)+16;continue a}while(0);if(c[(c[j>>2]|0)+12>>2]|0)qb[c[(c[j>>2]|0)+12>>2]&255](c[(c[j>>2]|0)+8>>2]|0);c[c[g>>2]>>2]=c[(c[j>>2]|0)+16>>2];Hd(c[f>>2]|0,c[j>>2]|0)}l=k;return}function wr(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;e=i+12|0;h=i+8|0;f=i+4|0;g=i;c[e>>2]=a;c[h>>2]=b;if(!(c[h>>2]|0)){l=i;return}switch(d[c[h>>2]>>0]|0|0){case 1:{xr(c[c[e>>2]>>2]|0,c[h>>2]|0);l=i;return}case 0:{a=c[h>>2]|0;if(c[(c[h>>2]|0)+20>>2]|0){Fq(c[a+20>>2]|0)|0;l=i;return}else{Iq(c[a+16>>2]|0)|0;l=i;return}}case 2:{c[f>>2]=c[(c[h>>2]|0)+16>>2];c[g>>2]=c[c[c[f>>2]>>2]>>2];h=(c[c[f>>2]>>2]|0)+4|0;c[h>>2]=(c[h>>2]|0)+-1;tb[c[(c[g>>2]|0)+28>>2]&255](c[f>>2]|0)|0;l=i;return}default:{l=i;return}}}function xr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[(c[e>>2]|0)+16>>2];if(!(c[f>>2]|0)){l=g;return}yr(c[d>>2]|0,c[f>>2]|0);Kd(c[(c[f>>2]|0)+36+4>>2]|0);Hd(c[d>>2]|0,c[f>>2]|0);c[(c[e>>2]|0)+16>>2]=0;l=g;return}function yr(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=e;zr(c[(c[g>>2]|0)+20>>2]|0);c[(c[g>>2]|0)+20>>2]=0;c[h>>2]=0;while(1){b=c[g>>2]|0;if((c[h>>2]|0)>=(d[(c[g>>2]|0)+59>>0]|0|0))break;c[i>>2]=b+64+((c[h>>2]|0)*72|0);Ar(c[f>>2]|0,c[i>>2]|0);c[(c[i>>2]|0)+8>>2]=c[g>>2];c[h>>2]=(c[h>>2]|0)+1}if(!(c[b+36+4>>2]|0))Br(0,c[(c[g>>2]|0)+36>>2]|0);c[(c[g>>2]|0)+36>>2]=0;c[(c[g>>2]|0)+36+8>>2]=0;a[(c[g>>2]|0)+56>>0]=0;c[(c[g>>2]|0)+48>>2]=0;c[(c[g>>2]|0)+8>>2]=0;Hd(c[f>>2]|0,c[(c[g>>2]|0)+32>>2]|0);c[(c[g>>2]|0)+32>>2]=0;l=j;return}function zr(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(!(c[b>>2]|0)){d=c[b>>2]|0;Kd(d);l=e;return}c[d>>2]=0;while(1){if((c[d>>2]|0)>=(c[c[b>>2]>>2]|0))break;Cr((c[(c[b>>2]|0)+12>>2]|0)+((c[d>>2]|0)*56|0)|0);c[d>>2]=(c[d>>2]|0)+1}d=c[b>>2]|0;Kd(d);l=e;return}function Ar(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;e=l;l=l+16|0;f=e+4|0;d=e;c[f>>2]=a;c[d>>2]=b;Hd(c[f>>2]|0,c[(c[d>>2]|0)+12>>2]|0);Br(0,c[(c[d>>2]|0)+16>>2]|0);if(c[(c[d>>2]|0)+40>>2]|0)or(c[(c[d>>2]|0)+40>>2]|0);if(!(c[(c[d>>2]|0)+56>>2]|0)){a=c[d>>2]|0;b=a+72|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));l=e;return}or(c[(c[d>>2]|0)+56>>2]|0);a=c[d>>2]|0;b=a+72|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));l=e;return}function Br(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;g=l;l=l+16|0;d=g+12|0;h=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[h>>2]=b;c[e>>2]=c[h>>2];while(1){if(!(c[e>>2]|0))break;c[f>>2]=c[(c[e>>2]|0)+4>>2];Hd(c[d>>2]|0,c[e>>2]|0);c[e>>2]=c[f>>2]}l=g;return}function Cr(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;Kd(c[(c[b>>2]|0)+28>>2]|0);Kd(c[(c[b>>2]|0)+36>>2]|0);if(c[(c[b>>2]|0)+44>>2]|0)ym(c[(c[b>>2]|0)+24>>2]|0,0,0,c[(c[b>>2]|0)+44>>2]|0)|0;Dr(c[(c[b>>2]|0)+48>>2]|0);a=c[b>>2]|0;b=a+56|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(b|0));l=d;return}function Dr(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;if(!(c[b>>2]|0)){l=d;return}zr(c[(c[b>>2]|0)+4>>2]|0);Kd(c[b>>2]|0);l=d;return}function Er(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;if(!(c[b>>2]|0)){c[d>>2]=0;f=c[d>>2]|0;l=g;return f|0}c[e>>2]=c[b>>2];c[f>>2]=c[c[e>>2]>>2];b=(c[e>>2]|0)+128|0;a=c[b+4>>2]|0;if((a|0)>0|(a|0)==0&(c[b>>2]|0)>>>0>0)Sq(c[f>>2]|0,c[e>>2]|0);c[d>>2]=Xq(c[e>>2]|0)|0;Fr(c[e>>2]|0);c[d>>2]=Uq(c[f>>2]|0,c[d>>2]|0)|0;f=c[d>>2]|0;l=g;return f|0}function Fr(b){b=b|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=b;c[(c[e>>2]|0)+20>>2]=770837923;c[(c[e>>2]|0)+36>>2]=-1;c[(c[e>>2]|0)+40>>2]=0;a[(c[e>>2]|0)+142>>0]=2;c[(c[e>>2]|0)+44>>2]=0;c[(c[e>>2]|0)+32>>2]=1;a[(c[e>>2]|0)+143>>0]=-1;c[(c[e>>2]|0)+48>>2]=0;b=(c[e>>2]|0)+64|0;c[b>>2]=0;c[b+4>>2]=0;l=d;return}function Gr(a){a=a|0;var d=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+12|0;d=h+8|0;f=h+4|0;g=h;c[i>>2]=a;c[f>>2]=0;c[g>>2]=c[i>>2];c[d>>2]=0;while(1){a=c[g>>2]|0;if((c[d>>2]|0)>=(b[(c[g>>2]|0)+16>>1]|0))break;Lh((c[a+116>>2]|0)+((c[d>>2]|0)*40|0)|0);b[(c[(c[g>>2]|0)+116>>2]|0)+((c[d>>2]|0)*40|0)+8>>1]=1;c[d>>2]=(c[d>>2]|0)+1}if(!((e[a+144>>1]|0)>>>9&1)){i=c[f>>2]|0;l=h;return i|0}if(!(c[(c[g>>2]|0)+196>>2]|0)){i=c[f>>2]|0;l=h;return i|0}i=(c[g>>2]|0)+144|0;b[i>>1]=b[i>>1]&-2|1;i=c[f>>2]|0;l=h;return i|0}function Hr(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;k=o+32|0;e=o+28|0;m=o+24|0;f=o+20|0;j=o+16|0;g=o+12|0;n=o+8|0;h=o+4|0;i=o;c[e>>2]=d;c[m>>2]=0;c[f>>2]=0;c[j>>2]=c[e>>2];c[g>>2]=0;if(Ir(c[j>>2]|0)|0){c[k>>2]=cd(75775)|0;n=c[k>>2]|0;l=o;return n|0}c[n>>2]=c[c[j>>2]>>2];d=(c[j>>2]|0)+144|0;b[d>>1]=b[d>>1]&-3;while(1){d=Jr(c[j>>2]|0)|0;c[m>>2]=d;if((d|0)!=17)break;d=c[g>>2]|0;c[g>>2]=d+1;if((d|0)>=50)break;c[h>>2]=c[(c[j>>2]|0)+36>>2];d=Kr(c[j>>2]|0)|0;c[m>>2]=d;c[f>>2]=d;if(c[m>>2]|0)break;Er(c[e>>2]|0)|0;if((c[h>>2]|0)<0)continue;d=(c[j>>2]|0)+144|0;b[d>>1]=b[d>>1]&-3|2}if(c[f>>2]|0){c[i>>2]=wh(c[(c[n>>2]|0)+244>>2]|0)|0;Hd(c[n>>2]|0,c[(c[j>>2]|0)+108>>2]|0);if(a[(c[n>>2]|0)+69>>0]|0){c[(c[j>>2]|0)+108>>2]=0;c[m>>2]=7;e=7;d=c[j>>2]|0}else{e=go(c[n>>2]|0,c[i>>2]|0)|0;c[(c[j>>2]|0)+108>>2]=e;e=c[f>>2]|0;d=c[j>>2]|0}c[d+40>>2]=e}c[m>>2]=Uq(c[n>>2]|0,c[m>>2]|0)|0;c[k>>2]=c[m>>2];n=c[k>>2]|0;l=o;return n|0}function Ir(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+8|0;d=e+4|0;c[d>>2]=a;if(!(c[d>>2]|0)){hd(21,38995,e);c[b>>2]=1;d=c[b>>2]|0;l=e;return d|0}else{c[b>>2]=Rq(c[d>>2]|0)|0;d=c[b>>2]|0;l=e;return d|0}return 0}function Jr(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;g=m+12|0;h=m+8|0;i=m+4|0;j=m;c[h>>2]=f;if((c[(c[h>>2]|0)+20>>2]|0)!=770837923)Er(c[h>>2]|0)|0;c[i>>2]=c[c[h>>2]>>2];f=c[h>>2]|0;if(a[(c[i>>2]|0)+69>>0]|0){c[f+40>>2]=7;c[g>>2]=7;k=c[g>>2]|0;l=m;return k|0}if((c[f+36>>2]|0)<=0?b[(c[h>>2]|0)+144>>1]&1|0:0){c[(c[h>>2]|0)+40>>2]=17;c[j>>2]=1}else{if((c[(c[h>>2]|0)+36>>2]|0)<0){if(!(c[(c[i>>2]|0)+156>>2]|0))c[(c[i>>2]|0)+248>>2]=0;if(!(!(c[(c[i>>2]|0)+192>>2]|0)?!(d[(c[i>>2]|0)+76>>0]&2|0):0))k=13;if(((k|0)==13?(a[(c[i>>2]|0)+148+5>>0]|0)==0:0)?c[(c[h>>2]|0)+176>>2]|0:0)uj(c[c[i>>2]>>2]|0,(c[h>>2]|0)+128|0)|0;k=(c[i>>2]|0)+156|0;c[k>>2]=(c[k>>2]|0)+1;if(!((e[(c[h>>2]|0)+144>>1]|0)>>>7&1)){k=(c[i>>2]|0)+164|0;c[k>>2]=(c[k>>2]|0)+1}if((e[(c[h>>2]|0)+144>>1]|0)>>>8&1|0){k=(c[i>>2]|0)+160|0;c[k>>2]=(c[k>>2]|0)+1}c[(c[h>>2]|0)+36>>2]=0}if((e[(c[h>>2]|0)+144>>1]|0)>>>2&3|0)c[j>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;b=d;c[e>>2]=a;c[b>>2]=c[e>>2];if(!(c[b>>2]|0)){e=0;l=d;return e|0}e=c[(c[b>>2]|0)+176>>2]|0;l=d;return e|0}function Mr(a){a=a|0;var b=0,d=0;d=l;l=l+16|0;b=d;c[b>>2]=a;l=d;return c[c[b>>2]>>2]|0}function Nr(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;p=s+32|0;q=s+28|0;r=s+24|0;i=s+20|0;j=s+16|0;k=s+12|0;m=s+8|0;n=s+4|0;o=s;c[q>>2]=a;c[r>>2]=b;c[i>>2]=d;c[j>>2]=e;c[k>>2]=f;c[m>>2]=g;c[n>>2]=h;c[c[m>>2]>>2]=0;h=(Sr(c[q>>2]|0)|0)==0;if(h|(c[r>>2]|0)==0){c[p>>2]=cd(114197)|0;r=c[p>>2]|0;l=s;return r|0}Gj(c[q>>2]|0);c[o>>2]=Tr(c[q>>2]|0,c[r>>2]|0,c[i>>2]|0,c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;if((c[o>>2]|0)==17){Qq(c[c[m>>2]>>2]|0)|0;c[o>>2]=Tr(c[q>>2]|0,c[r>>2]|0,c[i>>2]|0,c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0)|0}c[p>>2]=c[o>>2];r=c[p>>2]|0;l=s;return r|0}function Or(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=l;l=l+224|0;g=f+220|0;h=f+216|0;k=f;j=f+212|0;i=f+208|0;c[g>>2]=a;c[h>>2]=d;MR(k|0,c[g>>2]|0,208)|0;MR(c[g>>2]|0,c[h>>2]|0,208)|0;MR(c[h>>2]|0,k|0,208)|0;c[j>>2]=c[(c[g>>2]|0)+8>>2];c[(c[g>>2]|0)+8>>2]=c[(c[h>>2]|0)+8>>2];c[(c[h>>2]|0)+8>>2]=c[j>>2];c[j>>2]=c[(c[g>>2]|0)+4>>2];c[(c[g>>2]|0)+4>>2]=c[(c[h>>2]|0)+4>>2];c[(c[h>>2]|0)+4>>2]=c[j>>2];c[i>>2]=c[(c[g>>2]|0)+176>>2];c[(c[g>>2]|0)+176>>2]=c[(c[h>>2]|0)+176>>2];c[(c[h>>2]|0)+176>>2]=c[i>>2];d=(c[h>>2]|0)+144|0;b[d>>1]=b[d>>1]&-513|((e[(c[g>>2]|0)+144>>1]|0)>>>9&1)<<9&65535;l=f;return}function Pr(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;j=h+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[j>>2]=a;c[i>>2]=d;c[e>>2]=c[j>>2];c[f>>2]=c[i>>2];c[g>>2]=0;while(1){if((c[g>>2]|0)>=(b[(c[e>>2]|0)+16>>1]|0))break;Rr((c[(c[f>>2]|0)+116>>2]|0)+((c[g>>2]|0)*40|0)|0,(c[(c[e>>2]|0)+116>>2]|0)+((c[g>>2]|0)*40|0)|0);c[g>>2]=(c[g>>2]|0)+1}l=h;return 0}function Qr(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;c[(c[d>>2]|0)+40>>2]=0;l=b;return}function Rr(a,d){a=a|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=a;c[f>>2]=d;Lh(c[e>>2]|0);a=c[e>>2]|0;d=c[f>>2]|0;e=a+40|0;do{c[a>>2]=c[d>>2];a=a+4|0;d=d+4|0}while((a|0)<(e|0));b[(c[f>>2]|0)+8>>1]=1;c[(c[f>>2]|0)+24>>2]=0;l=g;return}function Sr(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;b=f+8|0;d=f+4|0;e=f;c[d>>2]=a;do if(!(c[d>>2]|0)){Mu(17843);c[b>>2]=0}else{c[e>>2]=c[(c[d>>2]|0)+84>>2];if((c[e>>2]|0)==-1607883113){c[b>>2]=1;break}if(Lu(c[d>>2]|0)|0)Mu(35609);c[b>>2]=0}while(0);l=f;return c[b>>2]|0}function Tr(b,e,f,g,h,i,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;I=l;l=l+576|0;H=I+16|0;t=I+8|0;o=I;G=I+572|0;A=I+568|0;s=I+564|0;u=I+560|0;k=I+556|0;v=I+552|0;p=I+548|0;C=I+544|0;D=I+540|0;w=I+536|0;E=I+56|0;m=I+48|0;n=I+44|0;q=I+40|0;r=I+36|0;x=I+32|0;y=I+28|0;z=I+24|0;F=I+20|0;c[G>>2]=b;c[A>>2]=e;c[s>>2]=f;c[u>>2]=g;c[k>>2]=h;c[v>>2]=i;c[p>>2]=j;c[C>>2]=0;c[D>>2]=0;GR(E|0,0,152)|0;b=E+400|0;e=b+80|0;do{a[b>>0]=0;b=b+1|0}while((b|0)<(e|0));c[E+432>>2]=c[k>>2];c[w>>2]=0;while(1){b=c[G>>2]|0;if((c[w>>2]|0)>=(c[(c[G>>2]|0)+20>>2]|0))break;c[m>>2]=c[(c[b+16>>2]|0)+(c[w>>2]<<4)+4>>2];if(c[m>>2]|0?(c[D>>2]=Ur(c[m>>2]|0)|0,c[D>>2]|0):0){B=5;break}c[w>>2]=(c[w>>2]|0)+1}if((B|0)==5){c[n>>2]=c[(c[(c[G>>2]|0)+16>>2]|0)+(c[w>>2]<<4)>>2];F=c[G>>2]|0;H=c[D>>2]|0;c[o>>2]=c[n>>2];vk(F,H,22067,o);Ak(E);G=c[G>>2]|0;H=c[D>>2]|0;H=Uq(G,H)|0;c[D>>2]=H;H=c[D>>2]|0;l=I;return H|0}Zp(b);c[E>>2]=c[G>>2];do if((c[s>>2]|0)>=0){if(c[s>>2]|0?(a[(c[A>>2]|0)+((c[s>>2]|0)-1)>>0]|0)==0:0){B=15;break}c[r>>2]=c[(c[G>>2]|0)+96+4>>2];b=c[G>>2]|0;if((c[s>>2]|0)>(c[r>>2]|0)){vk(b,18,22097,t);c[D>>2]=Uq(c[G>>2]|0,18)|0;Ak(E);G=c[G>>2]|0;H=c[D>>2]|0;H=Uq(G,H)|0;c[D>>2]=H;H=c[D>>2]|0;l=I;return H|0}t=c[s>>2]|0;c[q>>2]=zj(b,c[A>>2]|0,t,((t|0)<0)<<31>>31)|0;if(c[q>>2]|0){Vr(E,c[q>>2]|0,C)|0;c[E+436>>2]=(c[A>>2]|0)+((c[E+436>>2]|0)-(c[q>>2]|0));Hd(c[G>>2]|0,c[q>>2]|0);break}else{c[E+436>>2]=(c[A>>2]|0)+(c[s>>2]|0);break}}else B=15;while(0);if((B|0)==15)Vr(E,c[A>>2]|0,C)|0;if((c[E+12>>2]|0)==101)c[E+12>>2]=0;if(a[E+17>>0]|0)Wr(E);if(a[(c[G>>2]|0)+69>>0]|0)c[E+12>>2]=7;if(c[p>>2]|0)c[c[p>>2]>>2]=c[E+436>>2];c[D>>2]=c[E+12>>2];a:do if(((c[D>>2]|0)==0?c[E+8>>2]|0:0)?d[E+409>>0]|0:0){b=c[E+8>>2]|0;if((d[E+409>>0]|0)==2){Xr(b,4);c[x>>2]=8;c[y>>2]=12}else{Xr(b,8);c[x>>2]=0;c[y>>2]=8}c[w>>2]=c[x>>2];while(1){if((c[w>>2]|0)>=(c[y>>2]|0))break a;Yr(c[E+8>>2]|0,(c[w>>2]|0)-(c[x>>2]|0)|0,0,c[4104+(c[w>>2]<<2)>>2]|0,0)|0;c[w>>2]=(c[w>>2]|0)+1}}while(0);if(!(d[(c[G>>2]|0)+148+5>>0]|0)){c[z>>2]=c[E+8>>2];Zr(c[z>>2]|0,c[A>>2]|0,(c[E+436>>2]|0)-(c[A>>2]|0)|0,c[u>>2]|0)}do if(c[E+8>>2]|0){if((c[D>>2]|0)==0?(d[(c[G>>2]|0)+69>>0]|0)==0:0){B=39;break}Tq(c[E+8>>2]|0)|0}else B=39;while(0);if((B|0)==39)c[c[v>>2]>>2]=c[E+8>>2];b=c[G>>2]|0;e=c[D>>2]|0;if(c[C>>2]|0){c[H>>2]=c[C>>2];vk(b,e,18130,H);Hd(c[G>>2]|0,c[C>>2]|0)}else wk(b,e);while(1){if(!(c[E+468>>2]|0))break;c[F>>2]=c[E+468>>2];c[E+468>>2]=c[(c[F>>2]|0)+4>>2];Hd(c[G>>2]|0,c[F>>2]|0)}Ak(E);G=c[G>>2]|0;H=c[D>>2]|0;H=Uq(G,H)|0;c[D>>2]=H;H=c[D>>2]|0;l=I;return H|0}function Ur(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;Ek(c[e>>2]|0);c[b>>2]=fq(c[e>>2]|0,1,1)|0;l=d;return c[b>>2]|0}function Vr(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;z=l;l=l+80|0;g=z+72|0;q=z+16|0;p=z+8|0;o=z;v=z+68|0;w=z+64|0;k=z+60|0;m=z+56|0;x=z+52|0;y=z+48|0;n=z+44|0;h=z+40|0;i=z+36|0;s=z+32|0;j=z+28|0;t=z+24|0;u=z+20|0;c[w>>2]=b;c[k>>2]=e;c[m>>2]=f;c[x>>2]=0;c[i>>2]=-1;c[s>>2]=c[c[w>>2]>>2];c[j>>2]=c[(c[s>>2]|0)+96+4>>2];if(!(c[(c[s>>2]|0)+156>>2]|0))c[(c[s>>2]|0)+248>>2]=0;c[(c[w>>2]|0)+12>>2]=0;c[(c[w>>2]|0)+436>>2]=c[k>>2];c[y>>2]=0;c[n>>2]=bs(182)|0;if(!(c[n>>2]|0)){yd(c[s>>2]|0);c[v>>2]=7;y=c[v>>2]|0;l=z;return y|0}a:while(1){do if(a[(c[k>>2]|0)+(c[y>>2]|0)>>0]|0){c[(c[w>>2]|0)+392>>2]=(c[k>>2]|0)+(c[y>>2]|0);f=yj((c[k>>2]|0)+(c[y>>2]|0)|0,h)|0;c[(c[w>>2]|0)+392+4>>2]=f;c[y>>2]=(c[y>>2]|0)+(c[(c[w>>2]|0)+392+4>>2]|0);if((c[y>>2]|0)>(c[j>>2]|0)){r=7;break a}}else{if((c[i>>2]|0)==1){c[h>>2]=0;break}if(!(c[i>>2]|0))break a;c[h>>2]=1}while(0);if((c[h>>2]|0)>=162){if(c[(c[s>>2]|0)+248>>2]|0){r=14;break}if((c[h>>2]|0)==163){r=16;break}else continue}else{b=c[n>>2]|0;e=c[h>>2]|0;A=(c[w>>2]|0)+392|0;f=c[w>>2]|0;c[g>>2]=c[A>>2];c[g+4>>2]=c[A+4>>2];cs(b,e,g,f);c[i>>2]=c[h>>2];if(c[(c[w>>2]|0)+12>>2]|0)break;if(d[(c[s>>2]|0)+69>>0]|0)break;else continue}}if((r|0)==7)c[(c[w>>2]|0)+12>>2]=18;else if((r|0)==14)c[(c[w>>2]|0)+12>>2]=9;else if((r|0)==16){A=c[w>>2]|0;c[o>>2]=(c[w>>2]|0)+392;Ck(A,22178,o)}c[(c[w>>2]|0)+436>>2]=(c[k>>2]|0)+(c[y>>2]|0);ds(c[n>>2]|0,148);if(a[(c[s>>2]|0)+69>>0]|0)c[(c[w>>2]|0)+12>>2]=7;if((c[(c[w>>2]|0)+12>>2]|0?(c[(c[w>>2]|0)+12>>2]|0)!=101:0)?(c[(c[w>>2]|0)+4>>2]|0)==0:0){A=c[s>>2]|0;c[p>>2]=Ci(c[(c[w>>2]|0)+12>>2]|0)|0;A=Bj(A,18130,p)|0;c[(c[w>>2]|0)+4>>2]=A}if(c[(c[w>>2]|0)+4>>2]|0){c[c[m>>2]>>2]=c[(c[w>>2]|0)+4>>2];A=c[(c[w>>2]|0)+12>>2]|0;c[q>>2]=c[c[m>>2]>>2];hd(A,18130,q);c[(c[w>>2]|0)+4>>2]=0;c[x>>2]=(c[x>>2]|0)+1}if((c[(c[w>>2]|0)+8>>2]|0?(c[(c[w>>2]|0)+36>>2]|0)>0:0)?(d[(c[w>>2]|0)+18>>0]|0)==0:0){Yq(c[(c[w>>2]|0)+8>>2]|0);c[(c[w>>2]|0)+8>>2]=0}if(!(d[(c[w>>2]|0)+18>>0]|0)){Hd(c[s>>2]|0,c[(c[w>>2]|0)+116>>2]|0);c[(c[w>>2]|0)+116>>2]=0;c[(c[w>>2]|0)+112>>2]=0}Kd(c[(c[w>>2]|0)+460>>2]|0);if(!(a[(c[w>>2]|0)+410>>0]|0))Jj(c[s>>2]|0,c[(c[w>>2]|0)+440>>2]|0);if(c[(c[w>>2]|0)+476>>2]|0)gk(c[s>>2]|0,c[(c[w>>2]|0)+476>>2]|0);Ij(c[s>>2]|0,c[(c[w>>2]|0)+444>>2]|0);c[y>>2]=(c[(c[w>>2]|0)+404>>2]|0)-1;while(1){g=c[s>>2]|0;b=c[(c[w>>2]|0)+428>>2]|0;if((c[y>>2]|0)<0)break;Hd(g,c[b+(c[y>>2]<<2)>>2]|0);c[y>>2]=(c[y>>2]|0)+-1}Hd(g,b);while(1){if(!(c[(c[w>>2]|0)+120>>2]|0))break;c[t>>2]=c[(c[w>>2]|0)+120>>2];c[(c[w>>2]|0)+120>>2]=c[c[t>>2]>>2];Hd(c[s>>2]|0,c[t>>2]|0)}while(1){if(!(c[(c[w>>2]|0)+464>>2]|0))break;c[u>>2]=c[(c[w>>2]|0)+464>>2];c[(c[w>>2]|0)+464>>2]=c[(c[u>>2]|0)+68>>2];Jj(c[s>>2]|0,c[u>>2]|0)}c[v>>2]=c[x>>2];A=c[v>>2]|0;l=z;return A|0}function Wr(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;b=j+24|0;d=j+20|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[b>>2]=a;c[d>>2]=c[c[b>>2]>>2];c[e>>2]=0;while(1){if((c[e>>2]|0)>=(c[(c[d>>2]|0)+20>>2]|0)){a=14;break}c[h>>2]=0;c[i>>2]=c[(c[(c[d>>2]|0)+16>>2]|0)+(c[e>>2]<<4)+4>>2];if(c[i>>2]|0){if(!(xk(c[i>>2]|0)|0)){c[f>>2]=Ro(c[i>>2]|0,0)|0;if((c[f>>2]|0)==7|(c[f>>2]|0)==3082)yd(c[d>>2]|0);if(c[f>>2]|0){a=14;break}c[h>>2]=1}To(c[i>>2]|0,1,g);if((c[g>>2]|0)!=(c[c[(c[(c[d>>2]|0)+16>>2]|0)+(c[e>>2]<<4)+12>>2]>>2]|0)){$r(c[d>>2]|0,c[e>>2]|0);c[(c[b>>2]|0)+12>>2]=17}if(c[h>>2]|0)as(c[i>>2]|0)|0}c[e>>2]=(c[e>>2]|0)+1}if((a|0)==14){l=j;return}}function Xr(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;f=h+16|0;j=h+12|0;g=h+4|0;i=h;c[f>>2]=a;c[j>>2]=d;c[i>>2]=c[c[f>>2]>>2];Lj(c[(c[f>>2]|0)+100>>2]|0,(e[(c[f>>2]|0)+140>>1]|0)<<1);Hd(c[i>>2]|0,c[(c[f>>2]|0)+100>>2]|0);c[g>>2]=c[j>>2]<<1;b[(c[f>>2]|0)+140>>1]=c[j>>2];d=od(c[i>>2]|0,(c[g>>2]|0)*40|0,0)|0;c[h+8>>2]=d;c[(c[f>>2]|0)+100>>2]=d;if(!(c[(c[f>>2]|0)+100>>2]|0)){l=h;return}_r(c[(c[f>>2]|0)+100>>2]|0,c[g>>2]|0,c[c[f>>2]>>2]|0,1);l=h;return}function Yr(b,d,f,g,h){b=b|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+32|0;m=r+28|0;n=r+24|0;o=r+20|0;p=r+16|0;q=r+12|0;i=r+8|0;j=r+4|0;k=r;c[n>>2]=b;c[o>>2]=d;c[p>>2]=f;c[q>>2]=g;c[i>>2]=h;if(a[(c[c[n>>2]>>2]|0)+69>>0]|0){c[m>>2]=7;q=c[m>>2]|0;l=r;return q|0}else{c[k>>2]=(c[(c[n>>2]|0)+100>>2]|0)+(((c[o>>2]|0)+(O(c[p>>2]|0,e[(c[n>>2]|0)+140>>1]|0)|0)|0)*40|0);c[j>>2]=Jh(c[k>>2]|0,c[q>>2]|0,-1,1,c[i>>2]|0)|0;c[m>>2]=c[j>>2];q=c[m>>2]|0;l=r;return q|0}return 0}function Zr(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=a;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;if(!(c[g>>2]|0)){l=k;return}i=c[i>>2]|0;i=zj(c[c[g>>2]>>2]|0,c[h>>2]|0,i,((i|0)<0)<<31>>31)|0;c[(c[g>>2]|0)+176>>2]=i;i=(c[g>>2]|0)+144|0;b[i>>1]=b[i>>1]&-513|(c[j>>2]&1)<<9&65535;l=k;return}function _r(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+8|0;h=k+4|0;i=k;j=k+12|0;c[g>>2]=a;c[h>>2]=d;c[i>>2]=e;b[j>>1]=f;while(1){f=c[h>>2]|0;c[h>>2]=f+-1;if((f|0)<=0)break;c[(c[g>>2]|0)+32>>2]=c[i>>2];b[(c[g>>2]|0)+8>>1]=b[j>>1]|0;c[(c[g>>2]|0)+24>>2]=0;c[g>>2]=(c[g>>2]|0)+40}l=k;return}function $r(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;d=f+8|0;g=f+4|0;e=f;c[d>>2]=a;c[g>>2]=b;c[e>>2]=(c[(c[d>>2]|0)+16>>2]|0)+(c[g>>2]<<4);Yp(c[(c[e>>2]|0)+12>>2]|0);if((c[g>>2]|0)==1){l=f;return}c[e>>2]=(c[(c[d>>2]|0)+16>>2]|0)+16;Yp(c[(c[e>>2]|0)+12>>2]|0);l=f;return}function as(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;Ek(c[b>>2]|0);c[d>>2]=ep(c[b>>2]|0,0)|0;if(c[d>>2]|0){d=c[d>>2]|0;l=e;return d|0}c[d>>2]=dp(c[b>>2]|0,0)|0;d=c[d>>2]|0;l=e;return d|0}function bs(d){d=d|0;var e=0,f=0,g=0;f=l;l=l+16|0;g=f+4|0;e=f;c[g>>2]=d;c[e>>2]=yb[c[g>>2]&255](1608,0)|0;if(!(c[e>>2]|0)){g=c[e>>2]|0;l=f;return g|0}c[c[e>>2]>>2]=(c[e>>2]|0)+8;b[(c[e>>2]|0)+8>>1]=0;a[(c[e>>2]|0)+8+2>>0]=0;g=c[e>>2]|0;l=f;return g|0}function cs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+48|0;f=k+32|0;n=k+28|0;g=k+24|0;m=k+20|0;h=k+8|0;i=k+4|0;j=k;c[n>>2]=a;c[g>>2]=b;c[m>>2]=e;c[j>>2]=c[n>>2];c[(c[j>>2]|0)+4>>2]=c[m>>2];while(1){c[i>>2]=gs(c[j>>2]|0,c[g>>2]&255)|0;do if((c[i>>2]|0)>>>0>999)if((c[i>>2]|0)>>>0<=1331){is(c[j>>2]|0,(c[i>>2]|0)-1e3|0);break}else{c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];m=c[j>>2]|0;n=c[g>>2]|0;c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];js(m,n,f);fs(c[j>>2]|0,c[g>>2]&255,h);c[g>>2]=252;break}else{e=c[j>>2]|0;m=c[i>>2]|0;n=c[g>>2]|0;c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];hs(e,m,n,f);c[g>>2]=252}while(0);if((c[g>>2]|0)==252){f=9;break}if((c[c[j>>2]>>2]|0)>>>0<=((c[j>>2]|0)+8|0)>>>0){f=9;break}}if((f|0)==9){l=k;return}}function ds(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=l;l=l+16|0;g=f+8|0;d=f+4|0;e=f;c[g>>2]=a;c[d>>2]=b;c[e>>2]=c[g>>2];while(1){if((c[c[e>>2]>>2]|0)>>>0<=((c[e>>2]|0)+8|0)>>>0)break;es(c[e>>2]|0)}qb[c[d>>2]&255](c[e>>2]|0);l=f;return}function es(b){b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=b;g=c[f>>2]|0;b=c[g>>2]|0;c[g>>2]=b+-16;c[e>>2]=b;fs(c[f>>2]|0,a[(c[e>>2]|0)+2>>0]|0,(c[e>>2]|0)+4|0);l=d;return}function fs(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=l;l=l+16|0;k=i+8|0;j=i+12|0;g=i+4|0;h=i;c[k>>2]=b;a[j>>0]=e;c[g>>2]=f;c[h>>2]=c[(c[k>>2]|0)+4>>2];do switch(d[j>>0]|0|0){case 206:case 195:case 194:case 163:{Zj(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 173:case 172:{ck(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 226:case 224:case 218:case 209:case 208:case 207:case 204:case 202:case 199:case 187:case 186:case 177:{_j(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 212:case 211:case 200:case 193:{fk(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 250:case 196:{gk(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 241:case 236:case 227:case 225:case 215:case 203:case 201:{ck(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 220:case 217:case 216:{hk(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 237:case 232:{qk(c[c[h>>2]>>2]|0,c[c[g>>2]>>2]|0);l=i;return}case 234:{hk(c[c[h>>2]>>2]|0,c[(c[g>>2]|0)+4>>2]|0);l=i;return}default:{l=i;return}}while(0)}function gs(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+32|0;h=p+16|0;q=p+12|0;i=p+21|0;j=p+8|0;k=p+4|0;m=p+20|0;n=p;c[q>>2]=f;a[i>>0]=g;c[k>>2]=e[c[c[q>>2]>>2]>>1];if((c[k>>2]|0)>=1e3){c[h>>2]=c[k>>2];q=c[h>>2]|0;l=p;return q|0}while(1){c[j>>2]=b[12950+(c[k>>2]<<1)>>1];c[j>>2]=(c[j>>2]|0)+(d[i>>0]|0);if(!((c[j>>2]|0)<0|(c[j>>2]|0)>=1567)?(d[33946+(c[j>>2]|0)>>0]|0)==(d[i>>0]|0):0){o=13;break}if((d[i>>0]|0)>>>0>=96)break;q=a[35513+(d[i>>0]|0)>>0]|0;a[m>>0]=q;if(!(q&255))break;a[i>>0]=a[m>>0]|0}if((o|0)==13){c[h>>2]=e[9786+(c[j>>2]<<1)>>1];q=c[h>>2]|0;l=p;return q|0}c[n>>2]=(c[j>>2]|0)-(d[i>>0]|0)+96;if(((c[n>>2]|0)<1567?(d[33946+(c[n>>2]|0)>>0]|0)==96:0)?(d[i>>0]|0)>0:0){c[h>>2]=e[9786+(c[n>>2]<<1)>>1];q=c[h>>2]|0;l=p;return q|0}c[h>>2]=e[13862+(c[k>>2]<<1)>>1];q=c[h>>2]|0;l=p;return q|0}function hs(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;f=c[h>>2]|0;c[f>>2]=(c[f>>2]|0)+16;if((c[c[h>>2]>>2]|0)>>>0>=((c[h>>2]|0)+8+1600|0)>>>0){ks(c[h>>2]|0);l=m;return}if((c[i>>2]|0)>455)c[i>>2]=(c[i>>2]|0)+332;c[k>>2]=c[c[h>>2]>>2];b[c[k>>2]>>1]=c[i>>2];a[(c[k>>2]|0)+2>>0]=c[j>>2];k=(c[k>>2]|0)+4|0;c[k>>2]=c[g>>2];c[k+4>>2]=c[g+4>>2];l=m;return}function is(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;fa=l;l=l+288|0;h=fa+280|0;X=fa+40|0;W=fa+32|0;V=fa+24|0;U=fa+16|0;Z=fa+8|0;T=fa;$=fa+276|0;aa=fa+272|0;ba=fa+268|0;ca=fa+264|0;da=fa+260|0;ea=fa+256|0;_=fa+252|0;S=fa+240|0;i=fa+228|0;j=fa+216|0;k=fa+192|0;m=fa+188|0;n=fa+184|0;o=fa+180|0;p=fa+176|0;q=fa+168|0;r=fa+164|0;s=fa+160|0;t=fa+156|0;u=fa+152|0;v=fa+148|0;w=fa+144|0;x=fa+140|0;y=fa+136|0;z=fa+132|0;A=fa+128|0;B=fa+124|0;C=fa+120|0;D=fa+116|0;E=fa+112|0;F=fa+108|0;G=fa+104|0;Y=fa+96|0;H=fa+92|0;I=fa+88|0;J=fa+84|0;K=fa+80|0;L=fa+76|0;M=fa+72|0;N=fa+68|0;O=fa+64|0;P=fa+60|0;Q=fa+56|0;R=fa+48|0;c[$>>2]=f;c[aa>>2]=g;c[_>>2]=c[(c[$>>2]|0)+4>>2];c[da>>2]=c[c[$>>2]>>2];if((d[22227+(c[aa>>2]<<1)+1>>0]|0)==0?(c[c[$>>2]>>2]|0)>>>0>=((c[$>>2]|0)+8+1584|0)>>>0:0){ks(c[$>>2]|0);l=fa;return}a:do switch(c[aa>>2]|0){case 0:{a[(c[_>>2]|0)+409>>0]=1;break}case 1:{a[(c[_>>2]|0)+409>>0]=2;break}case 2:{ls(c[_>>2]|0);break}case 3:{ms(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 4:{c[(c[da>>2]|0)+16+4>>2]=7;break}case 7:case 6:case 5:{c[(c[da>>2]|0)+4>>2]=d[(c[da>>2]|0)+2>>0];break}case 9:case 8:{ns(c[_>>2]|0);break}case 10:{os(c[_>>2]|0);break}case 11:{ps(c[_>>2]|0,0,(c[da>>2]|0)+4|0);break}case 12:{ps(c[_>>2]|0,1,(c[da>>2]|0)+4|0);break}case 13:{ps(c[_>>2]|0,2,(c[da>>2]|0)+4|0);break}case 14:{qs(c[_>>2]|0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0,c[(c[da>>2]|0)+-64+4>>2]|0,0,0,c[(c[da>>2]|0)+-32+4>>2]|0);break}case 15:{rs(c[_>>2]|0);break}case 215:case 90:case 76:case 67:case 57:case 42:case 22:case 19:case 16:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 17:{c[(c[da>>2]|0)+-32+4>>2]=1;break}case 43:case 18:{c[(c[da>>2]|0)+4>>2]=1;break}case 20:{ss(c[_>>2]|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+-16+4|0,c[(c[da>>2]|0)+4>>2]&255,0);break}case 21:{ss(c[_>>2]|0,0,0,0,c[(c[da>>2]|0)+4>>2]|0);Zj(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 23:{if((c[(c[da>>2]|0)+4+4>>2]|0)==5?(Zc(c[(c[da>>2]|0)+4>>2]|0,22891,5)|0)==0:0){c[(c[da>>2]|0)+-16+4>>2]=96;break a}c[(c[da>>2]|0)+-16+4>>2]=0;_=c[_>>2]|0;Z=c[(c[da>>2]|0)+4>>2]|0;c[T>>2]=c[(c[da>>2]|0)+4+4>>2];c[T+4>>2]=Z;Ck(_,22897,T);break}case 24:{ts(c[_>>2]|0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0);break}case 96:case 60:case 25:{c[(c[da>>2]|0)+16+4+4>>2]=0;c[(c[da>>2]|0)+16+4>>2]=0;break}case 26:{c[(c[da>>2]|0)+-48+4+4>>2]=(c[(c[da>>2]|0)+4>>2]|0)+(c[(c[da>>2]|0)+4+4>>2]|0)-(c[(c[da>>2]|0)+-48+4>>2]|0);break}case 27:{c[(c[da>>2]|0)+-80+4+4>>2]=(c[(c[da>>2]|0)+4>>2]|0)+(c[(c[da>>2]|0)+4+4>>2]|0)-(c[(c[da>>2]|0)+-80+4>>2]|0);break}case 28:{c[(c[da>>2]|0)+-16+4+4>>2]=(c[(c[da>>2]|0)+4+4>>2]|0)+((c[(c[da>>2]|0)+4>>2]|0)-(c[(c[da>>2]|0)+-16+4>>2]|0));break}case 62:case 29:{_=(c[_>>2]|0)+84|0;Z=(c[da>>2]|0)+4|0;c[_>>2]=c[Z>>2];c[_+4>>2]=c[Z+4>>2];break}case 32:case 30:{us(c[_>>2]|0,(c[da>>2]|0)+4|0);break}case 31:{us(c[_>>2]|0,(c[da>>2]|0)+-16+4|0);break}case 33:{c[i>>2]=vs(c[_>>2]|0,155,c[(c[da>>2]|0)+4>>2]|0,0,0)|0;c[i+4>>2]=c[(c[da>>2]|0)+-16+4>>2];c[i+8>>2]=c[(c[da>>2]|0)+4+8>>2];us(c[_>>2]|0,i);break}case 34:{Z=c[_>>2]|0;Y=(c[da>>2]|0)+4|0;c[h>>2]=c[Y>>2];c[h+4>>2]=c[Y+4>>2];ws(j,Z,97,h);us(c[_>>2]|0,j);break}case 35:{xs(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 36:{ys(c[_>>2]|0,0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0);break}case 37:{zs(c[_>>2]|0,0,0,0,0,c[(c[da>>2]|0)+4>>2]|0,0,0,0,0,1);break}case 38:{As(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 39:{Bs(c[_>>2]|0,0,(c[da>>2]|0)+-32+4|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 40:{Cs(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 41:{Ds(c[_>>2]|0,(c[da>>2]|0)+4|0);break}case 44:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 45:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+-16+4>>2]&~c[(c[da>>2]|0)+4+4>>2]|c[(c[da>>2]|0)+4>>2];break}case 46:{c[(c[da>>2]|0)+-16+4>>2]=0;c[(c[da>>2]|0)+-16+4+4>>2]=0;break}case 47:{c[(c[da>>2]|0)+-32+4>>2]=0;c[(c[da>>2]|0)+-32+4+4>>2]=0;break}case 48:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+4>>2];c[(c[da>>2]|0)+-32+4+4>>2]=255;break}case 49:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+4>>2]<<8;c[(c[da>>2]|0)+-32+4+4>>2]=65280;break}case 50:{c[(c[da>>2]|0)+-16+4>>2]=7;break}case 51:{c[(c[da>>2]|0)+-16+4>>2]=8;break}case 52:{c[(c[da>>2]|0)+4>>2]=9;break}case 53:{c[(c[da>>2]|0)+4>>2]=6;break}case 54:{c[(c[da>>2]|0)+-16+4>>2]=0;break}case 55:{c[(c[da>>2]|0)+-32+4>>2]=0;break}case 144:case 71:case 56:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 216:case 190:case 187:case 75:case 58:{c[(c[da>>2]|0)+-16+4>>2]=1;break}case 59:{c[(c[da>>2]|0)+-16+4>>2]=0;break}case 61:{c[(c[_>>2]|0)+84+4>>2]=0;break}case 63:{ys(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,0);break}case 64:{zs(c[_>>2]|0,0,0,0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,0,0,0,0,1);break}case 65:{As(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0);break}case 66:{Bs(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,(c[da>>2]|0)+-48+4|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);Cs(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 70:case 68:{c[(c[da>>2]|0)+16+4>>2]=10;break}case 69:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 72:{c[(c[da>>2]|0)+4>>2]=4;break}case 145:case 73:{c[(c[da>>2]|0)+4>>2]=5;break}case 74:{Es(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,0,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 77:{Fs(c[_>>2]|0,(c[da>>2]|0)+-128+4|0,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+-48+4|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-112+4>>2]|0,c[(c[da>>2]|0)+-80+4>>2]|0);break}case 78:{Es(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,1,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 79:{c[k>>2]=c[1038];c[k+4>>2]=c[1039];c[k+8>>2]=c[1040];c[k+12>>2]=c[1041];c[k+16>>2]=c[1042];c[k+20>>2]=c[1043];Gs(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,k)|0;Zj(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 80:{c[m>>2]=c[(c[da>>2]|0)+4>>2];if(c[m>>2]|0){c[(c[m>>2]|0)+64>>2]=c[(c[da>>2]|0)+-16+4>>2];Hs(c[_>>2]|0,c[m>>2]|0)}else gk(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);c[(c[da>>2]|0)+-16+4>>2]=c[m>>2];break}case 81:{c[n>>2]=c[(c[da>>2]|0)+4>>2];c[o>>2]=c[(c[da>>2]|0)+-32+4>>2];if(c[n>>2]|0?c[(c[n>>2]|0)+48>>2]|0:0){c[q+4>>2]=0;Hs(c[_>>2]|0,c[n>>2]|0);c[p>>2]=Is(c[_>>2]|0,0,0,0,q,c[n>>2]|0,0,0)|0;c[n>>2]=Js(c[_>>2]|0,0,c[p>>2]|0,0,0,0,0,0,0,0)|0}if(c[n>>2]|0){a[(c[n>>2]|0)+4>>0]=c[(c[da>>2]|0)+-16+4>>2];c[(c[n>>2]|0)+48>>2]=c[o>>2];if(c[o>>2]|0){Z=(c[o>>2]|0)+8|0;c[Z>>2]=c[Z>>2]&-1025}Z=(c[n>>2]|0)+8|0;c[Z>>2]=c[Z>>2]&-1025;if((c[(c[da>>2]|0)+-16+4>>2]|0)!=116)a[(c[_>>2]|0)+22>>0]=1}else Zj(c[c[_>>2]>>2]|0,c[o>>2]|0);c[(c[da>>2]|0)+-32+4>>2]=c[n>>2];break}case 84:case 82:{c[(c[da>>2]|0)+4>>2]=d[(c[da>>2]|0)+2>>0];break}case 83:{c[(c[da>>2]|0)+-16+4>>2]=116;break}case 85:{_=Js(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,c[(c[da>>2]|0)+-80+4>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+-112+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+4+4>>2]|0)|0;c[(c[da>>2]|0)+-128+4>>2]=_;break}case 86:{_=Js(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,0,0,0,0,0,512,0,0)|0;c[(c[da>>2]|0)+-48+4>>2]=_;break}case 87:{c[s>>2]=c[(c[da>>2]|0)+-64+4>>2];c[r>>2]=Js(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,0,0,0,0,0,1536,0,0)|0;if(c[s>>2]|0){_=(c[s>>2]|0)+8|0;c[_>>2]=c[_>>2]&-1025}if(c[r>>2]|0){a[(c[r>>2]|0)+4>>0]=116;c[(c[r>>2]|0)+48>>2]=c[s>>2];h=c[r>>2]|0;f=c[da>>2]|0}else{h=c[s>>2]|0;f=c[da>>2]|0}c[f+-64+4>>2]=h;break}case 88:{c[(c[da>>2]|0)+4>>2]=1;break}case 89:{c[(c[da>>2]|0)+4>>2]=2;break}case 211:case 206:case 203:case 126:case 119:case 91:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 92:{Z=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;c[(c[da>>2]|0)+-32+4>>2]=Z;if((c[(c[da>>2]|0)+4+4>>2]|0)>>>0>0)Ls(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,(c[da>>2]|0)+4|0,1);Ms(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,(c[da>>2]|0)+-16+4|0);break}case 93:{c[t>>2]=Ns(c[c[_>>2]>>2]|0,160,0)|0;_=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[t>>2]|0)|0;c[(c[da>>2]|0)+-16+4>>2]=_;break}case 94:{c[u>>2]=vs(c[_>>2]|0,160,0,0,0)|0;c[v>>2]=vs(c[_>>2]|0,55,0,0,(c[da>>2]|0)+-32+4|0)|0;c[w>>2]=vs(c[_>>2]|0,122,c[v>>2]|0,c[u>>2]|0,0)|0;_=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[w>>2]|0)|0;c[(c[da>>2]|0)+-48+4>>2]=_;break}case 226:case 225:case 106:case 95:{_=(c[da>>2]|0)+-16+4|0;Z=(c[da>>2]|0)+4|0;c[_>>2]=c[Z>>2];c[_+4>>2]=c[Z+4>>2];break}case 97:{_=jl(c[c[_>>2]>>2]|0,80,0)|0;c[(c[da>>2]|0)+16+4>>2]=_;break}case 98:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+4>>2];Os(c[(c[da>>2]|0)+-16+4>>2]|0);break}case 99:{if(c[(c[da>>2]|0)+-16+4>>2]|0?(c[c[(c[da>>2]|0)+-16+4>>2]>>2]|0)>0:0)a[(c[(c[da>>2]|0)+-16+4>>2]|0)+8+(((c[c[(c[da>>2]|0)+-16+4>>2]>>2]|0)-1|0)*72|0)+36>>0]=c[(c[da>>2]|0)+4>>2];break}case 100:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 101:{Z=Is(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,(c[da>>2]|0)+-80+4|0,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+-48+4|0,0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-96+4>>2]=Z;Ps(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,(c[da>>2]|0)+-32+4|0);break}case 102:{Z=Is(c[_>>2]|0,c[(c[da>>2]|0)+-128+4>>2]|0,(c[da>>2]|0)+-112+4|0,(c[da>>2]|0)+-96+4|0,(c[da>>2]|0)+-32+4|0,0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-128+4>>2]=Z;Qs(c[_>>2]|0,c[(c[da>>2]|0)+-128+4>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0);break}case 103:{_=Is(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,0,0,(c[da>>2]|0)+-32+4|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-96+4>>2]=_;break}case 104:{if((((c[(c[da>>2]|0)+-96+4>>2]|0)==0?(c[(c[da>>2]|0)+-32+4+4>>2]|0)==0:0)?(c[(c[da>>2]|0)+-16+4>>2]|0)==0:0)?(c[(c[da>>2]|0)+4>>2]|0)==0:0){c[(c[da>>2]|0)+-96+4>>2]=c[(c[da>>2]|0)+-64+4>>2];break a}if((c[c[(c[da>>2]|0)+-64+4>>2]>>2]|0)!=1){Os(c[(c[da>>2]|0)+-64+4>>2]|0);c[z>>2]=Js(c[_>>2]|0,0,c[(c[da>>2]|0)+-64+4>>2]|0,0,0,0,0,2048,0,0)|0;_=Is(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,0,0,(c[da>>2]|0)+-32+4|0,c[z>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-96+4>>2]=_;break a}Z=Is(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,0,0,(c[da>>2]|0)+-32+4|0,0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-96+4>>2]=Z;if(c[(c[da>>2]|0)+-96+4>>2]|0){c[x>>2]=(c[(c[da>>2]|0)+-96+4>>2]|0)+8+(((c[c[(c[da>>2]|0)+-96+4>>2]>>2]|0)-1|0)*72|0);c[y>>2]=(c[(c[da>>2]|0)+-64+4>>2]|0)+8;c[(c[x>>2]|0)+8>>2]=c[(c[y>>2]|0)+8>>2];c[(c[x>>2]|0)+4>>2]=c[(c[y>>2]|0)+4>>2];c[(c[x>>2]|0)+20>>2]=c[(c[y>>2]|0)+20>>2];c[(c[y>>2]|0)+4>>2]=0;c[(c[y>>2]|0)+8>>2]=0;c[(c[y>>2]|0)+20>>2]=0}fk(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0);break}case 114:case 105:{c[(c[da>>2]|0)+16+4>>2]=0;c[(c[da>>2]|0)+16+4+4>>2]=0;break}case 107:{_=Rs(c[c[_>>2]>>2]|0,0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0)|0;c[(c[da>>2]|0)+-16+4>>2]=_;break}case 108:{c[(c[da>>2]|0)+4>>2]=1;break}case 109:{_=Ss(c[_>>2]|0,(c[da>>2]|0)+-16+4|0,0,0)|0;c[(c[da>>2]|0)+-16+4>>2]=_;break}case 110:{_=Ss(c[_>>2]|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+-16+4|0,0)|0;c[(c[da>>2]|0)+-32+4>>2]=_;break}case 111:{_=Ss(c[_>>2]|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+-16+4|0)|0;c[(c[da>>2]|0)+-48+4>>2]=_;break}case 199:case 136:case 129:case 112:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 202:case 200:case 135:case 128:case 113:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 115:{_=(c[da>>2]|0)+-32+4|0;Z=(c[da>>2]|0)+4|0;c[_>>2]=c[Z>>2];c[_+4>>2]=c[Z+4>>2];break}case 116:{c[(c[da>>2]|0)+-16+4>>2]=0;c[(c[da>>2]|0)+-16+4+4>>2]=1;break}case 117:{c[(c[da>>2]|0)+-48+4>>2]=c[(c[da>>2]|0)+-16+4>>2];break}case 146:case 118:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 127:case 120:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 121:{_=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;c[(c[da>>2]|0)+-48+4>>2]=_;Ts(c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 122:{_=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;c[(c[da>>2]|0)+-16+4>>2]=_;Ts(c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 123:{c[(c[da>>2]|0)+4>>2]=0;break}case 124:{c[(c[da>>2]|0)+4>>2]=1;break}case 125:{c[(c[da>>2]|0)+16+4>>2]=-1;break}case 130:{c[(c[da>>2]|0)+16+4>>2]=0;c[(c[da>>2]|0)+16+4+4>>2]=0;break}case 131:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+4>>2];c[(c[da>>2]|0)+-16+4+4>>2]=0;break}case 132:{c[(c[da>>2]|0)+-48+4>>2]=c[(c[da>>2]|0)+-32+4>>2];c[(c[da>>2]|0)+-48+4+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 133:{c[(c[da>>2]|0)+-48+4+4>>2]=c[(c[da>>2]|0)+-32+4>>2];c[(c[da>>2]|0)+-48+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 134:{Us(c[_>>2]|0,c[(c[da>>2]|0)+-80+4>>2]|0,1);Ps(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,(c[da>>2]|0)+-16+4|0);Vs(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 137:{Us(c[_>>2]|0,c[(c[da>>2]|0)+-112+4>>2]|0,1);Ps(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,(c[da>>2]|0)+-48+4|0);Ws(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,22924);Xs(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-80+4>>2]|0);break}case 138:{Z=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-64+4>>2]=Z;Ls(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,(c[da>>2]|0)+-32+4|0,1);break}case 139:{_=Ys(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-96+4>>2]=_;break}case 140:{c[S>>2]=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+4>>2]|0)|0;Ls(c[_>>2]|0,c[S>>2]|0,(c[da>>2]|0)+-32+4|0,1);c[(c[da>>2]|0)+-32+4>>2]=c[S>>2];break}case 141:{_=Ys(c[_>>2]|0,0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-64+4>>2]=_;break}case 142:{Us(c[_>>2]|0,c[(c[da>>2]|0)+-80+4>>2]|0,1);Zs(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0);break}case 143:{Us(c[_>>2]|0,c[(c[da>>2]|0)+-96+4>>2]|0,1);Zs(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+-80+4>>2]|0);break}case 147:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+-16+4>>2];break}case 148:{_=_s(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,(c[da>>2]|0)+4|0)|0;c[(c[da>>2]|0)+-32+4>>2]=_;break}case 149:{_=_s(c[c[_>>2]>>2]|0,0,(c[da>>2]|0)+4|0)|0;c[(c[da>>2]|0)+4>>2]=_;break}case 150:{$s((c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0);c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+-16+4>>2];break}case 157:case 156:case 151:{Y=(c[da>>2]|0)+4|0;Z=c[_>>2]|0;_=d[(c[da>>2]|0)+2>>0]|0;X=(c[da>>2]|0)+4|0;c[h>>2]=c[X>>2];c[h+4>>2]=c[X+4>>2];ws(Y,Z,_,h);break}case 153:case 152:{Z=(c[da>>2]|0)+4|0;_=c[_>>2]|0;Y=(c[da>>2]|0)+4|0;c[h>>2]=c[Y>>2];c[h+4>>2]=c[Y+4>>2];ws(Z,_,55,h);break}case 154:{c[A>>2]=at(c[c[_>>2]>>2]|0,55,(c[da>>2]|0)+-32+4|0,1)|0;c[B>>2]=at(c[c[_>>2]>>2]|0,55,(c[da>>2]|0)+4|0,1)|0;$s((c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0);_=vs(c[_>>2]|0,122,c[A>>2]|0,c[B>>2]|0,0)|0;c[(c[da>>2]|0)+-32+4>>2]=_;break}case 155:{c[C>>2]=at(c[c[_>>2]>>2]|0,55,(c[da>>2]|0)+-64+4|0,1)|0;c[D>>2]=at(c[c[_>>2]>>2]|0,55,(c[da>>2]|0)+-32+4|0,1)|0;c[E>>2]=at(c[c[_>>2]>>2]|0,55,(c[da>>2]|0)+4|0,1)|0;c[F>>2]=vs(c[_>>2]|0,122,c[D>>2]|0,c[E>>2]|0,0)|0;$s((c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+4|0);_=vs(c[_>>2]|0,122,c[C>>2]|0,c[F>>2]|0,0)|0;c[(c[da>>2]|0)+-64+4>>2]=_;break}case 158:{c[S>>2]=at(c[c[_>>2]>>2]|0,134,(c[da>>2]|0)+4|0,1)|0;c[S+4>>2]=c[(c[da>>2]|0)+4>>2];c[S+8>>2]=(c[(c[da>>2]|0)+4>>2]|0)+(c[(c[da>>2]|0)+4+4>>2]|0);if(c[S>>2]|0){_=(c[S>>2]|0)+4|0;c[_>>2]=c[_>>2]|8388608}_=(c[da>>2]|0)+4|0;c[_>>2]=c[S>>2];c[_+4>>2]=c[S+4>>2];c[_+8>>2]=c[S+8>>2];break}case 159:{if((a[c[(c[da>>2]|0)+4>>2]>>0]|0)==35?d[16965+(d[(c[(c[da>>2]|0)+4>>2]|0)+1>>0]|0)>>0]&4|0:0){h=(c[da>>2]|0)+4|0;c[Y>>2]=c[h>>2];c[Y+4>>2]=c[h+4>>2];$s((c[da>>2]|0)+4|0,Y,Y);h=c[_>>2]|0;if(!(d[(c[_>>2]|0)+18>>0]|0)){c[Z>>2]=Y;Ck(h,22203,Z);c[(c[da>>2]|0)+4>>2]=0;break a}_=vs(h,157,0,0,0)|0;c[(c[da>>2]|0)+4>>2]=_;if(!(c[(c[da>>2]|0)+4>>2]|0))break a;Nf((c[Y>>2]|0)+1|0,(c[(c[da>>2]|0)+4>>2]|0)+28|0)|0;break a}c[G>>2]=c[(c[da>>2]|0)+4+4>>2];Y=(c[da>>2]|0)+4|0;Z=c[_>>2]|0;X=(c[da>>2]|0)+4|0;c[h>>2]=c[X>>2];c[h+4>>2]=c[X+4>>2];ws(Y,Z,135,h);bt(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[G>>2]|0);break}case 160:{_=ct(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,(c[da>>2]|0)+4|0,1)|0;c[(c[da>>2]|0)+-32+4>>2]=_;c[(c[da>>2]|0)+-32+4+8>>2]=(c[(c[da>>2]|0)+4>>2]|0)+(c[(c[da>>2]|0)+4+4>>2]|0);break}case 161:{$s((c[da>>2]|0)+-80+4|0,(c[da>>2]|0)+-80+4|0,(c[da>>2]|0)+4|0);_=vs(c[_>>2]|0,66,c[(c[da>>2]|0)+-48+4>>2]|0,0,(c[da>>2]|0)+-16+4|0)|0;c[(c[da>>2]|0)+-80+4>>2]=_;break}case 162:{if(c[(c[da>>2]|0)+-16+4>>2]|0?(c[c[(c[da>>2]|0)+-16+4>>2]>>2]|0)>(c[(c[c[_>>2]>>2]|0)+96+24>>2]|0):0){Z=c[_>>2]|0;c[U>>2]=(c[da>>2]|0)+-64+4;Ck(Z,22933,U)}c[S>>2]=dt(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,(c[da>>2]|0)+-64+4|0)|0;$s(S,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+4|0);if((c[(c[da>>2]|0)+-32+4>>2]|0)==1?c[S>>2]|0:0){_=(c[S>>2]|0)+4|0;c[_>>2]=c[_>>2]|16}_=(c[da>>2]|0)+-64+4|0;c[_>>2]=c[S>>2];c[_+4>>2]=c[S+4>>2];c[_+8>>2]=c[S+8>>2];break}case 163:{c[S>>2]=dt(c[_>>2]|0,0,(c[da>>2]|0)+-48+4|0)|0;$s(S,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+4|0);_=(c[da>>2]|0)+-48+4|0;c[_>>2]=c[S>>2];c[_+4>>2]=c[S+4>>2];c[_+8>>2]=c[S+8>>2];break}case 164:{c[S>>2]=dt(c[_>>2]|0,0,(c[da>>2]|0)+4|0)|0;$s(S,(c[da>>2]|0)+4|0,(c[da>>2]|0)+4|0);_=(c[da>>2]|0)+4|0;c[_>>2]=c[S>>2];c[_+4>>2]=c[S+4>>2];c[_+8>>2]=c[S+8>>2];break}case 165:{c[H>>2]=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;c[S>>2]=vs(c[_>>2]|0,158,0,0,0)|0;if(c[S>>2]|0){c[(c[S>>2]|0)+20>>2]=c[H>>2];$s(S,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+4|0)}else _j(c[c[_>>2]>>2]|0,c[H>>2]|0);_=(c[da>>2]|0)+-64+4|0;c[_>>2]=c[S>>2];c[_+4>>2]=c[S+4>>2];c[_+8>>2]=c[S+8>>2];break}case 173:case 172:case 171:case 170:case 169:case 168:case 167:case 166:{et(c[_>>2]|0,d[(c[da>>2]|0)+-16+2>>0]|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0);break}case 174:{_=(c[da>>2]|0)+4|0;Z=(c[da>>2]|0)+4|0;c[_>>2]=c[Z>>2];c[_+4>>2]=c[Z+4>>2];break}case 175:{_=(c[da>>2]|0)+-16+4|0;Z=(c[da>>2]|0)+4|0;c[_>>2]=c[Z>>2];c[_+4>>2]=c[Z+4>>2];_=(c[da>>2]|0)+-16+4+4|0;c[_>>2]=c[_>>2]|-2147483648;break}case 176:{c[J>>2]=c[(c[da>>2]|0)+-16+4+4>>2]&-2147483648;Z=(c[da>>2]|0)+-16+4+4|0;c[Z>>2]=c[Z>>2]&2147483647;c[I>>2]=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+4>>2]|0)|0;c[I>>2]=Ks(c[_>>2]|0,c[I>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0)|0;Z=dt(c[_>>2]|0,c[I>>2]|0,(c[da>>2]|0)+-16+4|0)|0;c[(c[da>>2]|0)+-32+4>>2]=Z;ft(c[_>>2]|0,c[J>>2]|0,(c[da>>2]|0)+-32+4|0);c[(c[da>>2]|0)+-32+4+8>>2]=c[(c[da>>2]|0)+4+8>>2];if(c[(c[da>>2]|0)+-32+4>>2]|0){_=(c[(c[da>>2]|0)+-32+4>>2]|0)+4|0;c[_>>2]=c[_>>2]|128}break}case 177:{c[L>>2]=c[(c[da>>2]|0)+-48+4+4>>2]&-2147483648;Z=(c[da>>2]|0)+-48+4+4|0;c[Z>>2]=c[Z>>2]&2147483647;c[K>>2]=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+-32+4>>2]|0)|0;c[K>>2]=Ks(c[_>>2]|0,c[K>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0)|0;c[K>>2]=Ks(c[_>>2]|0,c[K>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;Z=dt(c[_>>2]|0,c[K>>2]|0,(c[da>>2]|0)+-48+4|0)|0;c[(c[da>>2]|0)+-64+4>>2]=Z;ft(c[_>>2]|0,c[L>>2]|0,(c[da>>2]|0)+-64+4|0);c[(c[da>>2]|0)+-64+4+8>>2]=c[(c[da>>2]|0)+4+8>>2];if(c[(c[da>>2]|0)+-64+4>>2]|0){_=(c[(c[da>>2]|0)+-64+4>>2]|0)+4|0;c[_>>2]=c[_>>2]|128}break}case 178:{gt(c[_>>2]|0,d[(c[da>>2]|0)+2>>0]|0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0);break}case 179:{gt(c[_>>2]|0,35,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0);break}case 180:{et(c[_>>2]|0,29,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0);ht(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,34);break}case 181:{et(c[_>>2]|0,148,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+4|0);ht(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,35);break}case 183:case 182:{it((c[da>>2]|0)+-16+4|0,c[_>>2]|0,d[(c[da>>2]|0)+-16+2>>0]|0,(c[da>>2]|0)+4|0,(c[da>>2]|0)+-16+4|0);break}case 184:{it((c[da>>2]|0)+-16+4|0,c[_>>2]|0,155,(c[da>>2]|0)+4|0,(c[da>>2]|0)+-16+4|0);break}case 185:{it((c[da>>2]|0)+-16+4|0,c[_>>2]|0,156,(c[da>>2]|0)+4|0,(c[da>>2]|0)+-16+4|0);break}case 189:case 186:{c[(c[da>>2]|0)+4>>2]=0;break}case 188:{c[M>>2]=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+-32+4>>2]|0)|0;c[M>>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0,c[(c[da>>2]|0)+-48+4>>2]|0,(c[da>>2]|0)+-64+4|0);h=c[da>>2]|0;if(c[(c[da>>2]|0)+-16+4>>2]|0){f=(c[da>>2]|0)+-16|0;h=c[h+-16+4>>2]|0}else{f=(c[da>>2]|0)+-32|0;h=c[h+-32+4>>2]|0}c[(c[da>>2]|0)+-64+4+8>>2]=h+(c[f+4+4>>2]|0);break}case 195:{$s((c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+4|0);Z=vs(c[_>>2]|0,20,0,0,0)|0;c[(c[da>>2]|0)+-48+4>>2]=Z;c[Q>>2]=Z;kt(c[_>>2]|0,c[Q>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 196:{$s((c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+4|0);Z=vs(c[_>>2]|0,136,c[(c[da>>2]|0)+-48+4>>2]|0,0,0)|0;c[(c[da>>2]|0)+-64+4>>2]=Z;if(!(c[(c[da>>2]|0)+-64+4>>2]|0)){_j(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0);ck(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);break a}if(c[(c[da>>2]|0)+-16+4>>2]|0)h=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;else h=c[(c[da>>2]|0)+-32+4>>2]|0;c[(c[(c[da>>2]|0)+-64+4>>2]|0)+20>>2]=h;jt(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0);break}case 197:{Z=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0)|0;c[(c[da>>2]|0)+-64+4>>2]=Z;_=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-64+4>>2]=_;break}case 198:{Z=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+-32+4>>2]|0)|0;c[(c[da>>2]|0)+-48+4>>2]=Z;_=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-48+4>>2]=_;break}case 201:{c[(c[da>>2]|0)+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 204:{_=Ks(c[_>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-32+4>>2]=_;break}case 205:{_=Ks(c[_>>2]|0,0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+4>>2]=_;break}case 212:case 207:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+-16+4>>2];break}case 208:{zs(c[_>>2]|0,(c[da>>2]|0)+-112+4|0,(c[da>>2]|0)+-96+4|0,Rs(c[c[_>>2]>>2]|0,0,(c[da>>2]|0)+-64+4|0,0)|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+-160+4>>2]|0,(c[da>>2]|0)+-176+4|0,c[(c[da>>2]|0)+4>>2]|0,0,c[(c[da>>2]|0)+-128+4>>2]|0,0);break}case 250:case 209:{c[(c[da>>2]|0)+4>>2]=2;break}case 210:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 213:{_=lt(c[_>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,(c[da>>2]|0)+-32+4|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-64+4>>2]=_;break}case 214:{_=lt(c[_>>2]|0,0,(c[da>>2]|0)+-32+4|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-32+4>>2]=_;break}case 217:{mt(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 218:{nt(c[_>>2]|0,0);break}case 219:{nt(c[_>>2]|0,(c[da>>2]|0)+4|0);break}case 220:{ot(c[_>>2]|0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0,0,0);break}case 221:{ot(c[_>>2]|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0,0);break}case 222:{ot(c[_>>2]|0,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-16+4|0,0);break}case 223:{ot(c[_>>2]|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0,1);break}case 224:{ot(c[_>>2]|0,(c[da>>2]|0)+-64+4|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-16+4|0,1);break}case 227:{c[R>>2]=c[(c[da>>2]|0)+-48+4>>2];c[R+4>>2]=(c[(c[da>>2]|0)+4>>2]|0)-(c[(c[da>>2]|0)+-48+4>>2]|0)+(c[(c[da>>2]|0)+4+4>>2]|0);pt(c[_>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,R);break}case 228:{qt(c[_>>2]|0,(c[da>>2]|0)+-112+4|0,(c[da>>2]|0)+-96+4|0,c[(c[da>>2]|0)+-80+4>>2]|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-64+4+4>>2]|0,c[(c[da>>2]|0)+-32+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-160+4>>2]|0,c[(c[da>>2]|0)+-128+4>>2]|0);h=(c[da>>2]|0)+-160+4|0;f=c[da>>2]|0;if(!(c[(c[da>>2]|0)+-96+4+4>>2]|0)){_=f+-112+4|0;c[h>>2]=c[_>>2];c[h+4>>2]=c[_+4>>2];break a}else{_=f+-96+4|0;c[h>>2]=c[_>>2];c[h+4>>2]=c[_+4>>2];break a}}case 229:{c[(c[da>>2]|0)+4>>2]=63;break}case 230:{c[(c[da>>2]|0)+4>>2]=59;break}case 231:{c[(c[da>>2]|0)+-16+4>>2]=77;break}case 232:{c[(c[da>>2]|0)+16+4>>2]=63;break}case 234:case 233:{c[(c[da>>2]|0)+4>>2]=d[(c[da>>2]|0)+2>>0];c[(c[da>>2]|0)+4+4>>2]=0;break}case 235:{c[(c[da>>2]|0)+-32+4>>2]=110;c[(c[da>>2]|0)+-32+4+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 255:case 236:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 256:case 237:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 238:{c[(c[(c[(c[da>>2]|0)+-32+4>>2]|0)+32>>2]|0)+28>>2]=c[(c[da>>2]|0)+-16+4>>2];c[(c[(c[da>>2]|0)+-32+4>>2]|0)+32>>2]=c[(c[da>>2]|0)+-16+4>>2];break}case 239:{c[(c[(c[da>>2]|0)+-16+4>>2]|0)+32>>2]=c[(c[da>>2]|0)+-16+4>>2];break}case 240:{Z=(c[da>>2]|0)+-32+4|0;Y=(c[da>>2]|0)+4|0;c[Z>>2]=c[Y>>2];c[Z+4>>2]=c[Y+4>>2];Ck(c[_>>2]|0,22967,V);break}case 241:{Ck(c[_>>2]|0,23062,W);break}case 242:{Ck(c[_>>2]|0,23146,X);break}case 243:{_=rt(c[c[_>>2]>>2]|0,(c[da>>2]|0)+-64+4|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-80+4>>2]&255)|0;c[(c[da>>2]|0)+-96+4>>2]=_;break}case 244:{_=st(c[c[_>>2]>>2]|0,(c[da>>2]|0)+-32+4|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-64+4>>2]&255)|0;c[(c[da>>2]|0)+-64+4>>2]=_;break}case 245:{_=tt(c[c[_>>2]>>2]|0,(c[da>>2]|0)+-32+4|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+-64+4>>2]=_;break}case 246:{_=ut(c[c[_>>2]>>2]|0,c[(c[da>>2]|0)+4>>2]|0)|0;c[(c[da>>2]|0)+4>>2]=_;break}case 247:{$s((c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+4|0);_=vs(c[_>>2]|0,83,0,0,0)|0;c[(c[da>>2]|0)+-48+4>>2]=_;if(c[(c[da>>2]|0)+-48+4>>2]|0)a[(c[(c[da>>2]|0)+-48+4>>2]|0)+1>>0]=4;break}case 248:{$s((c[da>>2]|0)+-80+4|0,(c[da>>2]|0)+-80+4|0,(c[da>>2]|0)+4|0);_=vs(c[_>>2]|0,83,0,0,(c[da>>2]|0)+-16+4|0)|0;c[(c[da>>2]|0)+-80+4>>2]=_;if(c[(c[da>>2]|0)+-80+4>>2]|0)a[(c[(c[da>>2]|0)+-80+4>>2]|0)+1>>0]=c[(c[da>>2]|0)+-48+4>>2];break}case 249:{c[(c[da>>2]|0)+4>>2]=1;break}case 251:{c[(c[da>>2]|0)+4>>2]=3;break}case 252:{vt(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0);break}case 253:{wt(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 254:{xt(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 257:{yt(c[_>>2]|0,0,0);break}case 258:{yt(c[_>>2]|0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0);break}case 259:{zt(c[_>>2]|0,0,0);break}case 260:{zt(c[_>>2]|0,(c[da>>2]|0)+-16+4|0,(c[da>>2]|0)+4|0);break}case 261:{At(c[_>>2]|0,c[(c[da>>2]|0)+-48+4>>2]|0,(c[da>>2]|0)+4|0);break}case 262:{c[(c[da>>2]|0)+-16+4+4>>2]=(c[(c[_>>2]|0)+392>>2]|0)-(c[(c[da>>2]|0)+-16+4>>2]|0)+(c[(c[_>>2]|0)+392+4>>2]|0);Bt(c[_>>2]|0,(c[da>>2]|0)+-16+4|0);break}case 263:{rs(c[_>>2]|0);Ct(c[_>>2]|0,c[(c[da>>2]|0)+4>>2]|0);break}case 264:{Dt(c[_>>2]|0,0);break}case 265:{Dt(c[_>>2]|0,(c[da>>2]|0)+4|0);break}case 266:{Et(c[_>>2]|0,(c[da>>2]|0)+-48+4|0,(c[da>>2]|0)+-32+4|0,(c[da>>2]|0)+4|0,c[(c[da>>2]|0)+-64+4>>2]|0);break}case 267:{Ft(c[_>>2]|0);break}case 270:case 269:case 268:{Gt(c[_>>2]|0,(c[da>>2]|0)+4|0);break}case 271:{c[(c[da>>2]|0)+16+4>>2]=0;break}case 272:{c[(c[da>>2]|0)+-16+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 273:{c[(c[da>>2]|0)+-32+4>>2]=c[(c[da>>2]|0)+4>>2];break}case 274:{_=Ht(c[_>>2]|0,0,(c[da>>2]|0)+-80+4|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;c[(c[da>>2]|0)+-80+4>>2]=_;break}case 275:{_=Ht(c[_>>2]|0,c[(c[da>>2]|0)+-112+4>>2]|0,(c[da>>2]|0)+-80+4|0,c[(c[da>>2]|0)+-64+4>>2]|0,c[(c[da>>2]|0)+-16+4>>2]|0)|0;c[(c[da>>2]|0)+-112+4>>2]=_;break}default:{}}while(0);c[ba>>2]=d[22227+(c[aa>>2]<<1)>>0];c[ea>>2]=d[22227+(c[aa>>2]<<1)+1>>0];c[ca>>2]=It(e[(c[da>>2]|0)+(0-(c[ea>>2]|0)<<4)>>1]|0,c[ba>>2]&255)|0;if((c[ca>>2]|0)>999){da=c[$>>2]|0;c[da>>2]=(c[da>>2]|0)+(0-(c[ea>>2]|0)<<4);Jt(c[$>>2]|0);l=fa;return}if((c[ca>>2]|0)>455)c[ca>>2]=(c[ca>>2]|0)+332;c[da>>2]=(c[da>>2]|0)+(0-((c[ea>>2]|0)-1)<<4);c[c[$>>2]>>2]=c[da>>2];b[c[da>>2]>>1]=c[ca>>2];a[(c[da>>2]|0)+2>>0]=c[ba>>2];l=fa;return}function js(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e;f=e+12|0;g=e+4|0;c[f>>2]=a;c[e+8>>2]=b;c[g>>2]=c[(c[f>>2]|0)+4>>2];b=c[g>>2]|0;c[h>>2]=d;Ck(b,22203,h);c[(c[f>>2]|0)+4>>2]=c[g>>2];l=e;return}function ks(a){a=a|0;var b=0,d=0,e=0,f=0;f=l;l=l+16|0;e=f;b=f+8|0;d=f+4|0;c[b>>2]=a;c[d>>2]=c[(c[b>>2]|0)+4>>2];a=c[b>>2]|0;c[a>>2]=(c[a>>2]|0)+-16;while(1){if((c[c[b>>2]>>2]|0)>>>0<=((c[b>>2]|0)+8|0)>>>0)break;es(c[b>>2]|0)}Ck(c[d>>2]|0,33924,e);c[(c[b>>2]|0)+4>>2]=c[d>>2];l=f;return}function ls(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;e=n+28|0;f=n+24|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[e>>2]=b;c[f>>2]=c[c[e>>2]>>2];if(a[(c[e>>2]|0)+18>>0]|0){l=n;return}if((d[(c[f>>2]|0)+69>>0]|0)==0?(c[(c[e>>2]|0)+36>>2]|0)==0:0){c[g>>2]=Rt(c[e>>2]|0)|0;do if(c[g>>2]|0?(Tt(c[g>>2]|0,75)|0,(d[(c[f>>2]|0)+69>>0]|0)==0):0){if((c[(c[e>>2]|0)+96>>2]|0)==0?(c[(c[e>>2]|0)+80>>2]|0)==0:0)break;tx(c[g>>2]|0,0);c[h>>2]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2]=101;l=n;return}c[(c[e>>2]|0)+12>>2]=1;l=n;return}if(c[(c[e>>2]|0)+12>>2]|0){l=n;return}c[(c[e>>2]|0)+12>>2]=1;l=n;return}function ms(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;d=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[d>>2]=a;c[e>>2]=b;c[f>>2]=c[c[d>>2]>>2];if(Ot(c[d>>2]|0,22,33854,0,0)|0){l=i;return}c[g>>2]=Rt(c[d>>2]|0)|0;if(!(c[g>>2]|0)){l=i;return}a:do if((c[e>>2]|0)!=7){c[h>>2]=0;while(1){if((c[h>>2]|0)>=(c[(c[f>>2]|0)+20>>2]|0))break a;Wt(c[g>>2]|0,2,c[h>>2]|0,((c[e>>2]|0)==9&1)+1|0)|0;cu(c[g>>2]|0,c[h>>2]|0);c[h>>2]=(c[h>>2]|0)+1}}while(0);Tt(c[g>>2]|0,1)|0;l=i;return}function ns(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(Ot(c[b>>2]|0,22,33877,0,0)|0){l=e;return}c[d>>2]=Rt(c[b>>2]|0)|0;if(!(c[d>>2]|0)){l=e;return}kx(c[d>>2]|0,1,1)|0;l=e;return}function os(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[b>>2]=a;if(Ot(c[b>>2]|0,22,33868,0,0)|0){l=e;return}c[d>>2]=Rt(c[b>>2]|0)|0;if(!(c[d>>2]|0)){l=e;return}Wt(c[d>>2]|0,1,1,1)|0;l=e;return}function ps(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+16|0;f=i+12|0;j=i+8|0;g=i+4|0;h=i;c[e>>2]=a;c[f>>2]=b;c[j>>2]=d;c[g>>2]=Kt(c[c[e>>2]>>2]|0,c[j>>2]|0)|0;if(!(c[g>>2]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2]|0;c[u>>2]=c[t>>2];c[u+4>>2]=c[t+4>>2];if(!(c[z>>2]|0)){l=J;return}a:do if(!(jv(c[G>>2]|0,c[z>>2]|0)|0)){if((d[(c[A>>2]|0)+148+4>>0]|0)==1)c[m>>2]=1;c[o>>2]=c[(c[(c[A>>2]|0)+16>>2]|0)+(c[I>>2]<<4)>>2];if(!(Ot(c[G>>2]|0,18,(c[m>>2]|0)==1?23323:23342,0,c[o>>2]|0)|0)){if((c[x>>2]|0)==0?Ot(c[G>>2]|0,d[33785+((c[m>>2]|0)+(c[w>>2]<<1))>>0]|0,c[z>>2]|0,0,c[o>>2]|0)|0:0)break;do if(!(a[(c[G>>2]|0)+410>>0]|0)){c[p>>2]=c[(c[(c[A>>2]|0)+16>>2]|0)+(c[I>>2]<<4)>>2];if(lu(c[G>>2]|0)|0)break a;c[n>>2]=mu(c[A>>2]|0,c[z>>2]|0,c[p>>2]|0)|0;if(!(c[n>>2]|0)){if(!(Bu(c[A>>2]|0,c[z>>2]|0,c[p>>2]|0)|0))break;I=c[G>>2]|0;c[v>>2]=c[z>>2];Ck(I,33813,v);break a}e=c[G>>2]|0;if(c[y>>2]|0){ju(e,c[I>>2]|0);break a}else{c[H>>2]=c[C>>2];Ck(e,33789,H);break a}}while(0);c[n>>2]=jl(c[A>>2]|0,72,0)|0;if(!(c[n>>2]|0)){c[(c[G>>2]|0)+12>>2]=7;I=(c[G>>2]|0)+36|0;c[I>>2]=(c[I>>2]|0)+1;break}c[c[n>>2]>>2]=c[z>>2];b[(c[n>>2]|0)+32>>1]=-1;c[(c[n>>2]|0)+64>>2]=c[(c[(c[A>>2]|0)+16>>2]|0)+(c[I>>2]<<4)+12>>2];b[(c[n>>2]|0)+36>>1]=1;b[(c[n>>2]|0)+38>>1]=200;c[(c[G>>2]|0)+440>>2]=c[n>>2];if((a[(c[G>>2]|0)+18>>0]|0)==0?(vQ(c[z>>2]|0,25115)|0)==0:0)c[(c[(c[n>>2]|0)+64>>2]|0)+72>>2]=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b=(c[c[e>>2]>>2]|0)+256|0;c[b>>2]=(c[b>>2]|0)+1;l=d;return}function ss(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;R=l;l=l+208|0;O=R+72|0;M=R+64|0;Q=R+32|0;P=R+16|0;N=R+8|0;L=R;G=R+200|0;H=R+196|0;I=R+192|0;J=R+204|0;K=R+188|0;j=R+184|0;k=R+180|0;m=R+176|0;n=R+172|0;o=R+168|0;p=R+164|0;q=R+160|0;r=R+156|0;s=R+152|0;t=R+128|0;u=R+120|0;v=R+116|0;w=R+112|0;x=R+108|0;y=R+104|0;z=R+100|0;A=R+96|0;B=R+92|0;C=R+88|0;D=R+84|0;E=R+80|0;F=R+76|0;c[G>>2]=e;c[H>>2]=f;c[I>>2]=g;a[J>>0]=h;c[K>>2]=i;c[k>>2]=c[c[G>>2]>>2];if((c[I>>2]|0)==0&(c[K>>2]|0)==0){l=R;return}c[j>>2]=c[(c[G>>2]|0)+440>>2];if(!(c[j>>2]|0)){l=R;return}if(a[(c[k>>2]|0)+148+5>>0]|0?(c[(c[j>>2]|0)+28>>2]=c[(c[k>>2]|0)+148>>2],(c[(c[j>>2]|0)+28>>2]|0)==1):0){i=(c[j>>2]|0)+42|0;a[i>>0]=d[i>>0]|1}do if(d[J>>0]&32|0){if(d[(c[j>>2]|0)+42>>0]&8|0){Ck(c[G>>2]|0,33425,L);l=R;return}if(!(d[(c[j>>2]|0)+42>>0]&4)){L=c[G>>2]|0;c[N>>2]=c[c[j>>2]>>2];Ck(L,33475,N);break}else{N=(c[j>>2]|0)+42|0;a[N>>0]=d[N>>0]|96;FE(c[G>>2]|0,c[j>>2]|0);break}}while(0);c[m>>2]=Nt(c[k>>2]|0,c[(c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b[(c[j>>2]|0)+34>>1]|0)-1;c[k>>2]=(c[(c[j>>2]|0)+4>>2]|0)+(c[m>>2]<<4);r=(c[k>>2]|0)+15|0;a[r>>0]=d[r>>0]|1;c[o>>2]=1}else{c[o>>2]=c[c[t>>2]>>2];c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[o>>2]|0))break a;c[p>>2]=Ev(c[(c[(c[t>>2]|0)+4>>2]|0)+((c[n>>2]|0)*20|0)>>2]|0)|0;BE(c[p>>2]|0);b:do if((d[c[p>>2]>>0]|0)==55){c[q>>2]=c[(c[p>>2]|0)+8>>2];c[m>>2]=0;while(1){if((c[m>>2]|0)>=(b[(c[j>>2]|0)+34>>1]|0))break b;if(!(Ig(c[q>>2]|0,c[(c[(c[j>>2]|0)+4>>2]|0)+(c[m>>2]<<4)>>2]|0)|0))break;c[m>>2]=(c[m>>2]|0)+1}c[k>>2]=(c[(c[j>>2]|0)+4>>2]|0)+(c[m>>2]<<4);r=(c[k>>2]|0)+15|0;a[r>>0]=d[r>>0]|1}while(0);c[n>>2]=(c[n>>2]|0)+1}}while(0);if((c[o>>2]|0)==1&(c[k>>2]|0)!=0?(r=(Ig(qu(c[k>>2]|0,47636)|0,25345)|0)==0,r&(c[w>>2]|0)!=1):0){b[(c[j>>2]|0)+32>>1]=c[m>>2];a[(c[j>>2]|0)+43>>0]=c[u>>2];x=(c[j>>2]|0)+42|0;a[x>>0]=d[x>>0]|c[v>>2]<<3;if(!(c[t>>2]|0)){w=c[s>>2]|0;w=c[w>>2]|0;x=c[t>>2]|0;_j(w,x);l=y;return}a[(c[s>>2]|0)+408>>0]=a[(c[(c[t>>2]|0)+4>>2]|0)+12>>0]|0;w=c[s>>2]|0;w=c[w>>2]|0;x=c[t>>2]|0;_j(w,x);l=y;return}e=c[s>>2]|0;if(c[v>>2]|0){Ck(e,33275,x);w=c[s>>2]|0;w=c[w>>2]|0;x=c[t>>2]|0;_j(w,x);l=y;return}else{zs(e,0,0,0,c[t>>2]|0,c[u>>2]|0,0,0,c[w>>2]|0,0,2);c[t>>2]=0;w=c[s>>2]|0;w=c[w>>2]|0;x=c[t>>2]|0;_j(w,x);l=y;return}}function zs(f,g,h,i,j,k,m,n,o,p,q){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;za=l;l=l+352|0;ma=za+112|0;la=za+88|0;ka=za+72|0;ja=za+64|0;ia=za+56|0;D=za+48|0;K=za+40|0;C=za+32|0;B=za+24|0;F=za+16|0;E=za+8|0;A=za;L=za+332|0;r=za+328|0;s=za+324|0;ta=za+320|0;ua=za+316|0;na=za+312|0;M=za+308|0;va=za+304|0;t=za+300|0;G=za+296|0;N=za+336|0;oa=za+292|0;wa=za+288|0;xa=za+284|0;H=za+280|0;O=za+276|0;P=za+272|0;u=za+248|0;Q=za+240|0;ya=za+236|0;I=za+232|0;pa=za+228|0;R=za+224|0;S=za+220|0;T=za+216|0;J=za+212|0;U=za+208|0;V=za+204|0;v=za+200|0;w=za+196|0;x=za+192|0;y=za+184|0;z=za+180|0;W=za+176|0;X=za+172|0;Y=za+168|0;Z=za+164|0;_=za+160|0;$=za+156|0;aa=za+152|0;ba=za+148|0;ca=za+144|0;da=za+140|0;qa=za+136|0;ea=za+132|0;fa=za+128|0;ga=za+124|0;ha=za+120|0;ra=za+116|0;c[L>>2]=f;c[r>>2]=g;c[s>>2]=h;c[ta>>2]=i;c[ua>>2]=j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|0)==0?(d[(c[ya>>2]|0)+148+5>>0]|0)==0:0)?Zc((c[c[oa>>2]>>2]|0)+7|0,32850,9)|0:0){sa=c[L>>2]|0;c[E>>2]=c[c[oa>>2]>>2];Ck(sa,32860,E);break}if(c[(c[oa>>2]|0)+12>>2]|0){Ck(c[L>>2]|0,32888,F);break}if(d[(c[oa>>2]|0)+42>>0]&16|0){Ck(c[L>>2]|0,32913,B);break}if(c[R>>2]|0){c[xa>>2]=Kt(c[ya>>2]|0,c[R>>2]|0)|0;if(!(c[xa>>2]|0))break;if(jv(c[L>>2]|0,c[xa>>2]|0)|0)break;if((a[(c[ya>>2]|0)+148+5>>0]|0)==0?mu(c[ya>>2]|0,c[xa>>2]|0,0)|0:0){sa=c[L>>2]|0;c[C>>2]=c[xa>>2];Ck(sa,32947,C);break}if(Bu(c[ya>>2]|0,c[xa>>2]|0,c[c[I>>2]>>2]|0)|0){f=c[L>>2]|0;if(c[G>>2]|0){ju(f,c[pa>>2]|0);break}else{c[K>>2]=c[xa>>2];Ck(f,32981,K);break}}}else{c[w>>2]=c[(c[oa>>2]|0)+8>>2];c[v>>2]=1;while(1){if(!(c[w>>2]|0))break;c[w>>2]=c[(c[w>>2]|0)+20>>2];c[v>>2]=(c[v>>2]|0)+1}K=c[ya>>2]|0;G=c[v>>2]|0;c[D>>2]=c[c[oa>>2]>>2];c[D+4>>2]=G;c[xa>>2]=Bj(K,33005,D)|0;if(!(c[xa>>2]|0))break;if(a[(c[L>>2]|0)+410>>0]|0){K=(c[xa>>2]|0)+7|0;a[K>>0]=(a[K>>0]|0)+1<<24>>24}}c[x>>2]=c[c[I>>2]>>2];if((Ot(c[L>>2]|0,18,(c[pa>>2]|0)==1?23323:23342,0,c[x>>2]|0)|0)==0?(c[O>>2]=1,c[O>>2]=(c[pa>>2]|0)==1?3:1,(Ot(c[L>>2]|0,c[O>>2]|0,c[xa>>2]|0,c[c[oa>>2]>>2]|0,c[x>>2]|0)|0)==0):0){if(!(c[ua>>2]|0)){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}while(0);zu(c[wa>>2]|0);if(!(c[(c[L>>2]|0)+440>>2]|0))DE(c[wa>>2]|0);c:do if(c[ta>>2]|0){if((e[(c[wa>>2]|0)+52>>1]|0)<(b[(c[oa>>2]|0)+34>>1]|0))break;ia=(c[wa>>2]|0)+55|0;a[ia>>0]=a[ia>>0]&-33|32;c[P>>2]=0;while(1){if((c[P>>2]|0)>=(b[(c[oa>>2]|0)+34>>1]|0))break c;if((c[P>>2]|0)!=(b[(c[oa>>2]|0)+32>>1]|0)?((_x(c[wa>>2]|0,c[P>>2]&65535)|0)<<16>>16|0)<0:0)break;c[P>>2]=(c[P>>2]|0)+1}ia=(c[wa>>2]|0)+55|0;a[ia>>0]=a[ia>>0]&-33}while(0);d:do if((c[oa>>2]|0)==(c[(c[L>>2]|0)+440>>2]|0)){c[aa>>2]=c[(c[oa>>2]|0)+8>>2];while(1){if(!(c[aa>>2]|0))break d;if((e[(c[aa>>2]|0)+50>>1]|0)==(e[(c[wa>>2]|0)+50>>1]|0)){c[ba>>2]=0;while(1){if((c[ba>>2]|0)>=(e[(c[aa>>2]|0)+50>>1]|0))break;if((b[(c[(c[aa>>2]|0)+4>>2]|0)+(c[ba>>2]<<1)>>1]|0)!=(b[(c[(c[wa>>2]|0)+4>>2]|0)+(c[ba>>2]<<1)>>1]|0))break;c[ca>>2]=c[(c[(c[aa>>2]|0)+32>>2]|0)+(c[ba>>2]<<2)>>2];c[da>>2]=c[(c[(c[wa>>2]|0)+32>>2]|0)+(c[ba>>2]<<2)>>2];if(Ig(c[ca>>2]|0,c[da>>2]|0)|0)break;c[ba>>2]=(c[ba>>2]|0)+1}if((c[ba>>2]|0)==(e[(c[aa>>2]|0)+50>>1]|0))break}c[aa>>2]=c[(c[aa>>2]|0)+20>>2]}do if((d[(c[aa>>2]|0)+54>>0]|0)!=(d[(c[wa>>2]|0)+54>>0]|0)){do if((d[(c[aa>>2]|0)+54>>0]|0)!=10){if((d[(c[wa>>2]|0)+54>>0]|0)==10)break;sa=c[L>>2]|0;c[ja>>2]=0;Ck(sa,33089,ja)}while(0);if((d[(c[aa>>2]|0)+54>>0]|0)!=10)break;a[(c[aa>>2]|0)+54>>0]=a[(c[wa>>2]|0)+54>>0]|0}while(0);if((d[N>>0]|0)!=2)break a;sa=(c[aa>>2]|0)+55|0;a[sa>>0]=a[sa>>0]&-4|d[N>>0]&3;break a}while(0);do if(a[(c[ya>>2]|0)+148+5>>0]|0){c[qa>>2]=Vj((c[(c[wa>>2]|0)+24>>2]|0)+24|0,c[c[wa>>2]>>2]|0,c[wa>>2]|0)|0;f=c[ya>>2]|0;if(c[qa>>2]|0){yd(f);break a}qa=f+24|0;c[qa>>2]=c[qa>>2]|2;if(!(c[ta>>2]|0))break;c[(c[wa>>2]|0)+44>>2]=c[(c[ya>>2]|0)+148>>2]}else{if(!(c[ta>>2]|0?1:(d[(c[oa>>2]|0)+42>>0]&32|0)==0))break;ja=(c[L>>2]|0)+44|0;qa=(c[ja>>2]|0)+1|0;c[ja>>2]=qa;c[ga>>2]=qa;c[ea>>2]=Rt(c[L>>2]|0)|0;if(!(c[ea>>2]|0))break a;iu(c[L>>2]|0,1,c[pa>>2]|0);qa=Tt(c[ea>>2]|0,161)|0;c[(c[wa>>2]|0)+44>>2]=qa;Wt(c[ea>>2]|0,134,c[pa>>2]|0,c[ga>>2]|0)|0;if(c[M>>2]|0){c[ha>>2]=(c[(c[L>>2]|0)+392>>2]|0)-(c[c[R>>2]>>2]|0)+(c[(c[L>>2]|0)+392+4>>2]|0);if((a[(c[c[R>>2]>>2]|0)+((c[ha>>2]|0)-1)>>0]|0)==59)c[ha>>2]=(c[ha>>2]|0)+-1;qa=c[ya>>2]|0;ia=c[ha>>2]|0;ja=c[c[R>>2]>>2]|0;c[ka>>2]=(c[na>>2]|0)==0?47636:33131;c[ka+4>>2]=ia;c[ka+8>>2]=ja;c[fa>>2]=Bj(qa,33139,ka)|0}else c[fa>>2]=0;qa=c[L>>2]|0;da=(c[pa>>2]|0)==1?23323:23342;ha=c[c[wa>>2]>>2]|0;ia=c[c[oa>>2]>>2]|0;ja=c[ga>>2]|0;ka=c[fa>>2]|0;c[la>>2]=c[(c[(c[ya>>2]|0)+16>>2]|0)+(c[pa>>2]<<4)>>2];c[la+4>>2]=da;c[la+8>>2]=ha;c[la+12>>2]=ia;c[la+16>>2]=ja;c[la+20>>2]=ka;Qt(qa,33159,la);Hd(c[ya>>2]|0,c[fa>>2]|0);if(c[ta>>2]|0){Ix(c[L>>2]|0,c[wa>>2]|0,c[ga>>2]|0);St(c[L>>2]|0,c[pa>>2]|0);la=c[ea>>2]|0;pa=c[pa>>2]|0;qa=c[ya>>2]|0;c[ma>>2]=c[c[wa>>2]>>2];Ut(la,pa,Bj(qa,33207,ma)|0);Tt(c[ea>>2]|0,150)|0}tx(c[ea>>2]|0,c[(c[wa>>2]|0)+44>>2]|0)}while(0);if(!((c[ta>>2]|0)==0?1:(d[(c[ya>>2]|0)+148+5>>0]|0)!=0))break;do if((c[na>>2]|0)!=5)sa=143;else{if(!(c[(c[oa>>2]|0)+8>>2]|0)){sa=143;break}if((d[(c[(c[oa>>2]|0)+8>>2]|0)+54>>0]|0)==5){sa=143;break}c[ra>>2]=c[(c[oa>>2]|0)+8>>2];while(1){if(c[(c[ra>>2]|0)+20>>2]|0)g=(d[(c[(c[ra>>2]|0)+20>>2]|0)+54>>0]|0)!=5;else g=0;f=c[(c[ra>>2]|0)+20>>2]|0;if(!g)break;c[ra>>2]=f}c[(c[wa>>2]|0)+20>>2]=f;c[(c[ra>>2]|0)+20>>2]=c[wa>>2]}while(0);if((sa|0)==143){c[(c[wa>>2]|0)+20>>2]=c[(c[oa>>2]|0)+8>>2];c[(c[oa>>2]|0)+8>>2]=c[wa>>2]}c[wa>>2]=0}}}}while(0);if(!(c[wa>>2]|0)){sa=c[ya>>2]|0;wa=c[va>>2]|0;ck(sa,wa);wa=c[ya>>2]|0;va=c[ua>>2]|0;_j(wa,va);va=c[ya>>2]|0;wa=c[ta>>2]|0;fk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z>>2]|0))c[(c[q>>2]|0)+36>>2]=(b[(c[s>>2]|0)+34>>1]|0)-1;else{c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[u>>2]|0))break c;c[w>>2]=0;while(1){if((c[w>>2]|0)>=(b[(c[s>>2]|0)+34>>1]|0))break;o=(Ig(c[(c[(c[s>>2]|0)+4>>2]|0)+(c[w>>2]<<4)>>2]|0,c[(c[(c[z>>2]|0)+4>>2]|0)+((c[t>>2]|0)*20|0)+4>>2]|0)|0)==0;e=c[w>>2]|0;if(o){D=25;break}c[w>>2]=e+1}if((D|0)==25){D=0;c[(c[q>>2]|0)+36+(c[t>>2]<<3)>>2]=e}if((c[w>>2]|0)>=(b[(c[s>>2]|0)+34>>1]|0))break;c[t>>2]=(c[t>>2]|0)+1}D=c[y>>2]|0;c[C>>2]=c[(c[(c[z>>2]|0)+4>>2]|0)+((c[t>>2]|0)*20|0)+4>>2];Ck(D,32754,C);break a}while(0);d:do if(c[A>>2]|0){c[t>>2]=0;while(1){if((c[t>>2]|0)>=(c[u>>2]|0))break d;c[x>>2]=_c(c[(c[(c[A>>2]|0)+4>>2]|0)+((c[t>>2]|0)*20|0)+4>>2]|0)|0;c[(c[q>>2]|0)+36+(c[t>>2]<<3)+4>>2]=c[v>>2];MR(c[v>>2]|0,c[(c[(c[A>>2]|0)+4>>2]|0)+((c[t>>2]|0)*20|0)+4>>2]|0,c[x>>2]|0)|0;a[(c[v>>2]|0)+(c[x>>2]|0)>>0]=0;c[v>>2]=(c[v>>2]|0)+((c[x>>2]|0)+1);c[t>>2]=(c[t>>2]|0)+1}}while(0);a[(c[q>>2]|0)+24>>0]=0;a[(c[q>>2]|0)+25>>0]=c[B>>2];a[(c[q>>2]|0)+25+1>>0]=c[B>>2]>>8;c[r>>2]=Vj((c[(c[s>>2]|0)+64>>2]|0)+56|0,c[(c[q>>2]|0)+8>>2]|0,c[q>>2]|0)|0;if((c[r>>2]|0)==(c[q>>2]|0)){yd(c[p>>2]|0);break}if(c[r>>2]|0){c[(c[q>>2]|0)+12>>2]=c[r>>2];c[(c[r>>2]|0)+16>>2]=c[q>>2]}c[(c[s>>2]|0)+16>>2]=c[q>>2];c[q>>2]=0}}while(0);Hd(c[p>>2]|0,c[q>>2]|0);_j(c[p>>2]|0,c[z>>2]|0);_j(c[p>>2]|0,c[A>>2]|0);l=E;return}function Cs(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=l;l=l+16|0;i=h+12|0;e=h+8|0;f=h+4|0;g=h;c[i>>2]=b;c[e>>2]=d;d=c[(c[i>>2]|0)+440>>2]|0;c[f>>2]=d;if(!d){l=h;return}i=c[(c[f>>2]|0)+16>>2]|0;c[g>>2]=i;if(!i){l=h;return}a[(c[g>>2]|0)+24>>0]=c[e>>2];l=h;return}function Ds(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;e=m+24|0;f=m+20|0;h=m+16|0;i=m+12|0;j=m+8|0;g=m+4|0;k=m;c[e>>2]=a;c[f>>2]=d;d=c[(c[e>>2]|0)+440>>2]|0;c[h>>2]=d;if(!d){l=m;return}c[i>>2]=(b[(c[h>>2]|0)+34>>1]|0)-1;c[g>>2]=c[c[e>>2]>>2];c[j>>2]=Kt(c[g>>2]|0,c[f>>2]|0)|0;if(!(c[j>>2]|0)){l=m;return}f=(rx(c[e>>2]|0,c[j>>2]|0)|0)!=0;a=c[g>>2]|0;if(!f){Hd(a,c[j>>2]|0);l=m;return}Hd(a,c[(c[(c[h>>2]|0)+4>>2]|0)+(c[i>>2]<<4)+8>>2]|0);c[(c[(c[h>>2]|0)+4>>2]|0)+(c[i>>2]<<4)+8>>2]=c[j>>2];c[k>>2]=c[(c[h>>2]|0)+8>>2];while(1){if(!(c[k>>2]|0))break;if((b[c[(c[k>>2]|0)+4>>2]>>1]|0)==(c[i>>2]|0))c[c[(c[k>>2]|0)+32>>2]>>2]=c[(c[(c[h>>2]|0)+4>>2]|0)+(c[i>>2]<<4)+8>>2];c[k>>2]=c[(c[k>>2]|0)+20>>2]}l=m;return}function Es(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+80|0;w=x+16|0;v=x+8|0;u=x;o=x+64|0;p=x+60|0;q=x+56|0;r=x+52|0;s=x+48|0;t=x+44|0;h=x+40|0;i=x+36|0;j=x+32|0;k=x+28|0;m=x+24|0;n=x+20|0;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;c[r>>2]=g;c[h>>2]=c[c[o>>2]>>2];do if((a[(c[h>>2]|0)+69>>0]|0)==0?(lu(c[o>>2]|0)|0)==0:0){if(c[r>>2]|0){g=(c[h>>2]|0)+73|0;a[g>>0]=(a[g>>0]|0)+1<<24>>24}c[s>>2]=gu(c[o>>2]|0,c[q>>2]|0,(c[p>>2]|0)+8|0)|0;if(c[r>>2]|0){g=(c[h>>2]|0)+73|0;a[g>>0]=(a[g>>0]|0)+-1<<24>>24}if(!(c[s>>2]|0)){if(!(c[r>>2]|0))break;dz(c[o>>2]|0,c[(c[p>>2]|0)+8+4>>2]|0);break}c[i>>2]=Nt(c[h>>2]|0,c[(c[s>>2]|0)+64>>2]|0)|0;if(d[(c[s>>2]|0)+42>>0]&16|0?kv(c[o>>2]|0,c[s>>2]|0)|0:0)break;c[k>>2]=(c[i>>2]|0)==1?23323:23342;c[m>>2]=c[(c[(c[h>>2]|0)+16>>2]|0)+(c[i>>2]<<4)>>2];c[n>>2]=0;if(!(Ot(c[o>>2]|0,9,c[k>>2]|0,0,c[m>>2]|0)|0)){do if(c[q>>2]|0)if((c[i>>2]|0)==1){c[j>>2]=15;break}else{c[j>>2]=17;break}else{if(d[(c[s>>2]|0)+42>>0]&16|0){c[j>>2]=30;c[n>>2]=c[(c[(lv(c[h>>2]|0,c[s>>2]|0)|0)+4>>2]|0)+4>>2];break}if((c[i>>2]|0)==1){c[j>>2]=13;break}else{c[j>>2]=11;break}}while(0);if((Ot(c[o>>2]|0,c[j>>2]|0,c[c[s>>2]>>2]|0,c[n>>2]|0,c[m>>2]|0)|0)==0?(Ot(c[o>>2]|0,9,c[c[s>>2]>>2]|0,0,c[m>>2]|0)|0)==0:0){if((Zc(c[c[s>>2]>>2]|0,23554,7)|0)==0?Zc(c[c[s>>2]>>2]|0,32390,11)|0:0){w=c[o>>2]|0;c[u>>2]=c[c[s>>2]>>2];Ck(w,32402,u);break}if(c[q>>2]|0?(c[(c[s>>2]|0)+12>>2]|0)==0:0){w=c[o>>2]|0;c[v>>2]=c[c[s>>2]>>2];Ck(w,32430,v);break}if((c[q>>2]|0)==0?c[(c[s>>2]|0)+12>>2]|0:0){v=c[o>>2]|0;c[w>>2]=c[c[s>>2]>>2];Ck(v,32464,w);break}c[t>>2]=Rt(c[o>>2]|0)|0;if(c[t>>2]|0){iu(c[o>>2]|0,1,c[i>>2]|0);jA(c[o>>2]|0,c[i>>2]|0,27042,c[c[s>>2]>>2]|0);vE(c[o>>2]|0,c[p>>2]|0,c[s>>2]|0);wE(c[o>>2]|0,c[s>>2]|0,c[i>>2]|0,c[q>>2]|0)}}}}while(0);fk(c[h>>2]|0,c[p>>2]|0);l=x;return}function Fs(e,f,g,h,i,j,k,m){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+96|0;B=D+88|0;C=D+84|0;n=D+80|0;o=D+76|0;p=D+72|0;q=D+68|0;r=D+64|0;s=D+60|0;t=D+56|0;u=D+52|0;v=D+48|0;w=D+40|0;x=D+16|0;y=D+12|0;z=D+8|0;A=D+4|0;c[B>>2]=e;c[C>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=i;c[q>>2]=j;c[r>>2]=k;c[s>>2]=m;c[y>>2]=0;c[A>>2]=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2]|0)+8|0;c[h>>2]=c[h>>2]|8}c[za>>2]=-1}c[P>>2]=c[(c[ja>>2]|0)+28>>2];if(a[(c[X>>2]|0)+69>>0]|0)break a;if((d[c[ua>>2]>>0]|0)>8)c[U>>2]=c[(c[ja>>2]|0)+44>>2]}c[za>>2]=(c[za>>2]|0)+1}if((A|0)==16){Ba=c[aa>>2]|0;za=c[c[m>>2]>>2]|0;Aa=c[c[c[j>>2]>>2]>>2]|0;c[v>>2]=b[(c[m>>2]|0)+34>>1];c[v+4>>2]=za;c[v+8>>2]=Aa;Ck(Ba,31944,v);break}c[N>>2]=Rt(c[aa>>2]|0)|0;if(c[N>>2]|0){if(c[(c[ja>>2]|0)+48>>2]|0){c[S>>2]=ED(c[aa>>2]|0,c[ja>>2]|0,c[ua>>2]|0)|0;c[(c[aa>>2]|0)+420>>2]=c[Y>>2];c[Z>>2]=c[S>>2];Ba=c[Z>>2]|0;l=Ca;return Ba|0}c[za>>2]=0;while(1){if((c[za>>2]|0)>=(c[c[P>>2]>>2]|0))break;c[n>>2]=(c[P>>2]|0)+8+((c[za>>2]|0)*72|0);c[p>>2]=c[(c[n>>2]|0)+20>>2];do if(c[p>>2]|0){if(c[(c[n>>2]|0)+24>>2]|0){if((d[(c[n>>2]|0)+36+1>>0]|0)>>>4&1|0)break;Wt(c[N>>2]|0,14,c[(c[n>>2]|0)+28>>2]|0,c[(c[n>>2]|0)+24>>2]|0)|0;break}m=FD(c[ja>>2]|0)|0;v=(c[aa>>2]|0)+416|0;c[v>>2]=(c[v>>2]|0)+m;if(!(d[(c[n>>2]|0)+36>>0]&32))GD(c[X>>2]|0,c[p>>2]|0,c[(c[ja>>2]|0)+32>>2]|0,c[(c[n>>2]|0)+44>>2]|0)|0;do if(!(c[za>>2]|0)){if((c[c[P>>2]>>2]|0)!=1?(d[(c[P>>2]|0)+8+72+36>>0]&10|0)==0:0){A=42;break}if(c[(c[ja>>2]|0)+8>>2]&2|0){A=42;break}if(e[(c[X>>2]|0)+64>>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+4>>2]|0)>0?32002:32025);bE(c[aa>>2]|0,c[ja>>2]|0,U,c[c[O>>2]>>2]|0,c[ua>>2]|0)}ux(c[N>>2]|0,c[W>>2]|0);c[S>>2]=(c[(c[aa>>2]|0)+36>>2]|0)>0&1}}while(0);c[(c[aa>>2]|0)+420>>2]=c[Y>>2];if((c[S>>2]|0)==0?(d[c[ua>>2]>>0]|0)==9:0)cE(c[aa>>2]|0,c[P>>2]|0,c[O>>2]|0);Hd(c[X>>2]|0,c[V+28>>2]|0);Hd(c[X>>2]|0,c[V+40>>2]|0);c[Z>>2]=c[S>>2];Ba=c[Z>>2]|0;l=Ca;return Ba|0}c[Z>>2]=1;Ba=c[Z>>2]|0;l=Ca;return Ba|0}function Hs(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k;d=k+24|0;e=k+20|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;c[d>>2]=a;c[e>>2]=b;if(!(c[(c[e>>2]|0)+48>>2]|0)){l=k;return}c[f>>2]=0;c[i>>2]=0;c[g>>2]=c[e>>2];while(1){if(!(c[g>>2]|0))break;c[(c[g>>2]|0)+52>>2]=c[f>>2];b=(c[g>>2]|0)+8|0;c[b>>2]=c[b>>2]|256;c[f>>2]=c[g>>2];c[g>>2]=c[(c[g>>2]|0)+48>>2];c[i>>2]=(c[i>>2]|0)+1}if(c[(c[e>>2]|0)+8>>2]&1024|0){l=k;return}g=c[(c[c[d>>2]>>2]|0)+96+16>>2]|0;c[h>>2]=g;if((g|0)<=0){l=k;return}if((c[i>>2]|0)<=(c[h>>2]|0)){l=k;return}Ck(c[d>>2]|0,31910,j);l=k;return}function Is(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+48|0;v=x;t=x+44|0;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>2]|0)!=0?(c[c[g>>2]>>2]=0,m=od(c[i>>2]|0,20,0)|0,c[(c[g>>2]|0)+4>>2]=m,(c[(c[g>>2]|0)+4>>2]|0)!=0):0)a=7;else a=8}else if(!(c[c[g>>2]>>2]&(c[c[g>>2]>>2]|0)-1)){c[e>>2]=Pd(c[i>>2]|0,c[(c[g>>2]|0)+4>>2]|0,(c[c[g>>2]>>2]<<1)*20|0,0)|0;if(!(c[e>>2]|0))a=8;else{c[(c[g>>2]|0)+4>>2]=c[e>>2];a=7}}else a=7;if((a|0)==7){i=c[(c[g>>2]|0)+4>>2]|0;e=c[g>>2]|0;m=c[e>>2]|0;c[e>>2]=m+1;c[j>>2]=i+(m*20|0);m=c[j>>2]|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[c[j>>2]>>2]=c[h>>2];c[f>>2]=c[g>>2];m=c[f>>2]|0;l=k;return m|0}else if((a|0)==8){ck(c[i>>2]|0,c[h>>2]|0);_j(c[i>>2]|0,c[g>>2]|0);c[f>>2]=0;m=c[f>>2]|0;l=k;return m|0}return 0}function Ls(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;if(!(c[g>>2]|0)){l=k;return}c[j>>2]=(c[(c[g>>2]|0)+4>>2]|0)+(((c[c[g>>2]>>2]|0)-1|0)*20|0);h=zj(c[c[f>>2]>>2]|0,c[c[h>>2]>>2]|0,c[(c[h>>2]|0)+4>>2]|0,0)|0;c[(c[j>>2]|0)+4>>2]=h;if(!(c[i>>2]|0)){l=k;return}Aj(c[(c[j>>2]|0)+4>>2]|0);l=k;return}function Ms(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;j=i+16|0;e=i+12|0;f=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[e>>2]=b;c[f>>2]=d;c[g>>2]=c[c[j>>2]>>2];if(!(c[e>>2]|0)){l=i;return}c[h>>2]=(c[(c[e>>2]|0)+4>>2]|0)+(((c[c[e>>2]>>2]|0)-1|0)*20|0);Hd(c[g>>2]|0,c[(c[h>>2]|0)+8>>2]|0);j=(c[(c[f>>2]|0)+8>>2]|0)-(c[(c[f>>2]|0)+4>>2]|0)|0;j=zj(c[g>>2]|0,c[(c[f>>2]|0)+4>>2]|0,j,((j|0)<0)<<31>>31)|0;c[(c[h>>2]|0)+8>>2]=j;l=i;return}function Ns(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;f=i+16|0;g=i+12|0;e=i+8|0;h=i;c[f>>2]=a;c[g>>2]=b;c[e>>2]=d;c[h>>2]=c[e>>2];if(c[e>>2]|0)a=_c(c[e>>2]|0)|0;else a=0;c[h+4>>2]=a;h=at(c[f>>2]|0,c[g>>2]|0,h,0)|0;l=i;return h|0}function Os(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=b;if(!(c[d>>2]|0)){l=f;return}c[e>>2]=(c[c[d>>2]>>2]|0)-1;while(1){b=(c[d>>2]|0)+8|0;if((c[e>>2]|0)<=0)break;a[(c[d>>2]|0)+8+((c[e>>2]|0)*72|0)+36>>0]=a[b+(((c[e>>2]|0)-1|0)*72|0)+36>>0]|0;c[e>>2]=(c[e>>2]|0)+-1}a[b+36>>0]=0;l=f;return}function Ps(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;if(!(c[g>>2]|0)){l=j;return}if((c[c[g>>2]>>2]|0)<=0){l=j;return}c[i>>2]=(c[g>>2]|0)+8+(((c[c[g>>2]>>2]|0)-1|0)*72|0);if((c[(c[h>>2]|0)+4>>2]|0)==1?(c[c[h>>2]>>2]|0)==0:0){i=(c[i>>2]|0)+36+1|0;a[i>>0]=a[i>>0]&-2|1;l=j;return}h=Kt(c[c[f>>2]>>2]|0,c[h>>2]|0)|0;c[(c[i>>2]|0)+64>>2]=h;h=(c[i>>2]|0)+36+1|0;a[h>>0]=a[h>>0]&-3|((c[(c[i>>2]|0)+64>>2]|0)!=0&1)<<1&255;l=j;return}function Qs(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[f>>2]=b;c[g>>2]=d;c[h>>2]=e;if(c[g>>2]|0){c[i>>2]=(c[g>>2]|0)+8+(((c[c[g>>2]>>2]|0)-1|0)*72|0);c[(c[i>>2]|0)+64>>2]=c[h>>2];i=(c[i>>2]|0)+36+1|0;a[i>>0]=a[i>>0]&-5|4;l=j;return}else{_j(c[c[f>>2]>>2]|0,c[h>>2]|0);l=j;return}}function Rs(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+24|0;i=o+20|0;j=o+16|0;k=o+12|0;m=o+8|0;n=o+4|0;g=o;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=f;do if(!(c[j>>2]|0)){c[j>>2]=od(c[i>>2]|0,80,0)|0;if(c[j>>2]|0){c[(c[j>>2]|0)+4>>2]=1;c[c[j>>2]>>2]=0;break}c[h>>2]=0;n=c[h>>2]|0;l=o;return n|0}while(0);c[j>>2]=CD(c[i>>2]|0,c[j>>2]|0,1,c[c[j>>2]>>2]|0)|0;if(a[(c[i>>2]|0)+69>>0]|0){fk(c[i>>2]|0,c[j>>2]|0);c[h>>2]=0;n=c[h>>2]|0;l=o;return n|0}c[n>>2]=(c[j>>2]|0)+8+(((c[c[j>>2]>>2]|0)-1|0)*72|0);if(c[m>>2]|0?(c[c[m>>2]>>2]|0)==0:0)c[m>>2]=0;if(c[m>>2]|0){c[g>>2]=c[m>>2];c[m>>2]=c[k>>2];c[k>>2]=c[g>>2]}k=Kt(c[i>>2]|0,c[k>>2]|0)|0;c[(c[n>>2]|0)+8>>2]=k;m=Kt(c[i>>2]|0,c[m>>2]|0)|0;c[(c[n>>2]|0)+4>>2]=m;c[h>>2]=c[j>>2];n=c[h>>2]|0;l=o;return n|0}function Ss(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+80|0;s=u+16|0;r=u;k=u+64|0;m=u+60|0;n=u+56|0;o=u+52|0;p=u+48|0;q=u+36|0;g=u+32|0;h=u+28|0;i=u+24|0;j=u+20|0;c[k>>2]=a;c[m>>2]=b;c[n>>2]=e;c[o>>2]=f;c[p>>2]=0;c[q>>2]=c[m>>2];c[q+4>>2]=c[n>>2];c[q+8>>2]=c[o>>2];c[h>>2]=0;while(1){if((c[h>>2]|0)>=3)break;if(!(c[q+(c[h>>2]<<2)>>2]|0))break;c[g>>2]=c[q+(c[h>>2]<<2)>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=7)break;if((c[(c[g>>2]|0)+4>>2]|0)==(d[31711+((c[i>>2]|0)*3|0)+1>>0]|0|0)?(Zc(c[c[g>>2]>>2]|0,31732+(d[31711+((c[i>>2]|0)*3|0)>>0]|0)|0,c[(c[g>>2]|0)+4>>2]|0)|0)==0:0){t=8;break}c[i>>2]=(c[i>>2]|0)+1}if((t|0)==8){t=0;c[p>>2]=c[p>>2]|(d[31711+((c[i>>2]|0)*3|0)+2>>0]|0)}if((c[i>>2]|0)>=7){t=11;break}c[h>>2]=(c[h>>2]|0)+1}if((t|0)==11)c[p>>2]=c[p>>2]|64;if((c[p>>2]&33|0)!=33?(c[p>>2]&64|0)==0:0){if(!(c[p>>2]&32)){t=c[p>>2]|0;l=u;return t|0}if((c[p>>2]&24|0)==8){t=c[p>>2]|0;l=u;return t|0}Ck(c[k>>2]|0,31810,s);c[p>>2]=1;t=c[p>>2]|0;l=u;return t|0}c[j>>2]=19911;if(!(c[o>>2]|0))c[j>>2]=(c[j>>2]|0)+1;t=c[k>>2]|0;n=c[n>>2]|0;q=c[j>>2]|0;s=c[o>>2]|0;c[r>>2]=c[m>>2];c[r+4>>2]=n;c[r+8>>2]=q;c[r+12>>2]=s;Ck(t,31766,r);c[p>>2]=1;t=c[p>>2]|0;l=u;return t|0}function Ts(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=b;c[f>>2]=d;if((c[e>>2]|0)==0|(c[f>>2]|0)<0){l=g;return}a[(c[(c[e>>2]|0)+4>>2]|0)+(((c[c[e>>2]>>2]|0)-1|0)*20|0)+12>>0]=c[f>>2];l=g;return}function Us(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;i=l;l=l+16|0;f=i+4|0;g=i;h=i+8|0;c[f>>2]=b;c[g>>2]=d;a[h>>0]=e;if(!(c[g>>2]|0)){l=i;return}c[(c[g>>2]|0)+4>>2]=c[(c[f>>2]|0)+472>>2];c[(c[f>>2]|0)+472>>2]=c[g>>2];if(!(a[h>>0]|0)){l=i;return}c[(c[f>>2]|0)+476>>2]=c[g>>2];l=i;return}function Vs(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;X=l;l=l+192|0;P=X+176|0;S=X+172|0;T=X+168|0;U=X+164|0;V=X+160|0;W=X+156|0;F=X+152|0;G=X+148|0;i=X+144|0;H=X+140|0;I=X+136|0;j=X+132|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|0))break;Fx(c[U>>2]|0,30,c[H>>2]|0,c[z>>2]|0,c[w>>2]|0,b[x>>1]|0)|0}while(0);do if(d[(c[V>>2]|0)+42>>0]&16|0){c[C>>2]=lv(c[J>>2]|0,c[V>>2]|0)|0;yA(c[P>>2]|0,c[V>>2]|0);_t(c[U>>2]|0,12,0,1,c[w>>2]|0,c[C>>2]|0,-10)|0;px(c[U>>2]|0,2);mv(c[P>>2]|0);if((c[u>>2]|0)!=1)break;if(c[(c[P>>2]|0)+124>>2]|0)break;a[(c[P>>2]|0)+20>>0]=0}else{c[D>>2]=(d[(c[P>>2]|0)+18>>0]|0)==0&1;c[E>>2]=-1;do if(!(c[A>>2]|0)){if((c[v+4>>2]|0)==(c[H>>2]|0))break;c[E>>2]=c[v+4>>2]}while(0);HC(c[P>>2]|0,c[V>>2]|0,c[B>>2]|0,c[H>>2]|0,c[I>>2]|0,c[w>>2]|0,b[x>>1]|0,c[D>>2]&255,10,c[u>>2]&255,c[E>>2]|0)}while(0);do if(!(c[u>>2]|0)){f=c[U>>2]|0;if(c[N>>2]|0){Wt(f,7,c[O>>2]|0,(c[Q>>2]|0)+1|0)|0;tx(c[U>>2]|0,c[Q>>2]|0);break}else{sx(f,c[Q>>2]|0)|0;tx(c[U>>2]|0,c[Q>>2]|0);break}}else{ux(c[U>>2]|0,c[z>>2]|0);MA(c[F>>2]|0)}while(0);if(c[R>>2]|0)break;if(d[(c[V>>2]|0)+42>>0]&16|0)break;if(!(c[N>>2]|0))kx(c[U>>2]|0,111,c[H>>2]|0)|0;c[W>>2]=0;c[G>>2]=c[(c[V>>2]|0)+8>>2];while(1){if(!(c[G>>2]|0))break c;kx(c[U>>2]|0,111,(c[I>>2]|0)+(c[W>>2]|0)|0)|0;c[W>>2]=(c[W>>2]|0)+1;c[G>>2]=c[(c[G>>2]|0)+20>>2]}}while(0);if((d[(c[P>>2]|0)+18>>0]|0)==0?(c[(c[P>>2]|0)+128>>2]|0)==0:0)CA(c[P>>2]|0);if((c[(c[J>>2]|0)+24>>2]&128|0?(a[(c[P>>2]|0)+18>>0]|0)==0:0)?(c[(c[P>>2]|0)+128>>2]|0)==0:0){Wt(c[U>>2]|0,87,c[L>>2]|0,1)|0;Xr(c[U>>2]|0,1);Yr(c[U>>2]|0,0,0,31698,0)|0}}}}}while(0);BD(K);fk(c[J>>2]|0,c[S>>2]|0);ck(c[J>>2]|0,c[T>>2]|0);Hd(c[J>>2]|0,c[M>>2]|0);l=X;return}function Ws(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;i=j;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;c[e>>2]=a;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[(c[c[e>>2]>>2]|0)+96+8>>2];if(!(c[f>>2]|0)){l=j;return}if((c[c[f>>2]>>2]|0)<=(c[h>>2]|0)){l=j;return}h=c[e>>2]|0;c[i>>2]=c[g>>2];Ck(h,31675,i);l=j;return}function Xs(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;oa=l;l=l+256|0;q=oa;ka=oa+244|0;la=oa+240|0;ma=oa+236|0;na=oa+232|0;V=oa+228|0;X=oa+224|0;B=oa+220|0;Y=oa+216|0;Z=oa+212|0;r=oa+208|0;_=oa+204|0;$=oa+200|0;aa=oa+196|0;s=oa+192|0;t=oa+188|0;ba=oa+184|0;ca=oa+180|0;da=oa+176|0;K=oa+172|0;ea=oa+168|0;fa=oa+164|0;y=oa+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,c[R>>2]|0,c[K>>2]|0,1,0,0);if(!(c[N>>2]|0))break;LC(c[ka>>2]|0,c[Y>>2]|0,c[ma>>2]|0,c[Q>>2]|0,c[ea>>2]|0,d[L>>0]|0)}while(0);do if(c[(c[da>>2]|0)+24>>2]&128|0){if(c[(c[ka>>2]|0)+128>>2]|0)break;Wt(c[_>>2]|0,91,c[ja>>2]|0,1)|0}while(0);vA(c[ka>>2]|0,c[O>>2]|0,110,c[ma>>2]|0,2,c[Y>>2]|0,c[Q>>2]|0,c[V>>2]|0,c[W>>2]|0);do if(!(c[M>>2]|0)){g=c[_>>2]|0;f=c[W>>2]|0;if(c[aa>>2]|0){ux(g,f);Wt(c[_>>2]|0,7,c[ia>>2]|0,c[Z>>2]|0)|0;break}else{sx(g,f)|0;break}}while(0);ux(c[_>>2]|0,c[ha>>2]|0);c[X>>2]=0;c[$>>2]=c[(c[Y>>2]|0)+8>>2];while(1){if(!(c[$>>2]|0))break;if(a[(c[fa>>2]|0)+((c[X>>2]|0)+1)>>0]|0)Wt(c[_>>2]|0,111,(c[ca>>2]|0)+(c[X>>2]|0)|0,0)|0;c[$>>2]=c[(c[$>>2]|0)+20>>2];c[X>>2]=(c[X>>2]|0)+1}if((c[ba>>2]|0)<(c[ca>>2]|0))Wt(c[_>>2]|0,111,c[ba>>2]|0,0)|0;do if(!(d[(c[ka>>2]|0)+18>>0]|0)){if(c[(c[ka>>2]|0)+128>>2]|0)break;CA(c[ka>>2]|0)}while(0);if(!(c[(c[da>>2]|0)+24>>2]&128))break;if(c[(c[ka>>2]|0)+128>>2]|0)break;if(a[(c[ka>>2]|0)+18>>0]|0)break;Wt(c[_>>2]|0,87,c[ja>>2]|0,1)|0;Xr(c[_>>2]|0,1);Yr(c[_>>2]|0,0,0,31662,0)|0}}}}while(0);BD(ga);Hd(c[da>>2]|0,c[ea>>2]|0);fk(c[da>>2]|0,c[la>>2]|0);_j(c[da>>2]|0,c[ma>>2]|0);ck(c[da>>2]|0,c[na>>2]|0);l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i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;oa=l;l=l+304|0;D=oa+32|0;C=oa+16|0;B=oa;fa=oa+284|0;ka=oa+280|0;la=oa+276|0;ma=oa+272|0;na=oa+268|0;F=oa+264|0;G=oa+260|0;j=oa+256|0;H=oa+252|0;I=oa+248|0;J=oa+244|0;K=oa+240|0;L=oa+236|0;M=oa+232|0;N=oa+228|0;O=oa+224|0;P=oa+220|0;Q=oa+216|0;R=oa+212|0;S=oa+208|0;T=oa+204|0;U=oa+200|0;k=oa+176|0;m=oa+172|0;V=oa+291|0;W=oa+290|0;n=oa+289|0;o=oa+288|0;X=oa+168|0;Y=oa+164|0;Z=oa+160|0;_=oa+156|0;$=oa+152|0;aa=oa+148|0;ba=oa+144|0;ca=oa+140|0;da=oa+136|0;ea=oa+132|0;p=oa+128|0;q=oa+124|0;r=oa+120|0;s=oa+116|0;t=oa+112|0;u=oa+108|0;v=oa+104|0;w=oa+72|0;x=oa+68|0;y=oa+64|0;z=oa+60|0;A=oa+56|0;ga=oa+52|0;ha=oa+48|0;ia=oa+44|0;ja=oa+40|0;c[fa>>2]=e;c[ka>>2]=f;c[la>>2]=g;c[ma>>2]=h;c[na>>2]=i;c[N>>2]=0;c[O>>2]=0;c[P>>2]=0;c[Q>>2]=-1;c[S>>2]=0;c[T>>2]=0;c[U>>2]=0;a[V>>0]=0;a[W>>0]=0;c[X>>2]=0;c[Y>>2]=0;c[Z>>2]=0;c[_>>2]=0;c[ca>>2]=0;c[F>>2]=c[c[fa>>2]>>2];c[k>>2]=0;c[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|0,c[u>>2]|0)|0;sx(c[K>>2]|0,c[v>>2]|0)|0;tx(c[K>>2]|0,c[v>>2]|0);Wu(c[fa>>2]|0,c[t>>2]|0);Wu(c[fa>>2]|0,c[u>>2]|0)}while(0);if((c[ma>>2]|0)==0&(c[M>>2]|0)>0)c[Q>>2]=b[(c[G>>2]|0)+32>>1];c[H>>2]=0;while(1){if((c[H>>2]|0)>=(b[(c[G>>2]|0)+34>>1]|0))break;c[N>>2]=(c[N>>2]|0)+(d[(c[(c[G>>2]|0)+4>>2]|0)+(c[H>>2]<<4)+15>>0]&2|0?1:0);c[H>>2]=(c[H>>2]|0)+1}if((c[ma>>2]|0)==0&(c[M>>2]|0)!=0?(c[M>>2]|0)!=((b[(c[G>>2]|0)+34>>1]|0)-(c[N>>2]|0)|0):0){na=c[fa>>2]|0;ia=(b[(c[G>>2]|0)+34>>1]|0)-(c[N>>2]|0)|0;ja=c[M>>2]|0;c[C>>2]=c[ka>>2];c[C+4>>2]=0;c[C+8>>2]=ia;c[C+12>>2]=ja;Ck(na,30799,C);break a}do if(c[ma>>2]|0){if((c[M>>2]|0)==(c[(c[ma>>2]|0)+4>>2]|0))break;na=c[fa>>2]|0;ja=c[(c[ma>>2]|0)+4>>2]|0;c[D>>2]=c[M>>2];c[D+4>>2]=ja;Ck(na,30851,D);break a}while(0);if(c[(c[F>>2]|0)+24>>2]&128|0){C=(c[fa>>2]|0)+44|0;D=(c[C>>2]|0)+1|0;c[C>>2]=D;c[_>>2]=D;Wt(c[K>>2]|0,76,0,c[_>>2]|0)|0}d:do if(!(c[da>>2]|0)){c[x>>2]=Lz(c[fa>>2]|0,c[G>>2]|0,105,0,-1,0,O,P)|0;c[ca>>2]=od(c[F>>2]|0,(c[x>>2]|0)+1<<2,0)|0;if(!(c[ca>>2]|0))break a;c[H>>2]=0;while(1){if((c[H>>2]|0)>=(c[x>>2]|0))break d;C=(c[fa>>2]|0)+44|0;D=(c[C>>2]|0)+1|0;c[C>>2]=D;c[(c[ca>>2]|0)+(c[H>>2]<<2)>>2]=D;c[H>>2]=(c[H>>2]|0)+1}}while(0);do if(a[V>>0]|0){c[T>>2]=kx(c[K>>2]|0,57,c[S>>2]|0)|0;c[U>>2]=Vu(c[K>>2]|0)|0}else{if(!(c[la>>2]|0))break;D=kx(c[K>>2]|0,16,c[k+8>>2]|0)|0;c[U>>2]=D;c[T>>2]=D}while(0);c[R>>2]=qx(c[K>>2]|0)|0;if(c[p>>2]&1|0){c[y>>2]=Sx(c[fa>>2]|0,(b[(c[G>>2]|0)+34>>1]|0)+1|0)|0;if((c[Q>>2]|0)<0)Wt(c[K>>2]|0,76,-1,c[y>>2]|0)|0;else{if(a[V>>0]|0)Xt(c[K>>2]|0,96,c[S>>2]|0,c[Q>>2]|0,c[y>>2]|0)|0;else ay(c[fa>>2]|0,c[(c[(c[X>>2]|0)+4>>2]|0)+((c[Q>>2]|0)*20|0)>>2]|0,c[y>>2]|0);c[z>>2]=kx(c[K>>2]|0,35,c[y>>2]|0)|0;Wt(c[K>>2]|0,76,-1,c[y>>2]|0)|0;tx(c[K>>2]|0,c[z>>2]|0);kx(c[K>>2]|0,17,c[y>>2]|0)|0}c[I>>2]=0;c[H>>2]=0;while(1){if((c[H>>2]|0)>=(b[(c[G>>2]|0)+34>>1]|0))break;e:do if(c[ma>>2]|0){c[I>>2]=0;while(1){if((c[I>>2]|0)>=(c[(c[ma>>2]|0)+4>>2]|0))break e;if((c[(c[c[ma>>2]>>2]|0)+(c[I>>2]<<3)+4>>2]|0)==(c[H>>2]|0))break e;c[I>>2]=(c[I>>2]|0)+1}}while(0);do if((a[V>>0]|0)!=0|(c[X>>2]|0)!=0){if(c[ma>>2]|0?(c[I>>2]|0)>=(c[(c[ma>>2]|0)+4>>2]|0):0){E=90;break}if(a[V>>0]|0){Xt(c[K>>2]|0,96,c[S>>2]|0,c[I>>2]|0,(c[y>>2]|0)+(c[H>>2]|0)+1|0)|0;break}else{tA(c[fa>>2]|0,c[(c[(c[X>>2]|0)+4>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0;Wt(c[K>>2]|0,34,c[aa>>2]|0,(c[ga>>2]|0)+2|0)|0}else{c[ga>>2]=kx(e,35,c[aa>>2]|0)|0;Xt(c[K>>2]|0,114,c[O>>2]|0,c[aa>>2]|0,c[Z>>2]|0)|0;tx(c[K>>2]|0,c[ga>>2]|0)}kx(c[K>>2]|0,17,c[aa>>2]|0)|0}else{do if(!(d[(c[G>>2]|0)+42>>0]&16)){if(d[n>>0]|0)break;Xt(c[K>>2]|0,114,c[O>>2]|0,c[aa>>2]|0,c[Z>>2]|0)|0;a[W>>0]=1;break f}while(0);Wt(c[K>>2]|0,79,0,c[aa>>2]|0)|0}while(0);wA(c[fa>>2]|0,c[Z>>2]|0,c[aa>>2]|0);c[N>>2]=0;c[H>>2]=0;while(1){if((c[H>>2]|0)>=(b[(c[G>>2]|0)+34>>1]|0))break;c[ha>>2]=(c[aa>>2]|0)+1+(c[H>>2]|0);g:do if((c[H>>2]|0)==(b[(c[G>>2]|0)+32>>1]|0))kx(c[K>>2]|0,80,c[ha>>2]|0)|0;else{h:do if(!(c[ma>>2]|0))if(d[(c[(c[G>>2]|0)+4>>2]|0)+(c[H>>2]<<4)+15>>0]&2|0){c[I>>2]=-1;c[N>>2]=(c[N>>2]|0)+1;break}else{c[I>>2]=(c[H>>2]|0)-(c[N>>2]|0);break}else{c[I>>2]=0;while(1){if((c[I>>2]|0)>=(c[(c[ma>>2]|0)+4>>2]|0))break h;if((c[(c[c[ma>>2]>>2]|0)+(c[I>>2]<<3)+4>>2]|0)==(c[H>>2]|0))break h;c[I>>2]=(c[I>>2]|0)+1}}while(0);do if(!((c[I>>2]|0)<0|(c[M>>2]|0)==0)){if(c[ma>>2]|0?(c[I>>2]|0)>=(c[(c[ma>>2]|0)+4>>2]|0):0)break;if(a[V>>0]|0){Xt(c[K>>2]|0,96,c[S>>2]|0,c[I>>2]|0,c[ha>>2]|0)|0;break g}if(!(c[la>>2]|0)){ay(c[fa>>2]|0,c[(c[(c[X>>2]|0)+4>>2]|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]|0,c[U>>2]|0)|0;tx(c[K>>2]|0,c[T>>2]|0)}while(0);if(c[da>>2]|0?1:(d[(c[G>>2]|0)+42>>0]&16|0)!=0)break;if((c[O>>2]|0)<(c[P>>2]|0))kx(c[K>>2]|0,111,c[O>>2]|0)|0;c[J>>2]=0;c[L>>2]=c[(c[G>>2]|0)+8>>2];while(1){if(!(c[L>>2]|0))break b;kx(c[K>>2]|0,111,(c[J>>2]|0)+(c[P>>2]|0)|0)|0;c[L>>2]=c[(c[L>>2]|0)+20>>2];c[J>>2]=(c[J>>2]|0)+1}}while(0);if((d[(c[fa>>2]|0)+18>>0]|0)==0?(c[(c[fa>>2]|0)+128>>2]|0)==0:0)CA(c[fa>>2]|0);if((c[(c[F>>2]|0)+24>>2]&128|0?(a[(c[fa>>2]|0)+18>>0]|0)==0:0)?(c[(c[fa>>2]|0)+128>>2]|0)==0:0){Wt(c[K>>2]|0,87,c[_>>2]|0,1)|0;Xr(c[K>>2]|0,1);Yr(c[K>>2]|0,0,0,30876,0)|0}}}while(0);fk(c[F>>2]|0,c[ka>>2]|0);_j(c[F>>2]|0,c[X>>2]|0);Zj(c[F>>2]|0,c[la>>2]|0);hk(c[F>>2]|0,c[ma>>2]|0);Hd(c[F>>2]|0,c[ca>>2]|0);l=oa;return}function _s(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;f=j+16|0;e=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[g>>2]=b;c[h>>2]=d;if((c[g>>2]|0)==0?(c[g>>2]=jl(c[e>>2]|0,8,0)|0,(c[g>>2]|0)==0):0){c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}a=lA(c[e>>2]|0,c[c[g>>2]>>2]|0,8,(c[g>>2]|0)+4|0,i)|0;c[c[g>>2]>>2]=a;a=c[e>>2]|0;if((c[i>>2]|0)<0){hk(a,c[g>>2]|0);c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}else{h=Kt(a,c[h>>2]|0)|0;c[(c[c[g>>2]>>2]|0)+(c[i>>2]<<3)>>2]=h;c[f>>2]=c[g>>2];i=c[f>>2]|0;l=j;return i|0}return 0}function $s(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=l;l=l+16|0;f=e+8|0;h=e+4|0;g=e;c[f>>2]=a;c[h>>2]=b;c[g>>2]=d;c[(c[f>>2]|0)+4>>2]=c[c[h>>2]>>2];c[(c[f>>2]|0)+8>>2]=(c[c[g>>2]>>2]|0)+(c[(c[g>>2]|0)+4>>2]|0);l=e;return}function at(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;i=q+24|0;j=q+20|0;m=q+16|0;n=q+12|0;o=q+8|0;p=q+4|0;k=q;c[i>>2]=e;c[j>>2]=f;c[m>>2]=g;c[n>>2]=h;c[p>>2]=0;c[k>>2]=0;do if(c[m>>2]|0){if(((c[j>>2]|0)==134?c[c[m>>2]>>2]|0:0)?Nf(c[c[m>>2]>>2]|0,k)|0:0)break;c[p>>2]=(c[(c[m>>2]|0)+4>>2]|0)+1}while(0);c[o>>2]=od(c[i>>2]|0,48+(c[p>>2]|0)|0,0)|0;if(!(c[o>>2]|0)){p=c[o>>2]|0;l=q;return p|0}e=c[o>>2]|0;f=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(f|0));a[c[o>>2]>>0]=c[j>>2];b[(c[o>>2]|0)+34>>1]=-1;do if(c[m>>2]|0){e=c[o>>2]|0;if(!(c[p>>2]|0)){p=e+4|0;c[p>>2]=c[p>>2]|1024;c[(c[o>>2]|0)+8>>2]=c[k>>2];break}c[(c[o>>2]|0)+8>>2]=e+48;if(c[(c[m>>2]|0)+4>>2]|0)MR(c[(c[o>>2]|0)+8>>2]|0,c[c[m>>2]>>2]|0,c[(c[m>>2]|0)+4>>2]|0)|0;a[(c[(c[o>>2]|0)+8>>2]|0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=yf+416|0;Ye=yf+408|0;Xe=yf+400|0;We=yf+392|0;qf=yf+376|0;pf=yf+368|0;of=yf+360|0;nf=yf+352|0;tf=yf+1656|0;rf=yf+1652|0;sf=yf+1648|0;vf=yf+1644|0;wf=yf+1640|0;gf=yf+1862|0;ne=yf+1861|0;ye=yf+1636|0;xf=yf+1632|0;k=yf+1628|0;w=yf+1624|0;J=yf+1620|0;W=yf+1616|0;fa=yf+1612|0;qa=yf+1608|0;Ba=yf+1604|0;uf=yf+344|0;g=yf+1600|0;eb=yf+1596|0;qb=yf+1592|0;Ib=yf+1588|0;mf=yf+1584|0;bc=yf+1580|0;mc=yf+1670|0;xc=yf+1576|0;Ic=yf+1572|0;Tc=yf+1568|0;dd=yf+1564|0;qd=yf+1560|0;xd=yf+1556|0;zd=yf+1552|0;Ad=yf+336|0;Bd=yf+1860|0;Dd=yf+1668|0;Ed=yf+1666|0;Fd=yf+1664|0;Gd=yf+328|0;Id=yf+320|0;Jd=yf+312|0;Ld=yf+304|0;Md=yf+1548|0;Nd=yf+1544|0;Od=yf+1540|0;Pd=yf+1536|0;Qd=yf+296|0;Rd=yf+288|0;Sd=yf+280|0;Td=yf+1859|0;Ud=yf+1532|0;Vd=yf+1528|0;Wd=yf+1858|0;Xd=yf+1662|0;Yd=yf+1660|0;Zd=yf+1524|0;_d=yf+1520|0;$d=yf+1516|0;ae=yf+1512|0;be=yf+1508|0;ce=yf+1504|0;de=yf+1500|0;ee=yf+1496|0;fe=yf+1492|0;ge=yf+1488|0;he=yf+1484|0;ie=yf+1480|0;je=yf+1476|0;ke=yf+1472|0;le=yf+1468|0;me=yf+1464|0;oe=yf+1460|0;pe=yf+1456|0;qe=yf+240|0;re=yf+1452|0;se=yf+1448|0;te=yf+1444|0;ue=yf+1440|0;ve=yf+232|0;we=yf+1436|0;xe=yf+1432|0;ze=yf+1428|0;Ae=yf+1424|0;Be=yf+1857|0;Ce=yf+1420|0;De=yf+1416|0;Ee=yf+224|0;Fe=yf+1412|0;Ge=yf+216|0;He=yf+208|0;Ie=yf+1408|0;Je=yf+1404|0;Ke=yf+1400|0;Le=yf+1396|0;Me=yf+1392|0;Ne=yf+1388|0;Oe=yf+1384|0;Pe=yf+1380|0;Qe=yf+1376|0;Re=yf+1372|0;Se=yf+200|0;m=yf+1368|0;n=yf+1364|0;o=yf+1360|0;p=yf+1356|0;q=yf+1352|0;r=yf+1348|0;s=yf+1344|0;t=yf+1340|0;u=yf+1336|0;v=yf+1332|0;x=yf+1328|0;lf=yf+1324|0;y=yf+1320|0;C=yf+1316|0;D=yf+1312|0;E=yf+1308|0;F=yf+1304|0;G=yf+1300|0;H=yf+1296|0;I=yf+1292|0;K=yf+1288|0;L=yf+1284|0;M=yf+1280|0;O=yf+1276|0;Q=yf+1272|0;R=yf+1268|0;S=yf+1264|0;T=yf+1260|0;U=yf+1256|0;V=yf+1252|0;X=yf+1248|0;Y=yf+1244|0;Z=yf+1240|0;_=yf+1236|0;$=yf+1232|0;aa=yf+1228|0;ba=yf+1224|0;ca=yf+1208|0;da=yf+1200|0;ea=yf+192|0;ga=yf+1196|0;ha=yf+1192|0;ia=yf+1188|0;ja=yf+1184|0;ka=yf+1180|0;la=yf+1176|0;ma=yf+1172|0;na=yf+1168|0;oa=yf+1152|0;pa=yf+1674|0;ra=yf+1148|0;sa=yf+1144|0;ta=yf+1140|0;ua=yf+184|0;va=yf+176|0;wa=yf+1136|0;xa=yf+1132|0;ya=yf+1128|0;za=yf+1124|0;Aa=yf+1120|0;Ca=yf+1116|0;Da=yf+1112|0;Ea=yf+1108|0;Fa=yf+1104|0;Ga=yf+1100|0;Ha=yf+1096|0;Ia=yf+1092|0;Ja=yf+144|0;Ka=yf+1088|0;La=yf+1084|0;Ma=yf+1080|0;Na=yf+1076|0;Oa=yf+1072|0;Pa=yf+1068|0;Qa=yf+1064|0;Ra=yf+1060|0;Sa=yf+1056|0;Ta=yf+1052|0;Ua=yf+1048|0;Va=yf+1044|0;Wa=yf+136|0;Xa=yf+1040|0;Ya=yf+1036|0;Za=yf+1032|0;_a=yf+1028|0;$a=yf+1024|0;ab=yf+1020|0;bb=yf+1016|0;cb=yf+1012|0;db=yf+1008|0;fb=yf+1004|0;gb=yf+1e3|0;hb=yf+996|0;ib=yf+104|0;jb=yf+992|0;kb=yf+988|0;lb=yf+984|0;mb=yf+968|0;nb=yf+964|0;pb=yf+960|0;sb=yf+96|0;vb=yf+956|0;Ab=yf+952|0;Bb=yf+936|0;Cb=yf+932|0;Db=yf+928|0;Eb=yf+924|0;Fb=yf+920|0;Gb=yf+916|0;Hb=yf+912|0;Jb=yf+908|0;Kb=yf+904|0;Lb=yf+900|0;Mb=yf+896|0;Nb=yf+880|0;Ob=yf+872|0;Pb=yf+868|0;Qb=yf+864|0;Rb=yf+860|0;Sb=yf+856|0;Tb=yf+88|0;Ub=yf+852|0;Vb=yf+848|0;Wb=yf+844|0;Xb=yf+840|0;Yb=yf+836|0;Zb=yf+832|0;_b=yf+828|0;$b=yf+824|0;ac=yf+820|0;cc=yf+816|0;dc=yf+812|0;ec=yf+808|0;fc=yf+804|0;gc=yf+800|0;hc=yf+796|0;ic=yf+792|0;jc=yf+788|0;kc=yf+784|0;lc=yf+48|0;nc=yf+780|0;oc=yf+776|0;pc=yf+764|0;qc=yf+760|0;rc=yf+756|0;sc=yf+752|0;tc=yf+748|0;uc=yf+744|0;vc=yf+740|0;wc=yf+736|0;yc=yf+1673|0;zc=yf+732|0;Ac=yf+728|0;Bc=yf+724|0;Cc=yf+8|0;Dc=yf+720|0;Ec=yf+716|0;Fc=yf+712|0;Gc=yf+708|0;Hc=yf+704|0;Jc=yf+700|0;Kc=yf+696|0;Lc=yf+692|0;Mc=yf+688|0;Nc=yf+684|0;Oc=yf+680|0;Pc=yf+676|0;Qc=yf+672|0;Rc=yf+668|0;Sc=yf+664|0;Uc=yf+660|0;Vc=yf+656|0;Wc=yf+652|0;Xc=yf+648|0;Yc=yf+616|0;Zc=yf+612|0;$c=yf+608|0;ad=yf+604|0;bd=yf+600|0;cd=yf+596|0;ed=yf+592|0;fd=yf+588|0;gd=yf+584|0;id=yf+580|0;jd=yf+576|0;kd=yf+572|0;ld=yf;md=yf+568|0;nd=yf+564|0;pd=yf+1672|0;rd=yf+560|0;sd=yf+556|0;td=yf+552|0;ud=yf+548|0;vd=yf+544|0;wd=yf+540|0;c[tf>>2]=f;c[rf>>2]=c[(c[tf>>2]|0)+88>>2];c[sf>>2]=c[rf>>2];c[vf>>2]=0;c[wf>>2]=c[c[tf>>2]>>2];a[gf>>0]=0;a[ne>>0]=a[(c[wf>>2]|0)+66>>0]|0;c[ye>>2]=0;c[xf>>2]=0;c[k>>2]=0;c[w>>2]=c[(c[tf>>2]|0)+92>>2];c[J>>2]=0;c[W>>2]=0;c[fa>>2]=0;c[qa>>2]=0;c[Ba>>2]=0;zf=(c[wf>>2]|0)+32|0;f=c[zf+4>>2]|0;i=uf;c[i>>2]=c[zf>>2];c[i+4>>2]=f;br(c[tf>>2]|0);a:do if((c[(c[tf>>2]|0)+40>>2]|0)==7)j=887;else{c[(c[tf>>2]|0)+40>>2]=0;zf=(c[tf>>2]|0)+56|0;c[zf>>2]=0;c[zf+4>>2]=0;c[(c[tf>>2]|0)+104>>2]=0;c[(c[wf>>2]|0)+380+8>>2]=0;b:do if(!(c[(c[wf>>2]|0)+248>>2]|0)){if(c[(c[wf>>2]|0)+304>>2]|0){c[g>>2]=c[(c[tf>>2]|0)+156+16>>2];c[k>>2]=(c[(c[wf>>2]|0)+312>>2]|0)-(((c[g>>2]|0)>>>0)%((c[(c[wf>>2]|0)+312>>2]|0)>>>0)|0)}c[sf>>2]=(c[rf>>2]|0)+((c[(c[tf>>2]|0)+36>>2]|0)*20|0);c:while(1){c[xf>>2]=(c[xf>>2]|0)+1;d:do switch(d[c[sf>>2]>>0]|0){case 87:{j=64;break c}case 1:{j=395;break c}case 13:{j=7;break}case 14:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);b[(c[J>>2]|0)+8>>1]=4;zf=((c[sf>>2]|0)-(c[rf>>2]|0)|0)/20|0;j=c[J>>2]|0;c[j>>2]=zf;c[j+4>>2]=((zf|0)<0)<<31>>31;j=14;break}case 72:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[sf>>2]=(c[rf>>2]|0)+((c[c[J>>2]>>2]|0)*20|0);b[(c[J>>2]|0)+8>>1]=128;break}case 15:{c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);i=(c[(c[sf>>2]|0)+12>>2]|0)-1|0;zf=c[qa>>2]|0;c[zf>>2]=i;c[zf+4>>2]=((i|0)<0)<<31>>31;b[(c[qa>>2]|0)+8>>1]=4;if(c[(c[sf>>2]|0)+8>>2]|0)j=14;break}case 73:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[eb>>2]=(c[rf>>2]|0)+((c[c[J>>2]>>2]|0)*20|0);c[sf>>2]=(c[rf>>2]|0)+(((c[(c[eb>>2]|0)+8>>2]|0)-1|0)*20|0);b[(c[J>>2]|0)+8>>1]=128;break}case 16:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);b[(c[J>>2]|0)+8>>1]=4;c[qb>>2]=c[c[J>>2]>>2];i=((c[sf>>2]|0)-(c[rf>>2]|0)|0)/20|0;zf=c[J>>2]|0;c[zf>>2]=i;c[zf+4>>2]=((i|0)<0)<<31>>31;c[sf>>2]=(c[rf>>2]|0)+((c[qb>>2]|0)*20|0);break}case 74:{c[fa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);if(e[(c[fa>>2]|0)+8>>1]&1|0)j=20;break}case 75:{j=20;break}case 76:{c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;i=c[(c[sf>>2]|0)+4>>2]|0;zf=c[qa>>2]|0;c[zf>>2]=i;c[zf+4>>2]=((i|0)<0)<<31>>31;break}case 77:{c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;g=c[(c[sf>>2]|0)+16>>2]|0;i=c[g+4>>2]|0;zf=c[qa>>2]|0;c[zf>>2]=c[g>>2];c[zf+4>>2]=i;break}case 132:{c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;b[(c[qa>>2]|0)+8>>1]=8;h[c[qa>>2]>>3]=+h[c[(c[sf>>2]|0)+16>>2]>>3];break}case 97:{c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;a[c[sf>>2]>>0]=78;zf=_c(c[(c[sf>>2]|0)+16>>2]|0)|0;c[(c[sf>>2]|0)+4>>2]=zf;if((d[ne>>0]|0)!=1){c[vf>>2]=Jh(c[qa>>2]|0,c[(c[sf>>2]|0)+16>>2]|0,-1,1,0)|0;if(Vh(c[qa>>2]|0,d[ne>>0]|0)|0){j=887;break a}c[(c[qa>>2]|0)+24>>2]=0;zf=(c[qa>>2]|0)+8|0;b[zf>>1]=e[zf>>1]|2048;if((a[(c[sf>>2]|0)+1>>0]|0)==-1)Hd(c[wf>>2]|0,c[(c[sf>>2]|0)+16>>2]|0);a[(c[sf>>2]|0)+1>>0]=-1;c[(c[sf>>2]|0)+16>>2]=c[(c[qa>>2]|0)+16>>2];c[(c[sf>>2]|0)+4>>2]=c[(c[qa>>2]|0)+12>>2]}if((c[(c[sf>>2]|0)+4>>2]|0)>(c[(c[wf>>2]|0)+96>>2]|0)){j=886;break c}else j=43;break}case 78:{j=43;break}case 79:{c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;c[bc>>2]=(c[(c[sf>>2]|0)+12>>2]|0)-(c[(c[sf>>2]|0)+8>>2]|0);zf=(c[(c[sf>>2]|0)+4>>2]|0?257:1)&65535;b[mc>>1]=zf;b[(c[qa>>2]|0)+8>>1]=zf;c[(c[qa>>2]|0)+12>>2]=0;while(1){if((c[bc>>2]|0)<=0)break d;c[qa>>2]=(c[qa>>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>2]|0,4096);if(e[(c[qa>>2]|0)+8>>1]&4096|0?Nh(c[qa>>2]|0)|0:0){j=887;break a}zf=c[qd>>2]|0;c[qd>>2]=zf+-1;if(!zf)break d;c[qa>>2]=(c[qa>>2]|0)+40;c[J>>2]=(c[J>>2]|0)+40}}case 85:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);Ri(c[qa>>2]|0,c[J>>2]|0,4096);break}case 86:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);zf=c[J>>2]|0;Dh(c[qa>>2]|0,c[zf>>2]|0,c[zf+4>>2]|0);break}case 52:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[W>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);if((e[(c[J>>2]|0)+8>>1]|e[(c[W>>2]|0)+8>>1])&1|0){Fh(c[qa>>2]|0);break d}if(e[(c[J>>2]|0)+8>>1]&16384|0?Oh(c[J>>2]|0)|0:0){j=887;break a}if(e[(c[W>>2]|0)+8>>1]&16384|0?Oh(c[W>>2]|0)|0:0){j=887;break a}if((e[(c[J>>2]|0)+8>>1]&18|0)==0?Xh(c[J>>2]|0,a[ne>>0]|0,0)|0:0){j=887;break a}if((e[(c[W>>2]|0)+8>>1]&18|0)==0?Xh(c[W>>2]|0,a[ne>>0]|0,0)|0:0){j=887;break a}f=(c[(c[J>>2]|0)+12>>2]|0)+(c[(c[W>>2]|0)+12>>2]|0)|0;i=Ad;c[i>>2]=f;c[i+4>>2]=((f|0)<0)<<31>>31;i=Ad;f=c[i+4>>2]|0;zf=c[(c[wf>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g=c[W>>2]|0;i=c[g+4>>2]|0;zf=Id;c[zf>>2]=c[g>>2];c[zf+4>>2]=i;a[Bd>>0]=1;switch(d[c[sf>>2]>>0]|0){case 47:{zf=Gd;if(li(Id,c[zf>>2]|0,c[zf+4>>2]|0)|0)break f;break}case 48:{zf=Gd;if(ZE(Id,c[zf>>2]|0,c[zf+4>>2]|0)|0)break f;break}case 49:{zf=Gd;if(_E(Id,c[zf>>2]|0,c[zf+4>>2]|0)|0)break f;break}case 50:{zf=Gd;if((c[zf>>2]|0)==0&(c[zf+4>>2]|0)==0)break e;i=Gd;zf=Id;if(((c[i>>2]|0)==-1?(c[i+4>>2]|0)==-1:0)&((c[zf>>2]|0)==0?(c[zf+4>>2]|0)==-2147483648:0))break f;i=Gd;g=Id;zf=Id;c[zf>>2]=LR(c[g>>2]|0,c[g+4>>2]|0,c[i>>2]|0,c[i+4>>2]|0)|0;c[zf+4>>2]=z;break}default:{zf=Gd;if((c[zf>>2]|0)==0&(c[zf+4>>2]|0)==0)break e;zf=Gd;if((c[zf>>2]|0)==-1?(c[zf+4>>2]|0)==-1:0){zf=Gd;c[zf>>2]=1;c[zf+4>>2]=0}i=Gd;g=Id;zf=Id;c[zf>>2]=VR(c[g>>2]|0,c[g+4>>2]|0,c[i>>2]|0,c[i+4>>2]|0)|0;c[zf+4>>2]=z}}g=Id;i=c[g+4>>2]|0;zf=c[qa>>2]|0;c[zf>>2]=c[g>>2];c[zf+4>>2]=i;b[(c[qa>>2]|0)+8>>1]=e[(c[qa>>2]|0)+8>>1]&-49664|4;break d}else a[Bd>>0]=0;while(0);h[Jd>>3]=+ni(c[J>>2]|0);h[Ld>>3]=+ni(c[W>>2]|0);switch(d[c[sf>>2]>>0]|0){case 47:{h[Ld>>3]=+h[Ld>>3]+ +h[Jd>>3];break}case 48:{h[Ld>>3]=+h[Ld>>3]-+h[Jd>>3];break}case 49:{h[Ld>>3]=+h[Ld>>3]*+h[Jd>>3];break}case 50:{if(+h[Jd>>3]==0.0)break e;h[Ld>>3]=+h[Ld>>3]/+h[Jd>>3];break}default:{Af=+h[Jd>>3];zf=+B(Af)>=1.0?(Af>0.0?~~+P(+A(Af/4294967296.0),4294967295.0)>>>0:~~+N((Af-+(~~Af>>>0))/4294967296.0)>>>0):0;i=Gd;c[i>>2]=~~Af>>>0;c[i+4>>2]=zf;Af=+h[Ld>>3];i=+B(Af)>=1.0?(Af>0.0?~~+P(+A(Af/4294967296.0),4294967295.0)>>>0:~~+N((Af-+(~~Af>>>0))/4294967296.0)>>>0):0;zf=Id;c[zf>>2]=~~Af>>>0;c[zf+4>>2]=i;zf=Gd;if((c[zf>>2]|0)==0&(c[zf+4>>2]|0)==0)break e;zf=Gd;if((c[zf>>2]|0)==-1?(c[zf+4>>2]|0)==-1:0){zf=Gd;c[zf>>2]=1;c[zf+4>>2]=0}i=Id;zf=Gd;h[Ld>>3]=+((VR(c[i>>2]|0,c[i+4>>2]|0,c[zf>>2]|0,c[zf+4>>2]|0)|0)>>>0)+4294967296.0*+(z|0)}}if(!(Cd(+h[Ld>>3])|0)){h[c[qa>>2]>>3]=+h[Ld>>3];b[(c[qa>>2]|0)+8>>1]=e[(c[qa>>2]|0)+8>>1]&-49664|8;if(a[Bd>>0]|0?1:((e[Ed>>1]|e[Fd>>1])&8|0)!=0)break d;ui(c[qa>>2]|0);break d}}while(0);Fh(c[qa>>2]|0);break}case 88:{if(c[(c[sf>>2]|0)+4>>2]|0)Dh((c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0)|0,0,0);break}case 89:{c[Md>>2]=d[(c[sf>>2]|0)+3>>0];c[Nd>>2]=od(c[wf>>2]|0,32+((c[Md>>2]|0)-1<<2)|0,0)|0;if(!(c[Nd>>2]|0)){j=887;break a}c[c[Nd>>2]>>2]=0;c[(c[Nd>>2]|0)+4>>2]=c[(c[sf>>2]|0)+16>>2];c[(c[Nd>>2]|0)+16>>2]=((c[sf>>2]|0)-(c[rf>>2]|0)|0)/20|0;c[(c[Nd>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>2]|0)+8>>1]=e[(c[J>>2]|0)+8>>1]&-49664|4;break}case 92:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(e[(c[J>>2]|0)+8>>1]&4|0)iv(c[J>>2]|0)|0;break}case 93:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(e[(c[J>>2]|0)+8>>1]&16384|0)f=Oh(c[J>>2]|0)|0;else f=0;c[vf>>2]=f;bv(c[J>>2]|0,c[(c[sf>>2]|0)+8>>2]&255,a[ne>>0]|0);if(c[vf>>2]|0)break a;break}case 41:case 38:case 39:case 40:case 36:case 37:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[fa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);b[Xd>>1]=b[(c[J>>2]|0)+8>>1]|0;b[Yd>>1]=b[(c[fa>>2]|0)+8>>1]|0;f=d[(c[sf>>2]|0)+3>>0]|0;do if((e[Xd>>1]|e[Yd>>1])&1|0){if(!(f&128))if(!(d[(c[sf>>2]|0)+3>>0]&32|0))if(d[(c[sf>>2]|0)+3>>0]&16|0){j=14;break d}else break d;else{c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);c[ye>>2]=1;b[(c[qa>>2]|0)+8>>1]=e[(c[qa>>2]|0)+8>>1]&-49664|1;break d}if((e[Xd>>1]&1|0?e[Yd>>1]&1|0:0)?(e[Yd>>1]&256|0)==0:0){c[Ud>>2]=0;break}c[Ud>>2]=1}else{a[Wd>>0]=f&71;if((a[Wd>>0]|0)>=67){if((e[Xd>>1]|e[Yd>>1])&2|0){if((e[Xd>>1]&14|0)==2){ti(c[J>>2]|0,0);b[Yd>>1]=b[(c[fa>>2]|0)+8>>1]|0}if((e[Yd>>1]&14|0)==2)ti(c[fa>>2]|0,0)}if(e[(c[J>>2]|0)+8>>1]&e[(c[fa>>2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>2]=(c[Vd>>2]|0)!=0&1;if(d[(c[sf>>2]|0)+3>>0]&8|0?((d[c[sf>>2]>>0]|0)==37|0)==(c[Vd>>2]|0):0)break d;b[(c[qa>>2]|0)+8>>1]=e[(c[qa>>2]|0)+8>>1]&-49664|4;zf=c[Vd>>2]|0;Bf=c[qa>>2]|0;c[Bf>>2]=zf;c[Bf+4>>2]=((zf|0)<0)<<31>>31;break}case 42:{if(c[ye>>2]|0)j=14;break}case 94:{c[Ba>>2]=(c[(c[sf>>2]|0)+16>>2]|0)+4;break}case 95:{if(!(d[(c[sf>>2]|0)+3>>0]&1))c[Ba>>2]=0;c[Zd>>2]=c[(c[sf>>2]|0)+12>>2];c[be>>2]=c[(c[sf>>2]|0)+16>>2];c[$d>>2]=c[(c[sf>>2]|0)+4>>2];c[ae>>2]=c[(c[sf>>2]|0)+8>>2];c[_d>>2]=0;while(1){if((c[_d>>2]|0)>=(c[Zd>>2]|0))break;if(c[Ba>>2]|0)f=c[(c[Ba>>2]|0)+(c[_d>>2]<<2)>>2]|0;else f=c[_d>>2]|0;c[ce>>2]=f;c[de>>2]=c[(c[be>>2]|0)+20+(c[_d>>2]<<2)>>2];c[ee>>2]=d[(c[(c[be>>2]|0)+16>>2]|0)+(c[_d>>2]|0)>>0];c[ye>>2]=Li((c[w>>2]|0)+(((c[$d>>2]|0)+(c[ce>>2]|0)|0)*40|0)|0,(c[w>>2]|0)+(((c[ae>>2]|0)+(c[ce>>2]|0)|0)*40|0)|0,c[de>>2]|0)|0;if(c[ye>>2]|0){j=218;break}c[_d>>2]=(c[_d>>2]|0)+1}if((j|0)==218?(j=0,c[ee>>2]|0):0)c[ye>>2]=0-(c[ye>>2]|0);c[Ba>>2]=0;break}case 18:{if((c[ye>>2]|0)<0){c[sf>>2]=(c[rf>>2]|0)+(((c[(c[sf>>2]|0)+4>>2]|0)-1|0)*20|0);break d}f=c[rf>>2]|0;g=c[sf>>2]|0;if(!(c[ye>>2]|0)){c[sf>>2]=f+(((c[g+8>>2]|0)-1|0)*20|0);break d}else{c[sf>>2]=f+(((c[g+12>>2]|0)-1|0)*20|0);break d}}case 27:case 28:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(e[(c[J>>2]|0)+8>>1]&1|0)c[fe>>2]=2;else{Bf=pi(c[J>>2]|0)|0;c[fe>>2]=((Bf|0)!=0|(z|0)!=0)&1}c[W>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);if(e[(c[W>>2]|0)+8>>1]&1|0)c[ge>>2]=2;else{Bf=pi(c[W>>2]|0)|0;c[ge>>2]=((Bf|0)!=0|(z|0)!=0)&1}f=((c[fe>>2]|0)*3|0)+(c[ge>>2]|0)|0;if((d[c[sf>>2]>>0]|0)==28)c[fe>>2]=d[35670+f>>0];else c[fe>>2]=d[35679+f>>0];c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);if((c[fe>>2]|0)==2){f=(e[(c[qa>>2]|0)+8>>1]&-49664|1)&65535;g=c[qa>>2]|0}else{g=c[fe>>2]|0;f=c[qa>>2]|0;c[f>>2]=g;c[f+4>>2]=((g|0)<0)<<31>>31;f=(e[(c[qa>>2]|0)+8>>1]&-49664|4)&65535;g=c[qa>>2]|0}b[g+8>>1]=f;break}case 19:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);Fh(c[qa>>2]|0);if(!(e[(c[J>>2]|0)+8>>1]&1)){b[(c[qa>>2]|0)+8>>1]=4;zf=pi(c[J>>2]|0)|0;zf=(((zf|0)!=0|(z|0)!=0)^1)&1;Bf=c[qa>>2]|0;c[Bf>>2]=zf;c[Bf+4>>2]=((zf|0)<0)<<31>>31}break}case 54:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[qa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);Fh(c[qa>>2]|0);if(!(e[(c[J>>2]|0)+8>>1]&1)){b[(c[qa>>2]|0)+8>>1]=4;zf=pi(c[J>>2]|0)|0;Bf=c[qa>>2]|0;c[Bf>>2]=~zf;c[Bf+4>>2]=~z}break}case 20:{if((c[(c[(c[tf>>2]|0)+88>>2]|0)+4>>2]|0)==(c[(c[sf>>2]|0)+4>>2]|0))j=14;else c[(c[sf>>2]|0)+4>>2]=c[(c[(c[tf>>2]|0)+88>>2]|0)+4>>2];break}case 22:case 21:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(!(e[(c[J>>2]|0)+8>>1]&1|0)){c[he>>2]=+ni(c[J>>2]|0)!=0.0&1;if((d[c[sf>>2]>>0]|0)==22)c[he>>2]=((c[he>>2]|0)!=0^1)&1}else c[he>>2]=c[(c[sf>>2]|0)+12>>2];if(c[he>>2]|0)j=14;break}case 34:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(e[(c[J>>2]|0)+8>>1]&1|0)j=14;break}case 35:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(!(e[(c[J>>2]|0)+8>>1]&1))j=14;break}case 96:{c[je>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[ie>>2]=c[(c[sf>>2]|0)+8>>2];c[vf>>2]=$E(je,ie)|0;if(c[vf>>2]|0)break a;c[pe>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);c[le>>2]=c[(c[je>>2]|0)+76>>2];c[ke>>2]=c[(c[je>>2]|0)+16>>2];do if((c[(c[je>>2]|0)+56>>2]|0)!=(c[(c[tf>>2]|0)+32>>2]|0)){do if(a[(c[je>>2]|0)+2>>0]|0)if((d[c[je>>2]>>0]|0)==3){c[ze>>2]=(c[w>>2]|0)+((c[(c[je>>2]|0)+16>>2]|0)*40|0);Bf=c[(c[ze>>2]|0)+12>>2]|0;c[we>>2]=Bf;c[(c[je>>2]|0)+64>>2]=Bf;c[(c[je>>2]|0)+60>>2]=Bf;c[(c[je>>2]|0)+72>>2]=c[(c[ze>>2]|0)+16>>2];break}else{Fh(c[pe>>2]|0);break d}else{f=Ip(c[ke>>2]|0)|0;c[(c[je>>2]|0)+60>>2]=f;f=aF(c[ke>>2]|0,we)|0;c[(c[je>>2]|0)+72>>2]=f;f=c[(c[je>>2]|0)+60>>2]|0;if((c[(c[je>>2]|0)+60>>2]|0)>>>0<=(c[we>>2]|0)>>>0){c[(c[je>>2]|0)+64>>2]=f;break}if(f>>>0>(c[(c[wf>>2]|0)+96>>2]|0)>>>0){j=886;break c}c[(c[je>>2]|0)+64>>2]=c[we>>2]}while(0);c[(c[je>>2]|0)+56>>2]=c[(c[tf>>2]|0)+32>>2];f=c[(c[je>>2]|0)+72>>2]|0;if((d[c[(c[je>>2]|0)+72>>2]>>0]|0)<128){c[ue>>2]=d[f>>0];f=1}else f=(lD(f,ue)|0)&255;c[(c[je>>2]|0)+68>>2]=f&255;b[(c[je>>2]|0)+14>>1]=0;c[c[le>>2]>>2]=c[ue>>2];if((c[we>>2]|0)>>>0<(c[ue>>2]|0)>>>0){c[(c[je>>2]|0)+72>>2]=0;c[(c[je>>2]|0)+64>>2]=0;if((c[ue>>2]|0)>>>0>98307){j=269;break c}if((c[ue>>2]|0)>>>0>(c[(c[je>>2]|0)+60>>2]|0)>>>0){j=269;break c}else{j=272;break}}else{if((c[ue>>2]|0)>>>0<=0){j=272;break}c[re>>2]=c[(c[je>>2]|0)+72>>2];j=278;break}}else j=272;while(0);do if((j|0)==272){j=0;f=c[je>>2]|0;if((e[(c[je>>2]|0)+14>>1]|0)>(c[ie>>2]|0)){c[xe>>2]=c[f+80+(c[ie>>2]<<2)>>2];break}if((c[f+68>>2]|0)>>>0>=(c[c[le>>2]>>2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4>>2]|0?1:(c[Bf>>2]|0)!=(c[(c[je>>2]|0)+60>>2]|0)){j=288;break c}}Bf=ve;zf=c[Bf+4>>2]|0;if(zf>>>0>0|((zf|0)==0?(c[Bf>>2]|0)>>>0>(c[(c[je>>2]|0)+60>>2]|0)>>>0:0)){j=288;break c}b[(c[je>>2]|0)+14>>1]=c[oe>>2];c[(c[je>>2]|0)+68>>2]=(c[se>>2]|0)-(c[re>>2]|0);if(!(c[(c[je>>2]|0)+72>>2]|0)){Lh(qe);j=294}else j=294}if((j|0)==294?(j=0,(e[(c[je>>2]|0)+14>>1]|0)<=(c[ie>>2]|0)):0){f=c[pe>>2]|0;if((a[(c[sf>>2]|0)+1>>0]|0)==-8){Ri(f,c[(c[sf>>2]|0)+16>>2]|0,2048);break d}else{Fh(f);break d}}if(e[(c[pe>>2]|0)+8>>1]&9312|0)Fh(c[pe>>2]|0);if((c[(c[je>>2]|0)+64>>2]|0)>>>0>=(c[(c[le>>2]|0)+((c[ie>>2]|0)+1<<2)>>2]|0)>>>0){c[re>>2]=(c[(c[je>>2]|0)+72>>2]|0)+(c[(c[le>>2]|0)+(c[ie>>2]<<2)>>2]|0);if((c[xe>>2]|0)>>>0<12){nD(c[re>>2]|0,c[xe>>2]|0,c[pe>>2]|0)|0;break d}f=(((c[xe>>2]|0)-12|0)>>>0)/2|0;c[me>>2]=f;c[(c[pe>>2]|0)+12>>2]=f;a[(c[pe>>2]|0)+10>>0]=a[ne>>0]|0;f=c[pe>>2]|0;if((c[(c[pe>>2]|0)+24>>2]|0)<((c[me>>2]|0)+2|0)){b[f+8>>1]=1;if(Ph(c[pe>>2]|0,(c[me>>2]|0)+2|0,0)|0){j=887;break a}}else c[(c[pe>>2]|0)+16>>2]=c[f+20>>2];MR(c[(c[pe>>2]|0)+16>>2]|0,c[re>>2]|0,c[me>>2]|0)|0;a[(c[(c[pe>>2]|0)+16>>2]|0)+(c[me>>2]|0)>>0]=0;a[(c[(c[pe>>2]|0)+16>>2]|0)+((c[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>2]|0,c[o>>2]|0)|0))break;c[t>>2]=(c[t>>2]|0)+1;c[r>>2]=c[(c[r>>2]|0)+24>>2]}if(!(c[r>>2]|0)){Bf=c[tf>>2]|0;c[Ye>>2]=c[o>>2];rr(Bf,35739,Ye);c[vf>>2]=1;break}if((c[n>>2]|0)==1?(c[(c[wf>>2]|0)+164>>2]|0)>0:0){rr(c[tf>>2]|0,35761,_e);c[vf>>2]=5;break}if(!(c[(c[r>>2]|0)+24>>2]|0))f=(d[(c[wf>>2]|0)+75>>0]|0)!=0;else f=0;c[v>>2]=f&1;if(!((c[v>>2]|0)!=0&(c[n>>2]|0)==1)){c[t>>2]=(c[(c[wf>>2]|0)+432>>2]|0)-(c[t>>2]|0)-1;g:do if((c[n>>2]|0)==2){c[x>>2]=(c[(c[wf>>2]|0)+24>>2]&2|0)!=0&1;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[wf>>2]|0)+20>>2]|0))break g;c[vf>>2]=Pq(c[(c[(c[wf>>2]|0)+16>>2]|0)+(c[u>>2]<<4)+4>>2]|0,516,(c[x>>2]|0)==0&1)|0;if(c[vf>>2]|0)break a;c[u>>2]=(c[u>>2]|0)+1}}else c[x>>2]=0;while(0);c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[(c[wf>>2]|0)+20>>2]|0))break;c[vf>>2]=hr(c[(c[(c[wf>>2]|0)+16>>2]|0)+(c[u>>2]<<4)+4>>2]|0,c[n>>2]|0,c[t>>2]|0)|0;if(c[vf>>2]|0)break a;c[u>>2]=(c[u>>2]|0)+1}if(c[x>>2]|0){$p(c[wf>>2]|0);Yo(c[wf>>2]|0);c[(c[wf>>2]|0)+24>>2]=c[(c[wf>>2]|0)+24>>2]|2}}else{Bf=cr(c[tf>>2]|0,1)|0;c[vf>>2]=Bf;if(Bf|0){j=885;break c}a[(c[wf>>2]|0)+67>>0]=1;if((Zq(c[tf>>2]|0)|0)==5){j=372;break c}a[(c[wf>>2]|0)+75>>0]=0;c[vf>>2]=c[(c[tf>>2]|0)+40>>2]}while(1){if((c[(c[wf>>2]|0)+424>>2]|0)==(c[r>>2]|0))break;c[s>>2]=c[(c[wf>>2]|0)+424>>2];c[(c[wf>>2]|0)+424>>2]=c[(c[s>>2]|0)+24>>2];Hd(c[wf>>2]|0,c[s>>2]|0);Bf=(c[wf>>2]|0)+432|0;c[Bf>>2]=(c[Bf>>2]|0)+-1}f=c[r>>2]|0;if((c[n>>2]|0)==1){c[(c[wf>>2]|0)+424>>2]=c[f+24>>2];Hd(c[wf>>2]|0,c[r>>2]|0);if(!(c[v>>2]|0)){Bf=(c[wf>>2]|0)+432|0;c[Bf>>2]=(c[Bf>>2]|0)+-1}}else{Bf=f+8|0;zf=c[Bf+4>>2]|0;i=(c[wf>>2]|0)+440|0;c[i>>2]=c[Bf>>2];c[i+4>>2]=zf;i=(c[r>>2]|0)+16|0;zf=c[i+4>>2]|0;Bf=(c[wf>>2]|0)+448|0;c[Bf>>2]=c[i>>2];c[Bf+4>>2]=zf}if((c[v>>2]|0)==0|(c[n>>2]|0)==2){c[vf>>2]=ir(c[wf>>2]|0,c[n>>2]|0,c[t>>2]|0)|0;if((c[vf>>2]|0)!=0|(c[vf>>2]|0)!=0)break a;else break d}}while(0);if(c[vf>>2]|0)break a;break}case 2:{if(c[(c[sf>>2]|0)+8>>2]|0?c[(c[wf>>2]|0)+24>>2]&67108864|0:0){j=413;break c}c[C>>2]=c[(c[(c[wf>>2]|0)+16>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<4)+4>>2];if(c[C>>2]|0){c[vf>>2]=Ro(c[C>>2]|0,c[(c[sf>>2]|0)+8>>2]|0)|0;if(c[vf>>2]|0){j=416;break c}do if(c[(c[sf>>2]|0)+8>>2]|0?(e[(c[tf>>2]|0)+144>>1]|0)>>>6&1|0:0){if(d[(c[wf>>2]|0)+67>>0]|0?(c[(c[wf>>2]|0)+160>>2]|0)<=1:0)break;if(!(c[(c[tf>>2]|0)+48>>2]|0)){Bf=(c[wf>>2]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2]|0)+8>>2];a[(c[_>>2]|0)+4>>0]=1;break}case 111:{wr(c[tf>>2]|0,c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2]|0);c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2]=0;break}case 26:case 25:case 24:case 23:{c[ba>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[aa>>2]=d[c[sf>>2]>>0];c[ga>>2]=0;a[(c[ba>>2]|0)+2>>0]=0;if(a[(c[ba>>2]|0)+4>>0]|0){c[fa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);if((e[(c[fa>>2]|0)+8>>1]&14|0)==2)ti(c[fa>>2]|0,0);zf=pi(c[fa>>2]|0)|0;Bf=ea;c[Bf>>2]=zf;c[Bf+4>>2]=z;do if(!(e[(c[fa>>2]|0)+8>>1]&4)){if(!(e[(c[fa>>2]|0)+8>>1]&8)){j=14;break d}Bf=ea;if(+h[c[fa>>2]>>3]<+((c[Bf>>2]|0)>>>0)+4294967296.0*+(c[Bf+4>>2]|0)){if(c[aa>>2]&1|0)break;c[aa>>2]=(c[aa>>2]|0)+-1;break}Bf=ea;if(+h[c[fa>>2]>>3]>+((c[Bf>>2]|0)>>>0)+4294967296.0*+(c[Bf+4>>2]|0)?(c[aa>>2]&1|0)==1:0)c[aa>>2]=(c[aa>>2]|0)+1}while(0);i=ea;c[vf>>2]=eD(c[(c[ba>>2]|0)+16>>2]|0,0,c[i>>2]|0,c[i+4>>2]|0,0,$)|0;i=ea;zf=c[i+4>>2]|0;Bf=(c[ba>>2]|0)+40|0;c[Bf>>2]=c[i>>2];c[Bf+4>>2]=zf;if(c[vf>>2]|0)break a;else j=496}else{if(nF(c[(c[ba>>2]|0)+16>>2]|0,2)|0)c[ga>>2]=1;c[da>>2]=c[(c[sf>>2]|0)+16>>2];c[ca>>2]=c[(c[ba>>2]|0)+24>>2];b[ca+8>>1]=c[da>>2];a[ca+10>>0]=1&(c[aa>>2]|0)-23|0?-1:1;c[ca+4>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);a[ca+14>>0]=0;c[vf>>2]=eD(c[(c[ba>>2]|0)+16>>2]|0,ca,0,0,0,$)|0;if(c[vf>>2]|0)break a;if(!(c[ga>>2]|0?!(d[ca+14>>0]|0):0))j=496}do if((j|0)==496){j=0;a[(c[ba>>2]|0)+3>>0]=0;c[(c[ba>>2]|0)+56>>2]=0;f=c[$>>2]|0;if((c[aa>>2]|0)>=25){if((f|0)>=0?!((c[$>>2]|0)==0&(c[aa>>2]|0)==26):0){c[$>>2]=0;break}c[$>>2]=0;c[vf>>2]=VC(c[(c[ba>>2]|0)+16>>2]|0,$)|0;if(c[vf>>2]|0)break a;else break}else{if((f|0)<=0?!((c[$>>2]|0)==0&(c[aa>>2]|0)==23):0){c[$>>2]=oF(c[(c[ba>>2]|0)+16>>2]|0)|0;break}c[$>>2]=0;c[vf>>2]=WC(c[(c[ba>>2]|0)+16>>2]|0,$)|0;if(c[vf>>2]|0)break a;else break}}while(0);if(!(c[$>>2]|0)){if(c[ga>>2]|0)c[sf>>2]=(c[sf>>2]|0)+20}else j=14;break}case 31:case 30:case 29:{c[ka>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[fa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);c[ma>>2]=0;f=c[(c[ka>>2]|0)+24>>2]|0;if((c[(c[sf>>2]|0)+16>>2]|0)>0){c[oa>>2]=f;b[oa+8>>1]=c[(c[sf>>2]|0)+16>>2];c[oa+4>>2]=c[fa>>2];c[na>>2]=oa}else{c[na>>2]=cD(f,pa,183,ma)|0;if(!(c[na>>2]|0)){j=887;break a}if(e[(c[fa>>2]|0)+8>>1]&16384|0)Oh(c[fa>>2]|0)|0;dD(c[(c[ka>>2]|0)+24>>2]|0,c[(c[fa>>2]|0)+12>>2]|0,c[(c[fa>>2]|0)+16>>2]|0,c[na>>2]|0)}a[(c[na>>2]|0)+10>>0]=0;c[ia>>2]=0;h:do if((d[c[sf>>2]>>0]|0)==29){c[ja>>2]=0;while(1){if((c[ja>>2]|0)>=(e[(c[na>>2]|0)+8>>1]|0))break h;if(e[(c[(c[na>>2]|0)+4>>2]|0)+((c[ja>>2]|0)*40|0)+8>>1]&1|0)break;c[ja>>2]=(c[ja>>2]|0)+1}c[ia>>2]=1}while(0);c[vf>>2]=eD(c[(c[ka>>2]|0)+16>>2]|0,c[na>>2]|0,0,0,0,la)|0;Hd(c[wf>>2]|0,c[ma>>2]|0);if(c[vf>>2]|0)break a;c[(c[ka>>2]|0)+28>>2]=c[la>>2];c[ha>>2]=(c[la>>2]|0)==0&1;a[(c[ka>>2]|0)+2>>0]=1-(c[ha>>2]|0);a[(c[ka>>2]|0)+3>>0]=0;c[(c[ka>>2]|0)+56>>2]=0;if((d[c[sf>>2]>>0]|0)==31)if(c[ha>>2]|0){j=14;break d}else break d;else if((c[ia>>2]|0)==0&(c[ha>>2]|0)!=0)break d;else{j=14;break d}}case 32:{c[fa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);if((e[(c[fa>>2]|0)+8>>1]&4|0)==0?(gv(c[fa>>2]|0,67,a[ne>>0]|0),(e[(c[fa>>2]|0)+8>>1]&4|0)==0):0)j=14;else j=526;break}case 33:{j=526;break}case 113:{c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;Bf=(c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2]|0)+32|0;zf=Bf;i=c[zf>>2]|0;zf=c[zf+4>>2]|0;g=IR(i|0,zf|0,1,0)|0;c[Bf>>2]=g;c[Bf+4>>2]=z;Bf=c[qa>>2]|0;c[Bf>>2]=i;c[Bf+4>>2]=zf;break}case 114:{Bf=va;c[Bf>>2]=0;c[Bf+4>>2]=0;c[xa>>2]=0;c[qa>>2]=WE(c[tf>>2]|0,c[sf>>2]|0)|0;c[wa>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];do if(!((d[(c[wa>>2]|0)+5>>0]|0)>>>1&1)){c[vf>>2]=pF(c[(c[wa>>2]|0)+16>>2]|0,xa)|0;if(c[vf>>2]|0)break a;if(c[xa>>2]|0){Bf=va;c[Bf>>2]=1;c[Bf+4>>2]=0;break}zf=Hp(c[(c[wa>>2]|0)+16>>2]|0)|0;Bf=va;c[Bf>>2]=zf;c[Bf+4>>2]=z;Bf=va;zf=c[Bf+4>>2]|0;if((zf|0)>2147483647|(zf|0)==2147483647&(c[Bf>>2]|0)>>>0>=4294967295){Bf=(c[wa>>2]|0)+5|0;a[Bf>>0]=a[Bf>>0]&-3|2;break}else{zf=va;zf=IR(c[zf>>2]|0,c[zf+4>>2]|0,1,0)|0;Bf=va;c[Bf>>2]=zf;c[Bf+4>>2]=z;break}}while(0);if(c[(c[sf>>2]|0)+12>>2]|0){if(c[(c[tf>>2]|0)+184>>2]|0){c[Aa>>2]=c[(c[tf>>2]|0)+184>>2];while(1){f=c[Aa>>2]|0;if(!(c[(c[Aa>>2]|0)+4>>2]|0))break;c[Aa>>2]=c[f+4>>2]}c[za>>2]=(c[f+16>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0)}else c[za>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);hv(c[za>>2]|0)|0;Bf=c[za>>2]|0;if((c[Bf>>2]|0)==-1?(c[Bf+4>>2]|0)==2147483647:0){j=547;break c}if((d[(c[wa>>2]|0)+5>>0]|0)>>>1&1|0){j=547;break c}g=va;zf=c[g>>2]|0;g=c[g+4>>2]|0;Bf=c[za>>2]|0;Bf=IR(c[Bf>>2]|0,c[Bf+4>>2]|0,1,0)|0;i=z;if((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tf>>2]|0)+156+8|0;c[j>>2]=(c[j>>2]|0)+1;j=619;break}case 57:{j=619;break}case 3:{c[fb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[gb>>2]=0;c[vf>>2]=yF(c[wf>>2]|0,c[fb>>2]|0,gb)|0;j=627;break}case 5:case 4:{if(c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2]|0)j=626;break}case 7:case 6:{j=626;break}case 126:case 125:{c[hb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[W>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);if(d[(c[sf>>2]|0)+3>>0]&1|0){Bf=(c[tf>>2]|0)+44|0;c[Bf>>2]=(c[Bf>>2]|0)+1}if(e[(c[W>>2]|0)+8>>1]&16384|0)f=Oh(c[W>>2]|0)|0;else f=0;c[vf>>2]=f;if(c[vf>>2]|0)break a;if((d[c[sf>>2]>>0]|0)==125)c[vf>>2]=zF(c[hb>>2]|0,c[W>>2]|0)|0;else{zf=c[(c[W>>2]|0)+12>>2]|0;Bf=ib+8|0;c[Bf>>2]=zf;c[Bf+4>>2]=((zf|0)<0)<<31>>31;c[ib>>2]=c[(c[W>>2]|0)+16>>2];if(d[(c[sf>>2]|0)+3>>0]&16|0)f=c[(c[hb>>2]|0)+28>>2]|0;else f=0;c[vf>>2]=qF(c[(c[hb>>2]|0)+16>>2]|0,ib,c[(c[sf>>2]|0)+12>>2]|0,f)|0;c[(c[hb>>2]|0)+56>>2]=0}if(c[vf>>2]|0)break a;break}case 127:{c[jb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[kb>>2]=c[(c[jb>>2]|0)+16>>2];c[mb>>2]=c[(c[jb>>2]|0)+24>>2];b[mb+8>>1]=c[(c[sf>>2]|0)+12>>2];a[mb+10>>0]=0;c[mb+4>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);c[vf>>2]=eD(c[kb>>2]|0,mb,0,0,0,lb)|0;if(c[vf>>2]|0)break a;if((c[lb>>2]|0)==0?(c[vf>>2]=rF(c[kb>>2]|0,4)|0,c[vf>>2]|0):0)break a;c[(c[jb>>2]|0)+56>>2]=0;break}case 129:case 128:{c[nb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[vf>>2]=vF(c[nb>>2]|0)|0;if(c[vf>>2]|0)break a;if(a[(c[nb>>2]|0)+2>>0]|0){Fh((c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0)|0);break d}Bf=sb;c[Bf>>2]=0;c[Bf+4>>2]=0;c[vf>>2]=AF(c[wf>>2]|0,c[(c[nb>>2]|0)+16>>2]|0,sb)|0;if(c[vf>>2]|0)break a;f=c[tf>>2]|0;if((d[c[sf>>2]>>0]|0)==128){c[pb>>2]=c[(c[f+112>>2]|0)+(c[(c[sf>>2]|0)+12>>2]<<2)>>2];a[(c[pb>>2]|0)+2>>0]=0;i=sb;zf=c[i+4>>2]|0;Bf=(c[pb>>2]|0)+40|0;c[Bf>>2]=c[i>>2];c[Bf+4>>2]=zf;a[(c[pb>>2]|0)+3>>0]=1;c[(c[pb>>2]|0)+52>>2]=c[(c[sf>>2]|0)+16>>2];c[(c[pb>>2]|0)+48>>2]=c[nb>>2];break d}else{c[qa>>2]=WE(f,c[sf>>2]|0)|0;i=sb;zf=c[i+4>>2]|0;Bf=c[qa>>2]|0;c[Bf>>2]=c[i>>2];c[Bf+4>>2]=zf;b[(c[qa>>2]|0)+8>>1]=4;break d}}case 61:case 60:case 59:case 58:{c[vb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[Bb>>2]=c[(c[vb>>2]|0)+24>>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=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);if((e[(c[J>>2]|0)+8>>1]&32|0)==0?(KF(c[J>>2]|0),(e[(c[J>>2]|0)+8>>1]&32|0)==0):0){j=887;break a}Bf=c[W>>2]|0;LF(c[c[J>>2]>>2]|0,c[Bf>>2]|0,c[Bf+4>>2]|0);break}case 62:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);if(e[(c[J>>2]|0)+8>>1]&32|0?MF(c[c[J>>2]>>2]|0,Tb)|0:0){j=Tb;Dh((c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0)|0,c[j>>2]|0,c[j+4>>2]|0);j=8;break d}Fh(c[J>>2]|0);j=7;break}case 63:{c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[fa>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);c[Ub>>2]=c[(c[sf>>2]|0)+16>>2];if((e[(c[J>>2]|0)+8>>1]&32|0)==0?(KF(c[J>>2]|0),(e[(c[J>>2]|0)+8>>1]&32|0)==0):0){j=887;break a}if(c[Ub>>2]|0?(Bf=c[fa>>2]|0,c[Vb>>2]=NF(c[c[J>>2]>>2]|0,c[Ub>>2]|0,c[Bf>>2]|0,c[Bf+4>>2]|0)|0,c[Vb>>2]|0):0){j=14;break d}if((c[Ub>>2]|0)>=0){Bf=c[fa>>2]|0;LF(c[c[J>>2]>>2]|0,c[Bf>>2]|0,c[Bf+4>>2]|0)}break}case 64:{c[ac>>2]=c[(c[sf>>2]|0)+16>>2];c[Yb>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);if(a[(c[sf>>2]|0)+3>>0]|0){c[cc>>2]=c[(c[ac>>2]|0)+16>>2];c[$b>>2]=c[(c[tf>>2]|0)+184>>2];while(1){if(!(c[$b>>2]|0))break;if((c[(c[$b>>2]|0)+24>>2]|0)==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|0,4096);break}case 144:{f=c[sf>>2]|0;if(c[(c[wf>>2]|0)+24>>2]&33554432|0){i=c[f+8>>2]|0;f=(c[wf>>2]|0)+448|0;g=i;i=((i|0)<0)<<31>>31}else{i=c[(c[sf>>2]|0)+8>>2]|0;f=c[f+4>>2]|0?(c[wf>>2]|0)+440|0:(c[tf>>2]|0)+64|0;g=i;i=((i|0)<0)<<31>>31}zf=f;zf=IR(c[zf>>2]|0,c[zf+4>>2]|0,g|0,i|0)|0;Bf=f;c[Bf>>2]=zf;c[Bf+4>>2]=z;break}case 65:if(c[(c[sf>>2]|0)+4>>2]|0){Bf=(c[wf>>2]|0)+440|0;if(!((c[Bf>>2]|0)==0&(c[Bf+4>>2]|0)==0))break d;Bf=(c[wf>>2]|0)+448|0;if((c[Bf>>2]|0)==0&(c[Bf+4>>2]|0)==0){j=14;break d}else break d}else{Bf=(c[tf>>2]|0)+64|0;if(!((c[Bf>>2]|0)==0&(c[Bf+4>>2]|0)==0))break d;Bf=(c[wf>>2]|0)+448|0;if((c[Bf>>2]|0)==0&(c[Bf+4>>2]|0)==0){j=14;break d}else break d}case 145:{if(c[(c[tf>>2]|0)+184>>2]|0){c[fc>>2]=c[(c[tf>>2]|0)+184>>2];while(1){f=c[fc>>2]|0;if(!(c[(c[fc>>2]|0)+4>>2]|0))break;c[fc>>2]=c[f+4>>2]}c[J>>2]=(c[f+16>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0)}else c[J>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);hv(c[J>>2]|0)|0;c[W>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0);hv(c[W>>2]|0)|0;zf=c[J>>2]|0;g=c[zf+4>>2]|0;Bf=c[W>>2]|0;i=c[Bf+4>>2]|0;if((g|0)<(i|0)|((g|0)==(i|0)?(c[zf>>2]|0)>>>0<(c[Bf>>2]|0)>>>0:0)){i=c[W>>2]|0;zf=c[i+4>>2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]|0)+4>>2]|0)*40|0);Bf=c[J>>2]|0;zf=Bf;zf=IR(c[zf>>2]|0,c[zf+4>>2]|0,-1,-1)|0;c[Bf>>2]=zf;c[Bf+4>>2]=z;Bf=c[J>>2]|0;if((c[Bf>>2]|0)==0&(c[Bf+4>>2]|0)==0)j=14;break}case 147:{c[gc>>2]=d[(c[sf>>2]|0)+3>>0];c[hc>>2]=od(c[wf>>2]|0,32+((c[gc>>2]|0)-1<<2)|0,0)|0;if(!(c[hc>>2]|0)){j=887;break a}c[(c[hc>>2]|0)+8>>2]=0;c[(c[hc>>2]|0)+4>>2]=c[(c[sf>>2]|0)+16>>2];c[(c[hc>>2]|0)+16>>2]=((c[sf>>2]|0)-(c[rf>>2]|0)|0)/20|0;c[(c[hc>>2]|0)+12>>2]=c[tf>>2];a[(c[hc>>2]|0)+26>>0]=c[gc>>2];a[(c[sf>>2]|0)+1>>0]=-21;c[(c[sf>>2]|0)+16>>2]=c[hc>>2];a[c[sf>>2]>>0]=-108;j=750;break}case 148:{j=750;break}case 149:{c[nc>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[vf>>2]=Hh(c[nc>>2]|0,c[(c[sf>>2]|0)+16>>2]|0)|0;if(c[vf>>2]|0){j=762;break c}Vh(c[nc>>2]|0,d[ne>>0]|0)|0;if(XE(c[nc>>2]|0)|0){j=886;break c}break}case 8:{c[pc>>2]=0;c[pc+8>>2]=-1;c[pc+4>>2]=-1;c[vf>>2]=Yz(c[wf>>2]|0,c[(c[sf>>2]|0)+4>>2]|0,c[(c[sf>>2]|0)+8>>2]|0,pc+4|0,pc+8|0)|0;if(c[vf>>2]|0){if((c[vf>>2]|0)!=5)break a;c[vf>>2]=0;c[pc>>2]=1}c[oc>>2]=0;c[qc>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);while(1){if((c[oc>>2]|0)>=3)break d;Bf=c[pc+(c[oc>>2]<<2)>>2]|0;Dh(c[qc>>2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 10:{c[vf>>2]=RF((c[tf>>2]|0)+108|0,c[wf>>2]|0,c[(c[sf>>2]|0)+4>>2]|0)|0;if(c[vf>>2]|0)break a;break}case 69:{c[wc>>2]=c[(c[(c[wf>>2]|0)+16>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<4)+4>>2];c[vf>>2]=SF(c[wc>>2]|0)|0;if(c[vf>>2]|0){if((c[vf>>2]|0)!=101)break a;c[vf>>2]=0;j=14}break}case 150:if(c[(c[sf>>2]|0)+4>>2]|0){Bf=(c[tf>>2]|0)+144|0;b[Bf>>1]=b[Bf>>1]&-2|1;break d}else{$p(c[wf>>2]|0);break d}case 151:{a[yc>>0]=c[(c[sf>>2]|0)+12>>2];if((d[yc>>0]|0)==0?0!=(c[(c[wf>>2]|0)+24>>2]&16384|0):0)break d;c[zc>>2]=c[(c[sf>>2]|0)+4>>2];c[vf>>2]=TF(c[(c[(c[wf>>2]|0)+16>>2]|0)+(c[zc>>2]<<4)+4>>2]|0,c[(c[sf>>2]|0)+8>>2]|0,a[yc>>0]|0)|0;if(c[vf>>2]|0){j=803;break c}break}case 152:{c[Bc>>2]=c[(c[sf>>2]|0)+16>>2];c[vf>>2]=UF(c[wf>>2]|0,c[Bc>>2]|0)|0;if(c[Bc>>2]|0)qr(c[tf>>2]|0,c[(c[Bc>>2]|0)+8>>2]|0);if(c[vf>>2]|0)break a;break}case 153:{f=Cc;g=f+40|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[Cc+32>>2]=c[wf>>2];c[vf>>2]=Gi(Cc,(c[w>>2]|0)+((c[(c[sf>>2]|0)+8>>2]|0)*40|0)|0)|0;c[Dc>>2]=wh(Cc)|0;if(c[Dc>>2]|0)c[vf>>2]=VF(c[wf>>2]|0,c[(c[sf>>2]|0)+4>>2]|0,c[Dc>>2]|0,(c[tf>>2]|0)+108|0)|0;Lh(Cc);if(c[vf>>2]|0)break a;break}case 154:{Bf=(c[wf>>2]|0)+172|0;c[Bf>>2]=(c[Bf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]=c[c[(c[cd>>2]|0)+16>>2]>>2];c[ad>>2]=c[c[$c>>2]>>2];c[vf>>2]=tb[c[(c[ad>>2]|0)+36>>2]&255](c[(c[cd>>2]|0)+16>>2]|0)|0;qr(c[tf>>2]|0,c[$c>>2]|0);if(c[vf>>2]|0)break a;c[bd>>2]=tb[c[(c[ad>>2]|0)+40>>2]&255](c[(c[cd>>2]|0)+16>>2]|0)|0;if(c[bd>>2]|0)j=8;else j=7}break}case 157:{c[ed>>2]=c[(c[(c[sf>>2]|0)+16>>2]|0)+8>>2];c[fd>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+4>>2]|0)*40|0);c[vf>>2]=Vh(c[fd>>2]|0,1)|0;if(c[vf>>2]|0)break a;c[vf>>2]=yb[c[(c[c[ed>>2]>>2]|0)+76>>2]&255](c[ed>>2]|0,c[(c[fd>>2]|0)+16>>2]|0)|0;qr(c[tf>>2]|0,c[ed>>2]|0);Bf=(c[tf>>2]|0)+144|0;b[Bf>>1]=b[Bf>>1]&-2;if(c[vf>>2]|0)break a;break}case 12:{c[gd>>2]=c[(c[(c[sf>>2]|0)+16>>2]|0)+8>>2];if(!(c[gd>>2]|0)){j=837;break c}if(!(c[c[gd>>2]>>2]|0)){j=837;break c}c[id>>2]=c[c[gd>>2]>>2];c[jd>>2]=c[(c[sf>>2]|0)+8>>2];if(c[(c[id>>2]|0)+52>>2]|0){a[pd>>0]=a[(c[wf>>2]|0)+74>>0]|0;c[md>>2]=c[(c[tf>>2]|0)+96>>2];c[nd>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);c[kd>>2]=0;while(1){if((c[kd>>2]|0)>=(c[jd>>2]|0))break;c[(c[md>>2]|0)+(c[kd>>2]<<2)>>2]=c[nd>>2];c[nd>>2]=(c[nd>>2]|0)+40;c[kd>>2]=(c[kd>>2]|0)+1}a[(c[wf>>2]|0)+74>>0]=a[(c[sf>>2]|0)+3>>0]|0;c[vf>>2]=wb[c[(c[id>>2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;break}case 71:{do if(d[(c[wf>>2]|0)+76>>0]&129|0?((e[(c[tf>>2]|0)+144>>1]|0)>>>1&1|0)==0:0){if(c[(c[sf>>2]|0)+16>>2]|0)f=c[(c[sf>>2]|0)+16>>2]|0;else f=c[(c[tf>>2]|0)+176>>2]|0;c[td>>2]=f;if(f|0){f=c[(c[wf>>2]|0)+184>>2]|0;if(d[(c[wf>>2]|0)+76>>0]&128|0){c[vd>>2]=f;c[wd>>2]=YF(c[tf>>2]|0,c[td>>2]|0)|0;rb[c[vd>>2]&255](c[(c[wf>>2]|0)+188>>2]|0,c[wd>>2]|0);Kd(c[wd>>2]|0);break}else{wb[f&255](1,c[(c[wf>>2]|0)+188>>2]|0,c[tf>>2]|0,c[td>>2]|0)|0;break}}}while(0);if((c[(c[sf>>2]|0)+4>>2]|0)>=(c[70]|0)){c[ud>>2]=1;while(1){if((c[ud>>2]|0)>=(c[(c[tf>>2]|0)+136>>2]|0))break;if((d[(c[(c[tf>>2]|0)+88>>2]|0)+((c[ud>>2]|0)*20|0)>>0]|0)==20)c[(c[(c[tf>>2]|0)+88>>2]|0)+((c[ud>>2]|0)*20|0)+4>>2]=0;c[ud>>2]=(c[ud>>2]|0)+1}c[(c[sf>>2]|0)+4>>2]=0}j=(c[sf>>2]|0)+4|0;c[j>>2]=(c[j>>2]|0)+1;j=14;break}default:{}}while(0);do if((j|0)==20){j=0;c[mf>>2]=((c[sf>>2]|0)-(c[rf>>2]|0)|0)/20|0;if(c[(c[sf>>2]|0)+4>>2]|0){j=25;break c}if(!(c[(c[tf>>2]|0)+184>>2]|0)){j=25;break c}c[Ib>>2]=c[(c[tf>>2]|0)+184>>2];c[(c[tf>>2]|0)+184>>2]=c[(c[Ib>>2]|0)+4>>2];i=(c[tf>>2]|0)+192|0;c[i>>2]=(c[i>>2]|0)+-1;gr(c[wf>>2]|0,c[(c[tf>>2]|0)+44>>2]|0);c[mf>>2]=sr(c[Ib>>2]|0)|0;i=(c[wf>>2]|0)+32|0;zf=c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c[sf>>2]|0)+8>>2]|0){j=14;break}c[vf>>2]=um(81458)|0}if(c[vf>>2]|0)break a}else if((j|0)==619){j=0;c[bb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[db>>2]=1;f=c[bb>>2]|0;if((d[c[bb>>2]>>0]|0)==1)c[vf>>2]=wF(f,db)|0;else{c[cb>>2]=c[f+16>>2];c[vf>>2]=xF(c[cb>>2]|0,db)|0;a[(c[bb>>2]|0)+3>>0]=0;c[(c[bb>>2]|0)+56>>2]=0}if(c[vf>>2]|0)break a;a[(c[bb>>2]|0)+2>>0]=c[db>>2];if(c[db>>2]|0)j=14}else if((j|0)==626){c[fb>>2]=c[(c[(c[tf>>2]|0)+112>>2]|0)+(c[(c[sf>>2]|0)+4>>2]<<2)>>2];c[gb>>2]=c[(c[sf>>2]|0)+12>>2];c[vf>>2]=yb[c[(c[sf>>2]|0)+16>>2]&255](c[(c[fb>>2]|0)+16>>2]|0,gb)|0;j=627}else if((j|0)==750){j=0;c[jc>>2]=c[(c[sf>>2]|0)+16>>2];c[kc>>2]=(c[w>>2]|0)+((c[(c[sf>>2]|0)+12>>2]|0)*40|0);k:do if((c[(c[jc>>2]|0)+8>>2]|0)!=(c[kc>>2]|0)){c[(c[jc>>2]|0)+8>>2]=c[kc>>2];c[ic>>2]=(d[(c[jc>>2]|0)+26>>0]|0)-1;while(1){if((c[ic>>2]|0)<0)break k;c[(c[jc>>2]|0)+28+(c[ic>>2]<<2)>>2]=(c[w>>2]|0)+(((c[(c[sf>>2]|0)+8>>2]|0)+(c[ic>>2]|0)|0)*40|0);c[ic>>2]=(c[ic>>2]|0)+-1}}while(0);Bf=(c[kc>>2]|0)+12|0;c[Bf>>2]=(c[Bf>>2]|0)+1;Qi(lc,c[wf>>2]|0,1);c[c[jc>>2]>>2]=lc;a[(c[jc>>2]|0)+25>>0]=0;a[(c[jc>>2]|0)+24>>0]=0;ub[c[(c[(c[jc>>2]|0)+4>>2]|0)+12>>2]&255](c[jc>>2]|0,d[(c[jc>>2]|0)+26>>0]|0,(c[jc>>2]|0)+28|0);if(a[(c[jc>>2]|0)+25>>0]|0){if(c[(c[jc>>2]|0)+20>>2]|0){Bf=c[tf>>2]|0;c[cf>>2]=wh(lc)|0;rr(Bf,18130,cf);c[vf>>2]=c[(c[jc>>2]|0)+20>>2]}Lh(lc);if(c[vf>>2]|0)break a}if(a[(c[jc>>2]|0)+24>>0]|0?(c[ic>>2]=c[(c[sf>>2]|0)+-20+4>>2],c[ic>>2]|0):0)Dh((c[w>>2]|0)+((c[ic>>2]|0)*40|0)|0,1,0)}while(0);do if((j|0)==14){j=0;c[sf>>2]=(c[rf>>2]|0)+(((c[(c[sf>>2]|0)+8>>2]|0)-1|0)*20|0)}else if((j|0)==460){j=0;kF(c[(c[S>>2]|0)+16>>2]|0,d[(c[sf>>2]|0)+3>>0]&3);if(c[vf>>2]|0)break a}else if((j|0)==627){j=0;c[(c[fb>>2]|0)+56>>2]=0;if(c[vf>>2]|0)break a;f=(c[fb>>2]|0)+2|0;if(!(c[gb>>2]|0)){a[f>>0]=0;j=(c[tf>>2]|0)+156+(d[(c[sf>>2]|0)+3>>0]<<2)|0;c[j>>2]=(c[j>>2]|0)+1;j=7;break}else{a[f>>0]=1;j=8;break}}while(0);if((j|0)==7){c[sf>>2]=(c[rf>>2]|0)+(((c[(c[sf>>2]|0)+8>>2]|0)-1|0)*20|0);j=8}if((j|0)==8){j=0;if(c[(c[wf>>2]|0)+248>>2]|0)break b;if((c[(c[wf>>2]|0)+304>>2]|0?(c[xf>>2]|0)>>>0>=(c[k>>2]|0)>>>0:0)?(c[k>>2]=(c[xf>>2]|0)+(c[(c[wf>>2]|0)+312>>2]|0)-(((c[xf>>2]|0)>>>0)%((c[(c[wf>>2]|0)+312>>2]|0)>>>0)|0),tb[c[(c[wf>>2]|0)+304>>2]&255](c[(c[wf>>2]|0)+308>>2]|0)|0):0){j=12;break}}c[sf>>2]=(c[s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2]|0;Bf=Bf+156|0;Bf=Bf+16|0;xf=c[Bf>>2]|0;zf=xf+zf|0;c[Bf>>2]=zf;Bf=c[vf>>2]|0;l=yf;return Bf|0}}case 413:{c[vf>>2]=8;break a}case 416:{if((c[vf>>2]&255|0)!=5)break a;c[(c[tf>>2]|0)+36>>2]=((c[sf>>2]|0)-(c[rf>>2]|0)|0)/20|0;c[(c[tf>>2]|0)+40>>2]=c[vf>>2];Bf=uf;uf=Bf;uf=c[uf>>2]|0;Bf=Bf+4|0;Bf=c[Bf>>2]|0;zf=c[wf>>2]|0;zf=zf+32|0;wf=zf;c[wf>>2]=uf;zf=zf+4|0;c[zf>>2]=Bf;zf=c[xf>>2]|0;Bf=c[tf>>2]|0;Bf=Bf+156|0;Bf=Bf+16|0;xf=c[Bf>>2]|0;zf=xf+zf|0;c[Bf>>2]=zf;Bf=c[vf>>2]|0;l=yf;return Bf|0}case 447:{c[vf>>2]=516;break a}case 547:{c[vf>>2]=13;break a}case 557:{c[vf>>2]=13;break a}case 659:{c[vf>>2]=6;a[(c[tf>>2]|0)+142>>0]=2;break a}case 681:{Yo(c[wf>>2]|0);if((c[vf>>2]|0)==7){j=887;break a}else break a}case 710:{c[vf>>2]=1;rr(c[tf>>2]|0,36066,bf);break a}case 762:{Bf=c[tf>>2]|0;c[df>>2]=wh(c[nc>>2]|0)|0;rr(Bf,18130,df);break a}case 782:{c[vf>>2]=1;Bf=c[tf>>2]|0;c[ef>>2]=(c[tc>>2]|0)==5?36103:36108;rr(Bf,36115,ef);break a}case 803:{if((c[vf>>2]&255|0)!=6)break a;c[Ac>>2]=c[(c[sf>>2]|0)+16>>2];Bf=c[tf>>2]|0;c[ff>>2]=c[Ac>>2];rr(Bf,36167,ff);break a}case 814:{c[vf>>2]=6;break a}case 818:{tb[c[(c[Hc>>2]|0)+28>>2]&255](c[Fc>>2]|0)|0;j=887;break a}case 837:{c[vf>>2]=6;break a}case 885:{Bf=uf;uf=Bf;uf=c[uf>>2]|0;Bf=B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>2]=c[(c[b>>2]|0)+12>>2];c[(c[b>>2]|0)+12>>2]=0;d=c[d>>2]|0;l=e;return d|0}function WE(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0;h=l;l=l+16|0;f=h+12|0;j=h+8|0;i=h+4|0;g=h;c[j>>2]=a;c[i>>2]=d;c[g>>2]=(c[(c[j>>2]|0)+92>>2]|0)+((c[(c[i>>2]|0)+8>>2]|0)*40|0);a=c[g>>2]|0;if((e[(c[g>>2]|0)+8>>1]|0)&9312|0){c[f>>2]=aI(a)|0;j=c[f>>2]|0;l=h;return j|0}else{b[a+8>>1]=4;c[f>>2]=c[g>>2];j=c[f>>2]|0;l=h;return j|0}return 0}function XE(a){a=a|0;var b=0,d=0,f=0,g=0;g=l;l=l+16|0;b=g+8|0;d=g+4|0;f=g;c[d>>2]=a;if(!((e[(c[d>>2]|0)+8>>1]|0)&18)){c[b>>2]=0;f=c[b>>2]|0;l=g;return f|0}c[f>>2]=c[(c[d>>2]|0)+12>>2];if((e[(c[d>>2]|0)+8>>1]|0)&16384|0)c[f>>2]=(c[f>>2]|0)+(c[c[d>>2]>>2]|0);c[b>>2]=(c[f>>2]|0)>(c[(c[(c[d>>2]|0)+32>>2]|0)+96>>2]|0)&1;f=c[b>>2]|0;l=g;return f|0}function YE(a){a=a|0;var d=0,f=0,g=0;g=l;l=l+16|0;d=g+4|0;f=g;c[f>>2]=a;a=e[(c[f>>2]|0)+8>>1]|0;do if(!((e[(c[f>>2]|0)+8>>1]|0)&12|0))if(a&18|0){b[d>>1]=$H(c[f>>2]|0)|0;break}else{b[d>>1]=0;break}else b[d>>1]=a&12;while(0);l=g;return b[d>>1]|0}function ZE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+12|0;f=h+8|0;g=h;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;d=g;a=c[f>>2]|0;if(!((c[d>>2]|0)==0?(c[d+4>>2]|0)==-2147483648:0)){g=FR(0,0,c[g>>2]|0,c[g+4>>2]|0)|0;c[e>>2]=li(a,g,z)|0;g=c[e>>2]|0;l=h;return g|0}d=a;b=c[d+4>>2]|0;if((b|0)>0|(b|0)==0&(c[d>>2]|0)>>>0>=0){c[e>>2]=1;g=c[e>>2]|0;l=h;return g|0}else{d=g;g=c[f>>2]|0;f=g;f=FR(c[f>>2]|0,c[f+4>>2]|0,c[d>>2]|0,c[d+4>>2]|0)|0;c[g>>2]=f;c[g+4>>2]=z;c[e>>2]=0;g=c[e>>2]|0;l=h;return g|0}return 0}function _E(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+20|0;f=i+16|0;g=i+8|0;h=i;c[f>>2]=a;a=g;c[a>>2]=b;c[a+4>>2]=d;a=c[f>>2]|0;b=c[a+4>>2]|0;d=h;c[d>>2]=c[a>>2];c[d+4>>2]=b;d=g;b=c[d+4>>2]|0;do if((b|0)>0|(b|0)==0&(c[d>>2]|0)>>>0>0){j=h;b=c[j>>2]|0;j=c[j+4>>2]|0;d=g;d=LR(-1,2147483647,c[d>>2]|0,c[d+4>>2]|0)|0;a=z;if((j|0)>(a|0)|(j|0)==(a|0)&b>>>0>d>>>0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}a=h;d=c[a>>2]|0;a=c[a+4>>2]|0;j=g;j=LR(0,-2147483648,c[j>>2]|0,c[j+4>>2]|0)|0;b=z;if((a|0)<(b|0)|(a|0)==(b|0)&d>>>0>>0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}}else if((c[g+4>>2]|0)<0){j=h;d=c[j+4>>2]|0;if((d|0)>0|(d|0)==0&(c[j>>2]|0)>>>0>0){a=g;d=c[a>>2]|0;a=c[a+4>>2]|0;j=h;j=LR(0,-2147483648,c[j>>2]|0,c[j+4>>2]|0)|0;b=z;if(!((a|0)<(b|0)|(a|0)==(b|0)&d>>>0>>0))break;c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}if((c[h+4>>2]|0)<0){j=g;if((c[j>>2]|0)==0?(c[j+4>>2]|0)==-2147483648:0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}j=h;if((c[j>>2]|0)==0?(c[j+4>>2]|0)==-2147483648:0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}d=h;d=FR(0,0,c[d>>2]|0,c[d+4>>2]|0)|0;a=z;j=g;j=FR(0,0,c[j>>2]|0,c[j+4>>2]|0)|0;j=LR(-1,2147483647,j|0,z|0)|0;b=z;if((a|0)>(b|0)|(a|0)==(b|0)&d>>>0>j>>>0){c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}}}while(0);j=h;h=g;h=RR(c[j>>2]|0,c[j+4>>2]|0,c[h>>2]|0,c[h+4>>2]|0)|0;j=c[f>>2]|0;c[j>>2]=h;c[j+4>>2]=z;c[e>>2]=0;j=c[e>>2]|0;l=i;return j|0}function $E(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[g>>2]=b;c[h>>2]=e;c[i>>2]=c[c[g>>2]>>2];do if(!(d[c[i>>2]>>0]|0)){b=c[i>>2]|0;if(!(a[(c[i>>2]|0)+3>>0]|0)){if(!(rH(c[b+16>>2]|0)|0))break;c[f>>2]=sH(c[i>>2]|0)|0;j=c[f>>2]|0;l=k;return j|0}if(c[b+52>>2]|0?(e=c[(c[(c[i>>2]|0)+52>>2]|0)+(1+(c[c[h>>2]>>2]|0)<<2)>>2]|0,c[j>>2]=e,(e|0)>0):0){c[c[g>>2]>>2]=c[(c[i>>2]|0)+48>>2];c[c[h>>2]>>2]=(c[j>>2]|0)-1;c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}c[f>>2]=_H(c[i>>2]|0)|0;j=c[f>>2]|0;l=k;return j|0}while(0);c[f>>2]=0;j=c[f>>2]|0;l=k;return j|0}function aF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=ZH(c[f>>2]|0,c[e>>2]|0)|0;l=d;return b|0}function bF(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+32|0;j=p+28|0;k=p+24|0;m=p+20|0;n=p+16|0;o=p+12|0;h=p+8|0;q=p+4|0;i=p;c[j>>2]=a;c[k>>2]=d;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[q>>2]=0;c[i>>2]=0;c[h>>2]=aF(c[j>>2]|0,q)|0;if(((c[k>>2]|0)+(c[m>>2]|0)|0)>>>0<=(c[q>>2]|0)>>>0){c[(c[o>>2]|0)+16>>2]=(c[h>>2]|0)+(c[k>>2]|0);b[(c[o>>2]|0)+8>>1]=4112;c[(c[o>>2]|0)+12>>2]=c[m>>2];q=c[i>>2]|0;l=p;return q|0}else{c[i>>2]=YH(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0)|0;q=c[i>>2]|0;l=p;return q|0}return 0}function cF(b){b=b|0;var c=0,e=0;e=l;l=l+16|0;c=e;a[c>>0]=b;l=e;return a[31409+(d[c>>0]|0)>>0]|0}function dF(a,b,d){a=a|0;b=b|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+48|0;n=o+36|0;f=o+32|0;k=o+28|0;i=o+24|0;g=o+20|0;h=o+16|0;m=o+8|0;j=o;c[f>>2]=a;c[k>>2]=b;c[i>>2]=d;c[g>>2]=e[(c[f>>2]|0)+8>>1];if(c[g>>2]&1|0){c[c[i>>2]>>2]=0;c[n>>2]=0;n=c[n>>2]|0;l=o;return n|0}if(!(c[g>>2]&4)){if(c[g>>2]&8|0){c[c[i>>2]>>2]=8;c[n>>2]=7;n=c[n>>2]|0;l=o;return n|0}c[h>>2]=c[(c[f>>2]|0)+12>>2];if(c[g>>2]&16384|0)c[h>>2]=(c[h>>2]|0)+(c[c[f>>2]>>2]|0);c[c[i>>2]>>2]=c[h>>2];c[n>>2]=(c[h>>2]<<1)+12+((c[g>>2]&2|0)!=0&1);n=c[n>>2]|0;l=o;return n|0}h=c[f>>2]|0;a=c[h+4>>2]|0;b=m;c[b>>2]=c[h>>2];c[b+4>>2]=a;b=m;a=c[b>>2]|0;b=c[b+4>>2]|0;if((c[m+4>>2]|0)<0){h=j;c[h>>2]=~a;c[h+4>>2]=~b}else{h=j;c[h>>2]=a;c[h+4>>2]=b}h=j;g=c[h+4>>2]|0;if(g>>>0<0|(g|0)==0&(c[h>>2]|0)>>>0<=127){h=m;a=c[i>>2]|0;if((0==(c[h+4>>2]|0)?(c[m>>2]&1|0)==(c[h>>2]|0):0)&(c[k>>2]|0)>=4){c[a>>2]=0;c[n>>2]=8+(c[j>>2]|0);n=c[n>>2]|0;l=o;return n|0}else{c[a>>2]=1;c[n>>2]=1;n=c[n>>2]|0;l=o;return n|0}}m=j;k=c[m+4>>2]|0;if(k>>>0<0|(k|0)==0&(c[m>>2]|0)>>>0<=32767){c[c[i>>2]>>2]=2;c[n>>2]=2;n=c[n>>2]|0;l=o;return n|0}m=j;k=c[m+4>>2]|0;if(k>>>0<0|(k|0)==0&(c[m>>2]|0)>>>0<=8388607){c[c[i>>2]>>2]=3;c[n>>2]=3;n=c[n>>2]|0;l=o;return n|0}m=j;k=c[m+4>>2]|0;if(k>>>0<0|(k|0)==0&(c[m>>2]|0)>>>0<=2147483647){c[c[i>>2]>>2]=4;c[n>>2]=4;n=c[n>>2]|0;l=o;return n|0}m=j;k=c[m+4>>2]|0;a=c[i>>2]|0;if(k>>>0<32767|(k|0)==32767&(c[m>>2]|0)>>>0<=4294967295){c[a>>2]=6;c[n>>2]=5;n=c[n>>2]|0;l=o;return n|0}else{c[a>>2]=8;c[n>>2]=6;n=c[n>>2]|0;l=o;return n|0}return 0}function eF(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;i=l;l=l+16|0;f=i+12|0;g=i+8|0;h=i;c[g>>2]=b;j=h;c[j>>2]=d;c[j+4>>2]=e;e=h;j=c[e+4>>2]|0;d=h;b=c[d>>2]|0;d=c[d+4>>2]|0;if(j>>>0<0|(j|0)==0&(c[e>>2]|0)>>>0<=127){a[c[g>>2]>>0]=b&127;c[f>>2]=1;j=c[f>>2]|0;l=i;return j|0}if(d>>>0<0|(d|0)==0&b>>>0<=16383){j=h;j=OR(c[j>>2]|0,c[j+4>>2]|0,7)|0;a[c[g>>2]>>0]=j&127|128;a[(c[g>>2]|0)+1>>0]=c[h>>2]&127;c[f>>2]=2;j=c[f>>2]|0;l=i;return j|0}else{j=h;c[f>>2]=XH(c[g>>2]|0,c[j>>2]|0,c[j+4>>2]|0)|0;j=c[f>>2]|0;l=i;return j|0}return 0}function fF(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;g=o+28|0;h=o+24|0;i=o+20|0;j=o+16|0;k=o+12|0;m=o;n=o+8|0;c[h>>2]=b;c[i>>2]=e;c[j>>2]=f;b=c[j>>2]|0;if((c[j>>2]|0)>>>0<=7&(c[j>>2]|0)>>>0>0){if((b|0)==7){i=c[i>>2]|0;c[m>>2]=c[i>>2];c[m+4>>2]=c[i+4>>2]}else{e=c[i>>2]|0;f=c[e+4>>2]|0;i=m;c[i>>2]=c[e>>2];c[i+4>>2]=f}j=d[31409+(c[j>>2]|0)>>0]|0;c[n>>2]=j;c[k>>2]=j;do{f=c[m>>2]&255;j=c[h>>2]|0;i=(c[n>>2]|0)+-1|0;c[n>>2]=i;a[j+i>>0]=f;i=m;i=OR(c[i>>2]|0,c[i+4>>2]|0,8)|0;j=m;c[j>>2]=i;c[j+4>>2]=z}while((c[n>>2]|0)!=0);c[g>>2]=c[k>>2];n=c[g>>2]|0;l=o;return n|0}else{if(b>>>0<12){c[g>>2]=0;n=c[g>>2]|0;l=o;return n|0}c[k>>2]=c[(c[i>>2]|0)+12>>2];if((c[k>>2]|0)>>>0>0)MR(c[h>>2]|0,c[(c[i>>2]|0)+16>>2]|0,c[k>>2]|0)|0;c[g>>2]=c[k>>2];n=c[g>>2]|0;l=o;return n|0}return 0}function gF(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+32|0;k=q+28|0;m=q+24|0;n=q+20|0;o=q;p=q+16|0;i=q+12|0;j=q+8|0;c[m>>2]=f;c[n>>2]=g;h=o;c[h>>2]=0;c[h+4>>2]=0;if(!(c[(c[m>>2]|0)+52>>2]|0)){p=c[n>>2]|0;c[p>>2]=0;c[p+4>>2]=0;c[k>>2]=0;p=c[k>>2]|0;l=q;return p|0}c[p>>2]=gD(c[m>>2]|0)|0;a:while(1){if(c[p>>2]|0){f=16;break}c[j>>2]=c[(c[m>>2]|0)+120+(a[(c[m>>2]|0)+68>>0]<<2)>>2];if(!(!(d[(c[j>>2]|0)+4>>0]|0)?(a[(c[j>>2]|0)+2>>0]|0)!=0:0)){g=o;g=IR(c[g>>2]|0,c[g+4>>2]|0,e[(c[j>>2]|0)+18>>1]|0,0)|0;h=o;c[h>>2]=g;c[h+4>>2]=z}if(a[(c[j>>2]|0)+4>>0]|0){do{if(!(a[(c[m>>2]|0)+68>>0]|0)){f=10;break a}$C(c[m>>2]|0)}while((e[(c[m>>2]|0)+80+(a[(c[m>>2]|0)+68>>0]<<1)>>1]|0)>=(e[(c[(c[m>>2]|0)+120+(a[(c[m>>2]|0)+68>>0]<<2)>>2]|0)+18>>1]|0));h=(c[m>>2]|0)+80+(a[(c[m>>2]|0)+68>>0]<<1)|0;b[h>>1]=(b[h>>1]|0)+1<<16>>16;c[j>>2]=c[(c[m>>2]|0)+120+(a[(c[m>>2]|0)+68>>0]<<2)>>2]}c[i>>2]=e[(c[m>>2]|0)+80+(a[(c[m>>2]|0)+68>>0]<<1)>>1];f=c[m>>2]|0;g=c[(c[j>>2]|0)+56>>2]|0;h=c[j>>2]|0;if((c[i>>2]|0)==(e[(c[j>>2]|0)+18>>1]|0)){c[p>>2]=ZC(f,el(g+((d[h+5>>0]|0)+8)|0)|0)|0;continue}else{c[p>>2]=ZC(f,el(g+(e[h+20>>1]&(d[(c[(c[j>>2]|0)+64>>2]|0)+(c[i>>2]<<1)>>0]<<8|d[(c[(c[j>>2]|0)+64>>2]|0)+(c[i>>2]<<1)+1>>0]))|0)|0)|0;continue}}if((f|0)==10){j=o;o=c[j+4>>2]|0;p=c[n>>2]|0;c[p>>2]=c[j>>2];c[p+4>>2]=o;c[k>>2]=gD(c[m>>2]|0)|0;p=c[k>>2]|0;l=q;return p|0}else if((f|0)==16){c[k>>2]=c[p>>2];p=c[k>>2]|0;l=q;return p|0}return 0}function hF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;e=l;l=l+16|0;h=e+12|0;f=e+8|0;d=e+4|0;g=e;c[h>>2]=a;c[f>>2]=b;c[g>>2]=c[(c[h>>2]|0)+4>>2];Ek(c[h>>2]|0);c[d>>2]=iq(c[c[g>>2]>>2]|0,c[f>>2]|0)|0;l=e;return c[d>>2]|0}function iF(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+32|0;k=s+24|0;m=s+20|0;p=s+16|0;q=s+12|0;r=s+28|0;n=s+8|0;j=s+4|0;o=s;c[k>>2]=e;c[m>>2]=f;c[p>>2]=g;c[q>>2]=h;a[r>>0]=i;e=c[(c[k>>2]|0)+92>>2]|0;if((c[m>>2]|0)>0)e=e+(((c[(c[k>>2]|0)+24>>2]|0)-(c[m>>2]|0)|0)*40|0)|0;c[n>>2]=e;c[o>>2]=0;e=88+(c[p>>2]<<3)|0;if(!(d[r>>0]|0))f=VH()|0;else f=0;c[j>>2]=e+f;if(c[(c[(c[k>>2]|0)+112>>2]|0)+(c[m>>2]<<2)>>2]|0){wr(c[k>>2]|0,c[(c[(c[k>>2]|0)+112>>2]|0)+(c[m>>2]<<2)>>2]|0);c[(c[(c[k>>2]|0)+112>>2]|0)+(c[m>>2]<<2)>>2]=0}if(Kh(c[n>>2]|0,c[j>>2]|0)|0){r=c[o>>2]|0;l=s;return r|0}e=c[(c[n>>2]|0)+16>>2]|0;c[o>>2]=e;c[(c[(c[k>>2]|0)+112>>2]|0)+(c[m>>2]<<2)>>2]=e;e=c[o>>2]|0;f=e+88|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(f|0));a[c[o>>2]>>0]=a[r>>0]|0;a[(c[o>>2]|0)+1>>0]=c[q>>2];b[(c[o>>2]|0)+12>>1]=c[p>>2];c[(c[o>>2]|0)+76>>2]=(c[o>>2]|0)+80+(c[p>>2]<<2);if(d[r>>0]|0|0){r=c[o>>2]|0;l=s;return r|0}c[(c[o>>2]|0)+16>>2]=(c[(c[n>>2]|0)+16>>2]|0)+(88+(c[p>>2]<<3));WH(c[(c[o>>2]|0)+16>>2]|0);r=c[o>>2]|0;l=s;return r|0}function jF(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+20|0;i=n+16|0;j=n+12|0;k=n+8|0;m=n+4|0;g=n;c[h>>2]=a;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=f;if((c[i>>2]|0)<1){c[g>>2]=um(62410)|0;m=c[g>>2]|0;l=n;return m|0}else{Ek(c[h>>2]|0);c[g>>2]=TH(c[h>>2]|0,c[i>>2]|0,c[j>>2]|0,c[k>>2]|0,c[m>>2]|0)|0;m=c[g>>2]|0;l=n;return m|0}return 0}function kF(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=l;l=l+16|0;f=e+4|0;g=e;c[f>>2]=b;c[g>>2]=d;a[(c[f>>2]|0)+67>>0]=c[g>>2];l=e;return}function lF(a,b,d){a=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|0}a[(c[u>>2]|0)+60>>0]=3;v=c[r>>2]|0;l=w;return v|0}function nF(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;g=l;l=l+16|0;f=g+4|0;e=g;c[f>>2]=a;c[e>>2]=b;l=g;return ((d[(c[f>>2]|0)+67>>0]|0)&c[e>>2]|0)!=0|0}function oF(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;l=e;return 1!=(d[(c[b>>2]|0)+66>>0]|0|0)|0}function pF(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+12|0;h=j+8|0;f=j+4|0;i=j;c[h>>2]=b;c[f>>2]=e;if(1==(d[(c[h>>2]|0)+66>>0]|0|0)?(d[(c[h>>2]|0)+64>>0]|0)&8|0:0){c[g>>2]=0;i=c[g>>2]|0;l=j;return i|0}c[i>>2]=gD(c[h>>2]|0)|0;do if(!(c[i>>2]|0)){b=c[f>>2]|0;if(!(d[(c[h>>2]|0)+66>>0]|0)){c[b>>2]=1;break}else{c[b>>2]=0;c[i>>2]=_C(c[h>>2]|0)|0;h=(c[h>>2]|0)+64|0;f=d[h>>0]|0;a[h>>0]=(c[i>>2]|0)==0?f|8:f&-9;break}}while(0);c[g>>2]=c[i>>2];i=c[g>>2]|0;l=j;return i|0}function qF(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;y=l;l=l+64|0;t=y+52|0;u=y+48|0;v=y+44|0;w=y+40|0;A=y+36|0;x=y+32|0;j=y+28|0;k=y+24|0;m=y+20|0;n=y+16|0;o=y+12|0;p=y+8|0;q=y+4|0;r=y;s=y+56|0;c[u>>2]=f;c[v>>2]=g;c[w>>2]=h;c[A>>2]=i;c[j>>2]=c[A>>2];c[k>>2]=0;c[o>>2]=c[c[u>>2]>>2];c[p>>2]=c[(c[o>>2]|0)+4>>2];c[r>>2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>>0]|0;a[q>>0]=A+-1<<24>>24;np(c[f+120+(A<<24>>24<<2)>>2]|0)}c[x>>2]=xH(f)|0}do if(!(c[x>>2]|0)){f=c[w>>2]|0;if(!(c[r>>2]|0)){c[x>>2]=gD(f)|0;if(!(a[s>>0]|0))break;a[(c[w>>2]|0)+66>>0]=3;break}a[f+66>>0]=2;f=(c[w>>2]|0)+60|0;if((c[t>>2]|0)>=(e[(c[y>>2]|0)+18>>1]|0)){c[f>>2]=-1;b[(c[w>>2]|0)+80+(c[u>>2]<<1)>>1]=(e[(c[y>>2]|0)+18>>1]|0)-1;break}else{c[f>>2]=1;break}}while(0);c[v>>2]=c[x>>2];A=c[v>>2]|0;l=z;return A|0}function sF(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+48|0;p=s+44|0;t=s+40|0;q=s+36|0;m=s+32|0;r=s+28|0;n=s+24|0;o=s+20|0;h=s+16|0;i=s+12|0;j=s+8|0;k=s+4|0;c[t>>2]=a;c[q>>2]=d;c[m>>2]=f;c[r>>2]=g;c[n>>2]=c[(c[t>>2]|0)+16>>2];c[o>>2]=c[(c[n>>2]|0)+32>>2];c[h>>2]=c[(c[t>>2]|0)+24>>2];do if(!(c[o>>2]|0)){t=cD(c[h>>2]|0,0,0,s)|0;c[(c[n>>2]|0)+32>>2]=t;c[o>>2]=t;if(c[o>>2]|0){b[(c[o>>2]|0)+8>>1]=c[m>>2];break}c[p>>2]=7;t=c[p>>2]|0;l=s;return t|0}while(0);c[j>>2]=uH(c[n>>2]|0,k)|0;dD(c[h>>2]|0,c[k>>2]|0,c[j>>2]|0,c[o>>2]|0);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[m>>2]|0)){a=10;break}if((e[(c[(c[o>>2]|0)+4>>2]|0)+((c[i>>2]|0)*40|0)+8>>1]|0)&1|0){a=8;break}c[i>>2]=(c[i>>2]|0)+1}if((a|0)==8){c[c[r>>2]>>2]=-1;c[p>>2]=0;t=c[p>>2]|0;l=s;return t|0}else if((a|0)==10){t=jD(c[(c[q>>2]|0)+12>>2]|0,c[(c[q>>2]|0)+16>>2]|0,c[o>>2]|0)|0;c[c[r>>2]>>2]=t;c[p>>2]=0;t=c[p>>2]|0;l=s;return t|0}return 0}function tF(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;j=l;l=l+32|0;f=j+20|0;m=j+16|0;g=j+12|0;k=j+8|0;h=j+4|0;i=j;c[m>>2]=a;c[g>>2]=d;c[k>>2]=c[(c[m>>2]|0)+16>>2];c[h>>2]=uH(c[k>>2]|0,i)|0;if(Kh(c[g>>2]|0,c[i>>2]|0)|0){c[f>>2]=7;m=c[f>>2]|0;l=j;return m|0}else{c[(c[g>>2]|0)+12>>2]=c[i>>2];b[(c[g>>2]|0)+8>>1]=(e[(c[g>>2]|0)+8>>1]|0)&-49664|16;MR(c[(c[g>>2]|0)+16>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;c[f>>2]=0;m=c[f>>2]|0;l=j;return m|0}return 0}function uF(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[h>>2]=a;c[i>>2]=b;c[j>>2]=e;c[k>>2]=f;if(!(d[(c[h>>2]|0)+66>>0]|0)){c[g>>2]=4;m=c[g>>2]|0;l=n;return m|0}if((d[(c[h>>2]|0)+66>>0]|0|0)>=3)a=YC(c[h>>2]|0)|0;else a=0;c[m>>2]=a;if(!(c[m>>2]|0))c[m>>2]=Kp(c[h>>2]|0,c[i>>2]|0,c[j>>2]|0,c[k>>2]|0,0)|0;c[g>>2]=c[m>>2];m=c[g>>2]|0;l=n;return m|0}function vF(a){a=a|0;var b=0,d=0,e=0;e=l;l=l+16|0;b=e+4|0;d=e;c[d>>2]=a;if(rH(c[(c[d>>2]|0)+16>>2]|0)|0){c[b>>2]=sH(c[d>>2]|0)|0;d=c[b>>2]|0;l=e;return d|0}else{c[b>>2]=0;d=c[b>>2]|0;l=e;return d|0}return 0}function wF(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;f=i+16|0;j=i+12|0;e=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[e>>2]=b;c[h>>2]=0;c[g>>2]=c[(c[j>>2]|0)+16>>2];b=c[g>>2]|0;if(d[(c[g>>2]|0)+56>>0]|0|0){c[h>>2]=KG(b)|0;c[h>>2]=c[h>>2];if(!(c[h>>2]|0)){c[h>>2]=fH(c[g>>2]|0)|0;c[c[e>>2]>>2]=0}c[f>>2]=c[h>>2];j=c[f>>2]|0;l=i;return j|0}a=c[e>>2]|0;if(c[b+36>>2]|0){c[a>>2]=0;c[h>>2]=NG((c[g>>2]|0)+64|0,(c[g>>2]|0)+36|0)|0}else c[a>>2]=1;c[f>>2]=c[h>>2];j=c[f>>2]|0;l=i;return j|0}function xF(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;f=h+8|0;e=h+4|0;g=h;c[f>>2]=a;c[e>>2]=b;c[g>>2]=gD(c[f>>2]|0)|0;do if(!(c[g>>2]|0)){a=c[e>>2]|0;if(!(d[(c[f>>2]|0)+66>>0]|0)){c[a>>2]=1;break}else{c[a>>2]=0;c[g>>2]=sD(c[f>>2]|0)|0;break}}while(0);l=h;return c[g>>2]|0}function yF(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;f=k+20|0;m=k+16|0;g=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=b;c[m>>2]=d;c[g>>2]=e;c[h>>2]=c[(c[m>>2]|0)+16>>2];b=c[h>>2]|0;if(a[(c[h>>2]|0)+56>>0]|0){c[i>>2]=ZG(c[b+20>>2]|0,c[g>>2]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]|0);else b=0;c[h>>2]=b&1}else{if((c[b+36+8>>2]|0)<=(c[(c[p>>2]|0)+4>>2]|0))if((c[(c[p>>2]|0)+36+8>>2]|0)>(c[c[p>>2]>>2]|0))b=(Dg()|0)!=0;else b=0;else b=1;c[h>>2]=b&1}if(c[h>>2]|0){c[q>>2]=KG(c[p>>2]|0)|0;c[(c[p>>2]|0)+36+8>>2]=0;c[(c[p>>2]|0)+48>>2]=0}}u=(c[p>>2]|0)+36+8|0;c[u>>2]=(c[u>>2]|0)+(c[g>>2]|0);if((c[g>>2]|0)>(c[(c[p>>2]|0)+8>>2]|0))c[(c[p>>2]|0)+8>>2]=c[g>>2];do if(c[(c[p>>2]|0)+36+4>>2]|0){c[i>>2]=(c[(c[p>>2]|0)+48>>2]|0)+(c[s>>2]|0);do if((c[i>>2]|0)>(c[(c[p>>2]|0)+52>>2]|0)){c[k>>2]=(c[(c[p>>2]|0)+36>>2]|0)-(c[(c[p>>2]|0)+36+4>>2]|0);c[m>>2]=c[(c[p>>2]|0)+52>>2]<<1;while(1){b=c[m>>2]|0;if((c[m>>2]|0)>=(c[i>>2]|0))break;c[m>>2]=b<<1}if((b|0)>(c[(c[p>>2]|0)+4>>2]|0))c[m>>2]=c[(c[p>>2]|0)+4>>2];if((c[m>>2]|0)<(c[i>>2]|0))c[m>>2]=c[i>>2];u=c[m>>2]|0;c[j>>2]=Sd(c[(c[p>>2]|0)+36+4>>2]|0,u,((u|0)<0)<<31>>31)|0;if(c[j>>2]|0){c[(c[p>>2]|0)+36>>2]=(c[j>>2]|0)+(c[k>>2]|0);c[(c[p>>2]|0)+36+4>>2]=c[j>>2];c[(c[p>>2]|0)+52>>2]=c[m>>2];break}c[n>>2]=7;u=c[n>>2]|0;l=t;return u|0}while(0);c[r>>2]=(c[(c[p>>2]|0)+36+4>>2]|0)+(c[(c[p>>2]|0)+48>>2]|0);u=(c[p>>2]|0)+48|0;c[u>>2]=(c[u>>2]|0)+((c[s>>2]|0)+7&-8);if(c[(c[p>>2]|0)+36>>2]|0)c[(c[r>>2]|0)+4>>2]=(c[(c[p>>2]|0)+36>>2]|0)-(c[(c[p>>2]|0)+36+4>>2]|0)}else{u=c[s>>2]|0;c[r>>2]=pd(u,((u|0)<0)<<31>>31)|0;if(c[r>>2]|0){c[(c[r>>2]|0)+4>>2]=c[(c[p>>2]|0)+36>>2];break}c[n>>2]=7;u=c[n>>2]|0;l=t;return u|0}while(0);MR((c[r>>2]|0)+8|0,c[(c[o>>2]|0)+16>>2]|0,c[(c[o>>2]|0)+12>>2]|0)|0;c[c[r>>2]>>2]=c[(c[o>>2]|0)+12>>2];c[(c[p>>2]|0)+36>>2]=c[r>>2];c[n>>2]=c[q>>2];u=c[n>>2]|0;l=t;return u|0}function AF(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;o=l;l=l+128|0;k=o+116|0;r=o+112|0;q=o+108|0;m=o+104|0;p=o+80|0;f=o+100|0;n=o+96|0;g=o+92|0;h=o+88|0;i=o+40|0;j=o;c[r>>2]=a;c[q>>2]=b;c[m>>2]=e;e=p;c[e>>2]=0;c[e+4>>2]=0;e=p;c[e>>2]=Ip(c[q>>2]|0)|0;c[e+4>>2]=0;Qi(i,c[r>>2]|0,0);c[f>>2]=bF(c[q>>2]|0,0,c[p>>2]|0,1,i)|0;if(c[f>>2]|0){c[k>>2]=c[f>>2];r=c[k>>2]|0;l=o;return r|0}a=c[i+16>>2]|0;if((d[c[i+16>>2]>>0]|0|0)<128)c[n>>2]=d[a>>0];else lD(a,n)|0;if((c[n>>2]|0)>>>0>=3?(c[n>>2]|0)<=(c[i+12>>2]|0):0){a=(c[i+16>>2]|0)+((c[n>>2]|0)-1)|0;if((d[(c[i+16>>2]|0)+((c[n>>2]|0)-1)>>0]|0|0)<128)c[g>>2]=d[a>>0];else lD(a,g)|0;if(!((c[g>>2]|0)>>>0<1|(c[g>>2]|0)>>>0>9|(c[g>>2]|0)==7)?(c[h>>2]=d[31409+(c[g>>2]|0)>>0],(c[i+12>>2]|0)>>>0>=((c[n>>2]|0)+(c[h>>2]|0)|0)>>>0):0){nD((c[i+16>>2]|0)+((c[i+12>>2]|0)-(c[h>>2]|0))|0,c[g>>2]|0,j)|0;p=j;q=c[p+4>>2]|0;r=c[m>>2]|0;c[r>>2]=c[p>>2];c[r+4>>2]=q;Lh(i);c[k>>2]=0;r=c[k>>2]|0;l=o;return r|0}}Lh(i);c[k>>2]=um(74890)|0;r=c[k>>2]|0;l=o;return r|0}function BF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+80|0;i=o+72|0;j=o+68|0;p=o+64|0;k=o+60|0;m=o+56|0;n=o+40|0;f=o+52|0;g=o+48|0;h=o;c[j>>2]=a;c[p>>2]=b;c[k>>2]=d;c[m>>2]=e;b=n;c[b>>2]=0;c[b+4>>2]=0;c[g>>2]=c[(c[p>>2]|0)+16>>2];b=n;c[b>>2]=Ip(c[g>>2]|0)|0;c[b+4>>2]=0;b=n;a=c[b+4>>2]|0;e=n;d=c[e+4>>2]|0;if((a|0)<0|(a|0)==0&(c[b>>2]|0)>>>0<=0|((d|0)>0|(d|0)==0&(c[e>>2]|0)>>>0>2147483647)){c[c[m>>2]>>2]=0;c[i>>2]=um(74923)|0;p=c[i>>2]|0;l=o;return p|0}Qi(h,c[j>>2]|0,0);c[f>>2]=bF(c[g>>2]|0,0,c[n>>2]|0,1,h)|0;if(c[f>>2]|0){c[i>>2]=c[f>>2];p=c[i>>2]|0;l=o;return p|0}else{p=jD(c[h+12>>2]|0,c[h+16>>2]|0,c[k>>2]|0)|0;c[c[m>>2]>>2]=p;Lh(h);c[i>>2]=0;p=c[i>>2]|0;l=o;return p|0}return 0}function CF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=l;l=l+16|0;i=f+12|0;h=f+8|0;g=f+4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c[f>>2]|0,0,c[g>>2]|0)|0;i=c[h>>2]|0;l=j;return i|0}function FF(a){a=a|0;var b=0,d=0;b=l;l=l+16|0;d=b;c[d>>2]=a;a=EF(c[c[d>>2]>>2]|0,c[(c[d>>2]|0)+52>>2]|0,0)|0;l=b;return a|0}function GF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=l;l=l+32|0;f=e+16|0;j=e+12|0;h=e+8|0;g=e+4|0;i=e;c[f>>2]=a;c[j>>2]=b;c[h>>2]=d;c[i>>2]=(c[(c[f>>2]|0)+16>>2]|0)+(c[j>>2]<<4);c[g>>2]=Vj((c[(c[i>>2]|0)+12>>2]|0)+8|0,c[h>>2]|0,0)|0;Jj(c[f>>2]|0,c[g>>2]|0);d=(c[f>>2]|0)+24|0;c[d>>2]=c[d>>2]|2;l=e;return}function HF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=l;l=l+32|0;e=h+20|0;k=h+16|0;i=h+12|0;f=h+8|0;j=h+4|0;g=h;c[e>>2]=a;c[k>>2]=b;c[i>>2]=d;c[j>>2]=(c[(c[(c[e>>2]|0)+16>>2]|0)+(c[k>>2]<<4)+12>>2]|0)+24;c[f>>2]=Vj(c[j>>2]|0,c[i>>2]|0,0)|0;if(!(c[f>>2]|0)){k=c[e>>2]|0;k=k+24|0;j=c[k>>2]|0;j=j|2;c[k>>2]=j;l=h;return}a=c[f>>2]|0;if((c[(c[(c[f>>2]|0)+12>>2]|0)+8>>2]|0)!=(c[f>>2]|0)){c[g>>2]=c[(c[a+12>>2]|0)+8>>2];while(1){if(c[g>>2]|0)b=(c[(c[g>>2]|0)+20>>2]|0)!=(c[f>>2]|0);else b=0;a=c[g>>2]|0;if(!b)break;c[g>>2]=c[a+20>>2]}if(a|0?(c[(c[g>>2]|0)+20>>2]|0)==(c[f>>2]|0):0)c[(c[g>>2]|0)+20>>2]=c[(c[f>>2]|0)+20>>2]}else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m(c[j>>2]|0)|0;c[j+16>>2]=c[u>>2];c[j+20>>2]=0;c[j+24>>2]=0;c[j+28>>2]=0;c[j+32>>2]=0;c[j+36>>2]=0;c[j+8>>2]=0;c[j+68>>2]=0;jd(j+40|0,0,t+128|0,100,1e9);a[j+40+25>>0]=1;a:do if(c[j+12>>2]|0){c[j+8>>2]=Cg((((c[j+12>>2]|0)>>>0)/8|0)+1|0,0)|0;if(!(c[j+8>>2]|0)){c[j+24>>2]=1;break}c[j+68>>2]=Jk(c[(c[k>>2]|0)+32>>2]|0)|0;if(!(c[j+68>>2]|0)){c[j+24>>2]=1;break}c[i>>2]=(((c[481]|0)>>>0)/((c[(c[k>>2]|0)+32>>2]|0)>>>0)|0)+1;if((c[i>>2]|0)>>>0<=(c[j+12>>2]|0)>>>0)qG(j,c[i>>2]|0);c[j+28>>2]=36838;v=el((c[(c[(c[k>>2]|0)+12>>2]|0)+56>>2]|0)+32|0)|0;rG(j,1,v,el((c[(c[(c[k>>2]|0)+12>>2]|0)+56>>2]|0)+36|0)|0);c[j+28>>2]=0;v=(c[(c[k>>2]|0)+4>>2]|0)+24|0;c[v>>2]=c[v>>2]&-536870913;c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[p>>2]|0))break;if(!(c[j+16>>2]|0))break;if(c[(c[o>>2]|0)+(c[i>>2]<<2)>>2]|0){if(d[(c[k>>2]|0)+17>>0]|0?(c[(c[o>>2]|0)+(c[i>>2]<<2)>>2]|0)>1:0)sG(j,c[(c[o>>2]|0)+(c[i>>2]<<2)>>2]|0,1,0);tG(j,c[(c[o>>2]|0)+(c[i>>2]<<2)>>2]|0,n,-1,2147483647)|0}c[i>>2]=(c[i>>2]|0)+1}c[(c[(c[k>>2]|0)+4>>2]|0)+24>>2]=c[m>>2];c[i>>2]=1;while(1){if((c[i>>2]|0)>>>0>(c[j+12>>2]|0)>>>0)break a;if(!(c[j+16>>2]|0))break a;do if(!(uG(j,c[i>>2]|0)|0)){v=hp(c[k>>2]|0,c[i>>2]|0)|0;if((v|0)==(c[i>>2]|0)?a[(c[k>>2]|0)+17>>0]|0:0)break;c[r>>2]=c[i>>2];vG(j,36854,r)}while(0);if((uG(j,c[i>>2]|0)|0?(v=hp(c[k>>2]|0,c[i>>2]|0)|0,(v|0)==(c[i>>2]|0)):0)?d[(c[k>>2]|0)+17>>0]|0:0){c[s>>2]=c[i>>2];vG(j,36876,s)}c[i>>2]=(c[i>>2]|0)+1}}while(0);Mk(c[j+68>>2]|0);Kd(c[j+8>>2]|0);if(c[j+24>>2]|0){Od(j+40|0);v=j+20|0;c[v>>2]=(c[v>>2]|0)+1}c[c[q>>2]>>2]=c[j+20>>2];if(c[j+20>>2]|0){v=j+40|0;v=ld(v)|0;l=t;return v|0}Od(j+40|0);v=j+40|0;v=ld(v)|0;l=t;return v|0}function KF(d){d=d|0;var e=0,f=0,g=0;g=l;l=l+16|0;e=g+4|0;f=g;c[e>>2]=d;c[f>>2]=c[(c[e>>2]|0)+32>>2];Lh(c[e>>2]|0);d=od(c[f>>2]|0,64,0)|0;c[(c[e>>2]|0)+20>>2]=d;if(a[(c[f>>2]|0)+69>>0]|0){b[(c[e>>2]|0)+8>>1]=1;c[(c[e>>2]|0)+24>>2]=0;l=g;return}else{d=Md(c[f>>2]|0,c[(c[e>>2]|0)+20>>2]|0)|0;c[(c[e>>2]|0)+24>>2]=d;f=pG(c[f>>2]|0,c[(c[e>>2]|0)+20>>2]|0,c[(c[e>>2]|0)+24>>2]|0)|0;c[c[e>>2]>>2]=f;b[(c[e>>2]|0)+8>>1]=32;l=g;return}}function LF(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;g=k+16|0;h=k;i=k+12|0;j=k+8|0;c[g>>2]=a;a=h;c[a>>2]=d;c[a+4>>2]=f;c[i>>2]=nG(c[g>>2]|0)|0;if(!(c[i>>2]|0)){l=k;return}a=h;d=c[a+4>>2]|0;f=c[i>>2]|0;c[f>>2]=c[a>>2];c[f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>2]=c[(c[q>>2]|0)+12>>2]}c[r>>2]=c[(c[r>>2]|0)+8>>2]}if((n|0)==23){c[o>>2]=1;r=c[o>>2]|0;l=s;return r|0}else if((n|0)==25){c[o>>2]=0;r=c[o>>2]|0;l=s;return r|0}return 0}function OF(a){a=a|0;var b=0,e=0,f=0;f=l;l=l+16|0;b=f+4|0;e=f;c[e>>2]=a;if((d[(c[e>>2]|0)+17>>0]|0|0)>=3){c[b>>2]=0;e=c[b>>2]|0;l=f;return e|0}if(c[c[(c[e>>2]|0)+68>>2]>>2]|0?(e=(c[e>>2]|0)+80|0,a=c[e+4>>2]|0,(a|0)>0|(a|0)==0&(c[e>>2]|0)>>>0>0):0){c[b>>2]=0;e=c[b>>2]|0;l=f;return e|0}c[b>>2]=1;e=c[b>>2]|0;l=f;return e|0}function PF(b){b=b|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[e>>2]=b;c[f>>2]=0;if(!(c[(c[e>>2]|0)+216>>2]|0)){c[g>>2]=0;c[f>>2]=ro(c[e>>2]|0,1)|0;if(!(c[f>>2]|0))c[f>>2]=bm(c[c[e>>2]>>2]|0,c[(c[e>>2]|0)+220>>2]|0,0,g)|0;if((c[f>>2]|0)==0&(c[g>>2]|0)!=0)c[f>>2]=pq(c[e>>2]|0)|0}if(c[f>>2]|0){g=c[f>>2]|0;l=h;return g|0}if(!(c[(c[e>>2]|0)+216>>2]|0)){g=c[f>>2]|0;l=h;return g|0}c[f>>2]=qq(c[e>>2]|0)|0;if(c[f>>2]|0){g=c[f>>2]|0;l=h;return g|0}c[f>>2]=ll(c[(c[e>>2]|0)+216>>2]|0,d[(c[e>>2]|0)+10>>0]|0,c[(c[e>>2]|0)+160>>2]|0,c[(c[e>>2]|0)+208>>2]|0)|0;c[(c[e>>2]|0)+216>>2]=0;Nk(c[e>>2]|0);if(!(c[f>>2]|0)){g=c[f>>2]|0;l=h;return g|0}if(a[(c[e>>2]|0)+4>>0]|0){g=c[f>>2]|0;l=h;return g|0}Jl(c[e>>2]|0,1)|0;g=c[f>>2]|0;l=h;return g|0}function QF(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;f=k+12|0;g=k+8|0;h=k+16|0;i=k+4|0;j=k;c[f>>2]=b;c[g>>2]=e;a[h>>0]=a[(c[f>>2]|0)+5>>0]|0;if(a[(c[f>>2]|0)+16>>0]|0?(c[g>>2]|0)!=4&(c[g>>2]|0)!=2:0)c[g>>2]=d[h>>0];do if((c[g>>2]|0)!=(d[h>>0]|0)){a[(c[f>>2]|0)+5>>0]=c[g>>2];if(((a[(c[f>>2]|0)+4>>0]|0)==0?(d[h>>0]&5|0)==1:0)?(c[g>>2]&1|0)==0:0){ql(c[(c[f>>2]|0)+68>>2]|0);if((d[(c[f>>2]|0)+18>>0]|0)>=2){zl(c[c[f>>2]>>2]|0,c[(c[f>>2]|0)+180>>2]|0,0)|0;break}c[i>>2]=0;c[j>>2]=d[(c[f>>2]|0)+17>>0];if(!(c[j>>2]|0))c[i>>2]=mq(c[f>>2]|0)|0;if((d[(c[f>>2]|0)+17>>0]|0)==1)c[i>>2]=ro(c[f>>2]|0,2)|0;if(!(c[i>>2]|0))zl(c[c[f>>2]>>2]|0,c[(c[f>>2]|0)+180>>2]|0,0)|0;if((c[i>>2]|0)==0&(c[j>>2]|0)==1){Jl(c[f>>2]|0,1)|0;break}if(c[j>>2]|0)break;ml(c[f>>2]|0);break}if((c[g>>2]|0)==2)ql(c[(c[f>>2]|0)+68>>2]|0)}while(0);l=k;return d[(c[f>>2]|0)+5>>0]|0}function RF(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+112|0;p=D+24|0;o=D+16|0;n=D+8|0;m=D;y=D+92|0;k=D+88|0;z=D+84|0;h=D+80|0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2]|0,33854)|0,(c[A>>2]|0)==0):0)?(c[A>>2]=Ro(c[B>>2]|0,2)|0,(c[A>>2]|0)==0):0){if((Uo(Hj(c[B>>2]|0)|0)|0)==5)c[(c[z>>2]|0)+80>>2]=0;f=c[C>>2]|0;h=Rm(c[B>>2]|0)|0;do if(!(Dk(f,h,c[v>>2]|0,0)|0)){if((c[g>>2]|0)==0?Dk(c[C>>2]|0,c[(c[z>>2]|0)+80>>2]|0,c[v>>2]|0,0)|0:0)break;if(!(d[(c[z>>2]|0)+69>>0]|0)){b=c[C>>2]|0;if((a[(c[z>>2]|0)+72>>0]|0)>=0)e=a[(c[z>>2]|0)+72>>0]|0;else e=xz(c[B>>2]|0)|0;zz(b,e)|0;a[(c[z>>2]|0)+148+4>>0]=c[i>>2];h=c[z>>2]|0;i=c[k>>2]|0;c[m>>2]=c[j>>2];c[A>>2]=fG(h,i,36366,m)|0;if(c[A>>2]|0)break a;i=c[z>>2]|0;m=c[k>>2]|0;c[n>>2]=c[j>>2];c[A>>2]=fG(i,m,36474,n)|0;if(c[A>>2]|0)break a;a[(c[z>>2]|0)+148+4>>0]=0;m=c[z>>2]|0;n=c[k>>2]|0;c[o>>2]=c[j>>2];c[A>>2]=fG(m,n,36547,o)|0;o=(c[z>>2]|0)+24|0;c[o>>2]=c[o>>2]&-268435457;if(c[A>>2]|0)break a;n=c[z>>2]|0;o=c[k>>2]|0;c[p>>2]=c[j>>2];c[A>>2]=fG(n,o,36698,p)|0;if(c[A>>2]|0)break a;c[x>>2]=0;while(1){b=c[B>>2]|0;if((c[x>>2]|0)>=10)break;To(b,d[36828+(c[x>>2]|0)>>0]|0,w);c[A>>2]=Xo(c[C>>2]|0,d[36828+(c[x>>2]|0)>>0]|0,(c[w>>2]|0)+(d[36828+((c[x>>2]|0)+1)>>0]|0)|0)|0;if(c[A>>2]|0)break a;c[x>>2]=(c[x>>2]|0)+2}c[A>>2]=gG(b,c[C>>2]|0)|0;if(c[A>>2]|0)break a;c[A>>2]=as(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0){j=c[d>>2]|0;l=i;return j|0}c[d>>2]=Tm(c[(c[(c[e>>2]|0)+12>>2]|0)+72>>2]|0)|0;Xm((c[(c[(c[e>>2]|0)+12>>2]|0)+56>>2]|0)+28|0,c[(c[e>>2]|0)+44>>2]|0);j=c[d>>2]|0;l=i;return j|0}function TF(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+16|0;g=m+8|0;h=m+4|0;i=m+13|0;j=m;k=m+12|0;c[g>>2]=b;c[h>>2]=e;a[i>>0]=f;c[j>>2]=0;if(!(a[(c[g>>2]|0)+9>>0]|0)){k=c[j>>2]|0;l=m;return k|0}a[k>>0]=1+(d[i>>0]|0);Ek(c[g>>2]|0);c[j>>2]=fq(c[g>>2]|0,c[h>>2]|0,a[k>>0]|0)|0;if(c[j>>2]|0){k=c[j>>2]|0;l=m;return k|0}c[j>>2]=cG(c[g>>2]|0,c[h>>2]|0,a[k>>0]|0)|0;k=c[j>>2]|0;l=m;return k|0}function UF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+32|0;d=m+24|0;e=m+20|0;f=m+16|0;g=m+12|0;h=m+8|0;i=m+4|0;j=m;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;if((c[(c[e>>2]|0)+316>>2]|0)>0?(c[(c[e>>2]|0)+340>>2]|0)==0:0){c[d>>2]=6;k=c[d>>2]|0;l=m;return k|0}if(!(c[f>>2]|0)){c[d>>2]=0;k=c[d>>2]|0;l=m;return k|0}c[h>>2]=c[c[(c[f>>2]|0)+8>>2]>>2];if(c[(c[h>>2]|0)+56>>2]|0){c[i>>2]=0;while(1){a=c[e>>2]|0;if((c[i>>2]|0)>=(c[(c[e>>2]|0)+316>>2]|0))break;if((c[(c[a+340>>2]|0)+(c[i>>2]<<2)>>2]|0)==(c[f>>2]|0)){k=10;break}c[i>>2]=(c[i>>2]|0)+1}if((k|0)==10){c[d>>2]=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c[h>>2]|0,c[k>>2]|0)|0)){p=c[j>>2]|0;l=n;return p|0}c[j>>2]=aG(c[h>>2]|0)|0;if(c[j>>2]|0){p=c[j>>2]|0;l=n;return p|0}p=c[h>>2]|0;bG(p,lv(c[h>>2]|0,c[k>>2]|0)|0);p=c[j>>2]|0;l=n;return p|0}function WF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+32|0;f=k+28|0;g=k+24|0;m=k+20|0;n=k+16|0;h=k+12|0;i=k+8|0;j=k+4|0;e=k;c[g>>2]=a;c[m>>2]=b;c[n>>2]=d;c[h>>2]=0;c[i>>2]=mu(c[g>>2]|0,c[n>>2]|0,c[(c[(c[g>>2]|0)+16>>2]|0)+(c[m>>2]<<4)>>2]|0)|0;do if(c[i>>2]|0?c[(c[i>>2]|0)+56>>2]|0:0){c[j>>2]=c[(c[i>>2]|0)+56>>2];while(1){if(!(c[j>>2]|0)){a=8;break}if((c[(c[(c[j>>2]|0)+8>>2]|0)+4>>2]|0)>0){a=6;break}c[j>>2]=c[(c[j>>2]|0)+24>>2]}if((a|0)==6){c[f>>2]=6;n=c[f>>2]|0;l=k;return n|0}else if((a|0)==8){c[j>>2]=ak(c[g>>2]|0,c[i>>2]|0)|0;c[e>>2]=c[(c[c[(c[j>>2]|0)+4>>2]>>2]|0)+20>>2];c[h>>2]=tb[c[e>>2]&255](c[(c[j>>2]|0)+8>>2]|0)|0;if(c[h>>2]|0)break;c[(c[j>>2]|0)+8>>2]=0;c[(c[i>>2]|0)+56>>2]=0;Tj(c[j>>2]|0);break}}while(0);c[f>>2]=c[h>>2];n=c[f>>2]|0;l=k;return n|0}function XF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;e=l;l=l+16|0;g=e+8|0;f=e+4|0;d=e;c[g>>2]=a;c[f>>2]=b;Ek(c[g>>2]|0);c[d>>2]=$F(c[c[(c[g>>2]|0)+4>>2]>>2]|0,c[f>>2]|0)|0;l=e;return c[d>>2]|0}function YF(f,g){f=f|0;g=g|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=l;l=l+256|0;A=D+72|0;C=D+64|0;B=D+56|0;z=D+48|0;y=D+40|0;q=D+148|0;r=D+144|0;s=D+140|0;t=D+136|0;u=D+132|0;v=D+128|0;w=D+124|0;x=D+120|0;j=D+116|0;k=D+88|0;m=D;i=D+84|0;n=D+80|0;o=D+152|0;p=D+76|0;c[q>>2]=f;c[r>>2]=g;c[t>>2]=0;c[u>>2]=1;c[s>>2]=c[c[q>>2]>>2];jd(k,0,D+156|0,100,c[(c[s>>2]|0)+96>>2]|0);a:do if((c[(c[s>>2]|0)+168>>2]|0)>1)while(1){if(!(a[c[r>>2]>>0]|0))break a;c[i>>2]=c[r>>2];do{C=c[r>>2]|0;c[r>>2]=C+1;if((a[C>>0]|0)==10)break}while((a[c[r>>2]>>0]|0)!=0);zd(k,36228,3);zd(k,c[i>>2]|0,(c[r>>2]|0)-(c[i>>2]|0)|0)}else{if(!(b[(c[q>>2]|0)+16>>1]|0)){C=c[r>>2]|0;zd(k,C,_c(c[r>>2]|0)|0);break}while(1){if(!(a[c[r>>2]>>0]|0))break a;c[v>>2]=ZF(c[r>>2]|0,w)|0;zd(k,c[r>>2]|0,c[v>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[v>>2]|0);if(!(c[w>>2]|0))break a;do if((a[c[r>>2]>>0]|0)==63)if((c[w>>2]|0)>1){Nf((c[r>>2]|0)+1|0,t)|0;break}else{c[t>>2]=c[u>>2];break}else c[t>>2]=_F(c[q>>2]|0,c[r>>2]|0,c[w>>2]|0)|0;while(0);c[r>>2]=(c[r>>2]|0)+(c[w>>2]|0);c[u>>2]=(c[t>>2]|0)+1;c[j>>2]=(c[(c[q>>2]|0)+116>>2]|0)+(((c[t>>2]|0)-1|0)*40|0);if(e[(c[j>>2]|0)+8>>1]&1|0){zd(k,17843,4);continue}f=c[j>>2]|0;if(e[(c[j>>2]|0)+8>>1]&4|0){g=c[f+4>>2]|0;i=y;c[i>>2]=c[f>>2];c[i+4>>2]=g;Vi(k,19081,y);continue}g=c[j>>2]|0;if(e[f+8>>1]&8|0){h[z>>3]=+h[g>>3];Vi(k,19086,z);continue}if(e[g+8>>1]&2|0){a[o>>0]=a[(c[s>>2]|0)+66>>0]|0;if((d[o>>0]|0)!=1){f=m;g=f+40|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[m+32>>2]=c[s>>2];Jh(m,c[(c[j>>2]|0)+16>>2]|0,c[(c[j>>2]|0)+12>>2]|0,a[o>>0]|0,0)|0;if(7==(Vh(m,1)|0)){a[k+24>>0]=1;c[k+16>>2]=0}c[j>>2]=m}c[n>>2]=c[(c[j>>2]|0)+12>>2];i=c[(c[j>>2]|0)+16>>2]|0;c[B>>2]=c[n>>2];c[B+4>>2]=i;Vi(k,36232,B);if((d[o>>0]|0)==1)continue;Lh(m);continue}else{if(e[(c[j>>2]|0)+8>>1]&16384|0){c[C>>2]=c[c[j>>2]>>2];Vi(k,36239,C);continue}zd(k,36252,2);c[p>>2]=c[(c[j>>2]|0)+12>>2];c[x>>2]=0;while(1){if((c[x>>2]|0)>=(c[p>>2]|0))break;c[A>>2]=a[(c[(c[j>>2]|0)+16>>2]|0)+(c[x>>2]|0)>>0]&255;Vi(k,36255,A);c[x>>2]=(c[x>>2]|0)+1}zd(k,36260,1);continue}}}while(0);if(!(a[k+24>>0]|0)){C=ld(k)|0;l=D;return C|0}Od(k);C=ld(k)|0;l=D;return C|0}function ZF(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;e=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;i=k;c[e>>2]=b;c[f>>2]=d;c[h>>2]=0;c[c[f>>2]>>2]=0;while(1){if(!(a[c[e>>2]>>0]|0)){j=6;break}c[i>>2]=yj(c[e>>2]|0,g)|0;b=c[i>>2]|0;if((c[g>>2]|0)==135)break;c[h>>2]=(c[h>>2]|0)+b;c[e>>2]=(c[e>>2]|0)+(c[i>>2]|0)}if((j|0)==6){j=c[h>>2]|0;l=k;return j|0}c[c[f>>2]>>2]=b;j=c[h>>2]|0;l=k;return j|0}function _F(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;g=n+20|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n+4|0;m=n;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;if(!(c[h>>2]|0)){c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}a:do if(c[i>>2]|0){c[k>>2]=0;while(1){if((c[k>>2]|0)>=(b[(c[h>>2]|0)+18>>1]|0))break a;c[m>>2]=c[(c[(c[h>>2]|0)+120>>2]|0)+(c[k>>2]<<2)>>2];if((c[m>>2]|0?(AQ(c[m>>2]|0,c[i>>2]|0,c[j>>2]|0)|0)==0:0)?(a[(c[m>>2]|0)+(c[j>>2]|0)>>0]|0)==0:0)break;c[k>>2]=(c[k>>2]|0)+1}c[g>>2]=(c[k>>2]|0)+1;m=c[g>>2]|0;l=n;return m|0}while(0);c[g>>2]=0;m=c[g>>2]|0;l=n;return m|0}function $F(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if((c[e>>2]|0)>0)c[(c[d>>2]|0)+164>>2]=c[e>>2];l=f;return c[(c[d>>2]|0)+164>>2]|0}function aG(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+32|0;b=g+16|0;d=g+12|0;e=g+4|0;f=g;c[d>>2]=a;c[g+8>>2]=5;do if(!((c[(c[d>>2]|0)+316>>2]|0)%5|0)){c[f>>2]=(c[(c[d>>2]|0)+316>>2]|0)+5<<2;f=c[f>>2]|0;c[e>>2]=Pd(c[d>>2]|0,c[(c[d>>2]|0)+340>>2]|0,f,((f|0)<0)<<31>>31)|0;if(c[e>>2]|0){f=(c[e>>2]|0)+(c[(c[d>>2]|0)+316>>2]<<2)|0;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[(c[d>>2]|0)+340>>2]=c[e>>2];break}c[b>>2]=7;f=c[b>>2]|0;l=g;return f|0}while(0);c[b>>2]=0;f=c[b>>2]|0;l=g;return f|0}function bG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=l;l=l+16|0;g=d+4|0;e=d;c[g>>2]=a;c[e>>2]=b;f=c[e>>2]|0;a=c[(c[g>>2]|0)+340>>2]|0;g=(c[g>>2]|0)+316|0;b=c[g>>2]|0;c[g>>2]=b+1;c[a+(b<<2)>>2]=f;bu(c[e>>2]|0);l=d;return}function cG(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;g=p+20|0;h=p+16|0;i=p+12|0;j=p+24|0;k=p+8|0;m=p+4|0;n=p;c[h>>2]=b;c[i>>2]=e;a[j>>0]=f;c[k>>2]=c[(c[h>>2]|0)+4>>2];c[m>>2]=0;c[n>>2]=c[(c[k>>2]|0)+72>>2];while(1){if(!(c[n>>2]|0))break;if((c[(c[n>>2]|0)+4>>2]|0)==(c[i>>2]|0)?(c[c[n>>2]>>2]|0)==(c[h>>2]|0):0){o=5;break}c[n>>2]=c[(c[n>>2]|0)+12>>2]}if((o|0)==5)c[m>>2]=c[n>>2];do if(!(c[m>>2]|0)){c[m>>2]=Cg(16,0)|0;if(c[m>>2]|0){c[(c[m>>2]|0)+4>>2]=c[i>>2];c[c[m>>2]>>2]=c[h>>2];c[(c[m>>2]|0)+12>>2]=c[(c[k>>2]|0)+72>>2];c[(c[k>>2]|0)+72>>2]=c[m>>2];break}c[g>>2]=7;o=c[g>>2]|0;l=p;return o|0}while(0);if((d[j>>0]|0|0)>(d[(c[m>>2]|0)+8>>0]|0|0))a[(c[m>>2]|0)+8>>0]=a[j>>0]|0;c[g>>2]=0;o=c[g>>2]|0;l=p;return o|0}function dG(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;e=k+24|0;f=k+20|0;g=k+16|0;m=k+12|0;h=k+8|0;i=k+4|0;j=k;c[f>>2]=a;c[g>>2]=b;c[m>>2]=d;c[i>>2]=Fu(c[f>>2]|0,c[m>>2]|0,-1,h,0)|0;if(c[i>>2]|0){c[e>>2]=c[i>>2];m=c[e>>2]|0;l=k;return m|0}while(1){m=Hr(c[h>>2]|0)|0;c[i>>2]=m;if(100!=(m|0))break;c[j>>2]=Iu(c[h>>2]|0,0)|0;if(!(c[j>>2]|0))continue;c[i>>2]=dG(c[f>>2]|0,c[g>>2]|0,c[j>>2]|0)|0;if(c[i>>2]|0)break}if((c[i>>2]|0)==101)c[i>>2]=0;if(c[i>>2]|0){j=c[g>>2]|0;m=c[f>>2]|0;uu(j,m,Ku(c[f>>2]|0)|0)}Qq(c[h>>2]|0)|0;c[e>>2]=c[i>>2];m=c[e>>2]|0;l=k;return m|0}function eG(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;Ek(c[e>>2]|0);c[b>>2]=iG(c[e>>2]|0)|0;l=d;return c[b>>2]|0}function fG(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0;k=l;l=l+48|0;f=k+40|0;g=k+36|0;h=k+32|0;n=k+28|0;i=k+24|0;m=k+8|0;j=k;c[g>>2]=a;c[h>>2]=b;c[n>>2]=d;c[m>>2]=e;c[i>>2]=Cj(c[g>>2]|0,c[n>>2]|0,m)|0;if(!(c[i>>2]|0)){c[f>>2]=7;n=c[f>>2]|0;l=k;return n|0}else{c[j>>2]=dG(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0)|0;Hd(c[g>>2]|0,c[i>>2]|0);c[f>>2]=c[j>>2];n=c[f>>2]|0;l=k;return n|0}return 0}function gG(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0;m=l;l=l+80|0;h=m+68|0;i=m+64|0;j=m+60|0;f=m+56|0;k=m+8|0;g=m;c[h>>2]=a;c[i>>2]=d;Ek(c[h>>2]|0);Ek(c[i>>2]|0);c[f>>2]=_o(Hj(c[h>>2]|0)|0)|0;if(c[c[f>>2]>>2]|0?(a=Rm(c[i>>2]|0)|0,a=RR(a|0,((a|0)<0)<<31>>31|0,Wm(c[i>>2]|0)|0,0)|0,d=g,c[d>>2]=a,c[d+4>>2]=z,g=Hl(c[f>>2]|0,11,g)|0,c[j>>2]=g,c[j>>2]=(c[j>>2]|0)==12?0:g,c[j>>2]|0):0){k=c[j>>2]|0;l=m;return k|0}a=k;d=a+48|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(d|0));c[k+20>>2]=c[c[i>>2]>>2];c[k+24>>2]=c[i>>2];c[k+4>>2]=c[h>>2];c[k+16>>2]=1;Qo(k,2147483647)|0;c[j>>2]=zq(k)|0;if(!(c[j>>2]|0)){k=(c[(c[h>>2]|0)+4>>2]|0)+22|0;b[k>>1]=(e[k>>1]|0)&-3;k=c[j>>2]|0;l=m;return k|0}else{hG(Hj(c[k+4>>2]|0)|0);k=c[j>>2]|0;l=m;return k|0}return 0}function hG(a){a=a|0;var b=0,e=0;e=l;l=l+16|0;b=e;c[b>>2]=a;if(d[(c[b>>2]|0)+13>>0]|0|0){l=e;return}Kk(c[b>>2]|0);l=e;return}function iG(a){a=a|0;var b=0,d=0,e=0;d=l;l=l+16|0;e=d+4|0;b=d;c[e>>2]=a;c[b>>2]=(c[(c[(c[e>>2]|0)+4>>2]|0)+32>>2]|0)-(c[(c[(c[e>>2]|0)+4>>2]|0)+36>>2]|0);l=d;return c[b>>2]|0}function jG(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+176|0;d=g+168|0;e=g+164|0;b=g+160|0;f=g;c[d>>2]=a;GR(f|0,0,160)|0;while(1){if(!(c[d>>2]|0))break;c[b>>2]=c[(c[d>>2]|0)+8>>2];c[(c[d>>2]|0)+8>>2]=0;c[e>>2]=0;while(1){if(!(c[f+(c[e>>2]<<2)>>2]|0))break;c[d>>2]=mG(c[f+(c[e>>2]<<2)>>2]|0,c[d>>2]|0)|0;c[f+(c[e>>2]<<2)>>2]=0;c[e>>2]=(c[e>>2]|0)+1}c[f+(c[e>>2]<<2)>>2]=c[d>>2];c[d>>2]=c[b>>2]}c[d>>2]=c[f>>2];c[e>>2]=1;while(1){if((c[e>>2]|0)>>>0>=40)break;if(c[f+(c[e>>2]<<2)>>2]|0){if(c[d>>2]|0)a=mG(c[d>>2]|0,c[f+(c[e>>2]<<2)>>2]|0)|0;else a=c[f+(c[e>>2]<<2)>>2]|0;c[d>>2]=a}c[e>>2]=(c[e>>2]|0)+1}l=g;return c[d>>2]|0}function kG(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;g=l;l=l+16|0;b=g+12|0;d=g+8|0;e=g+4|0;f=g;c[b>>2]=a;c[e>>2]=c[b>>2];c[b>>2]=c[(c[e>>2]|0)+8>>2];c[(c[e>>2]|0)+8>>2]=0;c[(c[e>>2]|0)+12>>2]=0;c[d>>2]=1;while(1){a=c[e>>2]|0;if(!(c[b>>2]|0))break;c[f>>2]=a;c[e>>2]=c[b>>2];c[b>>2]=c[(c[e>>2]|0)+8>>2];c[(c[e>>2]|0)+12>>2]=c[f>>2];a=oG(b,c[d>>2]|0)|0;c[(c[e>>2]|0)+8>>2]=a;c[d>>2]=(c[d>>2]|0)+1}l=g;return a|0}function lG(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=l;l=l+16|0;g=i+12|0;e=i+8|0;h=i+4|0;f=i;c[g>>2]=a;c[e>>2]=b;c[h>>2]=d;a=c[g>>2]|0;if(c[(c[g>>2]|0)+12>>2]|0){lG(c[a+12>>2]|0,c[e>>2]|0,f);c[(c[f>>2]|0)+8>>2]=c[g>>2]}else c[c[e>>2]>>2]=a;a=c[g>>2]|0;if(c[(c[g>>2]|0)+8>>2]|0){lG(c[a+8>>2]|0,(c[g>>2]|0)+8|0,c[h>>2]|0);l=i;return}else{c[c[h>>2]>>2]=a;l=i;return}}function mG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;h=l;l=l+32|0;d=h+24|0;e=h+20|0;f=h;g=h+16|0;c[d>>2]=a;c[e>>2]=b;c[g>>2]=f;while(1){a=c[d>>2]|0;j=c[a+4>>2]|0;b=c[e>>2]|0;i=c[b+4>>2]|0;if(!((j|0)<(i|0)|((j|0)==(i|0)?(c[a>>2]|0)>>>0<=(c[b>>2]|0)>>>0:0))){j=c[e>>2]|0;c[(c[g>>2]|0)+8>>2]=j;c[g>>2]=j;c[e>>2]=c[(c[e>>2]|0)+8>>2];if(!(c[e>>2]|0)){a=8;break}else continue}i=c[d>>2]|0;a=c[i+4>>2]|0;j=c[e>>2]|0;b=c[j+4>>2]|0;if((a|0)<(b|0)|((a|0)==(b|0)?(c[i>>2]|0)>>>0<(c[j>>2]|0)>>>0:0)){j=c[d>>2]|0;c[(c[g>>2]|0)+8>>2]=j;c[g>>2]=j}c[d>>2]=c[(c[d>>2]|0)+8>>2];if(!(c[d>>2]|0)){a=6;break}}if((a|0)==6){i=c[e>>2]|0;j=c[g>>2]|0;j=j+8|0;c[j>>2]=i;j=f+8|0;j=c[j>>2]|0;l=h;return j|0}else if((a|0)==8){i=c[d>>2]|0;j=c[g>>2]|0;j=j+8|0;c[j>>2]=i;j=f+8|0;j=c[j>>2]|0;l=h;return j|0}return 0}function nG(a){a=a|0;var d=0,f=0,g=0,h=0;h=l;l=l+16|0;d=h+8|0;f=h+4|0;g=h;c[f>>2]=a;do if(!(e[(c[f>>2]|0)+24>>1]|0)){c[g>>2]=od(c[(c[f>>2]|0)+4>>2]|0,1016,0)|0;if(c[g>>2]|0){c[c[g>>2]>>2]=c[c[f>>2]>>2];c[c[f>>2]>>2]=c[g>>2];c[(c[f>>2]|0)+16>>2]=(c[g>>2]|0)+8;b[(c[f>>2]|0)+24>>1]=63;break}c[d>>2]=0;g=c[d>>2]|0;l=h;return g|0}while(0);g=(c[f>>2]|0)+24|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;f=(c[f>>2]|0)+16|0;g=c[f>>2]|0;c[f>>2]=g+16;c[d>>2]=g;g=c[d>>2]|0;l=h;return g|0}function oG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;i=l;l=l+32|0;e=i+16|0;f=i+12|0;g=i+8|0;h=i+4|0;d=i;c[f>>2]=a;c[g>>2]=b;if(!(c[c[f>>2]>>2]|0)){c[e>>2]=0;h=c[e>>2]|0;l=i;return h|0}a=c[f>>2]|0;do if((c[g>>2]|0)>1){c[d>>2]=oG(a,(c[g>>2]|0)-1|0)|0;c[h>>2]=c[c[f>>2]>>2];a=c[d>>2]|0;if(c[h>>2]|0){c[(c[h>>2]|0)+12>>2]=a;c[c[f>>2]>>2]=c[(c[h>>2]|0)+8>>2];g=oG(c[f>>2]|0,(c[g>>2]|0)-1|0)|0;c[(c[h>>2]|0)+8>>2]=g;break}c[e>>2]=a;h=c[e>>2]|0;l=i;return h|0}else{c[h>>2]=c[a>>2];c[c[f>>2]>>2]=c[(c[h>>2]|0)+8>>2];c[(c[h>>2]|0)+8>>2]=0;c[(c[h>>2]|0)+12>>2]=0}while(0);c[e>>2]=c[h>>2];h=c[e>>2]|0;l=i;return h|0}function pG(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;g=l;l=l+16|0;i=g+12|0;j=g+8|0;h=g+4|0;f=g;c[i>>2]=a;c[j>>2]=d;c[h>>2]=e;c[f>>2]=c[j>>2];c[c[f>>2]>>2]=0;c[(c[f>>2]|0)+4>>2]=c[i>>2];c[(c[f>>2]|0)+8>>2]=0;c[(c[f>>2]|0)+12>>2]=0;c[(c[f>>2]|0)+20>>2]=0;c[(c[f>>2]|0)+16>>2]=(c[f>>2]|0)+32;b[(c[f>>2]|0)+24>>1]=(((c[h>>2]|0)-32|0)>>>0)/16|0;b[(c[f>>2]|0)+26>>1]=1;c[(c[f>>2]|0)+28>>2]=0;l=g;return c[f>>2]|0}function qG(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;f=l;l=l+16|0;h=f+4|0;g=f;c[h>>2]=b;c[g>>2]=e;e=(c[(c[h>>2]|0)+8>>2]|0)+(((c[g>>2]|0)>>>0)/8|0)|0;a[e>>0]=d[e>>0]|0|1<<(c[g>>2]&7);l=f;return}function rG(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+80|0;o=x+32|0;p=x+24|0;w=x+16|0;v=x;r=x+76|0;m=x+72|0;s=x+68|0;t=x+64|0;n=x+60|0;u=x+56|0;q=x+52|0;h=x+48|0;i=x+44|0;j=x+40|0;k=x+36|0;c[r>>2]=b;c[m>>2]=e;c[s>>2]=f;c[t>>2]=g;c[u>>2]=c[t>>2];c[q>>2]=c[s>>2];while(1){g=c[t>>2]|0;c[t>>2]=g+-1;if((g|0)<=0){b=25;break}if(!(c[(c[r>>2]|0)+16>>2]|0)){b=25;break}e=c[r>>2]|0;if((c[s>>2]|0)<1){b=5;break}if(wG(e,c[s>>2]|0)|0){b=25;break}if(rm(c[(c[r>>2]|0)+4>>2]|0,c[s>>2]|0,h,0)|0){b=8;break}c[i>>2]=Um(c[h>>2]|0)|0;do if(!(c[m>>2]|0)){if((c[t>>2]|0)>0?(d[(c[c[r>>2]>>2]|0)+17>>0]|0)!=0:0){c[n>>2]=el(c[i>>2]|0)|0;sG(c[r>>2]|0,c[n>>2]|0,4,c[s>>2]|0)}}else{c[j>>2]=el((c[i>>2]|0)+4|0)|0;if(a[(c[c[r>>2]>>2]|0)+17>>0]|0)sG(c[r>>2]|0,c[s>>2]|0,2,0);if((c[j>>2]|0)>(((c[(c[c[r>>2]>>2]|0)+36>>2]|0)/4|0)-2|0)){g=c[r>>2]|0;c[p>>2]=c[s>>2];vG(g,37454,p);c[t>>2]=(c[t>>2]|0)+-1;break}c[n>>2]=0;while(1){if((c[n>>2]|0)>=(c[j>>2]|0))break;c[k>>2]=el((c[i>>2]|0)+(8+(c[n>>2]<<2))|0)|0;if(a[(c[c[r>>2]>>2]|0)+17>>0]|0)sG(c[r>>2]|0,c[k>>2]|0,2,0);wG(c[r>>2]|0,c[k>>2]|0)|0;c[n>>2]=(c[n>>2]|0)+1}c[t>>2]=(c[t>>2]|0)-(c[j>>2]|0)}while(0);c[s>>2]=el(c[i>>2]|0)|0;Ym(c[h>>2]|0);if(!(c[m>>2]|0))continue;if((c[t>>2]|0)>=((c[s>>2]|0)!=0|0))continue;vG(c[r>>2]|0,37493,o)}if((b|0)==5){u=c[u>>2]|0;w=c[q>>2]|0;c[v>>2]=(c[t>>2]|0)+1;c[v+4>>2]=u;c[v+8>>2]=w;vG(e,37375,v);l=x;return}else if((b|0)==8){v=c[r>>2]|0;c[w>>2]=c[s>>2];vG(v,37432,w);l=x;return}else if((b|0)==25){l=x;return}} +function FA(e,f,g,h,i,j,k,m,n){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;K=l;l=l+96|0;J=K+84|0;o=K+80|0;p=K+76|0;q=K+72|0;r=K+68|0;s=K+64|0;t=K+60|0;u=K+56|0;v=K+52|0;w=K+48|0;x=K+44|0;y=K+40|0;z=K+36|0;A=K+32|0;B=K+28|0;C=K+24|0;D=K+20|0;E=K+16|0;F=K+12|0;G=K+8|0;H=K+4|0;I=K;c[J>>2]=e;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;ux(J,n);n=c[x>>2]|0;J=c[y>>2]|0;kx(n,111,J)|0;l=K;return}if((c[u>>2]|0)>0?(d[(c[r>>2]|0)+24>>0]|0)==0:0)mv(c[J>>2]|0);Wt(c[x>>2]|0,144,d[(c[r>>2]|0)+24>>0]|0,c[u>>2]|0)|0;J=c[x>>2]|0;n=c[z>>2]|0;ux(J,n);n=c[x>>2]|0;J=c[y>>2]|0;kx(n,111,J)|0;l=K;return}function GA(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=l;l=l+32|0;e=i+16|0;j=i+12|0;f=i+8|0;g=i+4|0;h=i;c[j>>2]=a;c[f>>2]=b;a=c[j>>2]|0;if(c[(c[j>>2]|0)+124>>2]|0)a=c[a+124>>2]|0;c[g>>2]=a;do if(c[(c[g>>2]|0)+468>>2]|0){c[h>>2]=c[c[(c[g>>2]|0)+468>>2]>>2];if(!((c[h>>2]|0)==(c[(c[f>>2]|0)+28>>2]|0)?(d[(c[f>>2]|0)+25>>0]|0|0)==7:0)){if((c[h>>2]|0)!=(c[(c[f>>2]|0)+28+4>>2]|0))break;if((d[(c[f>>2]|0)+25+1>>0]|0|0)!=7)break}c[e>>2]=1;j=c[e>>2]|0;l=i;return j|0}while(0);c[e>>2]=0;j=c[e>>2]|0;l=i;return j|0}function HA(a,e,f,g){a=a|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;k=s+32|0;m=s+28|0;n=s+24|0;o=s+20|0;p=s+16|0;q=s+12|0;h=s+8|0;i=s+4|0;j=s;c[m>>2]=a;c[n>>2]=e;c[o>>2]=f;c[p>>2]=g;c[q>>2]=0;a:while(1){if((c[q>>2]|0)>=(c[(c[n>>2]|0)+20>>2]|0)){r=14;break}c[h>>2]=c[(c[n>>2]|0)+36+(c[q>>2]<<3)+4>>2];c[i>>2]=0;while(1){if((c[i>>2]|0)>=(b[(c[m>>2]|0)+34>>1]|0))break;if(!((c[(c[o>>2]|0)+(c[i>>2]<<2)>>2]|0)<0?!(c[p>>2]|0?(c[i>>2]|0)==(b[(c[m>>2]|0)+32>>1]|0):0):0))r=7;do if((r|0)==7){r=0;c[j>>2]=(c[(c[m>>2]|0)+4>>2]|0)+(c[i>>2]<<4);a=c[j>>2]|0;if(c[h>>2]|0)if(!(Ig(c[a>>2]|0,c[h>>2]|0)|0)){r=9;break a}else break;else if(d[a+15>>0]&1|0){r=11;break a}else break}while(0);c[i>>2]=(c[i>>2]|0)+1}c[q>>2]=(c[q>>2]|0)+1}if((r|0)==9){c[k>>2]=1;r=c[k>>2]|0;l=s;return r|0}else if((r|0)==11){c[k>>2]=1;r=c[k>>2]|0;l=s;return r|0}else if((r|0)==14){c[k>>2]=0;r=c[k>>2]|0;l=s;return r|0}return 0}function IA(a,f,g,h,i,j,k,m){a=a|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=l;l=l+144|0;M=O+128|0;N=O+124|0;n=O+120|0;o=O+116|0;p=O+112|0;q=O+108|0;r=O+104|0;s=O+100|0;t=O+96|0;u=O+92|0;v=O+88|0;w=O+56|0;x=O+48|0;y=O+44|0;z=O+40|0;A=O+36|0;B=O+32|0;C=O+28|0;D=O+134|0;E=O+24|0;F=O+20|0;G=O+16|0;H=O+12|0;I=O+8|0;J=O+4|0;K=O;L=O+132|0;c[M>>2]=a;c[N>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=i;c[q>>2]=j;c[r>>2]=k;c[s>>2]=m;c[t>>2]=c[c[M>>2]>>2];c[v>>2]=0;c[y>>2]=0;c[z>>2]=Rt(c[M>>2]|0)|0;if((c[s>>2]|0)<0)c[y>>2]=Wt(c[z>>2]|0,65,d[(c[p>>2]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>>2];c[o>>2]=ow(c[j>>2]|0,c[o>>2]|0,c[h>>2]|0)|0;p=c[o>>2]|0;l=q;return p|0}c[(c[o>>2]|0)+28>>2]=c[m>>2];a[(c[o>>2]|0)+1>>0]=68;p=c[o>>2]|0;l=q;return p|0}function KA(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+32|0;m=k+12|0;g=k+8|0;h=k+4|0;i=k+16|0;j=k;c[m>>2]=a;c[g>>2]=d;c[h>>2]=e;b[i>>1]=f;c[j>>2]=Ns(c[m>>2]|0,152,0)|0;if(!(c[j>>2]|0)){m=c[j>>2]|0;l=k;return m|0}c[(c[j>>2]|0)+44>>2]=c[g>>2];c[(c[j>>2]|0)+28>>2]=c[h>>2];b[(c[j>>2]|0)+32>>1]=b[i>>1]|0;m=c[j>>2]|0;l=k;return m|0}function LA(f,g,h,i,j,k,m){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;ca=l;l=l+192|0;n=ca+24|0;$=ca+180|0;aa=ca+176|0;ba=ca+172|0;o=ca+168|0;q=ca+164|0;r=ca+160|0;R=ca+184|0;s=ca+156|0;p=ca+152|0;S=ca+148|0;T=ca+144|0;U=ca+140|0;V=ca+16|0;t=ca+120|0;u=ca+116|0;W=ca+112|0;v=ca+108|0;X=ca+104|0;Y=ca+100|0;w=ca+96|0;x=ca+186|0;y=ca+8|0;A=ca+92|0;B=ca+88|0;C=ca+84|0;D=ca+80|0;E=ca+76|0;F=ca+72|0;G=ca+68|0;H=ca+64|0;I=ca+60|0;J=ca+56|0;K=ca;L=ca+52|0;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2]}}while(0);if(!((c[S>>2]|0)==1?(aB(t)|0)!=0:0)){c[w>>2]=bB(t)|0;if(c[w>>2]|0)break;cB(c[T>>2]|0,0)|0;if(a[(c[Y>>2]|0)+69>>0]|0)break;if(c[(c[T>>2]|0)+8>>2]|0?(cB(c[T>>2]|0,(b[(c[T>>2]|0)+72>>1]|0)+1&65535)|0,a[(c[Y>>2]|0)+69>>0]|0):0)break}if((c[(c[T>>2]|0)+8>>2]|0)==0?c[(c[Y>>2]|0)+24>>2]&131072|0:0){w=(c[T>>2]|0)+64|0;c[w>>2]=-1;c[w+4>>2]=-1}if((c[(c[aa>>2]|0)+36>>2]|0)==0?(d[(c[Y>>2]|0)+69>>0]|0)==0:0){b:do if((c[r>>2]|0?(d[(c[T>>2]|0)+42>>0]|0)>=2:0)?(e[(c[Y>>2]|0)+64>>1]&1024|0)==0:0){r=dB(c[u>>2]|0,c[r>>2]|0)|0;w=y;c[w>>2]=r;c[w+4>>2]=z;if(c[t+8>>2]|0){r=dB(c[u>>2]|0,c[t+8>>2]|0)|0;q=y;u=c[q+4>>2]|z;w=y;c[w>>2]=c[q>>2]|r;c[w+4>>2]=u}while(1){if((d[(c[T>>2]|0)+42>>0]|0)<2)break b;c[v>>2]=c[(c[T>>2]|0)+752+(((d[(c[T>>2]|0)+42>>0]|0)-1|0)*80|0)+64>>2];if(!(d[(c[(c[T>>2]|0)+4>>2]|0)+8+((d[(c[v>>2]|0)+16>>0]|0)*72|0)+36>>0]&8))break b;if((e[R>>1]&256|0)==0?(c[(c[v>>2]|0)+36>>2]&4096|0)==0:0)break b;u=y;w=(c[v>>2]|0)+8|0;if(c[u>>2]&c[w>>2]|0?1:(c[u+4>>2]&c[w+4>>2]|0)!=0)break b;c[B>>2]=(c[(c[t+4>>2]|0)+20>>2]|0)+((c[(c[t+4>>2]|0)+12>>2]|0)*48|0);c[A>>2]=c[(c[t+4>>2]|0)+20>>2];while(1){if((c[A>>2]|0)>>>0>=(c[B>>2]|0)>>>0)break;u=(c[A>>2]|0)+40|0;w=(c[v>>2]|0)+8|0;if((c[u>>2]&c[w>>2]|0?1:(c[u+4>>2]&c[w+4>>2]|0)!=0)?(c[(c[c[A>>2]>>2]|0)+4>>2]&1|0)==0:0)break;c[A>>2]=(c[A>>2]|0)+48}if((c[A>>2]|0)>>>0<(c[B>>2]|0)>>>0)break b;w=(c[T>>2]|0)+42|0;a[w>>0]=(a[w>>0]|0)+-1<<24>>24;c[S>>2]=(c[S>>2]|0)+-1}}while(0);B=(c[c[T>>2]>>2]|0)+136|0;c[B>>2]=(c[B>>2]|0)+(b[(c[T>>2]|0)+72>>1]|0);do if(e[R>>1]&4|0){c[C>>2]=c[(c[(c[T>>2]|0)+752+64>>2]|0)+36>>2];c[D>>2]=(c[C>>2]&4096|0)!=0&1;if(!(c[D>>2]|0)){if(!(e[R>>1]&8))break;if(c[C>>2]&1024)break}a[(c[T>>2]|0)+45>>0]=c[D>>2]|0?1:2;if((d[(c[(c[ba>>2]|0)+8+16>>2]|0)+42>>0]&32|0)==0?c[C>>2]&64|0:0){if(e[R>>1]&8|0)a[x>>0]=8;c[(c[(c[T>>2]|0)+752+64>>2]|0)+36>>2]=c[C>>2]&-65}}while(0);c[X>>2]=0;c[W>>2]=(c[T>>2]|0)+752;while(1){if((c[X>>2]|0)>=(c[S>>2]|0))break;c[G>>2]=(c[ba>>2]|0)+8+((d[(c[W>>2]|0)+44>>0]|0)*72|0);c[E>>2]=c[(c[G>>2]|0)+16>>2];c[F>>2]=Nt(c[Y>>2]|0,c[(c[E>>2]|0)+64>>2]|0)|0;c[v>>2]=c[(c[W>>2]|0)+64>>2];c:do if((d[(c[E>>2]|0)+42>>0]&2|0)==0?(c[(c[E>>2]|0)+12>>2]|0)==0:0){if(c[(c[v>>2]|0)+36>>2]&1024|0){c[H>>2]=lv(c[Y>>2]|0,c[E>>2]|0)|0;c[I>>2]=c[(c[G>>2]|0)+44>>2];_t(c[U>>2]|0,155,c[I>>2]|0,0,0,c[H>>2]|0,-10)|0;break}if(d[(c[E>>2]|0)+42>>0]&16|0)break;do if(!(c[(c[v>>2]|0)+36>>2]&64)){if(e[R>>1]&32|0)break;c[J>>2]=104;if(d[(c[T>>2]|0)+45>>0]|0){c[J>>2]=105;c[(c[T>>2]|0)+20>>2]=c[(c[G>>2]|0)+44>>2]}nx(c[aa>>2]|0,c[(c[G>>2]|0)+44>>2]|0,c[F>>2]|0,c[E>>2]|0,c[J>>2]|0);do if(!(d[(c[T>>2]|0)+45>>0]|0)){if((b[(c[E>>2]|0)+34>>1]|0)>=64)break;if(d[(c[E>>2]|0)+42>>0]&32|0)break;B=(c[G>>2]|0)+56|0;C=c[B+4>>2]|0;D=K;c[D>>2]=c[B>>2];c[D+4>>2]=C;c[L>>2]=0;while(1){D=K;if(!((c[D>>2]|0)!=0|(c[D+4>>2]|0)!=0))break;C=K;C=OR(c[C>>2]|0,c[C+4>>2]|0,1)|0;D=K;c[D>>2]=C;c[D+4>>2]=z;c[L>>2]=(c[L>>2]|0)+1}$t(c[U>>2]|0,-1,c[L>>2]|0,-14)}while(0);px(c[U>>2]|0,a[x>>0]|0);break c}while(0);mx(c[aa>>2]|0,c[F>>2]|0,c[(c[E>>2]|0)+28>>2]|0,0,c[c[E>>2]>>2]|0)}while(0);do if(c[(c[v>>2]|0)+36>>2]&512|0){c[M>>2]=c[(c[v>>2]|0)+24+8>>2];c[O>>2]=104;do if(!(d[(c[E>>2]|0)+42>>0]&32))Q=93;else{if((a[(c[M>>2]|0)+55>>0]&3|0)!=2){Q=93;break}if(!(e[R>>1]&32)){Q=93;break}c[N>>2]=c[(c[W>>2]|0)+4>>2];c[O>>2]=0}while(0);d:do if((Q|0)==93){Q=0;if(!(d[(c[T>>2]|0)+45>>0]|0)){do if(c[s>>2]|0){if(!(e[R>>1]&32))break;c[N>>2]=c[s>>2];c[O>>2]=103;break d}while(0);C=(c[aa>>2]|0)+40|0;D=c[C>>2]|0;c[C>>2]=D+1;c[N>>2]=D;break}c[P>>2]=c[(c[(c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2]|0)+32>>2]=P;P=V;P=gB(c[T>>2]|0,c[X>>2]|0,c[P>>2]|0,c[P+4>>2]|0)|0;Q=V;c[Q>>2]=P;c[Q+4>>2]=z;c[(c[T>>2]|0)+28>>2]=c[(c[W>>2]|0)+24>>2];do if((c[_>>2]&8192|0)==0?e[R>>1]&32|0:0)break;while(0);c[X>>2]=(c[X>>2]|0)+1}c[$>>2]=f;ba=c[$>>2]|0;l=ca;return ba|0}}}}else{Hd(c[Y>>2]|0,c[T>>2]|0);c[T>>2]=0}while(0);if(c[T>>2]|0){c[(c[aa>>2]|0)+136>>2]=c[(c[T>>2]|0)+36>>2];OA(c[Y>>2]|0,c[T>>2]|0)}c[$>>2]=0;ba=c[$>>2]|0;l=ca;return ba|0}function MA(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l;l=l+96|0;m=E+80|0;u=E+76|0;x=E+72|0;y=E+68|0;z=E+64|0;A=E+60|0;B=E+56|0;C=E+52|0;k=E+48|0;h=E+44|0;i=E+40|0;j=E+36|0;n=E+32|0;o=E+28|0;p=E+24|0;q=E+20|0;r=E+16|0;s=E+12|0;t=E+8|0;v=E+4|0;w=E;c[m>>2]=f;c[u>>2]=c[c[m>>2]>>2];c[x>>2]=c[(c[u>>2]|0)+8>>2];c[B>>2]=c[(c[m>>2]|0)+4>>2];c[C>>2]=c[c[u>>2]>>2];Kz(c[u>>2]|0);c[y>>2]=(d[(c[m>>2]|0)+42>>0]|0)-1;while(1){if((c[y>>2]|0)<0)break;c[z>>2]=(c[m>>2]|0)+752+((c[y>>2]|0)*80|0);c[A>>2]=c[(c[z>>2]|0)+64>>2];ux(c[x>>2]|0,c[(c[z>>2]|0)+24>>2]|0);if((d[(c[z>>2]|0)+45>>0]|0)!=161){Xt(c[x>>2]|0,d[(c[z>>2]|0)+45>>0]|0,c[(c[z>>2]|0)+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)==22){D=0;kx(c[x>>2]|0,124,c[(c[z>>2]|0)+8>>2]|0)|0}f=c[x>>2]|0;g=c[z>>2]|0;if((d[(c[z>>2]|0)+45>>0]|0)==72)Wt(f,14,c[g+48>>2]|0,c[(c[z>>2]|0)+28>>2]|0)|0;else sx(f,c[g+28>>2]|0)|0;tx(c[x>>2]|0,c[k>>2]|0)}c[y>>2]=(c[y>>2]|0)+-1}ux(c[x>>2]|0,c[(c[m>>2]|0)+32>>2]|0);c[y>>2]=0;c[z>>2]=(c[m>>2]|0)+752;while(1){if((c[y>>2]|0)>=(d[(c[m>>2]|0)+42>>0]|0))break;c[q>>2]=0;c[r>>2]=(c[B>>2]|0)+8+((d[(c[z>>2]|0)+44>>0]|0)*72|0);c[s>>2]=c[(c[r>>2]|0)+16>>2];c[A>>2]=c[(c[z>>2]|0)+64>>2];if((d[(c[r>>2]|0)+36+1>>0]|0)>>>4&1|0?!(a[(c[C>>2]|0)+69>>0]|0):0)NA(c[x>>2]|0,c[(c[z>>2]|0)+32>>2]|0,c[(c[z>>2]|0)+4>>2]|0,c[(c[r>>2]|0)+32>>2]|0,0);else D=33;b:do if((D|0)==33){D=0;if(((d[(c[s>>2]|0)+42>>0]&2|0)==0?(c[(c[s>>2]|0)+12>>2]|0)==0:0)?(e[(c[m>>2]|0)+40>>1]&32|0)==0:0){c[t>>2]=c[(c[A>>2]|0)+36>>2];if((d[(c[m>>2]|0)+45>>0]|0)==0?(c[t>>2]&64|0)==0:0)kx(c[x>>2]|0,111,c[(c[r>>2]|0)+44>>2]|0)|0;if((c[t>>2]&512|0?(c[t>>2]&16640|0)==0:0)?(c[(c[z>>2]|0)+8>>2]|0)!=(c[(c[m>>2]|0)+20+4>>2]|0):0)kx(c[x>>2]|0,111,c[(c[z>>2]|0)+8>>2]|0)|0}f=c[A>>2]|0;if(!(c[(c[A>>2]|0)+36>>2]&576|0)){if(c[f+36>>2]&8192|0)c[q>>2]=c[(c[z>>2]|0)+56>>2]}else c[q>>2]=c[f+24+8>>2];if(c[q>>2]|0){if(d[(c[m>>2]|0)+45>>0]|0?(d[(c[(c[q>>2]|0)+12>>2]|0)+42>>0]&32|0)==0:0)break;if(!(a[(c[C>>2]|0)+69>>0]|0)){c[o>>2]=Vu(c[x>>2]|0)|0;c[n>>2]=c[(c[z>>2]|0)+32>>2];c[p>>2]=Ax(c[x>>2]|0,c[n>>2]|0)|0;while(1){if((c[n>>2]|0)>=(c[o>>2]|0))break b;do if((c[(c[p>>2]|0)+4>>2]|0)==(c[(c[z>>2]|0)+4>>2]|0)){f=c[p>>2]|0;if((d[c[p>>2]>>0]|0)!=96){if((d[f>>0]|0)!=123)break;c[(c[p>>2]|0)+4>>2]=c[(c[z>>2]|0)+8>>2];a[c[p>>2]>>0]=-127;break}c[v>>2]=c[f+8>>2];if(d[(c[s>>2]|0)+42>>0]&32|0){c[w>>2]=Au(c[s>>2]|0)|0;c[v>>2]=b[(c[(c[w>>2]|0)+4>>2]|0)+(c[v>>2]<<1)>>1]}c[v>>2]=(_x(c[q>>2]|0,c[v>>2]&65535)|0)<<16>>16;if((c[v>>2]|0)>=0){c[(c[p>>2]|0)+8>>2]=c[v>>2];c[(c[p>>2]|0)+4>>2]=c[(c[z>>2]|0)+8>>2]}}while(0);c[n>>2]=(c[n>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+20}}}}while(0);c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+80}c[(c[u>>2]|0)+136>>2]=c[(c[m>>2]|0)+36>>2];OA(c[C>>2]|0,c[m>>2]|0);l=E;return}function NA(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;p=l;l=l+32|0;q=p+24|0;k=p+20|0;m=p+16|0;n=p+12|0;o=p+8|0;i=p+4|0;j=p;c[q>>2]=b;c[k>>2]=e;c[m>>2]=f;c[n>>2]=g;c[o>>2]=h;c[i>>2]=Ax(c[q>>2]|0,c[k>>2]|0)|0;c[j>>2]=Vu(c[q>>2]|0)|0;while(1){if((c[k>>2]|0)>=(c[j>>2]|0))break;do if((c[(c[i>>2]|0)+4>>2]|0)==(c[m>>2]|0)){b=c[i>>2]|0;if((d[c[i>>2]>>0]|0|0)==96){a[b>>0]=84;c[(c[i>>2]|0)+4>>2]=(c[(c[i>>2]|0)+8>>2]|0)+(c[n>>2]|0);c[(c[i>>2]|0)+8>>2]=c[(c[i>>2]|0)+12>>2];c[(c[i>>2]|0)+12>>2]=0;break}if((d[b>>0]|0|0)==123){b=c[i>>2]|0;if(c[o>>2]|0){a[b>>0]=91;c[(c[i>>2]|0)+4>>2]=c[(c[i>>2]|0)+8>>2];c[(c[i>>2]|0)+8>>2]=1;break}else{a[b>>0]=79;c[(c[i>>2]|0)+4>>2]=0;c[(c[i>>2]|0)+12>>2]=0;break}}}while(0);c[k>>2]=(c[k>>2]|0)+1;c[i>>2]=(c[i>>2]|0)+20}l=p;return}function OA(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=l;l=l+32|0;e=j+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){l=j;return}c[g>>2]=0;while(1){a=c[f>>2]|0;if((c[g>>2]|0)>=(d[(c[f>>2]|0)+42>>0]|0|0))break;c[h>>2]=a+752+((c[g>>2]|0)*80|0);if(c[(c[h>>2]|0)+64>>2]|0?c[(c[(c[h>>2]|0)+64>>2]|0)+36>>2]&2048|0:0)Hd(c[e>>2]|0,c[(c[h>>2]|0)+56+4>>2]|0);c[g>>2]=(c[g>>2]|0)+1}PA(a+80|0);while(1){if(!(c[(c[f>>2]|0)+56>>2]|0))break;c[i>>2]=c[(c[f>>2]|0)+56>>2];c[(c[f>>2]|0)+56>>2]=c[(c[i>>2]|0)+52>>2];QA(c[e>>2]|0,c[i>>2]|0)}Hd(c[e>>2]|0,c[f>>2]|0);l=j;return}function PA(a){a=a|0;var b=0,d=0,f=0,g=0,h=0;h=l;l=l+16|0;b=h+12|0;d=h+8|0;f=h+4|0;g=h;c[b>>2]=a;c[g>>2]=c[c[c[c[b>>2]>>2]>>2]>>2];c[d>>2]=(c[(c[b>>2]|0)+12>>2]|0)-1;c[f>>2]=c[(c[b>>2]|0)+20>>2];while(1){if((c[d>>2]|0)<0)break;if((e[(c[f>>2]|0)+10>>1]|0)&1|0)ck(c[g>>2]|0,c[c[f>>2]>>2]|0);if(!((e[(c[f>>2]|0)+10>>1]|0)&16|0)){if((e[(c[f>>2]|0)+10>>1]|0)&32|0)VA(c[g>>2]|0,c[(c[f>>2]|0)+28>>2]|0)}else UA(c[g>>2]|0,c[(c[f>>2]|0)+28>>2]|0);c[d>>2]=(c[d>>2]|0)+-1;c[f>>2]=(c[f>>2]|0)+48}if((c[(c[b>>2]|0)+20>>2]|0)==((c[b>>2]|0)+24|0)){l=h;return}Hd(c[g>>2]|0,c[(c[b>>2]|0)+20>>2]|0);l=h;return}function QA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;RA(c[f>>2]|0,c[e>>2]|0);Hd(c[f>>2]|0,c[e>>2]|0);l=d;return}function RA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f+4|0;e=f;c[d>>2]=a;c[e>>2]=b;if((c[(c[e>>2]|0)+48>>2]|0)!=((c[e>>2]|0)+56|0))Hd(c[d>>2]|0,c[(c[e>>2]|0)+48>>2]|0);SA(c[d>>2]|0,c[e>>2]|0);TA(c[e>>2]|0);l=f;return}function SA(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=b;c[g>>2]=e;if(!(c[(c[g>>2]|0)+36>>2]&17408)){l=h;return}if(c[(c[g>>2]|0)+36>>2]&1024|0?d[(c[g>>2]|0)+24+4>>0]|0|0:0){Kd(c[(c[g>>2]|0)+24+8>>2]|0);a[(c[g>>2]|0)+24+4>>0]=0;c[(c[g>>2]|0)+24+8>>2]=0;l=h;return}if(!(c[(c[g>>2]|0)+36>>2]&16384)){l=h;return}if(!(c[(c[g>>2]|0)+24+8>>2]|0)){l=h;return}Hd(c[f>>2]|0,c[(c[(c[g>>2]|0)+24+8>>2]|0)+16>>2]|0);Hd(c[f>>2]|0,c[(c[g>>2]|0)+24+8>>2]|0);c[(c[g>>2]|0)+24+8>>2]=0;l=h;return}function TA(a){a=a|0;var d=0,e=0;d=l;l=l+16|0;e=d;c[e>>2]=a;c[(c[e>>2]|0)+48>>2]=(c[e>>2]|0)+56;b[(c[e>>2]|0)+40>>1]=0;b[(c[e>>2]|0)+44>>1]=3;c[(c[e>>2]|0)+36>>2]=0;l=d;return}function UA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;PA(c[e>>2]|0);Hd(c[f>>2]|0,c[e>>2]|0);l=d;return}function VA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;PA(c[e>>2]|0);Hd(c[f>>2]|0,c[e>>2]|0);l=d;return}function WA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[c[e>>2]>>2]=c[f>>2];c[(c[e>>2]|0)+4>>2]=0;c[(c[e>>2]|0)+12>>2]=0;c[(c[e>>2]|0)+16>>2]=8;c[(c[e>>2]|0)+20>>2]=(c[e>>2]|0)+24;l=d;return}function XA(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;g=k+8|0;h=k+4|0;i=k+12|0;j=k;c[g>>2]=b;c[h>>2]=e;a[i>>0]=f;c[j>>2]=Ev(c[h>>2]|0)|0;a[(c[g>>2]|0)+8>>0]=a[i>>0]|0;if(!(c[j>>2]|0)){l=k;return}b=c[g>>2]|0;if((d[c[j>>2]>>0]|0|0)!=(d[i>>0]|0|0)){oC(b,c[h>>2]|0,0)|0;l=k;return}else{XA(b,c[(c[j>>2]|0)+12>>2]|0,a[i>>0]|0);XA(c[g>>2]|0,c[(c[j>>2]|0)+16>>2]|0,a[i>>0]|0);l=k;return}}function YA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;e=c[e>>2]|0;a=(c[f>>2]|0)+4|0;f=c[f>>2]|0;b=c[f>>2]|0;c[f>>2]=b+1;c[a+(b<<2)>>2]=e;l=d;return}function ZA(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+48|0;q=r;i=r+40|0;j=r+36|0;k=r+32|0;o=r+28|0;p=r+24|0;m=r+20|0;n=r+16|0;g=r+12|0;h=r+8|0;c[i>>2]=a;c[j>>2]=e;c[k>>2]=f;if(!((d[(c[j>>2]|0)+36+1>>0]|0)>>>2&1)){l=r;return}c[o>>2]=c[(c[j>>2]|0)+16>>2];c[n>>2]=c[(c[j>>2]|0)+64>>2];if(!(c[n>>2]|0)){l=r;return}c[m>>2]=0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[c[n>>2]>>2]|0)){a=13;break}while(1){if((c[m>>2]|0)<(b[(c[o>>2]|0)+34>>1]|0))a=(d[(c[(c[o>>2]|0)+4>>2]|0)+(c[m>>2]<<4)+15>>0]&2|0)==0;else a=0;e=c[m>>2]|0;if(!a)break;c[m>>2]=e+1}f=c[i>>2]|0;if((e|0)>=(b[(c[o>>2]|0)+34>>1]|0)){a=10;break}c[g>>2]=at(c[f>>2]|0,152,0,0)|0;if(!(c[g>>2]|0)){a=13;break}c[(c[g>>2]|0)+28>>2]=c[(c[j>>2]|0)+44>>2];e=c[m>>2]|0;c[m>>2]=e+1;b[(c[g>>2]|0)+32>>1]=e;c[(c[g>>2]|0)+44>>2]=c[o>>2];e=c[i>>2]|0;f=c[g>>2]|0;c[h>>2]=vs(e,37,f,aw(c[c[i>>2]>>2]|0,c[(c[(c[n>>2]|0)+4>>2]|0)+((c[p>>2]|0)*20|0)>>2]|0,0)|0,0)|0;oC(c[k>>2]|0,c[h>>2]|0,1)|0;c[p>>2]=(c[p>>2]|0)+1}if((a|0)==10){p=c[p>>2]|0;c[q>>2]=c[c[o>>2]>>2];c[q+4>>2]=p;Ck(f,31359,q);l=r;return}else if((a|0)==13){l=r;return}}function _A(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=l;l=l+16|0;d=g+8|0;e=g+4|0;f=g;c[d>>2]=a;c[e>>2]=b;c[f>>2]=(c[(c[e>>2]|0)+12>>2]|0)-1;while(1){if((c[f>>2]|0)<0)break;kC(c[d>>2]|0,c[e>>2]|0,c[f>>2]|0);c[f>>2]=(c[f>>2]|0)+-1}l=g;return}function $A(a,f,g,h){a=a|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;n=u+36|0;o=u+32|0;p=u+28|0;q=u+24|0;r=u+20|0;s=u+16|0;i=u+12|0;j=u+8|0;k=u+4|0;m=u;c[o>>2]=a;c[p>>2]=f;c[q>>2]=g;c[r>>2]=h;if((c[c[p>>2]>>2]|0)!=1){c[n>>2]=0;t=c[n>>2]|0;l=u;return t|0}c[k>>2]=c[(c[p>>2]|0)+8+44>>2];c[s>>2]=c[(c[p>>2]|0)+8+16>>2];c[j>>2]=0;while(1){if((c[j>>2]|0)>=(c[c[r>>2]>>2]|0))break;c[m>>2]=Ev(c[(c[(c[r>>2]|0)+4>>2]|0)+((c[j>>2]|0)*20|0)>>2]|0)|0;if(((d[c[m>>2]>>0]|0)==152?(c[(c[m>>2]|0)+28>>2]|0)==(c[k>>2]|0):0)?(b[(c[m>>2]|0)+32>>1]|0)<0:0){t=8;break}c[j>>2]=(c[j>>2]|0)+1}if((t|0)==8){c[n>>2]=1;t=c[n>>2]|0;l=u;return t|0}c[i>>2]=c[(c[s>>2]|0)+8>>2];while(1){if(!(c[i>>2]|0)){t=22;break}if(d[(c[i>>2]|0)+54>>0]|0){c[j>>2]=0;while(1){if((c[j>>2]|0)>=(e[(c[i>>2]|0)+50>>1]|0))break;if(!(sB(c[q>>2]|0,c[k>>2]|0,c[j>>2]|0,-1,-1,2,c[i>>2]|0)|0)){if((jC(c[o>>2]|0,c[r>>2]|0,c[k>>2]|0,c[i>>2]|0,c[j>>2]|0)|0)<0)break;if(!($B(c[i>>2]|0,c[j>>2]|0)|0))break}c[j>>2]=(c[j>>2]|0)+1}if((c[j>>2]|0)==(e[(c[i>>2]|0)+50>>1]|0)){t=20;break}}c[i>>2]=c[(c[i>>2]|0)+20>>2]}if((t|0)==20){c[n>>2]=1;t=c[n>>2]|0;l=u;return t|0}else if((t|0)==22){c[n>>2]=0;t=c[n>>2]|0;l=u;return t|0}return 0}function aB(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=l;l=l+48|0;p=u+44|0;j=u+40|0;q=u+36|0;k=u+32|0;m=u+28|0;n=u+24|0;r=u+20|0;s=u+16|0;o=u+12|0;g=u+8|0;h=u+4|0;i=u;c[j>>2]=f;c[q>>2]=c[c[j>>2]>>2];if((e[(c[q>>2]|0)+40>>1]|0)&32|0){c[p>>2]=0;t=c[p>>2]|0;l=u;return t|0}c[k>>2]=(c[(c[q>>2]|0)+4>>2]|0)+8;c[g>>2]=c[(c[k>>2]|0)+16>>2];if((d[(c[g>>2]|0)+42>>0]|0)&16|0){c[p>>2]=0;t=c[p>>2]|0;l=u;return t|0}if((d[(c[k>>2]|0)+36+1>>0]|0)>>>1&1|0){c[p>>2]=0;t=c[p>>2]|0;l=u;return t|0}c[s>>2]=c[(c[k>>2]|0)+44>>2];c[m>>2]=(c[q>>2]|0)+80;c[r>>2]=c[(c[j>>2]|0)+12>>2];c[(c[r>>2]|0)+36>>2]=0;b[(c[r>>2]|0)+42>>1]=0;c[n>>2]=sB(c[m>>2]|0,c[s>>2]|0,-1,0,0,130,0)|0;a:do if(c[n>>2]|0){c[(c[r>>2]|0)+36>>2]=4353;c[c[(c[r>>2]|0)+48>>2]>>2]=c[n>>2];b[(c[r>>2]|0)+40>>1]=1;b[(c[r>>2]|0)+24>>1]=1;f=33;g=c[r>>2]|0;t=24}else{c[h>>2]=c[(c[g>>2]|0)+8>>2];while(1){if(!(c[h>>2]|0))break a;if((d[(c[h>>2]|0)+54>>0]|0|0?(c[(c[h>>2]|0)+36>>2]|0)==0:0)?(e[(c[h>>2]|0)+50>>1]|0|0)<=3:0){c[i>>2]=(d[(c[h>>2]|0)+55>>0]|0)>>>3&1|0?130:2;c[o>>2]=0;while(1){if((c[o>>2]|0)>=(e[(c[h>>2]|0)+50>>1]|0|0))break;c[n>>2]=sB(c[m>>2]|0,c[s>>2]|0,c[o>>2]|0,0,0,c[i>>2]|0,c[h>>2]|0)|0;if(!(c[n>>2]|0))break;c[(c[(c[r>>2]|0)+48>>2]|0)+(c[o>>2]<<2)>>2]=c[n>>2];c[o>>2]=(c[o>>2]|0)+1}if((c[o>>2]|0)==(e[(c[h>>2]|0)+50>>1]|0|0))break}c[h>>2]=c[(c[h>>2]|0)+20>>2]}c[(c[r>>2]|0)+36>>2]=4609;if(!(!((d[(c[h>>2]|0)+55>>0]|0)>>>5&1|0)?(t=(c[k>>2]|0)+56|0,m=c[t>>2]|0,t=c[t+4>>2]|0,n=YB(c[h>>2]|0)|0,!((m&~n|0)==0&(t&~z|0)==0)):0)){t=(c[r>>2]|0)+36|0;c[t>>2]=c[t>>2]|64}b[(c[r>>2]|0)+40>>1]=c[o>>2];b[(c[r>>2]|0)+24>>1]=c[o>>2];c[(c[r>>2]|0)+24+8>>2]=c[h>>2];f=39;g=c[r>>2]|0;t=24}while(0);if((t|0)==24)b[g+20>>1]=f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c[N>>2]|0;g=(c[G>>2]|0)+8|0;h=c[f+4>>2]|c[g+4>>2];i=A;c[i>>2]=c[f>>2]|c[g>>2];c[i+4>>2]=h;if((a[z>>0]|0)<0)a[z>>0]=IB(c[Q>>2]|0,c[(c[Q>>2]|0)+8>>2]|0,c[N>>2]|0,b[(c[Q>>2]|0)+40>>1]|0,c[L>>2]&65535,c[G>>2]|0,B)|0;else{g=(c[N>>2]|0)+8|0;h=c[g+4>>2]|0;i=B;c[i>>2]=c[g>>2];c[i+4>>2]=h}if((a[z>>0]|0)>=0?(a[z>>0]|0)<(c[n>>2]|0):0){if(!(b[(c[v>>2]|0)+(a[z>>0]<<1)>>1]|0)){i=JB(c[Q>>2]|0,b[K>>1]|0,c[n>>2]|0,a[z>>0]|0)|0;b[(c[v>>2]|0)+(a[z>>0]<<1)>>1]=i}b[x>>1]=HB(b[y>>1]|0,b[(c[v>>2]|0)+(a[z>>0]<<1)>>1]|0)|0}else b[x>>1]=b[y>>1]|0;c[k>>2]=0;c[u>>2]=c[t>>2];while(1){if((c[k>>2]|0)>=(c[q>>2]|0))break;h=c[u>>2]|0;i=A;if(((c[h>>2]|0)==(c[i>>2]|0)?(c[h+4>>2]|0)==(c[i+4>>2]|0):0)?((a[(c[u>>2]|0)+22>>0]^a[z>>0])&128|0)==0:0)break;c[k>>2]=(c[k>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+32}do if((c[k>>2]|0)<(c[q>>2]|0)){if((b[(c[u>>2]|0)+18>>1]|0)<(b[x>>1]|0))break a;if((b[(c[u>>2]|0)+18>>1]|0)!=(b[x>>1]|0))break;if((b[(c[u>>2]|0)+16>>1]|0)<=(b[w>>1]|0))break a}else{do if((c[q>>2]|0)>=(c[C>>2]|0)){if((b[x>>1]|0)>(b[o>>1]|0))break a;if((b[x>>1]|0)!=(b[o>>1]|0))break;if((b[y>>1]|0)>=(b[p>>1]|0))break a}while(0);if((c[q>>2]|0)<(c[C>>2]|0)){i=c[q>>2]|0;c[q>>2]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)|0){r=57;break}j=c[u>>2]|0;h=c[(c[C>>2]|0)+48>>2]|0;i=c[t>>2]|0;c[t>>2]=i+1;c[h+(i<<2)>>2]=j;i=p;h=D;j=c[h+4>>2]|c[i+4>>2];k=D;c[k>>2]=c[h>>2]|c[i>>2];c[k+4>>2]=j}}c[u>>2]=(c[u>>2]|0)+48}if((r|0)==57){W=c[X>>2]|0;W=c[W>>2]|0;X=c[T>>2]|0;ck(W,X);l=Y;return}o=c[t>>2]&65535;b[(c[C>>2]|0)+40>>1]=o;b[(c[C>>2]|0)+24>>1]=o;c[(c[C>>2]|0)+36>>2]=16961;o=(c[L>>2]|0)+56|0;p=D;q=c[o+4>>2]&(~c[p+4>>2]|-2147483648);r=E;c[r>>2]=c[o>>2]&~c[p>>2];c[r+4>>2]=q;if(63<(b[(c[x>>2]|0)+34>>1]|0))f=63;else f=b[(c[x>>2]|0)+34>>1]|0;c[A>>2]=f;c[y>>2]=0;while(1){if((c[y>>2]|0)>=(c[A>>2]|0))break;r=E;p=c[r>>2]|0;r=c[r+4>>2]|0;q=HR(1,0,c[y>>2]|0)|0;if((p&q|0)!=0|(r&z|0)!=0)c[t>>2]=(c[t>>2]|0)+1;c[y>>2]=(c[y>>2]|0)+1}if(0?1:(c[(c[L>>2]|0)+56+4>>2]&-2147483648|0)!=0)c[t>>2]=(c[t>>2]|0)+((b[(c[x>>2]|0)+34>>1]|0)-64+1);c[w>>2]=EB(c[c[X>>2]>>2]|0,(c[t>>2]|0)+1&65535,0,s)|0;if(!(c[w>>2]|0)){W=c[X>>2]|0;W=c[W>>2]|0;X=c[T>>2]|0;ck(W,X);l=Y;return}c[(c[C>>2]|0)+24+8>>2]=c[w>>2];c[c[w>>2]>>2]=31249;c[(c[w>>2]|0)+12>>2]=c[x>>2];c[S>>2]=0;s=D;c[s>>2]=0;c[s+4>>2]=0;c[u>>2]=c[(c[K>>2]|0)+20>>2];while(1){if((c[u>>2]|0)>>>0>=(c[v>>2]|0)>>>0)break;s=M;if(CB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else{if((c[A>>2]&1024|0)==0?(e[(c[z>>2]|0)+24>>1]|0|0)>0:0){f=1;break}f=((e[m>>1]|0)&3|0)!=0}while(0);c[y>>2]=f&1;jd(C,c[q>>2]|0,r,100,1e9);Gd(C,c[y>>2]|0?30958:30965);f=c[v>>2]|0;if(c[(c[v>>2]|0)+20>>2]|0){c[H>>2]=d[f+40>>0];Vi(C,30970,H)}else{c[I>>2]=c[f+8>>2];Vi(C,30983,I)}if(c[(c[v>>2]|0)+12>>2]|0){c[L>>2]=c[(c[v>>2]|0)+12>>2];Vi(C,30993,L)}do if(!(c[A>>2]&1280)){c[D>>2]=0;c[E>>2]=c[(c[z>>2]|0)+24+8>>2];if(((d[(c[(c[v>>2]|0)+16>>2]|0)+42>>0]|0)&32|0)!=0?(a[(c[E>>2]|0)+55>>0]&3|0)==2:0){if(c[y>>2]|0)c[D>>2]=31e3}else N=19;do if((N|0)==19){if(c[A>>2]&131072|0){c[D>>2]=31012;break}if(c[A>>2]&16384|0){c[D>>2]=31045;break}if(c[A>>2]&64|0){c[D>>2]=31070;break}else{c[D>>2]=31088;break}}while(0);if(c[D>>2]|0){zd(C,31097,7);N=c[D>>2]|0;c[M>>2]=c[c[E>>2]>>2];Vi(C,N,M);yB(C,c[z>>2]|0)}}else{if(c[A>>2]&256|0?c[A>>2]&15|0:0){do if(!(c[A>>2]&5|0)){if((c[A>>2]&48|0)==48){c[F>>2]=31107;break}if(c[A>>2]&32|0){c[F>>2]=31121;break}else{c[F>>2]=31123;break}}else c[F>>2]=31105;while(0);c[J>>2]=c[F>>2];Vi(C,31125,J);break}if(c[A>>2]&1024|0){N=c[(c[z>>2]|0)+24+8>>2]|0;c[K>>2]=c[(c[z>>2]|0)+24>>2];c[K+4>>2]=N;Vi(C,31163,K)}}while(0);c[B>>2]=ld(C)|0;c[u>>2]=_t(c[w>>2]|0,162,c[x>>2]|0,c[s>>2]|0,c[t>>2]|0,c[B>>2]|0,-1)|0;break}c[G>>2]=0;N=c[G>>2]|0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wa=hb+272|0;xa=hb+268|0;ya=hb+264|0;za=hb+260|0;Aa=hb+256|0;Ba=hb+252|0;Ca=hb+248|0;Da=hb+244|0;Ea=hb+240|0;I=hb+236|0;Fa=hb+232|0;Ga=hb+228|0;Ha=hb+224|0;Ia=hb+447|0;Ja=hb+446|0;J=hb+220|0;K=hb+445|0;L=hb+444|0;Ka=hb+216|0;La=hb+212|0;Ma=hb+208|0;O=hb+204|0;P=hb+200|0;Q=hb+196|0;R=hb+192|0;S=hb+188|0;T=hb+184|0;U=hb+180|0;V=hb+176|0;W=hb+172|0;X=hb+168|0;Y=hb+164|0;Z=hb+436|0;_=hb+160|0;$=hb+156|0;aa=hb+152|0;ba=hb+148|0;ca=hb+144|0;da=hb+140|0;ea=hb+136|0;fa=hb+132|0;ga=hb+128|0;ha=hb+124|0;ia=hb+120|0;ja=hb+116|0;ka=hb+112|0;la=hb+108|0;ma=hb+104|0;na=hb+100|0;oa=hb+96|0;pa=hb+92|0;M=hb+88|0;Ta=hb+84|0;Ua=hb+80|0;Va=hb+76|0;Wa=hb+72|0;Xa=hb+24|0;Ya=hb+16|0;c[eb>>2]=f;c[N>>2]=g;f=fb;c[f>>2]=h;c[f+4>>2]=i;c[Pa>>2]=0;c[k>>2]=0;c[ab>>2]=c[c[eb>>2]>>2];c[bb>>2]=c[(c[ab>>2]|0)+8>>2];c[_a>>2]=(c[eb>>2]|0)+80;c[Qa>>2]=c[c[ab>>2]>>2];c[Za>>2]=(c[eb>>2]|0)+752+((c[N>>2]|0)*80|0);c[sa>>2]=c[(c[Za>>2]|0)+64>>2];c[H>>2]=(c[(c[eb>>2]|0)+4>>2]|0)+8+((d[(c[Za>>2]|0)+44>>0]|0)*72|0);c[Sa>>2]=c[(c[H>>2]|0)+44>>2];h=fb;f=c[h>>2]|0;h=c[h+4>>2]|0;g=hB((c[eb>>2]|0)+488|0,c[Sa>>2]|0)|0;i=(c[Za>>2]|0)+72|0;c[i>>2]=f&~g;c[i+4>>2]=h&~z;i=(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+4|0;fb=c[fb>>2]|0;z=fb;l=hb;return gb|0}function hB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;h=l;l=l+32|0;g=h;d=h+16|0;e=h+12|0;f=h+8|0;c[d>>2]=a;c[e>>2]=b;c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[c[d>>2]>>2]|0)){a=6;break}b=c[f>>2]|0;if((c[(c[d>>2]|0)+4+(c[f>>2]<<2)>>2]|0)==(c[e>>2]|0)){a=4;break}c[f>>2]=b+1}if((a|0)==4){e=HR(1,0,b|0)|0;f=g;c[f>>2]=e;c[f+4>>2]=z;f=g;g=f;g=c[g>>2]|0;f=f+4|0;f=c[f>>2]|0;z=f;l=h;return g|0}else if((a|0)==6){f=g;c[f>>2]=0;c[f+4>>2]=0;f=g;g=f;g=c[g>>2]|0;f=f+4|0;f=c[f>>2]|0;z=f;l=h;return g|0}return 0}function iB(f,g,h,i,j,k){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;S=l;l=l+128|0;N=S+120|0;O=S+116|0;P=S+112|0;Q=S+108|0;z=S+104|0;A=S+100|0;m=S+96|0;B=S+92|0;C=S+88|0;D=S+84|0;E=S+80|0;F=S+76|0;G=S+72|0;H=S+68|0;I=S+64|0;s=S+60|0;J=S+56|0;t=S+52|0;n=S+48|0;u=S+44|0;v=S+40|0;w=S+36|0;x=S+32|0;o=S+28|0;p=S+24|0;q=S+20|0;y=S+16|0;r=S+12|0;K=S+8|0;L=S+4|0;M=S;c[O>>2]=f;c[P>>2]=g;c[Q>>2]=h;c[z>>2]=i;c[A>>2]=j;c[m>>2]=k;c[B>>2]=c[c[P>>2]>>2];c[C>>2]=c[(c[O>>2]|0)+8>>2];do if((d[c[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]|0}a[g+8>>0]=f;c[G>>2]=(c[G>>2]|0)+12}c[I>>2]=(c[I>>2]|0)+1}}else c[(c[Q>>2]|0)+56>>2]=0;while(0);Hd(c[c[O>>2]>>2]|0,c[J>>2]|0)}else R=3;while(0);if((R|0)==3)c[D>>2]=by(c[O>>2]|0,c[(c[B>>2]|0)+16>>2]|0,c[m>>2]|0)|0;kB(c[Q>>2]|0,c[P>>2]|0);c[N>>2]=c[D>>2];R=c[N>>2]|0;l=S;return R|0}function jB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;h=o+28|0;i=o+24|0;j=o+20|0;k=o+16|0;m=o+12|0;n=o+8|0;f=o+4|0;g=o;c[h>>2]=a;c[i>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(gy(c[i>>2]|0)|0)){ay(c[h>>2]|0,c[i>>2]|0,c[j>>2]|0);l=o;return}if(c[(c[i>>2]|0)+4>>2]&2048|0){c[m>>2]=c[(c[h>>2]|0)+8>>2];c[n>>2]=oy(c[h>>2]|0,c[i>>2]|0,0,0)|0;Xt(c[m>>2]|0,84,c[n>>2]|0,c[j>>2]|0,(c[k>>2]|0)-1|0)|0;l=o;return}c[g>>2]=c[(c[i>>2]|0)+20>>2];c[f>>2]=0;while(1){if((c[f>>2]|0)>=(c[k>>2]|0))break;ay(c[h>>2]|0,c[(c[(c[g>>2]|0)+4>>2]|0)+((c[f>>2]|0)*20|0)>>2]|0,(c[j>>2]|0)+(c[f>>2]|0)|0);c[f>>2]=(c[f>>2]|0)+1}l=o;return}function kB(f,g){f=f|0;g=g|0;var h=0,i=0,j=0,k=0;k=l;l=l+16|0;h=k+8|0;i=k+4|0;j=k;c[h>>2]=f;c[i>>2]=g;c[j>>2]=0;while(1){if(!(c[i>>2]|0)){f=14;break}if((e[(c[i>>2]|0)+10>>1]|0)&4|0){f=14;break}if(c[c[h>>2]>>2]|0?(c[(c[c[i>>2]>>2]|0)+4>>2]&1|0)==0:0){f=14;break}f=(c[h>>2]|0)+72|0;g=(c[i>>2]|0)+40|0;if(!((c[f>>2]&c[g>>2]|0)==0?(c[f+4>>2]&c[g+4>>2]|0)==0:0)){f=14;break}if(c[j>>2]|0?(e[(c[i>>2]|0)+10>>1]|0)&1024|0:0){f=512;g=c[i>>2]|0}else{f=4;g=c[i>>2]|0}g=g+10|0;b[g>>1]=e[g>>1]|0|f;if((c[(c[i>>2]|0)+16>>2]|0)<0){f=14;break}c[i>>2]=(c[(c[(c[i>>2]|0)+4>>2]|0)+20>>2]|0)+((c[(c[i>>2]|0)+16>>2]|0)*48|0);g=(c[i>>2]|0)+14|0;a[g>>0]=(a[g>>0]|0)+-1<<24>>24;if(d[(c[i>>2]|0)+14>>0]|0|0){f=14;break}c[j>>2]=(c[j>>2]|0)+1}if((f|0)==14){l=k;return}}function lB(d,f,g,h,i){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;A=l;l=l+80|0;w=A+60|0;x=A+56|0;y=A+52|0;C=A+48|0;z=A+44|0;m=A+66|0;j=A+64|0;n=A+40|0;B=A+36|0;o=A+32|0;p=A+28|0;q=A+24|0;r=A+20|0;s=A+16|0;t=A+12|0;k=A+8|0;u=A+4|0;v=A;c[w>>2]=d;c[x>>2]=f;c[y>>2]=g;c[C>>2]=h;c[z>>2]=i;c[n>>2]=c[(c[w>>2]|0)+8>>2];c[p>>2]=c[(c[x>>2]|0)+64>>2];b[m>>1]=b[(c[p>>2]|0)+24>>1]|0;b[j>>1]=b[(c[p>>2]|0)+42>>1]|0;c[B>>2]=c[(c[p>>2]|0)+24+8>>2];c[r>>2]=(c[(c[w>>2]|0)+44>>2]|0)+1;c[s>>2]=(e[(c[p>>2]|0)+24>>1]|0)+(c[C>>2]|0);i=(c[w>>2]|0)+44|0;c[i>>2]=(c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+32|0;g=m+16|0;h=m+12|0;i=m+8|0;j=m+4|0;k=m;c[g>>2]=b;c[h>>2]=d;c[i>>2]=e;c[j>>2]=f;c[k>>2]=c[(c[g>>2]|0)+8>>2];if(!(c[j>>2]|0)){l=m;return}while(1){if((c[i>>2]|0)<=0)break;if((a[c[j>>2]>>0]|0)!=65)break;c[i>>2]=(c[i>>2]|0)+-1;c[h>>2]=(c[h>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+1}while(1){if((c[i>>2]|0)>1)d=(a[(c[j>>2]|0)+((c[i>>2]|0)-1)>>0]|0)==65;else d=0;b=c[i>>2]|0;if(!d)break;c[i>>2]=b+-1}if((b|0)<=0){l=m;return}_t(c[k>>2]|0,98,c[h>>2]|0,c[i>>2]|0,0,c[j>>2]|0,c[i>>2]|0)|0;fy(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0);l=m;return}function pB(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;o=l;l=l+48|0;p=o+32|0;k=o+28|0;q=o+24|0;r=o+20|0;m=o+16|0;n=o+12|0;h=o+8|0;i=o+4|0;j=o;c[p>>2]=a;c[k>>2]=d;c[q>>2]=f;c[r>>2]=g;c[m>>2]=c[c[p>>2]>>2];c[n>>2]=c[(c[m>>2]|0)+8>>2];Xt(c[n>>2]|0,128,c[r>>2]|0,0,c[q>>2]|0)|0;if(!(e[(c[p>>2]|0)+40>>1]&32)){l=o;return}a=c[m>>2]|0;if(c[(c[m>>2]|0)+124>>2]|0)a=c[a+124>>2]|0;if(c[a+92>>2]|0){l=o;return}c[i>>2]=c[(c[k>>2]|0)+12>>2];c[j>>2]=jl(c[c[m>>2]>>2]|0,(b[(c[i>>2]|0)+34>>1]|0)+1<<2,0)|0;if(!(c[j>>2]|0)){l=o;return}c[c[j>>2]>>2]=b[(c[i>>2]|0)+34>>1];c[h>>2]=0;while(1){if((c[h>>2]|0)>=((e[(c[k>>2]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>>2]|0,c[k>>2]|0,c[r>>2]|0)|0;c[k>>2]=c[k>>2]&130;while(1){if(!(c[o>>2]|0)){a=10;break}t=(c[o>>2]|0)+32|0;u=j;if((c[t>>2]&c[u>>2]|0)==0?(c[t+4>>2]&c[u+4>>2]|0)==0:0){u=(c[o>>2]|0)+32|0;if((c[u>>2]|0)==0&(c[u+4>>2]|0)==0?(e[(c[o>>2]|0)+12>>1]|0)&c[k>>2]|0:0){a=6;break}if(!(c[n>>2]|0))c[n>>2]=c[o>>2]}c[o>>2]=uB(m)|0}if((a|0)==6){c[p>>2]=c[o>>2];u=c[p>>2]|0;l=q;return u|0}else if((a|0)==10){c[p>>2]=c[n>>2];u=c[p>>2]|0;l=q;return u|0}return 0}function tB(d,e,f,g,h,i){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;q=l;l=l+32|0;n=q+24|0;r=q+20|0;o=q+16|0;p=q+12|0;m=q+8|0;j=q+4|0;k=q;c[n>>2]=d;c[r>>2]=e;c[o>>2]=f;c[p>>2]=g;c[m>>2]=h;c[j>>2]=i;c[k>>2]=0;c[c[n>>2]>>2]=c[r>>2];c[(c[n>>2]|0)+4>>2]=c[r>>2];c[(c[n>>2]|0)+12>>2]=0;if(c[j>>2]|0){c[k>>2]=c[p>>2];c[p>>2]=b[(c[(c[j>>2]|0)+4>>2]|0)+(c[k>>2]<<1)>>1];if((c[p>>2]|0)==-2)c[(c[n>>2]|0)+12>>2]=c[(c[(c[(c[j>>2]|0)+40>>2]|0)+4>>2]|0)+((c[k>>2]|0)*20|0)>>2];if((c[p>>2]|0)==(b[(c[(c[j>>2]|0)+12>>2]|0)+32>>1]|0))c[p>>2]=-1}if((c[j>>2]|0)!=0&(c[p>>2]|0)>=0){a[(c[n>>2]|0)+16>>0]=a[(c[(c[(c[j>>2]|0)+12>>2]|0)+4>>2]|0)+(c[p>>2]<<4)+13>>0]|0;d=c[(c[(c[j>>2]|0)+32>>2]|0)+(c[k>>2]<<2)>>2]|0;e=c[n>>2]|0}else{a[(c[n>>2]|0)+16>>0]=0;d=0;e=c[n>>2]|0}c[e+8>>2]=d;c[(c[n>>2]|0)+20>>2]=c[m>>2];c[(c[n>>2]|0)+24>>2]=0;c[(c[n>>2]|0)+28>>2]=c[o>>2];b[(c[n>>2]|0)+72>>1]=c[p>>2];a[(c[n>>2]|0)+17>>0]=1;a[(c[n>>2]|0)+18>>0]=1;r=uB(c[n>>2]|0)|0;l=q;return r|0}function uB(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;o=s+36|0;p=s+32|0;i=s+28|0;j=s+40|0;k=s+24|0;m=s+20|0;q=s+16|0;r=s+12|0;n=s+8|0;g=s+4|0;h=s;c[p>>2]=f;c[r>>2]=c[(c[p>>2]|0)+24>>2];a:while(1){if((d[(c[p>>2]|0)+18>>0]|0)>(d[(c[p>>2]|0)+17>>0]|0)){f=40;break}c[i>>2]=c[(c[p>>2]|0)+28+((d[(c[p>>2]|0)+18>>0]|0)-1<<2)>>2];b[j>>1]=b[(c[p>>2]|0)+72+((d[(c[p>>2]|0)+18>>0]|0)-1<<1)>>1]|0;if((b[j>>1]|0)==-2?(c[(c[p>>2]|0)+12>>2]|0)==0:0){f=5;break}while(1){f=c[(c[p>>2]|0)+4>>2]|0;c[m>>2]=f;if(!f)break;c[q>>2]=(c[(c[m>>2]|0)+20>>2]|0)+((c[r>>2]|0)*48|0);while(1){if((c[r>>2]|0)>=(c[(c[m>>2]|0)+12>>2]|0))break;do if((c[(c[q>>2]|0)+20>>2]|0)==(c[i>>2]|0)?(c[(c[q>>2]|0)+28>>2]|0)==(b[j>>1]|0):0){if((b[j>>1]|0)==-2?cw(c[(c[c[q>>2]>>2]|0)+12>>2]|0,c[(c[p>>2]|0)+12>>2]|0,c[i>>2]|0)|0:0)break;if((d[(c[p>>2]|0)+18>>0]|0)>1?c[(c[c[q>>2]>>2]|0)+4>>2]&1|0:0)break;if((e[(c[q>>2]|0)+12>>1]&2048|0?(d[(c[p>>2]|0)+17>>0]|0)<11:0)?(f=Ev(c[(c[c[q>>2]>>2]|0)+16>>2]|0)|0,c[k>>2]=f,(d[f>>0]|0)==152):0){c[n>>2]=0;while(1){if((c[n>>2]|0)>=(d[(c[p>>2]|0)+17>>0]|0))break;if((c[(c[p>>2]|0)+28+(c[n>>2]<<2)>>2]|0)==(c[(c[k>>2]|0)+28>>2]|0)?(b[(c[p>>2]|0)+72+(c[n>>2]<<1)>>1]|0)==(b[(c[k>>2]|0)+32>>1]|0):0)break;c[n>>2]=(c[n>>2]|0)+1}if((c[n>>2]|0)==(d[(c[p>>2]|0)+17>>0]|0)){c[(c[p>>2]|0)+28+(c[n>>2]<<2)>>2]=c[(c[k>>2]|0)+28>>2];b[(c[p>>2]|0)+72+(c[n>>2]<<1)>>1]=b[(c[k>>2]|0)+32>>1]|0;f=(c[p>>2]|0)+17|0;a[f>>0]=(a[f>>0]|0)+1<<24>>24}}if(e[(c[q>>2]|0)+12>>1]&c[(c[p>>2]|0)+20>>2]|0){if(c[(c[p>>2]|0)+8>>2]|0?(e[(c[q>>2]|0)+12>>1]&256|0)==0:0){c[h>>2]=c[c[c[m>>2]>>2]>>2];c[k>>2]=c[c[q>>2]>>2];if(!(vB(c[k>>2]|0,a[(c[p>>2]|0)+16>>0]|0)|0))break;c[g>>2]=Dy(c[h>>2]|0,c[(c[k>>2]|0)+12>>2]|0,c[(c[k>>2]|0)+16>>2]|0)|0;if(!(c[g>>2]|0))c[g>>2]=c[(c[c[h>>2]>>2]|0)+8>>2];if(Ig(c[c[g>>2]>>2]|0,c[(c[p>>2]|0)+8>>2]|0)|0)break}if(!(e[(c[q>>2]|0)+12>>1]&130)){f=36;break a}f=c[(c[c[q>>2]>>2]|0)+16>>2]|0;c[k>>2]=f;if((d[f>>0]|0)!=152){f=36;break a}if((c[(c[k>>2]|0)+28>>2]|0)!=(c[(c[p>>2]|0)+28>>2]|0)){f=36;break a}if((b[(c[k>>2]|0)+32>>1]|0)!=(b[(c[p>>2]|0)+72>>1]|0)){f=36;break a}}}while(0);c[r>>2]=(c[r>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+48}c[(c[p>>2]|0)+4>>2]=c[(c[(c[p>>2]|0)+4>>2]|0)+4>>2];c[r>>2]=0}c[(c[p>>2]|0)+4>>2]=c[c[p>>2]>>2];c[r>>2]=0;f=(c[p>>2]|0)+18|0;a[f>>0]=(a[f>>0]|0)+1<<24>>24}if((f|0)==5){c[o>>2]=0;r=c[o>>2]|0;l=s;return r|0}else if((f|0)==36){c[(c[p>>2]|0)+24>>2]=(c[r>>2]|0)+1;c[o>>2]=c[q>>2];r=c[o>>2]|0;l=s;return r|0}else if((f|0)==40){c[o>>2]=0;r=c[o>>2]|0;l=s;return r|0}return 0}function vB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=l;l=l+16|0;e=g+4|0;i=g;f=g+9|0;h=g+8|0;c[i>>2]=b;a[f>>0]=d;a[h>>0]=wB(c[i>>2]|0)|0;switch(a[h>>0]|0){case 65:{c[e>>2]=1;break}case 66:{c[e>>2]=(a[f>>0]|0)==66&1;break}default:c[e>>2]=(a[f>>0]|0)>=67&1}l=g;return c[e>>2]|0}function wB(b){b=b|0;var d=0,e=0,f=0;f=l;l=l+16|0;d=f;e=f+4|0;c[d>>2]=b;a[e>>0]=wv(c[(c[d>>2]|0)+12>>2]|0)|0;b=c[d>>2]|0;if(c[(c[d>>2]|0)+16>>2]|0){a[e>>0]=Cy(c[b+16>>2]|0,a[e>>0]|0)|0;e=a[e>>0]|0;l=f;return e|0}if(c[b+4>>2]&2048|0){a[e>>0]=Cy(c[c[(c[c[(c[d>>2]|0)+20>>2]>>2]|0)+4>>2]>>2]|0,a[e>>0]|0)|0;e=a[e>>0]|0;l=f;return e|0}if(a[e>>0]|0){e=a[e>>0]|0;l=f;return e|0}a[e>>0]=65;e=a[e>>0]|0;l=f;return e|0}function xB(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=l;l=l+16|0;j=k+4|0;g=k;h=k+9|0;i=k+8|0;c[g>>2]=e;a[h>>0]=f;a:do if((a[h>>0]|0)==65)c[j>>2]=1;else{while(1){if((d[c[g>>2]>>0]|0)==156)f=1;else f=(d[c[g>>2]>>0]|0)==155;e=c[g>>2]|0;if(!f)break;c[g>>2]=c[e+12>>2]}a[i>>0]=a[e>>0]|0;if((d[i>>0]|0)==157)a[i>>0]=a[(c[g>>2]|0)+38>>0]|0;switch(d[i>>0]|0){case 134:{if((a[h>>0]|0)==68)e=1;else e=(a[h>>0]|0)==67;c[j>>2]=e&1;break a}case 132:{if((a[h>>0]|0)==69)e=1;else e=(a[h>>0]|0)==67;c[j>>2]=e&1;break a}case 97:{c[j>>2]=(a[h>>0]|0)==66&1;break a}case 133:{c[j>>2]=1;break a}case 152:{if((b[(c[g>>2]|0)+32>>1]|0)<0)if((a[h>>0]|0)==68)e=1;else e=(a[h>>0]|0)==67;else e=0;c[j>>2]=e&1;break a}default:{c[j>>2]=0;break a}}}while(0);l=k;return c[j>>2]|0}function yB(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;o=p;f=p+24|0;g=p+20|0;h=p+16|0;i=p+30|0;j=p+28|0;k=p+12|0;m=p+8|0;n=p+4|0;c[f>>2]=a;c[g>>2]=d;c[h>>2]=c[(c[g>>2]|0)+24+8>>2];b[i>>1]=b[(c[g>>2]|0)+24>>1]|0;b[j>>1]=b[(c[g>>2]|0)+42>>1]|0;if((e[i>>1]|0|0)==0?(c[(c[g>>2]|0)+36>>2]&48|0)==0:0){l=p;return}zd(c[f>>2]|0,31190,2);c[k>>2]=0;while(1){if((c[k>>2]|0)>=(e[i>>1]|0|0))break;c[n>>2]=zB(c[h>>2]|0,c[k>>2]|0)|0;if(c[k>>2]|0)zd(c[f>>2]|0,31193,5);a=c[f>>2]|0;d=(c[k>>2]|0)>=(e[j>>1]|0|0)?31199:31204;c[o>>2]=c[n>>2];Vi(a,d,o);c[k>>2]=(c[k>>2]|0)+1}c[m>>2]=c[k>>2];if(c[(c[g>>2]|0)+36>>2]&32|0){AB(c[f>>2]|0,c[h>>2]|0,e[(c[g>>2]|0)+24+2>>1]|0,c[m>>2]|0,c[k>>2]|0,31121);c[k>>2]=1}if(c[(c[g>>2]|0)+36>>2]&16|0)AB(c[f>>2]|0,c[h>>2]|0,e[(c[g>>2]|0)+24+4>>1]|0,c[m>>2]|0,c[k>>2]|0,31123);zd(c[f>>2]|0,31212,1);l=p;return}function zB(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+8|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=d;c[g>>2]=b[(c[(c[f>>2]|0)+4>>2]|0)+(c[g>>2]<<1)>>1];if((c[g>>2]|0)==-2){c[e>>2]=31216;g=c[e>>2]|0;l=h;return g|0}if((c[g>>2]|0)==-1){c[e>>2]=22891;g=c[e>>2]|0;l=h;return g|0}else{c[e>>2]=c[(c[(c[(c[f>>2]|0)+12>>2]|0)+4>>2]|0)+(c[g>>2]<<4)>>2];g=c[e>>2]|0;l=h;return g|0}return 0}function AB(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;o=l;l=l+32|0;j=o+24|0;k=o+20|0;m=o+16|0;n=o+12|0;p=o+8|0;h=o+4|0;i=o;c[j>>2]=a;c[k>>2]=b;c[m>>2]=d;c[n>>2]=e;c[p>>2]=f;c[h>>2]=g;if(c[p>>2]|0)zd(c[j>>2]|0,31193,5);if((c[m>>2]|0)>1)zd(c[j>>2]|0,31214,1);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[m>>2]|0))break;if(c[i>>2]|0)zd(c[j>>2]|0,19116,1);p=c[j>>2]|0;Gd(p,zB(c[k>>2]|0,(c[n>>2]|0)+(c[i>>2]|0)|0)|0);c[i>>2]=(c[i>>2]|0)+1}if((c[m>>2]|0)>1)zd(c[j>>2]|0,31212,1);zd(c[j>>2]|0,c[h>>2]|0,1);if((c[m>>2]|0)>1)zd(c[j>>2]|0,31214,1);c[i>>2]=0;while(1){if((c[i>>2]|0)>=(c[m>>2]|0))break;if(c[i>>2]|0)zd(c[j>>2]|0,19116,1);zd(c[j>>2]|0,24149,1);c[i>>2]=(c[i>>2]|0)+1}if((c[m>>2]|0)<=1){l=o;return}zd(c[j>>2]|0,31212,1);l=o;return}function BB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=l;l=l+16|0;f=d+4|0;e=d;c[f>>2]=a;c[e>>2]=b;b=Iy(c[f>>2]|0,3,c[e>>2]|0)|0;l=d;return b|0}function CB(b,d,f,g){b=b|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0;n=l;l=l+32|0;h=n+16|0;i=n+12|0;j=n+8|0;k=n;m=n+20|0;c[i>>2]=b;c[j>>2]=d;d=k;c[d>>2]=f;c[d+4>>2]=g;if((c[(c[i>>2]|0)+20>>2]|0)!=(c[(c[j>>2]|0)+44>>2]|0)){c[h>>2]=0;m=c[h>>2]|0;l=n;return m|0}if(!((e[(c[i>>2]|0)+12>>1]|0)&130)){c[h>>2]=0;m=c[h>>2]|0;l=n;return m|0}g=(c[i>>2]|0)+32|0;if(c[g>>2]&c[k>>2]|0?1:(c[g+4>>2]&c[k+4>>2]|0)!=0){c[h>>2]=0;m=c[h>>2]|0;l=n;return m|0}if((c[(c[i>>2]|0)+28>>2]|0)<0){c[h>>2]=0;m=c[h>>2]|0;l=n;return m|0}a[m>>0]=a[(c[(c[(c[j>>2]|0)+16>>2]|0)+4>>2]|0)+(c[(c[i>>2]|0)+28>>2]<<4)+13>>0]|0;if(vB(c[c[i>>2]>>2]|0,a[m>>0]|0)|0){c[h>>2]=1;m=c[h>>2]|0;l=n;return m|0}else{c[h>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|0,c[(c[g>>2]|0)+8+((c[h>>2]|0)*72|0)+48>>2]|0)|0;a=f;j=c[a+4>>2]|z;k=f;c[k>>2]=c[a>>2]|b;c[k+4>>2]=j;c[h>>2]=(c[h>>2]|0)+1}}while(0);c[e>>2]=c[(c[e>>2]|0)+48>>2]}k=f;z=c[k+4>>2]|0;l=i;return c[k>>2]|0}function HB(a,c){a=a|0;c=c|0;var e=0,f=0,g=0,h=0;h=l;l=l+16|0;e=h+4|0;f=h+2|0;g=h;b[f>>1]=a;b[g>>1]=c;if((b[f>>1]|0)>=(b[g>>1]|0)){a=b[f>>1]|0;if((b[f>>1]|0)>((b[g>>1]|0)+49|0)){b[e>>1]=a;g=b[e>>1]|0;l=h;return g|0}c=b[f>>1]|0;if((a<<16>>16|0)>((b[g>>1]|0)+31|0)){b[e>>1]=c+1;g=b[e>>1]|0;l=h;return g|0}else{b[e>>1]=c+(d[31278+((b[f>>1]|0)-(b[g>>1]|0))>>0]|0);g=b[e>>1]|0;l=h;return g|0}}else{a=b[g>>1]|0;if((b[g>>1]|0)>((b[f>>1]|0)+49|0)){b[e>>1]=a;g=b[e>>1]|0;l=h;return g|0}c=b[g>>1]|0;if((a<<16>>16|0)>((b[f>>1]|0)+31|0)){b[e>>1]=c+1;g=b[e>>1]|0;l=h;return g|0}else{b[e>>1]=c+(d[31278+((b[g>>1]|0)-(b[f>>1]|0))>>0]|0);g=b[e>>1]|0;l=h;return g|0}}return 0}function IB(f,g,h,i,j,k,m){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;ca=l;l=l+160|0;aa=ca+149|0;X=ca+124|0;Y=ca+120|0;n=ca+116|0;o=ca+140|0;p=ca+138|0;q=ca+112|0;r=ca+108|0;s=ca+148|0;t=ca+147|0;u=ca+146|0;v=ca+145|0;w=ca+144|0;x=ca+143|0;y=ca+136|0;A=ca+134|0;B=ca+132|0;C=ca+130|0;D=ca+104|0;Z=ca+100|0;E=ca+96|0;F=ca+92|0;G=ca+88|0;H=ca+84|0;I=ca+80|0;J=ca+76|0;K=ca+72|0;L=ca+68|0;M=ca+64|0;_=ca+40|0;N=ca+32|0;O=ca+24|0;P=ca+16|0;Q=ca+60|0;R=ca+56|0;S=ca+142|0;T=ca+128|0;U=ca+52|0;V=ca+48|0;W=ca+8|0;$=ca;c[X>>2]=f;c[Y>>2]=g;c[n>>2]=h;b[o>>1]=i;b[p>>1]=j;c[q>>2]=k;c[r>>2]=m;c[H>>2]=0;c[M>>2]=c[c[c[X>>2]>>2]>>2];m=_;c[m>>2]=0;c[m+4>>2]=0;if(e[p>>1]|0?e[(c[M>>2]|0)+64>>1]&128|0:0){a[aa>>0]=0;ba=a[aa>>0]|0;l=ca;return ba|0}b[C>>1]=c[c[Y>>2]>>2];if((e[C>>1]|0)>63){a[aa>>0]=0;ba=a[aa>>0]|0;l=ca;return ba|0}a[v>>0]=1;k=HR(1,0,e[C>>1]|0)|0;k=FR(k|0,z|0,1,0)|0;m=N;c[m>>2]=k;c[m+4>>2]=z;m=O;c[m>>2]=0;c[m+4>>2]=0;m=P;c[m>>2]=0;c[m+4>>2]=0;b[y>>1]=386;if(e[o>>1]&2048|0)b[y>>1]=e[y>>1]|1;c[D>>2]=0;a:while(1){if(!(d[v>>0]|0))break;k=_;i=c[k+4>>2]|0;m=N;j=c[m+4>>2]|0;if(!(i>>>0>>0|((i|0)==(j|0)?(c[k>>2]|0)>>>0<(c[m>>2]|0)>>>0:0)))break;if((c[D>>2]|0)>(e[p>>1]|0))break;if((c[D>>2]|0)>0){j=(c[H>>2]|0)+8|0;i=P;k=c[i+4>>2]|c[j+4>>2];m=P;c[m>>2]=c[i>>2]|c[j>>2];c[m+4>>2]=k}if((c[D>>2]|0)<(e[p>>1]|0)){c[H>>2]=c[(c[(c[n>>2]|0)+24>>2]|0)+(c[D>>2]<<2)>>2];if(!(e[o>>1]&2048))ba=17}else{c[H>>2]=c[q>>2];ba=17}b:do if((ba|0)==17){ba=0;if(c[(c[H>>2]|0)+36>>2]&1024|0){ba=18;break a}c[F>>2]=c[(c[(c[X>>2]|0)+4>>2]|0)+8+((d[(c[H>>2]|0)+16>>0]|0)*72|0)+44>>2];c[Z>>2]=0;while(1){if((c[Z>>2]|0)>=(e[C>>1]|0))break;k=HR(1,0,c[Z>>2]|0)|0;m=_;c:do if(((!(k&c[m>>2]|0?1:(z&c[m+4>>2]|0)!=0)?(c[J>>2]=Ev(c[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)>>2]|0)|0,(d[c[J>>2]>>0]|0)==152):0)?(c[(c[J>>2]|0)+28>>2]|0)==(c[F>>2]|0):0)?(m=P,c[I>>2]=sB((c[X>>2]|0)+80|0,c[F>>2]|0,b[(c[J>>2]|0)+32>>1]|0,~c[m>>2],~c[m+4>>2],e[y>>1]|0,0)|0,c[I>>2]|0):0){if((e[(c[I>>2]|0)+12>>1]|0)==1){c[E>>2]=0;while(1){if((c[E>>2]|0)>=(e[(c[H>>2]|0)+40>>1]|0))break;if((c[I>>2]|0)==(c[(c[(c[H>>2]|0)+48>>2]|0)+(c[E>>2]<<2)>>2]|0))break;c[E>>2]=(c[E>>2]|0)+1}if((c[E>>2]|0)>=(e[(c[H>>2]|0)+40>>1]|0))break}do if(e[(c[I>>2]|0)+12>>1]&130|0){if((b[(c[J>>2]|0)+32>>1]|0)<0)break;c[K>>2]=xv(c[c[X>>2]>>2]|0,c[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)>>2]|0)|0;if(!(c[K>>2]|0))c[K>>2]=c[(c[M>>2]|0)+8>>2];c[Q>>2]=c[c[K>>2]>>2];c[K>>2]=xv(c[c[X>>2]>>2]|0,c[c[I>>2]>>2]|0)|0;if(!(c[K>>2]|0))c[K>>2]=c[(c[M>>2]|0)+8>>2];c[R>>2]=c[c[K>>2]>>2];if(Ig(c[Q>>2]|0,c[R>>2]|0)|0)break c}while(0);j=HR(1,0,c[Z>>2]|0)|0;i=_;k=c[i+4>>2]|z;m=_;c[m>>2]=c[i>>2]|j;c[m+4>>2]=k}while(0);c[Z>>2]=(c[Z>>2]|0)+1}if(!(c[(c[H>>2]|0)+36>>2]&4096)){if(c[(c[H>>2]|0)+36>>2]&256|0){c[L>>2]=0;b[A>>1]=0;b[B>>1]=1}else{m=c[(c[H>>2]|0)+24+8>>2]|0;c[L>>2]=m;if(!m){ba=46;break a}if((d[(c[L>>2]|0)+55>>0]|0)>>>2&1|0){ba=46;break a}b[A>>1]=b[(c[L>>2]|0)+50>>1]|0;b[B>>1]=b[(c[L>>2]|0)+52>>1]|0;a[v>>0]=(d[(c[L>>2]|0)+54>>0]|0)!=0}a[s>>0]=0;a[t>>0]=0;a[w>>0]=0;c[E>>2]=0;while(1){if((c[E>>2]|0)>=(e[B>>1]|0))break;a[S>>0]=1;d:do if((c[E>>2]|0)<(e[(c[H>>2]|0)+24>>1]|0)?(c[E>>2]|0)>=(e[(c[H>>2]|0)+42>>1]|0):0){b[T>>1]=b[(c[(c[(c[H>>2]|0)+48>>2]|0)+(c[E>>2]<<2)>>2]|0)+12>>1]|0;f=e[T>>1]|0;if(e[T>>1]&e[y>>1]|0){if(!(f&256))break;a[v>>0]=0;break}if(!(f&1)){ba=61;break}c[U>>2]=c[c[(c[(c[H>>2]|0)+48>>2]|0)+(c[E>>2]<<2)>>2]>>2];c[Z>>2]=(c[E>>2]|0)+1;while(1){if((c[Z>>2]|0)>=(e[(c[H>>2]|0)+24>>1]|0)){ba=61;break d}if((c[c[(c[(c[H>>2]|0)+48>>2]|0)+(c[Z>>2]<<2)>>2]>>2]|0)==(c[U>>2]|0))break;c[Z>>2]=(c[Z>>2]|0)+1}a[S>>0]=0;ba=61}else ba=61;while(0);if((ba|0)==61){ba=0;do if(c[L>>2]|0){c[G>>2]=b[(c[(c[L>>2]|0)+4>>2]|0)+(c[E>>2]<<1)>>1];a[u>>0]=a[(c[(c[L>>2]|0)+28>>2]|0)+(c[E>>2]|0)>>0]|0;if((c[G>>2]|0)!=(b[(c[(c[L>>2]|0)+12>>2]|0)+32>>1]|0))break;c[G>>2]=-1}else{c[G>>2]=-1;a[u>>0]=0}while(0);do if((d[v>>0]|0)!=0&(c[G>>2]|0)>=0){if((c[E>>2]|0)<(e[(c[H>>2]|0)+24>>1]|0))break;if(d[(c[(c[(c[L>>2]|0)+12>>2]|0)+4>>2]|0)+(c[G>>2]<<4)+12>>0]|0)break;a[v>>0]=0}while(0);a[x>>0]=0;c[Z>>2]=0;e:while(1){if(!(d[S>>0]|0))break;if((c[Z>>2]|0)>=(e[C>>1]|0))break;k=HR(1,0,c[Z>>2]|0)|0;m=_;do if(!(k&c[m>>2]|0?1:(z&c[m+4>>2]|0)!=0)){c[J>>2]=Ev(c[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)>>2]|0)|0;if(!(e[o>>1]&192))a[S>>0]=0;f=c[J>>2]|0;if((c[G>>2]|0)>=-1){if((d[f>>0]|0)!=152)break;if((c[(c[J>>2]|0)+28>>2]|0)!=(c[F>>2]|0))break;if((b[(c[J>>2]|0)+32>>1]|0)!=(c[G>>2]|0))break}else if(cw(f,c[(c[(c[(c[L>>2]|0)+40>>2]|0)+4>>2]|0)+((c[E>>2]|0)*20|0)>>2]|0,c[F>>2]|0)|0)break;if((c[G>>2]|0)<0){ba=84;break e}c[K>>2]=xv(c[c[X>>2]>>2]|0,c[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)>>2]|0)|0;if(!(c[K>>2]|0))c[K>>2]=c[(c[M>>2]|0)+8>>2];if(!(Ig(c[c[K>>2]>>2]|0,c[(c[(c[L>>2]|0)+32>>2]|0)+(c[E>>2]<<2)>>2]|0)|0)){ba=84;break e}}while(0);c[Z>>2]=(c[Z>>2]|0)+1}if((ba|0)==84){ba=0;a[x>>0]=1}do if(d[x>>0]|0){if(e[o>>1]&64|0)break;if(a[s>>0]|0){if((d[t>>0]^d[u>>0]|0)==(d[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)+12>>0]|0))break;a[x>>0]=0;break}a[t>>0]=d[u>>0]^d[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)+12>>0];if(a[t>>0]|0){j=HR(1,0,c[D>>2]|0)|0;m=c[r>>2]|0;i=m;k=c[i+4>>2]|z;c[m>>2]=c[i>>2]|j;c[m+4>>2]=k}a[s>>0]=1}while(0);if(!(a[x>>0]|0)){ba=98;break}if((c[G>>2]|0)==-1)a[w>>0]=1;j=HR(1,0,c[Z>>2]|0)|0;i=_;k=c[i+4>>2]|z;m=_;c[m>>2]=c[i>>2]|j;c[m+4>>2]=k}c[E>>2]=(c[E>>2]|0)+1}do if((ba|0)==98){ba=0;if(c[E>>2]|0?(c[E>>2]|0)>=(e[A>>1]|0):0)break;a[v>>0]=0}while(0);if(a[w>>0]|0)a[v>>0]=1}if(a[v>>0]|0){j=(c[H>>2]|0)+8|0;i=O;k=c[i+4>>2]|c[j+4>>2];m=O;c[m>>2]=c[i>>2]|c[j>>2];c[m+4>>2]=k;c[Z>>2]=0;while(1){if((c[Z>>2]|0)>=(e[C>>1]|0))break b;k=HR(1,0,c[Z>>2]|0)|0;m=_;do if(!(k&c[m>>2]|0?1:(z&c[m+4>>2]|0)!=0)){c[V>>2]=c[(c[(c[Y>>2]|0)+4>>2]|0)+((c[Z>>2]|0)*20|0)>>2];k=FB((c[X>>2]|0)+488|0,c[V>>2]|0)|0;m=W;c[m>>2]=k;c[m+4>>2]=z;m=W;if((c[m>>2]|0)==0&(c[m+4>>2]|0)==0?(ky(c[V>>2]|0)|0)==0:0)break;k=W;m=O;if((c[k>>2]&~c[m>>2]|0)==0?(c[k+4>>2]&~c[m+4>>2]|0)==0:0){j=HR(1,0,c[Z>>2]|0)|0;i=_;k=c[i+4>>2]|z;m=_;c[m>>2]=c[i>>2]|j;c[m+4>>2]=k}}while(0);c[Z>>2]=(c[Z>>2]|0)+1}}}while(0);c[D>>2]=(c[D>>2]|0)+1}if((ba|0)==18){if(a[(c[H>>2]|0)+24+5>>0]|0){X=N;Y=c[X+4>>2]|0;ba=_;c[ba>>2]=c[X>>2];c[ba+4>>2]=Y}}else if((ba|0)==46){a[aa>>0]=0;ba=a[aa>>0]|0;l=ca;return ba|0}Y=_;ba=N;if((c[Y>>2]|0)==(c[ba>>2]|0)?(c[Y+4>>2]|0)==(c[ba+4>>2]|0):0){a[aa>>0]=b[C>>1];ba=a[aa>>0]|0;l=ca;return ba|0}if(a[v>>0]|0){a[aa>>0]=-1;ba=a[aa>>0]|0;l=ca;return ba|0}c[Z>>2]=(e[C>>1]|0)-1;while(1){if((c[Z>>2]|0)<=0){ba=122;break}Y=HR(1,0,c[Z>>2]|0)|0;Y=FR(Y|0,z|0,1,0)|0;X=$;c[X>>2]=Y;c[X+4>>2]=z;X=_;Y=$;ba=$;f=c[Z>>2]|0;if((c[X>>2]&c[Y>>2]|0)==(c[ba>>2]|0)?(c[X+4>>2]&c[Y+4>>2]|0)==(c[ba+4>>2]|0):0){ba=120;break}c[Z>>2]=f+-1}if((ba|0)==120){a[aa>>0]=f;ba=a[aa>>0]|0;l=ca;return ba|0}else if((ba|0)==122){a[aa>>0]=0;ba=a[aa>>0]|0;l=ca;return ba|0}return 0}function JB(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;k=l;l=l+32|0;h=k+8|0;i=k+16|0;n=k+4|0;o=k;m=k+14|0;j=k+12|0;c[h>>2]=a;b[i>>1]=d;c[n>>2]=f;c[o>>2]=g;g=(((c[n>>2]|0)-(c[o>>2]|0)|0)*100|0)/(c[n>>2]|0)|0;b[m>>1]=((Du(g,((g|0)<0)<<31>>31)|0)<<16>>16)-66;b[j>>1]=(b[i>>1]|0)+(b[m>>1]|0)+16;if(e[(c[h>>2]|0)+40>>1]&16384|0?(b[(c[h>>2]|0)+16>>1]|0)<(b[i>>1]|0):0)b[i>>1]=b[(c[h>>2]|0)+16>>1]|0;o=(KB(b[i>>1]|0)|0)<<16>>16;b[j>>1]=(b[j>>1]|0)+o;l=k;return b[j>>1]|0}function KB(a){a=a|0;var c=0,d=0;d=l;l=l+16|0;c=d;b[c>>1]=a;if((b[c>>1]|0)<=10){c=0;c=c&65535;l=d;return c|0}c=b[c>>1]|0;c=((Du(c,((c|0)<0)<<31>>31)|0)<<16>>16)-33|0;c=c&65535;l=d;return c|0}function LB(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;D=l;l=l+128|0;z=D+108|0;A=D+104|0;B=D+48|0;F=D+40|0;C=D+100|0;G=D+96|0;j=D+92|0;k=D+88|0;E=D+84|0;m=D+80|0;n=D+76|0;o=D+72|0;p=D+68|0;q=D+32|0;r=D+112|0;s=D+64|0;t=D+60|0;u=D+24|0;v=D+16|0;w=D+56|0;x=D+8|0;y=D;c[A>>2]=e;e=B;c[e>>2]=f;c[e+4>>2]=g;g=F;c[g>>2]=h;c[g+4>>2]=i;c[C>>2]=0;c[G>>2]=c[c[A>>2]>>2];c[j>>2]=c[c[G>>2]>>2];c[k>>2]=c[(c[A>>2]|0)+4>>2];c[p>>2]=c[(c[A>>2]|0)+12>>2];c[E>>2]=(c[(c[G>>2]|0)+4>>2]|0)+8+((d[(c[p>>2]|0)+16>>0]|0)*72|0);i=F;c[m>>2]=fC(c[j>>2]|0,c[k>>2]|0,c[i>>2]|0,c[i+4>>2]|0,c[E>>2]|0,c[(c[A>>2]|0)+8>>2]|0,r)|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i>>2]|0)+56|0;F=c[H>>2]|0;H=c[H+4>>2]|0;G=YB(c[E>>2]|0)|0;K=u;c[K>>2]=F&~G;c[K+4>>2]=H&~z;K=u;c[(c[j>>2]|0)+36>>2]=(c[K>>2]|0)==0&(c[K+4>>2]|0)==0?576:512}if(((c[m>>2]|0)==0?(d[(c[q>>2]|0)+42>>0]&32|0)==0:0)?(c[(c[E>>2]|0)+36>>2]|0)==0:0){K=u;if(!((c[K>>2]|0)==0&(c[K+4>>2]|0)==0))break;if((d[(c[E>>2]|0)+55>>0]|0)>>>2&1|0)break;if((b[(c[E>>2]|0)+48>>1]|0)>=(b[(c[q>>2]|0)+40>>1]|0))break;if(!(c[6]|0?(e[(c[D>>2]|0)+40>>1]&4|0)==0:0))break;if(e[(c[c[c[D>>2]>>2]>>2]|0)+64>>1]&64|0)break}a[(c[j>>2]|0)+17>>0]=c[m>>2]|0?c[k>>2]|0:0;b[(c[j>>2]|0)+20>>1]=(b[n>>1]|0)+1+(((b[(c[E>>2]|0)+48>>1]|0)*15|0)/(b[(c[q>>2]|0)+40>>1]|0)|0);K=u;if((c[K>>2]|0)!=0|(c[K+4>>2]|0)!=0){b[v>>1]=(b[n>>1]|0)+16;c[x>>2]=c[(c[i>>2]|0)+44>>2];c[y>>2]=(c[D>>2]|0)+80;c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[(c[y>>2]|0)+12>>2]|0))break;c[A>>2]=(c[(c[y>>2]|0)+20>>2]|0)+((c[w>>2]|0)*48|0);if(!(ZB(c[c[A>>2]>>2]|0,c[x>>2]|0,c[E>>2]|0)|0))break;if((b[(c[A>>2]|0)+8>>1]|0)>0){b[v>>1]=(b[v>>1]|0)+-1<<16>>16;if(e[(c[A>>2]|0)+12>>1]&130|0)b[v>>1]=(b[v>>1]|0)-19}else b[v>>1]=(b[v>>1]|0)+(b[(c[A>>2]|0)+8>>1]|0);c[w>>2]=(c[w>>2]|0)+1}K=HB(b[(c[j>>2]|0)+20>>1]|0,b[v>>1]|0)|0;b[(c[j>>2]|0)+20>>1]=K}XB(c[p>>2]|0,c[j>>2]|0,b[n>>1]|0);c[I>>2]=QB(c[B>>2]|0,c[j>>2]|0)|0;b[(c[j>>2]|0)+22>>1]=b[n>>1]|0;if(c[I>>2]|0){f=57;break b}}while(0);c[I>>2]=_B(c[B>>2]|0,c[i>>2]|0,c[E>>2]|0,0)|0;if(c[(c[i>>2]|0)+68>>2]|0){f=57;break}}c[E>>2]=c[(c[E>>2]|0)+20>>2];c[k>>2]=(c[k>>2]|0)+1}if((f|0)==57){l=J;return c[I>>2]|0}return 0}function NB(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;I=l;l=l+672|0;D=I+668|0;E=I+584|0;F=I+576|0;k=I+664|0;G=I+660|0;m=I+656|0;n=I+652|0;o=I+648|0;p=I+644|0;q=I+640|0;r=I+168|0;s=I+620|0;t=I+112|0;u=I+56|0;v=I+616|0;w=I+612|0;x=I+608|0;y=I+604|0;z=I+600|0;A=I+596|0;B=I+592|0;C=I;c[D>>2]=f;f=E;c[f>>2]=g;c[f+4>>2]=h;f=F;c[f>>2]=i;c[f+4>>2]=j;c[k>>2]=c[c[D>>2]>>2];c[p>>2]=0;c[G>>2]=c[(c[D>>2]|0)+4>>2];c[o>>2]=(c[(c[G>>2]|0)+20>>2]|0)+((c[(c[G>>2]|0)+12>>2]|0)*48|0);c[m>>2]=c[(c[D>>2]|0)+12>>2];f=t;g=f+56|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[v>>2]=(c[(c[k>>2]|0)+4>>2]|0)+8+((d[(c[m>>2]|0)+16>>0]|0)*72|0);c[q>>2]=c[(c[v>>2]|0)+44>>2];c[n>>2]=c[(c[G>>2]|0)+20>>2];while(1){if(!((c[n>>2]|0)>>>0<(c[o>>2]|0)>>>0?(c[p>>2]|0)==0:0))break;a:do if(e[(c[n>>2]|0)+12>>1]&512|0?(j=(c[(c[n>>2]|0)+28>>2]|0)+408|0,k=(c[m>>2]|0)+8|0,c[j>>2]&c[k>>2]|0?1:(c[j+4>>2]&c[k+4>>2]|0)!=0):0){c[w>>2]=c[(c[n>>2]|0)+28>>2];c[x>>2]=(c[(c[w>>2]|0)+20>>2]|0)+((c[(c[w>>2]|0)+12>>2]|0)*48|0);c[z>>2]=1;k=c[D>>2]|0;c[s>>2]=c[k>>2];c[s+4>>2]=c[k+4>>2];c[s+8>>2]=c[k+8>>2];c[s+12>>2]=c[k+12>>2];c[s+16>>2]=c[k+16>>2];c[s+8>>2]=0;c[s+16>>2]=u;c[y>>2]=c[(c[w>>2]|0)+20>>2];b:while(1){if((c[y>>2]|0)>>>0>=(c[x>>2]|0)>>>0)break;f=c[y>>2]|0;if(!(e[(c[y>>2]|0)+12>>1]&1024|0)){if((c[f+20>>2]|0)==(c[q>>2]|0)){c[r>>2]=c[c[G>>2]>>2];c[r+4>>2]=c[G>>2];a[r+8>>0]=28;c[r+12>>2]=1;c[r+20>>2]=c[y>>2];f=r;H=11}}else{f=c[f+28>>2]|0;H=11}c:do if((H|0)==11){H=0;c[s+4>>2]=f;b[u>>1]=0;g=E;f=c[g>>2]|0;g=c[g+4>>2]|0;if(d[(c[(c[v>>2]|0)+16>>2]|0)+42>>0]&16|0){k=F;c[p>>2]=LB(s,f,g,c[k>>2]|0,c[k+4>>2]|0)|0}else c[p>>2]=MB(s,f,g)|0;if(!(c[p>>2]|0)){j=E;k=F;c[p>>2]=NB(s,c[j>>2]|0,c[j+4>>2]|0,c[k>>2]|0,c[k+4>>2]|0)|0}if(!(e[u>>1]|0)){H=17;break b}if(c[z>>2]|0){OB(t,u);c[z>>2]=0;break}OB(C,t);b[t>>1]=0;c[A>>2]=0;while(1){if((c[A>>2]|0)>=(e[C>>1]|0))break c;c[B>>2]=0;while(1){if((c[B>>2]|0)>=(e[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0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0;r=l;l=l+32|0;m=r+16|0;n=r+12|0;o=r;p=r+24|0;q=r+22|0;j=r+20|0;k=r+8|0;c[n>>2]=a;a=o;c[a>>2]=d;c[a+4>>2]=f;b[p>>1]=g;b[q>>1]=h;b[j>>1]=b[c[n>>2]>>1]|0;c[k>>2]=(c[n>>2]|0)+8;while(1){if((e[j>>1]|0)<=0){i=9;break}if((b[p>>1]|0)<=(b[(c[k>>2]|0)+8>>1]|0)?(f=o,g=c[k>>2]|0,h=o,(c[f>>2]&c[g>>2]|0)==(c[h>>2]|0)?(c[f+4>>2]&c[g+4>>2]|0)==(c[h+4>>2]|0):0):0)break;if((b[(c[k>>2]|0)+8>>1]|0)<=(b[p>>1]|0)?(f=c[k>>2]|0,g=o,h=c[k>>2]|0,(c[f>>2]&c[g>>2]|0)==(c[h>>2]|0)?(c[f+4>>2]&c[g+4>>2]|0)==(c[h+4>>2]|0):0):0){i=7;break}b[j>>1]=(b[j>>1]|0)+-1<<16>>16;c[k>>2]=(c[k>>2]|0)+16}if((i|0)==7){c[m>>2]=0;q=c[m>>2]|0;l=r;return q|0}do if((i|0)==9){a=(c[n>>2]|0)+8|0;if((e[c[n>>2]>>1]|0)<3){j=c[n>>2]|0;n=b[j>>1]|0;b[j>>1]=n+1<<16>>16;c[k>>2]=a+((n&65535)<<4);b[(c[k>>2]|0)+10>>1]=b[q>>1]|0;break}c[k>>2]=a;b[j>>1]=1;while(1){a=b[(c[k>>2]|0)+8>>1]|0;if((e[j>>1]|0)>=(e[c[n>>2]>>1]|0))break;if((a|0)>(b[(c[n>>2]|0)+8+(e[j>>1]<<4)+8>>1]|0))c[k>>2]=(c[n>>2]|0)+8+(e[j>>1]<<4);b[j>>1]=(b[j>>1]|0)+1<<16>>16}if((a|0)<=(b[p>>1]|0)){c[m>>2]=0;q=c[m>>2]|0;l=r;return q|0}}while(0);j=o;n=c[j+4>>2]|0;o=c[k>>2]|0;c[o>>2]=c[j>>2];c[o+4>>2]=n;b[(c[k>>2]|0)+8>>1]=b[p>>1]|0;if((b[(c[k>>2]|0)+10>>1]|0)>(b[q>>1]|0))b[(c[k>>2]|0)+10>>1]=b[q>>1]|0;c[m>>2]=1;q=c[m>>2]|0;l=r;return q|0}function QB(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0;q=l;l=l+48|0;h=q+40|0;i=q+36|0;j=q+32|0;k=q+28|0;m=q+24|0;n=q+20|0;o=q+16|0;p=q+12|0;e=q+8|0;f=q+4|0;g=q;c[i>>2]=a;c[j>>2]=d;c[n>>2]=c[c[i>>2]>>2];c[o>>2]=c[c[c[n>>2]>>2]>>2];if(c[(c[i>>2]|0)+16>>2]|0){if(b[(c[j>>2]|0)+40>>1]|0){p=c[j>>2]|0;PB(c[(c[i>>2]|0)+16>>2]|0,c[p>>2]|0,c[p+4>>2]|0,b[(c[j>>2]|0)+20>>1]|0,b[(c[j>>2]|0)+22>>1]|0)|0}c[h>>2]=0;p=c[h>>2]|0;l=q;return p|0}RB(c[(c[n>>2]|0)+56>>2]|0,c[j>>2]|0);c[k>>2]=SB((c[n>>2]|0)+56|0,c[j>>2]|0)|0;if(!(c[k>>2]|0)){c[h>>2]=0;p=c[h>>2]|0;l=q;return p|0}c[m>>2]=c[c[k>>2]>>2];a:do if(!(c[m>>2]|0)){n=od(c[o>>2]|0,72,0)|0;c[m>>2]=n;c[c[k>>2]>>2]=n;if(c[m>>2]|0){TA(c[m>>2]|0);c[(c[m>>2]|0)+52>>2]=0;break}c[h>>2]=7;p=c[h>>2]|0;l=q;return p|0}else{c[e>>2]=(c[m>>2]|0)+52;while(1){if(!(c[c[e>>2]>>2]|0))break a;c[e>>2]=SB(c[e>>2]|0,c[j>>2]|0)|0;if(!(c[e>>2]|0))break a;c[f>>2]=c[c[e>>2]>>2];if(!(c[f>>2]|0))break a;c[c[e>>2]>>2]=c[(c[f>>2]|0)+52>>2];QA(c[o>>2]|0,c[f>>2]|0)}}while(0);c[p>>2]=TB(c[o>>2]|0,c[m>>2]|0,c[j>>2]|0)|0;if(((c[(c[m>>2]|0)+36>>2]&1024|0)==0?(c[g>>2]=c[(c[m>>2]|0)+24+8>>2],c[g>>2]|0):0)?(c[(c[g>>2]|0)+44>>2]|0)==0:0)c[(c[m>>2]|0)+24+8>>2]=0;c[h>>2]=c[p>>2];p=c[h>>2]|0;l=q;return p|0}function RB(a,e){a=a|0;e=e|0;var f=0,g=0,h=0;h=l;l=l+16|0;f=h+4|0;g=h;c[f>>2]=a;c[g>>2]=e;if(!(c[f>>2]|0?(c[(c[g>>2]|0)+36>>2]&512|0)!=0:0)){l=h;return}do{do if((d[(c[f>>2]|0)+16>>0]|0)==(d[(c[g>>2]|0)+16>>0]|0)?c[(c[f>>2]|0)+36>>2]&512|0:0){if(UB(c[f>>2]|0,c[g>>2]|0)|0){b[(c[g>>2]|0)+20>>1]=b[(c[f>>2]|0)+20>>1]|0;b[(c[g>>2]|0)+22>>1]=(b[(c[f>>2]|0)+22>>1]|0)-1;break}if(UB(c[g>>2]|0,c[f>>2]|0)|0){b[(c[g>>2]|0)+20>>1]=b[(c[f>>2]|0)+20>>1]|0;b[(c[g>>2]|0)+22>>1]=(b[(c[f>>2]|0)+22>>1]|0)+1}}while(0);c[f>>2]=c[(c[f>>2]|0)+52>>2]}while((c[f>>2]|0)!=0);l=h;return}function SB(a,f){a=a|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0;k=l;l=l+16|0;i=k+12|0;j=k+8|0;g=k+4|0;h=k;c[j>>2]=a;c[g>>2]=f;c[h>>2]=c[c[j>>2]>>2];while(1){if(!(c[h>>2]|0)){a=19;break}if((d[(c[h>>2]|0)+16>>0]|0)==(d[(c[g>>2]|0)+16>>0]|0)?(d[(c[h>>2]|0)+17>>0]|0)==(d[(c[g>>2]|0)+17>>0]|0):0){if((((c[(c[h>>2]|0)+36>>2]&16384|0?(e[(c[g>>2]|0)+42>>1]|0)==0:0)?c[(c[g>>2]|0)+36>>2]&512|0:0)?c[(c[g>>2]|0)+36>>2]&1|0:0)?(m=c[h>>2]|0,a=c[g>>2]|0,f=c[g>>2]|0,(c[m>>2]&c[a>>2]|0)==(c[f>>2]|0)?(c[m+4>>2]&c[a+4>>2]|0)==(c[f+4>>2]|0):0):0){a=19;break}a=c[h>>2]|0;f=c[g>>2]|0;m=c[h>>2]|0;if(((((c[a>>2]&c[f>>2]|0)==(c[m>>2]|0)?(c[a+4>>2]&c[f+4>>2]|0)==(c[m+4>>2]|0):0)?(b[(c[h>>2]|0)+18>>1]|0)<=(b[(c[g>>2]|0)+18>>1]|0):0)?(b[(c[h>>2]|0)+20>>1]|0)<=(b[(c[g>>2]|0)+20>>1]|0):0)?(b[(c[h>>2]|0)+22>>1]|0)<=(b[(c[g>>2]|0)+22>>1]|0):0){a=14;break}a=c[h>>2]|0;f=c[g>>2]|0;m=c[g>>2]|0;if((((c[a>>2]&c[f>>2]|0)==(c[m>>2]|0)?(c[a+4>>2]&c[f+4>>2]|0)==(c[m+4>>2]|0):0)?(b[(c[h>>2]|0)+20>>1]|0)>=(b[(c[g>>2]|0)+20>>1]|0):0)?(b[(c[h>>2]|0)+22>>1]|0)>=(b[(c[g>>2]|0)+22>>1]|0):0){a=19;break}}c[j>>2]=(c[h>>2]|0)+52;c[h>>2]=c[c[j>>2]>>2]}if((a|0)==14){c[i>>2]=0;m=c[i>>2]|0;l=k;return m|0}else if((a|0)==19){c[i>>2]=c[j>>2];m=c[i>>2]|0;l=k;return m|0}return 0}function TB(b,d,f){b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;j=l;l=l+16|0;h=j+12|0;k=j+8|0;g=j+4|0;i=j;c[k>>2]=b;c[g>>2]=d;c[i>>2]=f;SA(c[k>>2]|0,c[g>>2]|0);f=(DB(c[k>>2]|0,c[g>>2]|0,e[(c[i>>2]|0)+40>>1]|0)|0)!=0;b=c[g>>2]|0;if(f){k=b+24|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;c[h>>2]=7;k=c[h>>2]|0;l=j;return k|0}d=c[i>>2]|0;f=b+44|0;do{c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}while((b|0)<(f|0));MR(c[(c[g>>2]|0)+48>>2]|0,c[(c[i>>2]|0)+48>>2]|0,(e[(c[g>>2]|0)+40>>1]|0)<<2|0)|0;b=c[i>>2]|0;if(!(c[(c[i>>2]|0)+36>>2]&1024|0)){if(c[b+36>>2]&16384|0)c[(c[i>>2]|0)+24+8>>2]=0}else a[b+24+4>>0]=0;c[h>>2]=0;k=c[h>>2]|0;l=j;return k|0}function UB(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0;k=l;l=l+32|0;j=k+16|0;f=k+12|0;g=k+8|0;h=k+4|0;i=k;c[f>>2]=a;c[g>>2]=d;if(((e[(c[f>>2]|0)+40>>1]|0)-(e[(c[f>>2]|0)+42>>1]|0)|0)>=((e[(c[g>>2]|0)+40>>1]|0)-(e[(c[g>>2]|0)+42>>1]|0)|0)){c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}if((e[(c[g>>2]|0)+42>>1]|0)>(e[(c[f>>2]|0)+42>>1]|0)){c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}if((b[(c[f>>2]|0)+20>>1]|0)>=(b[(c[g>>2]|0)+20>>1]|0)){if((b[(c[f>>2]|0)+20>>1]|0)>(b[(c[g>>2]|0)+20>>1]|0)){c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}if((b[(c[f>>2]|0)+22>>1]|0)>(b[(c[g>>2]|0)+22>>1]|0)){c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}}c[h>>2]=(e[(c[f>>2]|0)+40>>1]|0)-1;while(1){if((c[h>>2]|0)<0){a=20;break}if(c[(c[(c[f>>2]|0)+48>>2]|0)+(c[h>>2]<<2)>>2]|0){c[i>>2]=(e[(c[g>>2]|0)+40>>1]|0)-1;while(1){if((c[i>>2]|0)<0)break;if((c[(c[(c[g>>2]|0)+48>>2]|0)+(c[i>>2]<<2)>>2]|0)==(c[(c[(c[f>>2]|0)+48>>2]|0)+(c[h>>2]<<2)>>2]|0))break;c[i>>2]=(c[i>>2]|0)+-1}if((c[i>>2]|0)<0){a=18;break}}c[h>>2]=(c[h>>2]|0)+-1}if((a|0)==18){c[j>>2]=0;j=c[j>>2]|0;l=k;return j|0}else if((a|0)==20){c[j>>2]=1;j=c[j>>2]|0;l=k;return j|0}return 0}function VB(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0;p=l;l=l+32|0;g=p+24|0;h=p+20|0;i=p+16|0;j=p+12|0;k=p+8|0;m=p+4|0;n=p;c[h>>2]=a;c[i>>2]=e;c[j>>2]=f;while(1){if((d[c[j>>2]>>0]|0)!=28)break;if(!(VB(c[h>>2]|0,c[i>>2]|0,c[(c[j>>2]|0)+12>>2]|0)|0)){o=4;break}c[j>>2]=c[(c[j>>2]|0)+16>>2]}if((o|0)==4){c[g>>2]=0;o=c[g>>2]|0;l=p;return o|0}c[k>>2]=0;c[m>>2]=c[(c[i>>2]|0)+20>>2];while(1){if((c[k>>2]|0)>=(c[(c[i>>2]|0)+12>>2]|0)){o=13;break}c[n>>2]=c[c[m>>2]>>2];if(eC(c[n>>2]|0,c[j>>2]|0,c[h>>2]|0)|0){if(!(c[(c[n>>2]|0)+4>>2]&1)){o=11;break}if((b[(c[n>>2]|0)+36>>1]|0)==(c[h>>2]|0)){o=11;break}}c[k>>2]=(c[k>>2]|0)+1;c[m>>2]=(c[m>>2]|0)+48}if((o|0)==11){c[g>>2]=1;o=c[g>>2]|0;l=p;return o|0}else if((o|0)==13){c[g>>2]=0;o=c[g>>2]|0;l=p;return o|0}return 0}function WB(a,f,g){a=a|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=l;l=l+48|0;j=s+32|0;k=s+28|0;m=s+24|0;n=s+20|0;o=s+16|0;p=s+12|0;q=s+8|0;h=s+4|0;i=s;c[k>>2]=a;c[m>>2]=f;c[n>>2]=g;if((d[(c[m>>2]|0)+55>>0]|0)>>>2&1|0){c[j>>2]=0;r=c[j>>2]|0;l=s;return r|0}k=c[(c[c[k>>2]>>2]|0)+8>>2]|0;c[o>>2]=k;if(!k){c[j>>2]=0;r=c[j>>2]|0;l=s;return r|0}c[q>>2]=0;a:while(1){if((c[q>>2]|0)>=(c[c[o>>2]>>2]|0)){r=24;break}c[i>>2]=Ev(c[(c[(c[o>>2]|0)+4>>2]|0)+((c[q>>2]|0)*20|0)>>2]|0)|0;b:do if((d[c[i>>2]>>0]|0)==152?(c[(c[i>>2]|0)+28>>2]|0)==(c[n>>2]|0):0){if((b[(c[i>>2]|0)+32>>1]|0)<0){r=10;break a}c[h>>2]=0;while(1){if((c[h>>2]|0)>=(e[(c[m>>2]|0)+50>>1]|0))break b;if((b[(c[i>>2]|0)+32>>1]|0)==(b[(c[(c[m>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]|0)){r=14;break a}c[h>>2]=(c[h>>2]|0)+1}}else r=16;while(0);c:do if((r|0)==16?(r=0,k=c[(c[m>>2]|0)+40>>2]|0,c[p>>2]=k,k|0):0){c[h>>2]=0;while(1){if((c[h>>2]|0)>=(e[(c[m>>2]|0)+50>>1]|0))break c;if((b[(c[(c[m>>2]|0)+4>>2]|0)+(c[h>>2]<<1)>>1]|0)==-2?(cw(c[i>>2]|0,c[(c[(c[p>>2]|0)+4>>2]|0)+((c[h>>2]|0)*20|0)>>2]|0,c[n>>2]|0)|0)==0:0){r=21;break a}c[h>>2]=(c[h>>2]|0)+1}}while(0);c[q>>2]=(c[q>>2]|0)+1}if((r|0)==10){c[j>>2]=1;r=c[j>>2]|0;l=s;return r|0}else if((r|0)==14){c[j>>2]=1;r=c[j>>2]|0;l=s;return r|0}else if((r|0)==21){c[j>>2]=1;r=c[j>>2]|0;l=s;return r|0}else if((r|0)==24){c[j>>2]=0;r=c[j>>2]|0;l=s;return r|0}return 0}function XB(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;s=l;l=l+48|0;k=s+36|0;m=s+32|0;n=s+42|0;o=s+28|0;p=s+24|0;q=s;r=s+20|0;g=s+16|0;h=s+12|0;i=s+40|0;j=s+8|0;c[k>>2]=a;c[m>>2]=d;b[n>>1]=f;t=c[m>>2]|0;a=(c[m>>2]|0)+8|0;d=~(c[t+4>>2]|c[a+4>>2]);f=q;c[f>>2]=~(c[t>>2]|c[a>>2]);c[f+4>>2]=d;b[i>>1]=0;c[r>>2]=c[(c[k>>2]|0)+12>>2];c[o>>2]=c[(c[k>>2]|0)+20>>2];while(1){if((c[r>>2]|0)<=0)break;if(e[(c[o>>2]|0)+10>>1]&2|0)break;f=(c[o>>2]|0)+40|0;t=(c[m>>2]|0)+8|0;do if(!((c[f>>2]&c[t>>2]|0)==0?(c[f+4>>2]&c[t+4>>2]|0)==0:0)?(f=(c[o>>2]|0)+40|0,t=q,!(c[f>>2]&c[t>>2]|0?1:(c[f+4>>2]&c[t+4>>2]|0)!=0)):0){c[g>>2]=(e[(c[m>>2]|0)+40>>1]|0)-1;while(1){if((c[g>>2]|0)<0)break;c[p>>2]=c[(c[(c[m>>2]|0)+48>>2]|0)+(c[g>>2]<<2)>>2];if(c[p>>2]|0){if((c[p>>2]|0)==(c[o>>2]|0))break;if((c[(c[p>>2]|0)+16>>2]|0)>=0?((c[(c[k>>2]|0)+20>>2]|0)+((c[(c[p>>2]|0)+16>>2]|0)*48|0)|0)==(c[o>>2]|0):0)break}c[g>>2]=(c[g>>2]|0)+-1}if((c[g>>2]|0)<0){if((b[(c[o>>2]|0)+8>>1]|0)<=0){t=(c[m>>2]|0)+22|0;b[t>>1]=(b[t>>1]|0)+(b[(c[o>>2]|0)+8>>1]|0);break}t=(c[m>>2]|0)+22|0;b[t>>1]=(b[t>>1]|0)+-1<<16>>16;if(e[(c[o>>2]|0)+12>>1]&130|0){c[j>>2]=c[(c[c[o>>2]>>2]|0)+16>>2];t=(Zv(c[j>>2]|0,h)|0)!=0;if(t&(c[h>>2]|0)>=-1&(c[h>>2]|0)<=1)c[h>>2]=10;else c[h>>2]=20;if((b[i>>1]|0)<(c[h>>2]|0))b[i>>1]=c[h>>2]}}}while(0);c[r>>2]=(c[r>>2]|0)+-1;c[o>>2]=(c[o>>2]|0)+48}if((b[(c[m>>2]|0)+22>>1]|0)<=((b[n>>1]|0)-(b[i>>1]|0)|0)){l=s;return}b[(c[m>>2]|0)+22>>1]=(b[n>>1]|0)-(b[i>>1]|0);l=s;return}function YB(a){a=a|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0;i=l;l=l+32|0;d=i+16|0;f=i;g=i+12|0;h=i+8|0;c[d>>2]=a;a=f;c[a>>2]=0;c[a+4>>2]=0;c[g>>2]=(e[(c[d>>2]|0)+52>>1]|0)-1;while(1){if((c[g>>2]|0)<0)break;c[h>>2]=b[(c[(c[d>>2]|0)+4>>2]|0)+(c[g>>2]<<1)>>1];if((c[h>>2]|0)>=0&(c[h>>2]|0)<63){k=HR(1,0,c[h>>2]|0)|0;m=f;j=c[m+4>>2]|z;a=f;c[a>>2]=c[m>>2]|k;c[a+4>>2]=j}c[g>>2]=(c[g>>2]|0)+-1}m=f;z=c[m+4>>2]|0;l=i;return c[m>>2]|0}function ZB(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;g=l;l=l+48|0;h=g+44|0;k=g+40|0;j=g+36|0;f=g+8|0;i=g;c[h>>2]=b;c[k>>2]=d;c[j>>2]=e;c[f>>2]=0;c[f+4>>2]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f+16>>2]=0;c[f+20>>2]=0;c[f+24>>2]=0;c[i+4>>2]=c[k>>2];c[i>>2]=c[j>>2];c[f+4>>2]=193;c[f+24>>2]=i;Qv(f,c[h>>2]|0)|0;l=g;return ((a[f+20>>0]|0)!=0^1)&1|0}function _B(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;R=l;l=l+224|0;M=R+180|0;N=R+176|0;O=R+172|0;P=R+168|0;Q=R+208|0;S=R+164|0;k=R+160|0;m=R+156|0;n=R+152|0;o=R+148|0;j=R+144|0;p=R+48|0;q=R;r=R+206|0;s=R+204|0;t=R+202|0;u=R+200|0;v=R+198|0;w=R+40|0;x=R+196|0;y=R+36|0;z=R+194|0;A=R+192|0;B=R+32|0;C=R+28|0;D=R+190|0;E=R+188|0;F=R+186|0;G=R+24|0;H=R+20|0;I=R+16|0;J=R+12|0;K=R+8|0;L=R+184|0;c[N>>2]=f;c[O>>2]=g;c[P>>2]=h;b[Q>>1]=i;c[S>>2]=c[c[N>>2]>>2];c[k>>2]=c[c[S>>2]>>2];c[m>>2]=c[c[k>>2]>>2];c[y>>2]=0;c[B>>2]=0;c[C>>2]=0;c[n>>2]=c[(c[N>>2]|0)+12>>2];if(a[(c[m>>2]|0)+69>>0]|0){c[M>>2]=7;S=c[M>>2]|0;l=R;return S|0}if(c[(c[n>>2]|0)+36>>2]&32|0)c[j>>2]=24;else c[j>>2]=447;if((d[(c[P>>2]|0)+55>>0]|0)>>>2&1|0)c[j>>2]=c[j>>2]&-61;b[s>>1]=b[(c[n>>2]|0)+24>>1]|0;b[t>>1]=b[(c[n>>2]|0)+24+2>>1]|0;b[u>>1]=b[(c[n>>2]|0)+24+4>>1]|0;b[v>>1]=b[(c[n>>2]|0)+42>>1]|0;b[r>>1]=b[(c[n>>2]|0)+40>>1]|0;c[w>>2]=c[(c[n>>2]|0)+36>>2];h=c[n>>2]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;i=(c[g+4>>2]|c[j+4>>2])&~c[h+4>>2];S=c[n>>2]|0;c[S>>2]=(c[g>>2]|c[j>>2])&~c[h>>2];c[S+4>>2]=i;b:do if(!(e[D>>1]&1|0))if(!(e[D>>1]&130|0)){if(e[D>>1]&256|0){S=(c[n>>2]|0)+36|0;c[S>>2]=c[S>>2]|8;break}f=(c[n>>2]|0)+36|0;g=c[f>>2]|0;if(e[D>>1]&36|0){c[f>>2]=g|34;S=(aC(c[k>>2]|0,c[(c[O>>2]|0)+44>>2]|0,c[P>>2]|0,e[s>>1]|0,c[o>>2]|0)|0)&65535;b[(c[n>>2]|0)+24+2>>1]=S;c[C>>2]=c[o>>2];c[B>>2]=0;if(!(e[(c[o>>2]|0)+10>>1]&256))break;c[B>>2]=(c[o>>2]|0)+48;if(DB(c[m>>2]|0,c[n>>2]|0,(e[(c[n>>2]|0)+40>>1]|0)+1|0)|0)break a;h=c[B>>2]|0;i=c[(c[n>>2]|0)+48>>2]|0;j=(c[n>>2]|0)+40|0;S=b[j>>1]|0;b[j>>1]=S+1<<16>>16;c[i+((S&65535)<<2)>>2]=h;S=(c[n>>2]|0)+36|0;c[S>>2]=c[S>>2]|16;b[(c[n>>2]|0)+24+4>>1]=1;break}else{c[f>>2]=g|18;S=(aC(c[k>>2]|0,c[(c[O>>2]|0)+44>>2]|0,c[P>>2]|0,e[s>>1]|0,c[o>>2]|0)|0)&65535;b[(c[n>>2]|0)+24+4>>1]=S;c[B>>2]=c[o>>2];if(c[(c[n>>2]|0)+36>>2]&32|0)f=c[(c[(c[n>>2]|0)+48>>2]|0)+((e[(c[n>>2]|0)+40>>1]|0)-2<<2)>>2]|0;else f=0;c[C>>2]=f;break}}else{c[J>>2]=b[(c[(c[P>>2]|0)+4>>2]|0)+(e[s>>1]<<1)>>1];S=(c[n>>2]|0)+36|0;c[S>>2]=c[S>>2]|1;if((c[J>>2]|0)!=-1){if((c[J>>2]|0)<=0)break;if(b[Q>>1]|0)break;if((e[s>>1]|0)!=((e[(c[P>>2]|0)+50>>1]|0)-1|0))break}if((c[J>>2]|0)>=0?((d[(c[P>>2]|0)+55>>0]|0)>>>3&1|0)==0:0){f=65536;g=c[n>>2]|0}else{f=4096;g=c[n>>2]|0}S=g+36|0;c[S>>2]=c[S>>2]|f;break}else{c[H>>2]=c[c[o>>2]>>2];S=(c[n>>2]|0)+36|0;c[S>>2]=c[S>>2]|4;if(!(c[(c[H>>2]|0)+4>>2]&2048)){if(!(c[(c[H>>2]|0)+20>>2]|0))break;if(!(c[c[(c[H>>2]|0)+20>>2]>>2]|0))break;S=c[c[(c[H>>2]|0)+20>>2]>>2]|0;c[G>>2]=(Du(S,((S|0)<0)<<31>>31)|0)<<16>>16;break}c[G>>2]=46;c[I>>2]=0;while(1){if((c[I>>2]|0)>=((e[(c[n>>2]|0)+40>>1]|0)-1|0))break b;if(c[(c[(c[n>>2]|0)+48>>2]|0)+(c[I>>2]<<2)>>2]|0?(c[c[(c[(c[n>>2]|0)+48>>2]|0)+(c[I>>2]<<2)>>2]>>2]|0)==(c[H>>2]|0):0)c[G>>2]=0;c[I>>2]=(c[I>>2]|0)+1}}while(0);do if(!(c[(c[n>>2]|0)+36>>2]&2|0)){i=(c[n>>2]|0)+24|0;S=(b[i>>1]|0)+1<<16>>16;b[i>>1]=S;c[K>>2]=S&65535;if((b[(c[o>>2]|0)+8>>1]|0)<=0?(b[(c[(c[P>>2]|0)+4>>2]|0)+(e[s>>1]<<1)>>1]|0)>=0:0){S=(c[n>>2]|0)+22|0;b[S>>1]=(b[S>>1]|0)+(b[(c[o>>2]|0)+8>>1]|0);S=(c[n>>2]|0)+22|0;b[S>>1]=(b[S>>1]|0)-(c[G>>2]|0);break}S=(c[n>>2]|0)+22|0;b[S>>1]=(b[S>>1]|0)+((b[(c[(c[P>>2]|0)+8>>2]|0)+(c[K>>2]<<1)>>1]|0)-(b[(c[(c[P>>2]|0)+8>>2]|0)+((c[K>>2]|0)-1<<1)>>1]|0));if(e[D>>1]&256|0){S=(c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;f=i+12|0;g=i+8|0;j=i+4|0;h=i;c[g>>2]=a;c[j>>2]=e;c[h>>2]=b[(c[(c[g>>2]|0)+4>>2]|0)+(c[j>>2]<<1)>>1];if((c[h>>2]|0)>=0){c[f>>2]=d[(c[(c[(c[g>>2]|0)+12>>2]|0)+4>>2]|0)+(c[h>>2]<<4)+12>>0];j=c[f>>2]|0;l=i;return j|0}if((c[h>>2]|0)==-1){c[f>>2]=1;j=c[f>>2]|0;l=i;return j|0}else{c[f>>2]=0;j=c[f>>2]|0;l=i;return j|0}return 0}function aC(f,g,h,i,j){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;x=l;l=l+48|0;r=x+36|0;s=x+32|0;t=x+28|0;u=x+24|0;v=x+20|0;k=x+16|0;w=x+12|0;m=x+41|0;n=x+40|0;o=x+8|0;p=x+4|0;q=x;c[r>>2]=f;c[s>>2]=g;c[t>>2]=h;c[u>>2]=i;c[v>>2]=j;c[k>>2]=xw(c[(c[c[v>>2]>>2]|0)+12>>2]|0)|0;if((c[k>>2]|0)<((e[(c[t>>2]|0)+52>>1]|0)-(c[u>>2]|0)|0))f=c[k>>2]|0;else f=(e[(c[t>>2]|0)+52>>1]|0)-(c[u>>2]|0)|0;c[k>>2]=f;c[w>>2]=1;while(1){if((c[w>>2]|0)>=(c[k>>2]|0)){f=17;break}a[n>>0]=0;c[p>>2]=c[(c[(c[(c[(c[c[v>>2]>>2]|0)+12>>2]|0)+20>>2]|0)+4>>2]|0)+((c[w>>2]|0)*20|0)>>2];c[q>>2]=c[(c[c[v>>2]>>2]|0)+16>>2];f=(c[q>>2]|0)+20|0;if(c[(c[q>>2]|0)+4>>2]&2048|0)c[q>>2]=c[(c[(c[c[f>>2]>>2]|0)+4>>2]|0)+((c[w>>2]|0)*20|0)>>2];else c[q>>2]=c[(c[(c[f>>2]|0)+4>>2]|0)+((c[w>>2]|0)*20|0)>>2];if((d[c[p>>2]>>0]|0)!=152){f=17;break}if((c[(c[p>>2]|0)+28>>2]|0)!=(c[s>>2]|0)){f=17;break}if((b[(c[p>>2]|0)+32>>1]|0)!=(b[(c[(c[t>>2]|0)+4>>2]|0)+((c[w>>2]|0)+(c[u>>2]|0)<<1)>>1]|0)){f=17;break}if((d[(c[(c[t>>2]|0)+28>>2]|0)+((c[w>>2]|0)+(c[u>>2]|0))>>0]|0)!=(d[(c[(c[t>>2]|0)+28>>2]|0)+(c[u>>2]|0)>>0]|0)){f=17;break}j=c[q>>2]|0;a[m>>0]=Cy(j,wv(c[p>>2]|0)|0)|0;a[n>>0]=Fv(c[(c[t>>2]|0)+12>>2]|0,b[(c[p>>2]|0)+32>>1]|0)|0;if((a[m>>0]|0)!=(a[n>>0]|0)){f=17;break}c[o>>2]=Dy(c[r>>2]|0,c[p>>2]|0,c[q>>2]|0)|0;if(!(c[o>>2]|0)){f=17;break}if(Ig(c[c[o>>2]>>2]|0,c[(c[(c[t>>2]|0)+32>>2]|0)+((c[w>>2]|0)+(c[u>>2]|0)<<2)>>2]|0)|0){f=17;break}c[w>>2]=(c[w>>2]|0)+1}if((f|0)==17){l=x;return c[w>>2]|0}return 0}function bC(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0;o=l;l=l+32|0;k=o+16|0;m=o+12|0;n=o+8|0;h=o+4|0;i=o;j=o+28|0;c[o+24>>2]=a;c[o+20>>2]=d;c[k>>2]=e;c[m>>2]=f;c[n>>2]=g;c[h>>2]=0;c[i>>2]=b[(c[n>>2]|0)+22>>1];b[j>>1]=cC(c[k>>2]|0,c[i>>2]&65535)|0;b[j>>1]=cC(c[m>>2]|0,b[j>>1]|0)|0;if((c[k>>2]|0?(c[m>>2]|0?(b[(c[k>>2]|0)+8>>1]|0)>0:0):0)?(b[(c[m>>2]|0)+8>>1]|0)>0:0)b[j>>1]=(b[j>>1]|0)-20;c[i>>2]=(c[i>>2]|0)-(((c[k>>2]|0)!=0&1)+((c[m>>2]|0)!=0&1));if((b[j>>1]|0)<10)b[j>>1]=10;if((b[j>>1]|0)>=(c[i>>2]|0)){m=c[i>>2]|0;m=m&65535;n=c[n>>2]|0;n=n+22|0;b[n>>1]=m;n=c[h>>2]|0;l=o;return n|0}c[i>>2]=b[j>>1];m=c[i>>2]|0;m=m&65535;n=c[n>>2]|0;n=n+22|0;b[n>>1]=m;n=c[h>>2]|0;l=o;return n|0}function cC(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,i=0;h=l;l=l+16|0;f=h;i=h+6|0;g=h+4|0;c[f>>2]=a;b[i>>1]=d;b[g>>1]=b[i>>1]|0;do if(c[f>>2]|0){a=c[f>>2]|0;if((b[(c[f>>2]|0)+8>>1]|0)<=0){b[g>>1]=(b[g>>1]|0)+(b[a+8>>1]|0);break}if(!(e[a+10>>1]&0))b[g>>1]=(b[g>>1]|0)-20}while(0);l=h;return b[g>>1]|0}function dC(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0;j=l;l=l+16|0;g=j+8|0;h=j+4|0;i=j;c[h>>2]=e;c[i>>2]=f;if(((d[c[i>>2]>>0]|0|0)==152?(c[(c[i>>2]|0)+28>>2]|0)==(c[(c[(c[h>>2]|0)+24>>2]|0)+4>>2]|0):0)?((_x(c[c[(c[h>>2]|0)+24>>2]>>2]|0,b[(c[i>>2]|0)+32>>1]|0)|0)<<16>>16|0)<0:0){a[(c[h>>2]|0)+20>>0]=1;c[g>>2]=2;i=c[g>>2]|0;l=j;return i|0}c[g>>2]=0;i=c[g>>2]|0;l=j;return i|0}function eC(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=l;l=l+16|0;f=j+12|0;g=j+8|0;h=j+4|0;i=j;c[g>>2]=a;c[h>>2]=b;c[i>>2]=e;if(!(cw(c[g>>2]|0,c[h>>2]|0,c[i>>2]|0)|0)){c[f>>2]=1;i=c[f>>2]|0;l=j;return i|0}do if((d[c[h>>2]>>0]|0|0)==27){if((eC(c[g>>2]|0,c[(c[h>>2]|0)+12>>2]|0,c[i>>2]|0)|0)==0?(eC(c[g>>2]|0,c[(c[h>>2]|0)+16>>2]|0,c[i>>2]|0)|0)==0:0)break;c[f>>2]=1;i=c[f>>2]|0;l=j;return i|0}while(0);if((((d[c[h>>2]>>0]|0|0)==35?(cw(c[(c[g>>2]|0)+12>>2]|0,c[(c[h>>2]|0)+12>>2]|0,c[i>>2]|0)|0)==0:0)?(d[c[g>>2]>>0]|0|0)!=34:0)?(d[c[g>>2]>>0]|0|0)!=29:0){c[f>>2]=1;i=c[f>>2]|0;l=j;return i|0}c[f>>2]=0;i=c[f>>2]|0;l=j;return i|0}function fC(f,g,h,i,j,k,m){f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l;l=l+96|0;I=J+8|0;F=J+80|0;G=J+76|0;H=J+72|0;n=J;o=J+68|0;p=J+64|0;q=J+60|0;r=J+56|0;s=J+52|0;t=J+48|0;u=J+44|0;v=J+40|0;w=J+36|0;x=J+32|0;y=J+28|0;z=J+24|0;A=J+84|0;B=J+20|0;C=J+16|0;D=J+86|0;E=J+12|0;c[G>>2]=f;c[H>>2]=g;g=n;c[g>>2]=h;c[g+4>>2]=i;c[o>>2]=j;c[p>>2]=k;c[q>>2]=m;b[A>>1]=0;c[t>>2]=0;c[r>>2]=0;c[x>>2]=c[(c[H>>2]|0)+20>>2];while(1){if((c[r>>2]|0)>=(c[(c[H>>2]|0)+12>>2]|0))break;if((((c[(c[x>>2]|0)+20>>2]|0)==(c[(c[o>>2]|0)+44>>2]|0)?(k=(c[x>>2]|0)+32|0,m=n,!(c[k>>2]&c[m>>2]|0?1:(c[k+4>>2]&c[m+4>>2]|0)!=0)):0)?e[(c[x>>2]|0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j+24|0;k=j+20|0;f=j+16|0;g=j+12|0;c[e>>2]=a;c[m>>2]=b;c[k>>2]=d;c[f>>2]=c[(lv(c[c[e>>2]>>2]|0,c[m>>2]|0)|0)+8>>2];c[g>>2]=yb[c[(c[c[f>>2]>>2]|0)+12>>2]&255](c[f>>2]|0,c[k>>2]|0)|0;do if(c[g>>2]|0){if((c[g>>2]|0)==7){yd(c[c[e>>2]>>2]|0);break}a=c[e>>2]|0;if(c[(c[f>>2]|0)+8>>2]|0){c[i>>2]=c[(c[f>>2]|0)+8>>2];Ck(a,18130,i);break}else{c[h>>2]=Ci(c[g>>2]|0)|0;Ck(a,18130,h);break}}while(0);Kd(c[(c[f>>2]|0)+8>>2]|0);c[(c[f>>2]|0)+8>>2]=0;l=j;return c[(c[e>>2]|0)+36>>2]|0}function iC(a){a=+a;var d=0,e=0,f=0,g=0,i=0;i=l;l=l+32|0;d=i+18|0;e=i+8|0;f=i;g=i+16|0;h[e>>3]=a;if(+h[e>>3]<=1.0){b[d>>1]=0;g=b[d>>1]|0;l=i;return g|0}if(+h[e>>3]<=2.0e9){a=+h[e>>3];b[d>>1]=Du(~~a>>>0,+B(a)>=1.0?(a>0.0?~~+P(+A(a/4294967296.0),4294967295.0)>>>0:~~+N((a-+(~~a>>>0))/4294967296.0)>>>0):0)|0;g=b[d>>1]|0;l=i;return g|0}else{c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];f=OR(c[f>>2]|0,c[f+4>>2]|0,52)|0;f=FR(f|0,z|0,1022,0)|0;b[g>>1]=f;b[d>>1]=(b[g>>1]|0)*10;g=b[d>>1]|0;l=i;return g|0}return 0}function jC(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=l;l=l+48|0;s=t+36|0;n=t+32|0;o=t+28|0;p=t+24|0;q=t+20|0;i=t+16|0;r=t+12|0;j=t+8|0;k=t+4|0;m=t;c[n>>2]=a;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[i>>2]=h;c[j>>2]=c[(c[(c[q>>2]|0)+32>>2]|0)+(c[i>>2]<<2)>>2];c[r>>2]=0;while(1){if((c[r>>2]|0)>=(c[c[o>>2]>>2]|0)){a=10;break}c[k>>2]=Ev(c[(c[(c[o>>2]|0)+4>>2]|0)+((c[r>>2]|0)*20|0)>>2]|0)|0;if(((((d[c[k>>2]>>0]|0)==152?(b[(c[k>>2]|0)+32>>1]|0)==(b[(c[(c[q>>2]|0)+4>>2]|0)+(c[i>>2]<<1)>>1]|0):0)?(c[(c[k>>2]|0)+28>>2]|0)==(c[p>>2]|0):0)?(c[m>>2]=xv(c[n>>2]|0,c[(c[(c[o>>2]|0)+4>>2]|0)+((c[r>>2]|0)*20|0)>>2]|0)|0,c[m>>2]|0):0)?0==(Ig(c[c[m>>2]>>2]|0,c[j>>2]|0)|0):0){a=8;break}c[r>>2]=(c[r>>2]|0)+1}if((a|0)==8){c[s>>2]=c[r>>2];s=c[s>>2]|0;l=t;return s|0}else if((a|0)==10){c[s>>2]=-1;s=c[s>>2]|0;l=t;return s|0}return 0} +function iS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(13,a|0,b|0,c|0)|0}function jS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(14,a|0,b|0,c|0)|0}function kS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(15,a|0,b|0,c|0)|0}function lS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(16,a|0,b|0,c|0)|0}function mS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(17,a|0,b|0,c|0)|0}function nS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(18,a|0,b|0,c|0)|0}function oS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(19,a|0,b|0,c|0)|0}function pS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(20,a|0,b|0,c|0)|0}function qS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(21,a|0,b|0,c|0)|0}function rS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(22,a|0,b|0,c|0)|0}function sS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(23,a|0,b|0,c|0)|0}function tS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(24,a|0,b|0,c|0)|0}function uS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(25,a|0,b|0,c|0)|0}function vS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(26,a|0,b|0,c|0)|0}function wS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(27,a|0,b|0,c|0)|0}function xS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(28,a|0,b|0,c|0)|0}function yS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(29,a|0,b|0,c|0)|0}function zS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(30,a|0,b|0,c|0)|0}function AS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(31,a|0,b|0,c|0)|0}function BS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(32,a|0,b|0,c|0)|0}function CS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(33,a|0,b|0,c|0)|0}function DS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(34,a|0,b|0,c|0)|0}function ES(a,b,c){a=a|0;b=b|0;c=c|0;return Y(35,a|0,b|0,c|0)|0}function FS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(36,a|0,b|0,c|0)|0}function GS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(37,a|0,b|0,c|0)|0}function HS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(38,a|0,b|0,c|0)|0}function IS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(39,a|0,b|0,c|0)|0}function JS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(40,a|0,b|0,c|0)|0}function KS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(41,a|0,b|0,c|0)|0}function LS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(42,a|0,b|0,c|0)|0}function MS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(43,a|0,b|0,c|0)|0}function NS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(44,a|0,b|0,c|0)|0}function OS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(45,a|0,b|0,c|0)|0}function PS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(46,a|0,b|0,c|0)|0}function QS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(47,a|0,b|0,c|0)|0}function RS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(48,a|0,b|0,c|0)|0}function SS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(49,a|0,b|0,c|0)|0}function TS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(50,a|0,b|0,c|0)|0}function US(a,b,c){a=a|0;b=b|0;c=c|0;return Y(51,a|0,b|0,c|0)|0}function VS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(52,a|0,b|0,c|0)|0}function WS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(53,a|0,b|0,c|0)|0}function XS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(54,a|0,b|0,c|0)|0}function YS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(55,a|0,b|0,c|0)|0}function ZS(a,b,c){a=a|0;b=b|0;c=c|0;return Y(56,a|0,b|0,c|0)|0}function _S(a,b,c){a=a|0;b=b|0;c=c|0;return Y(57,a|0,b|0,c|0)|0}function $S(a,b,c){a=a|0;b=b|0;c=c|0;return Y(58,a|0,b|0,c|0)|0}function aT(a,b,c){a=a|0;b=b|0;c=c|0;return Y(59,a|0,b|0,c|0)|0}function bT(a,b,c){a=a|0;b=b|0;c=c|0;return Y(60,a|0,b|0,c|0)|0}function cT(a,b,c){a=a|0;b=b|0;c=c|0;return Y(61,a|0,b|0,c|0)|0}function dT(a,b,c){a=a|0;b=b|0;c=c|0;return Y(62,a|0,b|0,c|0)|0}function eT(a,b,c){a=a|0;b=b|0;c=c|0;return Y(63,a|0,b|0,c|0)|0}function fT(a){a=a|0;return pb[a&255]()|0}function gT(){return _(0)|0}function hT(){return _(1)|0}function iT(){return _(2)|0}function jT(){return _(3)|0}function kT(){return _(4)|0}function lT(){return _(5)|0}function mT(){return _(6)|0}function nT(){return _(7)|0}function oT(){return _(8)|0}function pT(){return _(9)|0}function qT(){return _(10)|0}function rT(){return _(11)|0}function sT(){return _(12)|0}function tT(){return _(13)|0}function uT(){return _(14)|0}function vT(){return _(15)|0}function wT(){return _(16)|0}function xT(){return _(17)|0}function yT(){return _(18)|0}function zT(){return _(19)|0}function AT(){return _(20)|0}function BT(){return _(21)|0}function CT(){return _(22)|0}function DT(){return _(23)|0}function ET(){return _(24)|0}function FT(){return _(25)|0}function GT(){return _(26)|0}function HT(){return _(27)|0}function IT(){return _(28)|0}function JT(){return _(29)|0}function KT(){return _(30)|0}function LT(){return _(31)|0}function MT(){return _(32)|0}function NT(){return _(33)|0}function OT(){return _(34)|0}function PT(){return _(35)|0}function QT(){return _(36)|0}function RT(){return _(37)|0}function ST(){return _(38)|0}function TT(){return _(39)|0}function UT(){return _(40)|0}function VT(){return _(41)|0}function WT(){return _(42)|0}function XT(){return _(43)|0}function YT(){return _(44)|0}function ZT(){return _(45)|0}function _T(){return _(46)|0}function $T(){return _(47)|0}function aU(){return _(48)|0}function bU(){return _(49)|0}function cU(){return _(50)|0}function dU(){return _(51)|0}function eU(){return _(52)|0}function fU(){return _(53)|0}function gU(){return _(54)|0}function hU(){return _(55)|0}function iU(){return _(56)|0}function jU(){return _(57)|0}function kU(){return _(58)|0}function lU(){return _(59)|0}function mU(){return _(60)|0}function nU(){return _(61)|0}function oU(){return _(62)|0}function pU(){return _(63)|0}function qU(a,b){a=a|0;b=b|0;qb[a&255](b|0)}function rU(a){a=a|0;aa(0,a|0)}function sU(a){a=a|0;aa(1,a|0)}function tU(a){a=a|0;aa(2,a|0)}function uU(a){a=a|0;aa(3,a|0)}function vU(a){a=a|0;aa(4,a|0)}function wU(a){a=a|0;aa(5,a|0)}function xU(a){a=a|0;aa(6,a|0)}function yU(a){a=a|0;aa(7,a|0)}function zU(a){a=a|0;aa(8,a|0)}function AU(a){a=a|0;aa(9,a|0)}function BU(a){a=a|0;aa(10,a|0)}function CU(a){a=a|0;aa(11,a|0)}function DU(a){a=a|0;aa(12,a|0)}function EU(a){a=a|0;aa(13,a|0)}function FU(a){a=a|0;aa(14,a|0)}function GU(a){a=a|0;aa(15,a|0)}function HU(a){a=a|0;aa(16,a|0)}function IU(a){a=a|0;aa(17,a|0)}function JU(a){a=a|0;aa(18,a|0)}function KU(a){a=a|0;aa(19,a|0)}function LU(a){a=a|0;aa(20,a|0)}function MU(a){a=a|0;aa(21,a|0)}function NU(a){a=a|0;aa(22,a|0)}function OU(a){a=a|0;aa(23,a|0)}function PU(a){a=a|0;aa(24,a|0)}function QU(a){a=a|0;aa(25,a|0)}function RU(a){a=a|0;aa(26,a|0)}function SU(a){a=a|0;aa(27,a|0)}function TU(a){a=a|0;aa(28,a|0)}function UU(a){a=a|0;aa(29,a|0)}function VU(a){a=a|0;aa(30,a|0)}function WU(a){a=a|0;aa(31,a|0)}function XU(a){a=a|0;aa(32,a|0)}function YU(a){a=a|0;aa(33,a|0)}function ZU(a){a=a|0;aa(34,a|0)}function _U(a){a=a|0;aa(35,a|0)}function $U(a){a=a|0;aa(36,a|0)}function aV(a){a=a|0;aa(37,a|0)}function bV(a){a=a|0;aa(38,a|0)}function cV(a){a=a|0;aa(39,a|0)}function dV(a){a=a|0;aa(40,a|0)}function eV(a){a=a|0;aa(41,a|0)}function fV(a){a=a|0;aa(42,a|0)}function gV(a){a=a|0;aa(43,a|0)}function hV(a){a=a|0;aa(44,a|0)}function iV(a){a=a|0;aa(45,a|0)}function jV(a){a=a|0;aa(46,a|0)}function kV(a){a=a|0;aa(47,a|0)}function lV(a){a=a|0;aa(48,a|0)}function mV(a){a=a|0;aa(49,a|0)}function nV(a){a=a|0;aa(50,a|0)}function oV(a){a=a|0;aa(51,a|0)}function pV(a){a=a|0;aa(52,a|0)}function qV(a){a=a|0;aa(53,a|0)}function rV(a){a=a|0;aa(54,a|0)}function sV(a){a=a|0;aa(55,a|0)}function tV(a){a=a|0;aa(56,a|0)}function uV(a){a=a|0;aa(57,a|0)}function vV(a){a=a|0;aa(58,a|0)}function wV(a){a=a|0;aa(59,a|0)}function xV(a){a=a|0;aa(60,a|0)}function yV(a){a=a|0;aa(61,a|0)}function zV(a){a=a|0;aa(62,a|0)}function AV(a){a=a|0;aa(63,a|0)}function BV(a,b,c){a=a|0;b=b|0;c=c|0;rb[a&255](b|0,c|0)}function CV(a,b){a=a|0;b=b|0;ca(0,a|0,b|0)}function DV(a,b){a=a|0;b=b|0;ca(1,a|0,b|0)}function EV(a,b){a=a|0;b=b|0;ca(2,a|0,b|0)}function FV(a,b){a=a|0;b=b|0;ca(3,a|0,b|0)}function GV(a,b){a=a|0;b=b|0;ca(4,a|0,b|0)}function HV(a,b){a=a|0;b=b|0;ca(5,a|0,b|0)}function IV(a,b){a=a|0;b=b|0;ca(6,a|0,b|0)}function JV(a,b){a=a|0;b=b|0;ca(7,a|0,b|0)}function KV(a,b){a=a|0;b=b|0;ca(8,a|0,b|0)}function LV(a,b){a=a|0;b=b|0;ca(9,a|0,b|0)}function MV(a,b){a=a|0;b=b|0;ca(10,a|0,b|0)}function NV(a,b){a=a|0;b=b|0;ca(11,a|0,b|0)}function OV(a,b){a=a|0;b=b|0;ca(12,a|0,b|0)}function PV(a,b){a=a|0;b=b|0;ca(13,a|0,b|0)}function QV(a,b){a=a|0;b=b|0;ca(14,a|0,b|0)}function RV(a,b){a=a|0;b=b|0;ca(15,a|0,b|0)}function SV(a,b){a=a|0;b=b|0;ca(16,a|0,b|0)}function TV(a,b){a=a|0;b=b|0;ca(17,a|0,b|0)}function UV(a,b){a=a|0;b=b|0;ca(18,a|0,b|0)}function VV(a,b){a=a|0;b=b|0;ca(19,a|0,b|0)}function WV(a,b){a=a|0;b=b|0;ca(20,a|0,b|0)}function XV(a,b){a=a|0;b=b|0;ca(21,a|0,b|0)}function YV(a,b){a=a|0;b=b|0;ca(22,a|0,b|0)}function ZV(a,b){a=a|0;b=b|0;ca(23,a|0,b|0)}function _V(a,b){a=a|0;b=b|0;ca(24,a|0,b|0)}function $V(a,b){a=a|0;b=b|0;ca(25,a|0,b|0)}function aW(a,b){a=a|0;b=b|0;ca(26,a|0,b|0)}function bW(a,b){a=a|0;b=b|0;ca(27,a|0,b|0)}function cW(a,b){a=a|0;b=b|0;ca(28,a|0,b|0)}function dW(a,b){a=a|0;b=b|0;ca(29,a|0,b|0)}function eW(a,b){a=a|0;b=b|0;ca(30,a|0,b|0)}function fW(a,b){a=a|0;b=b|0;ca(31,a|0,b|0)}function gW(a,b){a=a|0;b=b|0;ca(32,a|0,b|0)}function hW(a,b){a=a|0;b=b|0;ca(33,a|0,b|0)}function iW(a,b){a=a|0;b=b|0;ca(34,a|0,b|0)}function jW(a,b){a=a|0;b=b|0;ca(35,a|0,b|0)}function kW(a,b){a=a|0;b=b|0;ca(36,a|0,b|0)}function lW(a,b){a=a|0;b=b|0;ca(37,a|0,b|0)}function mW(a,b){a=a|0;b=b|0;ca(38,a|0,b|0)}function nW(a,b){a=a|0;b=b|0;ca(39,a|0,b|0)}function oW(a,b){a=a|0;b=b|0;ca(40,a|0,b|0)}function pW(a,b){a=a|0;b=b|0;ca(41,a|0,b|0)}function qW(a,b){a=a|0;b=b|0;ca(42,a|0,b|0)}function rW(a,b){a=a|0;b=b|0;ca(43,a|0,b|0)}function sW(a,b){a=a|0;b=b|0;ca(44,a|0,b|0)}function tW(a,b){a=a|0;b=b|0;ca(45,a|0,b|0)}function uW(a,b){a=a|0;b=b|0;ca(46,a|0,b|0)}function vW(a,b){a=a|0;b=b|0;ca(47,a|0,b|0)}function wW(a,b){a=a|0;b=b|0;ca(48,a|0,b|0)}function xW(a,b){a=a|0;b=b|0;ca(49,a|0,b|0)}function yW(a,b){a=a|0;b=b|0;ca(50,a|0,b|0)}function zW(a,b){a=a|0;b=b|0;ca(51,a|0,b|0)}function AW(a,b){a=a|0;b=b|0;ca(52,a|0,b|0)}function BW(a,b){a=a|0;b=b|0;ca(53,a|0,b|0)}function CW(a,b){a=a|0;b=b|0;ca(54,a|0,b|0)}function DW(a,b){a=a|0;b=b|0;ca(55,a|0,b|0)}function EW(a,b){a=a|0;b=b|0;ca(56,a|0,b|0)}function FW(a,b){a=a|0;b=b|0;ca(57,a|0,b|0)}function GW(a,b){a=a|0;b=b|0;ca(58,a|0,b|0)}function HW(a,b){a=a|0;b=b|0;ca(59,a|0,b|0)}function IW(a,b){a=a|0;b=b|0;ca(60,a|0,b|0)}function JW(a,b){a=a|0;b=b|0;ca(61,a|0,b|0)}function KW(a,b){a=a|0;b=b|0;ca(62,a|0,b|0)}function LW(a,b){a=a|0;b=b|0;ca(63,a|0,b|0)}function MW(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return sb[a&255](b|0,c|0,d|0,e|0,f|0,g|0)|0}function NW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(0,a|0,b|0,c|0,d|0,e|0,f|0)|0}function OW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(1,a|0,b|0,c|0,d|0,e|0,f|0)|0}function PW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(2,a|0,b|0,c|0,d|0,e|0,f|0)|0}function QW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(3,a|0,b|0,c|0,d|0,e|0,f|0)|0}function RW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(4,a|0,b|0,c|0,d|0,e|0,f|0)|0}function SW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(5,a|0,b|0,c|0,d|0,e|0,f|0)|0}function TW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(6,a|0,b|0,c|0,d|0,e|0,f|0)|0}function UW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(7,a|0,b|0,c|0,d|0,e|0,f|0)|0}function VW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(8,a|0,b|0,c|0,d|0,e|0,f|0)|0}function WW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(9,a|0,b|0,c|0,d|0,e|0,f|0)|0}function XW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(10,a|0,b|0,c|0,d|0,e|0,f|0)|0}function YW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(11,a|0,b|0,c|0,d|0,e|0,f|0)|0}function ZW(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(12,a|0,b|0,c|0,d|0,e|0,f|0)|0}function _W(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(13,a|0,b|0,c|0,d|0,e|0,f|0)|0}function $W(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(14,a|0,b|0,c|0,d|0,e|0,f|0)|0}function aX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(15,a|0,b|0,c|0,d|0,e|0,f|0)|0}function bX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(16,a|0,b|0,c|0,d|0,e|0,f|0)|0}function cX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(17,a|0,b|0,c|0,d|0,e|0,f|0)|0}function dX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(18,a|0,b|0,c|0,d|0,e|0,f|0)|0}function eX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(19,a|0,b|0,c|0,d|0,e|0,f|0)|0}function fX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(20,a|0,b|0,c|0,d|0,e|0,f|0)|0}function gX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(21,a|0,b|0,c|0,d|0,e|0,f|0)|0}function hX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(22,a|0,b|0,c|0,d|0,e|0,f|0)|0}function iX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(23,a|0,b|0,c|0,d|0,e|0,f|0)|0}function jX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(24,a|0,b|0,c|0,d|0,e|0,f|0)|0}function kX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(25,a|0,b|0,c|0,d|0,e|0,f|0)|0}function lX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(26,a|0,b|0,c|0,d|0,e|0,f|0)|0}function mX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(27,a|0,b|0,c|0,d|0,e|0,f|0)|0}function nX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(28,a|0,b|0,c|0,d|0,e|0,f|0)|0}function oX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(29,a|0,b|0,c|0,d|0,e|0,f|0)|0}function pX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(30,a|0,b|0,c|0,d|0,e|0,f|0)|0}function qX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(31,a|0,b|0,c|0,d|0,e|0,f|0)|0}function rX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(32,a|0,b|0,c|0,d|0,e|0,f|0)|0}function sX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(33,a|0,b|0,c|0,d|0,e|0,f|0)|0}function tX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(34,a|0,b|0,c|0,d|0,e|0,f|0)|0}function uX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(35,a|0,b|0,c|0,d|0,e|0,f|0)|0}function vX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(36,a|0,b|0,c|0,d|0,e|0,f|0)|0}function wX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(37,a|0,b|0,c|0,d|0,e|0,f|0)|0}function xX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(38,a|0,b|0,c|0,d|0,e|0,f|0)|0}function yX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(39,a|0,b|0,c|0,d|0,e|0,f|0)|0}function zX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(40,a|0,b|0,c|0,d|0,e|0,f|0)|0}function AX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(41,a|0,b|0,c|0,d|0,e|0,f|0)|0}function BX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(42,a|0,b|0,c|0,d|0,e|0,f|0)|0}function CX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(43,a|0,b|0,c|0,d|0,e|0,f|0)|0}function DX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(44,a|0,b|0,c|0,d|0,e|0,f|0)|0}function EX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(45,a|0,b|0,c|0,d|0,e|0,f|0)|0}function FX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(46,a|0,b|0,c|0,d|0,e|0,f|0)|0}function GX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(47,a|0,b|0,c|0,d|0,e|0,f|0)|0}function HX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(48,a|0,b|0,c|0,d|0,e|0,f|0)|0}function IX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(49,a|0,b|0,c|0,d|0,e|0,f|0)|0}function JX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(50,a|0,b|0,c|0,d|0,e|0,f|0)|0}function KX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(51,a|0,b|0,c|0,d|0,e|0,f|0)|0}function LX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(52,a|0,b|0,c|0,d|0,e|0,f|0)|0}function MX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(53,a|0,b|0,c|0,d|0,e|0,f|0)|0}function NX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(54,a|0,b|0,c|0,d|0,e|0,f|0)|0}function OX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(55,a|0,b|0,c|0,d|0,e|0,f|0)|0}function PX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(56,a|0,b|0,c|0,d|0,e|0,f|0)|0}function QX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(57,a|0,b|0,c|0,d|0,e|0,f|0)|0}function RX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(58,a|0,b|0,c|0,d|0,e|0,f|0)|0}function SX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(59,a|0,b|0,c|0,d|0,e|0,f|0)|0}function TX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(60,a|0,b|0,c|0,d|0,e|0,f|0)|0}function UX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(61,a|0,b|0,c|0,d|0,e|0,f|0)|0}function VX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(62,a|0,b|0,c|0,d|0,e|0,f|0)|0}function WX(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return ea(63,a|0,b|0,c|0,d|0,e|0,f|0)|0}function XX(a,b){a=a|0;b=b|0;return tb[a&255](b|0)|0}function YX(a){a=a|0;return ga(0,a|0)|0}function ZX(a){a=a|0;return ga(1,a|0)|0}function _X(a){a=a|0;return ga(2,a|0)|0}function $X(a){a=a|0;return ga(3,a|0)|0}function aY(a){a=a|0;return ga(4,a|0)|0}function bY(a){a=a|0;return ga(5,a|0)|0}function cY(a){a=a|0;return ga(6,a|0)|0}function dY(a){a=a|0;return ga(7,a|0)|0}function eY(a){a=a|0;return ga(8,a|0)|0}function fY(a){a=a|0;return ga(9,a|0)|0}function gY(a){a=a|0;return ga(10,a|0)|0}function hY(a){a=a|0;return ga(11,a|0)|0}function iY(a){a=a|0;return ga(12,a|0)|0}function jY(a){a=a|0;return ga(13,a|0)|0}function kY(a){a=a|0;return ga(14,a|0)|0}function lY(a){a=a|0;return ga(15,a|0)|0}function mY(a){a=a|0;return ga(16,a|0)|0}function nY(a){a=a|0;return ga(17,a|0)|0}function oY(a){a=a|0;return ga(18,a|0)|0}function pY(a){a=a|0;return ga(19,a|0)|0}function qY(a){a=a|0;return ga(20,a|0)|0}function rY(a){a=a|0;return ga(21,a|0)|0}function sY(a){a=a|0;return ga(22,a|0)|0}function tY(a){a=a|0;return ga(23,a|0)|0}function uY(a){a=a|0;return ga(24,a|0)|0}function vY(a){a=a|0;return ga(25,a|0)|0}function wY(a){a=a|0;return ga(26,a|0)|0}function xY(a){a=a|0;return ga(27,a|0)|0}function yY(a){a=a|0;return ga(28,a|0)|0}function zY(a){a=a|0;return ga(29,a|0)|0}function AY(a){a=a|0;return ga(30,a|0)|0}function BY(a){a=a|0;return ga(31,a|0)|0}function CY(a){a=a|0;return ga(32,a|0)|0}function DY(a){a=a|0;return ga(33,a|0)|0}function EY(a){a=a|0;return ga(34,a|0)|0}function FY(a){a=a|0;return ga(35,a|0)|0}function GY(a){a=a|0;return ga(36,a|0)|0}function HY(a){a=a|0;return ga(37,a|0)|0}function IY(a){a=a|0;return ga(38,a|0)|0}function JY(a){a=a|0;return ga(39,a|0)|0}function KY(a){a=a|0;return ga(40,a|0)|0}function LY(a){a=a|0;return ga(41,a|0)|0}function MY(a){a=a|0;return ga(42,a|0)|0}function NY(a){a=a|0;return ga(43,a|0)|0}function OY(a){a=a|0;return ga(44,a|0)|0}function PY(a){a=a|0;return ga(45,a|0)|0}function QY(a){a=a|0;return ga(46,a|0)|0}function RY(a){a=a|0;return ga(47,a|0)|0}function SY(a){a=a|0;return ga(48,a|0)|0}function TY(a){a=a|0;return ga(49,a|0)|0}function UY(a){a=a|0;return ga(50,a|0)|0}function VY(a){a=a|0;return ga(51,a|0)|0}function WY(a){a=a|0;return ga(52,a|0)|0}function XY(a){a=a|0;return ga(53,a|0)|0}function YY(a){a=a|0;return ga(54,a|0)|0}function ZY(a){a=a|0;return ga(55,a|0)|0}function _Y(a){a=a|0;return ga(56,a|0)|0}function $Y(a){a=a|0;return ga(57,a|0)|0}function aZ(a){a=a|0;return ga(58,a|0)|0}function bZ(a){a=a|0;return ga(59,a|0)|0}function cZ(a){a=a|0;return ga(60,a|0)|0}function dZ(a){a=a|0;return ga(61,a|0)|0}function eZ(a){a=a|0;return ga(62,a|0)|0}function fZ(a){a=a|0;return ga(63,a|0)|0}function gZ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ub[a&255](b|0,c|0,d|0)}function hZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(0,a|0,b|0,c|0)}function iZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(1,a|0,b|0,c|0)}function jZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(2,a|0,b|0,c|0)}function kZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(3,a|0,b|0,c|0)}function lZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(4,a|0,b|0,c|0)}function mZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(5,a|0,b|0,c|0)}function nZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(6,a|0,b|0,c|0)}function oZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(7,a|0,b|0,c|0)}function pZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(8,a|0,b|0,c|0)}function qZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(9,a|0,b|0,c|0)}function rZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(10,a|0,b|0,c|0)}function sZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(11,a|0,b|0,c|0)}function tZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(12,a|0,b|0,c|0)}function uZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(13,a|0,b|0,c|0)}function vZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(14,a|0,b|0,c|0)}function wZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(15,a|0,b|0,c|0)}function xZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(16,a|0,b|0,c|0)}function yZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(17,a|0,b|0,c|0)}function zZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(18,a|0,b|0,c|0)}function AZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(19,a|0,b|0,c|0)}function BZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(20,a|0,b|0,c|0)}function CZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(21,a|0,b|0,c|0)}function DZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(22,a|0,b|0,c|0)}function EZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(23,a|0,b|0,c|0)}function FZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(24,a|0,b|0,c|0)}function GZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(25,a|0,b|0,c|0)}function HZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(26,a|0,b|0,c|0)}function IZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(27,a|0,b|0,c|0)}function JZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(28,a|0,b|0,c|0)}function KZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(29,a|0,b|0,c|0)}function LZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(30,a|0,b|0,c|0)}function MZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(31,a|0,b|0,c|0)}function NZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(32,a|0,b|0,c|0)}function OZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(33,a|0,b|0,c|0)}function PZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(34,a|0,b|0,c|0)}function QZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(35,a|0,b|0,c|0)}function RZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(36,a|0,b|0,c|0)}function SZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(37,a|0,b|0,c|0)}function TZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(38,a|0,b|0,c|0)}function UZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(39,a|0,b|0,c|0)}function VZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(40,a|0,b|0,c|0)}function WZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(41,a|0,b|0,c|0)}function XZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(42,a|0,b|0,c|0)}function YZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(43,a|0,b|0,c|0)}function ZZ(a,b,c){a=a|0;b=b|0;c=c|0;ia(44,a|0,b|0,c|0)}function _Z(a,b,c){a=a|0;b=b|0;c=c|0;ia(45,a|0,b|0,c|0)}function $Z(a,b,c){a=a|0;b=b|0;c=c|0;ia(46,a|0,b|0,c|0)}function a_(a,b,c){a=a|0;b=b|0;c=c|0;ia(47,a|0,b|0,c|0)}function b_(a,b,c){a=a|0;b=b|0;c=c|0;ia(48,a|0,b|0,c|0)}function c_(a,b,c){a=a|0;b=b|0;c=c|0;ia(49,a|0,b|0,c|0)}function d_(a,b,c){a=a|0;b=b|0;c=c|0;ia(50,a|0,b|0,c|0)}function e_(a,b,c){a=a|0;b=b|0;c=c|0;ia(51,a|0,b|0,c|0)}function f_(a,b,c){a=a|0;b=b|0;c=c|0;ia(52,a|0,b|0,c|0)}function g_(a,b,c){a=a|0;b=b|0;c=c|0;ia(53,a|0,b|0,c|0)}function h_(a,b,c){a=a|0;b=b|0;c=c|0;ia(54,a|0,b|0,c|0)}function i_(a,b,c){a=a|0;b=b|0;c=c|0;ia(55,a|0,b|0,c|0)}function j_(a,b,c){a=a|0;b=b|0;c=c|0;ia(56,a|0,b|0,c|0)}function k_(a,b,c){a=a|0;b=b|0;c=c|0;ia(57,a|0,b|0,c|0)}function l_(a,b,c){a=a|0;b=b|0;c=c|0;ia(58,a|0,b|0,c|0)}function m_(a,b,c){a=a|0;b=b|0;c=c|0;ia(59,a|0,b|0,c|0)}function n_(a,b,c){a=a|0;b=b|0;c=c|0;ia(60,a|0,b|0,c|0)}function o_(a,b,c){a=a|0;b=b|0;c=c|0;ia(61,a|0,b|0,c|0)}function p_(a,b,c){a=a|0;b=b|0;c=c|0;ia(62,a|0,b|0,c|0)}function q_(a,b,c){a=a|0;b=b|0;c=c|0;ia(63,a|0,b|0,c|0)}function r_(a){a=a|0;vb[a&255]()}function s_(){ka(0)}function t_(){ka(1)}function u_(){ka(2)}function v_(){ka(3)}function w_(){ka(4)}function x_(){ka(5)}function y_(){ka(6)}function z_(){ka(7)}function A_(){ka(8)}function B_(){ka(9)}function C_(){ka(10)}function D_(){ka(11)}function E_(){ka(12)}function F_(){ka(13)}function G_(){ka(14)}function H_(){ka(15)}function I_(){ka(16)}function J_(){ka(17)}function K_(){ka(18)}function L_(){ka(19)}function M_(){ka(20)}function N_(){ka(21)}function O_(){ka(22)}function P_(){ka(23)}function Q_(){ka(24)}function R_(){ka(25)}function S_(){ka(26)}function T_(){ka(27)}function U_(){ka(28)}function V_(){ka(29)}function W_(){ka(30)}function X_(){ka(31)}function Y_(){ka(32)}function Z_(){ka(33)}function __(){ka(34)}function $_(){ka(35)}function a$(){ka(36)}function b$(){ka(37)}function c$(){ka(38)}function d$(){ka(39)}function e$(){ka(40)}function f$(){ka(41)}function g$(){ka(42)}function h$(){ka(43)}function i$(){ka(44)}function j$(){ka(45)}function k$(){ka(46)}function l$(){ka(47)}function m$(){ka(48)}function n$(){ka(49)}function o$(){ka(50)}function p$(){ka(51)}function q$(){ka(52)}function r$(){ka(53)}function s$(){ka(54)}function t$(){ka(55)}function u$(){ka(56)}function v$(){ka(57)}function w$(){ka(58)}function x$(){ka(59)}function y$(){ka(60)}function z$(){ka(61)}function A$(){ka(62)}function B$(){ka(63)}function C$(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wb[a&255](b|0,c|0,d|0,e|0)|0}function D$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(0,a|0,b|0,c|0,d|0)|0}function E$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(1,a|0,b|0,c|0,d|0)|0}function F$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(2,a|0,b|0,c|0,d|0)|0}function G$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(3,a|0,b|0,c|0,d|0)|0}function H$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(4,a|0,b|0,c|0,d|0)|0}function I$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(5,a|0,b|0,c|0,d|0)|0}function J$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(6,a|0,b|0,c|0,d|0)|0}function K$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(7,a|0,b|0,c|0,d|0)|0}function L$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(8,a|0,b|0,c|0,d|0)|0}function M$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(9,a|0,b|0,c|0,d|0)|0}function N$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(10,a|0,b|0,c|0,d|0)|0}function O$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(11,a|0,b|0,c|0,d|0)|0}function P$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(12,a|0,b|0,c|0,d|0)|0}function Q$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(13,a|0,b|0,c|0,d|0)|0}function R$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(14,a|0,b|0,c|0,d|0)|0}function S$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(15,a|0,b|0,c|0,d|0)|0}function T$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(16,a|0,b|0,c|0,d|0)|0}function U$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(17,a|0,b|0,c|0,d|0)|0}function V$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(18,a|0,b|0,c|0,d|0)|0}function W$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(19,a|0,b|0,c|0,d|0)|0}function X$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(20,a|0,b|0,c|0,d|0)|0}function Y$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(21,a|0,b|0,c|0,d|0)|0}function Z$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(22,a|0,b|0,c|0,d|0)|0}function _$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(23,a|0,b|0,c|0,d|0)|0}function $$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(24,a|0,b|0,c|0,d|0)|0}function a0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(25,a|0,b|0,c|0,d|0)|0}function b0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(26,a|0,b|0,c|0,d|0)|0}function c0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(27,a|0,b|0,c|0,d|0)|0}function d0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(28,a|0,b|0,c|0,d|0)|0}function e0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(29,a|0,b|0,c|0,d|0)|0}function f0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(30,a|0,b|0,c|0,d|0)|0}function g0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(31,a|0,b|0,c|0,d|0)|0}function h0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(32,a|0,b|0,c|0,d|0)|0}function i0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(33,a|0,b|0,c|0,d|0)|0}function j0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(34,a|0,b|0,c|0,d|0)|0}function k0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(35,a|0,b|0,c|0,d|0)|0}function l0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(36,a|0,b|0,c|0,d|0)|0}function m0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(37,a|0,b|0,c|0,d|0)|0}function n0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(38,a|0,b|0,c|0,d|0)|0}function o0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(39,a|0,b|0,c|0,d|0)|0}function p0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(40,a|0,b|0,c|0,d|0)|0}function q0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(41,a|0,b|0,c|0,d|0)|0}function r0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(42,a|0,b|0,c|0,d|0)|0}function s0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(43,a|0,b|0,c|0,d|0)|0}function t0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(44,a|0,b|0,c|0,d|0)|0}function u0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(45,a|0,b|0,c|0,d|0)|0}function v0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(46,a|0,b|0,c|0,d|0)|0}function w0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(47,a|0,b|0,c|0,d|0)|0}function x0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(48,a|0,b|0,c|0,d|0)|0}function y0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(49,a|0,b|0,c|0,d|0)|0}function z0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(50,a|0,b|0,c|0,d|0)|0}function A0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(51,a|0,b|0,c|0,d|0)|0}function B0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(52,a|0,b|0,c|0,d|0)|0}function C0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(53,a|0,b|0,c|0,d|0)|0}function D0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(54,a|0,b|0,c|0,d|0)|0}function E0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(55,a|0,b|0,c|0,d|0)|0}function F0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(56,a|0,b|0,c|0,d|0)|0}function G0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(57,a|0,b|0,c|0,d|0)|0}function H0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(58,a|0,b|0,c|0,d|0)|0}function I0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(59,a|0,b|0,c|0,d|0)|0}function J0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(60,a|0,b|0,c|0,d|0)|0}function K0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(61,a|0,b|0,c|0,d|0)|0}function L0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(62,a|0,b|0,c|0,d|0)|0}function M0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ma(63,a|0,b|0,c|0,d|0)|0}function N0(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;xb[a&255](b|0,c|0,d|0,e|0,f|0,g|0)}function O0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(0,a|0,b|0,c|0,d|0,e|0,f|0)}function P0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(1,a|0,b|0,c|0,d|0,e|0,f|0)}function Q0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(2,a|0,b|0,c|0,d|0,e|0,f|0)}function R0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(3,a|0,b|0,c|0,d|0,e|0,f|0)}function S0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(4,a|0,b|0,c|0,d|0,e|0,f|0)}function T0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(5,a|0,b|0,c|0,d|0,e|0,f|0)}function U0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(6,a|0,b|0,c|0,d|0,e|0,f|0)}function V0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(7,a|0,b|0,c|0,d|0,e|0,f|0)}function W0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(8,a|0,b|0,c|0,d|0,e|0,f|0)}function X0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(9,a|0,b|0,c|0,d|0,e|0,f|0)}function Y0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(10,a|0,b|0,c|0,d|0,e|0,f|0)}function Z0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(11,a|0,b|0,c|0,d|0,e|0,f|0)}function _0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(12,a|0,b|0,c|0,d|0,e|0,f|0)}function $0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(13,a|0,b|0,c|0,d|0,e|0,f|0)}function a1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(14,a|0,b|0,c|0,d|0,e|0,f|0)}function b1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(15,a|0,b|0,c|0,d|0,e|0,f|0)}function c1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(16,a|0,b|0,c|0,d|0,e|0,f|0)}function d1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(17,a|0,b|0,c|0,d|0,e|0,f|0)}function e1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(18,a|0,b|0,c|0,d|0,e|0,f|0)}function f1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(19,a|0,b|0,c|0,d|0,e|0,f|0)}function g1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(20,a|0,b|0,c|0,d|0,e|0,f|0)}function h1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(21,a|0,b|0,c|0,d|0,e|0,f|0)}function i1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(22,a|0,b|0,c|0,d|0,e|0,f|0)}function j1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(23,a|0,b|0,c|0,d|0,e|0,f|0)}function k1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(24,a|0,b|0,c|0,d|0,e|0,f|0)}function l1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(25,a|0,b|0,c|0,d|0,e|0,f|0)}function m1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(26,a|0,b|0,c|0,d|0,e|0,f|0)}function n1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(27,a|0,b|0,c|0,d|0,e|0,f|0)}function o1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(28,a|0,b|0,c|0,d|0,e|0,f|0)}function p1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(29,a|0,b|0,c|0,d|0,e|0,f|0)}function q1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(30,a|0,b|0,c|0,d|0,e|0,f|0)}function r1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(31,a|0,b|0,c|0,d|0,e|0,f|0)}function s1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(32,a|0,b|0,c|0,d|0,e|0,f|0)}function t1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(33,a|0,b|0,c|0,d|0,e|0,f|0)}function u1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(34,a|0,b|0,c|0,d|0,e|0,f|0)}function v1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(35,a|0,b|0,c|0,d|0,e|0,f|0)}function w1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(36,a|0,b|0,c|0,d|0,e|0,f|0)}function x1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(37,a|0,b|0,c|0,d|0,e|0,f|0)}function y1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(38,a|0,b|0,c|0,d|0,e|0,f|0)}function z1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(39,a|0,b|0,c|0,d|0,e|0,f|0)}function A1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(40,a|0,b|0,c|0,d|0,e|0,f|0)}function B1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(41,a|0,b|0,c|0,d|0,e|0,f|0)}function C1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(42,a|0,b|0,c|0,d|0,e|0,f|0)}function D1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(43,a|0,b|0,c|0,d|0,e|0,f|0)}function E1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(44,a|0,b|0,c|0,d|0,e|0,f|0)}function F1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(45,a|0,b|0,c|0,d|0,e|0,f|0)}function G1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(46,a|0,b|0,c|0,d|0,e|0,f|0)}function H1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(47,a|0,b|0,c|0,d|0,e|0,f|0)}function I1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(48,a|0,b|0,c|0,d|0,e|0,f|0)}function J1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(49,a|0,b|0,c|0,d|0,e|0,f|0)}function K1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(50,a|0,b|0,c|0,d|0,e|0,f|0)}function L1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(51,a|0,b|0,c|0,d|0,e|0,f|0)}function M1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(52,a|0,b|0,c|0,d|0,e|0,f|0)}function N1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(53,a|0,b|0,c|0,d|0,e|0,f|0)}function O1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(54,a|0,b|0,c|0,d|0,e|0,f|0)}function P1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(55,a|0,b|0,c|0,d|0,e|0,f|0)}function Q1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(56,a|0,b|0,c|0,d|0,e|0,f|0)}function R1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(57,a|0,b|0,c|0,d|0,e|0,f|0)}function S1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(58,a|0,b|0,c|0,d|0,e|0,f|0)}function T1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(59,a|0,b|0,c|0,d|0,e|0,f|0)}function U1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(60,a|0,b|0,c|0,d|0,e|0,f|0)}function V1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(61,a|0,b|0,c|0,d|0,e|0,f|0)}function W1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(62,a|0,b|0,c|0,d|0,e|0,f|0)}function X1(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;oa(63,a|0,b|0,c|0,d|0,e|0,f|0)}function Y1(a,b,c){a=a|0;b=b|0;c=c|0;return yb[a&255](b|0,c|0)|0}function Z1(a,b){a=a|0;b=b|0;return qa(0,a|0,b|0)|0}function _1(a,b){a=a|0;b=b|0;return qa(1,a|0,b|0)|0}function $1(a,b){a=a|0;b=b|0;return qa(2,a|0,b|0)|0}function a2(a,b){a=a|0;b=b|0;return qa(3,a|0,b|0)|0}function b2(a,b){a=a|0;b=b|0;return qa(4,a|0,b|0)|0}function c2(a,b){a=a|0;b=b|0;return qa(5,a|0,b|0)|0}function d2(a,b){a=a|0;b=b|0;return qa(6,a|0,b|0)|0}function e2(a,b){a=a|0;b=b|0;return qa(7,a|0,b|0)|0}function f2(a,b){a=a|0;b=b|0;return qa(8,a|0,b|0)|0}function g2(a,b){a=a|0;b=b|0;return qa(9,a|0,b|0)|0}function h2(a,b){a=a|0;b=b|0;return qa(10,a|0,b|0)|0}function i2(a,b){a=a|0;b=b|0;return qa(11,a|0,b|0)|0}function j2(a,b){a=a|0;b=b|0;return qa(12,a|0,b|0)|0}function k2(a,b){a=a|0;b=b|0;return qa(13,a|0,b|0)|0}function l2(a,b){a=a|0;b=b|0;return qa(14,a|0,b|0)|0}function m2(a,b){a=a|0;b=b|0;return qa(15,a|0,b|0)|0}function n2(a,b){a=a|0;b=b|0;return qa(16,a|0,b|0)|0}function o2(a,b){a=a|0;b=b|0;return qa(17,a|0,b|0)|0}function p2(a,b){a=a|0;b=b|0;return qa(18,a|0,b|0)|0}function q2(a,b){a=a|0;b=b|0;return qa(19,a|0,b|0)|0}function r2(a,b){a=a|0;b=b|0;return qa(20,a|0,b|0)|0}function s2(a,b){a=a|0;b=b|0;return qa(21,a|0,b|0)|0}function t2(a,b){a=a|0;b=b|0;return qa(22,a|0,b|0)|0}function u2(a,b){a=a|0;b=b|0;return qa(23,a|0,b|0)|0}function v2(a,b){a=a|0;b=b|0;return qa(24,a|0,b|0)|0}function w2(a,b){a=a|0;b=b|0;return qa(25,a|0,b|0)|0}function x2(a,b){a=a|0;b=b|0;return qa(26,a|0,b|0)|0}function y2(a,b){a=a|0;b=b|0;return qa(27,a|0,b|0)|0}function z2(a,b){a=a|0;b=b|0;return qa(28,a|0,b|0)|0}function A2(a,b){a=a|0;b=b|0;return qa(29,a|0,b|0)|0}function B2(a,b){a=a|0;b=b|0;return qa(30,a|0,b|0)|0}function C2(a,b){a=a|0;b=b|0;return qa(31,a|0,b|0)|0}function D2(a,b){a=a|0;b=b|0;return qa(32,a|0,b|0)|0}function E2(a,b){a=a|0;b=b|0;return qa(33,a|0,b|0)|0}function F2(a,b){a=a|0;b=b|0;return qa(34,a|0,b|0)|0}function G2(a,b){a=a|0;b=b|0;return qa(35,a|0,b|0)|0}function H2(a,b){a=a|0;b=b|0;return qa(36,a|0,b|0)|0}function I2(a,b){a=a|0;b=b|0;return qa(37,a|0,b|0)|0}function J2(a,b){a=a|0;b=b|0;return qa(38,a|0,b|0)|0}function K2(a,b){a=a|0;b=b|0;return qa(39,a|0,b|0)|0}function L2(a,b){a=a|0;b=b|0;return qa(40,a|0,b|0)|0}function M2(a,b){a=a|0;b=b|0;return qa(41,a|0,b|0)|0}function N2(a,b){a=a|0;b=b|0;return qa(42,a|0,b|0)|0}function O2(a,b){a=a|0;b=b|0;return qa(43,a|0,b|0)|0}function P2(a,b){a=a|0;b=b|0;return qa(44,a|0,b|0)|0}function Q2(a,b){a=a|0;b=b|0;return qa(45,a|0,b|0)|0}function R2(a,b){a=a|0;b=b|0;return qa(46,a|0,b|0)|0}function S2(a,b){a=a|0;b=b|0;return qa(47,a|0,b|0)|0}function T2(a,b){a=a|0;b=b|0;return qa(48,a|0,b|0)|0}function U2(a,b){a=a|0;b=b|0;return qa(49,a|0,b|0)|0}function V2(a,b){a=a|0;b=b|0;return qa(50,a|0,b|0)|0}function W2(a,b){a=a|0;b=b|0;return qa(51,a|0,b|0)|0}function X2(a,b){a=a|0;b=b|0;return qa(52,a|0,b|0)|0}function Y2(a,b){a=a|0;b=b|0;return qa(53,a|0,b|0)|0}function Z2(a,b){a=a|0;b=b|0;return qa(54,a|0,b|0)|0}function _2(a,b){a=a|0;b=b|0;return qa(55,a|0,b|0)|0}function $2(a,b){a=a|0;b=b|0;return qa(56,a|0,b|0)|0}function a3(a,b){a=a|0;b=b|0;return qa(57,a|0,b|0)|0}function b3(a,b){a=a|0;b=b|0;return qa(58,a|0,b|0)|0}function c3(a,b){a=a|0;b=b|0;return qa(59,a|0,b|0)|0}function d3(a,b){a=a|0;b=b|0;return qa(60,a|0,b|0)|0}function e3(a,b){a=a|0;b=b|0;return qa(61,a|0,b|0)|0}function f3(a,b){a=a|0;b=b|0;return qa(62,a|0,b|0)|0}function g3(a,b){a=a|0;b=b|0;return qa(63,a|0,b|0)|0}function h3(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return zb[a&255](b|0,c|0,d|0,e|0,f|0)|0}function i3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(0,a|0,b|0,c|0,d|0,e|0)|0}function j3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(1,a|0,b|0,c|0,d|0,e|0)|0}function k3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(2,a|0,b|0,c|0,d|0,e|0)|0}function l3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(3,a|0,b|0,c|0,d|0,e|0)|0}function m3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(4,a|0,b|0,c|0,d|0,e|0)|0}function n3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(5,a|0,b|0,c|0,d|0,e|0)|0}function o3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(6,a|0,b|0,c|0,d|0,e|0)|0}function p3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(7,a|0,b|0,c|0,d|0,e|0)|0}function q3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(8,a|0,b|0,c|0,d|0,e|0)|0}function r3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(9,a|0,b|0,c|0,d|0,e|0)|0}function s3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(10,a|0,b|0,c|0,d|0,e|0)|0}function t3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(11,a|0,b|0,c|0,d|0,e|0)|0}function u3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(12,a|0,b|0,c|0,d|0,e|0)|0}function v3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(13,a|0,b|0,c|0,d|0,e|0)|0}function w3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(14,a|0,b|0,c|0,d|0,e|0)|0}function x3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(15,a|0,b|0,c|0,d|0,e|0)|0}function y3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(16,a|0,b|0,c|0,d|0,e|0)|0}function z3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(17,a|0,b|0,c|0,d|0,e|0)|0}function A3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(18,a|0,b|0,c|0,d|0,e|0)|0}function B3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(19,a|0,b|0,c|0,d|0,e|0)|0}function C3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(20,a|0,b|0,c|0,d|0,e|0)|0}function D3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(21,a|0,b|0,c|0,d|0,e|0)|0}function E3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(22,a|0,b|0,c|0,d|0,e|0)|0}function F3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(23,a|0,b|0,c|0,d|0,e|0)|0}function G3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(24,a|0,b|0,c|0,d|0,e|0)|0}function H3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(25,a|0,b|0,c|0,d|0,e|0)|0}function I3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(26,a|0,b|0,c|0,d|0,e|0)|0}function J3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(27,a|0,b|0,c|0,d|0,e|0)|0}function K3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(28,a|0,b|0,c|0,d|0,e|0)|0}function L3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(29,a|0,b|0,c|0,d|0,e|0)|0}function M3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(30,a|0,b|0,c|0,d|0,e|0)|0}function N3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(31,a|0,b|0,c|0,d|0,e|0)|0}function O3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(32,a|0,b|0,c|0,d|0,e|0)|0}function P3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(33,a|0,b|0,c|0,d|0,e|0)|0}function Q3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(34,a|0,b|0,c|0,d|0,e|0)|0}function R3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(35,a|0,b|0,c|0,d|0,e|0)|0}function S3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(36,a|0,b|0,c|0,d|0,e|0)|0}function T3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(37,a|0,b|0,c|0,d|0,e|0)|0}function U3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(38,a|0,b|0,c|0,d|0,e|0)|0}function V3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(39,a|0,b|0,c|0,d|0,e|0)|0}function W3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(40,a|0,b|0,c|0,d|0,e|0)|0}function X3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(41,a|0,b|0,c|0,d|0,e|0)|0}function Y3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(42,a|0,b|0,c|0,d|0,e|0)|0}function Z3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(43,a|0,b|0,c|0,d|0,e|0)|0}function _3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(44,a|0,b|0,c|0,d|0,e|0)|0}function $3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(45,a|0,b|0,c|0,d|0,e|0)|0}function a4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(46,a|0,b|0,c|0,d|0,e|0)|0}function b4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(47,a|0,b|0,c|0,d|0,e|0)|0}function c4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(48,a|0,b|0,c|0,d|0,e|0)|0}function d4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(49,a|0,b|0,c|0,d|0,e|0)|0}function e4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(50,a|0,b|0,c|0,d|0,e|0)|0}function f4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(51,a|0,b|0,c|0,d|0,e|0)|0}function g4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(52,a|0,b|0,c|0,d|0,e|0)|0}function h4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(53,a|0,b|0,c|0,d|0,e|0)|0}function i4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(54,a|0,b|0,c|0,d|0,e|0)|0}function j4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(55,a|0,b|0,c|0,d|0,e|0)|0}function k4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(56,a|0,b|0,c|0,d|0,e|0)|0}function l4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(57,a|0,b|0,c|0,d|0,e|0)|0}function m4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(58,a|0,b|0,c|0,d|0,e|0)|0}function n4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(59,a|0,b|0,c|0,d|0,e|0)|0}function o4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(60,a|0,b|0,c|0,d|0,e|0)|0}function p4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(61,a|0,b|0,c|0,d|0,e|0)|0}function q4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(62,a|0,b|0,c|0,d|0,e|0)|0}function r4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return sa(63,a|0,b|0,c|0,d|0,e|0)|0}function s4(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Ab[a&255](b|0,c|0,d|0,e|0)}function t4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(0,a|0,b|0,c|0,d|0)}function u4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(1,a|0,b|0,c|0,d|0)}function v4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(2,a|0,b|0,c|0,d|0)}function w4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(3,a|0,b|0,c|0,d|0)}function x4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(4,a|0,b|0,c|0,d|0)}function y4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(5,a|0,b|0,c|0,d|0)}function z4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(6,a|0,b|0,c|0,d|0)}function A4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(7,a|0,b|0,c|0,d|0)}function B4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(8,a|0,b|0,c|0,d|0)}function C4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(9,a|0,b|0,c|0,d|0)}function D4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(10,a|0,b|0,c|0,d|0)}function E4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(11,a|0,b|0,c|0,d|0)}function F4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(12,a|0,b|0,c|0,d|0)}function G4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(13,a|0,b|0,c|0,d|0)}function H4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(14,a|0,b|0,c|0,d|0)}function I4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(15,a|0,b|0,c|0,d|0)}function J4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(16,a|0,b|0,c|0,d|0)}function K4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(17,a|0,b|0,c|0,d|0)}function L4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(18,a|0,b|0,c|0,d|0)}function M4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(19,a|0,b|0,c|0,d|0)}function N4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(20,a|0,b|0,c|0,d|0)}function O4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(21,a|0,b|0,c|0,d|0)}function P4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(22,a|0,b|0,c|0,d|0)}function Q4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(23,a|0,b|0,c|0,d|0)}function R4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(24,a|0,b|0,c|0,d|0)}function S4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(25,a|0,b|0,c|0,d|0)}function T4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(26,a|0,b|0,c|0,d|0)}function U4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(27,a|0,b|0,c|0,d|0)}function V4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(28,a|0,b|0,c|0,d|0)}function W4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(29,a|0,b|0,c|0,d|0)}function X4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(30,a|0,b|0,c|0,d|0)}function Y4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(31,a|0,b|0,c|0,d|0)}function Z4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(32,a|0,b|0,c|0,d|0)}function _4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(33,a|0,b|0,c|0,d|0)}function $4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(34,a|0,b|0,c|0,d|0)}function a5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(35,a|0,b|0,c|0,d|0)}function b5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(36,a|0,b|0,c|0,d|0)}function c5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(37,a|0,b|0,c|0,d|0)}function d5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(38,a|0,b|0,c|0,d|0)}function e5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(39,a|0,b|0,c|0,d|0)}function f5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(40,a|0,b|0,c|0,d|0)}function g5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(41,a|0,b|0,c|0,d|0)}function h5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(42,a|0,b|0,c|0,d|0)}function i5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(43,a|0,b|0,c|0,d|0)}function j5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(44,a|0,b|0,c|0,d|0)}function k5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(45,a|0,b|0,c|0,d|0)}function l5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(46,a|0,b|0,c|0,d|0)}function m5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(47,a|0,b|0,c|0,d|0)}function n5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(48,a|0,b|0,c|0,d|0)}function o5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(49,a|0,b|0,c|0,d|0)}function p5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(50,a|0,b|0,c|0,d|0)}function q5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(51,a|0,b|0,c|0,d|0)}function r5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(52,a|0,b|0,c|0,d|0)}function s5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(53,a|0,b|0,c|0,d|0)}function t5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(54,a|0,b|0,c|0,d|0)}function u5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(55,a|0,b|0,c|0,d|0)}function v5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(56,a|0,b|0,c|0,d|0)}function w5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(57,a|0,b|0,c|0,d|0)}function x5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(58,a|0,b|0,c|0,d|0)}function y5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(59,a|0,b|0,c|0,d|0)}function z5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(60,a|0,b|0,c|0,d|0)}function A5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(61,a|0,b|0,c|0,d|0)}function B5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(62,a|0,b|0,c|0,d|0)}function C5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ua(63,a|0,b|0,c|0,d|0)}function D5(a,b,c){a=a|0;b=b|0;c=c|0;S(0);return 0}function E5(){S(1);return 0}function F5(a){a=a|0;S(2)}function G5(a,b){a=a|0;b=b|0;S(3)}function H5(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;S(4);return 0}function I5(a){a=a|0;S(5);return 0}function J5(a,b,c){a=a|0;b=b|0;c=c|0;S(6)}function K5(){S(7)}function L5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;S(8);return 0}function M5(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;S(9)}function N5(a,b){a=a|0;b=b|0;S(10);return 0}function O5(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;S(11);return 0}function P5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;S(12)} + +// EMSCRIPTEN_END_FUNCS +var ob=[D5,D5,XR,D5,YR,D5,ZR,D5,_R,D5,$R,D5,aS,D5,bS,D5,cS,D5,dS,D5,eS,D5,fS,D5,gS,D5,hS,D5,iS,D5,jS,D5,kS,D5,lS,D5,mS,D5,nS,D5,oS,D5,pS,D5,qS,D5,rS,D5,sS,D5,tS,D5,uS,D5,vS,D5,wS,D5,xS,D5,yS,D5,zS,D5,AS,D5,BS,D5,CS,D5,DS,D5,ES,D5,FS,D5,GS,D5,HS,D5,IS,D5,JS,D5,KS,D5,LS,D5,MS,D5,NS,D5,OS,D5,PS,D5,QS,D5,RS,D5,SS,D5,TS,D5,US,D5,VS,D5,WS,D5,XS,D5,YS,D5,ZS,D5,_S,D5,$S,D5,aT,D5,bT,D5,cT,D5,dT,D5,eT,D5,be,ee,he,je,qe,we,Ke,$Q,kR,cR,bR,fR,eg,hg,Ul,XJ,xJ,aP,qP,FP,IP,XP,YP,hD,iD,jD,OM,KL,NL,KM,IM,SM,ZM,bQ,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,D5,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5,C5,P5,jg,Vc,Xc,ty,uy,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5,P5];return{_llvm_bswap_i32:NR,_sqlite3_value_blob:wi,_sqlite3_column_name:Hu,_sqlite3_reset:Er,_sqlite3_column_type:Ju,_sqlite3_exec:wu,stackSave:Cb,getTempRet0:Hb,_sqlite3_result_null:Ui,___udivdi3:PR,_sqlite3_step:Hr,_bitshift64Lshr:OR,_sqlite3_prepare_v2:Fu,_sqlite3_close_v2:SI,_sqlite3_open:YI,_bitshift64Shl:HR,_sqlite3_result_text:ci,_fflush:sR,_emscripten_get_global_libc:VP,_sqlite3_column_bytes:fI,_sqlite3_bind_int:oI,_sqlite3_bind_blob:kI,_llvm_cttz_i32:JR,_sbrk:SR,_sqlite3_value_double:mi,_memcpy:MR,_sqlite3_result_double:hi,_sqlite3_value_text:wh,___muldi3:RR,_sqlite3_changes:Ii,_sqlite3_column_blob:eI,___uremdi3:UR,___divdi3:LR,_sqlite3_value_type:fi,stackAlloc:Bb,_i64Subtract:FR,_sqlite3_column_text:Iu,___udivmoddi4:KR,setTempRet0:Gb,_i64Add:IR,_sqlite3_value_bytes:xh,_sqlite3_finalize:Qq,_sqlite3_column_double:gI,_sqlite3_create_function_v2:UI,_sqlite3_errmsg:Ku,_sqlite3_value_int:vi,_sqlite3_data_count:dI,_sqlite3_bind_text:rI,stackRestore:Db,_sqlite3_bind_double:nI,___errno_location:_P,___muldsi3:QR,_RegisterExtensionFunctions:Ib,_free:xR,runPostSets:ER,setThrew:Fb,establishStackSpace:Eb,_sqlite3_bind_parameter_index:vI,_sqlite3_free:Kd,_sqlite3_clear_bindings:Gr,_malloc:wR,_memalign:CR,_memmove:TR,___remdi3:VR,_memset:GR,stackAlloc:Bb,stackSave:Cb,stackRestore:Db,establishStackSpace:Eb,setThrew:Fb,setTempRet0:Gb,getTempRet0:Hb,dynCall_iiii:WR,dynCall_i:fT,dynCall_vi:qU,dynCall_vii:BV,dynCall_iiiiiii:MW,dynCall_ii:XX,dynCall_viii:gZ,dynCall_v:r_,dynCall_iiiii:C$,dynCall_viiiiii:N0,dynCall_iii:Y1,dynCall_iiiiii:h3,dynCall_viiii:s4}}) + + +// EMSCRIPTEN_END_ASM +(e.Ua,e.Va,buffer),Cc=e._llvm_bswap_i32=W._llvm_bswap_i32;e._sqlite3_value_blob=W._sqlite3_value_blob;e._sqlite3_column_name=W._sqlite3_column_name;e._sqlite3_reset=W._sqlite3_reset;e._sqlite3_column_type=W._sqlite3_column_type;e._sqlite3_exec=W._sqlite3_exec;e.stackSave=W.stackSave; +e.getTempRet0=W.getTempRet0;e._sqlite3_result_null=W._sqlite3_result_null;var Nc=e.___udivdi3=W.___udivdi3;e._sqlite3_step=W._sqlite3_step;var Jc=e._bitshift64Lshr=W._bitshift64Lshr;e._sqlite3_prepare_v2=W._sqlite3_prepare_v2;e._sqlite3_close_v2=W._sqlite3_close_v2;e._sqlite3_open=W._sqlite3_open;var uc=e._bitshift64Shl=W._bitshift64Shl;e._sqlite3_result_text=W._sqlite3_result_text;e._fflush=W._fflush;e._emscripten_get_global_libc=W._emscripten_get_global_libc;e._sqlite3_column_bytes=W._sqlite3_column_bytes; +e._sqlite3_bind_int=W._sqlite3_bind_int;e._sqlite3_bind_blob=W._sqlite3_bind_blob;var xc=e._llvm_cttz_i32=W._llvm_cttz_i32,Qc=e._sbrk=W._sbrk;e._sqlite3_value_double=W._sqlite3_value_double;var Bc=e._memcpy=W._memcpy;e._sqlite3_result_double=W._sqlite3_result_double;e._sqlite3_value_text=W._sqlite3_value_text;var Pc=e.___muldi3=W.___muldi3;e._sqlite3_changes=W._sqlite3_changes;e._sqlite3_column_blob=W._sqlite3_column_blob;var Sc=e.___uremdi3=W.___uremdi3,zc=e.___divdi3=W.___divdi3; +e._sqlite3_value_type=W._sqlite3_value_type;e.stackAlloc=W.stackAlloc;var hb=e._i64Subtract=W._i64Subtract;e._sqlite3_column_text=W._sqlite3_column_text;var yc=e.___udivmoddi4=W.___udivmoddi4;e.setTempRet0=W.setTempRet0;var vc=e._i64Add=W._i64Add;e._sqlite3_value_bytes=W._sqlite3_value_bytes;e._sqlite3_finalize=W._sqlite3_finalize;e._sqlite3_column_double=W._sqlite3_column_double;e._sqlite3_create_function_v2=W._sqlite3_create_function_v2;e._sqlite3_errmsg=W._sqlite3_errmsg;e._sqlite3_value_int=W._sqlite3_value_int; +e._sqlite3_data_count=W._sqlite3_data_count;e._sqlite3_bind_text=W._sqlite3_bind_text;e.stackRestore=W.stackRestore;e._sqlite3_bind_double=W._sqlite3_bind_double;e.___errno_location=W.___errno_location;var Oc=e.___muldsi3=W.___muldsi3;e._RegisterExtensionFunctions=W._RegisterExtensionFunctions;var Ja=e._free=W._free;e.runPostSets=W.runPostSets;e.setThrew=W.setThrew;e.establishStackSpace=W.establishStackSpace;e._sqlite3_bind_parameter_index=W._sqlite3_bind_parameter_index;e._sqlite3_free=W._sqlite3_free; +e._sqlite3_clear_bindings=W._sqlite3_clear_bindings;var Aa=e._malloc=W._malloc,Vc=e._memalign=W._memalign,Rc=e._memmove=W._memmove,Uc=e.___remdi3=W.___remdi3,tc=e._memset=W._memset;e.dynCall_iiii=W.dynCall_iiii;e.dynCall_i=W.dynCall_i;e.dynCall_vi=W.dynCall_vi;e.dynCall_vii=W.dynCall_vii;e.dynCall_iiiiiii=W.dynCall_iiiiiii;e.dynCall_ii=W.dynCall_ii;e.dynCall_viii=W.dynCall_viii;e.dynCall_v=W.dynCall_v;e.dynCall_iiiii=W.dynCall_iiiii;e.dynCall_viiiiii=W.dynCall_viiiiii;e.dynCall_iii=W.dynCall_iii; +e.dynCall_iiiiii=W.dynCall_iiiiii;e.dynCall_viiii=W.dynCall_viiii;n.D=e.stackAlloc;n.$=e.stackSave;n.Q=e.stackRestore;n.Yd=e.establishStackSpace;n.tb=e.setTempRet0;n.hb=e.getTempRet0;e.asm=W;function ha(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")"}ha.prototype=Error();ha.prototype.constructor=ha;var Wc=null,db=function Xc(){e.calledRun||Yc();e.calledRun||(db=Xc)}; +e.callMain=e.Wd=function(a){function b(){for(var a=0;3>a;a++)d.push(0)}a=a||[];Ca||(Ca=!0,Sa(Ua));var c=a.length+1,d=[z(C(e.thisProgram),"i8",0)];b();for(var f=0;fg;a=0<=g?++c:--c)f[a]=x[d+a];return f};a.prototype.get=function(a){var c,d,f;null!=a&&this.bind(a)&&this.step();f=[];a=c=0;for(d=ud(this.i);0<=d?cd;a=0<=d?++c:--c)switch(sd(this.i,a)){case X.Oa:case X.FLOAT:f.push(this.fb(a));break;case X.Qa:f.push(this.gb(a));break;case X.La:f.push(this.getBlob(a));break;default:f.push(null)}return f};a.prototype.getColumnNames= +function(){var a,c,d,f;f=[];a=c=0;for(d=ud(this.i);0<=d?cd;a=0<=d?++c:--c)f.push(qd(this.i,a));return f};a.prototype.getAsObject=function(a){var c,d,f,g,h,p;p=this.get(a);g=this.getColumnNames();h={};a=c=0;for(d=g.length;c>>0);null!=a&&nc("/",this.filename,a,!0,!0);this.handleError(yd(this.filename,Z));this.db=y(Z,"i32");cd(this.db);this.aa={}}a.prototype.run=function(a,c){var d;if(!this.db)throw"Database closed";c?(d=this.prepare(a,c),d.step(),d.free()):this.handleError(wd(this.db,a,0,0,Z));return this};a.prototype.exec=function(a){var c,d,f,g,h;if(!this.db)throw"Database closed";g=n.$();d=n.D(a.length<<3);$a(a,d);a=n.D(4);for(f=[];y(d, +"i8")!==bd;)if(sa(Z,0,"i32"),sa(a,0,"i32"),this.handleError(Ad(this.db,d,-1,Z,a)),c=y(Z,"i32"),d=y(a,"i32"),c!==bd){h=new dd(c,this);for(c=null;h.step();)null===c&&(c={columns:h.getColumnNames(),values:[]},f.push(c)),c.values.push(h.get());h.free()}n.Q(g);return f};a.prototype.each=function(a,c,d,f){"function"===typeof c&&(f=d,d=c,c=void 0);for(a=this.prepare(a,c);a.step();)d(a.getAsObject());a.free();if("function"===typeof f)return f()};a.prototype.prepare=function(a,c){var d,f;sa(Z,0,"i32");this.handleError(zd(this.db, +a,-1,Z,bd));d=y(Z,"i32");if(d===bd)throw"Nothing to prepare";f=new dd(d,this);null!=c&&f.bind(c);return this.aa[d]=f};a.prototype["export"]=function(){var a,c,d,f;d=this.aa;for(a in d)f=d[a],f.free();this.handleError(md(this.db));f=this.filename;a=a={encoding:"binary"};a.flags=a.flags||"r";a.encoding=a.encoding||"binary";if("utf8"!==a.encoding&&"binary"!==a.encoding)throw Error('Invalid encoding type "'+a.encoding+'"');d=dc(f,a.flags);f=Zb(f).size;var g=new Uint8Array(f);hc(d,g,0,f,0);"utf8"===a.encoding? +c=Fa(g,0):"binary"===a.encoding&&(c=g);fc(d);this.handleError(yd(this.filename,Z));this.db=y(Z,"i32");return c};a.prototype.close=function(){var a,c,d;c=this.aa;for(a in c)d=c[a],d.free();this.handleError(md(this.db));Yb("/"+this.filename);return this.db=null};a.prototype.handleError=function(a){if(a===X.OK)return null;a=vd(this.db);throw Error(a);};a.prototype.getRowsModified=function(){return kd(this.db)};a.prototype.create_function=function(a,c){var d;d=n.ua(function(a,b,d){var p,r,v,D,B;r=[]; +for(p=v=0;0<=b?vb;p=0<=b?++v:--v)D=y(d+4*p,"i32"),B=Ld(D),p=function(){switch(!1){case 1!==B:return Jd;case 2!==B:return Id;case 3!==B:return Kd;case 4!==B:return function(a){var b,c,d,f;f=Hd(a);b=Gd(a);a=new Uint8Array(f);for(c=d=0;0<=f?df;c=0<=f?++d:--d)a[c]=x[b+c];return a};default:return function(){return null}}}(),p=p(D),r.push(p);if(b=c.apply(null,r))switch(typeof b){case "number":return Cd(a,b);case "string":return Ed(a,b,-1,-1)}else return Dd(a)});this.handleError(td(this.db,a,c.length, +X.Ra,0,d,0,0,0));return this};return a}();yd=e.cwrap("sqlite3_open","number",["string","number"]);md=e.cwrap("sqlite3_close_v2","number",["number"]);wd=e.cwrap("sqlite3_exec","number",["number","string","number","number","number"]);e.cwrap("sqlite3_free","",["number"]);kd=e.cwrap("sqlite3_changes","number",["number"]);zd=e.cwrap("sqlite3_prepare_v2","number",["number","string","number","number","number"]);Ad=e.cwrap("sqlite3_prepare_v2","number",["number","number","number","number","number"]); +jd=e.cwrap("sqlite3_bind_text","number",["number","number","number","number","number"]);fd=e.cwrap("sqlite3_bind_blob","number",["number","number","number","number","number"]);gd=e.cwrap("sqlite3_bind_double","number",["number","number","number"]);hd=e.cwrap("sqlite3_bind_int","number",["number","number","number"]);id=e.cwrap("sqlite3_bind_parameter_index","number",["number","string"]);Fd=e.cwrap("sqlite3_step","number",["number"]);vd=e.cwrap("sqlite3_errmsg","string",["number"]); +ud=e.cwrap("sqlite3_data_count","number",["number"]);pd=e.cwrap("sqlite3_column_double","number",["number","number"]);rd=e.cwrap("sqlite3_column_text","string",["number","number"]);nd=e.cwrap("sqlite3_column_blob","number",["number","number"]);od=e.cwrap("sqlite3_column_bytes","number",["number","number"]);sd=e.cwrap("sqlite3_column_type","number",["number","number"]);qd=e.cwrap("sqlite3_column_name","string",["number","number"]);Bd=e.cwrap("sqlite3_reset","number",["number"]); +ld=e.cwrap("sqlite3_clear_bindings","number",["number"]);xd=e.cwrap("sqlite3_finalize","number",["number"]);td=e.cwrap("sqlite3_create_function_v2","number","number string number number number number number number number".split(" "));Ld=e.cwrap("sqlite3_value_type","number",["number"]);Hd=e.cwrap("sqlite3_value_bytes","number",["number"]);Kd=e.cwrap("sqlite3_value_text","string",["number"]);Jd=e.cwrap("sqlite3_value_int","number",["number"]);Gd=e.cwrap("sqlite3_value_blob","number",["number"]); +Id=e.cwrap("sqlite3_value_double","number",["number"]);Cd=e.cwrap("sqlite3_result_double","",["number","number"]);Dd=e.cwrap("sqlite3_result_null","",["number"]);Ed=e.cwrap("sqlite3_result_text","",["number","string","number","number"]);cd=e.cwrap("RegisterExtensionFunctions","number",["number"]);this.SQL={Database:Database};for(ed in this.SQL)e[ed]=this.SQL[ed];bd=0;X.OK=0;X.ERROR=1;X.Bd=2;X.Ld=3;X.wb=4;X.yb=5;X.Ed=6;X.NOMEM=7;X.Od=8;X.Cd=9;X.Dd=10;X.Bb=11;X.NOTFOUND=12;X.Ad=13;X.zb=14;X.Md=15; +X.EMPTY=16;X.Pd=17;X.Rd=18;X.Ab=19;X.Fd=20;X.Gd=21;X.Hd=22;X.xb=23;X.zd=24;X.Nd=25;X.Id=26;X.Jd=27;X.Sd=28;X.Pa=100;X.DONE=101;X.Oa=1;X.FLOAT=2;X.Qa=3;X.La=4;X.Kd=5;X.Ra=1; + +return this['SQL']; +})(); +if (typeof module !== 'undefined') module.exports = SQL; +if (typeof define === 'function') define(SQL); diff --git a/Server/www/spiderbasic/themes/aeroglass/close.png b/Server/www/spiderbasic/themes/aeroglass/close.png new file mode 100644 index 0000000..72dc7cb Binary files /dev/null and b/Server/www/spiderbasic/themes/aeroglass/close.png differ diff --git a/Server/www/spiderbasic/themes/aeroglass/window.css b/Server/www/spiderbasic/themes/aeroglass/window.css new file mode 100644 index 0000000..bd598c6 --- /dev/null +++ b/Server/www/spiderbasic/themes/aeroglass/window.css @@ -0,0 +1,129 @@ + +html { + margin:0; + padding:0; + height:100%; + width:100%; + background: url("../../media/background.png") no-repeat center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +body { + margin:0; + padding:0; + height:100%; + width:100%; + overflow:hidden; +} + + +.spiderwindow { + margin:0; + padding:0px 6px 36px 6px; + -moz-border-radius:7px; + -webkit-border-radius:7px; + border-radius:7px; + -moz-box-shadow:0 0 0 1px #eee inset, 0 0 15px rgba(0,0,0,0.4); + -webkit-box-shadow:0 0 0 1px #eee inset, 0 0 15px rgba(0,0,0,0.4); + box-shadow:0 0 0 1px #eee inset, 0 0 15px rgba(0,0,0,0.4); + background-color:rgba(160,160,160,0.4); + border:1px solid #383838; + position:absolute; + z-index:1; + font:normal 12px arial; +} + +.spiderwindow-title { + margin:0; + padding:0; + background:transparent; + color:#000; + font:normal 12px/16px "Segoe UI",Arial,sans-serif; + height:16px; + overflow:hidden; + padding:6px 0 6px 28px; + text-overflow:ellipsis; + text-shadow:0 0 0px #fff, 3px 3px 5px #fff, -3px -3px 5px #fff, -3px 3px 5px #fff, 3px -3px 5px #fff; + white-space:nowrap; + cursor:default; +} + +.spiderwindow-content { + background-color:#f2f2f2; + margin:0; + padding:0; + border:1px solid #666; + height:100%; + overflow:hidden; + position:relative; + font:normal 12px arial; +} + + +.spiderwindow-content p { + margin:0; + padding:0; + margin-bottom:10px; +} + +.spiderwindow-content img { + margin:0; + padding:0; + background-color:#f1f1f1; + border:1px solid #ddd; + float:left; + margin:0 20px 10px 0; + padding:1px; +} + +.spiderwindow-closebutton { + background-color:#CF3232; + background-image: url("close.png"); + background-repeat: no-repeat; + background-position: 9px 2px; + border:1px solid #500000; + position: absolute; + top: 5px; + right:5px; + height: 15px; + width: 30px; + color:#ffffff; +} +.spiderwindow-closebutton:hover { + background-color:#c23e3e; +} +.spiderwindow-closebutton:active { + background-color:#b02a2a; +} + +/* Special definition for background windows + */ +.spiderwindow-background { + margin:0; + padding:0; + background-color:#ffffff; + color:#000; + height:100%; + overflow:hidden; + position:relative; +} + +/* Resizeable */ +.ui-resizable-handle{display:block;position:absolute;} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle{display:none;} +.ui-resizable-n,.ui-resizable-s{height:7px;left:0;width:100%;} +.ui-resizable-n{cursor:n-resize;top:-5px;} +.ui-resizable-s{bottom:-5px;cursor:s-resize;} +.ui-resizable-e,.ui-resizable-w{height:100%;top:0;width:7px;} +.ui-resizable-e{cursor:e-resize;right:-5px;} +.ui-resizable-w{cursor:w-resize;left:-5px;} +.ui-resizable-se,.ui-resizable-sw, +.ui-resizable-nw,.ui-resizable-ne{height:12px;width:12px;} +.ui-resizable-se{bottom:-6px;cursor:se-resize;right:-6px;} +.ui-resizable-sw{bottom:-6px;cursor:sw-resize;left:-6px;} +.ui-resizable-nw{cursor:nw-resize;left:-6px;top:-6px;} +.ui-resizable-ne {cursor:ne-resize;right:-6px;top:-6px;} diff --git a/Server/www/spiderbasic/themes/flat/close.png b/Server/www/spiderbasic/themes/flat/close.png new file mode 100644 index 0000000..72dc7cb Binary files /dev/null and b/Server/www/spiderbasic/themes/flat/close.png differ diff --git a/Server/www/spiderbasic/themes/flat/window.css b/Server/www/spiderbasic/themes/flat/window.css new file mode 100644 index 0000000..a884c1a --- /dev/null +++ b/Server/www/spiderbasic/themes/flat/window.css @@ -0,0 +1,129 @@ + +html { + margin:0; + padding:0; + height:100%; + width:100%; + background: url("../../media/background.png") no-repeat center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +body { + margin:0; + padding:0; + height:100%; + width:100%; + overflow:hidden; +} + + +.spiderwindow { + margin:0; + padding:0; + -moz-box-shadow:0 0 0 1px #eee inset, 0 0 15px rgba(0,0,0,0.4); + -webkit-box-shadow:0 0 0 1px #eee inset, 0 0 15px rgba(0,0,0,0.4); + box-shadow:0 0 0 1px #eee inset, 0 0 15px rgba(0,0,0,0.4); + background-color:rgba(255,255,255,1); + border:1px solid #383838; + padding-bottom:28px; + position:absolute; + z-index:1; + font:normal 12px arial; +} + +.spiderwindow-title { + margin:0; + padding:0; + background:transparent; + color:#000; + font:normal 12px/16px "Segoe UI",Arial,sans-serif; + height:16px; + overflow:hidden; + padding:6px 0 6px 28px; + text-overflow:ellipsis; + white-space:nowrap; + cursor:default; +} + +.spiderwindow-menubar { + background:#fff; +} + +.spiderwindow-content { + background-color:#f2f2f2; + margin:0; + padding:0; + height:100%; + overflow:hidden; + position:relative; + font:normal 12px arial; +} + +.spiderwindow-content p { + margin:0; + padding:0; + margin-bottom:10px; +} +.spiderwindow-content img { + margin:0; + padding:0; + background-color:#f1f1f1; + border:1px solid #ddd; + float:left; + margin:0 20px 10px 0; + padding:1px; +} + +.spiderwindow-closebutton { + background-color:#E62020; + background-image: url("close.png"); + background-repeat: no-repeat; + background-position: 9px 5px; + border:1px solid #ececec; + position: absolute; + top: 2px; + right:2px; + height: 22px; + width: 30px; + color:#ffffff; +} + +.spiderwindow-closebutton:hover { + background-color:#c23e3e; +} + +.spiderwindow-closebutton:active { + background-color:#b02a2a; +} + +/* Special definition for background windows + */ +.spiderwindow-background { + margin:0; + padding:0; + background-color:#ffffff; + color:#000; + height:100%; + overflow:hidden; + position:relative; +} + +/* Resizeable */ +.ui-resizable-handle{display:block;position:absolute;} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle{display:none;} +.ui-resizable-n,.ui-resizable-s{height:7px;left:0;width:100%;} +.ui-resizable-n{cursor:n-resize;top:-5px;} +.ui-resizable-s{bottom:-5px;cursor:s-resize;} +.ui-resizable-e,.ui-resizable-w{height:100%;top:0;width:7px;} +.ui-resizable-e{cursor:e-resize;right:-5px;} +.ui-resizable-w{cursor:w-resize;left:-5px;} +.ui-resizable-se,.ui-resizable-sw, +.ui-resizable-nw,.ui-resizable-ne{height:12px;width:12px;} +.ui-resizable-se{bottom:-6px;cursor:se-resize;right:-6px;} +.ui-resizable-sw{bottom:-6px;cursor:sw-resize;left:-6px;} +.ui-resizable-nw{cursor:nw-resize;left:-6px;top:-6px;} +.ui-resizable-ne {cursor:ne-resize;right:-6px;top:-6px;} diff --git a/Server/www/spiderbasic/wgxpath.min.js b/Server/www/spiderbasic/wgxpath.min.js new file mode 100644 index 0000000..a983680 --- /dev/null +++ b/Server/www/spiderbasic/wgxpath.min.js @@ -0,0 +1,77 @@ +(function(){'use strict';var k=this; +function aa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"== +b&&"undefined"==typeof a.call)return"object";return b}function l(a){return"string"==typeof a}function ba(a,b,c){return a.call.apply(a.bind,arguments)}function ca(a,b,c){if(!a)throw Error();if(2b?1:0};var ha=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc?null:l(a)?a.charAt(c):a[c]}function la(a){return Array.prototype.concat.apply(Array.prototype,arguments)}function ma(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var u;a:{var na=k.navigator;if(na){var oa=na.userAgent;if(oa){u=oa;break a}}u=""};var pa=q(u,"Opera")||q(u,"OPR"),v=q(u,"Trident")||q(u,"MSIE"),qa=q(u,"Edge"),ra=q(u,"Gecko")&&!(q(u.toLowerCase(),"webkit")&&!q(u,"Edge"))&&!(q(u,"Trident")||q(u,"MSIE"))&&!q(u,"Edge"),sa=q(u.toLowerCase(),"webkit")&&!q(u,"Edge");function ta(){var a=k.document;return a?a.documentMode:void 0}var ua; +a:{var va="",wa=function(){var a=u;if(ra)return/rv\:([^\);]+)(\)|;)/.exec(a);if(qa)return/Edge\/([\d\.]+)/.exec(a);if(v)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(sa)return/WebKit\/(\S+)/.exec(a);if(pa)return/(?:Version)[ \/]?(\S+)/.exec(a)}();wa&&(va=wa?wa[1]:"");if(v){var xa=ta();if(null!=xa&&xa>parseFloat(va)){ua=String(xa);break a}}ua=va}var ya={}; +function za(a){if(!ya[a]){for(var b=0,c=fa(String(ua)).split("."),d=fa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f",4,2,function(a,b,c){return O(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(a,b){return a>=b},a,b,c)});var Wa=P("=",3,2,function(a,b,c){return O(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return O(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return M(a,c)&&M(b,c)});P("or",1,2,function(a,b,c){return M(a,c)||M(b,c)});function Q(a,b,c){this.a=a;this.b=b||1;this.f=c||1};function Za(a,b){if(b.a.length&&4!=a.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");n.call(this,a.i);this.c=a;this.h=b;this.g=a.g;this.b=a.b}m(Za);Za.prototype.a=function(a){a=this.c.a(a);return $a(this.h,a)};Za.prototype.toString=function(){var a;a="Filter:"+J(this.c);return a+=J(this.h)};function ab(a,b){if(b.lengtha.v)throw Error("Function "+a.j+" expects at most "+a.v+" arguments, "+b.length+" given");a.B&&r(b,function(b,d){if(4!=b.i)throw Error("Argument "+d+" to function "+a.j+" is not of type Nodeset: "+b);});n.call(this,a.i);this.h=a;this.c=b;Ua(this,a.g||ja(b,function(a){return a.g}));Va(this,a.D&&!b.length||a.C&&!!b.length||ja(b,function(a){return a.b}))}m(ab); +ab.prototype.a=function(a){return this.h.m.apply(null,la(a,this.c))};ab.prototype.toString=function(){var a="Function: "+this.h;if(this.c.length)var b=t(this.c,function(a,b){return a+J(b)},"Arguments:"),a=a+J(b);return a};function bb(a,b,c,d,e,f,g,h,p){this.j=a;this.i=b;this.g=c;this.D=d;this.C=e;this.m=f;this.A=g;this.v=void 0!==h?h:g;this.B=!!p}bb.prototype.toString=function(){return this.j};var cb={}; +function R(a,b,c,d,e,f,g,h){if(cb.hasOwnProperty(a))throw Error("Function already created: "+a+".");cb[a]=new bb(a,b,c,d,!1,e,f,g,h)}R("boolean",2,!1,!1,function(a,b){return M(b,a)},1);R("ceiling",1,!1,!1,function(a,b){return Math.ceil(K(b,a))},1);R("concat",3,!1,!1,function(a,b){return t(ma(arguments,1),function(b,d){return b+L(d,a)},"")},2,null);R("contains",2,!1,!1,function(a,b,c){return q(L(b,a),L(c,a))},2);R("count",1,!1,!1,function(a,b){return b.a(a).l},1,1,!0); +R("false",2,!1,!1,function(){return!1},0);R("floor",1,!1,!1,function(a,b){return Math.floor(K(b,a))},1);R("id",4,!1,!1,function(a,b){function c(a){if(w){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return ka(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=L(b,a).split(/\s+/),f=[];r(d,function(a){a=c(a);!a||0<=ha(f,a)||f.push(a)});f.sort(La);var g=new C;r(f,function(a){F(g,a)});return g},1); +R("lang",2,!1,!1,function(){return!1},1);R("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);R("local-name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0);R("name",3,!1,!0,function(a,b){var c=b?Ra(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0);R("namespace-uri",3,!0,!1,function(){return""},0,1,!0); +R("normalize-space",3,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);R("not",2,!1,!1,function(a,b){return!M(b,a)},1);R("number",1,!1,!0,function(a,b){return b?K(b,a):+z(a.a)},0,1);R("position",1,!0,!1,function(a){return a.b},0);R("round",1,!1,!1,function(a,b){return Math.round(K(b,a))},1);R("starts-with",2,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);return 0==b.lastIndexOf(a,0)},2);R("string",3,!1,!0,function(a,b){return b?L(b,a):z(a.a)},0,1); +R("string-length",1,!1,!0,function(a,b){return(b?L(b,a):z(a.a)).length},0,1);R("substring",3,!1,!1,function(a,b,c,d){c=K(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?K(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=L(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);R("substring-after",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2); +R("substring-before",3,!1,!1,function(a,b,c){b=L(b,a);a=L(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);R("sum",1,!1,!1,function(a,b){for(var c=H(b.a(a)),d=0,e=I(c);e;e=I(c))d+=+z(e);return d},1,1,!0);R("translate",3,!1,!1,function(a,b,c,d){b=L(b,a);c=L(c,a);var e=L(d,a);a={};for(d=0;d]=|\s+|./g,hb=/^\s/;function S(a,b){return a.b[a.a+(b||0)]}function T(a){return a.b[a.a++]}function ib(a){return a.b.length<=a.a};function jb(a){n.call(this,3);this.c=a.substring(1,a.length-1)}m(jb);jb.prototype.a=function(){return this.c};jb.prototype.toString=function(){return"Literal: "+this.c};function E(a,b){this.j=a.toLowerCase();var c;c="*"==this.j?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():c}E.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.j&&this.j!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};E.prototype.f=function(){return this.j}; +E.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j};function kb(a,b){n.call(this,a.i);this.h=a;this.c=b;this.g=a.g;this.b=a.b;if(1==this.c.length){var c=this.c[0];c.u||c.c!=lb||(c=c.o,"*"!=c.f()&&(this.f={name:c.f(),s:null}))}}m(kb);function mb(){n.call(this,4)}m(mb);mb.prototype.a=function(a){var b=new C;a=a.a;9==a.nodeType?F(b,a):F(b,a.ownerDocument);return b};mb.prototype.toString=function(){return"Root Helper Expression"};function nb(){n.call(this,4)}m(nb);nb.prototype.a=function(a){var b=new C;F(b,a.a);return b};nb.prototype.toString=function(){return"Context Helper Expression"}; +function ob(a){return"/"==a||"//"==a}kb.prototype.a=function(a){var b=this.h.a(a);if(!(b instanceof C))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;ca.length)throw Error("Unclosed literal string");return new jb(a)} +function Hb(a){var b,c=[],d;if(ob(S(a.a))){b=T(a.a);d=S(a.a);if("/"==b&&(ib(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new mb;d=new mb;W(a,"Missing next location step.");b=Ib(a,b);c.push(b)}else{a:{b=S(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":T(a.a);b=Cb(a);W(a,'unclosed "("');Eb(a,")");break;case '"':case "'":b=Gb(a);break;default:if(isNaN(+b))if(!db(b)&&/(?![0-9])[\w]/.test(d)&&"("==S(a.a,1)){b=T(a.a); +b=cb[b]||null;T(a.a);for(d=[];")"!=S(a.a);){W(a,"Missing function argument list.");d.push(Cb(a));if(","!=S(a.a))break;T(a.a)}W(a,"Unclosed function argument list.");Fb(a);b=new ab(b,d)}else{b=null;break a}else b=new Ab(+T(a.a))}"["==S(a.a)&&(d=new sb(Jb(a)),b=new Za(b,d))}if(b)if(ob(S(a.a)))d=b;else return b;else b=Ib(a,"/"),d=new nb,c.push(b)}for(;ob(S(a.a));)b=T(a.a),W(a,"Missing next location step."),b=Ib(a,b),c.push(b);return new kb(d,c)} +function Ib(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==S(a.a))return d=new U(yb,new G("node")),T(a.a),d;if(".."==S(a.a))return d=new U(xb,new G("node")),T(a.a),d;var f;if("@"==S(a.a))f=lb,T(a.a),W(a,"Missing attribute name");else if("::"==S(a.a,1)){if(!/(?![0-9])[\w]/.test(S(a.a).charAt(0)))throw Error("Bad token: "+T(a.a));c=T(a.a);f=wb[c]||null;if(!f)throw Error("No axis with name: "+c);T(a.a);W(a,"Missing node name")}else f=tb;c=S(a.a);if(/(?![0-9])[\w\*]/.test(c.charAt(0)))if("("== +S(a.a,1)){if(!db(c))throw Error("Invalid node type: "+c);c=T(a.a);if(!db(c))throw Error("Invalid type name: "+c);Eb(a,"(");W(a,"Bad nodetype");e=S(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Gb(a);W(a,"Bad nodetype");Fb(a);c=new G(c,g)}else if(c=T(a.a),e=c.indexOf(":"),-1==e)c=new E(c);else{var g=c.substring(0,e),h;if("*"==g)h="*";else if(h=a.b(g),!h)throw Error("Namespace prefix not declared: "+g);c=c.substr(e+1);c=new E(c,h)}else throw Error("Bad token: "+T(a.a));e=new sb(Jb(a),f.a);return d|| +new U(f,c,e,"//"==b)}function Jb(a){for(var b=[];"["==S(a.a);){T(a.a);W(a,"Missing predicate expression.");var c=Cb(a);b.push(c);W(a,"Unclosed predicate expression.");Eb(a,"]")}return b}function Db(a){if("-"==S(a.a))return T(a.a),new zb(Db(a));var b=Hb(a);if("|"!=S(a.a))a=b;else{for(b=[b];"|"==T(a.a);)W(a,"Missing next union location path."),b.push(Hb(a));a.a.a--;a=new rb(b)}return a};function Kb(a){switch(a.nodeType){case 1:return ea(Lb,a);case 9:return Kb(a.documentElement);case 11:case 10:case 6:case 12:return Mb;default:return a.parentNode?Kb(a.parentNode):Mb}}function Mb(){return null}function Lb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Lb(a.parentNode,b):null};function Nb(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=fb(a);if(ib(c))throw Error("Invalid XPath expression.");b?"function"==aa(b)||(b=da(b.lookupNamespaceURI,b)):b=function(){return null};var d=Cb(new Bb(c,b));if(!ib(c))throw Error("Bad token: "+T(c));this.evaluate=function(a,b){var c=d.a(new Q(a));return new Y(c,b)}} +function Y(a,b){if(0==b)if(a instanceof C)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof C))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof C?Sa(a):""+a;break;case 1:this.numberValue=a instanceof C?+Sa(a):+a;break;case 3:this.booleanValue=a instanceof C?0=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length|| +0>a?null:c[a]}}Y.ANY_TYPE=0;Y.NUMBER_TYPE=1;Y.STRING_TYPE=2;Y.BOOLEAN_TYPE=3;Y.UNORDERED_NODE_ITERATOR_TYPE=4;Y.ORDERED_NODE_ITERATOR_TYPE=5;Y.UNORDERED_NODE_SNAPSHOT_TYPE=6;Y.ORDERED_NODE_SNAPSHOT_TYPE=7;Y.ANY_UNORDERED_NODE_TYPE=8;Y.FIRST_ORDERED_NODE_TYPE=9;function Ob(a){this.lookupNamespaceURI=Kb(a)} +function Pb(a,b){var c=a||k,d=c.Document&&c.Document.prototype||c.document;if(!d.evaluate||b)c.XPathResult=Y,d.evaluate=function(a,b,c,d){return(new Nb(a,c)).evaluate(b,d)},d.createExpression=function(a,b){return new Nb(a,b)},d.createNSResolver=function(a){return new Ob(a)}}var Qb=["wgxpath","install"],Z=k;Qb[0]in Z||!Z.execScript||Z.execScript("var "+Qb[0]);for(var Rb;Qb.length&&(Rb=Qb.shift());)Qb.length||void 0===Pb?Z[Rb]?Z=Z[Rb]:Z=Z[Rb]={}:Z[Rb]=Pb;}).call(this) diff --git a/Server/www/spiderbasic/xdate.min.js b/Server/www/spiderbasic/xdate.min.js new file mode 100644 index 0000000..2425221 --- /dev/null +++ b/Server/www/spiderbasic/xdate.min.js @@ -0,0 +1,18 @@ +/* + XDate v0.8 + Docs & Licensing: http://arshaw.com/xdate/ +*/ +var XDate=function(f,m,E,t){function h(){var a=this instanceof h?this:new h,c=arguments,b=c.length,d;"boolean"==typeof c[b-1]&&(d=c[--b],c=u(c,0,b));if(b)if(1==b)if(b=c[0],b instanceof f||"number"==typeof b)a[0]=new f(+b);else if(b instanceof h){var c=a,g=new f(+b[0]);q(b)&&(g.toString=z);c[0]=g}else{if("string"==typeof b){a[0]=new f(0);a:{for(var c=b,b=d||!1,g=h.parsers,A=0,e;Ac&&J(a,c+1,(b-g)*K[c],d)}function L(a,c,b){a=a.clone().setUTCMode(!0,!0);c=h(c).setUTCMode(!0,!0);var d=0;if(0==b||1==b){for(var g=6;g>=b;g--)d/=K[g],d+=p(c,!1,g)-p(a,!1,g);1==b&&(d+=12*(c.getFullYear()-a.getFullYear()))}else 2==b?(b=a.toDate().setUTCHours(0,0,0,0),d=c.toDate().setUTCHours(0,0,0,0),d=m.round((d-b)/864E5)+(c-d-(a-b))/864E5):d=(c-a)/[36E5,6E4,1E3,1][b-3];return d}function w(a){var c=a(0),b=a(1),d=a(2); +a=new f(r(c,b,d));c=x(M(c,b,d));return m.floor(m.round((a-c)/864E5)/7)+1}function M(a,c,b){c=new f(r(a,c,b));return c=x(a+1)?a+1:a}function x(a){a=new f(r(a,0,4));a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+6)%7);return a}function N(a,c,b,d){var g=n(p,a,d),e=n(H,a,d);b===t&&(b=M(g(0),g(1),g(2)));b=x(b);d||(b=v(b));a.setTime(+b);e(2,[g(2)+7*(c-1)])}function O(a,c,b,d,g){var e=h.locales,f=e[h.defaultLocale]||{},l=n(p,a,g);b=("string"==typeof b?e[b]:b)||{};return B(a,c,function(a){if(d)for(var b= +(7==a?2:a)-1;0<=b;b--)d.push(l(b));return l(a)},function(a){return b[a]||f[a]},g)}function B(a,c,b,d,e){for(var f,h,l="";f=c.match(R);){l+=c.substr(0,f.index);if(f[1]){h=l;for(var l=a,k=f[1],p=b,q=d,r=e,m=k.length,n=void 0,s="";0d?"+":"-",b=m.floor(m.abs(d)/60),d=m.abs(d)%60,e=b,"zz"==c?e=k(b):"zzz"==c&&(e=k(b)+":"+k(d)),c=a+e),c;case "w":return w(b);case "ww":return k(w(b));case "S":return c=b(2), +10c?"th":["st","nd","rd"][c%10-1]||"th"}}function y(a,c){return 12>a(3)?c("amDesignator"):c("pmDesignator")}function C(a){return!isNaN(+a[0])}function p(a,c,b){return a["get"+(c?"UTC":"")+s[b]]()}function H(a,c,b,d){a["set"+(c?"UTC":"")+s[b]].apply(a,d)}function v(a){return new f(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())}function I(a,c){return 32-(new f(r(a,c,32))).getUTCDate()}function D(a){return function(){return a.apply(t, +[this].concat(u(arguments)))}}function n(a){var c=u(arguments,1);return function(){return a.apply(t,c.concat(u(arguments)))}}function u(a,c,b){return E.prototype.slice.call(a,c||0,b===t?a.length:b)}function P(a,c){for(var b=0;b MIT License +var XRegExp=function(a){"use strict";function u(a,d,e,f,g){var h;if(a[c]={captureNames:d},g)return a;if(a.__proto__)a.__proto__=b.prototype;else for(h in b.prototype)a[h]=b.prototype[h];return a[c].source=e,a[c].flags=f?f.split("").sort().join(""):f,a}function v(a){return e.replace.call(a,/([\s\S])(?=[\s\S]*\1)/g,"")}function w(d,f){if(!b.isRegExp(d))throw new TypeError("Type RegExp expected");var g=d[c]||{},h=y(d),i="",j="",k=null,l=null;return f=f||{},f.removeG&&(j+="g"),f.removeY&&(j+="y"),j&&(h=e.replace.call(h,new RegExp("["+j+"]+","g"),"")),f.addG&&(i+="g"),f.addY&&(i+="y"),i&&(h=v(h+i)),f.isInternalOnly||(g.source!==a&&(k=g.source),null!=g.flags&&(l=i?v(g.flags+i):g.flags)),d=u(new RegExp(d.source,h),z(d)?g.captureNames.slice(0):null,k,l,f.isInternalOnly)}function x(a){return parseInt(a,16)}function y(a){return q?a.flags:e.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(a))[1]}function z(a){return!(!a[c]||!a[c].captureNames)}function A(a){return parseInt(a,10).toString(16)}function B(a,b){var d,c=a.length;for(d=0;c>d;++d)if(a[d]===b)return d;return-1}function C(a,b){return s.call(a)==="[object "+b+"]"}function D(a,b,c){return e.test.call(c.indexOf("x")>-1?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,a.slice(b))}function E(a){for(;a.length<4;)a="0"+a;return a}function F(a,b){var c;if(v(b)!==b)throw new SyntaxError("Invalid duplicate regex flag "+b);for(a=e.replace.call(a,/^\(\?([\w$]+)\)/,function(a,c){if(e.test.call(/[gy]/,c))throw new SyntaxError("Cannot use flag g or y in mode modifier "+a);return b=v(b+c),""}),c=0;c"}else if(c)return"\\"+(+c+i);return a};if(!C(a,"Array")||!a.length)throw new TypeError("Must provide a nonempty array of patterns to merge");for(m=0;m1&&B(f,"")>-1&&(h=w(this,{removeG:!0,isInternalOnly:!0}),e.replace.call(String(b).slice(f.index),h,function(){var c,b=arguments.length;for(c=1;b-2>c;++c)arguments[c]===a&&(f[c]=a)})),this[c]&&this[c].captureNames)for(i=1;if.index&&(this.lastIndex=f.index)}return this.global||(this.lastIndex=d),f},f.test=function(a){return!!f.exec.call(this,a)},f.match=function(a){var c;if(b.isRegExp(a)){if(a.global)return c=e.match.apply(this,arguments),a.lastIndex=0,c}else a=new RegExp(a);return f.exec.call(a,L(this))},f.replace=function(d,f){var h,i,j,g=b.isRegExp(d);return g?(d[c]&&(i=d[c].captureNames),h=d.lastIndex):d+="",j=C(f,"Function")?e.replace.call(String(this),d,function(){var c,b=arguments;if(i)for(b[0]=new String(b[0]),c=0;ce)throw new SyntaxError("Backreference to undefined group "+b);return a[e+1]||""}if("$"===d)return"$";if("&"===d||0===+d)return a[0];if("`"===d)return a[a.length-1].slice(0,a[a.length-2]);if("'"===d)return a[a.length-1].slice(a[a.length-2]+a[0].length);if(d=+d,!isNaN(d)){if(d>a.length-3)throw new SyntaxError("Backreference to undefined group "+b);return a[d]||""}throw new SyntaxError("Invalid token "+b)})}),g&&(d.global?d.lastIndex=0:d.lastIndex=h),j},f.split=function(c,d){if(!b.isRegExp(c))return e.split.apply(this,arguments);var j,f=String(this),g=[],h=c.lastIndex,i=0;return d=(d===a?-1:d)>>>0,b.forEach(f,c,function(a){a.index+a[0].length>i&&(g.push(f.slice(i,a.index)),a.length>1&&a.indexd?g.slice(0,d):g},t=b.addToken,t(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,function(a,b){if("B"===a[1]&&b===j)return a[0];throw new SyntaxError("Invalid escape "+a[0])},{scope:"all",leadChar:"\\"}),t(/\\u{([\dA-Fa-f]+)}/,function(a,b,c){var d=x(a[1]);if(d>1114111)throw new SyntaxError("Invalid Unicode code point "+a[0]);if(65535>=d)return"\\u"+E(A(d));if(o&&c.indexOf("u")>-1)return a[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")},{scope:"all",leadChar:"\\"}),t(/\[(\^?)]/,function(a){return a[1]?"[\\s\\S]":"\\b\\B"},{leadChar:"["}),t(/\(\?#[^)]*\)/,function(a,b,c){return D(a.input,a.index+a[0].length,c)?"":"(?:)"},{leadChar:"("}),t(/\s+|#.*/,function(a,b,c){return D(a.input,a.index+a[0].length,c)?"":"(?:)"},{flag:"x"}),t(/\./,function(){return"[\\s\\S]"},{flag:"s",leadChar:"."}),t(/\\k<([\w$]+)>/,function(a){var b=isNaN(a[1])?B(this.captureNames,a[1])+1:+a[1],c=a.index+a[0].length;if(!b||b>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+a[0]);return"\\"+b+(c===a.input.length||isNaN(a.input.charAt(c))?"":"(?:)")},{leadChar:"\\"}),t(/\\(\d+)/,function(a,b){if(!(b===j&&/^[1-9]/.test(a[1])&&+a[1]<=this.captureNames.length)&&"0"!==a[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+a[0]);return a[0]},{scope:"all",leadChar:"\\"}),t(/\(\?P?<([\w$]+)>/,function(a){if(!isNaN(a[1]))throw new SyntaxError("Cannot use integer as capture name "+a[0]);if("length"===a[1]||"__proto__"===a[1])throw new SyntaxError("Cannot use reserved word as capture name "+a[0]);if(B(this.captureNames,a[1])>-1)throw new SyntaxError("Cannot use same name for multiple groups "+a[0]);return this.captureNames.push(a[1]),this.hasNamedCapture=!0,"("},{leadChar:"("}),t(/\((?!\?)/,function(a,b,c){return c.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n",leadChar:"("}),b}(); \ No newline at end of file