text: 
  (function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(window.document);
  import { S as SvelteComponentDev, i as init, s as safe_not_equal, d as dispatch_dev, g as globals, v as validate_slots, o as onMount, X as XMLToJSON, A as AH, a8 as afterUpdate, a2 as onUserAnsChange, y as l, C as validate_each_argument, z as empty, n as insert_dev, H as destroy_each, x as detach_dev, e as element, f as space, k as add_location, p as append_dev, c as create_component, h as text, j as attr_dev, l as set_style, m as mount_component, E as set_data_dev, t as transition_in, a as transition_out, b as destroy_component, q as listen_dev, G as run_all } from './main-34a3b679.js';
  import { I as ItemHelper } from './ItemHelper-8c058fd0.js';
  import { s as styleInject } from './style-inject.es-1c867377.js';
  
  var css_248z = ".gridColor{width:80px;height:80px;background:#e6f2fd;border:1.5px solid #2379b2!important}.gridColor:hover{background:#fff;border:2px solid #000!important}.gridColor:focus{box-shadow:none;border:2px dotted #000!important}.gridSelected{background:#2c97de!important}.lockedGrid{pointer-events:none!important}.gridDisabled{background:#98b8cc!important;cursor:not-allowed!important}.gridDisabled:hover{background:#98b8cc!important;border:1px solid #609fc9!important}.gridCorrect{border:2px solid green!important;background:#e9ffe9!important}.gridIncorrect{border:2px solid #c85050!important;background:#ffe8e8!important}.gridNotPerformed{background:#92929294!important;border:2px solid #5d5b5b!important}.unitMarginLeft{margin-left:10px}.shadingTable{margin:10px auto;width:auto}.gridHidden{width:80px;height:80px;background:#fff;border:0 solid #fff!important;cursor:default!important}.gridHidden:hover{background:#fff;border:1px solid #fff!important;cursor:default!important}.width-authoring{width:250px}table.shadingTable{border:0!important}.width100{width:100px}.custom_checkbox_new{display:block;position:relative;width:20px;height:20px;margin-bottom:0;cursor:pointer;font-size:18px}.custom_checkbox_new input{position:absolute;z-index:-1;opacity:0}.check_mark_custom{width:17px;height:17px;position:absolute;text-align:center;top:2px;left:0;border:1px solid #d4cfcf}.custom_checkbox_new .check_mark_custom:after{content:'\\2713';color:#fff;transform:rotate(10deg);margin-top:-3px;width:13px;font-size:13px}.custom_checkbox_new input:checked~.check_mark_custom:after{display:block}.check_mark_custom:after{content:'';position:absolute}.custom_checkbox_new input:checked~.check_mark_custom{background:#4285f4;border:2px solid #a4dbfc}input:focus~.check_mark_custom{box-shadow:0 0 0 .13rem rgb(66 133 244 / 25%)}.btn-light:not([disabled]):not(.disabled).active{color:#fff!important;-webkit-box-shadow:inset 0 2px 0 #1266f1!important;box-shadow:inset 0 2px 0 #1266f1!important;background-color:#2572f2!important;border-color:#2572f2!important;border-top-color:#0c57d3!important}";
  styleInject(css_248z);
  
  /* clsSMShadedGrid\ShadingPreview.svelte generated by Svelte v3.40.2 */
  
  const { console: console_1 } = globals;
  const file = "clsSMShadedGrid\\ShadingPreview.svelte";
  
  function get_each_context(ctx, list, i) {
  	const child_ctx = ctx.slice();
  	child_ctx[38] = list[i];
  	child_ctx[40] = i;
  	return child_ctx;
  }
  
  function get_each_context_1(ctx, list, i) {
  	const child_ctx = ctx.slice();
  	child_ctx[41] = list[i];
  	return child_ctx;
  }
  
  // (394:12) {#if total_row_count && total_row_count.length > 0}
  function create_if_block(ctx) {
  	let each_1_anchor;
  	let each_value = /*total_row_count*/ ctx[2];
  	validate_each_argument(each_value);
  	let each_blocks = [];
  
  	for (let i = 0; i < each_value.length; i += 1) {
  		each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
  	}
  
  	const block = {
  		c: function create() {
  			for (let i = 0; i < each_blocks.length; i += 1) {
  				each_blocks[i].c();
  			}
  
  			each_1_anchor = empty();
  		},
  		m: function mount(target, anchor) {
  			for (let i = 0; i < each_blocks.length; i += 1) {
  				each_blocks[i].m(target, anchor);
  			}
  
  			insert_dev(target, each_1_anchor, anchor);
  		},
  		p: function update(ctx, dirty) {
  			if (dirty[0] & /*preview_table, isReview, userTab, gridClickPreview, adaKeyupGridClick, state, total_row_count*/ 1183) {
  				each_value = /*total_row_count*/ ctx[2];
  				validate_each_argument(each_value);
  				let i;
  
  				for (i = 0; i < each_value.length; i += 1) {
  					const child_ctx = get_each_context(ctx, each_value, i);
  
  					if (each_blocks[i]) {
  						each_blocks[i].p(child_ctx, dirty);
  					} else {
  						each_blocks[i] = create_each_block(child_ctx);
  						each_blocks[i].c();
  						each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
  					}
  				}
  
  				for (; i < each_blocks.length; i += 1) {
  					each_blocks[i].d(1);
  				}
  
  				each_blocks.length = each_value.length;
  			}
  		},
  		d: function destroy(detaching) {
  			destroy_each(each_blocks, detaching);
  			if (detaching) detach_dev(each_1_anchor);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_if_block.name,
  		type: "if",
  		source: "(394:12) {#if total_row_count && total_row_count.length > 0}",
  		ctx
  	});
  
  	return block;
  }
  
  // (397:24) {#if preview_table && preview_table.length > 0}
  function create_if_block_1(ctx) {
  	let each_1_anchor;
  	let each_value_1 = /*preview_table*/ ctx[1];
  	validate_each_argument(each_value_1);
  	let each_blocks = [];
  
  	for (let i = 0; i < each_value_1.length; i += 1) {
  		each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
  	}
  
  	const block = {
  		c: function create() {
  			for (let i = 0; i < each_blocks.length; i += 1) {
  				each_blocks[i].c();
  			}
  
  			each_1_anchor = empty();
  		},
  		m: function mount(target, anchor) {
  			for (let i = 0; i < each_blocks.length; i += 1) {
  				each_blocks[i].m(target, anchor);
  			}
  
  			insert_dev(target, each_1_anchor, anchor);
  		},
  		p: function update(ctx, dirty) {
  			if (dirty[0] & /*preview_table, isReview, userTab, gridClickPreview, adaKeyupGridClick, state*/ 1179) {
  				each_value_1 = /*preview_table*/ ctx[1];
  				validate_each_argument(each_value_1);
  				let i;
  
  				for (i = 0; i < each_value_1.length; i += 1) {
  					const child_ctx = get_each_context_1(ctx, each_value_1, i);
  
  					if (each_blocks[i]) {
  						each_blocks[i].p(child_ctx, dirty);
  					} else {
  						each_blocks[i] = create_each_block_1(child_ctx);
  						each_blocks[i].c();
  						each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
  					}
  				}
  
  				for (; i < each_blocks.length; i += 1) {
  					each_blocks[i].d(1);
  				}
  
  				each_blocks.length = each_value_1.length;
  			}
  		},
  		d: function destroy(detaching) {
  			destroy_each(each_blocks, detaching);
  			if (detaching) detach_dev(each_1_anchor);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_if_block_1.name,
  		type: "if",
  		source: "(397:24) {#if preview_table && preview_table.length > 0}",
  		ctx
  	});
  
  	return block;
  }
  
  // (399:32) {#if i == data.rowno}
  function create_if_block_2(ctx) {
  	let td;
  	let t;
  	let td_id_value;
  	let td_tabindex_value;
  	let td_aria_label_value;
  	let td_pevdata_id_value;
  	let td_class_value;
  	let mounted;
  	let dispose;
  	let if_block = /*isReview*/ ctx[0] && create_if_block_3(ctx);
  
  	const block = {
  		c: function create() {
  			td = element("td");
  			if (if_block) if_block.c();
  			t = space();
  			attr_dev(td, "id", td_id_value = /*data*/ ctx[41].id);
  			attr_dev(td, "tabindex", td_tabindex_value = /*data*/ ctx[41].tabindex);
  			attr_dev(td, "aria-label", td_aria_label_value = /*data*/ ctx[41].arialabel);
  			attr_dev(td, "data-grid", "no");
  			attr_dev(td, "pevdata-id", td_pevdata_id_value = /*data*/ ctx[41].pevdata);
  
  			attr_dev(td, "class", td_class_value = `${/*isReview*/ ctx[0] && /*userTab*/ ctx[4] == false
  			? ''
  			: /*data*/ ctx[41].class} ${/*data*/ ctx[41].classDetails} ${/*isReview*/ ctx[0] && /*userTab*/ ctx[4] == false
  			? /*data*/ ctx[41].spanclass == 'icomoon-24px-correct'
  				? 'gridCorrect'
  				: ''
  			: /*data*/ ctx[41].correctAnswerColor} gridColor pointer border-dark text-center`);
  
  			set_style(td, "width", /*data*/ ctx[41].width);
  			set_style(td, "height", /*data*/ ctx[41].height);
  			set_style(td, "pointerEvents", "pointerEvents");
  			add_location(td, file, 399, 36, 14901);
  		},
  		m: function mount(target, anchor) {
  			insert_dev(target, td, anchor);
  			if (if_block) if_block.m(td, null);
  			append_dev(td, t);
  
  			if (!mounted) {
  				dispose = [
  					listen_dev(td, "click", /*gridClickPreview*/ ctx[7], false, false, false),
  					listen_dev(td, "keyup", /*adaKeyupGridClick*/ ctx[10], false, false, false)
  				];
  
  				mounted = true;
  			}
  		},
  		p: function update(ctx, dirty) {
  			if (/*isReview*/ ctx[0]) {
  				if (if_block) {
  					if_block.p(ctx, dirty);
  				} else {
  					if_block = create_if_block_3(ctx);
  					if_block.c();
  					if_block.m(td, t);
  				}
  			} else if (if_block) {
  				if_block.d(1);
  				if_block = null;
  			}
  
  			if (dirty[0] & /*preview_table*/ 2 && td_id_value !== (td_id_value = /*data*/ ctx[41].id)) {
  				attr_dev(td, "id", td_id_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2 && td_tabindex_value !== (td_tabindex_value = /*data*/ ctx[41].tabindex)) {
  				attr_dev(td, "tabindex", td_tabindex_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2 && td_aria_label_value !== (td_aria_label_value = /*data*/ ctx[41].arialabel)) {
  				attr_dev(td, "aria-label", td_aria_label_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2 && td_pevdata_id_value !== (td_pevdata_id_value = /*data*/ ctx[41].pevdata)) {
  				attr_dev(td, "pevdata-id", td_pevdata_id_value);
  			}
  
  			if (dirty[0] & /*isReview, userTab, preview_table*/ 19 && td_class_value !== (td_class_value = `${/*isReview*/ ctx[0] && /*userTab*/ ctx[4] == false
  			? ''
  			: /*data*/ ctx[41].class} ${/*data*/ ctx[41].classDetails} ${/*isReview*/ ctx[0] && /*userTab*/ ctx[4] == false
  			? /*data*/ ctx[41].spanclass == 'icomoon-24px-correct'
  				? 'gridCorrect'
  				: ''
  			: /*data*/ ctx[41].correctAnswerColor} gridColor pointer border-dark text-center`)) {
  				attr_dev(td, "class", td_class_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2) {
  				set_style(td, "width", /*data*/ ctx[41].width);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2) {
  				set_style(td, "height", /*data*/ ctx[41].height);
  			}
  		},
  		d: function destroy(detaching) {
  			if (detaching) detach_dev(td);
  			if (if_block) if_block.d();
  			mounted = false;
  			run_all(dispose);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_if_block_2.name,
  		type: "if",
  		source: "(399:32) {#if i == data.rowno}",
  		ctx
  	});
  
  	return block;
  }
  
  // (411:40) {#if isReview}
  function create_if_block_3(ctx) {
  	let if_block_anchor;
  
  	function select_block_type(ctx, dirty) {
  		if (/*userTab*/ ctx[4] == true) return create_if_block_4;
  		return create_else_block;
  	}
  
  	let current_block_type = select_block_type(ctx);
  	let if_block = current_block_type(ctx);
  
  	const block = {
  		c: function create() {
  			if_block.c();
  			if_block_anchor = empty();
  		},
  		m: function mount(target, anchor) {
  			if_block.m(target, anchor);
  			insert_dev(target, if_block_anchor, anchor);
  		},
  		p: function update(ctx, dirty) {
  			if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
  				if_block.p(ctx, dirty);
  			} else {
  				if_block.d(1);
  				if_block = current_block_type(ctx);
  
  				if (if_block) {
  					if_block.c();
  					if_block.m(if_block_anchor.parentNode, if_block_anchor);
  				}
  			}
  		},
  		d: function destroy(detaching) {
  			if_block.d(detaching);
  			if (detaching) detach_dev(if_block_anchor);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_if_block_3.name,
  		type: "if",
  		source: "(411:40) {#if isReview}",
  		ctx
  	});
  
  	return block;
  }
  
  // (416:44) {:else}
  function create_else_block(ctx) {
  	let span1;
  	let span0;
  	let span0_class_value;
  	let span0_aria_label_value;
  
  	const block = {
  		c: function create() {
  			span1 = element("span");
  			span0 = element("span");
  			attr_dev(span0, "class", span0_class_value = /*data*/ ctx[41].corrspanclass);
  			attr_dev(span0, "aria-label", span0_aria_label_value = /*data*/ ctx[41].spanarialabel);
  			set_style(span0, "color", /*data*/ ctx[41].corrspanstyle);
  			add_location(span0, file, 417, 52, 16435);
  			add_location(span1, file, 416, 48, 16375);
  		},
  		m: function mount(target, anchor) {
  			insert_dev(target, span1, anchor);
  			append_dev(span1, span0);
  		},
  		p: function update(ctx, dirty) {
  			if (dirty[0] & /*preview_table*/ 2 && span0_class_value !== (span0_class_value = /*data*/ ctx[41].corrspanclass)) {
  				attr_dev(span0, "class", span0_class_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2 && span0_aria_label_value !== (span0_aria_label_value = /*data*/ ctx[41].spanarialabel)) {
  				attr_dev(span0, "aria-label", span0_aria_label_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2) {
  				set_style(span0, "color", /*data*/ ctx[41].corrspanstyle);
  			}
  		},
  		d: function destroy(detaching) {
  			if (detaching) detach_dev(span1);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_else_block.name,
  		type: "else",
  		source: "(416:44) {:else}",
  		ctx
  	});
  
  	return block;
  }
  
  // (412:44) {#if userTab == true}
  function create_if_block_4(ctx) {
  	let span1;
  	let span0;
  	let span0_class_value;
  	let span0_aria_label_value;
  	let span1_class_value;
  
  	const block = {
  		c: function create() {
  			span1 = element("span");
  			span0 = element("span");
  			attr_dev(span0, "class", span0_class_value = /*data*/ ctx[41].spanclass);
  			attr_dev(span0, "aria-label", span0_aria_label_value = /*data*/ ctx[41].spanarialabel);
  			set_style(span0, "color", /*data*/ ctx[41].spanstyle);
  			add_location(span0, file, 413, 52, 16111);
  			attr_dev(span1, "class", span1_class_value = /*state*/ ctx[3].iconVisible);
  			set_style(span1, "display", /*data*/ ctx[41].spandisplay);
  			add_location(span1, file, 412, 48, 15989);
  		},
  		m: function mount(target, anchor) {
  			insert_dev(target, span1, anchor);
  			append_dev(span1, span0);
  		},
  		p: function update(ctx, dirty) {
  			if (dirty[0] & /*preview_table*/ 2 && span0_class_value !== (span0_class_value = /*data*/ ctx[41].spanclass)) {
  				attr_dev(span0, "class", span0_class_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2 && span0_aria_label_value !== (span0_aria_label_value = /*data*/ ctx[41].spanarialabel)) {
  				attr_dev(span0, "aria-label", span0_aria_label_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2) {
  				set_style(span0, "color", /*data*/ ctx[41].spanstyle);
  			}
  
  			if (dirty[0] & /*state*/ 8 && span1_class_value !== (span1_class_value = /*state*/ ctx[3].iconVisible)) {
  				attr_dev(span1, "class", span1_class_value);
  			}
  
  			if (dirty[0] & /*preview_table*/ 2) {
  				set_style(span1, "display", /*data*/ ctx[41].spandisplay);
  			}
  		},
  		d: function destroy(detaching) {
  			if (detaching) detach_dev(span1);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_if_block_4.name,
  		type: "if",
  		source: "(412:44) {#if userTab == true}",
  		ctx
  	});
  
  	return block;
  }
  
  // (398:28) {#each preview_table as data}
  function create_each_block_1(ctx) {
  	let if_block_anchor;
  	let if_block = /*i*/ ctx[40] == /*data*/ ctx[41].rowno && create_if_block_2(ctx);
  
  	const block = {
  		c: function create() {
  			if (if_block) if_block.c();
  			if_block_anchor = empty();
  		},
  		m: function mount(target, anchor) {
  			if (if_block) if_block.m(target, anchor);
  			insert_dev(target, if_block_anchor, anchor);
  		},
  		p: function update(ctx, dirty) {
  			if (/*i*/ ctx[40] == /*data*/ ctx[41].rowno) {
  				if (if_block) {
  					if_block.p(ctx, dirty);
  				} else {
  					if_block = create_if_block_2(ctx);
  					if_block.c();
  					if_block.m(if_block_anchor.parentNode, if_block_anchor);
  				}
  			} else if (if_block) {
  				if_block.d(1);
  				if_block = null;
  			}
  		},
  		d: function destroy(detaching) {
  			if (if_block) if_block.d(detaching);
  			if (detaching) detach_dev(if_block_anchor);
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_each_block_1.name,
  		type: "each",
  		source: "(398:28) {#each preview_table as data}",
  		ctx
  	});
  
  	return block;
  }
  
  // (395:16) {#each total_row_count as val, i}
  function create_each_block(ctx) {
  	let tr;
  	let t;
  	let if_block = /*preview_table*/ ctx[1] && /*preview_table*/ ctx[1].length > 0 && create_if_block_1(ctx);
  
  	const block = {
  		c: function create() {
  			tr = element("tr");
  			if (if_block) if_block.c();
  			t = space();
  			add_location(tr, file, 395, 20, 14672);
  		},
  		m: function mount(target, anchor) {
  			insert_dev(target, tr, anchor);
  			if (if_block) if_block.m(tr, null);
  			append_dev(tr, t);
  		},
  		p: function update(ctx, dirty) {
  			if (/*preview_table*/ ctx[1] && /*preview_table*/ ctx[1].length > 0) {
  				if (if_block) {
  					if_block.p(ctx, dirty);
  				} else {
  					if_block = create_if_block_1(ctx);
  					if_block.c();
  					if_block.m(tr, t);
  				}
  			} else if (if_block) {
  				if_block.d(1);
  				if_block = null;
  			}
  		},
  		d: function destroy(detaching) {
  			if (detaching) detach_dev(tr);
  			if (if_block) if_block.d();
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_each_block.name,
  		type: "each",
  		source: "(395:16) {#each total_row_count as val, i}",
  		ctx
  	});
  
  	return block;
  }
  
  function create_fragment(ctx) {
  	let div1;
  	let itemhelper;
  	let t0;
  	let table;
  	let tbody;
  	let t1;
  	let div0;
  	let t2_value = l.you_were_req_to_select + "";
  	let t2;
  	let t3;
  	let t4_value = /*state*/ ctx[3].correctCount + "";
  	let t4;
  	let t5;
  	let t6_value = l.grid_mark_ans_correct + "";
  	let t6;
  	let current;
  
  	itemhelper = new ItemHelper({
  			props: {
  				reviewMode: /*isReview*/ ctx[0],
  				handleReviewClick: /*handleReviewMode*/ ctx[11],
  				customReviewMode: /*customIsReview*/ ctx[6]
  			},
  			$$inline: true
  		});
  
  	itemhelper.$on("setReview", /*setReview*/ ctx[9]);
  	itemhelper.$on("unsetReview", /*unsetReview*/ ctx[8]);
  	let if_block = /*total_row_count*/ ctx[2] && /*total_row_count*/ ctx[2].length > 0 && create_if_block(ctx);
  
  	const block = {
  		c: function create() {
  			div1 = element("div");
  			create_component(itemhelper.$$.fragment);
  			t0 = space();
  			table = element("table");
  			tbody = element("tbody");
  			if (if_block) if_block.c();
  			t1 = space();
  			div0 = element("div");
  			t2 = text(t2_value);
  			t3 = space();
  			t4 = text(t4_value);
  			t5 = space();
  			t6 = text(t6_value);
  			add_location(tbody, file, 392, 8, 14527);
  			attr_dev(table, "id", "table");
  			attr_dev(table, "class", "table-bordered shadingTable");
  			set_style(table, "pointer-events", /*isReview*/ ctx[0] ? 'none' : '');
  			add_location(table, file, 391, 4, 14413);
  			attr_dev(div0, "class", "h mt-5 text-center");
  			attr_dev(div0, "id", "correctCountStatus");
  			set_style(div0, "color", /*incorrectCls*/ ctx[5]);
  			add_location(div0, file, 430, 4, 16961);
  			attr_dev(div1, "class", "shadingPreview");
  			add_location(div1, file, 383, 0, 14155);
  		},
  		l: function claim(nodes) {
  			throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
  		},
  		m: function mount(target, anchor) {
  			insert_dev(target, div1, anchor);
  			mount_component(itemhelper, div1, null);
  			append_dev(div1, t0);
  			append_dev(div1, table);
  			append_dev(table, tbody);
  			if (if_block) if_block.m(tbody, null);
  			append_dev(div1, t1);
  			append_dev(div1, div0);
  			append_dev(div0, t2);
  			append_dev(div0, t3);
  			append_dev(div0, t4);
  			append_dev(div0, t5);
  			append_dev(div0, t6);
  			current = true;
  		},
  		p: function update(ctx, dirty) {
  			const itemhelper_changes = {};
  			if (dirty[0] & /*isReview*/ 1) itemhelper_changes.reviewMode = /*isReview*/ ctx[0];
  			itemhelper.$set(itemhelper_changes);
  
  			if (/*total_row_count*/ ctx[2] && /*total_row_count*/ ctx[2].length > 0) {
  				if (if_block) {
  					if_block.p(ctx, dirty);
  				} else {
  					if_block = create_if_block(ctx);
  					if_block.c();
  					if_block.m(tbody, null);
  				}
  			} else if (if_block) {
  				if_block.d(1);
  				if_block = null;
  			}
  
  			if (!current || dirty[0] & /*isReview*/ 1) {
  				set_style(table, "pointer-events", /*isReview*/ ctx[0] ? 'none' : '');
  			}
  
  			if ((!current || dirty[0] & /*state*/ 8) && t4_value !== (t4_value = /*state*/ ctx[3].correctCount + "")) set_data_dev(t4, t4_value);
  
  			if (!current || dirty[0] & /*incorrectCls*/ 32) {
  				set_style(div0, "color", /*incorrectCls*/ ctx[5]);
  			}
  		},
  		i: function intro(local) {
  			if (current) return;
  			transition_in(itemhelper.$$.fragment, local);
  			current = true;
  		},
  		o: function outro(local) {
  			transition_out(itemhelper.$$.fragment, local);
  			current = false;
  		},
  		d: function destroy(detaching) {
  			if (detaching) detach_dev(div1);
  			destroy_component(itemhelper);
  			if (if_block) if_block.d();
  		}
  	};
  
  	dispatch_dev("SvelteRegisterBlock", {
  		block,
  		id: create_fragment.name,
  		type: "component",
  		source: "",
  		ctx
  	});
  
  	return block;
  }
  
  function instance($$self, $$props, $$invalidate) {
  	let { $$slots: slots = {}, $$scope } = $$props;
  	validate_slots('ShadingPreview', slots, []);
  	let { xml } = $$props;
  	let { uxml } = $$props;
  	let { isReview } = $$props;
  	let { showAns } = $$props;
  	let { editorState } = $$props;
  	let customIsReview = isReview;
  	let showSelectedAns = "";
  	let ans = [];
  	let ansCheck, userTab = true;
  	let ansNotPerformed;
  	let incorrectCls = "";
  	let countRes = "";
  	let sizeMultipleIndex = 40;
  	let class_val = 1;
  
  	let cellIndex,
  		showAnsIndex,
  		locked_cell_values,
  		shaded_cell_values,
  		preview_table,
  		total_row_count;
  
  	let state = {
  		rowCount: 1,
  		colCount: 4,
  		gridWidth: 80,
  		gridHeight: 80,
  		correctAns: [],
  		correctCount: "",
  		userAns: [],
  		shadedCell: [],
  		cellLocked: false,
  		hiddenCell: [],
  		smController: "h",
  		itemLayout: [],
  		iconVisible: "h",
  		pointerEvents: "auto",
  		checkLockCell: "",
  		lockedCellValue: ""
  	}; //pointerEvents: ""
  
  	onMount(() => {
  		$$invalidate(3, state.xml = xml, state);
  		resetValue();
  
  		if (!uxml) {
  			$$invalidate(3, state.userAns = [], state);
  		}
  
  		loadModule(xml);
  	}); //for future use
  	//let timer = setTimeout(function() {
  	//AH.select("#special_module_user_xml").innerText = "<smans userAns='" + state.userAns.join() + "'></smans>";
  	//new_uxml = "<smans userAns='" + state.userAns.join() + "'></smans>";
  
  	// Set correct answer color
  	function setCorrectAnswerColor(id) {
  		// Return grid Color green for correct answer, red for incorrect answer and grey for not performed
  		ansCheck = state.iconVisible == "" && state.userAns.includes(id)
  		? getCorrect(id) ? " gridCorrect" : " gridIncorrect"
  		: "";
  
  		ansNotPerformed = state.iconVisible == "" && !state.userAns.includes(id)
  		? getNotPerformed(id) ? " gridNotPerformed" : ""
  		: "";
  
  		ansCheck = ansCheck + ansNotPerformed;
  		return ansCheck;
  	}
  
  	//to show shaded grid according to uxml
  	function parseUserAns(uans) {
  		let userAnswer = XMLToJSON(uans);
  		$$invalidate(3, state.userAns = userAnswer.smans._userAns.split(","), state);
  
  		if (userAnswer.smans._userAns) {
  			let user_ans_cell = '#p' + userAnswer.smans._userAns.split(',').join(',#p');
  			AH.selectAll('.shadingPreview .shadingTable td', 'removeClass', "gridSelected");
  
  			AH.selectAll('.shadingPreview .shadingTable td').forEach(function (table_td) {
  				table_td.dataset.grid = "no";
  			});
  
  			AH.selectAll(user_ans_cell, 'addClass', "gridSelected");
  
  			AH.selectAll(user_ans_cell).forEach(function (table_td) {
  				table_td.dataset.grid = "selected";
  			});
  		}
  	}
  
  	// loads the module according to the value of question xml and user xml
  	function loadModule(loadXml) {
  		loadXml = XMLToJSON(loadXml);
  		parseXMLPreview(loadXml);
  	}
  
  	// updates the xml after parsing the xml and shows answer
  	function parseXMLPreview(MYXML) {
  		try {
  			$$invalidate(3, state.rowCount = MYXML.smxml._rowCount, state);
  			$$invalidate(3, state.colCount = MYXML.smxml._colCount, state);
  			$$invalidate(3, state.gridWidth = parseInt(MYXML.smxml._cellWidth) * sizeMultipleIndex, state);
  			$$invalidate(3, state.gridHeight = parseInt(MYXML.smxml._cellHeight) * sizeMultipleIndex, state);
  			$$invalidate(3, state.correctAns = MYXML.smxml._correctAns.split(","), state);
  			$$invalidate(3, state.correctCount = MYXML.smxml._correctCount, state);
  			$$invalidate(3, state.cellLocked = MYXML.smxml._lockedCell, state);
  			$$invalidate(3, state.hiddenCell = MYXML.smxml._hiddenCell, state);
  			$$invalidate(3, state.shadedCell = MYXML.smxml._shadedCell, state);
  			$$invalidate(3, state.lockedCellValue = MYXML.smxml._lockedCellValue, state);
  			setDefaultValues();
  
  			if (uxml) {
  				parseUserAns(uxml);
  			}
  		} catch(error) {
  			console.warn({
  				'error': error.message,
  				'function name': 'parseXMLPreview',
  				'File name': 'ShadingPreview.js'
  			});
  		}
  	}
  
  	//reset the shaded grid and correct grid
  	function resetValue() {
  		$$invalidate(3, state.correctAns = [], state);
  		$$invalidate(3, state.correctCount = [], state);
  		$$invalidate(3, state.shadedCell = [], state);
  	}
  
  	//to check if the shaded grid is correct or not
  	function getCorrect(id) {
  		//Return true if this id is correct answer
  		if (state.correctAns != 0) {
  			if (state.correctAns.includes(id)) {
  				return true;
  			} else {
  				return false;
  			}
  		} else {
  			if (state.userAns.length == state.correctCount) {
  				$$invalidate(5, incorrectCls = "#136d13");
  				return true;
  			} else {
  				$$invalidate(5, incorrectCls = "#c30f0f");
  				return false;
  			}
  		}
  	}
  
  	//to check if the correct ans grid is checked or not
  	function getNotPerformed(id) {
  		let result;
  
  		if (state.correctAns != 0) {
  			result = state.correctAns.includes(id) && !state.userAns.includes(id)
  			? true
  			: false;
  		}
  
  		return result;
  	}
  
  	// Set lock to author shaded cells
  	function getClassDetail(cellIndex, locked_cell_values, shaded_cell_values) {
  		let classDetail = '';
  
  		if (locked_cell_values.indexOf(cellIndex) != -1) {
  			classDetail += "lockedGrid ";
  		}
  
  		if (shaded_cell_values.indexOf(cellIndex) != -1 && class_val == 1) {
  			classDetail += "gridSelected";
  		}
  
  		return classDetail;
  	}
  
  	//set default values after loading 
  	function setDefaultValues() {
  		let shadedCell = state.shadedCell != ''
  		? '#p' + state.shadedCell.split(',').join(',#p')
  		: '';
  
  		AH.selectAll('.shadingPreview .shadingTable td', 'removeClass', ['gridSelected', 'lockedGrid']);
  
  		AH.selectAll('.shadingPreview .shadingTable td').forEach(function (table_td) {
  			table_td.dataset.grid = "no";
  		});
  
  		if (shadedCell != '') {
  			AH.selectAll(shadedCell, 'addClass', 'gridSelected');
  
  			AH.selectAll(shadedCell).forEach(function (table_td) {
  				table_td.dataset.grid = "selected";
  			});
  		}
  
  		let lockedCell = state.lockedCellValue != undefined && state.lockedCellValue != ''
  		? '#p' + state.lockedCellValue.split(',').join(',#p')
  		: '';
  
  		if (lockedCell != '') {
  			AH.selectAll(lockedCell, 'addClass', 'lockedGrid');
  
  			AH.selectAll(lockedCell).forEach(function (table_td) {
  				table_td.dataset.grid = "selected";
  			});
  		}
  	}
  
  	//function to execute when the grid is clicked
  	function gridClickPreview(e) {
  		let targetId = e.target.id;
  		class_val--;
  
  		if (!AH.select(".shadingPreview [id='" + targetId + "']").classList.contains("lockedGrid")) {
  			if (!AH.select(".shadingPreview [id='" + targetId + "']").classList.contains("gridSelected")) {
  				AH.select(".shadingPreview [id='" + targetId + "']").setAttribute("data-grid", "selected");
  				AH.selectAll(".shadingPreview [id='" + targetId + "']", 'addClass', "gridSelected");
  			} else {
  				AH.select(".shadingPreview [id='" + targetId + "']").setAttribute("data-grid", "no");
  				AH.selectAll(".shadingPreview [id='" + targetId + "']", 'removeClass', "gridSelected");
  			}
  		}
  
  		//state.userAns = userAns;
  		let u_answer = checkAns();
  
  		if (!editorState) {
  			onUserAnsChange({ uXml: state.userxml, ans: u_answer });
  		}
  	}
  
  	//to show correct and user answer 
  	function showAnswer(val, iconState) {
  		//show correct incorrect icon with respect to iconState
  		if (iconState == "showIcon") {
  			$$invalidate(3, state.iconVisible = "", state);
  		} else {
  			$$invalidate(3, state.iconVisible = "h", state);
  		}
  
  		//show correct answer and user answer
  		if (val == "cans") {
  			$$invalidate(17, ans = state.correctAns);
  		} else if (val == "yans") {
  			$$invalidate(17, ans = state.userAns);
  		}
  	}
  
  	//to check answer
  	function checkAns() {
  		const correctLength = state.correctAns.length;
  		let resultLength = 0;
  		let resultCountLen = 0;
  		let ans_val = "";
  		$$invalidate(3, state.userAns = [], state);
  
  		AH.selectAll('.shadingPreview .shadingTable .gridSelected').forEach(function (value) {
  			state.userAns.push(value.getAttribute("pevdata-id"));
  		});
  
  		AH.select("#special_module_user_xml").value = "<smans userAns='" + state.userAns.join() + "'></smans>";
  		$$invalidate(3, state.userxml = "<smans userAns='" + state.userAns.join() + "'></smans>", state);
  
  		if (state.correctAns != "") {
  			state.correctAns.map(function (data, i) {
  				state.userAns.map(function (data2, j) {
  					if (data == data2) {
  						resultLength = resultLength + 1;
  					}
  				});
  			});
  
  			//Check if total no. of user answer is equal to correct answer
  			if (correctLength == resultLength && resultLength == state.userAns.length) {
  				ans_val = l.correct;
  			} else {
  				ans_val = l.incorrect;
  			}
  
  			if (typeof calculatePoint != "undefined") {
  				calculatePoint(state.correctAns.length, resultLength);
  			}
  
  			if (editorState) {
  				showAns(ans_val);
  			}
  		}
  
  		if (state.correctCount != "" && state.correctAns == "") {
  			if (state.userAns.length == state.correctCount) {
  				countRes = l.correct;
  				resultCountLen = state.correctCount;
  			} else {
  				countRes = l.incorrect;
  			}
  
  			if (typeof calculatePoint != "undefined") {
  				calculatePoint(state.correctCount, resultCountLen);
  			}
  
  			if (editorState) {
  				showAns(countRes);
  			}
  		}
  
  		if (countRes) {
  			countRes = countRes === "Correct" ? true : false;
  		} else {
  			countRes = ans_val === "Correct" ? true : false;
  		}
  
  		if (!editorState) {
  			onUserAnsChange({ uXml: state.userxml, ans: countRes });
  		}
  
  		return countRes;
  	}
  
  	//if review mode is OFF
  	function unsetReview() {
  		showAnswer("yans", "hideIcon");
  		$$invalidate(0, isReview = false);
  
  		state.correctCount != "" && state.correctAns == ""
  		? AH.selectAll('#correctCountStatus', 'addClass', 'h')
  		: "";
  	}
  
  	//if review mode is ON
  	function setReview() {
  		showAnswer("yans", "showIcon");
  		$$invalidate(0, isReview = true);
  		checkAns();
  
  		state.correctCount != "" && state.correctAns == ""
  		? AH.selectAll('#correctCountStatus', 'removeClass', 'h')
  		: "";
  	}
  
  	//ada
  	function adaKeyupGridClick(e) {
  		if (e.keyCode == 13) {
  			gridClickPreview(e);
  		}
  	}
  
  	//to switch correct ans and your ans tab
  	function handleReviewMode(mode) {
  		if (mode == 'c') {
  			$$invalidate(4, userTab = false);
  		} else if (mode == 'u') {
  			$$invalidate(4, userTab = true);
  		}
  	}
  
  	const writable_props = ['xml', 'uxml', 'isReview', 'showAns', 'editorState'];
  
  	Object.keys($$props).forEach(key => {
  		if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console_1.warn(`<ShadingPreview> was created with unknown prop '${key}'`);
  	});
  
  	$$self.$$set = $$props => {
  		if ('xml' in $$props) $$invalidate(12, xml = $$props.xml);
  		if ('uxml' in $$props) $$invalidate(13, uxml = $$props.uxml);
  		if ('isReview' in $$props) $$invalidate(0, isReview = $$props.isReview);
  		if ('showAns' in $$props) $$invalidate(14, showAns = $$props.showAns);
  		if ('editorState' in $$props) $$invalidate(15, editorState = $$props.editorState);
  	};
  
  	$$self.$capture_state = () => ({
  		onMount,
  		afterUpdate,
  		XMLToJSON,
  		AH,
  		onUserAnsChange,
  		l,
  		ItemHelper,
  		xml,
  		uxml,
  		isReview,
  		showAns,
  		editorState,
  		customIsReview,
  		showSelectedAns,
  		ans,
  		ansCheck,
  		userTab,
  		ansNotPerformed,
  		incorrectCls,
  		countRes,
  		sizeMultipleIndex,
  		class_val,
  		cellIndex,
  		showAnsIndex,
  		locked_cell_values,
  		shaded_cell_values,
  		preview_table,
  		total_row_count,
  		state,
  		setCorrectAnswerColor,
  		parseUserAns,
  		loadModule,
  		parseXMLPreview,
  		resetValue,
  		getCorrect,
  		getNotPerformed,
  		getClassDetail,
  		setDefaultValues,
  		gridClickPreview,
  		showAnswer,
  		checkAns,
  		unsetReview,
  		setReview,
  		adaKeyupGridClick,
  		handleReviewMode
  	});
  
  	$$self.$inject_state = $$props => {
  		if ('xml' in $$props) $$invalidate(12, xml = $$props.xml);
  		if ('uxml' in $$props) $$invalidate(13, uxml = $$props.uxml);
  		if ('isReview' in $$props) $$invalidate(0, isReview = $$props.isReview);
  		if ('showAns' in $$props) $$invalidate(14, showAns = $$props.showAns);
  		if ('editorState' in $$props) $$invalidate(15, editorState = $$props.editorState);
  		if ('customIsReview' in $$props) $$invalidate(6, customIsReview = $$props.customIsReview);
  		if ('showSelectedAns' in $$props) $$invalidate(16, showSelectedAns = $$props.showSelectedAns);
  		if ('ans' in $$props) $$invalidate(17, ans = $$props.ans);
  		if ('ansCheck' in $$props) ansCheck = $$props.ansCheck;
  		if ('userTab' in $$props) $$invalidate(4, userTab = $$props.userTab);
  		if ('ansNotPerformed' in $$props) ansNotPerformed = $$props.ansNotPerformed;
  		if ('incorrectCls' in $$props) $$invalidate(5, incorrectCls = $$props.incorrectCls);
  		if ('countRes' in $$props) countRes = $$props.countRes;
  		if ('sizeMultipleIndex' in $$props) sizeMultipleIndex = $$props.sizeMultipleIndex;
  		if ('class_val' in $$props) class_val = $$props.class_val;
  		if ('cellIndex' in $$props) $$invalidate(18, cellIndex = $$props.cellIndex);
  		if ('showAnsIndex' in $$props) $$invalidate(19, showAnsIndex = $$props.showAnsIndex);
  		if ('locked_cell_values' in $$props) $$invalidate(20, locked_cell_values = $$props.locked_cell_values);
  		if ('shaded_cell_values' in $$props) $$invalidate(21, shaded_cell_values = $$props.shaded_cell_values);
  		if ('preview_table' in $$props) $$invalidate(1, preview_table = $$props.preview_table);
  		if ('total_row_count' in $$props) $$invalidate(2, total_row_count = $$props.total_row_count);
  		if ('state' in $$props) $$invalidate(3, state = $$props.state);
  	};
  
  	if ($$props && "$$inject" in $$props) {
  		$$self.$inject_state($$props.$$inject);
  	}
  
  	$$self.$$.update = () => {
  		if ($$self.$$.dirty[0] & /*isReview, xml, state, cellIndex, showAnsIndex, total_row_count, ans, preview_table, showSelectedAns, locked_cell_values, shaded_cell_values*/ 4132879) {
  			//clearTimeout(timer);
  			//}, 500);
  			 {
  				if (isReview) {
  					setReview();
  				} else {
  					unsetReview();
  				}
  
  				if (xml != state.xml) {
  					$$invalidate(3, state.xml = xml, state);
  					loadModule(xml);
  				}
  
  				($$invalidate(2, total_row_count = []), $$invalidate(1, preview_table = []));
  
  				$$invalidate(20, locked_cell_values = state.lockedCellValue != undefined && state.lockedCellValue != ''
  				? state.lockedCellValue.split(',')
  				: '');
  
  				$$invalidate(21, shaded_cell_values = state.shadedCell != ''
  				? state.shadedCell.split(',')
  				: '');
  
  				//to create grid
  				for (let i = 0; i < state.rowCount; i++) {
  					$$invalidate(2, total_row_count = [...total_row_count, { id: 'gridRow_' + i }]);
  
  					for (let j = 0; j < state.colCount; j++) {
  						$$invalidate(18, cellIndex = i + "_" + j);
  
  						if (ans != "") {
  							$$invalidate(19, showAnsIndex = ans.indexOf(cellIndex));
  							$$invalidate(16, showSelectedAns = showAnsIndex != -1 ? "gridSelected" : "");
  						} else {
  							$$invalidate(16, showSelectedAns = "");
  						}
  
  						$$invalidate(1, preview_table = [
  							...preview_table,
  							{
  								id: 'p' + cellIndex,
  								tabindex: state.pointerEvents == "auto" ? "0" : "",
  								arialabel: "Grids row " + (i + 1) + " and column " + (j + 1) + " is " + (showSelectedAns == "gridSelected"
  								? "selected"
  								: "unselected"),
  								pevdata: cellIndex,
  								class: showSelectedAns,
  								width: parseInt(state.gridWidth) + 'px',
  								height: parseInt(state.gridHeight) + 'px',
  								classDetails: getClassDetail(cellIndex, locked_cell_values, shaded_cell_values),
  								correctAnswerColor: setCorrectAnswerColor(cellIndex),
  								spanclass: getCorrect(cellIndex)
  								? "icomoon-24px-correct"
  								: "icomoon-24px-close",
  								spanarialabel: getCorrect(cellIndex)
  								? getNotPerformed(cellIndex)
  									? "marked as unattempted"
  									: "marked as correct"
  								: "marked as incorrect",
  								spanstyle: !state.userAns.includes(cellIndex)
  								? getNotPerformed(cellIndex) ? "#222" : ""
  								: getCorrect(cellIndex) ? "#136d13" : "#c30f0f",
  								spandisplay: state.iconVisible == "" && state.userAns.includes(cellIndex) || state.iconVisible == "" && !state.userAns.includes(cellIndex) && getNotPerformed(cellIndex)
  								? "block"
  								: "none",
  								rowno: i,
  								corrspanclass: getCorrect(cellIndex) ? "icomoon-24px-correct" : "",
  								corrspanstyle: getCorrect(cellIndex) ? "#136d13" : ""
  							}
  						]);
  					}
  				}
  			}
  		}
  	};
  
  	return [
  		isReview,
  		preview_table,
  		total_row_count,
  		state,
  		userTab,
  		incorrectCls,
  		customIsReview,
  		gridClickPreview,
  		unsetReview,
  		setReview,
  		adaKeyupGridClick,
  		handleReviewMode,
  		xml,
  		uxml,
  		showAns,
  		editorState,
  		showSelectedAns,
  		ans,
  		cellIndex,
  		showAnsIndex,
  		locked_cell_values,
  		shaded_cell_values
  	];
  }
  
  class ShadingPreview extends SvelteComponentDev {
  	constructor(options) {
  		super(options);
  
  		init(
  			this,
  			options,
  			instance,
  			create_fragment,
  			safe_not_equal,
  			{
  				xml: 12,
  				uxml: 13,
  				isReview: 0,
  				showAns: 14,
  				editorState: 15
  			},
  			null,
  			[-1, -1]
  		);
  
  		dispatch_dev("SvelteRegisterComponent", {
  			component: this,
  			tagName: "ShadingPreview",
  			options,
  			id: create_fragment.name
  		});
  
  		const { ctx } = this.$$;
  		const props = options.props || {};
  
  		if (/*xml*/ ctx[12] === undefined && !('xml' in props)) {
  			console_1.warn("<ShadingPreview> was created without expected prop 'xml'");
  		}
  
  		if (/*uxml*/ ctx[13] === undefined && !('uxml' in props)) {
  			console_1.warn("<ShadingPreview> was created without expected prop 'uxml'");
  		}
  
  		if (/*isReview*/ ctx[0] === undefined && !('isReview' in props)) {
  			console_1.warn("<ShadingPreview> was created without expected prop 'isReview'");
  		}
  
  		if (/*showAns*/ ctx[14] === undefined && !('showAns' in props)) {
  			console_1.warn("<ShadingPreview> was created without expected prop 'showAns'");
  		}
  
  		if (/*editorState*/ ctx[15] === undefined && !('editorState' in props)) {
  			console_1.warn("<ShadingPreview> was created without expected prop 'editorState'");
  		}
  	}
  
  	get xml() {
  		throw new Error("<ShadingPreview>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	set xml(value) {
  		throw new Error("<ShadingPreview>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	get uxml() {
  		throw new Error("<ShadingPreview>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	set uxml(value) {
  		throw new Error("<ShadingPreview>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	get isReview() {
  		throw new Error("<ShadingPreview>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	set isReview(value) {
  		throw new Error("<ShadingPreview>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	get showAns() {
  		throw new Error("<ShadingPreview>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	set showAns(value) {
  		throw new Error("<ShadingPreview>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	get editorState() {
  		throw new Error("<ShadingPreview>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  
  	set editorState(value) {
  		throw new Error("<ShadingPreview>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
  	}
  }
  
  export default ShadingPreview;
  //# sourceMappingURL=ShadingPreview-b49fc09c.js.map
  