SelfHost/Test Environment/admin/spiderbasic.js
2025-12-15 19:46:13 +01:00

2403 lines
237 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

if (typeof spider === 'undefined') { var spider = {}; }
spider.windowTheme = "flat";
spider.gadgetTheme = "flat";
spider.dpiAware = 1;
function spider_file_CheckId(a){spider.debug.CheckId(spider_file_CheckId.caller.name,"File",a)}function spider_file_CheckObject(a){spider.debug.CheckObject(spider_file_CheckObject.caller.name,"File",spider_IsFile(a))}function spider_CloseFile_DEBUG(a){-1!==a&&spider_file_CheckObject(a);return spider_CloseFile(a)}function spider_ReadFile_DEBUG(a,b,c,d){spider_file_CheckId(a);return spider_ReadFile(a,b,c,d)}
function spider_OpenFile_DEBUG(a,b,c,d){spider_file_CheckId(a);return spider_OpenFile(a,b,c,d)}function spider_Loc_DEBUG(a){spider_file_CheckObject(a);return spider_Loc(a)}function spider_Lof_DEBUG(a){spider_file_CheckObject(a);return spider_Lof(a)}function spider_ReadData_DEBUG(a,b,c,d){spider_file_CheckObject(a);return spider_ReadData(a,b,c,d)}function spider_ReadByte_DEBUG(a){spider_file_CheckObject(a);return spider_ReadByte(a)}
function spider_ReadAsciiCharacter_DEBUG(a){spider_file_CheckObject(a);return spider_ReadAsciiCharacter(a)}function spider_ReadUnicodeCharacter_DEBUG(a){spider_file_CheckObject(a);return spider_ReadUnicodeCharacter(a)}function spider_ReadWord_DEBUG(a){spider_file_CheckObject(a);return spider_ReadWord(a)}function spider_ReadLong_DEBUG(a){spider_file_CheckObject(a);return spider_ReadLong(a)}function spider_ReadInteger_DEBUG(a){spider_file_CheckObject(a);return spider_ReadInteger(a)}
function spider_ReadQuad_DEBUG(a){spider_file_CheckObject(a);return spider_ReadQuad(a)}function spider_ReadFloat_DEBUG(a){spider_file_CheckObject(a);return spider_ReadFloat(a)}function spider_ReadDouble_DEBUG(a){spider_file_CheckObject(a);return spider_ReadDouble(a)}function spider_ReadCharacter_DEBUG(a,b){spider_file_CheckObject(a);return spider_ReadCharacter(a,b)}function spider_ReadString_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_ReadString(a,b,c)}
function spider_ReadStringFormat_DEBUG(a){spider_file_CheckObject(a);return spider_ReadStringFormat(a)}function spider_WriteByte_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteByte(a,b)}function spider_WriteAsciiCharacter_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteAsciiCharacter(a,b)}function spider_WriteUnicodeCharacter_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteUnicodeCharacter(a,b)}
function spider_WriteWord_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteWord(a,b)}function spider_WriteLong_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteLong(a,b)}function spider_WriteFloat_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteFloat(a,b)}function spider_WriteDouble_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteDouble(a,b)}function spider_WriteInteger_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteInteger(a,b)}
function spider_WriteQuad_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteQuad(a,b)}function spider_WriteString_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_WriteString(a,b,c)}function spider_WriteStringN_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_WriteStringN(a,b,c)}function spider_WriteStringFormat_DEBUG(a,b){spider_file_CheckObject(a);return spider_WriteStringFormat(a,b)}
function spider_WriteCharacter_DEBUG(a,b,c){"undefined"===typeof c&&(c=2);spider_file_CheckObject(a);return spider_WriteCharacter(a,b,c)}function spider_FetchData_DEBUG(a,b){spider_file_CheckObject(a);return spider_FetchData(a,b)}function spider_FileProgress_DEBUG(a){spider_file_CheckObject(a);return spider_FileProgress(a)}function spider_FileSeek_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_FileSeek(a,b,c)}function spider_Eof_DEBUG(a){spider_file_CheckObject(a);return spider_Eof(a)}
function spider_CreateFile_DEBUG(a,b,c,d){spider_file_CheckId(a);return spider_CreateFile(a,b,c,d)}function spider_WriteData_DEBUG(a,b,c,d){spider_file_CheckObject(a);return spider_WriteData(a,b,c,d)}function spider_ExportFile_DEBUG(a,b,c){spider_file_CheckObject(a);return spider_ExportFile(a,b,c)}function spider_ExportFileMemory_DEBUG(a){spider_file_CheckObject(a);return spider_ExportFileMemory(a)}function spider_IsFile_DEBUG(a){return spider_IsFile(a)}
function spider_FileID_DEBUG(a){spider_file_CheckObject(a);return spider_FileID(a)};
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_MessageRequester_DEBUG(b,a){"undefined"===typeof a&&(a=0);spider.debug.CheckSingleFlags("Flags",a,[0,4]);return spider_MessageRequester(b,a)}function spider_InputRequester_DEBUG(b,a){return spider_InputRequester(b,a)}function spider_OpenFileRequester_DEBUG(b,a,c){"undefined"===typeof c&&(c=0);spider.debug.CheckCombinationFlags("Flags",c,[1]);return spider_OpenFileRequester(b,a,c)}function spider_NextSelectedFile_DEBUG(){return spider_NextSelectedFile()}
function spider_SelectedFileName_DEBUG(){return spider_SelectedFileName()}function spider_SelectedFileID_DEBUG(){return spider_SelectedFileID()};
function spider_cipher_CheckId(a){spider.debug.CheckId(spider_cipher_CheckId.caller.name,"Cipher",a)}function spider_cipher_CheckObject(a){spider.debug.CheckObject(spider_cipher_CheckObject.caller.name,"Cipher",spider_IsCipher(a))}function spider_fingerprint_CheckId(a){spider.debug.CheckId(spider_fingerprint_CheckId.caller.name,"Fingerprint",a)}function spider_fingerprint_CheckObject(a){spider.debug.CheckObject(spider_fingerprint_CheckObject.caller.name,"Fingerprint",spider_IsFingerprint(a))}
function spider_StartAESCipher_DEBUG(a,c,b,d,e){spider_cipher_CheckId(a);128!=b&&192!=b&&256!=b&&spider.debug.Error("The key size for AES has to be 128, 192 or 256.");spider.debug.CheckSingleFlags("Mode",e,[0,5,6,9,10]);return spider_StartAESCipher(a,c,b,d,e)}function spider_AddCipherBuffer_DEBUG(a,c,b,d,e,g){spider_cipher_CheckObject(a);return spider_AddCipherBuffer(a,c,b,d,e,g)}function spider_FinishCipher_DEBUG(a){spider_cipher_CheckObject(a);return spider_FinishCipher(a)}
function spider_AESEncoder_DEBUG(a,c,b,d,e,g,f,k,h){"undefined"===typeof h&&(h=4);128!=f&&192!=f&&256!=f&&spider.debug.Error("The key size for AES has to be 128, 192 or 256.");spider.debug.CheckSingleFlags("Mode",h,[4,8]);return spider_AESEncoder(a,c,b,d,e,g,f,k,h)}
function spider_AESDecoder_DEBUG(a,c,b,d,e,g,f,k,h){"undefined"===typeof h&&(h=4);128!=f&&192!=f&&256!=f&&spider.debug.Error("The key size for AES has to be 128, 192 or 256.");spider.debug.CheckSingleFlags("Mode",h,[4,8]);return spider_AESDecoder(a,c,b,d,e,g,f,k,h)}
function spider_StartFingerprint_DEBUG(a,c,b){"undefined"===typeof b&&(b=256);spider_fingerprint_CheckId(a);224!=b&&256!=b&&384!=b&&512!=b&&spider.debug.Error("The bits number for fingerprint has to be 224, 256, 384 or 512.");return spider_StartFingerprint(a,c,b)}function spider_AddFingerprintBuffer_DEBUG(a,c,b,d){spider_fingerprint_CheckObject(a);return spider_AddFingerprintBuffer(a,c,b,d)}
function spider_FinishFingerprint_DEBUG(a){spider_fingerprint_CheckObject(a);return spider_FinishFingerprint(a)}function spider_StringFingerprint_DEBUG(a,c,b){"undefined"===typeof b&&(b=256);224!=b&&256!=b&&384!=b&&512!=b&&spider.debug.Error("The bits number for fingerprint has to be 224, 256, 384 or 512.");return spider_StringFingerprint(a,c,b)}
function spider_Fingerprint_DEBUG(a,c,b,d,e){"undefined"===typeof e&&(e=256);224!=e&&256!=e&&384!=e&&512!=e&&spider.debug.Error("The bits number for fingerprint has to be 224, 256, 384 or 512.");return spider_Fingerprint(a,c,b,d,e)}function spider_IsFingerprint_DEBUG(a){return spider_IsFingerprint(a)}function spider_IsCipher_DEBUG(a){return spider_IsCipher(a)}
function spider_Base64EncoderBuffer_DEBUG(a,c,b,d,e,g,f){"undefined"===typeof f&&(f=0);spider.debug.CheckCombinationFlags("Flags",f,[32,16]);return spider_Base64EncoderBuffer(a,c,b,d,e,g,f)}function spider_Base64DecoderBuffer_DEBUG(a,c,b,d,e,g){return spider_Base64DecoderBuffer(a,c,b,d,e,g)}function spider_Base64Encoder_DEBUG(a,c,b,d){"undefined"===typeof d&&(d=0);spider.debug.CheckCombinationFlags("Flags",d,[32,16]);return spider_Base64Encoder(a,c,b,d)}
function spider_Base64Decoder_DEBUG(a,c,b,d){return spider_Base64Decoder(a,c,b,d)};
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_vectordrawing_ToPaperColor_DEBUG(a){return spider_vectordrawing_ToPaperColor(a)}
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){return spider_VectorSourceCircularGradient(a,b,c)}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){return spider_IsInsideStroke(a,b,c)}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_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_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_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_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_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_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_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_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_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)};
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)};
var sb_datapointer=0;
datamodel$l_mimedata=0;
var _S24="";
var _S53="";
var _S52="";
var _S35="\n";
var _S21="Edit";
var _S71="Error - A file with this name already exists.";
var _S63="Error - Failed to update article.";
var _S44="-";
var _S45=".";
var _S47="/";
var _S41="Default Name:";
var _S20="New Article";
var _S17="Title";
var _S60="gettag=";
var _S16="Tags";
var _S25="Date:";
var _S36="Upload File";
var _S69="\\";
var _S13="Articles";
var _S46="_";
var _S15="Files";
var _S64="AC:";
var _S58="http://192.168.56.101/";
var _S79="PA:";
var _S86="%yy-%mm-%dd";
var _S28="Image:";
var _S40="Edit Tag";
var _S62="updatetag=";
var _S73="&filedata=";
var _S2="listfiles";
var _S1="http://192.168.56.101/admin/";
var _S61="[Error] A tag with the same name already exists.";
var _S6="[Error] Failed to load data for stage: ";
var _S67="Error - Failed to create new article.";
var _S33="Name";
var _S9="LL:";
var _S39="New Tag";
var _S87="END";
var _S37="Delete File";
var _S72="newfile=";
var _S66="NA:";
var _S50="deletearticle=";
var _S14="●";
var _S5="listarticles";
var _S29="Blurb:";
var _S12="Tahoma";
var _S51="[Error] An article with the same name already exists.";
var _S4="listlanguages";
var _S30="Content:";
var _S78="http://192.168.56.101/preview?UUID=";
var _S84="Error - Failed to update tag.";
var _S23="Title:";
var _S11="SelfHost Admin";
var _S80="NT:";
var _S49="getarticle=";
var _S38="Color";
var _S34="Type";
var _S8="LA:";
var _S57="deletefile=";
var _S42="Color:";
var _S56="*.*";
var _S75="NF:";
var _S65="Error - Failed to load article.";
var _S48="newarticle";
var _S68="Error - Failed to delete article.";
var _S26="Draft";
var _S27="Localized title:";
var _S74="Error - Failed to upload file.";
var _S82="TC:";
var _S32="Save";
var _S77="Error - Failed to generate preview.";
var _S31="Preview";
var _S10="LT:";
var _S55="previewarticle=";
var _S70="FilePath";
var _S76="Error - Failed to delete file.";
var _S22="Delete";
var _S19="Date";
var _S3="listtags";
var _S85="Published";
var _S83="Error - Failed to load tag.";
var _S43="Localized name:";
var _S7="LF:";
var _S81="Error - Failed to create new tag.";
var _S54="updatearticle=";
var _S18="Status";
var _S59="newtag";
function s_string() {
this._s="";
this.copy = function(dest) { var k;
dest._s=this._s;
};
}
function mainwindow$uistate() {
this._Window=0;
this._CurrentSelection=0;
this._CurrentArticleID=0;
this._CurrentTagID=0;
this._UploadBase64="";
this.copy = function(dest) { var k;
dest._Window=this._Window;
dest._CurrentSelection=this._CurrentSelection;
dest._CurrentArticleID=this._CurrentArticleID;
dest._CurrentTagID=this._CurrentTagID;
dest._UploadBase64=this._UploadBase64;
};
}
function mainwindow$taglanguagegadgets() {
this._Name=0;
this.copy = function(dest) { var k;
dest._Name=this._Name;
};
}
function mainwindow$tageditorgadgets() {
this._Container=0;
this._StringName=0;
this._StringColor=0;
this._Panel=0;
this._ButtonSave=0;
this._LanguageTabs=spider_NewList(mainwindow$taglanguagegadgets,"object",false);
this.copy = function(dest) { var k;
dest._Container=this._Container;
dest._StringName=this._StringName;
dest._StringColor=this._StringColor;
dest._Panel=this._Panel;
dest._ButtonSave=this._ButtonSave;
spider_CopyList(this._LanguageTabs, dest._LanguageTabs);
};
}
function mainwindow$articlelanguagegadgets() {
this._Name=0;
this._Image=0;
this._Blurb=0;
this._Content=0;
this.copy = function(dest) { var k;
dest._Name=this._Name;
dest._Image=this._Image;
dest._Blurb=this._Blurb;
dest._Content=this._Content;
};
}
function mainwindow$articleeditorgadgets() {
this._Container=0;
this._StringTitle=0;
this._CheckboxDraft=0;
this._Date=0;
this._Panel=0;
this._ButtonSave=0;
this._ButtonPreview=0;
this._ListviewTags=0;
this._LanguageTabs=spider_NewList(mainwindow$articlelanguagegadgets,"object",false);
this.copy = function(dest) { var k;
dest._Container=this._Container;
dest._StringTitle=this._StringTitle;
dest._CheckboxDraft=this._CheckboxDraft;
dest._Date=this._Date;
dest._Panel=this._Panel;
dest._ButtonSave=this._ButtonSave;
dest._ButtonPreview=this._ButtonPreview;
dest._ListviewTags=this._ListviewTags;
spider_CopyList(this._LanguageTabs, dest._LanguageTabs);
};
}
function mainwindow$articlelistgadgets() {
this._Container=0;
this._ListIcon=0;
this._ButtonNew=0;
this._ButtonEdit=0;
this._ButtonDelete=0;
this.copy = function(dest) { var k;
dest._Container=this._Container;
dest._ListIcon=this._ListIcon;
dest._ButtonNew=this._ButtonNew;
dest._ButtonEdit=this._ButtonEdit;
dest._ButtonDelete=this._ButtonDelete;
};
}
function mainwindow$menubargadgets() {
this._Container=0;
this._Font=0;
this._Articles=0;
this._Files=0;
this._Tags=0;
this._Separator0=0;
this._Separator1=0;
this.copy = function(dest) { var k;
dest._Container=this._Container;
dest._Font=this._Font;
dest._Articles=this._Articles;
dest._Files=this._Files;
dest._Tags=this._Tags;
dest._Separator0=this._Separator0;
dest._Separator1=this._Separator1;
};
}
function mainwindow$tagslistgadgets() {
this._Container=0;
this._ListIcon=0;
this._ButtonNew=0;
this._ButtonEdit=0;
this.copy = function(dest) { var k;
dest._Container=this._Container;
dest._ListIcon=this._ListIcon;
dest._ButtonNew=this._ButtonNew;
dest._ButtonEdit=this._ButtonEdit;
};
}
function mainwindow$filesgadgets() {
this._Container=0;
this._ListIcon=0;
this._ButtonNew=0;
this._ButtonDelete=0;
this.copy = function(dest) { var k;
dest._Container=this._Container;
dest._ListIcon=this._ListIcon;
dest._ButtonNew=this._ButtonNew;
dest._ButtonDelete=this._ButtonDelete;
};
}
function datamodel$article() {
this._Title="";
this._ID=0;
this._Date=0;
this._Draft=0;
this._Tags=0;
this.copy = function(dest) { var k;
dest._Title=this._Title;
dest._ID=this._ID;
dest._Date=this._Date;
dest._Draft=this._Draft;
dest._Tags=this._Tags;
};
}
function datamodel$tag() {
this._ID=0;
this._BinaryID=0;
this._DefaultName="";
this._Color="";
this.copy = function(dest) { var k;
dest._ID=this._ID;
dest._BinaryID=this._BinaryID;
dest._DefaultName=this._DefaultName;
dest._Color=this._Color;
};
}
function datamodel$file() {
this._ID=0;
this._Name="";
this._Type="";
this._Size=0;
this.copy = function(dest) { var k;
dest._ID=this._ID;
dest._Name=this._Name;
dest._Type=this._Type;
dest._Size=this._Size;
};
}
var datamodel$t_Language;
var datamodel$t_Tags;
var datamodel$t_Files;
var datamodel$t_Articles;
var datamodel$m_MIMETypes={};
var general$g_loadingprogress=0;
var mainwindow$g_articlelist=new mainwindow$articlelistgadgets();
var mainwindow$g_tageditor=new mainwindow$tageditorgadgets();
var mainwindow$g_filesview=new mainwindow$filesgadgets();
var mainwindow$g_menubar=new mainwindow$menubargadgets();
var mainwindow$g_state=new mainwindow$uistate();
var mainwindow$g_articleeditor=new mainwindow$articleeditorgadgets();
var mainwindow$g_tagslist=new mainwindow$tagslistgadgets();
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}}};
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)};
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_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)};
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)};
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};
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={};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={},e="."+b,d;d=document.createElement("canvas");var f=d.getContext("2d");d.width=a.width;d.height=a.height;f.drawImage(a,0,0);for(var g=f.getImageData(0,0,d.width,d.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);d=d.toDataURL();c[e]={"background-image":"url("+d+")","background-repeat":"no-repeat",
width:""+a.width+"px",height:""+a.height+"px"};$.injectCSS(c)}return b},downscaleCanvas:function(a,b,c,e){var d=a.width,f=a.height;b=Math.round(b);c=Math.round(c);for(var g=d/b,l=f/c,p=Math.ceil(g/2),m=Math.ceil(l/2),r=a.getContext("2d"),n=r.getImageData(0,0,d,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*d),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===e?(a.width=b,a.height=c):r.clearRect(0,0,d,f);r.putImageData(t,0,0)}};
function spider_LoadImage(a,b,c){"undefined"===typeof c&&(c=0);var e=spider.image.objects.Allocate(a),d=document.createElement("canvas");e.image=d;spider.image.div.appendChild(d);var f=new Image;$(f).on({load:function(){d.width=f.width;d.height=f.height;d.getContext("2d").drawImage(f,0,0);var a=spider_GetExtensionPart(b).toLowerCase();"jpg"==a||"jpeg"==a?e.originalFormat=1195724874:"png"==a?e.originalFormat=4673104:"bmp"==a&&(e.originalFormat=5262658);spider.event.SendLoading(18,1,b,e.id)},error:function(){spider.event.SendLoading(19,
1,b,e.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,e.id)}}),c.readAsDataURL(a)):spider.event.SendLoading(19,1,b,e.id):f.src=c&2?"data:image/jpeg;base64,"+b:c&1?"data:image/png;base64,"+b:b;return e.resultId}
function spider_CopyImage(a,b){var c,e=spider.image.objects.Allocate(b);if(c=spider.image.objects.Get(a)){var d=document.createElement("canvas");d.width=c.image.width;d.height=c.image.height;e.image=d;spider.image.div.appendChild(d);d.getContext("2d").drawImage(c.image,0,0)}return e.resultId}
function spider_CreateImage(a,b,c,e,d){"undefined"===typeof d&&(d=0);a=spider.image.objects.Allocate(a);e=document.createElement("canvas");e.width=b;e.height=c;a.image=e;spider.image.div.appendChild(e);-1!=d&&(e=e.getContext("2d"),e.fillStyle=spider_helper_ColorToHtml(d),e.fillRect(0,0,b,c));return a.resultId}
function spider_GrabImage(a,b,c,e,d,f){b=spider.image.objects.Allocate(b);if(a=spider.image.objects.Get(a)){var g=document.createElement("canvas");g.width=d;g.height=f;b.image=g;spider.image.div.appendChild(g);g.getContext("2d").drawImage(a.image,c,e,d,f,0,0,d,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,inputUnit:1,outputUnit:b,stopDrawingCallback:null}):0}function spider_EncodeImage(a,b,c){"undefined"===typeof b&&(b=4673104);"undefined"===typeof c&&(c=7);var e;return(e=spider.image.objects.Get(a))?1195724874==b?e.image.toDataURL("image/jpeg",c/10):e.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,e){"undefined"===typeof e&&(e=0);if(a=spider.image.objects.Get(a)){var d=document.createElement("canvas");-65535==b&&(b=a.image.width);-65535==c&&(c=a.image.height);d.width=b;d.height=c;a.image.css=!1;a.image.grayedCss=!1;var f=d.getContext("2d");if(1==e)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");e=a.image.width;for(var l=a.image.height,p=g.getImageData(0,0,e,l),g=f.createImageData(b,c),p=p.data,m=g.data,r=e/b,l=l/c,n=0;n<c;n++)for(var t=n*b,s=(n*l|0)*e,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=d;spider.image.div.appendChild(d);
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){var b=a>>24&255;return 0===b?"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 b=$('<div style="display: inline-block; width: 1px; height: 0px;"></div>'),d=$("<div></div>");d.append(a,b);$("body").append(d);var f={};try{b.css({verticalAlign:"baseline"}),f.ascent=Math.ceil(b.offset().top-a.offset().top),b.css({verticalAlign:"bottom"}),f.height=Math.ceil(b.offset().top-a.offset().top),f.descent=Math.ceil(f.height-f.ascent)}finally{d.remove()}return f}
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,b,d,f,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var e=spider.drawing.context;4==spider.drawing.mode?(e.beginPath(),e.strokeStyle=spider_helper_ColorToHtml(c),e.strokeRect(a,b,d,f)):(e.fillStyle=spider_helper_ColorToHtml(c),e.fillRect(a,b,d,f))}function spider_DrawAlphaImage(a,b,d,f){"undefined"===typeof f&&(f=255);var c=spider.drawing.context,e=c.globalAlpha;c.globalAlpha=f/255;c.drawImage(a,b,d);c.globalAlpha=e}
function spider_DrawImage(a,b,d,f,c){var e=spider.drawing.context;"undefined"===typeof f?e.drawImage(a,b,d):e.drawImage(a,0,0,a.width,a.height,b,d,f,c)}function spider_Plot(a,b,d){"undefined"===typeof d&&(d=spider.drawing.frontColor);var f=spider.drawing.context;f.fillStyle=spider_helper_ColorToHtml(d);f.fillRect(a,b,1,1)}function spider_Point(a,b){var d=spider.drawing.context.getImageData(a,b,1,1).data;return d[0]|d[1]<<8|d[2]<<16|d[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,b,d,f,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var e=spider.drawing.context;e.beginPath();e.moveTo(a+0.5,b+0.5);e.lineTo(a+0.5+d-1,b+f-1+0.5);e.strokeStyle=spider_helper_ColorToHtml(c);e.stroke()}
function spider_LineXY(a,b,d,f,c){"undefined"===typeof c&&(c=spider.drawing.frontColor);var e=spider.drawing.context;e.beginPath();e.moveTo(a+0.5,b+0.5);e.lineTo(d+0.5,f+0.5);e.strokeStyle=spider_helper_ColorToHtml(c);e.stroke()}
function spider_DrawText(a,b,d,f,c){"undefined"===typeof f&&(f=spider.drawing.frontColor);"undefined"===typeof c&&(c=spider.drawing.backColor);var e=spider.drawing.context,g=Math.ceil(e.measureText(d).width);if(!(spider.drawing.mode&1)){var h=spider_TextHeight(d);e.fillStyle=spider_helper_ColorToHtml(c);e.fillRect(a,b,g,h)}e.fillStyle=spider_helper_ColorToHtml(f);e.fillText(d,a,b+spider_2ddrawing_getTextHeight(spider.drawing.context.font).ascent);return a+g}
function spider_Circle(a,b,d,f){"undefined"===typeof f&&(f=spider.drawing.frontColor);var c=spider.drawing.context;4==spider.drawing.mode?(c.beginPath(),c.arc(a,b,d-1,0,2*Math.PI,!1),c.strokeStyle=spider_helper_ColorToHtml(f),c.stroke()):(c.beginPath(),c.arc(a,b,d,0,2*Math.PI,!1),c.fillStyle=spider_helper_ColorToHtml(f),c.fill())}
function spider_Ellipse(a,b,d,f,c){function e(a,d,f,b,c){var e=b/2*0.5522848,k=c/2*0.5522848,g=d+b,l=f+c;b=d+b/2;c=f+c/2;a.beginPath();a.moveTo(d,c);a.bezierCurveTo(d,c-k,b-e,f,b,f);a.bezierCurveTo(b+e,f,g,c-k,g,c);a.bezierCurveTo(g,c+k,b+e,l,b,l);a.bezierCurveTo(b-e,l,d,c+k,d,c);a.closePath()}"undefined"===typeof c&&(c=spider.drawing.frontColor);var g=spider.drawing.context;4==spider.drawing.mode?(e(g,a-d,b-f,2*d,2*f),g.strokeStyle=spider_helper_ColorToHtml(c),g.stroke()):(e(g,a-d,b-f,2*d,2*f),g.fillStyle=
spider_helper_ColorToHtml(c),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,b,d,f,c,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,b+0.5,d,f,c),e.strokeStyle=spider_helper_ColorToHtml(g),e.stroke()):(h(e,a+0.5,b+0.5,d,f,c),e.fillStyle=
spider_helper_ColorToHtml(g),e.fill())}function spider_RGB(a,b,d){return d<<16|b<<8|a}function spider_RGBA(a,b,d,f){return(f<<24|d<<16|b<<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)};
(function(){function B(b){var a;if(-1==b)spider.window.objects.CleanAll();else if(a=spider.window.objects.Get(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(["paper-full.min"],function(){spider.nbLoadedModules++;SpiderMain()});spider.vectordrawing={output:null,isPathEmpty:1,sourceColor:0,states:[],path:null};function spider_ResetPath(){spider.vectordrawing.path=new paper.CompoundPath;spider.vectordrawing.path.moveTo(0,0);spider.vectordrawing.isPathEmpty=1}
function spider_SaveVectorState(){var a={};a.matrix=spider.vectordrawing.path.matrix.clone();a.sourceColor=spider.vectordrawing.sourceColor;spider.vectordrawing.states.push(a)}function spider_RestoreVectorState(){var a=spider.vectordrawing.states.pop();spider.vectordrawing.path.matrix=a.matrix;spider.vectordrawing.sourceColor=a.sourceColor}
function spider_StartVectorDrawing(a){if(a){spider.vectordrawing.output=a;var b=document.createElement("canvas");b.width=a.canvas.width;b.height=a.canvas.height;spider.vectordrawing.canvas=b;b.getContext("2d").drawImage(a.canvas,0,0);paper.setup(b);paper.settings.applyMatrix=!1;spider_ResetPath()}return a}
function spider_StopVectorDrawing(){spider_FillPath(0);paper.view.draw();var a=spider.vectordrawing.output.canvas;a.getContext("2d").drawImage(spider.vectordrawing.canvas,0,0,a.width,a.height);paper.clear()}function spider_IsPathEmpty(){return spider.vectordrawing.isPathEmpty}function spider_vectordrawing_ConvertPoint(a,b,c,d){a=new paper.Point(a,b);return 0===c&&2===d?spider.vectordrawing.path.matrix.inverseTransform(a):2===c&&0===d?spider.vectordrawing.path.matrix.transform(a):{x:-1,y:-1}}
function spider_ConvertCoordinateX(a,b,c,d){"undefined"===typeof c&&(c=2,d=1);return spider_vectordrawing_ConvertPoint(a,b,c,d).x}function spider_ConvertCoordinateY(a,b,c,d){"undefined"===typeof c&&(c=2,d=1);return spider_vectordrawing_ConvertPoint(a,b,c,d).y}function spider_MovePathCursor(a,b,c){"undefined"===typeof c&&(c=0);c&1?spider.vectordrawing.path.moveBy(new paper.Point(a,b)):spider.vectordrawing.path.moveTo(new paper.Point(a,b))}
function spider_AddPathEllipse(a,b,c,d,e,g,f){"undefined"===typeof f&&(f=0);a=f&1?new paper.Point(spider_PathCursorX()+a-c,spider_PathCursorY()+b-d):new paper.Point(a-c,b-d);c=new paper.Rectangle(a,new paper.Size(2*c,2*d));c=new paper.Path.Ellipse(c);c.transform(spider.vectordrawing.path.matrix);spider.vectordrawing.path.addChild(c);spider.vectordrawing.isPathEmpty=0}
function spider_AddPathCurve(a,b,c,d,e,g,f){"undefined"===typeof f&&(f=0);f&1?spider.vectordrawing.path.cubicCurveBy(new paper.Point(a,b),new paper.Point(c,d),new paper.Point(e,g)):spider.vectordrawing.path.cubicCurveTo(new paper.Point(a,b),new paper.Point(c,d),new paper.Point(e,g))}
function spider_AddPathArc(a,b,c,d,e,g){"undefined"===typeof g&&(g=0);var f,k,l,h,m;f=spider_PathCursorX();k=spider_PathCursorY();g&1&&(a+=f,b+=k,c+=f,d+=k);g=a-f;l=b-k;c=a-c;d=b-d;h=(Math.atan2(l,g)-Math.atan2(d,c))/2;0===e||f==a&&k==b||0===h?spider_AddPathLine(a,b,0):(m=Math.abs(Math.tan(h)),f=e/m,h=Math.sqrt(g*g+l*l),f>h&&(f=h,e=h*m),k=Math.sqrt(c*c+d*d),f>k&&(f=k,e=k*m),g=a-g*f/h,l=b-l*f/h,c=a-c*f/k,d=b-d*f/k,m=a-g+(a-c),k=b-l+(b-d),h=Math.sqrt(m*m+k*k),f=Math.sqrt(f*f+e*e),a-=m*f/h,b-=k*f/h,
f=Math.atan2(l-b,g-a),c=Math.atan2(d-b,c-a),spider_AddPathLine(g,l,0),spider_AddPathCircle(a,b,e,180/Math.PI*f,180/Math.PI*c,2,!0))}
function spider_AddPathCircle(a,b,c,d,e,g,f){var k,l;"undefined"===typeof d&&(d=0);"undefined"===typeof e&&(e=359.9);"undefined"===typeof g&&(g=0);if(g&4){var h=e;e=d+360;d=h}var h=d*Math.PI/180,m=(e-d)*Math.PI/180;k=a+c*Math.cos(h);l=b+c*Math.sin(h);d=a+c*Math.cos(h+m/2);e=b+c*Math.sin(h+m/2);a+=c*Math.cos(h+m);b+=c*Math.sin(h+m);g&2?spider_AddPathLine(k,l,g):spider_MovePathCursor(k,l,g);g&1?spider.vectordrawing.path.arcBy(d,e,a,b):spider.vectordrawing.path.arcTo(d,e,a,b);f&&spider_MovePathCursor(a,
b)}function spider_AddPathLine(a,b,c){"undefined"===typeof c&&(c=0);c&1?spider.vectordrawing.path.lineBy(new paper.Point(a,b)):spider.vectordrawing.path.lineTo(new paper.Point(a,b));spider.vectordrawing.isPathEmpty=0}
function spider_AddPathBox(a,b,c,d,e){"undefined"===typeof e&&(e=0);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_MovePathCursor(a,b,e),spider_AddPathLine(c,0,e|1),spider_AddPathLine(0,d,e|1),spider_AddPathLine(-c,0,e|1),spider_ClosePath())}function spider_vectordrawing_ToPaperColor(a){return new paper.Color((a&255)/255,(a>>8&255)/255,(a>>16&255)/255,(a>>24&255)/255)}
function spider_VectorSourceColor(a){spider.vectordrawing.sourceColor=spider_vectordrawing_ToPaperColor(a)}function spider_VectorSourceLinearGradient(a,b,c,d){spider.vectordrawing.sourceColor={gradient:{stops:[]},origin:new paper.Point(a,b),destination:new paper.Point(c,d)}}function spider_VectorSourceCircularGradient(a,b,c){spider.vectordrawing.sourceColor={gradient:{stops:[],radial:!0},origin:new paper.Point(a,b),destination:new paper.Point(a+c,b)}}
function spider_VectorSourceGradientColor(a,b){spider.vectordrawing.sourceColor.gradient.stops.push([spider_vectordrawing_ToPaperColor(a),b])}function spider_ClosePath(){spider.vectordrawing.path.closePath(!0)}
function spider_VectorDrawing_GenericStrokePath(a,b){"undefined"===typeof b&&(b=0);spider.vectordrawing.path.strokeColor=spider.vectordrawing.sourceColor;spider.vectordrawing.path.strokeWidth=a;spider.vectordrawing.path.strokeCap=b&16?"round":b&32?"square":"butt";spider.vectordrawing.path.strokeJoin=b&64?"round":b&128?"bevel":"miter";paper.view.draw();if(0===(b&8)){var c=spider.vectordrawing.path.matrix;spider_ResetPath();spider.vectordrawing.path.matrix=c}}
function spider_StrokePath(a,b){"undefined"===typeof b&&(b=0);spider.vectordrawing.path.dashArray=null;spider_VectorDrawing_GenericStrokePath(a,b)}function spider_CustomDashPath(a,b,c,d){"undefined"===typeof c&&(c=0);b=b.array.slice(0);for(d=0;d<b.length;d+=2)0===b[d]&&(b[d]=a);spider.vectordrawing.path.dashArray=b;spider_VectorDrawing_GenericStrokePath(a,c)}
function spider_DashPath(a,b,c,d){"undefined"===typeof c&&(c=0);spider.vectordrawing.path.dashArray=[b,b];spider_VectorDrawing_GenericStrokePath(a,c)}function spider_DotPath(a,b,c,d){"undefined"===typeof c&&(c=0);spider.vectordrawing.path.dashArray=[1,b+a];spider_VectorDrawing_GenericStrokePath(a,c|16)}function spider_AddPathSegments(a,b){var c=new paper.CompoundPath(a);return spider.vectordrawing.path.addChild(c)}function spider_PathSegments(){return spider.vectordrawing.path.pathData}
function spider_FillPath(a){"undefined"===typeof a&&(a=0);spider.vectordrawing.path.fillColor=spider.vectordrawing.sourceColor;spider.vectordrawing.path.fillRule="evenodd";spider_VectorDrawing_GenericStrokePath(0,a)}
function spider_BeginVectorLayer(a){"undefined"===typeof a&&(a=255);spider.vectordrawing.previousLayer=paper.project.activeLayer;spider.vectordrawing.previousPath=spider.vectordrawing.path;spider.vectordrawing.layer=new paper.Layer;spider.vectordrawing.layer.activate();spider.vectordrawing.layer.opacity=a/255;spider_ResetPath();spider.vectordrawing.path.matrix=spider.vectordrawing.previousPath.matrix}
function spider_EndVectorLayer(){spider.vectordrawing.path=spider.vectordrawing.previousPath;spider.vectordrawing.previousLayer.activate()}function spider_FillVectorOutput(){spider_AddPathBox(0,0,spider_VectorOutputWidth(),spider_VectorOutputHeight());spider.vectordrawing.path.fillColor=spider.vectordrawing.sourceColor;spider.vectordrawing.path.strokeColor=null;spider_VectorDrawing_GenericStrokePath(0)}
function spider_IsInsidePath(a,b,c){return spider.vectordrawing.path.contains(new paper.Point(a,b))?1:0}function spider_IsInsideStroke(a,b,c){return spider.vectordrawing.path.hitTest(new paper.Point(a,b))?1:0}function spider_PathBoundsX(){return spider.vectordrawing.path.bounds.x}function spider_PathBoundsY(){return spider.vectordrawing.path.bounds.y}function spider_PathBoundsWidth(){return spider.vectordrawing.path.bounds.width}
function spider_PathBoundsHeight(){return spider.vectordrawing.path.bounds.height}function spider_PathLength(){return spider.vectordrawing.path.lastChild.length}function spider_PathPointX(a){return spider.vectordrawing.path.lastChild.getPointAt(a).x}function spider_PathPointY(a){return spider.vectordrawing.path.lastChild.getPointAt(a).y}function spider_PathPointAngle(a){return spider.vectordrawing.path.lastChild.getTangentAt(a).angle}
function spider_VectorFont(a,b){"undefined"===typeof b&&(b=-1);var c={};$.extend(c,a);-1!=b&&(c.size=b+"px");spider.vectordrawing.font=c}
function spider_drawing_CreateVectorText(a,b){var c=spider_PathCursorX(),d=spider_PathCursorY();spider.vectordrawing.font&&(d+=spider_Val(spider.vectordrawing.font.size)/1.2);c=new paper.PointText(new paper.Point(c,d));c.justification="left";c.fillColor=spider.vectordrawing.sourceColor;c.content=a;b&&c.transform(spider.vectordrawing.path.matrix);spider.vectordrawing.font&&(spider.vectordrawing.font.flags&2&&(c.fontWeight="bold"),c.fontFamily=spider.vectordrawing.font.family,c.fontSize=spider_Val(spider.vectordrawing.font.size));
b&&spider_MovePathCursor(c.bounds.width,0,1);return c}function spider_DrawVectorText(a){spider_drawing_CreateVectorText(a,1)}function spider_VectorTextWidth(a,b){"undefined"===typeof b&&(b=0);if(b&4)return 0;var c=spider_drawing_CreateVectorText(a,0),d=c.bounds.width;c.remove();return d}function spider_VectorTextHeight(a,b){"undefined"===typeof b&&(b=0);if(b&4)return 0;var c=spider_drawing_CreateVectorText(a,0),d=c.bounds.height;b&8&&(d/=1.4);c.remove();return d}
function spider_VectorUnit(){return spider.vectordrawing.output.outputUnit}
function spider_DrawVectorImage(a,b,c,d){"undefined"===typeof b&&(b=255);"undefined"===typeof c&&(c=-1);if(-1==c)c=a.width,d=a.height,a=new paper.Raster(a);else if(c<a.width&&d<a.height){var e=document.createElement("canvas");e.width=a.width;e.height=a.width;e.getContext("2d").drawImage(a,0,0);spider.image.downscaleCanvas(e,c,d,!0);a=new paper.Raster(e)}else a=new paper.Raster(a);a.opacity=b/255;a.size=new paper.Size(c,d);a.position=new paper.Point(spider_PathCursorX()+c/2,spider_PathCursorY()+d/
2);a.transform(spider.vectordrawing.path.matrix);spider_FillPath()}function spider_PathCursorX(){return spider.vectordrawing.path.lastChild?spider.vectordrawing.path.lastChild.position.x:0}function spider_PathCursorY(){return spider.vectordrawing.path.lastChild?spider.vectordrawing.path.lastChild.position.y:0}function spider_FlipCoordinatesX(a,b){spider.vectordrawing.path.scale(-1,1)}function spider_ResetCoordinates(){spider.vectordrawing.path.matrix.reset()}
function spider_RotateCoordinates(a,b,c,d){spider.vectordrawing.path.rotate(c,new paper.Point(a,b))}function spider_ScaleCoordinates(a,b,c){spider.vectordrawing.path.scale(a,b)}function spider_TranslateCoordinates(a,b,c){spider.vectordrawing.path.translate(new paper.Point(a*spider.vectordrawing.path.scaling.x,b*spider.vectordrawing.path.scaling.y))}function spider_SkewCoordinates(a,b,c){spider.vectordrawing.path.skew(a,b)}
function spider_VectorOutputWidth(){return spider.vectordrawing.path.view.viewSize.width}function spider_VectorOutputHeight(){return spider.vectordrawing.path.view.viewSize.height}function spider_VectorResolutionX(){return spider.vectordrawing.path.view.resolution}function spider_VectorResolutionY(){return spider.vectordrawing.path.view.resolution};
var dijit,dojox;
(function(){function F(d){var f;if(-1==d)spider.gadget.objects.CleanAll();else if(f=spider.gadget.objects.Get(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,n){d.style.position="absolute";d.style.left=f+"px";d.style.top=g+"px";d.style.width=l+"px";d.style.height=n+"px"}function p(d,f){d.isDisabled||spider.event.Send(1,d.windowId,d.id,
f)}function x(d,f,g,l,n){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=n+"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(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,n){switch(l){case 2:d.gadget.get("disabled")||$(f).css("background-color",spider_helper_ColorToHtml(n));d.backColor=n;break;case 1:d.gadget.get("disabled")||$(g).css("color",spider_helper_ColorToHtml(n)),d.frontColor=n}}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,n,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=n;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 n;(n=spider.gadget.objects.Get(d))&&n.AddColumn&&n.AddColumn(f,g,l)};window.spider_AddGadgetItem=function(d,f,g,l,n){"undefined"===typeof l&&(l=null);"undefined"===typeof n&&(n=0);var m;(m=spider.gadget.objects.Get(d))&&m.AddItem&&m.AddItem(f,g,l,n)};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,n,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(){p(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;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,n);return e.resultId};window.spider_ButtonImageGadget=function(d,f,g,l,n,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());p(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,n);return c.resultId};window.spider_CalendarGadget=function(d,f,g,l,n,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(){p(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,n);b.SetState(m);a._populateGrid();return b.resultId};window.spider_CanvasGadget=function(d,f,g,l,n,m){function h(a){k(a,!1);p(b,65539)}
function e(a){k(a,!1);0===a.button?(p(b,65541),b.buttons&=-2):1===a.button?(p(b,65545),b.buttons&=-5):2===a.button&&(p(b,1),p(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();(new ResizeObserver(function(a){p(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(){p(b,
0)},dblclick:function(){p(b,2)},mouseover:function(a){p(b,65537)},touchstart:function(a){k(a,!0);p(b,65537);b.buttons|=1;p(b,65540);c=!0},mouseout:function(a){p(b,65538)},"touchend touchcancel touchleave":function(a){k(a,!0);b.buttons&=-2;p(b,65541);p(b,65538)},touchmove:function(a){k(a,!0);p(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);p(b,d);a.preventDefault();window.addEventListener("mouseup",
e);window.addEventListener("mousemove",h);if(1===a.button)return!1}},focus:function(){p(b,7)},blur:function(){p(b,8)},wheel:function(a){a=a.originalEvent;b.mouseWheelDelta=0>a.deltaY?1:-1;p(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);p(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);p(b,65548)},keypress:function(a){b.lastInput=a.which;b.lastInput&&p(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,n);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,inputUnit:1,outputUnit:f,stopDrawingCallback:null}:0};window.spider_CheckBoxGadget=
function(d,f,g,l,n,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(){p(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,n);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,n,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(){p(h,9)},onFocus:function(){spider.DigitFocus.focus(a.focusNode);p(h,7)},onBlur:function(){p(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,n);return h.resultId};window.spider_ContainerGadget=function(d,f,g,l,n,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,n);spider.DojoAspect.after(e,"resize",function(b,
a){p(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,n,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(){p(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,n);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,n,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(){p(h,9)},onFocus:function(){spider.DigitFocus.focus(e.focusNode);p(h,7)},onBlur:function(){p(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,n);return h.resultId};window.spider_FrameGadget=function(d,f,g,l,n,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,n);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 n;return(n=spider.gadget.objects.Get(d))&&n.GetItemAttribute?n.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,n,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();p(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,n);return c.resultId};window.spider_ImageGadget=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("canvas");b.style.width=l+"px";b.style.height=n+"px";put(c,b);h&2&&$(c).addClass("sbImageBorder");$(c).on({click:function(){p(e,0)},dblclick:function(){p(e,2)},mouseup:function(a){3===a.which&&1===a.originalEvent.detail&&p(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,n);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,n,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){p(a,9)});y.appendChild(s.domNode);$(y).css("cursor","default");$(y).on({click:function(){p(a,0)},dblclick:function(){p(a,2)},mouseup:function(b){3===b.which&&(2===b.originalEvent.detail?p(a,3):p(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(){p(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,n);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,n,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){p(c,9)});h();q.appendChild(r.domNode);$(q).on({click:function(){p(c,0)},dblclick:function(){p(c,2)},mouseup:function(a){3===a.which&&(2===a.originalEvent.detail?p(c,3):p(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,n);return c.resultId};window.spider_OpenGadgetList=function(d,f){"undefined"===typeof f&&(f=-1);var g,l,n;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(n=g.getPanelChild(f))l=n.domNode}l&&spider.window.gadgetList.push(l,g.windowId)}};window.spider_OptionGadget=function(d,f,g,l,n,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")&&p(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,n);return h.resultId};window.spider_PanelGadget=function(d,f,g,l,n){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){p(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,n);h.disableResize=!1;spider.window.gadgetList.push(null,spider.window.currentWindowId);spider.DojoAspect.after(e,"resize",function(a,b){p(h,15)});return h.resultId};window.spider_ProgressBarGadget=function(d,f,g,l,n,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,n);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,n){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==n&&(n=L(d)),m.Resize&&m.Resize(f|
0,g|0,l|0,n|0)};window.spider_ScrollAreaGadget=function(d,f,g,l,n,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(a,b,c,d){var e=u(k);t(k,a,b,c-e.x,d-e.y)};spider.gadget.register(b,16,k,k);b.Resize(f,g,l,n);spider.window.gadgetList.push(a.domNode,
spider.window.currentWindowId);b.contentPane=a;spider.DojoAspect.after(a,"resize",function(a,c){p(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,n){"undefined"===typeof n&&(n=-1);var m;(m=spider.gadget.objects.Get(d))&&m.SetItemAttribute&&m.SetItemAttribute(f,g,l,n)};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 n;(n=spider.gadget.objects.Get(d))&&n.SetItemText&&n.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,n,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?p(c,4):a<c.oldValue&&p(c,5);c.oldValue=a;p(c,9)},onFocus:function(){spider.DigitFocus.focus(b.focusNode);p(c,7)},onBlur:function(){p(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,n);return c.resultId};window.spider_SplitterGadget=function(d,f,g,l,n,m,h,e){"undefined"===typeof e&&(e=0);var c,b,a,k,r,q=2,p=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);p.GetState=function(){return e&1?$(a.domNode).width():$(a.domNode).height()};p.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()};p.GetAttribute=function(d){switch(d){case 3:return c.id;case 4:return b.id;case 1:return a.attr("minSize");case 2:if(p.secondMinimumSize)return p.secondMinimumSize}return 0};
p.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:p.secondMinimumSize=e,p.secondMinimumSize&&a.attr("maxSize",$(r.domNode).width()-p.secondMinimumSize-16)}};p.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),p.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(p,29,v,r);r.startup();p.Resize(f,g,l,n);e&1?p.SetState(l/q-5):p.SetState(n/q-5)}else p.resultId=0;return p.resultId};
window.spider_StringGadget=function(d,f,g,l,n,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());p(e,9)});c.attr("onClick",function(){h&2&&!e.isFocused&&
(e.isFocused=1,p(e,7))});c.attr("onFocus",function(){spider.DigitFocus.focus(c.focusNode);p(e,7)});c.attr("onBlur",function(){p(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)):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,n);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,n,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){p(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,n);return b.resultId};window.spider_TreeGadget=function(d,f,g,l,n,m){function h(){var a=q.attr("selectedItem");if(null===a&&-1!=k||null!==a&&k!=a.id)p(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();p(e,0)},onDblClick:function(a){p(e,
2)},onFocus:function(a){p(e,7)},onBlur:function(a){p(e,8)}});$(w).on("mouseup",function(a){3===a.which&&1===a.originalEvent.detail&&(h(),p(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,n);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,n,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(){p(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,n);return e.resultId};window.spider_gadget_GetRequiredSize=B})();
spider.nbModules++;var forge,spark_md5;require(["forge/forge","cipher/md5","cipher/sha3","cipher/crc","forge/aes"],function(a,c){spider.nbLoadedModules++;forge=a;spark_md5=c;SpiderMain()});spider.cipher={fingerprintobjects:new spider.object,cipherobjects:new spider.object,isBase64DecodingTable:0,base64DecodingTable:[]};function spider_UseCRC32Fingerprint(){}function spider_UseMD5Fingerprint(){}function spider_UseSHA1Fingerprint(){}function spider_UseSHA2Fingerprint(){}
function spider_UseSHA3Fingerprint(){}function spider_StartAESCipher(a,c,b,e,d){a=spider.cipher.cipherobjects.Allocate(a);try{var g;g=d&8?"AES-ECB":"AES-CBC";a.cipher=d&1?forge.cipher.createDecipher(g,new forge.util.ByteBuffer(c)):forge.cipher.createCipher(g,new forge.util.ByteBuffer(c));a.cipher.start({iv:new forge.util.ByteBuffer(e)});return a.resultId}catch(k){return 0}}
function spider_AddCipherBuffer(a,c,b,e,d,g){if(a=spider.cipher.cipherobjects.Get(a))try{if(b||g!=c.byteLength)c=c.slice(b,b+g);a.cipher.update(new forge.util.ByteBuffer(c),new forge.util.DataBuffer(new Uint8Array(e,d,g)))}catch(k){}}function spider_FinishCipher(a){var c,b=0;if(c=spider.cipher.cipherobjects.Get(a)){try{c.cipher.finish(),b=1}catch(e){}spider.cipher.cipherobjects.Remove(a)}return b}
function spider_AESEncoder(a,c,b,e,d,g,k,h,f){"undefined"===typeof f&&(f=4);if(g=spider_StartAESCipher(-1,g,k,h,f|2))return spider_AddCipherBuffer(g,a,c,b,e,d),spider_FinishCipher(g)}function spider_AESDecoder(a,c,b,e,d,g,k,h,f){"undefined"===typeof f&&(f=4);if(g=spider_StartAESCipher(-1,g,k,h,f|1))return spider_AddCipherBuffer(g,a,c,b,e,d),spider_FinishCipher(g)}
function spider_StartFingerprint(a,c,b){"undefined"===typeof b&&(b=256);a=spider.cipher.fingerprintobjects.Allocate(a);a.type=c;switch(c){case 2:a.md=1;a.oldValue=0;break;case 1:a.md=new spark_md5.ArrayBuffer;break;case 3:a.md=forge.md.sha1.create();break;case 4:224==b?a.md=forge.md.sha224.create():256==b?a.md=forge.md.sha256.create():384==b?a.md=forge.md.sha384.create():512==b&&(a.md=forge.md.sha512.create());break;case 5:224==b?a.md=sha3_224.create():256==b?a.md=sha3_256.create():384==b?a.md=sha3_384.create():
512==b&&(a.md=sha3_512.create())}if(a.md)return a.resultId;spider.cipher.fingerprintobjects.Remove(a.resultId);return 0}function spider_AddFingerprintBuffer(a,c,b,e){if(a=spider.cipher.fingerprintobjects.Get(a)){if(b||e!=c.byteLength)c=c.slice(b,b+e);2==a.type?(a.value=crc32(c,a.oldValue),a.oldValue=parseInt(a.value,16)):1==a.type?a.md.append(c):5==a.type?a.md.update(c):a.md.update(new forge.util.ByteBuffer(c))}}
function spider_FinishFingerprint(a){var c="",b;if(b=spider.cipher.fingerprintobjects.Get(a))c=2==b.type?b.value:1==b.type?b.md.end():5==b.type?b.md.hex():b.md.digest().toHex(),spider.cipher.fingerprintobjects.Remove(a);return c}
function spider_StringFingerprint(a,c,b){"undefined"===typeof b&&(b=256);var e;switch(c){case 2:return crc32(a,0);case 1:return spark_md5.hash(a);case 3:e=forge.md.sha1.create();break;case 4:224==b?e=forge.md.sha224.create():256==b?e=forge.md.sha256.create():384==b?e=forge.md.sha384.create():512==b&&(e=forge.md.sha512.create());break;case 5:if(224==b)return sha3_224(a);if(256==b)return sha3_256(a);if(384==b)return sha3_384(a);if(512==b)return sha3_512(a)}return e?(e.update(a,"utf8"),e.digest().toHex()):
""}function spider_Fingerprint(a,c,b,e,d){return(e=spider_StartFingerprint(-1,e,d))?(spider_AddFingerprintBuffer(e,a,c,b),spider_FinishFingerprint(e)):""}function spider_IsFingerprint(a){return spider.cipher.fingerprintobjects.Is(a)}function spider_IsCipher(a){return spider.cipher.cipherobjects.Is(a)}
function spider_Base64EncoderBuffer(a,c,b,e,d,g,k){"undefined"===typeof k&&(k=0);for(var h=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],f=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,
52,53,54,55,56,57,45,95],h=k&16?f:h,f=d;0<b;){if(3>b)if(d=0,2==b){if(k&32){if(f>=g-3)return 0}else if(f>=g-4)return 0;d|=a.viewu8[c++]<<10;d|=a.viewu8[c++]<<2;e.viewu8[f++]=h[d>>12&63];e.viewu8[f++]=h[d>>6&63];e.viewu8[f++]=h[d&63];0===(k&32)&&(e.viewu8[f++]=61)}else{if(k&32){if(f>=g-2)return 0}else if(f>=g-4)return 0;d|=a.viewu8[c++]<<4;e.viewu8[f++]=h[d>>6&63];e.viewu8[f++]=h[d&63];0===(k&32)&&(e.viewu8[f++]=61,e.viewu8[f++]=61)}else{if(f>=g-4)return 0;d=a.viewu8[c++]<<16;d|=a.viewu8[c++]<<8;d|=
a.viewu8[c++];e.viewu8[f++]=h[d>>18&63];e.viewu8[f++]=h[d>>12&63];e.viewu8[f++]=h[d>>6&63];e.viewu8[f++]=h[d&63]}b-=3}e.viewu8[f]=0;return f}
function spider_Base64DecoderBuffer(a,c,b,e,d,g){var k=0,h,f=spider.cipher.base64DecodingTable;if(0===spider.cipher.isBase64DecodingTable){spider.cipher.isBase64DecodingTable=1;var l=0;for(h=65;90>=h;h++)f[h]=l++;for(h=97;122>=h;h++)f[h]=l++;for(h=48;57>=h;h++)f[h]=l++;f[45]=l;f[43]=l;l++;f[95]=l;f[47]=l}h=d;if(0<g)for(;0<b;){for(;"n"==a.viewu8[c]||"r"==a.viewu8[c]||"t"==a.viewu8[c];)c++,b--;if(2>b||k>=g)return 0;d=f[a.viewu8[c++]]<<18;d|=f[a.viewu8[c++]]<<12;e.viewu8[h++]=d>>16;k++;if(0!==a.viewu8[c]&&
61!==a.viewu8[c]){if(k>=g)return 0;d|=f[a.viewu8[c++]]<<6;e.viewu8[h++]=d>>8;k++}if(0!==a.viewu8[c]&&61!==a.viewu8[c]){if(k>=g)return 0;d|=f[a.viewu8[c++]];e.viewu8[h++]=d;k++}b-=4}return k}function spider_Base64Decoder(a,c,b,e){var d=0,g=a.length;if(0<g){for(var d=spider_AllocateMemory(g),k=0;k<g;k++)d.viewu8[k]=a.charCodeAt(k);d=spider_Base64DecoderBuffer(d,0,g,c,b,e)}return d}
function spider_Cipher_ArrayBufferToString(a){for(var c=a.length,b="",e=Math.pow(2,16)-1,d=0;d<c;d+=e)d+e>c&&(e=c-d),b+=String.fromCharCode.apply(null,a.subarray(d,d+e));return b}function spider_Base64Encoder(a,c,b,e){"undefined"===typeof e&&(e=0);var d=b+0.34*b+128,g=spider_AllocateMemory(d);a=spider_Base64EncoderBuffer(a,c,b,g,0,d,e);return 0<a?(g=spider_ReAllocateMemory(g,a),spider_Cipher_ArrayBufferToString(g.viewu8)):""};
if("undefined"===typeof spider)var spider={};if("undefined"===typeof createjs)var createjs={};spider.requester={currentFileIndex:0,input:null};function spider_MessageRequester(c,b){"undefined"===typeof b&&(b=0);window.cordova&&navigator.splashscreen.hide();if(4==b)return confirm(c)?6:7;alert(c);return 6}function spider_InputRequester(c,b){var d;window.cordova&&navigator.splashscreen.hide();return(d=prompt(c,b))?d:""}
function spider_OpenFileRequester(c,b,d){"undefined"===typeof d&&(d=0);var a=spider.requester.input;a&&document.getElementById("spiderbody").removeChild(a);a=document.createElement("input");a.type="file";$(a).css("position","absolute");$(a).css("top","-200px");document.getElementById("spiderbody").appendChild(a);$(a).on("change",function(a){spider.systembase.localFiles=a.target.files;spider.requester.currentFileIndex=0;spider.systembase.localFilesType=0;b()});spider.requester.input=a;d&1?$(a).attr("multiple",
"multiple"):$(a).removeAttr("multiple");$(a).attr("accept",c);$(a).click();return 1}function spider_NextSelectedFile(){spider.requester.currentFile=0;return spider.systembase.localFiles&&spider.requester.currentFileIndex<spider.systembase.localFiles.length?(spider.requester.currentFile=spider.systembase.localFiles[spider.requester.currentFileIndex],spider.requester.currentFileIndex++,1):0}function spider_SelectedFileName(){if(spider.requester.currentFile)return spider.requester.currentFile.name}
function spider_SelectedFileID(){if(spider.requester.currentFile)return spider.requester.currentFile.name};
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.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)};
if("undefined"===typeof spider)var spider={};function spider_SetClipboardText(b){if(window.cordova)cordova.plugins.clipboard.copy(b);else if(navigator.clipboard)navigator.clipboard.writeText(b);else{var a=document.createElement("textarea");a.value=b;document.body.appendChild(a);a.focus();a.select();try{document.execCommand("copy")}catch(c){}document.body.removeChild(a)}};
if("undefined"===typeof spider)var spider={};if("undefined"===typeof document)var document={};if("undefined"===typeof window)var window={};var JDataView,LocalForage;spider.nbModules++;require(["jdataview.min","localforage.min","filesaver.min"],function(a,c){JDataView=a;LocalForage=c;spider.nbLoadedModules++;SpiderMain()});
function spider_CloseFile(a){var c;if(-1==a)spider.file.objects.CleanAll();else if(c=spider.file.objects.Get(a))c.readOnly||c.flags&262144&&LocalForage.setItem("sbfs_"+c.filename,new Int8Array(c.buffer,0,c.size),function(a){a?c.callback(2,c.filename,c.id):c.callback(3,c.filename,c.id,c.buffer.byteLength)}),spider.file.objects.Remove(a)}spider.file={objects:new spider.object(spider_CloseFile)};
function spider_ReadFile(a,c,b,e){var d=spider.file.objects.Allocate(a);d.size=-1;d.position=0;d.bufferPosition=0;d.progress=-1;d.callback=b;d.filename=c;d.flags=e;d.readOnly=1;d.chunkSize=16384;a=e&31;0===a&&(a=2);d.format=a;var f=function(a){d.buffer=a;d.view8=new Int8Array(d.buffer);d.viewu8=new Uint8Array(d.buffer);d.view=new DataView(d.buffer);d.jview=new JDataView(d.buffer);b(0,c,d.id,d.buffer.byteLength)};a=function(a){-1===d.size?(a=this.response,d.size=a.byteLength):a=a.target.result;f(a)};
var h=function(a){a.originalEvent.lengthComputable&&(d.progress=a.originalEvent.loaded/a.originalEvent.total*100);b(1,c,d.id)},k=function(a){b(2,c,d.id)};if(e&65536){var g;if(g=spider.systembase.getLocalFile(c)){var l=new FileReader;$(l).on({load:a,progress:h,error:k});d.localFile=g;d.reader=l;d.size=g.size;0===(e&1)&&l.readAsArrayBuffer(d.localFile);return d.resultId}}else return e&262144?LocalForage.getItem("sbfs_"+c,function(a,b){a?k():null===b?e&524288?(d.size=0,f(new ArrayBuffer(d.chunkSize))):
k():(d.size=b.byteLength,f(b.buffer))}):(g=new XMLHttpRequest,$(g).on({load:a,progress:h,error:k}),g.open("GET",c,!0),g.responseType="arraybuffer",g.send()),d.resultId;spider.file.objects.Remove(d.resultId);return 0}function spider_OpenFile(a,c,b,e){if(c=spider_ReadFile(a,c,b,e|524288))if(-1==a&&(a=c),a=spider.file.objects.Get(a))a.readOnly=0;return c}function spider_Loc(a){var c;return(c=spider.file.objects.Get(a))?c.bufferPosition+c.position:0}
function spider_Lof(a){var c;return(c=spider.file.objects.Get(a))?c.size:0}function spider_ReadData(a,c,b,e){if(a=spider.file.objects.Get(a))c.view8.set(new Int8Array(a.buffer,a.position,e),b),a.position+=e}function spider_ReadByte(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-1)return 0;a.position++;return a.view8[a.position-1]}return 0}
function spider_ReadAsciiCharacter(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-1)return 0;a.position++;return a.viewu8[a.position-1]}return 0}function spider_ReadUnicodeCharacter(a){var c;return(c=spider.file.objects.Get(a))?spider_File_ReadCharacter(c,25):0}function spider_ReadWord(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-2)return 0;a.position+=2;return a.view.getInt16(a.position-2)}return 0}
function spider_ReadLong(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-4)return 0;a.position+=4;return a.view.getInt32(a.position-4)}return 0}function spider_ReadInteger(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-8)return 0;a.position+=8;return a.jview.getInt64(a.position-8)}return 0}function spider_ReadQuad(a){return spider_ReadInteger(a)}
function spider_ReadFloat(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-4)return 0;a.position+=4;return a.view.getFloat32(a.position-4)}return 0}function spider_ReadDouble(a){if(a=spider.file.objects.Get(a)){if(a.position>a.size-8)return 0;a.position+=8;return a.view.getFloat64(a.position-8)}return 0}
function spider_File_ReadUTF8Character(a){var c;buffer=a.viewu8;if(a.position>a.size-1)return 0;c=buffer[a.position++];return 0===(c&128)?c:192==(c&224)?a.position>a.size-1?0:(c&31)<<6|buffer[a.position++]&63:224==(c&240)?a.position>a.size-2?0:(c&15)<<12|(buffer[a.position++]&63)<<6|(buffer[a.position++]&63)<<0:0}
function spider_File_ReadCharacter(a,c){switch(c){case 24:if(a.position>a.size-1)return 0;a.position++;return a.viewu8[a.position-1];case 25:if(a.position>a.size-2)return 0;a.position+=2;return a.viewu8[a.position-1]<<8|a.viewu8[a.position-2];default:return spider_File_ReadUTF8Character(a)}}function spider_ReadCharacter(a,c){"undefined"===typeof c&&(c=2);var b;return(b=spider.file.objects.Get(a))?spider_File_ReadCharacter(b,c):0}
function spider_ReadString(a,c,b){"undefined"===typeof c&&(c=0);"undefined"===typeof b&&(b=-1);var e,d="",f=c&31;if(a=spider.file.objects.Get(a))for(0===f&&(f=a.format);b;){e=spider_File_ReadCharacter(a,f);if(0===(c&65536)&&(13===e||10===e)){13===e&&10===a.view8[a.position]&&a.position++;break}else if(0===e)break;d+=String.fromCharCode(e);b--}return d}
function spider_ReadStringFormat(a){var c=24;if(a=spider.file.objects.Get(a)){var b=a.size-a.position,e,d,f,h;2<=b&&(e=a.viewu8[a.position],d=a.viewu8[a.position+1]);3<=b&&(f=a.viewu8[a.position+2]);4<=b&&(h=a.viewu8[a.position+3]);2<=b&&255==e&&254==d?(c=25,a.position+=2):3<=b&&239==e&&187==d&&191==f?(c=2,a.position+=3):2<=b&&254==e&&255==d?(c=4,a.position+=2):4<=b&&255==e&&254==d&&0===f&&0===h?(c=5,a.position+=4):4<=b&&0===e&&0===d&&254==f&&255==h&&(c=6,a.position+=4)}return c}
function spider_WriteByte(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,1),b.view8[b.position++]=c,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteAsciiCharacter(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,1),b.view8[b.position++]=c,b.position>b.size&&(b.size=b.position),1):0}
function spider_WriteUnicodeCharacter(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,2),b.position+=spider_Memory_WriteCharacter(b.viewu8,b.position,c,25),b.position>b.size&&(b.size=b.position),1):0}function spider_WriteWord(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,2),b.view.setInt16(b.position,c),b.position+=2,b.position>b.size&&(b.size=b.position),1):0}
function spider_WriteLong(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,4),b.view.setInt32(b.position,c),b.position+=4,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteFloat(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,4),b.view.setFloat32(b.position,c),b.position+=4,b.position>b.size&&(b.size=b.position),1):0}
function spider_WriteDouble(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,8),b.view.setFloat64(b.position,c),b.position+=8,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteInteger(a,c){var b;return(b=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(b,8),b.jview.setInt64(b.position,c),b.position+=8,b.position>b.size&&(b.size=b.position),1):0}function spider_WriteQuad(a,c){return spider_WriteInteger(a,c)}
function spider_WriteString(a,c,b){"undefined"===typeof b&&(b=0);if(a=spider.file.objects.Get(a)){0===b&&(b=a.format);for(var e=c.length,d=0;d<e;d++)spider_File_CheckBufferSize(a,4),a.position+=spider_Memory_WriteCharacter(a.viewu8,a.position,c.charCodeAt(d),b);a.position>a.size&&(a.size=a.position);return 1}return 0}function spider_WriteStringN(a,c,b){return spider_WriteString(a,c+"\n",b)}
function spider_WriteStringFormat(a,c){switch(c){case 25:spider_WriteByte(a,255);spider_WriteByte(a,254);break;case 2:spider_WriteByte(a,239);spider_WriteByte(a,187);spider_WriteByte(a,191);break;case 4:spider_WriteByte(a,254);spider_WriteByte(a,255);break;case 5:spider_WriteByte(a,255);spider_WriteByte(a,254);spider_WriteByte(a,0);spider_WriteByte(a,0);break;case 6:spider_WriteByte(a,0),spider_WriteByte(a,0),spider_WriteByte(a,254),spider_WriteByte(a,255)}}
function spider_WriteCharacter(a,c,b){"undefined"===typeof b&&(b=2);return(a=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(a,4),a.position+=spider_Memory_WriteCharacter(a.viewu8,a.position,c,b),a.position>a.size&&(a.size=a.position),1):0}function spider_FetchData(a,c){var b;if(b=spider.file.objects.Get(a))b.bufferPosition+=b.position,b.position=0,b.reader.readAsArrayBuffer(b.localFile.slice(b.bufferPosition,b.bufferPosition+c))}
function spider_FileProgress(a){var c;return(c=spider.file.objects.Get(a))?c.progress:-1}function spider_FileSeek(a,c,b){if(a=spider.file.objects.Get(a))a.position=1==b?a.position+c:c,a.position>a.size?a.position=a.size:0>a.position&&(a.position=0)}function spider_Eof(a){var c;return(c=spider.file.objects.Get(a))?c.bufferPosition+c.position==c.size:0}
function spider_CreateFile(a,c,b,e){a=spider.file.objects.Allocate(a);a.position=0;a.bufferPosition=0;a.callback=b;a.filename=c;a.flags=e;a.chunkSize=16384;a.size=0;a.buffer=new ArrayBuffer(a.chunkSize);a.view8=new Int8Array(a.buffer);a.viewu8=new Uint8Array(a.buffer);a.view=new DataView(a.buffer);a.jview=new JDataView(a.buffer);c=e&31;0===c&&(c=2);a.format=c;return a.resultId}
function spider_File_CheckBufferSize(a,c){if(a.buffer.byteLength<a.position+c){var b=new ArrayBuffer(a.position+c+a.chunkSize),e=new Int8Array(b);e.set(a.view8);a.buffer=b;a.view8=e;a.viewu8=new Uint8Array(a.buffer);a.view=new DataView(a.buffer);a.jview=new JDataView(a.buffer)}}function spider_WriteData(a,c,b,e){return(a=spider.file.objects.Get(a))?(spider_File_CheckBufferSize(a,e),a.view8.set(new Int8Array(c,b,e),a.position),a.position+=e,a.position>a.size&&(a.size=a.position),1):0}
function spider_file_Download(a,c,b){function e(a){window.resolveLocalFileSystemURL(a,function(a){var b="";switch(device.platform){case "Android":b="file:///storage/emulated/0/Download";break;case "iOS":b=cordova.file.documentsDirectory+"Download"}window.resolveLocalFileSystemURL(b,function(b){a.moveTo(b,void 0,function(a){console.log("SUCESS!")},function(a){console.error(a)})},function(a){console.error(a)})},function(a){console.error(a)})}if(window.cordova){b="";switch(device.platform){case "Android":b=
cordova.file.externalDataDirectory;break;case "iOS":b=cordova.file.documentsDirectory}var d=b;window.resolveLocalFileSystemURL(d,function(b){b.getFile(c,{create:!0},function(b){b.createWriter(function(b){b.write(a);b.onwriteend=function(){e(d+c)};b.onerror=function(a){console.error(a)}},function(a){console.error(a)})},function(a){console.error(a)})},function(a){console.error(a)})}else saveAs(a,c)}
function spider_ExportFile(a,c,b){"undefined"===typeof b&&(b=65536);if(a=spider.file.objects.Get(a)){var e=new Blob([new Int8Array(a.buffer,0,a.size)],{type:c});b&65536&&spider_file_Download(e,a.filename,c);return 1}return 0}function spider_ExportFileMemory(a){var c;return(a=spider.file.objects.Get(a))?(c=spider_AllocateMemory(a.size),c.view8.set(new Int8Array(a.buffer,0,a.size),0,c.byteLength),c):0}function spider_IsFile(a){return spider.file.objects.Is(a)}
function spider_FileID(a){var c;return(c=spider.file.objects.Get(a))?c.buffer:0};
function general$f_parselanguages(v_result) {
var v_i=0;
var v_count=0;
spiderLine=2097253;;;
spiderLine=2097256;
v_result=datamodel$f_stripprefix(v_result,_S9);
spiderLine=2097257;
v_count=datamodel$f_getrecordcount(v_result);
spiderLine=2097259;
v_i=1;
for (;v_count>=v_i;v_i+=1) {
spiderLine=2097260;
spider_AddElement_DEBUG(datamodel$t_Language);
spiderLine=2097261;
datamodel$t_Language.current._s=datamodel$f_getrecord(v_result,v_i);
spiderLine=2097262;
}
spiderLine=2097263;
return 0;
}
function general$f_init() {
spiderLine=2097182;
spiderLine=2097184;
spider_HTTPRequest(0,_S1,_S2,general$f_loadingcallback,0);
spiderLine=2097185;
spider_HTTPRequest(0,_S1,_S3,general$f_loadingcallback,1);
spiderLine=2097186;
spider_HTTPRequest(0,_S1,_S4,general$f_loadingcallback,3);
spiderLine=2097187;
spider_HTTPRequest(0,_S1,_S5,general$f_loadingcallback,2);
spiderLine=2097188;
return 0;
}
function general$f_parsetags(v_result) {
var v_i=0;
var v_entry="";
var v_count=0;
spiderLine=2097265;;;;
spiderLine=2097268;
v_result=datamodel$f_stripprefix(v_result,_S10);
spiderLine=2097269;
v_count=datamodel$f_getrecordcount(v_result);
spiderLine=2097271;
v_i=1;
for (;v_count>=v_i;v_i+=1) {
spiderLine=2097272;
v_entry=datamodel$f_getrecord(v_result,v_i);
spiderLine=2097273;
spider_AddElement_DEBUG(datamodel$t_Tags);
spiderLine=2097274;
datamodel$t_Tags.current._ID=spider_Val(datamodel$f_getfield(v_entry,1));
spiderLine=2097275;
datamodel$t_Tags.current._DefaultName=datamodel$f_getfield(v_entry,2);
spiderLine=2097276;
datamodel$t_Tags.current._Color=datamodel$f_getfield(v_entry,3);
spiderLine=2097277;
datamodel$t_Tags.current._BinaryID=spider_BankerRound(spider_Pow(2,spider_ListIndex_DEBUG(datamodel$t_Tags)));
spiderLine=2097278;
}
spiderLine=2097279;
return 0;
}
function general$f_loadingcallback(v_success,v_result,v_userdata) {
spiderLine=2097194;
spiderLine=2097195;
if (!(v_success)) {
spiderLine=2097196;
spider.debug.Print(_S6+spider_Str(v_userdata));
spiderLine=2097197;
if (1) return 0;
}
spiderLine=2097198;
spiderLine=2097200;
var sb_select1=v_userdata;
spiderLine=2097201;
if (sb_select1==0) {
spiderLine=2097202;
general$f_parsefiles(v_result);
spiderLine=2097203;
} else if (sb_select1==1) {
spiderLine=2097204;
general$f_parsetags(v_result);
spiderLine=2097205;
} else if (sb_select1==2) {
spiderLine=2097206;
general$f_parsearticles(v_result);
spiderLine=2097207;
} else if (sb_select1==3) {
spiderLine=2097208;
general$f_parselanguages(v_result);
}
spiderLine=2097211;
general$g_loadingprogress=(general$g_loadingprogress+1);
spiderLine=2097212;
if (general$g_loadingprogress==4) {
spiderLine=2097213;
mainwindow$f_open();
}
spiderLine=2097214;
spiderLine=2097215;
return 0;
}
function general$f_parsefiles(v_result) {
var v_i=0;
var v_entry="";
var v_count=0;
spiderLine=2097221;;;;
spiderLine=2097224;
v_result=datamodel$f_stripprefix(v_result,_S7);
spiderLine=2097225;
v_count=datamodel$f_getrecordcount(v_result);
spiderLine=2097227;
v_i=1;
for (;v_count>=v_i;v_i+=1) {
spiderLine=2097228;
v_entry=datamodel$f_getrecord(v_result,v_i);
spiderLine=2097229;
spider_AddElement_DEBUG(datamodel$t_Files);
spiderLine=2097230;
datamodel$t_Files.current._ID=spider_Val(datamodel$f_getfield(v_entry,1));
spiderLine=2097231;
datamodel$t_Files.current._Name=datamodel$f_getfield(v_entry,2);
spiderLine=2097232;
datamodel$t_Files.current._Type=spider_GetMapElement(datamodel$m_MIMETypes,spider_GetExtensionPart_DEBUG(datamodel$t_Files.current._Name))._s;
spiderLine=2097233;
}
spiderLine=2097234;
return 0;
}
function general$f_parsearticles(v_result) {
var v_i=0;
var v_entry="";
var v_count=0;
spiderLine=2097236;;;;
spiderLine=2097239;
v_result=datamodel$f_stripprefix(v_result,_S8);
spiderLine=2097240;
v_count=datamodel$f_getrecordcount(v_result);
spiderLine=2097242;
v_i=1;
for (;v_count>=v_i;v_i+=1) {
spiderLine=2097243;
v_entry=datamodel$f_getrecord(v_result,v_i);
spiderLine=2097244;
spider_AddElement_DEBUG(datamodel$t_Articles);
spiderLine=2097245;
datamodel$t_Articles.current._ID=spider_Val(datamodel$f_getfield(v_entry,1));
spiderLine=2097246;
datamodel$t_Articles.current._Title=datamodel$f_getfield(v_entry,2);
spiderLine=2097247;
datamodel$t_Articles.current._Draft=spider_Val(datamodel$f_getfield(v_entry,3));
spiderLine=2097248;
datamodel$t_Articles.current._Tags=spider_Val(datamodel$f_getfield(v_entry,4));
spiderLine=2097249;
datamodel$t_Articles.current._Date=spider_Val(datamodel$f_getfield(v_entry,5));
spiderLine=2097250;
}
spiderLine=2097251;
return 0;
}
function mainwindow$f_handler_tags() {
spiderLine=3146242;
spiderLine=3146243;
if (mainwindow$g_state._CurrentSelection!=3) {
spiderLine=3146244;
mainwindow$f_changeselection();
spiderLine=3146245;
mainwindow$g_state._CurrentSelection=3;
spiderLine=3146246;
mainwindow$f_setmenuhighlight(mainwindow$g_menubar._Tags);
spiderLine=3146247;
spider_HideGadget_DEBUG(mainwindow$g_tagslist._Container,0);
spiderLine=3146248;
mainwindow$f_handler_resize();
}
spiderLine=3146249;
spiderLine=3146250;
return 0;
}
function mainwindow$f_sanitizeurl(v_inputstring) {
var v_charcode=0;
var v_i=0;
var v_result="";
var v_len=0;
var v_char="";
spiderLine=3146069;;;;;
spiderLine=3146070;
v_len=spider_Len(v_inputstring);
spiderLine=3146072;
v_i=1;
for (;v_len>=v_i;v_i+=1) {
spiderLine=3146073;
v_char=spider_Mid(v_inputstring,v_i,1);
spiderLine=3146074;
v_charcode=spider_Asc(v_char);
spiderLine=3146075;
if ((v_charcode>=65 && v_charcode<=90) || (v_charcode>=97 && v_charcode<=122) || (v_charcode>=48 && v_charcode<=57) || v_char==_S44 || v_char==_S45 || v_char==_S46 || v_char==_S47) {
spiderLine=3146076;
v_result=v_result+v_char;
}
spiderLine=3146077;
spiderLine=3146078;
}
spiderLine=3146079;
if (1) return v_result;
spiderLine=3146080;
return "";
}
function mainwindow$f_newfile_callback() {
spiderLine=3146493;
spiderLine=3146494;
if (spider_NextSelectedFile_DEBUG()) {
spiderLine=3146495;
spider_OpenFile_DEBUG(-1,spider_SelectedFileName_DEBUG(),mainwindow$f_openfile_callback,65536);
}
spiderLine=3146496;
spiderLine=3146497;
return 0;
}
function mainwindow$f_updatearticle_callback(v_success,v_result,v_tags) {
var v_item=0;
spiderLine=3146400;
spiderLine=3146401;
if (!(v_success)) {
spiderLine=3146402;
spider_MessageRequester_DEBUG(_S63);
spiderLine=3146403;
if (1) return 0;
}
spiderLine=3146404;
spiderLine=3146406;
if (datamodel$f_findarticlebyid(mainwindow$g_state._CurrentArticleID)) {
spiderLine=3146407;
datamodel$t_Articles.current._Date=spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._Date);
spiderLine=3146408;
datamodel$t_Articles.current._Draft=spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._CheckboxDraft);
spiderLine=3146409;
datamodel$t_Articles.current._Title=spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle);
spiderLine=3146410;
datamodel$t_Articles.current._Tags=v_tags;
spiderLine=3146412;
v_item=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon);
spiderLine=3146413;
spider_SetGadgetItemText_DEBUG(mainwindow$g_articlelist._ListIcon,v_item,datamodel$f_formatarticlelistitem(datamodel$t_Articles.current));
spiderLine=3146414;
mainwindow$f_handler_articles();
}
spiderLine=3146415;
spiderLine=3146416;
return 0;
}
function mainwindow$f_open() {
spiderLine=3145878;
spiderLine=3145879;
mainwindow$g_state._Window=spider_OpenWindow_DEBUG(-1,0,0,10,10,_S11,4096);
spiderLine=3145880;
mainwindow$g_state._CurrentSelection=0;
spiderLine=3145882;
mainwindow$f_createmenubar();
spiderLine=3145883;
mainwindow$f_createarticlelistview();
spiderLine=3145884;
mainwindow$f_createarticleeditorview();
spiderLine=3145885;
mainwindow$f_createfilesview();
spiderLine=3145886;
mainwindow$f_createtagslistview();
spiderLine=3145887;
mainwindow$f_createtageditorview();
spiderLine=3145889;
spider_BindEvent_DEBUG(7,mainwindow$f_handler_resize);
spiderLine=3145890;
mainwindow$f_handler_resize();
spiderLine=3145891;
return 0;
}
function mainwindow$f_edittag_callback(v_success,v_result,v_userdata) {
var v_entry="";
spiderLine=3146602;;
spiderLine=3146605;
if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S82))) {
spiderLine=3146606;
spider_MessageRequester_DEBUG(_S83);
spiderLine=3146607;
if (1) return 0;
}
spiderLine=3146608;
spiderLine=3146610;
v_result=datamodel$f_stripprefix(v_result,_S82);
spiderLine=3146612;
v_entry=datamodel$f_getrecord(v_result,1);
spiderLine=3146613;
spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._StringName,datamodel$f_getfield(v_entry,1));
spiderLine=3146614;
spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._StringColor,datamodel$f_getfield(v_entry,2));
spiderLine=3146616;
spider_ResetList_DEBUG(mainwindow$g_tageditor._LanguageTabs);
while (spider_NextElement_DEBUG(mainwindow$g_tageditor._LanguageTabs)) {
spiderLine=3146618;
v_entry=datamodel$f_getrecord(v_result,(spider_ListIndex_DEBUG(mainwindow$g_tageditor._LanguageTabs)+2));
spiderLine=3146619;
spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._LanguageTabs.current._Name,v_entry);
spiderLine=3146620;
}
il_wend113:;
spiderLine=3146622;
mainwindow$f_changeselection();
spiderLine=3146623;
mainwindow$g_state._CurrentSelection=4;
spiderLine=3146624;
spider_HideGadget_DEBUG(mainwindow$g_tageditor._Container,0);
spiderLine=3146625;
mainwindow$f_handler_resize();
spiderLine=3146626;
return 0;
}
function mainwindow$f_createtagslistview() {
spiderLine=3146018;
spiderLine=3146019;
mainwindow$g_tagslist._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10);
spiderLine=3146021;
mainwindow$g_tagslist._ListIcon=spider_ListIconGadget_DEBUG(-1,0,0,10,10,_S33,200);
spiderLine=3146022;
spider_BindGadgetEvent_DEBUG(mainwindow$g_tagslist._ListIcon,mainwindow$f_handler_edittag,2);
spiderLine=3146023;
spider_AddGadgetColumn_DEBUG(mainwindow$g_tagslist._ListIcon,1,_S38,100);
spiderLine=3146025;
spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) {
spiderLine=3146025;
spiderLine=3146026;
spider_AddGadgetItem_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$f_formattaglistitem(datamodel$t_Tags.current));
spiderLine=3146027;
spider_SetGadgetItemData_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._ID);
spiderLine=3146028;
}
spiderLine=3146030;
mainwindow$g_tagslist._ButtonNew=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S39);
spiderLine=3146031;
mainwindow$g_tagslist._ButtonEdit=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S40);
spiderLine=3146032;
spider_BindGadgetEvent_DEBUG(mainwindow$g_tagslist._ButtonNew,mainwindow$f_handler_newtag);
spiderLine=3146033;
spider_BindGadgetEvent_DEBUG(mainwindow$g_tagslist._ButtonEdit,mainwindow$f_handler_edittag);
spiderLine=3146035;
spider_CloseGadgetList_DEBUG();
spiderLine=3146036;
spider_HideGadget_DEBUG(mainwindow$g_tagslist._Container,1);
spiderLine=3146037;
return 0;
}
function mainwindow$f_handler_deletearticle() {
var v_selecteditem=0;
var v_articleid=0;
spiderLine=3146268;
spiderLine=3146269;
v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon);
spiderLine=3146270;
if (v_selecteditem>-1) {
spiderLine=3146271;
v_articleid=spider_GetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,v_selecteditem);
spiderLine=3146272;
spider_HTTPRequest(1,_S1,_S50+spider_Str(v_articleid),mainwindow$f_deletearticle_callback);
}
spiderLine=3146273;
spiderLine=3146274;
return 0;
}
function mainwindow$f_handler_filelisticon() {
var v_selecteditem=0;
var v_url="";
var v_eventtype=0;
spiderLine=3146339;;
spiderLine=3146340;
v_eventtype=spider_EventType();
spiderLine=3146341;
v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_filesview._ListIcon);
spiderLine=3146343;
if (v_selecteditem>-1) {
spiderLine=3146344;
v_url=_S58+spider_RemoveString_DEBUG(spider_GetGadgetItemText_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem,0),_S47,0,0,1);
spiderLine=3146345;
if (v_eventtype==2) {
spiderLine=3146346;
mainwindow$f_openurlinnewtab(v_url);
spiderLine=3146347;
} else if (v_eventtype==1) {
spiderLine=3146348;
spider_SetClipboardText(v_url);
}
spiderLine=3146349;
}
spiderLine=3146350;
spiderLine=3146351;
return 0;
}
function mainwindow$f_createarticlelistview() {
spiderLine=3145929;
spiderLine=3145930;
mainwindow$g_articlelist._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10);
spiderLine=3145932;
mainwindow$g_articlelist._ListIcon=spider_ListIconGadget_DEBUG(-1,0,0,10,10,_S17,200);
spiderLine=3145933;
spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ListIcon,mainwindow$f_handler_editarticle,2);
spiderLine=3145934;
spider_AddGadgetColumn_DEBUG(mainwindow$g_articlelist._ListIcon,1,_S18,50);
spiderLine=3145935;
spider_AddGadgetColumn_DEBUG(mainwindow$g_articlelist._ListIcon,2,_S19,100);
spiderLine=3145937;
spider_ResetList(datamodel$t_Articles); while (spider_NextElement(datamodel$t_Articles)) {
spiderLine=3145937;
spiderLine=3145938;
spider_AddGadgetItem_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$f_formatarticlelistitem(datamodel$t_Articles.current));
spiderLine=3145939;
spider_SetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$t_Articles.current._ID);
spiderLine=3145940;
}
spiderLine=3145942;
mainwindow$g_articlelist._ButtonNew=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S20);
spiderLine=3145943;
mainwindow$g_articlelist._ButtonEdit=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S21);
spiderLine=3145944;
mainwindow$g_articlelist._ButtonDelete=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S22);
spiderLine=3145945;
spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ButtonNew,mainwindow$f_handler_newarticle);
spiderLine=3145946;
spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ButtonEdit,mainwindow$f_handler_editarticle);
spiderLine=3145947;
spider_BindGadgetEvent_DEBUG(mainwindow$g_articlelist._ButtonDelete,mainwindow$f_handler_deletearticle);
spiderLine=3145949;
spider_CloseGadgetList_DEBUG();
spiderLine=3145950;
return 0;
}
function mainwindow$f_handler_newtag() {
spiderLine=3146357;
spiderLine=3146358;
spider_HTTPRequest(0,_S1,_S59,mainwindow$f_newtag_callback);
spiderLine=3146359;
return 0;
}
function mainwindow$f_updatetag_callback(v_success,v_result,v_userdata) {
var v_item=0;
spiderLine=3146628;
spiderLine=3146629;
if (!(v_success)) {
spiderLine=3146630;
spider_MessageRequester_DEBUG(_S84);
spiderLine=3146631;
if (1) return 0;
}
spiderLine=3146632;
spiderLine=3146634;
if (datamodel$f_findtagbyid(mainwindow$g_state._CurrentTagID)) {
spiderLine=3146635;
datamodel$t_Tags.current._DefaultName=spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringName);
spiderLine=3146636;
datamodel$t_Tags.current._Color=spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringColor);
spiderLine=3146638;
v_item=spider_GetGadgetState_DEBUG(mainwindow$g_tagslist._ListIcon);
spiderLine=3146639;
spider_SetGadgetItemText_DEBUG(mainwindow$g_tagslist._ListIcon,v_item,datamodel$f_formattaglistitem(datamodel$t_Tags.current));
spiderLine=3146640;
spider_SetGadgetItemText_DEBUG(mainwindow$g_articleeditor._ListviewTags,v_item,datamodel$t_Tags.current._DefaultName);
spiderLine=3146641;
mainwindow$f_handler_tags();
}
spiderLine=3146642;
spiderLine=3146643;
return 0;
}
function mainwindow$f_stringtobase64(v_string) {
var v_size=0;
var p_memory=0;
var v_result="";
spiderLine=3146082;;;;
spiderLine=3146084;
v_size=spider_StringByteLength_DEBUG(v_string);
spiderLine=3146085;
if (v_size>0) {
spiderLine=3146086;
p_memory=spider_AllocateMemory_DEBUG(v_size,1);
spiderLine=3146087;
spider_PokeS_DEBUG(p_memory,0,v_string);
spiderLine=3146088;
v_result=spider_Base64Encoder_DEBUG(p_memory,0,v_size);
spiderLine=3146089;
spider_FreeMemory_DEBUG(p_memory);
}
spiderLine=3146090;
spiderLine=3146091;
if (1) return v_result;
spiderLine=3146092;
return "";
}
function mainwindow$f_newtag_callback(v_success,v_result,v_userdata) {
spiderLine=3146578;
spiderLine=3146579;
if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S80))) {
spiderLine=3146580;
spider_MessageRequester_DEBUG(_S81);
spiderLine=3146581;
if (1) return 0;
}
spiderLine=3146582;
spiderLine=3146584;
v_result=datamodel$f_stripprefix(v_result,_S80);
spiderLine=3146586;
spider_LastElement(datamodel$t_Tags);
spiderLine=3146587;
spider_AddElement_DEBUG(datamodel$t_Tags);
spiderLine=3146588;
datamodel$t_Tags.current._ID=spider_Val(datamodel$f_getfield(v_result,1));
spiderLine=3146589;
datamodel$t_Tags.current._DefaultName=datamodel$f_getfield(v_result,2);
spiderLine=3146590;
datamodel$t_Tags.current._Color=datamodel$f_getfield(v_result,3);
spiderLine=3146592;
spider_AddGadgetItem_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$f_formattaglistitem(datamodel$t_Tags.current));
spiderLine=3146593;
spider_SetGadgetItemData_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._ID);
spiderLine=3146594;
spider_SetGadgetState_DEBUG(mainwindow$g_tagslist._ListIcon,spider_ListIndex_DEBUG(datamodel$t_Tags));
spiderLine=3146595;
spider_AddGadgetItem_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._DefaultName);
spiderLine=3146596;
spider_SetGadgetItemData_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._BinaryID);
spiderLine=3146598;
mainwindow$g_state._CurrentTagID=datamodel$t_Tags.current._ID;
spiderLine=3146599;
spider_HTTPRequest(0,_S1,_S60+spider_Str(mainwindow$g_state._CurrentTagID),mainwindow$f_edittag_callback);
spiderLine=3146600;
return 0;
}
function mainwindow$f_newarticle_callback(v_success,v_result,v_userdata) {
spiderLine=3146452;
spiderLine=3146453;
if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S66))) {
spiderLine=3146454;
spider_MessageRequester_DEBUG(_S67);
spiderLine=3146455;
if (1) return 0;
}
spiderLine=3146456;
spiderLine=3146458;
v_result=datamodel$f_stripprefix(v_result,_S66);
spiderLine=3146460;
spider_LastElement(datamodel$t_Articles);
spiderLine=3146461;
spider_AddElement_DEBUG(datamodel$t_Articles);
spiderLine=3146462;
datamodel$t_Articles.current._ID=spider_Val(datamodel$f_getfield(v_result,1));
spiderLine=3146463;
datamodel$t_Articles.current._Title=datamodel$f_getfield(v_result,2);
spiderLine=3146464;
datamodel$t_Articles.current._Draft=spider_Val(datamodel$f_getfield(v_result,3));
spiderLine=3146465;
datamodel$t_Articles.current._Tags=spider_Val(datamodel$f_getfield(v_result,4));
spiderLine=3146466;
datamodel$t_Articles.current._Date=spider_Val(datamodel$f_getfield(v_result,5));
spiderLine=3146468;
spider_AddGadgetItem_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$f_formatarticlelistitem(datamodel$t_Articles.current));
spiderLine=3146469;
spider_SetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,0,datamodel$t_Articles.current._ID);
spiderLine=3146471;
mainwindow$g_state._CurrentArticleID=datamodel$t_Articles.current._ID;
spiderLine=3146472;
spider_HTTPRequest(0,_S1,_S49+spider_Str(mainwindow$g_state._CurrentArticleID),mainwindow$f_editarticle_callback);
spiderLine=3146473;
return 0;
}
function mainwindow$f_handler_newfile() {
spiderLine=3146327;
spiderLine=3146328;
spider_OpenFileRequester_DEBUG(_S56,mainwindow$f_newfile_callback);
spiderLine=3146329;
return 0;
}
function mainwindow$f_createtageditorview() {
spiderLine=3146039;
spiderLine=3146040;
mainwindow$g_tageditor._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10);
spiderLine=3146042;
spider_TextGadget_DEBUG(-1,20,20,80,20,_S41,8);
spiderLine=3146043;
mainwindow$g_tageditor._StringName=spider_StringGadget_DEBUG(-1,110,20,200,20,_S24);
spiderLine=3146045;
spider_TextGadget_DEBUG(-1,20,60,50,20,_S42,8);
spiderLine=3146046;
mainwindow$g_tageditor._StringColor=spider_StringGadget_DEBUG(-1,110,60,100,20,_S24);
spiderLine=3146048;
mainwindow$g_tageditor._Panel=spider_PanelGadget_DEBUG(-1,0,0,10,10);
spiderLine=3146049;
spider_ResetList(datamodel$t_Language); while (spider_NextElement(datamodel$t_Language)) {
spiderLine=3146049;
spiderLine=3146050;
spider_AddElement_DEBUG(mainwindow$g_tageditor._LanguageTabs);
spiderLine=3146051;
spider_AddGadgetItem_DEBUG(mainwindow$g_tageditor._Panel,-1,datamodel$t_Language.current._s);
spiderLine=3146053;
spider_TextGadget_DEBUG(-1,20,20,100,20,_S43,8);
spiderLine=3146054;
mainwindow$g_tageditor._LanguageTabs.current._Name=spider_StringGadget_DEBUG(-1,130,20,200,20,_S24);
spiderLine=3146055;
}
spiderLine=3146056;
spider_CloseGadgetList_DEBUG();
spiderLine=3146058;
mainwindow$g_tageditor._ButtonSave=spider_ButtonGadget_DEBUG(-1,0,0,180,25,_S32);
spiderLine=3146059;
spider_BindGadgetEvent_DEBUG(mainwindow$g_tageditor._ButtonSave,mainwindow$f_handler_updatetag);
spiderLine=3146061;
spider_CloseGadgetList_DEBUG();
spiderLine=3146062;
spider_HideGadget_DEBUG(mainwindow$g_tageditor._Container,1);
spiderLine=3146063;
return 0;
}
function mainwindow$f_handler_files() {
spiderLine=3146232;
spiderLine=3146233;
if (mainwindow$g_state._CurrentSelection!=2) {
spiderLine=3146234;
mainwindow$f_changeselection();
spiderLine=3146235;
mainwindow$g_state._CurrentSelection=2;
spiderLine=3146236;
mainwindow$f_setmenuhighlight(mainwindow$g_menubar._Files);
spiderLine=3146237;
spider_HideGadget_DEBUG(mainwindow$g_filesview._Container,0);
spiderLine=3146238;
mainwindow$f_handler_resize();
}
spiderLine=3146239;
spiderLine=3146240;
return 0;
}
function mainwindow$f_previewarticle_callback(v_success,v_result,v_userdata) {
var v_url="";
spiderLine=3146569;
spiderLine=3146570;
if (!(v_success)) {
spiderLine=3146571;
spider_MessageRequester_DEBUG(_S77);
spiderLine=3146572;
if (1) return 0;
}
spiderLine=3146573;
spiderLine=3146574;
v_url=_S78+datamodel$f_stripprefix(v_result,_S79);
spiderLine=3146575;
mainwindow$f_openurlinnewtab(v_url);
spiderLine=3146576;
return 0;
}
function mainwindow$f_handler_edittag() {
var v_item=0;
spiderLine=3146361;
spiderLine=3146362;
v_item=spider_GetGadgetState_DEBUG(mainwindow$g_tagslist._ListIcon);
spiderLine=3146363;
if (v_item>=0) {
spiderLine=3146364;
mainwindow$g_state._CurrentTagID=spider_GetGadgetItemData_DEBUG(mainwindow$g_tagslist._ListIcon,v_item);
spiderLine=3146365;
spider_HTTPRequest(0,_S1,_S60+spider_Str(mainwindow$g_state._CurrentTagID),mainwindow$f_edittag_callback);
}
spiderLine=3146366;
spiderLine=3146367;
return 0;
}
function mainwindow$f_openurlinnewtab(v_url) {
spiderLine=3146121;
window.open(v_url, '_blank').focus();
spiderLine=3146123;
return 0;
}
function mainwindow$f_uploadfile_callback(v_success,v_result,v_userdata) {
spiderLine=3146536;
spiderLine=3146537;
if (!(v_success)) {
spiderLine=3146538;
spider_MessageRequester_DEBUG(_S74);
spiderLine=3146539;
if (1) return 0;
}
spiderLine=3146540;
spiderLine=3146542;
v_result=datamodel$f_stripprefix(v_result,_S75);
spiderLine=3146544;
spider_LastElement(datamodel$t_Files);
spiderLine=3146545;
spider_AddElement_DEBUG(datamodel$t_Files);
spiderLine=3146546;
datamodel$t_Files.current._ID=spider_Val(datamodel$f_getfield(v_result,1));
spiderLine=3146547;
datamodel$t_Files.current._Name=datamodel$f_getfield(v_result,2);
spiderLine=3146548;
datamodel$t_Files.current._Type=spider_GetMapElement(datamodel$m_MIMETypes,spider_GetExtensionPart_DEBUG(datamodel$t_Files.current._Name))._s;
spiderLine=3146550;
spider_AddGadgetItem_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._Name+_S35+datamodel$t_Files.current._Type);
spiderLine=3146551;
spider_SetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._ID);
spiderLine=3146552;
return 0;
}
function mainwindow$f_setmenuhighlight(v_activegadget) {
spiderLine=3146112;
spiderLine=3146113;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Articles,1,16777215);
spiderLine=3146114;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Files,1,16777215);
spiderLine=3146115;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Tags,1,16777215);
spiderLine=3146116;
if (v_activegadget) {
spiderLine=3146117;
spider_SetGadgetColor_DEBUG(v_activegadget,1,10066329);
}
spiderLine=3146118;
spiderLine=3146119;
return 0;
}
function mainwindow$f_deletearticle_callback(v_success,v_result,v_userdata) {
var v_selecteditem=0;
var v_articleid=0;
spiderLine=3146475;
spiderLine=3146476;
if (!(v_success)) {
spiderLine=3146477;
spider_MessageRequester_DEBUG(_S68);
spiderLine=3146478;
if (1) return 0;
}
spiderLine=3146479;
spiderLine=3146481;
v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon);
spiderLine=3146482;
v_articleid=spider_GetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,v_selecteditem);
spiderLine=3146485;
spider_RemoveGadgetItem_DEBUG(mainwindow$g_articlelist._ListIcon,v_selecteditem);
spiderLine=3146488;
if (datamodel$f_findarticlebyid(v_articleid)) {
spiderLine=3146489;
spider_DeleteElement_DEBUG(datamodel$t_Articles);
}
spiderLine=3146490;
spiderLine=3146491;
return 0;
}
function mainwindow$f_handler_updatetag() {
var v_name="";
var v_textbundle="";
spiderLine=3146369;;;
spiderLine=3146373;
v_name=mainwindow$f_sanitizeurl(spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringName));
spiderLine=3146374;
spider_SetGadgetText_DEBUG(mainwindow$g_tageditor._StringName,v_name);
spiderLine=3146376;
spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) {
spiderLine=3146376;
spiderLine=3146377;
if (datamodel$t_Tags.current._DefaultName==v_name) {
spiderLine=3146378;
if (datamodel$t_Tags.current._ID!=mainwindow$g_state._CurrentTagID) {
spiderLine=3146379;
spider.debug.Print(_S61);
spiderLine=3146380;
if (1) return 0;
}
spiderLine=3146381;
}
spiderLine=3146382;
spiderLine=3146383;
}
spiderLine=3146385;
v_textbundle=spider_Str(mainwindow$g_state._CurrentTagID)+_S52;
spiderLine=3146386;
v_textbundle=v_textbundle+spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringName)+_S52;
spiderLine=3146387;
v_textbundle=v_textbundle+spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._StringColor)+_S53;
spiderLine=3146389;
spider_ResetList(mainwindow$g_tageditor._LanguageTabs); while (spider_NextElement(mainwindow$g_tageditor._LanguageTabs)) {
spiderLine=3146389;
spiderLine=3146390;
v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_tageditor._LanguageTabs.current._Name))+_S53;
spiderLine=3146391;
}
spiderLine=3146393;
spider_HTTPRequest(1,_S1,_S62+v_textbundle,mainwindow$f_updatetag_callback);
spiderLine=3146394;
return 0;
}
function mainwindow$f_createarticleeditorview() {
spiderLine=3145952;
spiderLine=3145953;
mainwindow$g_articleeditor._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10);
spiderLine=3145955;
spider_TextGadget_DEBUG(-1,20,20,50,20,_S23,8);
spiderLine=3145956;
mainwindow$g_articleeditor._StringTitle=spider_StringGadget_DEBUG(-1,80,20,510,20,_S24);
spiderLine=3145958;
spider_TextGadget_DEBUG(-1,20,60,50,20,_S25,8);
spiderLine=3145959;
mainwindow$g_articleeditor._Date=spider_DateGadget_DEBUG(-1,80,60,200,20);
spiderLine=3145961;
mainwindow$g_articleeditor._CheckboxDraft=spider_CheckBoxGadget_DEBUG(-1,570,60,60,20,_S26,2);
spiderLine=3145963;
mainwindow$g_articleeditor._ListviewTags=spider_ListViewGadget_DEBUG(-1,20,100,100,100,2);
spiderLine=3145964;
spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) {
spiderLine=3145964;
spiderLine=3145965;
spider_AddGadgetItem_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._DefaultName);
spiderLine=3145966;
spider_SetGadgetItemData_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),datamodel$t_Tags.current._BinaryID);
spiderLine=3145967;
}
spiderLine=3145969;
mainwindow$g_articleeditor._Panel=spider_PanelGadget_DEBUG(-1,0,0,10,10);
spiderLine=3145970;
spider_ResetList(datamodel$t_Language); while (spider_NextElement(datamodel$t_Language)) {
spiderLine=3145970;
spiderLine=3145971;
spider_AddElement_DEBUG(mainwindow$g_articleeditor._LanguageTabs);
spiderLine=3145972;
spider_AddGadgetItem_DEBUG(mainwindow$g_articleeditor._Panel,-1,datamodel$t_Language.current._s);
spiderLine=3145974;
spider_TextGadget_DEBUG(-1,20,20,90,20,_S27,8);
spiderLine=3145975;
mainwindow$g_articleeditor._LanguageTabs.current._Name=spider_StringGadget_DEBUG(-1,130,20,80,20,_S24);
spiderLine=3145977;
spider_TextGadget_DEBUG(-1,20,60,60,20,_S28,8);
spiderLine=3145978;
mainwindow$g_articleeditor._LanguageTabs.current._Image=spider_StringGadget_DEBUG(-1,130,60,80,20,_S24);
spiderLine=3145980;
spider_TextGadget_DEBUG(-1,20,100,50,20,_S29,8);
spiderLine=3145981;
mainwindow$g_articleeditor._LanguageTabs.current._Blurb=spider_EditorGadget_DEBUG(-1,20,120,80,50,2);
spiderLine=3145983;
spider_TextGadget_DEBUG(-1,20,180,50,20,_S30,8);
spiderLine=3145984;
mainwindow$g_articleeditor._LanguageTabs.current._Content=spider_EditorGadget_DEBUG(-1,20,200,80,20);
spiderLine=3145985;
}
spiderLine=3145986;
spider_CloseGadgetList_DEBUG();
spiderLine=3145988;
mainwindow$g_articleeditor._ButtonPreview=spider_ButtonGadget_DEBUG(-1,0,0,180,25,_S31);
spiderLine=3145989;
mainwindow$g_articleeditor._ButtonSave=spider_ButtonGadget_DEBUG(-1,0,0,180,25,_S32);
spiderLine=3145990;
spider_BindGadgetEvent_DEBUG(mainwindow$g_articleeditor._ButtonSave,mainwindow$f_handler_updatearticle);
spiderLine=3145991;
spider_BindGadgetEvent_DEBUG(mainwindow$g_articleeditor._ButtonPreview,mainwindow$f_handler_previewarticle);
spiderLine=3145993;
spider_CloseGadgetList_DEBUG();
spiderLine=3145994;
spider_HideGadget_DEBUG(mainwindow$g_articleeditor._Container,1);
spiderLine=3145995;
return 0;
}
function mainwindow$f_editarticle_callback(v_success,v_result,v_userdata) {
var v_entry="";
spiderLine=3146418;;
spiderLine=3146421;
if (!(v_success) || !(datamodel$f_validateresponse(v_result,_S64))) {
spiderLine=3146422;
spider_MessageRequester_DEBUG(_S65);
spiderLine=3146423;
if (1) return 0;
}
spiderLine=3146424;
spiderLine=3146426;
v_result=datamodel$f_stripprefix(v_result,_S64);
spiderLine=3146428;
spider_ResetList_DEBUG(mainwindow$g_articleeditor._LanguageTabs);
while (spider_NextElement_DEBUG(mainwindow$g_articleeditor._LanguageTabs)) {
spiderLine=3146430;
v_entry=datamodel$f_getrecord(v_result,(spider_ListIndex_DEBUG(mainwindow$g_articleeditor._LanguageTabs)+1));
spiderLine=3146431;
spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name,datamodel$f_getfield(v_entry,1));
spiderLine=3146432;
spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Image,datamodel$f_getfield(v_entry,2));
spiderLine=3146433;
spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Blurb,datamodel$f_getfield(v_entry,3));
spiderLine=3146434;
spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content,datamodel$f_getfield(v_entry,4));
spiderLine=3146435;
}
il_wend80:;
spiderLine=3146437;
if (datamodel$f_findarticlebyid(mainwindow$g_state._CurrentArticleID)) {
spiderLine=3146438;
spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle,datamodel$t_Articles.current._Title);
spiderLine=3146439;
spider_SetGadgetState_DEBUG(mainwindow$g_articleeditor._CheckboxDraft,datamodel$t_Articles.current._Draft);
spiderLine=3146440;
spider_SetGadgetState_DEBUG(mainwindow$g_articleeditor._Date,datamodel$t_Articles.current._Date);
spiderLine=3146441;
spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) {
spiderLine=3146441;
spiderLine=3146442;
spider_SetGadgetItemState_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags),((datamodel$t_Tags.current._BinaryID&datamodel$t_Articles.current._Tags)?1:0));
spiderLine=3146443;
}
}
spiderLine=3146444;
spiderLine=3146446;
mainwindow$f_changeselection();
spiderLine=3146447;
mainwindow$g_state._CurrentSelection=1;
spiderLine=3146448;
spider_HideGadget_DEBUG(mainwindow$g_articleeditor._Container,0);
spiderLine=3146449;
mainwindow$f_handler_resize();
spiderLine=3146450;
return 0;
}
function mainwindow$f_openfile_callback(v_status,v_filename$,v_file,v_sizeread) {
var p_buffer=0;
spiderLine=3146499;;
spiderLine=3146502;
if (v_status!=0) {
spiderLine=3146503;
if (1) return 0;
}
spiderLine=3146504;
spiderLine=3146506;
p_buffer=spider_AllocateMemory_DEBUG(v_sizeread);
spiderLine=3146507;
spider_ReadData_DEBUG(v_file,p_buffer,0,v_sizeread);
spiderLine=3146508;
mainwindow$g_state._UploadBase64=spider_Base64Encoder_DEBUG(p_buffer,0,v_sizeread);
spiderLine=3146509;
spider_FreeMemory_DEBUG(p_buffer);
spiderLine=3146510;
spider_CloseFile_DEBUG(v_file);
spiderLine=3146512;
v_filename$=spider_ReplaceString_DEBUG(v_filename$,_S69,_S47);
spiderLine=3146513;
v_filename$=spider_StringField_DEBUG(v_filename$,(spider_CountString(v_filename$,_S47)+1),_S47);
spiderLine=3146514;
v_filename$=spider_InputRequester_DEBUG(_S70,_S58+v_filename$);
spiderLine=3146515;
v_filename$=spider_RemoveString_DEBUG(v_filename$,_S58,0,0,1);
spiderLine=3146516;
v_filename$=mainwindow$f_sanitizeurl(v_filename$);
spiderLine=3146518;
if (v_filename$==_S24) {
spiderLine=3146519;
if (1) return 0;
}
spiderLine=3146520;
spiderLine=3146522;
spider_ResetList(datamodel$t_Files); while (spider_NextElement(datamodel$t_Files)) {
spiderLine=3146522;
spiderLine=3146523;
if (datamodel$t_Files.current._Name==v_filename$) {
spiderLine=3146524;
spider_MessageRequester_DEBUG(_S71);
spiderLine=3146525;
if (1) return 0;
}
spiderLine=3146526;
spiderLine=3146527;
}
spiderLine=3146529;
if (spider_Left(v_filename$,1)!=_S47) {
spiderLine=3146530;
v_filename$=_S47+v_filename$;
}
spiderLine=3146531;
spiderLine=3146533;
spider_HTTPRequest(1,_S1,_S72+v_filename$+_S73+mainwindow$g_state._UploadBase64,mainwindow$f_uploadfile_callback);
spiderLine=3146534;
return 0;
}
function mainwindow$f_handler_resize() {
var v_winheight=0;
var v_contentwidth=0;
var v_contentx=0;
var v_contenty=0;
var v_contentheight=0;
var v_menux=0;
var v_panelwidth=0;
var v_panelheight=0;
var v_winwidth=0;
spiderLine=3146129;
spiderLine=3146130;
v_winwidth=spider_WindowWidth_DEBUG(mainwindow$g_state._Window);
spiderLine=3146131;
v_winheight=spider_WindowHeight_DEBUG(mainwindow$g_state._Window);
spiderLine=3146132;
v_contentwidth=v_winwidth;;
spiderLine=3146133;
v_contentx=0;
spiderLine=3146133;
v_contenty=80;;;;
spiderLine=3146136;
if (v_winwidth<750) {
spiderLine=3146137;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Container,0,0,v_winwidth,80);
spiderLine=3146138;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Articles,15,55,-65535,-65535);
spiderLine=3146139;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator0,66,55,-65535,-65535);
spiderLine=3146140;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Files,85,55,-65535,-65535);
spiderLine=3146141;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator1,123,55,-65535,-65535);
spiderLine=3146142;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Tags,140,55,-65535,-65535);
spiderLine=3146143;
v_contentheight=(v_winheight+-80);
spiderLine=3146144;
} else {
spiderLine=3146144;
spiderLine=3146145;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Container,0,0,v_winwidth,60);
spiderLine=3146146;
v_menux=(v_winwidth+-185);
spiderLine=3146147;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Articles,(v_menux+15),22,-65535,-65535);
spiderLine=3146148;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator0,(v_menux+66),22,-65535,-65535);
spiderLine=3146149;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Files,(v_menux+85),22,-65535,-65535);
spiderLine=3146150;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Separator1,(v_menux+123),22,-65535,-65535);
spiderLine=3146151;
spider_ResizeGadget_DEBUG(mainwindow$g_menubar._Tags,(v_menux+140),22,-65535,-65535);
spiderLine=3146152;
v_contentheight=(v_winheight+-160);
spiderLine=3146153;
v_contentwidth=spider_BankerRound((v_winwidth*0.8000000000000000444089209850062616169452667236328125));
spiderLine=3146154;
if (v_contentwidth>950) {
spiderLine=3146154;
v_contentwidth=950;
}
spiderLine=3146154;
spiderLine=3146155;
v_contenty=(v_contenty+30);
spiderLine=3146156;
v_contentx=spider_BankerRound((((v_winwidth-v_contentwidth))*0.5));
}
spiderLine=3146157;
spiderLine=3146159;
var sb_select3=mainwindow$g_state._CurrentSelection;
spiderLine=3146160;
if (sb_select3==0) {
spiderLine=3146161;
spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight);
spiderLine=3146162;
spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ListIcon,0,0,v_contentwidth,(v_contentheight+-40));
spiderLine=3146163;
spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ButtonNew,(v_contentwidth+-130),(v_contentheight+-30),-65535,-65535);
spiderLine=3146164;
spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ButtonEdit,(v_contentwidth+-260),(v_contentheight+-30),-65535,-65535);
spiderLine=3146165;
spider_ResizeGadget_DEBUG(mainwindow$g_articlelist._ButtonDelete,(v_contentwidth+-390),(v_contentheight+-30),-65535,-65535);
spiderLine=3146167;
} else if (sb_select3==1) {
spiderLine=3146168;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight);
spiderLine=3146169;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._StringTitle,-65535,-65535,(v_contentwidth+-100),-65535);
spiderLine=3146170;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Date,-65535,-65535,(v_contentwidth+-170),-65535);
spiderLine=3146171;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._CheckboxDraft,(v_contentwidth+-80),60,60,-65535);
spiderLine=3146172;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._ListviewTags,-65535,-65535,(v_contentwidth+-40),100);
spiderLine=3146173;
if (v_contentwidth>550) {
spiderLine=3146174;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Panel,20,210,(v_contentwidth+-40),(v_contentheight+-265));
spiderLine=3146175;
} else {
spiderLine=3146175;
spiderLine=3146176;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._Panel,0,210,v_contentwidth,(v_contentheight+-265));
}
spiderLine=3146177;
spiderLine=3146178;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._ButtonPreview,20,(v_contentheight+-40),spider_BankerRound((((v_contentwidth+-60))*0.5)),25);
spiderLine=3146179;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._ButtonSave,spider_BankerRound(((((v_contentwidth+-60))*0.5)+40)),(v_contentheight+-40),spider_BankerRound((((v_contentwidth+-60))*0.5)),25);
spiderLine=3146180;
v_panelwidth=spider_GadgetWidth_DEBUG(mainwindow$g_articleeditor._Panel);
spiderLine=3146181;
v_panelheight=spider_GadgetHeight_DEBUG(mainwindow$g_articleeditor._Panel);
spiderLine=3146182;
spider_ResetList(mainwindow$g_articleeditor._LanguageTabs); while (spider_NextElement(mainwindow$g_articleeditor._LanguageTabs)) {
spiderLine=3146182;
spiderLine=3146183;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name,-65535,-65535,(v_panelwidth+-150),-65535);
spiderLine=3146184;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Image,-65535,-65535,(v_panelwidth+-150),-65535);
spiderLine=3146185;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Blurb,-65535,-65535,(v_panelwidth+-40),-65535);
spiderLine=3146186;
spider_ResizeGadget_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content,-65535,-65535,(v_panelwidth+-40),(v_panelheight+-250));
spiderLine=3146187;
}
spiderLine=3146189;
} else if (sb_select3==2) {
spiderLine=3146190;
spider_ResizeGadget_DEBUG(mainwindow$g_filesview._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight);
spiderLine=3146191;
spider_ResizeGadget_DEBUG(mainwindow$g_filesview._ListIcon,0,0,v_contentwidth,(v_contentheight+-40));
spiderLine=3146192;
spider_ResizeGadget_DEBUG(mainwindow$g_filesview._ButtonNew,(v_contentwidth+-130),(v_contentheight+-30),-65535,-65535);
spiderLine=3146193;
spider_ResizeGadget_DEBUG(mainwindow$g_filesview._ButtonDelete,(v_contentwidth+-260),(v_contentheight+-30),-65535,-65535);
spiderLine=3146195;
} else if (sb_select3==3) {
spiderLine=3146196;
spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight);
spiderLine=3146197;
spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._ListIcon,0,0,v_contentwidth,(v_contentheight+-40));
spiderLine=3146198;
spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._ButtonNew,(v_contentwidth+-130),(v_contentheight+-30),-65535,-65535);
spiderLine=3146199;
spider_ResizeGadget_DEBUG(mainwindow$g_tagslist._ButtonEdit,(v_contentwidth+-260),(v_contentheight+-30),-65535,-65535);
spiderLine=3146201;
} else if (sb_select3==4) {
spiderLine=3146202;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._Container,v_contentx,v_contenty,v_contentwidth,v_contentheight);
spiderLine=3146203;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._StringName,-65535,-65535,(v_contentwidth+-130),-65535);
spiderLine=3146204;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._StringColor,-65535,-65535,(v_contentwidth+-130),-65535);
spiderLine=3146205;
if (v_contentwidth>550) {
spiderLine=3146206;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._Panel,20,100,(v_contentwidth+-40),(v_contentheight+-155));
spiderLine=3146207;
} else {
spiderLine=3146207;
spiderLine=3146208;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._Panel,0,100,v_contentwidth,(v_contentheight+-155));
}
spiderLine=3146209;
spiderLine=3146210;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._ButtonSave,20,(v_contentheight+-40),(v_contentwidth+-40),25);
spiderLine=3146211;
v_panelwidth=spider_GadgetWidth_DEBUG(mainwindow$g_tageditor._Panel);
spiderLine=3146212;
spider_ResetList(mainwindow$g_tageditor._LanguageTabs); while (spider_NextElement(mainwindow$g_tageditor._LanguageTabs)) {
spiderLine=3146212;
spiderLine=3146213;
spider_ResizeGadget_DEBUG(mainwindow$g_tageditor._LanguageTabs.current._Name,-65535,-65535,(v_panelwidth+-150),-65535);
spiderLine=3146214;
}
}
spiderLine=3146216;
return 0;
}
function mainwindow$f_handler_updatearticle() {
var v_tags=0;
var v_title="";
var v_textbundle="";
spiderLine=3146276;;;;
spiderLine=3146280;
v_title=mainwindow$f_sanitizeurl(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle));
spiderLine=3146281;
spider_SetGadgetText_DEBUG(mainwindow$g_articleeditor._StringTitle,v_title);
spiderLine=3146283;
spider_ResetList(datamodel$t_Articles); while (spider_NextElement(datamodel$t_Articles)) {
spiderLine=3146283;
spiderLine=3146284;
if (datamodel$t_Articles.current._Title==v_title) {
spiderLine=3146285;
if (datamodel$t_Articles.current._ID!=mainwindow$g_state._CurrentArticleID) {
spiderLine=3146286;
spider.debug.Print(_S51);
spiderLine=3146287;
if (1) return 0;
}
spiderLine=3146288;
}
spiderLine=3146289;
spiderLine=3146290;
}
spiderLine=3146293;
spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) {
spiderLine=3146293;
spiderLine=3146294;
if (spider_GetGadgetItemState_DEBUG(mainwindow$g_articleeditor._ListviewTags,spider_ListIndex_DEBUG(datamodel$t_Tags))) {
spiderLine=3146295;
v_tags=(v_tags|datamodel$t_Tags.current._BinaryID);
}
spiderLine=3146296;
spiderLine=3146297;
}
spiderLine=3146299;
v_textbundle=spider_Str(mainwindow$g_state._CurrentArticleID)+_S52;
spiderLine=3146300;
v_textbundle=v_textbundle+v_title+_S52;
spiderLine=3146301;
v_textbundle=v_textbundle+spider_Str(spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._CheckboxDraft))+_S52;
spiderLine=3146302;
v_textbundle=v_textbundle+spider_Str(v_tags)+_S52;
spiderLine=3146303;
v_textbundle=v_textbundle+spider_Str(spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._Date))+_S53;
spiderLine=3146305;
spider_ResetList(mainwindow$g_articleeditor._LanguageTabs); while (spider_NextElement(mainwindow$g_articleeditor._LanguageTabs)) {
spiderLine=3146305;
spiderLine=3146306;
v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name))+_S52;
spiderLine=3146307;
v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Image))+_S52;
spiderLine=3146308;
v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Blurb))+_S52;
spiderLine=3146309;
v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content))+_S53;
spiderLine=3146310;
}
spiderLine=3146312;
spider_HTTPRequest(1,_S1,_S54+v_textbundle,mainwindow$f_updatearticle_callback,v_tags);
spiderLine=3146313;
return 0;
}
function mainwindow$f_handler_newarticle() {
spiderLine=3146256;
spiderLine=3146257;
spider_HTTPRequest(0,_S1,_S48,mainwindow$f_newarticle_callback);
spiderLine=3146258;
return 0;
}
function mainwindow$f_handler_articles() {
spiderLine=3146222;
spiderLine=3146223;
if (mainwindow$g_state._CurrentSelection!=0) {
spiderLine=3146224;
mainwindow$f_changeselection();
spiderLine=3146225;
mainwindow$g_state._CurrentSelection=0;
spiderLine=3146226;
mainwindow$f_setmenuhighlight(mainwindow$g_menubar._Articles);
spiderLine=3146227;
spider_HideGadget_DEBUG(mainwindow$g_articlelist._Container,0);
spiderLine=3146228;
mainwindow$f_handler_resize();
}
spiderLine=3146229;
spiderLine=3146230;
return 0;
}
function mainwindow$f_createmenubar() {
var v_titlegadget=0;
spiderLine=3145897;;
spiderLine=3145900;
mainwindow$g_menubar._Font=spider_LoadFont_DEBUG(-1,_S12,20);
spiderLine=3145901;
mainwindow$g_menubar._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,60);
spiderLine=3145902;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Container,2,2762786);
spiderLine=3145904;
v_titlegadget=spider_TextGadget_DEBUG(-1,10,0,170,60,_S11,9);
spiderLine=3145905;
spider_SetGadgetFont_DEBUG(v_titlegadget,spider_FontID_DEBUG(mainwindow$g_menubar._Font));
spiderLine=3145906;
spider_SetGadgetColor_DEBUG(v_titlegadget,1,16777215);
spiderLine=3145908;
mainwindow$g_menubar._Articles=spider_HyperLinkGadget_DEBUG(-1,0,0,50,20,_S13,9078136);
spiderLine=3145909;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Articles,1,10066329);
spiderLine=3145910;
spider_BindGadgetEvent_DEBUG(mainwindow$g_menubar._Articles,mainwindow$f_handler_articles);
spiderLine=3145912;
mainwindow$g_menubar._Separator0=spider_TextGadget_DEBUG(-1,0,0,10,20,_S14,8);
spiderLine=3145913;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Separator0,1,16777215);
spiderLine=3145915;
mainwindow$g_menubar._Files=spider_HyperLinkGadget_DEBUG(-1,0,0,60,20,_S15,9078136);
spiderLine=3145916;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Files,1,16777215);
spiderLine=3145917;
spider_BindGadgetEvent_DEBUG(mainwindow$g_menubar._Files,mainwindow$f_handler_files);
spiderLine=3145919;
mainwindow$g_menubar._Separator1=spider_TextGadget_DEBUG(-1,0,0,10,20,_S14,8);
spiderLine=3145920;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Separator1,1,16777215);
spiderLine=3145922;
mainwindow$g_menubar._Tags=spider_HyperLinkGadget_DEBUG(-1,0,0,60,20,_S16,9078136);
spiderLine=3145923;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Tags,1,16777215);
spiderLine=3145924;
spider_BindGadgetEvent_DEBUG(mainwindow$g_menubar._Tags,mainwindow$f_handler_tags);
spiderLine=3145926;
spider_CloseGadgetList_DEBUG();
spiderLine=3145927;
return 0;
}
function mainwindow$f_deletefile_callback(v_success,v_result,v_userdata) {
var v_selecteditem=0;
var v_fileid=0;
spiderLine=3146554;
spiderLine=3146555;
if (!(v_success)) {
spiderLine=3146556;
spider_MessageRequester_DEBUG(_S76);
spiderLine=3146557;
if (1) return 0;
}
spiderLine=3146558;
spiderLine=3146560;
v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_filesview._ListIcon);
spiderLine=3146561;
v_fileid=spider_GetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem);
spiderLine=3146563;
spider_RemoveGadgetItem_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem);
spiderLine=3146564;
if (datamodel$f_findfilebyid(v_fileid)) {
spiderLine=3146565;
spider_DeleteElement_DEBUG(datamodel$t_Files);
}
spiderLine=3146566;
spiderLine=3146567;
return 0;
}
function mainwindow$f_changeselection() {
spiderLine=3146094;
spiderLine=3146095;
var sb_select2=mainwindow$g_state._CurrentSelection;
spiderLine=3146096;
if (sb_select2==0) {
spiderLine=3146097;
spider_HideGadget_DEBUG(mainwindow$g_articlelist._Container,1);
spiderLine=3146098;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Articles,1,16777215);
spiderLine=3146099;
} else if (sb_select2==1) {
spiderLine=3146100;
spider_HideGadget_DEBUG(mainwindow$g_articleeditor._Container,1);
spiderLine=3146101;
} else if (sb_select2==2) {
spiderLine=3146102;
spider_HideGadget_DEBUG(mainwindow$g_filesview._Container,1);
spiderLine=3146103;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Files,1,16777215);
spiderLine=3146104;
} else if (sb_select2==3) {
spiderLine=3146105;
spider_HideGadget_DEBUG(mainwindow$g_tagslist._Container,1);
spiderLine=3146106;
spider_SetGadgetColor_DEBUG(mainwindow$g_menubar._Tags,1,16777215);
spiderLine=3146107;
} else if (sb_select2==4) {
spiderLine=3146108;
spider_HideGadget_DEBUG(mainwindow$g_tageditor._Container,1);
}
spiderLine=3146110;
return 0;
}
function mainwindow$f_handler_deletefile() {
var v_selecteditem=0;
var v_fileid=0;
spiderLine=3146331;
spiderLine=3146332;
v_selecteditem=spider_GetGadgetState_DEBUG(mainwindow$g_filesview._ListIcon);
spiderLine=3146333;
if (v_selecteditem>-1) {
spiderLine=3146334;
v_fileid=spider_GetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,v_selecteditem);
spiderLine=3146335;
spider_HTTPRequest(1,_S1,_S57+spider_Str(v_fileid),mainwindow$f_deletefile_callback);
}
spiderLine=3146336;
spiderLine=3146337;
return 0;
}
function mainwindow$f_createfilesview() {
spiderLine=3145997;
spiderLine=3145998;
mainwindow$g_filesview._Container=spider_ContainerGadget_DEBUG(-1,0,0,10,10);
spiderLine=3146000;
mainwindow$g_filesview._ListIcon=spider_ListIconGadget_DEBUG(-1,0,0,10,10,_S33,200);
spiderLine=3146001;
spider_AddGadgetColumn_DEBUG(mainwindow$g_filesview._ListIcon,1,_S34,50);
spiderLine=3146003;
spider_ResetList(datamodel$t_Files); while (spider_NextElement(datamodel$t_Files)) {
spiderLine=3146003;
spiderLine=3146004;
spider_AddGadgetItem_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._Name+_S35+datamodel$t_Files.current._Type);
spiderLine=3146005;
spider_SetGadgetItemData_DEBUG(mainwindow$g_filesview._ListIcon,0,datamodel$t_Files.current._ID);
spiderLine=3146006;
}
spiderLine=3146008;
mainwindow$g_filesview._ButtonNew=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S36);
spiderLine=3146009;
mainwindow$g_filesview._ButtonDelete=spider_ButtonGadget_DEBUG(-1,10,10,120,20,_S37);
spiderLine=3146010;
spider_BindGadgetEvent_DEBUG(mainwindow$g_filesview._ButtonNew,mainwindow$f_handler_newfile);
spiderLine=3146011;
spider_BindGadgetEvent_DEBUG(mainwindow$g_filesview._ButtonDelete,mainwindow$f_handler_deletefile);
spiderLine=3146012;
spider_BindGadgetEvent_DEBUG(mainwindow$g_filesview._ListIcon,mainwindow$f_handler_filelisticon);
spiderLine=3146014;
spider_CloseGadgetList_DEBUG();
spiderLine=3146015;
spider_HideGadget_DEBUG(mainwindow$g_filesview._Container,1);
spiderLine=3146016;
return 0;
}
function mainwindow$f_handler_previewarticle() {
var v_textbundle="";
spiderLine=3146315;;
spiderLine=3146317;
spider_SelectElement_DEBUG(mainwindow$g_articleeditor._LanguageTabs,spider_GetGadgetState_DEBUG(mainwindow$g_articleeditor._Panel));
spiderLine=3146318;
v_textbundle=mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Name))+_S52;
spiderLine=3146319;
v_textbundle=v_textbundle+mainwindow$f_stringtobase64(spider_GetGadgetText_DEBUG(mainwindow$g_articleeditor._LanguageTabs.current._Content));
spiderLine=3146320;
spider_HTTPRequest(1,_S1,_S55+v_textbundle,mainwindow$f_previewarticle_callback);
spiderLine=3146321;
return 0;
}
function mainwindow$f_handler_editarticle() {
var v_item=0;
spiderLine=3146260;
spiderLine=3146261;
v_item=spider_GetGadgetState_DEBUG(mainwindow$g_articlelist._ListIcon);
spiderLine=3146262;
if (v_item>=0) {
spiderLine=3146263;
mainwindow$g_state._CurrentArticleID=spider_GetGadgetItemData_DEBUG(mainwindow$g_articlelist._ListIcon,v_item);
spiderLine=3146264;
spider_HTTPRequest(0,_S1,_S49+spider_Str(mainwindow$g_state._CurrentArticleID),mainwindow$f_editarticle_callback);
}
spiderLine=3146265;
spiderLine=3146266;
return 0;
}
function datamodel$f_findarticlebyid(v_id) {
spiderLine=4194362;
spiderLine=4194363;
spider_ResetList(datamodel$t_Articles); while (spider_NextElement(datamodel$t_Articles)) {
spiderLine=4194363;
spiderLine=4194364;
if (datamodel$t_Articles.current._ID==v_id) {
spiderLine=4194365;
if (1) return 1;
}
spiderLine=4194366;
spiderLine=4194367;
}
spiderLine=4194368;
if (1) return 0;
spiderLine=4194369;
return 0;
}
function datamodel$f_findtagbyid(v_id) {
spiderLine=4194380;
spiderLine=4194381;
spider_ResetList(datamodel$t_Tags); while (spider_NextElement(datamodel$t_Tags)) {
spiderLine=4194381;
spiderLine=4194382;
if (datamodel$t_Tags.current._ID==v_id) {
spiderLine=4194383;
if (1) return 1;
}
spiderLine=4194384;
spiderLine=4194385;
}
spiderLine=4194386;
if (1) return 0;
spiderLine=4194387;
return 0;
}
function datamodel$f_getrecordcount(v_result) {
spiderLine=4194326;
spiderLine=4194327;
if (1) return spider_CountString(v_result,_S53);
spiderLine=4194328;
return 0;
}
function datamodel$f_loadmimetypes() {
var v_type="";
var v_ext="";
spiderLine=4194393;;;
spiderLine=4194396;
sb_datapointer=datamodel$ll_loadmimetypes_mimedata;
spiderLine=4194397;
v_ext=sb_data[sb_datapointer++];
while (v_ext!=_S87) {
spiderLine=4194399;
v_type=sb_data[sb_datapointer++];
spiderLine=4194400;
spider_GetMapElement(datamodel$m_MIMETypes,v_ext)._s=v_type;
spiderLine=4194401;
v_ext=sb_data[sb_datapointer++];
spiderLine=4194402;
}
il_wend130:;
spiderLine=4194403;
return 0;
}
function datamodel$f_formatarticlelistitem(p_article) {
var v_status="";
spiderLine=4194342;;
spiderLine=4194345;
if (p_article._Draft) {
spiderLine=4194346;
v_status=_S26;
spiderLine=4194347;
} else {
spiderLine=4194347;
spiderLine=4194348;
v_status=_S85;
}
spiderLine=4194349;
spiderLine=4194351;
if (1) return p_article._Title+_S35+v_status+_S35+spider_FormatDate(_S86,p_article._Date);
spiderLine=4194352;
return "";
}
function datamodel$f_getrecord(v_result,v_index) {
spiderLine=4194330;
spiderLine=4194331;
if (1) return spider_StringField_DEBUG(v_result,v_index,_S53);
spiderLine=4194332;
return "";
}
function datamodel$f_stripprefix(v_result,v_prefix) {
spiderLine=4194318;
spiderLine=4194319;
if (1) return spider_RemoveString_DEBUG(v_result,v_prefix,0,0,1);
spiderLine=4194320;
return "";
}
function datamodel$f_getfield(v_record,v_index) {
spiderLine=4194322;
spiderLine=4194323;
if (1) return spider_StringField_DEBUG(v_record,v_index,_S52);
spiderLine=4194324;
return "";
}
function datamodel$f_validateresponse(v_result,v_expectedprefix) {
spiderLine=4194334;
spiderLine=4194335;
if (1) return spider_CastByte((spider_Left(v_result,spider_Len(v_expectedprefix))==v_expectedprefix?1:0));
spiderLine=4194336;
return 0;
}
function datamodel$f_formattaglistitem(p_tag) {
spiderLine=4194354;
spiderLine=4194355;
if (1) return p_tag._DefaultName+_S35+p_tag._Color;
spiderLine=4194356;
return "";
}
function datamodel$f_findfilebyid(v_id) {
spiderLine=4194371;
spiderLine=4194372;
spider_ResetList(datamodel$t_Files); while (spider_NextElement(datamodel$t_Files)) {
spiderLine=4194372;
spiderLine=4194373;
if (datamodel$t_Files.current._ID==v_id) {
spiderLine=4194374;
if (1) return 1;
}
spiderLine=4194375;
spiderLine=4194376;
}
spiderLine=4194377;
if (1) return 0;
spiderLine=4194378;
return 0;
}
var datamodel$ll_loadmimetypes_mimedata=datamodel$l_mimedata;
//
SpiderLaunch = function() {
spider.debug.Init();
spider_InitFunctions();
spiderLine=1048576;
spiderLine=1048634;
datamodel$m_MIMETypes=spider_NewMap(s_string,true);;
spiderLine=1048635;
datamodel$t_Language=spider_NewList(s_string,"_s",true);;
spiderLine=1048636;
datamodel$t_Tags=spider_NewList(datamodel$tag,"object",false);;
spiderLine=1048637;
datamodel$t_Files=spider_NewList(datamodel$file,"object",false);;
spiderLine=1048638;
datamodel$t_Articles=spider_NewList(datamodel$article,"object",false);;
spiderLine=1048661;
spiderLine=2097152;
spiderLine=2097169;
general$g_loadingprogress=0;
spiderLine=2097283;
spiderLine=3145728;;;;;;;;
spiderLine=3146646;
spiderLine=4194304;
spiderLine=4194406;
datamodel$f_loadmimetypes();
spiderLine=4194451;
spiderLine=11;
general$f_init();
spiderLine=13;
}
function spider_InitFunctions() {
spider_InitMap();
spider_Event_Init();
spider_InitFont();
spider_InitDesktop();
spider_InitImageDecoder();
spider_InitImage();
spider_Init2DDrawing();
spider_InitWindow();
spider_InitList();
spider_InitGadget();
spider_InitArray();
}
spider.nbLoadedModules++
var sb_data = ["aac","audio/aac"
,"abw","application/x-abiword"
,"apng","image/apng"
,"avi","video/x-msvideo"
,"bin","application/octet-stream"
,"bmp","image/bmp"
,"css","text/css"
,"csv","text/csv"
,"doc","application/msword"
,"gif","image/gif"
,"htm","text/html"
,"html","text/html"
,"ico","image/x-icon"
,"jpeg","image/jpeg"
,"jpg","image/jpeg"
,"js","text/javascript"
,"json","application/json"
,"mp3","audio/mpeg"
,"mp4","video/mp4"
,"mpeg","video/mpeg"
,"otf","font/otf"
,"png","image/png"
,"pdf","application/pdf"
,"php","application/x-httpd-php"
,"svg","image/svg+xml"
,"txt","text/plain"
,"wav","audio/wav"
,"webm","video/webm"
,"webp","image/webp"
,"woff","font/woff"
,"woff2","font/woff2"
,"xml","application/xml"
,"zip","application/zip"
,"END"
];