@bmlt-enabled/croutonjs 3.12.2 → 3.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/crouton.js CHANGED
@@ -12863,6 +12863,14 @@ function CroutonLocalization(language) {
12863
12863
  IN_PERSON: "In Person",
12864
12864
  VIRTUAL: "Virtual",
12865
12865
  },
12866
+ "service_body_types": {
12867
+ AS: "Area Service Committee",
12868
+ RS: "Regional Service Committee",
12869
+ ZF: "Zonal Forum",
12870
+ MA: "Metropolitan Service Committee",
12871
+ LS: "Local Service Forum",
12872
+ GS: "Group Support Forum"
12873
+ },
12866
12874
  "share": "share",
12867
12875
  },
12868
12876
  "de-DE":{
@@ -12889,6 +12897,14 @@ function CroutonLocalization(language) {
12889
12897
  IN_PERSON: "Präsens-Meetings",
12890
12898
  VIRTUAL: "Online-Meetings",
12891
12899
  },
12900
+ "service_body_types": {
12901
+ AS: "Area Service Committee",
12902
+ RS: "Regional Service Committee",
12903
+ ZF: "Zonal Forum",
12904
+ MA: "Metropolitan Service Committee",
12905
+ LS: "Local Service Forum",
12906
+ GS: "Group Support Forum"
12907
+ },
12892
12908
  "share": "Teilen",
12893
12909
  },
12894
12910
  "en-AU": {
@@ -12915,6 +12931,14 @@ function CroutonLocalization(language) {
12915
12931
  IN_PERSON: "In Person",
12916
12932
  VIRTUAL: "Virtual",
12917
12933
  },
12934
+ "service_body_types": {
12935
+ AS: "Area Service Committee",
12936
+ RS: "Regional Service Committee",
12937
+ ZF: "Zonal Forum",
12938
+ MA: "Metropolitan Service Committee",
12939
+ LS: "Local Service Forum",
12940
+ GS: "Group Support Forum"
12941
+ },
12918
12942
  "share": "share",
12919
12943
  },
12920
12944
  "en-CA": {
@@ -12941,6 +12965,14 @@ function CroutonLocalization(language) {
12941
12965
  IN_PERSON: "In Person",
12942
12966
  VIRTUAL: "Virtual",
12943
12967
  },
12968
+ "service_body_types": {
12969
+ AS: "Area Service Committee",
12970
+ RS: "Regional Service Committee",
12971
+ ZF: "Zonal Forum",
12972
+ MA: "Metropolitan Service Committee",
12973
+ LS: "Local Service Forum",
12974
+ GS: "Group Support Forum"
12975
+ },
12944
12976
  "share": "share",
12945
12977
  },
12946
12978
  "en-NZ": {
@@ -12967,6 +12999,14 @@ function CroutonLocalization(language) {
12967
12999
  IN_PERSON: "In Person",
12968
13000
  VIRTUAL: "Virtual",
12969
13001
  },
13002
+ "service_body_types": {
13003
+ AS: "Area Service Committee",
13004
+ RS: "Regional Service Committee",
13005
+ ZF: "Zonal Forum",
13006
+ MA: "Metropolitan Service Committee",
13007
+ LS: "Local Service Forum",
13008
+ GS: "Group Support Forum"
13009
+ },
12970
13010
  "share": "share",
12971
13011
  },
12972
13012
  "en-UK": {
@@ -12993,6 +13033,14 @@ function CroutonLocalization(language) {
12993
13033
  IN_PERSON: "In Person",
12994
13034
  VIRTUAL: "Virtual",
12995
13035
  },
13036
+ "service_body_types": {
13037
+ AS: "Area Service Committee",
13038
+ RS: "Regional Service Committee",
13039
+ ZF: "Zonal Forum",
13040
+ MA: "Metropolitan Service Committee",
13041
+ LS: "Local Service Forum",
13042
+ GS: "Group Support Forum"
13043
+ },
12996
13044
  "share": "share",
12997
13045
  },
12998
13046
  "en-US": {
@@ -13019,6 +13067,14 @@ function CroutonLocalization(language) {
13019
13067
  IN_PERSON: "In Person",
13020
13068
  VIRTUAL: "Virtual",
13021
13069
  },
13070
+ "service_body_types": {
13071
+ AS: "Area Service Committee",
13072
+ RS: "Regional Service Committee",
13073
+ ZF: "Zonal Forum",
13074
+ MA: "Metropolitan Service Committee",
13075
+ LS: "Local Service Forum",
13076
+ GS: "Group Support Forum"
13077
+ },
13022
13078
  "share": "share",
13023
13079
  },
13024
13080
  "es-US": {
@@ -13045,6 +13101,14 @@ function CroutonLocalization(language) {
13045
13101
  IN_PERSON: "In Person",
13046
13102
  VIRTUAL: "Virtual",
13047
13103
  },
13104
+ "service_body_types": {
13105
+ AS: "Area Service Committee",
13106
+ RS: "Regional Service Committee",
13107
+ ZF: "Zonal Forum",
13108
+ MA: "Metropolitan Service Committee",
13109
+ LS: "Local Service Forum",
13110
+ GS: "Group Support Forum"
13111
+ },
13048
13112
  "share": "share",
13049
13113
  },
13050
13114
  "fa-IR": {
@@ -13071,6 +13135,14 @@ function CroutonLocalization(language) {
13071
13135
  IN_PERSON: "In Person",
13072
13136
  VIRTUAL: "Virtual",
13073
13137
  },
13138
+ "service_body_types": {
13139
+ AS: "Area Service Committee",
13140
+ RS: "Regional Service Committee",
13141
+ ZF: "Zonal Forum",
13142
+ MA: "Metropolitan Service Committee",
13143
+ LS: "Local Service Forum",
13144
+ GS: "Group Support Forum"
13145
+ },
13074
13146
  "share": "share",
13075
13147
  },
13076
13148
  "fr-CA": {
@@ -13097,6 +13169,14 @@ function CroutonLocalization(language) {
13097
13169
  IN_PERSON: "In Person",
13098
13170
  VIRTUAL: "Virtual",
13099
13171
  },
13172
+ "service_body_types": {
13173
+ AS: "Area Service Committee",
13174
+ RS: "Regional Service Committee",
13175
+ ZF: "Zonal Forum",
13176
+ MA: "Metropolitan Service Committee",
13177
+ LS: "Local Service Forum",
13178
+ GS: "Group Support Forum"
13179
+ },
13100
13180
  "share": "share",
13101
13181
  },
13102
13182
  "it-IT": {
@@ -13123,6 +13203,15 @@ function CroutonLocalization(language) {
13123
13203
  IN_PERSON: "In Person",
13124
13204
  VIRTUAL: "Virtual",
13125
13205
  },
13206
+ "service_body_types": {
13207
+ AS: "Area Service Committee",
13208
+ RS: "Regional Service Committee",
13209
+ ZF: "Zonal Forum",
13210
+ MA: "Metropolitan Service Committee",
13211
+ LS: "Local Service Forum",
13212
+ GS: "Group Support Forum"
13213
+ },
13214
+ "share": "Condividi"
13126
13215
  },
13127
13216
  "nl-NL": {
13128
13217
  "days_of_the_week" : ["", "Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"],
@@ -13148,6 +13237,14 @@ function CroutonLocalization(language) {
13148
13237
  IN_PERSON: "Fysiek",
13149
13238
  VIRTUAL: "Online",
13150
13239
  },
13240
+ "service_body_types": {
13241
+ AS: "Area Service Committee",
13242
+ RS: "Regional Service Committee",
13243
+ ZF: "Zonal Forum",
13244
+ MA: "Metropolitan Service Committee",
13245
+ LS: "Local Service Forum",
13246
+ GS: "Group Support Forum"
13247
+ },
13151
13248
  "share": "share",
13152
13249
  },
13153
13250
  "pl-PL": {
@@ -13174,6 +13271,14 @@ function CroutonLocalization(language) {
13174
13271
  IN_PERSON: "In Person",
13175
13272
  VIRTUAL: "Virtual",
13176
13273
  },
13274
+ "service_body_types": {
13275
+ AS: "Area Service Committee",
13276
+ RS: "Regional Service Committee",
13277
+ ZF: "Zonal Forum",
13278
+ MA: "Metropolitan Service Committee",
13279
+ LS: "Local Service Forum",
13280
+ GS: "Group Support Forum"
13281
+ },
13177
13282
  "share": "share",
13178
13283
  },
13179
13284
  "pt-BR": {
@@ -13191,16 +13296,24 @@ function CroutonLocalization(language) {
13191
13296
  "map" : "Mapa",
13192
13297
  "neighborhood": "Bairro",
13193
13298
  "near_me": "Minha Localização",
13194
- "text_search": "Buscar por Texto",
13299
+ "text_search": "digite um endereço",
13195
13300
  "click_search": "Clique no local",
13196
13301
  "pan_and_zoom": "Panorâmico + Zoom",
13197
- "languages": "Languages",
13198
- "venue_types": "Venue Types",
13302
+ "languages": "Idiomas",
13303
+ "venue_types": "tipos de reunião",
13199
13304
  "venue_type_choices": {
13200
- IN_PERSON: "In Person",
13305
+ IN_PERSON: "Presencial",
13201
13306
  VIRTUAL: "Virtual",
13202
13307
  },
13203
- "share": "share",
13308
+ "service_body_types": {
13309
+ AS: "Area Service Committee",
13310
+ RS: "Regional Service Committee",
13311
+ ZF: "Zonal Forum",
13312
+ MA: "Metropolitan Service Committee",
13313
+ LS: "Local Service Forum",
13314
+ GS: "Group Support Forum"
13315
+ },
13316
+ "share": "Compartilhar",
13204
13317
  },
13205
13318
  "ru-RU": {
13206
13319
  "days_of_the_week" : ["", "Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
@@ -13226,6 +13339,14 @@ function CroutonLocalization(language) {
13226
13339
  IN_PERSON: "In Person",
13227
13340
  VIRTUAL: "Virtual",
13228
13341
  },
13342
+ "service_body_types": {
13343
+ AS: "Area Service Committee",
13344
+ RS: "Regional Service Committee",
13345
+ ZF: "Zonal Forum",
13346
+ MA: "Metropolitan Service Committee",
13347
+ LS: "Local Service Forum",
13348
+ GS: "Group Support Forum"
13349
+ },
13229
13350
  "share": "share",
13230
13351
  },
13231
13352
  "sv-SE": {
@@ -13252,6 +13373,14 @@ function CroutonLocalization(language) {
13252
13373
  IN_PERSON: "In Person",
13253
13374
  VIRTUAL: "Virtual",
13254
13375
  },
13376
+ "service_body_types": {
13377
+ AS: "Area Service Committee",
13378
+ RS: "Regional Service Committee",
13379
+ ZF: "Zonal Forum",
13380
+ MA: "Metropolitan Service Committee",
13381
+ LS: "Local Service Forum",
13382
+ GS: "Group Support Forum"
13383
+ },
13255
13384
  "share": "share",
13256
13385
  }
13257
13386
  };
@@ -13269,6 +13398,10 @@ CroutonLocalization.prototype.getVenueType = function(type) {
13269
13398
  return words[this.language]['venue_type_choices'][type];
13270
13399
  }
13271
13400
 
13401
+ CroutonLocalization.prototype.getServiceBodyType = function(type) {
13402
+ return words[this.language]['service_body_types'][type];
13403
+ }
13404
+
13272
13405
  this["hbs_Crouton"] = this["hbs_Crouton"] || {};
13273
13406
  this["hbs_Crouton"]["templates"] = this["hbs_Crouton"]["templates"] || {};
13274
13407
  this["hbs_Crouton"]["templates"]["byday"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
@@ -13732,7 +13865,7 @@ this["hbs_Crouton"]["templates"]["meetings"] = Handlebars.template({"1":function
13732
13865
  + "\"\n data-states=\""
13733
13866
  + alias2((lookupProperty(helpers,"formatDataPointer")||(depth0 && lookupProperty(depth0,"formatDataPointer"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"location_province") : depth0),{"name":"formatDataPointer","hash":{},"data":data,"loc":{"start":{"line":12,"column":15},"end":{"line":12,"column":59}}}))
13734
13867
  + "\"\n data-venues=\""
13735
- + alias2((lookupProperty(helpers,"formatDataFromArray")||(depth0 && lookupProperty(depth0,"formatDataFromArray"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"venue_type") : depth0),{"name":"formatDataFromArray","hash":{},"data":data,"loc":{"start":{"line":13,"column":15},"end":{"line":13,"column":54}}}))
13868
+ + alias2((lookupProperty(helpers,"formatDataFromArray")||(depth0 && lookupProperty(depth0,"formatDataFromArray"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"venue_type_name") : depth0),{"name":"formatDataFromArray","hash":{},"data":data,"loc":{"start":{"line":13,"column":15},"end":{"line":13,"column":59}}}))
13736
13869
  + "\"\n data-languages=\""
13737
13870
  + alias2((lookupProperty(helpers,"formatDataPointerFormats")||(depth0 && lookupProperty(depth0,"formatDataPointerFormats"))||alias4).call(alias3,(depth0 != null ? lookupProperty(depth0,"formats_expanded") : depth0),{"name":"formatDataPointerFormats","hash":{},"data":data,"loc":{"start":{"line":14,"column":18},"end":{"line":14,"column":68}}}))
13738
13871
  + "\">\n <td class=\"bmlt-column1\">\n <div class=\"bmlt-day\">"
@@ -13789,7 +13922,7 @@ this["hbs_Crouton"]["templates"]["meetings"] = Handlebars.template({"1":function
13789
13922
  return undefined
13790
13923
  };
13791
13924
 
13792
- return " <a href=\"javascript:void(0);\" id=\"share-button\" class=\"btn btn-primary btn-xs\" onclick=\"navigator.share({ text: '"
13925
+ return " <a href=\"javascript:void(0);\" id=\"share-button\" class=\"btn btn-primary btn-xs\" onclick='navigator.share({ text: JSON.stringify(\""
13793
13926
  + alias2(alias1((depth0 != null ? lookupProperty(depth0,"formatted_day") : depth0), depth0))
13794
13927
  + " "
13795
13928
  + alias2(alias1((depth0 != null ? lookupProperty(depth0,"start_time_formatted") : depth0), depth0))
@@ -13803,11 +13936,11 @@ this["hbs_Crouton"]["templates"]["meetings"] = Handlebars.template({"1":function
13803
13936
  + alias2(alias1((depth0 != null ? lookupProperty(depth0,"formatted_address") : depth0), depth0))
13804
13937
  + " "
13805
13938
  + alias2(alias1((depth0 != null ? lookupProperty(depth0,"formatted_location_info") : depth0), depth0))
13806
- + ((stack1 = lookupProperty(helpers,"if").call(alias3,(depth0 != null ? lookupProperty(depth0,"virtual_meeting_additional_info") : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":305},"end":{"line":55,"column":397}}})) != null ? stack1 : "")
13807
- + "', url: '"
13808
- + ((stack1 = (lookupProperty(helpers,"isVirtualOrHybrid")||(depth0 && lookupProperty(depth0,"isVirtualOrHybrid"))||alias4).call(alias3,depth0,{"name":"isVirtualOrHybrid","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":406},"end":{"line":55,"column":593}}})) != null ? stack1 : "")
13809
- + ((stack1 = (lookupProperty(helpers,"isInPersonOrHybrid")||(depth0 && lookupProperty(depth0,"isInPersonOrHybrid"))||alias4).call(alias3,depth0,{"name":"isInPersonOrHybrid","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":593},"end":{"line":55,"column":776}}})) != null ? stack1 : "")
13810
- + "'})\"><span class=\"glyphicon glyphicon-share\"></span> "
13939
+ + ((stack1 = lookupProperty(helpers,"if").call(alias3,(depth0 != null ? lookupProperty(depth0,"virtual_meeting_additional_info") : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":320},"end":{"line":55,"column":412}}})) != null ? stack1 : "")
13940
+ + "\"), url: \""
13941
+ + ((stack1 = (lookupProperty(helpers,"isVirtualOrHybrid")||(depth0 && lookupProperty(depth0,"isVirtualOrHybrid"))||alias4).call(alias3,depth0,{"name":"isVirtualOrHybrid","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":422},"end":{"line":55,"column":609}}})) != null ? stack1 : "")
13942
+ + ((stack1 = (lookupProperty(helpers,"isInPersonOrHybrid")||(depth0 && lookupProperty(depth0,"isInPersonOrHybrid"))||alias4).call(alias3,depth0,{"name":"isInPersonOrHybrid","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":609},"end":{"line":55,"column":792}}})) != null ? stack1 : "")
13943
+ + "\"})'><span class=\"glyphicon glyphicon-share\"></span> "
13811
13944
  + alias2(alias1((depth0 != null ? lookupProperty(depth0,"share_word") : depth0), depth0))
13812
13945
  + "</a>\n";
13813
13946
  },"6":function(container,depth0,helpers,partials,data) {
@@ -13828,8 +13961,8 @@ this["hbs_Crouton"]["templates"]["meetings"] = Handlebars.template({"1":function
13828
13961
  return undefined
13829
13962
  };
13830
13963
 
13831
- return ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"virtual_meeting_link") : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":433},"end":{"line":55,"column":502}}})) != null ? stack1 : "")
13832
- + ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"phone_meeting_number") : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":502},"end":{"line":55,"column":571}}})) != null ? stack1 : "");
13964
+ return ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"virtual_meeting_link") : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":449},"end":{"line":55,"column":518}}})) != null ? stack1 : "")
13965
+ + ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"phone_meeting_number") : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":55,"column":518},"end":{"line":55,"column":587}}})) != null ? stack1 : "");
13833
13966
  },"9":function(container,depth0,helpers,partials,data) {
13834
13967
  var lookupProperty = container.lookupProperty || function(parent, propertyName) {
13835
13968
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -13899,6 +14032,61 @@ this["hbs_Crouton"]["templates"]["weekdays"] = Handlebars.template({"1":function
13899
14032
  + ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":2,"column":4},"end":{"line":12,"column":13}}})) != null ? stack1 : "")
13900
14033
  + "</div>\n";
13901
14034
  },"usePartial":true,"useData":true});
14035
+ var croutonDefaultTemplates = {
14036
+
14037
+ meeting_data_template: [
14038
+ "{{#isTemporarilyClosed this}}",
14039
+ " <div class='temporarilyClosed'><span class='glyphicon glyphicon-flag'></span> {{temporarilyClosed this}}</div>",
14040
+ "{{/isTemporarilyClosed}}",
14041
+ "<div class='meeting-name'>{{this.meeting_name}}</div>",
14042
+ "<div class='location-text'>{{this.location_text}}</div>",
14043
+ "<div class='meeting-address'>{{this.formatted_address}}</div>",
14044
+ "<div class='location-information'>{{this.formatted_location_info}}</div>",
14045
+ "{{#if this.virtual_meeting_additional_info}}",
14046
+ " <div class='meeting-additional-info'>{{this.virtual_meeting_additional_info}}</div>",
14047
+ "{{/if}}"
14048
+ ].join('\n'),
14049
+
14050
+ metadata_template: [
14051
+ "{{#isVirtualOrHybrid this}}",
14052
+ " {{#isHybrid this}}",
14053
+ " <div class='meetsVirtually'><span class='glyphicon glyphicon-cloud-upload'></span> {{meetsHybrid this}}</div>",
14054
+ " {{else}}",
14055
+ " <div class='meetsVirtually'><span class='glyphicon glyphicon-cloud'></span> {{meetsVirtually this}}</div>",
14056
+ " {{/isHybrid}}",
14057
+ " {{#if this.virtual_meeting_link}}",
14058
+ " <div><span class='glyphicon glyphicon-globe'></span> {{webLinkify this.virtual_meeting_link}}</div>",
14059
+ " {{#if this.show_qrcode}}",
14060
+ " <div class='qrcode'>{{qrCode this.virtual_meeting_link}}</div>",
14061
+ " {{/if}}",
14062
+ " {{/if}}",
14063
+ " {{#if this.phone_meeting_number}}",
14064
+ " <div><span class='glyphicon glyphicon-earphone'></span> {{phoneLinkify this.phone_meeting_number}}</div>",
14065
+ " {{#if this.show_qrcode}}",
14066
+ " <div class='qrcode'>{{qrCode this.phone_meeting_number}}</div>",
14067
+ " {{/if}}",
14068
+ " {{/if}}",
14069
+ "{{/isVirtualOrHybrid}}",
14070
+ "{{#isNotTemporarilyClosed this}}",
14071
+ " {{#unless (hasFormats 'VM' this)}}",
14072
+ " <div>",
14073
+ " <a id='map-button' class='btn btn-primary btn-xs'",
14074
+ " href='https://www.google.com/maps/search/?api=1&query={{this.latitude}},{{this.longitude}}&q={{this.latitude}},{{this.longitude}}'",
14075
+ " target='_blank' rel='noopener noreferrer'>",
14076
+ " <span class='glyphicon glyphicon-map-marker'></span> {{this.map_word}}</a>",
14077
+ " </div>",
14078
+ " <div class='geo hide'>{{this.latitude}},{{this.longitude}}</div>",
14079
+ " {{/unless}}",
14080
+ "{{/isNotTemporarilyClosed}}"
14081
+ ].join('\n'),
14082
+
14083
+ observer_template: [
14084
+ "<div class='observerLine'>{{this.contact_name_1}} {{this.contact_phone_1}} {{this.contact_email_1}}</div>",
14085
+ "<div class='observerLine'>{{this.contact_name_2}} {{this.contact_phone_2}} {{this.contact_email_2}}</div>"
14086
+ ].join('\n')
14087
+
14088
+ }
14089
+
13902
14090
  var crouton_Handlebars = Handlebars.noConflict();
13903
14091
 
13904
14092
  function Crouton(config) {
@@ -13956,9 +14144,9 @@ function Crouton(config) {
13956
14144
  view_by: "weekday", // TODO: replace with using the first choice in button_filters as the default view_by.
13957
14145
  show_qrcode: false, // Determines whether or not to show the QR code for virtual / phone meetings if they exist.
13958
14146
  theme: "jack", // Allows for setting pre-packaged themes. Choices are listed here: https://github.com/bmlt-enabled/crouton/blob/master/croutonjs/dist/templates/themes
13959
- meeting_data_template: "{{#isTemporarilyClosed this}}<div class='temporarilyClosed'><span class='glyphicon glyphicon-flag'></span> {{temporarilyClosed this}}</div>{{/isTemporarilyClosed}}<div class='meeting-name'>{{this.meeting_name}}</div><div class='location-text'>{{this.location_text}}</div><div class='meeting-address'>{{this.formatted_address}}</div><div class='location-information'>{{this.formatted_location_info}}</div>{{#if this.virtual_meeting_additional_info}}<div class='meeting-additional-info'>{{this.virtual_meeting_additional_info}}</div>{{/if}}",
13960
- metadata_template: "{{#isVirtual this}}{{#isHybrid this}}<div class='meetsVirtually'><span class='glyphicon glyphicon-cloud-upload'></span> {{meetsHybrid this}}</div>{{else}}<div class='meetsVirtually'><span class='glyphicon glyphicon-cloud'></span> {{meetsVirtually this}}</div>{{/isHybrid}}{{#if this.virtual_meeting_link}}<div><span class='glyphicon glyphicon-globe'></span> {{webLinkify this.virtual_meeting_link}}</div>{{#if this.show_qrcode}}<div class='qrcode'>{{qrCode this.virtual_meeting_link}}</div>{{/if}}{{/if}}{{#if this.phone_meeting_number}}<div><span class='glyphicon glyphicon-earphone'></span> {{phoneLinkify this.phone_meeting_number}}</div>{{#if this.show_qrcode}}<div class='qrcode'>{{qrCode this.phone_meeting_number}}</div>{{/if}}{{/if}}{{/isVirtual}}{{#isNotTemporarilyClosed this}}{{#unless (hasFormats 'VM' this)}}<div><a id='map-button' class='btn btn-primary btn-xs' href='https://www.google.com/maps/search/?api=1&query={{this.latitude}},{{this.longitude}}&q={{this.latitude}},{{this.longitude}}' target='_blank' rel='noopener noreferrer'><span class='glyphicon glyphicon-map-marker'></span> {{this.map_word}}</a></div><div class='geo hide'>{{this.latitude}},{{this.longitude}}</div>{{/unless}}{{/isNotTemporarilyClosed}}",
13961
- observer_template: "<div class='observerLine'>{{this.contact_name_1}} {{this.contact_phone_1}} {{this.contact_email_1}}</div><div class='observerLine'>{{this.contact_name_2}} {{this.contact_phone_2}} {{this.contact_email_2}}</div>"
14147
+ meeting_data_template: croutonDefaultTemplates.meeting_data_template,
14148
+ metadata_template: croutonDefaultTemplates.metadata_template,
14149
+ observer_template: croutonDefaultTemplates.observer_template
13962
14150
  };
13963
14151
 
13964
14152
  self.setConfig(config);
@@ -13981,15 +14169,17 @@ function Crouton(config) {
13981
14169
  self.searchByCoordinates = function(latitude, longitude) {
13982
14170
  var width = self.config['map_search']['width'] || -50;
13983
14171
 
13984
- self.config['custom_query'] = self.config['custom_query'] + "&lat_val=" + latitude + "&long_val=" + longitude
14172
+ self.config['custom_query'] = (self.config['custom_query'] !== null ? self.config['custom_query'] : "")
14173
+ + "&lat_val=" + latitude + "&long_val=" + longitude
13985
14174
  + (self.config['distance_units'] === "km" ? '&geo_width_km=' : '&geo_width=') + width;
13986
- self.meetingSearch(function() {
13987
- self.reset();
13988
- self.render();
13989
- self.initMap(function() {
13990
- self.addCurrentLocationPin(latitude, longitude);
14175
+ self.meetingSearch()
14176
+ .then(function() {
14177
+ self.reset();
14178
+ self.render();
14179
+ self.initMap(function() {
14180
+ self.addCurrentLocationPin(latitude, longitude);
14181
+ });
13991
14182
  });
13992
- });
13993
14183
  };
13994
14184
 
13995
14185
  self.addCurrentLocationPin = function(latitude, longitude) {
@@ -14056,38 +14246,44 @@ function Crouton(config) {
14056
14246
  //infoWindow.close();
14057
14247
  };
14058
14248
 
14059
- self.getMeetings = function(url, callback) {
14060
- jQuery.getJSON(this.config['root_server'] + url + '&callback=?', function (data) {
14061
- if (data === null || JSON.stringify(data['meetings']) === "{}") {
14062
- var fullUrl = self.config['root_server'] + url
14063
- console.log("Could not find any meetings for the criteria specified with the query <a href=\"" + fullUrl + "\" target=_blank>" + fullUrl + "</a>");
14064
- jQuery('#' + self.config['placeholder_id']).html("No meetings found.");
14065
- return;
14249
+ self.getMeetings = function(url) {
14250
+ var promises = [fetchJsonp(this.config['root_server'] + url).then(function(response) { return response.json(); })];
14251
+
14252
+ if (self.config['extra_meetings'].length > 0) {
14253
+ var extra_meetings_query = "";
14254
+ for (var i = 0; i < self.config['extra_meetings'].length; i++) {
14255
+ extra_meetings_query += "&meeting_ids[]=" + self.config["extra_meetings"][i];
14066
14256
  }
14067
- data['meetings'].exclude(self.config['exclude_zip_codes'], "location_postal_code_1");
14068
- self.meetingData = data['meetings'];
14069
- self.formatsData = data['formats'];
14070
-
14071
- if (self.config['extra_meetings'].length > 0) {
14072
- var extra_meetings_query = "";
14073
- for (var i = 0; i < self.config['extra_meetings'].length; i++) {
14074
- extra_meetings_query += "&meeting_ids[]=" + self.config["extra_meetings"][i];
14257
+ promises.push(fetchJsonp(self.config['root_server'] + url + extra_meetings_query).then(function (response) { return response.json(); }));
14258
+ }
14259
+
14260
+ return Promise.all(promises)
14261
+ .then(function(data) {
14262
+ var mainMeetings = data[0];
14263
+ var extraMeetings;
14264
+ if (data.length === 2) {
14265
+ extraMeetings = data[1];
14266
+ }
14267
+ if (JSON.stringify(mainMeetings['meetings']) === "{}") {
14268
+ var fullUrl = self.config['root_server'] + url
14269
+ console.log("Could not find any meetings for the criteria specified with the query <a href=\"" + fullUrl + "\" target=_blank>" + fullUrl + "</a>");
14270
+ jQuery('#' + self.config['placeholder_id']).html("No meetings found.");
14271
+ return;
14272
+ }
14273
+ mainMeetings['meetings'].exclude(self.config['exclude_zip_codes'], "location_postal_code_1");
14274
+ self.meetingData = mainMeetings['meetings'];
14275
+ self.formatsData = mainMeetings['formats'];
14276
+
14277
+ if (extraMeetings) {
14278
+ self.meetingData.concat(extraMeetings['meetings']);
14075
14279
  }
14076
- jQuery.getJSON(self.config['root_server'] + url + '&callback=?' + extra_meetings_query, function (data) {
14077
- self.meetingData = self.meetingData.concat(data);
14078
- self.mutex = false;
14079
- callback();
14080
- });
14081
- } else {
14082
14280
  self.mutex = false;
14083
- callback();
14084
- }
14085
- });
14281
+ });
14086
14282
  };
14087
14283
  self.mutex = true;
14088
14284
 
14089
- self.meetingSearch = function(callback) {
14090
- var data_field_keys = [
14285
+ self.meetingSearch = function() {
14286
+ var base_data_field_keys = [
14091
14287
  'location_postal_code_1',
14092
14288
  'duration_time',
14093
14289
  'start_time',
@@ -14110,20 +14306,55 @@ function Crouton(config) {
14110
14306
  'worldid_mixed',
14111
14307
  'root_server_uri',
14112
14308
  'id_bigint',
14309
+ 'venue_type',
14113
14310
  ];
14114
14311
 
14115
- var extra_fields_regex = /this\.([A-Za-z0-9_]*)}}/gi;
14116
- while (arr = extra_fields_regex.exec(self.config['meeting_data_template'])) {
14117
- data_field_keys.push(arr[1]);
14118
- }
14119
- while (arr = extra_fields_regex.exec(self.config['metadata_template'])) {
14120
- data_field_keys.push(arr[1]);
14121
- }
14122
- while (arr = extra_fields_regex.exec(self.config['observer_template'])) {
14123
- data_field_keys.push(arr[1]);
14312
+ var calculated_keys = [
14313
+ "serviceBodyName",
14314
+ "serviceBodyUrl",
14315
+ "serviceBodyPhone",
14316
+ "serviceBodyDescription",
14317
+ "serviceBodyType",
14318
+ "parentServiceBodyName",
14319
+ "parentServiceBodyUrl",
14320
+ "parentServiceBodyPhone",
14321
+ "parentServiceBodyDescription",
14322
+ "parentServiceBodyType",
14323
+ "map_word",
14324
+ "share_word",
14325
+ "show_qrcode",
14326
+ "formatted_day",
14327
+ "formatted_address",
14328
+ "formats_expanded",
14329
+ "formatted_location_info",
14330
+ "end_time_formatted",
14331
+ "start_time_formatted",
14332
+ "formatted_comments",
14333
+ "start_time_raw",
14334
+ "venue_type_name",
14335
+ "day_of_the_week",
14336
+ ];
14337
+
14338
+ self.all_data_keys = base_data_field_keys.clone();
14339
+ self.queryable_data_keys = base_data_field_keys.clone();
14340
+
14341
+ self.collectDataKeys = function(template) {
14342
+ var extra_fields_regex = /this\.([A-Za-z0-9_]*)}}/gi;
14343
+ while (arr = extra_fields_regex.exec(template)) {
14344
+ self.all_data_keys.push(arr[1]);
14345
+ if (!inArray(arr[1], calculated_keys)) {
14346
+ self.queryable_data_keys.push(arr[1]);
14347
+ }
14348
+ }
14124
14349
  }
14350
+
14351
+ self.collectDataKeys(self.config['meeting_data_template']);
14352
+ self.collectDataKeys(self.config['metadata_template']);
14353
+ self.collectDataKeys(self.config['observer_template']);
14354
+
14355
+ var unique_data_field_keys = arrayUnique(self.queryable_data_keys);
14125
14356
  var url = '/client_interface/jsonp/?switcher=GetSearchResults&get_used_formats&lang_enum=' + self.config['short_language'] +
14126
- '&data_field_key=' + data_field_keys.join(',')
14357
+ '&data_field_key=' + unique_data_field_keys.join(',');
14127
14358
 
14128
14359
  if (self.config['int_include_unpublished'] === 1) {
14129
14360
  url += "&advanced_published=0"
@@ -14133,18 +14364,20 @@ function Crouton(config) {
14133
14364
 
14134
14365
  if (self.config['distance_search'] !== 0) {
14135
14366
  if (navigator.geolocation) {
14136
- navigator.geolocation.getCurrentPosition(function(position) {
14367
+ return new Promise(function (resolve, reject) {
14368
+ navigator.geolocation.getCurrentPosition(resolve, reject);
14369
+ }).then(function(position) {
14137
14370
  url += '&lat_val=' + position.coords.latitude
14138
14371
  + '&long_val=' + position.coords.longitude
14139
14372
  + '&sort_results_by_distance=1';
14140
14373
 
14141
14374
  url += (self.config['distance_units'] === "km" ? '&geo_width_km=' : '&geo_width=') + self.config['distance_search'];
14142
- self.getMeetings(url, callback);
14143
- }, self.errorHandler);
14375
+ return self.getMeetings(url);
14376
+ });
14144
14377
  }
14145
14378
  } else if (self.config['custom_query'] != null) {
14146
14379
  url += self.config['custom_query'] + '&sort_keys=' + self.config['sort_keys'];
14147
- self.getMeetings(url, callback);
14380
+ return self.getMeetings(url);
14148
14381
  } else if (self.config['service_body'].length > 0) {
14149
14382
  for (var i = 0; i < self.config['service_body'].length; i++) {
14150
14383
  url += '&services[]=' + self.config['service_body'][i];
@@ -14156,14 +14389,18 @@ function Crouton(config) {
14156
14389
 
14157
14390
  url += '&sort_keys=' + self.config['sort_keys'];
14158
14391
 
14159
- self.getMeetings(url, callback);
14392
+ return self.getMeetings(url);
14393
+ } else {
14394
+ return new Promise(function(resolve, reject) {
14395
+ resolve();
14396
+ });
14160
14397
  }
14161
14398
  };
14162
14399
 
14163
14400
  if (self.config['map_search'] !== null) {
14164
14401
  self.loadGapi('crouton.renderMap');
14165
14402
  } else {
14166
- self.meetingSearch(function() {});
14403
+ self.meetingSearch();
14167
14404
  }
14168
14405
 
14169
14406
  self.lock = function(callback) {
@@ -14294,16 +14531,30 @@ function Crouton(config) {
14294
14531
  callback();
14295
14532
  };
14296
14533
 
14297
- self.getServiceBodies = function (service_bodies_id, callback) {
14298
- jQuery.getJSON(this.config['root_server'] + '/client_interface/jsonp/?switcher=GetServiceBodies'
14299
- + getServiceBodiesQueryString(service_bodies_id) + '&callback=?', callback);
14534
+ self.getServiceBodies = function(service_bodies_id) {
14535
+ var requires_parents = false;
14536
+ for (var i = 0; i < self.all_data_keys.length; i++) {
14537
+ var data_key = self.all_data_keys[i];
14538
+ if (data_key.indexOf("parentServiceBody") >= 0) {
14539
+ requires_parents = true;
14540
+ break;
14541
+ }
14542
+ }
14543
+
14544
+ var url = this.config['root_server'] + '/client_interface/jsonp/?switcher=GetServiceBodies'
14545
+ + (requires_parents ? '&parents=1' : '') + getServiceBodiesQueryString(service_bodies_id);
14546
+ return fetchJsonp(url)
14547
+ .then(function(response) {
14548
+ return response.json();
14549
+ });
14300
14550
  };
14301
14551
 
14302
- self.getMasterFormats = function (callback) {
14303
- jQuery.getJSON(this.config['root_server'] + '/client_interface/jsonp/?switcher=GetFormats&lang_enum=en&callback=?', function(masterFormats) {
14304
- self.masterFormatCodes = masterFormats;
14305
- callback();
14306
- });
14552
+ self.getMasterFormats = function() {
14553
+ var url = this.config['root_server'] + '/client_interface/jsonp/?switcher=GetFormats&lang_enum=en&key_strings[]=TC&key_strings[]=VM&key_strings[]=HY';
14554
+ return fetchJsonp(url)
14555
+ .then(function(response) {
14556
+ return response.json();
14557
+ });
14307
14558
  }
14308
14559
 
14309
14560
  self.showLocation = function(position) {
@@ -14404,7 +14655,8 @@ function Crouton(config) {
14404
14655
  }
14405
14656
  }
14406
14657
 
14407
- meetingData[m]['venue_type'] = getVenueType(meetingData[m]);
14658
+ meetingData[m]['venue_type'] = parseInt(meetingData[m]['venue_type']);
14659
+ meetingData[m]['venue_type_name'] = getVenueTypeName(meetingData[m]);
14408
14660
  meetingData[m]['formats_expanded'] = formats_expanded;
14409
14661
  var addressParts = [
14410
14662
  meetingData[m]['location_street'],
@@ -14429,6 +14681,23 @@ function Crouton(config) {
14429
14681
  }
14430
14682
  }
14431
14683
  }
14684
+
14685
+ var serviceBodyInfo = self.getServiceBodyDetails(meetingData[m]['service_body_bigint'])
14686
+ meetingData[m]['serviceBodyUrl'] = serviceBodyInfo["url"];
14687
+ meetingData[m]['serviceBodyPhone'] = serviceBodyInfo["helpline"];
14688
+ meetingData[m]['serviceBodyName'] = serviceBodyInfo["name"];
14689
+ meetingData[m]['serviceBodyDescription'] = serviceBodyInfo["description"];
14690
+ meetingData[m]['serviceBodyType'] = self.localization.getServiceBodyType(serviceBodyInfo["type"]);
14691
+
14692
+ var parentBodyInfo = self.getServiceBodyDetails(serviceBodyInfo["parent_id"]);
14693
+ if (parentBodyInfo !== undefined) {
14694
+ meetingData[m]['parentServiceBodyUrl'] = parentBodyInfo["url"];
14695
+ meetingData[m]['parentServiceBodyPhone'] = parentBodyInfo["helpline"];
14696
+ meetingData[m]['parentServiceBodyName'] = parentBodyInfo["name"];
14697
+ meetingData[m]['parentServiceBodyDescription'] = parentBodyInfo["description"];
14698
+ meetingData[m]['parentServiceBodyType'] = self.localization.getServiceBodyType(parentBodyInfo["type"]);
14699
+ }
14700
+
14432
14701
  meetings.push(meetingData[m])
14433
14702
  }
14434
14703
 
@@ -14452,7 +14721,9 @@ function Crouton(config) {
14452
14721
  Crouton.prototype.setConfig = function(config) {
14453
14722
  var self = this;
14454
14723
  for (var propertyName in config) {
14455
- if (propertyName.indexOf("int_") === -1) {
14724
+ if (propertyName.indexOf("_template") > 0 && config[propertyName].trim() === "") {
14725
+ continue;
14726
+ } else if (propertyName.indexOf("int_") === -1) {
14456
14727
  if (config[propertyName] === "1" || config[propertyName] === 1) {
14457
14728
  self.config[propertyName] = true;
14458
14729
  } else if (config[propertyName] === "0" || config[propertyName] === 0) {
@@ -14550,7 +14821,17 @@ Crouton.prototype.serviceBodyNames = function(callback) {
14550
14821
  });
14551
14822
  };
14552
14823
 
14553
- Crouton.prototype.render = function(callback) {
14824
+ Crouton.prototype.getServiceBodyDetails = function(serviceBodyId) {
14825
+ var self = this;
14826
+ for (var s = 0; s < self.all_service_bodies.length; s++) {
14827
+ var service_body = self.all_service_bodies[s];
14828
+ if (service_body['id'] === serviceBodyId) {
14829
+ return service_body;
14830
+ }
14831
+ }
14832
+ }
14833
+
14834
+ Crouton.prototype.render = function() {
14554
14835
  var self = this;
14555
14836
  self.lock(function() {
14556
14837
  var body = jQuery("body");
@@ -14564,6 +14845,10 @@ Crouton.prototype.render = function(callback) {
14564
14845
  self.showMessage("No meetings found for parameters specified.");
14565
14846
  return;
14566
14847
  }
14848
+
14849
+ var unique_service_bodies_ids = getUniqueValuesOfKey(self.meetingData, 'service_body_bigint').sort();
14850
+ var promises = [self.getMasterFormats(), self.getServiceBodies(unique_service_bodies_ids)];
14851
+
14567
14852
  self.uniqueData = {
14568
14853
  'groups': getUniqueValuesOfKey(self.meetingData, 'meeting_name').sort(),
14569
14854
  'cities': getUniqueValuesOfKey(self.meetingData, 'location_municipality').sort(),
@@ -14572,22 +14857,26 @@ Crouton.prototype.render = function(callback) {
14572
14857
  'neighborhoods': getUniqueValuesOfKey(self.meetingData, 'location_neighborhood').sort(),
14573
14858
  'states': getUniqueValuesOfKey(self.meetingData, 'location_province').sort(),
14574
14859
  'zips': getUniqueValuesOfKey(self.meetingData, 'location_postal_code_1').sort(),
14575
- 'unique_service_bodies_ids': getUniqueValuesOfKey(self.meetingData, 'service_body_bigint').sort(),
14860
+ 'unique_service_bodies_ids': unique_service_bodies_ids,
14576
14861
  'venue_types': getValuesFromObject(crouton.localization.getWord("venue_type_choices")).sort()
14577
14862
  };
14578
- if (callback !== undefined) callback();
14579
- self.getMasterFormats(function() {
14580
- self.getServiceBodies(self.uniqueData['unique_service_bodies_ids'], function (service_bodies) {
14581
- var active_service_bodies = [];
14863
+
14864
+ Promise.all(promises)
14865
+ .then(function(data) {
14866
+ self.active_service_bodies = [];
14867
+ self.all_service_bodies = [];
14868
+ self.masterFormatCodes = data[0];
14869
+ var service_bodies = data[1];
14582
14870
  for (var i = 0; i < service_bodies.length; i++) {
14871
+ self.all_service_bodies.push(service_bodies[i]);
14583
14872
  for (var j = 0; j < self.uniqueData['unique_service_bodies_ids'].length; j++) {
14584
14873
  if (service_bodies[i]["id"] === self.uniqueData['unique_service_bodies_ids'][j]) {
14585
- active_service_bodies.push(service_bodies[i]);
14874
+ self.active_service_bodies.push(service_bodies[i]);
14586
14875
  }
14587
14876
  }
14588
14877
  }
14589
14878
 
14590
- self.uniqueData['areas'] = active_service_bodies.sortByKey('name');
14879
+ self.uniqueData['areas'] = self.active_service_bodies.sortByKey('name');
14591
14880
  if (!jQuery.isEmptyObject(self.formatsData)) {
14592
14881
  self.formatsData = self.formatsData.sortByKey('name_string');
14593
14882
  }
@@ -14764,7 +15053,6 @@ Crouton.prototype.render = function(callback) {
14764
15053
  });
14765
15054
  });
14766
15055
  });
14767
- });
14768
15056
  };
14769
15057
 
14770
15058
  Crouton.prototype.mapSearchClickMode = function() {
@@ -15023,6 +15311,7 @@ function getFalseResult(options, ctx) {
15023
15311
  return options.inverse !== undefined ? options.inverse(ctx) : false;
15024
15312
  }
15025
15313
 
15314
+ // [deprecated] Retire after root server 2.16.4 is rolled out everywhere.
15026
15315
  function getMasterFormatId(code, data) {
15027
15316
  for (var f = 0; f < crouton.masterFormatCodes.length; f++) {
15028
15317
  var format = crouton.masterFormatCodes[f];
@@ -15032,18 +15321,25 @@ function getMasterFormatId(code, data) {
15032
15321
  }
15033
15322
  }
15034
15323
 
15035
- const venueType = {
15324
+ // [deprecated] Retire after root server 2.16.4 is rolled out everywhere.
15325
+ var masterFormatVenueType = {
15036
15326
  IN_PERSON: "IN_PERSON",
15037
15327
  VIRTUAL: "VIRTUAL",
15038
15328
  }
15039
15329
 
15040
- function getVenueType(data) {
15041
- if (inArray(getMasterFormatId('HY', data), getFormats(data))) {
15042
- return [crouton.localization.getVenueType(venueType.VIRTUAL), crouton.localization.getVenueType(venueType.IN_PERSON)];
15043
- } else if (inArray(getMasterFormatId('VM', data), getFormats(data))) {
15044
- return [crouton.localization.getVenueType(venueType.VIRTUAL)];
15330
+ var venueType = {
15331
+ IN_PERSON: 1,
15332
+ VIRTUAL: 2,
15333
+ HYBRID: 3,
15334
+ }
15335
+
15336
+ function getVenueTypeName(data) {
15337
+ if (data['venue_type'] === venueType.HYBRID || inArray(getMasterFormatId('HY', data), getFormats(data))) {
15338
+ return [crouton.localization.getVenueType(masterFormatVenueType.VIRTUAL), crouton.localization.getVenueType(masterFormatVenueType.IN_PERSON)];
15339
+ } else if (data['venue_type'] === venueType.VIRTUAL || inArray(getMasterFormatId('VM', data), getFormats(data))) {
15340
+ return [crouton.localization.getVenueType(masterFormatVenueType.VIRTUAL)];
15045
15341
  } else {
15046
- return [crouton.localization.getVenueType(venueType.IN_PERSON)];
15342
+ return [crouton.localization.getVenueType(masterFormatVenueType.IN_PERSON)];
15047
15343
  }
15048
15344
  }
15049
15345
 
@@ -15072,8 +15368,8 @@ crouton_Handlebars.registerHelper('canShare', function(data, options) {
15072
15368
  * @deprecated Since version 3.12.2, will be removed in a future version.
15073
15369
  */
15074
15370
  crouton_Handlebars.registerHelper('isVirtual', function(data, options) {
15075
- return ((inArray(getMasterFormatId('HY', data), getFormats(data)) && !inArray(getMasterFormatId('TC', data), getFormats(data)))
15076
- || inArray(getMasterFormatId('VM', data), getFormats(data)))
15371
+ return ((data['venue_type'] === venueType.HYBRID || data['venue_type'] === venueType.VIRTUAL) || ((inArray(getMasterFormatId('HY', data), getFormats(data)) && !inArray(getMasterFormatId('TC', data), getFormats(data)))
15372
+ || inArray(getMasterFormatId('VM', data), getFormats(data))))
15077
15373
  && (data['virtual_meeting_link'] || data['phone_meeting_number'] || data['virtual_meeting_additional_info']) ? getTrueResult(options, this) : getFalseResult(options, this);
15078
15374
  });
15079
15375
 
@@ -15081,21 +15377,21 @@ crouton_Handlebars.registerHelper('isVirtual', function(data, options) {
15081
15377
  * Assumes consistent set of venue type formats (enforced for newly edited meetings in root server 2.16.0 or greater)
15082
15378
  */
15083
15379
  crouton_Handlebars.registerHelper('isVirtualOnly', function(data, options) {
15084
- return inArray(getMasterFormatId('VM', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15380
+ return data['venue_type'] === venueType.VIRTUAL || inArray(getMasterFormatId('VM', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15085
15381
  });
15086
15382
 
15087
15383
  /**
15088
15384
  * @deprecated Since version 3.12.2 will be removed in a future version.
15089
15385
  */
15090
15386
  crouton_Handlebars.registerHelper('isHybrid', function(data, options) {
15091
- return inArray(getMasterFormatId('HY', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15387
+ return data['venue_type'] === venueType.HYBRID || inArray(getMasterFormatId('HY', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15092
15388
  });
15093
15389
 
15094
15390
  /**
15095
15391
  * Assumes consistent set of venue type formats (enforced for newly edited meetings in root server 2.16.0 or greater)
15096
15392
  */
15097
15393
  crouton_Handlebars.registerHelper('isHybridOnly', function(data, options) {
15098
- return inArray(getMasterFormatId('HY', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15394
+ return data['venue_type'] === venueType.HYBRID || inArray(getMasterFormatId('HY', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15099
15395
  });
15100
15396
 
15101
15397
  crouton_Handlebars.registerHelper('isTemporarilyClosed', function(data, options) {
@@ -15110,22 +15406,22 @@ crouton_Handlebars.registerHelper('isNotTemporarilyClosed', function(data, optio
15110
15406
  * Assumes consistent set of venue type formats (enforced for newly edited meetings in root server 2.16.0 or greater)
15111
15407
  */
15112
15408
  crouton_Handlebars.registerHelper('isInPersonOrHybrid', function(data, options) {
15113
- return !inArray(getMasterFormatId('VM', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15409
+ return data['venue_type'] !== venueType.VIRTUAL && !inArray(getMasterFormatId('VM', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15114
15410
  });
15115
15411
 
15116
15412
  /**
15117
15413
  * Assumes consistent set of venue type formats (enforced for newly edited meetings in root server 2.16.0 or greater)
15118
15414
  */
15119
15415
  crouton_Handlebars.registerHelper('isInPersonOnly', function(data, options) {
15120
- return !inArray(getMasterFormatId('VM', data), getFormats(data))
15121
- && !inArray(getMasterFormatId('HY', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15416
+ return data['venue_type'] === venueType.IN_PERSON || (!inArray(getMasterFormatId('VM', data), getFormats(data))
15417
+ && !inArray(getMasterFormatId('HY', data), getFormats(data))) ? getTrueResult(options, this) : getFalseResult(options, this);
15122
15418
  });
15123
15419
 
15124
15420
  /**
15125
15421
  * Assumes consistent set of venue type formats (enforced for newly edited meetings in root server 2.16.0 or greater)
15126
15422
  */
15127
15423
  crouton_Handlebars.registerHelper('isVirtualOrHybrid', function(data, options) {
15128
- return inArray(getMasterFormatId('VM', data), getFormats(data))
15424
+ return (data['venue_type'] === venueType.VIRTUAL || data['venue_type'] === venueType.HYBRID) || inArray(getMasterFormatId('VM', data), getFormats(data))
15129
15425
  || inArray(getMasterFormatId('HY', data), getFormats(data)) ? getTrueResult(options, this) : getFalseResult(options, this);
15130
15426
  });
15131
15427
 
@@ -15316,6 +15612,10 @@ function getServiceBodiesQueryString(service_bodies_id) {
15316
15612
  return service_bodies_query;
15317
15613
  }
15318
15614
 
15615
+ Array.prototype.clone = function() {
15616
+ return this.slice();
15617
+ }
15618
+
15319
15619
  Array.prototype.filterByObjectKeyValue = function(key, value) {
15320
15620
  var ret = [];
15321
15621
  for (var i = 0; i < this.length; i++) {
@@ -17832,3 +18132,478 @@ Note: The Google Maps API v3 must be included *before* this code
17832
18132
  }
17833
18133
 
17834
18134
  }).call(this);
18135
+
18136
+ var defaultOptions = {
18137
+ timeout: 300000,
18138
+ jsonpCallback: 'callback',
18139
+ jsonpCallbackFunction: null,
18140
+ };
18141
+
18142
+ function generateCallbackFunction() {
18143
+ return 'jsonp_' + Date.now().toString() + '_' + Math.ceil(Math.random() * 100000).toString();
18144
+ }
18145
+
18146
+ function clearFunction(functionName) {
18147
+ // IE8 throws an exception when you try to delete a property on window
18148
+ // http://stackoverflow.com/a/1824228/751089
18149
+ try {
18150
+ delete window[functionName];
18151
+ } catch (e) {
18152
+ window[functionName] = undefined;
18153
+ }
18154
+ }
18155
+
18156
+ function removeScript(scriptId) {
18157
+ var script = document.getElementById(scriptId);
18158
+ if (script) {
18159
+ document.getElementsByTagName('head')[0].removeChild(script);
18160
+ }
18161
+ }
18162
+
18163
+ function fetchJsonp(_url, options) {
18164
+ if (!options) {
18165
+ options = {};
18166
+ }
18167
+ // to avoid param reassign
18168
+ var url = _url;
18169
+ var timeout = options.timeout || defaultOptions.timeout;
18170
+ var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;
18171
+
18172
+ var timeoutId;
18173
+
18174
+ return new Promise(function (resolve, reject) {
18175
+ var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();
18176
+ var scriptId = jsonpCallback + '_' + callbackFunction;
18177
+
18178
+ window[callbackFunction] = function (response) {
18179
+ resolve({
18180
+ ok: true,
18181
+ // keep consistent with fetch API
18182
+ json: function () { return Promise.resolve(response); },
18183
+ });
18184
+
18185
+ if (timeoutId) clearTimeout(timeoutId);
18186
+
18187
+ removeScript(scriptId);
18188
+
18189
+ clearFunction(callbackFunction);
18190
+ };
18191
+
18192
+ // Check if the user set their own params, and if not add a ? to start a list of params
18193
+ url += (url.indexOf('?') === -1) ? '?' : '&';
18194
+
18195
+ var jsonpScript = document.createElement('script');
18196
+ jsonpScript.setAttribute('src', url + jsonpCallback + '=' + callbackFunction);
18197
+ if (options.charset) {
18198
+ jsonpScript.setAttribute('charset', options.charset);
18199
+ }
18200
+ if (options.nonce) {
18201
+ jsonpScript.setAttribute('nonce', options.nonce);
18202
+ }
18203
+ if (options.referrerPolicy) {
18204
+ jsonpScript.setAttribute('referrerPolicy', options.referrerPolicy);
18205
+ }
18206
+ jsonpScript.id = scriptId;
18207
+ document.getElementsByTagName('head')[0].appendChild(jsonpScript);
18208
+
18209
+ timeoutId = setTimeout(function () {
18210
+ reject(new Error('JSONP request to ' + _url + ' timed out'));
18211
+
18212
+ clearFunction(callbackFunction);
18213
+ removeScript(scriptId);
18214
+ window[callbackFunction] = function () {
18215
+ clearFunction(callbackFunction);
18216
+ };
18217
+ }, timeout);
18218
+
18219
+ // Caught if got 404/500
18220
+ jsonpScript.onerror = function () {
18221
+ reject(new Error('JSONP request to ' + _url + ' failed'));
18222
+
18223
+ clearFunction(callbackFunction);
18224
+ removeScript(scriptId);
18225
+ if (timeoutId) clearTimeout(timeoutId);
18226
+ };
18227
+ });
18228
+ }
18229
+
18230
+ // export as global function
18231
+ /*
18232
+ let local;
18233
+ if (typeof global !== 'undefined') {
18234
+ local = global;
18235
+ } else if (typeof self !== 'undefined') {
18236
+ local = self;
18237
+ } else {
18238
+ try {
18239
+ local = Function('return this')();
18240
+ } catch (e) {
18241
+ throw new Error('polyfill failed because global object is unavailable in this environment');
18242
+ }
18243
+ }
18244
+ local.fetchJsonp = fetchJsonp;
18245
+ */
18246
+
18247
+
18248
+ (function (global, factory) {
18249
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
18250
+ typeof define === 'function' && define.amd ? define(factory) :
18251
+ (factory());
18252
+ }(this, (function () { 'use strict';
18253
+
18254
+ /**
18255
+ * @this {Promise}
18256
+ */
18257
+ function finallyConstructor(callback) {
18258
+ var constructor = this.constructor;
18259
+ return this.then(
18260
+ function(value) {
18261
+ // @ts-ignore
18262
+ return constructor.resolve(callback()).then(function() {
18263
+ return value;
18264
+ });
18265
+ },
18266
+ function(reason) {
18267
+ // @ts-ignore
18268
+ return constructor.resolve(callback()).then(function() {
18269
+ // @ts-ignore
18270
+ return constructor.reject(reason);
18271
+ });
18272
+ }
18273
+ );
18274
+ }
18275
+
18276
+ function allSettled(arr) {
18277
+ var P = this;
18278
+ return new P(function(resolve, reject) {
18279
+ if (!(arr && typeof arr.length !== 'undefined')) {
18280
+ return reject(
18281
+ new TypeError(
18282
+ typeof arr +
18283
+ ' ' +
18284
+ arr +
18285
+ ' is not iterable(cannot read property Symbol(Symbol.iterator))'
18286
+ )
18287
+ );
18288
+ }
18289
+ var args = Array.prototype.slice.call(arr);
18290
+ if (args.length === 0) return resolve([]);
18291
+ var remaining = args.length;
18292
+
18293
+ function res(i, val) {
18294
+ if (val && (typeof val === 'object' || typeof val === 'function')) {
18295
+ var then = val.then;
18296
+ if (typeof then === 'function') {
18297
+ then.call(
18298
+ val,
18299
+ function(val) {
18300
+ res(i, val);
18301
+ },
18302
+ function(e) {
18303
+ args[i] = { status: 'rejected', reason: e };
18304
+ if (--remaining === 0) {
18305
+ resolve(args);
18306
+ }
18307
+ }
18308
+ );
18309
+ return;
18310
+ }
18311
+ }
18312
+ args[i] = { status: 'fulfilled', value: val };
18313
+ if (--remaining === 0) {
18314
+ resolve(args);
18315
+ }
18316
+ }
18317
+
18318
+ for (var i = 0; i < args.length; i++) {
18319
+ res(i, args[i]);
18320
+ }
18321
+ });
18322
+ }
18323
+
18324
+ // Store setTimeout reference so promise-polyfill will be unaffected by
18325
+ // other code modifying setTimeout (like sinon.useFakeTimers())
18326
+ var setTimeoutFunc = setTimeout;
18327
+ // @ts-ignore
18328
+ var setImmediateFunc = typeof setImmediate !== 'undefined' ? setImmediate : null;
18329
+
18330
+ function isArray(x) {
18331
+ return Boolean(x && typeof x.length !== 'undefined');
18332
+ }
18333
+
18334
+ function noop() {}
18335
+
18336
+ // Polyfill for Function.prototype.bind
18337
+ function bind(fn, thisArg) {
18338
+ return function() {
18339
+ fn.apply(thisArg, arguments);
18340
+ };
18341
+ }
18342
+
18343
+ /**
18344
+ * @constructor
18345
+ * @param {Function} fn
18346
+ */
18347
+ function Promise(fn) {
18348
+ if (!(this instanceof Promise))
18349
+ throw new TypeError('Promises must be constructed via new');
18350
+ if (typeof fn !== 'function') throw new TypeError('not a function');
18351
+ /** @type {!number} */
18352
+ this._state = 0;
18353
+ /** @type {!boolean} */
18354
+ this._handled = false;
18355
+ /** @type {Promise|undefined} */
18356
+ this._value = undefined;
18357
+ /** @type {!Array<!Function>} */
18358
+ this._deferreds = [];
18359
+
18360
+ doResolve(fn, this);
18361
+ }
18362
+
18363
+ function handle(self, deferred) {
18364
+ while (self._state === 3) {
18365
+ self = self._value;
18366
+ }
18367
+ if (self._state === 0) {
18368
+ self._deferreds.push(deferred);
18369
+ return;
18370
+ }
18371
+ self._handled = true;
18372
+ Promise._immediateFn(function() {
18373
+ var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
18374
+ if (cb === null) {
18375
+ (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
18376
+ return;
18377
+ }
18378
+ var ret;
18379
+ try {
18380
+ ret = cb(self._value);
18381
+ } catch (e) {
18382
+ reject(deferred.promise, e);
18383
+ return;
18384
+ }
18385
+ resolve(deferred.promise, ret);
18386
+ });
18387
+ }
18388
+
18389
+ function resolve(self, newValue) {
18390
+ try {
18391
+ // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
18392
+ if (newValue === self)
18393
+ throw new TypeError('A promise cannot be resolved with itself.');
18394
+ if (
18395
+ newValue &&
18396
+ (typeof newValue === 'object' || typeof newValue === 'function')
18397
+ ) {
18398
+ var then = newValue.then;
18399
+ if (newValue instanceof Promise) {
18400
+ self._state = 3;
18401
+ self._value = newValue;
18402
+ finale(self);
18403
+ return;
18404
+ } else if (typeof then === 'function') {
18405
+ doResolve(bind(then, newValue), self);
18406
+ return;
18407
+ }
18408
+ }
18409
+ self._state = 1;
18410
+ self._value = newValue;
18411
+ finale(self);
18412
+ } catch (e) {
18413
+ reject(self, e);
18414
+ }
18415
+ }
18416
+
18417
+ function reject(self, newValue) {
18418
+ self._state = 2;
18419
+ self._value = newValue;
18420
+ finale(self);
18421
+ }
18422
+
18423
+ function finale(self) {
18424
+ if (self._state === 2 && self._deferreds.length === 0) {
18425
+ Promise._immediateFn(function() {
18426
+ if (!self._handled) {
18427
+ Promise._unhandledRejectionFn(self._value);
18428
+ }
18429
+ });
18430
+ }
18431
+
18432
+ for (var i = 0, len = self._deferreds.length; i < len; i++) {
18433
+ handle(self, self._deferreds[i]);
18434
+ }
18435
+ self._deferreds = null;
18436
+ }
18437
+
18438
+ /**
18439
+ * @constructor
18440
+ */
18441
+ function Handler(onFulfilled, onRejected, promise) {
18442
+ this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
18443
+ this.onRejected = typeof onRejected === 'function' ? onRejected : null;
18444
+ this.promise = promise;
18445
+ }
18446
+
18447
+ /**
18448
+ * Take a potentially misbehaving resolver function and make sure
18449
+ * onFulfilled and onRejected are only called once.
18450
+ *
18451
+ * Makes no guarantees about asynchrony.
18452
+ */
18453
+ function doResolve(fn, self) {
18454
+ var done = false;
18455
+ try {
18456
+ fn(
18457
+ function(value) {
18458
+ if (done) return;
18459
+ done = true;
18460
+ resolve(self, value);
18461
+ },
18462
+ function(reason) {
18463
+ if (done) return;
18464
+ done = true;
18465
+ reject(self, reason);
18466
+ }
18467
+ );
18468
+ } catch (ex) {
18469
+ if (done) return;
18470
+ done = true;
18471
+ reject(self, ex);
18472
+ }
18473
+ }
18474
+
18475
+ Promise.prototype['catch'] = function(onRejected) {
18476
+ return this.then(null, onRejected);
18477
+ };
18478
+
18479
+ Promise.prototype.then = function(onFulfilled, onRejected) {
18480
+ // @ts-ignore
18481
+ var prom = new this.constructor(noop);
18482
+
18483
+ handle(this, new Handler(onFulfilled, onRejected, prom));
18484
+ return prom;
18485
+ };
18486
+
18487
+ Promise.prototype['finally'] = finallyConstructor;
18488
+
18489
+ Promise.all = function(arr) {
18490
+ return new Promise(function(resolve, reject) {
18491
+ if (!isArray(arr)) {
18492
+ return reject(new TypeError('Promise.all accepts an array'));
18493
+ }
18494
+
18495
+ var args = Array.prototype.slice.call(arr);
18496
+ if (args.length === 0) return resolve([]);
18497
+ var remaining = args.length;
18498
+
18499
+ function res(i, val) {
18500
+ try {
18501
+ if (val && (typeof val === 'object' || typeof val === 'function')) {
18502
+ var then = val.then;
18503
+ if (typeof then === 'function') {
18504
+ then.call(
18505
+ val,
18506
+ function(val) {
18507
+ res(i, val);
18508
+ },
18509
+ reject
18510
+ );
18511
+ return;
18512
+ }
18513
+ }
18514
+ args[i] = val;
18515
+ if (--remaining === 0) {
18516
+ resolve(args);
18517
+ }
18518
+ } catch (ex) {
18519
+ reject(ex);
18520
+ }
18521
+ }
18522
+
18523
+ for (var i = 0; i < args.length; i++) {
18524
+ res(i, args[i]);
18525
+ }
18526
+ });
18527
+ };
18528
+
18529
+ Promise.allSettled = allSettled;
18530
+
18531
+ Promise.resolve = function(value) {
18532
+ if (value && typeof value === 'object' && value.constructor === Promise) {
18533
+ return value;
18534
+ }
18535
+
18536
+ return new Promise(function(resolve) {
18537
+ resolve(value);
18538
+ });
18539
+ };
18540
+
18541
+ Promise.reject = function(value) {
18542
+ return new Promise(function(resolve, reject) {
18543
+ reject(value);
18544
+ });
18545
+ };
18546
+
18547
+ Promise.race = function(arr) {
18548
+ return new Promise(function(resolve, reject) {
18549
+ if (!isArray(arr)) {
18550
+ return reject(new TypeError('Promise.race accepts an array'));
18551
+ }
18552
+
18553
+ for (var i = 0, len = arr.length; i < len; i++) {
18554
+ Promise.resolve(arr[i]).then(resolve, reject);
18555
+ }
18556
+ });
18557
+ };
18558
+
18559
+ // Use polyfill for setImmediate for performance gains
18560
+ Promise._immediateFn =
18561
+ // @ts-ignore
18562
+ (typeof setImmediateFunc === 'function' &&
18563
+ function(fn) {
18564
+ // @ts-ignore
18565
+ setImmediateFunc(fn);
18566
+ }) ||
18567
+ function(fn) {
18568
+ setTimeoutFunc(fn, 0);
18569
+ };
18570
+
18571
+ Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
18572
+ if (typeof console !== 'undefined' && console) {
18573
+ console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
18574
+ }
18575
+ };
18576
+
18577
+ /** @suppress {undefinedVars} */
18578
+ var globalNS = (function() {
18579
+ // the only reliable means to get the global object is
18580
+ // `Function('return this')()`
18581
+ // However, this causes CSP violations in Chrome apps.
18582
+ if (typeof self !== 'undefined') {
18583
+ return self;
18584
+ }
18585
+ if (typeof window !== 'undefined') {
18586
+ return window;
18587
+ }
18588
+ if (typeof global !== 'undefined') {
18589
+ return global;
18590
+ }
18591
+ throw new Error('unable to locate global object');
18592
+ })();
18593
+
18594
+ // Expose the polyfill if Promise is undefined or set to a
18595
+ // non-function value. The latter can be due to a named HTMLElement
18596
+ // being exposed by browsers for legacy reasons.
18597
+ // https://github.com/taylorhakes/promise-polyfill/issues/114
18598
+ if (typeof globalNS['Promise'] !== 'function') {
18599
+ globalNS['Promise'] = Promise;
18600
+ } else {
18601
+ if (!globalNS.Promise.prototype['finally']) {
18602
+ globalNS.Promise.prototype['finally'] = finallyConstructor;
18603
+ }
18604
+ if (!globalNS.Promise.allSettled) {
18605
+ globalNS.Promise.allSettled = allSettled;
18606
+ }
18607
+ }
18608
+
18609
+ })));