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;b<this.localFiles.length;b++)if(this.localFiles[b].name===a)return this.localFiles[b];return null}};function spider_BankerRound(a){var b=0<=a?1:-1,c=b*Math.round(b*a);return 0.5===Math.abs(a)%1&&0!==c%2?c-b:c}function spider_CastByte(a){a&=255;return 127<a?-(256-a):a}function spider_CastCharacter(a){return a&65535}function spider_CastAscii(a){return a&255}
function spider_CastUnicode(a){return a&65535}function spider_CastWord(a){a&=65535;return 32767<a?-(65536-a):a}function spider_CastLong(a){a&=4294967295;return 2147483647<a?-(4294967296-a):a}function spider_CastQuad(a){return 0<=a?Math.floor(a):Math.ceil(a)}function spider_XOr(a,b){return(a||b)&&!(a&&b)}function spider_AssignFixedString(a,b){return b<a.length?a.substring(0,b):a}function spider_SysArray(){this.structure=null;this.nbDimensions=0;this.type=this.dimensions=null}
function spider_SysList(){this.type=this.current=this.last=this.first=null;this.index=0;this.isIndexInvalid=!1;this.field="";this.nbElements=0;this.isNative=!1}function spider_SysMap(){this.map={};this.current=null;this.currentIndex=-1;this.type=this.keys=this.currentKey=null;this.isNative=!1};

if("undefined"===typeof spider)var spider={};
spider.object=function(c){return{map:{},dynamicCounter:1E5,Allocate:function(a){var b={};-1==a?(b.id=this.dynamicCounter,b.resultId=b.id,this.dynamicCounter++):(c&&c(a),b.id=a,b.resultId=b);return this.map[b.id]=b},Get:function(a){return this.map.hasOwnProperty(a)?this.map[a]:null},Remove:function(a){delete this.map[a]},EnumerateAll:function(a){for(var b in this.map)this.map.hasOwnProperty(b)&&a(b,this.map[b])},CleanAll:function(){if(c)for(var a in this.map)this.map.hasOwnProperty(a)&&c(a)},Is:function(a){return this.map.hasOwnProperty(a)?
1:0}}};

function spider_InitMap(){}function spider_NewMap(a,b){var c=new spider_SysMap;c.type=a;c.isNative=b;return c}function spider_CreateMapElement(a,b){return a.map.hasOwnProperty(b)?a.map[b]:(a.current=new a.type,a.currentKey=b,a.map[b]=a.current)}function spider_AddMapElement(a,b){a.current=new a.type;a.currentKey=b;return a.map[b]=a.current}function spider_GetMapElement(a,b){return a.map.hasOwnProperty(b)?a.map[b]:spider_AddMapElement(a,b)}
function spider_ResetMap(a){a.keys=Object.keys(a.map);a.currentIndex=-1;a.currentKey=null}function spider_NextMapElement(a){a.currentIndex<a.keys.length-1?(a.currentIndex++,a.currentKey=a.keys[a.currentIndex],a.current=a.map[a.currentKey]):(a.currentIndex=-1,a.current=null,a.currentKey=null);return a.current}function spider_MapKey(a){return a.currentKey?a.currentKey:""}function spider_MapSize(a){return Object.keys(a.map).length}
function spider_DeleteMapElement(a,b){"undefined"===typeof b?a.currentKey&&delete a.map[a.currentKey]:a.map.hasOwnProperty(b)&&delete a.map[b]}function spider_FindMapElement(a,b){return a.map.hasOwnProperty(b)?(a.current=a.map[b],a.currentKey=b,a.current):0}function spider_CopyMap(a,b,c,d){b=Object.keys(a.map);c.map={};for(d=0;d<b.length;d++){var e=b[d],f=new a.type;a.map[e].copy(f);c.map[e]=f}c.currentIndex=-1;c.current=null;c.currentKey=null}function spider_ClearMap(a){a.map={}}
function spider_FreeMap(a){spider_ClearMap(a)}function spider_PushMapPosition(a){a.stack||(a.stack=[]);a.stack.push({currentIndex:a.currentIndex,currentKey:a.currentKey,current:a.current})}function spider_PopMapPosition(a){if(a.stack&&0<a.stack.length){var b=a.stack.pop();a.currentIndex=b.currentIndex;a.keys=Object.keys(a.map);a.currentKey=b.currentKey;a.current=b.current}};

if("undefined"===typeof spider)var spider={};function spider_PeekB(a,b){return a.view8[b]}function spider_PeekA(a,b){return a.viewu8[b]}function spider_PeekW(a,b){return a.view.getInt16(b,!0)}function spider_PeekU(a,b){return a.view.getUint16(b,!0)}function spider_PeekC(a,b){return a.view.getUint16(b,!0)}function spider_PeekL(a,b){return a.view.getInt32(b,!0)}function spider_PeekF(a,b){return a.view.getFloat32(b,!0)}function spider_PeekD(a,b){return a.view.getFloat64(b,!0)}var spider_Memory_CharacterReadOffset;
function spider_Memory_ReadUTF8Character(a,b){var c;c=a[b];return 0===(c&128)?(spider_Memory_CharacterReadOffset=1,c):192==(c&224)?(spider_Memory_CharacterReadOffset=2,(c&31)<<6|a[b+1]&63):224==(c&240)?(spider_Memory_CharacterReadOffset=3,(c&15)<<12|(a[b+1]&63)<<6|(a[b+2]&63)<<0):0}
function spider_Memory_ReadCharacter(a,b,c){switch(c){case 24:return spider_Memory_CharacterReadOffset=1,a[b];case 25:return spider_Memory_CharacterReadOffset=2,a[b+1]<<8|a[b];default:return spider_Memory_ReadUTF8Character(a,b)}}
function spider_PeekS(a,b,c,d){"undefined"===typeof d&&(d=2);"undefined"===typeof c&&(c=-1);d&=31;var e,f="";0===d&&(d=25);if(-1<=c)for(;c;){e=spider_Memory_ReadCharacter(a.viewu8,b,d);if(0===e)break;f+=String.fromCharCode(e);b+=spider_Memory_CharacterReadOffset;c--}return f}function spider_PokeB(a,b,c){a.view8[b]=c}function spider_PokeA(a,b,c){a.viewu8[b]=c}function spider_PokeW(a,b,c){a.view.setInt16(b,c,!0)}function spider_PokeU(a,b,c){a.view.setUint16(b,c,!0)}
function spider_PokeC(a,b,c){a.view.setUint16(b,c,!0)}function spider_PokeL(a,b,c){a.view.setInt32(b,c,!0)}function spider_PokeF(a,b,c){a.view.setFloat32(b,c,!0)}function spider_PokeD(a,b,c){a.view.setFloat64(b,c,!0)}function spider_Memory_WriteUTF8Character(a,b,c){return 128>c?(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<d;h++)b+=spider_Memory_WriteCharacter(a.viewu8,b,c.charCodeAt(h),g);0===(e&256)&&(a.viewu8[b]=0,25==g&&(a.viewu8[b+1]=0));return b-f}
function spider_Memory_CatchArrayBuffer(a){a.view8=new Int8Array(a);a.viewu8=new Uint8Array(a);a.view=new DataView(a);return a}function spider_Memory_CatchTypedArray(a){a=a.buffer.slice(a.byteOffset,a.byteLength+a.byteOffset);return spider_Memory_CatchArrayBuffer(a)}function spider_AllocateMemory(a,b){return spider_Memory_CatchArrayBuffer(new ArrayBuffer(a))}
function spider_ReAllocateMemory(a,b,c){if(a){if(b==a.byteLength)return a;if(b<a.byteLength)return spider_Memory_CatchArrayBuffer(a.slice(0,b));b=spider_AllocateMemory(b,c);b.view8.set(a.view8,0,a.byteLength);return b}return spider_AllocateMemory(b,c)}function spider_FreeMemory(a){}function spider_CopyMemory(a,b,c,d,e){a=new Int8Array(a,b,e);(new Int8Array(c,d,e)).set(a);return 1}
function spider_CompareMemory(a,b,c,d,e){a=new Int8Array(a,b,e);c=new Int8Array(c,d,e);for(d=0;d!=e;d++)if(a[d]!=c[d])return 0;return 1}function spider_MemorySize(a){return a.byteLength}function spider_AllocateStructure(a,b){return new a}function spider_FreeStructure(a){}function spider_ClearStructure(a,b){$.extend(!0,a,new b)}function spider_CopyStructure(a,b,c){$.extend(!0,b,a)};

if("undefined"==typeof Spider)var Spider={};function spider_Asc(a){return""===a?0:a.charCodeAt(0)}function spider_Bin(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:return spider_Right(a.toString(2),32);case 13:if(!(0<=a))return(-a-1).toString(2).replace(/[01]/g,function(a){return+!+a}).padStart(64,"1")}return a.toString(2)}function spider_Chr(a){return String.fromCharCode(a)}function spider_LCase(a){return a.toLowerCase()}
function spider_UCase(a){return a.toUpperCase()}function spider_CountString(a,b){if(0>=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++;0<b&&e.includes(".")&&(f=f+c+e.split(".")[1].slice(0,b));return 0>a?"-"+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;0<c&&a.charAt(c)==b;)c--;return a.substr(0,c-0+1)}function spider_Trim(a,b){"undefined"===typeof b&&(b=" ");for(var c=0,d=a.length-1;c<=d&&a.charAt(c)==b;)c++;for(;d>c&&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(0<d){b=c;for(d--;d;)d--,b+=c;return b+a}return a}
function spider_LSet(a,b,c){"undefined"===typeof c&&(c=" ");var d=b-a.length;if(a.length>b)return a.substring(0,b);if(0<d){b=c;for(d--;d;)d--,b+=c;return a+b}return a}function spider_StringField(a,b,c){return""===c?a:1<=b&&(a=a.split(c),a.length>=b)?a[b-1]:""}function spider_StringByteLength(a){return 0<a.length?(new TextEncoder).encode(a).length:0};

function spider_Date(a,e,b,d,k,f){if("undefined"===typeof a)return a=new XDate,a.getTime()/1E3-60*a.getTimezoneOffset();a=new XDate(a,e-1,b,d,k,f,!0);return a.getTime()/1E3}function spider_Year(a){return-1==a?0:(new XDate(1E3*a,!0)).getFullYear()}function spider_Month(a){return-1==a?0:(new XDate(1E3*a,!0)).getMonth()+1}function spider_Day(a){return-1==a?0:(new XDate(1E3*a,!0)).getDate()}function spider_DayOfWeek(a){return-1==a?0:(new XDate(1E3*a,!0)).getDay()}
function spider_DayOfYear(a){if(-1==a)return 0;a=new XDate(1E3*a,!0);for(var e=0,b=a.getFullYear(),d=0;d<a.getMonth();d++)e+=XDate.getDaysInMonth(b,d);return e+=a.getDate()}function spider_Hour(a){return-1==a?0:(new XDate(1E3*a,!0)).getHours()}function spider_Minute(a){return-1==a?0:(new XDate(1E3*a,!0)).getMinutes()}function spider_Second(a){return-1==a?0:(new XDate(1E3*a,!0)).getSeconds()}
function spider_AddDate(a,e,b){a=new XDate(1E3*a,!0);switch(e){case 0:a.addYears(b,!0);break;case 1:a.addMonths(b,!0);break;case 2:a.addWeeks(b);break;case 3:a.addDays(b);break;case 4:a.addHours(b);break;case 5:a.addMinutes(b);break;case 6:a.addSeconds(b)}return a.getTime()/1E3}
function spider_FormatDate(a,e){var b=new XDate(1E3*e,!0),d=spider_ReplaceString(a,"%yyyy",""+b.getFullYear()),d=spider_ReplaceString(d,"%yy",spider_Right(""+b.getFullYear(),2)),d=spider_ReplaceString(d,"%mm",spider_RSet(""+(b.getMonth()+1),2,"0")),d=spider_ReplaceString(d,"%dd",spider_RSet(""+b.getDate(),2,"0")),d=spider_ReplaceString(d,"%hh",spider_RSet(""+b.getHours(),2,"0")),d=spider_ReplaceString(d,"%ii",spider_RSet(""+b.getMinutes(),2,"0"));return d=spider_ReplaceString(d,"%ss",spider_RSet(""+
b.getSeconds(),2,"0"))}
function spider_ParseDate(a,e){var b=0,d,k,f=1970,l=1,m=1,n=0,p=0,q=0,g,h=function(a){for(g=0;$.isNumeric(a.charAt(g))&&g<a.length;)g++;return spider_Val(a)};if(a&&e){for(var c=0;c<a.length;)if(d=a.charAt(c),k=e.charAt(b),"%"==d)if(c++,"yyyy"==a.substring(c,c+4)){f=h(e.substring(b,b+4));if(-1==f)return-1;b+=g;c+=4}else if("yy"==a.substring(c,c+2)){f=h(e.substring(b,b+2));if(-1==f)return-1;f=70<=f?f+1900:f+2E3;b+=g;c+=2}else if("mm"==a.substring(c,c+2)){l=h(e.substring(b,b+2));if(-1==l)return-1;b+=
g;c+=2}else if("dd"==a.substring(c,c+2)){m=h(e.substring(b,b+2));if(-1==m)return-1;b+=g;c+=2}else if("hh"==a.substring(c,c+2)){n=h(e.substring(b,b+2));if(-1==n)return-1;b+=g;c+=2}else if("ii"==a.substring(c,c+2)){p=h(e.substring(b,b+2));if(-1==p)return-1;b+=g;c+=2}else if("ss"==a.substring(c,c+2)){q=h(e.substring(b,b+2));if(-1==q)return-1;b+=g;c+=2}else b++,c++;else{if(d!=k)return-1;c++;b++}if(b==e.length)return spider_Date(f,l,m,n,p,q)}return-1};

if("undefined"===typeof spider)var spider={};if("undefined"===typeof document)var document={};if("undefined"===typeof window)var window={};function spider_FinishDirectory(a){-1==a?spider.filesystem.objects.CleanAll():spider.filesystem.objects.Get(a)&&spider.filesystem.objects.Remove(a)}spider.filesystem={objects:new spider.object(spider_FinishDirectory),fs:null,cwd:null};function spider_RequestFileSystem(a,b,c){window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem}
function spider_ExamineDirectory(a,b,c,d){spider.filesystem.objects.Allocate(a)}function spider_GetExtensionPart(a){a=a.split(".");return 1===a.length||""===a[0]&&2===a.length?"":a.pop()};

if("undefined"===typeof spider)var spider={};function spider_InitImageDecoder(){};

spider.nbModules++;require(["filesaver.min","canvas-toBlob.min"],function(){spider.nbLoadedModules++;SpiderMain()});function spider_InitImage(){spider.image.div=document.createElement("div");$(spider.image.div).hide()}function spider_FreeImage(a){var b;if(-1==a)spider.image.objects.CleanAll();else if(b=spider.image.objects.Get(a))spider.image.div.removeChild(b.image),spider.image.objects.Remove(a)}
spider.image={objects:new spider.object(spider_FreeImage),counter:0,div:null,GetCSS:function(a){if(!a)return null;a.spiderCounter||(this.counter++,a.spiderCounter=this.counter);var b="spiderimage_"+a.spiderCounter;if(!a.css){a.css=!0;var c={};c["."+b]={"background-image":"url("+a.toDataURL()+")","background-repeat":"no-repeat",width:""+a.width+"px",height:""+a.height+"px"};$.injectCSS(c)}return b},GetGrayedCSS:function(a){a.spiderCounter||(this.counter++,a.spiderCounter=this.counter);var b="spiderimagegrayed_"+
a.spiderCounter;if(!a.grayedCss){a.grayedCss=!0;var c={},d="."+b,e;e=document.createElement("canvas");var f=e.getContext("2d");e.width=a.width;e.height=a.height;f.drawImage(a,0,0);for(var g=f.getImageData(0,0,e.width,e.height),l=0;l<g.height;l++)for(var p=0;p<g.width;p++){var m=4*l*g.width+4*p,r=(g.data[m]+g.data[m+1]+g.data[m+2])/3;g.data[m]=r;g.data[m+1]=r;g.data[m+2]=r}f.putImageData(g,0,0,0,0,g.width,g.height);e=e.toDataURL();c[d]={"background-image":"url("+e+")","background-repeat":"no-repeat",
width:""+a.width+"px",height:""+a.height+"px"};$.injectCSS(c)}return b},downscaleCanvas:function(a,b,c,d){var e=a.width,f=a.height;b=Math.round(b);c=Math.round(c);for(var g=e/b,l=f/c,p=Math.ceil(g/2),m=Math.ceil(l/2),r=a.getContext("2d"),n=r.getImageData(0,0,e,f),t=r.createImageData(b,c),n=n.data,s=t.data,k=0;k<c;k++)for(var q=0;q<b;q++){for(var w=4*(q+k*b),h=0,v=0,A=0,B=0,C=0,D=0,E=0,F=(k+0.5)*l,x=Math.floor(k*l),G=Math.ceil((k+1)*l);x<G;x++)for(var y=Math.abs(F-(x+0.5))/m,H=(q+0.5)*g,y=y*y,z=Math.floor(q*
g),I=Math.ceil((q+1)*g);z<I;z++)if(h=Math.abs(H-(z+0.5))/p,h=Math.sqrt(y+h*h),!(1<=h)){var h=2*h*h*h-3*h*h+1,u=4*(z+x*e),E=E+h*n[u+3],A=A+h;255>n[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<c;n++)for(var t=n*b,s=(n*l|0)*d,k=0;k<b;k++){var q=k*r|0;m[4*(t+k)+0]=p[4*(s+q)+0];m[4*(t+k)+1]=p[4*(s+q)+1];m[4*(t+k)+2]=p[4*(s+q)+2];m[4*(t+k)+3]=p[4*(s+q)+3]}f.putImageData(g,0,0)}else f.drawImage(a.image,0,0,a.image.width,a.image.height,0,0,b,c);spider.image.div.removeChild(a.image);a.image=e;spider.image.div.appendChild(e);
return 1}return 0}function spider_ImageID(a){var b;return(b=spider.image.objects.Get(a))?b.image:null}function spider_IsImage(a){return spider.image.objects.Is(a)};

function spider_Init2DDrawing(){}spider.drawing={output:null,context:null,frontColor:0,backColor:0,mode:0,stopDrawingCallback:null};function spider_helper_ColorToHtml(a,f){"undefined"===typeof f&&(f=0);var b=a>>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=$("<span>Hg</span>").css("font",a);var f=$('<div style="display: inline-block; width: 1px; height: 0px;"></div>'),b=$("<div></div>");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;c<a.nbDimensions&&(b=b[0],a.dimensions[c]=b.length-1,b);c++);}function spider_ArraySize(a,b){"undefined"===typeof b&&(b=1);return a.array?a.dimensions[b-1]:-1}function spider_FreeArray(a){for(var b=a.array.length=0;b<a.nbDimensions;b++)a.dimensions[b]=-1}
function spider_CopyArray(a,b){$.extend(!0,b,a)}function spider_CreateMultiArray(a,b){var c=null;try{b++;var c=Array(b||0),d=b;if(2<arguments.length){var e=Array.prototype.slice.call(arguments,0);for(e.splice(1,1);d--;)c[b-1-d]=spider_CreateMultiArray.apply(this,e)}else for(d=0;d<b;d++)c[d]=8==a.type?"":a.structure?new a.structure:0}catch(f){}return c}
function spider_Dim(a,b,c,d){a.structure=d;a.nbDimensions=c.length;a.dimensions=c;a.type=b;b=Array(a.nbDimensions+1);b[0]=a;for(d=0;d<a.nbDimensions;d++)b[d+1]=c[d];a.array=spider_CreateMultiArray.apply(this,b)}function spider_ReDim(a,b){var c;if(1==a.nbDimensions){a.array.length=b+1;if(b>a.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&&0<a.stack.length&&(a.isIndexInvalid=!0,a.current=a.stack.pop())}function spider_PreviousElement(a){var b;a.current&&(b=a.current.previous)&&(a.current=b,a.index--);return b?b:0}function spider_ResetList(a){a.isIndexInvalid=!0;a.current=0}function spider_ListSize(a){return a.nbElements}function spider_ChangeCurrentElement(a,b){a.isIndexInvalid=!0;a.current=b}
function spider_CopyList(a,b,c,d){if(b!=d)return 0;spider_ClearList(c);for(a=a.first;a;)b=spider_AddElement(c),a.copy(b),a=a.next;return 1}function spider_ClearList(a){a.current=0;a.first=0;a.last=0;a.nbElements=0;a.isIndexInvalid=!0}
function spider_DeleteElement(a,b){"undefined"===typeof b&&(b=0);if(a.current){a.nbElements--;var c=a.current.previous,d=a.current.next;c||d?c?(d?(c.next=d,d.previous=c,a.current=c):(c.next=0,a.current=c,a.last=c),a.index--):(d.previous=0,a.current=0,a.first=d,b&1?(a.current=d,a.index=0,a.isIndexInvalid=!1):(a.current=0,a.isIndexInvalid=!0)):(a.current=0,a.first=0,a.last=0,a.isIndexInvalid=!0)}return a.current}function spider_FreeList(a){a&&spider_ClearList(a)}
function spider_FirstElement(a){a.current=a.first;return a.current?(a.isIndexInvalid=!1,a.index=0,a.current):0}
function spider_SelectElement(a,b){var c,d;d=a.index;a.index=b;if(0>b||b>=a.nbElements)c=0;else if(a.isIndexInvalid)if(b<a.nbElements/2)for(c=a.first;c&&0<b;)c=c.next,b--;else for(c=a.last,b=a.nbElements-1-b;c&&0<b;)c=c.previous,b--;else if(b>d)if(c=a.current,b-d<a.nbElements-b)for(b-=d;c&&0<b;)c=c.next,b--;else for(c=a.last,b=a.nbElements-1-b;c&&0<b;)c=c.previous,b--;else if(d-b<b)for(c=a.current,b=d-b;c&&0<b;)c=c.previous,b--;else for(c=a.first;c&&0<b;)c=c.next,b--;if(a.current=c)return a.isIndexInvalid=
!1,c;a.isIndexInvalid=!0;return 0}function spider_SplitList(a,b,c){var d,e=0;spider_ClearList(b);if(a.current){c?c=a.current.next:(c=a.current,a.current.previous?(a.current=a.current.previous,a.index--):(a.current=0,a.isIndexInvalid=1));if(c)for(d=a.last,c.previous&&(c.previous.next=0),a.first==c&&(a.first=0),a.last=c.previous,b.first=c,b.last=d,c.previous=0,d.next=0;c;)e++,c=c.next;a.nbElements-=e;b.nbElements=e}}
function spider_SwapElements(a,b,c){var d,e;b!=c&&(a.isIndexInvalid=1,d=c.next,e=c.previous,b.next==c?(c.next=b,c.previous=b.previous,b.next=d,b.previous=c,c.previous?c.previous.next=c:a.first=c,b.next?b.next.previous=b:a.last=b):b.previous==c?(c.next=b.next,c.previous=b,b.next=c,b.previous=e,c.next?c.next.previous=c:a.last=c,b.previous?b.previous.next=b:a.first=b):(b.next?b.next.previous=c:a.last=c,c.next=b.next,b.previous?b.previous.next=c:a.first=c,c.previous=b.previous,d?d.previous=b:a.last=b,
b.next=d,e?e.next=b:a.first=b,b.previous=e))};

spider.nbModules++;require(["seedrandom.min"],function(a){spider.nbLoadedModules++;SpiderMain()});function spider_Abs(a){return Math.abs(a)}function spider_ACos(a){return Math.acos(a)}function spider_ACosH(a){return Math.log(a+Math.sqrt(a*a-1))}function spider_ASin(a){return Math.asin(a)}function spider_ASinH(a){return Math.log(a+Math.sqrt(a*a+1))}function spider_ATan(a){return Math.atan(a)}function spider_ATan2(a,b){return Math.atan2(b,a)}
function spider_ATanH(a){return 0.5*Math.log((1+a)/(1-a))}function spider_CosH(a){return(Math.exp(a)+Math.exp(-a))/2}function spider_Degree(a){return 180/Math.PI*a}function spider_Radian(a){return Math.PI/180*a}function spider_Log(a){return Math.log(a)}function spider_Log10(a){return Math.log(a)/2.302585092994046}function spider_Exp(a){return Math.exp(a)}function spider_Mod(a,b){return a%b}function spider_Infinity(){return Number.POSITIVE_INFINITY}function spider_NaN(){return NaN}
function spider_IsInfinity(a){return a==Number.POSITIVE_INFINITY||a==Number.NEGATIVE_INFINITY?1:0}function spider_Sqr(a){return Math.sqrt(a)}function spider_Cos(a){return Math.cos(a)}function spider_Round(a,b){switch(b){case 1:return Math.ceil(a);case 2:return 0<a?Math.floor(a+0.5):Math.ceil(a-0.5);default:return Math.floor(a)}}function spider_Sign(a){return a?0>a?-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<b.length;e+=2)0===b[e]&&(b[e]=a);spider.vectordrawing.context2d.setLineDash(b);spider.vectordrawing.context2d.lineDashOffset=d;spider_VectorDrawing_GenericStrokePath(a,c);spider.vectordrawing.context2d.setLineDash([])}}
function spider_DashPath(a,b,c,d){"undefined"===typeof c&&(c=0);"undefined"===typeof d&&(d=0);spider.vectordrawing.DashPath?spider.vectordrawing.DashPath(a,b,c,d):(spider.vectordrawing.context2d.setLineDash([b,b]),spider.vectordrawing.context2d.lineDashOffset=d,spider_VectorDrawing_GenericStrokePath(a,c),spider.vectordrawing.context2d.setLineDash([]))}
function spider_DotPath(a,b,c,d){"undefined"===typeof c&&(c=0);"undefined"===typeof d&&(d=0);spider.vectordrawing.DotPath?spider.vectordrawing.DotPath(a,b,c,d):(spider.vectordrawing.context2d.setLineDash([0,b]),spider.vectordrawing.context2d.lineDashOffset=d,spider_VectorDrawing_GenericStrokePath(a,c|16),spider.vectordrawing.context2d.setLineDash([]))}
function spider_AddPathSegments(a,b){function c(a){for(var b=n,c=0;b<m.length&&!isNaN(parseFloat(m[b]));)c++,b++;return c>=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<a.length}),n=0,f={currentX:0,currentY:0,controlX:0,controlY:0,lastCommand:null};b&1&&(f.currentX=spider_PathCursorX(),f.currentY=spider_PathCursorY());for(;n<m.length;){var u=m[n++],k=!1;switch(u){case "M":k=
e(!1);break;case "m":k=e(!0);break;case "L":k=g(!1);break;case "l":k=g(!0);break;case "H":k=h(!1);break;case "h":k=h(!0);break;case "V":k=l(!1);break;case "v":k=l(!0);break;case "C":k=q(!1);break;case "c":k=q(!0);break;case "S":k=r(!1);break;case "s":k=r(!0);break;case "Q":k=s(!1);break;case "q":k=s(!0);break;case "T":k=t(!1);break;case "t":k=t(!0);break;case "Z":case "z":spider_ClosePath(),f.currentX=spider_PathCursorX(),f.currentY=spider_PathCursorY(),k=!0}if(!k)break;f.lastCommand=u}}
function spider_PathSegments(){return""}function spider_FillPath(a){"undefined"===typeof a&&(a=0);spider.vectordrawing.FillPath?spider.vectordrawing.FillPath(a):(spider.vectordrawing.context2d.fill(a&256?"nonzero":"evenodd"),0===(a&8)&&spider_ResetPath())}
function spider_BeginVectorLayer(a){"undefined"===typeof a&&(a=255);if(spider.vectordrawing.BeginVectorLayer)spider.vectordrawing.BeginVectorLayer(a);else{spider.vectordrawing.context2d.save();var b;"undefined"!==typeof OffscreenCanvas?b=new OffscreenCanvas(spider.vectordrawing.context2d.canvas.width,spider.vectordrawing.context2d.canvas.height):(b=document.createElement("canvas"),b.width=spider.vectordrawing.context2d.canvas.width,b.height=spider.vectordrawing.context2d.canvas.height);b=b.getContext("2d");
b.setTransform&&spider.vectordrawing.context2d.getTransform&&b.setTransform(spider.vectordrawing.context2d.getTransform());b.fillStyle=spider.vectordrawing.context2d.fillStyle;b.strokeStyle=spider.vectordrawing.context2d.strokeStyle;b.lineWidth=spider.vectordrawing.context2d.lineWidth;b.lineCap=spider.vectordrawing.context2d.lineCap;b.lineJoin=spider.vectordrawing.context2d.lineJoin;b.font=spider.vectordrawing.context2d.font;spider.vectordrawing.layers.push(spider.vectordrawing.context2d);spider.vectordrawing.layerAlpha.push(a/
255);spider.vectordrawing.context2d=b;spider_ResetPath()}}function spider_EndVectorLayer(){if(spider.vectordrawing.EndVectorLayer)spider.vectordrawing.EndVectorLayer();else if(0!==spider.vectordrawing.layers.length){var a=spider.vectordrawing.layers.pop(),b=spider.vectordrawing.layerAlpha.pop();a.save();a.globalAlpha=b;a.drawImage(spider.vectordrawing.context2d.canvas,0,0);a.restore();spider.vectordrawing.context2d=a;spider.vectordrawing.context2d.restore();spider_ResetPath()}}
function spider_FillVectorOutput(){spider.vectordrawing.context2d.save();spider.vectordrawing.context2d.setTransform(1,0,0,1,0,0);spider.vectordrawing.context2d.fillRect(0,0,spider.vectordrawing.output.width,spider.vectordrawing.output.height);spider.vectordrawing.context2d.restore()}function spider_IsInsidePath(a,b,c){return spider.vectordrawing.context2d.isPointInPath(a,b)}
function spider_IsInsideStroke(a,b,c,d){d=spider.vectordrawing.context2d.lineWidth;spider.vectordrawing.context2d.lineWidth=c;a=spider.vectordrawing.context2d.isPointInStroke(a,b);spider.vectordrawing.context2d.lineWidth=d;return a}function spider_PathBoundsX(){return spider.vectordrawing.PathBoundsX?spider.vectordrawing.PathBoundsX():0}function spider_PathBoundsY(){return spider.vectordrawing.PathBoundsY?spider.vectordrawing.PathBoundsY():0}
function spider_PathBoundsWidth(){return spider.vectordrawing.PathBoundsWidth?spider.vectordrawing.PathBoundsWidth():0}function spider_PathBoundsHeight(){return spider.vectordrawing.PathBoundsHeight?spider.vectordrawing.PathBoundsHeight():0}function spider_VectorFont(a,b){"undefined"===typeof b&&(b=-1);if(spider.vectordrawing.VectorFont)spider.vectordrawing.VectorFont(a,b);else{var c={};$.extend(c,a);-1!=b&&(c.size=b+"px");spider.vectordrawing.context2d.font=c.size+" "+c.family}}
function spider_DrawVectorText(a){spider.vectordrawing.DrawVectorText?spider.vectordrawing.DrawVectorText(a):(spider.vectordrawing.context2d.fillText(a,spider.vectordrawing.x,spider.vectordrawing.y),spider.vectordrawing.x+=spider_VectorTextWidth(a))}
function spider_DrawVectorParagraph(a,b,c,d){"undefined"===typeof d&&(d=0);if(spider.vectordrawing.DrawVectorParagraph)spider.vectordrawing.DrawVectorParagraph(a,b,c,d);else{switch(d){case 2:d="right";break;case 4:d="center";break;default:d="left"}c=spider.vectordrawing.context2d.textAlign;spider.vectordrawing.context2d.textAlign=d;d=parseFloat(spider.vectordrawing.context2d.font);var e=a.split(" ");a=[];for(var g=e[0],h=1;h<e.length;h++){var l=e[h];spider.vectordrawing.context2d.measureText(g+" "+
l).width<b?g+=" "+l:(a.push(g),g=l)}a.push(g);for(e=0;e<a.length;e++)spider.vectordrawing.context2d.fillText(a[e],spider.vectordrawing.x,spider.vectordrawing.y,b),spider.vectordrawing.y+=d;spider.vectordrawing.context2d.textAlign=c}}function spider_VectorTextWidth(a,b){"undefined"===typeof b&&(b=0);if(spider.vectordrawing.VectorTextWidth)spider.vectordrawing.VectorTextWidth(a,b);else return b&4?0:spider.vectordrawing.context2d.measureText(a).width}
function spider_VectorTextHeight(a,b){"undefined"===typeof b&&(b=0);if(spider.vectordrawing.VectorTextHeight)spider.vectordrawing.VectorTextHeight(a,b);else{if(b&4)return 0;var c=spider.vectordrawing.context2d.measureText(a||"");if(c&&(void 0!==c.actualBoundingBoxAscent||void 0!==c.actualBoundingBoxDescent))return c=(c.actualBoundingBoxAscent||0)+(c.actualBoundingBoxDescent||0),b&8?c/1.4:c;c=/(d+(?:.d+)?)px/.exec(spider.vectordrawing.context2d.font||"");c=1.2*(c?parseFloat(c[1]):16);b&8&&(c/=1.4);
return c}}function spider_VectorUnit(){return spider.vectordrawing.output.outputUnit}
function spider_VectorSourceImage(a,b,c,d,e){"undefined"===typeof b&&(b=255);"undefined"===typeof c&&(c=-1);"undefined"===typeof d&&(d=-1);"undefined"===typeof e&&(e=0);spider.vectordrawing.VectorSourceImage?spider.vectordrawing.VectorSourceImage(a,b,c,d,e):(spider.vectordrawing.context2d.globalAlpha=b/255,a=spider.vectordrawing.context2d.createPattern(a,e&2?"repeat":"no-repeat"),spider.vectordrawing.context2d.fillStyle=a,spider.vectordrawing.context2d.globalAlpha=1)}
function spider_DrawVectorImage(a,b,c,d){"undefined"===typeof b&&(b=255);"undefined"===typeof c&&(c=-1);spider.vectordrawing.DrawVectorImage?spider.vectordrawing.DrawVectorImage(a,b,c,d):(spider.vectordrawing.context2d.globalAlpha=b/255,-1==c?spider.vectordrawing.context2d.drawImage(a,spider.vectordrawing.x,spider.vectordrawing.y):spider.vectordrawing.context2d.drawImage(a,spider.vectordrawing.x,spider.vectordrawing.y,c,d),spider.vectordrawing.context2d.globalAlpha=1)}
function spider_PathCursorX(){return spider.vectordrawing.x}function spider_PathCursorY(){return spider.vectordrawing.y}function spider_FlipCoordinatesX(a,b){"undefined"===typeof b&&(b=2);spider.vectordrawing.FlipCoordinatesX?spider.vectordrawing.FlipCoordinatesX(a,b):(spider.vectordrawing.context2d.translate(a,0),spider.vectordrawing.context2d.transform(-1,0,0,1,0,0),spider.vectordrawing.context2d.translate(-a,0))}
function spider_FlipCoordinatesY(a,b){"undefined"===typeof b&&(b=2);spider.vectordrawing.FlipCoordinatesY?spider.vectordrawing.FlipCoordinatesY(a,b):(spider.vectordrawing.context2d.translate(0,a),spider.vectordrawing.context2d.transform(1,0,0,-1,0,0),spider.vectordrawing.context2d.translate(0,-a))}function spider_ResetCoordinates(){spider.vectordrawing.ResetCoordinates?spider.vectordrawing.ResetCoordinates():spider.vectordrawing.context2d.setTransform(1,0,0,1,0,0)}
function spider_RotateCoordinates(a,b,c,d){spider.vectordrawing.RotateCoordinates?spider.vectordrawing.RotateCoordinates(a,b,c,d):(spider.vectordrawing.context2d.translate(a,b),spider.vectordrawing.context2d.rotate(spider_Radian(c)),spider.vectordrawing.context2d.translate(-a,-b))}function spider_ScaleCoordinates(a,b,c){"undefined"===typeof c&&(c=2);spider.vectordrawing.ScaleCoordinates?spider.vectordrawing.ScaleCoordinates(a,b,c):spider.vectordrawing.context2d.scale(a,b)}
function spider_TranslateCoordinates(a,b,c){"undefined"===typeof c&&(c=2);spider.vectordrawing.TranslateCoordinates?spider.vectordrawing.TranslateCoordinates(a,b,c):spider.vectordrawing.context2d.translate(a,b)}function spider_SkewCoordinates(a,b,c){"undefined"===typeof c&&(c=2);spider.vectordrawing.SkewCoordinates?spider.vectordrawing.SkewCoordinates(a,b,c):(a=Math.tan(spider_Radian(a)),b=Math.tan(spider_Radian(b)),spider.vectordrawing.context2d.transform(1,b,a,1,0,0))}
function spider_VectorOutputWidth(){return spider.vectordrawing.VectorOutputWidth?spider.vectordrawing.VectorOutputWidth():spider.vectordrawing.output.width}function spider_VectorOutputHeight(){return spider.vectordrawing.VectorOutputHeight?spider.vectordrawing.VectorOutputHeight():spider.vectordrawing.output.height}function spider_VectorResolutionX(){return 0}function spider_VectorResolutionY(){return 0}
function spider_ClipPath(a){"undefined"===typeof a&&(a=0);spider.vectordrawing.ClipPath?spider.vectordrawing.ClipPath(a):(spider.vectordrawing.context2d.clip(),0===(a&8)&&spider_ResetPath())}function spider_NewVectorPage(){spider.vectordrawing.NewVectorPage&&spider.vectordrawing.NewVectorPage()};

var dijit,dojox;
(function(){function F(d){var f;-1==d?spider.gadget.objects.CleanAll():!(f=spider.gadget.objects.Get(d))||spider.debug&&spider.debug.editorGadget==d||(f.tooltip&&f.tooltip.destroy(),f.Free?f.Free():(f.div.parentNode&&f.div.parentNode.removeChild(f.div),f.gadget instanceof dijit._WidgetBase&&f.gadget.destroy()),spider.gadget.objects.Remove(d))}function t(d,f,g,l,p){d.style.position="absolute";d.style.left=f+"px";d.style.top=g+"px";d.style.width=l+"px";d.style.height=p+"px"}function n(d,f){d.isDisabled||
spider.event.Send(1,d.windowId,d.id,f)}function x(d,f,g,l,p){d.domNode.style.position="absolute";d.domNode.style.left=f+"px";d.domNode.style.top=g+"px";d.domNode.style.width=l+"px";d.domNode.style.height=p+"px"}function u(d){var f=$(d).cssValue("paddingLeft")+$(d).cssValue("paddingRight")+$(d).cssValue("borderLeftWidth")+$(d).cssValue("borderRightWidth");d=$(d).cssValue("paddingTop")+$(d).cssValue("paddingBottom")+$(d).cssValue("borderTopWidth")+$(d).cssValue("borderBottomWidth");return{x:f,y:d}}
function B(d){var f;spider.gadget.context||(spider.gadget.canvas=document.createElement("canvas"),spider.gadget.canvas.width=2E3,spider.gadget.canvas.height=200,spider.gadget.context=spider.gadget.canvas.getContext("2d"));return(f=spider.gadget.objects.Get(d))&&f.GetRequiredSize?f.GetRequiredSize():{width:0,height:0}}function z(d,f,g){var l=spider.gadget.context;f||(d=$(spider_WindowID(d.windowId).contentFrame),f=$(d).css("fontSize")+" "+$(d).css("fontFamily"));l.font=f;d=spider_2ddrawing_getTextHeight(l.font);
d=d.ascent+d.descent;return{width:Math.ceil(2*l.measureText(g).width),height:d}}function G(d,f){-1==f?($(d).css("fontFamily",""),$(d).css("fontSize",""),$(d).css("lineHeight",""),$(d).css("fontStyle",""),$(d).css("fontWeight","")):($(d).css("fontFamily",f.family),$(d).css("fontSize",f.size),$(d).css("lineHeight",f.size),$(d).css("fontStyle",f.style),$(d).css("fontWeight",f.weight))}function A(d,f,g){var l;$(d).find(f).each(function(){if(-1<$(this).attr("class").search(g))return l=this,!1});return l}
function E(d,f,g,l){l?($(f).css("background-color",""),$(g).css("color","")):(d.backColor&&-1!=d.backColor&&d.SetColor(2,d.backColor),d.frontColor&&-1!=d.frontColor&&d.SetColor(1,d.frontColor));d.gadget.set("disabled",l?!0:!1)}function C(d,f,g,l,p){switch(l){case 2:d.gadget.get("disabled")||$(f).css("background-color",spider_helper_ColorToHtml(p));d.backColor=p;break;case 1:d.gadget.get("disabled")||$(g).css("color",spider_helper_ColorToHtml(p)),d.frontColor=p}}function H(d){d.gadget instanceof dijit._WidgetBase&&
d.gadget.set("_onChangeActive",!1)}function I(d){d.gadget instanceof dijit._WidgetBase&&d.gadget.set("_onChangeActive",!0)}function J(d,f){var g;if(g=spider.gadget.objects.Get(d))H(g),g.SetText&&g.SetText(f),I(g)}function K(d,f){var g;if(-1==d)spider.gadget.defaultFont=f;else if(g=spider.gadget.objects.Get(d))g.SetFont?g.SetFont(f):G(g.div,f)}function L(d,f){"undefined"===typeof f&&(f=0);var g;if(g=spider.gadget.objects.Get(d)){if(g.GetHeight)return g.GetHeight(f);if(1==f)return B(d).height;var l=
u(g.div);return Math.round($(g.div).height()+l.y)}return 0}function M(d,f){"undefined"===typeof f&&(f=0);var g;if(g=spider.gadget.objects.Get(d)){if(g.GetWidth)return g.GetWidth(f);if(1==f)return B(d).width;var l=u(g.div);return Math.round($(g.div).width()+l.x)}return 0}function N(d,f){"undefined"===typeof f&&(f=0);var g,l;return(g=spider.gadget.objects.Get(d))?1==f?(l=g.div.getBoundingClientRect(),l.left+window.scrollX|0):2==f?(l=g.div.getBoundingClientRect(),(l.left+window.scrollX|0)-spider_WindowX(g.windowId)):
parseInt($(g.div).css("left"),10):0}function O(d,f){"undefined"===typeof f&&(f=0);var g,l;return(g=spider.gadget.objects.Get(d))?1==f?(l=g.div.getBoundingClientRect(),l.top+window.scrollY|0):2==f?(l=g.div.getBoundingClientRect(),(l.top+window.scrollY|0)-spider_WindowY(g.windowId)):parseInt($(g.div).css("top"),10):0}spider.nbModules++;require("dijit/dijit dojo/store/Memory dojo/store/Observable dojo/_base/declare dojo/aspect dojo/_base/lang dgrid/OnDemandGrid dgrid/Selection dgrid/Keyboard dgrid/extensions/ColumnResizer dstore/Memory dstore/Trackable cbtree/store/Hierarchy dijit/tree/ObjectStoreModel cbtree/model/ForestStoreModel dijit/focus dijit/registry dijit/form/SimpleTextarea dijit/form/Button dijit/form/ToggleButton dijit/form/RadioButton dijit/form/ComboBox dijit/form/Select dijit/form/CheckBox dijit/form/Textarea dijit/form/SimpleTextarea dijit/form/NumberTextBox dijit/form/HorizontalSlider dijit/form/VerticalSlider dijit/ProgressBar dijit/Tooltip dijit/layout/TabContainer dijit/form/NumberSpinner dijit/form/DateTextBox dijit/Tree dijit/tree/ObjectStoreModel dijit/Calendar dijit/Toolbar dijit/ToolbarSeparator dijit/Menu dijit/MenuItem dijit/MenuSeparator dijit/DropDownMenu dijit/MenuBar dijit/PopupMenuBarItem dijit/PopupMenuItem dijit/layout/ContentPane dijit/layout/BorderContainer dojo/dom-style dojo/data/ItemFileWriteStore dgrid/Grid dgrid/extensions/ColumnReorder dojo/domReady!".split(" "),
function(d,f,g,l,p,m,h,e,c,b,a,k,r,q,w,s,v,D){spider.nbLoadedModules++;dijit=d;spider.StoreMemory=f;spider.StoreObservable=g;spider.DojoBaseDeclare=l;spider.DojoAspect=p;spider.DojoBaseLang=m;spider.DGridOnDemandGrid=h;spider.DGridSelection=e;spider.DGridKeyboard=c;spider.DGridColumnResizer=b;spider.DStoreMemory=a;spider.DStoreTrackable=k;spider.CBTreeStoreHierarchy=r;spider.TreeObjectStoreModel=q;spider.CBTreeModelForestStoreModel=w;spider.DigitFocus=s;spider.DigitRegistry=v;spider.DojoDomStyle=
D;SpiderMain()});spider.gadget={defaultFont:-1,objects:new spider.object(F),optionGroupCount:0,lastType:null,register:function(d,f,g,l){this.lastType=f;d.type=f;d.div=g;d.gadget=l;d.windowId=spider.window.currentWindowId;d.userData=0;l.spiderId=d.id;-1!=this.defaultFont&&K(d.id,this.defaultFont);spider.window.gadgetList.get().appendChild(g)},freeWindowGadgets:function(d){this.objects.EnumerateAll(function(f,g){g.windowId==d&&F(f)})}};window.spider_InitGadget=function(){};window.spider_AddGadgetColumn=
function(d,f,g,l){var p;(p=spider.gadget.objects.Get(d))&&p.AddColumn&&p.AddColumn(f,g,l)};window.spider_AddGadgetItem=function(d,f,g,l,p){"undefined"===typeof l&&(l=null);"undefined"===typeof p&&(p=0);var m;(m=spider.gadget.objects.Get(d))&&m.AddItem&&m.AddItem(f,g,l,p)};window.spider_BindGadgetEvent=function(d,f,g){"undefined"===typeof g&&(g=-1);var l;(l=spider.gadget.objects.Get(d))&&spider_BindEvent(1,f,l.windowId,l.id,g)};window.spider_ButtonGadget=function(d,f,g,l,p,m,h){"undefined"===typeof h&&
(h=0);var e=spider.gadget.objects.Allocate(d),c=new (h&16?dijit.form.ToggleButton:dijit.form.Button)({label:m,showLabel:!0,onClick:function(){n(e,0)}}),b=document.createElement("div");b.appendChild(c.domNode);$(b).css("overflow","hidden");h&16?(c.attr("iconClass","dijitCheckBoxIcon"),$(c.focusNode).css("display","table-cell")):$(c.containerNode).css("display","table-cell");h&8&&$(c.containerNode).css("white-space","normal");h&2?($(c.containerNode).css("text-align","left"),$(c.containerNode).css("padding-left",
"5px")):h&1&&($(c.containerNode).css("text-align","right"),$(c.containerNode).css("padding-right","5px"));e.GetText=function(){return c.get("label")};e.SetText=function(a){c.set("label",a)};e.GetState=function(){return h&16?c.get("checked")?1:0:0};e.SetState=function(a){h&16&&c.set("checked",a)};e.GetRequiredSize=function(){var a=$(b).css("fontSize")+" "+$(b).css("fontFamily"),a=z(e,a,e.GetText());a.width+=16;a.height+=8;debug("Button required size: "+a.width+"x"+a.height);return a};e.Resize=function(a,
e,d,q){t(b,a,e,d,q);a=A(b,"span","dijitButtonNode");a=u(a);$(c.titleNode).width(d-a.x);$(c.titleNode).height(q-a.y);0===(h&16)&&($(c.containerNode).width(d-a.x),$(c.containerNode).height(q-a.y))};spider.gadget.register(e,1,b,c);e.Resize(f,g,l,p);return e.resultId};window.spider_ButtonImageGadget=function(d,f,g,l,p,m,h){function e(a){c.pressedImage&&h&16&&(a?b.attr("iconClass",spider.image.GetCSS(c.pressedImage)):b.attr("iconClass",spider.image.GetCSS(c.image)))}"undefined"===typeof h&&(h=0);var c=
spider.gadget.objects.Allocate(d),b=new (h&16?dijit.form.ToggleButton:dijit.form.Button)({label:"",showLabel:!1,iconClass:spider.image.GetCSS(m),onClick:function(){e(c.GetState());n(c,0)}});c.image=m;var a=document.createElement("div");a.appendChild(b.domNode);$(b.titleNode).css("display","table-cell");c.GetState=function(){return h&16?b.get("checked")?1:0:0};c.SetState=function(a){h&16&&(b.set("checked",a),e(a))};c.GetAttribute=function(a){switch(a){case 1:return c.image?c.image:0}return 0};c.SetAttribute=
function(a,e){switch(a){case 1:b.attr("iconClass",spider.image.GetCSS(e));c.image=e;break;case 2:c.pressedImage=e}};c.Resize=function(c,e,d,f){t(a,c,e,d,f);c=A(a,"span","dijitButtonNode");c=u(c);$(b.titleNode).width(d-c.x);$(b.titleNode).height(f-c.y)};spider.gadget.register(c,19,a,b);c.Resize(f,g,l,p);return c.resultId};window.spider_CalendarGadget=function(d,f,g,l,p,m,h){function e(a){return new Date(spider_Year(a),spider_Month(a)-1,spider_Day(a))}function c(a){return spider_Date(a.getFullYear(),
a.getMonth()+1,a.getDate(),0,0,0)}"undefined"===typeof m&&(m=spider_Date());"undefined"===typeof h&&(h=0);var b=spider.gadget.objects.Allocate(d),a=new dijit.Calendar({constraints:{min:new Date(1601,0,0),max:new Date(9999,0,0)},isDisabledDate:function(c){if(a&&!b.isDisabled){var e=a.attr("constraints");return!(c>=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<v.length;a++)v[a].field=""+a,v[a].index=a;s.set("columns",v);s.resize()}"undefined"===typeof e&&(e=0);var a=spider.gadget.objects.Allocate(d),k=spider_NewList(function(){return{id:null,
text:null}}),r=spider.DojoBaseDeclare([spider.DStoreMemory,spider.DStoreTrackable]),q=new r,w=e,s,v=[],D="single",y=document.createElement("div");y.spiderId=a.id;d=spider.DojoBaseDeclare([spider.DGridOnDemandGrid,spider.DGridKeyboard,spider.DGridSelection,spider.DGridColumnResizer]);e&2&&(D="extended");s=new d({showHeader:!0,collection:q,selectionMode:D,minRowsPerPage:1E5});s.on("dgrid-select",function(b){n(a,9)});y.appendChild(s.domNode);$(y).css("cursor","default");$(y).on({click:function(){n(a,
0)},dblclick:function(){n(a,2)},mouseup:function(b){3===b.which&&(2===b.originalEvent.detail?n(a,3):n(a,1))}});a.Disable=function(b){(a.isDisabled=b)&&!a.previousSelection&&(a.previousSelection=a.GetState());s.set("allowTextSelection",b?!1:!0);s.set("selectionMode",b?"none":D);b||(a.previousSelection&&a.SetState(a.previousSelection),a.previousSelection=null)};a.AddItem=function(b,d,e,f){-1==b&&(b=spider_ListSize(k));0>=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<spider_ListSize(k)&&(s.select(a),setTimeout(function(){s.select(a);var b=$(y).find(".dgrid-selected");0<b.length?s.scrollTo({x:0,y:b.position().top}):s.scrollTo({x:0,y:0})},10))};a.GetText=function(){var b=
a.GetState();return-1!=b?spider_SelectElement(k,b).text:""};a.SetText=function(b){var c;for(spider_ResetList(k);c=spider_NextElement(k);)if(c.text==b){a.SetState(spider_ListIndex(k));break}};a.SetActive=function(){0<v.length&&v[0].headerNode.focus()};a.GetItemAttribute=function(a,b,c){return 1==b?v[c].width:0};a.SetItemAttribute=function(a,c,d,e){1==c&&(v[e].width=d,b())};a.GetItemState=function(a){var b=0,c=spider_SelectElement(k,a);c.checkBox&&c.checkBox.get("checked")&&(b|=2);s.isSelected(a)&&
(b|=1);return b};a.SetItemState=function(a,b){var c=spider_SelectElement(k,a);c.checkBox&&c.checkBox.set("checked",b&2?!0:!1);b&1?s.select(a):s.deselect(a)};a.GetItemData=function(a){var b;return(b=spider_SelectElement(k,a))?b.data?b.data:0:0};a.SetItemData=function(a,b){var c;if(c=spider_SelectElement(k,a))c.data=b};a.GetItemText=function(a,b){var c;return-1==a?(-1==b&&(b=0),v[b].label):(c=spider_SelectElement(k,a))?-1!=b?spider_StringField(c.text,b+1,spider_Chr(10)):c.text:""};a.SetItemText=function(a,
d,e){var f;if(-1==a)-1==e&&(e=0),v[e].label=d,b();else if(f=spider_SelectElement(k,a)){if(-1!=e){var g=f.text.split(spider_Chr(10));g[e]=d;f.text=g.join(spider_Chr(10))}else f.text=d;c(a,a)}};a.SetItemImage=function(a,b){var d;if(d=spider_SelectElement(k,a))d.image=b,c(a,a)};a.GetColor=function(b){switch(b){case 2:return a.backColor?a.backColor:-1;case 1:return a.frontColor?a.frontColor:-1}return-1};a.SetColor=function(b,c){switch(b){case 2:$(y).find("div").each(function(){if("dgrid-scroller"==$(this).attr("class"))return $(this).css("background-color",
spider_helper_ColorToHtml(c)),!1});a.backColor=c;break;case 1:$(y).find("div").each(function(){if("dgrid-scroller"==$(this).attr("class"))return $(this).css("color",spider_helper_ColorToHtml(c)),!1}),a.frontColor=c}};a.Resize=function(a,b,c,d){t(y,a,b,c,d);a=u(s.domNode);x(s,0,0,c-a.x,d-a.y);s.resize()};a.AddColumn(0,m,h);spider.gadget.register(a,12,y,s);a.Resize(f,g,l,p);var P=setInterval(function(){$(y).is(":visible")&&(clearInterval(P),s.startup(),s.resize())},10);return a.resultId};window.spider_ListViewGadget=
function(d,f,g,l,p,m){function h(){a=spider_NewList(function(){return{id:null,text:null}});k=new (spider.DojoBaseDeclare([spider.DStoreMemory,spider.DStoreTrackable]));r.set("collection",k)}function e(a,b){for(var c=a;c<=b;c++)k.put({id:c})}"undefined"===typeof m&&(m=0);var c=spider.gadget.objects.Allocate(d),b="single",a,k,r,q=document.createElement("div");$(q).css("cursor","default");q.spiderId=c.id;d=spider.DojoBaseDeclare([spider.DGridOnDemandGrid,spider.DGridKeyboard,spider.DGridSelection]);
m&1?b="extended":m&2&&(b="toggle");r=new d({showHeader:!1,selectionMode:b,keepScrollPosition:!0,minRowsPerPage:1E5,columns:[{renderCell:function(b,c,d,e){$(d).css("border","0px");c=spider_SelectElement(a,b.id);c=put("div",c.text);$(c).css("padding","1px");c.id=b.id;return c}}]});r.on("dgrid-select",function(a){n(c,9)});h();q.appendChild(r.domNode);$(q).on({click:function(){n(c,0)},dblclick:function(){n(c,2)},mouseup:function(a){3===a.which&&(2===a.originalEvent.detail?n(c,3):n(c,1))}});c.Disable=
function(a){(c.isDisabled=a)&&!c.previousSelection&&(c.previousSelection=c.GetState());r.set("allowTextSelection",a?!1:!0);r.set("selectionMode",a?"none":b);a||(c.previousSelection&&c.SetState(c.previousSelection),c.previousSelection=null)};c.AddItem=function(b,c,d,f){-1==b&&(b=spider_ListSize(a));0>=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&&b<spider_ListSize(a)&&(r.select(b),setTimeout(function(){r.select(b);r.scrollTo({y:$(q).find(".dgrid-selected").position().top})},
10))};c.GetText=function(){var b=c.GetState();return-1!=b?spider_SelectElement(a,b).text:""};c.SetText=function(b){var d;for(spider_ResetList(a);d=spider_NextElement(a);)if(d.text==b){c.SetState(spider_ListIndex(a));break}};c.GetItemState=function(a){return r.isSelected(a)?1:0};c.SetItemState=function(a,b){b?r.select(a):r.deselect(a)};c.GetItemData=function(b){var c;return(c=spider_SelectElement(a,b))?c.data?c.data:0:0};c.SetItemData=function(b,c){var d;if(d=spider_SelectElement(a,b))d.data=c};c.GetItemText=
function(b,c){var d;return(d=spider_SelectElement(a,b))?d.text:""};c.SetItemText=function(b,c,d){if(d=spider_SelectElement(a,b))d.text=c,e(b,b)};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(a,b){switch(a){case 2:$(q).find("div").each(function(){if("dgrid-scroller"==$(this).attr("class"))return $(this).css("background-color",spider_helper_ColorToHtml(b)),!1});c.backColor=b;break;case 1:$(q).css("color",
spider_helper_ColorToHtml(b)),c.frontColor=b}};c.Resize=function(a,b,c,d){t(q,a,b,c,d);a=u(r.domNode);x(r,0,0,c-a.x,d-a.y);$(q).find("div").each(function(){if("dgrid-content ui-widget-content"==$(this).attr("class"))return $(this).css("width","100%"),!1})};spider.gadget.register(c,6,q,r);r.startup();$(q).find("div").each(function(){if("dgrid-scroller"==$(this).attr("class"))return $(this).css("overflow-y","auto"),!1});c.Resize(f,g,l,p);return c.resultId};window.spider_OpenGadgetList=function(d,f){"undefined"===
typeof f&&(f=-1);var g,l,p;if(g=spider.gadget.objects.Get(d)){switch(g.type){case 33:l=g.div;break;case 16:l=g.contentPane.domNode;break;case 11:l=g.gadget.domNode;break;case 28:if(-1==f)spider.window.gadgetList.push(null,g.windowId);else if(p=g.getPanelChild(f))l=p.domNode}l&&spider.window.gadgetList.push(l,g.windowId)}};window.spider_OptionGadget=function(d,f,g,l,p,m){var h=spider.gadget.objects.Allocate(d);d="spideroption_"+h.id;5!=spider.gadget.lastType&&spider.gadget.optionGroupCount++;var e=
new dijit.form.RadioButton({id:d,name:"spideroptiongroup"+spider.gadget.optionGroupCount,onChange:function(){e.get("checked")&&n(h,0)}}),c=document.createElement("div"),b=document.createElement("span");b.className="sbVerticalCenter";c.appendChild(b);b.appendChild(e.domNode);var a=put(b,"label",{htmlFor:d,innerHTML:m});$(a).css("padding-left","5px");h.Disable=function(b){$(a).css("color",b?"gray":"");e.set("disabled",b?!0:!1)};h.GetState=function(){return e.get("checked")?1:0};h.SetState=function(a){e.set("checked",
a)};h.GetText=function(){return a.innerHTML};h.SetText=function(b){a.innerHTML=b};h.GetRequiredSize=function(){var a=$(c).css("fontSize")+" "+$(c).css("fontFamily"),a=z(h,a,h.GetText());a.width+=28;a.height+=6;return a};h.Resize=function(a,d,e,f){t(c,a,d,e,f);$(b).width(e);$(b).height(f)};spider.gadget.register(h,5,c,e);h.Resize(f,g,l,p);return h.resultId};window.spider_PanelGadget=function(d,f,g,l,p){function m(a){var b=e.getChildren();return 0<=a&&a<b.length?b[a]:null}var h=spider.gadget.objects.Allocate(d),
e=new dijit.layout.TabContainer({doLayout:!0}),c=document.createElement("div");c.appendChild(e.domNode);e.watch("selectedChildWidget",function(a,b,c){n(h,9)});var b=function(){$(c).find("div").each(function(){if("dijitTabListWrapper"==spider_Left($(this).attr("class"),19))return-2==$(this).cssValue("left")&&($(this).css("left","0px"),$(this).css("top","1px")),!1})};h.getPanelChild=m;h.AddItem=function(a,c,d,f){c=new dijit.layout.ContentPane({title:c,iconClass:d?spider.image.GetCSS(d):null});-1==a&&
(a=e.getChildren().length);e.addChild(c,a);spider.window.gadgetList.set(c.domNode);e.startup();e.resize();b()};h.RemoveItem=function(a){var c=h.CountItems();0<=a&&a<c&&(a=m(a),e.removeChild(a),a.destroy(),e.startup(),e.resize(),b())};h.ClearItems=function(){for(var a=h.CountItems(),b=0;b<a;b++)h.RemoveItem(0)};h.CountItems=function(){return e.getChildren().length};h.GetState=function(){for(var a=e.getChildren(),b=0;b<a.length;b++)if(a[b].get("selected"))return b;return-1};h.SetState=function(a){var b;
(b=m(a))&&e.selectChild(b)};h.GetItemData=function(a){var b;return(b=m(a))&&b.spiderData?b.spiderData:0};h.SetItemData=function(a,b){var c;if(c=m(a))c.spiderData=b};h.GetItemText=function(a,b){var c;return(c=m(a))?c.get("title"):""};h.SetItemText=function(a,c,d){if(a=m(a))a.set("title",c),b()};h.SetItemImage=function(a,b){var c;(c=m(a))&&c.set("iconClass",b?spider.image.GetCSS(b):null)};h.GetAttribute=function(a){var b,d=h.GetState();if(-1!=d&&(b=m(d)))switch(a){case 1:return $(b.domNode).width();
case 2:return $(b.domNode).height();case 3:return $(c).height()-$(b.domNode).height()}return 0};h.Disable=function(a){for(var b=e.getChildren(),c=0;c<b.length;c++)b[c].set("disabled",a?!0:!1)};h.Resize=function(a,d,f,g){t(c,a,d,f,g);x(e,0,0,f,g);h.disableResize||e.resize();b()};spider.gadget.register(h,28,c,e);h.disableResize=!0;h.Resize(f,g,l,p);h.disableResize=!1;spider.window.gadgetList.push(null,spider.window.currentWindowId);spider.DojoAspect.after(e,"resize",function(a,b){n(h,15)});return h.resultId};
window.spider_ProgressBarGadget=function(d,f,g,l,p,m,h,e){function c(){a.maximum=b.maximum-b.minimum}"undefined"===typeof e&&(e=0);var b=spider.gadget.objects.Allocate(d),a=new dijit.ProgressBar;$(a.labelNode).css("visibility","hidden");$(a.internalProgress).css("height","100%");var k=document.createElement("div");k.appendChild(a.domNode);b.minimum=m;b.maximum=h;c();b.GetState=function(){return a.get("value")+b.minimum};b.SetState=function(c){a.set("value",c-b.minimum)};b.GetAttribute=function(a){switch(a){case 1:return b.minimum;
case 2:return b.maximum}return 0};b.SetAttribute=function(a,d){switch(a){case 1:b.minimum=d;c();break;case 2:b.maximum=d,c()}};b.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)};spider.gadget.register(b,14,k,k);b.Resize(f,g,l,p);return b.resultId};window.spider_RemoveGadgetColumn=function(d,f){var g;(g=spider.gadget.objects.Get(d))&&g.RemoveColumn&&g.RemoveColumn(f)};window.spider_RemoveGadgetItem=function(d,f){var g;(g=spider.gadget.objects.Get(d))&&g.RemoveItem&&g.RemoveItem(f)};
window.spider_ResizeGadget=function(d,f,g,l,p){var m;if(m=spider.gadget.objects.Get(d))-65535==f&&(f=N(d)),-65535==g&&(g=O(d)),-65535==l&&(l=M(d)),-65535==p&&(p=L(d)),m.Resize&&m.Resize(f|0,g|0,l|0,p|0)};window.spider_ScrollAreaGadget=function(d,f,g,l,p,m,h,e,c){"undefined"===typeof e&&(e=1);"undefined"===typeof c&&(c=0);var b=spider.gadget.objects.Allocate(d),a=new dijit.layout.ContentPane({style:"overflow: hidden; padding: 0px;"}),k=document.createElement("div");$(k).css("overflow","auto");c&8||
$(k).addClass("sbScrollAreaBorder");a.placeAt(k);x(a,0,0,m,h);b.GetAttribute=function(b){switch(b){case 1:return $(a.domNode).width();case 2:return $(a.domNode).height();case 3:return k.scrollLeft;case 4:return k.scrollTop;case 5:return 1}return 0};b.SetAttribute=function(b,c){switch(b){case 1:$(a.domNode).width(c);break;case 2:$(a.domNode).height(c);break;case 3:k.scrollLeft=c;break;case 4:k.scrollTop=c}};b.GetColor=function(a){return 2==a?b.backColor?b.backColor:-1:-1};b.SetColor=function(a,c){2==
a&&($(k).css("background-color",spider_helper_ColorToHtml(c)),b.backColor=c)};b.Resize=function(b,c,d,e){var f=u(k);t(k,b,c,d-f.x,e-f.y);a.resize()};spider.gadget.register(b,16,k,k);b.Resize(f,g,l,p);spider.window.gadgetList.push(a.domNode,spider.window.currentWindowId);b.contentPane=a;spider.DojoAspect.after(a,"resize",function(a,c){n(b,15)});return b.resultId};window.spider_SetActiveGadget=function(d){if(d=spider.gadget.objects.Get(d))d.SetActive?d.SetActive():d.gadget instanceof dijit._WidgetBase&&
spider.DigitFocus.focus(d.gadget.focusNode?d.gadget.focusNode:d.gadget.domNode)};window.spider_SetGadgetAttribute=function(d,f,g){var l;(l=spider.gadget.objects.Get(d))&&l.SetAttribute&&l.SetAttribute(f,g)};window.spider_SetGadgetColor=function(d,f,g){var l;(l=spider.gadget.objects.Get(d))&&l.SetColor&&l.SetColor(f,g)};window.spider_SetGadgetData=function(d,f){var g;if(g=spider.gadget.objects.Get(d))g.userData=f};window.spider_SetGadgetFont=K;window.spider_SetGadgetItemAttribute=function(d,f,g,l,
p){"undefined"===typeof p&&(p=-1);var m;(m=spider.gadget.objects.Get(d))&&m.SetItemAttribute&&m.SetItemAttribute(f,g,l,p)};window.spider_SetGadgetItemData=function(d,f,g){var l;(l=spider.gadget.objects.Get(d))&&l.SetItemData&&l.SetItemData(f,g)};window.spider_SetGadgetItemImage=function(d,f,g){var l;(l=spider.gadget.objects.Get(d))&&l.SetItemImage&&l.SetItemImage(f,g)};window.spider_SetGadgetItemState=function(d,f,g){var l;(l=spider.gadget.objects.Get(d))&&l.SetItemState&&l.SetItemState(f,g)};window.spider_SetGadgetItemText=
function(d,f,g,l){"undefined"===typeof l&&(l=-1);var p;(p=spider.gadget.objects.Get(d))&&p.SetItemText&&p.SetItemText(f,g,l)};window.spider_SetGadgetState=function(d,f){var g;if(g=spider.gadget.objects.Get(d))H(g),g.SetState&&g.SetState(f),I(g)};window.spider_SetGadgetText=J;window.spider_SpinGadget=function(d,f,g,l,p,m,h,e){"undefined"===typeof e&&(e=0);var c=spider.gadget.objects.Allocate(d),b=new dijit.form.NumberSpinner({constraints:{min:m,max:h},intermediateChanges:!0,onChange:function(){var a=
b.get("value");a>c.oldValue?n(c,4):a<c.oldValue&&n(c,5);c.oldValue=a;n(c,9)},onFocus:function(){spider.DigitFocus.focus(b.focusNode);n(c,7)},onBlur:function(){n(c,8)}}),a=A(b.upArrowNode,"div","dijitArrowButtonInner"),k=A(b.downArrowNode,"div","dijitArrowButtonInner");"flat"===spider.gadgetTheme&&($(a).css("position","absolute"),$(k).css("position","absolute"));e&1&&$(b.focusNode).attr("readOnly",!0);var r=document.createElement("div");r.appendChild(b.domNode);c.Disable=function(a){E(c,b.focusNode.parentNode,
b.focusNode,a)};c.GetState=function(){return b.get("value")};c.SetState=function(a){c.oldValue=a;b.set("value",a)};c.GetAttribute=function(a){switch(a){case 1:return b.attr("constraints").min;case 2:return b.attr("constraints").max}return 0};c.SetAttribute=function(a,c){var d=b.attr("constraints");switch(a){case 1:d.min=c;b.attr("constraints",d);break;case 2:d.max=c,b.attr("constraints",d)}};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(a,d){C(c,b.focusNode.parentNode,b.focusNode,a,d)};c.GetRequiredSize=function(){var a=$(r).css("fontSize")+" "+$(r).css("fontFamily"),a=z(c,a,"Hg");a.width=60;a.height+=5;return a};c.Resize=function(c,d,e,f){t(r,c,d,e,f);c=u(b.domNode);x(b,0,0,e-c.x,f-c.y);e=A(r,"div","dijitSpinnerButtonContainer");$(e).height(f-c.y);$(a).css("top",(f-c.y)/4-8);$(k).css("top",(f-c.y)/4-8);"claro"==spider.gadgetTheme?$(b.focusNode).height(f-c.y-2):$(b.focusNode).height(f-c.y)};c.SetState(m);
spider.gadget.register(c,26,r,b);c.Resize(f,g,l,p);return c.resultId};window.spider_SplitterGadget=function(d,f,g,l,p,m,h,e){"undefined"===typeof e&&(e=0);var c,b,a,k,r,q=2,n=spider.gadget.objects.Allocate(d),s=function(){c.Resize(0,0,$(a.domNode).width(),$(a.domNode).height());b.Resize(0,0,$(k.domNode).width(),$(k.domNode).height())};if((c=spider.gadget.objects.Get(m))&&(b=spider.gadget.objects.Get(h))){r=new dijit.layout.BorderContainer({design:"sidebar",gutters:!1,liveSplitters:!0});d=e&1?"left":
"top";m="center";e&8&&(d="center",m=e&1?"right":"bottom");a=new dijit.layout.ContentPane({region:d,style:"overflow: hidden",content:"",splitter:!0});r.addChild(a);a.domNode.appendChild(c.div);k=new dijit.layout.ContentPane({style:"overflow: hidden",region:m,content:"",splitter:!0});r.addChild(k);k.domNode.appendChild(b.div);var v=document.createElement("div");r.placeAt(v);n.GetState=function(){return e&1?$(a.domNode).width():$(a.domNode).height()};n.SetState=function(b){e&8?e&1?$(k.domNode).width($(v).width()-
b-5):$(k.domNode).height($(v).height()-b-5):e&1?$(a.domNode).width(b):$(a.domNode).height(b);r.resize();s()};n.GetAttribute=function(d){switch(d){case 3:return c.id;case 4:return b.id;case 1:return a.attr("minSize");case 2:if(n.secondMinimumSize)return n.secondMinimumSize}return 0};n.SetAttribute=function(d,e){var f;switch(d){case 3:if(f=spider.gadget.objects.Get(e))spider_WindowID(c.windowId).content.appendChild(c.div),c=f,a.domNode.appendChild(c.div),s();break;case 4:if(f=spider.gadget.objects.Get(e))spider_WindowID(b.windowId).content.appendChild(b.div),
b=f,k.domNode.appendChild(b.div),s();break;case 1:a.attr("minSize",e);break;case 2:n.secondMinimumSize=e,n.secondMinimumSize&&a.attr("maxSize",$(r.domNode).width()-n.secondMinimumSize-16)}};n.Resize=function(a,b,c,d){t(v,a,b,c,d);x(r,0,0,c,d);0===(e&12)?(a=d,e&1&&(a=c),n.SetState(a/q)):(r.resize(),s())};spider.DojoAspect.after(a,"resize",function(b,d){q=e&1?$(v).width()/$(a.domNode).width():$(v).height()/$(a.domNode).height();c.Resize(0,0,$(a.domNode).width(),$(a.domNode).height())});spider.DojoAspect.after(k,
"resize",function(a,c){b.Resize(0,0,$(k.domNode).width(),$(k.domNode).height())});spider.gadget.register(n,29,v,r);r.startup();n.Resize(f,g,l,p);e&1?n.SetState(l/q-5):n.SetState(p/q-5)}else n.resultId=0;return n.resultId};window.spider_StringGadget=function(d,f,g,l,p,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d),c;h&16?c=new dijit.form.NumberTextBox({constraints:{min:0,places:0,pattern:"############"}}):(d={},d.type=h&1?"password":"text",h&64&&(d.placeHolder=m),c=new dijit.form.TextBox(d));
c.intermediateChanges=!0;c.attr("onChange",function(){h&4&&c.set("value",c.get("value").toUpperCase());h&8&&c.set("value",c.get("value").toLowerCase());n(e,9)});c.attr("onClick",function(){h&2&&!e.isFocused&&(e.isFocused=1,n(e,7))});c.attr("onFocus",function(){spider.DigitFocus.focus(c.focusNode);n(e,7)});c.attr("onBlur",function(){n(e,8);e.isFocused=0});h&2&&c.attr("readOnly",!0);h&32&&($(c.domNode).css("border","0px"),$(c.domNode).css("box-shadow","none"));var b=document.createElement("div");b.appendChild(c.domNode);
e.Disable=function(a){E(e,c.focusNode.parentNode,c.focusNode,a)};e.GetText=function(){var a=c.get("value");h&16&&(a=isNaN(a)?"":""+a);return a};e.SetText=function(a){h&16?c.set("value",""+spider_Val(a)):(h&4?a=a.toUpperCase():h&8&&(a=a.toLowerCase()),c.set("value",a))};e.GetAttribute=function(a){return 1==a?c.get("maxlength"):0};e.SetAttribute=function(a,b){1==a&&(c.set("maxlength",b),c.set("value",e.GetText().substring(0,b)))};e.GetColor=function(a){switch(a){case 2:return e.backColor?e.backColor:
-1;case 1:return e.frontColor?e.frontColor:-1}return-1};e.SetColor=function(a,b){C(e,c.focusNode.parentNode,c.focusNode,a,b)};e.GetRequiredSize=function(){var a=$(b).css("fontSize")+" "+$(b).css("fontFamily"),a=z(e,a,"Hg");a.width=30;a.height+=10;return a};e.SetActive=function(){spider.DigitFocus.focus(c.focusNode?c.focusNode:c.domNode)};e.Resize=function(a,d,e,f){t(b,a,d,e,f);a=u(c.domNode);x(c,0,0,e-a.x,f-a.y);"claro"==spider.gadgetTheme?$(c.focusNode).height(f-a.y-2):$(c.focusNode).height(f-a.y);
h&64&&(e=$(b).find(".dijitPlaceHolder"),$(e).css("vertical-align","middle"),$(e).css("height","100%"),$(e).css("line-height",f-a.y+1+"px"),$(e).css("margin-left","4px"))};spider.gadget.register(e,2,b,c);e.Resize(f,g,l,p);0===(h&64)&&J(e.id,m);return e.resultId};window.spider_TextGadget=function(d,f,g,l,n,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d),c=document.createElement("div"),b=document.createElement("span");c.appendChild(b);b.innerHTML=m;h&8&&(b.className="sbVerticalCenter");
h&4&&$(c).addClass("sbTextBorder");h&2?$(c).css("text-align","right"):h&1&&$(c).css("text-align","center");e.GetText=function(){return b.innerHTML};e.SetText=function(a){b.innerHTML=a};e.GetColor=function(a){switch(a){case 2:return e.backColor?e.backColor:-1;case 1:return e.frontColor?e.frontColor:-1}return-1};e.SetColor=function(a,b){switch(a){case 2:$(c).css("background-color",spider_helper_ColorToHtml(b));e.backColor=b;break;case 1:$(c).css("color",spider_helper_ColorToHtml(b)),e.frontColor=b}};
e.GetRequiredSize=function(){var a=$(c).css("fontSize")+" "+$(c).css("fontFamily"),a=z(e,a,e.GetText());a.width+=8;a.height+=6;return a};e.Resize=function(a,d,e,f){var g=u(c);t(c,a,d,e-g.x,f-g.y);$(b).width(e-g.x);$(b).height(f-g.y)};spider.gadget.register(e,3,c,b);e.Resize(f,g,l,n);return e.resultId};window.spider_TrackBarGadget=function(d,f,g,l,p,m,h,e){function c(){a.set("discreteValues",a.get("maximum")-a.get("minimum")+1)}"undefined"===typeof e&&(e=0);var b=spider.gadget.objects.Allocate(d),
a=new (e&2?dijit.form.VerticalSlider:dijit.form.HorizontalSlider)({minimum:m,maximum:h,showButtons:!1,intermediateChanges:!0,onChange:function(a){n(b,0)}});c();var k=document.createElement("div");k.appendChild(a.domNode);$(k).css("caret-color","transparent");b.GetState=function(){return a.get("value")|0};b.SetState=function(b){b>a.get("maximum")?b=a.get("maximum"):b<a.get("minimum")&&(b=a.get("minimum"));a.set("value",b)};b.GetAttribute=function(b){switch(b){case 1:return a.get("minimum");case 2:return a.get("maximum")}return 0};
b.SetAttribute=function(b,d){switch(b){case 1:a.set("minimum",d);c();break;case 2:a.set("maximum",d),c()}};b.GetRequiredSize=function(){var a={width:0,height:0};$.each($(k).children(),function(b,c){a.width+=$(c).outerWidth(!0);a.height+=$(c).outerHeight(!0)});return a};b.Resize=function(b,c,d,e){t(k,b,c,d,e);x(a,0,0,d,e)};spider.gadget.register(b,17,k,a);b.Resize(f,g,l,p);return b.resultId};window.spider_TreeGadget=function(d,f,g,l,p,m){function h(){var a=q.attr("selectedItem");if(null===a&&-1!=k||
null!==a&&k!=a.id)n(e,9),k=null===a?-1:a.id}"undefined"===typeof m&&(m=0);var e=spider.gadget.objects.Allocate(d),c=spider_NewList(function(){return{id:null,text:null}}),b,a=0,k=-1,r=!1,q,w=document.createElement("div");$(w).addClass("sbTreeBorder");spider.DojoBaseLang.extend(dijit.Tree,{refreshModel:function(){this._itemNodesMap={};this.rootNode.state="UNCHECKED";this.model.root.children=null;this.rootNode&&this.rootNode.destroyRecursive();this._load()}});b=new spider.CBTreeStoreHierarchy;d=new spider.CBTreeModelForestStoreModel({store:b,
query:{type:"root"},rootLabel:""});q=new dijit.Tree({model:d,getIconClass:function(a,b){var c;return(c=a.spiderItem)&&c.image?spider.image.GetCSS(c.image):""},showRoot:!1,onClick:function(a){h();n(e,0)},onDblClick:function(a){n(e,2)},onFocus:function(a){n(e,7)},onBlur:function(a){n(e,8)}});$(w).on("mouseup",function(a){3===a.which&&1===a.originalEvent.detail&&(h(),n(e,1))});w.appendChild(q.domNode);var s=function(){r||(r=setInterval(function(){clearInterval(r);r=!1;q.refreshModel()},0))};e.AddItem=
function(d,e,f,g){-1==d&&(d=spider_ListSize(c));0>=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(0<g)for(;h=spider_PreviousElement(c);)if(h.subLevel<g){f=h.id;break}b.add({id:a,name:e,type:0===g?"root":"child",parent:[f],spiderItem:d});a++;q.set("selectedItems",[]);s()};e.RemoveItem=function(a){spider_ListSize(c)>a&&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<a;b++)e.RemoveItem(0)};e.CountItems=function(){return spider_ListSize(c)};e.GetState=function(){var a=-1,b,d;if(b=q.attr("selectedItem"))for(spider_ResetList(c);d=spider_NextElement(c);)if(d.id==b.id){a=spider_ListIndex(c);break}return a};e.SetState=function(a){k=-1;if(-1===a)q.set("selectedItems",[]);else if(a=spider_SelectElement(c,a)){var d=b.get(a.id),e,f=[];if(0<a.subLevel){for(e=a.previous;0!==e;){f.unshift(e.id);if(0===e.subLevel)break;
e=e.previous}for(var g=0;g<f.length;g++)e=q.getNodesByItem(b.get(f[g])),q._expandNode(e[0])}q.set("selectedItems",[d]);(e=q.getNodesByItem(d))&&0<e.length&&e[0]&&e[0].domNode.scrollIntoView(!0);k=a.id}};e.GetText=function(){var a=e.GetState();return-1!=a?spider_SelectElement(c,a).text:""};e.SetText=function(a){var b;for(spider_ResetList(c);b=spider_NextElement(c);)if(b.text==a){e.SetState(spider_ListIndex(c));break}};e.SetAttribute=function(a,b){2===a&&(b?q.expandAll():q.collapseAll())};e.GetItemAttribute=
function(a,b,d){return 1==b&&(a=spider_SelectElement(c,a))?a.subLevel:0};e.GetItemState=function(a){var d=0;if(a=spider_SelectElement(c,a)){var e=q.get("selectedItem");e&&e.id==a.id&&(d|=1);a=q.getNodesByItem(b.get(a.id));d=a[0].isExpanded?d|2:d|8}return d};e.SetItemState=function(a,d){var e;if(e=spider_SelectElement(c,a))switch(r&&(clearInterval(r),r=!1,q.refreshModel()),d){case 1:q.set("selectedItems",[b.get(e.id)]);break;case 2:e=q.getNodesByItem(b.get(e.id));q._expandNode(e[0]);break;case 8:e=
q.getNodesByItem(b.get(e.id)),q._collapseNode(e[0])}};e.GetItemData=function(a){var b;return(b=spider_SelectElement(c,a))?b.data?b.data:0:0};e.SetItemData=function(a,b){var d;if(d=spider_SelectElement(c,a))d.data=b};e.GetItemText=function(a,b){var d;return(d=spider_SelectElement(c,a))?d.text:""};e.SetItemText=function(a,b,d){if(a=spider_SelectElement(c,a))a.text=b,s()};e.GetColor=function(a){switch(a){case 2:return e.backColor?e.backColor:-1;case 1:return e.frontColor?e.frontColor:-1}return-1};e.SetColor=
function(a,b){switch(a){case 2:$(w).find("div").each(function(){if("dojoDndContainer dijitTree"==$(this).attr("class")||"dijitTree dojoDndContainer"==$(this).attr("class"))return $(this).css("background-color",spider_helper_ColorToHtml(b)),!1});e.backColor=b;break;case 1:$(w).css("color",spider_helper_ColorToHtml(b)),e.frontColor=b}};e.Resize=function(a,b,c,d){var e=u(w);t(w,a,b,c-e.x,d-e.y);x(q,0,0,c-e.x,d-e.y)};spider.gadget.register(e,27,w,q);e.Resize(f,g,l,p);q.startup();return e.resultId};window.spider_UnbindGadgetEvent=
function(d,f,g){"undefined"===typeof g&&(g=-1);var l;(l=spider.gadget.objects.Get(d))&&spider_UnbindEvent(1,f,l.windowId,l.id,g)};window.spider_UseGadgetList=function(d){var f=spider.window.gadgetList.get();f&&(f=f.window);spider.window.gadgetList.set(d.content);spider.window.currentWindowId=d.id;return f};window.spider_WebGadget=function(d,f,g,l,p,m,h){"undefined"===typeof h&&(h=0);var e=spider.gadget.objects.Allocate(d),c=document.createElement("div");$(c).addClass("sbWebBorder");$(c).addClass("sbWebGadget");
var b=document.createElement("iframe");$(b).on("load",function(){n(e,16)});b.src=m;b.setAttribute("frameborder",0);c.appendChild(b);e.GetText=function(){return b.src};e.SetText=function(a){b.src=a};e.GetItemText=function(a,c){try{switch(a){case 1:return $(b).contents().find("html").html();case 4:var d;var e=b.contentWindow.document;d=e.getSelection?e.getSelection():e.selection?e.selection.createRange().text:void 0;return d;case 2:return $(b).contents().find("title").html()}}catch(f){}return""};e.SetItemText=
function(a,c,d){try{1==a&&(b.src="data:text/html;charset=utf-8,"+encodeURI(c))}catch(e){}};e.Resize=function(a,d,e,f){var g=u(c);t(c,a,d,e-g.x,f-g.y);t(b,0,0,e-g.x,f-g.y)};e.Disable=function(a){a?$(c).block({message:null,overlayCSS:{opacity:0.2,cursor:"default"}}):$(c).unblock()};spider.gadget.register(e,18,c,b);e.Resize(f,g,l,p);return e.resultId};window.spider_gadget_GetRequiredSize=B})();

spider.http={jqXHR:null,timeout:3E4};function spider_HTTPInfo(a){var c=spider.http.jqXHR;switch(a){case 0:return""+c.status;case 1:return c.statusText;case 3:return c.getAllResponseHeaders()}return""}function spider_HTTPTimeout(a){spider.http.timeout=a}
function spider_HTTPRequest(a,c,l,h,d,e){"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e={map:{}});for(var g=Object.keys(e.map),k={},b="GET",f=0;f<g.length;f++)k[g[f]]=e.map[g[f]]._s;$.support.cors=!0;switch(a){case 1:b="POST";break;case 2:b="PUT";break;case 4:b="DELETE";break;case 3:b="PATCH"}$.ajax({method:b,cache:!1,url:c,data:l,dataType:"html",headers:k,timeout:spider.http.timeout,success:function(a,c,b){spider.http.jqXHR=b;h(1,a,d)},error:function(a,b,c){spider.http.jqXHR=a;h(0,"",d)}})}
function spider_URLEncoder(a){return encodeURI(a)}function spider_URLDecoder(a){return decodeURI(a)};

spider.nbModules++;require(["filesaver.min"],function(){spider.nbLoadedModules++;SpiderMain()});function spider_InitJSON(){}function spider_FreeJSON(a){-1==a?spider.json.objects.CleanAll():spider.json.objects.Get(a)&&spider.json.objects.Remove(a)}spider.json={objects:new spider.object(spider_FreeJSON),errorMessage:""};function spider_IsJSON(a){return spider.json.objects.Is(a)}
function spider_JSON_Parse(a,b){try{return a.json=JSON.parse(b),spider.json.errorMessage="",1}catch(c){return spider.json.errorMessage=c.message,0}}function spider_JSON_GetValue(a){return 1==a.type?a.json[a.index]:2==a.type?a.json[a.key]:a.json}function spider_JSON_SetValue(a,b){1==a.type?a.json[a.index]=b:2==a.type?a.json[a.key]=b:a.json=b;return b}function spider_CreateJSON(a,b){var c=spider.json.objects.Allocate(a);c.json=null;return c.resultId}
function spider_JSONValue(a){var b;return(b=spider.json.objects.Get(a))?b:0}function spider_JSONType(a){return 1==a.type?spider_JSONType({json:a.json[a.index]}):2==a.type?spider_JSONType({json:a.json[a.key]}):a.json&&a.json.constructor===Array?4:null!==a.json&&"object"===typeof a.json?5:"number"===typeof a.json?2:"boolean"===typeof a.json?3:"string"===typeof a.json?1:0}
function spider_ComposeJSON(a,b){var c;"undefined"===typeof b&&(b=0);return(c=spider.json.objects.Get(a))?b&1?JSON.stringify(c.json,null,"\t"):JSON.stringify(c.json):0}function spider_ParseJSON(a,b,c){a=spider.json.objects.Allocate(a);if(spider_JSON_Parse(a,b))return a.resultId;spider.json.objects.Remove(a.id);return 0}
function spider_LoadJSON(a,b,c){"undefined"===typeof c&&(c=0);var e,d=spider.json.objects.Allocate(a);if(c&65536)if(a=spider.systembase.getLocalFile(b))c=new FileReader,$(c).on({load:function(a){(e=spider_JSON_Parse(d,a.target.result))?spider.event.SendLoading(18,6,b,d.id):(spider.event.SendLoading(19,6,b,d.id),spider.json.objects.Remove(d.id))},error:function(){spider.event.SendLoading(19,6,b,d.id);spider.json.objects.Remove(d.id)}}),c.readAsText(a,"UTF-8");else return spider.event.SendLoading(19,
6,b,d.id),spider.json.objects.Remove(d.id),0;else $.ajax({type:"GET",cache:!1,url:b,dataType:"html",success:function(a){(e=spider_JSON_Parse(d,a))?spider.event.SendLoading(18,6,b,d.id):(spider.event.SendLoading(19,6,b,d.id),spider.json.objects.Remove(d.id))},error:function(){spider.event.SendLoading(19,6,b,d.id);spider.json.objects.Remove(d.id)}});return d.resultId}function spider_AddJSONMember(a,b){a.json[b]=null;return{type:2,key:b,json:a.json}}
function spider_AddJSONElement(a,b){"undefined"===typeof b&&(b=-1);var c={type:1};c.json=a.json;0<=b?(c.index=b,c.json.splice(b,0,null)):(c.index=a.json.length,c.json.push(null));return c}function spider_ClearJSONElements(a){spider_JSON_SetValue(a,[])}function spider_ClearJSONMembers(a){spider_JSON_SetValue(a,{})}
function spider_JSON_DumpField(a){var b,c;if(a instanceof spider_SysArray){if(a.structure)for(b=Array(a.array.length),c=0;c<b.length;c++)b[c]=spider_JSON_DumpStructure(a.array[c],!1);else b=[],$.extend(!0,b,a.array);return b}if(a instanceof spider_SysList){b=[];for(c=a.first;0!==c&&null!==c;c=c.next)b.push(spider_JSON_DumpStructure(c,a.isNative));return b}if(a instanceof spider_SysMap){b={};var e=Object.keys(a.map);for(c=0;c<e.length;c++)b[e[c]]=spider_JSON_DumpStructure(a.map[e[c]],a.isNative);return b}return"object"==
typeof a?spider_JSON_DumpStructure(a,!1):a}function spider_JSON_DumpStructure(a,b){var c=Object.keys(a),e,d;if(b)for(d=0;d<c.length;d++){if(e=c[d],95==e.charCodeAt(0))return a[e]}else{var g={};for(d=0;d<c.length;d++)if(e=c[d],95==e.charCodeAt(0)){var f=a[e];e=e.substring(1,e.length);g[e]=spider_JSON_DumpField(f)}return g}return null}function spider_InsertJSONArray(a,b,c){spider_JSON_SetValue(a,spider_JSON_DumpField(b))}
function spider_InsertJSONList(a,b,c){spider_JSON_SetValue(a,spider_JSON_DumpField(b))}function spider_InsertJSONMap(a,b,c){spider_JSON_SetValue(a,spider_JSON_DumpField(b))}function spider_InsertJSONStructure(a,b,c){spider_JSON_SetValue(a,spider_JSON_DumpStructure(b))}
function spider_JSON_ExtractStructure(a,b){for(var c=Object.keys(b),e=0;e<c.length;e++){var d=c[e],g="_"+d,f=!1;a.hasOwnProperty(g)?f=!0:a.hasOwnProperty(g+"$")&&(g+="$",f=!0);f&&(f=a[g],d=b[d],f instanceof spider_SysArray?spider_JSON_ExtractArray(f,d):f instanceof spider_SysList?spider_JSON_ExtractList(f,d):f instanceof spider_SysMap?spider_JSON_ExtractMap(f,d):"object"==typeof f?spider_JSON_ExtractStructure(f,d):a[g]="string"==typeof f?null===d?"":""+d:d)}}
function spider_JSON_ExtractNativeElement(a,b){for(var c=Object.keys(a),e=0;e<c.length;e++){var d=c[e];if(95==d.charCodeAt(0)){a[d]=b;break}}}function spider_JSON_ExtractArray(a,b){spider_ReDim(a,b.length-1);for(var c=0;c<b.length;c++)a.structure?spider_JSON_ExtractStructure(a.array[c],b[c]):a.array[c]=b[c];spider_Array_UpdateDimensions(a)}
function spider_JSON_ExtractList(a,b){spider_ClearList(a);for(var c=0;c<b.length;c++){var e=spider_AddElement(a);a.isNative?spider_JSON_ExtractNativeElement(e,b[c]):spider_JSON_ExtractStructure(e,b[c])}}function spider_JSON_ExtractMap(a,b){spider_ClearMap(a);for(var c=Object.keys(b),e=0;e<c.length;e++){var d=spider_AddMapElement(a,c[e]);a.isNative?spider_JSON_ExtractNativeElement(d,b[c[e]]):spider_JSON_ExtractStructure(d,b[c[e]])}}
function spider_ExtractJSONArray(a,b,c){spider_JSON_ExtractArray(b,spider_JSON_GetValue(a))}function spider_ExtractJSONList(a,b,c){spider_JSON_ExtractList(b,spider_JSON_GetValue(a))}function spider_ExtractJSONMap(a,b,c){spider_JSON_ExtractMap(b,spider_JSON_GetValue(a))}function spider_ExtractJSONStructure(a,b,c){spider_JSON_ExtractStructure(b,spider_JSON_GetValue(a))}
function spider_ExportJSON(a,b,c){"undefined"===typeof c&&(c=0);return spider.json.objects.Get(a)?(a=new Blob([spider_ComposeJSON(a,c)],{type:"text/plain;charset=utf-8"}),saveAs(a,b),1):0}function spider_ExamineJSONMembers(a){spider.json.members=Object.keys(spider_JSON_GetValue(a));spider.json.currentIndex=0;return 1}
function spider_NextJSONMember(a){if(spider.json.currentIndex<spider.json.members.length)return spider.json.currentKey=spider.json.members[spider.json.currentIndex],spider.json.currentIndex++,1;spider.json.currentKey="";spider.json.members=null;return 0}function spider_JSONMemberKey(a){return spider.json.currentKey}function spider_JSONMemberValue(a){return{type:2,key:spider.json.currentKey,json:spider_JSON_GetValue(a)}}
function spider_SetJSONArray(a){a.json=spider_JSON_SetValue(a,[]);a.type=null;a.key=null;return a}function spider_SetJSONObject(a){a.json=spider_JSON_SetValue(a,{});a.type=null;a.key=null;return a}function spider_SetJSONBoolean(a,b){spider_JSON_SetValue(a,b?!0:!1)}function spider_SetJSONString(a,b){spider_JSON_SetValue(a,b)}function spider_SetJSONInteger(a,b){spider_JSON_SetValue(a,b)}function spider_SetJSONQuad(a,b){spider_JSON_SetValue(a,b)}
function spider_SetJSONFloat(a,b){spider_JSON_SetValue(a,b)}function spider_SetJSONDouble(a,b){spider_JSON_SetValue(a,b)}function spider_SetJSONNull(a){spider_JSON_SetValue(a,null)}function spider_JSONArraySize(a){return(a=spider_JSON_GetValue(a))&&a.constructor===Array?a.length:0}function spider_JSONObjectSize(a){a=spider_JSON_GetValue(a);return Object.keys(a).length}function spider_GetJSONElement(a,b){var c=spider_JSON_GetValue(a);return{type:1,index:b,json:c}}
function spider_GetJSONMember(a,b){var c=spider_JSON_GetValue(a);return c.hasOwnProperty(b)?{type:2,key:b,json:c}:0}function spider_RemoveJSONElement(a,b){a.json.splice(b,1)}function spider_RemoveJSONMember(a,b){a.json.hasOwnProperty(b)&&delete a.json[b]}function spider_ResizeJSONElements(a,b){a.json.length=b}function spider_GetJSONQuad(a){var b;return(b=spider_JSON_GetValue(a))?parseInt(b,10):0}function spider_GetJSONInteger(a){return spider_GetJSONQuad(a)}
function spider_GetJSONDouble(a){var b;return(b=spider_JSON_GetValue(a))?parseFloat(b):0}function spider_GetJSONFloat(a){return spider_GetJSONDouble(a)}function spider_GetJSONBoolean(a){return!0===spider_JSON_GetValue(a)?1:0}function spider_GetJSONString(a){var b;return(b=spider_JSON_GetValue(a))?""+b:""}function spider_JSONErrorMessage(){return spider.json.errorMessage}
function spider_JSONErrorLine(){var a=spider.json.errorMessage.indexOf(" at line ");return-1<a?parseInt(spider.json.errorMessage.substr(a+9),10):-1}function spider_JSONErrorPosition(){var a=spider.json.errorMessage.indexOf(" column ");return-1<a?parseInt(spider.json.errorMessage.substr(a+8),10):-1};

function settings$f_open() {
var v_y=0;
var v_cw=0;
var v_cx=0;
spiderLine=12582969;
spiderLine=12582970;
if (spider_IsWindow_DEBUG(settings$g_window)) {
spiderLine=12582971;
spider_SetActiveWindow_DEBUG(settings$g_window);
spiderLine=12582972;
if (1) return 0;
}
spiderLine=12582973;
spiderLine=12582975;
settings$a__SectionNames.array[0]=_S139;
spiderLine=12582978;
settings$g_window=spider_OpenWindow_DEBUG(-1,200,150,500,290,_S140,24);
spiderLine=12582979;
spider_SetWindowColor_DEBUG(settings$g_window,settings$g_color_content_bg);
spiderLine=12582981;
settings$g__panelcanvas=spider_CanvasGadget_DEBUG(-1,0,0,140,290);
spiderLine=12582984;
v_cx=161;
spiderLine=12582985;
v_cw=319;
spiderLine=12582986;
v_y=20;
spiderLine=12582988;
settings$g__lblcurrent=spider_TextGadget_DEBUG(-1,v_cx,v_y,v_cw,18,_S141);
spiderLine=12582989;
settings$g__incurrent=spider_StringGadget_DEBUG(-1,v_cx,(v_y+22),v_cw,26,_S3,1);
spiderLine=12582990;
v_y=(v_y+66);
spiderLine=12582992;
settings$g__lblnew=spider_TextGadget_DEBUG(-1,v_cx,v_y,v_cw,18,_S142);
spiderLine=12582993;
settings$g__innew=spider_StringGadget_DEBUG(-1,v_cx,(v_y+22),v_cw,26,_S3,1);
spiderLine=12582994;
v_y=(v_y+66);
spiderLine=12582996;
settings$g__lblconfirm=spider_TextGadget_DEBUG(-1,v_cx,v_y,v_cw,18,_S143);
spiderLine=12582997;
settings$g__inconfirm=spider_StringGadget_DEBUG(-1,v_cx,(v_y+22),v_cw,26,_S3,1);
spiderLine=12582998;
v_y=(v_y+58);
spiderLine=12583000;
settings$g__btnsave=spider_ButtonGadget_DEBUG(-1,v_cx,v_y,v_cw,30,_S144);
spiderLine=12583003;
spider_SetGadgetColor_DEBUG(settings$g__lblcurrent,1,settings$g_color_text);
spiderLine=12583004;
spider_SetGadgetColor_DEBUG(settings$g__lblnew,1,settings$g_color_text);
spiderLine=12583005;
spider_SetGadgetColor_DEBUG(settings$g__lblconfirm,1,settings$g_color_text);
spiderLine=12583006;
spider_SetGadgetColor_DEBUG(settings$g__lblcurrent,2,settings$g_color_content_bg);
spiderLine=12583007;
spider_SetGadgetColor_DEBUG(settings$g__lblnew,2,settings$g_color_content_bg);
spiderLine=12583008;
spider_SetGadgetColor_DEBUG(settings$g__lblconfirm,2,settings$g_color_content_bg);
spiderLine=12583010;
spider_BindGadgetEvent_DEBUG(settings$g__btnsave,settings$f_handler_save);
spiderLine=12583011;
spider_BindGadgetEvent_DEBUG(settings$g__panelcanvas,settings$f_handler_panelcanvas);
spiderLine=12583012;
spider_BindEvent_DEBUG(4,settings$f_handler_close,settings$g_window);
spiderLine=12583014;
desktop$f_register(_S140,settings$g_window,_S32);
spiderLine=12583015;
settings$f__drawpanel();
spiderLine=12583016;
return 0;
}
function settings$f__savecallback(v_success,v_datastring) {
var v_root=0;
spiderLine=12583126;
spiderLine=12583127;
spider_DisableGadget_DEBUG(settings$g__btnsave,0);
spiderLine=12583129;
if (!(v_success)) {
spiderLine=12583130;
notify$f_toast(_S151,3,4000);
spiderLine=12583131;
if (1) return 0;
}
spiderLine=12583132;
spiderLine=12583134;
if (spider_ParseJSON_DEBUG(0,v_datastring)) {
spiderLine=12583135;
v_root=spider_JSONValue_DEBUG(0);
spiderLine=12583136;
if (spider_GetJSONBoolean_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S26))) {
spiderLine=12583137;
spider_SetGadgetText_DEBUG(settings$g__incurrent,_S3);
spiderLine=12583138;
spider_SetGadgetText_DEBUG(settings$g__innew,_S3);
spiderLine=12583139;
spider_SetGadgetText_DEBUG(settings$g__inconfirm,_S3);
spiderLine=12583140;
notify$f_toast(_S152,1,4000);
spiderLine=12583141;
} else {
spiderLine=12583141;
spiderLine=12583142;
notify$f_toast(spider_GetJSONString_DEBUG(spider_GetJSONMember_DEBUG(v_root,_S92)),3,4000);
}
spiderLine=12583143;
spiderLine=12583144;
spider_FreeJSON_DEBUG(0);
spiderLine=12583145;
} else {
spiderLine=12583145;
spiderLine=12583146;
notify$f_toast(_S153,3,4000);
}
spiderLine=12583147;
spiderLine=12583148;
return 0;
}
function settings$f_handler_close() {
spiderLine=12583150;
spiderLine=12583151;
spider_UnbindGadgetEvent_DEBUG(settings$g__panelcanvas,settings$f_handler_panelcanvas);
spiderLine=12583152;
spider_UnbindGadgetEvent_DEBUG(settings$g__btnsave,settings$f_handler_save);
spiderLine=12583153;
spider_UnbindEvent(4,settings$f_handler_close,settings$g_window);
spiderLine=12583154;
desktop$f_unregister(settings$g_window);
spiderLine=12583155;
settings$g_window=0;
spiderLine=12583156;
return 0;
}
function settings$f_handler_panelcanvas() {
var v_my=0;
var v_row=0;
var v_etype=0;
spiderLine=12583078;
spiderLine=12583079;
v_etype=spider_EventType();
spiderLine=12583080;
v_my=spider_GetGadgetAttribute_DEBUG(settings$g__panelcanvas,3);
spiderLine=12583081;
v_row=((v_my/44)|0);
spiderLine=12583083;
var sb_select7=v_etype;
spiderLine=12583084;
if (sb_select7==65539) {
spiderLine=12583085;
if (v_row<1 && v_row!=settings$g__panelhover) {
spiderLine=12583086;
settings$g__panelhover=v_row;
spiderLine=12583087;
settings$f__drawpanel();
}
spiderLine=12583088;
spiderLine=12583090;
} else if (sb_select7==65538) {
spiderLine=12583091;
settings$g__panelhover=-1;
spiderLine=12583092;
settings$f__drawpanel();
spiderLine=12583094;
} else if (sb_select7==65541) {
spiderLine=12583095;
if (v_row>=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<spider_ListSize_DEBUG(appmanager$t__Apps)) {
spiderLine=14680392;
appmanager$g__selected=v_row;
spiderLine=14680392;
appmanager$f__drawlist();
spiderLine=14680392;
appmanager$f__updatebuttons();
}
spiderLine=14680393;
spiderLine=14680395;
} else if (sb_select8==2) {
spiderLine=14680396;
if (v_row>=0 && v_row<spider_ListSize_DEBUG(appmanager$t__Apps)) {
spiderLine=14680397;
appmanager$g__selected=v_row;
spiderLine=14680398;
appmanager$f_handler_launch();
}
spiderLine=14680399;
}
spiderLine=14680401;
return 0;
}
function idb$f_clear(v_store,p_callback) {
spiderLine=1048709;
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'); };
spiderLine=1048718;
return 0;
}
function idb$f_exists(v_store,v_key,p_callback) {
spiderLine=1048651;
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'); };
spiderLine=1048663;
return 0;
}
function idb$f_getall(v_store,p_callback) {
spiderLine=1048688;
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'); };
spiderLine=1048707;
return 0;
}
function idb$f_count(v_store,p_callback) {
spiderLine=1048720;
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'); };
spiderLine=1048729;
return 0;
}
function idb$f_put(v_store,v_key,v_value,p_callback) {
spiderLine=1048623;
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'); };
spiderLine=1048634;
return 0;
}
function idb$f_init(v_dbname,v_version,v_stores,p_callback) {
spiderLine=1048593;
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');
};
spiderLine=1048621;
return 0;
}
function idb$f_getallkeys(v_store,p_callback) {
spiderLine=1048677;
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'); };
spiderLine=1048686;
return 0;
}
function idb$f_get(v_store,v_key,p_callback) {
spiderLine=1048636;
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'); };
spiderLine=1048649;
return 0;
}
function idb$f_delete(v_store,v_key,p_callback) {
spiderLine=1048665;
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'); };
spiderLine=1048675;
return 0;
}
function appruntime$f__findbyid(v_id) {
spiderLine=9437300;
spiderLine=9437301;
spider_ResetList(appruntime$t_Instances); while (spider_NextElement(appruntime$t_Instances)) {
spiderLine=9437301;
spiderLine=9437302;
if (appruntime$t_Instances.current._InstanceID==v_id) {
spiderLine=9437302;
if (1) return 1;
}
spiderLine=9437302;
spiderLine=9437303;
}
spiderLine=9437304;
if (1) return 0;
spiderLine=9437305;
return 0;
}
function appruntime$f__closebyid(v_id) {
spiderLine=9437350;
spiderLine=9437351;
appruntime$f__remove(v_id);
spiderLine=9437352;
return 0;
}
function appruntime$f__statcallback(v_success,v_datastring) {
var v_kmid="";
var v_id=0;
spiderLine=9437489;;;
spiderLine=9437492;
if (appruntime$g__ps_id<0) {
spiderLine=9437492;
if (1) return 0;
}
spiderLine=9437492;
spiderLine=9437493;
v_id=appruntime$g__ps_id;
spiderLine=9437493;
v_kmid=appruntime$g__ps_kmid;
spiderLine=9437494;
appruntime$g__ps_id=-1;
spiderLine=9437494;
appruntime$g__ps_kmid=_S3;
spiderLine=9437495;
appruntime$f__sendresponse(v_id,v_kmid,v_success,v_datastring);
spiderLine=9437496;
return 0;
}
function appruntime$f__dostat(v_id,v_kmid,v_path) {
spiderLine=9437443;
spiderLine=9437444;
if (appruntime$g__ps_id>=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_minh) {
spiderLine=7340334;
if (1) return v_minh;
}
spiderLine=7340334;
spiderLine=7340335;
if (1) return v_righth;
spiderLine=7340336;
return 0;
}
function desktop$f__drawbutton() {
var v_active=0;
var v_h=0;
var v_w=0;
spiderLine=7340455;;;;
spiderLine=7340458;
v_active=(desktop$t_WindowManager.current._Window==desktop$g__activewindow && desktop$g__activewindow!=0?1:0);
spiderLine=7340459;
if (!(spider_IsGadget_DEBUG(desktop$t_WindowManager.current._Button))) {
spiderLine=7340459;
if (1) return 0;
}
spiderLine=7340459;
spiderLine=7340460;
if (spider_StartDrawing_DEBUG(spider_CanvasOutput_DEBUG(desktop$t_WindowManager.current._Button))) {
spiderLine=7340461;
v_w=spider_OutputWidth_DEBUG();
spiderLine=7340462;
v_h=spider_OutputHeight_DEBUG();
spiderLine=7340463;
if (v_active) {
spiderLine=7340464;
spider_Box_DEBUG(0,0,v_w,v_h,desktop$g_color_bar_active);
spiderLine=7340465;
spider_Box_DEBUG(0,((v_h/4)|0),3,((v_h/2)|0),desktop$g_color_accent);
spiderLine=7340466;
} else {
spiderLine=7340466;
spiderLine=7340467;
spider_Box_DEBUG(0,0,v_w,v_h,desktop$g_color_bar_bg);
}
spiderLine=7340468;
spiderLine=7340469;
if (spider_IsImage_DEBUG(desktop$t_WindowManager.current._Icon)) {
spiderLine=7340470;
spider_DrawAlphaImage_DEBUG(spider_ImageID_DEBUG(desktop$t_WindowManager.current._Icon),((((v_w+-28))/2)|0),((((v_h+-28))/2)|0));
}
spiderLine=7340471;
spiderLine=7340472;
spider_StopDrawing_DEBUG();
}
spiderLine=7340473;
spiderLine=7340474;
return 0;
}
function desktop$f__setactivebutton() {
spiderLine=7340476;
spiderLine=7340477;
spider_ResetList(desktop$t_WindowManager); while (spider_NextElement(desktop$t_WindowManager)) {
spiderLine=7340477;
spiderLine=7340478;
desktop$f__drawbutton();
spiderLine=7340479;
}
spiderLine=7340480;
return 0;
}
function desktop$f__rebuildbuttons() {
spiderLine=7340482;
spiderLine=7340483;
spider_ResetList(desktop$t_WindowManager); while (spider_NextElement(desktop$t_WindowManager)) {
spiderLine=7340483;
spiderLine=7340484;
spider_ResizeGadget_DEBUG(desktop$t_WindowManager.current._Button,0,(((spider_ListIndex_DEBUG(desktop$t_WindowManager)*40))+40),72,40);
spiderLine=7340485;
desktop$f__drawbutton();
spiderLine=7340486;
}
spiderLine=7340487;
return 0;
}
function desktop$f__hittest(v_mx,v_my) {
var v_h=0;
var v_settingsy=0;
var v_ry=0;
var v_logouty=0;
spiderLine=7340339;;;;;
spiderLine=7340342;
v_h=desktop$f__menuheight();
spiderLine=7340343;
if (v_mx<52) {
spiderLine=7340345;
v_logouty=(v_h+-44);
spiderLine=7340346;
v_settingsy=(v_h+-88);
spiderLine=7340347;
if (v_my>=v_settingsy && v_my<v_logouty) {
spiderLine=7340348;
if (1) return -2;
spiderLine=7340349;
} else if (v_my>=v_logouty && v_my<v_h) {
spiderLine=7340350;
if (1) return -3;
}
spiderLine=7340351;
spiderLine=7340352;
} else {
spiderLine=7340352;
spiderLine=7340354;
v_ry=(v_my+-32);
spiderLine=7340355;
if (v_ry>=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<desktop$g__appcount && desktop$a_AppRegistry.array[v_hit]._Proc!=0) {
spiderLine=7340587;
desktop$f__closemenu();
desktop$a_AppRegistry.array[v_hit]._Proc();
}
spiderLine=7340589;
}
}
spiderLine=7340592;
return 0;
}
function desktop$f__drawmenu() {
var v_ix=0;
var v_iy=0;
var v_h=0;
var v_i=0;
var v_w=0;
var v_y=0;
var v_settingsy=0;
var v_logouty=0;
var v_th=0;
spiderLine=7340369;
spiderLine=7340370;
if (!(spider_IsGadget_DEBUG(desktop$g__menucanvas))) {
spiderLine=7340370;
if (1) return 0;
}
spiderLine=7340370;
spiderLine=7340371;
if (!(spider_StartDrawing_DEBUG(spider_CanvasOutput_DEBUG(desktop$g__menucanvas)))) {
spiderLine=7340371;
if (1) return 0;
}
spiderLine=7340371;
spiderLine=7340373;
v_w=spider_OutputWidth_DEBUG();
spiderLine=7340374;
v_h=spider_OutputHeight_DEBUG();;;;;;
spiderLine=7340378;
spider_Box_DEBUG(0,0,52,v_h,desktop$g_color_menu_rail);
spiderLine=7340380;
v_settingsy=(v_h+-88);
spiderLine=7340381;
v_logouty=(v_h+-44);
spiderLine=7340383;
if (desktop$g__menuhover==-2) {
spiderLine=7340384;
spider_Box_DEBUG(0,v_settingsy,52,44,desktop$g_color_menu_hover);
}
spiderLine=7340385;
spiderLine=7340386;
if (desktop$g__menuhover==-3) {
spiderLine=7340387;
spider_Box_DEBUG(0,v_logouty,52,44,desktop$g_color_logout_hover);
}
spiderLine=7340388;
spiderLine=7340390;
if (spider_IsImage_DEBUG(desktop$g__iconsettings)) {
spiderLine=7340391;
v_ix=15;
spiderLine=7340392;
v_iy=(v_settingsy+11);
spiderLine=7340393;
spider_DrawAlphaImage_DEBUG(spider_ImageID_DEBUG(desktop$g__iconsettings),v_ix,v_iy);
}
spiderLine=7340394;
spiderLine=7340395;
if (spider_IsImage_DEBUG(desktop$g__iconlogout)) {
spiderLine=7340396;
v_ix=15;
spiderLine=7340397;
v_iy=(v_logouty+11);
spiderLine=7340398;
spider_DrawAlphaImage_DEBUG(spider_ImageID_DEBUG(desktop$g__iconlogout),v_ix,v_iy);
}
spiderLine=7340399;
spiderLine=7340402;
spider_Box_DEBUG(52,0,1,v_h,desktop$g_color_menu_sep);
spiderLine=7340405;
spider_Box_DEBUG(53,0,(v_w+-53),v_h,desktop$g_color_menu_bg);
spiderLine=7340408;
spider_Box_DEBUG(53,0,(v_w+-53),32,desktop$g_color_menu_header);
spiderLine=7340409;
spider_DrawingMode_DEBUG(1);
spiderLine=7340410;
if (spider_IsFont_DEBUG(desktop$g_menufont)) {
spiderLine=7340410;
spider_DrawingFont_DEBUG(spider_FontID_DEBUG(desktop$g_menufont));
}
spiderLine=7340410;
spiderLine=7340411;
v_th=spider_BankerRound(spider_TextHeight_DEBUG(_S31));
spiderLine=7340412;
spider_DrawText_DEBUG(66,(((((-(v_th))+32))/2)),_S43,desktop$g_color_menu_dim);
spiderLine=7340415;
v_y=32;
spiderLine=7340416;
v_i=0;
for (;(desktop$g__appcount+-1)>=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++


