diff --git a/package.json b/package.json index 2e2a12b..87cc582 100644 --- a/package.json +++ b/package.json @@ -344,6 +344,11 @@ "command": "dvdt.commands.createTSFile", "title": "Add Dataverse TS File", "category": "%dvdt.commands.category%" + }, + { + "command": "dvdt.commands.openDRB", + "title": "Open Dataverse REST Builder", + "category": "%dvdt.commands.category%" } ], "keybindings": [ diff --git a/resources/views/drb.html b/resources/views/drb.html new file mode 100644 index 0000000..16699ad --- /dev/null +++ b/resources/views/drb.html @@ -0,0 +1,9 @@ +
+ + + + + diff --git a/resources/views/js/base.js b/resources/views/js/base.js index 47aee21..0491f50 100644 --- a/resources/views/js/base.js +++ b/resources/views/js/base.js @@ -1,6 +1,6 @@ const vscode = acquireVsCodeApi(); -var $table = $("#matchTable"); +var $matchTable = $("#matchTable"); $(document).ready(function () { $("#attrSearch").on("keyup", function () { @@ -9,10 +9,12 @@ $(document).ready(function () { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1); }); }); - $table.bootstrapTable(); - $table.bootstrapTable("refreshOptions", { - classes: "table table-bordered", - }); + if ($matchTable && $matchTable.bootstrapTable) { + $matchTable.bootstrapTable(); + $matchTable.bootstrapTable("refreshOptions", { + classes: "table table-bordered", + }); + } }); document.addEventListener("DOMContentLoaded", function () { diff --git a/resources/views/js/drb_custom.js b/resources/views/js/drb_custom.js new file mode 100644 index 0000000..b2e58eb --- /dev/null +++ b/resources/views/js/drb_custom.js @@ -0,0 +1,19330 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +// #region DRB.Namespaces +var DRB = {}; // Application Namespace +DRB.DOM = {}; // DOM +DRB.Common = {}; // Common Functions +DRB.Metadata = {}; // Store temporarily the retrieved Metadata +DRB.Models = {}; // Models used by the Application +DRB.Settings = {}; // Settings used by the Application +DRB.UI = {}; // Functions to manage UI elements +DRB.Utilities = {}; // Utilities Functions +DRB.Xrm = {}; // Xrm Functions +DRB.Collection = {}; // Collection Functions +DRB.CustomUI = {}; // Custom UI Functions +DRB.GenerateCode = {}; // Generate Code Functions +DRB.GeneratePostman = {}; // Generate Postman Functions + +DRB.Logic = {}; // Functions defined for each operation +DRB.Logic.RetrieveSingle = {}; // Retrieve Single Functions +DRB.Logic.RetrieveMultiple = {}; // Retrieve Multiple Functions +DRB.Logic.Create = {}; // Create Functions +DRB.Logic.Update = {}; // Update Functions +DRB.Logic.Delete = {}; // Delete Functions +DRB.Logic.Association = {}; // Associate, Disassociate Functions +DRB.Logic.RetrieveNextLink = {}; // Retrieve NextLink Functions +DRB.Logic.PredefinedQuery = {}; // Predefined Query Functions +DRB.Logic.DataverseExecute = {}; // Dataverse Action, Dataverse Function Functions +DRB.Logic.ExecuteWorkflow = {}; // Execute Workflow Functions +DRB.Logic.ManageFileImageData = {}; // Manage File Image Data Functions +// #endregion + +// #region DRB.DOM +// Main Content +DRB.DOM.MainBody = { Id: "main_body" }; // defined also inside index.htm +DRB.DOM.MainContent = { Id: "main_content" }; +DRB.DOM.VersionSpan = { Id: "span_drbversion" }; +DRB.DOM.ContextSpan = { Id: "span_context" }; + +// Notice +DRB.DOM.Notice = {}; +DRB.DOM.Notice.Div = { Id: "div_notice" }; +DRB.DOM.Notice.Button = { Id: "btn_notice" }; + +// Split +DRB.DOM.Split = {}; +DRB.DOM.Split.Menu = { Id: "div_menu" }; +DRB.DOM.Split.Content = { Id: "div_content" }; + +// jsTree +DRB.DOM.TreeView = { Id: "div_collection" }; + +// Configure Content +DRB.DOM.ConfigureContent = { Id: "configure_settings" }; + +// Tabs +DRB.DOM.TabsRequest = { Id: "tabs_request" }; +DRB.DOM.TabsContent = { Id: "tabs_content" }; +DRB.DOM.TabsWarning = { Id: "tabs_warning_" }; + +// Collection +DRB.DOM.Collection = {}; +DRB.DOM.Collection.Menu = { Id: "mnu_file" }; +DRB.DOM.Collection.Separator = { Id: "", Class: "dropdown-divider" }; +DRB.DOM.Collection.LoadInput = { Id: "inp_loadfile" }; +DRB.DOM.Collection.NewButton = { Id: "btn_newcollection", Name: "New Collection", Class: "dropdown-item" }; +DRB.DOM.Collection.LoadButton = { Id: "btn_loadcollection", Name: "Load Collection", Class: "dropdown-item" }; +DRB.DOM.Collection.SaveButton = { Id: "btn_savecollection", Name: "Save Collection", Class: "dropdown-item" }; +DRB.DOM.Collection.ExportPostmanButton = { Id: "btn_exportpostmancollection", Name: "Export as Postman Collection (2.1)", Class: "dropdown-item" }; + +DRB.DOM.Collection.Postman = {}; +DRB.DOM.Collection.Postman.Div = { Id: "div_export_postman" }; +DRB.DOM.Collection.Postman.GrantTypeSpan = { Id: "span_postman_granttype", Name: "Grant Type" }; +DRB.DOM.Collection.Postman.GrantTypeDropdown = { Id: "cbx_postman_granttype", Name: "Select Grant Type" }; +DRB.DOM.Collection.Postman.SettingsDiv = { Id: "div_export_postman_setting" }; + +DRB.DOM.Collection.Postman.Table = { Id: "table_postman" }; +DRB.DOM.Collection.Postman.Tr = { Id: "tr_postman_" }; +DRB.DOM.Collection.Postman.TdLabel = { Id: "td_postman_label_" }; +DRB.DOM.Collection.Postman.TdValue = { Id: "td_postman_value_" }; + +DRB.DOM.Collection.Postman.EndpointSpan = { Id: "span_postman_endpoint", Name: "Endpoint" }; +DRB.DOM.Collection.Postman.EndpointDropdown = { Id: "cbx_postman_endpoint", Name: "Select Endpoint" }; + +DRB.DOM.Collection.Postman.UrlSpan = { Id: "span_postman_url", Name: "URL", SmallText: "{{url}}" }; +DRB.DOM.Collection.Postman.UrlInput = { Id: "txt_postman_url" }; + +DRB.DOM.Collection.Postman.AuthUrlSpan = { Id: "span_postman_authurl", Name: "Auth URL", SmallText: "{{authurl}}" }; +DRB.DOM.Collection.Postman.AuthUrlInput = { Id: "txt_postman_authurl" }; +DRB.DOM.Collection.Postman.CallbackUrlSpan = { Id: "span_postman_callbackurl", Name: "Callback URL", SmallText: "{{callback}}" }; +DRB.DOM.Collection.Postman.CallbackUrlInput = { Id: "txt_postman_callbackurl" }; + +DRB.DOM.Collection.Postman.ClientIdSpan = { Id: "span_postman_clientid", Name: "Client ID", SmallText: "{{clientid}}" }; +DRB.DOM.Collection.Postman.ClientIdInput = { Id: "txt_postman_clientid" }; +DRB.DOM.Collection.Postman.ClientSecretSpan = { Id: "span_postman_clientsecret", Name: "Client Secret", SmallText: "{{clientsecret}}" }; +DRB.DOM.Collection.Postman.ClientSecretInput = { Id: "txt_postman_clientsecret" }; +DRB.DOM.Collection.Postman.TenantIdSpan = { Id: "span_postman_tenantid", Name: "Tenant ID", SmallText: "{{tenantid}}" }; +DRB.DOM.Collection.Postman.TenantIdInput = { Id: "txt_postman_tenantid" }; +DRB.DOM.Collection.Postman.AccessTokenSpan = { Id: "span_postman_accesstoken", Name: "Access Token URL" }; +DRB.DOM.Collection.Postman.AccessTokenInput = { Id: "txt_postman_accesstoken" }; +DRB.DOM.Collection.Postman.ScopeSpan = { Id: "span_postman_scope", Name: "Scope" }; +DRB.DOM.Collection.Postman.ScopeInput = { Id: "txt_postman_scope" }; +DRB.DOM.Collection.Postman.ResourceSpan = { Id: "span_postman_resource", Name: "Resource" }; +DRB.DOM.Collection.Postman.ResourceInput = { Id: "txt_postman_resource" }; + +// Request Type +DRB.DOM.RequestType = {}; +DRB.DOM.RequestType.Div = { Id: "request_name", Name: "Request Name" }; +DRB.DOM.RequestType.Span = { Id: "span_request", Name: "Request Type" }; +DRB.DOM.RequestType.Dropdown = { Id: "cbx_requesttype", Name: "Select a Request Type" }; + +// Table +DRB.DOM.Table = {}; +DRB.DOM.Table.Span = { Id: "span_table", Name: "Table" }; +DRB.DOM.Table.Dropdown = { Id: "cbx_table", Name: "Select a Table" }; + +// Columns +DRB.DOM.Columns = {}; +DRB.DOM.Columns.Div = { Id: "div_columns", Class: "sameline" }; +DRB.DOM.Columns.Button = { Id: "btn_columns", Name: "Select Columns" }; +DRB.DOM.Columns.Span = { Id: "span_columns", Name: "Columns" }; +DRB.DOM.Columns.Dropdown = { Id: "cbx_columns", Name: "Select Columns" }; + +// File Column +DRB.DOM.FileColumn = {}; +DRB.DOM.FileColumn.Div = { Id: "div_filecolumn", Class: "sameline" }; +DRB.DOM.FileColumn.Span = { Id: "span_filecolumn", Name: "File Column" }; +DRB.DOM.FileColumn.Dropdown = { Id: "cbx_filecolumn", Name: "Select File Column" }; + +// Image Column +DRB.DOM.ImageColumn = {}; +DRB.DOM.ImageColumn.Span = { Name: "Image Column" }; +DRB.DOM.ImageColumn.Dropdown = { Name: "Select Image Column" }; + +// File Operation +DRB.DOM.FileOperation = {}; +DRB.DOM.FileOperation.Span = { Id: "span_fileoperation", Name: "Operation" }; +DRB.DOM.FileOperation.Dropdown = { Id: "cbx_fileoperation", Name: "Select Operation" }; + +// File Name +DRB.DOM.FileName = {}; +DRB.DOM.FileName.Div = { Id: "div_filename" }; +DRB.DOM.FileName.Span = { Id: "span_filename", Name: "File Name" }; +DRB.DOM.FileName.Input = { Id: "txt_filename" }; + +// File Full Size +DRB.DOM.FileFullSize = {}; +DRB.DOM.FileFullSize.Div = { Id: "div_filefullsize", Class: "sameline" }; +DRB.DOM.FileFullSize.Span = { Id: "span_filefullsize", Name: " Full Size" }; +DRB.DOM.FileFullSize.CheckBox = { Id: "chk_filefullsize" }; + +// Image Buttons +DRB.DOM.FileContent = {}; +DRB.DOM.FileContent.Div = { Id: "div_filecontent" }; +DRB.DOM.FileContent.LoadInput = { Id: "inp_loadfile_" }; +DRB.DOM.FileContent.LoadButton = { Id: "btn_loadfile_", Name: "Load", Class: "btn-outline-secondary" }; +DRB.DOM.FileContent.ShowButton = { Id: "btn_showfile_", Name: "Show", Class: "btn-outline-secondary" }; +DRB.DOM.FileContent.DownloadButton = { Id: "btn_downloadfile_", Name: "Download", Class: "btn-outline-secondary" }; +DRB.DOM.FileContent.RemoveButton = { Id: "btn_removefile_", Name: "Remove", Class: "btn-outline-secondary" }; + +// Relationships +DRB.DOM.DivRelationship = { Id: "div_relationships" }; +DRB.DOM.Relationship = {}; +DRB.DOM.Relationship.OneToMany = {}; +DRB.DOM.Relationship.OneToMany.Span = { Id: "span_onetomany", Name: "One To Many Relationships  " }; +DRB.DOM.Relationship.OneToMany.Dropdown = { Id: "cbx_onetomany", Name: "Selected Columns" }; +DRB.DOM.Relationship.OneToMany.Button = { Id: "btn_onetomany", Name: "Select", Class: "btn-outline-secondary" }; +DRB.DOM.Relationship.ManyToOne = {}; +DRB.DOM.Relationship.ManyToOne.Span = { Id: "span_manytoone", Name: "Many To One Relationships  " }; +DRB.DOM.Relationship.ManyToOne.Dropdown = { Id: "cbx_manytoone", Name: "Selected Columns" }; +DRB.DOM.Relationship.ManyToOne.Button = { Id: "btn_manytoone", Name: "Select", Class: "btn-outline-secondary" }; +DRB.DOM.Relationship.ManyToMany = {}; +DRB.DOM.Relationship.ManyToMany.Span = { Id: "span_manytomany", Name: "Many To Many Relationships" }; +DRB.DOM.Relationship.ManyToMany.Dropdown = { Id: "cbx_manytomany", Name: "Selected Columns" }; +DRB.DOM.Relationship.ManyToMany.Button = { Id: "btn_manytomany", Name: "Select", Class: "btn-outline-secondary" }; + +// Relationship Selection +DRB.DOM.RelationshipSelect = {}; +DRB.DOM.RelationshipSelect.Div = { Id: "div_relationshipselect" }; +DRB.DOM.RelationshipSelect.Relationship = {}; +DRB.DOM.RelationshipSelect.Relationship.Span = { Id: "span_relationshipselect", Name: "Relationship" }; +DRB.DOM.RelationshipSelect.Relationship.Dropdown = { Id: "cbx_relationshipselect", Name: "Select a Relationship" }; +DRB.DOM.RelationshipSelect.Columns = {}; +DRB.DOM.RelationshipSelect.Columns.Span = { Id: "span_relationshipselectcolumns", Name: "Columns" }; +DRB.DOM.RelationshipSelect.Columns.Dropdown = { Id: "cbx_relationshipselectcolumns", Name: "Select Columns" }; + +// Version +DRB.DOM.Version = {}; +DRB.DOM.Version.Span = { Id: "span_version", Name: "Version" }; +DRB.DOM.Version.Dropdown = { Id: "cbx_version", Name: "Version" }; + +// Process +DRB.DOM.Process = {}; +DRB.DOM.Process.Span = { Id: "span_process", Name: "Process" }; +DRB.DOM.Process.Dropdown = { Id: "cbx_process", Name: "Process" }; + +// Token Header +DRB.DOM.TokenHeader = {}; +DRB.DOM.TokenHeader.Span = { Id: "span_tokenheader", Name: "Token Header" }; +DRB.DOM.TokenHeader.Dropdown = { Id: "cbx_tokenheader", Name: "Token Header" }; + +// Impersonate +DRB.DOM.Impersonate = {}; +DRB.DOM.Impersonate.Span = { Id: "span_impersonate", Name: "Impersonate" }; +DRB.DOM.Impersonate.Dropdown = { Id: "cbx_impersonate", Name: "Impersonate" }; + +// Impersonate Id +DRB.DOM.ImpersonateId = {}; +DRB.DOM.ImpersonateId.Div = { Id: "div_impersonateid", Class: "sameline" }; +DRB.DOM.ImpersonateId.TypeSpan = { Id: "span_impersonatetype", Name: "Type" }; +DRB.DOM.ImpersonateId.Dropdown = { Id: "cbx_impersonatetype", Name: "Type" }; +DRB.DOM.ImpersonateId.Span = { Id: "span_impersonateid", Name: "Id" }; +DRB.DOM.ImpersonateId.Input = { Id: "txt_impersonateid" }; +DRB.DOM.ImpersonateId.Lookup = { Id: "lkp_impersonateid" }; + +// Formatted Values +DRB.DOM.FormattedValues = {}; +DRB.DOM.FormattedValues.Span = { Id: "span_formattedvalues", Name: "Formatted Values" }; +DRB.DOM.FormattedValues.Dropdown = { Id: "cbx_formattedvalues", Name: "Formatted Values" }; + +// Detect Changes +DRB.DOM.DetectChanges = {}; +DRB.DOM.DetectChanges.Span = { Id: "span_detectchanges", Name: "Detect Changes" }; +DRB.DOM.DetectChanges.Dropdown = { Id: "cbx_detectchanges", Name: "Detect Changes" }; + +// Return Record +DRB.DOM.ReturnRecord = {}; +DRB.DOM.ReturnRecord.Span = { Id: "span_returnrecord", Name: "Return Record" }; +DRB.DOM.ReturnRecord.Dropdown = { Id: "cbx_returnrecord", Name: "Return Record" }; + +// Detect Duplicates +DRB.DOM.DetectDuplicates = {}; +DRB.DOM.DetectDuplicates.Span = { Id: "span_detectduplicates", Name: "Detect Duplicates" }; +DRB.DOM.DetectDuplicates.Dropdown = { Id: "cbx_detectduplicates", Name: "Detect Duplicates" }; + +// Prevent +DRB.DOM.Prevent = {}; +DRB.DOM.Prevent.Span = { Id: "span_prevent", Name: "Prevent" }; +DRB.DOM.Prevent.Dropdown = { Id: "cbx_prevent", Name: "Prevent" }; + +// Retrieve Count +DRB.DOM.RetrieveCount = {}; +DRB.DOM.RetrieveCount.Span = { Id: "span_retrievecount", Name: "Retrieve Count" }; +DRB.DOM.RetrieveCount.Dropdown = { Id: "cbx_retrievecount", Name: "Retrieve Count" }; + +// Top Count +DRB.DOM.TopCount = {}; +DRB.DOM.TopCount.Span = { Id: "span_topcount", Name: "Top Count" }; +DRB.DOM.TopCount.Input = { Id: "txt_topcount" }; + +// Primary Id +DRB.DOM.PrimaryId = {}; +DRB.DOM.PrimaryId.Div = { Id: "div_primaryid" }; +DRB.DOM.PrimaryId.Span = { Id: "span_primaryid", Name: "Primary Id" }; +DRB.DOM.PrimaryId.Input = { Id: "txt_primaryid" }; +DRB.DOM.PrimaryId.Lookup = { Id: "lkp_primaryid" }; + +// Use Alternate Key +DRB.DOM.UseAlternateKey = {}; +DRB.DOM.UseAlternateKey.Span = { Id: "span_usealternatekey", Name: "Use Alternate Key" }; +DRB.DOM.UseAlternateKey.Dropdown = { Id: "cbx_usealternatekey", Name: "Use Alternate Key" }; + +// Alternate Key +DRB.DOM.AlternateKey = {}; +DRB.DOM.AlternateKey.Div = { Id: "div_alternatekey" }; +DRB.DOM.AlternateKey.Span = { Id: "span_alternatekey", Name: "Alternate Key" }; +DRB.DOM.AlternateKey.Dropdown = { Id: "cbx_alternatekey", Name: "Select an Alternate Key" }; +DRB.DOM.AlternateKey.DivColumns = { Id: "div_alternatekeycolumns" }; + +// Alternate Key Table, Tr, Td, Control +DRB.DOM.AlternateKey.Table = { Id: "table_alternatekey" }; +DRB.DOM.AlternateKey.Tr = { Id: "tr_alternatekey_" }; +DRB.DOM.AlternateKey.TdColumn = { Id: "td_alternatekey_column_" }; +DRB.DOM.AlternateKey.TdValue = { Id: "td_alternatekey_value_" }; +DRB.DOM.AlternateKey.ControlValue = { Id: "alternatekey_value_" }; + +// #region Retrieve Multiple +// Filter By +DRB.DOM.FilterBy = {}; +DRB.DOM.FilterBy.MainDiv = { Id: "div_main_fb", Class: "mapping-container" }; +DRB.DOM.FilterBy.MainSpan = { Id: "span_main_fb", Name: "Filter By" }; +DRB.DOM.FilterBy.StartButton = { Id: "btn_startfb_", Name: "Start", Class: "btn-primary" }; +// Filter Groups +DRB.DOM.FilterGroups = {}; +DRB.DOM.FilterGroups.MainDiv = { Id: "div_main_fg_", Class: "mapping-container" }; +DRB.DOM.FilterGroups.MainSpan = { Id: "span_main_fg_", Name: "" }; +DRB.DOM.FilterGroups.DivGroups = { Id: "div_fg_groups_" }; +DRB.DOM.FilterGroups.Div = { Id: "div_fg_", Class: "mapping-container" }; + +DRB.DOM.FilterGroups.DivOptions = { Id: "div_fg_options_" }; +DRB.DOM.FilterGroups.AddButton = { Id: "btn_addfg_", Name: "Add Group", Class: "btn-primary" }; +DRB.DOM.FilterGroups.DivLogic = { Id: "div_fg_fl_", Class: "sameline" }; +DRB.DOM.FilterGroups.SpanLogic = { Id: "span_fg_", Name: "Logic between Groups" }; +DRB.DOM.FilterGroups.DropdownLogic = { Id: "cbx_fg_", Name: "Select Operator" }; + +DRB.DOM.FilterGroups.DivChoice = { Id: "div_fg_choice_" }; +DRB.DOM.FilterGroups.ButtonChoice = { Id: "btn_fg_choice_", Name: "Add", Class: "btn-danger dropdown-toggle" }; +DRB.DOM.FilterGroups.DivDropdownChoice = { Id: "div_fg_dropdownchoice_", Class: "dropdown-menu" }; +DRB.DOM.FilterGroups.ButtonChoiceColumns = { Id: "btn_fg_addcolumns_", Name: "Filter Columns", Class: "dropdown-item" }; +DRB.DOM.FilterGroups.ButtonChoiceGroups = { Id: "btn_fg_addgroups_", Name: "Filter Groups", Class: "dropdown-item" }; + +// Filter Columns table, tr, td +DRB.DOM.FilterColumns = {}; +DRB.DOM.FilterColumns.MainDiv = { Id: "div_main_fc_", Class: "mapping-container3" }; +DRB.DOM.FilterColumns.MainSpan = { Id: "span_main_fc_", Name: "" }; +DRB.DOM.FilterColumns.Div = { Id: "div_fc_" }; +DRB.DOM.FilterColumns.Table = { Id: "table_fc_" }; +DRB.DOM.FilterColumns.Tr = { Id: "tr_fc_" }; +DRB.DOM.FilterColumns.Dropdown = { Id: "cbx_fc_", Name: "Select Column" }; +DRB.DOM.FilterColumns.TdColumn = { Id: "td_fclabel_", Name: "Filter Column" }; +DRB.DOM.FilterColumns.TdOperator = { Id: "td_fcoperator_", Name: "Operator" }; +DRB.DOM.FilterColumns.TdValue = { Id: "td_fcvalue_", Name: "Value" }; +DRB.DOM.FilterColumns.DivOperator = { Id: "div_fc_operator_" }; +DRB.DOM.FilterColumns.ControlOperator = { Id: "fc_operator_" }; +DRB.DOM.FilterColumns.DivValue = { Id: "div_fc_value_" }; +DRB.DOM.FilterColumns.ControlValue = { Id: "fc_value_" }; + +DRB.DOM.FilterColumns.AddButton = { Id: "btn_addfc_", Name: "Add Column", Class: "btn-primary" }; +DRB.DOM.FilterColumns.DivLogic = { Id: "div_fc_fl_", Class: "sameline" }; +DRB.DOM.FilterColumns.SpanLogic = { Id: "span_fc_", Name: "Logic between Columns" }; +DRB.DOM.FilterColumns.DropdownLogic = { Id: "cbx_fc_", Name: "Select Operator" }; + +// Order Columns table, tr, td +DRB.DOM.OrderColumns = {}; +DRB.DOM.OrderColumns.MainDiv = { Id: "div_main_oc", Class: "mapping-container" }; +DRB.DOM.OrderColumns.MainSpan = { Id: "span_main_oc", Name: "Order By" }; +DRB.DOM.OrderColumns.Div = { Id: "div_oc_" }; +DRB.DOM.OrderColumns.Table = { Id: "table_oc_" }; +DRB.DOM.OrderColumns.Tr = { Id: "tr_oc_" }; +DRB.DOM.OrderColumns.Dropdown = { Id: "cbx_oc_", Name: "Select Column" }; +DRB.DOM.OrderColumns.TdColumn = { Id: "td_oclabel_", Name: "Column" }; +DRB.DOM.OrderColumns.TdValue = { Id: "td_ocvalue_", Name: "Value" }; +DRB.DOM.OrderColumns.DivValue = { Id: "div_oc_value_" }; +DRB.DOM.OrderColumns.ControlValue = { Id: "oc_value_" }; +DRB.DOM.OrderColumns.AddButton = { Id: "btn_addoc_", Name: "Add Column", Class: "btn-primary" }; + +// Set Columns table, tr, td +DRB.DOM.SetColumns = {}; +DRB.DOM.SetColumns.MainDiv = { Id: "div_main_sc", Class: "mapping-container" }; +DRB.DOM.SetColumns.MainSpan = { Id: "span_main_sc", Name: "" }; +DRB.DOM.SetColumns.Div = { Id: "div_sc_" }; +DRB.DOM.SetColumns.Table = { Id: "table_sc_" }; +DRB.DOM.SetColumns.Tr = { Id: "tr_sc_" }; +DRB.DOM.SetColumns.Dropdown = { Id: "cbx_sc_", Name: "Select Column" }; +DRB.DOM.SetColumns.TdColumn = { Id: "td_sclabel_", Name: "Column" }; +DRB.DOM.SetColumns.TdValue = { Id: "td_scvalue_", Name: "Value" }; +DRB.DOM.SetColumns.DivValue = { Id: "div_sc_value_" }; +DRB.DOM.SetColumns.ControlValue = { Id: "sc_value_" }; +DRB.DOM.SetColumns.AddButton = { Id: "btn_addsc_", Name: "Add Column", Class: "btn-primary" }; +// #endregion + +// Arrows +DRB.DOM.ArrowUp = { Id: "btn_up_" }; +DRB.DOM.ArrowBeforeUp = { Id: "btn_beforeup_" }; +DRB.DOM.ArrowDown = { Id: "btn_down_" }; +DRB.DOM.ArrowAfterDown = { Id: "btn_afterdown_" }; + +// Image Buttons +DRB.DOM.Image = {}; +DRB.DOM.Image.LoadInput = { Id: "inp_loadimage_" }; +DRB.DOM.Image.LoadButton = { Id: "btn_loadimage_", Name: "Load", Class: "btn-outline-secondary columnbutton" }; +DRB.DOM.Image.ShowButton = { Id: "btn_showimage_", Name: "Show", Class: "btn-outline-secondary" }; +DRB.DOM.Image.RemoveButton = { Id: "btn_removeimage_", Name: "Remove", Class: "btn-outline-secondary" }; + +// #region Association +// Parent Table +DRB.DOM.ParentTable = {}; +DRB.DOM.ParentTable.Span = { Id: "span_parenttable", Name: "Parent Table" }; +DRB.DOM.ParentTable.Dropdown = { Id: "cbx_parenttable", Name: "Select a Table" }; + +// Child Table +DRB.DOM.ChildTable = {}; +DRB.DOM.ChildTable.Span = { Id: "span_childtable", Name: "Child Table" }; +DRB.DOM.ChildTable.Dropdown = { Id: "cbx_childtable", Name: "Select a Table" }; + +// Parent Relationship +DRB.DOM.ParentRelationship = {}; +DRB.DOM.ParentRelationship.Span = { Id: "span_parentrelationship", Name: "Relationship" }; +DRB.DOM.ParentRelationship.Dropdown = { Id: "cbx_parentrelationship", Name: "Select a Relationship" }; + +// Child Id +DRB.DOM.ChildId = {}; +DRB.DOM.ChildId.Div = { Id: "div_childid" }; +DRB.DOM.ChildId.DivPrefix = { Id: "div_childid_" }; +DRB.DOM.ChildId.SpanPrefix = { Id: "span_childid_", Name: "Child Id" }; +DRB.DOM.ChildId.InputPrefix = { Id: "txt_childid_" }; +DRB.DOM.ChildId.LookupPrefix = { Id: "lkp_childid_" }; +DRB.DOM.ChildId.RemoveButtonPrefix = { Id: "btn_childidremove_", Name: "x", Class: "btn-outline-secondary closebutton" }; +DRB.DOM.ChildId.AddButton = { Id: "btn_childidadd", Name: "Add Child Id", Class: "btn-outline-secondary" }; +// #endregion + +// #region NextLink +// NextLink +DRB.DOM.NextLink = {}; +DRB.DOM.NextLink.Div = { Id: "div_nextlink" }; +DRB.DOM.NextLink.Span = { Id: "span_nextlink", Name: "Next Link" }; +DRB.DOM.NextLink.Input = { Id: "txt_nextlink" }; + +// NextLink Parsed +DRB.DOM.NextLink.Parsed = {}; +DRB.DOM.NextLink.Parsed.Div = { Id: "div_parsed" }; +DRB.DOM.NextLink.Parsed.MainSpan = { Id: "span_mainparsed", Name: "" }; +DRB.DOM.NextLink.Parsed.Span = { Id: "span_parsed", Name: "Columns" }; +DRB.DOM.NextLink.Parsed.Dropdown = { Id: "cbx_parsed", Name: "Columns" }; +// #endregion + +// #region Predefined Query +// Query Type +DRB.DOM.QueryType = {}; +DRB.DOM.QueryType.Span = { Id: "span_querytype", Name: "Query Type" }; +DRB.DOM.QueryType.Dropdown = { Id: "cbx_querytype", Name: "Query Type" }; + +// System View Id +DRB.DOM.SystemViewId = {}; +DRB.DOM.SystemViewId.Div = { Id: "div_systemviewid" }; +DRB.DOM.SystemViewId.Span = { Id: "span_systemviewid", Name: "View Id" }; +DRB.DOM.SystemViewId.Input = { Id: "txt_systemviewid" }; +DRB.DOM.SystemViewId.Lookup = { Id: "lkp_systemviewid" }; + +// Personal View Id +DRB.DOM.PersonalViewId = {}; +DRB.DOM.PersonalViewId.Div = { Id: "div_personalviewid" }; +DRB.DOM.PersonalViewId.Span = { Id: "span_personalviewid", Name: "View Id" }; +DRB.DOM.PersonalViewId.SpanDropdown = { Id: "span_personalview", Name: "Personal View" }; +DRB.DOM.PersonalViewId.Dropdown = { Id: "cbx_personalview", Name: "Select Personal View" }; +DRB.DOM.PersonalViewId.Input = { Id: "txt_personalviewid" }; + +// FetchXML +DRB.DOM.FetchXML = {}; +DRB.DOM.FetchXML.Div = { Id: "div_fetchxml" }; +DRB.DOM.FetchXML.Span = { Id: "span_fetchxml", Name: "Fetch XML" }; +DRB.DOM.FetchXML.Editor = { Id: "editor_fetchxml", Class: "code_editor" }; +// #endregion + +// #region Dataverse Execute +// Dataverse Custom API +DRB.DOM.DataverseCustomAPI = {}; +DRB.DOM.DataverseCustomAPI.Span = { Name: "Custom API" }; +DRB.DOM.DataverseCustomAPI.Dropdown = { Name: "Select a Custom API" }; + +// Dataverse Custom Action +DRB.DOM.DataverseCustomAction = {}; +DRB.DOM.DataverseCustomAction.Span = { Name: "Custom Action" }; +DRB.DOM.DataverseCustomAction.Dropdown = { Name: "Select a Custom Action" }; + +// Dataverse Action +DRB.DOM.DataverseAction = {}; +DRB.DOM.DataverseAction.Span = { Name: "Action" }; +DRB.DOM.DataverseAction.Dropdown = { Name: "Select an Action" }; + +// Dataverse Function +DRB.DOM.DataverseFunction = {}; +DRB.DOM.DataverseFunction.Span = { Name: "Function" }; +DRB.DOM.DataverseFunction.Dropdown = { Name: "Select a Function" }; + +// Dataverse Execute +DRB.DOM.DataverseExecute = {}; +DRB.DOM.DataverseExecute.Span = { Id: "span_dvexecute", Name: "" }; +DRB.DOM.DataverseExecute.Dropdown = { Id: "cbx_dvexecute", Name: "" }; + +// Dataverse Parameters +DRB.DOM.DataverseParameters = {}; +DRB.DOM.DataverseParameters.Div = { Id: "div_dvparameters", Class: "mapping-container" }; + +// Dataverse Properties Table, Tr, Td +DRB.DOM.DataverseParameters.Table = { Id: "table_dvproperties" }; +DRB.DOM.DataverseParameters.Tr = { Id: "tr_dvp_" }; +DRB.DOM.DataverseParameters.TdOptional = { Id: "td_dvp_optional_", Name: "Optional" }; +DRB.DOM.DataverseParameters.TdInclude = { Id: "td_dvp_include_", Name: "Include" }; +DRB.DOM.DataverseParameters.CheckboxInclude = { Id: "chk_dvp_include_" }; + +DRB.DOM.DataverseParameters.TdName = { Id: "td_dvp_name_", Name: "Parameter" }; +DRB.DOM.DataverseParameters.TdType = { Id: "td_dvp_type_", Name: "Type" }; +DRB.DOM.DataverseParameters.TdValue = { Id: "td_dvp_value_", Name: "Value" }; +DRB.DOM.DataverseParameters.SpanName = { Id: "td_dvp_name_" }; +DRB.DOM.DataverseParameters.DivValue = { Id: "div_dvp_value_" }; +DRB.DOM.DataverseParameters.ControlValue = { Id: "dvp_value_" }; +DRB.DOM.DataverseParameters.DivCollectionValue = { Id: "div_dvp_collectionvalue_" }; +DRB.DOM.DataverseParameters.DivCollectionControlValue = { Id: "div_dvp_collectioncontrolvalue_", Class: "collectioncontroldiv" }; +DRB.DOM.DataverseParameters.AddButton = { Id: "btn_dvp_add_", Name: "Add", Class: "btn-primary columnbutton" }; + +// Dataverse ReturnType +DRB.DOM.DataverseReturnType = {}; +DRB.DOM.DataverseReturnType.Span = { Id: "span_dvreturntype" }; + +// Dataverse ReturnType Table, Tr, Td +DRB.DOM.DataverseReturnType.Table = { Id: "table_dvreturntype" }; +DRB.DOM.DataverseReturnType.Tr = { Id: "tr_dvrt_" }; +DRB.DOM.DataverseReturnType.TdName = { Id: "td_dvrt_name_", Name: "Name" }; +DRB.DOM.DataverseReturnType.TdType = { Id: "td_dvrt_type_", Name: "Type" }; +// #endregion + +// #region Execute Workflow +DRB.DOM.WorkflowId = {}; +DRB.DOM.WorkflowId.Span = { Id: "span_workflowid", Name: "Workflow Id" }; +DRB.DOM.WorkflowId.Input = { Id: "txt_workflowid" }; +DRB.DOM.WorkflowId.Lookup = { Id: "lkp_workflowid" }; +// #endregion + +// #region Power Automate +DRB.DOM.PowerAutomate = {}; + +DRB.DOM.PowerAutomate.Table = { Id: "table_powerautomate" }; +DRB.DOM.PowerAutomate.Tr = { Id: "tr_pa_" }; +DRB.DOM.PowerAutomate.TdLabel = { Id: "td_pa_label_" }; +DRB.DOM.PowerAutomate.TdValue = { Id: "td_pa_value_" }; +DRB.DOM.PowerAutomate.TdCopy = { Id: "td_pa_copy_" }; + +DRB.DOM.PowerAutomate.ButtonCopy = { Id: "btn_pa_copy_", Name: "Copy", Class: "btn-secondary" }; + +DRB.DOM.PowerAutomate.SpanTitleRetrieveSingle = { Id: "span_title", Name: "Get a row by ID", Class: "font-weight-bold" }; +DRB.DOM.PowerAutomate.SpanTitleRetrieveMultiple = { Id: "span_title", Name: "List rows", Class: "font-weight-bold" }; + +DRB.DOM.PowerAutomate.TableNameSpan = { Id: "span_tablename", Name: "Table name" }; +DRB.DOM.PowerAutomate.TableNameInput = { Id: "txt_tablename" }; +DRB.DOM.PowerAutomate.RowIDSpan = { Id: "span_rowid", Name: "Row ID" }; +DRB.DOM.PowerAutomate.RowIDInput = { Id: "txt_rowid" }; +DRB.DOM.PowerAutomate.SelectColumnsSpan = { Id: "span_selectcolumns", Name: "Select columns" }; +DRB.DOM.PowerAutomate.SelectColumnsInput = { Id: "txt_selectcolumns" }; +DRB.DOM.PowerAutomate.ExpandQuerySpan = { Id: "span_expandquery", Name: "Expand Query" }; +DRB.DOM.PowerAutomate.ExpandQueryInput = { Id: "txt_expandquery" }; +DRB.DOM.PowerAutomate.FilterRowsSpan = { Id: "span_filterrows", Name: "Filter rows" }; +DRB.DOM.PowerAutomate.FilterRowsInput = { Id: "txt_filterrows" }; +DRB.DOM.PowerAutomate.SortBySpan = { Id: "span_sortby", Name: "Sort By" }; +DRB.DOM.PowerAutomate.SortByInput = { Id: "txt_sortby" }; +DRB.DOM.PowerAutomate.RowCountSpan = { Id: "span_rowcount", Name: "Row count" }; +DRB.DOM.PowerAutomate.RowCountInput = { Id: "txt_rowcount" }; +// #endregion + +// #region Lookup +DRB.DOM.Lookup = {}; +DRB.DOM.Lookup.Div = { Id: "div_lookup" }; +DRB.DOM.Lookup.TableSpan = { Id: "span_tablelookup", Name: "Table" }; +DRB.DOM.Lookup.TableDropdown = { Id: "cbx_tablelookup" }; +DRB.DOM.Lookup.InputSpan = { Id: "span_inputlookup", Name: "Primary Column" }; +DRB.DOM.Lookup.Input = { Id: "cbx_inputlookup" }; +DRB.DOM.Lookup.SearchButton = { Id: "btn_searchlookup", Name: "Search", Class: "btn-secondary" }; +DRB.DOM.Lookup.Table = { Id: "table_lookup" }; +DRB.DOM.Lookup.Tr = { Id: "tr_lookup_" }; +DRB.DOM.Lookup.TdLabel = { Id: "td_lookup_label_" }; +DRB.DOM.Lookup.TdValue = { Id: "td_lookup_value_" }; + +DRB.DOM.Lookup.HeaderIDSpan = { Id: "span_lookup_header_id", Name: "ID" }; +DRB.DOM.Lookup.HeaderPrimaryColumnSpan = { Id: "span_lookup_header_primarycolumn", Name: "Primary Column" }; +DRB.DOM.Lookup.SelectButton = { Id: "btn_selectlookup_", Name: "Select", Class: "btn-outline-secondary" }; +DRB.DOM.Lookup.NoRecordsSpan = { Id: "span_norecordslookup", Name: "No Records" }; // #region DRB.Utilities +// #endregion +// #endregion + +/** + * Utilities - Has Value + * Returns true if a parameter is not undefined, not null and not an empty string, otherwise returns false + * @param {any} parameter Parameter to check + */ +DRB.Utilities.HasValue = function (parameter) { + if (parameter !== undefined && parameter !== null && parameter !== "") { + return true; + } else { + return false; + } +}; + +/** + * Utilities - Local Storage Available + * Check if localStorage is available + */ +DRB.Utilities.LocalStorageAvailable = function () { + try { + localStorage.setItem("DRB_CheckLocalStorage", "DRB"); + localStorage.removeItem("DRB_CheckLocalStorage"); + return true; + } catch (e) { + return false; + } +}; + +/** + * Utilities - Generate Guid + * Returns a Random Guid with options to add Braces or Upper Case + * @param {boolean} braces if the Guid contains braces + * @param {boolean} upperCase if the Guid is returned as Upper Case + */ +DRB.Utilities.GenerateGuid = function (braces, upperCase) { + var randomGuid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/x/g, function (c) { + var r = (Math.random() * 16) | 0, + v = c === "x" ? r : (r & 0x3) | 0x8; + return v.toString(16); + }); + if (braces === true) { + randomGuid = "{" + randomGuid + "}"; + } + if (upperCase === true) { + randomGuid = randomGuid.toUpperCase(); + } + return randomGuid; +}; + +/** + * Utilities - Remove Duplicates From Array + * Returns a new Array without duplicates + * @param {any[]} array Array to check + */ +DRB.Utilities.RemoveDuplicatesFromArray = function (array) { + var values = array.filter(function (item, pos) { + return array.indexOf(item) === pos; + }); + return values; +}; + +/** + * Utilities - Get Record By Property + * Returns a Record matching the property and the value passed + * @param {any[]} records Records + * @param {string} propertyName Property Name + * @param {any} propertyValue Property Value + */ +DRB.Utilities.GetRecordByProperty = function (records, propertyName, propertyValue) { + if (Array.isArray(records)) { + for (var count = 0; count < records.length; count++) { + if (records[count].hasOwnProperty(propertyName) && records[count][propertyName] == propertyValue) { + return records[count]; + } + } + } + return null; +}; + +/** + * Utilities - Get Record By Id + * Returns a record matching the id + * @param {any[]} records Records + * @param {any} id Id + */ +DRB.Utilities.GetRecordById = function (records, id) { + return DRB.Utilities.GetRecordByProperty(records, "Id", id); +}; + +/** + * Utilities - Custom Sort + * sort an array on a specific property, minus sign (-) in front of the property defines a reverse sort + * @param {string} property Property Name + */ +DRB.Utilities.CustomSort = function (property) { + var sortOrder = 1; + if (property[0] === "-") { + sortOrder = -1; + property = property.substr(1); + } + + return function (a, b) { + var result = a[property].toLowerCase() < b[property].toLowerCase() ? -1 : a[property].toLowerCase() > b[property].toLowerCase() ? 1 : 0; + return result * sortOrder; + }; +}; // #region DRB.Xrm.GetDemoData +// #endregion + +/** + * Get Demo Data based on parameters + * @param {any[]} queries Queries + */ +DRB.Xrm.GetDemoDataBatch = function (queries) { + var fakeHeaderStart = [ + "--batchresponse_00000000-0000-0000-0000-000000000000", + "Content-Type: application/http", + "Content-Transfer-Encoding: binary", + "", + "HTTP/1.1 200 OK", + "Content-Type: application/json; odata.metadata=minimal", + "OData-Version: 4.0", + 'Preference-Applied: odata.include-annotations="*"', + "", + ].join("\r\n"); + var fakeHeaderEnd = "--batchresponse_00000000-0000-0000-0000-000000000000--"; + var emptyLine = ["", ""].join("\r\n"); + + var entity_Contact = { SchemaName: "Contact", LogicalName: "contact", EntitySetName: "contacts", PrimaryIdAttribute: "contactid", PrimaryNameAttribute: "fullname" }; + var entity_Team = { SchemaName: "Team", LogicalName: "team", EntitySetName: "teams", PrimaryIdAttribute: "teamid", PrimaryNameAttribute: "name" }; + var entity_User = { + SchemaName: "SystemUser", + LogicalName: "systemuser", + EntitySetName: "systemusers", + PrimaryIdAttribute: "systemuserid", + PrimaryNameAttribute: "fullname", + DisplayName: { UserLocalizedLabel: { Label: "User" } }, + }; + var entity_CustomTable = { + SchemaName: "sample_CustomTable", + LogicalName: "sample_customtable", + EntitySetName: "sample_customtables", + PrimaryIdAttribute: "sample_customtableid", + PrimaryNameAttribute: "sample_name", + DisplayName: { UserLocalizedLabel: { Label: "Custom Table" } }, + }; + var entity_CustomTable2 = { + SchemaName: "new_CustomTable", + LogicalName: "new_customtable", + EntitySetName: "new_customtables", + PrimaryIdAttribute: "new_customtableid", + PrimaryNameAttribute: "new_name", + DisplayName: { UserLocalizedLabel: { Label: "Custom Table (New)" } }, + }; + + var entity_Account = { SchemaName: "Account", LogicalName: "account", EntitySetName: "accounts", PrimaryIdAttribute: "accountid", PrimaryNameAttribute: "name" }; + + var columns_Contact = []; + columns_Contact.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "FirstName", + LogicalName: "firstname", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 100, + DisplayName: { UserLocalizedLabel: { Label: "First Name" } }, + }); + columns_Contact.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "FullName", + LogicalName: "fullname", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: true, + IsValidForRead: true, + IsValidForCreate: false, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Full Name" } }, + }); + columns_Contact.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "LastName", + LogicalName: "lastname", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 100, + DisplayName: { UserLocalizedLabel: { Label: "Last Name" } }, + }); + columns_Contact.push({ + SchemaName: "ContactId", + LogicalName: "contactid", + AttributeType: "Uniqueidentifier", + IsPrimaryId: true, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Contact" } }, + }); + + var columns_Team = []; + columns_Team.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "Name", + LogicalName: "name", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: true, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Name" } }, + }); + columns_Team.push({ + SchemaName: "TeamId", + LogicalName: "teamid", + AttributeType: "Uniqueidentifier", + IsPrimaryId: true, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Team" } }, + }); + + var columns_Account = []; + columns_Account.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "Name", + LogicalName: "name", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: true, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 100, + DisplayName: { UserLocalizedLabel: { Label: "Name" } }, + }); + columns_Account.push({ + SchemaName: "AccountId", + LogicalName: "accountid", + AttributeType: "Uniqueidentifier", + IsPrimaryId: true, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Account" } }, + }); + + //columns_Account = [{ "LogicalName": "preferredcontactmethodcodename", "SchemaName": "PreferredContactMethodCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredcontactmethodcode", "MetadataId": "8663b910-af86-4dea-826e-8222706372f4", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "emailaddress3", "SchemaName": "EMailAddress3", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "97fb4aae-ea5d-427f-9b2b-9a6b9754286e", "DisplayName": { "LocalizedLabels": [{ "Label": "Email Address 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1ee8af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Email Address 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1ee8af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "emailaddress2", "SchemaName": "EMailAddress2", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "98b09426-95ab-4f21-87a0-f6775f2b4210", "DisplayName": { "LocalizedLabels": [{ "Label": "Email Address 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d999ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Email Address 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d999ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "emailaddress1", "SchemaName": "EMailAddress1", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "b254ab69-de5a-4edb-8059-bdeb6863c544", "DisplayName": { "LocalizedLabels": [{ "Label": "Email", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d452c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Email", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d452c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "masteraccountidyominame", "SchemaName": "MasterAccountIdYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "masterid", "MetadataId": "a15dedfc-9382-43ac-8d10-7773aa3eefeb", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_city", "SchemaName": "Address1_City", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ca8d0a94-8569-4154-b511-718e11635449", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: City", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "02d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: City", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "02d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "slaid", "SchemaName": "SLAId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "6bdcd7f1-5865-4fef-91b0-676824b18641", "DisplayName": { "LocalizedLabels": [{ "Label": "SLA", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "826c8195-c750-4e24-971e-6215c86b34d6", "HasChanged": null }], "UserLocalizedLabel": { "Label": "SLA", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "826c8195-c750-4e24-971e-6215c86b34d6", "HasChanged": null } } }, { "LogicalName": "address2_freighttermscodename", "SchemaName": "Address2_FreightTermsCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "address2_freighttermscode", "MetadataId": "0e5266fe-a4c0-4dfa-abcc-698ad97d6fb1", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "modifiedon", "SchemaName": "ModifiedOn", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "47f8395d-1604-414d-b03d-7fde25b5911b", "DisplayName": { "LocalizedLabels": [{ "Label": "Modified On", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f5e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Modified On", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f5e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "aging90", "SchemaName": "Aging90", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "66c49a64-dd29-47fd-998c-7abd5ff3c317", "DisplayName": { "LocalizedLabels": [{ "Label": "Aging 90", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5f1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Aging 90", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5f1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "overriddencreatedon", "SchemaName": "OverriddenCreatedOn", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "23a69301-1d4e-41bc-adbc-d4c129bb13cf", "DisplayName": { "LocalizedLabels": [{ "Label": "Record Created On", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6f36cd93-ec7b-4e4a-8814-6a22ca8d749a", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Record Created On", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6f36cd93-ec7b-4e4a-8814-6a22ca8d749a", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "websiteurl", "SchemaName": "WebSiteURL", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "536a48f0-657b-4029-95cd-9472059fc44a", "DisplayName": { "LocalizedLabels": [{ "Label": "Website", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "544901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Website", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "544901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DoubleAttributeMetadata", "LogicalName": "address1_longitude", "SchemaName": "Address1_Longitude", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Double", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "789b772d-99aa-4d96-b463-a75024d33935", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Longitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e199f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Longitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e199f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotpostalmail", "SchemaName": "DoNotPostalMail", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "5a476574-a083-4dc5-ba40-b909fe4890f8", "DisplayName": { "LocalizedLabels": [{ "Label": "Do not allow Mails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d326e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Do not allow Mails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d326e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "createdbyexternalpartyname", "SchemaName": "CreatedByExternalPartyName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "createdbyexternalparty", "MetadataId": "a9ced733-f64e-44a4-8924-c73a79d46a75", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "address1_addresstypecode", "SchemaName": "Address1_AddressTypeCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "4e51f924-e47d-4f69-811a-cd387c9750d4", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Address Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "bb41b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Address Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "bb41b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "transactioncurrencyid", "SchemaName": "TransactionCurrencyId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "6d36e3a6-3e08-4fbc-aaa7-247eba2ab9f5", "DisplayName": { "LocalizedLabels": [{ "Label": "Currency", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b2d8473e-6978-4b44-b667-3c1f5668aac6", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Currency", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b2d8473e-6978-4b44-b667-3c1f5668aac6", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "sharesoutstanding", "SchemaName": "SharesOutstanding", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "c4a20223-61b2-4694-996e-7c02f02efc9e", "DisplayName": { "LocalizedLabels": [{ "Label": "Shares Outstanding", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ef98ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Shares Outstanding", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ef98ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotsendmm", "SchemaName": "DoNotSendMM", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "e282748e-3c74-4cdd-8f21-93fe92faee94", "DisplayName": { "LocalizedLabels": [{ "Label": "Send Marketing Materials", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4052c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Send Marketing Materials", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4052c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "createdbyexternalparty", "SchemaName": "CreatedByExternalParty", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "827e9002-b547-49fc-9e8d-a6b1cfcef33b", "DisplayName": { "LocalizedLabels": [{ "Label": "Created By (External Party)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c72d726a-8f5d-412c-9618-7cc99d8308c8", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Created By (External Party)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c72d726a-8f5d-412c-9618-7cc99d8308c8", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "creditonhold", "SchemaName": "CreditOnHold", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "cc7229b4-bb8b-49a3-a7f8-77e7d89201d7", "DisplayName": { "LocalizedLabels": [{ "Label": "Credit Hold", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ab40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Credit Hold", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ab40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "transactioncurrencyidname", "SchemaName": "TransactionCurrencyIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "transactioncurrencyid", "MetadataId": "3fbc7028-f637-4074-87f5-97cc29ee11d2", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "aging30", "SchemaName": "Aging30", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "2b4ffdf4-1bf8-4d3d-a075-d123b4ed65ba", "DisplayName": { "LocalizedLabels": [{ "Label": "Aging 30", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "569aba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Aging 30", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "569aba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotbulkpostalmail", "SchemaName": "DoNotBulkPostalMail", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "824be9eb-f68e-4db9-9db2-479c1ba4b48b", "DisplayName": { "LocalizedLabels": [{ "Label": "Do not allow Bulk Mails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "7c64cfee-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Do not allow Bulk Mails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "7c64cfee-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "yominame", "SchemaName": "YomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "26016ae7-16b4-4cbe-bc34-84ae19e7d6b2", "DisplayName": { "LocalizedLabels": [{ "Label": "Yomi Account Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5095733d-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Yomi Account Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5095733d-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "preferredsystemuseridyominame", "SchemaName": "PreferredSystemUserIdYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredsystemuserid", "MetadataId": "fa1b1667-91a5-45a6-9852-305e46ba280a", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "address1_shippingmethodcode", "SchemaName": "Address1_ShippingMethodCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "064a6cf1-ec3d-4e57-bfb7-011e168cf35f", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Shipping Method", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "af26e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Shipping Method", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "af26e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "paymenttermscode", "SchemaName": "PaymentTermsCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "94afe94b-4ca6-4d62-9585-ab4670012dfb", "DisplayName": { "LocalizedLabels": [{ "Label": "Payment Terms", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "35d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Payment Terms", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "35d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "slainvokedid", "SchemaName": "SLAInvokedId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "9888d31b-1944-4a65-8856-76234861beb0", "DisplayName": { "LocalizedLabels": [{ "Label": "Last SLA applied", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e9c7c65d-98c8-4484-a6a7-f81d279ed578", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Last SLA applied", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e9c7c65d-98c8-4484-a6a7-f81d279ed578", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "opendeals_date", "SchemaName": "OpenDeals_Date", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "c29a00fc-911a-4389-82b5-aba921d633b5", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Deals (Last Updated On)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0a8d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Deals (Last Updated On)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0a8d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "modifiedbyexternalpartyyominame", "SchemaName": "ModifiedByExternalPartyYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "modifiedbyexternalparty", "MetadataId": "9e1d3899-ce30-4a4b-b43c-be1557591c23", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "businesstypecodename", "SchemaName": "BusinessTypeCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "businesstypecode", "MetadataId": "3d56b072-cd70-496c-aba7-d2427fd0d19a", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "originatingleadid", "SchemaName": "OriginatingLeadId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "7bf7ed76-77bb-4b70-8086-312df7727588", "DisplayName": { "LocalizedLabels": [{ "Label": "Originating Lead", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2475ec74-f66b-48e3-85ee-f6e90672b8de", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Originating Lead", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2475ec74-f66b-48e3-85ee-f6e90672b8de", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "masteraccountidname", "SchemaName": "MasterAccountIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "masterid", "MetadataId": "192b1df4-81a8-45e2-a061-fe10cda6c62e", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "preferredsystemuseridname", "SchemaName": "PreferredSystemUserIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredsystemuserid", "MetadataId": "c39956b9-f294-466a-8c41-aca97375aad6", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "accountcategorycode", "SchemaName": "AccountCategoryCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "118771ca-6fb9-4f60-8fd4-99b6124b63ad", "DisplayName": { "LocalizedLabels": [{ "Label": "Category", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "08d8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Category", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "08d8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "openrevenue", "SchemaName": "OpenRevenue", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "306845ef-446a-42e5-8df8-11c31bafaded", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Revenue", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f68ff3da-33f2-45b4-813b-b13cb563b02b", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Revenue", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f68ff3da-33f2-45b4-813b-b13cb563b02b", "HasChanged": null } } }, { "LogicalName": "preferredappointmentdaycodename", "SchemaName": "PreferredAppointmentDayCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredappointmentdaycode", "MetadataId": "2401dd40-d2df-4726-bb6c-cb0338557bc5", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_stateorprovince", "SchemaName": "Address2_StateOrProvince", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "38d65451-2d18-4927-9773-5a7023dccd3d", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: State\/Province", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "90aac7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: State\/Province", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "90aac7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "participatesinworkflowname", "SchemaName": "ParticipatesInWorkflowName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "participatesinworkflow", "MetadataId": "916834ae-6e57-4f14-b02a-b2a57b4f6bf0", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "territoryid", "SchemaName": "TerritoryId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "952b5e27-4020-48da-bcf1-f174c67803e8", "DisplayName": { "LocalizedLabels": [{ "Label": "Territory", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6fb5af72-f4ea-4c0b-b800-9ffd1ec1dbb7", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Territory", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6fb5af72-f4ea-4c0b-b800-9ffd1ec1dbb7", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_country", "SchemaName": "Address2_Country", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "95176315-078e-4722-a378-272c9322dc3c", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Country\/Region", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2fd8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Country\/Region", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2fd8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "accountcategorycodename", "SchemaName": "AccountCategoryCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "accountcategorycode", "MetadataId": "c3239726-00d7-4000-9135-f06ea24a423f", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_line2", "SchemaName": "Address2_Line2", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "064c0b65-d6c5-4a89-bfc1-24d01001a051", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Street 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "84d8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Street 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "84d8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "aging60_base", "SchemaName": "Aging60_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "3ccb47fd-354b-4085-a50f-173e4cb0d41b", "DisplayName": { "LocalizedLabels": [{ "Label": "Aging 60 (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d1364f36-6283-4e63-880e-1e787ab2a649", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Aging 60 (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d1364f36-6283-4e63-880e-1e787ab2a649", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "preferredserviceid", "SchemaName": "PreferredServiceId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ba916f06-fc34-4127-9dc6-9b9ec92adf5f", "DisplayName": { "LocalizedLabels": [{ "Label": "Preferred Service", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "26920c0f-38c5-46e3-8b59-e826a597473f", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Preferred Service", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "26920c0f-38c5-46e3-8b59-e826a597473f", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_line3", "SchemaName": "Address1_Line3", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "bb0f0f6e-c4a4-4124-a7c3-b579ac0dfae0", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Street 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "3741b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Street 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "3741b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "onholdtime", "SchemaName": "OnHoldTime", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "fc486055-74dd-4b6c-8005-8aec67ffe0df", "DisplayName": { "LocalizedLabels": [{ "Label": "On Hold Time (Minutes)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "3e94b927-619d-4b64-853a-c4ec80b64bbb", "HasChanged": null }], "UserLocalizedLabel": { "Label": "On Hold Time (Minutes)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "3e94b927-619d-4b64-853a-c4ec80b64bbb", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "address1_freighttermscode", "SchemaName": "Address1_FreightTermsCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "e7c8f2bf-c314-4d3d-bb8e-83726acf99e8", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Freight Terms", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "67d6a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Freight Terms", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "67d6a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "creditlimit", "SchemaName": "CreditLimit", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "a961ec67-dbad-4932-9b4a-62931d394485", "DisplayName": { "LocalizedLabels": [{ "Label": "Credit Limit", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b0cde1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Credit Limit", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b0cde1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "originatingleadidname", "SchemaName": "OriginatingLeadIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "originatingleadid", "MetadataId": "6ef4dd95-df51-4b0e-b52b-0ee699025d3e", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "parentaccountidname", "SchemaName": "ParentAccountIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "parentaccountid", "MetadataId": "a3e8b064-8cc2-470e-97f7-1322ba69b23d", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "accountratingcode", "SchemaName": "AccountRatingCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "28ef681e-b91f-4988-9647-10eea2f33bd0", "DisplayName": { "LocalizedLabels": [{ "Label": "Account Rating", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "444901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Account Rating", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "444901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "address1_utcoffset", "SchemaName": "Address1_UTCOffset", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "168ea93d-ad1b-453c-9f57-646a947c9ccd", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: UTC Offset", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0c40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: UTC Offset", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0c40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "preferredappointmenttimecode", "SchemaName": "PreferredAppointmentTimeCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "80ed630f-d6f9-4fa4-96b1-e1b17522015d", "DisplayName": { "LocalizedLabels": [{ "Label": "Preferred Time", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "a5abc7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Preferred Time", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "a5abc7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "donotsendmarketingmaterialname", "SchemaName": "DoNotSendMarketingMaterialName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotsendmm", "MetadataId": "6b8aaf94-a450-4319-abf7-296a8791c0bf", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "numberofemployees", "SchemaName": "NumberOfEmployees", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "b2820e7c-a271-4298-8c65-7c9593240ea2", "DisplayName": { "LocalizedLabels": [{ "Label": "Number of Employees", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "181ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Number of Employees", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "181ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "modifiedbyexternalpartyname", "SchemaName": "ModifiedByExternalPartyName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "modifiedbyexternalparty", "MetadataId": "30c84691-43fb-4e9b-a8a9-5ed8fe8e86f5", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "statecodename", "SchemaName": "StateCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "statecode", "MetadataId": "d5ef8b43-fc5e-48dd-8bff-708a30c1576a", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "accountclassificationcode", "SchemaName": "AccountClassificationCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "1344497c-e863-48d4-ab7c-2c068aacd5c6", "DisplayName": { "LocalizedLabels": [{ "Label": "Classification", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0f92aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Classification", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0f92aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "revenue", "SchemaName": "Revenue", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9485cdfc-ad92-4758-b61d-f3705c82a85e", "DisplayName": { "LocalizedLabels": [{ "Label": "Annual Revenue", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ded7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Annual Revenue", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ded7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "customertypecode", "SchemaName": "CustomerTypeCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "4e33af09-ba43-4365-a747-c7e4f9992172", "DisplayName": { "LocalizedLabels": [{ "Label": "Relationship Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6954c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Relationship Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6954c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "donotbulkpostalmailname", "SchemaName": "DoNotBulkPostalMailName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotbulkpostalmail", "MetadataId": "e2e4b3c3-6016-459f-9d1f-b42ee454f0a9", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DecimalAttributeMetadata", "LogicalName": "exchangerate", "SchemaName": "ExchangeRate", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Decimal", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "5c346e62-9f48-4250-a58c-53a22200657f", "DisplayName": { "LocalizedLabels": [{ "Label": "Exchange Rate", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fc17d4a2-5617-4dc3-9bae-73aa237e799d", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Exchange Rate", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fc17d4a2-5617-4dc3-9bae-73aa237e799d", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_county", "SchemaName": "Address2_County", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9ffd362a-3bc1-4f40-ac9a-a14bb2e70504", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: County", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6691aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: County", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6691aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "isprivate", "SchemaName": "IsPrivate", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": false, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "c2e9efb0-6bea-4741-b7b9-94d5267743fb", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "primarycontactid", "SchemaName": "PrimaryContactId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "dcf69df9-5aa5-4ff0-8f7d-edbe5b7aea7c", "DisplayName": { "LocalizedLabels": [{ "Label": "Primary Contact", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b641b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Primary Contact", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b641b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "telephone3", "SchemaName": "Telephone3", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "038bafa0-4d34-45b0-8fc5-85d7f147192e", "DisplayName": { "LocalizedLabels": [{ "Label": "Telephone 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e51ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Telephone 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e51ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "parentaccountid", "SchemaName": "ParentAccountId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "218eaefa-b657-4eee-933e-aa39fa8ae5c6", "DisplayName": { "LocalizedLabels": [{ "Label": "Parent Account", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f751c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Parent Account", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f751c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_city", "SchemaName": "Address2_City", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "c1730fd8-059b-4804-b44e-1365fd5fe1a8", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: City", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6f9aba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: City", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6f9aba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StatusAttributeMetadata", "LogicalName": "statuscode", "SchemaName": "StatusCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Status", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "f99371c3-b1e1-4645-b2c3-c3db0f59ecf0", "DisplayName": { "LocalizedLabels": [{ "Label": "Status Reason", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d11c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Status Reason", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d11c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "address1_addresstypecodename", "SchemaName": "Address1_AddressTypeCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "address1_addresstypecode", "MetadataId": "ae7ac149-a80b-4aad-bd5c-fdbe4f255c85", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DoubleAttributeMetadata", "LogicalName": "address2_latitude", "SchemaName": "Address2_Latitude", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Double", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "526057cd-3db1-4be6-a7ee-85a6018ad6fb", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Latitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e8f1fbc4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Latitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e8f1fbc4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "createdon", "SchemaName": "CreatedOn", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "b952981e-515f-40ba-9a99-99ccf4a9666d", "DisplayName": { "LocalizedLabels": [{ "Label": "Created On", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "bcaac7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Created On", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "bcaac7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotbulkemail", "SchemaName": "DoNotBulkEMail", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "d80bc199-9dd4-493a-9932-d1fab5590e1a", "DisplayName": { "LocalizedLabels": [{ "Label": "Do not allow Bulk Emails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c71ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Do not allow Bulk Emails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c71ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotfax", "SchemaName": "DoNotFax", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "616c80e2-b5c6-4927-990a-0cb1b05b5eae", "DisplayName": { "LocalizedLabels": [{ "Label": "Do not allow Faxes", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d798ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Do not allow Faxes", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d798ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "marketcap", "SchemaName": "MarketCap", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "7c4e2f3f-41ee-435a-ba53-bde48af703a2", "DisplayName": { "LocalizedLabels": [{ "Label": "Market Capitalization", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d741b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Market Capitalization", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "d741b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "openrevenue_base", "SchemaName": "OpenRevenue_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "9bf59f26-ec1b-4f91-a735-c4c4a6bab3f6", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Revenue (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "138d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Revenue (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "138d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MemoAttributeMetadata", "LogicalName": "address1_composite", "SchemaName": "Address1_Composite", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Memo", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "7ffa2f83-c47c-49da-81de-e41829c856ba", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f195532f-e18a-4a4e-a720-f341a54cba8a", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f195532f-e18a-4a4e-a720-f341a54cba8a", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "ownershipcode", "SchemaName": "OwnershipCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "7be79e9c-1a22-45b2-b09f-1e37cba95bfa", "DisplayName": { "LocalizedLabels": [{ "Label": "Ownership", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e840b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Ownership", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e840b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "opendeals_state", "SchemaName": "OpenDeals_State", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "5394b6f5-5f24-4939-b750-9002a68d1b1a", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Deals (State)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0e8d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Deals (State)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0e8d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null } } }, { "LogicalName": "statuscodename", "SchemaName": "StatusCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "statuscode", "MetadataId": "ee82e6f8-45f0-4420-8942-04e55174b3c7", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "owningbusinessunit", "SchemaName": "OwningBusinessUnit", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "80e6486e-17f9-4623-b179-6f86778663ce", "DisplayName": { "LocalizedLabels": [{ "Label": "Owning Business Unit", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ec63cfee-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Owning Business Unit", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ec63cfee-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "preferredappointmenttimecodename", "SchemaName": "PreferredAppointmentTimeCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredappointmenttimecode", "MetadataId": "8d3209c0-a0ba-429c-b96e-d9295f74aff9", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_postalcode", "SchemaName": "Address2_PostalCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9df02683-1835-4c45-9840-945d40758b1d", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: ZIP\/Postal Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c8d6a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: ZIP\/Postal Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c8d6a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "lastusedincampaign", "SchemaName": "LastUsedInCampaign", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "bc247de2-6d37-4ea1-9db8-3de2beef935c", "DisplayName": { "LocalizedLabels": [{ "Label": "Last Date Included in Campaign", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "649af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Last Date Included in Campaign", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "649af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "paymenttermscodename", "SchemaName": "PaymentTermsCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "paymenttermscode", "MetadataId": "31588d1c-b4c2-4414-ba65-abc038c71c4c", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "industrycodename", "SchemaName": "IndustryCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "industrycode", "MetadataId": "15750b8c-52eb-48df-843f-dc1710d994cd", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "processid", "SchemaName": "ProcessId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Uniqueidentifier", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "bac14cb9-202f-4037-82f3-5b0a570b40ed", "DisplayName": { "LocalizedLabels": [{ "Label": "Process", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c76b75b9-274a-4f7a-b093-38d5322ef82a", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Process", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c76b75b9-274a-4f7a-b093-38d5322ef82a", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "owneridyominame", "SchemaName": "OwnerIdYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "ownerid", "MetadataId": "1e5bcca6-1ebd-4e6d-9fd2-c837d17d5eb7", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "entityimage_url", "SchemaName": "EntityImage_URL", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "entityimageid", "MetadataId": "e8f8979f-d83a-420a-918a-b2a2f28f09bf", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "teamsfollowed", "SchemaName": "TeamsFollowed", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "8b937ebc-615e-48c1-b057-df9e63567dd1", "DisplayName": { "LocalizedLabels": [{ "Label": "TeamsFollowed", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "aef266fa-06ee-4e80-94be-8d7ca01229be", "HasChanged": null }], "UserLocalizedLabel": { "Label": "TeamsFollowed", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "aef266fa-06ee-4e80-94be-8d7ca01229be", "HasChanged": null } } }, { "LogicalName": "address2_shippingmethodcodename", "SchemaName": "Address2_ShippingMethodCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "address2_shippingmethodcode", "MetadataId": "2130e3c1-c554-4b10-a287-8e31951dc4d6", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_line3", "SchemaName": "Address2_Line3", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ba99202d-aaad-4e62-af78-9695b7c8b5ca", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Street 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "33e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Street 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "33e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MemoAttributeMetadata", "LogicalName": "description", "SchemaName": "Description", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Memo", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "c6000ee7-3aa3-4bfc-afc2-0cff33de5a03", "DisplayName": { "LocalizedLabels": [{ "Label": "Description", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ebcee1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Description", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ebcee1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "modifiedby", "SchemaName": "ModifiedBy", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "2e19a39f-63d9-4fb1-9353-b725eb311de0", "DisplayName": { "LocalizedLabels": [{ "Label": "Modified By", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4e53c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Modified By", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4e53c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "timezoneruleversionnumber", "SchemaName": "TimeZoneRuleVersionNumber", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "2aabdd56-34c3-4664-bc23-3d538f4c2b2f", "DisplayName": { "LocalizedLabels": [{ "Label": "Time Zone Rule Version Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2fcbaed5-b6ad-4579-aa36-836311d4ad99", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Time Zone Rule Version Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2fcbaed5-b6ad-4579-aa36-836311d4ad99", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_county", "SchemaName": "Address1_County", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "13874392-d3f9-4021-93db-7bb2b048a404", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: County", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "da1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: County", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "da1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "createdbyname", "SchemaName": "CreatedByName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "createdby", "MetadataId": "2b80d9de-77b0-4ba5-9d47-f6adb778a61e", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "shippingmethodcodename", "SchemaName": "ShippingMethodCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "shippingmethodcode", "MetadataId": "6e3901fa-8d93-4b28-8997-eace7d5a81e8", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "preferredcontactmethodcode", "SchemaName": "PreferredContactMethodCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "cc5719c0-4fcd-44d3-b1ff-ad77073344e2", "DisplayName": { "LocalizedLabels": [{ "Label": "Preferred Method of Contact", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "7753c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Preferred Method of Contact", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "7753c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "modifiedonbehalfby", "SchemaName": "ModifiedOnBehalfBy", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "e9b339b9-b07c-44fb-b53d-795721d2f520", "DisplayName": { "LocalizedLabels": [{ "Label": "Modified By (Delegate)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e859a486-70dd-4585-aaa9-3de2774a4537", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Modified By (Delegate)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e859a486-70dd-4585-aaa9-3de2774a4537", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_line1", "SchemaName": "Address1_Line1", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "7b3459e2-4b97-44b9-9cb7-6248689dd151", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Street 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c5e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Street 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c5e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotemail", "SchemaName": "DoNotEMail", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "e4c0ddc5-d87e-438d-8c97-927ddae50adf", "DisplayName": { "LocalizedLabels": [{ "Label": "Do not allow Emails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "cb40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Do not allow Emails", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "cb40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "territorycode", "SchemaName": "TerritoryCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "204767ee-9219-458d-a78e-c0295e724fab", "DisplayName": { "LocalizedLabels": [{ "Label": "Territory Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "9125e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Territory Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "9125e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "donotphonename", "SchemaName": "DoNotPhoneName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotphone", "MetadataId": "ca244852-c3b8-4fea-ae31-68317fa11bf8", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_postofficebox", "SchemaName": "Address2_PostOfficeBox", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "64b24860-5c1b-46a2-96a5-299ef09a870d", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Post Office Box", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2ecfe1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Post Office Box", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2ecfe1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_telephone1", "SchemaName": "Address2_Telephone1", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "46c47251-be48-4e66-96da-7019322003ad", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Telephone 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "dc90aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Telephone 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "dc90aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_telephone2", "SchemaName": "Address2_Telephone2", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "626eb7d3-333e-439d-adca-cc7e8d253afc", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Telephone 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "85f1fbc4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Telephone 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "85f1fbc4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_telephone3", "SchemaName": "Address2_Telephone3", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "80f36ff1-22b5-43e5-ac4f-7cbf40a3f1f6", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Telephone 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4c53c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Telephone 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4c53c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "originatingleadidyominame", "SchemaName": "OriginatingLeadIdYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "originatingleadid", "MetadataId": "1ecea20b-9bb7-4895-9e9a-34a4a4f240be", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "preferredequipmentidname", "SchemaName": "PreferredEquipmentIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredequipmentid", "MetadataId": "42418791-c37e-4e61-98c3-8d583d1fb3de", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "address1_addressid", "SchemaName": "Address1_AddressId", "IsPrimaryId": true, "IsPrimaryName": false, "AttributeType": "Uniqueidentifier", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "330e9d6e-2ca2-4694-a892-3fbb53d656fd", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1052c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1052c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "traversedpath", "SchemaName": "TraversedPath", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "b5922123-0ba7-45f6-98d4-ba666a45e3c4", "DisplayName": { "LocalizedLabels": [{ "Label": "(Deprecated) Traversed Path", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "33457f57-609d-4cfd-9738-e9606852c4fb", "HasChanged": null }], "UserLocalizedLabel": { "Label": "(Deprecated) Traversed Path", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "33457f57-609d-4cfd-9738-e9606852c4fb", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "territoryidname", "SchemaName": "TerritoryIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "territoryid", "MetadataId": "9cc42b72-6df7-4b91-b5d8-273a870f8bb3", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "territorycodename", "SchemaName": "TerritoryCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "territorycode", "MetadataId": "c9d08ebd-9205-48fb-93e2-fd95b5718d4c", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "followemailname", "SchemaName": "FollowEmailName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "followemail", "MetadataId": "29d77334-70c4-47d8-bacf-b733911a6fe2", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_telephone2", "SchemaName": "Address1_Telephone2", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "dc212cad-707c-42ef-b2b6-5b5e5bd10065", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Telephone 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "37e8af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Telephone 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "37e8af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "createdonbehalfbyname", "SchemaName": "CreatedOnBehalfByName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "createdonbehalfby", "MetadataId": "714467af-a2fe-456c-9951-b88dcc92ed2e", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "owninguser", "SchemaName": "OwningUser", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "510089a8-713a-4d49-a993-6af37d5641d0", "DisplayName": { "LocalizedLabels": [{ "Label": "Owning User", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "abdb0c5b-0863-4c29-be96-45b4ee4f8bcf", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Owning User", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "abdb0c5b-0863-4c29-be96-45b4ee4f8bcf", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "industrycode", "SchemaName": "IndustryCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ae00233e-70c0-4a1f-803f-03ff723e5440", "DisplayName": { "LocalizedLabels": [{ "Label": "Industry", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6498ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Industry", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6498ba00-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_name", "SchemaName": "Address2_Name", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "6688b5e5-126a-4b64-a6ce-dbbca074bd89", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0992aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0992aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "openrevenue_state", "SchemaName": "OpenRevenue_State", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "6787750d-7f5b-4ab8-bddc-c48edda0fca2", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Revenue (State)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1b8d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Revenue (State)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1b8d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "primarysatoriid", "SchemaName": "PrimarySatoriId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "974ecfad-669a-422d-a081-d222d604353f", "DisplayName": { "LocalizedLabels": [{ "Label": "Primary Satori ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "23f2a113-7beb-4754-bb44-0f7566adbbbf", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Primary Satori ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "23f2a113-7beb-4754-bb44-0f7566adbbbf", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "name", "SchemaName": "Name", "IsPrimaryId": false, "IsPrimaryName": true, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "a1965545-44bc-4b7b-b1ae-93074d0e3f2a", "DisplayName": { "LocalizedLabels": [{ "Label": "Account Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "58f1fbc4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Account Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "58f1fbc4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "entityimageid", "SchemaName": "EntityImageId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Uniqueidentifier", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "ddf6ebc7-8159-4f16-bf87-4523af5f2264", "DisplayName": { "LocalizedLabels": [{ "Label": "Entity Image Id", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "127b152b-4a4c-4148-8242-da7ec58ec346", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Entity Image Id", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "127b152b-4a4c-4148-8242-da7ec58ec346", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "aging60", "SchemaName": "Aging60", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "002902f9-14b4-4825-bcbe-ba7a2f9500fd", "DisplayName": { "LocalizedLabels": [{ "Label": "Aging 60", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "8491aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Aging 60", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "8491aa12-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "timespentbymeonemailandmeetings", "SchemaName": "TimeSpentByMeOnEmailAndMeetings", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "2b8f1a55-04f9-468f-b431-bdc0e59e6019", "DisplayName": { "LocalizedLabels": [{ "Label": "Time Spent by me", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6c72169b-6f22-45c5-849c-d98629a3bb0c", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Time Spent by me", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "6c72169b-6f22-45c5-849c-d98629a3bb0c", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "businesstypecode", "SchemaName": "BusinessTypeCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "088101ce-83c4-40cd-9b8b-97bdb52bdcfa", "DisplayName": { "LocalizedLabels": [{ "Label": "Business Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "79e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Business Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "79e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "primarytwitterid", "SchemaName": "PrimaryTwitterId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "14ad1176-d742-47bf-836a-6567170a1405", "DisplayName": { "LocalizedLabels": [{ "Label": "Primary Twitter ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "a5bd4993-c40b-4ab3-be39-2c248c11ccb5", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Primary Twitter ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "a5bd4993-c40b-4ab3-be39-2c248c11ccb5", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "owneridname", "SchemaName": "OwnerIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "ownerid", "MetadataId": "0375b41e-124c-4efd-9c52-fbafc69e07b0", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.ImageAttributeMetadata", "LogicalName": "entityimage", "SchemaName": "EntityImage", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": "entityimageid", "MetadataId": "4fabce42-db27-4076-ba0b-2538c71b8a74", "DisplayName": { "LocalizedLabels": [{ "Label": "Default Image", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "84ee563d-1094-4445-b96e-d6d291e8e2e8", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Default Image", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "84ee563d-1094-4445-b96e-d6d291e8e2e8", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BigIntAttributeMetadata", "LogicalName": "entityimage_timestamp", "SchemaName": "EntityImage_Timestamp", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "BigInt", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "entityimageid", "MetadataId": "6a6170af-5a93-4396-9283-4a02c95bce3d", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "createdonbehalfbyyominame", "SchemaName": "CreatedOnBehalfByYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "createdonbehalfby", "MetadataId": "71efbac2-84a2-4301-a5a9-b40a08ebba30", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MemoAttributeMetadata", "LogicalName": "address2_composite", "SchemaName": "Address2_Composite", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Memo", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "05dda970-1693-42e1-9037-68fef8cedf5c", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "69a77bc9-d34c-4d81-8bef-8a7290470eaa", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "69a77bc9-d34c-4d81-8bef-8a7290470eaa", "HasChanged": null } } }, { "LogicalName": "accountratingcodename", "SchemaName": "AccountRatingCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "accountratingcode", "MetadataId": "7bd106f2-53d5-466e-a521-9f29737afb82", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "shippingmethodcode", "SchemaName": "ShippingMethodCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "cf1bf1d3-9c27-4f72-af83-7f96f56ecd14", "DisplayName": { "LocalizedLabels": [{ "Label": "Shipping Method", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e599f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Shipping Method", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e599f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_country", "SchemaName": "Address1_Country", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "1326c13d-8797-4905-9540-47fa9ae8ef57", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Country\/Region", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f026e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Country\/Region", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f026e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "customertypecodename", "SchemaName": "CustomerTypeCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "customertypecode", "MetadataId": "93348ddc-b15e-4b89-9486-2064f3270693", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "owningteam", "SchemaName": "OwningTeam", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "aadfb126-cadd-4195-ada8-e739a404ba7e", "DisplayName": { "LocalizedLabels": [{ "Label": "Owning Team", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "25972789-f835-42fa-9222-40801fd112ce", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Owning Team", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "25972789-f835-42fa-9222-40801fd112ce", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_stateorprovince", "SchemaName": "Address1_StateOrProvince", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "8857cdf3-2e77-4c95-aae3-d08107779f21", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: State\/Province", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b241b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: State\/Province", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b241b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "isprivatename", "SchemaName": "IsPrivateName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "isprivate", "MetadataId": "31aa40c1-13a8-4e05-aad6-52b69a67ee43", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "preferredserviceidname", "SchemaName": "PreferredServiceIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "preferredserviceid", "MetadataId": "cd85ab19-eba2-4d3c-8030-cda5f4fe364c", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "marketingonly", "SchemaName": "MarketingOnly", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "c88f7cd9-19be-48c7-8a33-8473d070297a", "DisplayName": { "LocalizedLabels": [{ "Label": "Marketing Only", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fc98ffdc-17ed-45dd-a3a0-ee59dd6d89d9", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Marketing Only", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fc98ffdc-17ed-45dd-a3a0-ee59dd6d89d9", "HasChanged": null } } }, { "LogicalName": "creditonholdname", "SchemaName": "CreditOnHoldName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "creditonhold", "MetadataId": "33505b21-2a74-47b1-91f0-a52aeab80c78", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "modifiedonbehalfbyname", "SchemaName": "ModifiedOnBehalfByName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "modifiedonbehalfby", "MetadataId": "44d88398-4929-4bbf-9616-ea3014f585d8", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "preferredequipmentid", "SchemaName": "PreferredEquipmentId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "d5f8e679-3885-41ce-b945-65c5b621efbc", "DisplayName": { "LocalizedLabels": [{ "Label": "Preferred Facility\/Equipment", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5afe2680-606e-4811-9882-932148d17b38", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Preferred Facility\/Equipment", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5afe2680-606e-4811-9882-932148d17b38", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "createdbyexternalpartyyominame", "SchemaName": "CreatedByExternalPartyYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "createdbyexternalparty", "MetadataId": "12f3c6f1-477e-4cc1-add2-4538f08cfac6", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "address1_freighttermscodename", "SchemaName": "Address1_FreightTermsCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "address1_freighttermscode", "MetadataId": "7cd017f5-ca70-4b11-b6eb-c3d89c61a689", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "createdonbehalfby", "SchemaName": "CreatedOnBehalfBy", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "90aa9edb-4009-48f9-9b21-2675a055c3fc", "DisplayName": { "LocalizedLabels": [{ "Label": "Created By (Delegate)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "9e465c90-fa69-426a-b448-5547a32124e1", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Created By (Delegate)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "9e465c90-fa69-426a-b448-5547a32124e1", "HasChanged": null } } }, { "LogicalName": "marketingonlyname", "SchemaName": "MarketingOnlyName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "marketingonly", "MetadataId": "f1cdde41-5701-4970-92a0-14ffaa8438ac", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_line1", "SchemaName": "Address2_Line1", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9493ed2f-b55d-46ac-8dc5-8b1b7192cbba", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Street 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "8e26e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Street 1", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "8e26e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_telephone1", "SchemaName": "Address1_Telephone1", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "b9dc178d-394b-439e-90f2-17b84a279357", "DisplayName": { "LocalizedLabels": [{ "Label": "Address Phone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "29abc7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address Phone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "29abc7f4-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "primarycontactidname", "SchemaName": "PrimaryContactIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "primarycontactid", "MetadataId": "ab294895-72ed-4f18-854d-0aaf8d7a8b7d", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_telephone3", "SchemaName": "Address1_Telephone3", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "96278824-686d-4602-a592-943cdb667bea", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Telephone 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b053c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Telephone 3", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b053c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_postofficebox", "SchemaName": "Address1_PostOfficeBox", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "a95a22b3-2197-4dfd-bdaf-d89125162dc3", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Post Office Box", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "50e0eed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Post Office Box", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "50e0eed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "followemail", "SchemaName": "FollowEmail", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "401eed95-62b1-4dd4-8ca2-c5a2bee16481", "DisplayName": { "LocalizedLabels": [{ "Label": "Follow Email Activity", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "a02f7882-abd3-4b61-945d-1f24ffab2e5d", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Follow Email Activity", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "a02f7882-abd3-4b61-945d-1f24ffab2e5d", "HasChanged": null } } }, { "LogicalName": "donotemailname", "SchemaName": "DoNotEMailName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotemail", "MetadataId": "490f2da2-242d-45c9-95bc-9cfc23564567", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "slainvokedidname", "SchemaName": "SLAInvokedIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "slainvokedid", "MetadataId": "6499c30b-9a7f-49af-a169-8183cef8f73f", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "fax", "SchemaName": "Fax", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9811cb32-482f-4dd3-9b5d-5340236dcd61", "DisplayName": { "LocalizedLabels": [{ "Label": "Fax", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "301c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Fax", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "301c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "masterid", "SchemaName": "MasterId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "7af8cc57-303f-4c0c-92d6-53c278e067a0", "DisplayName": { "LocalizedLabels": [{ "Label": "Master ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1c1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Master ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1c1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "sic", "SchemaName": "SIC", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "1534a09c-3313-4189-8fec-a132d69f9a0d", "DisplayName": { "LocalizedLabels": [{ "Label": "SIC Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1f1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "SIC Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1f1c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "ownerid", "SchemaName": "OwnerId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Owner", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "3343d9f8-8b3b-45de-881f-4501a34e29de", "DisplayName": { "LocalizedLabels": [{ "Label": "Owner", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4a4901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Owner", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4a4901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "address2_utcoffset", "SchemaName": "Address2_UTCOffset", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ca119f3b-e098-49c3-9355-891eb5c1785f", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: UTC Offset", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "8353c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: UTC Offset", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "8353c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "stageid", "SchemaName": "StageId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Uniqueidentifier", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "3c69a2f7-b6c5-47ba-9966-b04a4693bcfc", "DisplayName": { "LocalizedLabels": [{ "Label": "(Deprecated) Process Stage", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ac13ae4b-3820-4276-8e8f-28af41ef2158", "HasChanged": null }], "UserLocalizedLabel": { "Label": "(Deprecated) Process Stage", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ac13ae4b-3820-4276-8e8f-28af41ef2158", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "accountnumber", "SchemaName": "AccountNumber", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "7c21feaa-f59c-422d-858d-6d630d23446c", "DisplayName": { "LocalizedLabels": [{ "Label": "Account Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "609af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Account Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "609af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "creditlimit_base", "SchemaName": "CreditLimit_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "0e844ab4-638f-41a6-b17b-ce948b5129f5", "DisplayName": { "LocalizedLabels": [{ "Label": "Credit Limit (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "93efad2e-9ed7-454d-87bb-01afb2a1def6", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Credit Limit (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "93efad2e-9ed7-454d-87bb-01afb2a1def6", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_fax", "SchemaName": "Address2_Fax", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ee64e0d6-7c95-4cd4-bda7-05386f47cf7f", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Fax", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "86d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Fax", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "86d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "revenue_base", "SchemaName": "Revenue_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "74177cf1-9a05-4c38-9e82-396f3199bac2", "DisplayName": { "LocalizedLabels": [{ "Label": "Annual Revenue (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "65ab2173-0c8c-4800-be47-93ecdfb18c01", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Annual Revenue (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "65ab2173-0c8c-4800-be47-93ecdfb18c01", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "merged", "SchemaName": "Merged", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "2e0892db-cc6e-4688-994e-a0a06ba319df", "DisplayName": { "LocalizedLabels": [{ "Label": "Merged", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4d1ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Merged", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4d1ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.EntityNameAttributeMetadata", "LogicalName": "owneridtype", "SchemaName": "OwnerIdType", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "EntityName", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": "ownerid", "MetadataId": "95e946b0-c222-48eb-916f-0e98b446747c", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DoubleAttributeMetadata", "LogicalName": "address2_longitude", "SchemaName": "Address2_Longitude", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Double", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "1420757b-5096-4d35-b490-daf9797d65eb", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Longitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "799af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Longitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "799af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "modifiedbyexternalparty", "SchemaName": "ModifiedByExternalParty", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "f8e8ceaf-a9e3-4108-9942-5d382f564f97", "DisplayName": { "LocalizedLabels": [{ "Label": "Modified By (External Party)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "7a03aad7-6c69-47f8-8c71-0a8d97303e9a", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Modified By (External Party)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "7a03aad7-6c69-47f8-8c71-0a8d97303e9a", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "defaultpricelevelid", "SchemaName": "DefaultPriceLevelId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "dde3fc28-c8f5-41df-b0bd-004ce1cc353a", "DisplayName": { "LocalizedLabels": [{ "Label": "Price List", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e9522aa2-e7c0-4c9f-936b-b9daf8e2cded", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Price List", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e9522aa2-e7c0-4c9f-936b-b9daf8e2cded", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "ftpsiteurl", "SchemaName": "FtpSiteURL", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "22ada637-2f87-4ed4-8766-eade94f3b668", "DisplayName": { "LocalizedLabels": [{ "Label": "FTP Site", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "10d9dee2-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "FTP Site", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "10d9dee2-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "donotpostalmailname", "SchemaName": "DoNotPostalMailName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotpostalmail", "MetadataId": "03f84fdc-836b-4cc5-bfd6-fbb75c81ecaf", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "aging90_base", "SchemaName": "Aging90_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "d2f94d60-6641-49dd-a76d-bfc8a234ac24", "DisplayName": { "LocalizedLabels": [{ "Label": "Aging 90 (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f72d56f7-1182-4fda-9808-43625378abd9", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Aging 90 (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f72d56f7-1182-4fda-9808-43625378abd9", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "donotphone", "SchemaName": "DoNotPhone", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "a4561f83-3630-4f3c-9a36-1cdfff96a97a", "DisplayName": { "LocalizedLabels": [{ "Label": "Do not allow Phone Calls", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "9ae9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Do not allow Phone Calls", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "9ae9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "address1_shippingmethodcodename", "SchemaName": "Address1_ShippingMethodCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "address1_shippingmethodcode", "MetadataId": "be8db669-4365-4721-a050-900f599023cb", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_primarycontactname", "SchemaName": "Address1_PrimaryContactName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "bbaa86d0-ba0f-4c0d-93ed-670e49628e75", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Primary Contact Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "df99f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Primary Contact Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "df99f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "modifiedbyyominame", "SchemaName": "ModifiedByYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "modifiedby", "MetadataId": "8b16e0ff-53e1-4371-86c1-65a25e3ba7c5", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "lastonholdtime", "SchemaName": "LastOnHoldTime", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "d8841e6e-5099-4320-aa8b-682e329702c4", "DisplayName": { "LocalizedLabels": [{ "Label": "Last On Hold Time", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "66634992-89d9-4da8-8e22-c1ec85dd4a72", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Last On Hold Time", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "66634992-89d9-4da8-8e22-c1ec85dd4a72", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_line2", "SchemaName": "Address1_Line2", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "69e4d8a3-cbdf-4e4a-8521-c7d3d6deb53f", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Street 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4341b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Street 2", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "4341b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "modifiedonbehalfbyyominame", "SchemaName": "ModifiedOnBehalfByYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "modifiedonbehalfby", "MetadataId": "04a08ad9-eb9e-4ae2-8b1e-2a65199e143f", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "createdby", "SchemaName": "CreatedBy", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "b863fe8a-6393-42ec-a540-972d3b45bd7b", "DisplayName": { "LocalizedLabels": [{ "Label": "Created By", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c099f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Created By", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "c099f6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "address2_addresstypecode", "SchemaName": "Address2_AddressTypeCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "e0007867-4731-4d30-8efe-dea46640c1bb", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Address Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "26e0eed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Address Type", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "26e0eed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", "LogicalName": "openrevenue_date", "SchemaName": "OpenRevenue_Date", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "DateTime", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "53475a30-98e5-453a-af44-b0c00b88e17d", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Revenue (Last Updated On)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "178d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Revenue (Last Updated On)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "178d9876-f712-ec11-b6e5-0022489c25ba", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_upszone", "SchemaName": "Address2_UPSZone", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "89d2579d-a4ec-4344-a791-13b10a87517f", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: UPS Zone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "504901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: UPS Zone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "504901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "donotfaxname", "SchemaName": "DoNotFaxName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotfax", "MetadataId": "b69dbac9-d722-4314-9a53-99363390c1d9", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "marketcap_base", "SchemaName": "MarketCap_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "92721ea9-a118-44f6-87ed-de5a501fc8a9", "DisplayName": { "LocalizedLabels": [{ "Label": "Market Capitalization (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "eb1613b8-ec25-4557-b62c-b375b3841066", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Market Capitalization (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "eb1613b8-ec25-4557-b62c-b375b3841066", "HasChanged": null } } }, { "LogicalName": "address2_addresstypecodename", "SchemaName": "Address2_AddressTypeCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "address2_addresstypecode", "MetadataId": "56f2a829-2711-4b43-ba20-a378e8ea97e0", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "ownershipcodename", "SchemaName": "OwnershipCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "ownershipcode", "MetadataId": "047756df-f439-4c61-8f90-2a8db1795b05", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_postalcode", "SchemaName": "Address1_PostalCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9f4f6b3f-ecbb-4f82-9efa-4f02ded49686", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: ZIP\/Postal Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1c1ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: ZIP\/Postal Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1c1ed7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "tickersymbol", "SchemaName": "TickerSymbol", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "b0448516-5677-4b9f-945d-36017bbffd97", "DisplayName": { "LocalizedLabels": [{ "Label": "Ticker Symbol", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e0cde1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Ticker Symbol", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "e0cde1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "customersizecode", "SchemaName": "CustomerSizeCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "9c6b1499-24b3-4f63-a8c2-4b263ae49ac9", "DisplayName": { "LocalizedLabels": [{ "Label": "Customer Size", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "83dfeed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Customer Size", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "83dfeed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "utcconversiontimezonecode", "SchemaName": "UTCConversionTimeZoneCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "e914126d-4c9e-41ab-89a2-4f7d758f4016", "DisplayName": { "LocalizedLabels": [{ "Label": "UTC Conversion Time Zone Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fb51f00b-de40-492c-8afb-a9ebb000a814", "HasChanged": null }], "UserLocalizedLabel": { "Label": "UTC Conversion Time Zone Code", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fb51f00b-de40-492c-8afb-a9ebb000a814", "HasChanged": null } } }, { "LogicalName": "donotbulkemailname", "SchemaName": "DoNotBulkEMailName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "donotbulkemail", "MetadataId": "713cf6a1-750b-4cb4-a892-e52a0b206de8", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "defaultpricelevelidname", "SchemaName": "DefaultPriceLevelIdName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "defaultpricelevelid", "MetadataId": "b086279a-a937-41f0-8703-71d87c5a45da", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", "LogicalName": "participatesinworkflow", "SchemaName": "ParticipatesInWorkflow", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Boolean", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "b7a4c83e-1ff9-403b-aabb-bc50d608d4da", "DisplayName": { "LocalizedLabels": [{ "Label": "Participates in Workflow", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "84e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Participates in Workflow", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "84e9af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "stockexchange", "SchemaName": "StockExchange", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "0b24a82f-e3aa-4a51-bc98-da99c732a313", "DisplayName": { "LocalizedLabels": [{ "Label": "Stock Exchange", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fe63cfee-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Stock Exchange", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fe63cfee-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "customersizecodename", "SchemaName": "CustomerSizeCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "customersizecode", "MetadataId": "cd5073c6-1b65-42ad-8c4a-9582ad7119db", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "importsequencenumber", "SchemaName": "ImportSequenceNumber", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "6aef0e41-4d16-48ca-aac3-354233738b5d", "DisplayName": { "LocalizedLabels": [{ "Label": "Import Sequence Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "27b4904e-3a65-4155-b56c-d84faae22513", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Import Sequence Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "27b4904e-3a65-4155-b56c-d84faae22513", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "telephone2", "SchemaName": "Telephone2", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "c370ed23-eb71-4c25-b8ed-9a469f6f99b4", "DisplayName": { "LocalizedLabels": [{ "Label": "Other Phone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0553c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Other Phone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0553c2fa-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "mergedname", "SchemaName": "MergedName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "merged", "MetadataId": "99879032-92ce-4188-b303-c9eca16994c3", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.BigIntAttributeMetadata", "LogicalName": "versionnumber", "SchemaName": "VersionNumber", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "BigInt", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "60362493-831c-4ed6-a82a-e51f3ce1e670", "DisplayName": { "LocalizedLabels": [{ "Label": "Version Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b71f65b8-f9ed-45db-bccd-e1dd85cf5971", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Version Number", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "b71f65b8-f9ed-45db-bccd-e1dd85cf5971", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", "LogicalName": "preferredsystemuserid", "SchemaName": "PreferredSystemUserId", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Lookup", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ea8697f0-8274-4b49-a6a4-dba3f48b3679", "DisplayName": { "LocalizedLabels": [{ "Label": "Preferred User", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "021c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Preferred User", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "021c9b1e-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "accountid", "SchemaName": "AccountId", "IsPrimaryId": true, "IsPrimaryName": false, "AttributeType": "Uniqueidentifier", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "f8cd5db9-cee8-4845-8cdd-cd4f504957e7", "DisplayName": { "LocalizedLabels": [{ "Label": "Account", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5cd8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Account", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "5cd8a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "telephone1", "SchemaName": "Telephone1", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "4f8dae72-5905-4130-987a-6fc85e450466", "DisplayName": { "LocalizedLabels": [{ "Label": "Main Phone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1be0eed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Main Phone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1be0eed0-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", "LogicalName": "aging30_base", "SchemaName": "Aging30_Base", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Money", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "80934a27-2d97-4104-8663-29afa4532cad", "DisplayName": { "LocalizedLabels": [{ "Label": "Aging 30 (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "76fd225d-95fb-4279-99fc-a0827c82c7ed", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Aging 30 (Base)", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "76fd225d-95fb-4279-99fc-a0827c82c7ed", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_name", "SchemaName": "Address1_Name", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "c1f41980-4d65-4150-8a28-38f0f4117f4d", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0c1fd7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "0c1fd7e8-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_fax", "SchemaName": "Address1_Fax", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "4d8847bf-14f9-4a42-91e4-22dca4efa448", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Fax", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "99e8af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Fax", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "99e8af0c-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.DoubleAttributeMetadata", "LogicalName": "address1_latitude", "SchemaName": "Address1_Latitude", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Double", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "a153ec66-4ddd-4a74-bd1e-40119efdd781", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: Latitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fa40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: Latitude", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "fa40b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "address2_shippingmethodcode", "SchemaName": "Address2_ShippingMethodCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "042dbe8b-f24d-450e-8b36-d75421012a3f", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Shipping Method", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "81cee1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Shipping Method", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "81cee1dc-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "primarycontactidyominame", "SchemaName": "PrimaryContactIdYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "primarycontactid", "MetadataId": "70eaa97b-6ab9-40b8-b736-e91fa3ec05ef", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "LogicalName": "accountclassificationcodename", "SchemaName": "AccountClassificationCodeName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Virtual", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "accountclassificationcode", "MetadataId": "33ec532a-887e-4f83-8e89-83d646167dba", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "preferredappointmentdaycode", "SchemaName": "PreferredAppointmentDayCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "5967e7cc-afbb-4c10-bf7e-e7ef430c52be", "DisplayName": { "LocalizedLabels": [{ "Label": "Preferred Day", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1ed6a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Preferred Day", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1ed6a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "modifiedbyname", "SchemaName": "ModifiedByName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "modifiedby", "MetadataId": "dc200f64-cf5e-4a58-a51f-a512dcc993a1", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "createdbyyominame", "SchemaName": "CreatedByYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "createdby", "MetadataId": "0df21d8f-9405-4c96-9cc7-6f15db11ae0a", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", "LogicalName": "address2_freighttermscode", "SchemaName": "Address2_FreightTermsCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Picklist", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "d4bde505-3332-439a-9cff-98074e8dd32e", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Freight Terms", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "61d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Freight Terms", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "61d7a218-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address1_upszone", "SchemaName": "Address1_UPSZone", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "884421e3-3da2-4f94-8e8a-d8a209ce3d69", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 1: UPS Zone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ca4901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 1: UPS Zone", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "ca4901bf-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "LogicalName": "address2_addressid", "SchemaName": "Address2_AddressId", "IsPrimaryId": true, "IsPrimaryName": false, "AttributeType": "Uniqueidentifier", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "4e6b416b-cbce-4524-b194-bf8b3ed46b3e", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f825e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: ID", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "f825e7d6-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "slaname", "SchemaName": "SLAName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "slaid", "MetadataId": "5c0f7ba6-40ca-4cc8-8e17-6beece2dbaf1", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "parentaccountidyominame", "SchemaName": "ParentAccountIdYomiName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": "parentaccountid", "MetadataId": "a2ec861a-ee3f-4a3e-bdac-0e57a1775b4e", "DisplayName": { "LocalizedLabels": [], "UserLocalizedLabel": null } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", "LogicalName": "address2_primarycontactname", "SchemaName": "Address2_PrimaryContactName", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "String", "IsValidForRead": true, "IsValidForCreate": true, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "ab3b6f3b-f839-48df-9598-ae52652e4fd9", "DisplayName": { "LocalizedLabels": [{ "Label": "Address 2: Primary Contact Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1b9af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Address 2: Primary Contact Name", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1b9af6ca-2241-db11-898a-0007e9e17ebd", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", "LogicalName": "opendeals", "SchemaName": "OpenDeals", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "Integer", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": false, "AttributeOf": null, "MetadataId": "e10cdd44-5c7f-4ac8-a5d1-b2118926f2bd", "DisplayName": { "LocalizedLabels": [{ "Label": "Open Deals", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2061c3ec-b437-4789-a0a0-adb0fa72f505", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Open Deals", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "2061c3ec-b437-4789-a0a0-adb0fa72f505", "HasChanged": null } } }, { "@odata.type": "#Microsoft.Dynamics.CRM.StateAttributeMetadata", "LogicalName": "statecode", "SchemaName": "StateCode", "IsPrimaryId": false, "IsPrimaryName": false, "AttributeType": "State", "IsValidForRead": true, "IsValidForCreate": false, "IsValidForUpdate": true, "AttributeOf": null, "MetadataId": "27f3c67a-f274-4034-9f0f-5d708bcd78f7", "DisplayName": { "LocalizedLabels": [{ "Label": "Status", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1a41b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null }], "UserLocalizedLabel": { "Label": "Status", "LanguageCode": 1033, "IsManaged": true, "MetadataId": "1a41b506-2341-db11-898a-0007e9e17ebd", "HasChanged": null } } }]; + + var oneToMany_Account = []; + oneToMany_Account.push({ + SchemaName: "account_Team", + ReferencingEntity: "team", + ReferencedEntity: "account", + ReferencingAttribute: "teamid", + ReferencedAttribute: "accountid", + ReferencingEntityNavigationPropertyName: "team", + ReferencedEntityNavigationPropertyName: "account_Team", + }); + oneToMany_Account.push({ + SchemaName: "Team_account", + ReferencingEntity: "team", + ReferencedEntity: "account", + ReferencingAttribute: "teamid2", + ReferencedAttribute: "accountid", + ReferencingEntityNavigationPropertyName: "Team2", + ReferencedEntityNavigationPropertyName: "Team_account", + }); + + var columns_User = []; + columns_User.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "FirstName", + LogicalName: "firstname", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 50, + DisplayName: { UserLocalizedLabel: { Label: "First Name" } }, + }); + columns_User.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "FullName", + LogicalName: "fullname", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: true, + IsValidForRead: true, + IsValidForCreate: false, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Full Name" } }, + }); + columns_User.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "LastName", + LogicalName: "lastname", + AttributeType: "String", + IsPrimaryId: false, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 50, + DisplayName: { UserLocalizedLabel: { Label: "Last Name" } }, + }); + columns_User.push({ + SchemaName: "SystemUserId", + LogicalName: "systemuserid", + AttributeType: "Uniqueidentifier", + IsPrimaryId: true, + IsPrimaryName: false, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "User" } }, + }); + + var columns_CustomTable = []; + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.DecimalAttributeMetadata", + SchemaName: "sample_Decimal", + LogicalName: "sample_decimal", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Decimal", + MinValue: 700, + MaxValue: 800, + Precision: 2, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Decimal" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", + SchemaName: "sample_Money", + LogicalName: "sample_money", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Money", + MinValue: 0, + MaxValue: 1000, + Precision: 2, + PrecisionSource: 4, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Money" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", + SchemaName: "sample_Choice", + LogicalName: "sample_choice", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Picklist", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Choice" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.BigIntAttributeMetadata", + SchemaName: "VersionNumber", + LogicalName: "versionnumber", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "BigInt", + MinValue: -1000, + MaxValue: 1000, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Version Number" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StatusAttributeMetadata", + SchemaName: "statuscode", + LogicalName: "statuscode", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Status", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Status Reason" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.DateTimeAttributeMetadata", + SchemaName: "sample_DateAndTime", + LogicalName: "sample_dateandtime", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "DateTime", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Date And Time" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StateAttributeMetadata", + SchemaName: "statecode", + LogicalName: "statecode", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "State", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Status" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.IntegerAttributeMetadata", + SchemaName: "sample_WholeNumber", + LogicalName: "sample_wholenumber", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Integer", + MinValue: 20, + MaxValue: 40, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Whole Number" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.MoneyAttributeMetadata", + SchemaName: "sample_Money_Base", + LogicalName: "sample_money_base", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Money", + MinValue: 0, + MaxValue: 1000, + Precision: 2, + PrecisionSource: 4, + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Money (Base)" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "sample_Name", + LogicalName: "sample_name", + IsPrimaryId: false, + IsPrimaryName: true, + AttributeType: "String", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 90, + DisplayName: { UserLocalizedLabel: { Label: "Name" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "sample_Name2", + LogicalName: "sample_name2", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "String", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 91, + DisplayName: { UserLocalizedLabel: { Label: "Name 2" } }, + }); + columns_CustomTable.push({ + SchemaName: "sample_customtableId", + LogicalName: "sample_customtableid", + IsPrimaryId: true, + IsPrimaryName: false, + AttributeType: "Uniqueidentifier", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: false, + DisplayName: { UserLocalizedLabel: { Label: "Custom Table" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", + SchemaName: "sample_PolyId", + LogicalName: "sample_polyid", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Lookup", + Targets: ["contact", "team"], + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Polymorphic Lookup (Contact, Team)" } }, + }); + + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.EntityNameAttributeMetadata", + SchemaName: "sample_PolyIdType", + LogicalName: "sample_polyidtype", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "EntityName", + AttributeOf: "sample_polyid", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + }); + + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", + SchemaName: "OwnerId", + LogicalName: "ownerid", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Owner", + Targets: ["systemuser", "team"], + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Owner" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.MemoAttributeMetadata", + SchemaName: "sample_MultipleLines", + LogicalName: "sample_multiplelines", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Memo", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 500, + DisplayName: { UserLocalizedLabel: { Label: "Multiple Lines" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", + SchemaName: "sample_ContactId", + LogicalName: "sample_contactid", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Lookup", + Targets: ["contact"], + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Lookup (Contact)" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.LookupAttributeMetadata", + SchemaName: "sample_CustomerId", + LogicalName: "sample_customerid", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Customer", + Targets: ["account", "contact"], + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Customer Lookup" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.DoubleAttributeMetadata", + SchemaName: "sample_Float", + LogicalName: "sample_float", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Double", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MinValue: 5, + MaxValue: 10, + Precision: 3, + DisplayName: { UserLocalizedLabel: { Label: "Float" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.ImageAttributeMetadata", + SchemaName: "sample_Image", + LogicalName: "sample_image", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Virtual", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxSizeInKB: 10240, + CanStoreFullImage: true, + DisplayName: { UserLocalizedLabel: { Label: "Image" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.ImageAttributeMetadata", + SchemaName: "sample_Image2", + LogicalName: "sample_image2", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Virtual", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxSizeInKB: 1024, + CanStoreFullImage: false, + DisplayName: { UserLocalizedLabel: { Label: "Image 2" } }, + }); + + var sample_Boolean_Values = { OptionSetType: "Boolean", TrueOption: { Value: true, Label: { UserLocalizedLabel: { Label: "Yes" } } }, FalseOption: { Value: false, Label: { UserLocalizedLabel: { Label: "No" } } } }; + var sample_Boolean = { + "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", + EntityLogicalName: "sample_customtable", + LogicalName: "sample_boolean", + AttributeType: "Boolean", + OptionSet: sample_Boolean_Values, + }; + var columns_values_CustomTable = [sample_Boolean]; + + var sample_Choices_Values = { + OptionSetType: "MultiPicklist", + Options: [ + { Value: 1, Label: { UserLocalizedLabel: { Label: "Option 1" } } }, + { Value: 2, Label: { UserLocalizedLabel: { Label: "Option 2" } } }, + { Value: 3, Label: { UserLocalizedLabel: { Label: "Option 3" } } }, + ], + }; + var sample_Choices = { + "@odata.type": "#Microsoft.Dynamics.CRM.MultiSelectPicklistAttributeMetadata", + EntityLogicalName: "sample_customtable", + LogicalName: "sample_choices", + AttributeType: "MultiPicklist", + OptionSet: sample_Choices_Values, + }; + var columns_values_CustomTable1 = [sample_Choices]; + + var sample_Choice_Values = { + OptionSetType: "Picklist", + Options: [ + { Value: 0, Label: { UserLocalizedLabel: { Label: "A" } } }, + { Value: 727000001, Label: { UserLocalizedLabel: { Label: "B" } } }, + { Value: 727000002, Label: { UserLocalizedLabel: { Label: "C" } } }, + ], + }; + var sample_Choice = { + "@odata.type": "#Microsoft.Dynamics.CRM.PicklistAttributeMetadata", + EntityLogicalName: "sample_customtable", + LogicalName: "sample_choice", + AttributeType: "Picklist", + OptionSet: sample_Choice_Values, + }; + var columns_values_CustomTable2 = [sample_Choice]; + + var sample_State_Values = { + OptionSetType: "State", + Options: [ + { Value: 0, Label: { UserLocalizedLabel: { Label: "Active" } } }, + { Value: 1, Label: { UserLocalizedLabel: { Label: "Inactive" } } }, + ], + }; + var sample_State = { "@odata.type": "#Microsoft.Dynamics.CRM.StateAttributeMetadata", EntityLogicalName: "sample_customtable", LogicalName: "statecode", AttributeType: "State", OptionSet: sample_State_Values }; + var columns_values_CustomTable3 = [sample_State]; + + var sample_Status_Values = { + OptionSetType: "Status", + Options: [ + { Value: 1, Label: { UserLocalizedLabel: { Label: "Active" } } }, + { Value: 2, Label: { UserLocalizedLabel: { Label: "Inactive" } } }, + ], + }; + var sample_Status = { "@odata.type": "#Microsoft.Dynamics.CRM.StatusAttributeMetadata", EntityLogicalName: "sample_customtable", LogicalName: "statuscode", AttributeType: "State", OptionSet: sample_Status_Values }; + var columns_values_CustomTable4 = [sample_Status]; + + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.BooleanAttributeMetadata", + SchemaName: "sample_Boolean", + LogicalName: "sample_boolean", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Boolean", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Two Options" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.MultiSelectPicklistAttributeMetadata", + SchemaName: "sample_Choices", + LogicalName: "sample_choices", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Virtual", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + DisplayName: { UserLocalizedLabel: { Label: "Choices" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.FileAttributeMetadata", + SchemaName: "sample_File", + LogicalName: "sample_file", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Virtual", + IsValidForRead: true, + IsValidForCreate: false, + IsValidForUpdate: false, + MaxSizeInKB: 32768, + DisplayName: { UserLocalizedLabel: { Label: "File" } }, + }); + columns_CustomTable.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "sample_File_Name", + LogicalName: "sample_file_name", + AttributeOf: "sample_file", + AttributeType: "String", + IsValidForCreate: false, + IsValidForRead: true, + IsValidForUpdate: false, + }); + + columns_CustomTable.push({ + SchemaName: "sample_ImageId", + LogicalName: "sample_imageid", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Uniqueidentifier", + IsValidForRead: true, + IsValidForCreate: false, + IsValidForUpdate: false, + }); + columns_CustomTable.push({ + SchemaName: "sample_Image2Id", + LogicalName: "sample_image2id", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "Uniqueidentifier", + IsValidForRead: true, + IsValidForCreate: false, + IsValidForUpdate: false, + }); + + var keys_CustomTable = []; + keys_CustomTable.push({ + SchemaName: "sample_SampleKey1", + LogicalName: "sample_samplekey1", + EntityKeyIndexStatus: "Active", + KeyAttributes: ["sample_name"], + DisplayName: { UserLocalizedLabel: { Label: "Sample Key 1" } }, + }); + keys_CustomTable.push({ + SchemaName: "sample_SampleKey2", + LogicalName: "sample_samplekey2", + EntityKeyIndexStatus: "Active", + KeyAttributes: ["sample_name", "sample_name2"], + DisplayName: { UserLocalizedLabel: { Label: "Sample Key 2" } }, + }); + keys_CustomTable.push({ + SchemaName: "sample_SampleKey3", + LogicalName: "sample_samplekey3", + EntityKeyIndexStatus: "Active", + KeyAttributes: ["sample_name2", "sample_choice", "sample_wholenumber", "sample_contactid", "sample_decimal", "sample_dateandtime"], + DisplayName: { UserLocalizedLabel: { Label: "Sample Key 3" } }, + }); + + var oneToMany_CustomTable = []; + oneToMany_CustomTable.push({ + SchemaName: "sample_sample_customtable_Team", + ReferencingEntity: "team", + ReferencedEntity: "sample_customtable", + ReferencingAttribute: "sample_customtableid", + ReferencedAttribute: "sample_customtableid", + ReferencingEntityNavigationPropertyName: "sample_CustomTableId", + ReferencedEntityNavigationPropertyName: "sample_sample_customtable_Team", + }); + oneToMany_CustomTable.push({ + SchemaName: "sample_sample_customtable_team_CustomTable2", + ReferencingEntity: "team", + ReferencedEntity: "sample_customtable", + ReferencingAttribute: "sample_customtable2", + ReferencedAttribute: "sample_customtableid", + ReferencingEntityNavigationPropertyName: "sample_CustomTable2", + ReferencedEntityNavigationPropertyName: "sample_sample_customtable_team_CustomTable2", + }); + oneToMany_CustomTable.push({ + SchemaName: "sample_sample_customtable_Account", + ReferencingEntity: "account", + ReferencedEntity: "sample_customtable", + ReferencingAttribute: "sample_customtableid", + ReferencedAttribute: "sample_customtableid", + ReferencingEntityNavigationPropertyName: "sample_CustomTableId", + ReferencedEntityNavigationPropertyName: "sample_sample_customtable_Account", + }); + + var manyToOne_CustomTable = []; + manyToOne_CustomTable.push({ + SchemaName: "sample_account_sample_customtable_Customer", + ReferencingEntity: "sample_customtable", + ReferencedEntity: "account", + ReferencingAttribute: "sample_customerid", + ReferencedAttribute: "accountid", + ReferencingEntityNavigationPropertyName: "sample_CustomerId_account", + ReferencedEntityNavigationPropertyName: "sample_account_sample_customtable_Customer", + }); + manyToOne_CustomTable.push({ + SchemaName: "sample_contact_sample_customtable_Customer", + ReferencingEntity: "sample_customtable", + ReferencedEntity: "contact", + ReferencingAttribute: "sample_customerid", + ReferencedAttribute: "contactid", + ReferencingEntityNavigationPropertyName: "sample_CustomerId_contact", + ReferencedEntityNavigationPropertyName: "sample_contact_sample_customtable_Customer", + }); + + var manyToMany_CustomTable = []; + manyToMany_CustomTable.push({ + Entity1LogicalName: "sample_customtable", + Entity2LogicalName: "sample_customtable", + Entity1NavigationPropertyName: "sample_sample_customtable_sample_Customtable1", + Entity2NavigationPropertyName: "sample_sample_customtable_sample_Customtable1", + SchemaName: "sample_sample_customtable_sample_Customtable1", + }); + manyToMany_CustomTable.push({ + Entity1LogicalName: "sample_customtable", + Entity2LogicalName: "contact", + Entity1NavigationPropertyName: "sample_sample_customtable_Contact1", + Entity2NavigationPropertyName: "sample_sample_customtable_Contact1", + SchemaName: "sample_sample_customtable_Contact1", + }); + manyToMany_CustomTable.push({ + Entity1LogicalName: "account", + Entity2LogicalName: "sample_customtable", + Entity1NavigationPropertyName: "sample_account_sample_customTable1", + Entity2NavigationPropertyName: "sample_account_sample_customTable1", + SchemaName: "sample_account_sample_customTable1", + }); + + var columns_CustomTable2 = []; + + columns_CustomTable2.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "new_Name", + LogicalName: "new_name", + IsPrimaryId: false, + IsPrimaryName: true, + AttributeType: "String", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 80, + DisplayName: { UserLocalizedLabel: { Label: "Name (New)" } }, + }); + columns_CustomTable2.push({ + "@odata.type": "#Microsoft.Dynamics.CRM.StringAttributeMetadata", + SchemaName: "new_Name2", + LogicalName: "new_name2", + IsPrimaryId: false, + IsPrimaryName: false, + AttributeType: "String", + IsValidForRead: true, + IsValidForCreate: true, + IsValidForUpdate: true, + MaxLength: 80, + DisplayName: { UserLocalizedLabel: { Label: "New Name 2 (New)" } }, + }); + + var keys_CustomTable2 = []; + keys_CustomTable2.push({ + SchemaName: "new_SampleKey1", + LogicalName: "new_samplekey1", + EntityKeyIndexStatus: "Active", + KeyAttributes: ["new_name"], + DisplayName: { UserLocalizedLabel: { Label: "Sample Key 1 (New)" } }, + }); + keys_CustomTable2.push({ + SchemaName: "new_SampleKey2", + LogicalName: "new_samplekey2", + EntityKeyIndexStatus: "Active", + KeyAttributes: ["new_name", "new_name2"], + DisplayName: { UserLocalizedLabel: { Label: "Sample Key 2 (New)" } }, + }); + + var fakeData = ""; + queries.forEach(function (query) { + if (query.EntitySetName.indexOf("contact") > -1) { + var fakeDataQuery = JSON.parse(JSON.stringify(entity_Contact)); + var fakeColumns = []; + columns_Contact.forEach(function (column) { + fakeColumns.push(column); + }); + fakeDataQuery.Attributes = fakeColumns; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + if (query.EntitySetName.indexOf("team") > -1) { + var fakeDataQuery = JSON.parse(JSON.stringify(entity_Team)); + var fakeColumns = []; + columns_Team.forEach(function (column) { + fakeColumns.push(column); + }); + fakeDataQuery.Attributes = fakeColumns; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + if (query.EntitySetName.indexOf("account") > -1) { + var fakeDataQuery = JSON.parse(JSON.stringify(entity_Account)); + var fakeColumns = []; + columns_Account.forEach(function (column) { + fakeColumns.push(column); + }); + fakeDataQuery.Attributes = fakeColumns; + var fakeOneToMany = []; + oneToMany_Account.forEach(function (relationship) { + fakeOneToMany.push(relationship); + }); + fakeDataQuery.OneToManyRelationships = fakeOneToMany; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + if (query.EntitySetName.indexOf("systemuser") > -1) { + var fakeDataQuery = JSON.parse(JSON.stringify(entity_User)); + var fakeColumns = []; + columns_User.forEach(function (column) { + fakeColumns.push(column); + }); + fakeDataQuery.Attributes = fakeColumns; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + if (query.EntitySetName.indexOf("sample_customtable") > -1) { + if (query.Filters.indexOf("$expand=OptionSet") === -1) { + var fakeDataQuery = JSON.parse(JSON.stringify(entity_CustomTable)); + var fakeColumns = []; + columns_CustomTable.forEach(function (column) { + fakeColumns.push(column); + }); + fakeDataQuery.Attributes = fakeColumns; + var fakeKeys = []; + keys_CustomTable.forEach(function (key) { + fakeKeys.push(key); + }); + fakeDataQuery.Keys = fakeKeys; + var fakeOneToMany = []; + oneToMany_CustomTable.forEach(function (relationship) { + fakeOneToMany.push(relationship); + }); + fakeDataQuery.OneToManyRelationships = fakeOneToMany; + var fakeManyToOne = []; + manyToOne_CustomTable.forEach(function (relationship) { + fakeManyToOne.push(relationship); + }); + fakeDataQuery.ManyToOneRelationships = fakeManyToOne; + var fakeManyToMany = []; + manyToMany_CustomTable.forEach(function (relationship) { + fakeManyToMany.push(relationship); + }); + fakeDataQuery.ManyToManyRelationships = fakeManyToMany; + + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } else { + if (query.EntitySetName.indexOf("BooleanAttributeMetadata") > -1) { + var fakeDataQuery = { value: columns_values_CustomTable }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + if (query.EntitySetName.indexOf("Dynamics.CRM.MultiSelectPicklistAttributeMetadata") > -1) { + var fakeDataQuery = { value: columns_values_CustomTable1 }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + if (query.EntitySetName.indexOf("Dynamics.CRM.PicklistAttributeMetadata") > -1) { + var fakeDataQuery = { value: columns_values_CustomTable2 }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + if (query.EntitySetName.indexOf("Dynamics.CRM.StateAttributeMetadata") > -1) { + var fakeDataQuery = { value: columns_values_CustomTable3 }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + if (query.EntitySetName.indexOf("Dynamics.CRM.StatusAttributeMetadata") > -1) { + var fakeDataQuery = { value: columns_values_CustomTable4 }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + } + } + + if (query.EntitySetName.indexOf("new_customtable") > -1) { + var fakeDataQuery = JSON.parse(JSON.stringify(entity_CustomTable2)); + var fakeColumns = []; + columns_CustomTable2.forEach(function (column) { + fakeColumns.push(column); + }); + fakeDataQuery.Attributes = fakeColumns; + var fakeKeys = []; + keys_CustomTable2.forEach(function (key) { + fakeKeys.push(key); + }); + fakeDataQuery.Keys = fakeKeys; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + + // #region Demo Data for Custom APIs + if (query.EntitySetName.indexOf("customapis") > -1) { + var fakeDataQuery = { + value: [{ bindingtype: 0, boundentitylogicalname: null, name: "FetchXMLToSQL", uniquename: "FetchXMLToSQL", isfunction: true }], + }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + if (query.EntitySetName.indexOf("customapirequestparameters") > -1) { + var fakeDataQuery = { + value: [ + { isoptional: false, name: "FetchXml", type: 10, uniquename: "FetchXml", CustomAPIId: { uniquename: "FetchXMLToSQL" } }, + { isoptional: true, name: "SubqueryCompatible", type: 0, uniquename: "SubqueryCompatible", CustomAPIId: { uniquename: "FetchXMLToSQL" } }, + ], + }; + + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + if (query.EntitySetName.indexOf("customapiresponseproperties") > -1) { + var fakeDataQuery = { + value: [{ name: "Response", type: 10, uniquename: "Response", CustomAPIId: { uniquename: "FetchXMLToSQL" } }], + }; + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + // #endregion + + // #region Demo Data for Custom Actions + if (query.EntitySetName.indexOf("workflows") > -1) { + // TODO + } + if (query.EntitySetName.indexOf("sdkmessagerequestfields") > -1) { + // TODO + } + if (query.EntitySetName.indexOf("sdkmessageresponsefields") > -1) { + // TODO + } + // #endregion + + // #region Demo Data for System Views + if (query.EntitySetName.indexOf("savedqueries") > -1) { + var systemView_Demo = { value: [] }; + if (query.Filters.indexOf("account") > -1) { + systemView_Demo.value.push({ + savedqueryid: "56b534ca-beab-46e6-af0f-07489eaa1585", + name: "Account System View", + returnedtypecode: "account", + isdefault: true, + layoutxml: '', + }); + } + if (query.Filters.indexOf("contact") > -1) { + systemView_Demo.value.push({ + savedqueryid: "509ec83b-b35b-44e5-9b77-084fdd240f2c", + name: "Contact System View", + returnedtypecode: "contact", + isdefault: true, + layoutxml: '', + }); + } + if (query.Filters.indexOf("sample_customtable") > -1) { + systemView_Demo.value.push({ + savedqueryid: "bc336447-e902-4a08-9b98-b8b57ef71dce", + name: "Custom Table System View", + returnedtypecode: "sample_customtable", + isdefault: true, + layoutxml: '', + }); + } + if (query.Filters.indexOf("systemuser") > -1) { + systemView_Demo.value.push({ + savedqueryid: "7a89a602-b556-456d-b28b-ca6eb6bebc44", + name: "User System View", + returnedtypecode: "systemuser", + isdefault: true, + layoutxml: '', + }); + } + if (query.Filters.indexOf("team") > -1) { + systemView_Demo.value.push({ savedqueryid: "0dfa59de-eb8b-4fa3-ae22-b89c4eabaf34", name: "Team System View", returnedtypecode: "team", isdefault: true, layoutxml: '' }); + } + + var fakeDataQuery = JSON.parse(JSON.stringify(systemView_Demo)); + fakeData += fakeHeaderStart + JSON.stringify(fakeDataQuery) + emptyLine; + } + // #endregion + }); + + fakeData += fakeHeaderEnd; + // check if the response is empty, we add the start header + if (fakeData === fakeHeaderEnd) { + fakeData = fakeHeaderStart + emptyLine + fakeHeaderEnd; + } + + return fakeData; +}; + +/** + * Get Demo Data based on parameters + * @param {string} entitySetName Entity Set Name + * @param {string} filters Filter + * @param {boolean} singleRecord If the demo is of a single record + */ +DRB.Xrm.GetDemoData = function (entitySetName, filters, singleRecord) { + var fakeData = { value: [] }; + + switch (entitySetName) { + case "EntityDefinitions": + fakeData.value.push({ ObjectTypeCode: 2, SchemaName: "Contact", LogicalName: "contact", EntitySetName: "contacts", PrimaryIdAttribute: "contactid", PrimaryNameAttribute: "fullname" }); + fakeData.value.push({ ObjectTypeCode: 9, SchemaName: "Team", LogicalName: "team", EntitySetName: "teams", PrimaryIdAttribute: "teamid", PrimaryNameAttribute: "name" }); + fakeData.value.push({ + ObjectTypeCode: 8, + SchemaName: "SystemUser", + LogicalName: "systemuser", + EntitySetName: "systemusers", + PrimaryIdAttribute: "systemuserid", + PrimaryNameAttribute: "fullname", + DisplayName: { UserLocalizedLabel: { Label: "User" } }, + }); + fakeData.value.push({ + ObjectTypeCode: 10001, + SchemaName: "sample_CustomTable", + LogicalName: "sample_customtable", + EntitySetName: "sample_customtables", + PrimaryIdAttribute: "sample_customtableid", + PrimaryNameAttribute: "sample_name", + DisplayName: { UserLocalizedLabel: { Label: "Custom Table" } }, + }); + // fakeData.value.push({ ObjectTypeCode: 10002, SchemaName: "new_CustomTable", LogicalName: "new_customtable", EntitySetName: "new_customtables", PrimaryIdAttribute: "new_customtableid", PrimaryNameAttribute: "new_name", DisplayName: { UserLocalizedLabel: { Label: "Custom Table (New)" } } }); + fakeData.value.push({ ObjectTypeCode: 1, SchemaName: "Account", LogicalName: "account", EntitySetName: "accounts", PrimaryIdAttribute: "accountid", PrimaryNameAttribute: "name" }); + break; + case "systemusers": + fakeData.value.push({ systemuserid: "11111111-1111-1111-1111-111111111111", fullname: "User 1", azureactivedirectoryobjectid: "22222222-2222-2222-2222-222222222222" }); + break; + case "userqueries": + fakeData.value.push({ userqueryid: "9650cd65-fe3e-4d71-b1ef-e2e2e61edcdb", name: "Contact Personal View", returnedtypecode: "contact" }); + fakeData.value.push({ userqueryid: "8470fc1b-220c-4353-a4e8-e9c91ebf8185", name: "Custom Table Personal View", returnedtypecode: "sample_customtable" }); + fakeData.value.push({ userqueryid: "cd8757ee-731f-46f2-ba19-97f7a608cb4a", name: "Account Personal View", returnedtypecode: "account" }); + break; + } + + return fakeData; +}; + +DRB.Xrm.GetDemoMetadata = function () { + return ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`; +}; // #region DRB.Models +// #endregion + +/** + * Models - Dropdown Option + * @param {any} value Value + * @param {string} label Label + * @param {string} subText Sub Text + * @param {string} subText2 Sub Text 2 + */ +DRB.Models.DropdownOption = function (value, label, subText, subText2) { + this.Value = value; + this.Label = label; + this.SubText = subText; + this.SubText2 = subText2; +}; + +/** + * Models - Records + * @param {any} records Records + */ +DRB.Models.Records = function (records) { + this.Records = records; + + this.ToDropdown = function () { + var recordsDropdown = []; + this.Records.forEach(function (record) { + recordsDropdown.push(record.ToDropdownOption()); + }); + return recordsDropdown; + }; +}; + +/** + * Models - Id Value + * @param {any} id Id + * @param {any} value Value + */ +DRB.Models.IdValue = function (id, value) { + this.Id = id; + this.Value = value; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Value); + }; +}; + +/** + * Models - Option Set Value + * @param {any} value Value + * @param {string} label Label + */ +DRB.Models.OptionSetValue = function (value, label) { + this.Value = value; + this.Label = label; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Value, this.Label, this.Value); + }; +}; + +/** + * Models - Relationship + * @param {string} schemaName Schema Name + * @param {string} type Type + * @param {string} sourceTable Source Table + * @param {string} targetTable Target Table + * @param {string} navigationProperty Navigation Property + * @param {string} navigationAttribute Navigation Attribute + */ +DRB.Models.Relationship = function (schemaName, type, sourceTable, targetTable, navigationProperty, navigationAttribute, isHierarchical) { + this.Id = schemaName; + this.Name = schemaName; + this.SchemaName = schemaName; + this.Type = type; + this.SourceTable = sourceTable; + this.TargetTable = targetTable; + this.TargetTableName = ""; + this.NavigationProperty = navigationProperty; + this.NavigationAttribute = navigationAttribute; + this.NavigationAttributeName = ""; + this.IsHierarchical = isHierarchical; + + this.Columns = []; + this.ToDropdownOption = function () { + var subText = "Table: " + this.TargetTableName + " (" + this.TargetTable + ")"; + switch (this.Type) { + case "OneToMany": + subText += " - Target: " + this.NavigationAttributeName + " (" + this.NavigationAttribute + ")"; + break; + case "ManyToOne": + subText += " - Source: " + this.NavigationAttributeName + " (" + this.NavigationAttribute + ")"; + break; + } + return new DRB.Models.DropdownOption(this.Id, this.SchemaName, subText); + }; +}; + +/** + * Models - Simple Relationship + * @param {string} schemaName Schema Name + * @param {string} type Type + * @param {string} sourceTable Source Table + * @param {string} targetTable Target Table + * @param {string} navigationProperty Navigation Property + * @param {string} navigationAttribute Navigation Attribute + * @param {string} navigationAttributeName Navigation Attribute Name + */ +DRB.Models.SimpleRelationship = function (schemaName, type, sourceTable, targetTable, navigationAttribute, navigationAttributeName) { + this.Id = schemaName; + this.Name = schemaName; + this.SchemaName = schemaName; + this.Type = type; + this.SourceTable = sourceTable; + this.TargetTable = targetTable; + this.NavigationAttribute = navigationAttribute; + this.NavigationAttributeName = navigationAttributeName; + + if (!DRB.Utilities.HasValue(this.NavigationAttribute)) { + this.NavigationAttribute = ""; + } + + this.Columns = []; + this.ToDropdownOption = function () { + var subText = ""; + var subText2 = ""; + switch (this.Type) { + case "OneToMany": + subText = "(1:N) One To Many Relationships"; + subText2 = "(1:N) Target: " + this.NavigationAttributeName + " (" + this.NavigationAttribute + ")"; + break; + case "ManyToOne": + subText = "(N:1) Many To One Relationships"; + subText2 = "(N:1) Source: " + this.NavigationAttributeName + " (" + this.NavigationAttribute + ")"; + break; + case "ManyToMany": + subText = "(N:N) Many To Many Relationships"; + subText2 = "(N:N)"; + break; + } + return new DRB.Models.DropdownOption(this.Id, this.SchemaName, subText, subText2); + }; +}; + +/** + * Models - Relationship Column + * @param {string} relationshipSchemaName Relationship Schema Name + * @param {string} relationshipType Relationship Type + * @param {string} relationshipNavigationProperty Relationship Navigation Property + * @param {string} relationshipNavigationAttribute Relationship Navigation Attribute + * @param {string} relationshipNavigationAttributeName Relationship Navigation Attribute Name + * @param {string} targetTableLogicalName Target Table Logical Name + * @param {string} targetTableName Target Table Name + * @param {string} columnLogicalName Column Logical Name + * @param {string} columnName Column Name + * @param {string} columnSchemaName Column Schema Name + * @param {string} columnAttributeType Column Attribute Type + * @param {string} columnIsPrimaryIdAttribute Column Is Primary Id Attribute + * @param {string} columnIsPrimaryNameAttribute Column Is Primary Name Attribute + * @param {string} columnRequiredLevel Column Required Level + * @param {boolean} columnIsValidForRead Column Is Valid For Read + * @param {boolean} columnIsValidForCreate Column Is Valid For Create + * @param {boolean} columnIsValidForUpdate Column Is Valid For Update + */ +DRB.Models.RelationshipColumn = function ( + relationshipSchemaName, + relationshipType, + relationshipNavigationProperty, + relationshipNavigationAttribute, + relationshipNavigationAttributeName, + targetTableLogicalName, + targetTableName, + columnLogicalName, + columnName, + columnSchemaName, + columnAttributeType, + columnIsPrimaryIdAttribute, + columnIsPrimaryNameAttribute, + columnRequiredLevel, + columnIsValidForRead, + columnIsValidForCreate, + columnIsValidForUpdate, + columnAdditionalProperties, +) { + this.Id = relationshipSchemaName + "|" + columnLogicalName; + this.RelationshipSchemaName = relationshipSchemaName; + this.RelationshipType = relationshipType; + this.RelationshipNavigationProperty = relationshipNavigationProperty; + this.RelationshipNavigationAttribute = relationshipNavigationAttribute; + this.RelationshipNavigationAttributeName = relationshipNavigationAttributeName; + this.TargetTableLogicalName = targetTableLogicalName; + this.TargetTableName = targetTableName; + this.ColumnLogicalName = columnLogicalName; + this.Name = columnName; + this.ColumnSchemaName = columnSchemaName; + this.ColumnAttributeType = columnAttributeType; + this.ColumnIsPrimaryIdAttribute = columnIsPrimaryIdAttribute; + this.ColumnIsPrimaryNameAttribute = columnIsPrimaryNameAttribute; + this.ColumnRequiredLevel = columnRequiredLevel; + this.ColumnIsValidForRead = columnIsValidForRead; + this.ColumnIsValidForCreate = columnIsValidForCreate; + this.ColumnIsValidForUpdate = columnIsValidForUpdate; + this.ColumnAdditionalProperties = columnAdditionalProperties; + + this.ToDropdownOption = function () { + var subText = this.ColumnLogicalName + " (" + this.ColumnAttributeType + ")"; + var subText2 = "Relationship: " + this.RelationshipSchemaName + " - Table: " + this.TargetTableName + " (" + this.TargetTableLogicalName + ")"; + switch (this.RelationshipType) { + case "OneToMany": + subText2 += " - Target: " + this.RelationshipNavigationAttributeName + " (" + this.RelationshipNavigationAttribute + ")"; + break; + case "ManyToOne": + subText2 += " - Source: " + this.RelationshipNavigationAttributeName + " (" + this.RelationshipNavigationAttribute + ")"; + break; + } + return new DRB.Models.DropdownOption(this.Id, this.Name, subText2, subText); + }; +}; + +/** + * Models - Column + * @param {string} logicalName Logical Name + * @param {string} name Name + * @param {string} schemaName Schema Name + * @param {string} attributeType Attribute Type + * @param {boolean} isValidForCreate Is Valid For Read + * @param {boolean} isValidForCreate Is Valid For Create + * @param {boolean} isValidForUpdate Is Valid For Update + * @param {any} additionalProperties Additional Properties + */ +DRB.Models.Column = function (logicalName, name, schemaName, attributeType, isPrimaryIdAttribute, isPrimaryNameAttribute, requiredLevel, isValidForRead, isValidForCreate, isValidForUpdate, additionalProperties) { + this.Id = logicalName; + this.LogicalName = logicalName; + this.Name = name; + this.SchemaName = schemaName; + this.AttributeType = attributeType; + this.IsPrimaryIdAttribute = isPrimaryIdAttribute; + this.IsPrimaryNameAttribute = isPrimaryNameAttribute; + this.RequiredLevel = requiredLevel; + this.IsValidForRead = isValidForRead; + this.IsValidForCreate = isValidForCreate; + this.IsValidForUpdate = isValidForUpdate; + this.IsValidForFilter = true; + this.IsValidForOrder = true; + this.AdditionalProperties = additionalProperties; + + // additional properties + this.ODataName = logicalName; + this.AttributeOf = null; + this.OptionValues = null; + + // if column is not valid for read it can't be used for filter or order + if (this.IsValidForRead === false) { + this.IsValidForFilter = false; + this.IsValidForOrder = false; + } + + // check attribute type for setting some specific properties + switch (attributeType) { + case "Lookup": + case "Customer": + case "Owner": + this.ODataName = "_" + logicalName + "_value"; + break; + + case "Image": + case "File": + this.IsValidForFilter = false; + this.IsValidForOrder = false; + break; + + case "ManagedProperty": + this.OptionValues = []; + this.OptionValues.push(new DRB.Models.OptionSetValue(false, "False")); + this.OptionValues.push(new DRB.Models.OptionSetValue(true, "True")); + break; + } + + this.ToDropdownOption = function () { + // subText renaming + var renamedAttributeType = this.AttributeType; + switch (this.AttributeType) { + case "Uniqueidentifier": + renamedAttributeType = "Guid"; + break; + case "Picklist": + renamedAttributeType = "Choice"; + break; + case "MultiPicklist": + renamedAttributeType = "Choices"; + break; + case "DateTime": + renamedAttributeType = "Date Time"; + break; + case "Double": + renamedAttributeType = "Float"; + break; + case "Integer": + renamedAttributeType = "Whole Number"; + break; + case "Memo": + renamedAttributeType = "Multiline Text"; + break; + case "String": + renamedAttributeType = "Text"; + break; + case "Money": + renamedAttributeType = "Currency"; + break; + case "BigInt": + renamedAttributeType = "Big Integer"; + break; + } + + if (this.AttributeType === "Lookup" && this.AdditionalProperties.IsPolymorphic === true) { + renamedAttributeType = "Polymorphic Lookup"; + } + + var subText = this.LogicalName + " (" + renamedAttributeType + ")"; + if (this.RequiredLevel === "Recommended") { + subText += " +"; + } + if (this.RequiredLevel === "ApplicationRequired" || this.RequiredLevel === "SystemRequired") { + subText += " *"; + } + if (this.IsPrimaryNameAttribute === true) { + subText += " (Primary Column)"; + } + if (this.AttributeType === "Image" && this.AdditionalProperties.CanStoreFullImage === true) { + subText += " (Can Store Full Image)"; + } + return new DRB.Models.DropdownOption(this.Id, this.Name, subText); + }; +}; + +/** + * Models - Alternate Key + * @param {string} logicalName Logical Name + * @param {string} name Name + * @param {string} schemaName Schema Name + * @param {string} keyAttributes Key Attributes + * + */ +DRB.Models.AlternateKey = function (logicalName, name, schemaName, keyAttributes) { + this.Id = logicalName; + this.Name = name; + this.LogicalName = logicalName; + this.SchemaName = schemaName; + this.KeyAttributes = keyAttributes; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, this.LogicalName); + }; +}; + +/** + * Models - Table + * @param {string} logicalName Logical Name + * @param {string} name Name + * @param {string} schemaName Schema Name + * @param {string} entitySetName EtitySet Name + * @param {string} primaryIdAttribute Primary Id Attribute + * @param {string} primaryNameAttribute Primary Name Attribute + * @param {number} objectTypeCode Object Type Code + */ +DRB.Models.Table = function (logicalName, name, schemaName, entitySetName, primaryIdAttribute, primaryNameAttribute, objectTypeCode) { + this.Id = logicalName; + this.Name = name; + this.LogicalName = logicalName; + this.SchemaName = schemaName; + this.EntitySetName = entitySetName; + this.PrimaryIdAttribute = primaryIdAttribute; + this.PrimaryNameAttribute = primaryNameAttribute; + this.ObjectTypeCode = objectTypeCode; + + // additional properties + this.Columns = []; + this.OneToManyRelationships = []; + this.ManyToOneRelationships = []; + this.ManyToManyRelationships = []; + this.AlternateKeys = []; + + this.SystemViews = []; + this.PersonalViews = []; + this.HasHierarchy = false; + + this.ColumnsLoaded = false; + this.RelationshipsLoaded = false; + this.AlternateKeysLoaded = false; + this.SystemViewsLoaded = false; + this.PersonalViewsLoaded = false; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, this.LogicalName); + }; +}; + +/** + * Models - User + * @param {string} id Id + * @param {string} name Name + * @param {string} aadObjectId AAD Object Id + */ +DRB.Models.User = function (id, name, aadObjectId) { + this.Id = id; + this.Name = name; + this.AADObjectId = aadObjectId; +}; + +/** + * Models - System View + * @param {string} id Id + * @param {string} name Name + * @param {string} tableLogicalName Table Logical Name + * @param {bool} isDefault Is Default + * @param {string} layoutXml Layout XML + */ +DRB.Models.SystemView = function (id, name, tableLogicalName, isDefault, layoutXml) { + this.Id = id; + this.Name = name; + this.TableLogicalName = tableLogicalName; + this.IsDefault = isDefault; + this.LayoutXml = layoutXml; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, this.TableLogicalName); + }; +}; + +/** + * Models - Personal View + * @param {string} id Id + * @param {string} name Name + * @param {string} tableLogicalName Table Logical Name + * + */ +DRB.Models.PersonalView = function (id, name, tableLogicalName) { + this.Id = id; + this.Name = name; + this.TableLogicalName = tableLogicalName; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, this.TableLogicalName); + }; +}; + +/** + * Models - Dataverse Execute + * @param {string} name Name + * @param {boolean} isBound Is Bound + * @param {string} logicalName Logical Name + * @param {boolean} isCollectionBound Is Collection Bound + * @param {boolean} isCustom Is Custom + * @param {boolean} hasReturnType Has Return Type + * @param {string} returnType Return Type + * @param {boolean} returnOptional Return Optional + * @param {DRB.Models.DataverseParameter[]} parameters Parameters + */ +DRB.Models.DataverseExecute = function (type, id, name, isBound, logicalName, isCollectionBound, isFunction, hasReturnType, returnType, parameters) { + this.Type = type; + this.Id = id; + this.Name = name; + this.IsBound = isBound; + this.LogicalName = logicalName; + this.IsCollectionBound = isCollectionBound; + this.IsFunction = isFunction; + this.HasReturnType = hasReturnType; + this.ReturnType = returnType; + this.Parameters = parameters; + this.Properties = []; + var subText = ""; + if (this.Id !== this.Name) { + subText = this.Id; + } + + if (this.IsCollectionBound === true) { + if (subText !== "") { + subText += " "; + } + subText += "(Collection Bound)"; + } + + if (this.Type === "CustomAPI" && this.IsFunction === true) { + if (subText !== "") { + subText += " "; + } + subText += "(Function)"; + } + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, subText); + }; +}; + +/** + * Models - Dataverse Parameter + * @param {string} name Name + * @param {string} type Type + * @param {boolean} optional Optional + */ +DRB.Models.DataverseParameter = function (name, type, optional, position, binding) { + this.Id = name; + this.Name = name; + this.Type = type; + this.Optional = optional; + this.Position = position; + this.Binding = binding; +}; + +/** + * Models - Dataverse Property + * @param {string} name Name + * @param {string} type Type + */ +DRB.Models.DataverseProperty = function (name, type, position, binding) { + this.Id = name; + this.Name = name; + this.Type = type; + this.Position = position; + this.Binding = binding; +}; + +/** + * Models - Dataverse Complex Type + * @param {string} name Name + * @param {DRB.Models.DataverseProperty[]} properties Properties + */ +DRB.Models.DataverseComplexType = function (name, properties) { + this.Id = name; + this.Name = name; + this.Properties = properties; +}; + +/** + * Models - Dataverse Member + * @param {string} name Name + * @param {string} value Value + */ +DRB.Models.DataverseMember = function (name, value) { + this.Id = value; + this.Name = name; + this.Value = value; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, this.Value); + }; +}; + +/** + * Models - Dataverse Enum Type + * @param {string} name Name + * @param {DRB.Models.DataverseMember[]} members Members + */ +DRB.Models.DataverseEnumType = function (name, isFlags, members) { + this.Id = name; + this.Name = name; + this.IsFlags = isFlags; + this.Members = members; +}; + +/** + * Models - Dataverse Table + * @param {string} logicalName Logical Name + * @param {string} name Name + * @param {string} schemaName Schema Name + * @param {string} entitySetName EtitySet Name + * @param {string} primaryIdAttribute Primary Id Attribute + * @param {string} primaryNameAttribute Primary Name Attribute + * @param {number} objectTypeCode Object Type Code + */ +DRB.Models.DataverseTable = function (logicalName, name, schemaName, entitySetName, primaryIdAttribute, primaryNameAttribute, objectTypeCode) { + this.Id = logicalName; + this.Name = name; + this.LogicalName = logicalName; + this.SchemaName = schemaName; + this.EntitySetName = entitySetName; + this.PrimaryIdAttribute = primaryIdAttribute; + this.PrimaryNameAttribute = primaryNameAttribute; + this.ObjectTypeCode = objectTypeCode; + + // additional properties + this.DataverseExecutes = []; + + this.ToDropdownOption = function () { + return new DRB.Models.DropdownOption(this.Id, this.Name, this.LogicalName); + }; +}; +// #endregion + +// #region DRB.UI +// #region bootstrap-select Functions +/** + * Refresh a dropdown + * @param {string} id Id + */ +DRB.UI.RefreshDropdown = function (id) { + $("#" + id).selectpicker("refresh"); +}; + +/** + * Lock a dropdown + * @param {string} id Id + */ +DRB.UI.LockDropdown = function (id) { + $("#" + id).prop("disabled", "true"); + DRB.UI.RefreshDropdown(id); +}; + +/** + * Unlock a dropdown + * @param {string} id Id + */ +DRB.UI.UnlockDropdown = function (id) { + $("#" + id).prop("disabled", ""); + DRB.UI.RefreshDropdown(id); +}; + +/** + * Unselect a dropdown + * @param {string} id Id + */ +DRB.UI.UnselectDropdown = function (id) { + $("#" + id) + .val(null) + .change(); + DRB.UI.RefreshDropdown(id); +}; + +/** + * Render a dropdown as disabled + * @param {string} id Id + * @param {string} title Title + */ +DRB.UI.ResetDropdown = function (id, title) { + // empty() required for a strange bug on the update of title when no entries are selected in a multiselect optionset + $("#" + id).empty(); + $("#" + id) + .selectpicker("destroy") + .prop("title", title); + DRB.UI.LockDropdown(id); +}; + +/** + * Fill a dropdown as enabled + * @param {string} id Id + * @param {string} title Title + * @param {any} options Options + * @param {boolean} disabledOptions If options are disabled + * @param {boolean} showGroups If groups are shown + * @param {boolean} hideSubText if Sub Text is hidden + */ +DRB.UI.FillDropdown = function (id, title, options, disabledOptions, showGroups, hideSubText, size) { + var htmlOptions = ""; + var subTextProperty = "SubText"; + + var groups = []; + if (showGroups === true) { + subTextProperty = "SubText2"; + options.forEach(function (dropOption) { + if (groups.indexOf(dropOption.SubText) === -1) { + groups.push(dropOption.SubText); + } + }); + groups.sort(); + } else { + groups.push("No Groups"); + } // we need at least an element for the next forEach + + groups.forEach(function (group) { + if (showGroups === true) { + htmlOptions += ''; + } + options.forEach(function (dropOption) { + if (dropOption.SubText == group || showGroups !== true) { + htmlOptions += '"; + } + }); + + $("#" + id).empty(); + if (htmlOptions !== "") { + $("#" + id).html(htmlOptions); + } + if (DRB.Utilities.HasValue(size)) { + $("#" + id).selectpicker({ title: title, size: size }); + } else { + $("#" + id).selectpicker({ title: title, size: 10 }); + } + DRB.UI.UnlockDropdown(id); +}; + +/** + * Fill a Dropdown with Groups defined by the SubText Property + * @param {string} id Id + * @param {string} title Title + * @param {any} options Options + * @param {boolean} disabled If options are disabled + */ +DRB.UI.FillDropdownWithGroups = function (id, title, options, disabled) { + DRB.UI.FillDropdown(id, title, options, disabled, true); +}; +// #endregion + +// #region bootbox.js Functions +/** + * Display Dialog (internal function) + * @param {string} title Title + * @param {string} message Message + * @param {string} className Class Name + * @param {string} size Size + * @param {Function} okCallBack Function to call when OK is pressed + * @param {boolean} askQuestion If show the dialog as a question + */ +DRB.UI.DisplayDialog = function (title, message, className, size, okCallBack, askQuestion, confirmLabel, cancelLabel) { + bootbox.hideAll(); + var properties = { message: message, centerVertical: true, buttons: { ok: { label: "OK", className: className } } }; + if (DRB.Utilities.HasValue(title)) { + properties.title = title; + } + if (DRB.Utilities.HasValue(size)) { + properties.size = size; + } + + if (!DRB.Utilities.HasValue(className)) { + properties.closeButton = false; + properties.buttons = {}; + } + + if (DRB.Utilities.HasValue(okCallBack) && askQuestion !== true) { + properties.closeButton = false; + properties.buttons = { ok: { label: "OK", className: className, callback: okCallBack } }; + } + + if (DRB.Utilities.HasValue(okCallBack) && askQuestion === true) { + properties.closeButton = true; + if (!DRB.Utilities.HasValue(confirmLabel)) { + confirmLabel = "Yes"; + } + if (!DRB.Utilities.HasValue(cancelLabel)) { + cancelLabel = "No"; + } + properties.buttons = { cancel: { label: cancelLabel }, confirm: { label: confirmLabel, className: className } }; + properties.callback = function (result) { + if (result === true) { + okCallBack(); + } + }; + bootbox.confirm(properties); + } else { + bootbox.dialog(properties); + } +}; + +/** + * Show a message + * @param {string} title Title + * @param {string} message Message + * @param {string} size Size + * @param {Function} okCallBack Function to call when OK is pressed + */ +DRB.UI.Show = function (title, message, size, okCallBack) { + DRB.UI.DisplayDialog("" + title + "", message, "btn-primary", size, okCallBack); +}; + +/** + * Show an error message + * @param {string} title Title + * @param {string} message Message + * @param {string} size Size + * @param {Function} okCallBack Function to call when OK is pressed + */ +DRB.UI.ShowError = function (title, message, size, okCallBack) { + DRB.UI.DisplayDialog("" + title + "", message, "btn-danger", size, okCallBack); +}; + +/** + * Show a loading message + * @param {string} message Message + * @param {string} size Size + */ +DRB.UI.ShowLoading = function (message, size) { + var loadingMessage = + '

' + message + '


'; + DRB.UI.DisplayDialog(null, loadingMessage, null, size); +}; + +/** + * Show a loading message + * @param {string} message Message + * @param {string} size Size + */ +DRB.UI.ShowMessage = function (message, size) { + var loadingMessage = '

' + message + "

"; + DRB.UI.DisplayDialog(null, loadingMessage, null, size); +}; + +/** + * Show a question + * @param {string} title Title + * @param {string} message Message + * @param {string} size Size + * @param {Function} comfirmCallBack Function to call when Yes is pressed + */ +DRB.UI.ShowQuestion = function (title, message, size, comfirmCallBack) { + DRB.UI.DisplayDialog("" + title + "", message, "btn-danger", size, comfirmCallBack, true); +}; + +/** + * Show a question + * @param {string} title Title + * @param {string} message Message + * @param {string} size Size + * @param {Function} comfirmCallBack Function to call when Yes is pressed + */ +DRB.UI.ShowExport = function (title, message, size, comfirmCallBack) { + DRB.UI.DisplayDialog("" + title + "", message, "btn-primary", size, comfirmCallBack, true, "Export", "Cancel"); +}; + +/** + * Hide Loading + */ +DRB.UI.HideLoading = function () { + bootbox.hideAll(); +}; +// #endregion + +// #region HTML Helpers +/** + * UI - Create a spacer + */ +DRB.UI.CreateSpacer = function () { + return $("
", { class: "spacer" }); +}; + +/** + * UI - Create External Link + * @param {string} link Link + * @param {string} name Name + * @param {string} className Class Name + */ +DRB.UI.CreateExternalLink = function (link, name, className) { + if (!DRB.Utilities.HasValue(className)) { + className = ""; + } + return $("", { target: "_blank", href: link, text: name, class: className }); +}; + +DRB.UI.CreateSpacing = function () { + return $("
", { html: "












" }); +}; + +/** + * Create an Input File + * @param {string} id Id + * @param {boolean} hidden Hidden + * @param {Function} event Function to call when the button is clicked + */ +DRB.UI.CreateInputFile = function (id, hidden, event) { + var displayStyle = "block"; + if (hidden === true) { + displayStyle = "none"; + } + return $("", { id: id, type: "file", style: "display: " + displayStyle }).on("change", function (e) { + event(e); + }); +}; + +/** + * Create a Checkbox + * @param {string} id Id + * @param {string} text Text + * @param {boolean} checked Checkbox status + */ +DRB.UI.CreateCheckbox = function (id, text, className, checked) { + return $("
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:F,popperConfig:null},Y={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},$=function(){function t(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=c.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),a=c.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(r).addClass("fade");var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=c.getTransitionDurationFromElement(this.tip);e(this.tip).one(c.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=c.getTransitionDurationFromElement(i);e(i).one(c.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=H(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return a(a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:c.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return K[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a(a({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==V.indexOf(t)&&delete n[t]})),"number"==typeof(t=a(a(a({},this.constructor.Default),n),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),c.typeCheckConfig(U,t,this.constructor.DefaultType),t.sanitize&&(t.template=H(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(W);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return X}},{key:"NAME",get:function(){return U}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Y}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return z}}]),t}();e.fn[U]=$._jQueryInterface,e.fn[U].Constructor=$,e.fn[U].noConflict=function(){return e.fn[U]=M,$._jQueryInterface};var J="popover",G=e.fn[J],Z=new RegExp("(^|\\s)bs-popover\\S+","g"),tt=a(a({},$.Default),{},{placement:"right",trigger:"click",content:"",template:''}),et=a(a({},$.DefaultType),{},{content:"(string|element|function)"}),nt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},it=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Z);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return tt}},{key:"NAME",get:function(){return J}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return nt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return et}}]),s}($);e.fn[J]=it._jQueryInterface,e.fn[J].Constructor=it,e.fn[J].noConflict=function(){return e.fn[J]=G,it._jQueryInterface};var ot="scrollspy",st=e.fn[ot],rt={offset:10,method:"auto",target:""},at={offset:"number",method:"string",target:"(string|element)"},lt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=c.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=a(a({},rt),"object"==typeof t&&t?t:{})).target&&c.isElement(t.target)){var n=e(t.target).attr("id");n||(n=c.getUID(ot),e(t.target).attr("id",n)),t.target="#"+n}return c.typeCheckConfig(ot,t,at),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var a=e.Event("hide.bs.tab",{relatedTarget:this._element}),l=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(a),e(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),a=function(){return o._transitionComplete(t,s,i)};if(s&&r){var l=c.getTransitionDurationFromElement(s);e(s).removeClass("show").one(c.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),c.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ht._jQueryInterface.call(e(this),"show")})),e.fn.tab=ht._jQueryInterface,e.fn.tab.Constructor=ht,e.fn.tab.noConflict=function(){return e.fn.tab=ct,ht._jQueryInterface};var ut=e.fn.toast,dt={animation:"boolean",autohide:"boolean",delay:"number"},ft={animation:!0,autohide:!0,delay:500},gt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),c.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=a(a(a({},ft),e(this._element).data()),"object"==typeof t&&t?t:{}),c.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"DefaultType",get:function(){return dt}},{key:"Default",get:function(){return ft}}]),t}();e.fn.toast=gt._jQueryInterface,e.fn.toast.Constructor=gt,e.fn.toast.noConflict=function(){return e.fn.toast=ut,gt._jQueryInterface},t.Alert=d,t.Button=g,t.Carousel=E,t.Collapse=D,t.Dropdown=j,t.Modal=R,t.Popover=it,t.Scrollspy=lt,t.Tab=ht,t.Toast=gt,t.Tooltip=$,t.Util=c,Object.defineProperty(t,"__esModule",{value:!0})})); + +/*! + * Bootstrap-select v1.13.18 (https://developer.snapappointments.com/bootstrap-select) + * + * Copyright 2012-2020 SnapAppointments, LLC + * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) + */ + +!function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){!function(P){"use strict";var d=["sanitize","whiteList","sanitizeFn"],r=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},l=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,a=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function v(e,t){var i=e.nodeName.toLowerCase();if(-1!==P.inArray(i,t))return-1===P.inArray(i,r)||Boolean(e.nodeValue.match(l)||e.nodeValue.match(a));for(var s=P(t).filter(function(e,t){return t instanceof RegExp}),n=0,o=s.length;n]+>/g,"")),s&&(a=w(a)),a=a.toUpperCase(),o="contains"===i?0<=a.indexOf(t):a.startsWith(t)))break}return o}function N(e){return parseInt(e,10)||0}P.fn.triggerNative=function(e){var t,i=this[0];i.dispatchEvent?(u?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),i.dispatchEvent(t)):i.fireEvent?((t=document.createEventObject()).eventType=e,i.fireEvent("on"+e,t)):this.trigger(e)};var f={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},m=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,g=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function b(e){return f[e]}function w(e){return(e=e.toString())&&e.replace(m,b).replace(g,"")}var I,x,y,$,S=(I={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},x="(?:"+Object.keys(I).join("|")+")",y=RegExp(x),$=RegExp(x,"g"),function(e){return e=null==e?"":""+e,y.test(e)?e.replace($,E):e});function E(e){return I[e]}var C={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},A=27,L=13,D=32,H=9,B=38,R=40,M={success:!1,major:"3"};try{M.full=(P.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),M.major=M.full[0],M.success=!0}catch(e){}var U=0,j=".bs.select",V={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},F={MENU:"."+V.MENU},_={div:document.createElement("div"),span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode("\xa0"),fragment:document.createDocumentFragment()};_.noResults=_.li.cloneNode(!1),_.noResults.className="no-results",_.a.setAttribute("role","option"),_.a.className="dropdown-item",_.subtext.className="text-muted",_.text=_.span.cloneNode(!1),_.text.className="text",_.checkMark=_.span.cloneNode(!1);var G=new RegExp(B+"|"+R),q=new RegExp("^"+H+"$|"+A),K={li:function(e,t,i){var s=_.li.cloneNode(!1);return e&&(1===e.nodeType||11===e.nodeType?s.appendChild(e):s.innerHTML=e),void 0!==t&&""!==t&&(s.className=t),null!=i&&s.classList.add("optgroup-"+i),s},a:function(e,t,i){var s=_.a.cloneNode(!0);return e&&(11===e.nodeType?s.appendChild(e):s.insertAdjacentHTML("beforeend",e)),void 0!==t&&""!==t&&s.classList.add.apply(s.classList,t.split(/\s+/)),i&&s.setAttribute("style",i),s},text:function(e,t){var i,s,n=_.text.cloneNode(!1);if(e.content)n.innerHTML=e.content;else{if(n.textContent=e.text,e.icon){var o=_.whitespace.cloneNode(!1);(s=(!0===t?_.i:_.span).cloneNode(!1)).className=this.options.iconBase+" "+e.icon,_.fragment.appendChild(s),_.fragment.appendChild(o)}e.subtext&&((i=_.subtext.cloneNode(!1)).textContent=e.subtext,n.appendChild(i))}if(!0===t)for(;0'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:e},Y.prototype={constructor:Y,init:function(){var i=this,e=this.$element.attr("id"),t=this.$element[0],s=t.form;U++,this.selectId="bs-select-"+U,t.classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),t.classList.contains("show-tick")&&(this.options.showTick=!0),this.$newElement=this.createDropdown(),this.buildData(),this.$element.after(this.$newElement).prependTo(this.$newElement),s&&null===t.form&&(s.id||(s.id="form-"+this.selectId),t.setAttribute("form",s.id)),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(F.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),t.classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(V.MENURIGHT),void 0!==e&&this.$button.attr("data-id",e),this.checkDisabled(),this.clickListener(),this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0],this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide"+j,function(){if(i.isVirtual()){var e=i.$menuInner[0],t=e.firstChild.cloneNode(!1);e.replaceChild(t,e.firstChild),e.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){i.$element.trigger("hide"+j,e)},"hidden.bs.dropdown":function(e){i.$element.trigger("hidden"+j,e)},"show.bs.dropdown":function(e){i.$element.trigger("show"+j,e)},"shown.bs.dropdown":function(e){i.$element.trigger("shown"+j,e)}}),t.hasAttribute("required")&&this.$element.on("invalid"+j,function(){i.$button[0].classList.add("bs-invalid"),i.$element.on("shown"+j+".invalid",function(){i.$element.val(i.$element.val()).off("shown"+j+".invalid")}).on("rendered"+j,function(){this.validity.valid&&i.$button[0].classList.remove("bs-invalid"),i.$element.off("rendered"+j)}),i.$button.on("blur"+j,function(){i.$element.trigger("focus").trigger("blur"),i.$button.off("blur"+j)})}),setTimeout(function(){i.buildList(),i.$element.trigger("loaded"+j)})},createDropdown:function(){var e=this.multiple||this.options.showTick?" show-tick":"",t=this.multiple?' aria-multiselectable="true"':"",i="",s=this.autofocus?" autofocus":"";M.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var n,o="",r="",l="",a="";return this.options.header&&(o='
'+this.options.header+"
"),this.options.liveSearch&&(r=''),this.multiple&&this.options.actionsBox&&(l='
"),this.multiple&&this.options.doneButton&&(a='
"),n='",P(n)},setPositionData:function(){this.selectpicker.view.canHighlight=[],this.selectpicker.view.size=0,this.selectpicker.view.firstHighlightIndex=!1;for(var e=0;e=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(N,e,t){var A,L,D=this,i=0,H=[];if(this.selectpicker.isSearching=N,this.selectpicker.current=N?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),e)if(t)i=this.$menuInner[0].scrollTop;else if(!D.multiple){var s=D.$element[0],n=(s.options[s.selectedIndex]||{}).liIndex;if("number"==typeof n&&!1!==D.options.size){var o=D.selectpicker.main.data[n],r=o&&o.position;r&&(i=r-(D.sizeInfo.menuInnerHeight+D.sizeInfo.liHeight)/2)}}function l(e,t){var i,s,n,o,r,l,a,c,d=D.selectpicker.current.elements.length,h=[],p=!0,u=D.isVirtual();D.selectpicker.view.scrollTop=e,i=Math.ceil(D.sizeInfo.menuInnerHeight/D.sizeInfo.liHeight*1.5),s=Math.round(d/i)||1;for(var f=0;fd-1?0:D.selectpicker.current.data[d-1].position-D.selectpicker.current.data[D.selectpicker.view.position1-1].position,b.firstChild.style.marginTop=v+"px",b.firstChild.style.marginBottom=g+"px"):(b.firstChild.style.marginTop=0,b.firstChild.style.marginBottom=0),b.firstChild.appendChild(w),!0===u&&D.sizeInfo.hasScrollBar){var C=b.firstChild.offsetWidth;if(t&&CD.sizeInfo.selectWidth)b.firstChild.style.minWidth=D.sizeInfo.menuInnerInnerWidth+"px";else if(C>D.sizeInfo.menuInnerInnerWidth){D.$menu[0].style.minWidth=0;var O=b.firstChild.offsetWidth;O>D.sizeInfo.menuInnerInnerWidth&&(D.sizeInfo.menuInnerInnerWidth=O,b.firstChild.style.minWidth=D.sizeInfo.menuInnerInnerWidth+"px"),D.$menu[0].style.minWidth=""}}}if(D.prevActiveIndex=D.activeIndex,D.options.liveSearch){if(N&&t){var z,T=0;D.selectpicker.view.canHighlight[T]||(T=1+D.selectpicker.view.canHighlight.slice(1).indexOf(!0)),z=D.selectpicker.view.visibleElements[T],D.defocusItem(D.selectpicker.view.currentActive),D.activeIndex=(D.selectpicker.current.data[T]||{}).index,D.focusItem(z)}}else D.$menuInner.trigger("focus")}l(i,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(e,t){D.noScroll||l(this.scrollTop,t),D.noScroll=!1}),P(window).off("resize"+j+"."+this.selectId+".createView").on("resize"+j+"."+this.selectId+".createView",function(){D.$newElement.hasClass(V.SHOW)&&l(D.$menuInner[0].scrollTop)})},focusItem:function(e,t,i){if(e){t=t||this.selectpicker.main.data[this.activeIndex];var s=e.firstChild;s&&(s.setAttribute("aria-setsize",this.selectpicker.view.size),s.setAttribute("aria-posinset",t.posinset),!0!==i&&(this.focusedParent.setAttribute("aria-activedescendant",s.id),e.classList.add("active"),s.classList.add("active")))}},defocusItem:function(e){e&&(e.classList.remove("active"),e.firstChild&&e.firstChild.classList.remove("active"))},setPlaceholder:function(){var e=this,t=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),t=!0;var i=this.$element[0],s=!1,n=!this.selectpicker.view.titleOption.parentNode,o=i.selectedIndex,r=i.options[o],l=window.performance&&window.performance.getEntriesByType("navigation"),a=l&&l.length?"back_forward"!==l[0].type:2!==window.performance.navigation.type;n&&(this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="",s=!r||0===o&&!1===r.defaultSelected&&void 0===this.$element.data("selected")),!n&&0===this.selectpicker.view.titleOption.index||i.insertBefore(this.selectpicker.view.titleOption,i.firstChild),s&&a?i.selectedIndex=0:"complete"!==document.readyState&&window.addEventListener("pageshow",function(){e.selectpicker.view.displayedValue!==i.value&&e.render()})}return t},buildData:function(){var p=':not([hidden]):not([data-hidden="true"])',u=[],f=0,m=this.setPlaceholder()?1:0;this.options.hideDisabled&&(p+=":not(:disabled)");var e=this.$element[0].querySelectorAll("select > *"+p);function v(e){var t=u[u.length-1];t&&"divider"===t.type&&(t.optID||e.optID)||((e=e||{}).type="divider",u.push(e))}function g(e,t){if((t=t||{}).divider="true"===e.getAttribute("data-divider"),t.divider)v({optID:t.optID});else{var i=u.length,s=e.style.cssText,n=s?S(s):"",o=(e.className||"")+(t.optgroupClass||"");t.optID&&(o="opt "+o),t.optionClass=o.trim(),t.inlineStyle=n,t.text=e.textContent,t.content=e.getAttribute("data-content"),t.tokens=e.getAttribute("data-tokens"),t.subtext=e.getAttribute("data-subtext"),t.icon=e.getAttribute("data-icon"),e.liIndex=i,t.display=t.content||t.text,t.type="option",t.index=i,t.option=e,t.selected=!!e.selected,t.disabled=t.disabled||!!e.disabled,u.push(t)}}function t(e,t){var i=t[e],s=!(e-1 li")},render:function(){var e,t=this,i=this.$element[0],s=this.setPlaceholder()&&0===i.selectedIndex,n=O(i,this.options.hideDisabled),o=n.length,r=this.$button[0],l=r.querySelector(".filter-option-inner-inner"),a=document.createTextNode(this.options.multipleSeparator),c=_.fragment.cloneNode(!1),d=!1;if(r.classList.toggle("bs-placeholder",t.multiple?!o:!z(i,n)),t.multiple||1!==n.length||(t.selectpicker.view.displayedValue=z(i,n)),"static"===this.options.selectedTextFormat)c=K.text.call(this,{text:this.options.title},!0);else if(!1===(this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&-1")).length&&o>e[1]||1===e.length&&2<=o))){if(!s){for(var h=0;h option"+m+", optgroup"+m+" option"+m).length,g="function"==typeof this.options.countSelectedText?this.options.countSelectedText(o,v):this.options.countSelectedText;c=K.text.call(this,{text:g.replace("{0}",o.toString()).replace("{1}",v.toString())},!0)}if(null==this.options.title&&(this.options.title=this.$element.attr("title")),c.childNodes.length||(c=K.text.call(this,{text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),r.title=c.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&d&&W([c],t.options.whiteList,t.options.sanitizeFn),l.innerHTML="",l.appendChild(c),M.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var b=r.querySelector(".filter-expand"),w=l.cloneNode(!0);w.className="filter-expand",b?r.replaceChild(w,b):r.appendChild(w)}this.$element.trigger("rendered"+j)},setStyle:function(e,t){var i,s=this.$button[0],n=this.$newElement[0],o=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),M.major<4&&(n.classList.add("bs3"),n.parentNode.classList&&n.parentNode.classList.contains("input-group")&&(n.previousElementSibling||n.nextElementSibling)&&(n.previousElementSibling||n.nextElementSibling).classList.contains("input-group-addon")&&n.classList.add("bs3-has-addon")),i=e?e.trim():o,"add"==t?i&&s.classList.add.apply(s.classList,i.split(" ")):"remove"==t?i&&s.classList.remove.apply(s.classList,i.split(" ")):(o&&s.classList.remove.apply(s.classList,o.split(" ")),i&&s.classList.add.apply(s.classList,i.split(" ")))},liHeight:function(e){if(e||!1!==this.options.size&&!Object.keys(this.sizeInfo).length){var t,i=_.div.cloneNode(!1),s=_.div.cloneNode(!1),n=_.div.cloneNode(!1),o=document.createElement("ul"),r=_.li.cloneNode(!1),l=_.li.cloneNode(!1),a=_.a.cloneNode(!1),c=_.span.cloneNode(!1),d=this.options.header&&0this.sizeInfo.menuExtras.vert&&l+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot,!0===this.selectpicker.isSearching&&(a=this.selectpicker.dropup),this.$newElement.toggleClass(V.DROPUP,a),this.selectpicker.dropup=a),"auto"===this.options.size)n=3this.options.size){for(var b=0;bthis.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth),"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(V.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRightthis.options.size&&i.off("resize"+j+"."+this.selectId+".setMenuSize scroll"+j+"."+this.selectId+".setMenuSize")}this.createView(!1,!0,e)},setWidth:function(){var i=this;"auto"===this.options.width?requestAnimationFrame(function(){i.$menu.css("min-width","0"),i.$element.on("loaded"+j,function(){i.liHeight(),i.setMenuSize();var e=i.$newElement.clone().appendTo("body"),t=e.css("width","auto").children("button").outerWidth();e.remove(),i.sizeInfo.selectWidth=Math.max(i.sizeInfo.totalMenuWidth,t),i.$newElement.css("width",i.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=P('
');function e(e){var t={},i=r.options.display||!!P.fn.dropdown.Constructor.Default&&P.fn.dropdown.Constructor.Default.display;r.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(V.DROPUP,e.hasClass(V.DROPUP)),s=e.offset(),l.is("body")?n={top:0,left:0}:((n=l.offset()).top+=parseInt(l.css("borderTopWidth"))-l.scrollTop(),n.left+=parseInt(l.css("borderLeftWidth"))-l.scrollLeft()),o=e.hasClass(V.DROPUP)?0:e[0].offsetHeight,(M.major<4||"static"===i)&&(t.top=s.top-n.top+o,t.left=s.left-n.left),t.width=e[0].offsetWidth,r.$bsContainer.css(t)}var s,n,o,r=this,l=P(this.options.container);this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(e(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(V.SHOW,!r.$button.hasClass(V.SHOW)).append(r.$menu))}),P(window).off("resize"+j+"."+this.selectId+" scroll"+j+"."+this.selectId).on("resize"+j+"."+this.selectId+" scroll"+j+"."+this.selectId,function(){r.$newElement.hasClass(V.SHOW)&&e(r.$newElement)}),this.$element.on("hide"+j,function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setOptionStatus:function(e){var t=this;if(t.noScroll=!1,t.selectpicker.view.visibleElements&&t.selectpicker.view.visibleElements.length)for(var i=0;i
');y[2]&&($=$.replace("{var}",y[2][1"+$+"
")),d=!1,C.$element.trigger("maxReached"+j)),g&&w&&(E.append(P("
"+S+"
")),d=!1,C.$element.trigger("maxReachedGrp"+j)),setTimeout(function(){C.setSelected(r,!1)},10),E[0].classList.add("fadeOut"),setTimeout(function(){E.remove()},1050)}}}else c&&(c.selected=!1),h.selected=!0,C.setSelected(r,!0);!C.multiple||C.multiple&&1===C.options.maxOptions?C.$button.trigger("focus"):C.options.liveSearch&&C.$searchbox.trigger("focus"),d&&(!C.multiple&&a===s.selectedIndex||(T=[h.index,p.prop("selected"),l],C.$element.triggerNative("change")))}}),this.$menu.on("click","li."+V.DISABLED+" a, ."+V.POPOVERHEADER+", ."+V.POPOVERHEADER+" :not(.close)",function(e){e.currentTarget==this&&(e.preventDefault(),e.stopPropagation(),C.options.liveSearch&&!P(e.target).hasClass("close")?C.$searchbox.trigger("focus"):C.$button.trigger("focus"))}),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),C.options.liveSearch?C.$searchbox.trigger("focus"):C.$button.trigger("focus")}),this.$menu.on("click","."+V.POPOVERHEADER+" .close",function(){C.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(e){C.options.liveSearch?C.$searchbox.trigger("focus"):C.$button.trigger("focus"),e.preventDefault(),e.stopPropagation(),P(this).hasClass("bs-select-all")?C.selectAll():C.deselectAll()}),this.$button.on("focus"+j,function(e){var t=C.$element[0].getAttribute("tabindex");void 0!==t&&e.originalEvent&&e.originalEvent.isTrusted&&(this.setAttribute("tabindex",t),C.$element[0].setAttribute("tabindex",-1),C.selectpicker.view.tabindex=t)}).on("blur"+j,function(e){void 0!==C.selectpicker.view.tabindex&&e.originalEvent&&e.originalEvent.isTrusted&&(C.$element[0].setAttribute("tabindex",C.selectpicker.view.tabindex),this.setAttribute("tabindex",-1),C.selectpicker.view.tabindex=void 0)}),this.$element.on("change"+j,function(){C.render(),C.$element.trigger("changed"+j,T),T=null}).on("focus"+j,function(){C.options.mobile||C.$button[0].focus()})},liveSearchListener:function(){var u=this;this.$button.on("click.bs.dropdown.data-api",function(){u.$searchbox.val()&&(u.$searchbox.val(""),u.selectpicker.search.previousValue=void 0)}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var e=u.$searchbox[0].value;if(u.selectpicker.search.elements=[],u.selectpicker.search.data=[],e){var t=[],i=e.toUpperCase(),s={},n=[],o=u._searchStyle(),r=u.options.liveSearchNormalize;r&&(i=w(i));for(var l=0;l=a.selectpicker.view.canHighlight.length&&(t=a.selectpicker.view.firstHighlightIndex),a.selectpicker.view.canHighlight[t+f]||(t=t+1+a.selectpicker.view.canHighlight.slice(t+f+1).indexOf(!0))),e.preventDefault();var m=f+t;e.which===B?0===f&&t===c.length-1?(a.$menuInner[0].scrollTop=a.$menuInner[0].scrollHeight,m=a.selectpicker.current.elements.length-1):d=(o=(n=a.selectpicker.current.data[m]).position-n.height)u+a.sizeInfo.menuInnerHeight),s=a.selectpicker.main.elements[v],a.activeIndex=b[x],a.focusItem(s),s&&s.firstChild.focus(),d&&(a.$menuInner[0].scrollTop=o),r.trigger("focus")}}i&&(e.which===D&&!a.selectpicker.keydown.keyHistory||e.which===L||e.which===H&&a.options.selectOnTab)&&(e.which!==D&&e.preventDefault(),a.options.liveSearch&&e.which===D||(a.$menuInner.find(".active a").trigger("click",!0),r.trigger("focus"),a.options.liveSearch||(e.preventDefault(),P(document).data("spaceSelect",!0))))}},mobile:function(){this.options.mobile=!0,this.$element[0].classList.add("mobile-device")},refresh:function(){var e=P.extend({},this.options,this.$element.data());this.options=e,this.checkDisabled(),this.buildData(),this.setStyle(),this.render(),this.buildList(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed"+j)},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.selectpicker.view.titleOption&&this.selectpicker.view.titleOption.parentNode&&this.selectpicker.view.titleOption.parentNode.removeChild(this.selectpicker.view.titleOption),this.$element.off(j).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),P(window).off(j+"."+this.selectId)}};var J=P.fn.selectpicker;function Q(){if(P.fn.dropdown)return(P.fn.dropdown.Constructor._dataApiKeydownHandler||P.fn.dropdown.Constructor.prototype.keydown).apply(this,arguments)}P.fn.selectpicker=Z,P.fn.selectpicker.Constructor=Y,P.fn.selectpicker.noConflict=function(){return P.fn.selectpicker=J,this},P(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.dropdown.data-api",':not(.bootstrap-select) > [data-toggle="dropdown"]',Q).on("keydown.bs.dropdown.data-api",":not(.bootstrap-select) > .dropdown-menu",Q).on("keydown"+j,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',Y.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stopPropagation()}),P(window).on("load"+j+".data-api",function(){P(".selectpicker").each(function(){var e=P(this);Z.call(e,e.data())})})}(e)}); + +/** + * bootbox.js 5.4.0 + * + * http://bootboxjs.com/license.txt + */ +!function(t,e){'use strict';'function'==typeof define&&define.amd?define(['jquery'],e):'object'==typeof exports?module.exports=e(require('jquery')):t.bootbox=e(t.jQuery)}(this,function e(p,u){'use strict';var r,n,i,l;Object.keys||(Object.keys=(r=Object.prototype.hasOwnProperty,n=!{toString:null}.propertyIsEnumerable('toString'),l=(i=['toString','toLocaleString','valueOf','hasOwnProperty','isPrototypeOf','propertyIsEnumerable','constructor']).length,function(t){if('function'!=typeof t&&('object'!=typeof t||null===t))throw new TypeError('Object.keys called on non-object');var e,o,a=[];for(e in t)r.call(t,e)&&a.push(e);if(n)for(o=0;o
",header:"
",footer:'',closeButton:'',form:'
',button:'',option:'',promptMessage:'
',inputs:{text:'',textarea:'',email:'',select:'',checkbox:'
',radio:'
',date:'',time:'',number:'',password:'',range:''}},m={locale:'en',backdrop:'static',animate:!0,className:null,closeButton:!0,show:!0,container:'body',value:'',inputType:'text',swapButtonOrder:!1,centerVertical:!1,multiple:!1,scrollable:!1};function c(t,e,o){return p.extend(!0,{},t,function(t,e){var o=t.length,a={};if(o<1||2').attr('label',e.group)),o=i[e.group]);var a=p(f.option);a.attr('value',e.value).text(e.text),o.append(a)}),v(i,function(t,e){n.append(e)}),n.val(r.value);break;case'checkbox':var l=p.isArray(r.value)?r.value:[r.value];if(!(a=r.inputOptions||[]).length)throw new Error('prompt with "inputType" set to "checkbox" requires at least one option');n=p('
'),v(a,function(t,o){if(o.value===u||o.text===u)throw new Error('each option needs a "value" property and a "text" property');var a=p(f.inputs[r.inputType]);a.find('input').attr('value',o.value),a.find('label').append('\n'+o.text),v(l,function(t,e){e===o.value&&a.find('input').prop('checked',!0)}),n.append(a)});break;case'radio':if(r.value!==u&&p.isArray(r.value))throw new Error('prompt with "inputType" set to "radio" requires a single, non-array value for "value"');if(!(a=r.inputOptions||[]).length)throw new Error('prompt with "inputType" set to "radio" requires at least one option');n=p('
');var s=!0;v(a,function(t,e){if(e.value===u||e.text===u)throw new Error('each option needs a "value" property and a "text" property');var o=p(f.inputs[r.inputType]);o.find('input').attr('value',e.value),o.find('label').append('\n'+e.text),r.value!==u&&e.value===r.value&&(o.find('input').prop('checked',!0),s=!1),n.append(o)}),s&&n.find('input[type="radio"]').first().prop('checked',!0)}if(t.append(n),t.on('submit',function(t){t.preventDefault(),t.stopPropagation(),e.find('.bootbox-accept').trigger('click')}),''!==p.trim(r.message)){var c=p(f.promptMessage).html(r.message);t.prepend(c),r.message=t}else r.message=t;return(e=d.dialog(r)).off('shown.bs.modal',g),e.on('shown.bs.modal',function(){n.focus()}),!0===o&&e.modal('show'),e},d}); + +/*! Split.js - v1.6.4 */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Split=t()}(this,(function(){"use strict";var e="undefined"!=typeof window?window:null,t=null===e,n=t?void 0:e.document,i=function(){return!1},r=t?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=n.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",s=function(e){return"string"==typeof e||e instanceof String},o=function(e){if(s(e)){var t=n.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},a=function(e,t,n){var i=e[t];return void 0!==i?i:n},u=function(e,t,n,i){if(t){if("end"===i)return 0;if("center"===i)return e/2}else if(n){if("start"===i)return 0;if("center"===i)return e/2}return e},l=function(e,t){var i=n.createElement("div");return i.className="gutter gutter-"+t,i},c=function(e,t,n){var i={};return s(t)?i[e]=t:i[e]=r+"("+t+"% - "+n+"px)",i},h=function(e,t){var n;return(n={})[e]=t+"px",n};return function(r,s){if(void 0===s&&(s={}),t)return{};var d,f,v,m,g,p,y=r;Array.from&&(y=Array.from(y));var z=o(y[0]).parentNode,S=getComputedStyle?getComputedStyle(z):null,b=S?S.flexDirection:null,E=a(s,"sizes")||y.map((function(){return 100/y.length})),_=a(s,"minSize",100),L=Array.isArray(_)?_:y.map((function(){return _})),w=a(s,"maxSize",1/0),x=Array.isArray(w)?w:y.map((function(){return w})),k=a(s,"expandToMin",!1),C=a(s,"gutterSize",10),M=a(s,"gutterAlign","center"),U=a(s,"snapOffset",30),A=a(s,"dragInterval",1),O=a(s,"direction","horizontal"),D=a(s,"cursor","horizontal"===O?"col-resize":"row-resize"),B=a(s,"gutter",l),T=a(s,"elementStyle",c),j=a(s,"gutterStyle",h);function F(e,t,n,i){var r=T(d,t,n,i);Object.keys(r).forEach((function(t){e.style[t]=r[t]}))}function R(){return p.map((function(e){return e.size}))}function N(e){return"touches"in e?e.touches[0][f]:e[f]}function q(e){var t=p[this.a],n=p[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,F(t.element,t.size,this._b,t.i),F(n.element,n.size,this._c,n.i)}function H(e){var t,n=p[this.a],r=p[this.b];this.dragging&&(t=N(e)-this.start+(this._b-this.dragOffset),A>1&&(t=Math.round(t/A)*A),t<=n.minSize+U+this._b?t=n.minSize+this._b:t>=this.size-(r.minSize+U+this._c)&&(t=this.size-(r.minSize+this._c)),t>=n.maxSize-U+this._b?t=n.maxSize+this._b:t<=this.size-(r.maxSize-U+this._c)&&(t=this.size-(r.maxSize+this._c)),q.call(this,t),a(s,"onDrag",i)(R()))}function I(){var e=p[this.a].element,t=p[this.b].element,n=e.getBoundingClientRect(),i=t.getBoundingClientRect();this.size=n[d]+i[d]+this._b+this._c,this.start=n[v],this.end=n[m]}function W(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[g];return 0===n?null:n-="horizontal"===O?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(z);if(null===t)return e;if(L.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,i=[],r=e.map((function(r,s){var o=t*r/100,a=u(C,0===s,s===e.length-1,M),l=L[s]+a;return o0&&i[r]-n>0){var o=Math.min(n,i[r]-n);n-=o,s=e-o}return s/t*100}))}function X(){var t=p[this.a].element,r=p[this.b].element;this.dragging&&a(s,"onDragEnd",i)(R()),this.dragging=!1,e.removeEventListener("mouseup",this.stop),e.removeEventListener("touchend",this.stop),e.removeEventListener("touchcancel",this.stop),e.removeEventListener("mousemove",this.move),e.removeEventListener("touchmove",this.move),this.stop=null,this.move=null,t.removeEventListener("selectstart",i),t.removeEventListener("dragstart",i),r.removeEventListener("selectstart",i),r.removeEventListener("dragstart",i),t.style.userSelect="",t.style.webkitUserSelect="",t.style.MozUserSelect="",t.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",this.gutter.style.cursor="",this.parent.style.cursor="",n.body.style.cursor=""}function Y(t){if(!("button"in t)||0===t.button){var r=p[this.a].element,o=p[this.b].element;this.dragging||a(s,"onDragStart",i)(R()),t.preventDefault(),this.dragging=!0,this.move=H.bind(this),this.stop=X.bind(this),e.addEventListener("mouseup",this.stop),e.addEventListener("touchend",this.stop),e.addEventListener("touchcancel",this.stop),e.addEventListener("mousemove",this.move),e.addEventListener("touchmove",this.move),r.addEventListener("selectstart",i),r.addEventListener("dragstart",i),o.addEventListener("selectstart",i),o.addEventListener("dragstart",i),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",this.gutter.style.cursor=D,this.parent.style.cursor=D,n.body.style.cursor=D,I.call(this),this.dragOffset=N(t)-this.end}}"horizontal"===O?(d="width",f="clientX",v="left",m="right",g="clientWidth"):"vertical"===O&&(d="height",f="clientY",v="top",m="bottom",g="clientHeight"),E=W(E);var G=[];function J(e){var t=e.i===G.length,n=t?G[e.i-1]:G[e.i];I.call(n);var i=t?n.size-e.minSize-n._c:e.minSize+n._b;q.call(n,i)}return(p=y.map((function(e,t){var n,i={element:o(e),size:E[t],minSize:L[t],maxSize:x[t],i:t};if(t>0&&((n={a:t-1,b:t,dragging:!1,direction:O,parent:z})._b=u(C,t-1==0,!1,M),n._c=u(C,!1,t===y.length-1,M),"row-reverse"===b||"column-reverse"===b)){var r=n.a;n.a=n.b,n.b=r}if(t>0){var s=B(t,O,i.element);!function(e,t,n){var i=j(d,t,n);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}(s,C,t),n._a=Y.bind(n),s.addEventListener("mousedown",n._a),s.addEventListener("touchstart",n._a),z.insertBefore(s,i.element),n.gutter=s}return F(i.element,i.size,u(C,0===t,t===y.length-1,M),t),t>0&&G.push(n),i}))).forEach((function(e){var t=e.element.getBoundingClientRect()[d];t0){var i=G[n-1],r=p[i.a],s=p[i.b];r.size=t[n-1],s.size=e,F(r.element,r.size,i._b,r.i),F(s.element,s.size,i._c,s.i)}}))},getSizes:R,collapse:function(e){J(p[e])},destroy:function(e,t){G.forEach((function(n){if(!0!==t?n.parent.removeChild(n.gutter):(n.gutter.removeEventListener("mousedown",n._a),n.gutter.removeEventListener("touchstart",n._a)),!0!==e){var i=T(d,n.a.size,n._b);Object.keys(i).forEach((function(e){p[n.a].element.style[e]="",p[n.b].element.style[e]=""}))}}))},parent:z,pairs:G}}})); + +/*! jsTree - v3.3.12 - 2021-09-03 - (MIT) */ +!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a,b){"use strict";if(!a.jstree){var c=0,d=!1,e=!1,f=!1,g=[],h=a("script:last").attr("src"),i=window.document,j=window.setImmediate,k=window.Promise;!j&&k&&(j=function(a,b){k.resolve(b).then(a)}),a.jstree={version:"3.3.12",defaults:{plugins:[]},plugins:{},path:h&&-1!==h.indexOf("/")?h.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},a.jstree.create=function(b,d){var e=new a.jstree.core(++c),f=d;return d=a.extend(!0,{},a.jstree.defaults,d),f&&f.plugins&&(d.plugins=f.plugins),a.each(d.plugins,function(a,b){"core"!==a&&(e=e.plugin(b,d[b]))}),a(b).data("jstree",e),e.init(b,d),e},a.jstree.destroy=function(){a(".jstree:jstree").jstree("destroy"),a(i).off(".jstree")},a.jstree.core=function(a){this._id=a,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},a.jstree.reference=function(b){var c=null,d=null;if(!b||!b.id||b.tagName&&b.nodeType||(b=b.id),!d||!d.length)try{d=a(b)}catch(e){}if(!d||!d.length)try{d=a("#"+b.replace(a.jstree.idregex,"\\$&"))}catch(e){}return d&&d.length&&(d=d.closest(".jstree")).length&&(d=d.data("jstree"))?c=d:a(".jstree").each(function(){var d=a(this).data("jstree");return d&&d._model.data[b]?(c=d,!1):void 0}),c},a.fn.jstree=function(c){var d="string"==typeof c,e=Array.prototype.slice.call(arguments,1),f=null;return c!==!0||this.length?(this.each(function(){var g=a.jstree.reference(this),h=d&&g?g[c]:null;return f=d&&h?h.apply(g,e):null,g||d||c!==b&&!a.isPlainObject(c)||a.jstree.create(this,c),(g&&!d||c===!0)&&(f=g||!1),null!==f&&f!==b?!1:void 0}),null!==f&&f!==b?f:this):!1},a.expr.pseudos.jstree=a.expr.createPseudo(function(c){return function(c){return a(c).hasClass("jstree")&&a(c).data("jstree")!==b}}),a.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:a.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(b){b.type="click",a(b.currentTarget).trigger(b)},enter:function(b){b.type="click",a(b.currentTarget).trigger(b)},left:function(b){if(b.preventDefault(),this.is_open(b.currentTarget))this.close_node(b.currentTarget);else{var c=this.get_parent(b.currentTarget);c&&c.id!==a.jstree.root&&this.get_node(c,!0).children(".jstree-anchor").trigger("focus")}},up:function(a){a.preventDefault();var b=this.get_prev_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").trigger("focus")},right:function(b){if(b.preventDefault(),this.is_closed(b.currentTarget))this.open_node(b.currentTarget,function(a){this.get_node(a,!0).children(".jstree-anchor").trigger("focus")});else if(this.is_open(b.currentTarget)){var c=this.get_node(b.currentTarget,!0).children(".jstree-children")[0];c&&a(this._firstChild(c)).children(".jstree-anchor").trigger("focus")}},down:function(a){a.preventDefault();var b=this.get_next_dom(a.currentTarget);b&&b.length&&b.children(".jstree-anchor").trigger("focus")},"*":function(a){this.open_all()},home:function(b){b.preventDefault();var c=this._firstChild(this.get_container_ul()[0]);c&&a(c).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(a){a.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(a){a.preventDefault(),this.edit(a.currentTarget)}}},a.jstree.core.prototype={plugin:function(b,c){var d=a.jstree.plugins[b];return d?(this._data[b]={},d.prototype=this,new d(c,this)):this},init:function(b,c){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=a(b).addClass("jstree jstree-"+this._id),this.settings=c,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("
"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(a.jstree.root)},destroy:function(a){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(b){}a||this.element.empty(),this.teardown()},_create_prototype_node:function(){var a=i.createElement("LI"),b,c;return a.setAttribute("role","none"),b=i.createElement("I"),b.className="jstree-icon jstree-ocl",b.setAttribute("role","presentation"),a.appendChild(b),b=i.createElement("A"),b.className="jstree-anchor",b.setAttribute("href","#"),b.setAttribute("tabindex","-1"),b.setAttribute("role","treeitem"),c=i.createElement("I"),c.className="jstree-icon jstree-themeicon",c.setAttribute("role","presentation"),b.appendChild(c),a.appendChild(b),b=c=null,a},_kbevent_to_func:function(a){var b={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},c=[];if(a.ctrlKey&&c.push("ctrl"),a.altKey&&c.push("alt"),a.shiftKey&&c.push("shift"),c.push(b[a.which]||a.which),c=c.sort().join("-").toLowerCase(),"shift-shift"===c||"ctrl-ctrl"===c||"alt-alt"===c)return null;var d=this.settings.core.keyboard,e,f;for(e in d)if(d.hasOwnProperty(e)&&(f=e,"-"!==f&&"+"!==f&&(f=f.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),f=f.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),f===c))return d[e];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var b="",c=null,d=0;this.element.on("dblclick.jstree",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;if(i.selection&&i.selection.empty)i.selection.empty();else if(window.getSelection){var b=window.getSelection();try{b.removeAllRanges(),b.collapse()}catch(c){}}}).on("mousedown.jstree",function(a){a.target===this.element[0]&&(a.preventDefault(),d=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(a){a.preventDefault()}).on("click.jstree",".jstree-ocl",function(a){this.toggle_node(a.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(a){return a.target.tagName&&"input"===a.target.tagName.toLowerCase()?!0:void(this.settings.core.dblclick_toggle&&this.toggle_node(a.target))}.bind(this)).on("click.jstree",".jstree-anchor",function(b){b.preventDefault(),b.currentTarget!==i.activeElement&&a(b.currentTarget).trigger("focus"),this.activate_node(b.currentTarget,b)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(a){if(a.target.tagName&&"input"===a.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===a.which?a.which=39:39===a.which&&(a.which=37));var b=this._kbevent_to_func(a);if(b){var c=b.call(this,a);if(c===!1||c===!0)return c}}.bind(this)).on("load_node.jstree",function(b,c){c.status&&(c.node.id!==a.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var b=[],c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)b=b.concat(this._model.data[this._data.core.selected[c]].parents);for(b=a.vakata.array_unique(b),c=0,d=b.length;d>c;c++)this.open_node(b[c],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}.bind(this),0))}.bind(this)).on("keypress.jstree",function(d){if(d.target.tagName&&"input"===d.target.tagName.toLowerCase())return!0;c&&clearTimeout(c),c=setTimeout(function(){b=""},500);var e=String.fromCharCode(d.which).toLowerCase(),f=this.element.find(".jstree-anchor").filter(":visible"),g=f.index(i.activeElement)||0,h=!1;if(b+=e,b.length>1){if(f.slice(g).each(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return;if(f.slice(0,g).each(function(c,d){return 0===a(d).text().toLowerCase().indexOf(b)?(a(d).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return}if(new RegExp("^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(b)){if(f.slice(g+1).each(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return;if(f.slice(0,g+1).each(function(b,c){return a(c).text().toLowerCase().charAt(0)===e?(a(c).trigger("focus"),h=!0,!1):void 0}.bind(this)),h)return}}.bind(this)).on("init.jstree",function(){var a=this.settings.core.themes;this._data.core.themes.dots=a.dots,this._data.core.themes.stripes=a.stripes,this._data.core.themes.icons=a.icons,this._data.core.themes.ellipsis=a.ellipsis,this.set_theme(a.name||"default",a.url),this.set_theme_variant(a.variant)}.bind(this)).on("loading.jstree",function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}.bind(this)).on("blur.jstree",".jstree-anchor",function(b){this._data.core.focused=null,a(b.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")}.bind(this)).on("focus.jstree",".jstree-anchor",function(b){var c=this.get_node(b.currentTarget);c&&c.id&&(this._data.core.focused=c.id),this.element.find(".jstree-hovered").not(b.currentTarget).trigger("mouseleave"),a(b.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")}.bind(this)).on("focus.jstree",function(){if(+new Date-d>500&&!this._data.core.focused&&this.settings.core.restore_focus){d=0;var a=this.get_node(this.element.attr("aria-activedescendant"),!0);a&&a.find("> .jstree-anchor").trigger("focus")}}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(a){this.hover_node(a.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(a){this.dehover_node(a.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),a(i).off(".jstree-"+this._id)},trigger:function(a,b){b||(b={}),b.instance=this,this.element.triggerHandler(a.replace(".jstree","")+".jstree",b)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(b){var c=this.settings.core.strings;return a.vakata.is_function(c)?c.call(this,b):c&&c[b]?c[b]:b},_firstChild:function(a){a=a?a.firstChild:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_nextSibling:function(a){a=a?a.nextSibling:null;while(null!==a&&1!==a.nodeType)a=a.nextSibling;return a},_previousSibling:function(a){a=a?a.previousSibling:null;while(null!==a&&1!==a.nodeType)a=a.previousSibling;return a},get_node:function(b,c){b&&b.id&&(b=b.id),b instanceof a&&b.length&&b[0].id&&(b=b[0].id);var d;try{if(this._model.data[b])b=this._model.data[b];else if("string"==typeof b&&this._model.data[b.replace(/^#/,"")])b=this._model.data[b.replace(/^#/,"")];else if("string"==typeof b&&(d=a("#"+b.replace(a.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else if((d=this.element.find(b)).length&&this._model.data[d.closest(".jstree-node").attr("id")])b=this._model.data[d.closest(".jstree-node").attr("id")];else{if(!(d=this.element.find(b)).length||!d.hasClass("jstree"))return!1;b=this._model.data[a.jstree.root]}return c&&(b=b.id===a.jstree.root?this.element:a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)),b}catch(e){return!1}},get_path:function(b,c,d){if(b=b.parents?b:this.get_node(b),!b||b.id===a.jstree.root||!b.parents)return!1;var e,f,g=[];for(g.push(d?b.id:b.text),e=0,f=b.parents.length;f>e;e++)g.push(d?b.parents[e]:this.get_text(b.parents[e]));return g=g.reverse().slice(1),c?g.join(c):g},get_next_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this._firstChild(this.get_container_ul()[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}if(b.hasClass("jstree-open")){d=this._firstChild(b.children(".jstree-children")[0]);while(d&&0===d.offsetHeight)d=this._nextSibling(d);if(null!==d)return a(d)}d=b[0];do d=this._nextSibling(d);while(d&&0===d.offsetHeight);return null!==d?a(d):b.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(b,c){var d;if(b=this.get_node(b,!0),b[0]===this.element[0]){d=this.get_container_ul()[0].lastChild;while(d&&0===d.offsetHeight)d=this._previousSibling(d);return d?a(d):!1}if(!b||!b.length)return!1;if(c){d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);return d?a(d):!1}d=b[0];do d=this._previousSibling(d);while(d&&0===d.offsetHeight);if(null!==d){b=a(d);while(b.hasClass("jstree-open"))b=b.children(".jstree-children").first().children(".jstree-node:visible:last");return b}return d=b[0].parentNode.parentNode,d&&d.className&&-1!==d.className.indexOf("jstree-node")?a(d):!1},get_parent:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.parent:!1},get_children_dom:function(a){return a=this.get_node(a,!0),a[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):a&&a.length?a.children(".jstree-children").children(".jstree-node"):!1},is_parent:function(a){return a=this.get_node(a),a&&(a.state.loaded===!1||a.children.length>0)},is_loaded:function(a){return a=this.get_node(a),a&&a.state.loaded},is_loading:function(a){return a=this.get_node(a),a&&a.state&&a.state.loading},is_open:function(a){return a=this.get_node(a),a&&a.state.opened},is_closed:function(a){return a=this.get_node(a),a&&this.is_parent(a)&&!a.state.opened},is_leaf:function(a){return!this.is_parent(a)},load_node:function(b,c){var d,e,f,g,h;if(a.vakata.is_array(b))return this._load_nodes(b.slice(),c),!0;if(b=this.get_node(b),!b)return c&&c.call(this,b,!1),!1;if(b.state.loaded){for(b.state.loaded=!1,f=0,g=b.parents.length;g>f;f++)this._model.data[b.parents[f]].children_d=a.vakata.array_filter(this._model.data[b.parents[f]].children_d,function(c){return-1===a.inArray(c,b.children_d)});for(d=0,e=b.children_d.length;e>d;d++)this._model.data[b.children_d[d]].state.selected&&(h=!0),delete this._model.data[b.children_d[d]];h&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(c){return-1===a.inArray(c,b.children_d)})),b.children=[],b.children_d=[],h&&this.trigger("changed",{action:"load_node",node:b,selected:this._data.core.selected})}return b.state.failed=!1,b.state.loading=!0,this.get_node(b,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(b,function(a){b=this._model.data[b.id],b.state.loading=!1,b.state.loaded=a,b.state.failed=!b.state.loaded;var d=this.get_node(b,!0),e=0,f=0,g=this._model.data,h=!1;for(e=0,f=b.children.length;f>e;e++)if(g[b.children[e]]&&!g[b.children[e]].state.hidden){h=!0;break}b.state.loaded&&d&&d.length&&(d.removeClass("jstree-closed jstree-open jstree-leaf"),h?"#"!==b.id&&d.addClass(b.state.opened?"jstree-open":"jstree-closed"):d.addClass("jstree-leaf")),d.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:b,status:a}),c&&c.call(this,b,a)}.bind(this)),!0},_load_nodes:function(a,b,c,d){var e=!0,f=function(){this._load_nodes(a,b,!0)},g=this._model.data,h,i,j=[];for(h=0,i=a.length;i>h;h++)g[a[h]]&&(!g[a[h]].state.loaded&&!g[a[h]].state.failed||!c&&d)&&(this.is_loading(a[h])||this.load_node(a[h],f),e=!1);if(e){for(h=0,i=a.length;i>h;h++)g[a[h]]&&g[a[h]].state.loaded&&j.push(a[h]);b&&!b.done&&(b.call(this,j),b.done=!0)}},load_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=[],e=this._model.data,f=e[b.id].children_d,g,h;for(b.state&&!b.state.loaded&&d.push(b.id),g=0,h=f.length;h>g;g++)e[f[g]]&&e[f[g]].state&&!e[f[g]].state.loaded&&d.push(f[g]);d.length?this._load_nodes(d,function(){this.load_all(b,c)}):(c&&c.call(this,b),this.trigger("load_all",{node:b}))},_load_node:function(b,c){var d=this.settings.core.data,e,f=function g(){return 3!==this.nodeType&&8!==this.nodeType};return d?a.vakata.is_function(d)?d.call(this,b,function(d){d===!1?c.call(this,!1):this["string"==typeof d?"_append_html_data":"_append_json_data"](b,"string"==typeof d?a(a.parseHTML(d)).filter(f):d,function(a){c.call(this,a)})}.bind(this)):"object"==typeof d?d.url?(d=a.extend(!0,{},d),a.vakata.is_function(d.url)&&(d.url=d.url.call(this,b)),a.vakata.is_function(d.data)&&(d.data=d.data.call(this,b)),a.ajax(d).done(function(d,e,g){var h=g.getResponseHeader("Content-Type");return h&&-1!==h.indexOf("json")||"object"==typeof d?this._append_json_data(b,d,function(a){c.call(this,a)}):h&&-1!==h.indexOf("html")||"string"==typeof d?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:g})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))}.bind(this)).fail(function(a){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:b.id,xhr:a})},c.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}.bind(this))):(e=a.vakata.is_array(d)?a.extend(!0,[],d):a.isPlainObject(d)?a.extend(!0,{},d):d,b.id===a.jstree.root?this._append_json_data(b,e,function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1))):"string"==typeof d?b.id===a.jstree.root?this._append_html_data(b,a(a.parseHTML(d)).filter(f),function(a){c.call(this,a)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:b.id})},this.settings.core.error.call(this,this._data.core.last_error),c.call(this,!1)):c.call(this,!1):b.id===a.jstree.root?this._append_html_data(b,this._data.core.original_container_html.clone(!0),function(a){c.call(this,a)}):c.call(this,!1)},_node_changed:function(b){b=this.get_node(b),b&&-1===a.inArray(b.id,this._model.changed)&&this._model.changed.push(b.id)},_append_html_data:function(b,c,d){b=this.get_node(b),b.children=[],b.children_d=[];var e=c.is("ul")?c.children():c,f=b.id,g=[],h=[],i=this._model.data,j=i[f],k=this._data.core.selected.length,l,m,n;for(e.each(function(b,c){l=this._parse_model_from_html(a(c),f,j.parents.concat()),l&&(g.push(l),h.push(l),i[l].children_d.length&&(h=h.concat(i[l].children_d)))}.bind(this)),j.children=g,j.children_d=h,m=0,n=j.parents.length;n>m;m++)i[j.parents[m]].children_d=i[j.parents[m]].children_d.concat(h);this.trigger("model",{nodes:h,parent:f}),f!==a.jstree.root?(this._node_changed(f),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==k&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),d.call(this,!0)},_append_json_data:function(b,c,d,e){if(null!==this.element){b=this.get_node(b),b.children=[],b.children_d=[],c.d&&(c=c.d,"string"==typeof c&&(c=JSON.parse(c))),a.vakata.is_array(c)||(c=[c]);var f=null,g={df:this._model.default_state,dat:c,par:b.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},h=this,i=function(a,b){a.data&&(a=a.data);var c=a.dat,d=a.par,e=[],f=[],g=[],i=a.df,j=a.t_id,k=a.t_cnt,l=a.m,m=l[d],n=a.sel,o,p,q,r,s=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f,h,j,k,m={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in i)i.hasOwnProperty(f)&&(m.state[f]=i[f]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(m.icon=a.data.jstree.icon),(m.icon===b||null===m.icon||""===m.icon)&&(m.icon=!0),a&&a.data&&(m.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(m.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(m.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(m.li_attr[f]=a.li_attr[f]);if(m.li_attr.id||(m.li_attr.id=e),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(m.a_attr[f]=a.a_attr[f]);for(a&&a.children&&a.children===!0&&(m.state.loaded=!1,m.children=[],m.children_d=[]),l[m.id]=m,f=0,h=m.children.length;h>f;f++)j=s(l[m.children[f]],m.id,d),k=l[j],m.children_d.push(j),k.children_d.length&&(m.children_d=m.children_d.concat(k.children_d));return delete a.data,delete a.children,l[m.id].original=a,m.state.selected&&g.push(m.id),m.id},t=function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,h,m,n,o;do e="j"+j+"_"+ ++k;while(l[e]);o={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in i)i.hasOwnProperty(f)&&(o.state[f]=i[f]);if(a&&a.id&&(o.id=a.id.toString()),a&&a.text&&(o.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(o.icon=a.data.jstree.icon),(o.icon===b||null===o.icon||""===o.icon)&&(o.icon=!0),a&&a.data&&(o.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(o.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(o.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(o.li_attr[f]=a.li_attr[f]);if(o.li_attr.id&&!o.id&&(o.id=o.li_attr.id.toString()),o.id||(o.id=e),o.li_attr.id||(o.li_attr.id=o.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(o.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,h=a.children.length;h>f;f++)m=t(a.children[f],o.id,d),n=l[m],o.children.push(m),n.children_d.length&&(o.children_d=o.children_d.concat(n.children_d));o.children_d=o.children_d.concat(o.children)}return a&&a.children&&a.children===!0&&(o.state.loaded=!1,o.children=[],o.children_d=[]),delete a.data,delete a.children,o.original=a,l[o.id]=o,o.state.selected&&g.push(o.id),o.id};if(c.length&&c[0].id!==b&&c[0].parent!==b){for(p=0,q=c.length;q>p;p++)c[p].children||(c[p].children=[]),c[p].state||(c[p].state={}),l[c[p].id.toString()]=c[p];for(p=0,q=c.length;q>p;p++)l[c[p].parent.toString()]?(l[c[p].parent.toString()].children.push(c[p].id.toString()),m.children_d.push(c[p].id.toString())):"undefined"!=typeof h&&(h._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:c[p].id.toString(),parent:c[p].parent.toString()})},h.settings.core.error.call(h,h._data.core.last_error));for(p=0,q=m.children.length;q>p;p++)o=s(l[m.children[p]],d,m.parents.concat()),f.push(o),l[o].children_d.length&&(f=f.concat(l[o].children_d));for(p=0,q=m.parents.length;q>p;p++)l[m.parents[p]].children_d=l[m.parents[p]].children_d.concat(f);r={cnt:k,mod:l,sel:n,par:d,dpc:f,add:g}}else{for(p=0,q=c.length;q>p;p++)o=t(c[p],d,m.parents.concat()),o&&(e.push(o),f.push(o),l[o].children_d.length&&(f=f.concat(l[o].children_d)));for(m.children=e,m.children_d=f,p=0,q=m.parents.length;q>p;p++)l[m.parents[p]].children_d=l[m.parents[p]].children_d.concat(f);r={cnt:k,mod:l,sel:n,par:d,dpc:f,add:g}}return"undefined"!=typeof window&&"undefined"!=typeof window.document?r:void postMessage(r)},k=function(b,c){if(null!==this.element){this._cnt=b.cnt;var e,f=this._model.data;for(e in f)f.hasOwnProperty(e)&&f[e].state&&f[e].state.loading&&b.mod[e]&&(b.mod[e].state.loading=!0);if(this._model.data=b.mod,c){var g,i=b.add,k=b.sel,l=this._data.core.selected.slice();if(f=this._model.data,k.length!==l.length||a.vakata.array_unique(k.concat(l)).length!==k.length){for(e=0,g=k.length;g>e;e++)-1===a.inArray(k[e],i)&&-1===a.inArray(k[e],l)&&(f[k[e]].state.selected=!1);for(e=0,g=l.length;g>e;e++)-1===a.inArray(l[e],k)&&(f[l[e]].state.selected=!0)}}b.add.length&&(this._data.core.selected=this._data.core.selected.concat(b.add)),this.trigger("model",{nodes:b.dpc,parent:b.par}),b.par!==a.jstree.root?(this._node_changed(b.par),this.redraw()):this.redraw(!0),b.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!c&&j?j(function(){d.call(h,!0)}):d.call(h,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+i.toString()],{type:"text/javascript"}))),!this._data.core.working||e?(this._data.core.working=!0,f=new window.Worker(this._wrk),f.onmessage=function(a){k.call(this,a.data,!0);try{f.terminate(),f=null}catch(b){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),g.par?f.postMessage(g):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([b,c,d,!0])}catch(l){k.call(this,i(g),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else k.call(this,i(g),!1)}},_parse_model_from_html:function(c,d,e){e=e?[].concat(e):[],d&&e.unshift(d);var f,g,h=this._model.data,i={id:!1,text:!1,icon:!0,parent:d,parents:e,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},j,k,l;for(j in this._model.default_state)this._model.default_state.hasOwnProperty(j)&&(i.state[j]=this._model.default_state[j]);if(k=a.vakata.attributes(c,!0),a.each(k,function(b,c){return c=a.vakata.trim(c),c.length?(i.li_attr[b]=c,void("id"===b&&(i.id=c.toString()))):!0}),k=c.children("a").first(),k.length&&(k=a.vakata.attributes(k,!0),a.each(k,function(b,c){c=a.vakata.trim(c),c.length&&(i.a_attr[b]=c)})),k=c.children("a").first().length?c.children("a").first().clone():c.clone(),k.children("ins, i, ul").remove(),k=k.html(),k=a("
").html(k),i.text=this.settings.core.force_text?k.text():k.html(),k=c.data(),i.data=k?a.extend(!0,{},k):null,i.state.opened=c.hasClass("jstree-open"),i.state.selected=c.children("a").hasClass("jstree-clicked"),i.state.disabled=c.children("a").hasClass("jstree-disabled"),i.data&&i.data.jstree)for(j in i.data.jstree)i.data.jstree.hasOwnProperty(j)&&(i.state[j]=i.data.jstree[j]);k=c.children("a").children(".jstree-themeicon"),k.length&&(i.icon=k.hasClass("jstree-themeicon-hidden")?!1:k.attr("rel")),i.state.icon!==b&&(i.icon=i.state.icon),(i.icon===b||null===i.icon||""===i.icon)&&(i.icon=!0),k=c.children("ul").children("li");do l="j"+this._id+"_"+ ++this._cnt;while(h[l]);return i.id=i.li_attr.id?i.li_attr.id.toString():l,k.length?(k.each(function(b,c){f=this._parse_model_from_html(a(c),i.id,e),g=this._model.data[f],i.children.push(f),g.children_d.length&&(i.children_d=i.children_d.concat(g.children_d))}.bind(this)),i.children_d=i.children_d.concat(i.children)):c.hasClass("jstree-closed")&&(i.state.loaded=!1),i.li_attr["class"]&&(i.li_attr["class"]=i.li_attr["class"].replace("jstree-closed","").replace("jstree-open","")),i.a_attr["class"]&&(i.a_attr["class"]=i.a_attr["class"].replace("jstree-clicked","").replace("jstree-disabled","")),h[i.id]=i,i.state.selected&&this._data.core.selected.push(i.id),i.id},_parse_model_from_flat_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=a.id.toString(),f=this._model.data,g=this._model.default_state,h,i,j,k,l={id:e,text:a.text||"",icon:a.icon!==b?a.icon:!0,parent:c,parents:d,children:a.children||[],children_d:a.children_d||[],data:a.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(h in g)g.hasOwnProperty(h)&&(l.state[h]=g[h]);if(a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0),a&&a.data&&(l.data=a.data,a.data.jstree))for(h in a.data.jstree)a.data.jstree.hasOwnProperty(h)&&(l.state[h]=a.data.jstree[h]);if(a&&"object"==typeof a.state)for(h in a.state)a.state.hasOwnProperty(h)&&(l.state[h]=a.state[h]);if(a&&"object"==typeof a.li_attr)for(h in a.li_attr)a.li_attr.hasOwnProperty(h)&&(l.li_attr[h]=a.li_attr[h]);if(l.li_attr.id||(l.li_attr.id=e),a&&"object"==typeof a.a_attr)for(h in a.a_attr)a.a_attr.hasOwnProperty(h)&&(l.a_attr[h]=a.a_attr[h]);for(a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),f[l.id]=l,h=0,i=l.children.length;i>h;h++)j=this._parse_model_from_flat_json(f[l.children[h]],l.id,d),k=f[j],l.children_d.push(j),k.children_d.length&&(l.children_d=l.children_d.concat(k.children_d));return delete a.data,delete a.children,f[l.id].original=a,l.state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_json:function(a,c,d){d=d?d.concat():[],c&&d.unshift(c);var e=!1,f,g,h,i,j=this._model.data,k=this._model.default_state,l;do e="j"+this._id+"_"+ ++this._cnt;while(j[e]);l={id:!1,text:"string"==typeof a?a:"",icon:"object"==typeof a&&a.icon!==b?a.icon:!0,parent:c,parents:d,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(f in k)k.hasOwnProperty(f)&&(l.state[f]=k[f]);if(a&&a.id&&(l.id=a.id.toString()),a&&a.text&&(l.text=a.text),a&&a.data&&a.data.jstree&&a.data.jstree.icon&&(l.icon=a.data.jstree.icon),(l.icon===b||null===l.icon||""===l.icon)&&(l.icon=!0), +a&&a.data&&(l.data=a.data,a.data.jstree))for(f in a.data.jstree)a.data.jstree.hasOwnProperty(f)&&(l.state[f]=a.data.jstree[f]);if(a&&"object"==typeof a.state)for(f in a.state)a.state.hasOwnProperty(f)&&(l.state[f]=a.state[f]);if(a&&"object"==typeof a.li_attr)for(f in a.li_attr)a.li_attr.hasOwnProperty(f)&&(l.li_attr[f]=a.li_attr[f]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=e),l.li_attr.id||(l.li_attr.id=l.id),a&&"object"==typeof a.a_attr)for(f in a.a_attr)a.a_attr.hasOwnProperty(f)&&(l.a_attr[f]=a.a_attr[f]);if(a&&a.children&&a.children.length){for(f=0,g=a.children.length;g>f;f++)h=this._parse_model_from_json(a.children[f],l.id,d),i=j[h],l.children.push(h),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d));l.children_d=l.children.concat(l.children_d)}return a&&a.children&&a.children===!0&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete a.data,delete a.children,l.original=a,j[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var b=this._model.force_full_redraw?this._model.data[a.jstree.root].children.concat([]):this._model.changed.concat([]),c=i.createElement("UL"),d,e,f,g=this._data.core.focused;for(e=0,f=b.length;f>e;e++)d=this.redraw_node(b[e],!0,this._model.force_full_redraw),d&&this._model.force_full_redraw&&c.appendChild(d);this._model.force_full_redraw&&(c.className=this.get_container_ul()[0].className,c.setAttribute("role","group"),this.element.empty().append(c)),null!==g&&this.settings.core.restore_focus&&(d=this.get_node(g,!0),d&&d.length&&d.children(".jstree-anchor")[0]!==i.activeElement?d.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:b})},redraw:function(a){a&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(b){var c=this.get_node(b),d=!1,e=!1,f=!1,g=i;if(!c)return!1;if(c.id===a.jstree.root)return this.redraw(!0);if(b=this.get_node(b,!0),!b||!b.length)return!1;if(b.children(".jstree-children").remove(),b=b[0],c.children.length&&c.state.loaded){for(f=g.createElement("UL"),f.setAttribute("role","group"),f.className="jstree-children",d=0,e=c.children.length;e>d;d++)f.appendChild(this.redraw_node(c.children[d],!0,!0));b.appendChild(f)}},redraw_node:function(b,c,d,e){var f=this.get_node(b),g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n="",o=i,p=this._model.data,q=!1,r=!1,s=null,t=0,u=0,v=!1,w=!1;if(!f)return!1;if(f.id===a.jstree.root)return this.redraw(!0);if(c=c||0===f.children.length,b=i.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(f.id[0])?"\\3"+f.id[0]+" "+f.id.substr(1).replace(a.jstree.idregex,"\\$&"):f.id.replace(a.jstree.idregex,"\\$&"))):i.getElementById(f.id))b=a(b),d||(g=b.parent().parent()[0],g===this.element[0]&&(g=null),h=b.index()),c||!f.children.length||b.children(".jstree-children").length||(c=!0),c||(j=b.children(".jstree-children")[0]),q=b.children(".jstree-anchor")[0]===i.activeElement,b.remove();else if(c=!0,!d){if(g=f.parent!==a.jstree.root?a("#"+f.parent.replace(a.jstree.idregex,"\\$&"),this.element)[0]:null,!(null===g||g&&p[f.parent].state.opened))return!1;h=a.inArray(f.id,null===g?p[a.jstree.root].children:p[f.parent].children)}b=this._data.core.node.cloneNode(!0),n="jstree-node ";for(k in f.li_attr)if(f.li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"!==k?b.setAttribute(k,f.li_attr[k]):n+=f.li_attr[k]}for(f.a_attr.id||(f.a_attr.id=f.id+"_anchor"),b.childNodes[1].setAttribute("aria-selected",!!f.state.selected),b.childNodes[1].setAttribute("aria-level",f.parents.length),this.settings.core.compute_elements_positions&&(b.childNodes[1].setAttribute("aria-setsize",p[f.parent].children.length),b.childNodes[1].setAttribute("aria-posinset",p[f.parent].children.indexOf(f.id)+1)),f.state.disabled&&b.childNodes[1].setAttribute("aria-disabled",!0),k=0,l=f.children.length;l>k;k++)if(!p[f.children[k]].state.hidden){v=!0;break}if(null!==f.parent&&p[f.parent]&&!f.state.hidden&&(k=a.inArray(f.id,p[f.parent].children),w=f.id,-1!==k))for(k++,l=p[f.parent].children.length;l>k;k++)if(p[p[f.parent].children[k]].state.hidden||(w=p[f.parent].children[k]),w!==f.id)break;f.state.hidden&&(n+=" jstree-hidden"),f.state.loading&&(n+=" jstree-loading"),f.state.loaded&&!v?n+=" jstree-leaf":(n+=f.state.opened&&f.state.loaded?" jstree-open":" jstree-closed",b.childNodes[1].setAttribute("aria-expanded",f.state.opened&&f.state.loaded)),w===f.id&&(n+=" jstree-last"),b.id=f.id,b.className=n,n=(f.state.selected?" jstree-clicked":"")+(f.state.disabled?" jstree-disabled":"");for(l in f.a_attr)if(f.a_attr.hasOwnProperty(l)){if("href"===l&&"#"===f.a_attr[l])continue;"class"!==l?b.childNodes[1].setAttribute(l,f.a_attr[l]):n+=" "+f.a_attr[l]}if(n.length&&(b.childNodes[1].className="jstree-anchor "+n),(f.icon&&f.icon!==!0||f.icon===!1)&&(f.icon===!1?b.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===f.icon.indexOf("/")&&-1===f.icon.indexOf(".")?b.childNodes[1].childNodes[0].className+=" "+f.icon+" jstree-themeicon-custom":(b.childNodes[1].childNodes[0].style.backgroundImage='url("'+f.icon+'")',b.childNodes[1].childNodes[0].style.backgroundPosition="center center",b.childNodes[1].childNodes[0].style.backgroundSize="auto",b.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?b.childNodes[1].appendChild(o.createTextNode(f.text)):b.childNodes[1].innerHTML+=f.text,c&&f.children.length&&(f.state.opened||e)&&f.state.loaded){for(m=o.createElement("UL"),m.setAttribute("role","group"),m.className="jstree-children",k=0,l=f.children.length;l>k;k++)m.appendChild(this.redraw_node(f.children[k],c,!0));b.appendChild(m)}if(j&&b.appendChild(j),!d){for(g||(g=this.element[0]),k=0,l=g.childNodes.length;l>k;k++)if(g.childNodes[k]&&g.childNodes[k].className&&-1!==g.childNodes[k].className.indexOf("jstree-children")){s=g.childNodes[k];break}s||(s=o.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",g.appendChild(s)),g=s,hf;f++)this.open_node(c[f],d,e);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(e=e===b?this.settings.core.animation:e,this.is_closed(c)?this.is_loaded(c)?(h=this.get_node(c,!0),i=this,h.length&&(e&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),c.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(c),e?(this.trigger("before_open",{node:c}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(e,function(){this.style.display="",i.element&&i.trigger("after_open",{node:c})})):(this.trigger("before_open",{node:c}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].childNodes[1].setAttribute("aria-expanded",!0))),c.state.opened=!0,d&&d.call(this,c,!0),h.length||this.trigger("before_open",{node:c}),this.trigger("open_node",{node:c}),e&&h.length||this.trigger("after_open",{node:c}),!0):this.is_loading(c)?setTimeout(function(){this.open_node(c,d,e)}.bind(this),500):void this.load_node(c,function(a,b){return b?this.open_node(a,d,e):d?d.call(this,a,!1):!1}):(d&&d.call(this,c,!1),!1)):!1},_open_to:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c,d,e=b.parents;for(c=0,d=e.length;d>c;c+=1)c!==a.jstree.root&&this.open_node(e[c],!1,0);return a("#"+b.id.replace(a.jstree.idregex,"\\$&"),this.element)},close_node:function(c,d){var e,f,g,h;if(a.vakata.is_array(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.close_node(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?this.is_closed(c)?!1:(d=d===b?this.settings.core.animation:d,g=this,h=this.get_node(c,!0),c.state.opened=!1,this.trigger("close_node",{node:c}),void(h.length?d?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(d,function(){this.style.display="",h.children(".jstree-children").remove(),g.element&&g.trigger("after_close",{node:c})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.children(".jstree-anchor").attr("aria-expanded",!1),h.children(".jstree-children").remove(),this.trigger("after_close",{node:c})):this.trigger("after_close",{node:c}))):!1},toggle_node:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.toggle_node(b[c]);return!0}return this.is_closed(b)?this.open_node(b):this.is_open(b)?this.close_node(b):void 0},open_all:function(b,c,d){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var e=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),f,g,h;if(!e.length){for(f=0,g=b.children_d.length;g>f;f++)this.is_closed(this._model.data[b.children_d[f]])&&(this._model.data[b.children_d[f]].state.opened=!0);return this.trigger("open_all",{node:b})}d=d||e,h=this,e=this.is_closed(b)?e.find(".jstree-closed").addBack():e.find(".jstree-closed"),e.each(function(){h.open_node(this,function(a,b){b&&this.is_parent(a)&&this.open_all(a,c,d)},c||0)}),0===d.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(d)})},close_all:function(b,c){if(b||(b=a.jstree.root),b=this.get_node(b),!b)return!1;var d=b.id===a.jstree.root?this.get_container_ul():this.get_node(b,!0),e=this,f,g;for(d.length&&(d=this.is_open(b)?d.find(".jstree-open").addBack():d.find(".jstree-open"),a(d.get().reverse()).each(function(){e.close_node(this,c||0)})),f=0,g=b.children_d.length;g>f;f++)this._model.data[b.children_d[f]].state.opened=!1;this.trigger("close_all",{node:b})},is_disabled:function(a){return a=this.get_node(a),a&&a.state&&a.state.disabled},enable_node:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!1,this.get_node(b,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:b})):!1},disable_node:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_node(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.state.disabled=!0,this.get_node(b,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:b})):!1},is_hidden:function(a){return a=this.get_node(a),a.state.hidden===!0},hide_node:function(b,c){var d,e;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.hide_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden||(b.state.hidden=!0,this._node_changed(b.parent),c||this.redraw(),this.trigger("hide_node",{node:b}))):!1},show_node:function(b,c){var d,e;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.show_node(b[d],!0);return c||this.redraw(),!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?void(b.state.hidden&&(b.state.hidden=!1,this._node_changed(b.parent),c||this.redraw(),this.trigger("show_node",{node:b}))):!1},hide_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&!d[c].state.hidden&&(d[c].state.hidden=!0,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("hide_all",{nodes:e}),e},show_all:function(b){var c,d=this._model.data,e=[];for(c in d)d.hasOwnProperty(c)&&c!==a.jstree.root&&d[c].state.hidden&&(d[c].state.hidden=!1,e.push(c));return this._model.force_full_redraw=!0,b||this.redraw(),this.trigger("show_all",{nodes:e}),e},activate_node:function(a,c){if(this.is_disabled(a))return!1;if(c&&"object"==typeof c||(c={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==b?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&(!c.shiftKey||this._data.core.last_clicked&&this.get_parent(a)&&this.get_parent(a)===this._data.core.last_clicked.parent))if(c.shiftKey){var d=this.get_node(a).id,e=this._data.core.last_clicked.id,f=this.get_node(this._data.core.last_clicked.parent).children,g=!1,h,i;for(h=0,i=f.length;i>h;h+=1)f[h]===d&&(g=!g),f[h]===e&&(g=!g),this.is_disabled(f[h])||!g&&f[h]!==d&&f[h]!==e?this.deselect_node(f[h],!0,c):this.is_hidden(f[h])||this.select_node(f[h],!0,!1,c);this.trigger("changed",{action:"select_node",node:this.get_node(a),selected:this._data.core.selected,event:c})}else this.is_selected(a)?this.deselect_node(a,!1,c):this.select_node(a,!1,!1,c);else!this.settings.core.multiple&&(c.metaKey||c.ctrlKey||c.shiftKey)&&this.is_selected(a)?this.deselect_node(a,!1,c):(this.deselect_all(!0),this.select_node(a,!1,!1,c),this._data.core.last_clicked=this.get_node(a));this.trigger("activate_node",{node:this.get_node(a),event:c})},hover_node:function(a){if(a=this.get_node(a,!0),!a||!a.length||a.children(".jstree-hovered").length)return!1;var b=this.element.find(".jstree-hovered"),c=this.element;b&&b.length&&this.dehover_node(b),a.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(a)}),setTimeout(function(){c.attr("aria-activedescendant",a[0].id)},0)},dehover_node:function(a){return a=this.get_node(a,!0),a&&a.length&&a.children(".jstree-hovered").length?(a.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(a)})):!1},select_node:function(b,c,d,e){var f,g,h,i;if(a.vakata.is_array(b)){for(b=b.slice(),g=0,h=b.length;h>g;g++)this.select_node(b[g],c,d,e);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.selected||(b.state.selected=!0,this._data.core.selected.push(b.id),d||(f=this._open_to(b)),f&&f.length&&f.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:b,selected:this._data.core.selected,event:e}),c||this.trigger("changed",{action:"select_node",node:b,selected:this._data.core.selected,event:e})))):!1},deselect_node:function(b,c,d){var e,f,g;if(a.vakata.is_array(b)){for(b=b.slice(),e=0,f=b.length;f>e;e++)this.deselect_node(b[e],c,d);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(g=this.get_node(b,!0),void(b.state.selected&&(b.state.selected=!1,this._data.core.selected=a.vakata.array_remove_item(this._data.core.selected,b.id),g.length&&g.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:b,selected:this._data.core.selected,event:d}),c||this.trigger("changed",{action:"deselect_node",node:b,selected:this._data.core.selected,event:d})))):!1},select_all:function(b){var c=this._data.core.selected.concat([]),d,e;for(this._data.core.selected=this._model.data[a.jstree.root].children_d.concat(),d=0,e=this._data.core.selected.length;e>d;d++)this._model.data[this._data.core.selected[d]]&&(this._model.data[this._data.core.selected[d]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),b||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:c})},deselect_all:function(a){var b=this._data.core.selected.concat([]),c,d;for(c=0,d=this._data.core.selected.length;d>c;c++)this._model.data[this._data.core.selected[c]]&&(this._model.data[this._data.core.selected[c]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:b}),a||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:b})},is_selected:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.selected:!1},get_selected:function(b){return b?a.map(this._data.core.selected,function(a){return this.get_node(a)}.bind(this)):this._data.core.selected.slice()},get_top_selected:function(b){var c=this.get_selected(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,function(a){return this.get_node(a)}.bind(this)):c},get_bottom_selected:function(b){var c=this.get_selected(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,function(a){return this.get_node(a)}.bind(this)):d},get_state:function(){var b={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},c;for(c in this._model.data)this._model.data.hasOwnProperty(c)&&c!==a.jstree.root&&(this._model.data[c].state.loaded&&this.settings.core.loaded_state&&b.core.loaded.push(c),this._model.data[c].state.opened&&b.core.open.push(c),this._model.data[c].state.selected&&b.core.selected.push(c));return b},set_state:function(c,d){if(c){if(c.core&&c.core.selected&&c.core.initial_selection===b&&(c.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),c.core){var e,f,g,h,i;if(c.core.loaded)return this.settings.core.loaded_state&&a.vakata.is_array(c.core.loaded)&&c.core.loaded.length?this._load_nodes(c.core.loaded,function(a){delete c.core.loaded,this.set_state(c,d)}):(delete c.core.loaded,this.set_state(c,d)),!1;if(c.core.open)return a.vakata.is_array(c.core.open)&&c.core.open.length?this._load_nodes(c.core.open,function(a){this.open_node(a,!1,0),delete c.core.open,this.set_state(c,d)}):(delete c.core.open,this.set_state(c,d)),!1;if(c.core.scroll)return c.core.scroll&&c.core.scroll.left!==b&&this.element.scrollLeft(c.core.scroll.left),c.core.scroll&&c.core.scroll.top!==b&&this.element.scrollTop(c.core.scroll.top),delete c.core.scroll,this.set_state(c,d),!1;if(c.core.selected)return h=this,(c.core.initial_selection===b||c.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),a.each(c.core.selected,function(a,b){h.select_node(b,!1,!0)})),delete c.core.initial_selection,delete c.core.selected,this.set_state(c,d),!1;for(i in c)c.hasOwnProperty(i)&&"core"!==i&&-1===a.inArray(i,this.settings.plugins)&&delete c[i];if(a.isEmptyObject(c.core))return delete c.core,this.set_state(c,d),!1}return a.isEmptyObject(c)?(c=null,d&&d.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(b,c){this._data.core.state=c===!0?{}:this.get_state(),c&&a.vakata.is_function(c)&&(this._data.core.state=c.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[a.jstree.root]={id:a.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var d=this.get_container_ul()[0].className;b||(this.element.html(""),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(a.jstree.root,function(b,c){c&&(this.get_container_ul()[0].className=d,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(a.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(b){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var c=[],d=[],e=this._data.core.selected.concat([]);d.push(b.id),b.state.opened===!0&&c.push(b.id),this.get_node(b,!0).find(".jstree-open").each(function(){d.push(this.id),c.push(this.id)}),this._load_nodes(d,function(a){this.open_node(c,!1,0),this.select_node(e),this.trigger("refresh_node",{node:b,nodes:a})}.bind(this),!1,!0)},set_id:function(b,c){if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;var d,e,f=this._model.data,g=b.id;for(c=c.toString(),f[b.parent].children[a.inArray(b.id,f[b.parent].children)]=c,d=0,e=b.parents.length;e>d;d++)f[b.parents[d]].children_d[a.inArray(b.id,f[b.parents[d]].children_d)]=c;for(d=0,e=b.children.length;e>d;d++)f[b.children[d]].parent=c;for(d=0,e=b.children_d.length;e>d;d++)f[b.children_d[d]].parents[a.inArray(b.id,f[b.children_d[d]].parents)]=c;return d=a.inArray(b.id,this._data.core.selected),-1!==d&&(this._data.core.selected[d]=c),d=this.get_node(b.id,!0),d&&(d.attr("id",c),this.element.attr("aria-activedescendant")===b.id&&this.element.attr("aria-activedescendant",c)),delete f[b.id],b.id=c,b.li_attr.id=c,f[c]=b,this.trigger("set_id",{node:b,"new":b.id,old:g}),!0},get_text:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.text:!1},set_text:function(b,c){var d,e;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.set_text(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(b.text=c,this.get_node(b,!0).length&&this.redraw_node(b.id),this.trigger("set_text",{obj:b,text:c}),!0):!1},get_json:function(b,c,d){if(b=this.get_node(b||a.jstree.root),!b)return!1;c&&c.flat&&!d&&(d=[]);var e={id:b.id,text:b.text,icon:this.get_icon(b),li_attr:a.extend(!0,{},b.li_attr),a_attr:a.extend(!0,{},b.a_attr),state:{},data:c&&c.no_data?!1:a.extend(!0,a.vakata.is_array(b.data)?[]:{},b.data)},f,g;if(c&&c.flat?e.parent=b.parent:e.children=[],c&&c.no_state)delete e.state;else for(f in b.state)b.state.hasOwnProperty(f)&&(e.state[f]=b.state[f]);if(c&&c.no_li_attr&&delete e.li_attr,c&&c.no_a_attr&&delete e.a_attr,c&&c.no_id&&(delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id),c&&c.flat&&b.id!==a.jstree.root&&d.push(e),!c||!c.no_children)for(f=0,g=b.children.length;g>f;f++)c&&c.flat?this.get_json(b.children[f],c,d):e.children.push(this.get_json(b.children[f],c));return c&&c.flat?d:b.id===a.jstree.root?e.children:e},create_node:function(c,d,e,f,g){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return!1;if(e=e===b?"last":e,!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(c))return this.load_node(c,function(){this.create_node(c,d,e,f,!0)});d||(d={text:this.get_string("New node")}),d="string"==typeof d?{text:d}:a.extend(!0,{},d),d.text===b&&(d.text=this.get_string("New node"));var h,i,j,k;switch(c.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":h=this.get_node(c.parent),e=a.inArray(c.id,h.children),c=h;break;case"after":h=this.get_node(c.parent),e=a.inArray(c.id,h.children)+1,c=h;break;case"inside":case"first":e=0;break;case"last":e=c.children.length;break;default:e||(e=0)}if(e>c.children.length&&(e=c.children.length),d.id||(d.id=!0),!this.check("create_node",d,c,e))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(d.id===!0&&delete d.id,d=this._parse_model_from_json(d,c.id,c.parents.concat()),!d)return!1;for(h=this.get_node(d),i=[],i.push(d),i=i.concat(h.children_d),this.trigger("model",{nodes:i,parent:c.id}),c.children_d=c.children_d.concat(i),j=0,k=c.parents.length;k>j;j++)this._model.data[c.parents[j]].children_d=this._model.data[c.parents[j]].children_d.concat(i);for(d=h,h=[],j=0,k=c.children.length;k>j;j++)h[j>=e?j+1:j]=c.children[j];return h[e]=d.id,c.children=h,this.redraw_node(c,!0),this.trigger("create_node",{node:this.get_node(d),parent:c.id,position:e}),f&&f.call(this,this.get_node(d)),d.id},rename_node:function(b,c){var d,e,f;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.rename_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=b.text,this.check("rename_node",b,this.get_parent(b),c)?(this.set_text(b,c),this.trigger("rename_node",{node:b,text:c,old:f}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1)):!1},delete_node:function(b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.delete_node(b[c]);return!0}if(b=this.get_node(b),!b||b.id===a.jstree.root)return!1;if(e=this.get_node(b.parent),f=a.inArray(b.id,e.children),l=!1,!this.check("delete_node",b,e,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==f&&(e.children=a.vakata.array_remove(e.children,f)),g=b.children_d.concat([]),g.push(b.id),h=0,i=b.parents.length;i>h;h++)this._model.data[b.parents[h]].children_d=a.vakata.array_filter(this._model.data[b.parents[h]].children_d,function(b){return-1===a.inArray(b,g)});for(j=0,k=g.length;k>j;j++)if(this._model.data[g[j]].state.selected){l=!0;break}for(l&&(this._data.core.selected=a.vakata.array_filter(this._data.core.selected,function(b){return-1===a.inArray(b,g)})),this.trigger("delete_node",{node:b,parent:e.id}),l&&this.trigger("changed",{action:"delete_node",node:b,selected:this._data.core.selected,parent:e.id}),j=0,k=g.length;k>j;j++)delete this._model.data[g[j]];return-1!==a.inArray(this._data.core.focused,g)&&(this._data.core.focused=null,m=this.element[0].scrollTop,n=this.element[0].scrollLeft,e.id===a.jstree.root?this._model.data[a.jstree.root].children[0]&&this.get_node(this._model.data[a.jstree.root].children[0],!0).children(".jstree-anchor").triger("focus"):this.get_node(e,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=m,this.element[0].scrollLeft=n),this.redraw_node(e,!0),!0},check:function(b,c,d,e,f){c=c&&c.id?c:this.get_node(c),d=d&&d.id?d:this.get_node(d);var g=b.match(/^move_node|copy_node|create_node$/i)?d:c,h=this.settings.core.check_callback;if("move_node"===b||"copy_node"===b){if(!(f&&f.is_multi||"move_node"!==b||a.inArray(c.id,d.children)!==e))return this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1;if(!(f&&f.is_multi||c.id!==d.id&&("move_node"!==b||a.inArray(c.id,d.children)!==e)&&-1===a.inArray(d.id,c.children_d)))return this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1}return g&&g.data&&(g=g.data),g&&g.functions&&(g.functions[b]===!1||g.functions[b]===!0)?(g.functions[b]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})}),g.functions[b]):h===!1||a.vakata.is_function(h)&&h.call(this,b,c,d,e,f)===!1||h&&h[b]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+b,data:JSON.stringify({chk:b,pos:e,obj:c&&c.id?c.id:!1,par:d&&d.id?d.id:!1})},!1):!0},last_error:function(){return this._data.core.last_error},move_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.move_node(c,d,e,f,!0,!1,i)});if(a.vakata.is_array(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(r=this.move_node(c[j],d,e,f,g,!1,i))&&(d=r,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;if(l=(c.parent||a.jstree.root).toString(),n=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,o=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),p=!o||!o._id||this._id!==o._id,m=o&&o._id&&l&&o._model.data[l]&&o._model.data[l].children?a.inArray(c.id,o._model.data[l].children):-1,o&&o._id&&(c=o._model.data[c.id]),p)return(r=this.copy_node(c,d,e,f,g,!1,i))?(o&&o.delete_node(c),r):!1;switch(d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,n.children);break;case"after":e=a.inArray(d.id,n.children)+1;break;case"inside":case"first":e=0;break;case"last":e=n.children.length;break;default:e||(e=0)}if(e>n.children.length&&(e=n.children.length),!this.check("move_node",c,n,e,{core:!0,origin:i,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(c.parent===n.id){for(q=n.children.concat(),r=a.inArray(c.id,q),-1!==r&&(q=a.vakata.array_remove(q,r),e>r&&e--),r=[],s=0,t=q.length;t>s;s++)r[s>=e?s+1:s]=q[s];r[e]=c.id,n.children=r,this._node_changed(n.id),this.redraw(n.id===a.jstree.root)}else{for(r=c.children_d.concat(),r.push(c.id),s=0,t=c.parents.length;t>s;s++){for(q=[],w=o._model.data[c.parents[s]].children_d,u=0,v=w.length;v>u;u++)-1===a.inArray(w[u],r)&&q.push(w[u]);o._model.data[c.parents[s]].children_d=q}for(o._model.data[l].children=a.vakata.array_remove_item(o._model.data[l].children,c.id),s=0,t=n.parents.length;t>s;s++)this._model.data[n.parents[s]].children_d=this._model.data[n.parents[s]].children_d.concat(r);for(q=[],s=0,t=n.children.length;t>s;s++)q[s>=e?s+1:s]=n.children[s];for(q[e]=c.id,n.children=q,n.children_d.push(c.id),n.children_d=n.children_d.concat(c.children_d),c.parent=n.id,r=n.parents.concat(),r.unshift(n.id),w=c.parents.length,c.parents=r,r=r.concat(),s=0,t=c.children_d.length;t>s;s++)this._model.data[c.children_d[s]].parents=this._model.data[c.children_d[s]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[c.children_d[s]].parents,r);(l===a.jstree.root||n.id===a.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(n.id)),h||this.redraw()}return f&&f.call(this,c,n,e),this.trigger("move_node",{node:c,parent:n.id,position:e,old_parent:l,old_position:m,is_multi:o&&o._id&&o._id!==this._id,is_foreign:!o||!o._id,old_instance:o,new_instance:this}),c.id},copy_node:function(c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r,s,t;if(d=this.get_node(d),e=e===b?0:e,!d)return!1;if(!e.toString().match(/^(before|after)$/)&&!g&&!this.is_loaded(d))return this.load_node(d,function(){this.copy_node(c,d,e,f,!0,!1,i)});if(a.vakata.is_array(c)){if(1!==c.length){for(j=0,k=c.length;k>j;j++)(m=this.copy_node(c[j],d,e,f,g,!0,i))&&(d=m,e="after");return this.redraw(),!0}c=c[0]}if(c=c&&c.id?c:this.get_node(c),!c||c.id===a.jstree.root)return!1;switch(q=(c.parent||a.jstree.root).toString(),r=e.toString().match(/^(before|after)$/)&&d.id!==a.jstree.root?this.get_node(d.parent):d,s=i?i:this._model.data[c.id]?this:a.jstree.reference(c.id),t=!s||!s._id||this._id!==s._id,s&&s._id&&(c=s._model.data[c.id]),d.id===a.jstree.root&&("before"===e&&(e="first"),"after"===e&&(e="last")),e){case"before":e=a.inArray(d.id,r.children);break;case"after":e=a.inArray(d.id,r.children)+1;break;case"inside":case"first":e=0;break;case"last":e=r.children.length;break;default:e||(e=0)}if(e>r.children.length&&(e=r.children.length),!this.check("copy_node",c,r,e,{core:!0,origin:i,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(p=s?s.get_json(c,{no_id:!0,no_data:!0,no_state:!0}):c,!p)return!1;if(p.id===!0&&delete p.id,p=this._parse_model_from_json(p,r.id,r.parents.concat()), +!p)return!1;for(m=this.get_node(p),c&&c.state&&c.state.loaded===!1&&(m.state.loaded=!1),l=[],l.push(p),l=l.concat(m.children_d),this.trigger("model",{nodes:l,parent:r.id}),n=0,o=r.parents.length;o>n;n++)this._model.data[r.parents[n]].children_d=this._model.data[r.parents[n]].children_d.concat(l);for(l=[],n=0,o=r.children.length;o>n;n++)l[n>=e?n+1:n]=r.children[n];return l[e]=m.id,r.children=l,r.children_d.push(m.id),r.children_d=r.children_d.concat(m.children_d),r.id===a.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(r.id),h||this.redraw(r.id===a.jstree.root),f&&f.call(this,m,r,e),this.trigger("copy_node",{node:m,original:c,parent:r.id,position:e,old_parent:q,old_position:s&&s._id&&q&&s._model.data[q]&&s._model.data[q].children?a.inArray(c.id,s._model.data[q].children):-1,is_multi:s&&s._id&&s._id!==this._id,is_foreign:!s||!s._id,old_instance:s,new_instance:this}),m.id},cut:function(b){if(b||(b=this._data.core.selected.concat()),a.vakata.is_array(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="move_node",void this.trigger("cut",{node:b})):!1},copy:function(b){if(b||(b=this._data.core.selected.concat()),a.vakata.is_array(b)||(b=[b]),!b.length)return!1;var c=[],g,h,i;for(h=0,i=b.length;i>h;h++)g=this.get_node(b[h]),g&&g.id&&g.id!==a.jstree.root&&c.push(g);return c.length?(d=c,f=this,e="copy_node",void this.trigger("copy",{node:b})):!1},get_buffer:function(){return{mode:e,node:d,inst:f}},can_paste:function(){return e!==!1&&d!==!1},paste:function(a,b){return a=this.get_node(a),a&&e&&e.match(/^(copy_node|move_node)$/)&&d?(this[e](d,a,b,!1,!1,!1,f)&&this.trigger("paste",{parent:a.id,node:d,mode:e}),d=!1,e=!1,void(f=!1)):!1},clear_buffer:function(){d=!1,e=!1,f=!1,this.trigger("clear_buffer")},edit:function(b,c,d){var e,f,g,h,j,k,l,m,n,o=!1;return(b=this.get_node(b))?this.check("edit",b,this.get_parent(b))?(n=b,c="string"==typeof c?c:b.text,this.set_text(b,""),b=this._open_to(b),n.text=c,e=this._data.core.rtl,f=this.element.width(),this._data.core.focused=n.id,g=b.children(".jstree-anchor").trigger("focus"),h=a(""),j=c,k=a("
",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo(i.body),l=a("",{value:j,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:function(c){c.stopImmediatePropagation(),c.preventDefault();var e=h.children(".jstree-rename-input"),f=e.val(),i=this.settings.core.force_text,m;""===f&&(f=j),k.remove(),h.replaceWith(g),h.remove(),j=i?j:a("
").append(a.parseHTML(j)).html(),b=this.get_node(b),this.set_text(b,j),m=!!this.rename_node(b,i?a("
").text(f).text():a("
").append(a.parseHTML(f)).html()),m||this.set_text(b,j),this._data.core.focused=n.id,setTimeout(function(){var a=this.get_node(n.id,!0);a.length&&(this._data.core.focused=n.id,a.children(".jstree-anchor").trigger("focus"))}.bind(this),0),d&&d.call(this,n,m,o,f),l=null}.bind(this),keydown:function(a){var b=a.which;27===b&&(o=!0,this.value=j),(27===b||13===b||37===b||38===b||39===b||40===b||32===b)&&a.stopImmediatePropagation(),(27===b||13===b)&&(a.preventDefault(),this.blur())},click:function(a){a.stopImmediatePropagation()},mousedown:function(a){a.stopImmediatePropagation()},keyup:function(a){l.width(Math.min(k.text("pW"+this.value).width(),f))},keypress:function(a){return 13===a.which?!1:void 0}}),m={fontFamily:g.css("fontFamily")||"",fontSize:g.css("fontSize")||"",fontWeight:g.css("fontWeight")||"",fontStyle:g.css("fontStyle")||"",fontStretch:g.css("fontStretch")||"",fontVariant:g.css("fontVariant")||"",letterSpacing:g.css("letterSpacing")||"",wordSpacing:g.css("wordSpacing")||""},h.attr("class",g.attr("class")).append(g.contents().clone()).append(l),g.replaceWith(h),k.css(m),l.css(m).width(Math.min(k.text("pW"+l[0].value).width(),f))[0].select(),void a(i).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(b){l&&b.target!==l&&a(l).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1):!1},set_theme:function(b,c){if(!b)return!1;if(c===!0){var d=this.settings.core.themes.dir;d||(d=a.jstree.path+"/themes"),c=d+"/"+b+"/style.css"}c&&-1===a.inArray(c,g)&&(a("head").append(''),g.push(c)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=b,this.element.addClass("jstree-"+b),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+b+"-responsive"),this.trigger("set_theme",{theme:b})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(a){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=a,a&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(c,d){var e,f,g,h;if(a.vakata.is_array(c)){for(c=c.slice(),e=0,f=c.length;f>e;e++)this.set_icon(c[e],d);return!0}return c=this.get_node(c),c&&c.id!==a.jstree.root?(h=c.icon,c.icon=d===!0||null===d||d===b||""===d?!0:d,g=this.get_node(c,!0).children(".jstree-anchor").children(".jstree-themeicon"),d===!1?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),this.hide_icon(c)):d===!0||null===d||d===b||""===d?(g.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(c)):-1===d.indexOf("/")&&-1===d.indexOf(".")?(g.removeClass(h).css("background",""),g.addClass(d+" jstree-themeicon-custom").attr("rel",d),h===!1&&this.show_icon(c)):(g.removeClass(h).css("background",""),g.addClass("jstree-themeicon-custom").css("background","url('"+d+"') center center no-repeat").attr("rel",d),h===!1&&this.show_icon(c)),!0):!1},get_icon:function(b){return b=this.get_node(b),b&&b.id!==a.jstree.root?b.icon:!1},hide_icon:function(b){var c,d;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.hide_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(b.icon=!1,this.get_node(b,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0):!1},show_icon:function(b){var c,d,e;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.show_icon(b[c]);return!0}return b=this.get_node(b),b&&b!==a.jstree.root?(e=this.get_node(b,!0),b.icon=e.length?e.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,b.icon||(b.icon=!0),e.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0):!1}},a.vakata={},a.vakata.attributes=function(b,c){b=a(b)[0];var d=c?{}:[];return b&&b.attributes&&a.each(b.attributes,function(b,e){-1===a.inArray(e.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==e.value&&""!==a.vakata.trim(e.value)&&(c?d[e.name]=e.value:d.push(e.name))}),d},a.vakata.array_unique=function(a){var c=[],d,e,f,g={};for(d=0,f=a.length;f>d;d++)g[a[d]]===b&&(c.push(a[d]),g[a[d]]=!0);return c},a.vakata.array_remove=function(a,b){return a.splice(b,1),a},a.vakata.array_remove_item=function(b,c){var d=a.inArray(c,b);return-1!==d?a.vakata.array_remove(b,d):b},a.vakata.array_filter=function(a,b,c,d,e){if(a.filter)return a.filter(b,c);d=[];for(e in a)~~e+""==e+""&&e>=0&&b.call(c,a[e],+e,a)&&d.push(a[e]);return d},a.vakata.trim=function(a){return String.prototype.trim?String.prototype.trim.call(a.toString()):a.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},a.vakata.is_function=function(a){return"function"==typeof a&&"number"!=typeof a.nodeType},a.vakata.is_array=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},Function.prototype.bind||(Function.prototype.bind=function(){var a=this,b=arguments[0],c=Array.prototype.slice.call(arguments,1);if("function"!=typeof a)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var d=c.concat(Array.prototype.slice.call(arguments));return a.apply(b,d)}}),a.jstree.plugins.changed=function(a,b){var c=[];this.trigger=function(a,d){var e,f;if(d||(d={}),"changed"===a.replace(".jstree","")){d.changed={selected:[],deselected:[]};var g={};for(e=0,f=c.length;f>e;e++)g[c[e]]=1;for(e=0,f=d.selected.length;f>e;e++)g[d.selected[e]]?g[d.selected[e]]=2:d.changed.selected.push(d.selected[e]);for(e=0,f=c.length;f>e;e++)1===g[c[e]]&&d.changed.deselected.push(c[e]);c=d.selected.slice()}b.trigger.call(this,a,d)},this.refresh=function(a,d){return c=[],b.refresh.apply(this,arguments)}};var l=i.createElement("I");l.className="jstree-icon jstree-checkbox",l.setAttribute("role","presentation"),a.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},a.jstree.plugins.checkbox=function(c,d){this.bind=function(){d.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}.bind(this)).on("loading.jstree",function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}.bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",function(a,b){var c=this._model.data,d=c[b.parent],e=b.nodes,f,g;for(f=0,g=e.length;g>f;f++)c[e[f]].state.checked=c[e[f]].state.checked||c[e[f]].original&&c[e[f]].original.state&&c[e[f]].original.state.checked,c[e[f]].state.checked&&this._data.checkbox.selected.push(e[f])}.bind(this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",function(b,c){var d=this._model.data,e=d[c.parent],f=c.nodes,g=[],h,i,j,k,l,m,n=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection;if(-1!==n.indexOf("down"))if(e.state[o?"selected":"checked"]){for(i=0,j=f.length;j>i;i++)d[f[i]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(f)}else for(i=0,j=f.length;j>i;i++)if(d[f[i]].state[o?"selected":"checked"]){for(k=0,l=d[f[i]].children_d.length;l>k;k++)d[d[f[i]].children_d[k]].state[o?"selected":"checked"]=!0;this._data[o?"core":"checkbox"].selected=this._data[o?"core":"checkbox"].selected.concat(d[f[i]].children_d)}if(-1!==n.indexOf("up")){for(i=0,j=e.children_d.length;j>i;i++)d[e.children_d[i]].children.length||g.push(d[e.children_d[i]].parent);for(g=a.vakata.array_unique(g),k=0,l=g.length;l>k;k++){e=d[g[k]];while(e&&e.id!==a.jstree.root){for(h=0,i=0,j=e.children.length;j>i;i++)h+=d[e.children[i]].state[o?"selected":"checked"];if(h!==j)break;e.state[o?"selected":"checked"]=!0,this._data[o?"core":"checkbox"].selected.push(e.id),m=this.get_node(e,!0),m&&m.length&&m.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked"),e=this.get_node(e.parent)}}}this._data[o?"core":"checkbox"].selected=a.vakata.array_unique(this._data[o?"core":"checkbox"].selected)}.bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",function(b,c){var d=this,e=c.node,f=this._model.data,g=this.get_node(e.parent),h,i,j,k,l=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection,n={},o=this._data[m?"core":"checkbox"].selected;for(h=0,i=o.length;i>h;h++)n[o[h]]=!0;if(-1!==l.indexOf("down")){var p=this._cascade_new_checked_state(e.id,!0),q=e.children_d.concat(e.id);for(h=0,i=q.length;i>h;h++)p.indexOf(q[h])>-1?n[q[h]]=!0:delete n[q[h]]}if(-1!==l.indexOf("up"))while(g&&g.id!==a.jstree.root){for(j=0,h=0,i=g.children.length;i>h;h++)j+=f[g.children[h]].state[m?"selected":"checked"];if(j!==i)break;g.state[m?"selected":"checked"]=!0,n[g.id]=!0,k=this.get_node(g,!0),k&&k.length&&k.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),g=this.get_node(g.parent)}o=[];for(h in n)n.hasOwnProperty(h)&&o.push(h);this._data[m?"core":"checkbox"].selected=o}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",function(b,c){var d=this.get_node(a.jstree.root),e=this._model.data,f,g,h;for(f=0,g=d.children_d.length;g>f;f++)h=e[d.children_d[f]],h&&h.original&&h.original.state&&h.original.state.undetermined&&(h.original.state.undetermined=!1)}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",function(b,c){var d=this,e=c.node,f=this.get_node(e,!0),g,h,i,j=this.settings.checkbox.cascade,k=this.settings.checkbox.tie_selection,l=this._data[k?"core":"checkbox"].selected,m={},n=[],o=e.children_d.concat(e.id);if(-1!==j.indexOf("down")){var p=this._cascade_new_checked_state(e.id,!1);l=a.vakata.array_filter(l,function(a){return-1===o.indexOf(a)||p.indexOf(a)>-1})}if(-1!==j.indexOf("up")&&-1===l.indexOf(e.id)){for(g=0,h=e.parents.length;h>g;g++)i=this._model.data[e.parents[g]],i.state[k?"selected":"checked"]=!1,i&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1),i=this.get_node(e.parents[g],!0),i&&i.length&&i.attr("aria-selected",!1).children(".jstree-anchor").removeClass(k?"jstree-clicked":"jstree-checked");l=a.vakata.array_filter(l,function(a){return-1===e.parents.indexOf(a)})}this._data[k?"core":"checkbox"].selected=l}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",function(b,c){var d=this.get_node(c.parent),e=this._model.data,f,g,h,i,j=this.settings.checkbox.tie_selection;while(d&&d.id!==a.jstree.root&&!d.state[j?"selected":"checked"]){for(h=0,f=0,g=d.children.length;g>f;f++)h+=e[d.children[f]].state[j?"selected":"checked"];if(!(g>0&&h===g))break;d.state[j?"selected":"checked"]=!0,this._data[j?"core":"checkbox"].selected.push(d.id),i=this.get_node(d,!0),i&&i.length&&i.attr("aria-selected",!0).children(".jstree-anchor").addClass(j?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}}.bind(this)).on("move_node.jstree",function(b,c){var d=c.is_multi,e=c.old_parent,f=this.get_node(c.parent),g=this._model.data,h,i,j,k,l,m=this.settings.checkbox.tie_selection;if(!d){h=this.get_node(e);while(h&&h.id!==a.jstree.root&&!h.state[m?"selected":"checked"]){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(!(k>0&&i===k))break;h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}h=f;while(h&&h.id!==a.jstree.root){for(i=0,j=0,k=h.children.length;k>j;j++)i+=g[h.children[j]].state[m?"selected":"checked"];if(i===k)h.state[m?"selected":"checked"]||(h.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"));else{if(!h.state[m?"selected":"checked"])break;h.state[m?"selected":"checked"]=!1,this._data[m?"core":"checkbox"].selected=a.vakata.array_remove_item(this._data[m?"core":"checkbox"].selected,h.id),l=this.get_node(h,!0),l&&l.length&&l.attr("aria-selected",!1).children(".jstree-anchor").removeClass(m?"jstree-clicked":"jstree-checked")}h=this.get_node(h.parent)}}.bind(this))},this.get_undetermined=function(c){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var d,e,f,g,h={},i=this._model.data,j=this.settings.checkbox.tie_selection,k=this._data[j?"core":"checkbox"].selected,l=[],m=this,n=[];for(d=0,e=k.length;e>d;d++)if(i[k[d]]&&i[k[d]].parents)for(f=0,g=i[k[d]].parents.length;g>f;f++){if(h[i[k[d]].parents[f]]!==b)break;i[k[d]].parents[f]!==a.jstree.root&&(h[i[k[d]].parents[f]]=!0,l.push(i[k[d]].parents[f]))}for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var c=m.get_node(this),j;if(c)if(c.state.loaded){for(d=0,e=c.children_d.length;e>d;d++)if(j=i[c.children_d[d]],!j.state.loaded&&j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(h[j.id]===b&&j.id!==a.jstree.root&&(h[j.id]=!0,l.push(j.id)),f=0,g=j.parents.length;g>f;f++)h[j.parents[f]]===b&&j.parents[f]!==a.jstree.root&&(h[j.parents[f]]=!0,l.push(j.parents[f]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&c.original.state.undetermined===!0)for(h[c.id]===b&&c.id!==a.jstree.root&&(h[c.id]=!0,l.push(c.id)),f=0,g=c.parents.length;g>f;f++)h[c.parents[f]]===b&&c.parents[f]!==a.jstree.root&&(h[c.parents[f]]=!0,l.push(c.parents[f]))}),d=0,e=l.length;e>d;d++)i[l[d]].state[j?"selected":"checked"]||n.push(c?i[l[d]]:l[d]);return n},this._undetermined=function(){if(null!==this.element){var a=this.get_undetermined(!1),b,c,d;for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),b=0,c=a.length;c>b;b++)d=this.get_node(a[b],!0),d&&d.length&&d.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(a,b,c,e){if(a=d.redraw_node.apply(this,arguments)){var f,g,h=null,i=null;for(f=0,g=a.childNodes.length;g>f;f++)if(a.childNodes[f]&&a.childNodes[f].className&&-1!==a.childNodes[f].className.indexOf("jstree-anchor")){h=a.childNodes[f];break}h&&(!this.settings.checkbox.tie_selection&&this._model.data[a.id].state.checked&&(h.className+=" jstree-checked"),i=l.cloneNode(!1),this._model.data[a.id].state.checkbox_disabled&&(i.className+=" jstree-checkbox-disabled"),h.insertBefore(i,h.childNodes[0]))}return c||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),a},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(b){b=this.get_node(b);var c=this.settings.checkbox.cascade,d,e,f=this.settings.checkbox.tie_selection,g=this._data[f?"core":"checkbox"].selected,h=this._model.data;if(!b||b.state[f?"selected":"checked"]===!0||-1===c.indexOf("undetermined")||-1===c.indexOf("down")&&-1===c.indexOf("up"))return!1;if(!b.state.loaded&&b.original.state.undetermined===!0)return!0;for(d=0,e=b.children_d.length;e>d;d++)if(-1!==a.inArray(b.children_d[d],g)||!h[b.children_d[d]].state.loaded&&h[b.children_d[d]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(b){var c,d,e;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.disable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled||(b.state.checkbox_disabled=!0,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:b})))):!1},this.enable_checkbox=function(b){var c,d,e;if(a.vakata.is_array(b)){for(b=b.slice(),c=0,d=b.length;d>c;c++)this.enable_checkbox(b[c]);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(e=this.get_node(b,!0),void(b.state.checkbox_disabled&&(b.state.checkbox_disabled=!1,e&&e.length&&e.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:b})))):!1},this.activate_node=function(b,c){return a(c.target).hasClass("jstree-checkbox-disabled")?!1:(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||a(c.target).hasClass("jstree-checkbox"))&&(c.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!a(c.target).hasClass("jstree-checkbox")?d.activate_node.call(this,b,c):this.is_disabled(b)?!1:(this.is_checked(b)?this.uncheck_node(b,c):this.check_node(b,c),void this.trigger("activate_node",{node:this.get_node(b)})))},this._cascade_new_checked_state=function(a,b){var c=this,d=this.settings.checkbox.tie_selection,e=this._model.data[a],f=[],g=[],h,i,j;if(!this.settings.checkbox.cascade_to_disabled&&e.state.disabled||!this.settings.checkbox.cascade_to_hidden&&e.state.hidden)j=this.get_checked_descendants(a),e.state[d?"selected":"checked"]&&j.push(e.id),f=f.concat(j);else{if(e.children)for(h=0,i=e.children.length;i>h;h++){var k=e.children[h];j=c._cascade_new_checked_state(k,b),f=f.concat(j),j.indexOf(k)>-1&&g.push(k)}var l=c.get_node(e,!0),m=g.length>0&&g.lengthe;e++)this.check_node(b[e],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(d=this.get_node(b,!0),void(b.state.checked||(b.state.checked=!0,this._data.checkbox.selected.push(b.id),d&&d.length&&d.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.uncheck_node=function(b,c){if(this.settings.checkbox.tie_selection)return this.deselect_node(b,!1,c);var d,e,f;if(a.vakata.is_array(b)){for(b=b.slice(),d=0,e=b.length;e>d;d++)this.uncheck_node(b[d],c);return!0}return b=this.get_node(b),b&&b.id!==a.jstree.root?(f=this.get_node(b,!0),void(b.state.checked&&(b.state.checked=!1,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,b.id),f.length&&f.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:b,selected:this._data.checkbox.selected,event:c})))):!1},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var b=this._data.checkbox.selected.concat([]),c,d;for(this._data.checkbox.selected=this._model.data[a.jstree.root].children_d.concat(),c=0,d=this._data.checkbox.selected.length;d>c;c++)this._model.data[this._data.checkbox.selected[c]]&&(this._model.data[this._data.checkbox.selected[c]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var a=this._data.checkbox.selected.concat([]),b,c;for(b=0,c=this._data.checkbox.selected.length;c>b;b++)this._model.data[this._data.checkbox.selected[b]]&&(this._model.data[this._data.checkbox.selected[b]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:a})},this.is_checked=function(b){return this.settings.checkbox.tie_selection?this.is_selected(b):(b=this.get_node(b),b&&b.id!==a.jstree.root?b.state.checked:!1)},this.get_checked=function(b){return this.settings.checkbox.tie_selection?this.get_selected(b):b?a.map(this._data.checkbox.selected,function(a){return this.get_node(a)}.bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_top_selected(b);var c=this.get_checked(!0),d={},e,f,g,h;for(e=0,f=c.length;f>e;e++)d[c[e].id]=c[e];for(e=0,f=c.length;f>e;e++)for(g=0,h=c[e].children_d.length;h>g;g++)d[c[e].children_d[g]]&&delete d[c[e].children_d[g]];c=[];for(e in d)d.hasOwnProperty(e)&&c.push(e);return b?a.map(c,function(a){return this.get_node(a)}.bind(this)):c},this.get_bottom_checked=function(b){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(b);var c=this.get_checked(!0),d=[],e,f;for(e=0,f=c.length;f>e;e++)c[e].children.length||d.push(c[e].id);return b?a.map(d,function(a){return this.get_node(a)}.bind(this)):d},this.load_node=function(b,c){var e,f,g,h,i,j;if(!a.vakata.is_array(b)&&!this.settings.checkbox.tie_selection&&(j=this.get_node(b),j&&j.state.loaded))for(e=0,f=j.children_d.length;f>e;e++)this._model.data[j.children_d[e]].state.checked&&(i=!0,this._data.checkbox.selected=a.vakata.array_remove_item(this._data.checkbox.selected,j.children_d[e]));return d.load_node.apply(this,arguments)},this.get_state=function(){var a=d.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?a:(a.checkbox=this._data.checkbox.selected.slice(),a)},this.set_state=function(b,c){var e=d.set_state.apply(this,arguments);if(e&&b.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var f=this;a.each(b.checkbox,function(a,b){f.check_node(b)})}return delete b.checkbox,this.set_state(b,c),!1}return e},this.refresh=function(a,b){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),d.refresh.apply(this,arguments)}},a.jstree.defaults.conditionalselect=function(){return!0},a.jstree.plugins.conditionalselect=function(a,b){this.activate_node=function(a,c){return this.settings.conditionalselect.call(this,this.get_node(a),c)?b.activate_node.call(this,a,c):void 0}},a.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(b,c){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.create_node(d,{},"last",function(a){try{c.edit(a)}catch(b){setTimeout(function(){c.edit(a)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.edit(d)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.delete_node(c.get_selected()):c.delete_node(d)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.cut(c.get_top_selected()):c.cut(d)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.is_selected(d)?c.copy(c.get_top_selected()):c.copy(d)}},paste:{separator_before:!1,icon:!1,_disabled:function(b){return!a.jstree.reference(b.reference).can_paste()},separator_after:!1,label:"Paste",action:function(b){var c=a.jstree.reference(b.reference),d=c.get_node(b.reference);c.paste(d)}}}}}}},a.jstree.plugins.contextmenu=function(c,d){this.bind=function(){d.bind.call(this);var b=0,c=null,e,f;this.element.on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-contextmenu")}.bind(this)).on("contextmenu.jstree",".jstree-anchor",function(a,d){"input"!==a.target.tagName.toLowerCase()&&(a.preventDefault(),b=a.ctrlKey?+new Date:0,(d||c)&&(b=+new Date+1e4),c&&clearTimeout(c),this.is_loading(a.currentTarget)||this.show_contextmenu(a.currentTarget,a.pageX,a.pageY,a))}.bind(this)).on("click.jstree",".jstree-anchor",function(c){this._data.contextmenu.visible&&(!b||+new Date-b>250)&&a.vakata.context.hide(),b=0}.bind(this)).on("touchstart.jstree",".jstree-anchor",function(b){b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(e=b.originalEvent.changedTouches[0].clientX,f=b.originalEvent.changedTouches[0].clientY,c=setTimeout(function(){a(b.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(b){c&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(Math.abs(e-b.originalEvent.changedTouches[0].clientX)>10||Math.abs(f-b.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(c),a.vakata.context.hide())}).on("touchend.vakata.jstree",function(a){c&&clearTimeout(c)}),a(i).on("context_hide.vakata.jstree",function(b,c){this._data.contextmenu.visible=!1,a(c.reference).removeClass("jstree-context")}.bind(this))},this.teardown=function(){this._data.contextmenu.visible&&a.vakata.context.hide(),a(i).off("context_hide.vakata.jstree"),d.teardown.call(this)},this.show_contextmenu=function(c,d,e,f){if(c=this.get_node(c),!c||c.id===a.jstree.root)return!1;var g=this.settings.contextmenu,h=this.get_node(c,!0),i=h.children(".jstree-anchor"),j=!1,k=!1;(g.show_at_node||d===b||e===b)&&(j=i.offset(),d=j.left,e=j.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(c)&&this.activate_node(c,f),k=g.items,a.vakata.is_function(k)&&(k=k.call(this,c,function(a){this._show_contextmenu(c,d,e,a)}.bind(this))),a.isPlainObject(k)&&this._show_contextmenu(c,d,e,k)},this._show_contextmenu=function(b,c,d,e){ +var f=this.get_node(b,!0),g=f.children(".jstree-anchor");a(i).one("context_show.vakata.jstree",function(b,c){var d="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";a(c.element).addClass(d),g.addClass("jstree-context")}.bind(this)),this._data.contextmenu.visible=!0,a.vakata.context.show(g,{x:c,y:d},e),this.trigger("show_contextmenu",{node:b,x:c,y:d})}},function(a){var b=!1,c={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};a.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(b){a(i).triggerHandler("context_"+b+".vakata",{reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}})},_execute:function(b){return b=c.items[b],b&&(!b._disabled||a.vakata.is_function(b._disabled)&&!b._disabled({item:b,reference:c.reference,element:c.element}))&&b.action?b.action.call(null,{item:b,reference:c.reference,element:c.element,position:{x:c.position_x,y:c.position_y}}):!1},_parse:function(b,d){if(!b)return!1;d||(c.html="",c.items=[]);var e="",f=!1,g;return d&&(e+=""),d||(c.html=e,a.vakata.context._trigger("parse")),e.length>10?e:!1},_show_submenu:function(c){if(c=a(c),c.length&&c.children("ul").length){var d=c.children("ul"),e=c.offset().left,f=e+c.outerWidth(),g=c.offset().top,h=d.width(),i=d.height(),j=a(window).width()+a(window).scrollLeft(),k=a(window).height()+a(window).scrollTop();b?c[f-(h+10+c.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):c[f+h>j&&e>j-f?"addClass":"removeClass"]("vakata-context-right"),g+i+10>k&&d.css("bottom","-1px"),c.hasClass("vakata-context-right")?h>e&&d.css("margin-right",e-h):h>j-f&&d.css("margin-left",j-f-h),d.show()}},show:function(d,e,f){var g,h,j,k,l,m,n,o,p=!0;switch(c.element&&c.element.length&&c.element.width(""),p){case!e&&!d:return!1;case!!e&&!!d:c.reference=d,c.position_x=e.x,c.position_y=e.y;break;case!e&&!!d:c.reference=d,g=d.offset(),c.position_x=g.left+d.outerHeight(),c.position_y=g.top;break;case!!e&&!d:c.position_x=e.x,c.position_y=e.y}d&&!f&&a(d).data("vakata_contextmenu")&&(f=a(d).data("vakata_contextmenu")),a.vakata.context._parse(f)&&c.element.html(c.html),c.items.length&&(c.element.appendTo(i.body),h=c.element,j=c.position_x,k=c.position_y,l=h.width(),m=h.height(),n=a(window).width()+a(window).scrollLeft(),o=a(window).height()+a(window).scrollTop(),b&&(j-=h.outerWidth()-a(d).outerWidth(),jn&&(j=n-(l+20)),k+m+20>o&&(k=o-(m+20)),c.element.css({left:j,top:k}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),c.is_visible=!0,a.vakata.context._trigger("show"))},hide:function(){c.is_visible&&(c.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),c.is_visible=!1,a.vakata.context._trigger("hide"))}},a(function(){b="rtl"===a(i.body).css("direction");var d=!1;c.element=a("
    "),c.element.on("mouseenter","li",function(b){b.stopImmediatePropagation(),a.contains(this,b.relatedTarget)||(d&&clearTimeout(d),c.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),a(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),a.vakata.context._show_submenu(this))}).on("mouseleave","li",function(b){a.contains(this,b.relatedTarget)||a(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(b){a(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),a.vakata.context.settings.hide_onmouseleave&&(d=setTimeout(function(b){return function(){a.vakata.context.hide()}}(this),a.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(b){b.preventDefault(),a(this).trigger("blur").parent().hasClass("vakata-context-disabled")||a.vakata.context._execute(a(this).attr("rel"))===!1||a.vakata.context.hide()}).on("keydown","a",function(b){var d=null;switch(b.which){case 13:case 32:b.type="click",b.preventDefault(),a(b.currentTarget).trigger(b);break;case 37:c.is_visible&&(c.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 38:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),d.addClass("vakata-context-hover").children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 39:c.is_visible&&(c.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 40:c.is_visible&&(d=c.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),d.length||(d=c.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),d.addClass("vakata-context-hover").children("a").trigger("focus"),b.stopImmediatePropagation(),b.preventDefault());break;case 27:a.vakata.context.hide(),b.preventDefault()}}).on("keydown",function(a){a.preventDefault();var b=c.element.find(".vakata-contextmenu-shortcut-"+a.which).parent();b.parent().not(".vakata-context-disabled")&&b.trigger("click")}),a(i).on("mousedown.vakata.jstree",function(b){c.is_visible&&c.element[0]!==b.target&&!a.contains(c.element[0],b.target)&&a.vakata.context.hide()}).on("context_show.vakata.jstree",function(a,d){c.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),b&&c.element.addClass("vakata-context-rtl").css("direction","rtl"),c.element.find("ul").hide().end()})})}(a),a.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1};var m,n;a.jstree.plugins.dnd=function(b,c){this.init=function(a,b){c.init.call(this,a,b),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in i.createElement("span")},this.bind=function(){c.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(b){if(this.settings.dnd.large_drag_target&&a(b.target).closest(".jstree-node")[0]!==b.currentTarget)return!0;if("touchstart"===b.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var c=this.get_node(b.target),d=this.is_selected(c)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,e=d>1?d+" "+this.get_string("nodes"):this.get_text(b.currentTarget);if(this.settings.core.force_text&&(e=a.vakata.html.escape(e)),c&&c.id&&c.id!==a.jstree.root&&(1===b.which||"touchstart"===b.type||"dragstart"===b.type)&&(this.settings.dnd.is_draggable===!0||a.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,d>1?this.get_top_selected(!0):[c],b))){if(m={jstree:!0,origin:this,obj:this.get_node(c,!0),nodes:d>1?this.get_top_selected():[c.id]},n=b.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),a.vakata.dnd.start(b,m,'
    '+e+'+
    ');a.vakata.dnd._trigger("start",b,{helper:a(),element:n,data:m})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(b){return b.preventDefault(),a.vakata.dnd._trigger("move",b,{helper:a(),element:n,data:m}),!1}).on("drop.jstree",function(b){return b.preventDefault(),a.vakata.dnd._trigger("stop",b,{helper:a(),element:n,data:m}),!1}.bind(this))},this.redraw_node=function(a,b,d,e){if(a=c.redraw_node.apply(this,arguments),a&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)a.setAttribute("draggable",!0);else{var f,g,h=null;for(f=0,g=a.childNodes.length;g>f;f++)if(a.childNodes[f]&&a.childNodes[f].className&&-1!==a.childNodes[f].className.indexOf("jstree-anchor")){h=a.childNodes[f];break}h&&h.setAttribute("draggable",!0)}return a}},a(function(){var c=!1,d=!1,e=!1,f=!1,g=a('
     
    ').hide();a(i).on("dragover.vakata.jstree",function(b){n&&a.vakata.dnd._trigger("move",b,{helper:a(),element:n,data:m})}).on("drop.vakata.jstree",function(b){n&&(a.vakata.dnd._trigger("stop",b,{helper:a(),element:n,data:m}),n=null,m=null)}).on("dnd_start.vakata.jstree",function(a,b){c=!1,e=!1,b&&b.data&&b.data.jstree&&g.appendTo(i.body)}).on("dnd_move.vakata.jstree",function(h,i){var j=i.event.target!==e.target;if(f&&(!i.event||"dragover"!==i.event.type||j)&&clearTimeout(f),i&&i.data&&i.data.jstree&&(!i.event.target.id||"jstree-marker"!==i.event.target.id)){e=i.event;var k=a.jstree.reference(i.event.target),l=!1,m=!1,n=!1,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;if(k&&k._data&&k._data.dnd)if(g.attr("class","jstree-"+k.get_theme()+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")),D=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey)),i.helper.children().attr("class","jstree-"+k.get_theme()+" jstree-"+k.get_theme()+"-"+k.get_theme_variant()+" "+(k.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[D?"show":"hide"](),i.event.target!==k.element[0]&&i.event.target!==k.get_container_ul()[0]||0!==k.get_container_ul().children().length){if(l=k.settings.dnd.large_drop_target?a(i.event.target).closest(".jstree-node").children(".jstree-anchor"):a(i.event.target).closest(".jstree-anchor"),l&&l.length&&l.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(m=l.offset(),n=(i.event.pageY!==b?i.event.pageY:i.event.originalEvent.pageY)-m.top,r=l.outerHeight(),u=r/3>n?["b","i","a"]:n>r-r/3?["a","i","b"]:n>r/2?["i","a","b"]:["i","b","a"],a.each(u,function(b,e){switch(e){case"b":p=m.left-6,q=m.top,s=k.get_parent(l),t=l.parent().index(),F="jstree-below";break;case"i":B=k.settings.dnd.inside_pos,C=k.get_node(l.parent()),p=m.left-2,q=m.top+r/2+1,s=C.id,t="first"===B?0:"last"===B?C.children.length:Math.min(B,C.children.length),F="jstree-inside";break;case"a":p=m.left-6,q=m.top+r,s=k.get_parent(l),t=l.parent().index()+1,F="jstree-above"}for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(y=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",z=t,"move_node"===y&&"a"===e&&i.data.origin&&i.data.origin===k&&s===k.get_parent(i.data.nodes[w])&&(A=k.get_node(s),z>a.inArray(i.data.nodes[w],A.children)&&(z-=1)),v=v&&(k&&k.settings&&k.settings.dnd&&k.settings.dnd.check_while_dragging===!1||k.check(y,i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],s,z,{dnd:!0,ref:k.get_node(l.parent()),pos:e,origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin})),!v){k&&k.last_error&&(d=k.last_error());break}return"i"===e&&l.parent().is(".jstree-closed")&&k.settings.dnd.open_timeout&&(!i.event||"dragover"!==i.event.type||j)&&(f&&clearTimeout(f),f=setTimeout(function(a,b){return function(){a.open_node(b)}}(k,l),k.settings.dnd.open_timeout)),v?(E=k.get_node(s,!0),E.hasClass(".jstree-dnd-parent")||(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),E.addClass("jstree-dnd-parent")),c={ins:k,par:s,pos:"i"!==e||"last"!==B||0!==t||k.is_loaded(C)?t:"last"},g.css({left:p+"px",top:q+"px"}).show(),g.removeClass("jstree-above jstree-inside jstree-below").addClass(F),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"),d={},u=!0,!1):void 0}),u===!0))return}else{for(v=!0,w=0,x=i.data.nodes.length;x>w;w++)if(v=v&&k.check(i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",i.data.origin&&i.data.origin!==k?i.data.origin.get_node(i.data.nodes[w]):i.data.nodes[w],a.jstree.root,"last",{dnd:!0,ref:k.get_node(a.jstree.root),pos:"i",origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==k,is_foreign:!i.data.origin}),!v)break;if(v)return c={ins:k,par:a.jstree.root,pos:"last"},g.hide(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=D?"copy":"move"))}a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),c=!1,i.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),i.event.originalEvent&&i.event.originalEvent.dataTransfer,g.hide()}}).on("dnd_scroll.vakata.jstree",function(a,b){b&&b.data&&b.data.jstree&&(g.hide(),c=!1,e=!1,b.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(b,h){if(a(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),f&&clearTimeout(f),h&&h.data&&h.data.jstree){g.hide().detach();var i,j,k=[];if(c){for(i=0,j=h.data.nodes.length;j>i;i++)k[i]=h.data.origin?h.data.origin.get_node(h.data.nodes[i]):h.data.nodes[i];c.ins[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(h.event.metaKey||h.event.ctrlKey))?"copy_node":"move_node"](k,c.par,c.pos,!1,!1,!1,h.data.origin)}else i=a(h.event.target).closest(".jstree"),i.length&&d&&d.error&&"check"===d.error&&(i=i.jstree(!0),i&&i.settings.core.error.call(this,d));e=!1,c=!1}}).on("keyup.jstree keydown.jstree",function(b,h){h=a.vakata.dnd._get(),h&&h.data&&h.data.jstree&&("keyup"===b.type&&27===b.which?(f&&clearTimeout(f),c=!1,d=!1,e=!1,f=!1,g.hide().detach(),a.vakata.dnd._clean()):(h.helper.find(".jstree-copy").first()[h.data.origin&&(h.data.origin.settings.dnd.always_copy||h.data.origin.settings.dnd.copy&&(b.metaKey||b.ctrlKey))?"show":"hide"](),e&&(e.metaKey=b.metaKey,e.ctrlKey=b.ctrlKey,a.vakata.dnd._trigger("move",e))))})}),function(a){a.vakata.html={div:a("
    "),escape:function(b){return a.vakata.html.div.text(b).html()},strip:function(b){return a.vakata.html.div.empty().append(a.parseHTML(b)).text()}};var c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};a.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(c,d,e){e===b&&(e=a.vakata.dnd._get()),e.event=d,a(i).triggerHandler("dnd_"+c+".vakata",e)},_get:function(){return{data:c.data,element:c.element,helper:c.helper}},_clean:function(){c.helper&&c.helper.remove(),c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),c={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},n=null,a(i).off("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).off("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop)},_scroll:function(b){if(!c.scroll_e||!c.scroll_l&&!c.scroll_t)return c.scroll_i&&(clearInterval(c.scroll_i),c.scroll_i=!1),!1;if(!c.scroll_i)return c.scroll_i=setInterval(a.vakata.dnd._scroll,100),!1;if(b===!0)return!1;var d=c.scroll_e.scrollTop(),e=c.scroll_e.scrollLeft();c.scroll_e.scrollTop(d+c.scroll_t*a.vakata.dnd.settings.scroll_speed),c.scroll_e.scrollLeft(e+c.scroll_l*a.vakata.dnd.settings.scroll_speed),(d!==c.scroll_e.scrollTop()||e!==c.scroll_e.scrollLeft())&&a.vakata.dnd._trigger("scroll",c.scroll_e)},start:function(b,d,e){"touchstart"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag&&a.vakata.dnd.stop({});try{b.currentTarget.unselectable="on",b.currentTarget.onselectstart=function(){return!1},b.currentTarget.style&&(b.currentTarget.style.touchAction="none",b.currentTarget.style.msTouchAction="none",b.currentTarget.style.MozUserSelect="none")}catch(f){}return c.init_x=b.pageX,c.init_y=b.pageY,c.data=d,c.is_down=!0,c.element=b.currentTarget,c.target=b.target,c.is_touch="touchstart"===b.type,e!==!1&&(c.helper=a("
    ").html(e).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),a(i).on("mousemove.vakata.jstree touchmove.vakata.jstree",a.vakata.dnd.drag),a(i).on("mouseup.vakata.jstree touchend.vakata.jstree",a.vakata.dnd.stop),!1},drag:function(b){if("touchmove"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_down){if(!c.is_drag){if(!(Math.abs(b.pageX-c.init_x)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)||Math.abs(b.pageY-c.init_y)>(c.is_touch?a.vakata.dnd.settings.threshold_touch:a.vakata.dnd.settings.threshold)))return;c.helper&&(c.helper.appendTo(i.body),c.helper_w=c.helper.outerWidth()),c.is_drag=!0,a(c.target).one("click.vakata",!1),a.vakata.dnd._trigger("start",b)}var d=!1,e=!1,f=!1,g=!1,h=!1,j=!1,k=!1,l=!1,m=!1,n=!1;return c.scroll_t=0,c.scroll_l=0,c.scroll_e=!1,a(a(b.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(a(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var d=a(this),e=d.offset();return this.scrollHeight>this.offsetHeight&&(e.top+d.height()-b.pageYthis.offsetWidth&&(e.left+d.width()-b.pageXg&&b.pageY-kg&&g-(b.pageY-k)j&&b.pageX-lj&&j-(b.pageX-l)f&&(m=f-50),h&&n+c.helper_w>h&&(n=h-(c.helper_w+2)),c.helper.css({left:n+"px",top:m+"px"})),a.vakata.dnd._trigger("move",b),!1}},stop:function(b){if("touchend"===b.type&&b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]&&(b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,b.target=i.elementFromPoint(b.originalEvent.changedTouches[0].pageX-window.pageXOffset,b.originalEvent.changedTouches[0].pageY-window.pageYOffset)),c.is_drag)b.target!==c.target&&a(c.target).off("click.vakata"),a.vakata.dnd._trigger("stop",b);else if("touchend"===b.type&&b.target===c.target){var d=setTimeout(function(){a(b.target).trigger("click")},100);a(b.target).one("click",function(){d&&clearTimeout(d)})}return a.vakata.dnd._clean(),!1}}}(a),a.jstree.defaults.massload=null,a.jstree.plugins.massload=function(b,c){this.init=function(a,b){this._data.massload={},c.init.call(this,a,b)},this._load_nodes=function(b,d,e,f){var g=this.settings.massload,h=[],i=this._model.data,j,k,l;if(!e){for(j=0,k=b.length;k>j;j++)(!i[b[j]]||!i[b[j]].state.loaded&&!i[b[j]].state.failed||f)&&(h.push(b[j]),l=this.get_node(b[j],!0),l&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},h.length){if(a.vakata.is_function(g))return g.call(this,h,function(a){var g,h;if(a)for(g in a)a.hasOwnProperty(g)&&(this._data.massload[g]=a[g]);for(g=0,h=b.length;h>g;g++)l=this.get_node(b[g],!0),l&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)}.bind(this));if("object"==typeof g&&g&&g.url)return g=a.extend(!0,{},g),a.vakata.is_function(g.url)&&(g.url=g.url.call(this,h)),a.vakata.is_function(g.data)&&(g.data=g.data.call(this,h)),a.ajax(g).done(function(a,g,h){var i,j;if(a)for(i in a)a.hasOwnProperty(i)&&(this._data.massload[i]=a[i]);for(i=0,j=b.length;j>i;i++)l=this.get_node(b[i],!0),l&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);c._load_nodes.call(this,b,d,e,f)}.bind(this)).fail(function(a){c._load_nodes.call(this,b,d,e,f)}.bind(this))}}return c._load_nodes.call(this,b,d,e,f)},this._load_node=function(b,d){var e=this._data.massload[b.id],f=null,g;return e?(f=this["string"==typeof e?"_append_html_data":"_append_json_data"](b,"string"==typeof e?a(a.parseHTML(e)).filter(function(){return 3!==this.nodeType}):e,function(a){d.call(this,a)}),g=this.get_node(b.id,!0),g&&g.length&&g.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[b.id],f):c._load_node.call(this,b,d)}},a.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},a.jstree.plugins.search=function(c,d){this.bind=function(){d.bind.call(this),this._data.search.str="",this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",function(b,c){if(this._data.search.som&&c.res.length){var d=this._model.data,e,f,g=[],h,i;for(e=0,f=c.res.length;f>e;e++)if(d[c.res[e]]&&!d[c.res[e]].state.hidden&&(g.push(c.res[e]),g=g.concat(d[c.res[e]].parents),this._data.search.smc))for(h=0,i=d[c.res[e]].children_d.length;i>h;h++)d[d[c.res[e]].children_d[h]]&&!d[d[c.res[e]].children_d[h]].state.hidden&&g.push(d[c.res[e]].children_d[h]);g=a.vakata.array_remove_item(a.vakata.array_unique(g),a.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(g,!0),this.redraw(!0)}}.bind(this)).on("clear_search.jstree",function(a,b){this._data.search.som&&b.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}.bind(this))},this.search=function(c,d,e,f,g,h){if(c===!1||""===a.vakata.trim(c.toString()))return this.clear_search();f=this.get_node(f),f=f&&f.id?f.id:null,c=c.toString();var i=this.settings.search,j=i.ajax?i.ajax:!1,k=this._model.data,l=null,m=[],n=[],o,p;if(this._data.search.res.length&&!g&&this.clear_search(),e===b&&(e=i.show_only_matches),h===b&&(h=i.show_only_matches_children),!d&&j!==!1)return a.vakata.is_function(j)?j.call(this,c,function(b){b&&b.d&&(b=b.d),this._load_nodes(a.vakata.is_array(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})}.bind(this),f):(j=a.extend({},j),j.data||(j.data={}),j.data.str=c,f&&(j.data.inside=f),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=a.ajax(j).fail(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(j)},this.settings.core.error.call(this,this._data.core.last_error)}.bind(this)).done(function(b){b&&b.d&&(b=b.d),this._load_nodes(a.vakata.is_array(b)?a.vakata.array_unique(b):[],function(){this.search(c,!0,e,f,g,h)})}.bind(this)),this._data.search.lastRequest);if(g||(this._data.search.str=c,this._data.search.dom=a(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=e,this._data.search.smc=h),l=new a.vakata.search(c,!0,{caseSensitive:i.case_sensitive,fuzzy:i.fuzzy}),a.each(k[f?f:a.jstree.root].children_d,function(a,b){var d=k[b];d.text&&!d.state.hidden&&(!i.search_leaves_only||d.state.loaded&&0===d.children.length)&&(i.search_callback&&i.search_callback.call(this,c,d)||!i.search_callback&&l.search(d.text).isMatch)&&(m.push(b),n=n.concat(d.parents))}),m.length){for(n=a.vakata.array_unique(n),o=0,p=n.length;p>o;o++)n[o]!==a.jstree.root&&k[n[o]]&&this.open_node(n[o],null,0)===!0&&this._data.search.opn.push(n[o]);g?(this._data.search.dom=this._data.search.dom.add(a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=a.vakata.array_unique(this._data.search.res.concat(m))):(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(m,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=m),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:c,res:this._data.search.res,show_only_matches:e})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=a(this.element[0].querySelectorAll("#"+a.map(this._data.search.res,function(b){return-1!=="0123456789".indexOf(b[0])?"\\3"+b[0]+" "+b.substr(1).replace(a.jstree.idregex,"\\$&"):b.replace(a.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=a()},this.redraw_node=function(b,c,e,f){if(b=d.redraw_node.apply(this,arguments),b&&-1!==a.inArray(b.id,this._data.search.res)){var g,h,i=null;for(g=0,h=b.childNodes.length;h>g;g++)if(b.childNodes[g]&&b.childNodes[g].className&&-1!==b.childNodes[g].className.indexOf("jstree-anchor")){i=b.childNodes[g];break}i&&(i.className+=" jstree-search")}return b}},function(a){a.vakata.search=function(b,c,d){d=d||{},d=a.extend({},a.vakata.search.defaults,d),d.fuzzy!==!1&&(d.fuzzy=!0),b=d.caseSensitive?b:b.toLowerCase();var e=d.location,f=d.distance,g=d.threshold,h=b.length,i,j,k,l;return h>32&&(d.fuzzy=!1),d.fuzzy&&(i=1<c;c++)a[b.charAt(c)]=0;for(c=0;h>c;c++)a[b.charAt(c)]|=1<c;c++){o=0,p=q;while(p>o)k(c,e+p)<=m?o=p:q=p,p=Math.floor((q-o)/2+o);for(q=p,s=Math.max(1,e-p+1),t=Math.min(e+p,l)+h,u=new Array(t+2),u[t+1]=(1<=s;f--)if(v=j[a.charAt(f-1)],0===c?u[f]=(u[f+1]<<1|1)&v:u[f]=(u[f+1]<<1|1)&v|((r[f+1]|r[f])<<1|1)|r[f+1],u[f]&i&&(w=k(c,f-1),m>=w)){if(m=w,n=f-1,x.push(n),!(n>e))break;s=Math.max(1,2*e-n)}if(k(c+1,e)>m)break;r=u}return{isMatch:n>=0,score:w}},c===!0?{search:l}:l(c)},a.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(a),a.jstree.defaults.sort=function(a,b){return this.get_text(a)>this.get_text(b)?1:-1},a.jstree.plugins.sort=function(a,b){this.bind=function(){b.bind.call(this),this.element.on("model.jstree",function(a,b){this.sort(b.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(a,b){this.sort(b.parent||b.node.parent,!1),this.redraw_node(b.parent||b.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(a,b){this.sort(b.parent,!1),this.redraw_node(b.parent,!0)}.bind(this))},this.sort=function(a,b){var c,d;if(a=this.get_node(a),a&&a.children&&a.children.length&&(a.children.sort(this.settings.sort.bind(this)),b))for(c=0,d=a.children_d.length;d>c;c++)this.sort(a.children_d[c],!1)}};var o=!1;a.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},a.jstree.plugins.state=function(b,c){this.bind=function(){c.bind.call(this);var a=function(){this.element.on(this.settings.state.events,function(){o&&clearTimeout(o),o=setTimeout(function(){this.save_state()}.bind(this),100)}.bind(this)),this.trigger("state_ready")}.bind(this);this.element.on("ready.jstree",function(b,c){this.element.one("restore_state.jstree",a),this.restore_state()||a()}.bind(this))},this.save_state=function(){var b=this.get_state();this.settings.state.preserve_loaded||delete b.core.loaded;var c={state:b,ttl:this.settings.state.ttl,sec:+new Date};a.vakata.storage.set(this.settings.state.key,JSON.stringify(c))},this.restore_state=function(){var b=a.vakata.storage.get(this.settings.state.key);if(b)try{b=JSON.parse(b)}catch(c){return!1}return b&&b.ttl&&b.sec&&+new Date-b.sec>b.ttl?!1:(b&&b.state&&(b=b.state),b&&a.vakata.is_function(this.settings.state.filter)&&(b=this.settings.state.filter.call(this,b)),b?(this.settings.state.preserve_loaded||delete b.core.loaded,this.element.one("set_state.jstree",function(c,d){d.instance.trigger("restore_state",{state:a.extend(!0,{},b)})}),this.set_state(b),!0):!1)},this.clear_state=function(){return a.vakata.storage.del(this.settings.state.key)}},function(a,b){a.vakata.storage={set:function(a,b){return window.localStorage.setItem(a,b)},get:function(a){return window.localStorage.getItem(a)},del:function(a){return window.localStorage.removeItem(a)}}}(a),a.jstree.defaults.types={ +"default":{}},a.jstree.defaults.types[a.jstree.root]={},a.jstree.plugins.types=function(c,d){this.init=function(c,e){var f,g;if(e&&e.types&&e.types["default"])for(f in e.types)if("default"!==f&&f!==a.jstree.root&&e.types.hasOwnProperty(f))for(g in e.types["default"])e.types["default"].hasOwnProperty(g)&&e.types[f][g]===b&&(e.types[f][g]=e.types["default"][g]);d.init.call(this,c,e),this._model.data[a.jstree.root].type=a.jstree.root},this.refresh=function(b,c){d.refresh.call(this,b,c),this._model.data[a.jstree.root].type=a.jstree.root},this.bind=function(){this.element.on("model.jstree",function(c,d){var e=this._model.data,f=d.nodes,g=this.settings.types,h,i,j="default",k;for(h=0,i=f.length;i>h;h++){if(j="default",e[f[h]].original&&e[f[h]].original.type&&g[e[f[h]].original.type]&&(j=e[f[h]].original.type),e[f[h]].data&&e[f[h]].data.jstree&&e[f[h]].data.jstree.type&&g[e[f[h]].data.jstree.type]&&(j=e[f[h]].data.jstree.type),e[f[h]].type=j,e[f[h]].icon===!0&&g[j].icon!==b&&(e[f[h]].icon=g[j].icon),g[j].li_attr!==b&&"object"==typeof g[j].li_attr)for(k in g[j].li_attr)if(g[j].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].li_attr[k]===b?e[f[h]].li_attr[k]=g[j].li_attr[k]:"class"===k&&(e[f[h]].li_attr["class"]=g[j].li_attr["class"]+" "+e[f[h]].li_attr["class"])}if(g[j].a_attr!==b&&"object"==typeof g[j].a_attr)for(k in g[j].a_attr)if(g[j].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[f[h]].a_attr[k]===b?e[f[h]].a_attr[k]=g[j].a_attr[k]:"href"===k&&"#"===e[f[h]].a_attr[k]?e[f[h]].a_attr.href=g[j].a_attr.href:"class"===k&&(e[f[h]].a_attr["class"]=g[j].a_attr["class"]+" "+e[f[h]].a_attr["class"])}}e[a.jstree.root].type=a.jstree.root}.bind(this)),d.bind.call(this)},this.get_json=function(b,c,e){var f,g,h=this._model.data,i=c?a.extend(!0,{},c,{no_id:!1}):{},j=d.get_json.call(this,b,i,e);if(j===!1)return!1;if(a.vakata.is_array(j))for(f=0,g=j.length;g>f;f++)j[f].type=j[f].id&&h[j[f].id]&&h[j[f].id].type?h[j[f].id].type:"default",c&&c.no_id&&(delete j[f].id,j[f].li_attr&&j[f].li_attr.id&&delete j[f].li_attr.id,j[f].a_attr&&j[f].a_attr.id&&delete j[f].a_attr.id);else j.type=j.id&&h[j.id]&&h[j.id].type?h[j.id].type:"default",c&&c.no_id&&(j=this._delete_ids(j));return j},this._delete_ids=function(b){if(a.vakata.is_array(b)){for(var c=0,d=b.length;d>c;c++)b[c]=this._delete_ids(b[c]);return b}return delete b.id,b.li_attr&&b.li_attr.id&&delete b.li_attr.id,b.a_attr&&b.a_attr.id&&delete b.a_attr.id,b.children&&a.vakata.is_array(b.children)&&(b.children=this._delete_ids(b.children)),b},this.check=function(c,e,f,g,h){if(d.check.call(this,c,e,f,g,h)===!1)return!1;e=e&&e.id?e:this.get_node(e),f=f&&f.id?f:this.get_node(f);var i=e&&e.id?h&&h.origin?h.origin:a.jstree.reference(e.id):null,j,k,l,m;switch(i=i&&i._model&&i._model.data?i._model.data:null,c){case"create_node":case"move_node":case"copy_node":if("move_node"!==c||-1===a.inArray(e.id,f.children)){if(j=this.get_rules(f),j.max_children!==b&&-1!==j.max_children&&j.max_children===f.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(j.valid_children!==b&&-1!==j.valid_children&&-1===a.inArray(e.type||"default",j.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+c,data:JSON.stringify({chk:c,pos:g,obj:e&&e.id?e.id:!1,par:f&&f.id?f.id:!1})},!1;if(i&&e.children_d&&e.parents){for(k=0,l=0,m=e.children_d.length;m>l;l++)k=Math.max(k,i[e.children_d[l]].parents.length);k=k-e.parents.length+1}(0>=k||k===b)&&(k=1);do{if(j.max_depth!==b&&-1!==j.max_depth&&j.max_depthg;g++)this.set_type(c[g],d);return!0}if(f=this.settings.types,c=this.get_node(c),!f[d]||!c)return!1;if(l=this.get_node(c,!0),l&&l.length&&(m=l.children(".jstree-anchor")),i=c.type,j=this.get_icon(c),c.type=d,(j===!0||!f[i]||f[i].icon!==b&&j===f[i].icon)&&this.set_icon(c,f[d].icon!==b?f[d].icon:!0),f[i]&&f[i].li_attr!==b&&"object"==typeof f[i].li_attr)for(k in f[i].li_attr)if(f[i].li_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].li_attr["class"]=(e[c.id].li_attr["class"]||"").replace(f[i].li_attr[k],""),l&&l.removeClass(f[i].li_attr[k])):e[c.id].li_attr[k]===f[i].li_attr[k]&&(e[c.id].li_attr[k]=null,l&&l.removeAttr(k))}if(f[i]&&f[i].a_attr!==b&&"object"==typeof f[i].a_attr)for(k in f[i].a_attr)if(f[i].a_attr.hasOwnProperty(k)){if("id"===k)continue;"class"===k?(e[c.id].a_attr["class"]=(e[c.id].a_attr["class"]||"").replace(f[i].a_attr[k],""),m&&m.removeClass(f[i].a_attr[k])):e[c.id].a_attr[k]===f[i].a_attr[k]&&("href"===k?(e[c.id].a_attr[k]="#",m&&m.attr("href","#")):(delete e[c.id].a_attr[k],m&&m.removeAttr(k)))}if(f[d].li_attr!==b&&"object"==typeof f[d].li_attr)for(k in f[d].li_attr)if(f[d].li_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].li_attr[k]===b?(e[c.id].li_attr[k]=f[d].li_attr[k],l&&("class"===k?l.addClass(f[d].li_attr[k]):l.attr(k,f[d].li_attr[k]))):"class"===k&&(e[c.id].li_attr["class"]=f[d].li_attr[k]+" "+e[c.id].li_attr["class"],l&&l.addClass(f[d].li_attr[k]))}if(f[d].a_attr!==b&&"object"==typeof f[d].a_attr)for(k in f[d].a_attr)if(f[d].a_attr.hasOwnProperty(k)){if("id"===k)continue;e[c.id].a_attr[k]===b?(e[c.id].a_attr[k]=f[d].a_attr[k],m&&("class"===k?m.addClass(f[d].a_attr[k]):m.attr(k,f[d].a_attr[k]))):"href"===k&&"#"===e[c.id].a_attr[k]?(e[c.id].a_attr.href=f[d].a_attr.href,m&&m.attr("href",f[d].a_attr.href)):"class"===k&&(e[c.id].a_attr["class"]=f[d].a_attr["class"]+" "+e[c.id].a_attr["class"],m&&m.addClass(f[d].a_attr[k]))}return!0}},a.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(a,b){return a+" ("+b+")"}},a.jstree.plugins.unique=function(c,d){this.check=function(b,c,e,f,g){if(d.check.call(this,b,c,e,f,g)===!1)return!1;if(c=c&&c.id?c:this.get_node(c),e=e&&e.id?e:this.get_node(e),!e||!e.children)return!0;var h="rename_node"===b?f:c.text,i=[],j=this.settings.unique.case_sensitive,k=this.settings.unique.trim_whitespace,l=this._model.data,m,n,o;for(m=0,n=e.children.length;n>m;m++)o=l[e.children[m]].text,j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),i.push(o);switch(j||(h=h.toLowerCase()),k&&(h=h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),b){case"delete_node":return!0;case"rename_node":return o=c.text||"",j||(o=o.toLowerCase()),k&&(o=o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),m=-1===a.inArray(h,i)||c.text&&o===h,m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"create_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"copy_node":return m=-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m;case"move_node":return m=c.parent===e.id&&(!g||!g.is_multi)||-1===a.inArray(h,i),m||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+h+" already exists. Preventing: "+b,data:JSON.stringify({chk:b,pos:f,obj:c&&c.id?c.id:!1,par:e&&e.id?e.id:!1})}),m}return!0},this.create_node=function(c,e,f,g,h){if(!e||e.text===b){if(null===c&&(c=a.jstree.root),c=this.get_node(c),!c)return d.create_node.call(this,c,e,f,g,h);if(f=f===b?"last":f,!f.toString().match(/^(before|after)$/)&&!h&&!this.is_loaded(c))return d.create_node.call(this,c,e,f,g,h);e||(e={});var i,j,k,l,m,n=this._model.data,o=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,q=this.settings.unique.duplicate,r;for(j=i=this.get_string("New node"),k=[],l=0,m=c.children.length;m>l;l++)r=n[c.children[l]].text,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),k.push(r);l=1,r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));while(-1!==a.inArray(r,k))j=q.call(this,i,++l).toString(),r=j,o||(r=r.toLowerCase()),p&&(r=r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));e.text=j}return d.create_node.call(this,c,e,f,g,h)}};var p=i.createElement("DIV");if(p.setAttribute("unselectable","on"),p.setAttribute("role","presentation"),p.className="jstree-wholerow",p.innerHTML=" ",a.jstree.plugins.wholerow=function(b,c){this.bind=function(){c.bind.call(this),this.element.on("ready.jstree set_state.jstree",function(){this.hide_dots()}.bind(this)).on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-wholerow-ul")}.bind(this)).on("deselect_all.jstree",function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}.bind(this)).on("changed.jstree",function(a,b){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var c=!1,d,e;for(d=0,e=b.selected.length;e>d;d++)c=this.get_node(b.selected[d],!0),c&&c.length&&c.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("open_node.jstree",function(a,b){this.get_node(b.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("hover_node.jstree dehover_node.jstree",function(a,b){"hover_node"===a.type&&this.is_disabled(b.node)||this.get_node(b.node,!0).children(".jstree-wholerow")["hover_node"===a.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}.bind(this)).on("contextmenu.jstree",".jstree-wholerow",function(b){if(this._data.contextmenu){b.preventDefault();var c=a.Event("contextmenu",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey,pageX:b.pageX,pageY:b.pageY});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c)}}.bind(this)).on("click.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(b){b.stopImmediatePropagation();var c=a.Event("dblclick",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",function(b){b.stopImmediatePropagation();var c=a.Event("click",{metaKey:b.metaKey,ctrlKey:b.ctrlKey,altKey:b.altKey,shiftKey:b.shiftKey});a(b.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(c).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(a){return a.stopImmediatePropagation(),this.is_disabled(a.currentTarget)||this.hover_node(a.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(a){this.dehover_node(a.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),c.teardown.call(this)},this.redraw_node=function(b,d,e,f){if(b=c.redraw_node.apply(this,arguments)){var g=p.cloneNode(!0);-1!==a.inArray(b.id,this._data.core.selected)&&(g.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===b.id&&(g.className+=" jstree-wholerow-hovered"),b.insertBefore(g,b.childNodes[0])}return b}},window.customElements&&Object&&Object.create){var q=Object.create(HTMLElement.prototype);q.createdCallback=function(){var b={core:{},plugins:[]},c;for(c in a.jstree.plugins)a.jstree.plugins.hasOwnProperty(c)&&this.attributes[c]&&(b.plugins.push(c),this.getAttribute(c)&&JSON.parse(this.getAttribute(c))&&(b[c]=JSON.parse(this.getAttribute(c))));for(c in a.jstree.defaults.core)a.jstree.defaults.core.hasOwnProperty(c)&&this.attributes[c]&&(b.core[c]=JSON.parse(this.getAttribute(c))||this.getAttribute(c));a(this).jstree(b)};try{window.customElements.define("vakata-jstree",function(){},{prototype:q})}catch(r){}}}}); + +/* moment.js */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11xe(n[pe],n[ve])?ke:n[Me]<0||24je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;cn.valueOf():n.valueOf()"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&01)throw new TypeError("isEnabled expects a single character string parameter");switch(e){case"y":return-1!==d.indexOf("Y");case"M":return-1!==d.indexOf("M");case"d":return-1!==d.toLowerCase().indexOf("d");case"h":case"H":return-1!==d.toLowerCase().indexOf("h");case"m":return-1!==d.indexOf("m");case"s":return-1!==d.indexOf("s");default:return!1}},M=function(){return T("h")||T("m")||T("s")},S=function(){return T("y")||T("M")||T("d")},O=function(){var t=e("").append(e("").append(e("").addClass("prev").attr("data-action","previous").append(e("").addClass(n.icons.previous))).append(e("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",n.calendarWeeks?"6":"5")).append(e("").addClass("next").attr("data-action","next").append(e("").addClass(n.icons.next)))),a=e("").append(e("").append(e("").attr("colspan",n.calendarWeeks?"8":"7")));return[e("
    ").addClass("datepicker-days").append(e("").addClass("table-condensed").append(t).append(e(""))),e("
    ").addClass("datepicker-months").append(e("
    ").addClass("table-condensed").append(t.clone()).append(a.clone())),e("
    ").addClass("datepicker-years").append(e("
    ").addClass("table-condensed").append(t.clone()).append(a.clone())),e("
    ").addClass("datepicker-decades").append(e("
    ").addClass("table-condensed").append(t.clone()).append(a.clone()))]},P=function(){var t=e(""),a=e(""),r=e("");return T("h")&&(t.append(e("
    ").append(e("").attr({href:"#",tabindex:"-1",title:n.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("").addClass(n.icons.up)))),a.append(e("").append(e("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:n.tooltips.pickHour}).attr("data-action","showHours"))),r.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:n.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("").addClass(n.icons.down))))),T("m")&&(T("h")&&(t.append(e("").addClass("separator")),a.append(e("").addClass("separator").html(":")),r.append(e("").addClass("separator"))),t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:n.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("").addClass(n.icons.up)))),a.append(e("").append(e("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:n.tooltips.pickMinute}).attr("data-action","showMinutes"))),r.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:n.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("").addClass(n.icons.down))))),T("s")&&(T("m")&&(t.append(e("").addClass("separator")),a.append(e("").addClass("separator").html(":")),r.append(e("").addClass("separator"))),t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:n.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(e("").addClass(n.icons.up)))),a.append(e("").append(e("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:n.tooltips.pickSecond}).attr("data-action","showSeconds"))),r.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:n.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(e("").addClass(n.icons.down))))),s||(t.append(e("").addClass("separator")),a.append(e("").append(e("").addClass("separator"))),e("
    ").addClass("timepicker-picker").append(e("").addClass("table-condensed").append([t,a,r]))},E=function(){var t=e("
    ").addClass("timepicker-hours").append(e("
    ").addClass("table-condensed")),a=e("
    ").addClass("timepicker-minutes").append(e("
    ").addClass("table-condensed")),n=e("
    ").addClass("timepicker-seconds").append(e("
    ").addClass("table-condensed")),r=[P()];return T("h")&&r.push(t),T("m")&&r.push(a),T("s")&&r.push(n),r},H=function(){var t=[];return n.showTodayButton&&t.push(e("
    ").append(e("").attr({"data-action":"today",title:n.tooltips.today}).append(e("").addClass(n.icons.today)))),!n.sideBySide&&S()&&M()&&t.push(e("").append(e("").attr({"data-action":"togglePicker",title:n.tooltips.selectTime}).append(e("").addClass(n.icons.time)))),n.showClear&&t.push(e("").append(e("").attr({"data-action":"clear",title:n.tooltips.clear}).append(e("").addClass(n.icons.clear)))),n.showClose&&t.push(e("").append(e("").attr({"data-action":"close",title:n.tooltips.close}).append(e("").addClass(n.icons.close)))),e("").addClass("table-condensed").append(e("").append(e("").append(t)))},I=function(){var t=e("
    ").addClass("bootstrap-datetimepicker-widget dropdown-menu"),a=e("
    ").addClass("datepicker").append(O()),r=e("
    ").addClass("timepicker").append(E()),i=e("
      ").addClass("list-unstyled"),o=e("
    • ").addClass("picker-switch"+(n.collapse?" accordion-toggle":"")).append(H());return n.inline&&t.removeClass("dropdown-menu"),s&&t.addClass("usetwentyfour"),T("s")&&!s&&t.addClass("wider"),n.sideBySide&&S()&&M()?(t.addClass("timepicker-sbs"),"top"===n.toolbarPlacement&&t.append(o),t.append(e("
      ").addClass("row").append(a.addClass("col-md-6")).append(r.addClass("col-md-6"))),"bottom"===n.toolbarPlacement&&t.append(o),t):("top"===n.toolbarPlacement&&i.append(o),S()&&i.append(e("
    • ").addClass(n.collapse&&M()?"collapse show":"").append(a)),"default"===n.toolbarPlacement&&i.append(o),M()&&i.append(e("
    • ").addClass(n.collapse&&S()?"collapse":"").append(r)),"bottom"===n.toolbarPlacement&&i.append(o),t.append(i))},Y=function(){var t,r=(f||a).position(),i=(f||a).offset(),o=n.widgetPositioning.vertical,s=n.widgetPositioning.horizontal;if(n.widgetParent)t=n.widgetParent.append(m);else if(a.is("input"))t=a.after(m).parent();else{if(n.inline)return void(t=a.append(m));t=a,a.children().first().after(m)}if("auto"===o&&(o=i.top+1.5*m.height()>=e(window).height()+e(window).scrollTop()&&m.height()+a.outerHeight()e(window).width()?"right":"left"),"top"===o?m.addClass("top").removeClass("bottom"):m.addClass("bottom").removeClass("top"),"right"===s?m.addClass("pull-right"):m.removeClass("pull-right"),"static"===t.css("position")&&(t=t.parents().filter(function(){return"static"!==e(this).css("position")}).first()),0===t.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");m.css({top:"top"===o?"auto":r.top+a.outerHeight(),bottom:"top"===o?t.outerHeight()-(t===a?0:r.top):"auto",left:"left"===s?t===a?0:r.left:"auto",right:"left"===s?"auto":t.outerWidth()-a.outerWidth()-(t===a?0:r.left)})},q=function(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||a.trigger(e)},B=function(e){"y"===e&&(e="YYYY"),q({type:"dp.update",change:e,viewDate:i.clone()})},j=function(e){m&&(e&&(p=Math.max(h,Math.min(3,p+e))),m.find(".datepicker > div").hide().filter(".datepicker-"+y[p].clsName).show())},A=function(){var t=e("
    "),a=i.clone().startOf("w").startOf("d");for(!0===n.calendarWeeks&&t.append(e(""),n.calendarWeeks&&a.append('"),l.push(a)),p=["day"],t.isBefore(i,"M")&&p.push("old"),t.isAfter(i,"M")&&p.push("new"),t.isSame(r,"d")&&!u&&p.push("active"),N(t,"d")||p.push("disabled"),t.isSame(x(),"d")&&p.push("today"),0!==t.day()&&6!==t.day()||p.push("weekend"),q({type:"dp.classify",date:t,classNames:p}),a.append('"),t.add(1,"d");s.find("tbody").empty().append(l),Z(),R(),Q()}},G=function(){var t=m.find(".timepicker-hours table"),a=i.clone().startOf("d"),n=[],r=e("");for(i.hour()>11&&!s&&a.hour(12);a.isSame(i,"d")&&(s||i.hour()<12&&a.hour()<12||i.hour()>11);)a.hour()%4==0&&(r=e(""),n.push(r)),r.append('"),a.add(1,"h");t.empty().append(n)},J=function(){for(var t=m.find(".timepicker-minutes table"),a=i.clone().startOf("h"),r=[],o=e(""),s=1===n.stepping?5:n.stepping;i.isSame(a,"h");)a.minute()%(4*s)==0&&(o=e(""),r.push(o)),o.append('"),a.add(s,"m");t.empty().append(r)},K=function(){for(var t=m.find(".timepicker-seconds table"),a=i.clone().startOf("m"),n=[],r=e("");i.isSame(a,"m");)a.second()%20==0&&(r=e(""),n.push(r)),r.append('"),a.add(5,"s");t.empty().append(n)},X=function(){var e,t,a=m.find(".timepicker span[data-time-component]");s||(e=m.find(".timepicker [data-action=togglePeriod]"),t=r.clone().add(r.hours()>=12?-12:12,"h"),e.text(r.format("A")),N(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),a.filter("[data-time-component=hours]").text(r.format(s?"HH":"hh")),a.filter("[data-time-component=minutes]").text(r.format("mm")),a.filter("[data-time-component=seconds]").text(r.format("ss")),G(),J(),K()},$=function(){m&&(U(),X())},_=function(e){var t=u?null:r;if(!e)return u=!0,o.val(""),a.data("date",""),q({type:"dp.change",date:!1,oldDate:t}),void $();if(e=e.clone().locale(n.locale),C()&&e.tz(n.timeZone),1!==n.stepping)for(e.minutes(Math.round(e.minutes()/n.stepping)*n.stepping).seconds(0);n.minDate&&e.isBefore(n.minDate);)e.add(n.stepping,"minutes");N(e)?(i=(r=e).clone(),o.val(r.format(d)),a.data("date",r.format(d)),u=!1,$(),q({type:"dp.change",date:r.clone(),oldDate:t})):(n.keepInvalid?q({type:"dp.change",date:e,oldDate:t}):o.val(u?"":r.format(d)),q({type:"dp.error",date:e,oldDate:t}))},ee=function(){var t=!1;return m?(m.find(".collapse").each(function(){var a=e(this).data("collapse");return!a||!a.transitioning||(t=!0,!1)}),t?c:(f&&f.hasClass("btn")&&f.toggleClass("active"),m.hide(),e(window).off("resize",Y),m.off("click","[data-action]"),m.off("mousedown",!1),m.remove(),m=!1,q({type:"dp.hide",date:r.clone()}),o.blur(),i=r.clone(),c)):c},te=function(){_(null)},ae=function(e){return void 0===n.parseInputDate?(!t.isMoment(e)||e instanceof Date)&&(e=x(e)):e=n.parseInputDate(e),e},ne={next:function(){var e=y[p].navFnc;i.add(y[p].navStep,e),U(),B(e)},previous:function(){var e=y[p].navFnc;i.subtract(y[p].navStep,e),U(),B(e)},pickerSwitch:function(){j(1)},selectMonth:function(t){var a=e(t.target).closest("tbody").find("span").index(e(t.target));i.month(a),p===h?(_(r.clone().year(i.year()).month(i.month())),n.inline||ee()):(j(-1),U()),B("M")},selectYear:function(t){var a=parseInt(e(t.target).text(),10)||0;i.year(a),p===h?(_(r.clone().year(i.year())),n.inline||ee()):(j(-1),U()),B("YYYY")},selectDecade:function(t){var a=parseInt(e(t.target).data("selection"),10)||0;i.year(a),p===h?(_(r.clone().year(i.year())),n.inline||ee()):(j(-1),U()),B("YYYY")},selectDay:function(t){var a=i.clone();e(t.target).is(".old")&&a.subtract(1,"M"),e(t.target).is(".new")&&a.add(1,"M"),_(a.date(parseInt(e(t.target).text(),10))),M()||n.keepOpen||n.inline||ee()},incrementHours:function(){var e=r.clone().add(1,"h");N(e,"h")&&_(e)},incrementMinutes:function(){var e=r.clone().add(n.stepping,"m");N(e,"m")&&_(e)},incrementSeconds:function(){var e=r.clone().add(1,"s");N(e,"s")&&_(e)},decrementHours:function(){var e=r.clone().subtract(1,"h");N(e,"h")&&_(e)},decrementMinutes:function(){var e=r.clone().subtract(n.stepping,"m");N(e,"m")&&_(e)},decrementSeconds:function(){var e=r.clone().subtract(1,"s");N(e,"s")&&_(e)},togglePeriod:function(){_(r.clone().add(r.hours()>=12?-12:12,"h"))},togglePicker:function(t){var a,r=e(t.target),i=r.closest("ul"),o=i.find(".show"),s=i.find(".collapse:not(.show)");if(o&&o.length){if((a=o.data("collapse"))&&a.transitioning)return;o.collapse?(o.collapse("hide"),s.collapse("show")):(o.removeClass("show"),s.addClass("show")),r.is("i")?r.toggleClass(n.icons.time+" "+n.icons.date):r.find("i").toggleClass(n.icons.time+" "+n.icons.date)}},showPicker:function(){m.find(".timepicker > div:not(.timepicker-picker)").hide(),m.find(".timepicker .timepicker-picker").show()},showHours:function(){m.find(".timepicker .timepicker-picker").hide(),m.find(".timepicker .timepicker-hours").show()},showMinutes:function(){m.find(".timepicker .timepicker-picker").hide(),m.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){m.find(".timepicker .timepicker-picker").hide(),m.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var a=parseInt(e(t.target).text(),10);s||(r.hours()>=12?12!==a&&(a+=12):12===a&&(a=0)),_(r.clone().hours(a)),ne.showPicker.call(c)},selectMinute:function(t){_(r.clone().minutes(parseInt(e(t.target).text(),10))),ne.showPicker.call(c)},selectSecond:function(t){_(r.clone().seconds(parseInt(e(t.target).text(),10))),ne.showPicker.call(c)},clear:te,today:function(){var e=x();N(e,"d")&&_(e)},close:ee},re=function(t){return!e(t.currentTarget).is(".disabled")&&(ne[e(t.currentTarget).data("action")].apply(c,arguments),!1)},ie=function(){var t,a={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}};return o.prop("disabled")||!n.ignoreReadonly&&o.prop("readonly")||m?c:(void 0!==o.val()&&0!==o.val().trim().length?_(ae(o.val().trim())):u&&n.useCurrent&&(n.inline||o.is("input")&&0===o.val().trim().length)&&(t=x(),"string"==typeof n.useCurrent&&(t=a[n.useCurrent](t)),_(t)),m=I(),A(),V(),m.find(".timepicker-hours").hide(),m.find(".timepicker-minutes").hide(),m.find(".timepicker-seconds").hide(),$(),j(),e(window).on("resize",Y),m.on("click","[data-action]",re),m.on("mousedown",!1),f&&f.hasClass("btn")&&f.toggleClass("active"),Y(),m.show(),n.focusOnShow&&!o.is(":focus")&&o.focus(),q({type:"dp.show"}),c)},oe=function(){return m?ee():ie()},se=function(e){var t,a,r,i,o=null,s=[],d={},l=e.which;D[l]="p";for(t in D)D.hasOwnProperty(t)&&"p"===D[t]&&(s.push(t),parseInt(t,10)!==l&&(d[t]=!0));for(t in n.keyBinds)if(n.keyBinds.hasOwnProperty(t)&&"function"==typeof n.keyBinds[t]&&(r=t.split(" ")).length===s.length&&k[l]===r[r.length-1]){for(i=!0,a=r.length-2;a>=0;a--)if(!(k[r[a]]in d)){i=!1;break}if(i){o=n.keyBinds[t];break}}o&&(o.call(c,m),e.stopPropagation(),e.preventDefault())},de=function(e){D[e.which]="r",e.stopPropagation(),e.preventDefault()},le=function(t){var a=e(t.target).val().trim(),n=a?ae(a):null;return _(n),t.stopImmediatePropagation(),!1},pe=function(){o.off({change:le,blur:blur,keydown:se,keyup:de,focus:n.allowInputToggle?ee:""}),a.is("input")?o.off({focus:ie}):f&&(f.off("click",oe),f.off("mousedown",!1))},ce=function(t){var a={};return e.each(t,function(){var e=ae(this);e.isValid()&&(a[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(a).length&&a},ue=function(t){var a={};return e.each(t,function(){a[this]=!0}),!!Object.keys(a).length&&a},fe=function(){var e=n.format||"L LT";d=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(r.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return r.localeData().longDateFormat(e)||e})}),(l=n.extraFormats?n.extraFormats.slice():[]).indexOf(e)<0&&l.indexOf(d)<0&&l.push(d),s=d.toLowerCase().indexOf("a")<1&&d.replace(/\[.*?\]/g,"").indexOf("h")<1,T("y")&&(h=2),T("M")&&(h=1),T("d")&&(h=0),p=Math.max(h,p),u||_(r)};if(c.destroy=function(){ee(),pe(),a.removeData("DateTimePicker"),a.removeData("date")},c.toggle=oe,c.show=ie,c.hide=ee,c.disable=function(){return ee(),f&&f.hasClass("btn")&&f.addClass("disabled"),o.prop("disabled",!0),c},c.enable=function(){return f&&f.hasClass("btn")&&f.removeClass("disabled"),o.prop("disabled",!1),c},c.ignoreReadonly=function(e){if(0===arguments.length)return n.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return n.ignoreReadonly=e,c},c.options=function(t){if(0===arguments.length)return e.extend(!0,{},n);if(!(t instanceof Object))throw new TypeError("options() options parameter should be an object");return e.extend(!0,n,t),e.each(n,function(e,t){if(void 0===c[e])throw new TypeError("option "+e+" is not recognized!");c[e](t)}),c},c.date=function(e){if(0===arguments.length)return u?null:r.clone();if(!(null===e||"string"==typeof e||t.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return _(null===e?null:ae(e)),c},c.format=function(e){if(0===arguments.length)return n.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return n.format=e,d&&fe(),c},c.timeZone=function(e){if(0===arguments.length)return n.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return n.timeZone=e,c},c.dayViewHeaderFormat=function(e){if(0===arguments.length)return n.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return n.dayViewHeaderFormat=e,c},c.extraFormats=function(e){if(0===arguments.length)return n.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return n.extraFormats=e,l&&fe(),c},c.disabledDates=function(t){if(0===arguments.length)return n.disabledDates?e.extend({},n.disabledDates):n.disabledDates;if(!t)return n.disabledDates=!1,$(),c;if(!(t instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return n.disabledDates=ce(t),n.enabledDates=!1,$(),c},c.enabledDates=function(t){if(0===arguments.length)return n.enabledDates?e.extend({},n.enabledDates):n.enabledDates;if(!t)return n.enabledDates=!1,$(),c;if(!(t instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return n.enabledDates=ce(t),n.disabledDates=!1,$(),c},c.daysOfWeekDisabled=function(e){if(0===arguments.length)return n.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return n.daysOfWeekDisabled=!1,$(),c;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(n.daysOfWeekDisabled=e.reduce(function(e,t){return(t=parseInt(t,10))>6||t<0||isNaN(t)?e:(-1===e.indexOf(t)&&e.push(t),e)},[]).sort(),n.useCurrent&&!n.keepInvalid){for(var t=0;!N(r,"d");){if(r.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}_(r)}return $(),c},c.maxDate=function(e){if(0===arguments.length)return n.maxDate?n.maxDate.clone():n.maxDate;if("boolean"==typeof e&&!1===e)return n.maxDate=!1,$(),c;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=x()));var t=ae(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(n.minDate&&t.isBefore(n.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(d));return n.maxDate=t,n.useCurrent&&!n.keepInvalid&&r.isAfter(e)&&_(n.maxDate),i.isAfter(t)&&(i=t.clone().subtract(n.stepping,"m")),$(),c},c.minDate=function(e){if(0===arguments.length)return n.minDate?n.minDate.clone():n.minDate;if("boolean"==typeof e&&!1===e)return n.minDate=!1,$(),c;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=x()));var t=ae(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(n.maxDate&&t.isAfter(n.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(d));return n.minDate=t,n.useCurrent&&!n.keepInvalid&&r.isBefore(e)&&_(n.minDate),i.isBefore(t)&&(i=t.clone().add(n.stepping,"m")),$(),c},c.defaultDate=function(e){if(0===arguments.length)return n.defaultDate?n.defaultDate.clone():n.defaultDate;if(!e)return n.defaultDate=!1,c;"string"==typeof e&&(e="now"===e||"moment"===e?x():x(e));var t=ae(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!N(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return n.defaultDate=t,(n.defaultDate&&n.inline||""===o.val().trim())&&_(n.defaultDate),c},c.locale=function(e){if(0===arguments.length)return n.locale;if(!t.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return n.locale=e,r.locale(n.locale),i.locale(n.locale),d&&fe(),m&&(ee(),ie()),c},c.stepping=function(e){return 0===arguments.length?n.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),n.stepping=e,c)},c.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return n.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return n.useCurrent=e,c},c.collapse=function(e){if(0===arguments.length)return n.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return n.collapse===e?c:(n.collapse=e,m&&(ee(),ie()),c)},c.icons=function(t){if(0===arguments.length)return e.extend({},n.icons);if(!(t instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return e.extend(n.icons,t),m&&(ee(),ie()),c},c.tooltips=function(t){if(0===arguments.length)return e.extend({},n.tooltips);if(!(t instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return e.extend(n.tooltips,t),m&&(ee(),ie()),c},c.useStrict=function(e){if(0===arguments.length)return n.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return n.useStrict=e,c},c.sideBySide=function(e){if(0===arguments.length)return n.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return n.sideBySide=e,m&&(ee(),ie()),c},c.viewMode=function(e){if(0===arguments.length)return n.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===w.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+w.join(", ")+") value");return n.viewMode=e,p=Math.max(w.indexOf(e),h),j(),c},c.toolbarPlacement=function(e){if(0===arguments.length)return n.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===v.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+v.join(", ")+") value");return n.toolbarPlacement=e,m&&(ee(),ie()),c},c.widgetPositioning=function(t){if(0===arguments.length)return e.extend({},n.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===g.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+g.join(", ")+")");n.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===b.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+b.join(", ")+")");n.widgetPositioning.vertical=t.vertical}return $(),c},c.calendarWeeks=function(e){if(0===arguments.length)return n.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return n.calendarWeeks=e,$(),c},c.showTodayButton=function(e){if(0===arguments.length)return n.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return n.showTodayButton=e,m&&(ee(),ie()),c},c.showClear=function(e){if(0===arguments.length)return n.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return n.showClear=e,m&&(ee(),ie()),c},c.widgetParent=function(t){if(0===arguments.length)return n.widgetParent;if("string"==typeof t&&(t=e(t)),null!==t&&"string"!=typeof t&&!(t instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return n.widgetParent=t,m&&(ee(),ie()),c},c.keepOpen=function(e){if(0===arguments.length)return n.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return n.keepOpen=e,c},c.focusOnShow=function(e){if(0===arguments.length)return n.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return n.focusOnShow=e,c},c.inline=function(e){if(0===arguments.length)return n.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return n.inline=e,c},c.clear=function(){return te(),c},c.keyBinds=function(e){return 0===arguments.length?n.keyBinds:(n.keyBinds=e,c)},c.getMoment=function(e){return x(e)},c.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return n.debug=e,c},c.allowInputToggle=function(e){if(0===arguments.length)return n.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return n.allowInputToggle=e,c},c.showClose=function(e){if(0===arguments.length)return n.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return n.showClose=e,c},c.keepInvalid=function(e){if(0===arguments.length)return n.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return n.keepInvalid=e,c},c.datepickerInput=function(e){if(0===arguments.length)return n.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return n.datepickerInput=e,c},c.parseInputDate=function(e){if(0===arguments.length)return n.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return n.parseInputDate=e,c},c.disabledTimeIntervals=function(t){if(0===arguments.length)return n.disabledTimeIntervals?e.extend({},n.disabledTimeIntervals):n.disabledTimeIntervals;if(!t)return n.disabledTimeIntervals=!1,$(),c;if(!(t instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return n.disabledTimeIntervals=t,$(),c},c.disabledHours=function(t){if(0===arguments.length)return n.disabledHours?e.extend({},n.disabledHours):n.disabledHours;if(!t)return n.disabledHours=!1,$(),c;if(!(t instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(n.disabledHours=ue(t),n.enabledHours=!1,n.useCurrent&&!n.keepInvalid){for(var a=0;!N(r,"h");){if(r.add(1,"h"),24===a)throw"Tried 24 times to find a valid date";a++}_(r)}return $(),c},c.enabledHours=function(t){if(0===arguments.length)return n.enabledHours?e.extend({},n.enabledHours):n.enabledHours;if(!t)return n.enabledHours=!1,$(),c;if(!(t instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(n.enabledHours=ue(t),n.disabledHours=!1,n.useCurrent&&!n.keepInvalid){for(var a=0;!N(r,"h");){if(r.add(1,"h"),24===a)throw"Tried 24 times to find a valid date";a++}_(r)}return $(),c},c.viewDate=function(e){if(0===arguments.length)return i.clone();if(!e)return i=r.clone(),c;if(!("string"==typeof e||t.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return i=ae(e),B(),c},a.is("input"))o=a;else if(0===(o=a.find(n.datepickerInput)).length)o=a.find("input");else if(!o.is("input"))throw new Error('CSS class "'+n.datepickerInput+'" cannot be applied to non input element');if(a.hasClass("input-group")&&(f=0===a.find(".datepickerbutton").length?a.find(".input-group-addon"):a.find(".datepickerbutton")),!n.inline&&!o.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return r=x(),i=r.clone(),e.extend(!0,n,function(){var t,r={};return(t=a.is("input")||n.inline?a.data():a.find("input").data()).dateOptions&&t.dateOptions instanceof Object&&(r=e.extend(!0,r,t.dateOptions)),e.each(n,function(e){var a="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==t[a]&&(r[e]=t[a])}),r}()),c.options(n),fe(),o.on({change:le,blur:n.debug?"":ee,keydown:se,keyup:de,focus:n.allowInputToggle?ie:""}),a.is("input")?o.on({focus:ie}):f&&(f.on("click",oe),f.on("mousedown",!1)),o.prop("disabled")&&c.disable(),o.is("input")&&0!==o.val().trim().length?_(ae(o.val().trim())):n.defaultDate&&void 0===o.attr("placeholder")&&_(n.defaultDate),n.inline&&ie(),c};return e.fn.datetimepicker=function(t){t=t||{};var n,r=Array.prototype.slice.call(arguments,1),i=!0,o=["destroy","hide","show","toggle"];if("object"==typeof t)return this.each(function(){var n,r=e(this);r.data("DateTimePicker")||(n=e.extend(!0,{},e.fn.datetimepicker.defaults,t),r.data("DateTimePicker",a(r,n)))});if("string"==typeof t)return this.each(function(){var a=e(this).data("DateTimePicker");if(!a)throw new Error('bootstrap-datetimepicker("'+t+'") method was called on an element that is not using DateTimePicker');n=a[t].apply(a,r),i=n===a}),i||e.inArray(t,o)>-1?this:n;throw new TypeError("Invalid arguments for DateTimePicker: "+t)},e.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:t.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"fa fa-clock-o",date:"fa fa-calendar",up:"fa fa-chevron-up",down:"fa fa-chevron-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-crosshairs",clear:"fa fa-trash-o",close:"fa fa-times"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(7,"d")):this.date(t.clone().add(this.stepping(),"m"))}},down:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(7,"d")):this.date(t.clone().subtract(this.stepping(),"m"))}else this.show()},"control up":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(1,"y")):this.date(t.clone().add(1,"h"))}},"control down":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(1,"y")):this.date(t.clone().subtract(1,"h"))}},left:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"d"))}},right:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"d"))}},pageUp:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"M"))}},pageDown:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(e){e&&e.find(".timepicker").is(":visible")&&e.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},e.fn.datetimepicker}); + +/* Ace.js modes, source https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict */ +ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) { "use strict"; var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () { this.$rules = { start: [{ token: "comment.doc.tag", regex: "@[\\w\\d_]+" }, s.getTagRule(), { defaultToken: "comment.doc", caseInsensitive: !0 }] } }; r.inherits(s, i), s.getTagRule = function (e) { return { token: "comment.doc.tag.storage.type", regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b" } }, s.getStartRule = function (e) { return { token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e } }, s.getEndRule = function (e) { return { token: "comment.doc", regex: "\\*\\/", next: e } }, t.DocCommentHighlightRules = s }), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) { "use strict"; function a() { var e = o.replace("\\d", "\\d\\-"), t = { onMatch: function (e, t, n) { var r = e.charAt(1) == "/" ? 2 : 1; if (r == 1) t != this.nextState ? n.unshift(this.next, this.nextState, 0) : n.unshift(this.next), n[2]++; else if (r == 2 && t == this.nextState) { n[1]--; if (!n[1] || n[1] < 0) n.shift(), n.shift() } return [{ type: "meta.tag.punctuation." + (r == 1 ? "" : "end-") + "tag-open.xml", value: e.slice(0, r) }, { type: "meta.tag.tag-name.xml", value: e.substr(r) }] }, regex: "", onMatch: function (e, t, n) { return t == n[0] && n.shift(), e.length == 2 && (n[0] == this.nextState && n[1]--, (!n[1] || n[1] < 0) && n.splice(0, 2)), this.next = n[0] || "start", [{ type: this.token, value: e }] }, nextState: "jsx" }, n, f("jsxAttributes"), { token: "entity.other.attribute-name.xml", regex: e }, { token: "keyword.operator.attribute-equals.xml", regex: "=" }, { token: "text.tag-whitespace.xml", regex: "\\s+" }, { token: "string.attribute-value.xml", regex: "'", stateName: "jsx_attr_q", push: [{ token: "string.attribute-value.xml", regex: "'", next: "pop" }, { include: "reference" }, { defaultToken: "string.attribute-value.xml" }] }, { token: "string.attribute-value.xml", regex: '"', stateName: "jsx_attr_qq", push: [{ token: "string.attribute-value.xml", regex: '"', next: "pop" }, { include: "reference" }, { defaultToken: "string.attribute-value.xml" }] }, t], this.$rules.reference = [{ token: "constant.language.escape.reference.xml", regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }] } function f(e) { return [{ token: "comment", regex: /\/\*/, next: [i.getTagRule(), { token: "comment", regex: "\\*\\/", next: e || "pop" }, { defaultToken: "comment", caseInsensitive: !0 }] }, { token: "comment", regex: "\\/\\/", next: [i.getTagRule(), { token: "comment", regex: "$|^", next: e || "pop" }, { defaultToken: "comment", caseInsensitive: !0 }] }] } var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*", u = function (e) { var t = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false" }, "identifier"), n = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)"; this.$rules = { no_regex: [i.getStartRule("doc-start"), f("no_regex"), { token: "string", regex: "'(?=.)", next: "qstring" }, { token: "string", regex: '"(?=.)', next: "qqstring" }, { token: "constant.numeric", regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ }, { token: "constant.numeric", regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ }, { token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + o + ")(\\.)(prototype)(\\.)(" + o + ")(\\s*)(=)", next: "function_arguments" }, { token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + o + ")(\\.)(" + o + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + o + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + o + ")(\\.)(" + o + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + o + ")(\\s*)(\\()", next: "function_arguments" }, { token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + o + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token: "keyword", regex: "from(?=\\s*('|\"))" }, { token: "keyword", regex: "(?:" + n + ")\\b", next: "start" }, { token: ["support.constant"], regex: /that\b/ }, { token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ }, { token: t, regex: o }, { token: "punctuation.operator", regex: /[.](?![.])/, next: "property" }, { token: "storage.type", regex: /=>/, next: "start" }, { token: "keyword.operator", regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, next: "start" }, { token: "punctuation.operator", regex: /[?:,;.]/, next: "start" }, { token: "paren.lparen", regex: /[\[({]/, next: "start" }, { token: "paren.rparen", regex: /[\])}]/ }, { token: "comment", regex: /^#!.*$/ }], property: [{ token: "text", regex: "\\s+" }, { token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + o + ")(\\.)(" + o + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", next: "function_arguments" }, { token: "punctuation.operator", regex: /[.](?![.])/ }, { token: "support.function", regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token: "support.function.dom", regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token: "support.constant", regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token: "identifier", regex: o }, { regex: "", token: "empty", next: "no_regex" }], start: [i.getStartRule("doc-start"), f("start"), { token: "string.regexp", regex: "\\/", next: "regex" }, { token: "text", regex: "\\s+|^$", next: "start" }, { token: "empty", regex: "", next: "no_regex" }], regex: [{ token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/[sxngimy]*", next: "no_regex" }, { token: "invalid", regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token: "constant.language.escape", regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ }, { token: "constant.language.delimiter", regex: /\|/ }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp" }], regex_character_class: [{ token: "regexp.charclass.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex" }, { token: "constant.language.escape", regex: "-" }, { token: "empty", regex: "$", next: "no_regex" }, { defaultToken: "string.regexp.charachterclass" }], function_arguments: [{ token: "variable.parameter", regex: o }, { token: "punctuation.operator", regex: "[, ]+" }, { token: "punctuation.operator", regex: "$" }, { token: "empty", regex: "", next: "no_regex" }], qqstring: [{ token: "constant.language.escape", regex: r }, { token: "string", regex: "\\\\$", consumeLineEnd: !0 }, { token: "string", regex: '"|$', next: "no_regex" }, { defaultToken: "string" }], qstring: [{ token: "constant.language.escape", regex: r }, { token: "string", regex: "\\\\$", consumeLineEnd: !0 }, { token: "string", regex: "'|$", next: "no_regex" }, { defaultToken: "string" }] }; if (!e || !e.noES6) this.$rules.no_regex.unshift({ regex: "[{}]", onMatch: function (e, t, n) { this.next = e == "{" ? this.nextState : ""; if (e == "{" && n.length) n.unshift("start", t); else if (e == "}" && n.length) { n.shift(), this.next = n.shift(); if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) return "paren.quasi.end" } return e == "{" ? "paren.lparen" : "paren.rparen" }, nextState: "start" }, { token: "string.quasi.start", regex: /`/, push: [{ token: "constant.language.escape", regex: r }, { token: "paren.quasi.start", regex: /\${/, push: "start" }, { token: "string.quasi.end", regex: /`/, next: "pop" }, { defaultToken: "string.quasi" }] }), (!e || e.jsx != 0) && a.call(this); this.embedRules(i, "doc-", [i.getEndRule("no_regex")]), this.normalizeRules() }; r.inherits(u, s), t.JavaScriptHighlightRules = u }), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) { "use strict"; var r = e("../range").Range, i = function () { }; (function () { this.checkOutdent = function (e, t) { return /^\s+$/.test(e) ? /^\s*\}/.test(t) : !1 }, this.autoOutdent = function (e, t) { var n = e.getLine(t), i = n.match(/^(\s*\})/); if (!i) return 0; var s = i[1].length, o = e.findMatchingBracket({ row: t, column: s }); if (!o || o.row == t) return 0; var u = this.$getIndent(e.getLine(o.row)); e.replace(new r(t, 0, t, s - 1), u) }, this.$getIndent = function (e) { return e.match(/^\s*/)[0] } }).call(i.prototype), t.MatchingBraceOutdent = i }), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) { "use strict"; var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function (e) { e && (this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + e.start)), this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + e.end))) }; r.inherits(o, s), function () { this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/, this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/, this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/, this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/, this._getFoldWidgetBase = this.getFoldWidget, this.getFoldWidget = function (e, t, n) { var r = e.getLine(n); if (this.singleLineBlockCommentRe.test(r) && !this.startRegionRe.test(r) && !this.tripleStarBlockCommentRe.test(r)) return ""; var i = this._getFoldWidgetBase(e, t, n); return !i && this.startRegionRe.test(r) ? "start" : i }, this.getFoldWidgetRange = function (e, t, n, r) { var i = e.getLine(n); if (this.startRegionRe.test(i)) return this.getCommentRegionBlock(e, i, n); var s = i.match(this.foldingStartMarker); if (s) { var o = s.index; if (s[1]) return this.openingBracketBlock(e, s[1], n, o); var u = e.getCommentFoldRange(n, o + s[0].length, 1); return u && !u.isMultiLine() && (r ? u = this.getSectionRange(e, n) : t != "all" && (u = null)), u } if (t === "markbegin") return; var s = i.match(this.foldingStopMarker); if (s) { var o = s.index + s[0].length; return s[1] ? this.closingBracketBlock(e, s[1], n, o) : e.getCommentFoldRange(n, o, -1) } }, this.getSectionRange = function (e, t) { var n = e.getLine(t), r = n.search(/\S/), s = t, o = n.length; t += 1; var u = t, a = e.getLength(); while (++t < a) { n = e.getLine(t); var f = n.search(/\S/); if (f === -1) continue; if (r > f) break; var l = this.getFoldWidgetRange(e, "all", t); if (l) { if (l.start.row <= s) break; if (l.isMultiLine()) t = l.end.row; else if (r == f) break } u = t } return new i(s, o, u, e.getLine(u).length) }, this.getCommentRegionBlock = function (e, t, n) { var r = t.search(/\s*$/), s = e.getLength(), o = n, u = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/, a = 1; while (++n < s) { t = e.getLine(n); var f = u.exec(t); if (!f) continue; f[1] ? a-- : a++; if (!a) break } var l = n; if (l > o) return new i(o, r, l, t.length) } }.call(o.prototype) }), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) { "use strict"; var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript_highlight_rules").JavaScriptHighlightRules, o = e("./matching_brace_outdent").MatchingBraceOutdent, u = e("../worker/worker_client").WorkerClient, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = function () { this.HighlightRules = s, this.$outdent = new o, this.$behaviour = new a, this.foldingRules = new f }; r.inherits(l, i), function () { this.lineCommentStart = "//", this.blockComment = { start: "/*", end: "*/" }, this.$quotes = { '"': '"', "'": "'", "`": "`" }, this.getNextLineIndent = function (e, t, n) { var r = this.$getIndent(t), i = this.getTokenizer().getLineTokens(t, e), s = i.tokens, o = i.state; if (s.length && s[s.length - 1].type == "comment") return r; if (e == "start" || e == "no_regex") { var u = t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); u && (r += n) } else if (e == "doc-start") { if (o == "start" || o == "no_regex") return ""; var u = t.match(/^\s*(\/?)\*/); u && (u[1] && (r += " "), r += "* ") } return r }, this.checkOutdent = function (e, t, n) { return this.$outdent.checkOutdent(t, n) }, this.autoOutdent = function (e, t, n) { this.$outdent.autoOutdent(t, n) }, this.createWorker = function (e) { var t = new u(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); return t.attachToDocument(e.getDocument()), t.on("annotate", function (t) { e.setAnnotations(t.data) }), t.on("terminate", function () { e.clearAnnotations() }), t }, this.$id = "ace/mode/javascript", this.snippetFileId = "ace/snippets/javascript" }.call(l.prototype), t.Mode = l }); (function () { + ace.require(["ace/mode/javascript"], function (m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); +})(); + +ace.define("ace/mode/json_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) { "use strict"; var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () { this.$rules = { start: [{ token: "variable", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' }, { token: "string", regex: '"', next: "string" }, { token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b" }, { token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token: "constant.language.boolean", regex: "(?:true|false)\\b" }, { token: "text", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token: "comment", regex: "\\/\\/.*$" }, { token: "comment.start", regex: "\\/\\*", next: "comment" }, { token: "paren.lparen", regex: "[[({]" }, { token: "paren.rparen", regex: "[\\])}]" }, { token: "text", regex: "\\s+" }], string: [{ token: "constant.language.escape", regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ }, { token: "string", regex: '"|$', next: "start" }, { defaultToken: "string" }], comment: [{ token: "comment.end", regex: "\\*\\/", next: "start" }, { defaultToken: "comment" }] } }; r.inherits(s, i), t.JsonHighlightRules = s }), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) { "use strict"; var r = e("../range").Range, i = function () { }; (function () { this.checkOutdent = function (e, t) { return /^\s+$/.test(e) ? /^\s*\}/.test(t) : !1 }, this.autoOutdent = function (e, t) { var n = e.getLine(t), i = n.match(/^(\s*\})/); if (!i) return 0; var s = i[1].length, o = e.findMatchingBracket({ row: t, column: s }); if (!o || o.row == t) return 0; var u = this.$getIndent(e.getLine(o.row)); e.replace(new r(t, 0, t, s - 1), u) }, this.$getIndent = function (e) { return e.match(/^\s*/)[0] } }).call(i.prototype), t.MatchingBraceOutdent = i }), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) { "use strict"; var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function (e) { e && (this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + e.start)), this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + e.end))) }; r.inherits(o, s), function () { this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/, this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/, this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/, this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/, this._getFoldWidgetBase = this.getFoldWidget, this.getFoldWidget = function (e, t, n) { var r = e.getLine(n); if (this.singleLineBlockCommentRe.test(r) && !this.startRegionRe.test(r) && !this.tripleStarBlockCommentRe.test(r)) return ""; var i = this._getFoldWidgetBase(e, t, n); return !i && this.startRegionRe.test(r) ? "start" : i }, this.getFoldWidgetRange = function (e, t, n, r) { var i = e.getLine(n); if (this.startRegionRe.test(i)) return this.getCommentRegionBlock(e, i, n); var s = i.match(this.foldingStartMarker); if (s) { var o = s.index; if (s[1]) return this.openingBracketBlock(e, s[1], n, o); var u = e.getCommentFoldRange(n, o + s[0].length, 1); return u && !u.isMultiLine() && (r ? u = this.getSectionRange(e, n) : t != "all" && (u = null)), u } if (t === "markbegin") return; var s = i.match(this.foldingStopMarker); if (s) { var o = s.index + s[0].length; return s[1] ? this.closingBracketBlock(e, s[1], n, o) : e.getCommentFoldRange(n, o, -1) } }, this.getSectionRange = function (e, t) { var n = e.getLine(t), r = n.search(/\S/), s = t, o = n.length; t += 1; var u = t, a = e.getLength(); while (++t < a) { n = e.getLine(t); var f = n.search(/\S/); if (f === -1) continue; if (r > f) break; var l = this.getFoldWidgetRange(e, "all", t); if (l) { if (l.start.row <= s) break; if (l.isMultiLine()) t = l.end.row; else if (r == f) break } u = t } return new i(s, o, u, e.getLine(u).length) }, this.getCommentRegionBlock = function (e, t, n) { var r = t.search(/\s*$/), s = e.getLength(), o = n, u = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/, a = 1; while (++n < s) { t = e.getLine(n); var f = u.exec(t); if (!f) continue; f[1] ? a-- : a++; if (!a) break } var l = n; if (l > o) return new i(o, r, l, t.length) } }.call(o.prototype) }), ace.define("ace/mode/json", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/json_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle", "ace/worker/worker_client"], function (e, t, n) { "use strict"; var r = e("../lib/oop"), i = e("./text").Mode, s = e("./json_highlight_rules").JsonHighlightRules, o = e("./matching_brace_outdent").MatchingBraceOutdent, u = e("./behaviour/cstyle").CstyleBehaviour, a = e("./folding/cstyle").FoldMode, f = e("../worker/worker_client").WorkerClient, l = function () { this.HighlightRules = s, this.$outdent = new o, this.$behaviour = new u, this.foldingRules = new a }; r.inherits(l, i), function () { this.lineCommentStart = "//", this.blockComment = { start: "/*", end: "*/" }, this.getNextLineIndent = function (e, t, n) { var r = this.$getIndent(t); if (e == "start") { var i = t.match(/^.*[\{\(\[]\s*$/); i && (r += n) } return r }, this.checkOutdent = function (e, t, n) { return this.$outdent.checkOutdent(t, n) }, this.autoOutdent = function (e, t, n) { this.$outdent.autoOutdent(t, n) }, this.createWorker = function (e) { var t = new f(["ace"], "ace/mode/json_worker", "JsonWorker"); return t.attachToDocument(e.getDocument()), t.on("annotate", function (t) { e.setAnnotations(t.data) }), t.on("terminate", function () { e.clearAnnotations() }), t }, this.$id = "ace/mode/json" }.call(l.prototype), t.Mode = l }); (function () { + ace.require(["ace/mode/json"], function (m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); +})(); + +ace.define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) { "use strict"; var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function (e) { var t = "[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*"; this.$rules = { start: [{ token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" }, { token: ["punctuation.instruction.xml", "keyword.instruction.xml"], regex: "(<\\?)(" + t + ")", next: "processing_instruction" }, { token: "comment.start.xml", regex: "<\\!--", next: "comment" }, { token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: !0 }, { include: "tag" }, { token: "text.end-tag-open.xml", regex: "", next: "start" }], doctype: [{ include: "whitespace" }, { include: "string" }, { token: "xml-pe.doctype.xml", regex: ">", next: "start" }, { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" }, { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }], int_subset: [{ token: "text.xml", regex: "\\s+" }, { token: "punctuation.int-subset.xml", regex: "]", next: "pop" }, { token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], regex: "(<\\!)(" + t + ")", push: [{ token: "text", regex: "\\s+" }, { token: "punctuation.markup-decl.xml", regex: ">", next: "pop" }, { include: "string" }] }], cdata: [{ token: "string.cdata.xml", regex: "\\]\\]>", next: "start" }, { token: "text.xml", regex: "\\s+" }, { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }], comment: [{ token: "comment.end.xml", regex: "-->", next: "start" }, { defaultToken: "comment.xml" }], reference: [{ token: "constant.language.escape.reference.xml", regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], attr_reference: [{ token: "constant.language.escape.reference.attribute-value.xml", regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }], tag: [{ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], regex: "(?:(<)|(", next: "start" }] }], tag_whitespace: [{ token: "text.tag-whitespace.xml", regex: "\\s+" }], whitespace: [{ token: "text.whitespace.xml", regex: "\\s+" }], string: [{ token: "string.xml", regex: "'", push: [{ token: "string.xml", regex: "'", next: "pop" }, { defaultToken: "string.xml" }] }, { token: "string.xml", regex: '"', push: [{ token: "string.xml", regex: '"', next: "pop" }, { defaultToken: "string.xml" }] }], attributes: [{ token: "entity.other.attribute-name.xml", regex: t }, { token: "keyword.operator.attribute-equals.xml", regex: "=" }, { include: "tag_whitespace" }, { include: "attribute_value" }], attribute_value: [{ token: "string.attribute-value.xml", regex: "'", push: [{ token: "string.attribute-value.xml", regex: "'", next: "pop" }, { include: "attr_reference" }, { defaultToken: "string.attribute-value.xml" }] }, { token: "string.attribute-value.xml", regex: '"', push: [{ token: "string.attribute-value.xml", regex: '"', next: "pop" }, { include: "attr_reference" }, { defaultToken: "string.attribute-value.xml" }] }] }, this.constructor === s && this.normalizeRules() }; (function () { this.embedTagRules = function (e, t, n) { this.$rules.tag.unshift({ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + n + ".tag-name.xml"], regex: "(<)(" + n + "(?=\\s|>|$))", next: [{ include: "attributes" }, { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: t + "start" }] }), this.$rules[n + "-end"] = [{ include: "attributes" }, { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start", onMatch: function (e, t, n) { return n.splice(0), this.token } }], this.embedRules(e, t, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + n + ".tag-name.xml"], regex: "(|$))", next: n + "-end" }, { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[" }, { token: "string.cdata.xml", regex: "\\]\\]>" }]) } }).call(i.prototype), r.inherits(s, i), t.XmlHighlightRules = s }), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) { "use strict"; function u(e, t) { return e && e.type.lastIndexOf(t + ".xml") > -1 } var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), a = function () { this.add("string_dquotes", "insertion", function (e, t, n, r, i) { if (i == '"' || i == "'") { var o = i, a = r.doc.getTextRange(n.getSelectionRange()); if (a !== "" && a !== "'" && a != '"' && n.getWrapBehavioursEnabled()) return { text: o + a + o, selection: !1 }; var f = n.getCursorPosition(), l = r.doc.getLine(f.row), c = l.substring(f.column, f.column + 1), h = new s(r, f.row, f.column), p = h.getCurrentToken(); if (c == o && (u(p, "attribute-value") || u(p, "string"))) return { text: "", selection: [1, 1] }; p || (p = h.stepBackward()); if (!p) return; while (u(p, "tag-whitespace") || u(p, "whitespace")) p = h.stepBackward(); var d = !c || c.match(/\s/); if (u(p, "attribute-equals") && (d || c == ">") || u(p, "decl-attribute-equals") && (d || c == "?")) return { text: o + o, selection: [1, 1] } } }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) { var s = r.doc.getTextRange(i); if (!i.isMultiLine() && (s == '"' || s == "'")) { var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2); if (u == s) return i.end.column++, i } }), this.add("autoclosing", "insertion", function (e, t, n, r, i) { if (i == ">") { var o = n.getSelectionRange().start, a = new s(r, o.row, o.column), f = a.getCurrentToken() || a.stepBackward(); if (!f || !(u(f, "tag-name") || u(f, "tag-whitespace") || u(f, "attribute-name") || u(f, "attribute-equals") || u(f, "attribute-value"))) return; if (u(f, "reference.attribute-value")) return; if (u(f, "attribute-value")) { var l = a.getCurrentTokenColumn() + f.value.length; if (o.column < l) return; if (o.column == l) { var c = a.stepForward(); if (c && u(c, "attribute-value")) return; a.stepBackward() } } if (/^\s*>/.test(r.getLine(o.row).slice(o.column))) return; while (!u(f, "tag-name")) { f = a.stepBackward(); if (f.value == "<") { f = a.stepForward(); break } } var h = a.getCurrentTokenRow(), p = a.getCurrentTokenColumn(); if (u(a.stepBackward(), "end-tag-open")) return; var d = f.value; h == o.row && (d = d.substring(0, o.column - p)); if (this.voidElements.hasOwnProperty(d.toLowerCase())) return; return { text: ">", selection: [1, 1] } } }), this.add("autoindent", "insertion", function (e, t, n, r, i) { if (i == "\n") { var o = n.getCursorPosition(), u = r.getLine(o.row), a = new s(r, o.row, o.column), f = a.getCurrentToken(); if (f && f.type.indexOf("tag-close") !== -1) { if (f.value == "/>") return; while (f && f.type.indexOf("tag-name") === -1) f = a.stepBackward(); if (!f) return; var l = f.value, c = a.getCurrentTokenRow(); f = a.stepBackward(); if (!f || f.type.indexOf("end-tag") !== -1) return; if (this.voidElements && !this.voidElements[l]) { var h = r.getTokenAt(o.row, o.column + 1), u = r.getLine(c), p = this.$getIndent(u), d = p + r.getTabString(); return h && h.value === " -1 } var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e, t) { o.call(this), this.voidElements = e || {}, this.optionalEndTags = r.mixin({}, this.voidElements), t && r.mixin(this.optionalEndTags, t) }; r.inherits(a, o); var f = function () { this.tagName = "", this.closing = !1, this.selfClosing = !1, this.start = { row: 0, column: 0 }, this.end = { row: 0, column: 0 } }; (function () { this.getFoldWidget = function (e, t, n) { var r = this._getFirstTagInLine(e, n); return r ? r.closing || !r.tagName && r.selfClosing ? t == "markbeginend" ? "end" : "" : !r.tagName || r.selfClosing || this.voidElements.hasOwnProperty(r.tagName.toLowerCase()) ? "" : this._findEndTagInLine(e, n, r.tagName, r.end.column) ? "" : "start" : this.getCommentFoldWidget(e, n) }, this.getCommentFoldWidget = function (e, t) { return /comment/.test(e.getState(t)) && /"; break } } return r } if (l(s, "tag-close")) return r.selfClosing = s.value == "/>", r; r.start.column += s.value.length } return null }, this._findEndTagInLine = function (e, t, n, r) { var i = e.getTokens(t), s = 0; for (var o = 0; o < i.length; o++) { var u = i[o]; s += u.value.length; if (s < r) continue; if (l(u, "end-tag-open")) { u = i[o + 1]; if (u && u.value == n) return !0 } } return !1 }, this._readTagForward = function (e) { var t = e.getCurrentToken(); if (!t) return null; var n = new f; do if (l(t, "tag-open")) n.closing = l(t, "end-tag-open"), n.start.row = e.getCurrentTokenRow(), n.start.column = e.getCurrentTokenColumn(); else if (l(t, "tag-name")) n.tagName = t.value; else if (l(t, "tag-close")) return n.selfClosing = t.value == "/>", n.end.row = e.getCurrentTokenRow(), n.end.column = e.getCurrentTokenColumn() + t.value.length, e.stepForward(), n; while (t = e.stepForward()); return null }, this._readTagBackward = function (e) { var t = e.getCurrentToken(); if (!t) return null; var n = new f; do { if (l(t, "tag-open")) return n.closing = l(t, "end-tag-open"), n.start.row = e.getCurrentTokenRow(), n.start.column = e.getCurrentTokenColumn(), e.stepBackward(), n; l(t, "tag-name") ? n.tagName = t.value : l(t, "tag-close") && (n.selfClosing = t.value == "/>", n.end.row = e.getCurrentTokenRow(), n.end.column = e.getCurrentTokenColumn() + t.value.length) } while (t = e.stepBackward()); return null }, this._pop = function (e, t) { while (e.length) { var n = e[e.length - 1]; if (!t || n.tagName == t.tagName) return e.pop(); if (this.optionalEndTags.hasOwnProperty(n.tagName)) { e.pop(); continue } return null } }, this.getFoldWidgetRange = function (e, t, n) { var r = this._getFirstTagInLine(e, n); if (!r) return this.getCommentFoldWidget(e, n) && e.getCommentFoldRange(n, e.getLine(n).length); var i = r.closing || r.selfClosing, o = [], a; if (!i) { var f = new u(e, n, r.start.column), l = { row: n, column: r.start.column + r.tagName.length + 2 }; r.start.row == r.end.row && (l.column = r.end.column); while (a = this._readTagForward(f)) { if (a.selfClosing) { if (!o.length) return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end); continue } if (a.closing) { this._pop(o, a); if (o.length == 0) return s.fromPoints(l, a.start) } else o.push(a) } } else { var f = new u(e, n, r.end.column), c = { row: n, column: r.start.column }; while (a = this._readTagBackward(f)) { if (a.selfClosing) { if (!o.length) return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end); continue } if (!a.closing) { this._pop(o, a); if (o.length == 0) return a.start.column += a.tagName.length + 2, a.start.row == a.end.row && a.start.column < a.end.column && (a.start.column = a.end.column), s.fromPoints(a.start, c) } else o.push(a) } } } }).call(a.prototype) }), ace.define("ace/mode/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text", "ace/mode/xml_highlight_rules", "ace/mode/behaviour/xml", "ace/mode/folding/xml", "ace/worker/worker_client"], function (e, t, n) { "use strict"; var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text").Mode, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./behaviour/xml").XmlBehaviour, a = e("./folding/xml").FoldMode, f = e("../worker/worker_client").WorkerClient, l = function () { this.HighlightRules = o, this.$behaviour = new u, this.foldingRules = new a }; r.inherits(l, s), function () { this.voidElements = i.arrayToMap([]), this.blockComment = { start: "" }, this.createWorker = function (e) { var t = new f(["ace"], "ace/mode/xml_worker", "Worker"); return t.attachToDocument(e.getDocument()), t.on("error", function (t) { e.setAnnotations(t.data) }), t.on("terminate", function () { e.clearAnnotations() }), t }, this.$id = "ace/mode/xml" }.call(l.prototype), t.Mode = l }); (function () { + ace.require(["ace/mode/xml"], function (m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); +})(); + +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\u00a1-\uffff]*)"},{token:"keyword",regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)"},{token:["keyword","storage.type.variable.ts"],regex:"(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)"},{token:"keyword",regex:"\\b(?:super|export|import|keyof|infer)\\b"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./typescript_highlight_rules").TypeScriptHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,a=e("./matching_brace_outdent").MatchingBraceOutdent,f=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new o,this.foldingRules=new u};r.inherits(f,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(f.prototype),t.Mode=f}); (function() { + ace.require(["ace/mode/typescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); +})(); \ No newline at end of file diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index 1118314..eacc325 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -13,6 +13,7 @@ import { ViewBase } from "../views/ViewBase"; import { addConnection } from "./connections"; import { openUri } from "../utils/OpenUri"; import { ErrorHandler } from "../helpers/errorHandler"; +import { DRBHelper } from "../helpers/drbHelper"; import { WebResourcesTreeItem } from "../trees/webResourcesDataProvider"; let dvStatusBarItem: vscode.StatusBarItem; @@ -24,6 +25,7 @@ export async function registerCommands(vscontext: vscode.ExtensionContext, tr: T const templateHelper = new TemplateHelper(vscontext); const wrHelper = new WebResourceHelper(vscontext, dvHelper); const typingHelper = new TypingsHelper(vscontext, dvHelper); + const drbHelper = new DRBHelper(vscontext); const errorHandler = new ErrorHandler(tr); dvStatusBarItem = vscode.window.createStatusBarItem(connectionStatusBarUniqueId, vscode.StatusBarAlignment.Left); @@ -165,6 +167,16 @@ export async function registerCommands(vscontext: vscode.ExtensionContext, tr: T } }, }, + { + command: "dvdt.commands.openDRB", + callback: async () => { + try { + drbHelper.openDRB(views); + } catch (error) { + errorHandler.log(error, "openDRB"); + } + }, + }, { command: "dvdt.explorer.webresources.linkExistingWebResource", callback: async (uri: vscode.Uri) => { diff --git a/src/helpers/drbHelper.ts b/src/helpers/drbHelper.ts new file mode 100644 index 0000000..86e2996 --- /dev/null +++ b/src/helpers/drbHelper.ts @@ -0,0 +1,28 @@ +import * as vscode from "vscode"; +import { connectionCurrentStoreKey } from "../utils/Constants"; +import { ErrorMessages } from "../utils/ErrorMessages"; +import { IConnection } from "../utils/Interfaces"; +import { State } from "../utils/State"; +import { DataverseRestBuilderView } from "../views/DataverseRestBuilderView"; +import { ViewBase } from "../views/ViewBase"; + +export class DRBHelper { + private vsstate: State; + + /** + * Initialization constructor for VS Code Context + */ + constructor(private vscontext: vscode.ExtensionContext) { + this.vsstate = new State(vscontext); + } + + public async openDRB(view: ViewBase): Promise { + const connFromWS: IConnection = this.vsstate.getFromWorkspace(connectionCurrentStoreKey); + if (connFromWS && connFromWS.currentAccessToken) { + const webview = await view.getWebView({ type: "openDRB", title: "Dataverse REST Builder" }); + new DataverseRestBuilderView(webview, this.vscontext, connFromWS.currentAccessToken); + } else { + vscode.window.showErrorMessage(ErrorMessages.drbConnectionError); + } + } +} diff --git a/src/utils/ErrorMessages.ts b/src/utils/ErrorMessages.ts index 0604afa..5bbb068 100644 --- a/src/utils/ErrorMessages.ts +++ b/src/utils/ErrorMessages.ts @@ -11,4 +11,5 @@ export class ErrorMessages { public static tsFileNameRequired: string = "TypeScript filename is required."; public static tsNamespaceRequired: string = "Namespace for Webpack is required."; public static wrCompareError: string = "The selected file is either not linked to a web resources or it does not exists in Dataverse."; + public static drbConnectionError: string = "Connect to an environment before trying to load Dataverse REST Builder."; } diff --git a/src/utils/Interfaces.ts b/src/utils/Interfaces.ts index 01e1395..081edad 100644 --- a/src/utils/Interfaces.ts +++ b/src/utils/Interfaces.ts @@ -149,6 +149,8 @@ export interface IPanel { panel: vscode.WebviewPanel; extensionUri: vscode.Uri; webViewFileName: string; + excludeExternalCss?: boolean; + excludeExternalJs?: boolean; } export interface IViewOption { diff --git a/src/views/DataverseRestBuilderView.ts b/src/views/DataverseRestBuilderView.ts new file mode 100644 index 0000000..48e8379 --- /dev/null +++ b/src/views/DataverseRestBuilderView.ts @@ -0,0 +1,33 @@ +import * as vscode from "vscode"; +import * as path from "path"; +import { IConnection } from "../utils/Interfaces"; +import { Panel } from "./PanelBase"; +import { readFileSync } from "../utils/FileSystem"; +import _ = require("lodash"); +import { connectionCurrentStoreKey } from "../utils/Constants"; +import { State } from "../utils/State"; + +export class DataverseRestBuilderView extends Panel { + constructor(webviewPanel: vscode.WebviewPanel, vscontext: vscode.ExtensionContext, currentAccessToken: string) { + super({ panel: webviewPanel, extensionUri: vscontext.extensionUri, webViewFileName: "drb.html", excludeExternalCss: true, excludeExternalJs: true }); + super.update(); + + if (currentAccessToken) { + webviewPanel.webview.postMessage({ command: "dvdt_connection", token: currentAccessToken }); + } + } + + getHtmlForWebview(webviewFileName: string): string { + const pathOnDisk = path.join(this.panelOptions.extensionUri.fsPath, "resources", "views", webviewFileName); + const fileHtml = readFileSync(pathOnDisk).toString(); + _.templateSettings.interpolate = /!!{([\s\S]+?)}/g; + const compiled = _.template(fileHtml); + + // const requirementJs = this.getFileUri("resources", "views", "js", "drb_custom.js"); + // const customJs = this.getFileUri("resources", "views", "js", "drb_requirements.js"); + + const viewModel = {}; + + return super.render(compiled(viewModel)); + } +} diff --git a/src/views/PanelBase.ts b/src/views/PanelBase.ts index 1e303b6..4b673f1 100644 --- a/src/views/PanelBase.ts +++ b/src/views/PanelBase.ts @@ -56,21 +56,26 @@ export class Panel { - - - - - - - - - - - - - - + ${ + this.panelOptions.excludeExternalCss + ? "" + : ` + + + ` + } + + ${ + this.panelOptions.excludeExternalJs + ? "" + : ` + + + + + ` + }
    @@ -108,41 +113,9 @@ export class Panel { // } return this.render(compiled(viewModel)); - - // return ` - // - // - // - // - // - // - // - // Hello, world! - // - // - //

    Hello, world!

    - //
    - //
    - // - // - //
    We'll never share your email with anyone else.
    - //
    - //
    - // - // - //
    - //
    - // - // - //
    - // - // - // - // - // `; } - private getFileUri(...paths: string[]): vscode.Uri { + public getFileUri(...paths: string[]): vscode.Uri { const pathOnDisk = vscode.Uri.file(path.join(this.panelOptions.extensionUri.fsPath, ...paths)); return this.webViewPanel.webview.asWebviewUri(pathOnDisk); }
    ").addClass("cw").text("#"));a.isBefore(i.clone().endOf("w"));)t.append(e("").addClass("dow").text(a.format("dd"))),a.add(1,"d");m.find(".datepicker-days thead").append(t)},F=function(e){return!0===n.disabledDates[e.format("YYYY-MM-DD")]},L=function(e){return!0===n.enabledDates[e.format("YYYY-MM-DD")]},W=function(e){return!0===n.disabledHours[e.format("H")]},z=function(e){return!0===n.enabledHours[e.format("H")]},N=function(t,a){if(!t.isValid())return!1;if(n.disabledDates&&"d"===a&&F(t))return!1;if(n.enabledDates&&"d"===a&&!L(t))return!1;if(n.minDate&&t.isBefore(n.minDate,a))return!1;if(n.maxDate&&t.isAfter(n.maxDate,a))return!1;if(n.daysOfWeekDisabled&&"d"===a&&-1!==n.daysOfWeekDisabled.indexOf(t.day()))return!1;if(n.disabledHours&&("h"===a||"m"===a||"s"===a)&&W(t))return!1;if(n.enabledHours&&("h"===a||"m"===a||"s"===a)&&!z(t))return!1;if(n.disabledTimeIntervals&&("h"===a||"m"===a||"s"===a)){var r=!1;if(e.each(n.disabledTimeIntervals,function(){if(t.isBetween(this[0],this[1]))return r=!0,!1}),r)return!1}return!0},V=function(){for(var t=[],a=i.clone().startOf("y").startOf("d");a.isSame(i,"y");)t.push(e("").attr("data-action","selectMonth").addClass("month").text(a.format("MMM"))),a.add(1,"M");m.find(".datepicker-months td").empty().append(t)},Z=function(){var t=m.find(".datepicker-months"),a=t.find("th"),o=t.find("tbody").find("span");a.eq(0).find("span").attr("title",n.tooltips.prevYear),a.eq(1).attr("title",n.tooltips.selectYear),a.eq(2).find("span").attr("title",n.tooltips.nextYear),t.find(".disabled").removeClass("disabled"),N(i.clone().subtract(1,"y"),"y")||a.eq(0).addClass("disabled"),a.eq(1).text(i.year()),N(i.clone().add(1,"y"),"y")||a.eq(2).addClass("disabled"),o.removeClass("active"),r.isSame(i,"y")&&!u&&o.eq(r.month()).addClass("active"),o.each(function(t){N(i.clone().month(t),"M")||e(this).addClass("disabled")})},R=function(){var e=m.find(".datepicker-years"),t=e.find("th"),a=i.clone().subtract(5,"y"),o=i.clone().add(6,"y"),s="";for(t.eq(0).find("span").attr("title",n.tooltips.prevDecade),t.eq(1).attr("title",n.tooltips.selectDecade),t.eq(2).find("span").attr("title",n.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),n.minDate&&n.minDate.isAfter(a,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(a.year()+"-"+o.year()),n.maxDate&&n.maxDate.isBefore(o,"y")&&t.eq(2).addClass("disabled");!a.isAfter(o,"y");)s+=''+a.year()+"",a.add(1,"y");e.find("td").html(s)},Q=function(){var e,a=m.find(".datepicker-decades"),o=a.find("th"),s=t({y:i.year()-i.year()%100-1}),d=s.clone().add(100,"y"),l=s.clone(),p=!1,c=!1,u="";for(o.eq(0).find("span").attr("title",n.tooltips.prevCentury),o.eq(2).find("span").attr("title",n.tooltips.nextCentury),a.find(".disabled").removeClass("disabled"),(s.isSame(t({y:1900}))||n.minDate&&n.minDate.isAfter(s,"y"))&&o.eq(0).addClass("disabled"),o.eq(1).text(s.year()+"-"+d.year()),(s.isSame(t({y:2e3}))||n.maxDate&&n.maxDate.isBefore(d,"y"))&&o.eq(2).addClass("disabled");!s.isAfter(d,"y");)e=s.year()+12,p=n.minDate&&n.minDate.isAfter(s,"y")&&n.minDate.year()<=e,c=n.maxDate&&n.maxDate.isAfter(s,"y")&&n.maxDate.year()<=e,u+=''+(s.year()+1)+" - "+(s.year()+12)+"",s.add(12,"y");u+="",a.find("td").html(u),o.eq(1).text(l.year()+1+"-"+s.year())},U=function(){var t,a,o,s=m.find(".datepicker-days"),d=s.find("th"),l=[],p=[];if(S()){for(d.eq(0).find("span").attr("title",n.tooltips.prevMonth),d.eq(1).attr("title",n.tooltips.selectMonth),d.eq(2).find("span").attr("title",n.tooltips.nextMonth),s.find(".disabled").removeClass("disabled"),d.eq(1).text(i.format(n.dayViewHeaderFormat)),N(i.clone().subtract(1,"M"),"M")||d.eq(0).addClass("disabled"),N(i.clone().add(1,"M"),"M")||d.eq(2).addClass("disabled"),t=i.clone().startOf("M").startOf("w").startOf("d"),o=0;o<42;o++)0===t.weekday()&&(a=e("
    '+t.week()+"'+t.date()+"
    '+a.format(s?"HH":"hh")+"
    '+a.format("mm")+"
    '+a.format("ss")+"