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A,EAAE,6BAA6BsB,MAAK,SAAUC,GAC1C,IACInC,EAAOM,KAAKG,IAAM,IAAIR,EAAS,CAAEI,KAAMC,MAC3C,CAAE,MAAO8B,GACLC,QAAQC,IAAI,4BAA4BhC,KAAKG,KACjD,CACJ,GACJ,SAEwC,IAA7B8B,OAAOC,oBACdD,OAAOC,kBAAoB,CAAC,GAGhCD,OAAOC,kBAAkBC,SAAW,SAAUtC,GAC1C,OAAO,IAAIF,EAASE,EACxB,C","sources":["webpack://WebComponents/./runestone/datafile/js/datafile.js"],"sourcesContent":["/*==========================================\n======= Master datafile.js ========\n============================================\n=== This file contains the JS for ===\n=== the Runestone Datafile component. ===\n============================================\n=== Created by ===\n=== Isaiah Mayerchak ===\n=== 6/8/15 ===\n==========================================*/\n\"use strict\";\n\nimport RunestoneBase from \"../../common/js/runestonebase\";\nimport \"../css/datafile.css\";\n\nvar dfList = {}; // Dictionary that contains all instances of Datafile objects\n\nclass DataFile extends RunestoneBase {\n constructor(opts) {\n super(opts);\n var orig = opts.orig; // entire
element that will be replaced by new HTML\n this.origElem = orig;\n this.divid = orig.id;\n this.dataEdit = false;\n this.isImage = $(orig).data(\"isimage\");\n this.fileName = $(orig).data(\"filename\");\n if ($(this.origElem).data(\"edit\") === true) {\n this.dataEdit = true;\n }\n this.displayClass = \"block\"; // Users can specify the non-edit component to be hidden--default is not hidden\n if ($(this.origElem).is(\"[data-hidden]\")) {\n this.displayClass = \"none\";\n }\n // Users can specify numbers of rows/columns when editing is true\n this.numberOfRows = $(this.origElem).data(\"rows\");\n this.numberOfCols = $(this.origElem).data(\"cols\");\n if (!this.isImage) {\n if (this.dataEdit) {\n this.createTextArea();\n } else {\n this.createPre();\n }\n if (this.fileName) {\n this.containerDiv.dataset.filename = this.fileName\n }\n }\n this.indicate_component_ready();\n }\n /*=====================================\n == Create eitheror