PageSourceSearch

https://www.pearlweave.com/scs/extensions/shopping_5.js?t=1780943845662

js pearlweave.com collected 2026-10-08 04:39:20 UTC 87,160 bytes, 2,725 lines download raw bytes

1
2var extensions = {};
3extensions['CA.AutoSelectMatrixOptions.1.0.0'] = function(){
4function getExtensionAssetsPath(asset){
5return 'extensions/CA/AutoSelectMatrixOptions/1.0.0/' + asset;
6};
7// @module CA.AutoSelectMatrixOptions
8define('CA.AutoSelectMatrixOptions.View'
9,	[
10		
11		'Backbone'
12    ]
13, function (
14	
15		Backbone
16)
17{
18    'use strict';
19	// @class CA.AutoSelectMatrixOptions.AutoSelectMatrixOptions.View @extends Backbone.View
20	return Backbone.View.extend({
21		
22		initialize: function (options) {
23			
24		}
25	,	events: {
26		}
27	,	bindings: {
28		}
29	, 	childViews: {
30		}
31		//@method getContext @return CA.AutoSelectMatrixOptions.AutoSelectMatrixOptions.View.Context
32	,	getContext: function getContext()
33		{
34			//@class CA.AutoSelectMatrixOptions.AutoSelectMatrixOptions.View.Context
35			
36		}
37	});
38});
39// Model.js
40// -----------------------
41// @module Case
42define("CA.AutoSelectMatrixOptions.Model", ["Backbone", "Utils"], function(
43    Backbone,
44    Utils
45) {
46    "use strict";
47    // @class Case.Fields.Model @extends Backbone.Model
48    return Backbone.Model.extend({
49        
50});
51});
52define(
53	'CA.AutoSelectMatrixOptions'
54,   [
55		//'CA.AutoSelectMatrixOptions.View'
56		'jQuery',
57		'ProductViews.Option.View',
58		'ProductDetails.Quantity.View',
59		'Cart.Item.Summary.View',
60		'ReorderItems.Actions.Quantity.View',
61		'Cart.Detailed.View'
62	]
63,   function (
64		//AutoSelectMatrixOptionsView,
65		jQuery,
66		ProductViewsOptionView,
67		ProductDetailsQuantityView,
68		CartItemSummaryView,
69		ReorderItemsActionsQuantityView,
70		CartDetailedView
71		
72	)
73{
74	'use strict';
75	return  {
76		mountToApp: function mountToApp (container)
77		{
78			// using the 'Layout' component we add a new child view inside the 'Header' existing view 
79			// (there will be a DOM element with the HTML attribute data-view="Header.Logo")
80			// more documentation of the Extensibility API in
81			// https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/index.html
82			
83			var pdp = container.getComponent('PDP');
84			if(pdp){
85					
86				pdp.on('afterOptionSelection', function(event) {
87					var itemInfo = pdp.getItemInfo();
88					var selected_matrix_child = pdp.getSelectedMatrixChilds();
89					
90					//To change option values in Product Specifications Tab after selecting options
91					if(event.value != undefined){
92						var selected_option_value = event.value.label;
93						
94						if(event.itemOptionId == 'custitem_appf_pw_spool_size'){
95							
96							//To set the Quantity to minimum quantity when spool size is changed and to also change the step value
97							var stepValue = Number(event.value.label);
98							jQuery('[data-action="changeQuantity"]').attr('step',stepValue);
99							
100							//Custom Message to be displayed upon spool size option change
101							if(jQuery('.quantity-note').html() == undefined){
102								jQuery('.product-details-quantity-options-title').append("<small class='quantity-note'>order quantity must be in multiples of " + stepValue +" lbs</small>");
103							}
104							else{
105								jQuery('.quantity-note').text('order quantity must be in multiples of ' + stepValue +' lbs');
106							}
107							//Custom Message to be displayed upon spool size option change
108							pdp.setQuantity(itemInfo.item.minimumquantity || 1);// On spool size option changing set Quantity to minqty or 1
109							//To set the Quantity to minimum quantity when spool size is changed and to also change the step value
110						}
111						
112						if(selected_matrix_child.length == 1){
113							jQuery('[id = ' + event.itemOptionId + ']').next().html(selected_option_value);
114						}
115						else{
116							var remaining_options = _.filter(itemInfo.options,function(opt){
117								return (opt.isMandatory == true && opt.value ==undefined);
118							});
119							if(remaining_options){
120								for(var l = 0;l < remaining_options.length; l++){
121									jQuery('[id = ' + remaining_options[l].itemOptionId + ']').next().html('');
122								}
123							}
124							jQuery('[id = ' + event.itemOptionId + ']').next().html(selected_option_value);
125						}
126					}
127					//To change option values in Product Specifications Tab after selecting options
128					
129					//To update option values after selecting any one option, if it has only one child item
130					if(selected_matrix_child.length == 1){
131						var mandatory_options = _.filter(itemInfo.options,function(opt){
132							return (opt.isMandatory == true && opt.value ==undefined);
133						});
134						var key_values_of_selected_matrix_child = Object.keys(selected_matrix_child[0]);
135						var req_key_values = _.filter(key_values_of_selected_matrix_child,function(reqKey){
136							return reqKey.indexOf('custitem') != -1;
137						});
138						for(var i=0;i<mandatory_options.length;i++){
139							for(var j=0;j<mandatory_options[i].values.length;j++){
140								if(mandatory_options[i].values[j].isAvailable){
141									
142									for(var g=0;g<req_key_values.length;g++){
143										if(mandatory_options[i].itemOptionId == req_key_values[g]){
144											var item_field_value = selected_matrix_child[0][req_key_values[g]];
145											if(mandatory_options[i].values[j].label == item_field_value){
146												pdp.setOption(mandatory_options[i].cartOptionId, mandatory_options[i].values[j].internalid);
147											}
148											
149										}
150									}
151									
152								}	
153							}
154						}
155					}
156					//To update option values after selecting any one option, if it has only one child item				
157				
158				});
159				//To update quantity with respect to the spool size of an item in PDP
160				pdp.on('afterQuantityChange',function(){
161					var itemInfo = pdp.getItemInfo();
162					if(itemInfo.options.length > 0){
163						var abc = _.find(itemInfo.options,function(x){
164							return x.itemOptionId == "custitem_appf_pw_spool_size";
165						});
166						if(!_.isUndefined(abc) && !_.isUndefined(abc.value)){
167							var n = Number(abc.value.label);
168							var current_quantity = itemInfo.quantity;
169							const $input_quantity =jQuery('[name="quantity"]');
170							var rem = current_quantity % n;
171							var quo = current_quantity / n;
172							var new_quantity;
173							if((rem > 0) && (current_quantity > itemInfo.item.minimumquantity)){
174								/*if(rem > n/2){
175								//if((new_quantity > n ) && (current_quantity > new_quantity)){	
176									new_quantity = (current_quantity - rem) + n;
177								}
178								else{
179									new_quantity = current_quantity - rem;
180								}*/
181								new_quantity = n * (parseInt(quo)+1);
182								pdp.setQuantity(new_quantity);
183								
184								
185							
186							}
187						}	
188					}	
189				})
190				//To update quantity with respect to the spool size of an item in PDP
191			}
192			//To change option values in Product Specifications Tab after page load, if the options are selected
193			_.extend(ProductViewsOptionView.prototype,{
194				initialize:_.wrap(ProductViewsOptionView.prototype.initialize,function initialize(fn){
195					fn.apply(this, _.toArray(arguments).slice(1));
196					var item_option_id = this.model.get('itemOptionId');
197					
198					jQuery(document).ready(function(){
199						var value_to_be_updated = jQuery('.product-views-option-tile-label [data-item-option-id = '+item_option_id+']').text();
200						if(value_to_be_updated != ''){
201							jQuery('[id = '+item_option_id+']').next().html(value_to_be_updated);
202						}	
203					});
204				})
205			})
206			//To change option values in Product Specifications Tab after page load, if the options are selected
207			
208			//To Change Quantity in Multiples with respect to the spool size 
209			ProductDetailsQuantityView.prototype.initialize = _.wrap(ProductDetailsQuantityView.prototype.initialize, function initialize(fn) {
210				fn.apply(this, _.toArray(arguments).slice(1));
211				
212				var stepValue;
213				if(this.model.get('options').length > 0){
214					var abc = _.find(this.model.get('options').models,function(x){
215						return x.get('itemOptionId') == "custitem_appf_pw_spool_size";
216					});
217					if(!_.isUndefined(abc)){
218						var spoolOptValue = abc.get('value');
219						if(!_.isUndefined(spoolOptValue)){
220							stepValue = Number(spoolOptValue.label);
221						}
222						
223					}
224				}
225				
226				if(!_.isUndefined(stepValue)){
227					jQuery(document).ready(function(){
228						jQuery('[data-action="changeQuantity"]').attr('step',stepValue);
229						
230						jQuery('.product-details-quantity-options-title').append("<small class='quantity-note'>order quantity must be in multiples of " + stepValue +" lbs</small>");
231					})
232				}
233			});
234			ProductDetailsQuantityView.prototype.getContext = _.wrap(ProductDetailsQuantityView.prototype.getContext, function getContext(fn) {
235				var context = fn.apply(this, _.toArray(arguments).slice(1));
236				if(!_.isUndefined(context.model.get('item').get('minimumquantity'))){
237					context.minQty = context.model.get('item').get('minimumquantity');
238				}
239				return context;
240			});
241			//Extended setQuantity To Change Quantity in Multiples with respect to the spool size on clicking it
242			_.extend(ProductDetailsQuantityView.prototype,{
243				setQuantity:_.wrap(ProductDetailsQuantityView.prototype.setQuantity,function setQuantity(fn,e){
244					if(!_.isUndefined(this.model.get('options'))){
245						if(this.model.get('options').length>0){
246							var reqOpt = _.find(this.model.get('options').models,function(opt){
247								return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
248							});
249							if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
250								var spoolSize = Number(reqOpt.get('value').label);
251								
252								e.preventDefault();
253								const value = parseInt(this.$(e.currentTarget).data('value'), 10);
254								const $input_quantity = this.$('[name="quantity"]');
255								const old_value = parseInt($input_quantity.val(), 10);
256								const max_quantity = this.model.get('item').get('_maximumQuantity', true);
257								if(value == 1){
258									var new_quantity = old_value + spoolSize;
259									new_quantity = max_quantity ? Math.min(max_quantity, new_quantity) : new_quantity;
260								}
261								else{
262									var new_quantity = old_value - spoolSize;
263									new_quantity = Math.max(this.model.get('item').get('_minimumQuantity', true), new_quantity);
264								}	
265						
266								$input_quantity.val(new_quantity).trigger('blur');	
267							}
268							else{
269								fn.apply(this, _.toArray(arguments).slice(1));
270							}
271						}
272						else{
273							fn.apply(this, _.toArray(arguments).slice(1));
274						}
275					}
276					else{
277						fn.apply(this, _.toArray(arguments).slice(1));
278					}
279				})
280			});
281			//Extended setQuantity To Change Quantity in Multiples with respect to the spool size on clicking it
282			
283			//Extended getContext to pass the step value and min quantity in CartItemSummaryView
284			CartItemSummaryView.prototype.getContext = _.wrap(CartItemSummaryView.prototype.getContext, function getContext(fn) {
285				var context = fn.apply(this, _.toArray(arguments).slice(1));
286				if(context.line.get('options').length > 0){
287					var abc = _.find(context.line.get('options').models,function(x){
288						return x.get('itemOptionId') == "custitem_appf_pw_spool_size";
289					});
290					if(!_.isUndefined(abc) && !_.isUndefined(abc.get('value'))){
291						var spoolSize = abc.get('value').label;
292						context.stepValue = Number(spoolSize);
293					}
294				}
295				if(!_.isUndefined(context.minimumQuantity)){
296					context.minQty = context.minimumQuantity;
297				}
298				return context;
299			});
300			//Extended getContext to pass the step value and min quantity in CartItemSummaryView
301			
302			//Extended getContext to pass the step value and min quantity in ReorderItemsActionsQuantityView
303			ReorderItemsActionsQuantityView.prototype.getContext = _.wrap(ReorderItemsActionsQuantityView.prototype.getContext, function getContext(fn) {
304				var context = fn.apply(this, _.toArray(arguments).slice(1));
305				
306				if(context.line.get('options').length > 0){
307					var abc = _.find(context.line.get('options').models,function(x){
308						return x.get('itemOptionId') == "custitem_appf_pw_spool_size";
309					});
310					if(!_.isUndefined(abc) && !_.isUndefined(abc.get('value'))){
311						var spoolSize = abc.get('value').label;
312						context.stepValue = Number(spoolSize);
313					}
314				}
315				return context;
316			});
317			//Extended getContext to pass the step value and min quantity in ReorderItemsActionsQuantityView
318			//Extended addQuantity and subQuantity to update quantity in multiples with respect to the spool size
319			_.extend(ReorderItemsActionsQuantityView.prototype,{
320				addQuantity:_.wrap(ReorderItemsActionsQuantityView.prototype.addQuantity,function addQuantity(fn,e){
321					if(!_.isUndefined(this.line.get('options'))){
322						if(this.line.get('options').length>0){
323							var reqOpt = _.find(this.line.get('options').models,function(opt){
324								return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
325							});
326							if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
327								var spoolSize = Number(reqOpt.get('value').label);
328								e.preventDefault();
329								const $element = jQuery(e.target);
330								const oldValue = $element
331									.parent()
332									.find('input')
333									.val();
334								const newVal = parseFloat(oldValue) + spoolSize;
335						
336								$element
337									.parent()
338									.find('input')
339									.val(newVal);
340							}
341							else{
342								fn.apply(this, _.toArray(arguments).slice(1));
343							}
344						}
345						else{
346							fn.apply(this, _.toArray(arguments).slice(1));
347						}
348					}
349					else{
350						fn.apply(this, _.toArray(arguments).slice(1));
351					}
352					
353				}),
354				subQuantity:_.wrap(ReorderItemsActionsQuantityView.prototype.subQuantity,function subQuantity(fn,e){
355					if(!_.isUndefined(this.line.get('options'))){
356						if(this.line.get('options').length>0){
357							var reqOpt = _.find(this.line.get('options').models,function(opt){
358								return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
359							});
360							if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
361								var spoolSize = Number(reqOpt.get('value').label);
362								const $element = jQuery(e.target);
363								const oldValue = $element
364									.parent()
365									.find('input')
366									.val();
367								let newVal = parseFloat(oldValue) - spoolSize;
368								newVal = Math.max(this.line.get('item').get('minimumquantity'), newVal);
369								$element
370									.parent()
371									.find('input')
372									.val(newVal);
373							}
374							else{
375								fn.apply(this, _.toArray(arguments).slice(1));
376							}
377						}
378						else{
379							fn.apply(this, _.toArray(arguments).slice(1));
380						}
381					}
382					else{
383						fn.apply(this, _.toArray(arguments).slice(1));
384					}
385				}),	
386			});
387			//Extended addQuantity and subQuantity to update quantity in multiples with respect to the spool size
388			//Added a new event updateReorderQuantity,it triggers when quantity field is changing to update quantity in multiples with respect to the spool size
389			_.extend(ReorderItemsActionsQuantityView.prototype, { 
390				getEvents:function getEvents(){
391					return {
392						'click [data-action="plus"]': 'addQuantity',
393						'click [data-action="minus"]': 'subQuantity',
394						'change [name="item_quantity"]': 'updateReorderQuantity'
395					};
396				},
397				updateReorderQuantity:function(e){
398					if(!_.isUndefined(this.line.get('options'))){
399						if(this.line.get('options').length>0){
400							var reqOpt = _.find(this.line.get('options').models,function(opt){
401								return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
402							});
403							if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
404								var spoolSize = Number(reqOpt.get('value').label);
405								var n = spoolSize;
406								var current_quantity = jQuery(e.target).val();
407								var rem = current_quantity % n;
408								var quo = current_quantity / n;
409								var new_quantity;
410								if((rem > 0) && (current_quantity > this.line.get('item').get('minimumquantity'))){
411									/*if(rem > n/2){
412										new_quantity = (current_quantity - rem) + n;
413									}
414									else{
415										new_quantity = current_quantity - rem;
416									}*/
417									new_quantity = n*(parseInt(quo)+1);
418									jQuery(e.target).val(new_quantity);
419								}
420							}
421						}
422					}
423				}
424			});
425			//Added a new event updateReorderQuantity,it triggers when quantity field is changing to update quantity in multiples with respect to the spool size
426			
427			//Extended addQuantity and subQuantity to update quantity in multiples with respect to the spool size
428			_.extend(CartItemSummaryView.prototype,{
429				subQuantity:_.wrap(CartItemSummaryView.prototype.subQuantity,function subQuantity(fn,e){
430					if(!_.isUndefined(this.model.get('options'))){
431						if(this.model.get('options').length>0){
432							var reqOpt = _.find(this.model.get('options').models,function(opt){
433								return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
434							});
435							if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
436								var spoolSize = Number(reqOpt.get('value').label);
437								
438								e.preventDefault();
439								const $element = this.$(e.target);
440								const quantity_input = $element.parent().find('input');
441								const old_value = quantity_input.val();
442								let new_val = parseFloat(old_value) - spoolSize;
443						
444								new_val = Math.max(this.model.get('item').get('_minimumQuantity', true), new_val);
445								
446								quantity_input.val(new_val);
447								quantity_input.change();	
448							}
449							else{
450								fn.apply(this, _.toArray(arguments).slice(1));
451							}
452						}
453						else{
454							fn.apply(this, _.toArray(arguments).slice(1));
455						}
456					}
457					else{
458						fn.apply(this, _.toArray(arguments).slice(1));
459					}
460				}),
461				addQuantity:_.wrap(CartItemSummaryView.prototype.addQuantity,function addQuantity(fn,e){
462					if(!_.isUndefined(this.model.get('options'))){
463						if(this.model.get('options').length>0){
464							var reqOpt = _.find(this.model.get('options').models,function(opt){
465								return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
466							});
467							if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
468								var spoolSize = Number(reqOpt.get('value').label);
469								
470								e.preventDefault();
471								const $element = this.$(e.target);
472								const quantity_input = $element.parent().find('input');
473								const old_value = quantity_input.val();
474								const max_quantity = this.model.get('item').get('_maximumQuantity', true);
475								//const min_quantity = this.model.get('item').get('_minimumQuantity', true);
476								let new_val = parseFloat(old_value) + spoolSize;
477								
478								/*if(max_quantity){
479									new_val = Math.min(max_quantity, new_val);
480								}
481								else if(min_quantity){
482									new_val = Math.max(min_quantity, new_val);
483								}
484								else{
485									new_val = new_val;
486								}*/	
487								new_val = max_quantity ? Math.min(max_quantity, new_val) : new_val;
488						
489								quantity_input.val(new_val);
490								quantity_input.change();	
491							}
492							else{
493								fn.apply(this, _.toArray(arguments).slice(1));
494							}
495						}
496						else{
497							fn.apply(this, _.toArray(arguments).slice(1));
498						}
499					}
500					else{
501						fn.apply(this, _.toArray(arguments).slice(1));
502					}
503				}),
504			});
505			//Extended addQuantity and subQuantity to update quantity in multiples with respect to the spool size
506			//Extended updateItemQuantity to update quantity in multiples with respect to the spool size on changing the quantity in the cart page
507			_.extend(CartDetailedView.prototype,{
508				updateItemQuantity:_.wrap(CartDetailedView.prototype.updateItemQuantity,function updateItemQuantity(fn,e){
509					//fn.apply(this, _.toArray(arguments).slice(1));
510					const self = this;
511					const $form = jQuery(e.target).closest('form');
512					const options = ($form).serializeObject();
513					let { internalid } = options;
514					let line = this.model.get('lines').get(internalid);
515					const $input = $form.find('[name="quantity"]');
516					const validInput = this.validInputValue($input[0]);
517					
518					if (!line || this.isRemoving) {
519						return;
520					}
521					if (!validInput || options.quantity) {
522						const new_quantity = parseInt(options.quantity, 10);
523						const item = line.get('item');
524						const min_quantity = item
525							? item.get('_minimumQuantity', true)
526							: line.get('minimumquantity');
527						const max_quantity = item
528							? item.get('_maximumQuantity', true)
529							: line.get('maximumquantity');
530						const current_quantity = parseInt(line.get('quantity'), 10);
531						let new_valid_quantity = new_quantity >= min_quantity ? new_quantity : min_quantity;
532						new_valid_quantity =
533							!!max_quantity && new_quantity > max_quantity ? max_quantity : new_quantity > min_quantity ? new_quantity : min_quantity;
534						$input.val(new_valid_quantity);
535						if (new_quantity !== current_quantity) {
536							$input.val(new_valid_quantity).prop('disabled', true);
537							line.set('quantity', new_valid_quantity);
538							const invalid = line.validate();
539							
540							if (!invalid) {
541						
542								if(!_.isUndefined(line.get('options'))){
543									if(line.get('options').length>0){
544										var reqOpt = _.find(line.get('options').models,function(opt){
545											return opt.get('itemOptionId') == "custitem_appf_pw_spool_size";
546										});
547										if(!_.isUndefined(reqOpt) && !_.isUndefined(reqOpt.get('value'))){
548											var spoolSize = Number(reqOpt.get('value').label);
549											
550											var n = spoolSize;
551											var currentQuantity = line.get('quantity');
552											var rem = currentQuantity % n;
553											var quo = currentQuantity / n;
554											var newQuantity;
555											if((rem > 0) && (currentQuantity > line.get('item').get('minimumquantity'))){
556												
557												newQuantity = n * (parseInt(quo)+1);
558												var cart = container.getComponent('Cart');
559												cart.updateLine({
560													line:{
561														internalid:line.get('internalid'),
562														quantity:newQuantity
563													}
564												});
565												$input.prop('disabled', false);
566												return;
567											}
568											else{
569												var update_promise = this.model.updateLine(line, true);
570											}	
571										}
572										else{
573											var update_promise = this.model.updateLine(line, true);
574										}
575									}
576									else{
577										var update_promise = this.model.updateLine(line, true);
578									}
579								}
580								else{
581									var update_promise = this.model.updateLine(line, true);
582								}
583								//const update_promise = this.model.updateLine(line, true);
584								this.disableElementsOnPromise(update_promise, '#' + internalid + ' button');
585								//this.disableElementsOnPromise(update_promise, `#${internalid} button`);
586								update_promise
587									.fail(function(jqXhr) {
588										const result = JSON.parse(jqXhr.responseText);
589										const { errorDetails } = result;
590										if (!_.isUndefined(errorDetails)) {
591											internalid = errorDetails.newLineId;
592											// we use the new line
593											line = self.model.get('lines').get(internalid);
594										}
595										// revert quantity to the last quantity
596										line.set('quantity', current_quantity);
597										self.render();
598									})
599									.always(function() {
600										$input.prop('disabled', false);
601									});
602							} else {
603								const placeholder = this.$(
604									'#' + internalid + ' [data-type="alert-placeholder"]'
605								);
606								placeholder.empty();
607								_.each(invalid, function(value) {
608									const global_view_message = new GlobalViewsMessageView({
609										message: value,
610										type: 'error',
611										closable: true
612									});
613									placeholder.append(global_view_message.render().$el.html());
614								});
615								$input.prop('disabled', false);
616								line.set('quantity', current_quantity);
617							}
618						}
619					}
620				}),
621				validInputValue:function(input){
622					 // html5 validation
623					 if ((input.validity && !input.validity.valid) || input.value === '') {
624						return false;
625					}
626			
627					// Fallback to browsers that don't yet support html5 input validation
628					return !isNaN(input.value);
629				}/*,
630				removeItem: function removeItem(e) {
631					const self = this;
632					const product = this.model.get('lines').get(this.$(e.target).data('internalid'));
633					const remove_promise = this.model.removeLine(product);
634					const internalid = product.get('internalid');
635			
636					this.isRemoving = true;
637					this.disableElementsOnPromise(
638						remove_promise,
639						`article[id="${internalid}"] a, article[id="${internalid}"] button`
640					);
641			
642					remove_promise.always(function() {
643						self.isRemoving = false;
644					});
645			
646					return remove_promise;
647				}*/
648			})
649			//Extended updateItemQuantity to update quantity in multiples with respect to the spool size on changing the quantity in the cart page
650			
651		}
652	};
653});
654};
655extensions['pearlweave_ext.CaContactUs.1.0.0'] = function(){
656function getExtensionAssetsPath(asset){
657return 'extensions/pearlweave_ext/CaContactUs/1.0.0/' + asset;
658};
659// @module Pearlweave.CaContactUs.ContactUs
660define('Pearlweave.CaContactUs.ContactUs.View'
661	, [
662		'contact_us.tpl'
663		, 'Utils'
664		, 'Backbone'
665		, 'jQuery'
666		, 'underscore'
667		, 'Profile.Model'
668	]
669	, function (
670		contact_us_tpl
671		, Utils
672		, Backbone
673		, jQuery
674		, _
675		, ProfileModel
676	) {
677		'use strict';
678		// @class Pearlweave.CaContactUs.ContactUs.View @extends Backbone.View
679		return Backbone.View.extend({
680			template: contact_us_tpl
681			, initialize: function (options) {
682			}
683			, events: {
684				'submit form': 'createContactLead'
685				, 'blur .contact-us-form-input': 'blockErr'
686			}
687			, valdEmail: function (email) {
688				const re = /\S+@\S+\.\S+/;
689				return re.test(String(email).toLowerCase());
690			}
691			, blockErr: function (e) {
692				var thisEl = $(e.currentTarget);
693				var self = this;
694				if (thisEl.attr('data-label')) {
695					if (thisEl.val()) {
696						if (thisEl.parent().find('[data-validation-error="block"]').length > 0) {
697							thisEl.parent().removeAttr('data-validation-error');
698							thisEl.parent().find('[data-validation-error="block"]').remove();
699						}
700					} else {
701						if (thisEl.parent().find('p[data-validation-error="block"]').length == 0) {
702							thisEl.parent().attr('data-validation-error', '');
703							thisEl.parent().append('<p data-validation-error="block">' + thisEl.attr('data-label') + ' is required.</p>');
704						}
705					}
706				}
707			}
708			, phone_validate: function (phno) {
709				var regexPattern = new RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/g);    // regular expression pattern
710				return regexPattern.test(phno);
711			}
712			, createContactLead: function (e) {
713				e.preventDefault();
714				this.error = false;
715				this.phoneFormatError = false;
716				this.emailFormatError = false;
717				var contactFields = {};
718				var self = this;
719				$('.contact-us-form-input').each(function () {
720					if ($(this).val() == '' || $(this).val() == null) {
721						if ($(this).attr('data-label')) {
722							self.error = true;
723							$(this).trigger('blur');
724						}
725					} else {
726						// if ($(this).attr('id') == 'phone') {
727						// 	if (self.phone_validate($(this).val())) {
728						// 		if ($(this).parent().find('[data-validation-error="block"]').length > 0) {
729						// 			$(this).parent().removeAttr('data-validation-error');
730						// 			$(this).parent().find('[data-validation-error="block"]').remove();
731						// 		}
732						// 	}
733						// 	else {
734						// 		self.phoneFormatError = true;
735						// 		if ($(this).parent().find('p[data-validation-error="block"]').length == 0) {
736						// 			$(this).parent().attr('data-validation-error', '');
737						// 			$(this).parent().append('<p data-validation-error="block">' + 'Please enter valid phone number.</p>');
738						// 		}
739						// 	}
740						// }
741						if ($(this).attr('id') == 'contact-email') {
742							// console.log("s email", self.valdEmail($(this).val()));
743							if (self.valdEmail($(this).val())) {
744								if ($(this).parent().find('[data-validation-error="block"]').length > 0) {
745									$(this).parent().removeAttr('data-validation-error');
746									$(this).parent().find('[data-validation-error="block"]').remove();
747								}
748							}
749							else {
750								self.emailFormatError = true;
751								if ($(this).parent().find('p[data-validation-error="block"]').length == 0) {
752									$(this).parent().attr('data-validation-error', '');
753									$(this).parent().append('<p data-validation-error="block">' + 'Please enter valid email.</p>');
754								}
755							}
756						}
757						if ($(this).is('[type="checkbox"]'))
758							contactFields[$(this).attr('id')] = $(this).is(':checked') ? 'T' : 'F';
759						else
760							contactFields[$(this).attr('id')] = $(this).val();
761					}
762				});
763				if (!this.error && self.emailFormatError === false) {
764					let profile = ProfileModel.getInstance();
765					let isLoggedIn = profile.get('isLoggedIn') === 'T';
766					let customerName = (isLoggedIn) ? (profile.get("firstname") + " User" || profile.get("companyname") + " User") : "Guest User";
767					let customerPhone = (contactFields.phone != null && contactFields.phone != '') ? contactFields.phone : '';
768					let customerComp = (contactFields.company != null && contactFields.company != '') ? contactFields.company : '';
769					contactFields.subject = ` Custom Requirements from the Contact Us Page by ${customerName}`;
770					contactFields.body =
771						"<div>" +
772						"<p><b>Customer Name :</b> " +
773						customerName +
774						"</p>" +
775						"<p><b>First Name :</b> " +
776						contactFields.firstName +
777						"</p>" +
778						"<p><b>Last Name :</b> " +
779						contactFields.lastName +
780						"</p>" +
781						"<p><b>Email :</b> " +
782						contactFields["contact-email"] +
783						"</p>" +
784						"<p><b>Phone :</b> " +
785						customerPhone +
786						"</p>" +
787						"<p><b>Company :</b> " +
788						customerComp +
789						"</p>" +
790						"<p><b>Comments : </b><br>" +
791						contactFields.message.replace(/\n/g, '<br />') +
792						"</p>" +
793						"<br>" +
794						"<p>" +
795						"Regards," +
796						"</p>" +
797						"</div>";
798					var self = this;
799					var promise =
800						new Backbone.Model().save(
801							{
802								contactFields: contactFields
803							}
804							, {
805								url: Utils.getAbsoluteUrl(getExtensionAssetsPath('services/ContactUs.Service.ss'))
806							}
807						).then(function (result) {
808							self.result = result;
809							self.render();
810						});
811				}
812			}
813			, getBreadcrumbPages: function () {
814				return { href: '/contact-us', text: _('Contact Us').translate() };
815			}
816			//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
817			, getContext: function getContext() {
818				var isError = '',
819					response = '',
820					isResponse = false;
821				if (this.result && _.has(this.result, 'id')) {
822					response = 'Your application is successfully sent.';
823					isError = false;
824					isResponse = true;
825				}
826				else if (this.result && _.has(this.result, 'error')) {
827					response = 'Something went wrong! application could not sent.';
828					isError = true;
829					isResponse = true;
830				}
831				//@class Cloudalp.Landing_Pages.landingpages.View.Context
832				return {
833					isError: isError
834					, response: response
835					, isResponse: isResponse
836				};
837			}
838		});
839	});
840// @module LoginRegister View
841define('FacetsCategoryExtension', [
842    'Facets.FacetedNavigationItemCategory.View',
843    'underscore',
844    'SC.Configuration',
845	'jQuery'
846],
847function (
848    FacetedNavigationItemCategoryView,
849    _,
850    Configuration,
851	jQuery
852) {
853    'use strict';
854    return {
855        loadModule: function loadModule(container) {
856			
857			var PLP = container.getComponent('PLP');
858			
859			PLP.on('afterShowContent',function(){
860				var categoryinfo = PLP.getCategoryInfo();
861				
862				var cats = _.has(categoryinfo,'categories')? categoryinfo.categories: [];
863				//var catName = _.has(categoryinfo,'name')? categoryinfo.name: '';
864				
865				
866				var htmlString = '';
867				_.each(cats,function(cat){
868					
869					htmlString += `<li>
870							<a class="facets-faceted-navigation-item-category-facet-option" href="` +cat.fullurl + `" title="`+ cat.name +`">
871								` + cat.name + `
872							</a>
873						</li>`;
874				});
875				
876				var navCats = jQuery('#facets-subcategories-list');
877				var navHolder = jQuery('.facets-faceted-navigation-item-category');
878				
879				if(navCats.length > 0){
880					navCats.html(htmlString);
881					
882					if(!htmlString)
883						navHolder.hide();
884					else
885						navHolder.show();
886					
887					//catName
888				}
889			});
890            
891        }
892    };
893});
894define(
895	'Pearlweave.CaContactUs.ContactUs'
896,   [
897		'Pearlweave.CaContactUs.ContactUs.View'
898	,	'FacetsCategoryExtension'
899	,	'underscore'
900	]
901,   function (
902		ContactUsView
903	,	FacetsCategoryExtension
904	,	_
905	)
906{
907	'use strict';
908	return  {
909		mountToApp: function mountToApp (container)
910		{
911			var pageType = container.getComponent('PageType');
912			
913			
914			pageType.registerPageType({
915				'name': 'contact_us'
916				,	'routes': ['contact-us']
917				,	'view': ContactUsView
918				,	'defaultTemplate': {
919					'name': 'contact_us.tpl'
920				}
921			});
922			FacetsCategoryExtension.loadModule(container);
923		
924		}
925	};
926});
927};
928extensions['PW.PressReleases.1.0.0'] = function(){
929function getExtensionAssetsPath(asset){
930return 'extensions/PW/PressReleases/1.0.0/' + asset;
931};
932// Model.js
933// -----------------------
934// @module Case
935define("PW.PressReleases.PressReleases.Model", ["Backbone", "Utils"], function(
936    Backbone,
937    Utils
938) {
939    "use strict";
940    // @class Case.Fields.Model @extends Backbone.Model
941    return Backbone.Model.extend({
942        
943        //@property {String} urlRoot
944        urlRoot: Utils.getAbsoluteUrl(
945            getExtensionAssetsPath(
946                "services/PressReleases.Service.ss"
947            )
948        )
949        
950});
951});
952// @module PW.PressReleases.PressReleases
953define('PW.PressReleases.PressReleases.View'
954,	[
955	'pw_pressreleases_pressreleases.tpl'
956	
957	,	'Backbone'
958	,	'Utils'
959	,	'PW.PressReleases.PressReleases.Model'
960	,	'Configuration'
961    ]
962, function (
963	pw_pressreleases_pressreleases_tpl
964	
965	,	Backbone
966	,	Utils
967	,	PressReleasesModel
968	,	Configuration
969)
970{
971    'use strict';
972	// @class PW.PressReleases.PressReleases.View @extends Backbone.View
973	return Backbone.View.extend({
974		template: pw_pressreleases_pressreleases_tpl
975	,	title: Utils.translate('Press Releases')
976	,	page_header: Utils.translate('Press Releases')
977		// @property {Object} attributes
978	,	attributes: {
979			id: 'press-releases'
980		}
981	,	initialize: function (options) {
982			this.model = new PressReleasesModel();
983			this.application = options.application;
984		}
985	,  	beforeShowContent:function() {
986			var promise = this.model.fetch();
987			return promise;
988		}
989	,	getBreadcrumbPages: function() {
990			return {
991				text: this.title,
992				href: '/press-releases'
993			};
994		}	
995	,	events: {
996		}
997	,	bindings: {
998		}
999	, 	childViews: {
1000		}
1001		//@method getContext @return PW.PressReleases.PressReleases.View.Context
1002	,	getContext: function getContext()
1003		{
1004			//var date_format = Configuration.get('siteSettings').dateformat;
1005			var pressReleaseItems = this.model.get('records');
1006			console.log('press,',pressReleaseItems);
1007			// var updatedPressReleaseItems = [];
1008			// var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
1009			// var now = new Date('5/5/2024');
1010			// console.log("hj",months[now.getMonth()] + ' ' + now.getDate() + ' ' + now.getFullYear());
1011			// _.each(pressReleaseItems,function(x){
1012			// 	if(x.releaseDate != ''){
1013			// 	}
1014			// });
1015			//@class PW.PressReleases.PressReleases.View.Context
1016			return {
1017				// @property {String} pageHeader
1018				pageHeader: this.page_header,
1019				// @property {Boolean} pressReleaseGreaterThan0
1020				pressReleaseGreaterThan0: pressReleaseItems.length > 0,
1021				// @property {Array<{}>} pressReleaseItems
1022				pressReleaseItems: pressReleaseItems
1023			};
1024		}
1025	});
1026});
1027define(
1028	'PW.PressReleases.PressReleases'
1029,   [
1030		'PW.PressReleases.PressReleases.View'
1031	]
1032,   function (
1033		PressReleasesView
1034	)
1035{
1036	'use strict';
1037	return  {
1038		mountToApp: function mountToApp (container)
1039		{
1040			// using the 'Layout' component we add a new child view inside the 'Header' existing view 
1041			// (there will be a DOM element with the HTML attribute data-view="Header.Logo")
1042			// more documentation of the Extensibility API in
1043			// https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/index.html
1044			
1045			
1046			var pageTypeComponent = container.getComponent("PageType");
1047			var pageType = {
1048				name: 'press_releases',
1049				view: PressReleasesView,
1050				routes:['press-releases']
1051			}
1052			pageTypeComponent.registerPageType(pageType);
1053		}
1054	};
1055});
1056};
1057extensions['PW.RequestMoreInfoExt.1.0.0'] = function(){
1058function getExtensionAssetsPath(asset){
1059return 'extensions/PW/RequestMoreInfoExt/1.0.0/' + asset;
1060};
1061// Model.js
1062// -----------------------
1063// @module Case
1064define("PW.RequestMoreInfoExt.RequestMoreInfoModule.Model", ["Backbone", "Utils"], function (
1065    Backbone,
1066    Utils
1067) {
1068    "use strict";
1069    // @method isPhoneRequired
1070    // Check if phone field is mandatory.
1071    function isPhoneRequired() {
1072        return (
1073            SC &&
1074            SC.CONFIGURATION &&
1075            SC.CONFIGURATION.addresses &&
1076            SC.CONFIGURATION.addresses.isPhoneMandatory
1077        );
1078    }
1079    //    phone: { fn: Utils.validatePhone, required: isPhoneRequired() }
1080    // @class Case.Fields.Model @extends Backbone.Model
1081    return Backbone.Model.extend({
1082        //@property {String} urlRoot
1083        urlRoot: Utils.getAbsoluteUrl(
1084            getExtensionAssetsPath(
1085                "services/RequestMoreInfoModule.Service.ss"
1086            )
1087        )
1088        , validation: {
1089            cust_comments: {
1090                required: true,
1091                msg: Utils.translate('Comments required')
1092            },
1093            firstname: {
1094                required: true,
1095                msg: Utils.translate('First Name required')
1096            },
1097            lastname: {
1098                required: true,
1099                msg: Utils.translate('Last Name required')
1100            },
1101            email: {
1102                required: true,
1103                pattern: 'email',
1104                msg: Utils.translate('Valid Email is required')
1105            }
1106        }
1107    });
1108});
1109// Model.js
1110// -----------------------
1111// @module Case
1112define("PW.RequestMoreInfoExt.RequestMoreInfoModule.SS2Model", ["Backbone", "Utils"], function(
1113    Backbone,
1114    Utils
1115) {
1116    "use strict";
1117    // @class Case.Fields.Model @extends Backbone.Model
1118    return Backbone.Model.extend({
1119        //@property {String} urlRoot
1120        urlRoot: Utils.getAbsoluteUrl(
1121            getExtensionAssetsPath(
1122                "Modules/RequestMoreInfoModule/SuiteScript2/RequestMoreInfoModule.Service.ss"
1123            ),
1124            true
1125        )
1126});
1127});
1128// @module PW.RequestMoreInfoExt.RequestMoreInfoModule
1129define("PW.RequestMoreInfoExt.RequestMoreInfoModule.View", [
1130  "pw_requestmoreinfoext_requestmoreinfomodule.tpl",
1131  "Profile.Model",
1132  "PW.RequestMoreInfoExt.Requestpopup.View",
1133  "Backbone"
1134], function (
1135  pw_requestmoreinfoext_requestmoreinfomodule_tpl,
1136  ProfileModel,
1137  RequestpopupView,
1138  Backbone
1139) {
1140  "use strict";
1141  // @class PW.RequestMoreInfoExt.RequestMoreInfoModule.View @extends Backbone.View
1142  return Backbone.View.extend({
1143    template: pw_requestmoreinfoext_requestmoreinfomodule_tpl,
1144    initialize: function (options) {
1145      /*  Uncomment to test backend communication with an example service
1146				(you'll need to deploy and activate the extension first)
1147			*/
1148      // this.model = new RequestMoreInfoModuleModel();
1149      // var self = this;
1150      // this.model.fetch().done(function(result) {
1151      // 	self.message = result.message;
1152      // 	self.render();
1153      // });
1154      this.container = options.container;
1155      var self = this;
1156      self.profileModel = ProfileModel.getInstance();
1157    },
1158    events: {
1159      "click button": "ContactSales",
1160    },
1161    ContactSales: function (e) {
1162      e.preventDefault();
1163      var view = new RequestpopupView({ container: this.options });
1164      this.container.layout.showInModal(view);
1165    },
1166    //@method getContext @return PW.RequestMoreInfoExt.RequestMoreInfoModule.View.Context
1167    getContext: function getContext() {
1168      //@class PW.RequestMoreInfoExt.RequestMoreInfoModule.View.Context
1169      this.message = this.message || "Hello World!!";
1170      return {
1171        message: this.message,
1172      };
1173    },
1174  });
1175});
1176// @module PW.RequestMoreInfoExt.Requestpopup
1177define("PW.RequestMoreInfoExt.Requestpopup.View", [
1178  "pw_requestmoreinfoext_requestmoreinfomodal.tpl",
1179  "Profile.Model",
1180  "PW.RequestMoreInfoExt.RequestMoreInfoModule.Model",
1181  "Backbone.FormView",
1182  "Backbone",
1183  "SC.Configuration",
1184  "GlobalViews.Message.View",
1185  "Utils",
1186], function (
1187  pw_requestmoreinfoext_requestmoreinfomodal_tpl,
1188  ProfileModel,
1189  RequestMoreInfoModuleModel,
1190  BackboneFormView,
1191  Backbone,
1192  Configuration,
1193  GlobalViewsConfirmationView,
1194  Utils
1195) {
1196  "use strict";
1197  return Backbone.View.extend({
1198    template: pw_requestmoreinfoext_requestmoreinfomodal_tpl,
1199    initialize: function (options) {
1200      var self = this;
1201      self.profileModel = ProfileModel.getInstance();
1202      self.isSubmit = false;
1203      self.model = new RequestMoreInfoModuleModel();
1204      BackboneFormView.add(this);
1205    },
1206    events: {
1207      "submit form": "submitForm"
1208    },
1209    bindings: {
1210      '[name="cust_comments"]': "cust_comments",
1211      '[name="email"]': "email",
1212      '[name="firstname"]': "firstname",
1213      '[name="lastname"]': "lastname"
1214    },
1215    submitForm: function (e, model, props) {
1216      e.preventDefault();
1217      var self = this;
1218      let obj = {};
1219      let item = self.options.container.item.item;
1220      let displayname = item.displayname;
1221      let sku = item.itemid;
1222      let showItemName = displayname || sku;
1223      let customerName = (self.profileModel.get('isLoggedIn') === 'T') ?
1224        (self.profileModel.get("firstname") + " User" ||
1225          self.profileModel.get("companyname") + " User") :
1226        "Guest User";
1227      let comments = $('[name="cust_comments"]').val();
1228      const data = jQuery(e.target).closest("form").serializeObject();
1229      obj.subject = `Custom Requirements for ${sku} by ${customerName}`;
1230      obj.body =
1231        "<div>" +
1232        "<p><b>Customer Name :</b> " +
1233        customerName +
1234        "</p>" +
1235        "<p><b>Item Name : </b>" +
1236        showItemName +
1237        "</p>" +
1238        "<p><b>First Name :</b> " +
1239        data.firstname +
1240        "</p>" +
1241        "<p><b>Last Name :</b> " +
1242        data.lastname +
1243        "</p>" +
1244        "<p><b>Email :</b> " +
1245        data.email +
1246        "</p>" +
1247        "<p><b>Phone :</b> " +
1248        data.phone +
1249        "</p>" +
1250        "<p><b>Company :</b> " +
1251        data.company +
1252        "</p>" +
1253        "<p><b>Comments : </b><br>" +
1254        comments.replace(/\n/g, '<br />') +
1255        "</p>" +
1256        "<br>" +
1257        "<p>" +
1258        "Regards," +
1259        "</p>" +
1260        "</div>";
1261      this.model.set("emailObj", obj);
1262      var promise = self.saveForm(e, model, props);
1263      const deleteConfirmationView = new GlobalViewsConfirmationView({
1264        message: Utils.translate(
1265          "Thank you for submitting the information, our sales team will review soon and get back to you."
1266        ),
1267        type: "success",
1268        closable: false,
1269      });
1270      if (promise) {
1271        promise.done((res) => {
1272          if (res.status === 200) {
1273            self.options.container.container.getLayout().showInModal(deleteConfirmationView);
1274            gtag('event', 'request_more_info_submission', {
1275              'event_category': 'engagement',
1276              'event_label': 'Request More Info Submission'
1277            });
1278          }
1279        });
1280      }
1281    },
1282    getContext: function getContext() {
1283      return {
1284        isSubmitForm: this.isSubmit,
1285      };
1286    },
1287  });
1288});
1289define(
1290	'PW.RequestMoreInfoExt.RequestMoreInfoModule'
1291	, [
1292		'PW.RequestMoreInfoExt.RequestMoreInfoModule.View'
1293		, 'Home.View'
1294		, 'ProductDetails.Full.View'
1295		, 'ProductViews.Price.View'
1296		, 'ProductDetails.QuickView.View'
1297		, 'Utils'
1298		, 'underscore'
1299	]
1300	, function (
1301		RequestMoreInfoModuleView
1302		, HomeView
1303		, ProductDetailsFullView
1304		, ProductViewsPriceView
1305		, ProductDetailsQuickViewView
1306		, Utils
1307		, _
1308	) {
1309		'use strict';
1310		return {
1311			mountToApp: function mountToApp(container) {
1312				// using the 'Layout' component we add a new child view inside the 'Header' existing view
1313				// (there will be a DOM element with the HTML attribute data-view="Header.Logo")
1314				// more documentation of the Extensibility API in
1315				// https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/index.html
1316				//home title
1317				_.extend(HomeView.prototype, {
1318					title: Utils.translate('PearlWeave Netting'),
1319					page_header: Utils.translate('PearlWeave Netting')
1320				});
1321				//end
1322				/** @type {LayoutComponent} */
1323				var PDP = container.getComponent('PDP');
1324				if (PDP) {
1325					PDP.addChildViews(PDP.PDP_FULL_VIEW, {
1326						'ProductDetails.AddToQuote': {
1327							'TALK.TO.SALES': {
1328								childViewIndex: 0,
1329								childViewConstructor: function () {
1330									var iteminfo = PDP.getItemInfo();
1331									return new RequestMoreInfoModuleView({ container: container, item: iteminfo });
1332								}
1333							}
1334						}
1335					});
1336				}
1337				/**
1338				 * Overrides ProductDetailsFullView
1339				 *
1340				 * - If true → hide price and related actions (Add to Quote, etc.)
1341				 * - If false → show price and actions normally
1342				 *
1343				 */
1344				_.extend(ProductDetailsFullView.prototype, {
1345					initialize: _.wrap(ProductDetailsFullView.prototype.initialize, function (fn) {
1346						fn.apply(this, Array.prototype.slice.call(arguments, 1));
1347						var self = this;
1348						this.on('afterViewRender', function () {
1349							setTimeout(() => {
1350								var item = self.model.get('item');
1351								var isChecked = item.get('custitem_ca_hide_price_pw');
1352								var addtWishQuoteBtn = $('.product-detail-to-quote-add-to-quote');
1353								if (isChecked) {
1354									addtWishQuoteBtn.hide();
1355								} else {
1356									addtWishQuoteBtn.show();
1357								}
1358							}, 200);
1359						});
1360					}),
1361					getContext: _.wrap(ProductDetailsFullView.prototype.getContext, function (fn) {
1362						var context = fn.apply(this, Array.prototype.slice.call(arguments, 1));
1363						var item = this.model.get('item');
1364						var RequestMoreInfoFld = item.attributes.custitem_ca_hide_price_pw;
1365						context.RequestMoreInfoFld = RequestMoreInfoFld;
1366						console.log("context", context);
1367						return context;
1368					})
1369				});
1370				/**
1371				 * Overrides ProductDetailsQuickViewView
1372				 *
1373				 * - If true → hide price and related actions (Add to Quote, etc.)
1374				 * - If false → show price and actions normally
1375				 */
1376				_.extend(ProductDetailsQuickViewView.prototype, {
1377					getContext: _.wrap(ProductDetailsQuickViewView.prototype.getContext, function (fn) {
1378						var context = fn.apply(this, Array.prototype.slice.call(arguments, 1));
1379						var item = this.model.get('item');
1380						if (item) {
1381							context.RequestMoreInfoFld = item.attributes.custitem_ca_hide_price_pw;
1382						}
1383						return context;
1384					})
1385				});
1386				/**
1387				 * Overrides ProductViewsPriceView.getContext
1388				 *
1389				 * - If true → hide price and related actions (Add to Quote, etc.)
1390				 * - If false → show price and actions normally
1391				 *
1392				 */
1393				_.extend(ProductViewsPriceView.prototype, {
1394					getContext: _.wrap(ProductViewsPriceView.prototype.getContext, function (fn) {
1395						var context = fn.apply(this, Array.prototype.slice.call(arguments, 1));
1396						var item = this.model.get('item');
1397						if (item) {
1398							context.RequestMoreInfoFld = item.attributes.custitem_ca_hide_price_pw;
1399						}
1400						return context;
1401					})
1402				});
1403			}
1404		};
1405	});
1406};
1407extensions['SC.SummitThemeExtension.3.0.1'] = function(){
1408function getExtensionAssetsPath(asset){
1409return 'extensions/SC/SummitThemeExtension/3.0.1/' + asset;
1410};
1411define('SC.SummitThemeExtension.ApplicationSkeleton.Layout', [
1412    'ApplicationSkeleton.Layout',
1413    'SC.Configuration',
1414    'underscore'
1415], function QSApplicationSkeletonLayout(
1416    ApplicationSkeletonLayout,
1417    Configuration,
1418    _
1419) {
1420    'use strict';
1421    var fixedHeader = Configuration.get('header.fixedHeader');
1422    return {
1423        loadModule: function loadModule() {
1424            // NOTE: Using this approach since the native module DOES NOT have a defined getContext function
1425            // The addExtraContextProperty helper function DID NOT work.
1426            ApplicationSkeletonLayout.prototype.getContext = _.wrap(ApplicationSkeletonLayout.prototype.getContext, function getContext(fn) {
1427                fn.apply(this, _.toArray(arguments).slice(1));
1428                return {
1429                    // @property {Boolean} fixedHeader
1430                    fixedHeader: fixedHeader
1431                };
1432            });
1433            //validating if fixedHeader is true.
1434            if (fixedHeader) {
1435                //if fixedHeader is enabled in configuration, this code will run.
1436                jQuery(window).scroll(function () {
1437                    //validating if screen is enough for desktop.
1438                    if ($(window).width() > 992) {
1439                      if (jQuery('header').hasClass('checkout-layout-header')){
1440                        //do nothing
1441                      }
1442                      else {
1443                        //get header height
1444                        var HeaderHeight = jQuery('#site-header').outerHeight(true);
1445                        var y = jQuery(this).scrollTop();
1446                        if (y >= 300) {
1447                            jQuery('body').addClass('fixed-header');
1448                            jQuery('#main-container').css('padding-top', HeaderHeight);
1449                        }
1450                        if (y < 1) {
1451                            jQuery('body').removeClass('fixed-header');
1452                            jQuery('#main-container').css('padding-top', '0px');
1453                        }
1454                      }
1455                    }
1456                })
1457            }
1458       }
1459    }
1460});
1461/*
1462    © 2017 NetSuite Inc.
1463    User may not copy, modify, distribute, or re-bundle or otherwise make available this code;
1464    provided, however, if you are an authorized user with a NetSuite account or log-in, you
1465    may use this code subject to the terms that govern your access and use.
1466*/
1467// @module ErrorManagementPageNotFound View
1468define('SC.SummitThemeExtension.ErrorManagement', [
1469    'ErrorManagement.PageNotFound.View',
1470    'underscore',
1471    'SC.Configuration'
1472],
1473function SummitThemeExtensionErrorManagement(
1474    ErrorManagementPageNotFoundView,
1475    _,
1476    Configuration
1477) {
1478    'use strict';
1479    return {
1480        loadModule: function loadModule() {
1481            ErrorManagementPageNotFoundView.addExtraContextProperty(
1482                'errorManagement',
1483                'object',
1484                function ErrorManagementPageNotFoundViewaddExtraContextProperty() {
1485                    return {
1486                        // @property {String} backgroundUrl
1487                        backgroundImage: _.getAbsoluteUrl(Configuration.get('errorManagementPageNotFound.pageNotFoundBgrImg')),
1488                        // @property {String} bkgdColor
1489                        backgroundColor: Configuration.get('errorManagementPageNotFound.bkgdColor'),
1490                        // @property {String} title
1491                        title: Configuration.get('errorManagementPageNotFound.title'),
1492                        // @property {String} text
1493                        text: Configuration.get('errorManagementPageNotFound.text'),
1494                        // @property {String} btnText
1495                        btnText: Configuration.get('errorManagementPageNotFound.btnText'),
1496                        // @property {String} btnHref
1497                        btnHref: Configuration.get('errorManagementPageNotFound.btnHref')
1498                    };
1499                }
1500            );
1501        }
1502    };
1503});
1504/*
1505    © 2017 NetSuite Inc.
1506    User may not copy, modify, distribute, or re-bundle or otherwise make available this code;
1507    provided, however, if you are an authorized user with a NetSuite account or log-in, you
1508    may use this code subject to the terms that govern your access and use.
1509*/
1510// @module Footer
1511define('SC.SummitThemeExtension.Footer', [
1512    'Footer.View',
1513    'SC.Configuration',
1514    'jQuery'
1515],
1516function SummitThemeExtensionFooter(
1517    FooterView,
1518    Configuration,
1519    jQuery
1520) {
1521    'use strict';
1522    var getColLinks = function getColLinks(whichColumn) {
1523        // for large format footer with up to four columns of links
1524        var multiColLinks = Configuration.get('footer.multiColLinks', []);
1525        var targetColLinks = jQuery.grep(multiColLinks, function targetColLinks(e) {
1526            return e.column === whichColumn;
1527        });
1528        return targetColLinks;
1529    };
1530    return {
1531        loadModule: function loadModule() {
1532            // for Social Media Links
1533            var socialMediaLinks = Configuration.get('footer.socialMediaLinks', []);
1534            // for Copyright message
1535            var initialConfigYear = Configuration.get('footer.copyright.initialYear');
1536            var initialYear = initialConfigYear ? parseInt(initialConfigYear, 10) : new Date().getFullYear();
1537            var currentYear = new Date().getFullYear();
1538            FooterView.addExtraContextProperty(
1539                'extraFooter',
1540                'object',
1541                function FooterViewAddExtraContextProperty() {
1542                    return {
1543                        // @property {Array<Object>} col1Links
1544                        col1Links: getColLinks('Column 1'),
1545                        // @property {Array<Object>} col2Links
1546                        col2Links: getColLinks('Column 2'),
1547                        // @property {Array<Object>} col3Links
1548                        col3Links: getColLinks('Column 3'),
1549                        // @property {Array<Object>} col4Links
1550                        col4Links: getColLinks('Column 4'),
1551                        // @property {Array<Object>} socialMediaLinks
1552                        socialMediaLinks: socialMediaLinks,
1553                        // @property {String} socialMediaLinksTitle
1554                        socialMediaLinksTitle: Configuration.get('footer.socialMediaLinksTitle'),
1555                        copyright: {
1556                            hide: !!Configuration.get('footer.copyright.hide'),
1557                            companyName: Configuration.get('footer.copyright.companyName'),
1558                            initialYear: initialYear,
1559                            currentYear: currentYear,
1560                            showRange: initialYear < currentYear
1561                        }
1562                    };
1563                }
1564            );
1565        }
1566    };
1567});
1568/*
1569 © 2017 NetSuite Inc.
1570 User may not copy, modify, distribute, or re-bundle or otherwise make available this code;
1571 provided, however, if you are an authorized user with a NetSuite account or log-in, you
1572 may use this code subject to the terms that govern your access and use.
1573 */
1574// @module Home
1575define('SC.SummitThemeExtension.Home', [
1576        'Home.View',
1577        'underscore',
1578        'SC.Configuration'
1579    ],
1580    function SummitThemeExtensionHome(
1581        HomeView,
1582        _,
1583        Configuration
1584    ) {
1585        'use strict';
1586        return {
1587            loadModule: function loadModule() {
1588                // for Carousel
1589                var carousel = Configuration.get('home.themeCarouselImages', []);
1590                var carouselObj;
1591                var isReady = false;
1592                // for Infoblocks
1593                var infoblock = Configuration.get('home.infoblock', []);
1594                // for Free text and images
1595                var freeTextImages = Configuration.get('home.freeTextImages', []);
1596                HomeView.addExtraContextProperty(
1597                    'extraHome',
1598                    'object',
1599                    function HomeViewAddExtraContextProperty(context) {
1600                        carouselObj = context.carousel;
1601                        isReady = (_.has(context, 'isReady') && !_.isUndefined(context.isReady)) ? context.isReady : true;
1602                        if(!_.isEmpty(carouselObj)) {
1603                            _.each(carouselObj, function (carousel) {
1604                                if (!_.isEmpty(carousel.image)) {
1605                                    _.extend(carousel, {
1606                                        isAbsoluteUrl: (carousel.image.indexOf('core/media') !== -1)
1607                                    });
1608                                }
1609                            });
1610                        } else {
1611                            carouselObj = carousel;
1612                        }
1613                        return {
1614                            isReady: isReady,
1615                            // @property {Boolean} showCarousel
1616                            showCarousel: carouselObj && !!carouselObj.length,
1617                            // @property {Array<Object>} carousel
1618                            carousel: carouselObj,
1619                            // @property {Boolean} showInfoblocks
1620                            showInfoblocks: infoblock && !!infoblock.length,
1621                            // @property {Array<Object>} infoblock
1622                            infoblock: infoblock,
1623                            // @property {String} freeTextTitle - allows markup
1624                            freeText: _(Configuration.get('home.freeText', '')).translate(),
1625                            // @property {String} freeTextTitle
1626                            freeTextTitle: _(Configuration.get('home.freeTextTitle')).translate(),
1627                            // @property {Boolean} showFreeTextImages
1628                            showFreeTextImages: freeTextImages && !!freeTextImages.length,
1629                            // @property {Array<Object>} freeTextImages - the object contains the properties text:String, href:String
1630                            freeTextImages: freeTextImages
1631                        };
1632                    }
1633                );
1634            }
1635        };
1636    });
1637define('SC.SummitThemeExtension.ItemRelations.SC.Configuration', [
1638    'SC.Configuration'
1639], function ThemeExtensionItemRelations() {
1640    'use strict';
1641    return {
1642        loadModule: function loadModule() {
1643            if (SC.CONFIGURATION.bxSliderDefaults && SC.CONFIGURATION.bxSliderDefaults.slideWidth) {
1644                SC.CONFIGURATION.bxSliderDefaults.slideWidth = 272;
1645                SC.CONFIGURATION.bxSliderDefaults.maxSlides = 4;
1646            }
1647        }
1648    };
1649});
1650/* eslint-disable */
1651define('SC.SummitThemeExtension.LoadWebFont', [
1652    'SC.Configuration'
1653], function SCSummitThemeExtensionLoadWebFont(
1654    Configuration
1655) {
1656'use strict';
1657return {
1658  loadModule: function loadModule() {
1659    if (Configuration.get('summit.webFonts.isWebFontEnabled') && Configuration.get('summit.webFonts.isWebFontAsync')) {
1660        window.WebFontConfig = Configuration.get('summit.webFonts.webFontConfig');
1661        if (SC.ENVIRONMENT.jsEnvironment === 'browser') {
1662            (function(d) {
1663                var wf = d.createElement('script'), s = d.scripts[0];
1664                wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
1665                    '://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js';
1666                wf.type = 'text/javascript';
1667                wf.async = 'true';
1668                s.parentNode.insertBefore(wf, s);
1669            })(document);
1670        }
1671    }
1672  }
1673};
1674});
1675/* eslint-enable */
1676/*
1677    © 2017 NetSuite Inc.
1678    User may not copy, modify, distribute, or re-bundle or otherwise make available this code;
1679    provided, however, if you are an authorized user with a NetSuite account or log-in, you
1680    may use this code subject to the terms that govern your access and use.
1681*/
1682// @module ShoppingEntryPoint
1683define('SC.SummitThemeExtension.1.0.0.ShoppingEntryPoint', [
1684    'SC.SummitThemeExtension.ErrorManagement',
1685    'SC.SummitThemeExtension.Footer',
1686    'SC.SummitThemeExtension.Home',
1687    'SC.SummitThemeExtension.ApplicationSkeleton.Layout',
1688    'SC.SummitThemeExtension.ItemRelations.SC.Configuration',
1689    'SC.SummitThemeExtension.LoadWebFont',
1690    'SC.Configuration',
1691    'Utils',
1692    'underscore'
1693], function SCSummitThemeExtensionShoppingEntryPoint(
1694    SummitThemeExtErrorManagement,
1695    SummitThemeExtFooter,
1696    SummitThemeExtHome,
1697    SummitThemeExtApplicationSkeleton,
1698    SummitThemeExtItemRelations,
1699    SummitThemeExtLoadWebFont,
1700    Configuration,
1701    Utils,
1702    _
1703) {
1704    'use strict';
1705    return {
1706        mountToApp: function mountToApp() {
1707            Utils.initBxSlider = _.initBxSlider = _.wrap(_.initBxSlider, function initBxSlider(fn) {
1708                var autoPlayCarousel = Configuration.get('home.autoPlayCarousel');
1709                var carouselSpeed = Configuration.get('home.carouselSpeed');
1710                
1711                if (arguments.length !== 0 && 
1712                    arguments[1] && arguments[1][0] &&
1713                    arguments[1][0].id === 'home-image-slider-list') {
1714                    arguments[2] = _.extend(arguments[2], {auto: autoPlayCarousel, pause: carouselSpeed}); 
1715                }
1716                return fn.apply(this, _.toArray(arguments).slice(1));
1717            });
1718            
1719            SummitThemeExtErrorManagement.loadModule();
1720            SummitThemeExtFooter.loadModule();
1721            SummitThemeExtHome.loadModule();
1722            SummitThemeExtApplicationSkeleton.loadModule();
1723            SummitThemeExtItemRelations.loadModule();
1724            SummitThemeExtLoadWebFont.loadModule();
1725        }
1726    };
1727});
1728};
1729extensions['PW.VideoGallery.1.0.0'] = function(){
1730function getExtensionAssetsPath(asset){
1731return 'extensions/PW/VideoGallery/1.0.0/' + asset;
1732};
1733// Model.js
1734// -----------------------
1735// @module Case
1736define("PW.VideoGallery.VideoGallery.Model", ["Backbone", "Utils"], function(
1737    Backbone,
1738    Utils
1739) {
1740    "use strict";
1741    // @class Case.Fields.Model @extends Backbone.Model
1742    return Backbone.Model.extend({
1743        
1744        //@property {String} urlRoot
1745        urlRoot: Utils.getAbsoluteUrl(
1746            getExtensionAssetsPath(
1747                "services/VideoGallery.Service.ss"
1748            )
1749        )
1750        
1751});
1752});
1753// Model.js
1754// -----------------------
1755// @module Case
1756define("PW.VideoGallery.VideoGallery.SS2Model", ["Backbone", "Utils"], function(
1757    Backbone,
1758    Utils
1759) {
1760    "use strict";
1761    // @class Case.Fields.Model @extends Backbone.Model
1762    return Backbone.Model.extend({
1763        //@property {String} urlRoot
1764        urlRoot: Utils.getAbsoluteUrl(
1765            getExtensionAssetsPath(
1766                "Modules/VideoGallery/SuiteScript2/VideoGallery.Service.ss"
1767            ),
1768            true
1769        )
1770});
1771});
1772// @module PW.VideoGallery.VideoGallery
1773define('PW.VideoGallery.VideoGallery.View'
1774,	[
1775	'pw_videogallery_videogallery.tpl'
1776	
1777	,	'PW.VideoGallery.VideoGallery.SS2Model'
1778	
1779	,	'Backbone'
1780	,	'Utils'
1781	,	'PW.VideoGallery.VideoGallery.Model'
1782	,	'PW.VideoGallery.VideoItemPopup.View'
1783    ]
1784, function (
1785	pw_videogallery_videogallery_tpl
1786	
1787	,	VideoGallerySS2Model
1788	
1789	,	Backbone
1790	,	Utils
1791	,	VideoGalleryModel
1792	,	VideoItemPopupView
1793)
1794{
1795    'use strict';
1796	// @class PW.VideoGallery.VideoGallery.View @extends Backbone.View
1797	return Backbone.View.extend({
1798		template: pw_videogallery_videogallery_tpl
1799	,	title: Utils.translate('Video Gallery')
1800	,	page_header: Utils.translate('Video Gallery')
1801		// @property {Object} attributes
1802	,	attributes: {
1803			id: 'video-gallery'
1804		}
1805	,	initialize: function (options) {
1806			this.model = new VideoGalleryModel();
1807			this.application = options.application;
1808		}
1809	,	events: {
1810			'click [data-action="open-popup"]':'openPopup',
1811			'click .video-play-icon' : 'openPopup'
1812		}
1813	,	openPopup: function(e){
1814			e.preventDefault();
1815			var clickedVideo = {};
1816			clickedVideo.clickedVideoSrc = jQuery(e.target).attr('data-src');
1817			clickedVideo.clickedVideoCaption = jQuery(e.target).attr('data-caption');
1818			var modalMessage = new VideoItemPopupView(clickedVideo,this.application);
1819			this.application.getLayout().showInModal(modalMessage);
1820		}	
1821	,	bindings: {
1822		}
1823	, 	childViews: {
1824		}
1825		
1826	,  	beforeShowContent:function() {
1827			var promise = this.model.fetch();
1828			return promise;
1829		}
1830		
1831	// @method getBreadcrumbPages
1832	,	getBreadcrumbPages: function() {
1833		return {
1834			text: this.title,
1835			href: '/video-gallery'
1836		};
1837	}
1838		//@method getContext @return PW.VideoGallery.VideoGallery.View.Context
1839	,	getContext: function getContext()
1840		{
1841			jQuery(document).ready(function(){
1842				jQuery('body').on('contextmenu', '.videogallery-info-card video', function() { return false; });
1843			});
1844			var videoItems = this.model.get('records');
1845			// var videoItems = [
1846			// 	{
1847			// 		videoLink:'https://www.shutterstock.com/shutterstock/videos/1033717520/preview/stock-footage-closed-access-iron-fence-mesh-iron-mesh-on-a-background-of-blue-sky-and-white-clouds.webm',videoText:'Brief clip of net'
1848			// 	},
1849			// 	{
1850			// 		videoLink:'https://www.shutterstock.com/shutterstock/videos/1070378803/preview/stock-footage-northbrook-il-usa-april-children-and-parents-enjoy-a-pleasant-early-spring-evening-at.mp4',videoText:'Baseball Net'
1851			// 	}
1852			// ]
1853			return{
1854				// @property {String} pageHeader
1855				pageHeader: this.page_header,
1856				// @property {Boolean} videosGreaterThan0
1857				videosGreaterThan0: videoItems.length > 0,
1858				// @property {Array<{}>} columns
1859				videoItems: videoItems
1860			}
1861		}
1862	});
1863});
1864// @module PW.VideoGallery.VideoItemPopup
1865define('PW.VideoGallery.VideoItemPopup.View'
1866,	[
1867	'pw_videogallery_videoitempopup.tpl'
1868	
1869    ,	'Backbone'
1870	,	'Utils'
1871	,	'PW.VideoGallery.VideoGallery.Model'
1872    ]
1873, function (
1874	pw_videogallery_videoitempopup_tpl
1875	
1876	,	Backbone
1877	,	Utils
1878	,	VideoGalleryModel
1879)
1880{
1881    'use strict';
1882	// @class PW.VideoGallery.VideoGallery.View @extends Backbone.View
1883	return Backbone.View.extend({
1884		template: pw_videogallery_videoitempopup_tpl
1885	,	initialize: function (options) {
1886            this.options = options; 
1887        }
1888    ,    modalClass: 'global-views-modal-large'
1889	,	events: {
1890			
1891		}
1892	,	bindings: {
1893		}
1894	, 	childViews: {
1895		}
1896		
1897		//@method getContext @return PW.VideoGallery.VideoGallery.View.Context
1898	,	getContext: function getContext()
1899		{
1900            var videoSrc = this.options.clickedVideoSrc;
1901            var videoCaption = this.options.clickedVideoCaption;
1902			return{
1903                videoCaption: videoCaption,
1904                videoSrc: videoSrc
1905			}
1906		}
1907	});
1908});
1909define(
1910	'PW.VideoGallery.VideoGallery'
1911,   [
1912		'PW.VideoGallery.VideoGallery.View'
1913	]
1914,   function (
1915		VideoGalleryView
1916	)
1917{
1918	'use strict';
1919	return  {
1920		mountToApp: function mountToApp (container)
1921		{
1922			// using the 'Layout' component we add a new child view inside the 'Header' existing view 
1923			// (there will be a DOM element with the HTML attribute data-view="Header.Logo")
1924			// more documentation of the Extensibility API in
1925			// https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/index.html
1926			
1927			/** @type {LayoutComponent} */
1928			
1929			var pageTypeComponent = container.getComponent("PageType");
1930			var pageType = {
1931				name: 'Video Gallery',
1932				routes: ['video-gallery'],
1933				view: VideoGalleryView
1934			}
1935			pageTypeComponent.registerPageType(pageType);
1936		}
1937	};
1938});
1939};
1940extensions['PearlWeave.LandingPages.1.0.0'] = function(){
1941function getExtensionAssetsPath(asset){
1942return 'extensions/PearlWeave/LandingPages/1.0.0/' + asset;
1943};
1944// @module Cloudalp.Landing_Pages.landingpages
1945define('AboutUs.View'
1946,	[
1947		'about_us.tpl'
1948	,	'Utils'
1949	,	'Backbone'
1950	,	'jQuery'
1951	,	'underscore'
1952	]
1953,	function (
1954		about_us_tpl
1955	,	Utils
1956	,	Backbone
1957	,	jQuery
1958	,	_
1959	)
1960{
1961	'use strict';
1962	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
1963	return Backbone.View.extend({
1964		template: about_us_tpl
1965		
1966	,	title: Utils.translate('About Us')
1967	,	initialize: function (options) {
1968			/*  Uncomment to test backend communication with an example service 
1969				(you'll need to deploy and activate the extension first)
1970			*/
1971			this.message = '';
1972			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
1973			// jQuery.get(service_url)
1974			// .then((result) => {
1975			// 	this.message = result;
1976			// 	this.render();
1977			// });
1978		}
1979		
1980	// @method getBreadcrumbPages
1981    // @return {BreadcrumbPage}
1982    ,	getBreadcrumbPages: function() {
1983        return {text: Utils.translate('About Us') };
1984    }
1985	,	events: {
1986		}
1987	,	bindings: {
1988		}
1989	, 	childViews: {
1990			
1991		}
1992		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
1993	,	getContext: function getContext()
1994		{
1995			//@class Cloudalp.Landing_Pages.landingpages.View.Context
1996			this.message = this.message || 'Hello World!!'
1997			return {
1998				message: this.message
1999			};
2000		}
2001	});
2002});
2003// @module Cloudalp.Landing_Pages.landingpages
2004define('CustomerServiceNew.View'
2005,	[
2006		'customer_service_new.tpl'
2007	,	'Utils'
2008	,	'Backbone'
2009	,	'jQuery'
2010	,	'underscore'
2011	]
2012,	function (
2013		customer_service_new_tpl
2014	,	Utils
2015	,	Backbone
2016	,	jQuery
2017	,	_
2018	)
2019{
2020	'use strict';
2021	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2022	return Backbone.View.extend({
2023		template: customer_service_new_tpl
2024		
2025	,	title: Utils.translate('Customer Service New')
2026	,	initialize: function (options) {
2027			/*  Uncomment to test backend communication with an example service 
2028				(you'll need to deploy and activate the extension first)
2029			*/
2030			this.on('afterViewRender', function ()
2031			{
2032				var hash = document.location.hash;
2033				if(hash){
2034					var pathName = hash.split('#')[1];
2035					if(pathName){	
2036					setTimeout(function(){
2037					jQuery('body,html').animate({	
2038					scrollTop: jQuery('#'+pathName).offset().top
2039					},'slow');
2040					}, 500);
2041				  }
2042				 }
2043			});
2044			
2045			this.message = '';
2046			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2047			// jQuery.get(service_url)
2048			// .then((result) => {
2049			// 	this.message = result;
2050			// 	this.render();
2051			// });
2052		}
2053		
2054	,	getBreadcrumbPages: function() {
2055			return {text: Utils.translate('Customer Service New') };
2056		}
2057	,	events: {
2058		}
2059	,	bindings: {
2060		}
2061	, 	childViews: {
2062			
2063		}
2064		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2065	,	getContext: function getContext()
2066		{
2067			//@class Cloudalp.Landing_Pages.landingpages.View.Context
2068			this.message = this.message || 'Hello World!!'
2069			return {
2070				message: this.message
2071			};
2072		}
2073	});
2074});
2075// @module Cloudalp.Landing_Pages.landingpages
2076define('DownloadBrochure.View'
2077,	[
2078		'download_brochure.tpl'
2079	,	'Utils'
2080	,	'Backbone'
2081	,	'jQuery'
2082	,	'underscore'
2083	]
2084,	function (
2085		download_brochure_tpl
2086	,	Utils
2087	,	Backbone
2088	,	jQuery
2089	,	_
2090	)
2091{
2092	'use strict';
2093	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2094	return Backbone.View.extend({
2095		template: download_brochure_tpl
2096		
2097	,	title: Utils.translate('Download Brochure')
2098	,	initialize: function (options) {
2099			/*  Uncomment to test backend communication with an example service 
2100				(you'll need to deploy and activate the extension first)
2101			*/
2102			this.message = '';
2103			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2104			// jQuery.get(service_url)
2105			// .then((result) => {
2106			// 	this.message = result;
2107			// 	this.render();
2108			// });
2109		}
2110		
2111	// @method getBreadcrumbPages
2112    // @return {BreadcrumbPage}
2113    ,	getBreadcrumbPages: function() {
2114        return {text: Utils.translate('Download Brochure') };
2115    }
2116	,	events: {
2117		}
2118	,	bindings: {
2119		}
2120	, 	childViews: {
2121			
2122		}
2123		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2124	,	getContext: function getContext()
2125		{
2126			
2126//@class Cloudalp.Landing_Pages.landingpages.View.Context
2127			this.message = this.message || 'Hello World!!'
2128			return {
2129				message: this.message
2130			};
2131		}
2132	});
2133});
2134// @module Cloudalp.Landing_Pages.landingpages
2135define('Faq.View'
2136,	[
2137		'cloudalp_landing_pages_landingpages.tpl'
2138	,	'faq.tpl'
2139	,	'Utils'
2140	,	'Backbone'
2141	,	'jQuery'
2142	,	'underscore'
2143	]
2144,	function (
2145		cloudalp_landing_pages_landingpages_tpl
2146	,	faq_tpl
2147	,	Utils
2148	,	Backbone
2149	,	jQuery
2150	,	_
2151	)
2152{
2153	'use strict';
2154	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2155	return Backbone.View.extend({
2156		template: faq_tpl
2157		
2158	,	title: Utils.translate('faq')
2159	,	initialize: function (options) {
2160			/*  Uncomment to test backend communication with an example service 
2161				(you'll need to deploy and activate the extension first)
2162			*/
2163			this.message = '';
2164			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2165			// jQuery.get(service_url)
2166			// .then((result) => {
2167			// 	this.message = result;
2168			// 	this.render();
2169			// });
2170		}
2171		
2172	// @method getBreadcrumbPages
2173    // @return {BreadcrumbPage}
2174    ,	getBreadcrumbPages: function() {
2175			return {text: Utils.translate('Faq') };
2176		}
2177	,	events: {
2178		}
2179	,	bindings: {
2180		}
2181	, 	childViews: {
2182			
2183		}
2184		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2185	,	getContext: function getContext()
2186		{
2187			//@class Cloudalp.Landing_Pages.landingpages.View.Context
2188			this.message = this.message || 'Hello World!!'
2189			return {
2190				message: this.message
2191			};
2192		}
2193	});
2194});
2195// @module PearlWeave.LandingPages.LandingPages
2196define('PearlWeave.LandingPages.LandingPages.View'
2197,	[
2198		'pearlweave_landingpages_landingpages.tpl'
2199	,	'Utils'
2200	,	'Backbone'
2201	,	'jQuery'
2202	,	'underscore'
2203	]
2204,	function (
2205		pearlweave_landingpages_landingpages_tpl
2206	,	Utils
2207	,	Backbone
2208	,	jQuery
2209	,	_
2210	)
2211{
2212	'use strict';
2213	// @class PearlWeave.LandingPages.LandingPages.View @extends Backbone.View
2214	return Backbone.View.extend({
2215		template: pearlweave_landingpages_landingpages_tpl
2216	,	initialize: function (options) {
2217			/*  Uncomment to test backend communication with an example service 
2218				(you'll need to deploy and activate the extension first)
2219			*/
2220			this.message = '';
2221			 var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/LandingPages.Service.ss'));
2222			 jQuery.get(service_url)
2223			 .then((result) => {
2224			 	this.message = result;
2225			 	this.render();
2226			 });
2227		}
2228	,	events: {
2229		}
2230	,	bindings: {
2231		}
2232	, 	childViews: {
2233			
2234		}
2235		//@method getContext @return PearlWeave.LandingPages.LandingPages.View.Context
2236	,	getContext: function getContext()
2237		{
2238			//@class PearlWeave.LandingPages.LandingPages.View.Context
2239			this.message = this.message || 'Hello World!!'
2240			return {
2241				message: this.message
2242			};
2243		}
2244	});
2245});
2246// @module Cloudalp.Landing_Pages.landingpages
2247define('Manufacturing.View'
2248,	[
2249		'cloudalp_landing_pages_landingpages.tpl'
2250	,	'manufacturing.tpl'
2251	,	'Utils'
2252	,	'Backbone'
2253	,	'jQuery'
2254	,	'underscore'
2255	]
2256,	function (
2257		cloudalp_landing_pages_landingpages_tpl
2258	,	manufacturing_tpl
2259	,	Utils
2260	,	Backbone
2261	,	jQuery
2262	,	_
2263	)
2264{
2265	'use strict';
2266	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2267	return Backbone.View.extend({
2268		template: manufacturing_tpl
2269		
2270	,	title: Utils.translate('Manufacturing')
2271	,	initialize: function (options) {
2272			/*  Uncomment to test backend communication with an example service 
2273				(you'll need to deploy and activate the extension first)
2274			*/
2275			this.message = '';
2276			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2277			// jQuery.get(service_url)
2278			// .then((result) => {
2279			// 	this.message = result;
2280			// 	this.render();
2281			// });
2282		}
2283		
2284	// @method getBreadcrumbPages
2285    // @return {BreadcrumbPage}
2286    ,	getBreadcrumbPages: function() {
2287			return {text: Utils.translate('Manufacturing') };
2288		}
2289	,	events: {
2290		}
2291	,	bindings: {
2292		}
2293	, 	childViews: {
2294			
2295		}
2296		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2297	,	getContext: function getContext()
2298		{
2299			//@class Cloudalp.Landing_Pages.landingpages.View.Context
2300			this.message = this.message || 'Hello World!!'
2301			return {
2302				message: this.message
2303			};
2304		}
2305	});
2306});
2307// @module Cloudalp.Landing_Pages.landingpages
2308define('OurNettingFamily.View'
2309,	[
2310		'cloudalp_landing_pages_landingpages.tpl'
2311	,	'our_netting_family.tpl'
2312	,	'Utils'
2313	,	'Backbone'
2314	,	'jQuery'
2315	,	'underscore'
2316	]
2317,	function (
2318		cloudalp_landing_pages_landingpages_tpl
2319	,	our_netting_family_tpl
2320	,	Utils
2321	,	Backbone
2322	,	jQuery
2323	,	_
2324	)
2325{
2326	'use strict';
2327	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2328	return Backbone.View.extend({
2329		template: our_netting_family_tpl
2330		
2331	,	title: Utils.translate('Our Netting Family')
2332	,	initialize: function (options) {
2333			/*  Uncomment to test backend communication with an example service 
2334				(you'll need to deploy and activate the extension first)
2335			*/
2336			this.message = '';
2337			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2338			// jQuery.get(service_url)
2339			// .then((result) => {
2340			// 	this.message = result;
2341			// 	this.render();
2342			// });
2343		}
2344		
2345	,	getBreadcrumbPages: function() {
2346			return {text: Utils.translate('Our Netting Family') };
2347		}
2348	,	events: {
2349		}
2350	,	bindings: {
2351		}
2352	, 	childViews: {
2353			
2354		}
2355		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2356	,	getContext: function getContext()
2357		{
2358			//@class Cloudalp.Landing_Pages.landingpages.View.Context
2359			this.message = this.message || 'Hello World!!'
2360			return {
2361				message: this.message
2362			};
2363		}
2364	});
2365});
2366// @module Cloudalp.Landing_Pages.landingpages
2367define('PhotoGallery.View'
2368,	[
2369		'photo_gallery.tpl'
2370	,	'Utils'
2371	,	'Backbone'
2372	,	'jQuery'
2373	,	'underscore'
2374	]
2375,	function (
2376		photo_gallery_tpl
2377	,	Utils
2378	,	Backbone
2379	,	jQuery
2380	,	_
2381	)
2382{
2383	'use strict';
2384	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2385	return Backbone.View.extend({
2386		template: photo_gallery_tpl
2387		
2388	,	title: Utils.translate('Photo Gallery')
2389	,	initialize: function (options) {
2390			/*  Uncomment to test backend communication with an example service 
2391				(you'll need to deploy and activate the extension first)
2392			*/
2393			this.message = '';
2394			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2395			// jQuery.get(service_url)
2396			// .then((result) => {
2397			// 	this.message = result;
2398			// 	this.render();
2399			// });
2400		}
2401		
2402	// @method getBreadcrumbPages
2403    // @return {BreadcrumbPage}
2404    ,	getBreadcrumbPages: function() {
2405        return {text: Utils.translate('Photo Gallery') };
2406    }
2407	,	events: {
2408		}
2409	,	bindings: {
2410		}
2411	, 	childViews: {
2412			
2413		}
2414		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2415	,	getContext: function getContext()
2416		{
2417			//@class Cloudalp.Landing_Pages.landingpages.View.Context
2418			this.message = this.message || 'Hello World!!'
2419			return {
2420				message: this.message
2421			};
2422		}
2423	});
2424});
2425// @module Cloudalp.Landing_Pages.landingpages
2426define('PrivacyPolicy.View'
2427,	[
2428		'cloudalp_landing_pages_landingpages.tpl'
2429	,	'privacy_policy.tpl'
2430	,	'Utils'
2431	,	'Backbone'
2432	,	'jQuery'
2433	,	'underscore'
2434	]
2435,	function (
2436		cloudalp_landing_pages_landingpages_tpl
2437	,	privacy_policy_tpl
2438	,	Utils
2439	,	Backbone
2440	,	jQuery
2441	,	_
2442	)
2443{
2444	'use strict';
2445	// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2446	return Backbone.View.extend({
2447		template: privacy_policy_tpl
2448		
2449	,	title: Utils.translate('Privacy Policy')
2450	,	initialize: function (options) {
2451			/*  Uncomment to test backend communication with an example service 
2452				(you'll need to deploy and activate the extension first)
2453			*/
2454			this.message = '';
2455			// var service_url = Utils.getAbsoluteUrl(getExtensionAssetsPath('services/landingpages.Service.ss'));
2456			// jQuery.get(service_url)
2457			// .then((result) => {
2458			// 	this.message = result;
2459			// 	this.render();
2460			// });
2461		}
2462		
2463	,	getBreadcrumbPages: function() {
2464			return {text: Utils.translate('Privacy Policy') };
2465		}
2466	,	events: {
2467		}
2468	,	bindings: {
2469		}
2470	, 	childViews: {
2471			
2472		}
2473		//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2474	,	getContext: function getContext()
2475		{
2476			//@class Cloudalp.Landing_Pages.landingpages.View.Context
2477			this.message = this.message || 'Hello World!!'
2478			return {
2479				message: this.message
2480			};
2481		}
2482	});
2483});
2484// @module Cloudalp.Landing_Pages.landingpages
2485define('Testimonials.View'
2486	, [
2487		'cloudalp_landing_pages_landingpages.tpl'
2488		, 'testimonials.tpl'
2489		, 'Utils'
2490		, 'Backbone'
2491		, 'jQuery'
2492		, 'underscore'
2493	]
2494	, function (
2495		cloudalp_landing_pages_landingpages_tpl
2496		, testimonials_tpl
2497		, Utils
2498		, Backbone
2499		, jQuery
2500		, _
2501	) {
2502		'use strict';
2503		// @class Cloudalp.Landing_Pages.landingpages.View @extends Backbone.View
2504		return Backbone.View.extend({
2505			template: testimonials_tpl
2506			, title: Utils.translate('Testimonials')
2507			, initialize: function () {
2508				var self = this;
2509				this.on('afterViewRender', function () {
2510					self.hideTestimonialsBlog();
2511				});
2512			},
2513			hideTestimonialsBlog: function () {
2514				// Hide empty testimonial boxes
2515				$(() => {
2516					$(document).ready(() => {
2517						$('.testimonial-blogs').each(function () {
2518							var box = $(this);
2519							var hasContent = box.find('[data-cms-area]').filter(function () {
2520								return $(this).text().trim().length > 0;
2521							}).length > 0;
2522							if (hasContent) {
2523								box.addClass('testimonial-box front');
2524							} else {
2525								box.removeClass('testimonial-box front');
2526							}
2527						});
2528					});
2529				});
2530			}
2531			// @method getBreadcrumbPages
2532			// @return {BreadcrumbPage}
2533			, getBreadcrumbPages: function () {
2534				return { text: Utils.translate('Testimonials') };
2535			}
2536			, events: {
2537			}
2538			, bindings: {
2539			}
2540			, childViews: {
2541			}
2542			//@method getContext @return Cloudalp.Landing_Pages.landingpages.View.Context
2543			, getContext: function getContext() {
2544				//@class Cloudalp.Landing_Pages.landingpages.View.Context
2545				return {
2546				};
2547			}
2548		});
2549	});
2550define(
2551	'PearlWeave.LandingPages.LandingPages'
2552	, [
2553		'PearlWeave.LandingPages.LandingPages.View'
2554		, 'AboutUs.View'
2555		, 'PrivacyPolicy.View'
2556		, 'CustomerServiceNew.View'
2557		, 'Manufacturing.View'
2558		, 'Faq.View'
2559		, 'OurNettingFamily.View'
2560		, 'Testimonials.View'
2561		, 'DownloadBrochure.View'
2562		, 'PhotoGallery.View'
2563	]
2564	, function (
2565		LandingPagesView
2566		, AboutUsView
2567		, PrivacyPolicyView
2568		, customerServiceNewView
2569		, ManufacturingView
2570		, FaqView
2571		, OurNettingFamilyView
2572		, TestimonialsView
2573		, DownloadBrochureView
2574		, PhotoGalleryView
2575	) {
2576		'use strict';
2577		return {
2578			mountToApp: function mountToApp(container) {
2579				// using the 'Layout' component we add a new child view inside the 'Header' existing view 
2580				// (there will be a DOM element with the HTML attribute data-view="Header.Logo")
2581				// more documentation of the Extensibility API in
2582				// https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/index.html
2583				/** @type {LayoutComponent} */
2584				/*var layout = container.getComponent('Layout');
2585				
2586				if(layout)
2587				{
2588					layout.addChildView('Header.Logo', function() { 
2589						return new LandingPagesView({ container: container });
2590					});
2591				}*/
2592				var pageType = container.getComponent('PageType');
2593				pageType.registerPageType({
2594					'name': 'aboutUs'
2595					, 'routes': ['about-us']
2596					, 'view': AboutUsView
2597					, 'defaultTemplate': {
2598						'name': 'about_us.tpl'
2599					}
2600				});
2601				pageType.registerPageType({
2602					'name': 'privacyPolicy'
2603					, 'routes': ['privacy-policy']
2604					, 'view': PrivacyPolicyView
2605					, 'defaultTemplate': {
2606						'name': 'privacy_policy.tpl'
2607					}
2608				});
2609				pageType.registerPageType({
2610					'name': 'customerServiceNew'
2611					, 'routes': ['customer-service-new']
2612					, 'view': customerServiceNewView
2613					, 'defaultTemplate': {
2614						'name': 'customer_service_new_tpl.tpl'
2615					}
2616				});
2617				pageType.registerPageType({
2618					'name': 'manufacturing'
2619					, 'routes': ['manufacturing']
2620					, 'view': ManufacturingView
2621					, 'defaultTemplate': {
2622						'name': 'manufacturing.tpl'
2623					}
2624				});
2625				pageType.registerPageType({
2626					'name': 'faq'
2627					, 'routes': ['faq']
2628					, 'view': FaqView
2629					, 'defaultTemplate': {
2630						'name': 'faq.tpl'
2631					}
2632				});
2633				pageType.registerPageType({
2634					'name': 'OurNettingFamily'
2635					, 'routes': ['our-netting-family']
2636					, 'view': OurNettingFamilyView
2637					, 'defaultTemplate': {
2638						'name': 'our_netting_family.tpl'
2639					}
2640				});
2641				pageType.registerPageType({
2642					'name': 'testimonials'
2643					, 'routes': ['testimonials']
2644					, 'view': TestimonialsView
2645					, 'defaultTemplate': {
2646						'name': 'testimonials.tpl'
2647					}
2648				});
2649				pageType.registerPageType({
2650					'name': 'DownloadBrochure'
2651					, 'routes': ['download-brochure']
2652					, 'view': DownloadBrochureView
2653					, 'defaultTemplate': {
2654						'name': 'download_brochure.tpl'
2655					}
2656				});
2657				pageType.registerPageType({
2658					'name': 'PhotoGallery'
2659					, 'routes': ['photo-gallery']
2660					, 'view': PhotoGalleryView
2661					, 'defaultTemplate': {
2662						'name': 'photo_gallery.tpl'
2663					}
2664				});
2665			}
2666		};
2667	});
2668};
2669try{
2670	extensions['CA.AutoSelectMatrixOptions.1.0.0']();
2671	SC.addExtensionModule('CA.AutoSelectMatrixOptions');
2672}
2673catch(error)
2674{
2675	console.error(error)
2676}
2677try{
2678	extensions['pearlweave_ext.CaContactUs.1.0.0']();
2679	SC.addExtensionModule('Pearlweave.CaContactUs.ContactUs');
2680}
2681catch(error)
2682{
2683	console.error(error)
2684}
2685try{
2686	extensions['PW.PressReleases.1.0.0']();
2687	SC.addExtensionModule('PW.PressReleases.PressReleases');
2688}
2689catch(error)
2690{
2691	console.error(error)
2692}
2693try{
2694	extensions['PW.RequestMoreInfoExt.1.0.0']();
2695	SC.addExtensionModule('PW.RequestMoreInfoExt.RequestMoreInfoModule');
2696}
2697catch(error)
2698{
2699	console.error(error)
2700}
2701try{
2702	extensions['SC.SummitThemeExtension.3.0.1']();
2703	SC.addExtensionModule('SC.SummitThemeExtension.1.0.0.ShoppingEntryPoint');
2704}
2705catch(error)
2706{
2707	console.error(error)
2708}
2709try{
2710	extensions['PW.VideoGallery.1.0.0']();
2711	SC.addExtensionModule('PW.VideoGallery.VideoGallery');
2712}
2713catch(error)
2714{
2715	console.error(error)
2716}
2717try{
2718	extensions['PearlWeave.LandingPages.1.0.0']();
2719	SC.addExtensionModule('PearlWeave.LandingPages.LandingPages');
2720}
2721catch(error)
2722{
2723	console.error(error)
2724}
2725SC.ENVIRONMENT.EXTENSIONS_JS_MODULE_NAMES = ["CA.AutoSelectMatrixOptions.View","CA.AutoSelectMatrixOptions.Model","CA.AutoSelectMatrixOptions","Pearlweave.CaContactUs.ContactUs.View","FacetsCategoryExtension","Pearlweave.CaContactUs.ContactUs","PW.PressReleases.PressReleases.Model","PW.PressReleases.PressReleases","PW.PressReleases.PressReleases.View","PW.RequestMoreInfoExt.RequestMoreInfoModule.Model","PW.RequestMoreInfoExt.RequestMoreInfoModule.SS2Model","PW.RequestMoreInfoExt.RequestMoreInfoModule","PW.RequestMoreInfoExt.RequestMoreInfoModule.View","PW.RequestMoreInfoExt.Requestpopup.View","SC.SummitThemeExtension.ApplicationSkeleton.Layout","SC.SummitThemeExtension.ErrorManagement","SC.SummitThemeExtension.Footer","SC.SummitThemeExtension.Home","SC.SummitThemeExtension.ItemRelations.SC.Configuration","SC.SummitThemeExtension.1.0.0.ShoppingEntryPoint","SC.SummitThemeExtension.LoadWebFont","PW.VideoGallery.VideoGallery.Model","PW.VideoGallery.VideoGallery.SS2Model","PW.VideoGallery.VideoGallery","PW.VideoGallery.VideoGallery.View","PW.VideoGallery.VideoItemPopup.View","AboutUs.View","CustomerServiceNew.View","DownloadBrochure.View","Faq.View","PearlWeave.LandingPages.LandingPages.View","Manufacturing.View","OurNettingFamily.View","PearlWeave.LandingPages.LandingPages","PhotoGallery.View","PrivacyPolicy.View","Testimonials.View"];

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.