/* _inputParameters: an object with different values for the model parameters */
function LOLMasterTemplateV7(_topFrame,_libraryPath,_codebasePath, _inputParameters) {
  var _model = EJSS_CORE.createAnimationLMS();
  var _view;
  var _isPlaying = false;
  var _isPaused = true;
  var _isMobile = (navigator===undefined) ? false : navigator.userAgent.match(/iPhone|iPad|iPod|Android|BlackBerry|Opera Mini|IEMobile/i);

var _stringProperties = {};
  var _tools = {
    showInputDialog : EJSS_INTERFACE.BoxPanel.showInputDialog,
    showOkDialog : EJSS_INTERFACE.BoxPanel.showOkDialog,
    showOkCancelDialog : EJSS_INTERFACE.BoxPanel.showOkCancelDialog,
    downloadText: EJSS_TOOLS.File.downloadText,
    uploadText: function(action) { EJSS_TOOLS.File.uploadText(_model,action); } 
  };

  function _play()  { _isPaused = false; _isPlaying = true;  _model.play();  }
  function _pause() { _isPaused = true;  _isPlaying = false; _model.pause(); }
  function _step()  { _pause();  _model.step(); }
  function _reset() { _model.reset();  _isPaused = _model.isPaused(); _isPlaying = _model.isPlaying(); }
  _model._play  = _play;
  _model._pause = _pause;
  _model._step  = _step;
  _model._reset = _reset;
  function _update() { _model.update(); }
  function _initialize() { _model.initialize(); }
  function _setFPS(_fps) { _model.setFPS(_fps); }
  function _setDelay(_delay) { _model.setDelay(_delay); }
  function _setStepsPerDisplay(_spd) { _model.setStepsPerDisplay(_spd); }
  function _setUpdateView(_updateView) { _model.setUpdateView(_updateView); }
  function _setAutoplay(_auto) { _model.setAutoplay(_auto); }
  function _println(_message) { console.log(_message); }

  function _breakAfterThisPage() { _model.setShouldBreak(true); }

  function _resetSolvers() { if (_model.resetSolvers) _model.resetSolvers(); }

  function _saveText(name,type,content) { if (_model.saveText) _model.saveText(name,type,content); }

  function _saveState(name) { if (_model.saveState) _model.saveState(name); }

  function _saveImage(name,panelname) { if (_model.saveImage) _model.saveImage(name,panelname); }

  function _readState(url,type) { if (_model.readState) _model.readState(url,type); }

  function _readText(url,type,varname) { if (_model.readText) _model.readText(url,type,varname); }

  function _getStringProperty(propertyName) {
    var _value = _stringProperties[propertyName];
    if (_value===undefined) return propertyName;
    else return _value;
  }
  var __pagesEnabled = [];
  function _setPageEnabled(pageName,enabled) { __pagesEnabled[pageName] = enabled; }

  var title; // EjsS Model.Variables.toEdit.title
  var systemText2; // EjsS Model.Variables.toEdit.systemText2
  var initialState; // EjsS Model.Variables.toEdit.initialState
  var initialState2; // EjsS Model.Variables.toEdit.initialState2
  var finalState; // EjsS Model.Variables.toEdit.finalState
  var finalState2; // EjsS Model.Variables.toEdit.finalState2
  var remarks2; // EjsS Model.Variables.toEdit.remarks2

  var Width; // EjsS Model.Variables.layout.Width
  var Height; // EjsS Model.Variables.layout.Height
  var Width1; // EjsS Model.Variables.layout.Width1
  var Width2; // EjsS Model.Variables.layout.Width2
  var debuggg; // EjsS Model.Variables.layout.debuggg
  var debugggTR; // EjsS Model.Variables.layout.debugggTR

  var editing; // EjsS Model.Variables.settings.editing
  var physicsonly; // EjsS Model.Variables.settings.physicsonly
  var versions; // EjsS Model.Variables.settings.versions
  var revealRadioButton; // EjsS Model.Variables.settings.revealRadioButton
  var isC; // EjsS Model.Variables.settings.isC
  var isE; // EjsS Model.Variables.settings.isE
  var isG; // EjsS Model.Variables.settings.isG
  var isI; // EjsS Model.Variables.settings.isI
  var isK; // EjsS Model.Variables.settings.isK
  var isN; // EjsS Model.Variables.settings.isN
  var ignoreEnergyLst; // EjsS Model.Variables.settings.ignoreEnergyLst
  var check3a; // EjsS Model.Variables.settings.check3a
  var check3b; // EjsS Model.Variables.settings.check3b
  var check4a; // EjsS Model.Variables.settings.check4a
  var check4b; // EjsS Model.Variables.settings.check4b
  var check3aEnergy; // EjsS Model.Variables.settings.check3aEnergy
  var check3bEnergy; // EjsS Model.Variables.settings.check3bEnergy
  var check4aEnergy; // EjsS Model.Variables.settings.check4aEnergy
  var check4bEnergy; // EjsS Model.Variables.settings.check4bEnergy
  var check3aReason; // EjsS Model.Variables.settings.check3aReason
  var check3bReason; // EjsS Model.Variables.settings.check3bReason
  var check4aReason; // EjsS Model.Variables.settings.check4aReason
  var check4bReason; // EjsS Model.Variables.settings.check4bReason
  var iniC; // EjsS Model.Variables.settings.iniC
  var iniE; // EjsS Model.Variables.settings.iniE
  var iniG; // EjsS Model.Variables.settings.iniG
  var iniI; // EjsS Model.Variables.settings.iniI
  var iniK; // EjsS Model.Variables.settings.iniK
  var iniN; // EjsS Model.Variables.settings.iniN
  var finC; // EjsS Model.Variables.settings.finC
  var finE; // EjsS Model.Variables.settings.finE
  var finG; // EjsS Model.Variables.settings.finG
  var finI; // EjsS Model.Variables.settings.finI
  var finK; // EjsS Model.Variables.settings.finK
  var finN; // EjsS Model.Variables.settings.finN
  var check7a; // EjsS Model.Variables.settings.check7a
  var operators; // EjsS Model.Variables.settings.operators
  var finalC; // EjsS Model.Variables.settings.finalC
  var finalE; // EjsS Model.Variables.settings.finalE
  var finalG; // EjsS Model.Variables.settings.finalG
  var finalI; // EjsS Model.Variables.settings.finalI
  var finalK; // EjsS Model.Variables.settings.finalK
  var finalN; // EjsS Model.Variables.settings.finalN
  var passfail; // EjsS Model.Variables.settings.passfail
  var inequalityCheckLst; // EjsS Model.Variables.settings.inequalityCheckLst
  var userPlay; // EjsS Model.Variables.settings.userPlay
  var displayChemical; // EjsS Model.Variables.settings.displayChemical
  var displayElastic; // EjsS Model.Variables.settings.displayElastic
  var displayGravitational; // EjsS Model.Variables.settings.displayGravitational
  var displayInternal; // EjsS Model.Variables.settings.displayInternal
  var displayKinetic; // EjsS Model.Variables.settings.displayKinetic
  var displayNuclear; // EjsS Model.Variables.settings.displayNuclear
  var PropagationofWaves; // EjsS Model.Variables.settings.PropagationofWaves
  var Mechanically; // EjsS Model.Variables.settings.Mechanically
  var Electrically; // EjsS Model.Variables.settings.Electrically

  var nEnergy; // EjsS Model.Variables.Var Table.nEnergy
  var C; // EjsS Model.Variables.Var Table.C
  var E; // EjsS Model.Variables.Var Table.E
  var G; // EjsS Model.Variables.Var Table.G
  var I; // EjsS Model.Variables.Var Table.I
  var K; // EjsS Model.Variables.Var Table.K
  var N; // EjsS Model.Variables.Var Table.N
  var iniTotalEnergy; // EjsS Model.Variables.Var Table.iniTotalEnergy
  var fC; // EjsS Model.Variables.Var Table.fC
  var fE; // EjsS Model.Variables.Var Table.fE
  var fG; // EjsS Model.Variables.Var Table.fG
  var fI; // EjsS Model.Variables.Var Table.fI
  var fK; // EjsS Model.Variables.Var Table.fK
  var fN; // EjsS Model.Variables.Var Table.fN
  var finTotalEnergy; // EjsS Model.Variables.Var Table.finTotalEnergy
  var updateTransIN; // EjsS Model.Variables.Var Table.updateTransIN
  var transIN; // EjsS Model.Variables.Var Table.transIN
  var updateTransOUT; // EjsS Model.Variables.Var Table.updateTransOUT
  var transOUT; // EjsS Model.Variables.Var Table.transOUT
  var EtransIN; // EjsS Model.Variables.Var Table.EtransIN
  var EtransOUT; // EjsS Model.Variables.Var Table.EtransOUT
  var transIN2; // EjsS Model.Variables.Var Table.transIN2
  var transOUT2; // EjsS Model.Variables.Var Table.transOUT2
  var updateTransIN2; // EjsS Model.Variables.Var Table.updateTransIN2
  var updateTransOUT2; // EjsS Model.Variables.Var Table.updateTransOUT2
  var EtransIN2; // EjsS Model.Variables.Var Table.EtransIN2
  var EtransOUT2; // EjsS Model.Variables.Var Table.EtransOUT2

  var energyXpos; // EjsS Model.Variables.draw_L.energyXpos
  var interactPrompt1; // EjsS Model.Variables.draw_L.interactPrompt1
  var interactPrompt2; // EjsS Model.Variables.draw_L.interactPrompt2
  var show3D; // EjsS Model.Variables.draw_L.show3D
  var show2D; // EjsS Model.Variables.draw_L.show2D
  var size2DX; // EjsS Model.Variables.draw_L.size2DX
  var size2DY; // EjsS Model.Variables.draw_L.size2DY
  var size3DX; // EjsS Model.Variables.draw_L.size3DX
  var size3DY; // EjsS Model.Variables.draw_L.size3DY
  var energyColour; // EjsS Model.Variables.draw_L.energyColour
  var promptLineColour; // EjsS Model.Variables.draw_L.promptLineColour

  var pi; // EjsS Model.Variables.draw_O.pi
  var imgIN; // EjsS Model.Variables.draw_O.imgIN
  var imgOUT; // EjsS Model.Variables.draw_O.imgOUT
  var imgIN2; // EjsS Model.Variables.draw_O.imgIN2
  var imgOUT2; // EjsS Model.Variables.draw_O.imgOUT2
  var imgSIZE; // EjsS Model.Variables.draw_O.imgSIZE
  var imgIconSIZE; // EjsS Model.Variables.draw_O.imgIconSIZE
  var energyWidth; // EjsS Model.Variables.draw_O.energyWidth
  var updateAnswer; // EjsS Model.Variables.draw_O.updateAnswer
  var answer; // EjsS Model.Variables.draw_O.answer
  var answerY; // EjsS Model.Variables.draw_O.answerY
  var answerColour; // EjsS Model.Variables.draw_O.answerColour
  var showAnswer; // EjsS Model.Variables.draw_O.showAnswer
  var showHint; // EjsS Model.Variables.draw_O.showHint
  var hintY; // EjsS Model.Variables.draw_O.hintY
  var hint; // EjsS Model.Variables.draw_O.hint
  var hintFont; // EjsS Model.Variables.draw_O.hintFont
  var INimgX; // EjsS Model.Variables.draw_O.INimgX
  var INimgY; // EjsS Model.Variables.draw_O.INimgY
  var INenergyX; // EjsS Model.Variables.draw_O.INenergyX
  var INenergyY; // EjsS Model.Variables.draw_O.INenergyY
  var INtextX; // EjsS Model.Variables.draw_O.INtextX
  var INtextY; // EjsS Model.Variables.draw_O.INtextY
  var INinteract; // EjsS Model.Variables.draw_O.INinteract
  var IN2imgX; // EjsS Model.Variables.draw_O.IN2imgX
  var IN2imgY; // EjsS Model.Variables.draw_O.IN2imgY
  var IN2energyX; // EjsS Model.Variables.draw_O.IN2energyX
  var IN2energyY; // EjsS Model.Variables.draw_O.IN2energyY
  var IN2textX; // EjsS Model.Variables.draw_O.IN2textX
  var IN2textY; // EjsS Model.Variables.draw_O.IN2textY
  var IN2interact; // EjsS Model.Variables.draw_O.IN2interact
  var OUTimgX; // EjsS Model.Variables.draw_O.OUTimgX
  var OUTimgY; // EjsS Model.Variables.draw_O.OUTimgY
  var OUTenergyX; // EjsS Model.Variables.draw_O.OUTenergyX
  var OUTenergyY; // EjsS Model.Variables.draw_O.OUTenergyY
  var OUTtextX; // EjsS Model.Variables.draw_O.OUTtextX
  var OUTtextY; // EjsS Model.Variables.draw_O.OUTtextY
  var OUTinteract; // EjsS Model.Variables.draw_O.OUTinteract
  var OUT2imgX; // EjsS Model.Variables.draw_O.OUT2imgX
  var OUT2imgY; // EjsS Model.Variables.draw_O.OUT2imgY
  var OUT2energyX; // EjsS Model.Variables.draw_O.OUT2energyX
  var OUT2energyY; // EjsS Model.Variables.draw_O.OUT2energyY
  var OUT2textX; // EjsS Model.Variables.draw_O.OUT2textX
  var OUT2textY; // EjsS Model.Variables.draw_O.OUT2textY
  var OUT2interact; // EjsS Model.Variables.draw_O.OUT2interact

  var fillColorforDrag; // EjsS Model.Variables.lookang.fillColorforDrag
  var dragSizeY; // EjsS Model.Variables.lookang.dragSizeY
  var editBackgroundColor; // EjsS Model.Variables.lookang.editBackgroundColor
  var systemText; // EjsS Model.Variables.lookang.systemText
  var elementInteracted; // EjsS Model.Variables.lookang.elementInteracted
  var remarks; // EjsS Model.Variables.lookang.remarks
  var font; // EjsS Model.Variables.lookang.font
  var arrowLength; // EjsS Model.Variables.lookang.arrowLength
  var energyInArrowX; // EjsS Model.Variables.lookang.energyInArrowX
  var energyInArrowY; // EjsS Model.Variables.lookang.energyInArrowY
  var angleIN; // EjsS Model.Variables.lookang.angleIN
  var angleOUT; // EjsS Model.Variables.lookang.angleOUT
  var energyOutArrowX; // EjsS Model.Variables.lookang.energyOutArrowX
  var energyOutArrowY; // EjsS Model.Variables.lookang.energyOutArrowY
  var energyIn2ArrowX; // EjsS Model.Variables.lookang.energyIn2ArrowX
  var energyIn2ArrowY; // EjsS Model.Variables.lookang.energyIn2ArrowY
  var energyOut2ArrowX; // EjsS Model.Variables.lookang.energyOut2ArrowX
  var energyOut2ArrowY; // EjsS Model.Variables.lookang.energyOut2ArrowY
  var dragCY; // EjsS Model.Variables.lookang.dragCY
  var dragEY; // EjsS Model.Variables.lookang.dragEY
  var dragGY; // EjsS Model.Variables.lookang.dragGY
  var dragIY; // EjsS Model.Variables.lookang.dragIY
  var dragKY; // EjsS Model.Variables.lookang.dragKY
  var dragNY; // EjsS Model.Variables.lookang.dragNY
  var dragC2Y; // EjsS Model.Variables.lookang.dragC2Y
  var dragE2Y; // EjsS Model.Variables.lookang.dragE2Y
  var dragG2Y; // EjsS Model.Variables.lookang.dragG2Y
  var dragI2Y; // EjsS Model.Variables.lookang.dragI2Y
  var dragK2Y; // EjsS Model.Variables.lookang.dragK2Y
  var dragN2Y; // EjsS Model.Variables.lookang.dragN2Y
  var dragEtransIN; // EjsS Model.Variables.lookang.dragEtransIN
  var dragEtransIN2; // EjsS Model.Variables.lookang.dragEtransIN2
  var dragEtransOUT; // EjsS Model.Variables.lookang.dragEtransOUT
  var dragEtransOUT2; // EjsS Model.Variables.lookang.dragEtransOUT2
  var iniEnergiesLst; // EjsS Model.Variables.lookang.iniEnergiesLst
  var finEnergiesLst; // EjsS Model.Variables.lookang.finEnergiesLst
  var dragEnergiesLst; // EjsS Model.Variables.lookang.dragEnergiesLst
  var dragEnergies2Lst; // EjsS Model.Variables.lookang.dragEnergies2Lst

  var formulaText; // EjsS Model.Variables.description.formulaText
  var legendText; // EjsS Model.Variables.description.legendText
  var eTooltip; // EjsS Model.Variables.description.eTooltip
  var hTooltip; // EjsS Model.Variables.description.hTooltip
  var mTooltip; // EjsS Model.Variables.description.mTooltip
  var pTooltip; // EjsS Model.Variables.description.pTooltip

  _model.getOdes = function() { return []; };

  _model.removeEvents = function(){
  };

  function _serialize() { return _model.serialize(); }

  _model._userSerialize = function() {
    return {
      title : title,
      systemText2 : systemText2,
      initialState : initialState,
      initialState2 : initialState2,
      finalState : finalState,
      finalState2 : finalState2,
      remarks2 : remarks2,
      Width : Width,
      Height : Height,
      Width1 : Width1,
      Width2 : Width2,
      debuggg : debuggg,
      debugggTR : debugggTR,
      editing : editing,
      physicsonly : physicsonly,
      versions : versions,
      revealRadioButton : revealRadioButton,
      isC : isC,
      isE : isE,
      isG : isG,
      isI : isI,
      isK : isK,
      isN : isN,
      ignoreEnergyLst : ignoreEnergyLst,
      check3a : check3a,
      check3b : check3b,
      check4a : check4a,
      check4b : check4b,
      check3aEnergy : check3aEnergy,
      check3bEnergy : check3bEnergy,
      check4aEnergy : check4aEnergy,
      check4bEnergy : check4bEnergy,
      check3aReason : check3aReason,
      check3bReason : check3bReason,
      check4aReason : check4aReason,
      check4bReason : check4bReason,
      iniC : iniC,
      iniE : iniE,
      iniG : iniG,
      iniI : iniI,
      iniK : iniK,
      iniN : iniN,
      finC : finC,
      finE : finE,
      finG : finG,
      finI : finI,
      finK : finK,
      finN : finN,
      check7a : check7a,
      operators : operators,
      finalC : finalC,
      finalE : finalE,
      finalG : finalG,
      finalI : finalI,
      finalK : finalK,
      finalN : finalN,
      passfail : passfail,
      inequalityCheckLst : inequalityCheckLst,
      userPlay : userPlay,
      displayChemical : displayChemical,
      displayElastic : displayElastic,
      displayGravitational : displayGravitational,
      displayInternal : displayInternal,
      displayKinetic : displayKinetic,
      displayNuclear : displayNuclear,
      PropagationofWaves : PropagationofWaves,
      Mechanically : Mechanically,
      Electrically : Electrically,
      nEnergy : nEnergy,
      C : C,
      E : E,
      G : G,
      I : I,
      K : K,
      N : N,
      iniTotalEnergy : iniTotalEnergy,
      fC : fC,
      fE : fE,
      fG : fG,
      fI : fI,
      fK : fK,
      fN : fN,
      finTotalEnergy : finTotalEnergy,
      updateTransIN : updateTransIN,
      transIN : transIN,
      updateTransOUT : updateTransOUT,
      transOUT : transOUT,
      EtransIN : EtransIN,
      EtransOUT : EtransOUT,
      transIN2 : transIN2,
      transOUT2 : transOUT2,
      updateTransIN2 : updateTransIN2,
      updateTransOUT2 : updateTransOUT2,
      EtransIN2 : EtransIN2,
      EtransOUT2 : EtransOUT2,
      energyXpos : energyXpos,
      interactPrompt1 : interactPrompt1,
      interactPrompt2 : interactPrompt2,
      show3D : show3D,
      show2D : show2D,
      size2DX : size2DX,
      size2DY : size2DY,
      size3DX : size3DX,
      size3DY : size3DY,
      energyColour : energyColour,
      promptLineColour : promptLineColour,
      pi : pi,
      imgIN : imgIN,
      imgOUT : imgOUT,
      imgIN2 : imgIN2,
      imgOUT2 : imgOUT2,
      imgSIZE : imgSIZE,
      imgIconSIZE : imgIconSIZE,
      energyWidth : energyWidth,
      updateAnswer : updateAnswer,
      answer : answer,
      answerY : answerY,
      answerColour : answerColour,
      showAnswer : showAnswer,
      showHint : showHint,
      hintY : hintY,
      hint : hint,
      hintFont : hintFont,
      INimgX : INimgX,
      INimgY : INimgY,
      INenergyX : INenergyX,
      INenergyY : INenergyY,
      INtextX : INtextX,
      INtextY : INtextY,
      INinteract : INinteract,
      IN2imgX : IN2imgX,
      IN2imgY : IN2imgY,
      IN2energyX : IN2energyX,
      IN2energyY : IN2energyY,
      IN2textX : IN2textX,
      IN2textY : IN2textY,
      IN2interact : IN2interact,
      OUTimgX : OUTimgX,
      OUTimgY : OUTimgY,
      OUTenergyX : OUTenergyX,
      OUTenergyY : OUTenergyY,
      OUTtextX : OUTtextX,
      OUTtextY : OUTtextY,
      OUTinteract : OUTinteract,
      OUT2imgX : OUT2imgX,
      OUT2imgY : OUT2imgY,
      OUT2energyX : OUT2energyX,
      OUT2energyY : OUT2energyY,
      OUT2textX : OUT2textX,
      OUT2textY : OUT2textY,
      OUT2interact : OUT2interact,
      fillColorforDrag : fillColorforDrag,
      dragSizeY : dragSizeY,
      editBackgroundColor : editBackgroundColor,
      systemText : systemText,
      elementInteracted : elementInteracted,
      remarks : remarks,
      font : font,
      arrowLength : arrowLength,
      energyInArrowX : energyInArrowX,
      energyInArrowY : energyInArrowY,
      angleIN : angleIN,
      angleOUT : angleOUT,
      energyOutArrowX : energyOutArrowX,
      energyOutArrowY : energyOutArrowY,
      energyIn2ArrowX : energyIn2ArrowX,
      energyIn2ArrowY : energyIn2ArrowY,
      energyOut2ArrowX : energyOut2ArrowX,
      energyOut2ArrowY : energyOut2ArrowY,
      dragCY : dragCY,
      dragEY : dragEY,
      dragGY : dragGY,
      dragIY : dragIY,
      dragKY : dragKY,
      dragNY : dragNY,
      dragC2Y : dragC2Y,
      dragE2Y : dragE2Y,
      dragG2Y : dragG2Y,
      dragI2Y : dragI2Y,
      dragK2Y : dragK2Y,
      dragN2Y : dragN2Y,
      dragEtransIN : dragEtransIN,
      dragEtransIN2 : dragEtransIN2,
      dragEtransOUT : dragEtransOUT,
      dragEtransOUT2 : dragEtransOUT2,
      iniEnergiesLst : iniEnergiesLst,
      finEnergiesLst : finEnergiesLst,
      dragEnergiesLst : dragEnergiesLst,
      dragEnergies2Lst : dragEnergies2Lst,
      formulaText : formulaText,
      legendText : legendText,
      eTooltip : eTooltip,
      hTooltip : hTooltip,
      mTooltip : mTooltip,
      pTooltip : pTooltip
    };
  };

  function _serializePublic() { return _model.serializePublic(); }

  _model._userSerializePublic = function() {
    return {
      title : title,
      systemText2 : systemText2,
      initialState : initialState,
      initialState2 : initialState2,
      finalState : finalState,
      finalState2 : finalState2,
      remarks2 : remarks2,
      Width : Width,
      Height : Height,
      Width1 : Width1,
      Width2 : Width2,
      debuggg : debuggg,
      debugggTR : debugggTR,
      editing : editing,
      physicsonly : physicsonly,
      versions : versions,
      revealRadioButton : revealRadioButton,
      isC : isC,
      isE : isE,
      isG : isG,
      isI : isI,
      isK : isK,
      isN : isN,
      ignoreEnergyLst : ignoreEnergyLst,
      check3a : check3a,
      check3b : check3b,
      check4a : check4a,
      check4b : check4b,
      check3aEnergy : check3aEnergy,
      check3bEnergy : check3bEnergy,
      check4aEnergy : check4aEnergy,
      check4bEnergy : check4bEnergy,
      check3aReason : check3aReason,
      check3bReason : check3bReason,
      check4aReason : check4aReason,
      check4bReason : check4bReason,
      iniC : iniC,
      iniE : iniE,
      iniG : iniG,
      iniI : iniI,
      iniK : iniK,
      iniN : iniN,
      finC : finC,
      finE : finE,
      finG : finG,
      finI : finI,
      finK : finK,
      finN : finN,
      check7a : check7a,
      operators : operators,
      finalC : finalC,
      finalE : finalE,
      finalG : finalG,
      finalI : finalI,
      finalK : finalK,
      finalN : finalN,
      passfail : passfail,
      inequalityCheckLst : inequalityCheckLst,
      userPlay : userPlay,
      displayChemical : displayChemical,
      displayElastic : displayElastic,
      displayGravitational : displayGravitational,
      displayInternal : displayInternal,
      displayKinetic : displayKinetic,
      displayNuclear : displayNuclear,
      PropagationofWaves : PropagationofWaves,
      Mechanically : Mechanically,
      Electrically : Electrically,
      nEnergy : nEnergy,
      C : C,
      E : E,
      G : G,
      I : I,
      K : K,
      N : N,
      iniTotalEnergy : iniTotalEnergy,
      fC : fC,
      fE : fE,
      fG : fG,
      fI : fI,
      fK : fK,
      fN : fN,
      finTotalEnergy : finTotalEnergy,
      updateTransIN : updateTransIN,
      transIN : transIN,
      updateTransOUT : updateTransOUT,
      transOUT : transOUT,
      EtransIN : EtransIN,
      EtransOUT : EtransOUT,
      transIN2 : transIN2,
      transOUT2 : transOUT2,
      updateTransIN2 : updateTransIN2,
      updateTransOUT2 : updateTransOUT2,
      EtransIN2 : EtransIN2,
      EtransOUT2 : EtransOUT2,
      energyXpos : energyXpos,
      interactPrompt1 : interactPrompt1,
      interactPrompt2 : interactPrompt2,
      show3D : show3D,
      show2D : show2D,
      size2DX : size2DX,
      size2DY : size2DY,
      size3DX : size3DX,
      size3DY : size3DY,
      energyColour : energyColour,
      promptLineColour : promptLineColour,
      pi : pi,
      imgIN : imgIN,
      imgOUT : imgOUT,
      imgIN2 : imgIN2,
      imgOUT2 : imgOUT2,
      imgSIZE : imgSIZE,
      imgIconSIZE : imgIconSIZE,
      energyWidth : energyWidth,
      updateAnswer : updateAnswer,
      answer : answer,
      answerY : answerY,
      answerColour : answerColour,
      showAnswer : showAnswer,
      showHint : showHint,
      hintY : hintY,
      hint : hint,
      hintFont : hintFont,
      INimgX : INimgX,
      INimgY : INimgY,
      INenergyX : INenergyX,
      INenergyY : INenergyY,
      INtextX : INtextX,
      INtextY : INtextY,
      INinteract : INinteract,
      IN2imgX : IN2imgX,
      IN2imgY : IN2imgY,
      IN2energyX : IN2energyX,
      IN2energyY : IN2energyY,
      IN2textX : IN2textX,
      IN2textY : IN2textY,
      IN2interact : IN2interact,
      OUTimgX : OUTimgX,
      OUTimgY : OUTimgY,
      OUTenergyX : OUTenergyX,
      OUTenergyY : OUTenergyY,
      OUTtextX : OUTtextX,
      OUTtextY : OUTtextY,
      OUTinteract : OUTinteract,
      OUT2imgX : OUT2imgX,
      OUT2imgY : OUT2imgY,
      OUT2energyX : OUT2energyX,
      OUT2energyY : OUT2energyY,
      OUT2textX : OUT2textX,
      OUT2textY : OUT2textY,
      OUT2interact : OUT2interact,
      fillColorforDrag : fillColorforDrag,
      dragSizeY : dragSizeY,
      editBackgroundColor : editBackgroundColor,
      systemText : systemText,
      elementInteracted : elementInteracted,
      remarks : remarks,
      font : font,
      arrowLength : arrowLength,
      energyInArrowX : energyInArrowX,
      energyInArrowY : energyInArrowY,
      angleIN : angleIN,
      angleOUT : angleOUT,
      energyOutArrowX : energyOutArrowX,
      energyOutArrowY : energyOutArrowY,
      energyIn2ArrowX : energyIn2ArrowX,
      energyIn2ArrowY : energyIn2ArrowY,
      energyOut2ArrowX : energyOut2ArrowX,
      energyOut2ArrowY : energyOut2ArrowY,
      dragCY : dragCY,
      dragEY : dragEY,
      dragGY : dragGY,
      dragIY : dragIY,
      dragKY : dragKY,
      dragNY : dragNY,
      dragC2Y : dragC2Y,
      dragE2Y : dragE2Y,
      dragG2Y : dragG2Y,
      dragI2Y : dragI2Y,
      dragK2Y : dragK2Y,
      dragN2Y : dragN2Y,
      dragEtransIN : dragEtransIN,
      dragEtransIN2 : dragEtransIN2,
      dragEtransOUT : dragEtransOUT,
      dragEtransOUT2 : dragEtransOUT2,
      iniEnergiesLst : iniEnergiesLst,
      finEnergiesLst : finEnergiesLst,
      dragEnergiesLst : dragEnergiesLst,
      dragEnergies2Lst : dragEnergies2Lst,
      formulaText : formulaText,
      legendText : legendText,
      eTooltip : eTooltip,
      hTooltip : hTooltip,
      mTooltip : mTooltip,
      pTooltip : pTooltip
    };
  };

  _model._readParameters = function(json) {
    if(typeof json.title != "undefined") title = json.title;
    if(typeof json.systemText2 != "undefined") systemText2 = json.systemText2;
    if(typeof json.initialState != "undefined") initialState = json.initialState;
    if(typeof json.initialState2 != "undefined") initialState2 = json.initialState2;
    if(typeof json.finalState != "undefined") finalState = json.finalState;
    if(typeof json.finalState2 != "undefined") finalState2 = json.finalState2;
    if(typeof json.remarks2 != "undefined") remarks2 = json.remarks2;
    if(typeof json.Width != "undefined") Width = json.Width;
    if(typeof json.Height != "undefined") Height = json.Height;
    if(typeof json.Width1 != "undefined") Width1 = json.Width1;
    if(typeof json.Width2 != "undefined") Width2 = json.Width2;
    if(typeof json.debuggg != "undefined") debuggg = json.debuggg;
    if(typeof json.debugggTR != "undefined") debugggTR = json.debugggTR;
    if(typeof json.editing != "undefined") editing = json.editing;
    if(typeof json.physicsonly != "undefined") physicsonly = json.physicsonly;
    if(typeof json.versions != "undefined") versions = json.versions;
    if(typeof json.revealRadioButton != "undefined") revealRadioButton = json.revealRadioButton;
    if(typeof json.isC != "undefined") isC = json.isC;
    if(typeof json.isE != "undefined") isE = json.isE;
    if(typeof json.isG != "undefined") isG = json.isG;
    if(typeof json.isI != "undefined") isI = json.isI;
    if(typeof json.isK != "undefined") isK = json.isK;
    if(typeof json.isN != "undefined") isN = json.isN;
    if(typeof json.ignoreEnergyLst != "undefined") ignoreEnergyLst = json.ignoreEnergyLst;
    if(typeof json.check3a != "undefined") check3a = json.check3a;
    if(typeof json.check3b != "undefined") check3b = json.check3b;
    if(typeof json.check4a != "undefined") check4a = json.check4a;
    if(typeof json.check4b != "undefined") check4b = json.check4b;
    if(typeof json.check3aEnergy != "undefined") check3aEnergy = json.check3aEnergy;
    if(typeof json.check3bEnergy != "undefined") check3bEnergy = json.check3bEnergy;
    if(typeof json.check4aEnergy != "undefined") check4aEnergy = json.check4aEnergy;
    if(typeof json.check4bEnergy != "undefined") check4bEnergy = json.check4bEnergy;
    if(typeof json.check3aReason != "undefined") check3aReason = json.check3aReason;
    if(typeof json.check3bReason != "undefined") check3bReason = json.check3bReason;
    if(typeof json.check4aReason != "undefined") check4aReason = json.check4aReason;
    if(typeof json.check4bReason != "undefined") check4bReason = json.check4bReason;
    if(typeof json.iniC != "undefined") iniC = json.iniC;
    if(typeof json.iniE != "undefined") iniE = json.iniE;
    if(typeof json.iniG != "undefined") iniG = json.iniG;
    if(typeof json.iniI != "undefined") iniI = json.iniI;
    if(typeof json.iniK != "undefined") iniK = json.iniK;
    if(typeof json.iniN != "undefined") iniN = json.iniN;
    if(typeof json.finC != "undefined") finC = json.finC;
    if(typeof json.finE != "undefined") finE = json.finE;
    if(typeof json.finG != "undefined") finG = json.finG;
    if(typeof json.finI != "undefined") finI = json.finI;
    if(typeof json.finK != "undefined") finK = json.finK;
    if(typeof json.finN != "undefined") finN = json.finN;
    if(typeof json.check7a != "undefined") check7a = json.check7a;
    if(typeof json.operators != "undefined") operators = json.operators;
    if(typeof json.finalC != "undefined") finalC = json.finalC;
    if(typeof json.finalE != "undefined") finalE = json.finalE;
    if(typeof json.finalG != "undefined") finalG = json.finalG;
    if(typeof json.finalI != "undefined") finalI = json.finalI;
    if(typeof json.finalK != "undefined") finalK = json.finalK;
    if(typeof json.finalN != "undefined") finalN = json.finalN;
    if(typeof json.passfail != "undefined") passfail = json.passfail;
    if(typeof json.inequalityCheckLst != "undefined") inequalityCheckLst = json.inequalityCheckLst;
    if(typeof json.userPlay != "undefined") userPlay = json.userPlay;
    if(typeof json.displayChemical != "undefined") displayChemical = json.displayChemical;
    if(typeof json.displayElastic != "undefined") displayElastic = json.displayElastic;
    if(typeof json.displayGravitational != "undefined") displayGravitational = json.displayGravitational;
    if(typeof json.displayInternal != "undefined") displayInternal = json.displayInternal;
    if(typeof json.displayKinetic != "undefined") displayKinetic = json.displayKinetic;
    if(typeof json.displayNuclear != "undefined") displayNuclear = json.displayNuclear;
    if(typeof json.PropagationofWaves != "undefined") PropagationofWaves = json.PropagationofWaves;
    if(typeof json.Mechanically != "undefined") Mechanically = json.Mechanically;
    if(typeof json.Electrically != "undefined") Electrically = json.Electrically;
    if(typeof json.nEnergy != "undefined") nEnergy = json.nEnergy;
    if(typeof json.C != "undefined") C = json.C;
    if(typeof json.E != "undefined") E = json.E;
    if(typeof json.G != "undefined") G = json.G;
    if(typeof json.I != "undefined") I = json.I;
    if(typeof json.K != "undefined") K = json.K;
    if(typeof json.N != "undefined") N = json.N;
    if(typeof json.iniTotalEnergy != "undefined") iniTotalEnergy = json.iniTotalEnergy;
    if(typeof json.fC != "undefined") fC = json.fC;
    if(typeof json.fE != "undefined") fE = json.fE;
    if(typeof json.fG != "undefined") fG = json.fG;
    if(typeof json.fI != "undefined") fI = json.fI;
    if(typeof json.fK != "undefined") fK = json.fK;
    if(typeof json.fN != "undefined") fN = json.fN;
    if(typeof json.finTotalEnergy != "undefined") finTotalEnergy = json.finTotalEnergy;
    if(typeof json.updateTransIN != "undefined") updateTransIN = json.updateTransIN;
    if(typeof json.transIN != "undefined") transIN = json.transIN;
    if(typeof json.updateTransOUT != "undefined") updateTransOUT = json.updateTransOUT;
    if(typeof json.transOUT != "undefined") transOUT = json.transOUT;
    if(typeof json.EtransIN != "undefined") EtransIN = json.EtransIN;
    if(typeof json.EtransOUT != "undefined") EtransOUT = json.EtransOUT;
    if(typeof json.transIN2 != "undefined") transIN2 = json.transIN2;
    if(typeof json.transOUT2 != "undefined") transOUT2 = json.transOUT2;
    if(typeof json.updateTransIN2 != "undefined") updateTransIN2 = json.updateTransIN2;
    if(typeof json.updateTransOUT2 != "undefined") updateTransOUT2 = json.updateTransOUT2;
    if(typeof json.EtransIN2 != "undefined") EtransIN2 = json.EtransIN2;
    if(typeof json.EtransOUT2 != "undefined") EtransOUT2 = json.EtransOUT2;
    if(typeof json.energyXpos != "undefined") energyXpos = json.energyXpos;
    if(typeof json.interactPrompt1 != "undefined") interactPrompt1 = json.interactPrompt1;
    if(typeof json.interactPrompt2 != "undefined") interactPrompt2 = json.interactPrompt2;
    if(typeof json.show3D != "undefined") show3D = json.show3D;
    if(typeof json.show2D != "undefined") show2D = json.show2D;
    if(typeof json.size2DX != "undefined") size2DX = json.size2DX;
    if(typeof json.size2DY != "undefined") size2DY = json.size2DY;
    if(typeof json.size3DX != "undefined") size3DX = json.size3DX;
    if(typeof json.size3DY != "undefined") size3DY = json.size3DY;
    if(typeof json.energyColour != "undefined") energyColour = json.energyColour;
    if(typeof json.promptLineColour != "undefined") promptLineColour = json.promptLineColour;
    if(typeof json.pi != "undefined") pi = json.pi;
    if(typeof json.imgIN != "undefined") imgIN = json.imgIN;
    if(typeof json.imgOUT != "undefined") imgOUT = json.imgOUT;
    if(typeof json.imgIN2 != "undefined") imgIN2 = json.imgIN2;
    if(typeof json.imgOUT2 != "undefined") imgOUT2 = json.imgOUT2;
    if(typeof json.imgSIZE != "undefined") imgSIZE = json.imgSIZE;
    if(typeof json.imgIconSIZE != "undefined") imgIconSIZE = json.imgIconSIZE;
    if(typeof json.energyWidth != "undefined") energyWidth = json.energyWidth;
    if(typeof json.updateAnswer != "undefined") updateAnswer = json.updateAnswer;
    if(typeof json.answer != "undefined") answer = json.answer;
    if(typeof json.answerY != "undefined") answerY = json.answerY;
    if(typeof json.answerColour != "undefined") answerColour = json.answerColour;
    if(typeof json.showAnswer != "undefined") showAnswer = json.showAnswer;
    if(typeof json.showHint != "undefined") showHint = json.showHint;
    if(typeof json.hintY != "undefined") hintY = json.hintY;
    if(typeof json.hint != "undefined") hint = json.hint;
    if(typeof json.hintFont != "undefined") hintFont = json.hintFont;
    if(typeof json.INimgX != "undefined") INimgX = json.INimgX;
    if(typeof json.INimgY != "undefined") INimgY = json.INimgY;
    if(typeof json.INenergyX != "undefined") INenergyX = json.INenergyX;
    if(typeof json.INenergyY != "undefined") INenergyY = json.INenergyY;
    if(typeof json.INtextX != "undefined") INtextX = json.INtextX;
    if(typeof json.INtextY != "undefined") INtextY = json.INtextY;
    if(typeof json.INinteract != "undefined") INinteract = json.INinteract;
    if(typeof json.IN2imgX != "undefined") IN2imgX = json.IN2imgX;
    if(typeof json.IN2imgY != "undefined") IN2imgY = json.IN2imgY;
    if(typeof json.IN2energyX != "undefined") IN2energyX = json.IN2energyX;
    if(typeof json.IN2energyY != "undefined") IN2energyY = json.IN2energyY;
    if(typeof json.IN2textX != "undefined") IN2textX = json.IN2textX;
    if(typeof json.IN2textY != "undefined") IN2textY = json.IN2textY;
    if(typeof json.IN2interact != "undefined") IN2interact = json.IN2interact;
    if(typeof json.OUTimgX != "undefined") OUTimgX = json.OUTimgX;
    if(typeof json.OUTimgY != "undefined") OUTimgY = json.OUTimgY;
    if(typeof json.OUTenergyX != "undefined") OUTenergyX = json.OUTenergyX;
    if(typeof json.OUTenergyY != "undefined") OUTenergyY = json.OUTenergyY;
    if(typeof json.OUTtextX != "undefined") OUTtextX = json.OUTtextX;
    if(typeof json.OUTtextY != "undefined") OUTtextY = json.OUTtextY;
    if(typeof json.OUTinteract != "undefined") OUTinteract = json.OUTinteract;
    if(typeof json.OUT2imgX != "undefined") OUT2imgX = json.OUT2imgX;
    if(typeof json.OUT2imgY != "undefined") OUT2imgY = json.OUT2imgY;
    if(typeof json.OUT2energyX != "undefined") OUT2energyX = json.OUT2energyX;
    if(typeof json.OUT2energyY != "undefined") OUT2energyY = json.OUT2energyY;
    if(typeof json.OUT2textX != "undefined") OUT2textX = json.OUT2textX;
    if(typeof json.OUT2textY != "undefined") OUT2textY = json.OUT2textY;
    if(typeof json.OUT2interact != "undefined") OUT2interact = json.OUT2interact;
    if(typeof json.fillColorforDrag != "undefined") fillColorforDrag = json.fillColorforDrag;
    if(typeof json.dragSizeY != "undefined") dragSizeY = json.dragSizeY;
    if(typeof json.editBackgroundColor != "undefined") editBackgroundColor = json.editBackgroundColor;
    if(typeof json.systemText != "undefined") systemText = json.systemText;
    if(typeof json.elementInteracted != "undefined") elementInteracted = json.elementInteracted;
    if(typeof json.remarks != "undefined") remarks = json.remarks;
    if(typeof json.font != "undefined") font = json.font;
    if(typeof json.arrowLength != "undefined") arrowLength = json.arrowLength;
    if(typeof json.energyInArrowX != "undefined") energyInArrowX = json.energyInArrowX;
    if(typeof json.energyInArrowY != "undefined") energyInArrowY = json.energyInArrowY;
    if(typeof json.angleIN != "undefined") angleIN = json.angleIN;
    if(typeof json.angleOUT != "undefined") angleOUT = json.angleOUT;
    if(typeof json.energyOutArrowX != "undefined") energyOutArrowX = json.energyOutArrowX;
    if(typeof json.energyOutArrowY != "undefined") energyOutArrowY = json.energyOutArrowY;
    if(typeof json.energyIn2ArrowX != "undefined") energyIn2ArrowX = json.energyIn2ArrowX;
    if(typeof json.energyIn2ArrowY != "undefined") energyIn2ArrowY = json.energyIn2ArrowY;
    if(typeof json.energyOut2ArrowX != "undefined") energyOut2ArrowX = json.energyOut2ArrowX;
    if(typeof json.energyOut2ArrowY != "undefined") energyOut2ArrowY = json.energyOut2ArrowY;
    if(typeof json.dragCY != "undefined") dragCY = json.dragCY;
    if(typeof json.dragEY != "undefined") dragEY = json.dragEY;
    if(typeof json.dragGY != "undefined") dragGY = json.dragGY;
    if(typeof json.dragIY != "undefined") dragIY = json.dragIY;
    if(typeof json.dragKY != "undefined") dragKY = json.dragKY;
    if(typeof json.dragNY != "undefined") dragNY = json.dragNY;
    if(typeof json.dragC2Y != "undefined") dragC2Y = json.dragC2Y;
    if(typeof json.dragE2Y != "undefined") dragE2Y = json.dragE2Y;
    if(typeof json.dragG2Y != "undefined") dragG2Y = json.dragG2Y;
    if(typeof json.dragI2Y != "undefined") dragI2Y = json.dragI2Y;
    if(typeof json.dragK2Y != "undefined") dragK2Y = json.dragK2Y;
    if(typeof json.dragN2Y != "undefined") dragN2Y = json.dragN2Y;
    if(typeof json.dragEtransIN != "undefined") dragEtransIN = json.dragEtransIN;
    if(typeof json.dragEtransIN2 != "undefined") dragEtransIN2 = json.dragEtransIN2;
    if(typeof json.dragEtransOUT != "undefined") dragEtransOUT = json.dragEtransOUT;
    if(typeof json.dragEtransOUT2 != "undefined") dragEtransOUT2 = json.dragEtransOUT2;
    if(typeof json.iniEnergiesLst != "undefined") iniEnergiesLst = json.iniEnergiesLst;
    if(typeof json.finEnergiesLst != "undefined") finEnergiesLst = json.finEnergiesLst;
    if(typeof json.dragEnergiesLst != "undefined") dragEnergiesLst = json.dragEnergiesLst;
    if(typeof json.dragEnergies2Lst != "undefined") dragEnergies2Lst = json.dragEnergies2Lst;
    if(typeof json.formulaText != "undefined") formulaText = json.formulaText;
    if(typeof json.legendText != "undefined") legendText = json.legendText;
    if(typeof json.eTooltip != "undefined") eTooltip = json.eTooltip;
    if(typeof json.hTooltip != "undefined") hTooltip = json.hTooltip;
    if(typeof json.mTooltip != "undefined") mTooltip = json.mTooltip;
    if(typeof json.pTooltip != "undefined") pTooltip = json.pTooltip;
  };

  _model._readParametersPublic = function(json) {
    if(typeof json.title != "undefined") title = json.title;
    if(typeof json.systemText2 != "undefined") systemText2 = json.systemText2;
    if(typeof json.initialState != "undefined") initialState = json.initialState;
    if(typeof json.initialState2 != "undefined") initialState2 = json.initialState2;
    if(typeof json.finalState != "undefined") finalState = json.finalState;
    if(typeof json.finalState2 != "undefined") finalState2 = json.finalState2;
    if(typeof json.remarks2 != "undefined") remarks2 = json.remarks2;
    if(typeof json.Width != "undefined") Width = json.Width;
    if(typeof json.Height != "undefined") Height = json.Height;
    if(typeof json.Width1 != "undefined") Width1 = json.Width1;
    if(typeof json.Width2 != "undefined") Width2 = json.Width2;
    if(typeof json.debuggg != "undefined") debuggg = json.debuggg;
    if(typeof json.debugggTR != "undefined") debugggTR = json.debugggTR;
    if(typeof json.editing != "undefined") editing = json.editing;
    if(typeof json.physicsonly != "undefined") physicsonly = json.physicsonly;
    if(typeof json.versions != "undefined") versions = json.versions;
    if(typeof json.revealRadioButton != "undefined") revealRadioButton = json.revealRadioButton;
    if(typeof json.isC != "undefined") isC = json.isC;
    if(typeof json.isE != "undefined") isE = json.isE;
    if(typeof json.isG != "undefined") isG = json.isG;
    if(typeof json.isI != "undefined") isI = json.isI;
    if(typeof json.isK != "undefined") isK = json.isK;
    if(typeof json.isN != "undefined") isN = json.isN;
    if(typeof json.ignoreEnergyLst != "undefined") ignoreEnergyLst = json.ignoreEnergyLst;
    if(typeof json.check3a != "undefined") check3a = json.check3a;
    if(typeof json.check3b != "undefined") check3b = json.check3b;
    if(typeof json.check4a != "undefined") check4a = json.check4a;
    if(typeof json.check4b != "undefined") check4b = json.check4b;
    if(typeof json.check3aEnergy != "undefined") check3aEnergy = json.check3aEnergy;
    if(typeof json.check3bEnergy != "undefined") check3bEnergy = json.check3bEnergy;
    if(typeof json.check4aEnergy != "undefined") check4aEnergy = json.check4aEnergy;
    if(typeof json.check4bEnergy != "undefined") check4bEnergy = json.check4bEnergy;
    if(typeof json.check3aReason != "undefined") check3aReason = json.check3aReason;
    if(typeof json.check3bReason != "undefined") check3bReason = json.check3bReason;
    if(typeof json.check4aReason != "undefined") check4aReason = json.check4aReason;
    if(typeof json.check4bReason != "undefined") check4bReason = json.check4bReason;
    if(typeof json.iniC != "undefined") iniC = json.iniC;
    if(typeof json.iniE != "undefined") iniE = json.iniE;
    if(typeof json.iniG != "undefined") iniG = json.iniG;
    if(typeof json.iniI != "undefined") iniI = json.iniI;
    if(typeof json.iniK != "undefined") iniK = json.iniK;
    if(typeof json.iniN != "undefined") iniN = json.iniN;
    if(typeof json.finC != "undefined") finC = json.finC;
    if(typeof json.finE != "undefined") finE = json.finE;
    if(typeof json.finG != "undefined") finG = json.finG;
    if(typeof json.finI != "undefined") finI = json.finI;
    if(typeof json.finK != "undefined") finK = json.finK;
    if(typeof json.finN != "undefined") finN = json.finN;
    if(typeof json.check7a != "undefined") check7a = json.check7a;
    if(typeof json.operators != "undefined") operators = json.operators;
    if(typeof json.finalC != "undefined") finalC = json.finalC;
    if(typeof json.finalE != "undefined") finalE = json.finalE;
    if(typeof json.finalG != "undefined") finalG = json.finalG;
    if(typeof json.finalI != "undefined") finalI = json.finalI;
    if(typeof json.finalK != "undefined") finalK = json.finalK;
    if(typeof json.finalN != "undefined") finalN = json.finalN;
    if(typeof json.passfail != "undefined") passfail = json.passfail;
    if(typeof json.inequalityCheckLst != "undefined") inequalityCheckLst = json.inequalityCheckLst;
    if(typeof json.userPlay != "undefined") userPlay = json.userPlay;
    if(typeof json.displayChemical != "undefined") displayChemical = json.displayChemical;
    if(typeof json.displayElastic != "undefined") displayElastic = json.displayElastic;
    if(typeof json.displayGravitational != "undefined") displayGravitational = json.displayGravitational;
    if(typeof json.displayInternal != "undefined") displayInternal = json.displayInternal;
    if(typeof json.displayKinetic != "undefined") displayKinetic = json.displayKinetic;
    if(typeof json.displayNuclear != "undefined") displayNuclear = json.displayNuclear;
    if(typeof json.PropagationofWaves != "undefined") PropagationofWaves = json.PropagationofWaves;
    if(typeof json.Mechanically != "undefined") Mechanically = json.Mechanically;
    if(typeof json.Electrically != "undefined") Electrically = json.Electrically;
    if(typeof json.nEnergy != "undefined") nEnergy = json.nEnergy;
    if(typeof json.C != "undefined") C = json.C;
    if(typeof json.E != "undefined") E = json.E;
    if(typeof json.G != "undefined") G = json.G;
    if(typeof json.I != "undefined") I = json.I;
    if(typeof json.K != "undefined") K = json.K;
    if(typeof json.N != "undefined") N = json.N;
    if(typeof json.iniTotalEnergy != "undefined") iniTotalEnergy = json.iniTotalEnergy;
    if(typeof json.fC != "undefined") fC = json.fC;
    if(typeof json.fE != "undefined") fE = json.fE;
    if(typeof json.fG != "undefined") fG = json.fG;
    if(typeof json.fI != "undefined") fI = json.fI;
    if(typeof json.fK != "undefined") fK = json.fK;
    if(typeof json.fN != "undefined") fN = json.fN;
    if(typeof json.finTotalEnergy != "undefined") finTotalEnergy = json.finTotalEnergy;
    if(typeof json.updateTransIN != "undefined") updateTransIN = json.updateTransIN;
    if(typeof json.transIN != "undefined") transIN = json.transIN;
    if(typeof json.updateTransOUT != "undefined") updateTransOUT = json.updateTransOUT;
    if(typeof json.transOUT != "undefined") transOUT = json.transOUT;
    if(typeof json.EtransIN != "undefined") EtransIN = json.EtransIN;
    if(typeof json.EtransOUT != "undefined") EtransOUT = json.EtransOUT;
    if(typeof json.transIN2 != "undefined") transIN2 = json.transIN2;
    if(typeof json.transOUT2 != "undefined") transOUT2 = json.transOUT2;
    if(typeof json.updateTransIN2 != "undefined") updateTransIN2 = json.updateTransIN2;
    if(typeof json.updateTransOUT2 != "undefined") updateTransOUT2 = json.updateTransOUT2;
    if(typeof json.EtransIN2 != "undefined") EtransIN2 = json.EtransIN2;
    if(typeof json.EtransOUT2 != "undefined") EtransOUT2 = json.EtransOUT2;
    if(typeof json.energyXpos != "undefined") energyXpos = json.energyXpos;
    if(typeof json.interactPrompt1 != "undefined") interactPrompt1 = json.interactPrompt1;
    if(typeof json.interactPrompt2 != "undefined") interactPrompt2 = json.interactPrompt2;
    if(typeof json.show3D != "undefined") show3D = json.show3D;
    if(typeof json.show2D != "undefined") show2D = json.show2D;
    if(typeof json.size2DX != "undefined") size2DX = json.size2DX;
    if(typeof json.size2DY != "undefined") size2DY = json.size2DY;
    if(typeof json.size3DX != "undefined") size3DX = json.size3DX;
    if(typeof json.size3DY != "undefined") size3DY = json.size3DY;
    if(typeof json.energyColour != "undefined") energyColour = json.energyColour;
    if(typeof json.promptLineColour != "undefined") promptLineColour = json.promptLineColour;
    if(typeof json.pi != "undefined") pi = json.pi;
    if(typeof json.imgIN != "undefined") imgIN = json.imgIN;
    if(typeof json.imgOUT != "undefined") imgOUT = json.imgOUT;
    if(typeof json.imgIN2 != "undefined") imgIN2 = json.imgIN2;
    if(typeof json.imgOUT2 != "undefined") imgOUT2 = json.imgOUT2;
    if(typeof json.imgSIZE != "undefined") imgSIZE = json.imgSIZE;
    if(typeof json.imgIconSIZE != "undefined") imgIconSIZE = json.imgIconSIZE;
    if(typeof json.energyWidth != "undefined") energyWidth = json.energyWidth;
    if(typeof json.updateAnswer != "undefined") updateAnswer = json.updateAnswer;
    if(typeof json.answer != "undefined") answer = json.answer;
    if(typeof json.answerY != "undefined") answerY = json.answerY;
    if(typeof json.answerColour != "undefined") answerColour = json.answerColour;
    if(typeof json.showAnswer != "undefined") showAnswer = json.showAnswer;
    if(typeof json.showHint != "undefined") showHint = json.showHint;
    if(typeof json.hintY != "undefined") hintY = json.hintY;
    if(typeof json.hint != "undefined") hint = json.hint;
    if(typeof json.hintFont != "undefined") hintFont = json.hintFont;
    if(typeof json.INimgX != "undefined") INimgX = json.INimgX;
    if(typeof json.INimgY != "undefined") INimgY = json.INimgY;
    if(typeof json.INenergyX != "undefined") INenergyX = json.INenergyX;
    if(typeof json.INenergyY != "undefined") INenergyY = json.INenergyY;
    if(typeof json.INtextX != "undefined") INtextX = json.INtextX;
    if(typeof json.INtextY != "undefined") INtextY = json.INtextY;
    if(typeof json.INinteract != "undefined") INinteract = json.INinteract;
    if(typeof json.IN2imgX != "undefined") IN2imgX = json.IN2imgX;
    if(typeof json.IN2imgY != "undefined") IN2imgY = json.IN2imgY;
    if(typeof json.IN2energyX != "undefined") IN2energyX = json.IN2energyX;
    if(typeof json.IN2energyY != "undefined") IN2energyY = json.IN2energyY;
    if(typeof json.IN2textX != "undefined") IN2textX = json.IN2textX;
    if(typeof json.IN2textY != "undefined") IN2textY = json.IN2textY;
    if(typeof json.IN2interact != "undefined") IN2interact = json.IN2interact;
    if(typeof json.OUTimgX != "undefined") OUTimgX = json.OUTimgX;
    if(typeof json.OUTimgY != "undefined") OUTimgY = json.OUTimgY;
    if(typeof json.OUTenergyX != "undefined") OUTenergyX = json.OUTenergyX;
    if(typeof json.OUTenergyY != "undefined") OUTenergyY = json.OUTenergyY;
    if(typeof json.OUTtextX != "undefined") OUTtextX = json.OUTtextX;
    if(typeof json.OUTtextY != "undefined") OUTtextY = json.OUTtextY;
    if(typeof json.OUTinteract != "undefined") OUTinteract = json.OUTinteract;
    if(typeof json.OUT2imgX != "undefined") OUT2imgX = json.OUT2imgX;
    if(typeof json.OUT2imgY != "undefined") OUT2imgY = json.OUT2imgY;
    if(typeof json.OUT2energyX != "undefined") OUT2energyX = json.OUT2energyX;
    if(typeof json.OUT2energyY != "undefined") OUT2energyY = json.OUT2energyY;
    if(typeof json.OUT2textX != "undefined") OUT2textX = json.OUT2textX;
    if(typeof json.OUT2textY != "undefined") OUT2textY = json.OUT2textY;
    if(typeof json.OUT2interact != "undefined") OUT2interact = json.OUT2interact;
    if(typeof json.fillColorforDrag != "undefined") fillColorforDrag = json.fillColorforDrag;
    if(typeof json.dragSizeY != "undefined") dragSizeY = json.dragSizeY;
    if(typeof json.editBackgroundColor != "undefined") editBackgroundColor = json.editBackgroundColor;
    if(typeof json.systemText != "undefined") systemText = json.systemText;
    if(typeof json.elementInteracted != "undefined") elementInteracted = json.elementInteracted;
    if(typeof json.remarks != "undefined") remarks = json.remarks;
    if(typeof json.font != "undefined") font = json.font;
    if(typeof json.arrowLength != "undefined") arrowLength = json.arrowLength;
    if(typeof json.energyInArrowX != "undefined") energyInArrowX = json.energyInArrowX;
    if(typeof json.energyInArrowY != "undefined") energyInArrowY = json.energyInArrowY;
    if(typeof json.angleIN != "undefined") angleIN = json.angleIN;
    if(typeof json.angleOUT != "undefined") angleOUT = json.angleOUT;
    if(typeof json.energyOutArrowX != "undefined") energyOutArrowX = json.energyOutArrowX;
    if(typeof json.energyOutArrowY != "undefined") energyOutArrowY = json.energyOutArrowY;
    if(typeof json.energyIn2ArrowX != "undefined") energyIn2ArrowX = json.energyIn2ArrowX;
    if(typeof json.energyIn2ArrowY != "undefined") energyIn2ArrowY = json.energyIn2ArrowY;
    if(typeof json.energyOut2ArrowX != "undefined") energyOut2ArrowX = json.energyOut2ArrowX;
    if(typeof json.energyOut2ArrowY != "undefined") energyOut2ArrowY = json.energyOut2ArrowY;
    if(typeof json.dragCY != "undefined") dragCY = json.dragCY;
    if(typeof json.dragEY != "undefined") dragEY = json.dragEY;
    if(typeof json.dragGY != "undefined") dragGY = json.dragGY;
    if(typeof json.dragIY != "undefined") dragIY = json.dragIY;
    if(typeof json.dragKY != "undefined") dragKY = json.dragKY;
    if(typeof json.dragNY != "undefined") dragNY = json.dragNY;
    if(typeof json.dragC2Y != "undefined") dragC2Y = json.dragC2Y;
    if(typeof json.dragE2Y != "undefined") dragE2Y = json.dragE2Y;
    if(typeof json.dragG2Y != "undefined") dragG2Y = json.dragG2Y;
    if(typeof json.dragI2Y != "undefined") dragI2Y = json.dragI2Y;
    if(typeof json.dragK2Y != "undefined") dragK2Y = json.dragK2Y;
    if(typeof json.dragN2Y != "undefined") dragN2Y = json.dragN2Y;
    if(typeof json.dragEtransIN != "undefined") dragEtransIN = json.dragEtransIN;
    if(typeof json.dragEtransIN2 != "undefined") dragEtransIN2 = json.dragEtransIN2;
    if(typeof json.dragEtransOUT != "undefined") dragEtransOUT = json.dragEtransOUT;
    if(typeof json.dragEtransOUT2 != "undefined") dragEtransOUT2 = json.dragEtransOUT2;
    if(typeof json.iniEnergiesLst != "undefined") iniEnergiesLst = json.iniEnergiesLst;
    if(typeof json.finEnergiesLst != "undefined") finEnergiesLst = json.finEnergiesLst;
    if(typeof json.dragEnergiesLst != "undefined") dragEnergiesLst = json.dragEnergiesLst;
    if(typeof json.dragEnergies2Lst != "undefined") dragEnergies2Lst = json.dragEnergies2Lst;
    if(typeof json.formulaText != "undefined") formulaText = json.formulaText;
    if(typeof json.legendText != "undefined") legendText = json.legendText;
    if(typeof json.eTooltip != "undefined") eTooltip = json.eTooltip;
    if(typeof json.hTooltip != "undefined") hTooltip = json.hTooltip;
    if(typeof json.mTooltip != "undefined") mTooltip = json.mTooltip;
    if(typeof json.pTooltip != "undefined") pTooltip = json.pTooltip;
  };

  function _unserializePublic(json) { return _model.unserializePublic(json); }

  _model._userUnserializePublic = function(json) {
    _model._readParametersPublic(json);
   _resetSolvers();
   _model.update();
  };

  function _unserialize(json) { return _model.unserialize(json); }

  _model._userUnserialize = function(json) {
    _model._readParameters(json);
   _resetSolvers();
   _model.update();
  };

  _model.addToReset(function() {
    __pagesEnabled["initial"] = true;
    __pagesEnabled["userPlay"] = true;
    __pagesEnabled["import"] = true;
    __pagesEnabled["scaleWrestrictions_INITIAL"] = true;
    __pagesEnabled["scaleWrestrictions_FINAL"] = true;
    __pagesEnabled["answer"] = true;
    __pagesEnabled["EnableToDebug"] = false;
  });

  _model.addToReset(function() {
    title = "<b>Scenario 1</b>: A Moving Toy Car"; // EjsS Model.Variables.toEdit.title
    systemText2 = "Toy car"; // EjsS Model.Variables.toEdit.systemText2
    initialState = "<b>Initial State:</b> "; // EjsS Model.Variables.toEdit.initialState
    initialState2 = "A toy car was moving at constant speed along a smooth horizontal surface."; // EjsS Model.Variables.toEdit.initialState2
    finalState = "<b>Final State: </b>"; // EjsS Model.Variables.toEdit.finalState
    finalState2 = "The toy car moved at a higher constant speed after a child pushed it."; // EjsS Model.Variables.toEdit.finalState2
    remarks2 = "Nil"; // EjsS Model.Variables.toEdit.remarks2
  });

  _model.addToReset(function() {
    Width = (_isEPub)?"400":"100%"; // EjsS Model.Variables.layout.Width
    Height = (_isEPub)?"500":"100%"; // EjsS Model.Variables.layout.Height
    Width1 = "100%"; // EjsS Model.Variables.layout.Width1
    Width2 = "50%"; // EjsS Model.Variables.layout.Width2
    debuggg = ""; // EjsS Model.Variables.layout.debuggg
    debugggTR = ""; // EjsS Model.Variables.layout.debugggTR
  });

  _model.addToReset(function() {
    editing = false; // EjsS Model.Variables.settings.editing
    physicsonly = true; // EjsS Model.Variables.settings.physicsonly
    versions = editing?["Blank Version","Scenario 1","---To Add On---"]:["User Set"]; // EjsS Model.Variables.settings.versions
    revealRadioButton = true; // EjsS Model.Variables.settings.revealRadioButton
    isC = false; // EjsS Model.Variables.settings.isC
    isE = false; // EjsS Model.Variables.settings.isE
    isG = true; // EjsS Model.Variables.settings.isG
    isI = false; // EjsS Model.Variables.settings.isI
    isK = false; // EjsS Model.Variables.settings.isK
    isN = false; // EjsS Model.Variables.settings.isN
    ignoreEnergyLst = [2]; // EjsS Model.Variables.settings.ignoreEnergyLst
    check3a = true; // EjsS Model.Variables.settings.check3a
    check3b = false; // EjsS Model.Variables.settings.check3b
    check4a = false; // EjsS Model.Variables.settings.check4a
    check4b = false; // EjsS Model.Variables.settings.check4b
    check3aEnergy = "mechanically"; // EjsS Model.Variables.settings.check3aEnergy
    check3bEnergy = ""; // EjsS Model.Variables.settings.check3bEnergy
    check4aEnergy = ""; // EjsS Model.Variables.settings.check4aEnergy
    check4bEnergy = ""; // EjsS Model.Variables.settings.check4bEnergy
    check3aReason = "the work done by the child on the car."; // EjsS Model.Variables.settings.check3aReason
    check3bReason = ""; // EjsS Model.Variables.settings.check3bReason
    check4aReason = ""; // EjsS Model.Variables.settings.check4aReason
    check4bReason = ""; // EjsS Model.Variables.settings.check4bReason
    iniC = false; // EjsS Model.Variables.settings.iniC
    iniE = false; // EjsS Model.Variables.settings.iniE
    iniG = false; // EjsS Model.Variables.settings.iniG
    iniI = false; // EjsS Model.Variables.settings.iniI
    iniK = true; // EjsS Model.Variables.settings.iniK
    iniN = false; // EjsS Model.Variables.settings.iniN
    finC = false; // EjsS Model.Variables.settings.finC
    finE = false; // EjsS Model.Variables.settings.finE
    finG = false; // EjsS Model.Variables.settings.finG
    finI = false; // EjsS Model.Variables.settings.finI
    finK = true; // EjsS Model.Variables.settings.finK
    finN = false; // EjsS Model.Variables.settings.finN
    check7a = false; // EjsS Model.Variables.settings.check7a
    operators = ["﹥","≥","×2=","=","=2×","＜","≤"]; // EjsS Model.Variables.settings.operators
    finalC = fC; // EjsS Model.Variables.settings.finalC
    finalE = fE; // EjsS Model.Variables.settings.finalE
    finalG = fG; // EjsS Model.Variables.settings.finalG
    finalI = fI; // EjsS Model.Variables.settings.finalI
    finalK = fK; // EjsS Model.Variables.settings.finalK
    finalN = fN; // EjsS Model.Variables.settings.finalN
    passfail = []; // EjsS Model.Variables.settings.passfail
    inequalityCheckLst = []; // EjsS Model.Variables.settings.inequalityCheckLst
    displayChemical = true; // EjsS Model.Variables.settings.displayChemical
    displayElastic = true; // EjsS Model.Variables.settings.displayElastic
    displayGravitational = true; // EjsS Model.Variables.settings.displayGravitational
    displayInternal = true; // EjsS Model.Variables.settings.displayInternal
    displayKinetic = true; // EjsS Model.Variables.settings.displayKinetic
    displayNuclear = true; // EjsS Model.Variables.settings.displayNuclear
    PropagationofWaves = "Propagation of Waves"; // EjsS Model.Variables.settings.PropagationofWaves
    Mechanically = "Mechanically"; // EjsS Model.Variables.settings.Mechanically
    Electrically = "Electrically"; // EjsS Model.Variables.settings.Electrically
  });

  _model.addToReset(function() {
    nEnergy = 6; // EjsS Model.Variables.Var Table.nEnergy
    C = 0; // EjsS Model.Variables.Var Table.C
    E = 0; // EjsS Model.Variables.Var Table.E
    G = 0; // EjsS Model.Variables.Var Table.G
    I = 0; // EjsS Model.Variables.Var Table.I
    K = 0; // EjsS Model.Variables.Var Table.K
    N = 0; // EjsS Model.Variables.Var Table.N
    iniTotalEnergy = [C,E,G,I,K,N]; // EjsS Model.Variables.Var Table.iniTotalEnergy
    fC = 0; // EjsS Model.Variables.Var Table.fC
    fE = 0; // EjsS Model.Variables.Var Table.fE
    fG = 0; // EjsS Model.Variables.Var Table.fG
    fI = 0; // EjsS Model.Variables.Var Table.fI
    fK = 0; // EjsS Model.Variables.Var Table.fK
    fN = 0; // EjsS Model.Variables.Var Table.fN
    finTotalEnergy = [fC,fE,fG,fI,fK,fN]; // EjsS Model.Variables.Var Table.finTotalEnergy
    updateTransIN = 0; // EjsS Model.Variables.Var Table.updateTransIN
    transIN = ["- Tin₁ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; // EjsS Model.Variables.Var Table.transIN
    updateTransOUT = updateTransIN; // EjsS Model.Variables.Var Table.updateTransOUT
    transOUT = ["- Tout₁ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; // EjsS Model.Variables.Var Table.transOUT
    EtransIN = 0; // EjsS Model.Variables.Var Table.EtransIN
    EtransOUT = 0; // EjsS Model.Variables.Var Table.EtransOUT
    transIN2 = ["- Tin₂ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; // EjsS Model.Variables.Var Table.transIN2
    transOUT2 = ["- Tout₂ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; // EjsS Model.Variables.Var Table.transOUT2
    updateTransIN2 = 0; // EjsS Model.Variables.Var Table.updateTransIN2
    updateTransOUT2 = updateTransIN2; // EjsS Model.Variables.Var Table.updateTransOUT2
    EtransIN2 = 0; // EjsS Model.Variables.Var Table.EtransIN2
    EtransOUT2 = 0; // EjsS Model.Variables.Var Table.EtransOUT2
  });

  _model.addToReset(function() {
    energyXpos = []; // EjsS Model.Variables.draw_L.energyXpos
    interactPrompt1 = new Array(nEnergy); // EjsS Model.Variables.draw_L.interactPrompt1
    (function () {
      var _i0;
      for (_i0=0; _i0<nEnergy; _i0+=1) {  // EjsS Model.Variables.draw_L.interactPrompt1
        interactPrompt1[_i0] = false;  // EjsS Model.Variables.draw_L.interactPrompt1
      }
    }());
    interactPrompt2 = new Array(nEnergy); // EjsS Model.Variables.draw_L.interactPrompt2
    (function () {
      var _i0;
      for (_i0=0; _i0<nEnergy; _i0+=1) {  // EjsS Model.Variables.draw_L.interactPrompt2
        interactPrompt2[_i0] = false;  // EjsS Model.Variables.draw_L.interactPrompt2
      }
    }());
    show3D = false; // EjsS Model.Variables.draw_L.show3D
    show2D = true; // EjsS Model.Variables.draw_L.show2D
    size2DX = 0.85; // EjsS Model.Variables.draw_L.size2DX
    size2DY = 1; // EjsS Model.Variables.draw_L.size2DY
    size3DX = size2DX; // EjsS Model.Variables.draw_L.size3DX
    size3DY = 1.2; // EjsS Model.Variables.draw_L.size3DY
    energyColour = "rgba(0,200,255,1.0)"; // EjsS Model.Variables.draw_L.energyColour
    promptLineColour = "rgba(0,255,255,0.2)"; // EjsS Model.Variables.draw_L.promptLineColour
  });

  _model.addToReset(function() {
    pi = Math.PI; // EjsS Model.Variables.draw_O.pi
    imgIN = ["./Settings/qnmark.png","./Settings/Propagation of waves.png","./Settings/Mechanically.png","./Settings/Heating.png","./Settings/Electrically.png","./Settings/Chemically.png"]; // EjsS Model.Variables.draw_O.imgIN
    imgOUT = imgIN; // EjsS Model.Variables.draw_O.imgOUT
    imgIN2 = imgIN; // EjsS Model.Variables.draw_O.imgIN2
    imgOUT2 = imgIN; // EjsS Model.Variables.draw_O.imgOUT2
    imgSIZE = 1; // EjsS Model.Variables.draw_O.imgSIZE
    imgIconSIZE = 1; // EjsS Model.Variables.draw_O.imgIconSIZE
    energyWidth = 1; // EjsS Model.Variables.draw_O.energyWidth
    updateAnswer = 0; // EjsS Model.Variables.draw_O.updateAnswer
    answer = ["Unbalanced","Balanced"]; // EjsS Model.Variables.draw_O.answer
    answerY = -5; // EjsS Model.Variables.draw_O.answerY
    answerColour = ["Red","Green"]; // EjsS Model.Variables.draw_O.answerColour
    showAnswer = true; // EjsS Model.Variables.draw_O.showAnswer
    showHint = false; // EjsS Model.Variables.draw_O.showHint
    hintY = -4.5; // EjsS Model.Variables.draw_O.hintY
    hint = "-"; // EjsS Model.Variables.draw_O.hint
    INimgX = energyInArrowX-1; // EjsS Model.Variables.draw_O.INimgX
    INimgY = energyInArrowY+1; // EjsS Model.Variables.draw_O.INimgY
    INenergyX = -5; // EjsS Model.Variables.draw_O.INenergyX
    INenergyY = -5; // EjsS Model.Variables.draw_O.INenergyY
    INtextX = INenergyX; // EjsS Model.Variables.draw_O.INtextX
    INtextY = INenergyY -0.25; // EjsS Model.Variables.draw_O.INtextY
    INinteract = false; // EjsS Model.Variables.draw_O.INinteract
    IN2imgX = energyIn2ArrowX-1; // EjsS Model.Variables.draw_O.IN2imgX
    IN2imgY = energyIn2ArrowY-1; // EjsS Model.Variables.draw_O.IN2imgY
    IN2energyX = -4; // EjsS Model.Variables.draw_O.IN2energyX
    IN2energyY = -5; // EjsS Model.Variables.draw_O.IN2energyY
    IN2textX = IN2energyX; // EjsS Model.Variables.draw_O.IN2textX
    IN2textY = IN2energyY -0.25; // EjsS Model.Variables.draw_O.IN2textY
    IN2interact = false; // EjsS Model.Variables.draw_O.IN2interact
    OUTimgX = energyOutArrowX+1.1; // EjsS Model.Variables.draw_O.OUTimgX
    OUTimgY = energyOutArrowY+1.1; // EjsS Model.Variables.draw_O.OUTimgY
    OUTenergyX = -IN2energyX; // EjsS Model.Variables.draw_O.OUTenergyX
    OUTenergyY = IN2energyY; // EjsS Model.Variables.draw_O.OUTenergyY
    OUTtextX = OUTenergyX; // EjsS Model.Variables.draw_O.OUTtextX
    OUTtextY = OUTenergyY -0.25; // EjsS Model.Variables.draw_O.OUTtextY
    OUTinteract = false; // EjsS Model.Variables.draw_O.OUTinteract
    OUT2imgX = energyOut2ArrowX+1; // EjsS Model.Variables.draw_O.OUT2imgX
    OUT2imgY = energyOut2ArrowY-1; // EjsS Model.Variables.draw_O.OUT2imgY
    OUT2energyX = -INenergyX; // EjsS Model.Variables.draw_O.OUT2energyX
    OUT2energyY = INenergyY; // EjsS Model.Variables.draw_O.OUT2energyY
    OUT2textX = OUT2energyX; // EjsS Model.Variables.draw_O.OUT2textX
    OUT2textY = OUT2energyY -0.25; // EjsS Model.Variables.draw_O.OUT2textY
    OUT2interact = false; // EjsS Model.Variables.draw_O.OUT2interact
  });

  _model.addToReset(function() {
    fillColorforDrag = "rgba(0,0,255,0.1)"; // EjsS Model.Variables.lookang.fillColorforDrag
    dragSizeY = 1.5; // EjsS Model.Variables.lookang.dragSizeY
    editBackgroundColor = "LightGray"; // EjsS Model.Variables.lookang.editBackgroundColor
    systemText = "<b>System:</b>"; // EjsS Model.Variables.lookang.systemText
    elementInteracted = -1; // EjsS Model.Variables.lookang.elementInteracted
    remarks = "<b>Remarks: </b>"; // EjsS Model.Variables.lookang.remarks
    font = "normal normal 1vw"; // EjsS Model.Variables.lookang.font
    arrowLength = 2; // EjsS Model.Variables.lookang.arrowLength
    energyInArrowX = -2; // EjsS Model.Variables.lookang.energyInArrowX
    energyInArrowY = 2; // EjsS Model.Variables.lookang.energyInArrowY
    angleIN = Math.atan2(energyInArrowY, energyInArrowX); // EjsS Model.Variables.lookang.angleIN
    energyOutArrowX = -energyInArrowX; // EjsS Model.Variables.lookang.energyOutArrowX
    energyOutArrowY = energyInArrowY; // EjsS Model.Variables.lookang.energyOutArrowY
    energyIn2ArrowX = energyInArrowX; // EjsS Model.Variables.lookang.energyIn2ArrowX
    energyIn2ArrowY = -energyInArrowY; // EjsS Model.Variables.lookang.energyIn2ArrowY
    energyOut2ArrowX = energyOutArrowX; // EjsS Model.Variables.lookang.energyOut2ArrowX
    energyOut2ArrowY = -energyOutArrowY; // EjsS Model.Variables.lookang.energyOut2ArrowY
    dragCY = iniTotalEnergy[0]; // EjsS Model.Variables.lookang.dragCY
    dragEY = iniTotalEnergy[1]; // EjsS Model.Variables.lookang.dragEY
    dragGY = iniTotalEnergy[2]; // EjsS Model.Variables.lookang.dragGY
    dragIY = iniTotalEnergy[3]; // EjsS Model.Variables.lookang.dragIY
    dragKY = iniTotalEnergy[4]; // EjsS Model.Variables.lookang.dragKY
    dragNY = iniTotalEnergy[5]; // EjsS Model.Variables.lookang.dragNY
    dragC2Y = finTotalEnergy[0]; // EjsS Model.Variables.lookang.dragC2Y
    dragE2Y = finTotalEnergy[1]; // EjsS Model.Variables.lookang.dragE2Y
    dragG2Y = finTotalEnergy[2]; // EjsS Model.Variables.lookang.dragG2Y
    dragI2Y = finTotalEnergy[3]; // EjsS Model.Variables.lookang.dragI2Y
    dragK2Y = finTotalEnergy[4]; // EjsS Model.Variables.lookang.dragK2Y
    dragN2Y = finTotalEnergy[5]; // EjsS Model.Variables.lookang.dragN2Y
    dragEtransIN = EtransIN; // EjsS Model.Variables.lookang.dragEtransIN
    dragEtransIN2 = EtransIN2; // EjsS Model.Variables.lookang.dragEtransIN2
    dragEtransOUT = EtransOUT; // EjsS Model.Variables.lookang.dragEtransOUT
    dragEtransOUT2 = EtransOUT2; // EjsS Model.Variables.lookang.dragEtransOUT2
    iniEnergiesLst = [iniC, iniE, iniG, iniI, iniK, iniN]; // EjsS Model.Variables.lookang.iniEnergiesLst
    finEnergiesLst = [finC, finE, finG, finI, finK, finN]; // EjsS Model.Variables.lookang.finEnergiesLst
    dragEnergiesLst = [dragCY, dragEY, dragGY, dragIY, dragKY, dragNY]; // EjsS Model.Variables.lookang.dragEnergiesLst
    dragEnergies2Lst = [dragC2Y, dragE2Y, dragG2Y, dragI2Y, dragK2Y, dragN2Y]; // EjsS Model.Variables.lookang.dragEnergies2Lst
  });

  _model.addToReset(function() {
    formulaText = ""; // EjsS Model.Variables.description.formulaText
    legendText = ""; // EjsS Model.Variables.description.legendText
    eTooltip = ""; // EjsS Model.Variables.description.eTooltip
    hTooltip = ""; // EjsS Model.Variables.description.hTooltip
    mTooltip = ""; // EjsS Model.Variables.description.mTooltip
    pTooltip = ""; // EjsS Model.Variables.description.pTooltip
  });

  if (_inputParameters) {
    _inputParameters = _model.parseInputParameters(_inputParameters);
    if (_inputParameters) _model.addToReset(function() { _model._readParameters(_inputParameters); });
  }

  _model.addToReset(function() {
    _model.setAutoplay(false);
    _model.setFPS(20);
    _model.setStepsPerDisplay(1);
  });

  function answers1 () {    // depends on SCENARIO, need to include in Fixed relations.   // > CustomCode.generalAnswer:1
    var LHS = 0;  // > CustomCode.generalAnswer:2
    var RHS = 0;  // > CustomCode.generalAnswer:3
    for (let i=0; i< iniTotalEnergy.length; i++){  // > CustomCode.generalAnswer:4
      LHS += iniTotalEnergy[i];  // > CustomCode.generalAnswer:5
      RHS += finTotalEnergy[i];  // > CustomCode.generalAnswer:6
      }  // > CustomCode.generalAnswer:7
    debuggg = "LHS +EtransIN+EtransIN2: "+LHS +EtransIN+EtransIN2+ "\nRHS: "+RHS +EtransOUT+EtransOUT2;  // > CustomCode.generalAnswer:8
    // (1) Total initial + transferred in = total final + transferred out  // > CustomCode.generalAnswer:9
    if (LHS + EtransIN + EtransIN2 == RHS + EtransOUT + EtransOUT2){  // > CustomCode.generalAnswer:10
      // (2) Zero C, E, G, I and N in the initial and final amount → only has kinetic  // > CustomCode.generalAnswer:11
      if (zeroExceptEnergy(isC,isE,isG,isI,isK,isN) ||true){  // (C,E,G,I,K,N) || true to skip check  // > CustomCode.generalAnswer:12
        ignoreEnergyLst = energyToIgnore(isC,isE,isG,isI,isK,isN);  // > CustomCode.generalAnswer:13
        // (3) identify energy being transferred IN  // > CustomCode.generalAnswer:14
        if ( check3assistant() ){  // > CustomCode.generalAnswer:15
          // (4) identify energy being transferred OUT  // > CustomCode.generalAnswer:16
          if ( check4assistant() ){      // > CustomCode.generalAnswer:17
            // (5) Initial state only has check5 energies (iniC,iniE,iniG,iniI,iniK,iniN) → T/F  // > CustomCode.generalAnswer:18
            if ( check5n6assistant(iniC,iniE,iniG,iniI,iniK,iniN, iniTotalEnergy, "INITIAL") ){  // > CustomCode.generalAnswer:19
              // (6)  Final state only has check6 energies (finC,finE,finG,finI,finK,finN)→ T/F  // > CustomCode.generalAnswer:20
              if ( check5n6assistant(finC,finE,finG,finI,finK,finN, finTotalEnergy, "FINAL")  ){  // > CustomCode.generalAnswer:21
                // (7) Other criteria: Final state K > initial state K  // > CustomCode.generalAnswer:22
                if ( (check7a==false) || (check7a==true && check7assistant() ) ){   // > CustomCode.generalAnswer:23
                  updateAnswer = 1;  // > CustomCode.generalAnswer:24
                  hint = '';  // > CustomCode.generalAnswer:25
                  debuggg = '';  // > CustomCode.generalAnswer:26
                  }  // > CustomCode.generalAnswer:27
                else {  // > CustomCode.generalAnswer:28
                  updateAnswer = 0;  // > CustomCode.generalAnswer:29
                  debuggg += "\nDid not pass check 7"  // > CustomCode.generalAnswer:30
                  }  // > CustomCode.generalAnswer:31
                }  // > CustomCode.generalAnswer:32
              // (6) is wrong  // > CustomCode.generalAnswer:33
              else {  // > CustomCode.generalAnswer:34
                updateAnswer = 0;  // > CustomCode.generalAnswer:35
                //debuggg = "Did not pass check 6";  // > CustomCode.generalAnswer:36
                }  // > CustomCode.generalAnswer:37
              }  // > CustomCode.generalAnswer:38
            // (5) is wrong  // > CustomCode.generalAnswer:39
            else {  // > CustomCode.generalAnswer:40
              updateAnswer = 0;  // > CustomCode.generalAnswer:41
              //debuggg = "Did not pass check 5";  // > CustomCode.generalAnswer:42
              }  // > CustomCode.generalAnswer:43
            }  // > CustomCode.generalAnswer:44
          // (4) is wrong  // > CustomCode.generalAnswer:45
          else {  // > CustomCode.generalAnswer:46
            updateAnswer = 0;  // > CustomCode.generalAnswer:47
            // hints kept w the assistant  // > CustomCode.generalAnswer:48
            }  // > CustomCode.generalAnswer:49
          }  // > CustomCode.generalAnswer:50
        // (3) is wrong  // > CustomCode.generalAnswer:51
        else {  // > CustomCode.generalAnswer:52
          updateAnswer = 0;  // > CustomCode.generalAnswer:53
          // hints kept w the assistant  // > CustomCode.generalAnswer:54
          debuggg = "Did not pass check 3";  // > CustomCode.generalAnswer:55
          }  // > CustomCode.generalAnswer:56
        }  // > CustomCode.generalAnswer:57
      // (2) is wrong  // > CustomCode.generalAnswer:58
      else {  // > CustomCode.generalAnswer:59
        updateAnswer = 0;  // > CustomCode.generalAnswer:60
        hint = "The amount of energy in the \n";  // > CustomCode.generalAnswer:61
        if (isC == false){hint += "chemical, "}  // > CustomCode.generalAnswer:62
        if (isE == false){hint += "elastic, "}  // > CustomCode.generalAnswer:63
        if (isG == false){hint += "gravitational, "}  // > CustomCode.generalAnswer:64
        if (isI == false){hint += "internal, "}  // > CustomCode.generalAnswer:65
        if (isK == false){hint += "kinetic, "}  // > CustomCode.generalAnswer:66
        if (isN == false){hint += "nuclear "}  // > CustomCode.generalAnswer:67
        hint += "\nstores should be zero.";  // > CustomCode.generalAnswer:68
        }  // > CustomCode.generalAnswer:69
      }  // > CustomCode.generalAnswer:70
    // (1) is wrong  // > CustomCode.generalAnswer:71
    else {  // > CustomCode.generalAnswer:72
      updateAnswer = 0;  // > CustomCode.generalAnswer:73
      hint = "Total energy in the initial state of the system \n+ the energy transferred into the system should be\n = to the total energy in the final state of the system \n+ the energy transferred out of the system.";  // > CustomCode.generalAnswer:74
      hint = "Total energy in the initial state of the system + the energy transferred into\nthe system should be = to the total energy in the final state of the system\n+ the energy transferred out of the system.";  // > CustomCode.generalAnswer:75
      }  // > CustomCode.generalAnswer:76
      // > CustomCode.generalAnswer:77
    }  // > CustomCode.generalAnswer:78

  //////////////////////////////////////  // > CustomCode.answerAssistants:1
  // 1) Energy displayed / considered //  ** Affects checks and displays  // > CustomCode.answerAssistants:2
  //////////////////////////////////////  // > CustomCode.answerAssistants:3
  function isLastEnergyDisplayed(){  // > CustomCode.answerAssistants:4
    displayEnergiesLst = [displayChemical, displayElastic, displayGravitational,  // > CustomCode.answerAssistants:5
                          displayInternal, displayKinetic, displayNuclear];  // > CustomCode.answerAssistants:6
    let trueCount = displayEnergiesLst.filter(item => item === true).length;  // > CustomCode.answerAssistants:7
    if (trueCount==1){  // > CustomCode.answerAssistants:8
      alert("At least one energy should be considered to play the simulation!");  // > CustomCode.answerAssistants:9
      // narrow down to that energy and disable it.   // > CustomCode.answerAssistants:10
      if (displayChemical==true){document.getElementById("displayChemical").disabled = true;}  // > CustomCode.answerAssistants:11
      else if (displayElastic==true){document.getElementById("displayElastic").disabled = true;}  // > CustomCode.answerAssistants:12
      else if (displayGravitational==true){document.getElementById("displayGravitational").disabled = true;}  // > CustomCode.answerAssistants:13
      else if (displayInternal==true){document.getElementById("displayInternal").disabled = true;}  // > CustomCode.answerAssistants:14
      else if (displayKinetic==true){document.getElementById("displayKinetic").disabled = true;}  // > CustomCode.answerAssistants:15
      else if (displayNuclear==true){document.getElementById("displayNuclear").disabled = true;}  // > CustomCode.answerAssistants:16
      }  // > CustomCode.answerAssistants:17
    else{  // > CustomCode.answerAssistants:18
      document.getElementById("displayChemical").disabled = false;  // > CustomCode.answerAssistants:19
      document.getElementById("displayElastic").disabled = false;  // > CustomCode.answerAssistants:20
      document.getElementById("displayGravitational").disabled = false;  // > CustomCode.answerAssistants:21
      document.getElementById("displayInternal").disabled = false;  // > CustomCode.answerAssistants:22
      document.getElementById("displayKinetic").disabled = false;  // > CustomCode.answerAssistants:23
      document.getElementById("displayNuclear").disabled = false;  // > CustomCode.answerAssistants:24
      }  // > CustomCode.answerAssistants:25
    }  // > CustomCode.answerAssistants:26
      // > CustomCode.answerAssistants:27
  function updateVariables(){  // > CustomCode.answerAssistants:28
    displayEnergiesLst = [displayChemical, displayElastic, displayGravitational,  // > CustomCode.answerAssistants:29
                          displayInternal, displayKinetic, displayNuclear];  // > CustomCode.answerAssistants:30
    // ID is same as iniTotalEnergy and finTotalEnergy //  // > CustomCode.answerAssistants:31
    for (let i=0; i < iniTotalEnergy.length; i++){  // > CustomCode.answerAssistants:32
      if (displayEnergiesLst[i] == false){  // > CustomCode.answerAssistants:33
        iniTotalEnergy[i] = 0;    // Update iniTotalEnergy  // > CustomCode.answerAssistants:34
        finTotalEnergy[i] = 0;    // Update finTotalEnergy  // > CustomCode.answerAssistants:35
        }  // > CustomCode.answerAssistants:36
      }  // > CustomCode.answerAssistants:37
    // update check2, check 5 and check6 by restarting them to false //  // > CustomCode.answerAssistants:38
    if (displayChemical==false)     {isC =false; iniC =false; finC =false;}  // > CustomCode.answerAssistants:39
    if (displayElastic==false)      {isE =false; iniE =false; finE =false;}  // > CustomCode.answerAssistants:40
    if (displayGravitational==false){isG =false; iniG =false; finG =false;}  // > CustomCode.answerAssistants:41
    if (displayInternal==false)     {isI =false; iniI =false; finI =false;}  // > CustomCode.answerAssistants:42
    if (displayKinetic==false)      {isK =false; iniK =false; finK =false;}  // > CustomCode.answerAssistants:43
    if (displayNuclear==false)      {isN =false; iniN =false; finN =false;}  // > CustomCode.answerAssistants:44
    }  // > CustomCode.answerAssistants:45
  ///////////////////////////////////////////////  // > CustomCode.answerAssistants:46
  // 2) Check what energy to ignore its amount //  ** Affects check 5 and 6  // > CustomCode.answerAssistants:47
  ///////////////////////////////////////////////  returns a list ID to ignore  // > CustomCode.answerAssistants:48
  function energyToIgnore(C,E,G,I,K,N){  // > CustomCode.answerAssistants:49
    let checkLst = [C,E,G,I,K,N];  // lst contains T/F  // > CustomCode.answerAssistants:50
    let indexLst = [];  // > CustomCode.answerAssistants:51
    for (let i=0; i < checkLst.length; i++){  // > CustomCode.answerAssistants:52
      if (checkLst[i]==true){indexLst += [i];}  // > CustomCode.answerAssistants:53
      }  // > CustomCode.answerAssistants:54
    return indexLst  // > CustomCode.answerAssistants:55
    }  // > CustomCode.answerAssistants:56
  function zeroExceptEnergy(C,E,G,I,K,N){  // Scenario 1: (false, false, false, false, TRUE, false)  // > CustomCode.answerAssistants:57
    // check which index gives false from the argument --> index to check //  // > CustomCode.answerAssistants:58
    let indexLst = [];  // > CustomCode.answerAssistants:59
    if (C==false){indexLst += [0]}  // > CustomCode.answerAssistants:60
    if (E==false){indexLst += [1]}  // > CustomCode.answerAssistants:61
    if (G==false){indexLst += [2]}  // > CustomCode.answerAssistants:62
    if (I==false){indexLst += [3]}  // > CustomCode.answerAssistants:63
    if (K==false){indexLst += [4]}  // > CustomCode.answerAssistants:64
    if (N==false){indexLst += [5]}  // > CustomCode.answerAssistants:65
    // checking process: //  // > CustomCode.answerAssistants:66
    for (let i=0; i< iniTotalEnergy.length; i++){  // > CustomCode.answerAssistants:67
      // Skip any energy that is true, so to check for 0 //  // > CustomCode.answerAssistants:68
      for (let j=0; j < indexLst.length; j++){  // > CustomCode.answerAssistants:69
        if ( (indexLst[j] ==i) && ( (iniTotalEnergy[i] !=0)||(finTotalEnergy[i] !=0)  ) ){  // > CustomCode.answerAssistants:70
          return false  // > CustomCode.answerAssistants:71
          }  // > CustomCode.answerAssistants:72
        }  // > CustomCode.answerAssistants:73
      }  // > CustomCode.answerAssistants:74
    return true  // > CustomCode.answerAssistants:75
    }  // > CustomCode.answerAssistants:76
      // > CustomCode.answerAssistants:77
  /////////////////////////////////////////////////  // > CustomCode.answerAssistants:78
  // 3) Check what energy is being transfered IN // (O)  // > CustomCode.answerAssistants:79
  /////////////////////////////////////////////////  // > CustomCode.answerAssistants:80
  function check3assistant(){    // > CustomCode.answerAssistants:81
    // check3b is true, means confirm 2 types of energy are transferred  // > CustomCode.answerAssistants:82
    if (check3b){  // > CustomCode.answerAssistants:83
      // → if 2, need check IN correct, followed by IN2 and vice versa.   // > CustomCode.answerAssistants:84
      if (check3a && (EtransIN >0 && EtransIN2 >0) ){   // > CustomCode.answerAssistants:85
        if ((updateTransIN == 1 && check3aEnergy == "through propagation of waves") ||   // > CustomCode.answerAssistants:86
            (updateTransIN == 2 && check3aEnergy == "mechanically") ||   // > CustomCode.answerAssistants:87
            (updateTransIN == 3 && check3aEnergy == "through heating") ||   // > CustomCode.answerAssistants:88
            (updateTransIN == 4 && check3aEnergy == "electrically") ||   // > CustomCode.answerAssistants:89
            (updateTransIN == 5 && check3aEnergy == "chemically") ){  // > CustomCode.answerAssistants:90
          if (updateTransIN2 == 1 && check3bEnergy == "through propagation of waves"){return true}  // > CustomCode.answerAssistants:91
          else if (updateTransIN2 == 2 && check3bEnergy == "mechanically"){return true}  // > CustomCode.answerAssistants:92
          else if (updateTransIN2 == 3 && check3bEnergy == "through heating"){return true}  // > CustomCode.answerAssistants:93
          else if (updateTransIN2 == 4 && check3bEnergy == "electrically"){return true}  // > CustomCode.answerAssistants:94
          else if (updateTransIN2 == 5 && check3bEnergy == "chemically"){return true}  // > CustomCode.answerAssistants:95
          else{  // > CustomCode.answerAssistants:96
            hint = "There should be some energy transferred into\nthe system "+check3bEnergy+" due to \n"+check3bReason;  // > CustomCode.answerAssistants:97
            return false  // > CustomCode.answerAssistants:98
            }  // > CustomCode.answerAssistants:99
          }  // > CustomCode.answerAssistants:100
        else if ((updateTransIN2 == 1 && check3aEnergy == "through propagation of waves") ||   // > CustomCode.answerAssistants:101
            (updateTransIN2 == 2 && check3aEnergy == "mechanically") ||   // > CustomCode.answerAssistants:102
            (updateTransIN2 == 3 && check3aEnergy == "through heating") ||   // > CustomCode.answerAssistants:103
            (updateTransIN2 == 4 && check3aEnergy == "electrically") ||  // > CustomCode.answerAssistants:104
            (updateTransIN2 == 5 && check3aEnergy == "chemically") ){  // > CustomCode.answerAssistants:105
          if (updateTransIN == 1 && check3bEnergy == "through propagation of waves"){return true}  // > CustomCode.answerAssistants:106
          else if (updateTransIN == 2 && check3bEnergy == "mechanically"){return true}  // > CustomCode.answerAssistants:107
          else if (updateTransIN == 3 && check3bEnergy == "through heating"){return true}  // > CustomCode.answerAssistants:108
          else if (updateTransIN == 4 && check3bEnergy == "electrically"){return true}  // > CustomCode.answerAssistants:109
          else if (updateTransIN == 5 && check3bEnergy == "chemically"){return true}  // > CustomCode.answerAssistants:110
          else{  // > CustomCode.answerAssistants:111
            hint = "There should be some energy transferred\ninto the system "+check3bEnergy+" due to \n"+check3bReason;  // > CustomCode.answerAssistants:112
            return false  // > CustomCode.answerAssistants:113
            }  // > CustomCode.answerAssistants:114
          }  // > CustomCode.answerAssistants:115
        else{  // > CustomCode.answerAssistants:116
          hint = "There should be some energy transferred\ninto the system "+check3aEnergy+" due to \n"+check3aReason;  // > CustomCode.answerAssistants:117
          return false  // > CustomCode.answerAssistants:118
          }  // > CustomCode.answerAssistants:119
        }  // > CustomCode.answerAssistants:120
      else{  // > CustomCode.answerAssistants:121
        hint = "There should have some energy\ntransferred into the system\n"+check3aEnergy+" and "+check3bEnergy+".";  // > CustomCode.answerAssistants:122
        }  // > CustomCode.answerAssistants:123
      }  // > CustomCode.answerAssistants:124
    // check3a is true, means there can be 1 or 2 types of energy transferred → no need check for 2 cuz check3b wldve been T  // > CustomCode.answerAssistants:125
    else if (check3a){  // > CustomCode.answerAssistants:126
      // → if only 1, just need to check whether the IN or IN2 is correctly identified  // > CustomCode.answerAssistants:127
      if (EtransIN >0 && EtransIN2 ==0){  // > CustomCode.answerAssistants:128
        if (updateTransIN == 1 && check3aEnergy == "through propagation of waves"){return true}  // > CustomCode.answerAssistants:129
        if (updateTransIN == 2 && check3aEnergy == "mechanically"){return true}  // > CustomCode.answerAssistants:130
        if (updateTransIN == 3 && check3aEnergy == "through heating"){return true}  // > CustomCode.answerAssistants:131
        if (updateTransIN == 4 && check3aEnergy == "electrically"){return true}  // > CustomCode.answerAssistants:132
        if (updateTransIN == 5 && check3aEnergy == "chemically"){return true}  // > CustomCode.answerAssistants:133
        }  // > CustomCode.answerAssistants:134
      else if (EtransIN ==0 && EtransIN2 >0){  // > CustomCode.answerAssistants:135
        if (updateTransIN2 == 1 && check3aEnergy == "through propagation of waves"){return true}  // > CustomCode.answerAssistants:136
        if (updateTransIN2 == 2 && check3aEnergy == "mechanically"){return true}  // > CustomCode.answerAssistants:137
        if (updateTransIN2 == 3 && check3aEnergy == "through heating"){return true}  // > CustomCode.answerAssistants:138
        if (updateTransIN2 == 4 && check3aEnergy == "electrically"){return true}  // > CustomCode.answerAssistants:139
        if (updateTransIN2 == 5 && check3aEnergy == "chemically"){return true}  // > CustomCode.answerAssistants:140
        }  // > CustomCode.answerAssistants:141
      else if (EtransIN >0 && EtransIN2 >0){  // > CustomCode.answerAssistants:142
        if (updateTransIN == 1 && updateTransIN2 == 1 && check3aEnergy == "through propagation of waves"){return true}  // > CustomCode.answerAssistants:143
        if (updateTransIN == 2 && updateTransIN2 == 2 && check3aEnergy == "mechanically"){return true}  // > CustomCode.answerAssistants:144
        if (updateTransIN == 3 && updateTransIN2 == 3 && check3aEnergy == "through heating"){return true}  // > CustomCode.answerAssistants:145
        if (updateTransIN == 4 && updateTransIN2 == 4 && check3aEnergy == "electrically"){return true}  // > CustomCode.answerAssistants:146
        if (updateTransIN == 5 && updateTransIN2 == 5 && check3aEnergy == "chemically"){return true}  // > CustomCode.answerAssistants:147
        hint = "There should only be some energy transferred\ninto the system "+ check3aEnergy+".";  // > CustomCode.answerAssistants:148
        return false  // > CustomCode.answerAssistants:149
        }  // > CustomCode.answerAssistants:150
      /*  // > CustomCode.answerAssistants:151
      else{  // > CustomCode.answerAssistants:152
        hint = "There should be some energy transferred\ninto the system "+check3aEnergy+" due to \n"+check3aReason;  // > CustomCode.answerAssistants:153
        return false  // > CustomCode.answerAssistants:154
        }  // > CustomCode.answerAssistants:155
      */  // > CustomCode.answerAssistants:156
      hint = "There should be some energy transferred\ninto the system "+check3aEnergy+" due to \n"+check3aReason;  // > CustomCode.answerAssistants:157
      return false  // > CustomCode.answerAssistants:158
      }  // > CustomCode.answerAssistants:159
    else if (check3a ==false && check3b ==false){  // > CustomCode.answerAssistants:160
      if (EtransIN ==0 && EtransIN2 ==0){return true}  // > CustomCode.answerAssistants:161
      else{  // > CustomCode.answerAssistants:162
        hint = "The energy transferred into\nthe system should be zero.";  // > CustomCode.answerAssistants:163
        return false  // > CustomCode.answerAssistants:164
        }  // > CustomCode.answerAssistants:165
      }  // > CustomCode.answerAssistants:166
    else{  // > CustomCode.answerAssistants:167
      debuggg="smth wrong at check3 :( ";  // > CustomCode.answerAssistants:168
      return true  // > CustomCode.answerAssistants:169
      }  // > CustomCode.answerAssistants:170
    }  // > CustomCode.answerAssistants:171
      // > CustomCode.answerAssistants:172
  //////////////////////////////////////////////////////////  // > CustomCode.answerAssistants:173
  // 5,6) Check what energy is present in both L diagrams //  // > CustomCode.answerAssistants:174
  //////////////////////////////////////////////////////////  // > CustomCode.answerAssistants:175
  function check5n6assistant(C,E,G,I,K,N,energyLst,stateWord){  // > CustomCode.answerAssistants:176
    // works similarly to zeroExceptEnergy() where it checks arguments for FALSE  // > CustomCode.answerAssistants:177
    // C is either (iniC) or (finC), which give T or F → same goes for the other variables  // > CustomCode.answerAssistants:178
    // energyLst - [iniTotalEnergy] or [finTotalEnergy]  // > CustomCode.answerAssistants:179
    // stateWord - "initial" or "final" strings to put in the hint  // > CustomCode.answerAssistants:180
    ///////////////////////////////////////////////////////////////////////////////////////  // > CustomCode.answerAssistants:181
      // > CustomCode.answerAssistants:182
    // Setting up: //  // > CustomCode.answerAssistants:183
    let checkLst = [C,E,G,I,K,N]    // lst contains T / F  // > CustomCode.answerAssistants:184
    let wordings = ["Chemical","Elastic","Gravitational","Internal","Kinetic","Nuclear"]  // > CustomCode.answerAssistants:185
      // > CustomCode.answerAssistants:186
    // checking process: //  // > CustomCode.answerAssistants:187
    for (let i=0; i< energyLst.length; i++){  // > CustomCode.answerAssistants:188
      if ( (checkLst[i] ==false) && ( energyLst[i] !=0) && (!ignoreEnergyLst.includes(i)) ){  // > CustomCode.answerAssistants:189
        // Hint to wrong energy stored //  // > CustomCode.answerAssistants:190
        hint = ""  // > CustomCode.answerAssistants:191
        for (let wordID=0; wordID < wordings.length; wordID++){  // > CustomCode.answerAssistants:192
          if (i==wordID){hint += wordings[wordID]}  // > CustomCode.answerAssistants:193
          }  // > CustomCode.answerAssistants:194
        hint += " energy should NOT be\nstored in the "+stateWord+" state of the system."  // > CustomCode.answerAssistants:195
        return false  // > CustomCode.answerAssistants:196
        }  // > CustomCode.answerAssistants:197
      else if ( (checkLst[i] ==true) && (energyLst[i] ==0) ){  // > CustomCode.answerAssistants:198
        // Hint to store correct energy //  // > CustomCode.answerAssistants:199
        hint = ""  // > CustomCode.answerAssistants:200
        for (let wordID=0; wordID < wordings.length; wordID++){  // > CustomCode.answerAssistants:201
          if (i==wordID){hint += wordings[wordID]}  // > CustomCode.answerAssistants:202
          }  // > CustomCode.answerAssistants:203
        hint += " energy should be\nstored in the "+stateWord+" state of the system."  // > CustomCode.answerAssistants:204
        return false  // > CustomCode.answerAssistants:205
        }  // > CustomCode.answerAssistants:206
      }  // > CustomCode.answerAssistants:207
    return true  // > CustomCode.answerAssistants:208
    }  // > CustomCode.answerAssistants:209
      // > CustomCode.answerAssistants:210
  //////////////////////////////////////////////////////////  // > CustomCode.answerAssistants:211
  // 7) Check the amount of energy with the formula given //  // > CustomCode.answerAssistants:212
  //////////////////////////////////////////////////////////  // > CustomCode.answerAssistants:213
  function check7assistant(){  // > CustomCode.answerAssistants:214
    let wordings = ["chemical","elastic","gravitational potential","internal","kinetic","nuclear"]  // > CustomCode.answerAssistants:215
    // load formula from userCode //  // > CustomCode.answerAssistants:216
    finalC=999; finalE=999; finalG=999; finalI=999; finalK=999; finalN=999; // to check whether user edited var  // > CustomCode.answerAssistants:217
    inequalityCheckLst = []  // final judgement  // > CustomCode.answerAssistants:218
    runUserCode("Error in code, please review code again.");  // > CustomCode.answerAssistants:219
    // checking process: //  // > CustomCode.answerAssistants:220
    passfail = []; // final judgement  // > CustomCode.answerAssistants:221
    let finalLst = [finalC, finalE, finalG, finalI, finalK, finalN];  // > CustomCode.answerAssistants:222
    //let finalLst = [fC,fE, fG, fI, fK, fN]; // = this is finTotalEnergy  // > CustomCode.answerAssistants:223
    let checkLst = [finC,finE,finG,finI,finK,finN];    // lst contains T/F  // > CustomCode.answerAssistants:224
    debuggg = finalLst+"\ncheckLst: "+checkLst+"\ninequalityCheckLst: "+inequalityCheckLst;  // > CustomCode.answerAssistants:225
    // check for the correct energy present in the initial state before checking condition //   // > CustomCode.answerAssistants:226
    for (let i=0; i < finTotalEnergy.length ; i++){  // > CustomCode.answerAssistants:227
      if ( checkLst[i] ==true && finalLst[i]!=999 ) {  // > CustomCode.answerAssistants:228
        if (finalLst[i] == finTotalEnergy[i]) {  // > CustomCode.answerAssistants:229
          passfail += true  // > CustomCode.answerAssistants:230
          }  // > CustomCode.answerAssistants:231
        else{  // > CustomCode.answerAssistants:232
          //alert("wrong")  // > CustomCode.answerAssistants:233
          hint = "The amount of "+wordings[i]+" energy in the final state is wrong"  // > CustomCode.answerAssistants:234
          passfail += false  // > CustomCode.answerAssistants:235
          }  // > CustomCode.answerAssistants:236
        }  // > CustomCode.answerAssistants:237
      }  // > CustomCode.answerAssistants:238
    // Final judgement: //  // > CustomCode.answerAssistants:239
    debuggg += "\npassfail: "+passfail;  // Equality formulas  // > CustomCode.answerAssistants:240
    if ( !inequalityCheckLst.includes(false) ){  // check inequality formula(s) if any  // > CustomCode.answerAssistants:241
      if ( allFalseLst(checkLst) ){  // highly unlikely this will occur  // > CustomCode.answerAssistants:242
        hint = "There should be no energy\npresent in the FINAL state.";  // > CustomCode.answerAssistants:243
        return false  // > CustomCode.answerAssistants:244
        }  // > CustomCode.answerAssistants:245
      if ( !passfail.includes(false) ){return true}  // check equality formula(s) if any  // > CustomCode.answerAssistants:246
      if ( passfail.includes(false) ){return false}   // > CustomCode.answerAssistants:247
      return true    // > CustomCode.answerAssistants:248
      }  // > CustomCode.answerAssistants:249
    else if ( inequalityCheckLst.includes(false) ){  // > CustomCode.answerAssistants:250
      hint = "The amount of energy in the final state is wrong.";  // > CustomCode.answerAssistants:251
      return false  // > CustomCode.answerAssistants:252
      }  // > CustomCode.answerAssistants:253
    }  // > CustomCode.answerAssistants:254

  //////////////////////////////////////////////////  // > CustomCode.check4assistant:1
  // 4) Check what energy is being transfered OUT //  // > CustomCode.check4assistant:2
  //////////////////////////////////////////////////  // > CustomCode.check4assistant:3
  function check4assistant(){  // > CustomCode.check4assistant:4
    if (check4b){    // → confirm 2 types of energy are transferred  // > CustomCode.check4assistant:5
      if (check4b && (EtransOUT >0 && EtransOUT2 >0) ){   // > CustomCode.check4assistant:6
        if ((updateTransOUT == 1 && check4aEnergy == "through propagation of waves") ||   // > CustomCode.check4assistant:7
            (updateTransOUT == 2 && check4aEnergy == "mechanically") ||   // > CustomCode.check4assistant:8
            (updateTransOUT == 3 && check4aEnergy == "through heating") ||   // > CustomCode.check4assistant:9
            (updateTransOUT == 4 && check4aEnergy == "electrically") ||  // > CustomCode.check4assistant:10
            (updateTransOUT == 5 && check4aEnergy == "chemically") ){  // > CustomCode.check4assistant:11
          if (updateTransOUT2 == 1 && check4bEnergy == "through propagation of waves"){return true}  // > CustomCode.check4assistant:12
          else if (updateTransOUT2 == 2 && check4bEnergy == "mechanically"){return true}  // > CustomCode.check4assistant:13
          else if (updateTransOUT2 == 3 && check4bEnergy == "through heating"){return true}  // > CustomCode.check4assistant:14
          else if (updateTransOUT2 == 4 && check4bEnergy == "electrically"){return true}  // > CustomCode.check4assistant:15
          else if (updateTransOUT2 == 5 && check4bEnergy == "chemically"){return true}  // > CustomCode.check4assistant:16
          else{  // > CustomCode.check4assistant:17
            hint = "There should be some energy transferred out\nof the system "+check4bEnergy+" due to \n"+check4bReason;  // > CustomCode.check4assistant:18
            return false  // > CustomCode.check4assistant:19
            }  // > CustomCode.check4assistant:20
          }  // > CustomCode.check4assistant:21
        else if ((updateTransOUT2 == 1 && check4aEnergy == "through propagation of waves") ||   // > CustomCode.check4assistant:22
            (updateTransOUT2 == 2 && check4aEnergy == "mechanically") ||   // > CustomCode.check4assistant:23
            (updateTransOUT2 == 3 && check4aEnergy == "through heating") ||    // > CustomCode.check4assistant:24
            (updateTransOUT2 == 4 && check4aEnergy == "electrically") ||  // > CustomCode.check4assistant:25
            (updateTransOUT2 == 5 && check4aEnergy == "chemically") ){  // > CustomCode.check4assistant:26
          if (updateTransOUT == 1 && check4bEnergy == "through propagation of waves"){return true}  // > CustomCode.check4assistant:27
          else if (updateTransOUT == 2 && check4bEnergy == "mechanically"){return true}  // > CustomCode.check4assistant:28
          else if (updateTransOUT == 3 && check4bEnergy == "through heating"){return true}  // > CustomCode.check4assistant:29
          else if (updateTransOUT == 4 && check4bEnergy == "electrically"){return true}  // > CustomCode.check4assistant:30
          else if (updateTransOUT == 5 && check4bEnergy == "chemically"){return true}  // > CustomCode.check4assistant:31
          else{  // > CustomCode.check4assistant:32
            hint = "There should be some energy transferred\nout of the system "+check4bEnergy+" due to \n"+check4bReason;  // > CustomCode.check4assistant:33
            return false  // > CustomCode.check4assistant:34
            }  // > CustomCode.check4assistant:35
          }  // > CustomCode.check4assistant:36
        else{  // > CustomCode.check4assistant:37
          hint = "There should be some energy transferred\nout of the system "+check4aEnergy+" due to \n"+check4aReason;  // > CustomCode.check4assistant:38
          return false  // > CustomCode.check4assistant:39
          }  // > CustomCode.check4assistant:40
        }  // > CustomCode.check4assistant:41
      else{  // > CustomCode.check4assistant:42
        hint = "There should have some energy\ntransferred out of the system\n"+check4aEnergy+" and "+check4bEnergy+".";  // > CustomCode.check4assistant:43
        }  // > CustomCode.check4assistant:44
      }  // > CustomCode.check4assistant:45
    else if (check4a){  // > CustomCode.check4assistant:46
      if (EtransOUT >0 && EtransOUT2 ==0){  // > CustomCode.check4assistant:47
        if (updateTransOUT == 1 && check4aEnergy == "through propagation of waves"){return true}  // > CustomCode.check4assistant:48
        if (updateTransOUT == 2 && check4aEnergy == "mechanically"){return true}  // > CustomCode.check4assistant:49
        if (updateTransOUT == 3 && check4aEnergy == "through heating"){return true}  // > CustomCode.check4assistant:50
        if (updateTransOUT == 4 && check4aEnergy == "electrically"){return true}  // > CustomCode.check4assistant:51
        if (updateTransOUT == 5 && check4aEnergy == "chemically"){return true}  // > CustomCode.check4assistant:52
        }  // > CustomCode.check4assistant:53
      else if (EtransOUT ==0 && EtransOUT2 >0){  // > CustomCode.check4assistant:54
        if (updateTransOUT2 == 1 && check4aEnergy == "through propagation of waves"){return true}  // > CustomCode.check4assistant:55
        if (updateTransOUT2 == 2 && check4aEnergy == "mechanically"){return true}  // > CustomCode.check4assistant:56
        if (updateTransOUT2 == 3 && check4aEnergy == "through heating"){return true}  // > CustomCode.check4assistant:57
        if (updateTransOUT2 == 4 && check4aEnergy == "electrically"){return true}  // > CustomCode.check4assistant:58
        if (updateTransOUT2 == 5 && check4aEnergy == "chemically"){return true}  // > CustomCode.check4assistant:59
        }  // > CustomCode.check4assistant:60
      else if (EtransOUT >0 && EtransOUT2 >0){  // > CustomCode.check4assistant:61
        if (updateTransOUT == 1 && updateTransOUT2 == 1 && check4aEnergy == "through propagation of waves"){return true}  // > CustomCode.check4assistant:62
        if (updateTransOUT == 2 && updateTransOUT2 == 2 && check4aEnergy == "mechanically"){return true}  // > CustomCode.check4assistant:63
        if (updateTransOUT == 3 && updateTransOUT2 == 3 && check4aEnergy == "through heating"){return true}  // > CustomCode.check4assistant:64
        if (updateTransOUT == 4 && updateTransOUT2 == 4 && check4aEnergy == "electrically"){return true}  // > CustomCode.check4assistant:65
        if (updateTransOUT == 5 && updateTransOUT2 == 5 && check4aEnergy == "chemically"){return true}  // > CustomCode.check4assistant:66
        hint = "There should only be some energy transferred\nout of the system "+ check4aEnergy+".";  // > CustomCode.check4assistant:67
        return false  // > CustomCode.check4assistant:68
        }  // > CustomCode.check4assistant:69
      hint = "There should be some energy transferred\nout of the system "+check4aEnergy+" due to \n"+check4aReason;  // > CustomCode.check4assistant:70
      return false  // > CustomCode.check4assistant:71
      }  // > CustomCode.check4assistant:72
    else if (check4a ==false && check4b ==false){  // > CustomCode.check4assistant:73
      if (EtransOUT ==0 && EtransOUT2 ==0){return true}  // > CustomCode.check4assistant:74
      else{  // > CustomCode.check4assistant:75
        hint = "The energy transferred out\nof the system should be zero.";  // > CustomCode.check4assistant:76
        return false  // > CustomCode.check4assistant:77
        }  // > CustomCode.check4assistant:78
      }  // > CustomCode.check4assistant:79
    else{  // > CustomCode.check4assistant:80
      debuggg="smth wrong at check4 :( ";  // > CustomCode.check4assistant:81
      return true  // > CustomCode.check4assistant:82
      }  // > CustomCode.check4assistant:83
    }  // > CustomCode.check4assistant:84

  //https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode  // > CustomCode.fullscreen:1
  // does not work for iOS   // > CustomCode.fullscreen:2
  /*jslint browser:true */  // > CustomCode.fullscreen:3
  function toggleFullScreen() {  // > CustomCode.fullscreen:4
    if (!document.fullscreenElement &&    // alternative standard method  // > CustomCode.fullscreen:5
        !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods  // > CustomCode.fullscreen:6
      if (document.documentElement.requestFullscreen) {  // > CustomCode.fullscreen:7
        document.documentElement.requestFullscreen();  // > CustomCode.fullscreen:8
      } else if (document.documentElement.msRequestFullscreen) {  // > CustomCode.fullscreen:9
        document.documentElement.msRequestFullscreen();  // > CustomCode.fullscreen:10
      } else if (document.documentElement.mozRequestFullScreen) {  // > CustomCode.fullscreen:11
        document.documentElement.mozRequestFullScreen();  // > CustomCode.fullscreen:12
      } else if (document.documentElement.webkitRequestFullscreen) {  // > CustomCode.fullscreen:13
        document.documentElement.webkitRequestFullscreen();  // > CustomCode.fullscreen:14
      }  // > CustomCode.fullscreen:15
    } else {  // > CustomCode.fullscreen:16
      if (document.exitFullscreen) {  // > CustomCode.fullscreen:17
        document.exitFullscreen();  // > CustomCode.fullscreen:18
      } else if (document.msExitFullscreen) {  // > CustomCode.fullscreen:19
        document.msExitFullscreen();  // > CustomCode.fullscreen:20
      } else if (document.mozCancelFullScreen) {  // > CustomCode.fullscreen:21
        document.mozCancelFullScreen();  // > CustomCode.fullscreen:22
      } else if (document.webkitExitFullscreen) {  // > CustomCode.fullscreen:23
        document.webkitExitFullscreen();  // > CustomCode.fullscreen:24
      }  // > CustomCode.fullscreen:25
    }  // > CustomCode.fullscreen:26
  }  // > CustomCode.fullscreen:27

  // code to be copied to EJSS source code under Custom and used in drawingPanel3D and plottingPanel2D  // > CustomCode.changeOrientation:1
  // address the problem is height difference is iOS app , epub, and Firefox  // > CustomCode.changeOrientation:2
  // user need to change only k and kepub  // > CustomCode.changeOrientation:3
  // copy %changeOrientation()% into the Height Field of drawingPanel3D and plottingPanel2D  // > CustomCode.changeOrientation:4
  function changeOrientation() {  // > CustomCode.changeOrientation:5
     // > CustomCode.changeOrientation:6
  var k =0.90 ; // k control height 1 is for full screen, 0.9 shorten etc  // > CustomCode.changeOrientation:7
  var kapple =0.90 // control apple app height  // > CustomCode.changeOrientation:8
  var kepub =0.90 ;  // > CustomCode.changeOrientation:9
  // check platform for Apps  // > CustomCode.changeOrientation:10
  try { // allow code to run in Student Learning Space   // > CustomCode.changeOrientation:11
    var iOSapp =  (typeof parent.device != 'undefined' && parent.device.platform == "iOS");  // > CustomCode.changeOrientation:12
    var Androidapp = (typeof parent.device != 'undefined' && parent.device.platform == "Android");  // > CustomCode.changeOrientation:13
  } catch(e) {  // > CustomCode.changeOrientation:14
    var iOSapp = false;  // > CustomCode.changeOrientation:15
    var Androidapp = false;  // > CustomCode.changeOrientation:16
  }  // > CustomCode.changeOrientation:17
  // check platform for web browsers  // > CustomCode.changeOrientation:18
  var iOS =/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;  // > CustomCode.changeOrientation:19
  var iPad =/iPad/.test(navigator.userAgent) && !window.MSStream;  // > CustomCode.changeOrientation:20
  var iPhone = /iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;  // > CustomCode.changeOrientation:21
  var Android= /Android|android/i.test(navigator.userAgent);  // > CustomCode.changeOrientation:22
  //navigator  // > CustomCode.changeOrientation:23
  var Firefox = navigator.userAgent.indexOf("Firefox") != -1;  // > CustomCode.changeOrientation:24
     // > CustomCode.changeOrientation:25
  switch (window.orientation) { // using window.orientation as deciding factor  // > CustomCode.changeOrientation:26
    case 0:  // > CustomCode.changeOrientation:27
    case 180:  // > CustomCode.changeOrientation:28
      this.screenOrientation = 'portrait';  // > CustomCode.changeOrientation:29
      if (iOSapp){ // does not seems to work  // > CustomCode.changeOrientation:30
          // > CustomCode.changeOrientation:31
        return window.screen.height*kapple;  //0.1 for app and 0.1 for nonfullscreenapp    // > CustomCode.changeOrientation:32
        // > CustomCode.changeOrientation:33
      }  // > CustomCode.changeOrientation:34
      else if (_isEPub){ // does not seems to work  // > CustomCode.changeOrientation:35
        //   return Math.max(window.screen.width,window.screen.height)*0.9;  // > CustomCode.changeOrientation:36
        return window.innerHeight*kepub;  //0.1 for app and 0.1 for nonfullscreenapp    // > CustomCode.changeOrientation:37
        // return window.screen.height;  // > CustomCode.changeOrientation:38
        //  return window.innerHeight;  // > CustomCode.changeOrientation:39
        // return document.documentElement.clientHeight;  // > CustomCode.changeOrientation:40
      }  // > CustomCode.changeOrientation:41
       // > CustomCode.changeOrientation:42
      else {  // > CustomCode.changeOrientation:43
         // > CustomCode.changeOrientation:44
        return 100*k+"vh";  // > CustomCode.changeOrientation:45
      }  // > CustomCode.changeOrientation:46
      break;  // > CustomCode.changeOrientation:47
    case 90:  // > CustomCode.changeOrientation:48
    case -90:  // > CustomCode.changeOrientation:49
      this.screenOrientation = 'landscape';  // > CustomCode.changeOrientation:50
     // > CustomCode.changeOrientation:51
      if (iOSapp){ // App  // > CustomCode.changeOrientation:52
        return window.screen.width*kapple;    // > CustomCode.changeOrientation:53
        // return window.screen.height;  // > CustomCode.changeOrientation:54
        //  return window.innerHeight;  // > CustomCode.changeOrientation:55
        //  return document.documentElement.clientHeight;  // > CustomCode.changeOrientation:56
      }  // > CustomCode.changeOrientation:57
      else if (_isEPub){ // does not seems to work  // > CustomCode.changeOrientation:58
        //   return Math.max(window.screen.width,window.screen.height)*0.9;  // > CustomCode.changeOrientation:59
        return window.innerHeight*kepub;  //0.1 for app and 0.1 for nonfullscreenapp    // > CustomCode.changeOrientation:60
        // return window.screen.height;  // > CustomCode.changeOrientation:61
        //  return window.innerHeight;  // > CustomCode.changeOrientation:62
        // return document.documentElement.clientHeight;  // > CustomCode.changeOrientation:63
      }  // > CustomCode.changeOrientation:64
       // > CustomCode.changeOrientation:65
      else {  // > CustomCode.changeOrientation:66
        return 100*k+"vh";  // > CustomCode.changeOrientation:67
        }  // > CustomCode.changeOrientation:68
      break;  // > CustomCode.changeOrientation:69
    default:  // > CustomCode.changeOrientation:70
      this.screenOrientation = 'unknown';  // > CustomCode.changeOrientation:71
      //       return (iPad)?""+(window.screen.width+window.screen.height)*0.4:((iPhone)?""+window.screen.width:_view._format(window.innerHeight*0.9,"0"));  // > CustomCode.changeOrientation:72
       if (Firefox){  // > CustomCode.changeOrientation:73
        return window.innerHeight*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle  // > CustomCode.changeOrientation:74
        }  // > CustomCode.changeOrientation:75
     //   else if (iOS&&(window.orientation==0)||(window.orientation==180)){  // > CustomCode.changeOrientation:76
     //   return  window.screen.height*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle  // > CustomCode.changeOrientation:77
     //   }  // > CustomCode.changeOrientation:78
      //  else if (iOS&&(window.orientation==90)||(window.orientation==-90)){  // > CustomCode.changeOrientation:79
     //   return  window.screen.width*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle  // > CustomCode.changeOrientation:80
     //   }  // > CustomCode.changeOrientation:81
        else {  // > CustomCode.changeOrientation:82
        //alert();  // > CustomCode.changeOrientation:83
        // return 100*k+"%"; // work on fullscreen works in EJSS6.0beta  // > CustomCode.changeOrientation:84
          //  works in EjsS_5.3_180131  // > CustomCode.changeOrientation:85
        return  window.innerHeight*k; // work on panel   // > CustomCode.changeOrientation:86
           // > CustomCode.changeOrientation:87
  }  // > CustomCode.changeOrientation:88
  }  // > CustomCode.changeOrientation:89
     // > CustomCode.changeOrientation:90
  }  // > CustomCode.changeOrientation:91

  // copy this custom function  // > CustomCode.speech:1
  // in iOS need to add speech to the play button as On iOS the API works but must be triggered by a user action callback, like a response to a tap event, to provide a better experience to users and avoid unexpected sounds out of your phone  // > CustomCode.speech:2
  function speech (option) {  // > CustomCode.speech:3
  try { // allow code to run in Student Learning Space   // > CustomCode.speech:4
  var isCordova = (!!this.parent.cordova || !!window.cordova);  // > CustomCode.speech:5
  if(isCordova) { // check it is running in Android or iOS  // > CustomCode.speech:6
         // parent.TTS.speak({text:option,locale:'zh-CN'});  // > CustomCode.speech:7
  	parent.TTS.speak({text:option,locale:'us-EN'});  // > CustomCode.speech:8
  	// parent.TTS.speak({text:option,locale:'en-US'});  // > CustomCode.speech:9
  	// parent.TTS.speak({text:option,locale:'id-ID'});  // > CustomCode.speech:10
  }   // > CustomCode.speech:11
  }   // > CustomCode.speech:12
  catch(e) {  // > CustomCode.speech:13
    var isCordova = false;  // > CustomCode.speech:14
    }  // > CustomCode.speech:15
      // > CustomCode.speech:16
     var msg = new SpeechSynthesisUtterance(option);  // > CustomCode.speech:17
    //https://stackoverflow.com/questions/43983845/speechsynthesis-api-for-chinese-firefox  // > CustomCode.speech:18
    // Set the text.  // > CustomCode.speech:19
  	//msg.text = option;   // > CustomCode.speech:20
  	//https://forums.developer.apple.com/message/323564#323564  // > CustomCode.speech:21
  	// comment out the next 2 lines for english  // > CustomCode.speech:22
  //msg.voice = speechSynthesis.getVoices().filter(function(voice) { return voice.name == 'Ting-Ting'; })[0];  // > CustomCode.speech:23
  //msg.lang = 'zh-CH'; // need for android?  // > CustomCode.speech:24
  //msg.lang = 'id-ID'; // need for android?  // > CustomCode.speech:25
  msg.lang = 'us-EN'; // need for android?  // > CustomCode.speech:26
  //https://flaviocopes.com/speech-synthesis-api/  // > CustomCode.speech:27
  //debug  // > CustomCode.speech:28
  //console.log(`Voices #: ${speechSynthesis.getVoices().length}`)  // > CustomCode.speech:29
  //speechSynthesis.getVoices().forEach(voice => {  // > CustomCode.speech:30
  // console.log(voice.name, voice.lang)  // > CustomCode.speech:31
  //})  // > CustomCode.speech:32
  //debug  // > CustomCode.speech:33
  // Queue this utterance.  // > CustomCode.speech:34
  window.speechSynthesis.speak(msg);  // > CustomCode.speech:35
     // > CustomCode.speech:36
  }  // > CustomCode.speech:37

  function runUserCode (errorMsg) {  // > CustomCode.runUserCode:1
    var userPlay = _view.userCode.getValue();  // > CustomCode.runUserCode:2
    try {  // > CustomCode.runUserCode:3
      eval(userPlay);  // > CustomCode.runUserCode:4
      }  // > CustomCode.runUserCode:5
    catch(error){  // > CustomCode.runUserCode:6
      _tools.showOkDialog(errorMsg);  // > CustomCode.runUserCode:7
      }  // > CustomCode.runUserCode:8
  }  // > CustomCode.runUserCode:9

  function revealSolution () {    // used in the reveal button  // > CustomCode.revealSol:1
    // to handle infinite loops causing page timeout  // > CustomCode.revealSol:2
    let loopCount = 0;  // > CustomCode.revealSol:3
    let maxIterations = 1000000;    // > CustomCode.revealSol:4
    // Read through the checks for answer --> Update var in control of displaying the answers //  // > CustomCode.revealSol:5
    while (true){  // > CustomCode.revealSol:6
      // Read through check 3 //  // > CustomCode.revealSol:7
      if (true){  // > CustomCode.revealSol:8
        if (check3aEnergy == "through propagation of waves"){updateTransIN =1; EtransIN =Math.ceil( Math.random()*10 );_view.energyTypeIN.setSelectedOptions(["Propagation of waves"]);  // > CustomCode.revealSol:9
        }  // > CustomCode.revealSol:10
        else if (check3aEnergy == "mechanically")           {updateTransIN =2;EtransIN =Math.ceil( Math.random()*10 );_view.energyTypeIN.setSelectedOptions(["Mechanically"]);  // > CustomCode.revealSol:11
        }  // > CustomCode.revealSol:12
        else if (check3aEnergy == "through heating")        {updateTransIN =3; EtransIN =Math.ceil( Math.random()*10 );_view.energyTypeIN.setSelectedOptions(["Heating"]);  // > CustomCode.revealSol:13
        }  // > CustomCode.revealSol:14
        else if (check3aEnergy == "electrically")           {updateTransIN =4; EtransIN =Math.ceil( Math.random()*10 );_view.energyTypeIN.setSelectedOptions(["Electrically"]);  // > CustomCode.revealSol:15
        }  // > CustomCode.revealSol:16
        else if (check3aEnergy == "chemically")             {updateTransIN =5; EtransIN =Math.ceil( Math.random()*10 );_view.energyTypeIN.setSelectedOptions(["Chemically"]);  // > CustomCode.revealSol:17
        }  // > CustomCode.revealSol:18
        else{  updateTransIN =0; EtransIN =0;}  // > CustomCode.revealSol:19
        // Correctly set the combobox  // > CustomCode.revealSol:20
          // > CustomCode.revealSol:21
        //_view.energyTypeIN.setSelectedOptions(["Mechanically"];  // > CustomCode.revealSol:22
        //alert(check3aEnergy)  // > CustomCode.revealSol:23
        dragEtransIN =EtransIN;  // > CustomCode.revealSol:24
        }  // > CustomCode.revealSol:25
      if (true){  // > CustomCode.revealSol:26
        if (check3bEnergy == "through propagation of waves"){updateTransIN2 =1; EtransIN2 =Math.ceil( Math.random()*10 );_view.energyTypeIN2.setSelectedOptions(["Propagation of waves"])  // > CustomCode.revealSol:27
        }  // > CustomCode.revealSol:28
        else if (check3bEnergy == "mechanically")           {updateTransIN2 =2; EtransIN2 =Math.ceil( Math.random()*10 );_view.energyTypeIN2.setSelectedOptions(["Mechanically"])  // > CustomCode.revealSol:29
        }  // > CustomCode.revealSol:30
        else if (check3bEnergy == "through heating")        {updateTransIN2 =3; EtransIN2 =Math.ceil( Math.random()*10 );_view.energyTypeIN2.setSelectedOptions(["Heating"])  // > CustomCode.revealSol:31
        }  // > CustomCode.revealSol:32
        else if (check3bEnergy == "electrically")           {updateTransIN2 =4; EtransIN2 =Math.ceil( Math.random()*10 );_view.energyTypeIN2.setSelectedOptions(["Electrically"])  // > CustomCode.revealSol:33
        }  // > CustomCode.revealSol:34
        else if (check3bEnergy == "chemically")             {updateTransIN2 =5; EtransIN2 =Math.ceil( Math.random()*10 );_view.energyTypeIN2.setSelectedOptions(["Chemically"])  // > CustomCode.revealSol:35
        }  // > CustomCode.revealSol:36
        else{  updateTransIN2 =0; EtransIN2 =0;}  // > CustomCode.revealSol:37
        dragEtransIN2 =EtransIN2;  // > CustomCode.revealSol:38
        }  // > CustomCode.revealSol:39
      // Read through check 4 //  // > CustomCode.revealSol:40
      if (true){  // > CustomCode.revealSol:41
        if (check4aEnergy == "through propagation of waves"){updateTransOUT =1; EtransOUT =Math.ceil( Math.random()*10 );_view.energyTypeOUT.setSelectedOptions(["Propagation of waves"])  // > CustomCode.revealSol:42
        }  // > CustomCode.revealSol:43
        else if (check4aEnergy == "mechanically")           {updateTransOUT =2; EtransOUT =Math.ceil( Math.random()*10 );_view.energyTypeOUT.setSelectedOptions(["Mechanically"]);  // > CustomCode.revealSol:44
        }  // > CustomCode.revealSol:45
        else if (check4aEnergy == "through heating")        {updateTransOUT =3; EtransOUT =Math.ceil( Math.random()*10 );_view.energyTypeOUT.setSelectedOptions(["Heating"]);  // > CustomCode.revealSol:46
        }  // > CustomCode.revealSol:47
        else if (check4aEnergy == "electrically")           {updateTransOUT =4; EtransOUT =Math.ceil( Math.random()*10 );_view.energyTypeOUT.setSelectedOptions(["Electrically"])  // > CustomCode.revealSol:48
        }  // > CustomCode.revealSol:49
        else if (check4aEnergy == "chemically")             {updateTransOUT =5; EtransOUT =Math.ceil( Math.random()*10 );_view.energyTypeOUT.setSelectedOptions(["Chemically"])  // > CustomCode.revealSol:50
        }  // > CustomCode.revealSol:51
        else{  updateTransOUT =0; EtransOUT =0;}  // > CustomCode.revealSol:52
        dragEtransOUT =EtransOUT;  // > CustomCode.revealSol:53
        }  // > CustomCode.revealSol:54
      if (true){  // > CustomCode.revealSol:55
        if (check4bEnergy == "through propagation of waves"){updateTransOUT2 =1; EtransOUT2 =Math.ceil( Math.random()*10 );_view.energyTypeOUT2.setSelectedOptions(["Propagation of waves"])  // > CustomCode.revealSol:56
        }  // > CustomCode.revealSol:57
        else if (check4bEnergy == "mechanically")           {updateTransOUT2 =2; EtransOUT2 =Math.ceil( Math.random()*10 );_view.energyTypeOUT2.setSelectedOptions(["Mechanically"]);  // > CustomCode.revealSol:58
        }  // > CustomCode.revealSol:59
        else if (check4bEnergy == "through heating")        {updateTransOUT2 =3; EtransOUT2 =Math.ceil( Math.random()*10 );_view.energyTypeOUT2.setSelectedOptions(["Heating"]);  // > CustomCode.revealSol:60
        }  // > CustomCode.revealSol:61
        else if (check4bEnergy == "electrically")           {updateTransOUT2 =4; EtransOUT2 =Math.ceil( Math.random()*10 );_view.energyTypeOUT2.setSelectedOptions(["Electrically"])  // > CustomCode.revealSol:62
        }  // > CustomCode.revealSol:63
        else if (check4bEnergy == "chemically")             {updateTransOUT2 =5; EtransOUT2 =Math.ceil( Math.random()*10 );_view.energyTypeOUT2.setSelectedOptions(["Chemically"])  // > CustomCode.revealSol:64
        }  // > CustomCode.revealSol:65
        else{  updateTransOUT2 =0; EtransOUT2 =0;}  // > CustomCode.revealSol:66
        dragEtransOUT2 =EtransOUT2;  // > CustomCode.revealSol:67
        }  // > CustomCode.revealSol:68
      // Read through check 5n6 //  // > CustomCode.revealSol:69
     // > CustomCode.revealSol:70
       iniEnergiesLst = [iniC, iniE, iniG, iniI, iniK, iniN];  // > CustomCode.revealSol:71
       finEnergiesLst = [finC, finE, finG, finI, finK, finN];  // > CustomCode.revealSol:72
       dragEnergiesLst = [dragCY, dragEY, dragGY, dragIY, dragKY, dragNY];  // > CustomCode.revealSol:73
       dragEnergies2Lst = [dragC2Y, dragE2Y, dragG2Y, dragI2Y, dragK2Y, dragN2Y];  // > CustomCode.revealSol:74
      for (let i=0; i < iniEnergiesLst.length; i++){  // ID is same as iniTotalEnergy and finTotalEnergy  // > CustomCode.revealSol:75
        if (iniEnergiesLst[i] == true){  // > CustomCode.revealSol:76
          iniTotalEnergy[i] =dragEnergiesLst[i] = Math.ceil( Math.random()*10 );  // > CustomCode.revealSol:77
          //dragEnergiesLst[i] = iniTotalEnergy[i];  // > CustomCode.revealSol:78
         // alert(dragEnergiesLst[4])  // > CustomCode.revealSol:79
         // alert("dragKY ="+ dragKY)  // > CustomCode.revealSol:80
          } // fixed by lookang dragEnergiesLst  // > CustomCode.revealSol:81
        else if (iniEnergiesLst[i] == false){   // > CustomCode.revealSol:82
        iniTotalEnergy[i] =0;  // > CustomCode.revealSol:83
        dragEnergiesLst[i] = iniTotalEnergy[i];  // > CustomCode.revealSol:84
        }  // > CustomCode.revealSol:85
          // > CustomCode.revealSol:86
        if (finEnergiesLst[i] == true){  // > CustomCode.revealSol:87
          finTotalEnergy[i]  = Math.ceil( Math.random()*10 );  // > CustomCode.revealSol:88
          dragEnergies2Lst[i] = finTotalEnergy[i];  // > CustomCode.revealSol:89
          } // fixed by lookang dragEnergies2Lst  // > CustomCode.revealSol:90
        else{   // > CustomCode.revealSol:91
        finTotalEnergy[i] =0;  // > CustomCode.revealSol:92
        dragEnergies2Lst[i] = finTotalEnergy[i];  // > CustomCode.revealSol:93
        }  // > CustomCode.revealSol:94
        //update dragYs after loop fix by lookang 20240624  // > CustomCode.revealSol:95
        dragCY = dragEnergiesLst[0];  // > CustomCode.revealSol:96
        dragEY = dragEnergiesLst[1]  // > CustomCode.revealSol:97
        dragGY = dragEnergiesLst[2]  // > CustomCode.revealSol:98
        dragIY = dragEnergiesLst[3]  // > CustomCode.revealSol:99
        dragKY = dragEnergiesLst[4];  // > CustomCode.revealSol:100
        dragNY = dragEnergiesLst[5]  // > CustomCode.revealSol:101
        dragC2Y = dragEnergies2Lst[0];  // > CustomCode.revealSol:102
        dragE2Y = dragEnergies2Lst[1]  // > CustomCode.revealSol:103
        dragG2Y = dragEnergies2Lst[2]  // > CustomCode.revealSol:104
        dragI2Y = dragEnergies2Lst[3]  // > CustomCode.revealSol:105
        dragK2Y = dragEnergies2Lst[4];  // > CustomCode.revealSol:106
        dragN2Y = dragEnergies2Lst[5]  // > CustomCode.revealSol:107
          // > CustomCode.revealSol:108
      // > CustomCode.revealSol:109
        }  // > CustomCode.revealSol:110
        // > CustomCode.revealSol:111
      // Read through check 7 //  // > CustomCode.revealSol:112
      if (check7a==true){ maxIterations = 5000000;    // let it load longer  // > CustomCode.revealSol:113
        _update();  // > CustomCode.revealSol:114
        let equalityEnergies = [finalC, finalE, finalG, finalI, finalK, finalN];  // > CustomCode.revealSol:115
        for (let i=0; i < equalityEnergies; i++){  // ID is same as finTotalEnergy  // > CustomCode.revealSol:116
          finTotalEnergy[i] = Math.round( equalityEnergies[i] );  // > CustomCode.revealSol:117
          }  // > CustomCode.revealSol:118
        }  // > CustomCode.revealSol:119
      // Check if all variables meet the criteria  // > CustomCode.revealSol:120
      try{  // > CustomCode.revealSol:121
        answers1();  // > CustomCode.revealSol:122
        loopCount++;  // > CustomCode.revealSol:123
        if (loopCount >= maxIterations) {throw new Error("Maximum iteration limit reached, exiting loop.");}  // > CustomCode.revealSol:124
        if (updateAnswer ==1)  {break;}  // > CustomCode.revealSol:125
        } catch (error){alert("Error in generating answer key. Please refresh browser and try again.");break;}  // > CustomCode.revealSol:126
      }  // > CustomCode.revealSol:127
    }  // > CustomCode.revealSol:128

  function roundTheLst(lst){  // > CustomCode.roundTheLst:1
    for (let i=0; i<lst.length; i++){  // > CustomCode.roundTheLst:2
      lst[i] = Math.round(lst[i]);  // > CustomCode.roundTheLst:3
      }  // > CustomCode.roundTheLst:4
    return lst  // > CustomCode.roundTheLst:5
  }  // > CustomCode.roundTheLst:6
  function oneTrueLst(lst,element){         // used on interactPrompt lst   // > CustomCode.roundTheLst:7
    for (let i=0; i<lst.length; i++){  // > CustomCode.roundTheLst:8
      lst[i] = false;  // > CustomCode.roundTheLst:9
      if (i==element){  lst[i] = true  };  // > CustomCode.roundTheLst:10
      }  // > CustomCode.roundTheLst:11
    }  // > CustomCode.roundTheLst:12
  function numberedLst(number) {  // > CustomCode.roundTheLst:13
    let lst = [];  // > CustomCode.roundTheLst:14
    // Populate the list with negative numbers if number is negative  // > CustomCode.roundTheLst:15
    if (number < 0) {  // > CustomCode.roundTheLst:16
      for (let i = -1; i >= number; i--) {  // > CustomCode.roundTheLst:17
        lst.push(i);  // > CustomCode.roundTheLst:18
      }  // > CustomCode.roundTheLst:19
    }  // > CustomCode.roundTheLst:20
    // Append positive numbers starting from 1 up to the absolute value of the input number  // > CustomCode.roundTheLst:21
    for (let i = 0; i < Math.floor(number); i++) {  // > CustomCode.roundTheLst:22
      lst.push(i);  // > CustomCode.roundTheLst:23
    }  // > CustomCode.roundTheLst:24
    return lst;  // > CustomCode.roundTheLst:25
  }  // > CustomCode.roundTheLst:26
  /*  // > CustomCode.roundTheLst:27
  function numberedLst(number){          // used in iconsPicts (L)  // > CustomCode.roundTheLst:28
    lst = [];  // > CustomCode.roundTheLst:29
    for (let i=0; i < Math.floor(number); i++){  // > CustomCode.roundTheLst:30
      lst.push(i);  // > CustomCode.roundTheLst:31
      }  // > CustomCode.roundTheLst:32
    //alert(lst);  // > CustomCode.roundTheLst:33
    return lst    // return [0,1,2, ...]  // > CustomCode.roundTheLst:34
    }  // > CustomCode.roundTheLst:35
  */  // > CustomCode.roundTheLst:36
  function numberedLstFromX(number,X){  // used in iconsPicts (O)  // > CustomCode.roundTheLst:37
    lst = numberedLst(number);  // > CustomCode.roundTheLst:38
    for (let i=0; i < lst.length; i++){  // > CustomCode.roundTheLst:39
      lst[i] = lst[i] + X;   // > CustomCode.roundTheLst:40
      }  // > CustomCode.roundTheLst:41
    //alert(lst)  // > CustomCode.roundTheLst:42
    return lst    // return [X,X+1, ...]  // > CustomCode.roundTheLst:43
    }  // > CustomCode.roundTheLst:44
      // > CustomCode.roundTheLst:45
  function allFalseLst(lst){          // used the check7 for checkLst  // > CustomCode.roundTheLst:46
    for (let i=0; i<lst.length; i++){  // > CustomCode.roundTheLst:47
      if (lst[i] == true){return false}  // > CustomCode.roundTheLst:48
      }  // > CustomCode.roundTheLst:49
    debuggg += "\ninside allFalseLst"  // > CustomCode.roundTheLst:50
    return true  // > CustomCode.roundTheLst:51
    }  // > CustomCode.roundTheLst:52
      // > CustomCode.roundTheLst:53
  /////////////////////////////////////  Function serves to label the  // > CustomCode.roundTheLst:54
  // specifically for trans_Text (O) //  trans_Text where ID=0 gives   // > CustomCode.roundTheLst:55
  /////////////////////////////////////  textLst[0] but img otherwise  // > CustomCode.roundTheLst:56
  // ERROR: (Text != ImageUrl)  →→→ FUNCTION NOT USED, IDEA DECLINED  →→→  just (T₁) will do  // > CustomCode.roundTheLst:57
  // :/ HtmlView / transIN_text / Text → % transIN[updateTransIN] %  // > CustomCode.roundTheLst:58
  // → % textToImgLst(transIN, imgIN, updateTransIN) %  // > CustomCode.roundTheLst:59
  function textToImgLst(textLst, imgLst, updateID){    // > CustomCode.roundTheLst:60
    if (updateID==0){return textLst[updateID]}  // > CustomCode.roundTheLst:61
    else  {return imgLst[updateID]}  // > CustomCode.roundTheLst:62
    }  // > CustomCode.roundTheLst:63

  (function (global, factory) {  // > CustomCode.FileSaver:1
    if (typeof define === "function" && define.amd) {  // > CustomCode.FileSaver:2
      define([], factory);  // > CustomCode.FileSaver:3
    } else if (typeof exports !== "undefined") {  // > CustomCode.FileSaver:4
      factory();  // > CustomCode.FileSaver:5
    } else {  // > CustomCode.FileSaver:6
      var mod = {  // > CustomCode.FileSaver:7
        exports: {}  // > CustomCode.FileSaver:8
      };  // > CustomCode.FileSaver:9
      factory();  // > CustomCode.FileSaver:10
      global.FileSaver = mod.exports;  // > CustomCode.FileSaver:11
    }  // > CustomCode.FileSaver:12
  })(this, function () {  // > CustomCode.FileSaver:13
    "use strict";  // > CustomCode.FileSaver:14
    /*  // > CustomCode.FileSaver:15
    * FileSaver.js  // > CustomCode.FileSaver:16
    * A saveAs() FileSaver implementation.  // > CustomCode.FileSaver:17
    *  // > CustomCode.FileSaver:18
    * By Eli Grey, http://eligrey.com  // > CustomCode.FileSaver:19
    *  // > CustomCode.FileSaver:20
    * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)  // > CustomCode.FileSaver:21
    * source  : http://purl.eligrey.com/github/FileSaver.js  // > CustomCode.FileSaver:22
    */  // > CustomCode.FileSaver:23
    // The one and only way of getting global scope in all environments  // > CustomCode.FileSaver:24
    // https://stackoverflow.com/q/3277182/1008999  // > CustomCode.FileSaver:25
    var _global = typeof window === 'object' && window.window === window ? window : typeof self === 'object' && self.self === self ? self : typeof global === 'object' && global.global === global ? global : void 0;  // > CustomCode.FileSaver:26
    function bom(blob, opts) {  // > CustomCode.FileSaver:27
      if (typeof opts === 'undefined') opts = {  // > CustomCode.FileSaver:28
        autoBom: false  // > CustomCode.FileSaver:29
      };else if (typeof opts !== 'object') {  // > CustomCode.FileSaver:30
        console.warn('Deprecated: Expected third argument to be a object');  // > CustomCode.FileSaver:31
        opts = {  // > CustomCode.FileSaver:32
          autoBom: !opts  // > CustomCode.FileSaver:33
        };  // > CustomCode.FileSaver:34
      } // prepend BOM for UTF-8 XML and text/* types (including HTML)  // > CustomCode.FileSaver:35
      // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF  // > CustomCode.FileSaver:36
      if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {  // > CustomCode.FileSaver:37
        return new Blob([String.fromCharCode(0xFEFF), blob], {  // > CustomCode.FileSaver:38
          type: blob.type  // > CustomCode.FileSaver:39
        });  // > CustomCode.FileSaver:40
      }  // > CustomCode.FileSaver:41
      return blob;  // > CustomCode.FileSaver:42
    }  // > CustomCode.FileSaver:43
    function download(url, name, opts) {  // > CustomCode.FileSaver:44
      var xhr = new XMLHttpRequest();  // > CustomCode.FileSaver:45
      xhr.open('GET', url);  // > CustomCode.FileSaver:46
      xhr.responseType = 'blob';  // > CustomCode.FileSaver:47
      xhr.onload = function () {  // > CustomCode.FileSaver:48
        saveAs(xhr.response, name, opts);  // > CustomCode.FileSaver:49
      };  // > CustomCode.FileSaver:50
      xhr.onerror = function () {  // > CustomCode.FileSaver:51
        console.error('could not download file');  // > CustomCode.FileSaver:52
      };  // > CustomCode.FileSaver:53
      xhr.send();  // > CustomCode.FileSaver:54
    }  // > CustomCode.FileSaver:55
    function corsEnabled(url) {  // > CustomCode.FileSaver:56
      var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker  // > CustomCode.FileSaver:57
      xhr.open('HEAD', url, false);  // > CustomCode.FileSaver:58
      try {  // > CustomCode.FileSaver:59
        xhr.send();  // > CustomCode.FileSaver:60
      } catch (e) {}  // > CustomCode.FileSaver:61
      return xhr.status >= 200 && xhr.status <= 299;  // > CustomCode.FileSaver:62
    } // `a.click()` doesn't work for all browsers (#465)  // > CustomCode.FileSaver:63
    function click(node) {  // > CustomCode.FileSaver:64
      try {  // > CustomCode.FileSaver:65
        node.dispatchEvent(new MouseEvent('click'));  // > CustomCode.FileSaver:66
      } catch (e) {  // > CustomCode.FileSaver:67
        var evt = document.createEvent('MouseEvents');  // > CustomCode.FileSaver:68
        evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);  // > CustomCode.FileSaver:69
        node.dispatchEvent(evt);  // > CustomCode.FileSaver:70
      }  // > CustomCode.FileSaver:71
    } // Detect WebView inside a native macOS app by ruling out all browsers  // > CustomCode.FileSaver:72
    // We just need to check for 'Safari' because all other browsers (besides Firefox) include that too  // > CustomCode.FileSaver:73
    // https://www.whatismybrowser.com/guides/the-latest-user-agent/macos  // > CustomCode.FileSaver:74
    var isMacOSWebView = /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent);  // > CustomCode.FileSaver:75
    var saveAs = _global.saveAs || ( // probably in some web worker  // > CustomCode.FileSaver:76
    typeof window !== 'object' || window !== _global ? function saveAs() {}  // > CustomCode.FileSaver:77
    /* noop */  // > CustomCode.FileSaver:78
    // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView  // > CustomCode.FileSaver:79
    : 'download' in HTMLAnchorElement.prototype && !isMacOSWebView ? function saveAs(blob, name, opts) {  // > CustomCode.FileSaver:80
      var URL = _global.URL || _global.webkitURL;  // > CustomCode.FileSaver:81
      var a = document.createElement('a');  // > CustomCode.FileSaver:82
      name = name || blob.name || 'download';  // > CustomCode.FileSaver:83
      a.download = name;  // > CustomCode.FileSaver:84
      a.rel = 'noopener'; // tabnabbing  // > CustomCode.FileSaver:85
      // TODO: detect chrome extensions & packaged apps  // > CustomCode.FileSaver:86
      // a.target = '_blank'  // > CustomCode.FileSaver:87
      if (typeof blob === 'string') {  // > CustomCode.FileSaver:88
        // Support regular links  // > CustomCode.FileSaver:89
        a.href = blob;  // > CustomCode.FileSaver:90
        if (a.origin !== location.origin) {  // > CustomCode.FileSaver:91
          corsEnabled(a.href) ? download(blob, name, opts) : click(a, a.target = '_blank');  // > CustomCode.FileSaver:92
        } else {  // > CustomCode.FileSaver:93
          click(a);  // > CustomCode.FileSaver:94
        }  // > CustomCode.FileSaver:95
      } else {  // > CustomCode.FileSaver:96
        // Support blobs  // > CustomCode.FileSaver:97
        a.href = URL.createObjectURL(blob);  // > CustomCode.FileSaver:98
        setTimeout(function () {  // > CustomCode.FileSaver:99
          URL.revokeObjectURL(a.href);  // > CustomCode.FileSaver:100
        }, 4E4); // 40s  // > CustomCode.FileSaver:101
        setTimeout(function () {  // > CustomCode.FileSaver:102
          click(a);  // > CustomCode.FileSaver:103
        }, 0);  // > CustomCode.FileSaver:104
      }  // > CustomCode.FileSaver:105
    } // Use msSaveOrOpenBlob as a second approach  // > CustomCode.FileSaver:106
    : 'msSaveOrOpenBlob' in navigator ? function saveAs(blob, name, opts) {  // > CustomCode.FileSaver:107
      name = name || blob.name || 'download';  // > CustomCode.FileSaver:108
      if (typeof blob === 'string') {  // > CustomCode.FileSaver:109
        if (corsEnabled(blob)) {  // > CustomCode.FileSaver:110
          download(blob, name, opts);  // > CustomCode.FileSaver:111
        } else {  // > CustomCode.FileSaver:112
          var a = document.createElement('a');  // > CustomCode.FileSaver:113
          a.href = blob;  // > CustomCode.FileSaver:114
          a.target = '_blank';  // > CustomCode.FileSaver:115
          setTimeout(function () {  // > CustomCode.FileSaver:116
            click(a);  // > CustomCode.FileSaver:117
          });  // > CustomCode.FileSaver:118
        }  // > CustomCode.FileSaver:119
      } else {  // > CustomCode.FileSaver:120
        navigator.msSaveOrOpenBlob(bom(blob, opts), name);  // > CustomCode.FileSaver:121
      }  // > CustomCode.FileSaver:122
    } // Fallback to using FileReader and a popup  // > CustomCode.FileSaver:123
    : function saveAs(blob, name, opts, popup) {  // > CustomCode.FileSaver:124
      // Open a popup immediately do go around popup blocker  // > CustomCode.FileSaver:125
      // Mostly only available on user interaction and the fileReader is async so...  // > CustomCode.FileSaver:126
      popup = popup || open('', '_blank');  // > CustomCode.FileSaver:127
      if (popup) {  // > CustomCode.FileSaver:128
        popup.document.title = popup.document.body.innerText = 'downloading...';  // > CustomCode.FileSaver:129
      }  // > CustomCode.FileSaver:130
      if (typeof blob === 'string') return download(blob, name, opts);  // > CustomCode.FileSaver:131
      var force = blob.type === 'application/octet-stream';  // > CustomCode.FileSaver:132
      var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari;  // > CustomCode.FileSaver:133
      var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);  // > CustomCode.FileSaver:134
      if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== 'undefined') {  // > CustomCode.FileSaver:135
        // Safari doesn't allow downloading of blob URLs  // > CustomCode.FileSaver:136
        var reader = new FileReader();  // > CustomCode.FileSaver:137
        reader.onloadend = function () {  // > CustomCode.FileSaver:138
          var url = reader.result;  // > CustomCode.FileSaver:139
          url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;');  // > CustomCode.FileSaver:140
          if (popup) popup.location.href = url;else location = url;  // > CustomCode.FileSaver:141
          popup = null; // reverse-tabnabbing #460  // > CustomCode.FileSaver:142
        };  // > CustomCode.FileSaver:143
        reader.readAsDataURL(blob);  // > CustomCode.FileSaver:144
      } else {  // > CustomCode.FileSaver:145
        var URL = _global.URL || _global.webkitURL;  // > CustomCode.FileSaver:146
        var url = URL.createObjectURL(blob);  // > CustomCode.FileSaver:147
        if (popup) popup.location = url;else location.href = url;  // > CustomCode.FileSaver:148
        popup = null; // reverse-tabnabbing #460  // > CustomCode.FileSaver:149
        setTimeout(function () {  // > CustomCode.FileSaver:150
          URL.revokeObjectURL(url);  // > CustomCode.FileSaver:151
        }, 4E4); // 40s  // > CustomCode.FileSaver:152
      }  // > CustomCode.FileSaver:153
    });  // > CustomCode.FileSaver:154
    _global.saveAs = saveAs.saveAs = saveAs;  // > CustomCode.FileSaver:155
    if (typeof module !== 'undefined') {  // > CustomCode.FileSaver:156
      module.exports = saveAs;  // > CustomCode.FileSaver:157
    }  // > CustomCode.FileSaver:158
  });  // > CustomCode.FileSaver:159

  /*!  // > CustomCode.jszip:1
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files  // > CustomCode.jszip:2
  <http://stuartk.com/jszip>  // > CustomCode.jszip:3
  (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>  // > CustomCode.jszip:4
  Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.  // > CustomCode.jszip:5
  JSZip uses the library pako released under the MIT license :  // > CustomCode.jszip:6
  https://github.com/nodeca/pako/blob/main/LICENSE  // > CustomCode.jszip:7
  */  // > CustomCode.jszip:8
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSZip = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){  // > CustomCode.jszip:9
  "use strict";  // > CustomCode.jszip:10
  var utils = require("./utils");  // > CustomCode.jszip:11
  var support = require("./support");  // > CustomCode.jszip:12
  // private property  // > CustomCode.jszip:13
  var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";  // > CustomCode.jszip:14
  // public method for encoding  // > CustomCode.jszip:15
  exports.encode = function(input) {  // > CustomCode.jszip:16
      var output = [];  // > CustomCode.jszip:17
      var chr1, chr2, chr3, enc1, enc2, enc3, enc4;  // > CustomCode.jszip:18
      var i = 0, len = input.length, remainingBytes = len;  // > CustomCode.jszip:19
      var isArray = utils.getTypeOf(input) !== "string";  // > CustomCode.jszip:20
      while (i < input.length) {  // > CustomCode.jszip:21
          remainingBytes = len - i;  // > CustomCode.jszip:22
          if (!isArray) {  // > CustomCode.jszip:23
              chr1 = input.charCodeAt(i++);  // > CustomCode.jszip:24
              chr2 = i < len ? input.charCodeAt(i++) : 0;  // > CustomCode.jszip:25
              chr3 = i < len ? input.charCodeAt(i++) : 0;  // > CustomCode.jszip:26
          } else {  // > CustomCode.jszip:27
              chr1 = input[i++];  // > CustomCode.jszip:28
              chr2 = i < len ? input[i++] : 0;  // > CustomCode.jszip:29
              chr3 = i < len ? input[i++] : 0;  // > CustomCode.jszip:30
          }  // > CustomCode.jszip:31
          enc1 = chr1 >> 2;  // > CustomCode.jszip:32
          enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);  // > CustomCode.jszip:33
          enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64;  // > CustomCode.jszip:34
          enc4 = remainingBytes > 2 ? (chr3 & 63) : 64;  // > CustomCode.jszip:35
          output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4));  // > CustomCode.jszip:36
      }  // > CustomCode.jszip:37
      return output.join("");  // > CustomCode.jszip:38
  };  // > CustomCode.jszip:39
  // public method for decoding  // > CustomCode.jszip:40
  exports.decode = function(input) {  // > CustomCode.jszip:41
      var chr1, chr2, chr3;  // > CustomCode.jszip:42
      var enc1, enc2, enc3, enc4;  // > CustomCode.jszip:43
      var i = 0, resultIndex = 0;  // > CustomCode.jszip:44
      var dataUrlPrefix = "data:";  // > CustomCode.jszip:45
      if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) {  // > CustomCode.jszip:46
          // This is a common error: people give a data url  // > CustomCode.jszip:47
          // (data:image/png;base64,iVBOR...) with a {base64: true} and  // > CustomCode.jszip:48
          // wonders why things don't work.  // > CustomCode.jszip:49
          // We can detect that the string input looks like a data url but we  // > CustomCode.jszip:50
          // *can't* be sure it is one: removing everything up to the comma would  // > CustomCode.jszip:51
          // be too dangerous.  // > CustomCode.jszip:52
          throw new Error("Invalid base64 input, it looks like a data url.");  // > CustomCode.jszip:53
      }  // > CustomCode.jszip:54
      input = input.replace(/[^A-Za-z0-9+/=]/g, "");  // > CustomCode.jszip:55
      var totalLength = input.length * 3 / 4;  // > CustomCode.jszip:56
      if(input.charAt(input.length - 1) === _keyStr.charAt(64)) {  // > CustomCode.jszip:57
          totalLength--;  // > CustomCode.jszip:58
      }  // > CustomCode.jszip:59
      if(input.charAt(input.length - 2) === _keyStr.charAt(64)) {  // > CustomCode.jszip:60
          totalLength--;  // > CustomCode.jszip:61
      }  // > CustomCode.jszip:62
      if (totalLength % 1 !== 0) {  // > CustomCode.jszip:63
          // totalLength is not an integer, the length does not match a valid  // > CustomCode.jszip:64
          // base64 content. That can happen if:  // > CustomCode.jszip:65
          // - the input is not a base64 content  // > CustomCode.jszip:66
          // - the input is *almost* a base64 content, with a extra chars at the  // > CustomCode.jszip:67
          //   beginning or at the end  // > CustomCode.jszip:68
          // - the input uses a base64 variant (base64url for example)  // > CustomCode.jszip:69
          throw new Error("Invalid base64 input, bad content length.");  // > CustomCode.jszip:70
      }  // > CustomCode.jszip:71
      var output;  // > CustomCode.jszip:72
      if (support.uint8array) {  // > CustomCode.jszip:73
          output = new Uint8Array(totalLength|0);  // > CustomCode.jszip:74
      } else {  // > CustomCode.jszip:75
          output = new Array(totalLength|0);  // > CustomCode.jszip:76
      }  // > CustomCode.jszip:77
      while (i < input.length) {  // > CustomCode.jszip:78
          enc1 = _keyStr.indexOf(input.charAt(i++));  // > CustomCode.jszip:79
          enc2 = _keyStr.indexOf(input.charAt(i++));  // > CustomCode.jszip:80
          enc3 = _keyStr.indexOf(input.charAt(i++));  // > CustomCode.jszip:81
          enc4 = _keyStr.indexOf(input.charAt(i++));  // > CustomCode.jszip:82
          chr1 = (enc1 << 2) | (enc2 >> 4);  // > CustomCode.jszip:83
          chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);  // > CustomCode.jszip:84
          chr3 = ((enc3 & 3) << 6) | enc4;  // > CustomCode.jszip:85
          output[resultIndex++] = chr1;  // > CustomCode.jszip:86
          if (enc3 !== 64) {  // > CustomCode.jszip:87
              output[resultIndex++] = chr2;  // > CustomCode.jszip:88
          }  // > CustomCode.jszip:89
          if (enc4 !== 64) {  // > CustomCode.jszip:90
              output[resultIndex++] = chr3;  // > CustomCode.jszip:91
          }  // > CustomCode.jszip:92
      }  // > CustomCode.jszip:93
      return output;  // > CustomCode.jszip:94
  };  // > CustomCode.jszip:95
  },{"./support":30,"./utils":32}],2:[function(require,module,exports){  // > CustomCode.jszip:96
  "use strict";  // > CustomCode.jszip:97
  var external = require("./external");  // > CustomCode.jszip:98
  var DataWorker = require("./stream/DataWorker");  // > CustomCode.jszip:99
  var Crc32Probe = require("./stream/Crc32Probe");  // > CustomCode.jszip:100
  var DataLengthProbe = require("./stream/DataLengthProbe");  // > CustomCode.jszip:101
  /**  // > CustomCode.jszip:102
   * Represent a compressed object, with everything needed to decompress it.  // > CustomCode.jszip:103
   * @constructor  // > CustomCode.jszip:104
   * @param {number} compressedSize the size of the data compressed.  // > CustomCode.jszip:105
   * @param {number} uncompressedSize the size of the data after decompression.  // > CustomCode.jszip:106
   * @param {number} crc32 the crc32 of the decompressed file.  // > CustomCode.jszip:107
   * @param {object} compression the type of compression, see lib/compressions.js.  // > CustomCode.jszip:108
   * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data.  // > CustomCode.jszip:109
   */  // > CustomCode.jszip:110
  function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) {  // > CustomCode.jszip:111
      this.compressedSize = compressedSize;  // > CustomCode.jszip:112
      this.uncompressedSize = uncompressedSize;  // > CustomCode.jszip:113
      this.crc32 = crc32;  // > CustomCode.jszip:114
      this.compression = compression;  // > CustomCode.jszip:115
      this.compressedContent = data;  // > CustomCode.jszip:116
  }  // > CustomCode.jszip:117
  CompressedObject.prototype = {  // > CustomCode.jszip:118
      /**  // > CustomCode.jszip:119
       * Create a worker to get the uncompressed content.  // > CustomCode.jszip:120
       * @return {GenericWorker} the worker.  // > CustomCode.jszip:121
       */  // > CustomCode.jszip:122
      getContentWorker: function () {  // > CustomCode.jszip:123
          var worker = new DataWorker(external.Promise.resolve(this.compressedContent))  // > CustomCode.jszip:124
              .pipe(this.compression.uncompressWorker())  // > CustomCode.jszip:125
              .pipe(new DataLengthProbe("data_length"));  // > CustomCode.jszip:126
          var that = this;  // > CustomCode.jszip:127
          worker.on("end", function () {  // > CustomCode.jszip:128
              if (this.streamInfo["data_length"] !== that.uncompressedSize) {  // > CustomCode.jszip:129
                  throw new Error("Bug : uncompressed data size mismatch");  // > CustomCode.jszip:130
              }  // > CustomCode.jszip:131
          });  // > CustomCode.jszip:132
          return worker;  // > CustomCode.jszip:133
      },  // > CustomCode.jszip:134
      /**  // > CustomCode.jszip:135
       * Create a worker to get the compressed content.  // > CustomCode.jszip:136
       * @return {GenericWorker} the worker.  // > CustomCode.jszip:137
       */  // > CustomCode.jszip:138
      getCompressedWorker: function () {  // > CustomCode.jszip:139
          return new DataWorker(external.Promise.resolve(this.compressedContent))  // > CustomCode.jszip:140
              .withStreamInfo("compressedSize", this.compressedSize)  // > CustomCode.jszip:141
              .withStreamInfo("uncompressedSize", this.uncompressedSize)  // > CustomCode.jszip:142
              .withStreamInfo("crc32", this.crc32)  // > CustomCode.jszip:143
              .withStreamInfo("compression", this.compression)  // > CustomCode.jszip:144
          ;  // > CustomCode.jszip:145
      }  // > CustomCode.jszip:146
  };  // > CustomCode.jszip:147
  /**  // > CustomCode.jszip:148
   * Chain the given worker with other workers to compress the content with the  // > CustomCode.jszip:149
   * given compression.  // > CustomCode.jszip:150
   * @param {GenericWorker} uncompressedWorker the worker to pipe.  // > CustomCode.jszip:151
   * @param {Object} compression the compression object.  // > CustomCode.jszip:152
   * @param {Object} compressionOptions the options to use when compressing.  // > CustomCode.jszip:153
   * @return {GenericWorker} the new worker compressing the content.  // > CustomCode.jszip:154
   */  // > CustomCode.jszip:155
  CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) {  // > CustomCode.jszip:156
      return uncompressedWorker  // > CustomCode.jszip:157
          .pipe(new Crc32Probe())  // > CustomCode.jszip:158
          .pipe(new DataLengthProbe("uncompressedSize"))  // > CustomCode.jszip:159
          .pipe(compression.compressWorker(compressionOptions))  // > CustomCode.jszip:160
          .pipe(new DataLengthProbe("compressedSize"))  // > CustomCode.jszip:161
          .withStreamInfo("compression", compression);  // > CustomCode.jszip:162
  };  // > CustomCode.jszip:163
  module.exports = CompressedObject;  // > CustomCode.jszip:164
  },{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(require,module,exports){  // > CustomCode.jszip:165
  "use strict";  // > CustomCode.jszip:166
  var GenericWorker = require("./stream/GenericWorker");  // > CustomCode.jszip:167
  exports.STORE = {  // > CustomCode.jszip:168
      magic: "\x00\x00",  // > CustomCode.jszip:169
      compressWorker : function () {  // > CustomCode.jszip:170
          return new GenericWorker("STORE compression");  // > CustomCode.jszip:171
      },  // > CustomCode.jszip:172
      uncompressWorker : function () {  // > CustomCode.jszip:173
          return new GenericWorker("STORE decompression");  // > CustomCode.jszip:174
      }  // > CustomCode.jszip:175
  };  // > CustomCode.jszip:176
  exports.DEFLATE = require("./flate");  // > CustomCode.jszip:177
  },{"./flate":7,"./stream/GenericWorker":28}],4:[function(require,module,exports){  // > CustomCode.jszip:178
  "use strict";  // > CustomCode.jszip:179
  var utils = require("./utils");  // > CustomCode.jszip:180
  /**  // > CustomCode.jszip:181
   * The following functions come from pako, from pako/lib/zlib/crc32.js  // > CustomCode.jszip:182
   * released under the MIT license, see pako https://github.com/nodeca/pako/  // > CustomCode.jszip:183
   */  // > CustomCode.jszip:184
  // Use ordinary array, since untyped makes no boost here  // > CustomCode.jszip:185
  function makeTable() {  // > CustomCode.jszip:186
      var c, table = [];  // > CustomCode.jszip:187
      for(var n =0; n < 256; n++){  // > CustomCode.jszip:188
          c = n;  // > CustomCode.jszip:189
          for(var k =0; k < 8; k++){  // > CustomCode.jszip:190
              c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));  // > CustomCode.jszip:191
          }  // > CustomCode.jszip:192
          table[n] = c;  // > CustomCode.jszip:193
      }  // > CustomCode.jszip:194
      return table;  // > CustomCode.jszip:195
  }  // > CustomCode.jszip:196
  // Create table on load. Just 255 signed longs. Not a problem.  // > CustomCode.jszip:197
  var crcTable = makeTable();  // > CustomCode.jszip:198
  function crc32(crc, buf, len, pos) {  // > CustomCode.jszip:199
      var t = crcTable, end = pos + len;  // > CustomCode.jszip:200
      crc = crc ^ (-1);  // > CustomCode.jszip:201
      for (var i = pos; i < end; i++ ) {  // > CustomCode.jszip:202
          crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];  // > CustomCode.jszip:203
      }  // > CustomCode.jszip:204
      return (crc ^ (-1)); // >>> 0;  // > CustomCode.jszip:205
  }  // > CustomCode.jszip:206
  // That's all for the pako functions.  // > CustomCode.jszip:207
  /**  // > CustomCode.jszip:208
   * Compute the crc32 of a string.  // > CustomCode.jszip:209
   * This is almost the same as the function crc32, but for strings. Using the  // > CustomCode.jszip:210
   * same function for the two use cases leads to horrible performances.  // > CustomCode.jszip:211
   * @param {Number} crc the starting value of the crc.  // > CustomCode.jszip:212
   * @param {String} str the string to use.  // > CustomCode.jszip:213
   * @param {Number} len the length of the string.  // > CustomCode.jszip:214
   * @param {Number} pos the starting position for the crc32 computation.  // > CustomCode.jszip:215
   * @return {Number} the computed crc32.  // > CustomCode.jszip:216
   */  // > CustomCode.jszip:217
  function crc32str(crc, str, len, pos) {  // > CustomCode.jszip:218
      var t = crcTable, end = pos + len;  // > CustomCode.jszip:219
      crc = crc ^ (-1);  // > CustomCode.jszip:220
      for (var i = pos; i < end; i++ ) {  // > CustomCode.jszip:221
          crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF];  // > CustomCode.jszip:222
      }  // > CustomCode.jszip:223
      return (crc ^ (-1)); // >>> 0;  // > CustomCode.jszip:224
  }  // > CustomCode.jszip:225
  module.exports = function crc32wrapper(input, crc) {  // > CustomCode.jszip:226
      if (typeof input === "undefined" || !input.length) {  // > CustomCode.jszip:227
          return 0;  // > CustomCode.jszip:228
      }  // > CustomCode.jszip:229
      var isArray = utils.getTypeOf(input) !== "string";  // > CustomCode.jszip:230
      if(isArray) {  // > CustomCode.jszip:231
          return crc32(crc|0, input, input.length, 0);  // > CustomCode.jszip:232
      } else {  // > CustomCode.jszip:233
          return crc32str(crc|0, input, input.length, 0);  // > CustomCode.jszip:234
      }  // > CustomCode.jszip:235
  };  // > CustomCode.jszip:236
  },{"./utils":32}],5:[function(require,module,exports){  // > CustomCode.jszip:237
  "use strict";  // > CustomCode.jszip:238
  exports.base64 = false;  // > CustomCode.jszip:239
  exports.binary = false;  // > CustomCode.jszip:240
  exports.dir = false;  // > CustomCode.jszip:241
  exports.createFolders = true;  // > CustomCode.jszip:242
  exports.date = null;  // > CustomCode.jszip:243
  exports.compression = null;  // > CustomCode.jszip:244
  exports.compressionOptions = null;  // > CustomCode.jszip:245
  exports.comment = null;  // > CustomCode.jszip:246
  exports.unixPermissions = null;  // > CustomCode.jszip:247
  exports.dosPermissions = null;  // > CustomCode.jszip:248
  },{}],6:[function(require,module,exports){  // > CustomCode.jszip:249
  "use strict";  // > CustomCode.jszip:250
  // load the global object first:  // > CustomCode.jszip:251
  // - it should be better integrated in the system (unhandledRejection in node)  // > CustomCode.jszip:252
  // - the environment may have a custom Promise implementation (see zone.js)  // > CustomCode.jszip:253
  var ES6Promise = null;  // > CustomCode.jszip:254
  if (typeof Promise !== "undefined") {  // > CustomCode.jszip:255
      ES6Promise = Promise;  // > CustomCode.jszip:256
  } else {  // > CustomCode.jszip:257
      ES6Promise = require("lie");  // > CustomCode.jszip:258
  }  // > CustomCode.jszip:259
  /**  // > CustomCode.jszip:260
   * Let the user use/change some implementations.  // > CustomCode.jszip:261
   */  // > CustomCode.jszip:262
  module.exports = {  // > CustomCode.jszip:263
      Promise: ES6Promise  // > CustomCode.jszip:264
  };  // > CustomCode.jszip:265
  },{"lie":37}],7:[function(require,module,exports){  // > CustomCode.jszip:266
  "use strict";  // > CustomCode.jszip:267
  var USE_TYPEDARRAY = (typeof Uint8Array !== "undefined") && (typeof Uint16Array !== "undefined") && (typeof Uint32Array !== "undefined");  // > CustomCode.jszip:268
  var pako = require("pako");  // > CustomCode.jszip:269
  var utils = require("./utils");  // > CustomCode.jszip:270
  var GenericWorker = require("./stream/GenericWorker");  // > CustomCode.jszip:271
  var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array";  // > CustomCode.jszip:272
  exports.magic = "\x08\x00";  // > CustomCode.jszip:273
  /**  // > CustomCode.jszip:274
   * Create a worker that uses pako to inflate/deflate.  // > CustomCode.jszip:275
   * @constructor  // > CustomCode.jszip:276
   * @param {String} action the name of the pako function to call : either "Deflate" or "Inflate".  // > CustomCode.jszip:277
   * @param {Object} options the options to use when (de)compressing.  // > CustomCode.jszip:278
   */  // > CustomCode.jszip:279
  function FlateWorker(action, options) {  // > CustomCode.jszip:280
      GenericWorker.call(this, "FlateWorker/" + action);  // > CustomCode.jszip:281
      this._pako = null;  // > CustomCode.jszip:282
      this._pakoAction = action;  // > CustomCode.jszip:283
      this._pakoOptions = options;  // > CustomCode.jszip:284
      // the `meta` object from the last chunk received  // > CustomCode.jszip:285
      // this allow this worker to pass around metadata  // > CustomCode.jszip:286
      this.meta = {};  // > CustomCode.jszip:287
  }  // > CustomCode.jszip:288
  utils.inherits(FlateWorker, GenericWorker);  // > CustomCode.jszip:289
  /**  // > CustomCode.jszip:290
   * @see GenericWorker.processChunk  // > CustomCode.jszip:291
   */  // > CustomCode.jszip:292
  FlateWorker.prototype.processChunk = function (chunk) {  // > CustomCode.jszip:293
      this.meta = chunk.meta;  // > CustomCode.jszip:294
      if (this._pako === null) {  // > CustomCode.jszip:295
          this._createPako();  // > CustomCode.jszip:296
      }  // > CustomCode.jszip:297
      this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);  // > CustomCode.jszip:298
  };  // > CustomCode.jszip:299
  /**  // > CustomCode.jszip:300
   * @see GenericWorker.flush  // > CustomCode.jszip:301
   */  // > CustomCode.jszip:302
  FlateWorker.prototype.flush = function () {  // > CustomCode.jszip:303
      GenericWorker.prototype.flush.call(this);  // > CustomCode.jszip:304
      if (this._pako === null) {  // > CustomCode.jszip:305
          this._createPako();  // > CustomCode.jszip:306
      }  // > CustomCode.jszip:307
      this._pako.push([], true);  // > CustomCode.jszip:308
  };  // > CustomCode.jszip:309
  /**  // > CustomCode.jszip:310
   * @see GenericWorker.cleanUp  // > CustomCode.jszip:311
   */  // > CustomCode.jszip:312
  FlateWorker.prototype.cleanUp = function () {  // > CustomCode.jszip:313
      GenericWorker.prototype.cleanUp.call(this);  // > CustomCode.jszip:314
      this._pako = null;  // > CustomCode.jszip:315
  };  // > CustomCode.jszip:316
  /**  // > CustomCode.jszip:317
   * Create the _pako object.  // > CustomCode.jszip:318
   * TODO: lazy-loading this object isn't the best solution but it's the  // > CustomCode.jszip:319
   * quickest. The best solution is to lazy-load the worker list. See also the  // > CustomCode.jszip:320
   * issue #446.  // > CustomCode.jszip:321
   */  // > CustomCode.jszip:322
  FlateWorker.prototype._createPako = function () {  // > CustomCode.jszip:323
      this._pako = new pako[this._pakoAction]({  // > CustomCode.jszip:324
          raw: true,  // > CustomCode.jszip:325
          level: this._pakoOptions.level || -1 // default compression  // > CustomCode.jszip:326
      });  // > CustomCode.jszip:327
      var self = this;  // > CustomCode.jszip:328
      this._pako.onData = function(data) {  // > CustomCode.jszip:329
          self.push({  // > CustomCode.jszip:330
              data : data,  // > CustomCode.jszip:331
              meta : self.meta  // > CustomCode.jszip:332
          });  // > CustomCode.jszip:333
      };  // > CustomCode.jszip:334
  };  // > CustomCode.jszip:335
  exports.compressWorker = function (compressionOptions) {  // > CustomCode.jszip:336
      return new FlateWorker("Deflate", compressionOptions);  // > CustomCode.jszip:337
  };  // > CustomCode.jszip:338
  exports.uncompressWorker = function () {  // > CustomCode.jszip:339
      return new FlateWorker("Inflate", {});  // > CustomCode.jszip:340
  };  // > CustomCode.jszip:341
  },{"./stream/GenericWorker":28,"./utils":32,"pako":38}],8:[function(require,module,exports){  // > CustomCode.jszip:342
  "use strict";  // > CustomCode.jszip:343
  var utils = require("../utils");  // > CustomCode.jszip:344
  var GenericWorker = require("../stream/GenericWorker");  // > CustomCode.jszip:345
  var utf8 = require("../utf8");  // > CustomCode.jszip:346
  var crc32 = require("../crc32");  // > CustomCode.jszip:347
  var signature = require("../signature");  // > CustomCode.jszip:348
  /**  // > CustomCode.jszip:349
   * Transform an integer into a string in hexadecimal.  // > CustomCode.jszip:350
   * @private  // > CustomCode.jszip:351
   * @param {number} dec the number to convert.  // > CustomCode.jszip:352
   * @param {number} bytes the number of bytes to generate.  // > CustomCode.jszip:353
   * @returns {string} the result.  // > CustomCode.jszip:354
   */  // > CustomCode.jszip:355
  var decToHex = function(dec, bytes) {  // > CustomCode.jszip:356
      var hex = "", i;  // > CustomCode.jszip:357
      for (i = 0; i < bytes; i++) {  // > CustomCode.jszip:358
          hex += String.fromCharCode(dec & 0xff);  // > CustomCode.jszip:359
          dec = dec >>> 8;  // > CustomCode.jszip:360
      }  // > CustomCode.jszip:361
      return hex;  // > CustomCode.jszip:362
  };  // > CustomCode.jszip:363
  /**  // > CustomCode.jszip:364
   * Generate the UNIX part of the external file attributes.  // > CustomCode.jszip:365
   * @param {Object} unixPermissions the unix permissions or null.  // > CustomCode.jszip:366
   * @param {Boolean} isDir true if the entry is a directory, false otherwise.  // > CustomCode.jszip:367
   * @return {Number} a 32 bit integer.  // > CustomCode.jszip:368
   *  // > CustomCode.jszip:369
   * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :  // > CustomCode.jszip:370
   *  // > CustomCode.jszip:371
   * TTTTsstrwxrwxrwx0000000000ADVSHR  // > CustomCode.jszip:372
   * ^^^^____________________________ file type, see zipinfo.c (UNX_*)  // > CustomCode.jszip:373
   *     ^^^_________________________ setuid, setgid, sticky  // > CustomCode.jszip:374
   *        ^^^^^^^^^________________ permissions  // > CustomCode.jszip:375
   *                 ^^^^^^^^^^______ not used ?  // > CustomCode.jszip:376
   *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only  // > CustomCode.jszip:377
   */  // > CustomCode.jszip:378
  var generateUnixExternalFileAttr = function (unixPermissions, isDir) {  // > CustomCode.jszip:379
      var result = unixPermissions;  // > CustomCode.jszip:380
      if (!unixPermissions) {  // > CustomCode.jszip:381
          // I can't use octal values in strict mode, hence the hexa.  // > CustomCode.jszip:382
          //  040775 => 0x41fd  // > CustomCode.jszip:383
          // 0100664 => 0x81b4  // > CustomCode.jszip:384
          result = isDir ? 0x41fd : 0x81b4;  // > CustomCode.jszip:385
      }  // > CustomCode.jszip:386
      return (result & 0xFFFF) << 16;  // > CustomCode.jszip:387
  };  // > CustomCode.jszip:388
  /**  // > CustomCode.jszip:389
   * Generate the DOS part of the external file attributes.  // > CustomCode.jszip:390
   * @param {Object} dosPermissions the dos permissions or null.  // > CustomCode.jszip:391
   * @param {Boolean} isDir true if the entry is a directory, false otherwise.  // > CustomCode.jszip:392
   * @return {Number} a 32 bit integer.  // > CustomCode.jszip:393
   *  // > CustomCode.jszip:394
   * Bit 0     Read-Only  // > CustomCode.jszip:395
   * Bit 1     Hidden  // > CustomCode.jszip:396
   * Bit 2     System  // > CustomCode.jszip:397
   * Bit 3     Volume Label  // > CustomCode.jszip:398
   * Bit 4     Directory  // > CustomCode.jszip:399
   * Bit 5     Archive  // > CustomCode.jszip:400
   */  // > CustomCode.jszip:401
  var generateDosExternalFileAttr = function (dosPermissions) {  // > CustomCode.jszip:402
      // the dir flag is already set for compatibility  // > CustomCode.jszip:403
      return (dosPermissions || 0)  & 0x3F;  // > CustomCode.jszip:404
  };  // > CustomCode.jszip:405
  /**  // > CustomCode.jszip:406
   * Generate the various parts used in the construction of the final zip file.  // > CustomCode.jszip:407
   * @param {Object} streamInfo the hash with information about the compressed file.  // > CustomCode.jszip:408
   * @param {Boolean} streamedContent is the content streamed ?  // > CustomCode.jszip:409
   * @param {Boolean} streamingEnded is the stream finished ?  // > CustomCode.jszip:410
   * @param {number} offset the current offset from the start of the zip file.  // > CustomCode.jszip:411
   * @param {String} platform let's pretend we are this platform (change platform dependents fields)  // > CustomCode.jszip:412
   * @param {Function} encodeFileName the function to encode the file name / comment.  // > CustomCode.jszip:413
   * @return {Object} the zip parts.  // > CustomCode.jszip:414
   */  // > CustomCode.jszip:415
  var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {  // > CustomCode.jszip:416
      var file = streamInfo["file"],  // > CustomCode.jszip:417
          compression = streamInfo["compression"],  // > CustomCode.jszip:418
          useCustomEncoding = encodeFileName !== utf8.utf8encode,  // > CustomCode.jszip:419
          encodedFileName = utils.transformTo("string", encodeFileName(file.name)),  // > CustomCode.jszip:420
          utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)),  // > CustomCode.jszip:421
          comment = file.comment,  // > CustomCode.jszip:422
          encodedComment = utils.transformTo("string", encodeFileName(comment)),  // > CustomCode.jszip:423
          utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)),  // > CustomCode.jszip:424
          useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,  // > CustomCode.jszip:425
          useUTF8ForComment = utfEncodedComment.length !== comment.length,  // > CustomCode.jszip:426
          dosTime,  // > CustomCode.jszip:427
          dosDate,  // > CustomCode.jszip:428
          extraFields = "",  // > CustomCode.jszip:429
          unicodePathExtraField = "",  // > CustomCode.jszip:430
          unicodeCommentExtraField = "",  // > CustomCode.jszip:431
          dir = file.dir,  // > CustomCode.jszip:432
          date = file.date;  // > CustomCode.jszip:433
      var dataInfo = {  // > CustomCode.jszip:434
          crc32 : 0,  // > CustomCode.jszip:435
          compressedSize : 0,  // > CustomCode.jszip:436
          uncompressedSize : 0  // > CustomCode.jszip:437
      };  // > CustomCode.jszip:438
      // if the content is streamed, the sizes/crc32 are only available AFTER  // > CustomCode.jszip:439
      // the end of the stream.  // > CustomCode.jszip:440
      if (!streamedContent || streamingEnded) {  // > CustomCode.jszip:441
          dataInfo.crc32 = streamInfo["crc32"];  // > CustomCode.jszip:442
          dataInfo.compressedSize = streamInfo["compressedSize"];  // > CustomCode.jszip:443
          dataInfo.uncompressedSize = streamInfo["uncompressedSize"];  // > CustomCode.jszip:444
      }  // > CustomCode.jszip:445
      var bitflag = 0;  // > CustomCode.jszip:446
      if (streamedContent) {  // > CustomCode.jszip:447
          // Bit 3: the sizes/crc32 are set to zero in the local header.  // > CustomCode.jszip:448
          // The correct values are put in the data descriptor immediately  // > CustomCode.jszip:449
          // following the compressed data.  // > CustomCode.jszip:450
          bitflag |= 0x0008;  // > CustomCode.jszip:451
      }  // > CustomCode.jszip:452
      if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {  // > CustomCode.jszip:453
          // Bit 11: Language encoding flag (EFS).  // > CustomCode.jszip:454
          bitflag |= 0x0800;  // > CustomCode.jszip:455
      }  // > CustomCode.jszip:456
      var extFileAttr = 0;  // > CustomCode.jszip:457
      var versionMadeBy = 0;  // > CustomCode.jszip:458
      if (dir) {  // > CustomCode.jszip:459
          // dos or unix, we set the dos dir flag  // > CustomCode.jszip:460
          extFileAttr |= 0x00010;  // > CustomCode.jszip:461
      }  // > CustomCode.jszip:462
      if(platform === "UNIX") {  // > CustomCode.jszip:463
          versionMadeBy = 0x031E; // UNIX, version 3.0  // > CustomCode.jszip:464
          extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);  // > CustomCode.jszip:465
      } else { // DOS or other, fallback to DOS  // > CustomCode.jszip:466
          versionMadeBy = 0x0014; // DOS, version 2.0  // > CustomCode.jszip:467
          extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);  // > CustomCode.jszip:468
      }  // > CustomCode.jszip:469
      // date  // > CustomCode.jszip:470
      // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html  // > CustomCode.jszip:471
      // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html  // > CustomCode.jszip:472
      // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html  // > CustomCode.jszip:473
      dosTime = date.getUTCHours();  // > CustomCode.jszip:474
      dosTime = dosTime << 6;  // > CustomCode.jszip:475
      dosTime = dosTime | date.getUTCMinutes();  // > CustomCode.jszip:476
      dosTime = dosTime << 5;  // > CustomCode.jszip:477
      dosTime = dosTime | date.getUTCSeconds() / 2;  // > CustomCode.jszip:478
      dosDate = date.getUTCFullYear() - 1980;  // > CustomCode.jszip:479
      dosDate = dosDate << 4;  // > CustomCode.jszip:480
      dosDate = dosDate | (date.getUTCMonth() + 1);  // > CustomCode.jszip:481
      dosDate = dosDate << 5;  // > CustomCode.jszip:482
      dosDate = dosDate | date.getUTCDate();  // > CustomCode.jszip:483
      if (useUTF8ForFileName) {  // > CustomCode.jszip:484
          // set the unicode path extra field. unzip needs at least one extra  // > CustomCode.jszip:485
          // field to correctly handle unicode path, so using the path is as good  // > CustomCode.jszip:486
          // as any other information. This could improve the situation with  // > CustomCode.jszip:487
          // other archive managers too.  // > CustomCode.jszip:488
          // This field is usually used without the utf8 flag, with a non  // > CustomCode.jszip:489
          // unicode path in the header (winrar, winzip). This helps (a bit)  // > CustomCode.jszip:490
          // with the messy Windows' default compressed folders feature but  // > CustomCode.jszip:491
          // breaks on p7zip which doesn't seek the unicode path extra field.  // > CustomCode.jszip:492
          // So for now, UTF-8 everywhere !  // > CustomCode.jszip:493
          unicodePathExtraField =  // > CustomCode.jszip:494
              // Version  // > CustomCode.jszip:495
              decToHex(1, 1) +  // > CustomCode.jszip:496
              // NameCRC32  // > CustomCode.jszip:497
              decToHex(crc32(encodedFileName), 4) +  // > CustomCode.jszip:498
              // UnicodeName  // > CustomCode.jszip:499
              utfEncodedFileName;  // > CustomCode.jszip:500
          extraFields +=  // > CustomCode.jszip:501
              // Info-ZIP Unicode Path Extra Field  // > CustomCode.jszip:502
              "\x75\x70" +  // > CustomCode.jszip:503
              // size  // > CustomCode.jszip:504
              decToHex(unicodePathExtraField.length, 2) +  // > CustomCode.jszip:505
              // content  // > CustomCode.jszip:506
              unicodePathExtraField;  // > CustomCode.jszip:507
      }  // > CustomCode.jszip:508
      if(useUTF8ForComment) {  // > CustomCode.jszip:509
          unicodeCommentExtraField =  // > CustomCode.jszip:510
              // Version  // > CustomCode.jszip:511
              decToHex(1, 1) +  // > CustomCode.jszip:512
              // CommentCRC32  // > CustomCode.jszip:513
              decToHex(crc32(encodedComment), 4) +  // > CustomCode.jszip:514
              // UnicodeName  // > CustomCode.jszip:515
              utfEncodedComment;  // > CustomCode.jszip:516
          extraFields +=  // > CustomCode.jszip:517
              // Info-ZIP Unicode Path Extra Field  // > CustomCode.jszip:518
              "\x75\x63" +  // > CustomCode.jszip:519
              // size  // > CustomCode.jszip:520
              decToHex(unicodeCommentExtraField.length, 2) +  // > CustomCode.jszip:521
              // content  // > CustomCode.jszip:522
              unicodeCommentExtraField;  // > CustomCode.jszip:523
      }  // > CustomCode.jszip:524
      var header = "";  // > CustomCode.jszip:525
      // version needed to extract  // > CustomCode.jszip:526
      header += "\x0A\x00";  // > CustomCode.jszip:527
      // general purpose bit flag  // > CustomCode.jszip:528
      header += decToHex(bitflag, 2);  // > CustomCode.jszip:529
      // compression method  // > CustomCode.jszip:530
      header += compression.magic;  // > CustomCode.jszip:531
      // last mod file time  // > CustomCode.jszip:532
      header += decToHex(dosTime, 2);  // > CustomCode.jszip:533
      // last mod file date  // > CustomCode.jszip:534
      header += decToHex(dosDate, 2);  // > CustomCode.jszip:535
      // crc-32  // > CustomCode.jszip:536
      header += decToHex(dataInfo.crc32, 4);  // > CustomCode.jszip:537
      // compressed size  // > CustomCode.jszip:538
      header += decToHex(dataInfo.compressedSize, 4);  // > CustomCode.jszip:539
      // uncompressed size  // > CustomCode.jszip:540
      header += decToHex(dataInfo.uncompressedSize, 4);  // > CustomCode.jszip:541
      // file name length  // > CustomCode.jszip:542
      header += decToHex(encodedFileName.length, 2);  // > CustomCode.jszip:543
      // extra field length  // > CustomCode.jszip:544
      header += decToHex(extraFields.length, 2);  // > CustomCode.jszip:545
      var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;  // > CustomCode.jszip:546
      var dirRecord = signature.CENTRAL_FILE_HEADER +  // > CustomCode.jszip:547
          // version made by (00: DOS)  // > CustomCode.jszip:548
          decToHex(versionMadeBy, 2) +  // > CustomCode.jszip:549
          // file header (common to file and central directory)  // > CustomCode.jszip:550
          header +  // > CustomCode.jszip:551
          // file comment length  // > CustomCode.jszip:552
          decToHex(encodedComment.length, 2) +  // > CustomCode.jszip:553
          // disk number start  // > CustomCode.jszip:554
          "\x00\x00" +  // > CustomCode.jszip:555
          // internal file attributes TODO  // > CustomCode.jszip:556
          "\x00\x00" +  // > CustomCode.jszip:557
          // external file attributes  // > CustomCode.jszip:558
          decToHex(extFileAttr, 4) +  // > CustomCode.jszip:559
          // relative offset of local header  // > CustomCode.jszip:560
          decToHex(offset, 4) +  // > CustomCode.jszip:561
          // file name  // > CustomCode.jszip:562
          encodedFileName +  // > CustomCode.jszip:563
          // extra field  // > CustomCode.jszip:564
          extraFields +  // > CustomCode.jszip:565
          // file comment  // > CustomCode.jszip:566
          encodedComment;  // > CustomCode.jszip:567
      return {  // > CustomCode.jszip:568
          fileRecord: fileRecord,  // > CustomCode.jszip:569
          dirRecord: dirRecord  // > CustomCode.jszip:570
      };  // > CustomCode.jszip:571
  };  // > CustomCode.jszip:572
  /**  // > CustomCode.jszip:573
   * Generate the EOCD record.  // > CustomCode.jszip:574
   * @param {Number} entriesCount the number of entries in the zip file.  // > CustomCode.jszip:575
   * @param {Number} centralDirLength the length (in bytes) of the central dir.  // > CustomCode.jszip:576
   * @param {Number} localDirLength the length (in bytes) of the local dir.  // > CustomCode.jszip:577
   * @param {String} comment the zip file comment as a binary string.  // > CustomCode.jszip:578
   * @param {Function} encodeFileName the function to encode the comment.  // > CustomCode.jszip:579
   * @return {String} the EOCD record.  // > CustomCode.jszip:580
   */  // > CustomCode.jszip:581
  var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {  // > CustomCode.jszip:582
      var dirEnd = "";  // > CustomCode.jszip:583
      var encodedComment = utils.transformTo("string", encodeFileName(comment));  // > CustomCode.jszip:584
      // end of central dir signature  // > CustomCode.jszip:585
      dirEnd = signature.CENTRAL_DIRECTORY_END +  // > CustomCode.jszip:586
          // number of this disk  // > CustomCode.jszip:587
          "\x00\x00" +  // > CustomCode.jszip:588
          // number of the disk with the start of the central directory  // > CustomCode.jszip:589
          "\x00\x00" +  // > CustomCode.jszip:590
          // total number of entries in the central directory on this disk  // > CustomCode.jszip:591
          decToHex(entriesCount, 2) +  // > CustomCode.jszip:592
          // total number of entries in the central directory  // > CustomCode.jszip:593
          decToHex(entriesCount, 2) +  // > CustomCode.jszip:594
          // size of the central directory   4 bytes  // > CustomCode.jszip:595
          decToHex(centralDirLength, 4) +  // > CustomCode.jszip:596
          // offset of start of central directory with respect to the starting disk number  // > CustomCode.jszip:597
          decToHex(localDirLength, 4) +  // > CustomCode.jszip:598
          // .ZIP file comment length  // > CustomCode.jszip:599
          decToHex(encodedComment.length, 2) +  // > CustomCode.jszip:600
          // .ZIP file comment  // > CustomCode.jszip:601
          encodedComment;  // > CustomCode.jszip:602
      return dirEnd;  // > CustomCode.jszip:603
  };  // > CustomCode.jszip:604
  /**  // > CustomCode.jszip:605
   * Generate data descriptors for a file entry.  // > CustomCode.jszip:606
   * @param {Object} streamInfo the hash generated by a worker, containing information  // > CustomCode.jszip:607
   * on the file entry.  // > CustomCode.jszip:608
   * @return {String} the data descriptors.  // > CustomCode.jszip:609
   */  // > CustomCode.jszip:610
  var generateDataDescriptors = function (streamInfo) {  // > CustomCode.jszip:611
      var descriptor = "";  // > CustomCode.jszip:612
      descriptor = signature.DATA_DESCRIPTOR +  // > CustomCode.jszip:613
          // crc-32                          4 bytes  // > CustomCode.jszip:614
          decToHex(streamInfo["crc32"], 4) +  // > CustomCode.jszip:615
          // compressed size                 4 bytes  // > CustomCode.jszip:616
          decToHex(streamInfo["compressedSize"], 4) +  // > CustomCode.jszip:617
          // uncompressed size               4 bytes  // > CustomCode.jszip:618
          decToHex(streamInfo["uncompressedSize"], 4);  // > CustomCode.jszip:619
      return descriptor;  // > CustomCode.jszip:620
  };  // > CustomCode.jszip:621
  /**  // > CustomCode.jszip:622
   * A worker to concatenate other workers to create a zip file.  // > CustomCode.jszip:623
   * @param {Boolean} streamFiles `true` to stream the content of the files,  // > CustomCode.jszip:624
   * `false` to accumulate it.  // > CustomCode.jszip:625
   * @param {String} comment the comment to use.  // > CustomCode.jszip:626
   * @param {String} platform the platform to use, "UNIX" or "DOS".  // > CustomCode.jszip:627
   * @param {Function} encodeFileName the function to encode file names and comments.  // > CustomCode.jszip:628
   */  // > CustomCode.jszip:629
  function ZipFileWorker(streamFiles, comment, platform, encodeFileName) {  // > CustomCode.jszip:630
      GenericWorker.call(this, "ZipFileWorker");  // > CustomCode.jszip:631
      // The number of bytes written so far. This doesn't count accumulated chunks.  // > CustomCode.jszip:632
      this.bytesWritten = 0;  // > CustomCode.jszip:633
      // The comment of the zip file  // > CustomCode.jszip:634
      this.zipComment = comment;  // > CustomCode.jszip:635
      // The platform "generating" the zip file.  // > CustomCode.jszip:636
      this.zipPlatform = platform;  // > CustomCode.jszip:637
      // the function to encode file names and comments.  // > CustomCode.jszip:638
      this.encodeFileName = encodeFileName;  // > CustomCode.jszip:639
      // Should we stream the content of the files ?  // > CustomCode.jszip:640
      this.streamFiles = streamFiles;  // > CustomCode.jszip:641
      // If `streamFiles` is false, we will need to accumulate the content of the  // > CustomCode.jszip:642
      // files to calculate sizes / crc32 (and write them *before* the content).  // > CustomCode.jszip:643
      // This boolean indicates if we are accumulating chunks (it will change a lot  // > CustomCode.jszip:644
      // during the lifetime of this worker).  // > CustomCode.jszip:645
      this.accumulate = false;  // > CustomCode.jszip:646
      // The buffer receiving chunks when accumulating content.  // > CustomCode.jszip:647
      this.contentBuffer = [];  // > CustomCode.jszip:648
      // The list of generated directory records.  // > CustomCode.jszip:649
      this.dirRecords = [];  // > CustomCode.jszip:650
      // The offset (in bytes) from the beginning of the zip file for the current source.  // > CustomCode.jszip:651
      this.currentSourceOffset = 0;  // > CustomCode.jszip:652
      // The total number of entries in this zip file.  // > CustomCode.jszip:653
      this.entriesCount = 0;  // > CustomCode.jszip:654
      // the name of the file currently being added, null when handling the end of the zip file.  // > CustomCode.jszip:655
      // Used for the emitted metadata.  // > CustomCode.jszip:656
      this.currentFile = null;  // > CustomCode.jszip:657
      this._sources = [];  // > CustomCode.jszip:658
  }  // > CustomCode.jszip:659
  utils.inherits(ZipFileWorker, GenericWorker);  // > CustomCode.jszip:660
  /**  // > CustomCode.jszip:661
   * @see GenericWorker.push  // > CustomCode.jszip:662
   */  // > CustomCode.jszip:663
  ZipFileWorker.prototype.push = function (chunk) {  // > CustomCode.jszip:664
      var currentFilePercent = chunk.meta.percent || 0;  // > CustomCode.jszip:665
      var entriesCount = this.entriesCount;  // > CustomCode.jszip:666
      var remainingFiles = this._sources.length;  // > CustomCode.jszip:667
      if(this.accumulate) {  // > CustomCode.jszip:668
          this.contentBuffer.push(chunk);  // > CustomCode.jszip:669
      } else {  // > CustomCode.jszip:670
          this.bytesWritten += chunk.data.length;  // > CustomCode.jszip:671
          GenericWorker.prototype.push.call(this, {  // > CustomCode.jszip:672
              data : chunk.data,  // > CustomCode.jszip:673
              meta : {  // > CustomCode.jszip:674
                  currentFile : this.currentFile,  // > CustomCode.jszip:675
                  percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100  // > CustomCode.jszip:676
              }  // > CustomCode.jszip:677
          });  // > CustomCode.jszip:678
      }  // > CustomCode.jszip:679
  };  // > CustomCode.jszip:680
  /**  // > CustomCode.jszip:681
   * The worker started a new source (an other worker).  // > CustomCode.jszip:682
   * @param {Object} streamInfo the streamInfo object from the new source.  // > CustomCode.jszip:683
   */  // > CustomCode.jszip:684
  ZipFileWorker.prototype.openedSource = function (streamInfo) {  // > CustomCode.jszip:685
      this.currentSourceOffset = this.bytesWritten;  // > CustomCode.jszip:686
      this.currentFile = streamInfo["file"].name;  // > CustomCode.jszip:687
      var streamedContent = this.streamFiles && !streamInfo["file"].dir;  // > CustomCode.jszip:688
      // don't stream folders (because they don't have any content)  // > CustomCode.jszip:689
      if(streamedContent) {  // > CustomCode.jszip:690
          var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);  // > CustomCode.jszip:691
          this.push({  // > CustomCode.jszip:692
              data : record.fileRecord,  // > CustomCode.jszip:693
              meta : {percent:0}  // > CustomCode.jszip:694
          });  // > CustomCode.jszip:695
      } else {  // > CustomCode.jszip:696
          // we need to wait for the whole file before pushing anything  // > CustomCode.jszip:697
          this.accumulate = true;  // > CustomCode.jszip:698
      }  // > CustomCode.jszip:699
  };  // > CustomCode.jszip:700
  /**  // > CustomCode.jszip:701
   * The worker finished a source (an other worker).  // > CustomCode.jszip:702
   * @param {Object} streamInfo the streamInfo object from the finished source.  // > CustomCode.jszip:703
   */  // > CustomCode.jszip:704
  ZipFileWorker.prototype.closedSource = function (streamInfo) {  // > CustomCode.jszip:705
      this.accumulate = false;  // > CustomCode.jszip:706
      var streamedContent = this.streamFiles && !streamInfo["file"].dir;  // > CustomCode.jszip:707
      var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);  // > CustomCode.jszip:708
      this.dirRecords.push(record.dirRecord);  // > CustomCode.jszip:709
      if(streamedContent) {  // > CustomCode.jszip:710
          // after the streamed file, we put data descriptors  // > CustomCode.jszip:711
          this.push({  // > CustomCode.jszip:712
              data : generateDataDescriptors(streamInfo),  // > CustomCode.jszip:713
              meta : {percent:100}  // > CustomCode.jszip:714
          });  // > CustomCode.jszip:715
      } else {  // > CustomCode.jszip:716
          // the content wasn't streamed, we need to push everything now  // > CustomCode.jszip:717
          // first the file record, then the content  // > CustomCode.jszip:718
          this.push({  // > CustomCode.jszip:719
              data : record.fileRecord,  // > CustomCode.jszip:720
              meta : {percent:0}  // > CustomCode.jszip:721
          });  // > CustomCode.jszip:722
          while(this.contentBuffer.length) {  // > CustomCode.jszip:723
              this.push(this.contentBuffer.shift());  // > CustomCode.jszip:724
          }  // > CustomCode.jszip:725
      }  // > CustomCode.jszip:726
      this.currentFile = null;  // > CustomCode.jszip:727
  };  // > CustomCode.jszip:728
  /**  // > CustomCode.jszip:729
   * @see GenericWorker.flush  // > CustomCode.jszip:730
   */  // > CustomCode.jszip:731
  ZipFileWorker.prototype.flush = function () {  // > CustomCode.jszip:732
      var localDirLength = this.bytesWritten;  // > CustomCode.jszip:733
      for(var i = 0; i < this.dirRecords.length; i++) {  // > CustomCode.jszip:734
          this.push({  // > CustomCode.jszip:735
              data : this.dirRecords[i],  // > CustomCode.jszip:736
              meta : {percent:100}  // > CustomCode.jszip:737
          });  // > CustomCode.jszip:738
      }  // > CustomCode.jszip:739
      var centralDirLength = this.bytesWritten - localDirLength;  // > CustomCode.jszip:740
      var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);  // > CustomCode.jszip:741
      this.push({  // > CustomCode.jszip:742
          data : dirEnd,  // > CustomCode.jszip:743
          meta : {percent:100}  // > CustomCode.jszip:744
      });  // > CustomCode.jszip:745
  };  // > CustomCode.jszip:746
  /**  // > CustomCode.jszip:747
   * Prepare the next source to be read.  // > CustomCode.jszip:748
   */  // > CustomCode.jszip:749
  ZipFileWorker.prototype.prepareNextSource = function () {  // > CustomCode.jszip:750
      this.previous = this._sources.shift();  // > CustomCode.jszip:751
      this.openedSource(this.previous.streamInfo);  // > CustomCode.jszip:752
      if (this.isPaused) {  // > CustomCode.jszip:753
          this.previous.pause();  // > CustomCode.jszip:754
      } else {  // > CustomCode.jszip:755
          this.previous.resume();  // > CustomCode.jszip:756
      }  // > CustomCode.jszip:757
  };  // > CustomCode.jszip:758
  /**  // > CustomCode.jszip:759
   * @see GenericWorker.registerPrevious  // > CustomCode.jszip:760
   */  // > CustomCode.jszip:761
  ZipFileWorker.prototype.registerPrevious = function (previous) {  // > CustomCode.jszip:762
      this._sources.push(previous);  // > CustomCode.jszip:763
      var self = this;  // > CustomCode.jszip:764
      previous.on("data", function (chunk) {  // > CustomCode.jszip:765
          self.processChunk(chunk);  // > CustomCode.jszip:766
      });  // > CustomCode.jszip:767
      previous.on("end", function () {  // > CustomCode.jszip:768
          self.closedSource(self.previous.streamInfo);  // > CustomCode.jszip:769
          if(self._sources.length) {  // > CustomCode.jszip:770
              self.prepareNextSource();  // > CustomCode.jszip:771
          } else {  // > CustomCode.jszip:772
              self.end();  // > CustomCode.jszip:773
          }  // > CustomCode.jszip:774
      });  // > CustomCode.jszip:775
      previous.on("error", function (e) {  // > CustomCode.jszip:776
          self.error(e);  // > CustomCode.jszip:777
      });  // > CustomCode.jszip:778
      return this;  // > CustomCode.jszip:779
  };  // > CustomCode.jszip:780
  /**  // > CustomCode.jszip:781
   * @see GenericWorker.resume  // > CustomCode.jszip:782
   */  // > CustomCode.jszip:783
  ZipFileWorker.prototype.resume = function () {  // > CustomCode.jszip:784
      if(!GenericWorker.prototype.resume.call(this)) {  // > CustomCode.jszip:785
          return false;  // > CustomCode.jszip:786
      }  // > CustomCode.jszip:787
      if (!this.previous && this._sources.length) {  // > CustomCode.jszip:788
          this.prepareNextSource();  // > CustomCode.jszip:789
          return true;  // > CustomCode.jszip:790
      }  // > CustomCode.jszip:791
      if (!this.previous && !this._sources.length && !this.generatedError) {  // > CustomCode.jszip:792
          this.end();  // > CustomCode.jszip:793
          return true;  // > CustomCode.jszip:794
      }  // > CustomCode.jszip:795
  };  // > CustomCode.jszip:796
  /**  // > CustomCode.jszip:797
   * @see GenericWorker.error  // > CustomCode.jszip:798
   */  // > CustomCode.jszip:799
  ZipFileWorker.prototype.error = function (e) {  // > CustomCode.jszip:800
      var sources = this._sources;  // > CustomCode.jszip:801
      if(!GenericWorker.prototype.error.call(this, e)) {  // > CustomCode.jszip:802
          return false;  // > CustomCode.jszip:803
      }  // > CustomCode.jszip:804
      for(var i = 0; i < sources.length; i++) {  // > CustomCode.jszip:805
          try {  // > CustomCode.jszip:806
              sources[i].error(e);  // > CustomCode.jszip:807
          } catch(e) {  // > CustomCode.jszip:808
              // the `error` exploded, nothing to do  // > CustomCode.jszip:809
          }  // > CustomCode.jszip:810
      }  // > CustomCode.jszip:811
      return true;  // > CustomCode.jszip:812
  };  // > CustomCode.jszip:813
  /**  // > CustomCode.jszip:814
   * @see GenericWorker.lock  // > CustomCode.jszip:815
   */  // > CustomCode.jszip:816
  ZipFileWorker.prototype.lock = function () {  // > CustomCode.jszip:817
      GenericWorker.prototype.lock.call(this);  // > CustomCode.jszip:818
      var sources = this._sources;  // > CustomCode.jszip:819
      for(var i = 0; i < sources.length; i++) {  // > CustomCode.jszip:820
          sources[i].lock();  // > CustomCode.jszip:821
      }  // > CustomCode.jszip:822
  };  // > CustomCode.jszip:823
  module.exports = ZipFileWorker;  // > CustomCode.jszip:824
  },{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(require,module,exports){  // > CustomCode.jszip:825
  "use strict";  // > CustomCode.jszip:826
  var compressions = require("../compressions");  // > CustomCode.jszip:827
  var ZipFileWorker = require("./ZipFileWorker");  // > CustomCode.jszip:828
  /**  // > CustomCode.jszip:829
   * Find the compression to use.  // > CustomCode.jszip:830
   * @param {String} fileCompression the compression defined at the file level, if any.  // > CustomCode.jszip:831
   * @param {String} zipCompression the compression defined at the load() level.  // > CustomCode.jszip:832
   * @return {Object} the compression object to use.  // > CustomCode.jszip:833
   */  // > CustomCode.jszip:834
  var getCompression = function (fileCompression, zipCompression) {  // > CustomCode.jszip:835
      var compressionName = fileCompression || zipCompression;  // > CustomCode.jszip:836
      var compression = compressions[compressionName];  // > CustomCode.jszip:837
      if (!compression) {  // > CustomCode.jszip:838
          throw new Error(compressionName + " is not a valid compression method !");  // > CustomCode.jszip:839
      }  // > CustomCode.jszip:840
      return compression;  // > CustomCode.jszip:841
  };  // > CustomCode.jszip:842
  /**  // > CustomCode.jszip:843
   * Create a worker to generate a zip file.  // > CustomCode.jszip:844
   * @param {JSZip} zip the JSZip instance at the right root level.  // > CustomCode.jszip:845
   * @param {Object} options to generate the zip file.  // > CustomCode.jszip:846
   * @param {String} comment the comment to use.  // > CustomCode.jszip:847
   */  // > CustomCode.jszip:848
  exports.generateWorker = function (zip, options, comment) {  // > CustomCode.jszip:849
      var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);  // > CustomCode.jszip:850
      var entriesCount = 0;  // > CustomCode.jszip:851
      try {  // > CustomCode.jszip:852
          zip.forEach(function (relativePath, file) {  // > CustomCode.jszip:853
              entriesCount++;  // > CustomCode.jszip:854
              var compression = getCompression(file.options.compression, options.compression);  // > CustomCode.jszip:855
              var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};  // > CustomCode.jszip:856
              var dir = file.dir, date = file.date;  // > CustomCode.jszip:857
              file._compressWorker(compression, compressionOptions)  // > CustomCode.jszip:858
                  .withStreamInfo("file", {  // > CustomCode.jszip:859
                      name : relativePath,  // > CustomCode.jszip:860
                      dir : dir,  // > CustomCode.jszip:861
                      date : date,  // > CustomCode.jszip:862
                      comment : file.comment || "",  // > CustomCode.jszip:863
                      unixPermissions : file.unixPermissions,  // > CustomCode.jszip:864
                      dosPermissions : file.dosPermissions  // > CustomCode.jszip:865
                  })  // > CustomCode.jszip:866
                  .pipe(zipFileWorker);  // > CustomCode.jszip:867
          });  // > CustomCode.jszip:868
          zipFileWorker.entriesCount = entriesCount;  // > CustomCode.jszip:869
      } catch (e) {  // > CustomCode.jszip:870
          zipFileWorker.error(e);  // > CustomCode.jszip:871
      }  // > CustomCode.jszip:872
      return zipFileWorker;  // > CustomCode.jszip:873
  };  // > CustomCode.jszip:874
  },{"../compressions":3,"./ZipFileWorker":8}],10:[function(require,module,exports){  // > CustomCode.jszip:875
  "use strict";  // > CustomCode.jszip:876
  /**  // > CustomCode.jszip:877
   * Representation a of zip file in js  // > CustomCode.jszip:878
   * @constructor  // > CustomCode.jszip:879
   */  // > CustomCode.jszip:880
  function JSZip() {  // > CustomCode.jszip:881
      // if this constructor is used without `new`, it adds `new` before itself:  // > CustomCode.jszip:882
      if(!(this instanceof JSZip)) {  // > CustomCode.jszip:883
          return new JSZip();  // > CustomCode.jszip:884
      }  // > CustomCode.jszip:885
      if(arguments.length) {  // > CustomCode.jszip:886
          throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");  // > CustomCode.jszip:887
      }  // > CustomCode.jszip:888
      // object containing the files :  // > CustomCode.jszip:889
      // {  // > CustomCode.jszip:890
      //   "folder/" : {...},  // > CustomCode.jszip:891
      //   "folder/data.txt" : {...}  // > CustomCode.jszip:892
      // }  // > CustomCode.jszip:893
      // NOTE: we use a null prototype because we do not  // > CustomCode.jszip:894
      // want filenames like "toString" coming from a zip file  // > CustomCode.jszip:895
      // to overwrite methods and attributes in a normal Object.  // > CustomCode.jszip:896
      this.files = Object.create(null);  // > CustomCode.jszip:897
      this.comment = null;  // > CustomCode.jszip:898
      // Where we are in the hierarchy  // > CustomCode.jszip:899
      this.root = "";  // > CustomCode.jszip:900
      this.clone = function() {  // > CustomCode.jszip:901
          var newObj = new JSZip();  // > CustomCode.jszip:902
          for (var i in this) {  // > CustomCode.jszip:903
              if (typeof this[i] !== "function") {  // > CustomCode.jszip:904
                  newObj[i] = this[i];  // > CustomCode.jszip:905
              }  // > CustomCode.jszip:906
          }  // > CustomCode.jszip:907
          return newObj;  // > CustomCode.jszip:908
      };  // > CustomCode.jszip:909
  }  // > CustomCode.jszip:910
  JSZip.prototype = require("./object");  // > CustomCode.jszip:911
  JSZip.prototype.loadAsync = require("./load");  // > CustomCode.jszip:912
  JSZip.support = require("./support");  // > CustomCode.jszip:913
  JSZip.defaults = require("./defaults");  // > CustomCode.jszip:914
  // TODO find a better way to handle this version,  // > CustomCode.jszip:915
  // a require('package.json').version doesn't work with webpack, see #327  // > CustomCode.jszip:916
  JSZip.version = "3.10.1";  // > CustomCode.jszip:917
  JSZip.loadAsync = function (content, options) {  // > CustomCode.jszip:918
      return new JSZip().loadAsync(content, options);  // > CustomCode.jszip:919
  };  // > CustomCode.jszip:920
  JSZip.external = require("./external");  // > CustomCode.jszip:921
  module.exports = JSZip;  // > CustomCode.jszip:922
  },{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(require,module,exports){  // > CustomCode.jszip:923
  "use strict";  // > CustomCode.jszip:924
  var utils = require("./utils");  // > CustomCode.jszip:925
  var external = require("./external");  // > CustomCode.jszip:926
  var utf8 = require("./utf8");  // > CustomCode.jszip:927
  var ZipEntries = require("./zipEntries");  // > CustomCode.jszip:928
  var Crc32Probe = require("./stream/Crc32Probe");  // > CustomCode.jszip:929
  var nodejsUtils = require("./nodejsUtils");  // > CustomCode.jszip:930
  /**  // > CustomCode.jszip:931
   * Check the CRC32 of an entry.  // > CustomCode.jszip:932
   * @param {ZipEntry} zipEntry the zip entry to check.  // > CustomCode.jszip:933
   * @return {Promise} the result.  // > CustomCode.jszip:934
   */  // > CustomCode.jszip:935
  function checkEntryCRC32(zipEntry) {  // > CustomCode.jszip:936
      return new external.Promise(function (resolve, reject) {  // > CustomCode.jszip:937
          var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());  // > CustomCode.jszip:938
          worker.on("error", function (e) {  // > CustomCode.jszip:939
              reject(e);  // > CustomCode.jszip:940
          })  // > CustomCode.jszip:941
              .on("end", function () {  // > CustomCode.jszip:942
                  if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {  // > CustomCode.jszip:943
                      reject(new Error("Corrupted zip : CRC32 mismatch"));  // > CustomCode.jszip:944
                  } else {  // > CustomCode.jszip:945
                      resolve();  // > CustomCode.jszip:946
                  }  // > CustomCode.jszip:947
              })  // > CustomCode.jszip:948
              .resume();  // > CustomCode.jszip:949
      });  // > CustomCode.jszip:950
  }  // > CustomCode.jszip:951
  module.exports = function (data, options) {  // > CustomCode.jszip:952
      var zip = this;  // > CustomCode.jszip:953
      options = utils.extend(options || {}, {  // > CustomCode.jszip:954
          base64: false,  // > CustomCode.jszip:955
          checkCRC32: false,  // > CustomCode.jszip:956
          optimizedBinaryString: false,  // > CustomCode.jszip:957
          createFolders: false,  // > CustomCode.jszip:958
          decodeFileName: utf8.utf8decode  // > CustomCode.jszip:959
      });  // > CustomCode.jszip:960
      if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {  // > CustomCode.jszip:961
          return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file."));  // > CustomCode.jszip:962
      }  // > CustomCode.jszip:963
      return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64)  // > CustomCode.jszip:964
          .then(function (data) {  // > CustomCode.jszip:965
              var zipEntries = new ZipEntries(options);  // > CustomCode.jszip:966
              zipEntries.load(data);  // > CustomCode.jszip:967
              return zipEntries;  // > CustomCode.jszip:968
          }).then(function checkCRC32(zipEntries) {  // > CustomCode.jszip:969
              var promises = [external.Promise.resolve(zipEntries)];  // > CustomCode.jszip:970
              var files = zipEntries.files;  // > CustomCode.jszip:971
              if (options.checkCRC32) {  // > CustomCode.jszip:972
                  for (var i = 0; i < files.length; i++) {  // > CustomCode.jszip:973
                      promises.push(checkEntryCRC32(files[i]));  // > CustomCode.jszip:974
                  }  // > CustomCode.jszip:975
              }  // > CustomCode.jszip:976
              return external.Promise.all(promises);  // > CustomCode.jszip:977
          }).then(function addFiles(results) {  // > CustomCode.jszip:978
              var zipEntries = results.shift();  // > CustomCode.jszip:979
              var files = zipEntries.files;  // > CustomCode.jszip:980
              for (var i = 0; i < files.length; i++) {  // > CustomCode.jszip:981
                  var input = files[i];  // > CustomCode.jszip:982
                  var unsafeName = input.fileNameStr;  // > CustomCode.jszip:983
                  var safeName = utils.resolve(input.fileNameStr);  // > CustomCode.jszip:984
                  zip.file(safeName, input.decompressed, {  // > CustomCode.jszip:985
                      binary: true,  // > CustomCode.jszip:986
                      optimizedBinaryString: true,  // > CustomCode.jszip:987
                      date: input.date,  // > CustomCode.jszip:988
                      dir: input.dir,  // > CustomCode.jszip:989
                      comment: input.fileCommentStr.length ? input.fileCommentStr : null,  // > CustomCode.jszip:990
                      unixPermissions: input.unixPermissions,  // > CustomCode.jszip:991
                      dosPermissions: input.dosPermissions,  // > CustomCode.jszip:992
                      createFolders: options.createFolders  // > CustomCode.jszip:993
                  });  // > CustomCode.jszip:994
                  if (!input.dir) {  // > CustomCode.jszip:995
                      zip.file(safeName).unsafeOriginalName = unsafeName;  // > CustomCode.jszip:996
                  }  // > CustomCode.jszip:997
              }  // > CustomCode.jszip:998
              if (zipEntries.zipComment.length) {  // > CustomCode.jszip:999
                  zip.comment = zipEntries.zipComment;  // > CustomCode.jszip:1000
              }  // > CustomCode.jszip:1001
              return zip;  // > CustomCode.jszip:1002
          });  // > CustomCode.jszip:1003
  };  // > CustomCode.jszip:1004
  },{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(require,module,exports){  // > CustomCode.jszip:1005
  "use strict";  // > CustomCode.jszip:1006
  var utils = require("../utils");  // > CustomCode.jszip:1007
  var GenericWorker = require("../stream/GenericWorker");  // > CustomCode.jszip:1008
  /**  // > CustomCode.jszip:1009
   * A worker that use a nodejs stream as source.  // > CustomCode.jszip:1010
   * @constructor  // > CustomCode.jszip:1011
   * @param {String} filename the name of the file entry for this stream.  // > CustomCode.jszip:1012
   * @param {Readable} stream the nodejs stream.  // > CustomCode.jszip:1013
   */  // > CustomCode.jszip:1014
  function NodejsStreamInputAdapter(filename, stream) {  // > CustomCode.jszip:1015
      GenericWorker.call(this, "Nodejs stream input adapter for " + filename);  // > CustomCode.jszip:1016
      this._upstreamEnded = false;  // > CustomCode.jszip:1017
      this._bindStream(stream);  // > CustomCode.jszip:1018
  }  // > CustomCode.jszip:1019
  utils.inherits(NodejsStreamInputAdapter, GenericWorker);  // > CustomCode.jszip:1020
  /**  // > CustomCode.jszip:1021
   * Prepare the stream and bind the callbacks on it.  // > CustomCode.jszip:1022
   * Do this ASAP on node 0.10 ! A lazy binding doesn't always work.  // > CustomCode.jszip:1023
   * @param {Stream} stream the nodejs stream to use.  // > CustomCode.jszip:1024
   */  // > CustomCode.jszip:1025
  NodejsStreamInputAdapter.prototype._bindStream = function (stream) {  // > CustomCode.jszip:1026
      var self = this;  // > CustomCode.jszip:1027
      this._stream = stream;  // > CustomCode.jszip:1028
      stream.pause();  // > CustomCode.jszip:1029
      stream  // > CustomCode.jszip:1030
          .on("data", function (chunk) {  // > CustomCode.jszip:1031
              self.push({  // > CustomCode.jszip:1032
                  data: chunk,  // > CustomCode.jszip:1033
                  meta : {  // > CustomCode.jszip:1034
                      percent : 0  // > CustomCode.jszip:1035
                  }  // > CustomCode.jszip:1036
              });  // > CustomCode.jszip:1037
          })  // > CustomCode.jszip:1038
          .on("error", function (e) {  // > CustomCode.jszip:1039
              if(self.isPaused) {  // > CustomCode.jszip:1040
                  this.generatedError = e;  // > CustomCode.jszip:1041
              } else {  // > CustomCode.jszip:1042
                  self.error(e);  // > CustomCode.jszip:1043
              }  // > CustomCode.jszip:1044
          })  // > CustomCode.jszip:1045
          .on("end", function () {  // > CustomCode.jszip:1046
              if(self.isPaused) {  // > CustomCode.jszip:1047
                  self._upstreamEnded = true;  // > CustomCode.jszip:1048
              } else {  // > CustomCode.jszip:1049
                  self.end();  // > CustomCode.jszip:1050
              }  // > CustomCode.jszip:1051
          });  // > CustomCode.jszip:1052
  };  // > CustomCode.jszip:1053
  NodejsStreamInputAdapter.prototype.pause = function () {  // > CustomCode.jszip:1054
      if(!GenericWorker.prototype.pause.call(this)) {  // > CustomCode.jszip:1055
          return false;  // > CustomCode.jszip:1056
      }  // > CustomCode.jszip:1057
      this._stream.pause();  // > CustomCode.jszip:1058
      return true;  // > CustomCode.jszip:1059
  };  // > CustomCode.jszip:1060
  NodejsStreamInputAdapter.prototype.resume = function () {  // > CustomCode.jszip:1061
      if(!GenericWorker.prototype.resume.call(this)) {  // > CustomCode.jszip:1062
          return false;  // > CustomCode.jszip:1063
      }  // > CustomCode.jszip:1064
      if(this._upstreamEnded) {  // > CustomCode.jszip:1065
          this.end();  // > CustomCode.jszip:1066
      } else {  // > CustomCode.jszip:1067
          this._stream.resume();  // > CustomCode.jszip:1068
      }  // > CustomCode.jszip:1069
      return true;  // > CustomCode.jszip:1070
  };  // > CustomCode.jszip:1071
  module.exports = NodejsStreamInputAdapter;  // > CustomCode.jszip:1072
  },{"../stream/GenericWorker":28,"../utils":32}],13:[function(require,module,exports){  // > CustomCode.jszip:1073
  "use strict";  // > CustomCode.jszip:1074
  var Readable = require("readable-stream").Readable;  // > CustomCode.jszip:1075
  var utils = require("../utils");  // > CustomCode.jszip:1076
  utils.inherits(NodejsStreamOutputAdapter, Readable);  // > CustomCode.jszip:1077
  /**  // > CustomCode.jszip:1078
  * A nodejs stream using a worker as source.  // > CustomCode.jszip:1079
  * @see the SourceWrapper in http://nodejs.org/api/stream.html  // > CustomCode.jszip:1080
  * @constructor  // > CustomCode.jszip:1081
  * @param {StreamHelper} helper the helper wrapping the worker  // > CustomCode.jszip:1082
  * @param {Object} options the nodejs stream options  // > CustomCode.jszip:1083
  * @param {Function} updateCb the update callback.  // > CustomCode.jszip:1084
  */  // > CustomCode.jszip:1085
  function NodejsStreamOutputAdapter(helper, options, updateCb) {  // > CustomCode.jszip:1086
      Readable.call(this, options);  // > CustomCode.jszip:1087
      this._helper = helper;  // > CustomCode.jszip:1088
      var self = this;  // > CustomCode.jszip:1089
      helper.on("data", function (data, meta) {  // > CustomCode.jszip:1090
          if (!self.push(data)) {  // > CustomCode.jszip:1091
              self._helper.pause();  // > CustomCode.jszip:1092
          }  // > CustomCode.jszip:1093
          if(updateCb) {  // > CustomCode.jszip:1094
              updateCb(meta);  // > CustomCode.jszip:1095
          }  // > CustomCode.jszip:1096
      })  // > CustomCode.jszip:1097
          .on("error", function(e) {  // > CustomCode.jszip:1098
              self.emit("error", e);  // > CustomCode.jszip:1099
          })  // > CustomCode.jszip:1100
          .on("end", function () {  // > CustomCode.jszip:1101
              self.push(null);  // > CustomCode.jszip:1102
          });  // > CustomCode.jszip:1103
  }  // > CustomCode.jszip:1104
  NodejsStreamOutputAdapter.prototype._read = function() {  // > CustomCode.jszip:1105
      this._helper.resume();  // > CustomCode.jszip:1106
  };  // > CustomCode.jszip:1107
  module.exports = NodejsStreamOutputAdapter;  // > CustomCode.jszip:1108
  },{"../utils":32,"readable-stream":16}],14:[function(require,module,exports){  // > CustomCode.jszip:1109
  "use strict";  // > CustomCode.jszip:1110
  module.exports = {  // > CustomCode.jszip:1111
      /**  // > CustomCode.jszip:1112
       * True if this is running in Nodejs, will be undefined in a browser.  // > CustomCode.jszip:1113
       * In a browser, browserify won't include this file and the whole module  // > CustomCode.jszip:1114
       * will be resolved an empty object.  // > CustomCode.jszip:1115
       */  // > CustomCode.jszip:1116
      isNode : typeof Buffer !== "undefined",  // > CustomCode.jszip:1117
      /**  // > CustomCode.jszip:1118
       * Create a new nodejs Buffer from an existing content.  // > CustomCode.jszip:1119
       * @param {Object} data the data to pass to the constructor.  // > CustomCode.jszip:1120
       * @param {String} encoding the encoding to use.  // > CustomCode.jszip:1121
       * @return {Buffer} a new Buffer.  // > CustomCode.jszip:1122
       */  // > CustomCode.jszip:1123
      newBufferFrom: function(data, encoding) {  // > CustomCode.jszip:1124
          if (Buffer.from && Buffer.from !== Uint8Array.from) {  // > CustomCode.jszip:1125
              return Buffer.from(data, encoding);  // > CustomCode.jszip:1126
          } else {  // > CustomCode.jszip:1127
              if (typeof data === "number") {  // > CustomCode.jszip:1128
                  // Safeguard for old Node.js versions. On newer versions,  // > CustomCode.jszip:1129
                  // Buffer.from(number) / Buffer(number, encoding) already throw.  // > CustomCode.jszip:1130
                  throw new Error("The \"data\" argument must not be a number");  // > CustomCode.jszip:1131
              }  // > CustomCode.jszip:1132
              return new Buffer(data, encoding);  // > CustomCode.jszip:1133
          }  // > CustomCode.jszip:1134
      },  // > CustomCode.jszip:1135
      /**  // > CustomCode.jszip:1136
       * Create a new nodejs Buffer with the specified size.  // > CustomCode.jszip:1137
       * @param {Integer} size the size of the buffer.  // > CustomCode.jszip:1138
       * @return {Buffer} a new Buffer.  // > CustomCode.jszip:1139
       */  // > CustomCode.jszip:1140
      allocBuffer: function (size) {  // > CustomCode.jszip:1141
          if (Buffer.alloc) {  // > CustomCode.jszip:1142
              return Buffer.alloc(size);  // > CustomCode.jszip:1143
          } else {  // > CustomCode.jszip:1144
              var buf = new Buffer(size);  // > CustomCode.jszip:1145
              buf.fill(0);  // > CustomCode.jszip:1146
              return buf;  // > CustomCode.jszip:1147
          }  // > CustomCode.jszip:1148
      },  // > CustomCode.jszip:1149
      /**  // > CustomCode.jszip:1150
       * Find out if an object is a Buffer.  // > CustomCode.jszip:1151
       * @param {Object} b the object to test.  // > CustomCode.jszip:1152
       * @return {Boolean} true if the object is a Buffer, false otherwise.  // > CustomCode.jszip:1153
       */  // > CustomCode.jszip:1154
      isBuffer : function(b){  // > CustomCode.jszip:1155
          return Buffer.isBuffer(b);  // > CustomCode.jszip:1156
      },  // > CustomCode.jszip:1157
      isStream : function (obj) {  // > CustomCode.jszip:1158
          return obj &&  // > CustomCode.jszip:1159
              typeof obj.on === "function" &&  // > CustomCode.jszip:1160
              typeof obj.pause === "function" &&  // > CustomCode.jszip:1161
              typeof obj.resume === "function";  // > CustomCode.jszip:1162
      }  // > CustomCode.jszip:1163
  };  // > CustomCode.jszip:1164
  },{}],15:[function(require,module,exports){  // > CustomCode.jszip:1165
  "use strict";  // > CustomCode.jszip:1166
  var utf8 = require("./utf8");  // > CustomCode.jszip:1167
  var utils = require("./utils");  // > CustomCode.jszip:1168
  var GenericWorker = require("./stream/GenericWorker");  // > CustomCode.jszip:1169
  var StreamHelper = require("./stream/StreamHelper");  // > CustomCode.jszip:1170
  var defaults = require("./defaults");  // > CustomCode.jszip:1171
  var CompressedObject = require("./compressedObject");  // > CustomCode.jszip:1172
  var ZipObject = require("./zipObject");  // > CustomCode.jszip:1173
  var generate = require("./generate");  // > CustomCode.jszip:1174
  var nodejsUtils = require("./nodejsUtils");  // > CustomCode.jszip:1175
  var NodejsStreamInputAdapter = require("./nodejs/NodejsStreamInputAdapter");  // > CustomCode.jszip:1176
  /**  // > CustomCode.jszip:1177
   * Add a file in the current folder.  // > CustomCode.jszip:1178
   * @private  // > CustomCode.jszip:1179
   * @param {string} name the name of the file  // > CustomCode.jszip:1180
   * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file  // > CustomCode.jszip:1181
   * @param {Object} originalOptions the options of the file  // > CustomCode.jszip:1182
   * @return {Object} the new file.  // > CustomCode.jszip:1183
   */  // > CustomCode.jszip:1184
  var fileAdd = function(name, data, originalOptions) {  // > CustomCode.jszip:1185
      // be sure sub folders exist  // > CustomCode.jszip:1186
      var dataType = utils.getTypeOf(data),  // > CustomCode.jszip:1187
          parent;  // > CustomCode.jszip:1188
      /*  // > CustomCode.jszip:1189
       * Correct options.  // > CustomCode.jszip:1190
       */  // > CustomCode.jszip:1191
      var o = utils.extend(originalOptions || {}, defaults);  // > CustomCode.jszip:1192
      o.date = o.date || new Date();  // > CustomCode.jszip:1193
      if (o.compression !== null) {  // > CustomCode.jszip:1194
          o.compression = o.compression.toUpperCase();  // > CustomCode.jszip:1195
      }  // > CustomCode.jszip:1196
      if (typeof o.unixPermissions === "string") {  // > CustomCode.jszip:1197
          o.unixPermissions = parseInt(o.unixPermissions, 8);  // > CustomCode.jszip:1198
      }  // > CustomCode.jszip:1199
      // UNX_IFDIR  0040000 see zipinfo.c  // > CustomCode.jszip:1200
      if (o.unixPermissions && (o.unixPermissions & 0x4000)) {  // > CustomCode.jszip:1201
          o.dir = true;  // > CustomCode.jszip:1202
      }  // > CustomCode.jszip:1203
      // Bit 4    Directory  // > CustomCode.jszip:1204
      if (o.dosPermissions && (o.dosPermissions & 0x0010)) {  // > CustomCode.jszip:1205
          o.dir = true;  // > CustomCode.jszip:1206
      }  // > CustomCode.jszip:1207
      if (o.dir) {  // > CustomCode.jszip:1208
          name = forceTrailingSlash(name);  // > CustomCode.jszip:1209
      }  // > CustomCode.jszip:1210
      if (o.createFolders && (parent = parentFolder(name))) {  // > CustomCode.jszip:1211
          folderAdd.call(this, parent, true);  // > CustomCode.jszip:1212
      }  // > CustomCode.jszip:1213
      var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;  // > CustomCode.jszip:1214
      if (!originalOptions || typeof originalOptions.binary === "undefined") {  // > CustomCode.jszip:1215
          o.binary = !isUnicodeString;  // > CustomCode.jszip:1216
      }  // > CustomCode.jszip:1217
      var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;  // > CustomCode.jszip:1218
      if (isCompressedEmpty || o.dir || !data || data.length === 0) {  // > CustomCode.jszip:1219
          o.base64 = false;  // > CustomCode.jszip:1220
          o.binary = true;  // > CustomCode.jszip:1221
          data = "";  // > CustomCode.jszip:1222
          o.compression = "STORE";  // > CustomCode.jszip:1223
          dataType = "string";  // > CustomCode.jszip:1224
      }  // > CustomCode.jszip:1225
      /*  // > CustomCode.jszip:1226
       * Convert content to fit.  // > CustomCode.jszip:1227
       */  // > CustomCode.jszip:1228
      var zipObjectContent = null;  // > CustomCode.jszip:1229
      if (data instanceof CompressedObject || data instanceof GenericWorker) {  // > CustomCode.jszip:1230
          zipObjectContent = data;  // > CustomCode.jszip:1231
      } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {  // > CustomCode.jszip:1232
          zipObjectContent = new NodejsStreamInputAdapter(name, data);  // > CustomCode.jszip:1233
      } else {  // > CustomCode.jszip:1234
          zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);  // > CustomCode.jszip:1235
      }  // > CustomCode.jszip:1236
      var object = new ZipObject(name, zipObjectContent, o);  // > CustomCode.jszip:1237
      this.files[name] = object;  // > CustomCode.jszip:1238
      /*  // > CustomCode.jszip:1239
      TODO: we can't throw an exception because we have async promises  // > CustomCode.jszip:1240
      (we can have a promise of a Date() for example) but returning a  // > CustomCode.jszip:1241
      promise is useless because file(name, data) returns the JSZip  // > CustomCode.jszip:1242
      object for chaining. Should we break that to allow the user  // > CustomCode.jszip:1243
      to catch the error ?  // > CustomCode.jszip:1244
      return external.Promise.resolve(zipObjectContent)  // > CustomCode.jszip:1245
      .then(function () {  // > CustomCode.jszip:1246
          return object;  // > CustomCode.jszip:1247
      });  // > CustomCode.jszip:1248
      */  // > CustomCode.jszip:1249
  };  // > CustomCode.jszip:1250
  /**  // > CustomCode.jszip:1251
   * Find the parent folder of the path.  // > CustomCode.jszip:1252
   * @private  // > CustomCode.jszip:1253
   * @param {string} path the path to use  // > CustomCode.jszip:1254
   * @return {string} the parent folder, or ""  // > CustomCode.jszip:1255
   */  // > CustomCode.jszip:1256
  var parentFolder = function (path) {  // > CustomCode.jszip:1257
      if (path.slice(-1) === "/") {  // > CustomCode.jszip:1258
          path = path.substring(0, path.length - 1);  // > CustomCode.jszip:1259
      }  // > CustomCode.jszip:1260
      var lastSlash = path.lastIndexOf("/");  // > CustomCode.jszip:1261
      return (lastSlash > 0) ? path.substring(0, lastSlash) : "";  // > CustomCode.jszip:1262
  };  // > CustomCode.jszip:1263
  /**  // > CustomCode.jszip:1264
   * Returns the path with a slash at the end.  // > CustomCode.jszip:1265
   * @private  // > CustomCode.jszip:1266
   * @param {String} path the path to check.  // > CustomCode.jszip:1267
   * @return {String} the path with a trailing slash.  // > CustomCode.jszip:1268
   */  // > CustomCode.jszip:1269
  var forceTrailingSlash = function(path) {  // > CustomCode.jszip:1270
      // Check the name ends with a /  // > CustomCode.jszip:1271
      if (path.slice(-1) !== "/") {  // > CustomCode.jszip:1272
          path += "/"; // IE doesn't like substr(-1)  // > CustomCode.jszip:1273
      }  // > CustomCode.jszip:1274
      return path;  // > CustomCode.jszip:1275
  };  // > CustomCode.jszip:1276
  /**  // > CustomCode.jszip:1277
   * Add a (sub) folder in the current folder.  // > CustomCode.jszip:1278
   * @private  // > CustomCode.jszip:1279
   * @param {string} name the folder's name  // > CustomCode.jszip:1280
   * @param {boolean=} [createFolders] If true, automatically create sub  // > CustomCode.jszip:1281
   *  folders. Defaults to false.  // > CustomCode.jszip:1282
   * @return {Object} the new folder.  // > CustomCode.jszip:1283
   */  // > CustomCode.jszip:1284
  var folderAdd = function(name, createFolders) {  // > CustomCode.jszip:1285
      createFolders = (typeof createFolders !== "undefined") ? createFolders : defaults.createFolders;  // > CustomCode.jszip:1286
      name = forceTrailingSlash(name);  // > CustomCode.jszip:1287
      // Does this folder already exist?  // > CustomCode.jszip:1288
      if (!this.files[name]) {  // > CustomCode.jszip:1289
          fileAdd.call(this, name, null, {  // > CustomCode.jszip:1290
              dir: true,  // > CustomCode.jszip:1291
              createFolders: createFolders  // > CustomCode.jszip:1292
          });  // > CustomCode.jszip:1293
      }  // > CustomCode.jszip:1294
      return this.files[name];  // > CustomCode.jszip:1295
  };  // > CustomCode.jszip:1296
  /**  // > CustomCode.jszip:1297
  * Cross-window, cross-Node-context regular expression detection  // > CustomCode.jszip:1298
  * @param  {Object}  object Anything  // > CustomCode.jszip:1299
  * @return {Boolean}        true if the object is a regular expression,  // > CustomCode.jszip:1300
  * false otherwise  // > CustomCode.jszip:1301
  */  // > CustomCode.jszip:1302
  function isRegExp(object) {  // > CustomCode.jszip:1303
      return Object.prototype.toString.call(object) === "[object RegExp]";  // > CustomCode.jszip:1304
  }  // > CustomCode.jszip:1305
  // return the actual prototype of JSZip  // > CustomCode.jszip:1306
  var out = {  // > CustomCode.jszip:1307
      /**  // > CustomCode.jszip:1308
       * @see loadAsync  // > CustomCode.jszip:1309
       */  // > CustomCode.jszip:1310
      load: function() {  // > CustomCode.jszip:1311
          throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");  // > CustomCode.jszip:1312
      },  // > CustomCode.jszip:1313
      /**  // > CustomCode.jszip:1314
       * Call a callback function for each entry at this folder level.  // > CustomCode.jszip:1315
       * @param {Function} cb the callback function:  // > CustomCode.jszip:1316
       * function (relativePath, file) {...}  // > CustomCode.jszip:1317
       * It takes 2 arguments : the relative path and the file.  // > CustomCode.jszip:1318
       */  // > CustomCode.jszip:1319
      forEach: function(cb) {  // > CustomCode.jszip:1320
          var filename, relativePath, file;  // > CustomCode.jszip:1321
          // ignore warning about unwanted properties because this.files is a null prototype object  // > CustomCode.jszip:1322
          /* eslint-disable-next-line guard-for-in */  // > CustomCode.jszip:1323
          for (filename in this.files) {  // > CustomCode.jszip:1324
              file = this.files[filename];  // > CustomCode.jszip:1325
              relativePath = filename.slice(this.root.length, filename.length);  // > CustomCode.jszip:1326
              if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root  // > CustomCode.jszip:1327
                  cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...  // > CustomCode.jszip:1328
              }  // > CustomCode.jszip:1329
          }  // > CustomCode.jszip:1330
      },  // > CustomCode.jszip:1331
      /**  // > CustomCode.jszip:1332
       * Filter nested files/folders with the specified function.  // > CustomCode.jszip:1333
       * @param {Function} search the predicate to use :  // > CustomCode.jszip:1334
       * function (relativePath, file) {...}  // > CustomCode.jszip:1335
       * It takes 2 arguments : the relative path and the file.  // > CustomCode.jszip:1336
       * @return {Array} An array of matching elements.  // > CustomCode.jszip:1337
       */  // > CustomCode.jszip:1338
      filter: function(search) {  // > CustomCode.jszip:1339
          var result = [];  // > CustomCode.jszip:1340
          this.forEach(function (relativePath, entry) {  // > CustomCode.jszip:1341
              if (search(relativePath, entry)) { // the file matches the function  // > CustomCode.jszip:1342
                  result.push(entry);  // > CustomCode.jszip:1343
              }  // > CustomCode.jszip:1344
          });  // > CustomCode.jszip:1345
          return result;  // > CustomCode.jszip:1346
      },  // > CustomCode.jszip:1347
      /**  // > CustomCode.jszip:1348
       * Add a file to the zip file, or search a file.  // > CustomCode.jszip:1349
       * @param   {string|RegExp} name The name of the file to add (if data is defined),  // > CustomCode.jszip:1350
       * the name of the file to find (if no data) or a regex to match files.  // > CustomCode.jszip:1351
       * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded  // > CustomCode.jszip:1352
       * @param   {Object} o     File options  // > CustomCode.jszip:1353
       * @return  {JSZip|Object|Array} this JSZip object (when adding a file),  // > CustomCode.jszip:1354
       * a file (when searching by string) or an array of files (when searching by regex).  // > CustomCode.jszip:1355
       */  // > CustomCode.jszip:1356
      file: function(name, data, o) {  // > CustomCode.jszip:1357
          if (arguments.length === 1) {  // > CustomCode.jszip:1358
              if (isRegExp(name)) {  // > CustomCode.jszip:1359
                  var regexp = name;  // > CustomCode.jszip:1360
                  return this.filter(function(relativePath, file) {  // > CustomCode.jszip:1361
                      return !file.dir && regexp.test(relativePath);  // > CustomCode.jszip:1362
                  });  // > CustomCode.jszip:1363
              }  // > CustomCode.jszip:1364
              else { // text  // > CustomCode.jszip:1365
                  var obj = this.files[this.root + name];  // > CustomCode.jszip:1366
                  if (obj && !obj.dir) {  // > CustomCode.jszip:1367
                      return obj;  // > CustomCode.jszip:1368
                  } else {  // > CustomCode.jszip:1369
                      return null;  // > CustomCode.jszip:1370
                  }  // > CustomCode.jszip:1371
              }  // > CustomCode.jszip:1372
          }  // > CustomCode.jszip:1373
          else { // more than one argument : we have data !  // > CustomCode.jszip:1374
              name = this.root + name;  // > CustomCode.jszip:1375
              fileAdd.call(this, name, data, o);  // > CustomCode.jszip:1376
          }  // > CustomCode.jszip:1377
          return this;  // > CustomCode.jszip:1378
      },  // > CustomCode.jszip:1379
      /**  // > CustomCode.jszip:1380
       * Add a directory to the zip file, or search.  // > CustomCode.jszip:1381
       * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.  // > CustomCode.jszip:1382
       * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.  // > CustomCode.jszip:1383
       */  // > CustomCode.jszip:1384
      folder: function(arg) {  // > CustomCode.jszip:1385
          if (!arg) {  // > CustomCode.jszip:1386
              return this;  // > CustomCode.jszip:1387
          }  // > CustomCode.jszip:1388
          if (isRegExp(arg)) {  // > CustomCode.jszip:1389
              return this.filter(function(relativePath, file) {  // > CustomCode.jszip:1390
                  return file.dir && arg.test(relativePath);  // > CustomCode.jszip:1391
              });  // > CustomCode.jszip:1392
          }  // > CustomCode.jszip:1393
          // else, name is a new folder  // > CustomCode.jszip:1394
          var name = this.root + arg;  // > CustomCode.jszip:1395
          var newFolder = folderAdd.call(this, name);  // > CustomCode.jszip:1396
          // Allow chaining by returning a new object with this folder as the root  // > CustomCode.jszip:1397
          var ret = this.clone();  // > CustomCode.jszip:1398
          ret.root = newFolder.name;  // > CustomCode.jszip:1399
          return ret;  // > CustomCode.jszip:1400
      },  // > CustomCode.jszip:1401
      /**  // > CustomCode.jszip:1402
       * Delete a file, or a directory and all sub-files, from the zip  // > CustomCode.jszip:1403
       * @param {string} name the name of the file to delete  // > CustomCode.jszip:1404
       * @return {JSZip} this JSZip object  // > CustomCode.jszip:1405
       */  // > CustomCode.jszip:1406
      remove: function(name) {  // > CustomCode.jszip:1407
          name = this.root + name;  // > CustomCode.jszip:1408
          var file = this.files[name];  // > CustomCode.jszip:1409
          if (!file) {  // > CustomCode.jszip:1410
              // Look for any folders  // > CustomCode.jszip:1411
              if (name.slice(-1) !== "/") {  // > CustomCode.jszip:1412
                  name += "/";  // > CustomCode.jszip:1413
              }  // > CustomCode.jszip:1414
              file = this.files[name];  // > CustomCode.jszip:1415
          }  // > CustomCode.jszip:1416
          if (file && !file.dir) {  // > CustomCode.jszip:1417
              // file  // > CustomCode.jszip:1418
              delete this.files[name];  // > CustomCode.jszip:1419
          } else {  // > CustomCode.jszip:1420
              // maybe a folder, delete recursively  // > CustomCode.jszip:1421
              var kids = this.filter(function(relativePath, file) {  // > CustomCode.jszip:1422
                  return file.name.slice(0, name.length) === name;  // > CustomCode.jszip:1423
              });  // > CustomCode.jszip:1424
              for (var i = 0; i < kids.length; i++) {  // > CustomCode.jszip:1425
                  delete this.files[kids[i].name];  // > CustomCode.jszip:1426
              }  // > CustomCode.jszip:1427
          }  // > CustomCode.jszip:1428
          return this;  // > CustomCode.jszip:1429
      },  // > CustomCode.jszip:1430
      /**  // > CustomCode.jszip:1431
       * @deprecated This method has been removed in JSZip 3.0, please check the upgrade guide.  // > CustomCode.jszip:1432
       */  // > CustomCode.jszip:1433
      generate: function() {  // > CustomCode.jszip:1434
          throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");  // > CustomCode.jszip:1435
      },  // > CustomCode.jszip:1436
      /**  // > CustomCode.jszip:1437
       * Generate the complete zip file as an internal stream.  // > CustomCode.jszip:1438
       * @param {Object} options the options to generate the zip file :  // > CustomCode.jszip:1439
       * - compression, "STORE" by default.  // > CustomCode.jszip:1440
       * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.  // > CustomCode.jszip:1441
       * @return {StreamHelper} the streamed zip file.  // > CustomCode.jszip:1442
       */  // > CustomCode.jszip:1443
      generateInternalStream: function(options) {  // > CustomCode.jszip:1444
          var worker, opts = {};  // > CustomCode.jszip:1445
          try {  // > CustomCode.jszip:1446
              opts = utils.extend(options || {}, {  // > CustomCode.jszip:1447
                  streamFiles: false,  // > CustomCode.jszip:1448
                  compression: "STORE",  // > CustomCode.jszip:1449
                  compressionOptions : null,  // > CustomCode.jszip:1450
                  type: "",  // > CustomCode.jszip:1451
                  platform: "DOS",  // > CustomCode.jszip:1452
                  comment: null,  // > CustomCode.jszip:1453
                  mimeType: "application/zip",  // > CustomCode.jszip:1454
                  encodeFileName: utf8.utf8encode  // > CustomCode.jszip:1455
              });  // > CustomCode.jszip:1456
              opts.type = opts.type.toLowerCase();  // > CustomCode.jszip:1457
              opts.compression = opts.compression.toUpperCase();  // > CustomCode.jszip:1458
              // "binarystring" is preferred but the internals use "string".  // > CustomCode.jszip:1459
              if(opts.type === "binarystring") {  // > CustomCode.jszip:1460
                  opts.type = "string";  // > CustomCode.jszip:1461
              }  // > CustomCode.jszip:1462
              if (!opts.type) {  // > CustomCode.jszip:1463
                  throw new Error("No output type specified.");  // > CustomCode.jszip:1464
              }  // > CustomCode.jszip:1465
              utils.checkSupport(opts.type);  // > CustomCode.jszip:1466
              // accept nodejs `process.platform`  // > CustomCode.jszip:1467
              if(  // > CustomCode.jszip:1468
                  opts.platform === "darwin" ||  // > CustomCode.jszip:1469
                  opts.platform === "freebsd" ||  // > CustomCode.jszip:1470
                  opts.platform === "linux" ||  // > CustomCode.jszip:1471
                  opts.platform === "sunos"  // > CustomCode.jszip:1472
              ) {  // > CustomCode.jszip:1473
                  opts.platform = "UNIX";  // > CustomCode.jszip:1474
              }  // > CustomCode.jszip:1475
              if (opts.platform === "win32") {  // > CustomCode.jszip:1476
                  opts.platform = "DOS";  // > CustomCode.jszip:1477
              }  // > CustomCode.jszip:1478
              var comment = opts.comment || this.comment || "";  // > CustomCode.jszip:1479
              worker = generate.generateWorker(this, opts, comment);  // > CustomCode.jszip:1480
          } catch (e) {  // > CustomCode.jszip:1481
              worker = new GenericWorker("error");  // > CustomCode.jszip:1482
              worker.error(e);  // > CustomCode.jszip:1483
          }  // > CustomCode.jszip:1484
          return new StreamHelper(worker, opts.type || "string", opts.mimeType);  // > CustomCode.jszip:1485
      },  // > CustomCode.jszip:1486
      /**  // > CustomCode.jszip:1487
       * Generate the complete zip file asynchronously.  // > CustomCode.jszip:1488
       * @see generateInternalStream  // > CustomCode.jszip:1489
       */  // > CustomCode.jszip:1490
      generateAsync: function(options, onUpdate) {  // > CustomCode.jszip:1491
          return this.generateInternalStream(options).accumulate(onUpdate);  // > CustomCode.jszip:1492
      },  // > CustomCode.jszip:1493
      /**  // > CustomCode.jszip:1494
       * Generate the complete zip file asynchronously.  // > CustomCode.jszip:1495
       * @see generateInternalStream  // > CustomCode.jszip:1496
       */  // > CustomCode.jszip:1497
      generateNodeStream: function(options, onUpdate) {  // > CustomCode.jszip:1498
          options = options || {};  // > CustomCode.jszip:1499
          if (!options.type) {  // > CustomCode.jszip:1500
              options.type = "nodebuffer";  // > CustomCode.jszip:1501
          }  // > CustomCode.jszip:1502
          return this.generateInternalStream(options).toNodejsStream(onUpdate);  // > CustomCode.jszip:1503
      }  // > CustomCode.jszip:1504
  };  // > CustomCode.jszip:1505
  module.exports = out;  // > CustomCode.jszip:1506
  },{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(require,module,exports){  // > CustomCode.jszip:1507
  "use strict";  // > CustomCode.jszip:1508
  /*  // > CustomCode.jszip:1509
   * This file is used by module bundlers (browserify/webpack/etc) when  // > CustomCode.jszip:1510
   * including a stream implementation. We use "readable-stream" to get a  // > CustomCode.jszip:1511
   * consistent behavior between nodejs versions but bundlers often have a shim  // > CustomCode.jszip:1512
   * for "stream". Using this shim greatly improve the compatibility and greatly  // > CustomCode.jszip:1513
   * reduce the final size of the bundle (only one stream implementation, not  // > CustomCode.jszip:1514
   * two).  // > CustomCode.jszip:1515
   */  // > CustomCode.jszip:1516
  module.exports = require("stream");  // > CustomCode.jszip:1517
  },{"stream":undefined}],17:[function(require,module,exports){  // > CustomCode.jszip:1518
  "use strict";  // > CustomCode.jszip:1519
  var DataReader = require("./DataReader");  // > CustomCode.jszip:1520
  var utils = require("../utils");  // > CustomCode.jszip:1521
  function ArrayReader(data) {  // > CustomCode.jszip:1522
      DataReader.call(this, data);  // > CustomCode.jszip:1523
      for(var i = 0; i < this.data.length; i++) {  // > CustomCode.jszip:1524
          data[i] = data[i] & 0xFF;  // > CustomCode.jszip:1525
      }  // > CustomCode.jszip:1526
  }  // > CustomCode.jszip:1527
  utils.inherits(ArrayReader, DataReader);  // > CustomCode.jszip:1528
  /**  // > CustomCode.jszip:1529
   * @see DataReader.byteAt  // > CustomCode.jszip:1530
   */  // > CustomCode.jszip:1531
  ArrayReader.prototype.byteAt = function(i) {  // > CustomCode.jszip:1532
      return this.data[this.zero + i];  // > CustomCode.jszip:1533
  };  // > CustomCode.jszip:1534
  /**  // > CustomCode.jszip:1535
   * @see DataReader.lastIndexOfSignature  // > CustomCode.jszip:1536
   */  // > CustomCode.jszip:1537
  ArrayReader.prototype.lastIndexOfSignature = function(sig) {  // > CustomCode.jszip:1538
      var sig0 = sig.charCodeAt(0),  // > CustomCode.jszip:1539
          sig1 = sig.charCodeAt(1),  // > CustomCode.jszip:1540
          sig2 = sig.charCodeAt(2),  // > CustomCode.jszip:1541
          sig3 = sig.charCodeAt(3);  // > CustomCode.jszip:1542
      for (var i = this.length - 4; i >= 0; --i) {  // > CustomCode.jszip:1543
          if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {  // > CustomCode.jszip:1544
              return i - this.zero;  // > CustomCode.jszip:1545
          }  // > CustomCode.jszip:1546
      }  // > CustomCode.jszip:1547
      return -1;  // > CustomCode.jszip:1548
  };  // > CustomCode.jszip:1549
  /**  // > CustomCode.jszip:1550
   * @see DataReader.readAndCheckSignature  // > CustomCode.jszip:1551
   */  // > CustomCode.jszip:1552
  ArrayReader.prototype.readAndCheckSignature = function (sig) {  // > CustomCode.jszip:1553
      var sig0 = sig.charCodeAt(0),  // > CustomCode.jszip:1554
          sig1 = sig.charCodeAt(1),  // > CustomCode.jszip:1555
          sig2 = sig.charCodeAt(2),  // > CustomCode.jszip:1556
          sig3 = sig.charCodeAt(3),  // > CustomCode.jszip:1557
          data = this.readData(4);  // > CustomCode.jszip:1558
      return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3];  // > CustomCode.jszip:1559
  };  // > CustomCode.jszip:1560
  /**  // > CustomCode.jszip:1561
   * @see DataReader.readData  // > CustomCode.jszip:1562
   */  // > CustomCode.jszip:1563
  ArrayReader.prototype.readData = function(size) {  // > CustomCode.jszip:1564
      this.checkOffset(size);  // > CustomCode.jszip:1565
      if(size === 0) {  // > CustomCode.jszip:1566
          return [];  // > CustomCode.jszip:1567
      }  // > CustomCode.jszip:1568
      var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);  // > CustomCode.jszip:1569
      this.index += size;  // > CustomCode.jszip:1570
      return result;  // > CustomCode.jszip:1571
  };  // > CustomCode.jszip:1572
  module.exports = ArrayReader;  // > CustomCode.jszip:1573
  },{"../utils":32,"./DataReader":18}],18:[function(require,module,exports){  // > CustomCode.jszip:1574
  "use strict";  // > CustomCode.jszip:1575
  var utils = require("../utils");  // > CustomCode.jszip:1576
  function DataReader(data) {  // > CustomCode.jszip:1577
      this.data = data; // type : see implementation  // > CustomCode.jszip:1578
      this.length = data.length;  // > CustomCode.jszip:1579
      this.index = 0;  // > CustomCode.jszip:1580
      this.zero = 0;  // > CustomCode.jszip:1581
  }  // > CustomCode.jszip:1582
  DataReader.prototype = {  // > CustomCode.jszip:1583
      /**  // > CustomCode.jszip:1584
       * Check that the offset will not go too far.  // > CustomCode.jszip:1585
       * @param {string} offset the additional offset to check.  // > CustomCode.jszip:1586
       * @throws {Error} an Error if the offset is out of bounds.  // > CustomCode.jszip:1587
       */  // > CustomCode.jszip:1588
      checkOffset: function(offset) {  // > CustomCode.jszip:1589
          this.checkIndex(this.index + offset);  // > CustomCode.jszip:1590
      },  // > CustomCode.jszip:1591
      /**  // > CustomCode.jszip:1592
       * Check that the specified index will not be too far.  // > CustomCode.jszip:1593
       * @param {string} newIndex the index to check.  // > CustomCode.jszip:1594
       * @throws {Error} an Error if the index is out of bounds.  // > CustomCode.jszip:1595
       */  // > CustomCode.jszip:1596
      checkIndex: function(newIndex) {  // > CustomCode.jszip:1597
          if (this.length < this.zero + newIndex || newIndex < 0) {  // > CustomCode.jszip:1598
              throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");  // > CustomCode.jszip:1599
          }  // > CustomCode.jszip:1600
      },  // > CustomCode.jszip:1601
      /**  // > CustomCode.jszip:1602
       * Change the index.  // > CustomCode.jszip:1603
       * @param {number} newIndex The new index.  // > CustomCode.jszip:1604
       * @throws {Error} if the new index is out of the data.  // > CustomCode.jszip:1605
       */  // > CustomCode.jszip:1606
      setIndex: function(newIndex) {  // > CustomCode.jszip:1607
          this.checkIndex(newIndex);  // > CustomCode.jszip:1608
          this.index = newIndex;  // > CustomCode.jszip:1609
      },  // > CustomCode.jszip:1610
      /**  // > CustomCode.jszip:1611
       * Skip the next n bytes.  // > CustomCode.jszip:1612
       * @param {number} n the number of bytes to skip.  // > CustomCode.jszip:1613
       * @throws {Error} if the new index is out of the data.  // > CustomCode.jszip:1614
       */  // > CustomCode.jszip:1615
      skip: function(n) {  // > CustomCode.jszip:1616
          this.setIndex(this.index + n);  // > CustomCode.jszip:1617
      },  // > CustomCode.jszip:1618
      /**  // > CustomCode.jszip:1619
       * Get the byte at the specified index.  // > CustomCode.jszip:1620
       * @param {number} i the index to use.  // > CustomCode.jszip:1621
       * @return {number} a byte.  // > CustomCode.jszip:1622
       */  // > CustomCode.jszip:1623
      byteAt: function() {  // > CustomCode.jszip:1624
          // see implementations  // > CustomCode.jszip:1625
      },  // > CustomCode.jszip:1626
      /**  // > CustomCode.jszip:1627
       * Get the next number with a given byte size.  // > CustomCode.jszip:1628
       * @param {number} size the number of bytes to read.  // > CustomCode.jszip:1629
       * @return {number} the corresponding number.  // > CustomCode.jszip:1630
       */  // > CustomCode.jszip:1631
      readInt: function(size) {  // > CustomCode.jszip:1632
          var result = 0,  // > CustomCode.jszip:1633
              i;  // > CustomCode.jszip:1634
          this.checkOffset(size);  // > CustomCode.jszip:1635
          for (i = this.index + size - 1; i >= this.index; i--) {  // > CustomCode.jszip:1636
              result = (result << 8) + this.byteAt(i);  // > CustomCode.jszip:1637
          }  // > CustomCode.jszip:1638
          this.index += size;  // > CustomCode.jszip:1639
          return result;  // > CustomCode.jszip:1640
      },  // > CustomCode.jszip:1641
      /**  // > CustomCode.jszip:1642
       * Get the next string with a given byte size.  // > CustomCode.jszip:1643
       * @param {number} size the number of bytes to read.  // > CustomCode.jszip:1644
       * @return {string} the corresponding string.  // > CustomCode.jszip:1645
       */  // > CustomCode.jszip:1646
      readString: function(size) {  // > CustomCode.jszip:1647
          return utils.transformTo("string", this.readData(size));  // > CustomCode.jszip:1648
      },  // > CustomCode.jszip:1649
      /**  // > CustomCode.jszip:1650
       * Get raw data without conversion, <size> bytes.  // > CustomCode.jszip:1651
       * @param {number} size the number of bytes to read.  // > CustomCode.jszip:1652
       * @return {Object} the raw data, implementation specific.  // > CustomCode.jszip:1653
       */  // > CustomCode.jszip:1654
      readData: function() {  // > CustomCode.jszip:1655
          // see implementations  // > CustomCode.jszip:1656
      },  // > CustomCode.jszip:1657
      /**  // > CustomCode.jszip:1658
       * Find the last occurrence of a zip signature (4 bytes).  // > CustomCode.jszip:1659
       * @param {string} sig the signature to find.  // > CustomCode.jszip:1660
       * @return {number} the index of the last occurrence, -1 if not found.  // > CustomCode.jszip:1661
       */  // > CustomCode.jszip:1662
      lastIndexOfSignature: function() {  // > CustomCode.jszip:1663
          // see implementations  // > CustomCode.jszip:1664
      },  // > CustomCode.jszip:1665
      /**  // > CustomCode.jszip:1666
       * Read the signature (4 bytes) at the current position and compare it with sig.  // > CustomCode.jszip:1667
       * @param {string} sig the expected signature  // > CustomCode.jszip:1668
       * @return {boolean} true if the signature matches, false otherwise.  // > CustomCode.jszip:1669
       */  // > CustomCode.jszip:1670
      readAndCheckSignature: function() {  // > CustomCode.jszip:1671
          // see implementations  // > CustomCode.jszip:1672
      },  // > CustomCode.jszip:1673
      /**  // > CustomCode.jszip:1674
       * Get the next date.  // > CustomCode.jszip:1675
       * @return {Date} the date.  // > CustomCode.jszip:1676
       */  // > CustomCode.jszip:1677
      readDate: function() {  // > CustomCode.jszip:1678
          var dostime = this.readInt(4);  // > CustomCode.jszip:1679
          return new Date(Date.UTC(  // > CustomCode.jszip:1680
              ((dostime >> 25) & 0x7f) + 1980, // year  // > CustomCode.jszip:1681
              ((dostime >> 21) & 0x0f) - 1, // month  // > CustomCode.jszip:1682
              (dostime >> 16) & 0x1f, // day  // > CustomCode.jszip:1683
              (dostime >> 11) & 0x1f, // hour  // > CustomCode.jszip:1684
              (dostime >> 5) & 0x3f, // minute  // > CustomCode.jszip:1685
              (dostime & 0x1f) << 1)); // second  // > CustomCode.jszip:1686
      }  // > CustomCode.jszip:1687
  };  // > CustomCode.jszip:1688
  module.exports = DataReader;  // > CustomCode.jszip:1689
  },{"../utils":32}],19:[function(require,module,exports){  // > CustomCode.jszip:1690
  "use strict";  // > CustomCode.jszip:1691
  var Uint8ArrayReader = require("./Uint8ArrayReader");  // > CustomCode.jszip:1692
  var utils = require("../utils");  // > CustomCode.jszip:1693
  function NodeBufferReader(data) {  // > CustomCode.jszip:1694
      Uint8ArrayReader.call(this, data);  // > CustomCode.jszip:1695
  }  // > CustomCode.jszip:1696
  utils.inherits(NodeBufferReader, Uint8ArrayReader);  // > CustomCode.jszip:1697
  /**  // > CustomCode.jszip:1698
   * @see DataReader.readData  // > CustomCode.jszip:1699
   */  // > CustomCode.jszip:1700
  NodeBufferReader.prototype.readData = function(size) {  // > CustomCode.jszip:1701
      this.checkOffset(size);  // > CustomCode.jszip:1702
      var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);  // > CustomCode.jszip:1703
      this.index += size;  // > CustomCode.jszip:1704
      return result;  // > CustomCode.jszip:1705
  };  // > CustomCode.jszip:1706
  module.exports = NodeBufferReader;  // > CustomCode.jszip:1707
  },{"../utils":32,"./Uint8ArrayReader":21}],20:[function(require,module,exports){  // > CustomCode.jszip:1708
  "use strict";  // > CustomCode.jszip:1709
  var DataReader = require("./DataReader");  // > CustomCode.jszip:1710
  var utils = require("../utils");  // > CustomCode.jszip:1711
  function StringReader(data) {  // > CustomCode.jszip:1712
      DataReader.call(this, data);  // > CustomCode.jszip:1713
  }  // > CustomCode.jszip:1714
  utils.inherits(StringReader, DataReader);  // > CustomCode.jszip:1715
  /**  // > CustomCode.jszip:1716
   * @see DataReader.byteAt  // > CustomCode.jszip:1717
   */  // > CustomCode.jszip:1718
  StringReader.prototype.byteAt = function(i) {  // > CustomCode.jszip:1719
      return this.data.charCodeAt(this.zero + i);  // > CustomCode.jszip:1720
  };  // > CustomCode.jszip:1721
  /**  // > CustomCode.jszip:1722
   * @see DataReader.lastIndexOfSignature  // > CustomCode.jszip:1723
   */  // > CustomCode.jszip:1724
  StringReader.prototype.lastIndexOfSignature = function(sig) {  // > CustomCode.jszip:1725
      return this.data.lastIndexOf(sig) - this.zero;  // > CustomCode.jszip:1726
  };  // > CustomCode.jszip:1727
  /**  // > CustomCode.jszip:1728
   * @see DataReader.readAndCheckSignature  // > CustomCode.jszip:1729
   */  // > CustomCode.jszip:1730
  StringReader.prototype.readAndCheckSignature = function (sig) {  // > CustomCode.jszip:1731
      var data = this.readData(4);  // > CustomCode.jszip:1732
      return sig === data;  // > CustomCode.jszip:1733
  };  // > CustomCode.jszip:1734
  /**  // > CustomCode.jszip:1735
   * @see DataReader.readData  // > CustomCode.jszip:1736
   */  // > CustomCode.jszip:1737
  StringReader.prototype.readData = function(size) {  // > CustomCode.jszip:1738
      this.checkOffset(size);  // > CustomCode.jszip:1739
      // this will work because the constructor applied the "& 0xff" mask.  // > CustomCode.jszip:1740
      var result = this.data.slice(this.zero + this.index, this.zero + this.index + size);  // > CustomCode.jszip:1741
      this.index += size;  // > CustomCode.jszip:1742
      return result;  // > CustomCode.jszip:1743
  };  // > CustomCode.jszip:1744
  module.exports = StringReader;  // > CustomCode.jszip:1745
  },{"../utils":32,"./DataReader":18}],21:[function(require,module,exports){  // > CustomCode.jszip:1746
  "use strict";  // > CustomCode.jszip:1747
  var ArrayReader = require("./ArrayReader");  // > CustomCode.jszip:1748
  var utils = require("../utils");  // > CustomCode.jszip:1749
  function Uint8ArrayReader(data) {  // > CustomCode.jszip:1750
      ArrayReader.call(this, data);  // > CustomCode.jszip:1751
  }  // > CustomCode.jszip:1752
  utils.inherits(Uint8ArrayReader, ArrayReader);  // > CustomCode.jszip:1753
  /**  // > CustomCode.jszip:1754
   * @see DataReader.readData  // > CustomCode.jszip:1755
   */  // > CustomCode.jszip:1756
  Uint8ArrayReader.prototype.readData = function(size) {  // > CustomCode.jszip:1757
      this.checkOffset(size);  // > CustomCode.jszip:1758
      if(size === 0) {  // > CustomCode.jszip:1759
          // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].  // > CustomCode.jszip:1760
          return new Uint8Array(0);  // > CustomCode.jszip:1761
      }  // > CustomCode.jszip:1762
      var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size);  // > CustomCode.jszip:1763
      this.index += size;  // > CustomCode.jszip:1764
      return result;  // > CustomCode.jszip:1765
  };  // > CustomCode.jszip:1766
  module.exports = Uint8ArrayReader;  // > CustomCode.jszip:1767
  },{"../utils":32,"./ArrayReader":17}],22:[function(require,module,exports){  // > CustomCode.jszip:1768
  "use strict";  // > CustomCode.jszip:1769
  var utils = require("../utils");  // > CustomCode.jszip:1770
  var support = require("../support");  // > CustomCode.jszip:1771
  var ArrayReader = require("./ArrayReader");  // > CustomCode.jszip:1772
  var StringReader = require("./StringReader");  // > CustomCode.jszip:1773
  var NodeBufferReader = require("./NodeBufferReader");  // > CustomCode.jszip:1774
  var Uint8ArrayReader = require("./Uint8ArrayReader");  // > CustomCode.jszip:1775
  /**  // > CustomCode.jszip:1776
   * Create a reader adapted to the data.  // > CustomCode.jszip:1777
   * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read.  // > CustomCode.jszip:1778
   * @return {DataReader} the data reader.  // > CustomCode.jszip:1779
   */  // > CustomCode.jszip:1780
  module.exports = function (data) {  // > CustomCode.jszip:1781
      var type = utils.getTypeOf(data);  // > CustomCode.jszip:1782
      utils.checkSupport(type);  // > CustomCode.jszip:1783
      if (type === "string" && !support.uint8array) {  // > CustomCode.jszip:1784
          return new StringReader(data);  // > CustomCode.jszip:1785
      }  // > CustomCode.jszip:1786
      if (type === "nodebuffer") {  // > CustomCode.jszip:1787
          return new NodeBufferReader(data);  // > CustomCode.jszip:1788
      }  // > CustomCode.jszip:1789
      if (support.uint8array) {  // > CustomCode.jszip:1790
          return new Uint8ArrayReader(utils.transformTo("uint8array", data));  // > CustomCode.jszip:1791
      }  // > CustomCode.jszip:1792
      return new ArrayReader(utils.transformTo("array", data));  // > CustomCode.jszip:1793
  };  // > CustomCode.jszip:1794
  },{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(require,module,exports){  // > CustomCode.jszip:1795
  "use strict";  // > CustomCode.jszip:1796
  exports.LOCAL_FILE_HEADER = "PK\x03\x04";  // > CustomCode.jszip:1797
  exports.CENTRAL_FILE_HEADER = "PK\x01\x02";  // > CustomCode.jszip:1798
  exports.CENTRAL_DIRECTORY_END = "PK\x05\x06";  // > CustomCode.jszip:1799
  exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";  // > CustomCode.jszip:1800
  exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";  // > CustomCode.jszip:1801
  exports.DATA_DESCRIPTOR = "PK\x07\x08";  // > CustomCode.jszip:1802
  },{}],24:[function(require,module,exports){  // > CustomCode.jszip:1803
  "use strict";  // > CustomCode.jszip:1804
  var GenericWorker = require("./GenericWorker");  // > CustomCode.jszip:1805
  var utils = require("../utils");  // > CustomCode.jszip:1806
  /**  // > CustomCode.jszip:1807
   * A worker which convert chunks to a specified type.  // > CustomCode.jszip:1808
   * @constructor  // > CustomCode.jszip:1809
   * @param {String} destType the destination type.  // > CustomCode.jszip:1810
   */  // > CustomCode.jszip:1811
  function ConvertWorker(destType) {  // > CustomCode.jszip:1812
      GenericWorker.call(this, "ConvertWorker to " + destType);  // > CustomCode.jszip:1813
      this.destType = destType;  // > CustomCode.jszip:1814
  }  // > CustomCode.jszip:1815
  utils.inherits(ConvertWorker, GenericWorker);  // > CustomCode.jszip:1816
  /**  // > CustomCode.jszip:1817
   * @see GenericWorker.processChunk  // > CustomCode.jszip:1818
   */  // > CustomCode.jszip:1819
  ConvertWorker.prototype.processChunk = function (chunk) {  // > CustomCode.jszip:1820
      this.push({  // > CustomCode.jszip:1821
          data : utils.transformTo(this.destType, chunk.data),  // > CustomCode.jszip:1822
          meta : chunk.meta  // > CustomCode.jszip:1823
      });  // > CustomCode.jszip:1824
  };  // > CustomCode.jszip:1825
  module.exports = ConvertWorker;  // > CustomCode.jszip:1826
  },{"../utils":32,"./GenericWorker":28}],25:[function(require,module,exports){  // > CustomCode.jszip:1827
  "use strict";  // > CustomCode.jszip:1828
  var GenericWorker = require("./GenericWorker");  // > CustomCode.jszip:1829
  var crc32 = require("../crc32");  // > CustomCode.jszip:1830
  var utils = require("../utils");  // > CustomCode.jszip:1831
  /**  // > CustomCode.jszip:1832
   * A worker which calculate the crc32 of the data flowing through.  // > CustomCode.jszip:1833
   * @constructor  // > CustomCode.jszip:1834
   */  // > CustomCode.jszip:1835
  function Crc32Probe() {  // > CustomCode.jszip:1836
      GenericWorker.call(this, "Crc32Probe");  // > CustomCode.jszip:1837
      this.withStreamInfo("crc32", 0);  // > CustomCode.jszip:1838
  }  // > CustomCode.jszip:1839
  utils.inherits(Crc32Probe, GenericWorker);  // > CustomCode.jszip:1840
  /**  // > CustomCode.jszip:1841
   * @see GenericWorker.processChunk  // > CustomCode.jszip:1842
   */  // > CustomCode.jszip:1843
  Crc32Probe.prototype.processChunk = function (chunk) {  // > CustomCode.jszip:1844
      this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0);  // > CustomCode.jszip:1845
      this.push(chunk);  // > CustomCode.jszip:1846
  };  // > CustomCode.jszip:1847
  module.exports = Crc32Probe;  // > CustomCode.jszip:1848
  },{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(require,module,exports){  // > CustomCode.jszip:1849
  "use strict";  // > CustomCode.jszip:1850
  var utils = require("../utils");  // > CustomCode.jszip:1851
  var GenericWorker = require("./GenericWorker");  // > CustomCode.jszip:1852
  /**  // > CustomCode.jszip:1853
   * A worker which calculate the total length of the data flowing through.  // > CustomCode.jszip:1854
   * @constructor  // > CustomCode.jszip:1855
   * @param {String} propName the name used to expose the length  // > CustomCode.jszip:1856
   */  // > CustomCode.jszip:1857
  function DataLengthProbe(propName) {  // > CustomCode.jszip:1858
      GenericWorker.call(this, "DataLengthProbe for " + propName);  // > CustomCode.jszip:1859
      this.propName = propName;  // > CustomCode.jszip:1860
      this.withStreamInfo(propName, 0);  // > CustomCode.jszip:1861
  }  // > CustomCode.jszip:1862
  utils.inherits(DataLengthProbe, GenericWorker);  // > CustomCode.jszip:1863
  /**  // > CustomCode.jszip:1864
   * @see GenericWorker.processChunk  // > CustomCode.jszip:1865
   */  // > CustomCode.jszip:1866
  DataLengthProbe.prototype.processChunk = function (chunk) {  // > CustomCode.jszip:1867
      if(chunk) {  // > CustomCode.jszip:1868
          var length = this.streamInfo[this.propName] || 0;  // > CustomCode.jszip:1869
          this.streamInfo[this.propName] = length + chunk.data.length;  // > CustomCode.jszip:1870
      }  // > CustomCode.jszip:1871
      GenericWorker.prototype.processChunk.call(this, chunk);  // > CustomCode.jszip:1872
  };  // > CustomCode.jszip:1873
  module.exports = DataLengthProbe;  // > CustomCode.jszip:1874
  },{"../utils":32,"./GenericWorker":28}],27:[function(require,module,exports){  // > CustomCode.jszip:1875
  "use strict";  // > CustomCode.jszip:1876
  var utils = require("../utils");  // > CustomCode.jszip:1877
  var GenericWorker = require("./GenericWorker");  // > CustomCode.jszip:1878
  // the size of the generated chunks  // > CustomCode.jszip:1879
  // TODO expose this as a public variable  // > CustomCode.jszip:1880
  var DEFAULT_BLOCK_SIZE = 16 * 1024;  // > CustomCode.jszip:1881
  /**  // > CustomCode.jszip:1882
   * A worker that reads a content and emits chunks.  // > CustomCode.jszip:1883
   * @constructor  // > CustomCode.jszip:1884
   * @param {Promise} dataP the promise of the data to split  // > CustomCode.jszip:1885
   */  // > CustomCode.jszip:1886
  function DataWorker(dataP) {  // > CustomCode.jszip:1887
      GenericWorker.call(this, "DataWorker");  // > CustomCode.jszip:1888
      var self = this;  // > CustomCode.jszip:1889
      this.dataIsReady = false;  // > CustomCode.jszip:1890
      this.index = 0;  // > CustomCode.jszip:1891
      this.max = 0;  // > CustomCode.jszip:1892
      this.data = null;  // > CustomCode.jszip:1893
      this.type = "";  // > CustomCode.jszip:1894
      this._tickScheduled = false;  // > CustomCode.jszip:1895
      dataP.then(function (data) {  // > CustomCode.jszip:1896
          self.dataIsReady = true;  // > CustomCode.jszip:1897
          self.data = data;  // > CustomCode.jszip:1898
          self.max = data && data.length || 0;  // > CustomCode.jszip:1899
          self.type = utils.getTypeOf(data);  // > CustomCode.jszip:1900
          if(!self.isPaused) {  // > CustomCode.jszip:1901
              self._tickAndRepeat();  // > CustomCode.jszip:1902
          }  // > CustomCode.jszip:1903
      }, function (e) {  // > CustomCode.jszip:1904
          self.error(e);  // > CustomCode.jszip:1905
      });  // > CustomCode.jszip:1906
  }  // > CustomCode.jszip:1907
  utils.inherits(DataWorker, GenericWorker);  // > CustomCode.jszip:1908
  /**  // > CustomCode.jszip:1909
   * @see GenericWorker.cleanUp  // > CustomCode.jszip:1910
   */  // > CustomCode.jszip:1911
  DataWorker.prototype.cleanUp = function () {  // > CustomCode.jszip:1912
      GenericWorker.prototype.cleanUp.call(this);  // > CustomCode.jszip:1913
      this.data = null;  // > CustomCode.jszip:1914
  };  // > CustomCode.jszip:1915
  /**  // > CustomCode.jszip:1916
   * @see GenericWorker.resume  // > CustomCode.jszip:1917
   */  // > CustomCode.jszip:1918
  DataWorker.prototype.resume = function () {  // > CustomCode.jszip:1919
      if(!GenericWorker.prototype.resume.call(this)) {  // > CustomCode.jszip:1920
          return false;  // > CustomCode.jszip:1921
      }  // > CustomCode.jszip:1922
      if (!this._tickScheduled && this.dataIsReady) {  // > CustomCode.jszip:1923
          this._tickScheduled = true;  // > CustomCode.jszip:1924
          utils.delay(this._tickAndRepeat, [], this);  // > CustomCode.jszip:1925
      }  // > CustomCode.jszip:1926
      return true;  // > CustomCode.jszip:1927
  };  // > CustomCode.jszip:1928
  /**  // > CustomCode.jszip:1929
   * Trigger a tick a schedule an other call to this function.  // > CustomCode.jszip:1930
   */  // > CustomCode.jszip:1931
  DataWorker.prototype._tickAndRepeat = function() {  // > CustomCode.jszip:1932
      this._tickScheduled = false;  // > CustomCode.jszip:1933
      if(this.isPaused || this.isFinished) {  // > CustomCode.jszip:1934
          return;  // > CustomCode.jszip:1935
      }  // > CustomCode.jszip:1936
      this._tick();  // > CustomCode.jszip:1937
      if(!this.isFinished) {  // > CustomCode.jszip:1938
          utils.delay(this._tickAndRepeat, [], this);  // > CustomCode.jszip:1939
          this._tickScheduled = true;  // > CustomCode.jszip:1940
      }  // > CustomCode.jszip:1941
  };  // > CustomCode.jszip:1942
  /**  // > CustomCode.jszip:1943
   * Read and push a chunk.  // > CustomCode.jszip:1944
   */  // > CustomCode.jszip:1945
  DataWorker.prototype._tick = function() {  // > CustomCode.jszip:1946
      if(this.isPaused || this.isFinished) {  // > CustomCode.jszip:1947
          return false;  // > CustomCode.jszip:1948
      }  // > CustomCode.jszip:1949
      var size = DEFAULT_BLOCK_SIZE;  // > CustomCode.jszip:1950
      var data = null, nextIndex = Math.min(this.max, this.index + size);  // > CustomCode.jszip:1951
      if (this.index >= this.max) {  // > CustomCode.jszip:1952
          // EOF  // > CustomCode.jszip:1953
          return this.end();  // > CustomCode.jszip:1954
      } else {  // > CustomCode.jszip:1955
          switch(this.type) {  // > CustomCode.jszip:1956
          case "string":  // > CustomCode.jszip:1957
              data = this.data.substring(this.index, nextIndex);  // > CustomCode.jszip:1958
              break;  // > CustomCode.jszip:1959
          case "uint8array":  // > CustomCode.jszip:1960
              data = this.data.subarray(this.index, nextIndex);  // > CustomCode.jszip:1961
              break;  // > CustomCode.jszip:1962
          case "array":  // > CustomCode.jszip:1963
          case "nodebuffer":  // > CustomCode.jszip:1964
              data = this.data.slice(this.index, nextIndex);  // > CustomCode.jszip:1965
              break;  // > CustomCode.jszip:1966
          }  // > CustomCode.jszip:1967
          this.index = nextIndex;  // > CustomCode.jszip:1968
          return this.push({  // > CustomCode.jszip:1969
              data : data,  // > CustomCode.jszip:1970
              meta : {  // > CustomCode.jszip:1971
                  percent : this.max ? this.index / this.max * 100 : 0  // > CustomCode.jszip:1972
              }  // > CustomCode.jszip:1973
          });  // > CustomCode.jszip:1974
      }  // > CustomCode.jszip:1975
  };  // > CustomCode.jszip:1976
  module.exports = DataWorker;  // > CustomCode.jszip:1977
  },{"../utils":32,"./GenericWorker":28}],28:[function(require,module,exports){  // > CustomCode.jszip:1978
  "use strict";  // > CustomCode.jszip:1979
  /**  // > CustomCode.jszip:1980
   * A worker that does nothing but passing chunks to the next one. This is like  // > CustomCode.jszip:1981
   * a nodejs stream but with some differences. On the good side :  // > CustomCode.jszip:1982
   * - it works on IE 6-9 without any issue / polyfill  // > CustomCode.jszip:1983
   * - it weights less than the full dependencies bundled with browserify  // > CustomCode.jszip:1984
   * - it forwards errors (no need to declare an error handler EVERYWHERE)  // > CustomCode.jszip:1985
   *  // > CustomCode.jszip:1986
   * A chunk is an object with 2 attributes : `meta` and `data`. The former is an  // > CustomCode.jszip:1987
   * object containing anything (`percent` for example), see each worker for more  // > CustomCode.jszip:1988
   * details. The latter is the real data (String, Uint8Array, etc).  // > CustomCode.jszip:1989
   *  // > CustomCode.jszip:1990
   * @constructor  // > CustomCode.jszip:1991
   * @param {String} name the name of the stream (mainly used for debugging purposes)  // > CustomCode.jszip:1992
   */  // > CustomCode.jszip:1993
  function GenericWorker(name) {  // > CustomCode.jszip:1994
      // the name of the worker  // > CustomCode.jszip:1995
      this.name = name || "default";  // > CustomCode.jszip:1996
      // an object containing metadata about the workers chain  // > CustomCode.jszip:1997
      this.streamInfo = {};  // > CustomCode.jszip:1998
      // an error which happened when the worker was paused  // > CustomCode.jszip:1999
      this.generatedError = null;  // > CustomCode.jszip:2000
      // an object containing metadata to be merged by this worker into the general metadata  // > CustomCode.jszip:2001
      this.extraStreamInfo = {};  // > CustomCode.jszip:2002
      // true if the stream is paused (and should not do anything), false otherwise  // > CustomCode.jszip:2003
      this.isPaused = true;  // > CustomCode.jszip:2004
      // true if the stream is finished (and should not do anything), false otherwise  // > CustomCode.jszip:2005
      this.isFinished = false;  // > CustomCode.jszip:2006
      // true if the stream is locked to prevent further structure updates (pipe), false otherwise  // > CustomCode.jszip:2007
      this.isLocked = false;  // > CustomCode.jszip:2008
      // the event listeners  // > CustomCode.jszip:2009
      this._listeners = {  // > CustomCode.jszip:2010
          "data":[],  // > CustomCode.jszip:2011
          "end":[],  // > CustomCode.jszip:2012
          "error":[]  // > CustomCode.jszip:2013
      };  // > CustomCode.jszip:2014
      // the previous worker, if any  // > CustomCode.jszip:2015
      this.previous = null;  // > CustomCode.jszip:2016
  }  // > CustomCode.jszip:2017
  GenericWorker.prototype = {  // > CustomCode.jszip:2018
      /**  // > CustomCode.jszip:2019
       * Push a chunk to the next workers.  // > CustomCode.jszip:2020
       * @param {Object} chunk the chunk to push  // > CustomCode.jszip:2021
       */  // > CustomCode.jszip:2022
      push : function (chunk) {  // > CustomCode.jszip:2023
          this.emit("data", chunk);  // > CustomCode.jszip:2024
      },  // > CustomCode.jszip:2025
      /**  // > CustomCode.jszip:2026
       * End the stream.  // > CustomCode.jszip:2027
       * @return {Boolean} true if this call ended the worker, false otherwise.  // > CustomCode.jszip:2028
       */  // > CustomCode.jszip:2029
      end : function () {  // > CustomCode.jszip:2030
          if (this.isFinished) {  // > CustomCode.jszip:2031
              return false;  // > CustomCode.jszip:2032
          }  // > CustomCode.jszip:2033
          this.flush();  // > CustomCode.jszip:2034
          try {  // > CustomCode.jszip:2035
              this.emit("end");  // > CustomCode.jszip:2036
              this.cleanUp();  // > CustomCode.jszip:2037
              this.isFinished = true;  // > CustomCode.jszip:2038
          } catch (e) {  // > CustomCode.jszip:2039
              this.emit("error", e);  // > CustomCode.jszip:2040
          }  // > CustomCode.jszip:2041
          return true;  // > CustomCode.jszip:2042
      },  // > CustomCode.jszip:2043
      /**  // > CustomCode.jszip:2044
       * End the stream with an error.  // > CustomCode.jszip:2045
       * @param {Error} e the error which caused the premature end.  // > CustomCode.jszip:2046
       * @return {Boolean} true if this call ended the worker with an error, false otherwise.  // > CustomCode.jszip:2047
       */  // > CustomCode.jszip:2048
      error : function (e) {  // > CustomCode.jszip:2049
          if (this.isFinished) {  // > CustomCode.jszip:2050
              return false;  // > CustomCode.jszip:2051
          }  // > CustomCode.jszip:2052
          if(this.isPaused) {  // > CustomCode.jszip:2053
              this.generatedError = e;  // > CustomCode.jszip:2054
          } else {  // > CustomCode.jszip:2055
              this.isFinished = true;  // > CustomCode.jszip:2056
              this.emit("error", e);  // > CustomCode.jszip:2057
              // in the workers chain exploded in the middle of the chain,  // > CustomCode.jszip:2058
              // the error event will go downward but we also need to notify  // > CustomCode.jszip:2059
              // workers upward that there has been an error.  // > CustomCode.jszip:2060
              if(this.previous) {  // > CustomCode.jszip:2061
                  this.previous.error(e);  // > CustomCode.jszip:2062
              }  // > CustomCode.jszip:2063
              this.cleanUp();  // > CustomCode.jszip:2064
          }  // > CustomCode.jszip:2065
          return true;  // > CustomCode.jszip:2066
      },  // > CustomCode.jszip:2067
      /**  // > CustomCode.jszip:2068
       * Add a callback on an event.  // > CustomCode.jszip:2069
       * @param {String} name the name of the event (data, end, error)  // > CustomCode.jszip:2070
       * @param {Function} listener the function to call when the event is triggered  // > CustomCode.jszip:2071
       * @return {GenericWorker} the current object for chainability  // > CustomCode.jszip:2072
       */  // > CustomCode.jszip:2073
      on : function (name, listener) {  // > CustomCode.jszip:2074
          this._listeners[name].push(listener);  // > CustomCode.jszip:2075
          return this;  // > CustomCode.jszip:2076
      },  // > CustomCode.jszip:2077
      /**  // > CustomCode.jszip:2078
       * Clean any references when a worker is ending.  // > CustomCode.jszip:2079
       */  // > CustomCode.jszip:2080
      cleanUp : function () {  // > CustomCode.jszip:2081
          this.streamInfo = this.generatedError = this.extraStreamInfo = null;  // > CustomCode.jszip:2082
          this._listeners = [];  // > CustomCode.jszip:2083
      },  // > CustomCode.jszip:2084
      /**  // > CustomCode.jszip:2085
       * Trigger an event. This will call registered callback with the provided arg.  // > CustomCode.jszip:2086
       * @param {String} name the name of the event (data, end, error)  // > CustomCode.jszip:2087
       * @param {Object} arg the argument to call the callback with.  // > CustomCode.jszip:2088
       */  // > CustomCode.jszip:2089
      emit : function (name, arg) {  // > CustomCode.jszip:2090
          if (this._listeners[name]) {  // > CustomCode.jszip:2091
              for(var i = 0; i < this._listeners[name].length; i++) {  // > CustomCode.jszip:2092
                  this._listeners[name][i].call(this, arg);  // > CustomCode.jszip:2093
              }  // > CustomCode.jszip:2094
          }  // > CustomCode.jszip:2095
      },  // > CustomCode.jszip:2096
      /**  // > CustomCode.jszip:2097
       * Chain a worker with an other.  // > CustomCode.jszip:2098
       * @param {Worker} next the worker receiving events from the current one.  // > CustomCode.jszip:2099
       * @return {worker} the next worker for chainability  // > CustomCode.jszip:2100
       */  // > CustomCode.jszip:2101
      pipe : function (next) {  // > CustomCode.jszip:2102
          return next.registerPrevious(this);  // > CustomCode.jszip:2103
      },  // > CustomCode.jszip:2104
      /**  // > CustomCode.jszip:2105
       * Same as `pipe` in the other direction.  // > CustomCode.jszip:2106
       * Using an API with `pipe(next)` is very easy.  // > CustomCode.jszip:2107
       * Implementing the API with the point of view of the next one registering  // > CustomCode.jszip:2108
       * a source is easier, see the ZipFileWorker.  // > CustomCode.jszip:2109
       * @param {Worker} previous the previous worker, sending events to this one  // > CustomCode.jszip:2110
       * @return {Worker} the current worker for chainability  // > CustomCode.jszip:2111
       */  // > CustomCode.jszip:2112
      registerPrevious : function (previous) {  // > CustomCode.jszip:2113
          if (this.isLocked) {  // > CustomCode.jszip:2114
              throw new Error("The stream '" + this + "' has already been used.");  // > CustomCode.jszip:2115
          }  // > CustomCode.jszip:2116
          // sharing the streamInfo...  // > CustomCode.jszip:2117
          this.streamInfo = previous.streamInfo;  // > CustomCode.jszip:2118
          // ... and adding our own bits  // > CustomCode.jszip:2119
          this.mergeStreamInfo();  // > CustomCode.jszip:2120
          this.previous =  previous;  // > CustomCode.jszip:2121
          var self = this;  // > CustomCode.jszip:2122
          previous.on("data", function (chunk) {  // > CustomCode.jszip:2123
              self.processChunk(chunk);  // > CustomCode.jszip:2124
          });  // > CustomCode.jszip:2125
          previous.on("end", function () {  // > CustomCode.jszip:2126
              self.end();  // > CustomCode.jszip:2127
          });  // > CustomCode.jszip:2128
          previous.on("error", function (e) {  // > CustomCode.jszip:2129
              self.error(e);  // > CustomCode.jszip:2130
          });  // > CustomCode.jszip:2131
          return this;  // > CustomCode.jszip:2132
      },  // > CustomCode.jszip:2133
      /**  // > CustomCode.jszip:2134
       * Pause the stream so it doesn't send events anymore.  // > CustomCode.jszip:2135
       * @return {Boolean} true if this call paused the worker, false otherwise.  // > CustomCode.jszip:2136
       */  // > CustomCode.jszip:2137
      pause : function () {  // > CustomCode.jszip:2138
          if(this.isPaused || this.isFinished) {  // > CustomCode.jszip:2139
              return false;  // > CustomCode.jszip:2140
          }  // > CustomCode.jszip:2141
          this.isPaused = true;  // > CustomCode.jszip:2142
          if(this.previous) {  // > CustomCode.jszip:2143
              this.previous.pause();  // > CustomCode.jszip:2144
          }  // > CustomCode.jszip:2145
          return true;  // > CustomCode.jszip:2146
      },  // > CustomCode.jszip:2147
      /**  // > CustomCode.jszip:2148
       * Resume a paused stream.  // > CustomCode.jszip:2149
       * @return {Boolean} true if this call resumed the worker, false otherwise.  // > CustomCode.jszip:2150
       */  // > CustomCode.jszip:2151
      resume : function () {  // > CustomCode.jszip:2152
          if(!this.isPaused || this.isFinished) {  // > CustomCode.jszip:2153
              return false;  // > CustomCode.jszip:2154
          }  // > CustomCode.jszip:2155
          this.isPaused = false;  // > CustomCode.jszip:2156
          // if true, the worker tried to resume but failed  // > CustomCode.jszip:2157
          var withError = false;  // > CustomCode.jszip:2158
          if(this.generatedError) {  // > CustomCode.jszip:2159
              this.error(this.generatedError);  // > CustomCode.jszip:2160
              withError = true;  // > CustomCode.jszip:2161
          }  // > CustomCode.jszip:2162
          if(this.previous) {  // > CustomCode.jszip:2163
              this.previous.resume();  // > CustomCode.jszip:2164
          }  // > CustomCode.jszip:2165
          return !withError;  // > CustomCode.jszip:2166
      },  // > CustomCode.jszip:2167
      /**  // > CustomCode.jszip:2168
       * Flush any remaining bytes as the stream is ending.  // > CustomCode.jszip:2169
       */  // > CustomCode.jszip:2170
      flush : function () {},  // > CustomCode.jszip:2171
      /**  // > CustomCode.jszip:2172
       * Process a chunk. This is usually the method overridden.  // > CustomCode.jszip:2173
       * @param {Object} chunk the chunk to process.  // > CustomCode.jszip:2174
       */  // > CustomCode.jszip:2175
      processChunk : function(chunk) {  // > CustomCode.jszip:2176
          this.push(chunk);  // > CustomCode.jszip:2177
      },  // > CustomCode.jszip:2178
      /**  // > CustomCode.jszip:2179
       * Add a key/value to be added in the workers chain streamInfo once activated.  // > CustomCode.jszip:2180
       * @param {String} key the key to use  // > CustomCode.jszip:2181
       * @param {Object} value the associated value  // > CustomCode.jszip:2182
       * @return {Worker} the current worker for chainability  // > CustomCode.jszip:2183
       */  // > CustomCode.jszip:2184
      withStreamInfo : function (key, value) {  // > CustomCode.jszip:2185
          this.extraStreamInfo[key] = value;  // > CustomCode.jszip:2186
          this.mergeStreamInfo();  // > CustomCode.jszip:2187
          return this;  // > CustomCode.jszip:2188
      },  // > CustomCode.jszip:2189
      /**  // > CustomCode.jszip:2190
       * Merge this worker's streamInfo into the chain's streamInfo.  // > CustomCode.jszip:2191
       */  // > CustomCode.jszip:2192
      mergeStreamInfo : function () {  // > CustomCode.jszip:2193
          for(var key in this.extraStreamInfo) {  // > CustomCode.jszip:2194
              if (!Object.prototype.hasOwnProperty.call(this.extraStreamInfo, key)) {  // > CustomCode.jszip:2195
                  continue;  // > CustomCode.jszip:2196
              }  // > CustomCode.jszip:2197
              this.streamInfo[key] = this.extraStreamInfo[key];  // > CustomCode.jszip:2198
          }  // > CustomCode.jszip:2199
      },  // > CustomCode.jszip:2200
      /**  // > CustomCode.jszip:2201
       * Lock the stream to prevent further updates on the workers chain.  // > CustomCode.jszip:2202
       * After calling this method, all calls to pipe will fail.  // > CustomCode.jszip:2203
       */  // > CustomCode.jszip:2204
      lock: function () {  // > CustomCode.jszip:2205
          if (this.isLocked) {  // > CustomCode.jszip:2206
              throw new Error("The stream '" + this + "' has already been used.");  // > CustomCode.jszip:2207
          }  // > CustomCode.jszip:2208
          this.isLocked = true;  // > CustomCode.jszip:2209
          if (this.previous) {  // > CustomCode.jszip:2210
              this.previous.lock();  // > CustomCode.jszip:2211
          }  // > CustomCode.jszip:2212
      },  // > CustomCode.jszip:2213
      /**  // > CustomCode.jszip:2214
       *  // > CustomCode.jszip:2215
       * Pretty print the workers chain.  // > CustomCode.jszip:2216
       */  // > CustomCode.jszip:2217
      toString : function () {  // > CustomCode.jszip:2218
          var me = "Worker " + this.name;  // > CustomCode.jszip:2219
          if (this.previous) {  // > CustomCode.jszip:2220
              return this.previous + " -> " + me;  // > CustomCode.jszip:2221
          } else {  // > CustomCode.jszip:2222
              return me;  // > CustomCode.jszip:2223
          }  // > CustomCode.jszip:2224
      }  // > CustomCode.jszip:2225
  };  // > CustomCode.jszip:2226
  module.exports = GenericWorker;  // > CustomCode.jszip:2227
  },{}],29:[function(require,module,exports){  // > CustomCode.jszip:2228
  "use strict";  // > CustomCode.jszip:2229
  var utils = require("../utils");  // > CustomCode.jszip:2230
  var ConvertWorker = require("./ConvertWorker");  // > CustomCode.jszip:2231
  var GenericWorker = require("./GenericWorker");  // > CustomCode.jszip:2232
  var base64 = require("../base64");  // > CustomCode.jszip:2233
  var support = require("../support");  // > CustomCode.jszip:2234
  var external = require("../external");  // > CustomCode.jszip:2235
  var NodejsStreamOutputAdapter = null;  // > CustomCode.jszip:2236
  if (support.nodestream) {  // > CustomCode.jszip:2237
      try {  // > CustomCode.jszip:2238
          NodejsStreamOutputAdapter = require("../nodejs/NodejsStreamOutputAdapter");  // > CustomCode.jszip:2239
      } catch(e) {  // > CustomCode.jszip:2240
          // ignore  // > CustomCode.jszip:2241
      }  // > CustomCode.jszip:2242
  }  // > CustomCode.jszip:2243
  /**  // > CustomCode.jszip:2244
   * Apply the final transformation of the data. If the user wants a Blob for  // > CustomCode.jszip:2245
   * example, it's easier to work with an U8intArray and finally do the  // > CustomCode.jszip:2246
   * ArrayBuffer/Blob conversion.  // > CustomCode.jszip:2247
   * @param {String} type the name of the final type  // > CustomCode.jszip:2248
   * @param {String|Uint8Array|Buffer} content the content to transform  // > CustomCode.jszip:2249
   * @param {String} mimeType the mime type of the content, if applicable.  // > CustomCode.jszip:2250
   * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format.  // > CustomCode.jszip:2251
   */  // > CustomCode.jszip:2252
  function transformZipOutput(type, content, mimeType) {  // > CustomCode.jszip:2253
      switch(type) {  // > CustomCode.jszip:2254
      case "blob" :  // > CustomCode.jszip:2255
          return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType);  // > CustomCode.jszip:2256
      case "base64" :  // > CustomCode.jszip:2257
          return base64.encode(content);  // > CustomCode.jszip:2258
      default :  // > CustomCode.jszip:2259
          return utils.transformTo(type, content);  // > CustomCode.jszip:2260
      }  // > CustomCode.jszip:2261
  }  // > CustomCode.jszip:2262
  /**  // > CustomCode.jszip:2263
   * Concatenate an array of data of the given type.  // > CustomCode.jszip:2264
   * @param {String} type the type of the data in the given array.  // > CustomCode.jszip:2265
   * @param {Array} dataArray the array containing the data chunks to concatenate  // > CustomCode.jszip:2266
   * @return {String|Uint8Array|Buffer} the concatenated data  // > CustomCode.jszip:2267
   * @throws Error if the asked type is unsupported  // > CustomCode.jszip:2268
   */  // > CustomCode.jszip:2269
  function concat (type, dataArray) {  // > CustomCode.jszip:2270
      var i, index = 0, res = null, totalLength = 0;  // > CustomCode.jszip:2271
      for(i = 0; i < dataArray.length; i++) {  // > CustomCode.jszip:2272
          totalLength += dataArray[i].length;  // > CustomCode.jszip:2273
      }  // > CustomCode.jszip:2274
      switch(type) {  // > CustomCode.jszip:2275
      case "string":  // > CustomCode.jszip:2276
          return dataArray.join("");  // > CustomCode.jszip:2277
      case "array":  // > CustomCode.jszip:2278
          return Array.prototype.concat.apply([], dataArray);  // > CustomCode.jszip:2279
      case "uint8array":  // > CustomCode.jszip:2280
          res = new Uint8Array(totalLength);  // > CustomCode.jszip:2281
          for(i = 0; i < dataArray.length; i++) {  // > CustomCode.jszip:2282
              res.set(dataArray[i], index);  // > CustomCode.jszip:2283
              index += dataArray[i].length;  // > CustomCode.jszip:2284
          }  // > CustomCode.jszip:2285
          return res;  // > CustomCode.jszip:2286
      case "nodebuffer":  // > CustomCode.jszip:2287
          return Buffer.concat(dataArray);  // > CustomCode.jszip:2288
      default:  // > CustomCode.jszip:2289
          throw new Error("concat : unsupported type '"  + type + "'");  // > CustomCode.jszip:2290
      }  // > CustomCode.jszip:2291
  }  // > CustomCode.jszip:2292
  /**  // > CustomCode.jszip:2293
   * Listen a StreamHelper, accumulate its content and concatenate it into a  // > CustomCode.jszip:2294
   * complete block.  // > CustomCode.jszip:2295
   * @param {StreamHelper} helper the helper to use.  // > CustomCode.jszip:2296
   * @param {Function} updateCallback a callback called on each update. Called  // > CustomCode.jszip:2297
   * with one arg :  // > CustomCode.jszip:2298
   * - the metadata linked to the update received.  // > CustomCode.jszip:2299
   * @return Promise the promise for the accumulation.  // > CustomCode.jszip:2300
   */  // > CustomCode.jszip:2301
  function accumulate(helper, updateCallback) {  // > CustomCode.jszip:2302
      return new external.Promise(function (resolve, reject){  // > CustomCode.jszip:2303
          var dataArray = [];  // > CustomCode.jszip:2304
          var chunkType = helper._internalType,  // > CustomCode.jszip:2305
              resultType = helper._outputType,  // > CustomCode.jszip:2306
              mimeType = helper._mimeType;  // > CustomCode.jszip:2307
          helper  // > CustomCode.jszip:2308
              .on("data", function (data, meta) {  // > CustomCode.jszip:2309
                  dataArray.push(data);  // > CustomCode.jszip:2310
                  if(updateCallback) {  // > CustomCode.jszip:2311
                      updateCallback(meta);  // > CustomCode.jszip:2312
                  }  // > CustomCode.jszip:2313
              })  // > CustomCode.jszip:2314
              .on("error", function(err) {  // > CustomCode.jszip:2315
                  dataArray = [];  // > CustomCode.jszip:2316
                  reject(err);  // > CustomCode.jszip:2317
              })  // > CustomCode.jszip:2318
              .on("end", function (){  // > CustomCode.jszip:2319
                  try {  // > CustomCode.jszip:2320
                      var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType);  // > CustomCode.jszip:2321
                      resolve(result);  // > CustomCode.jszip:2322
                  } catch (e) {  // > CustomCode.jszip:2323
                      reject(e);  // > CustomCode.jszip:2324
                  }  // > CustomCode.jszip:2325
                  dataArray = [];  // > CustomCode.jszip:2326
              })  // > CustomCode.jszip:2327
              .resume();  // > CustomCode.jszip:2328
      });  // > CustomCode.jszip:2329
  }  // > CustomCode.jszip:2330
  /**  // > CustomCode.jszip:2331
   * An helper to easily use workers outside of JSZip.  // > CustomCode.jszip:2332
   * @constructor  // > CustomCode.jszip:2333
   * @param {Worker} worker the worker to wrap  // > CustomCode.jszip:2334
   * @param {String} outputType the type of data expected by the use  // > CustomCode.jszip:2335
   * @param {String} mimeType the mime type of the content, if applicable.  // > CustomCode.jszip:2336
   */  // > CustomCode.jszip:2337
  function StreamHelper(worker, outputType, mimeType) {  // > CustomCode.jszip:2338
      var internalType = outputType;  // > CustomCode.jszip:2339
      switch(outputType) {  // > CustomCode.jszip:2340
      case "blob":  // > CustomCode.jszip:2341
      case "arraybuffer":  // > CustomCode.jszip:2342
          internalType = "uint8array";  // > CustomCode.jszip:2343
          break;  // > CustomCode.jszip:2344
      case "base64":  // > CustomCode.jszip:2345
          internalType = "string";  // > CustomCode.jszip:2346
          break;  // > CustomCode.jszip:2347
      }  // > CustomCode.jszip:2348
      try {  // > CustomCode.jszip:2349
          // the type used internally  // > CustomCode.jszip:2350
          this._internalType = internalType;  // > CustomCode.jszip:2351
          // the type used to output results  // > CustomCode.jszip:2352
          this._outputType = outputType;  // > CustomCode.jszip:2353
          // the mime type  // > CustomCode.jszip:2354
          this._mimeType = mimeType;  // > CustomCode.jszip:2355
          utils.checkSupport(internalType);  // > CustomCode.jszip:2356
          this._worker = worker.pipe(new ConvertWorker(internalType));  // > CustomCode.jszip:2357
          // the last workers can be rewired without issues but we need to  // > CustomCode.jszip:2358
          // prevent any updates on previous workers.  // > CustomCode.jszip:2359
          worker.lock();  // > CustomCode.jszip:2360
      } catch(e) {  // > CustomCode.jszip:2361
          this._worker = new GenericWorker("error");  // > CustomCode.jszip:2362
          this._worker.error(e);  // > CustomCode.jszip:2363
      }  // > CustomCode.jszip:2364
  }  // > CustomCode.jszip:2365
  StreamHelper.prototype = {  // > CustomCode.jszip:2366
      /**  // > CustomCode.jszip:2367
       * Listen a StreamHelper, accumulate its content and concatenate it into a  // > CustomCode.jszip:2368
       * complete block.  // > CustomCode.jszip:2369
       * @param {Function} updateCb the update callback.  // > CustomCode.jszip:2370
       * @return Promise the promise for the accumulation.  // > CustomCode.jszip:2371
       */  // > CustomCode.jszip:2372
      accumulate : function (updateCb) {  // > CustomCode.jszip:2373
          return accumulate(this, updateCb);  // > CustomCode.jszip:2374
      },  // > CustomCode.jszip:2375
      /**  // > CustomCode.jszip:2376
       * Add a listener on an event triggered on a stream.  // > CustomCode.jszip:2377
       * @param {String} evt the name of the event  // > CustomCode.jszip:2378
       * @param {Function} fn the listener  // > CustomCode.jszip:2379
       * @return {StreamHelper} the current helper.  // > CustomCode.jszip:2380
       */  // > CustomCode.jszip:2381
      on : function (evt, fn) {  // > CustomCode.jszip:2382
          var self = this;  // > CustomCode.jszip:2383
          if(evt === "data") {  // > CustomCode.jszip:2384
              this._worker.on(evt, function (chunk) {  // > CustomCode.jszip:2385
                  fn.call(self, chunk.data, chunk.meta);  // > CustomCode.jszip:2386
              });  // > CustomCode.jszip:2387
          } else {  // > CustomCode.jszip:2388
              this._worker.on(evt, function () {  // > CustomCode.jszip:2389
                  utils.delay(fn, arguments, self);  // > CustomCode.jszip:2390
              });  // > CustomCode.jszip:2391
          }  // > CustomCode.jszip:2392
          return this;  // > CustomCode.jszip:2393
      },  // > CustomCode.jszip:2394
      /**  // > CustomCode.jszip:2395
       * Resume the flow of chunks.  // > CustomCode.jszip:2396
       * @return {StreamHelper} the current helper.  // > CustomCode.jszip:2397
       */  // > CustomCode.jszip:2398
      resume : function () {  // > CustomCode.jszip:2399
          utils.delay(this._worker.resume, [], this._worker);  // > CustomCode.jszip:2400
          return this;  // > CustomCode.jszip:2401
      },  // > CustomCode.jszip:2402
      /**  // > CustomCode.jszip:2403
       * Pause the flow of chunks.  // > CustomCode.jszip:2404
       * @return {StreamHelper} the current helper.  // > CustomCode.jszip:2405
       */  // > CustomCode.jszip:2406
      pause : function () {  // > CustomCode.jszip:2407
          this._worker.pause();  // > CustomCode.jszip:2408
          return this;  // > CustomCode.jszip:2409
      },  // > CustomCode.jszip:2410
      /**  // > CustomCode.jszip:2411
       * Return a nodejs stream for this helper.  // > CustomCode.jszip:2412
       * @param {Function} updateCb the update callback.  // > CustomCode.jszip:2413
       * @return {NodejsStreamOutputAdapter} the nodejs stream.  // > CustomCode.jszip:2414
       */  // > CustomCode.jszip:2415
      toNodejsStream : function (updateCb) {  // > CustomCode.jszip:2416
          utils.checkSupport("nodestream");  // > CustomCode.jszip:2417
          if (this._outputType !== "nodebuffer") {  // > CustomCode.jszip:2418
              // an object stream containing blob/arraybuffer/uint8array/string  // > CustomCode.jszip:2419
              // is strange and I don't know if it would be useful.  // > CustomCode.jszip:2420
              // I you find this comment and have a good usecase, please open a  // > CustomCode.jszip:2421
              // bug report !  // > CustomCode.jszip:2422
              throw new Error(this._outputType + " is not supported by this method");  // > CustomCode.jszip:2423
          }  // > CustomCode.jszip:2424
          return new NodejsStreamOutputAdapter(this, {  // > CustomCode.jszip:2425
              objectMode : this._outputType !== "nodebuffer"  // > CustomCode.jszip:2426
          }, updateCb);  // > CustomCode.jszip:2427
      }  // > CustomCode.jszip:2428
  };  // > CustomCode.jszip:2429
  module.exports = StreamHelper;  // > CustomCode.jszip:2430
  },{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(require,module,exports){  // > CustomCode.jszip:2431
  "use strict";  // > CustomCode.jszip:2432
  exports.base64 = true;  // > CustomCode.jszip:2433
  exports.array = true;  // > CustomCode.jszip:2434
  exports.string = true;  // > CustomCode.jszip:2435
  exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";  // > CustomCode.jszip:2436
  exports.nodebuffer = typeof Buffer !== "undefined";  // > CustomCode.jszip:2437
  // contains true if JSZip can read/generate Uint8Array, false otherwise.  // > CustomCode.jszip:2438
  exports.uint8array = typeof Uint8Array !== "undefined";  // > CustomCode.jszip:2439
  if (typeof ArrayBuffer === "undefined") {  // > CustomCode.jszip:2440
      exports.blob = false;  // > CustomCode.jszip:2441
  }  // > CustomCode.jszip:2442
  else {  // > CustomCode.jszip:2443
      var buffer = new ArrayBuffer(0);  // > CustomCode.jszip:2444
      try {  // > CustomCode.jszip:2445
          exports.blob = new Blob([buffer], {  // > CustomCode.jszip:2446
              type: "application/zip"  // > CustomCode.jszip:2447
          }).size === 0;  // > CustomCode.jszip:2448
      }  // > CustomCode.jszip:2449
      catch (e) {  // > CustomCode.jszip:2450
          try {  // > CustomCode.jszip:2451
              var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;  // > CustomCode.jszip:2452
              var builder = new Builder();  // > CustomCode.jszip:2453
              builder.append(buffer);  // > CustomCode.jszip:2454
              exports.blob = builder.getBlob("application/zip").size === 0;  // > CustomCode.jszip:2455
          }  // > CustomCode.jszip:2456
          catch (e) {  // > CustomCode.jszip:2457
              exports.blob = false;  // > CustomCode.jszip:2458
          }  // > CustomCode.jszip:2459
      }  // > CustomCode.jszip:2460
  }  // > CustomCode.jszip:2461
  try {  // > CustomCode.jszip:2462
      exports.nodestream = !!require("readable-stream").Readable;  // > CustomCode.jszip:2463
  } catch(e) {  // > CustomCode.jszip:2464
      exports.nodestream = false;  // > CustomCode.jszip:2465
  }  // > CustomCode.jszip:2466
  },{"readable-stream":16}],31:[function(require,module,exports){  // > CustomCode.jszip:2467
  "use strict";  // > CustomCode.jszip:2468
  var utils = require("./utils");  // > CustomCode.jszip:2469
  var support = require("./support");  // > CustomCode.jszip:2470
  var nodejsUtils = require("./nodejsUtils");  // > CustomCode.jszip:2471
  var GenericWorker = require("./stream/GenericWorker");  // > CustomCode.jszip:2472
  /**  // > CustomCode.jszip:2473
   * The following functions come from pako, from pako/lib/utils/strings  // > CustomCode.jszip:2474
   * released under the MIT license, see pako https://github.com/nodeca/pako/  // > CustomCode.jszip:2475
   */  // > CustomCode.jszip:2476
  // Table with utf8 lengths (calculated by first byte of sequence)  // > CustomCode.jszip:2477
  // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,  // > CustomCode.jszip:2478
  // because max possible codepoint is 0x10ffff  // > CustomCode.jszip:2479
  var _utf8len = new Array(256);  // > CustomCode.jszip:2480
  for (var i=0; i<256; i++) {  // > CustomCode.jszip:2481
      _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);  // > CustomCode.jszip:2482
  }  // > CustomCode.jszip:2483
  _utf8len[254]=_utf8len[254]=1; // Invalid sequence start  // > CustomCode.jszip:2484
  // convert string to array (typed, when possible)  // > CustomCode.jszip:2485
  var string2buf = function (str) {  // > CustomCode.jszip:2486
      var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;  // > CustomCode.jszip:2487
      // count binary size  // > CustomCode.jszip:2488
      for (m_pos = 0; m_pos < str_len; m_pos++) {  // > CustomCode.jszip:2489
          c = str.charCodeAt(m_pos);  // > CustomCode.jszip:2490
          if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {  // > CustomCode.jszip:2491
              c2 = str.charCodeAt(m_pos+1);  // > CustomCode.jszip:2492
              if ((c2 & 0xfc00) === 0xdc00) {  // > CustomCode.jszip:2493
                  c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);  // > CustomCode.jszip:2494
                  m_pos++;  // > CustomCode.jszip:2495
              }  // > CustomCode.jszip:2496
          }  // > CustomCode.jszip:2497
          buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;  // > CustomCode.jszip:2498
      }  // > CustomCode.jszip:2499
      // allocate buffer  // > CustomCode.jszip:2500
      if (support.uint8array) {  // > CustomCode.jszip:2501
          buf = new Uint8Array(buf_len);  // > CustomCode.jszip:2502
      } else {  // > CustomCode.jszip:2503
          buf = new Array(buf_len);  // > CustomCode.jszip:2504
      }  // > CustomCode.jszip:2505
      // convert  // > CustomCode.jszip:2506
      for (i=0, m_pos = 0; i < buf_len; m_pos++) {  // > CustomCode.jszip:2507
          c = str.charCodeAt(m_pos);  // > CustomCode.jszip:2508
          if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {  // > CustomCode.jszip:2509
              c2 = str.charCodeAt(m_pos+1);  // > CustomCode.jszip:2510
              if ((c2 & 0xfc00) === 0xdc00) {  // > CustomCode.jszip:2511
                  c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);  // > CustomCode.jszip:2512
                  m_pos++;  // > CustomCode.jszip:2513
              }  // > CustomCode.jszip:2514
          }  // > CustomCode.jszip:2515
          if (c < 0x80) {  // > CustomCode.jszip:2516
              /* one byte */  // > CustomCode.jszip:2517
              buf[i++] = c;  // > CustomCode.jszip:2518
          } else if (c < 0x800) {  // > CustomCode.jszip:2519
              /* two bytes */  // > CustomCode.jszip:2520
              buf[i++] = 0xC0 | (c >>> 6);  // > CustomCode.jszip:2521
              buf[i++] = 0x80 | (c & 0x3f);  // > CustomCode.jszip:2522
          } else if (c < 0x10000) {  // > CustomCode.jszip:2523
              /* three bytes */  // > CustomCode.jszip:2524
              buf[i++] = 0xE0 | (c >>> 12);  // > CustomCode.jszip:2525
              buf[i++] = 0x80 | (c >>> 6 & 0x3f);  // > CustomCode.jszip:2526
              buf[i++] = 0x80 | (c & 0x3f);  // > CustomCode.jszip:2527
          } else {  // > CustomCode.jszip:2528
              /* four bytes */  // > CustomCode.jszip:2529
              buf[i++] = 0xf0 | (c >>> 18);  // > CustomCode.jszip:2530
              buf[i++] = 0x80 | (c >>> 12 & 0x3f);  // > CustomCode.jszip:2531
              buf[i++] = 0x80 | (c >>> 6 & 0x3f);  // > CustomCode.jszip:2532
              buf[i++] = 0x80 | (c & 0x3f);  // > CustomCode.jszip:2533
          }  // > CustomCode.jszip:2534
      }  // > CustomCode.jszip:2535
      return buf;  // > CustomCode.jszip:2536
  };  // > CustomCode.jszip:2537
  // Calculate max possible position in utf8 buffer,  // > CustomCode.jszip:2538
  // that will not break sequence. If that's not possible  // > CustomCode.jszip:2539
  // - (very small limits) return max size as is.  // > CustomCode.jszip:2540
  //  // > CustomCode.jszip:2541
  // buf[] - utf8 bytes array  // > CustomCode.jszip:2542
  // max   - length limit (mandatory);  // > CustomCode.jszip:2543
  var utf8border = function(buf, max) {  // > CustomCode.jszip:2544
      var pos;  // > CustomCode.jszip:2545
      max = max || buf.length;  // > CustomCode.jszip:2546
      if (max > buf.length) { max = buf.length; }  // > CustomCode.jszip:2547
      // go back from last position, until start of sequence found  // > CustomCode.jszip:2548
      pos = max-1;  // > CustomCode.jszip:2549
      while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }  // > CustomCode.jszip:2550
      // Fuckup - very small and broken sequence,  // > CustomCode.jszip:2551
      // return max, because we should return something anyway.  // > CustomCode.jszip:2552
      if (pos < 0) { return max; }  // > CustomCode.jszip:2553
      // If we came to start of buffer - that means vuffer is too small,  // > CustomCode.jszip:2554
      // return max too.  // > CustomCode.jszip:2555
      if (pos === 0) { return max; }  // > CustomCode.jszip:2556
      return (pos + _utf8len[buf[pos]] > max) ? pos : max;  // > CustomCode.jszip:2557
  };  // > CustomCode.jszip:2558
  // convert array to string  // > CustomCode.jszip:2559
  var buf2string = function (buf) {  // > CustomCode.jszip:2560
      var i, out, c, c_len;  // > CustomCode.jszip:2561
      var len = buf.length;  // > CustomCode.jszip:2562
      // Reserve max possible length (2 words per char)  // > CustomCode.jszip:2563
      // NB: by unknown reasons, Array is significantly faster for  // > CustomCode.jszip:2564
      //     String.fromCharCode.apply than Uint16Array.  // > CustomCode.jszip:2565
      var utf16buf = new Array(len*2);  // > CustomCode.jszip:2566
      for (out=0, i=0; i<len;) {  // > CustomCode.jszip:2567
          c = buf[i++];  // > CustomCode.jszip:2568
          // quick process ascii  // > CustomCode.jszip:2569
          if (c < 0x80) { utf16buf[out++] = c; continue; }  // > CustomCode.jszip:2570
          c_len = _utf8len[c];  // > CustomCode.jszip:2571
          // skip 5 & 6 byte codes  // > CustomCode.jszip:2572
          if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }  // > CustomCode.jszip:2573
          // apply mask on first byte  // > CustomCode.jszip:2574
          c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;  // > CustomCode.jszip:2575
          // join the rest  // > CustomCode.jszip:2576
          while (c_len > 1 && i < len) {  // > CustomCode.jszip:2577
              c = (c << 6) | (buf[i++] & 0x3f);  // > CustomCode.jszip:2578
              c_len--;  // > CustomCode.jszip:2579
          }  // > CustomCode.jszip:2580
          // terminated by end of string?  // > CustomCode.jszip:2581
          if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }  // > CustomCode.jszip:2582
          if (c < 0x10000) {  // > CustomCode.jszip:2583
              utf16buf[out++] = c;  // > CustomCode.jszip:2584
          } else {  // > CustomCode.jszip:2585
              c -= 0x10000;  // > CustomCode.jszip:2586
              utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);  // > CustomCode.jszip:2587
              utf16buf[out++] = 0xdc00 | (c & 0x3ff);  // > CustomCode.jszip:2588
          }  // > CustomCode.jszip:2589
      }  // > CustomCode.jszip:2590
      // shrinkBuf(utf16buf, out)  // > CustomCode.jszip:2591
      if (utf16buf.length !== out) {  // > CustomCode.jszip:2592
          if(utf16buf.subarray) {  // > CustomCode.jszip:2593
              utf16buf = utf16buf.subarray(0, out);  // > CustomCode.jszip:2594
          } else {  // > CustomCode.jszip:2595
              utf16buf.length = out;  // > CustomCode.jszip:2596
          }  // > CustomCode.jszip:2597
      }  // > CustomCode.jszip:2598
      // return String.fromCharCode.apply(null, utf16buf);  // > CustomCode.jszip:2599
      return utils.applyFromCharCode(utf16buf);  // > CustomCode.jszip:2600
  };  // > CustomCode.jszip:2601
  // That's all for the pako functions.  // > CustomCode.jszip:2602
  /**  // > CustomCode.jszip:2603
   * Transform a javascript string into an array (typed if possible) of bytes,  // > CustomCode.jszip:2604
   * UTF-8 encoded.  // > CustomCode.jszip:2605
   * @param {String} str the string to encode  // > CustomCode.jszip:2606
   * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.  // > CustomCode.jszip:2607
   */  // > CustomCode.jszip:2608
  exports.utf8encode = function utf8encode(str) {  // > CustomCode.jszip:2609
      if (support.nodebuffer) {  // > CustomCode.jszip:2610
          return nodejsUtils.newBufferFrom(str, "utf-8");  // > CustomCode.jszip:2611
      }  // > CustomCode.jszip:2612
      return string2buf(str);  // > CustomCode.jszip:2613
  };  // > CustomCode.jszip:2614
  /**  // > CustomCode.jszip:2615
   * Transform a bytes array (or a representation) representing an UTF-8 encoded  // > CustomCode.jszip:2616
   * string into a javascript string.  // > CustomCode.jszip:2617
   * @param {Array|Uint8Array|Buffer} buf the data de decode  // > CustomCode.jszip:2618
   * @return {String} the decoded string.  // > CustomCode.jszip:2619
   */  // > CustomCode.jszip:2620
  exports.utf8decode = function utf8decode(buf) {  // > CustomCode.jszip:2621
      if (support.nodebuffer) {  // > CustomCode.jszip:2622
          return utils.transformTo("nodebuffer", buf).toString("utf-8");  // > CustomCode.jszip:2623
      }  // > CustomCode.jszip:2624
      buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf);  // > CustomCode.jszip:2625
      return buf2string(buf);  // > CustomCode.jszip:2626
  };  // > CustomCode.jszip:2627
  /**  // > CustomCode.jszip:2628
   * A worker to decode utf8 encoded binary chunks into string chunks.  // > CustomCode.jszip:2629
   * @constructor  // > CustomCode.jszip:2630
   */  // > CustomCode.jszip:2631
  function Utf8DecodeWorker() {  // > CustomCode.jszip:2632
      GenericWorker.call(this, "utf-8 decode");  // > CustomCode.jszip:2633
      // the last bytes if a chunk didn't end with a complete codepoint.  // > CustomCode.jszip:2634
      this.leftOver = null;  // > CustomCode.jszip:2635
  }  // > CustomCode.jszip:2636
  utils.inherits(Utf8DecodeWorker, GenericWorker);  // > CustomCode.jszip:2637
  /**  // > CustomCode.jszip:2638
   * @see GenericWorker.processChunk  // > CustomCode.jszip:2639
   */  // > CustomCode.jszip:2640
  Utf8DecodeWorker.prototype.processChunk = function (chunk) {  // > CustomCode.jszip:2641
      var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data);  // > CustomCode.jszip:2642
      // 1st step, re-use what's left of the previous chunk  // > CustomCode.jszip:2643
      if (this.leftOver && this.leftOver.length) {  // > CustomCode.jszip:2644
          if(support.uint8array) {  // > CustomCode.jszip:2645
              var previousData = data;  // > CustomCode.jszip:2646
              data = new Uint8Array(previousData.length + this.leftOver.length);  // > CustomCode.jszip:2647
              data.set(this.leftOver, 0);  // > CustomCode.jszip:2648
              data.set(previousData, this.leftOver.length);  // > CustomCode.jszip:2649
          } else {  // > CustomCode.jszip:2650
              data = this.leftOver.concat(data);  // > CustomCode.jszip:2651
          }  // > CustomCode.jszip:2652
          this.leftOver = null;  // > CustomCode.jszip:2653
      }  // > CustomCode.jszip:2654
      var nextBoundary = utf8border(data);  // > CustomCode.jszip:2655
      var usableData = data;  // > CustomCode.jszip:2656
      if (nextBoundary !== data.length) {  // > CustomCode.jszip:2657
          if (support.uint8array) {  // > CustomCode.jszip:2658
              usableData = data.subarray(0, nextBoundary);  // > CustomCode.jszip:2659
              this.leftOver = data.subarray(nextBoundary, data.length);  // > CustomCode.jszip:2660
          } else {  // > CustomCode.jszip:2661
              usableData = data.slice(0, nextBoundary);  // > CustomCode.jszip:2662
              this.leftOver = data.slice(nextBoundary, data.length);  // > CustomCode.jszip:2663
          }  // > CustomCode.jszip:2664
      }  // > CustomCode.jszip:2665
      this.push({  // > CustomCode.jszip:2666
          data : exports.utf8decode(usableData),  // > CustomCode.jszip:2667
          meta : chunk.meta  // > CustomCode.jszip:2668
      });  // > CustomCode.jszip:2669
  };  // > CustomCode.jszip:2670
  /**  // > CustomCode.jszip:2671
   * @see GenericWorker.flush  // > CustomCode.jszip:2672
   */  // > CustomCode.jszip:2673
  Utf8DecodeWorker.prototype.flush = function () {  // > CustomCode.jszip:2674
      if(this.leftOver && this.leftOver.length) {  // > CustomCode.jszip:2675
          this.push({  // > CustomCode.jszip:2676
              data : exports.utf8decode(this.leftOver),  // > CustomCode.jszip:2677
              meta : {}  // > CustomCode.jszip:2678
          });  // > CustomCode.jszip:2679
          this.leftOver = null;  // > CustomCode.jszip:2680
      }  // > CustomCode.jszip:2681
  };  // > CustomCode.jszip:2682
  exports.Utf8DecodeWorker = Utf8DecodeWorker;  // > CustomCode.jszip:2683
  /**  // > CustomCode.jszip:2684
   * A worker to endcode string chunks into utf8 encoded binary chunks.  // > CustomCode.jszip:2685
   * @constructor  // > CustomCode.jszip:2686
   */  // > CustomCode.jszip:2687
  function Utf8EncodeWorker() {  // > CustomCode.jszip:2688
      GenericWorker.call(this, "utf-8 encode");  // > CustomCode.jszip:2689
  }  // > CustomCode.jszip:2690
  utils.inherits(Utf8EncodeWorker, GenericWorker);  // > CustomCode.jszip:2691
  /**  // > CustomCode.jszip:2692
   * @see GenericWorker.processChunk  // > CustomCode.jszip:2693
   */  // > CustomCode.jszip:2694
  Utf8EncodeWorker.prototype.processChunk = function (chunk) {  // > CustomCode.jszip:2695
      this.push({  // > CustomCode.jszip:2696
          data : exports.utf8encode(chunk.data),  // > CustomCode.jszip:2697
          meta : chunk.meta  // > CustomCode.jszip:2698
      });  // > CustomCode.jszip:2699
  };  // > CustomCode.jszip:2700
  exports.Utf8EncodeWorker = Utf8EncodeWorker;  // > CustomCode.jszip:2701
  },{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(require,module,exports){  // > CustomCode.jszip:2702
  "use strict";  // > CustomCode.jszip:2703
  var support = require("./support");  // > CustomCode.jszip:2704
  var base64 = require("./base64");  // > CustomCode.jszip:2705
  var nodejsUtils = require("./nodejsUtils");  // > CustomCode.jszip:2706
  var external = require("./external");  // > CustomCode.jszip:2707
  require("setimmediate");  // > CustomCode.jszip:2708
  /**  // > CustomCode.jszip:2709
   * Convert a string that pass as a "binary string": it should represent a byte  // > CustomCode.jszip:2710
   * array but may have > 255 char codes. Be sure to take only the first byte  // > CustomCode.jszip:2711
   * and returns the byte array.  // > CustomCode.jszip:2712
   * @param {String} str the string to transform.  // > CustomCode.jszip:2713
   * @return {Array|Uint8Array} the string in a binary format.  // > CustomCode.jszip:2714
   */  // > CustomCode.jszip:2715
  function string2binary(str) {  // > CustomCode.jszip:2716
      var result = null;  // > CustomCode.jszip:2717
      if (support.uint8array) {  // > CustomCode.jszip:2718
          result = new Uint8Array(str.length);  // > CustomCode.jszip:2719
      } else {  // > CustomCode.jszip:2720
          result = new Array(str.length);  // > CustomCode.jszip:2721
      }  // > CustomCode.jszip:2722
      return stringToArrayLike(str, result);  // > CustomCode.jszip:2723
  }  // > CustomCode.jszip:2724
  /**  // > CustomCode.jszip:2725
   * Create a new blob with the given content and the given type.  // > CustomCode.jszip:2726
   * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use  // > CustomCode.jszip:2727
   * an Uint8Array because the stock browser of android 4 won't accept it (it  // > CustomCode.jszip:2728
   * will be silently converted to a string, "[object Uint8Array]").  // > CustomCode.jszip:2729
   *  // > CustomCode.jszip:2730
   * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge:  // > CustomCode.jszip:2731
   * when a large amount of Array is used to create the Blob, the amount of  // > CustomCode.jszip:2732
   * memory consumed is nearly 100 times the original data amount.  // > CustomCode.jszip:2733
   *  // > CustomCode.jszip:2734
   * @param {String} type the mime type of the blob.  // > CustomCode.jszip:2735
   * @return {Blob} the created blob.  // > CustomCode.jszip:2736
   */  // > CustomCode.jszip:2737
  exports.newBlob = function(part, type) {  // > CustomCode.jszip:2738
      exports.checkSupport("blob");  // > CustomCode.jszip:2739
      try {  // > CustomCode.jszip:2740
          // Blob constructor  // > CustomCode.jszip:2741
          return new Blob([part], {  // > CustomCode.jszip:2742
              type: type  // > CustomCode.jszip:2743
          });  // > CustomCode.jszip:2744
      }  // > CustomCode.jszip:2745
      catch (e) {  // > CustomCode.jszip:2746
          try {  // > CustomCode.jszip:2747
              // deprecated, browser only, old way  // > CustomCode.jszip:2748
              var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;  // > CustomCode.jszip:2749
              var builder = new Builder();  // > CustomCode.jszip:2750
              builder.append(part);  // > CustomCode.jszip:2751
              return builder.getBlob(type);  // > CustomCode.jszip:2752
          }  // > CustomCode.jszip:2753
          catch (e) {  // > CustomCode.jszip:2754
              // well, fuck ?!  // > CustomCode.jszip:2755
              throw new Error("Bug : can't construct the Blob.");  // > CustomCode.jszip:2756
          }  // > CustomCode.jszip:2757
      }  // > CustomCode.jszip:2758
  };  // > CustomCode.jszip:2759
  /**  // > CustomCode.jszip:2760
   * The identity function.  // > CustomCode.jszip:2761
   * @param {Object} input the input.  // > CustomCode.jszip:2762
   * @return {Object} the same input.  // > CustomCode.jszip:2763
   */  // > CustomCode.jszip:2764
  function identity(input) {  // > CustomCode.jszip:2765
      return input;  // > CustomCode.jszip:2766
  }  // > CustomCode.jszip:2767
  /**  // > CustomCode.jszip:2768
   * Fill in an array with a string.  // > CustomCode.jszip:2769
   * @param {String} str the string to use.  // > CustomCode.jszip:2770
   * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).  // > CustomCode.jszip:2771
   * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.  // > CustomCode.jszip:2772
   */  // > CustomCode.jszip:2773
  function stringToArrayLike(str, array) {  // > CustomCode.jszip:2774
      for (var i = 0; i < str.length; ++i) {  // > CustomCode.jszip:2775
          array[i] = str.charCodeAt(i) & 0xFF;  // > CustomCode.jszip:2776
      }  // > CustomCode.jszip:2777
      return array;  // > CustomCode.jszip:2778
  }  // > CustomCode.jszip:2779
  /**  // > CustomCode.jszip:2780
   * An helper for the function arrayLikeToString.  // > CustomCode.jszip:2781
   * This contains static information and functions that  // > CustomCode.jszip:2782
   * can be optimized by the browser JIT compiler.  // > CustomCode.jszip:2783
   */  // > CustomCode.jszip:2784
  var arrayToStringHelper = {  // > CustomCode.jszip:2785
      /**  // > CustomCode.jszip:2786
       * Transform an array of int into a string, chunk by chunk.  // > CustomCode.jszip:2787
       * See the performances notes on arrayLikeToString.  // > CustomCode.jszip:2788
       * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.  // > CustomCode.jszip:2789
       * @param {String} type the type of the array.  // > CustomCode.jszip:2790
       * @param {Integer} chunk the chunk size.  // > CustomCode.jszip:2791
       * @return {String} the resulting string.  // > CustomCode.jszip:2792
       * @throws Error if the chunk is too big for the stack.  // > CustomCode.jszip:2793
       */  // > CustomCode.jszip:2794
      stringifyByChunk: function(array, type, chunk) {  // > CustomCode.jszip:2795
          var result = [], k = 0, len = array.length;  // > CustomCode.jszip:2796
          // shortcut  // > CustomCode.jszip:2797
          if (len <= chunk) {  // > CustomCode.jszip:2798
              return String.fromCharCode.apply(null, array);  // > CustomCode.jszip:2799
          }  // > CustomCode.jszip:2800
          while (k < len) {  // > CustomCode.jszip:2801
              if (type === "array" || type === "nodebuffer") {  // > CustomCode.jszip:2802
                  result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));  // > CustomCode.jszip:2803
              }  // > CustomCode.jszip:2804
              else {  // > CustomCode.jszip:2805
                  result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));  // > CustomCode.jszip:2806
              }  // > CustomCode.jszip:2807
              k += chunk;  // > CustomCode.jszip:2808
          }  // > CustomCode.jszip:2809
          return result.join("");  // > CustomCode.jszip:2810
      },  // > CustomCode.jszip:2811
      /**  // > CustomCode.jszip:2812
       * Call String.fromCharCode on every item in the array.  // > CustomCode.jszip:2813
       * This is the naive implementation, which generate A LOT of intermediate string.  // > CustomCode.jszip:2814
       * This should be used when everything else fail.  // > CustomCode.jszip:2815
       * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.  // > CustomCode.jszip:2816
       * @return {String} the result.  // > CustomCode.jszip:2817
       */  // > CustomCode.jszip:2818
      stringifyByChar: function(array){  // > CustomCode.jszip:2819
          var resultStr = "";  // > CustomCode.jszip:2820
          for(var i = 0; i < array.length; i++) {  // > CustomCode.jszip:2821
              resultStr += String.fromCharCode(array[i]);  // > CustomCode.jszip:2822
          }  // > CustomCode.jszip:2823
          return resultStr;  // > CustomCode.jszip:2824
      },  // > CustomCode.jszip:2825
      applyCanBeUsed : {  // > CustomCode.jszip:2826
          /**  // > CustomCode.jszip:2827
           * true if the browser accepts to use String.fromCharCode on Uint8Array  // > CustomCode.jszip:2828
           */  // > CustomCode.jszip:2829
          uint8array : (function () {  // > CustomCode.jszip:2830
              try {  // > CustomCode.jszip:2831
                  return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;  // > CustomCode.jszip:2832
              } catch (e) {  // > CustomCode.jszip:2833
                  return false;  // > CustomCode.jszip:2834
              }  // > CustomCode.jszip:2835
          })(),  // > CustomCode.jszip:2836
          /**  // > CustomCode.jszip:2837
           * true if the browser accepts to use String.fromCharCode on nodejs Buffer.  // > CustomCode.jszip:2838
           */  // > CustomCode.jszip:2839
          nodebuffer : (function () {  // > CustomCode.jszip:2840
              try {  // > CustomCode.jszip:2841
                  return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1;  // > CustomCode.jszip:2842
              } catch (e) {  // > CustomCode.jszip:2843
                  return false;  // > CustomCode.jszip:2844
              }  // > CustomCode.jszip:2845
          })()  // > CustomCode.jszip:2846
      }  // > CustomCode.jszip:2847
  };  // > CustomCode.jszip:2848
  /**  // > CustomCode.jszip:2849
   * Transform an array-like object to a string.  // > CustomCode.jszip:2850
   * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.  // > CustomCode.jszip:2851
   * @return {String} the result.  // > CustomCode.jszip:2852
   */  // > CustomCode.jszip:2853
  function arrayLikeToString(array) {  // > CustomCode.jszip:2854
      // Performances notes :  // > CustomCode.jszip:2855
      // --------------------  // > CustomCode.jszip:2856
      // String.fromCharCode.apply(null, array) is the fastest, see  // > CustomCode.jszip:2857
      // see http://jsperf.com/converting-a-uint8array-to-a-string/2  // > CustomCode.jszip:2858
      // but the stack is limited (and we can get huge arrays !).  // > CustomCode.jszip:2859
      //  // > CustomCode.jszip:2860
      // result += String.fromCharCode(array[i]); generate too many strings !  // > CustomCode.jszip:2861
      //  // > CustomCode.jszip:2862
      // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2  // > CustomCode.jszip:2863
      // TODO : we now have workers that split the work. Do we still need that ?  // > CustomCode.jszip:2864
      var chunk = 65536,  // > CustomCode.jszip:2865
          type = exports.getTypeOf(array),  // > CustomCode.jszip:2866
          canUseApply = true;  // > CustomCode.jszip:2867
      if (type === "uint8array") {  // > CustomCode.jszip:2868
          canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;  // > CustomCode.jszip:2869
      } else if (type === "nodebuffer") {  // > CustomCode.jszip:2870
          canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;  // > CustomCode.jszip:2871
      }  // > CustomCode.jszip:2872
      if (canUseApply) {  // > CustomCode.jszip:2873
          while (chunk > 1) {  // > CustomCode.jszip:2874
              try {  // > CustomCode.jszip:2875
                  return arrayToStringHelper.stringifyByChunk(array, type, chunk);  // > CustomCode.jszip:2876
              } catch (e) {  // > CustomCode.jszip:2877
                  chunk = Math.floor(chunk / 2);  // > CustomCode.jszip:2878
              }  // > CustomCode.jszip:2879
          }  // > CustomCode.jszip:2880
      }  // > CustomCode.jszip:2881
      // no apply or chunk error : slow and painful algorithm  // > CustomCode.jszip:2882
      // default browser on android 4.*  // > CustomCode.jszip:2883
      return arrayToStringHelper.stringifyByChar(array);  // > CustomCode.jszip:2884
  }  // > CustomCode.jszip:2885
  exports.applyFromCharCode = arrayLikeToString;  // > CustomCode.jszip:2886
  /**  // > CustomCode.jszip:2887
   * Copy the data from an array-like to an other array-like.  // > CustomCode.jszip:2888
   * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.  // > CustomCode.jszip:2889
   * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.  // > CustomCode.jszip:2890
   * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.  // > CustomCode.jszip:2891
   */  // > CustomCode.jszip:2892
  function arrayLikeToArrayLike(arrayFrom, arrayTo) {  // > CustomCode.jszip:2893
      for (var i = 0; i < arrayFrom.length; i++) {  // > CustomCode.jszip:2894
          arrayTo[i] = arrayFrom[i];  // > CustomCode.jszip:2895
      }  // > CustomCode.jszip:2896
      return arrayTo;  // > CustomCode.jszip:2897
  }  // > CustomCode.jszip:2898
  // a matrix containing functions to transform everything into everything.  // > CustomCode.jszip:2899
  var transform = {};  // > CustomCode.jszip:2900
  // string to ?  // > CustomCode.jszip:2901
  transform["string"] = {  // > CustomCode.jszip:2902
      "string": identity,  // > CustomCode.jszip:2903
      "array": function(input) {  // > CustomCode.jszip:2904
          return stringToArrayLike(input, new Array(input.length));  // > CustomCode.jszip:2905
      },  // > CustomCode.jszip:2906
      "arraybuffer": function(input) {  // > CustomCode.jszip:2907
          return transform["string"]["uint8array"](input).buffer;  // > CustomCode.jszip:2908
      },  // > CustomCode.jszip:2909
      "uint8array": function(input) {  // > CustomCode.jszip:2910
          return stringToArrayLike(input, new Uint8Array(input.length));  // > CustomCode.jszip:2911
      },  // > CustomCode.jszip:2912
      "nodebuffer": function(input) {  // > CustomCode.jszip:2913
          return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length));  // > CustomCode.jszip:2914
      }  // > CustomCode.jszip:2915
  };  // > CustomCode.jszip:2916
  // array to ?  // > CustomCode.jszip:2917
  transform["array"] = {  // > CustomCode.jszip:2918
      "string": arrayLikeToString,  // > CustomCode.jszip:2919
      "array": identity,  // > CustomCode.jszip:2920
      "arraybuffer": function(input) {  // > CustomCode.jszip:2921
          return (new Uint8Array(input)).buffer;  // > CustomCode.jszip:2922
      },  // > CustomCode.jszip:2923
      "uint8array": function(input) {  // > CustomCode.jszip:2924
          return new Uint8Array(input);  // > CustomCode.jszip:2925
      },  // > CustomCode.jszip:2926
      "nodebuffer": function(input) {  // > CustomCode.jszip:2927
          return nodejsUtils.newBufferFrom(input);  // > CustomCode.jszip:2928
      }  // > CustomCode.jszip:2929
  };  // > CustomCode.jszip:2930
  // arraybuffer to ?  // > CustomCode.jszip:2931
  transform["arraybuffer"] = {  // > CustomCode.jszip:2932
      "string": function(input) {  // > CustomCode.jszip:2933
          return arrayLikeToString(new Uint8Array(input));  // > CustomCode.jszip:2934
      },  // > CustomCode.jszip:2935
      "array": function(input) {  // > CustomCode.jszip:2936
          return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));  // > CustomCode.jszip:2937
      },  // > CustomCode.jszip:2938
      "arraybuffer": identity,  // > CustomCode.jszip:2939
      "uint8array": function(input) {  // > CustomCode.jszip:2940
          return new Uint8Array(input);  // > CustomCode.jszip:2941
      },  // > CustomCode.jszip:2942
      "nodebuffer": function(input) {  // > CustomCode.jszip:2943
          return nodejsUtils.newBufferFrom(new Uint8Array(input));  // > CustomCode.jszip:2944
      }  // > CustomCode.jszip:2945
  };  // > CustomCode.jszip:2946
  // uint8array to ?  // > CustomCode.jszip:2947
  transform["uint8array"] = {  // > CustomCode.jszip:2948
      "string": arrayLikeToString,  // > CustomCode.jszip:2949
      "array": function(input) {  // > CustomCode.jszip:2950
          return arrayLikeToArrayLike(input, new Array(input.length));  // > CustomCode.jszip:2951
      },  // > CustomCode.jszip:2952
      "arraybuffer": function(input) {  // > CustomCode.jszip:2953
          return input.buffer;  // > CustomCode.jszip:2954
      },  // > CustomCode.jszip:2955
      "uint8array": identity,  // > CustomCode.jszip:2956
      "nodebuffer": function(input) {  // > CustomCode.jszip:2957
          return nodejsUtils.newBufferFrom(input);  // > CustomCode.jszip:2958
      }  // > CustomCode.jszip:2959
  };  // > CustomCode.jszip:2960
  // nodebuffer to ?  // > CustomCode.jszip:2961
  transform["nodebuffer"] = {  // > CustomCode.jszip:2962
      "string": arrayLikeToString,  // > CustomCode.jszip:2963
      "array": function(input) {  // > CustomCode.jszip:2964
          return arrayLikeToArrayLike(input, new Array(input.length));  // > CustomCode.jszip:2965
      },  // > CustomCode.jszip:2966
      "arraybuffer": function(input) {  // > CustomCode.jszip:2967
          return transform["nodebuffer"]["uint8array"](input).buffer;  // > CustomCode.jszip:2968
      },  // > CustomCode.jszip:2969
      "uint8array": function(input) {  // > CustomCode.jszip:2970
          return arrayLikeToArrayLike(input, new Uint8Array(input.length));  // > CustomCode.jszip:2971
      },  // > CustomCode.jszip:2972
      "nodebuffer": identity  // > CustomCode.jszip:2973
  };  // > CustomCode.jszip:2974
  /**  // > CustomCode.jszip:2975
   * Transform an input into any type.  // > CustomCode.jszip:2976
   * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.  // > CustomCode.jszip:2977
   * If no output type is specified, the unmodified input will be returned.  // > CustomCode.jszip:2978
   * @param {String} outputType the output type.  // > CustomCode.jszip:2979
   * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.  // > CustomCode.jszip:2980
   * @throws {Error} an Error if the browser doesn't support the requested output type.  // > CustomCode.jszip:2981
   */  // > CustomCode.jszip:2982
  exports.transformTo = function(outputType, input) {  // > CustomCode.jszip:2983
      if (!input) {  // > CustomCode.jszip:2984
          // undefined, null, etc  // > CustomCode.jszip:2985
          // an empty string won't harm.  // > CustomCode.jszip:2986
          input = "";  // > CustomCode.jszip:2987
      }  // > CustomCode.jszip:2988
      if (!outputType) {  // > CustomCode.jszip:2989
          return input;  // > CustomCode.jszip:2990
      }  // > CustomCode.jszip:2991
      exports.checkSupport(outputType);  // > CustomCode.jszip:2992
      var inputType = exports.getTypeOf(input);  // > CustomCode.jszip:2993
      var result = transform[inputType][outputType](input);  // > CustomCode.jszip:2994
      return result;  // > CustomCode.jszip:2995
  };  // > CustomCode.jszip:2996
  /**  // > CustomCode.jszip:2997
   * Resolve all relative path components, "." and "..", in a path. If these relative components  // > CustomCode.jszip:2998
   * traverse above the root then the resulting path will only contain the final path component.  // > CustomCode.jszip:2999
   *  // > CustomCode.jszip:3000
   * All empty components, e.g. "//", are removed.  // > CustomCode.jszip:3001
   * @param {string} path A path with / or \ separators  // > CustomCode.jszip:3002
   * @returns {string} The path with all relative path components resolved.  // > CustomCode.jszip:3003
   */  // > CustomCode.jszip:3004
  exports.resolve = function(path) {  // > CustomCode.jszip:3005
      var parts = path.split("/");  // > CustomCode.jszip:3006
      var result = [];  // > CustomCode.jszip:3007
      for (var index = 0; index < parts.length; index++) {  // > CustomCode.jszip:3008
          var part = parts[index];  // > CustomCode.jszip:3009
          // Allow the first and last component to be empty for trailing slashes.  // > CustomCode.jszip:3010
          if (part === "." || (part === "" && index !== 0 && index !== parts.length - 1)) {  // > CustomCode.jszip:3011
              continue;  // > CustomCode.jszip:3012
          } else if (part === "..") {  // > CustomCode.jszip:3013
              result.pop();  // > CustomCode.jszip:3014
          } else {  // > CustomCode.jszip:3015
              result.push(part);  // > CustomCode.jszip:3016
          }  // > CustomCode.jszip:3017
      }  // > CustomCode.jszip:3018
      return result.join("/");  // > CustomCode.jszip:3019
  };  // > CustomCode.jszip:3020
  /**  // > CustomCode.jszip:3021
   * Return the type of the input.  // > CustomCode.jszip:3022
   * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.  // > CustomCode.jszip:3023
   * @param {Object} input the input to identify.  // > CustomCode.jszip:3024
   * @return {String} the (lowercase) type of the input.  // > CustomCode.jszip:3025
   */  // > CustomCode.jszip:3026
  exports.getTypeOf = function(input) {  // > CustomCode.jszip:3027
      if (typeof input === "string") {  // > CustomCode.jszip:3028
          return "string";  // > CustomCode.jszip:3029
      }  // > CustomCode.jszip:3030
      if (Object.prototype.toString.call(input) === "[object Array]") {  // > CustomCode.jszip:3031
          return "array";  // > CustomCode.jszip:3032
      }  // > CustomCode.jszip:3033
      if (support.nodebuffer && nodejsUtils.isBuffer(input)) {  // > CustomCode.jszip:3034
          return "nodebuffer";  // > CustomCode.jszip:3035
      }  // > CustomCode.jszip:3036
      if (support.uint8array && input instanceof Uint8Array) {  // > CustomCode.jszip:3037
          return "uint8array";  // > CustomCode.jszip:3038
      }  // > CustomCode.jszip:3039
      if (support.arraybuffer && input instanceof ArrayBuffer) {  // > CustomCode.jszip:3040
          return "arraybuffer";  // > CustomCode.jszip:3041
      }  // > CustomCode.jszip:3042
  };  // > CustomCode.jszip:3043
  /**  // > CustomCode.jszip:3044
   * Throw an exception if the type is not supported.  // > CustomCode.jszip:3045
   * @param {String} type the type to check.  // > CustomCode.jszip:3046
   * @throws {Error} an Error if the browser doesn't support the requested type.  // > CustomCode.jszip:3047
   */  // > CustomCode.jszip:3048
  exports.checkSupport = function(type) {  // > CustomCode.jszip:3049
      var supported = support[type.toLowerCase()];  // > CustomCode.jszip:3050
      if (!supported) {  // > CustomCode.jszip:3051
          throw new Error(type + " is not supported by this platform");  // > CustomCode.jszip:3052
      }  // > CustomCode.jszip:3053
  };  // > CustomCode.jszip:3054
  exports.MAX_VALUE_16BITS = 65535;  // > CustomCode.jszip:3055
  exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1  // > CustomCode.jszip:3056
  /**  // > CustomCode.jszip:3057
   * Prettify a string read as binary.  // > CustomCode.jszip:3058
   * @param {string} str the string to prettify.  // > CustomCode.jszip:3059
   * @return {string} a pretty string.  // > CustomCode.jszip:3060
   */  // > CustomCode.jszip:3061
  exports.pretty = function(str) {  // > CustomCode.jszip:3062
      var res = "",  // > CustomCode.jszip:3063
          code, i;  // > CustomCode.jszip:3064
      for (i = 0; i < (str || "").length; i++) {  // > CustomCode.jszip:3065
          code = str.charCodeAt(i);  // > CustomCode.jszip:3066
          res += "\\x" + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();  // > CustomCode.jszip:3067
      }  // > CustomCode.jszip:3068
      return res;  // > CustomCode.jszip:3069
  };  // > CustomCode.jszip:3070
  /**  // > CustomCode.jszip:3071
   * Defer the call of a function.  // > CustomCode.jszip:3072
   * @param {Function} callback the function to call asynchronously.  // > CustomCode.jszip:3073
   * @param {Array} args the arguments to give to the callback.  // > CustomCode.jszip:3074
   */  // > CustomCode.jszip:3075
  exports.delay = function(callback, args, self) {  // > CustomCode.jszip:3076
      setImmediate(function () {  // > CustomCode.jszip:3077
          callback.apply(self || null, args || []);  // > CustomCode.jszip:3078
      });  // > CustomCode.jszip:3079
  };  // > CustomCode.jszip:3080
  /**  // > CustomCode.jszip:3081
   * Extends a prototype with an other, without calling a constructor with  // > CustomCode.jszip:3082
   * side effects. Inspired by nodejs' `utils.inherits`  // > CustomCode.jszip:3083
   * @param {Function} ctor the constructor to augment  // > CustomCode.jszip:3084
   * @param {Function} superCtor the parent constructor to use  // > CustomCode.jszip:3085
   */  // > CustomCode.jszip:3086
  exports.inherits = function (ctor, superCtor) {  // > CustomCode.jszip:3087
      var Obj = function() {};  // > CustomCode.jszip:3088
      Obj.prototype = superCtor.prototype;  // > CustomCode.jszip:3089
      ctor.prototype = new Obj();  // > CustomCode.jszip:3090
  };  // > CustomCode.jszip:3091
  /**  // > CustomCode.jszip:3092
   * Merge the objects passed as parameters into a new one.  // > CustomCode.jszip:3093
   * @private  // > CustomCode.jszip:3094
   * @param {...Object} var_args All objects to merge.  // > CustomCode.jszip:3095
   * @return {Object} a new object with the data of the others.  // > CustomCode.jszip:3096
   */  // > CustomCode.jszip:3097
  exports.extend = function() {  // > CustomCode.jszip:3098
      var result = {}, i, attr;  // > CustomCode.jszip:3099
      for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers  // > CustomCode.jszip:3100
          for (attr in arguments[i]) {  // > CustomCode.jszip:3101
              if (Object.prototype.hasOwnProperty.call(arguments[i], attr) && typeof result[attr] === "undefined") {  // > CustomCode.jszip:3102
                  result[attr] = arguments[i][attr];  // > CustomCode.jszip:3103
              }  // > CustomCode.jszip:3104
          }  // > CustomCode.jszip:3105
      }  // > CustomCode.jszip:3106
      return result;  // > CustomCode.jszip:3107
  };  // > CustomCode.jszip:3108
  /**  // > CustomCode.jszip:3109
   * Transform arbitrary content into a Promise.  // > CustomCode.jszip:3110
   * @param {String} name a name for the content being processed.  // > CustomCode.jszip:3111
   * @param {Object} inputData the content to process.  // > CustomCode.jszip:3112
   * @param {Boolean} isBinary true if the content is not an unicode string  // > CustomCode.jszip:3113
   * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character.  // > CustomCode.jszip:3114
   * @param {Boolean} isBase64 true if the string content is encoded with base64.  // > CustomCode.jszip:3115
   * @return {Promise} a promise in a format usable by JSZip.  // > CustomCode.jszip:3116
   */  // > CustomCode.jszip:3117
  exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {  // > CustomCode.jszip:3118
      // if inputData is already a promise, this flatten it.  // > CustomCode.jszip:3119
      var promise = external.Promise.resolve(inputData).then(function(data) {  // > CustomCode.jszip:3120
          var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1);  // > CustomCode.jszip:3121
          if (isBlob && typeof FileReader !== "undefined") {  // > CustomCode.jszip:3122
              return new external.Promise(function (resolve, reject) {  // > CustomCode.jszip:3123
                  var reader = new FileReader();  // > CustomCode.jszip:3124
                  reader.onload = function(e) {  // > CustomCode.jszip:3125
                      resolve(e.target.result);  // > CustomCode.jszip:3126
                  };  // > CustomCode.jszip:3127
                  reader.onerror = function(e) {  // > CustomCode.jszip:3128
                      reject(e.target.error);  // > CustomCode.jszip:3129
                  };  // > CustomCode.jszip:3130
                  reader.readAsArrayBuffer(data);  // > CustomCode.jszip:3131
              });  // > CustomCode.jszip:3132
          } else {  // > CustomCode.jszip:3133
              return data;  // > CustomCode.jszip:3134
          }  // > CustomCode.jszip:3135
      });  // > CustomCode.jszip:3136
      return promise.then(function(data) {  // > CustomCode.jszip:3137
          var dataType = exports.getTypeOf(data);  // > CustomCode.jszip:3138
          if (!dataType) {  // > CustomCode.jszip:3139
              return external.Promise.reject(  // > CustomCode.jszip:3140
                  new Error("Can't read the data of '" + name + "'. Is it " +  // > CustomCode.jszip:3141
                            "in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?")  // > CustomCode.jszip:3142
              );  // > CustomCode.jszip:3143
          }  // > CustomCode.jszip:3144
          // special case : it's way easier to work with Uint8Array than with ArrayBuffer  // > CustomCode.jszip:3145
          if (dataType === "arraybuffer") {  // > CustomCode.jszip:3146
              data = exports.transformTo("uint8array", data);  // > CustomCode.jszip:3147
          } else if (dataType === "string") {  // > CustomCode.jszip:3148
              if (isBase64) {  // > CustomCode.jszip:3149
                  data = base64.decode(data);  // > CustomCode.jszip:3150
              }  // > CustomCode.jszip:3151
              else if (isBinary) {  // > CustomCode.jszip:3152
                  // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask  // > CustomCode.jszip:3153
                  if (isOptimizedBinaryString !== true) {  // > CustomCode.jszip:3154
                      // this is a string, not in a base64 format.  // > CustomCode.jszip:3155
                      // Be sure that this is a correct "binary string"  // > CustomCode.jszip:3156
                      data = string2binary(data);  // > CustomCode.jszip:3157
                  }  // > CustomCode.jszip:3158
              }  // > CustomCode.jszip:3159
          }  // > CustomCode.jszip:3160
          return data;  // > CustomCode.jszip:3161
      });  // > CustomCode.jszip:3162
  };  // > CustomCode.jszip:3163
  },{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"setimmediate":54}],33:[function(require,module,exports){  // > CustomCode.jszip:3164
  "use strict";  // > CustomCode.jszip:3165
  var readerFor = require("./reader/readerFor");  // > CustomCode.jszip:3166
  var utils = require("./utils");  // > CustomCode.jszip:3167
  var sig = require("./signature");  // > CustomCode.jszip:3168
  var ZipEntry = require("./zipEntry");  // > CustomCode.jszip:3169
  var support = require("./support");  // > CustomCode.jszip:3170
  //  class ZipEntries {{{  // > CustomCode.jszip:3171
  /**  // > CustomCode.jszip:3172
   * All the entries in the zip file.  // > CustomCode.jszip:3173
   * @constructor  // > CustomCode.jszip:3174
   * @param {Object} loadOptions Options for loading the stream.  // > CustomCode.jszip:3175
   */  // > CustomCode.jszip:3176
  function ZipEntries(loadOptions) {  // > CustomCode.jszip:3177
      this.files = [];  // > CustomCode.jszip:3178
      this.loadOptions = loadOptions;  // > CustomCode.jszip:3179
  }  // > CustomCode.jszip:3180
  ZipEntries.prototype = {  // > CustomCode.jszip:3181
      /**  // > CustomCode.jszip:3182
       * Check that the reader is on the specified signature.  // > CustomCode.jszip:3183
       * @param {string} expectedSignature the expected signature.  // > CustomCode.jszip:3184
       * @throws {Error} if it is an other signature.  // > CustomCode.jszip:3185
       */  // > CustomCode.jszip:3186
      checkSignature: function(expectedSignature) {  // > CustomCode.jszip:3187
          if (!this.reader.readAndCheckSignature(expectedSignature)) {  // > CustomCode.jszip:3188
              this.reader.index -= 4;  // > CustomCode.jszip:3189
              var signature = this.reader.readString(4);  // > CustomCode.jszip:3190
              throw new Error("Corrupted zip or bug: unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")");  // > CustomCode.jszip:3191
          }  // > CustomCode.jszip:3192
      },  // > CustomCode.jszip:3193
      /**  // > CustomCode.jszip:3194
       * Check if the given signature is at the given index.  // > CustomCode.jszip:3195
       * @param {number} askedIndex the index to check.  // > CustomCode.jszip:3196
       * @param {string} expectedSignature the signature to expect.  // > CustomCode.jszip:3197
       * @return {boolean} true if the signature is here, false otherwise.  // > CustomCode.jszip:3198
       */  // > CustomCode.jszip:3199
      isSignature: function(askedIndex, expectedSignature) {  // > CustomCode.jszip:3200
          var currentIndex = this.reader.index;  // > CustomCode.jszip:3201
          this.reader.setIndex(askedIndex);  // > CustomCode.jszip:3202
          var signature = this.reader.readString(4);  // > CustomCode.jszip:3203
          var result = signature === expectedSignature;  // > CustomCode.jszip:3204
          this.reader.setIndex(currentIndex);  // > CustomCode.jszip:3205
          return result;  // > CustomCode.jszip:3206
      },  // > CustomCode.jszip:3207
      /**  // > CustomCode.jszip:3208
       * Read the end of the central directory.  // > CustomCode.jszip:3209
       */  // > CustomCode.jszip:3210
      readBlockEndOfCentral: function() {  // > CustomCode.jszip:3211
          this.diskNumber = this.reader.readInt(2);  // > CustomCode.jszip:3212
          this.diskWithCentralDirStart = this.reader.readInt(2);  // > CustomCode.jszip:3213
          this.centralDirRecordsOnThisDisk = this.reader.readInt(2);  // > CustomCode.jszip:3214
          this.centralDirRecords = this.reader.readInt(2);  // > CustomCode.jszip:3215
          this.centralDirSize = this.reader.readInt(4);  // > CustomCode.jszip:3216
          this.centralDirOffset = this.reader.readInt(4);  // > CustomCode.jszip:3217
          this.zipCommentLength = this.reader.readInt(2);  // > CustomCode.jszip:3218
          // warning : the encoding depends of the system locale  // > CustomCode.jszip:3219
          // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.  // > CustomCode.jszip:3220
          // On a windows machine, this field is encoded with the localized windows code page.  // > CustomCode.jszip:3221
          var zipComment = this.reader.readData(this.zipCommentLength);  // > CustomCode.jszip:3222
          var decodeParamType = support.uint8array ? "uint8array" : "array";  // > CustomCode.jszip:3223
          // To get consistent behavior with the generation part, we will assume that  // > CustomCode.jszip:3224
          // this is utf8 encoded unless specified otherwise.  // > CustomCode.jszip:3225
          var decodeContent = utils.transformTo(decodeParamType, zipComment);  // > CustomCode.jszip:3226
          this.zipComment = this.loadOptions.decodeFileName(decodeContent);  // > CustomCode.jszip:3227
      },  // > CustomCode.jszip:3228
      /**  // > CustomCode.jszip:3229
       * Read the end of the Zip 64 central directory.  // > CustomCode.jszip:3230
       * Not merged with the method readEndOfCentral :  // > CustomCode.jszip:3231
       * The end of central can coexist with its Zip64 brother,  // > CustomCode.jszip:3232
       * I don't want to read the wrong number of bytes !  // > CustomCode.jszip:3233
       */  // > CustomCode.jszip:3234
      readBlockZip64EndOfCentral: function() {  // > CustomCode.jszip:3235
          this.zip64EndOfCentralSize = this.reader.readInt(8);  // > CustomCode.jszip:3236
          this.reader.skip(4);  // > CustomCode.jszip:3237
          // this.versionMadeBy = this.reader.readString(2);  // > CustomCode.jszip:3238
          // this.versionNeeded = this.reader.readInt(2);  // > CustomCode.jszip:3239
          this.diskNumber = this.reader.readInt(4);  // > CustomCode.jszip:3240
          this.diskWithCentralDirStart = this.reader.readInt(4);  // > CustomCode.jszip:3241
          this.centralDirRecordsOnThisDisk = this.reader.readInt(8);  // > CustomCode.jszip:3242
          this.centralDirRecords = this.reader.readInt(8);  // > CustomCode.jszip:3243
          this.centralDirSize = this.reader.readInt(8);  // > CustomCode.jszip:3244
          this.centralDirOffset = this.reader.readInt(8);  // > CustomCode.jszip:3245
          this.zip64ExtensibleData = {};  // > CustomCode.jszip:3246
          var extraDataSize = this.zip64EndOfCentralSize - 44,  // > CustomCode.jszip:3247
              index = 0,  // > CustomCode.jszip:3248
              extraFieldId,  // > CustomCode.jszip:3249
              extraFieldLength,  // > CustomCode.jszip:3250
              extraFieldValue;  // > CustomCode.jszip:3251
          while (index < extraDataSize) {  // > CustomCode.jszip:3252
              extraFieldId = this.reader.readInt(2);  // > CustomCode.jszip:3253
              extraFieldLength = this.reader.readInt(4);  // > CustomCode.jszip:3254
              extraFieldValue = this.reader.readData(extraFieldLength);  // > CustomCode.jszip:3255
              this.zip64ExtensibleData[extraFieldId] = {  // > CustomCode.jszip:3256
                  id: extraFieldId,  // > CustomCode.jszip:3257
                  length: extraFieldLength,  // > CustomCode.jszip:3258
                  value: extraFieldValue  // > CustomCode.jszip:3259
              };  // > CustomCode.jszip:3260
          }  // > CustomCode.jszip:3261
      },  // > CustomCode.jszip:3262
      /**  // > CustomCode.jszip:3263
       * Read the end of the Zip 64 central directory locator.  // > CustomCode.jszip:3264
       */  // > CustomCode.jszip:3265
      readBlockZip64EndOfCentralLocator: function() {  // > CustomCode.jszip:3266
          this.diskWithZip64CentralDirStart = this.reader.readInt(4);  // > CustomCode.jszip:3267
          this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);  // > CustomCode.jszip:3268
          this.disksCount = this.reader.readInt(4);  // > CustomCode.jszip:3269
          if (this.disksCount > 1) {  // > CustomCode.jszip:3270
              throw new Error("Multi-volumes zip are not supported");  // > CustomCode.jszip:3271
          }  // > CustomCode.jszip:3272
      },  // > CustomCode.jszip:3273
      /**  // > CustomCode.jszip:3274
       * Read the local files, based on the offset read in the central part.  // > CustomCode.jszip:3275
       */  // > CustomCode.jszip:3276
      readLocalFiles: function() {  // > CustomCode.jszip:3277
          var i, file;  // > CustomCode.jszip:3278
          for (i = 0; i < this.files.length; i++) {  // > CustomCode.jszip:3279
              file = this.files[i];  // > CustomCode.jszip:3280
              this.reader.setIndex(file.localHeaderOffset);  // > CustomCode.jszip:3281
              this.checkSignature(sig.LOCAL_FILE_HEADER);  // > CustomCode.jszip:3282
              file.readLocalPart(this.reader);  // > CustomCode.jszip:3283
              file.handleUTF8();  // > CustomCode.jszip:3284
              file.processAttributes();  // > CustomCode.jszip:3285
          }  // > CustomCode.jszip:3286
      },  // > CustomCode.jszip:3287
      /**  // > CustomCode.jszip:3288
       * Read the central directory.  // > CustomCode.jszip:3289
       */  // > CustomCode.jszip:3290
      readCentralDir: function() {  // > CustomCode.jszip:3291
          var file;  // > CustomCode.jszip:3292
          this.reader.setIndex(this.centralDirOffset);  // > CustomCode.jszip:3293
          while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) {  // > CustomCode.jszip:3294
              file = new ZipEntry({  // > CustomCode.jszip:3295
                  zip64: this.zip64  // > CustomCode.jszip:3296
              }, this.loadOptions);  // > CustomCode.jszip:3297
              file.readCentralPart(this.reader);  // > CustomCode.jszip:3298
              this.files.push(file);  // > CustomCode.jszip:3299
          }  // > CustomCode.jszip:3300
          if (this.centralDirRecords !== this.files.length) {  // > CustomCode.jszip:3301
              if (this.centralDirRecords !== 0 && this.files.length === 0) {  // > CustomCode.jszip:3302
                  // We expected some records but couldn't find ANY.  // > CustomCode.jszip:3303
                  // This is really suspicious, as if something went wrong.  // > CustomCode.jszip:3304
                  throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);  // > CustomCode.jszip:3305
              } else {  // > CustomCode.jszip:3306
                  // We found some records but not all.  // > CustomCode.jszip:3307
                  // Something is wrong but we got something for the user: no error here.  // > CustomCode.jszip:3308
                  // console.warn("expected", this.centralDirRecords, "records in central dir, got", this.files.length);  // > CustomCode.jszip:3309
              }  // > CustomCode.jszip:3310
          }  // > CustomCode.jszip:3311
      },  // > CustomCode.jszip:3312
      /**  // > CustomCode.jszip:3313
       * Read the end of central directory.  // > CustomCode.jszip:3314
       */  // > CustomCode.jszip:3315
      readEndOfCentral: function() {  // > CustomCode.jszip:3316
          var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);  // > CustomCode.jszip:3317
          if (offset < 0) {  // > CustomCode.jszip:3318
              // Check if the content is a truncated zip or complete garbage.  // > CustomCode.jszip:3319
              // A "LOCAL_FILE_HEADER" is not required at the beginning (auto  // > CustomCode.jszip:3320
              // extractible zip for example) but it can give a good hint.  // > CustomCode.jszip:3321
              // If an ajax request was used without responseType, we will also  // > CustomCode.jszip:3322
              // get unreadable data.  // > CustomCode.jszip:3323
              var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER);  // > CustomCode.jszip:3324
              if (isGarbage) {  // > CustomCode.jszip:3325
                  throw new Error("Can't find end of central directory : is this a zip file ? " +  // > CustomCode.jszip:3326
                                  "If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");  // > CustomCode.jszip:3327
              } else {  // > CustomCode.jszip:3328
                  throw new Error("Corrupted zip: can't find end of central directory");  // > CustomCode.jszip:3329
              }  // > CustomCode.jszip:3330
          }  // > CustomCode.jszip:3331
          this.reader.setIndex(offset);  // > CustomCode.jszip:3332
          var endOfCentralDirOffset = offset;  // > CustomCode.jszip:3333
          this.checkSignature(sig.CENTRAL_DIRECTORY_END);  // > CustomCode.jszip:3334
          this.readBlockEndOfCentral();  // > CustomCode.jszip:3335
          /* extract from the zip spec :  // > CustomCode.jszip:3336
              4)  If one of the fields in the end of central directory  // > CustomCode.jszip:3337
                  record is too small to hold required data, the field  // > CustomCode.jszip:3338
                  should be set to -1 (0xFFFF or 0xFFFFFFFF) and the  // > CustomCode.jszip:3339
                  ZIP64 format record should be created.  // > CustomCode.jszip:3340
              5)  The end of central directory record and the  // > CustomCode.jszip:3341
                  Zip64 end of central directory locator record must  // > CustomCode.jszip:3342
                  reside on the same disk when splitting or spanning  // > CustomCode.jszip:3343
                  an archive.  // > CustomCode.jszip:3344
           */  // > CustomCode.jszip:3345
          if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {  // > CustomCode.jszip:3346
              this.zip64 = true;  // > CustomCode.jszip:3347
              /*  // > CustomCode.jszip:3348
              Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from  // > CustomCode.jszip:3349
              the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents  // > CustomCode.jszip:3350
              all numbers as 64-bit double precision IEEE 754 floating point numbers.  // > CustomCode.jszip:3351
              So, we have 53bits for integers and bitwise operations treat everything as 32bits.  // > CustomCode.jszip:3352
              see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators  // > CustomCode.jszip:3353
              and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5  // > CustomCode.jszip:3354
              */  // > CustomCode.jszip:3355
              // should look for a zip64 EOCD locator  // > CustomCode.jszip:3356
              offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);  // > CustomCode.jszip:3357
              if (offset < 0) {  // > CustomCode.jszip:3358
                  throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");  // > CustomCode.jszip:3359
              }  // > CustomCode.jszip:3360
              this.reader.setIndex(offset);  // > CustomCode.jszip:3361
              this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);  // > CustomCode.jszip:3362
              this.readBlockZip64EndOfCentralLocator();  // > CustomCode.jszip:3363
              // now the zip64 EOCD record  // > CustomCode.jszip:3364
              if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) {  // > CustomCode.jszip:3365
                  // console.warn("ZIP64 end of central directory not where expected.");  // > CustomCode.jszip:3366
                  this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);  // > CustomCode.jszip:3367
                  if (this.relativeOffsetEndOfZip64CentralDir < 0) {  // > CustomCode.jszip:3368
                      throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");  // > CustomCode.jszip:3369
                  }  // > CustomCode.jszip:3370
              }  // > CustomCode.jszip:3371
              this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);  // > CustomCode.jszip:3372
              this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);  // > CustomCode.jszip:3373
              this.readBlockZip64EndOfCentral();  // > CustomCode.jszip:3374
          }  // > CustomCode.jszip:3375
          var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize;  // > CustomCode.jszip:3376
          if (this.zip64) {  // > CustomCode.jszip:3377
              expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator  // > CustomCode.jszip:3378
              expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize;  // > CustomCode.jszip:3379
          }  // > CustomCode.jszip:3380
          var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset;  // > CustomCode.jszip:3381
          if (extraBytes > 0) {  // > CustomCode.jszip:3382
              // console.warn(extraBytes, "extra bytes at beginning or within zipfile");  // > CustomCode.jszip:3383
              if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) {  // > CustomCode.jszip:3384
                  // The offsets seem wrong, but we have something at the specified offset.  // > CustomCode.jszip:3385
                  // So… we keep it.  // > CustomCode.jszip:3386
              } else {  // > CustomCode.jszip:3387
                  // the offset is wrong, update the "zero" of the reader  // > CustomCode.jszip:3388
                  // this happens if data has been prepended (crx files for example)  // > CustomCode.jszip:3389
                  this.reader.zero = extraBytes;  // > CustomCode.jszip:3390
              }  // > CustomCode.jszip:3391
          } else if (extraBytes < 0) {  // > CustomCode.jszip:3392
              throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes.");  // > CustomCode.jszip:3393
          }  // > CustomCode.jszip:3394
      },  // > CustomCode.jszip:3395
      prepareReader: function(data) {  // > CustomCode.jszip:3396
          this.reader = readerFor(data);  // > CustomCode.jszip:3397
      },  // > CustomCode.jszip:3398
      /**  // > CustomCode.jszip:3399
       * Read a zip file and create ZipEntries.  // > CustomCode.jszip:3400
       * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.  // > CustomCode.jszip:3401
       */  // > CustomCode.jszip:3402
      load: function(data) {  // > CustomCode.jszip:3403
          this.prepareReader(data);  // > CustomCode.jszip:3404
          this.readEndOfCentral();  // > CustomCode.jszip:3405
          this.readCentralDir();  // > CustomCode.jszip:3406
          this.readLocalFiles();  // > CustomCode.jszip:3407
      }  // > CustomCode.jszip:3408
  };  // > CustomCode.jszip:3409
  // }}} end of ZipEntries  // > CustomCode.jszip:3410
  module.exports = ZipEntries;  // > CustomCode.jszip:3411
  },{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(require,module,exports){  // > CustomCode.jszip:3412
  "use strict";  // > CustomCode.jszip:3413
  var readerFor = require("./reader/readerFor");  // > CustomCode.jszip:3414
  var utils = require("./utils");  // > CustomCode.jszip:3415
  var CompressedObject = require("./compressedObject");  // > CustomCode.jszip:3416
  var crc32fn = require("./crc32");  // > CustomCode.jszip:3417
  var utf8 = require("./utf8");  // > CustomCode.jszip:3418
  var compressions = require("./compressions");  // > CustomCode.jszip:3419
  var support = require("./support");  // > CustomCode.jszip:3420
  var MADE_BY_DOS = 0x00;  // > CustomCode.jszip:3421
  var MADE_BY_UNIX = 0x03;  // > CustomCode.jszip:3422
  /**  // > CustomCode.jszip:3423
   * Find a compression registered in JSZip.  // > CustomCode.jszip:3424
   * @param {string} compressionMethod the method magic to find.  // > CustomCode.jszip:3425
   * @return {Object|null} the JSZip compression object, null if none found.  // > CustomCode.jszip:3426
   */  // > CustomCode.jszip:3427
  var findCompression = function(compressionMethod) {  // > CustomCode.jszip:3428
      for (var method in compressions) {  // > CustomCode.jszip:3429
          if (!Object.prototype.hasOwnProperty.call(compressions, method)) {  // > CustomCode.jszip:3430
              continue;  // > CustomCode.jszip:3431
          }  // > CustomCode.jszip:3432
          if (compressions[method].magic === compressionMethod) {  // > CustomCode.jszip:3433
              return compressions[method];  // > CustomCode.jszip:3434
          }  // > CustomCode.jszip:3435
      }  // > CustomCode.jszip:3436
      return null;  // > CustomCode.jszip:3437
  };  // > CustomCode.jszip:3438
  // class ZipEntry {{{  // > CustomCode.jszip:3439
  /**  // > CustomCode.jszip:3440
   * An entry in the zip file.  // > CustomCode.jszip:3441
   * @constructor  // > CustomCode.jszip:3442
   * @param {Object} options Options of the current file.  // > CustomCode.jszip:3443
   * @param {Object} loadOptions Options for loading the stream.  // > CustomCode.jszip:3444
   */  // > CustomCode.jszip:3445
  function ZipEntry(options, loadOptions) {  // > CustomCode.jszip:3446
      this.options = options;  // > CustomCode.jszip:3447
      this.loadOptions = loadOptions;  // > CustomCode.jszip:3448
  }  // > CustomCode.jszip:3449
  ZipEntry.prototype = {  // > CustomCode.jszip:3450
      /**  // > CustomCode.jszip:3451
       * say if the file is encrypted.  // > CustomCode.jszip:3452
       * @return {boolean} true if the file is encrypted, false otherwise.  // > CustomCode.jszip:3453
       */  // > CustomCode.jszip:3454
      isEncrypted: function() {  // > CustomCode.jszip:3455
          // bit 1 is set  // > CustomCode.jszip:3456
          return (this.bitFlag & 0x0001) === 0x0001;  // > CustomCode.jszip:3457
      },  // > CustomCode.jszip:3458
      /**  // > CustomCode.jszip:3459
       * say if the file has utf-8 filename/comment.  // > CustomCode.jszip:3460
       * @return {boolean} true if the filename/comment is in utf-8, false otherwise.  // > CustomCode.jszip:3461
       */  // > CustomCode.jszip:3462
      useUTF8: function() {  // > CustomCode.jszip:3463
          // bit 11 is set  // > CustomCode.jszip:3464
          return (this.bitFlag & 0x0800) === 0x0800;  // > CustomCode.jszip:3465
      },  // > CustomCode.jszip:3466
      /**  // > CustomCode.jszip:3467
       * Read the local part of a zip file and add the info in this object.  // > CustomCode.jszip:3468
       * @param {DataReader} reader the reader to use.  // > CustomCode.jszip:3469
       */  // > CustomCode.jszip:3470
      readLocalPart: function(reader) {  // > CustomCode.jszip:3471
          var compression, localExtraFieldsLength;  // > CustomCode.jszip:3472
          // we already know everything from the central dir !  // > CustomCode.jszip:3473
          // If the central dir data are false, we are doomed.  // > CustomCode.jszip:3474
          // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.  // > CustomCode.jszip:3475
          // The less data we get here, the more reliable this should be.  // > CustomCode.jszip:3476
          // Let's skip the whole header and dash to the data !  // > CustomCode.jszip:3477
          reader.skip(22);  // > CustomCode.jszip:3478
          // in some zip created on windows, the filename stored in the central dir contains \ instead of /.  // > CustomCode.jszip:3479
          // Strangely, the filename here is OK.  // > CustomCode.jszip:3480
          // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes  // > CustomCode.jszip:3481
          // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators...  // > CustomCode.jszip:3482
          // Search "unzip mismatching "local" filename continuing with "central" filename version" on  // > CustomCode.jszip:3483
          // the internet.  // > CustomCode.jszip:3484
          //  // > CustomCode.jszip:3485
          // I think I see the logic here : the central directory is used to display  // > CustomCode.jszip:3486
          // content and the local directory is used to extract the files. Mixing / and \  // > CustomCode.jszip:3487
          // may be used to display \ to windows users and use / when extracting the files.  // > CustomCode.jszip:3488
          // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394  // > CustomCode.jszip:3489
          this.fileNameLength = reader.readInt(2);  // > CustomCode.jszip:3490
          localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir  // > CustomCode.jszip:3491
          // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding.  // > CustomCode.jszip:3492
          this.fileName = reader.readData(this.fileNameLength);  // > CustomCode.jszip:3493
          reader.skip(localExtraFieldsLength);  // > CustomCode.jszip:3494
          if (this.compressedSize === -1 || this.uncompressedSize === -1) {  // > CustomCode.jszip:3495
              throw new Error("Bug or corrupted zip : didn't get enough information from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)");  // > CustomCode.jszip:3496
          }  // > CustomCode.jszip:3497
          compression = findCompression(this.compressionMethod);  // > CustomCode.jszip:3498
          if (compression === null) { // no compression found  // > CustomCode.jszip:3499
              throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")");  // > CustomCode.jszip:3500
          }  // > CustomCode.jszip:3501
          this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize));  // > CustomCode.jszip:3502
      },  // > CustomCode.jszip:3503
      /**  // > CustomCode.jszip:3504
       * Read the central part of a zip file and add the info in this object.  // > CustomCode.jszip:3505
       * @param {DataReader} reader the reader to use.  // > CustomCode.jszip:3506
       */  // > CustomCode.jszip:3507
      readCentralPart: function(reader) {  // > CustomCode.jszip:3508
          this.versionMadeBy = reader.readInt(2);  // > CustomCode.jszip:3509
          reader.skip(2);  // > CustomCode.jszip:3510
          // this.versionNeeded = reader.readInt(2);  // > CustomCode.jszip:3511
          this.bitFlag = reader.readInt(2);  // > CustomCode.jszip:3512
          this.compressionMethod = reader.readString(2);  // > CustomCode.jszip:3513
          this.date = reader.readDate();  // > CustomCode.jszip:3514
          this.crc32 = reader.readInt(4);  // > CustomCode.jszip:3515
          this.compressedSize = reader.readInt(4);  // > CustomCode.jszip:3516
          this.uncompressedSize = reader.readInt(4);  // > CustomCode.jszip:3517
          var fileNameLength = reader.readInt(2);  // > CustomCode.jszip:3518
          this.extraFieldsLength = reader.readInt(2);  // > CustomCode.jszip:3519
          this.fileCommentLength = reader.readInt(2);  // > CustomCode.jszip:3520
          this.diskNumberStart = reader.readInt(2);  // > CustomCode.jszip:3521
          this.internalFileAttributes = reader.readInt(2);  // > CustomCode.jszip:3522
          this.externalFileAttributes = reader.readInt(4);  // > CustomCode.jszip:3523
          this.localHeaderOffset = reader.readInt(4);  // > CustomCode.jszip:3524
          if (this.isEncrypted()) {  // > CustomCode.jszip:3525
              throw new Error("Encrypted zip are not supported");  // > CustomCode.jszip:3526
          }  // > CustomCode.jszip:3527
          // will be read in the local part, see the comments there  // > CustomCode.jszip:3528
          reader.skip(fileNameLength);  // > CustomCode.jszip:3529
          this.readExtraFields(reader);  // > CustomCode.jszip:3530
          this.parseZIP64ExtraField(reader);  // > CustomCode.jszip:3531
          this.fileComment = reader.readData(this.fileCommentLength);  // > CustomCode.jszip:3532
      },  // > CustomCode.jszip:3533
      /**  // > CustomCode.jszip:3534
       * Parse the external file attributes and get the unix/dos permissions.  // > CustomCode.jszip:3535
       */  // > CustomCode.jszip:3536
      processAttributes: function () {  // > CustomCode.jszip:3537
          this.unixPermissions = null;  // > CustomCode.jszip:3538
          this.dosPermissions = null;  // > CustomCode.jszip:3539
          var madeBy = this.versionMadeBy >> 8;  // > CustomCode.jszip:3540
          // Check if we have the DOS directory flag set.  // > CustomCode.jszip:3541
          // We look for it in the DOS and UNIX permissions  // > CustomCode.jszip:3542
          // but some unknown platform could set it as a compatibility flag.  // > CustomCode.jszip:3543
          this.dir = this.externalFileAttributes & 0x0010 ? true : false;  // > CustomCode.jszip:3544
          if(madeBy === MADE_BY_DOS) {  // > CustomCode.jszip:3545
              // first 6 bits (0 to 5)  // > CustomCode.jszip:3546
              this.dosPermissions = this.externalFileAttributes & 0x3F;  // > CustomCode.jszip:3547
          }  // > CustomCode.jszip:3548
          if(madeBy === MADE_BY_UNIX) {  // > CustomCode.jszip:3549
              this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;  // > CustomCode.jszip:3550
              // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);  // > CustomCode.jszip:3551
          }  // > CustomCode.jszip:3552
          // fail safe : if the name ends with a / it probably means a folder  // > CustomCode.jszip:3553
          if (!this.dir && this.fileNameStr.slice(-1) === "/") {  // > CustomCode.jszip:3554
              this.dir = true;  // > CustomCode.jszip:3555
          }  // > CustomCode.jszip:3556
      },  // > CustomCode.jszip:3557
      /**  // > CustomCode.jszip:3558
       * Parse the ZIP64 extra field and merge the info in the current ZipEntry.  // > CustomCode.jszip:3559
       * @param {DataReader} reader the reader to use.  // > CustomCode.jszip:3560
       */  // > CustomCode.jszip:3561
      parseZIP64ExtraField: function() {  // > CustomCode.jszip:3562
          if (!this.extraFields[0x0001]) {  // > CustomCode.jszip:3563
              return;  // > CustomCode.jszip:3564
          }  // > CustomCode.jszip:3565
          // should be something, preparing the extra reader  // > CustomCode.jszip:3566
          var extraReader = readerFor(this.extraFields[0x0001].value);  // > CustomCode.jszip:3567
          // I really hope that these 64bits integer can fit in 32 bits integer, because js  // > CustomCode.jszip:3568
          // won't let us have more.  // > CustomCode.jszip:3569
          if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {  // > CustomCode.jszip:3570
              this.uncompressedSize = extraReader.readInt(8);  // > CustomCode.jszip:3571
          }  // > CustomCode.jszip:3572
          if (this.compressedSize === utils.MAX_VALUE_32BITS) {  // > CustomCode.jszip:3573
              this.compressedSize = extraReader.readInt(8);  // > CustomCode.jszip:3574
          }  // > CustomCode.jszip:3575
          if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {  // > CustomCode.jszip:3576
              this.localHeaderOffset = extraReader.readInt(8);  // > CustomCode.jszip:3577
          }  // > CustomCode.jszip:3578
          if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {  // > CustomCode.jszip:3579
              this.diskNumberStart = extraReader.readInt(4);  // > CustomCode.jszip:3580
          }  // > CustomCode.jszip:3581
      },  // > CustomCode.jszip:3582
      /**  // > CustomCode.jszip:3583
       * Read the central part of a zip file and add the info in this object.  // > CustomCode.jszip:3584
       * @param {DataReader} reader the reader to use.  // > CustomCode.jszip:3585
       */  // > CustomCode.jszip:3586
      readExtraFields: function(reader) {  // > CustomCode.jszip:3587
          var end = reader.index + this.extraFieldsLength,  // > CustomCode.jszip:3588
              extraFieldId,  // > CustomCode.jszip:3589
              extraFieldLength,  // > CustomCode.jszip:3590
              extraFieldValue;  // > CustomCode.jszip:3591
          if (!this.extraFields) {  // > CustomCode.jszip:3592
              this.extraFields = {};  // > CustomCode.jszip:3593
          }  // > CustomCode.jszip:3594
          while (reader.index + 4 < end) {  // > CustomCode.jszip:3595
              extraFieldId = reader.readInt(2);  // > CustomCode.jszip:3596
              extraFieldLength = reader.readInt(2);  // > CustomCode.jszip:3597
              extraFieldValue = reader.readData(extraFieldLength);  // > CustomCode.jszip:3598
              this.extraFields[extraFieldId] = {  // > CustomCode.jszip:3599
                  id: extraFieldId,  // > CustomCode.jszip:3600
                  length: extraFieldLength,  // > CustomCode.jszip:3601
                  value: extraFieldValue  // > CustomCode.jszip:3602
              };  // > CustomCode.jszip:3603
          }  // > CustomCode.jszip:3604
          reader.setIndex(end);  // > CustomCode.jszip:3605
      },  // > CustomCode.jszip:3606
      /**  // > CustomCode.jszip:3607
       * Apply an UTF8 transformation if needed.  // > CustomCode.jszip:3608
       */  // > CustomCode.jszip:3609
      handleUTF8: function() {  // > CustomCode.jszip:3610
          var decodeParamType = support.uint8array ? "uint8array" : "array";  // > CustomCode.jszip:3611
          if (this.useUTF8()) {  // > CustomCode.jszip:3612
              this.fileNameStr = utf8.utf8decode(this.fileName);  // > CustomCode.jszip:3613
              this.fileCommentStr = utf8.utf8decode(this.fileComment);  // > CustomCode.jszip:3614
          } else {  // > CustomCode.jszip:3615
              var upath = this.findExtraFieldUnicodePath();  // > CustomCode.jszip:3616
              if (upath !== null) {  // > CustomCode.jszip:3617
                  this.fileNameStr = upath;  // > CustomCode.jszip:3618
              } else {  // > CustomCode.jszip:3619
                  // ASCII text or unsupported code page  // > CustomCode.jszip:3620
                  var fileNameByteArray =  utils.transformTo(decodeParamType, this.fileName);  // > CustomCode.jszip:3621
                  this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray);  // > CustomCode.jszip:3622
              }  // > CustomCode.jszip:3623
              var ucomment = this.findExtraFieldUnicodeComment();  // > CustomCode.jszip:3624
              if (ucomment !== null) {  // > CustomCode.jszip:3625
                  this.fileCommentStr = ucomment;  // > CustomCode.jszip:3626
              } else {  // > CustomCode.jszip:3627
                  // ASCII text or unsupported code page  // > CustomCode.jszip:3628
                  var commentByteArray =  utils.transformTo(decodeParamType, this.fileComment);  // > CustomCode.jszip:3629
                  this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray);  // > CustomCode.jszip:3630
              }  // > CustomCode.jszip:3631
          }  // > CustomCode.jszip:3632
      },  // > CustomCode.jszip:3633
      /**  // > CustomCode.jszip:3634
       * Find the unicode path declared in the extra field, if any.  // > CustomCode.jszip:3635
       * @return {String} the unicode path, null otherwise.  // > CustomCode.jszip:3636
       */  // > CustomCode.jszip:3637
      findExtraFieldUnicodePath: function() {  // > CustomCode.jszip:3638
          var upathField = this.extraFields[0x7075];  // > CustomCode.jszip:3639
          if (upathField) {  // > CustomCode.jszip:3640
              var extraReader = readerFor(upathField.value);  // > CustomCode.jszip:3641
              // wrong version  // > CustomCode.jszip:3642
              if (extraReader.readInt(1) !== 1) {  // > CustomCode.jszip:3643
                  return null;  // > CustomCode.jszip:3644
              }  // > CustomCode.jszip:3645
              // the crc of the filename changed, this field is out of date.  // > CustomCode.jszip:3646
              if (crc32fn(this.fileName) !== extraReader.readInt(4)) {  // > CustomCode.jszip:3647
                  return null;  // > CustomCode.jszip:3648
              }  // > CustomCode.jszip:3649
              return utf8.utf8decode(extraReader.readData(upathField.length - 5));  // > CustomCode.jszip:3650
          }  // > CustomCode.jszip:3651
          return null;  // > CustomCode.jszip:3652
      },  // > CustomCode.jszip:3653
      /**  // > CustomCode.jszip:3654
       * Find the unicode comment declared in the extra field, if any.  // > CustomCode.jszip:3655
       * @return {String} the unicode comment, null otherwise.  // > CustomCode.jszip:3656
       */  // > CustomCode.jszip:3657
      findExtraFieldUnicodeComment: function() {  // > CustomCode.jszip:3658
          var ucommentField = this.extraFields[0x6375];  // > CustomCode.jszip:3659
          if (ucommentField) {  // > CustomCode.jszip:3660
              var extraReader = readerFor(ucommentField.value);  // > CustomCode.jszip:3661
              // wrong version  // > CustomCode.jszip:3662
              if (extraReader.readInt(1) !== 1) {  // > CustomCode.jszip:3663
                  return null;  // > CustomCode.jszip:3664
              }  // > CustomCode.jszip:3665
              // the crc of the comment changed, this field is out of date.  // > CustomCode.jszip:3666
              if (crc32fn(this.fileComment) !== extraReader.readInt(4)) {  // > CustomCode.jszip:3667
                  return null;  // > CustomCode.jszip:3668
              }  // > CustomCode.jszip:3669
              return utf8.utf8decode(extraReader.readData(ucommentField.length - 5));  // > CustomCode.jszip:3670
          }  // > CustomCode.jszip:3671
          return null;  // > CustomCode.jszip:3672
      }  // > CustomCode.jszip:3673
  };  // > CustomCode.jszip:3674
  module.exports = ZipEntry;  // > CustomCode.jszip:3675
  },{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(require,module,exports){  // > CustomCode.jszip:3676
  "use strict";  // > CustomCode.jszip:3677
  var StreamHelper = require("./stream/StreamHelper");  // > CustomCode.jszip:3678
  var DataWorker = require("./stream/DataWorker");  // > CustomCode.jszip:3679
  var utf8 = require("./utf8");  // > CustomCode.jszip:3680
  var CompressedObject = require("./compressedObject");  // > CustomCode.jszip:3681
  var GenericWorker = require("./stream/GenericWorker");  // > CustomCode.jszip:3682
  /**  // > CustomCode.jszip:3683
   * A simple object representing a file in the zip file.  // > CustomCode.jszip:3684
   * @constructor  // > CustomCode.jszip:3685
   * @param {string} name the name of the file  // > CustomCode.jszip:3686
   * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data  // > CustomCode.jszip:3687
   * @param {Object} options the options of the file  // > CustomCode.jszip:3688
   */  // > CustomCode.jszip:3689
  var ZipObject = function(name, data, options) {  // > CustomCode.jszip:3690
      this.name = name;  // > CustomCode.jszip:3691
      this.dir = options.dir;  // > CustomCode.jszip:3692
      this.date = options.date;  // > CustomCode.jszip:3693
      this.comment = options.comment;  // > CustomCode.jszip:3694
      this.unixPermissions = options.unixPermissions;  // > CustomCode.jszip:3695
      this.dosPermissions = options.dosPermissions;  // > CustomCode.jszip:3696
      this._data = data;  // > CustomCode.jszip:3697
      this._dataBinary = options.binary;  // > CustomCode.jszip:3698
      // keep only the compression  // > CustomCode.jszip:3699
      this.options = {  // > CustomCode.jszip:3700
          compression : options.compression,  // > CustomCode.jszip:3701
          compressionOptions : options.compressionOptions  // > CustomCode.jszip:3702
      };  // > CustomCode.jszip:3703
  };  // > CustomCode.jszip:3704
  ZipObject.prototype = {  // > CustomCode.jszip:3705
      /**  // > CustomCode.jszip:3706
       * Create an internal stream for the content of this object.  // > CustomCode.jszip:3707
       * @param {String} type the type of each chunk.  // > CustomCode.jszip:3708
       * @return StreamHelper the stream.  // > CustomCode.jszip:3709
       */  // > CustomCode.jszip:3710
      internalStream: function (type) {  // > CustomCode.jszip:3711
          var result = null, outputType = "string";  // > CustomCode.jszip:3712
          try {  // > CustomCode.jszip:3713
              if (!type) {  // > CustomCode.jszip:3714
                  throw new Error("No output type specified.");  // > CustomCode.jszip:3715
              }  // > CustomCode.jszip:3716
              outputType = type.toLowerCase();  // > CustomCode.jszip:3717
              var askUnicodeString = outputType === "string" || outputType === "text";  // > CustomCode.jszip:3718
              if (outputType === "binarystring" || outputType === "text") {  // > CustomCode.jszip:3719
                  outputType = "string";  // > CustomCode.jszip:3720
              }  // > CustomCode.jszip:3721
              result = this._decompressWorker();  // > CustomCode.jszip:3722
              var isUnicodeString = !this._dataBinary;  // > CustomCode.jszip:3723
              if (isUnicodeString && !askUnicodeString) {  // > CustomCode.jszip:3724
                  result = result.pipe(new utf8.Utf8EncodeWorker());  // > CustomCode.jszip:3725
              }  // > CustomCode.jszip:3726
              if (!isUnicodeString && askUnicodeString) {  // > CustomCode.jszip:3727
                  result = result.pipe(new utf8.Utf8DecodeWorker());  // > CustomCode.jszip:3728
              }  // > CustomCode.jszip:3729
          } catch (e) {  // > CustomCode.jszip:3730
              result = new GenericWorker("error");  // > CustomCode.jszip:3731
              result.error(e);  // > CustomCode.jszip:3732
          }  // > CustomCode.jszip:3733
          return new StreamHelper(result, outputType, "");  // > CustomCode.jszip:3734
      },  // > CustomCode.jszip:3735
      /**  // > CustomCode.jszip:3736
       * Prepare the content in the asked type.  // > CustomCode.jszip:3737
       * @param {String} type the type of the result.  // > CustomCode.jszip:3738
       * @param {Function} onUpdate a function to call on each internal update.  // > CustomCode.jszip:3739
       * @return Promise the promise of the result.  // > CustomCode.jszip:3740
       */  // > CustomCode.jszip:3741
      async: function (type, onUpdate) {  // > CustomCode.jszip:3742
          return this.internalStream(type).accumulate(onUpdate);  // > CustomCode.jszip:3743
      },  // > CustomCode.jszip:3744
      /**  // > CustomCode.jszip:3745
       * Prepare the content as a nodejs stream.  // > CustomCode.jszip:3746
       * @param {String} type the type of each chunk.  // > CustomCode.jszip:3747
       * @param {Function} onUpdate a function to call on each internal update.  // > CustomCode.jszip:3748
       * @return Stream the stream.  // > CustomCode.jszip:3749
       */  // > CustomCode.jszip:3750
      nodeStream: function (type, onUpdate) {  // > CustomCode.jszip:3751
          return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate);  // > CustomCode.jszip:3752
      },  // > CustomCode.jszip:3753
      /**  // > CustomCode.jszip:3754
       * Return a worker for the compressed content.  // > CustomCode.jszip:3755
       * @private  // > CustomCode.jszip:3756
       * @param {Object} compression the compression object to use.  // > CustomCode.jszip:3757
       * @param {Object} compressionOptions the options to use when compressing.  // > CustomCode.jszip:3758
       * @return Worker the worker.  // > CustomCode.jszip:3759
       */  // > CustomCode.jszip:3760
      _compressWorker: function (compression, compressionOptions) {  // > CustomCode.jszip:3761
          if (  // > CustomCode.jszip:3762
              this._data instanceof CompressedObject &&  // > CustomCode.jszip:3763
              this._data.compression.magic === compression.magic  // > CustomCode.jszip:3764
          ) {  // > CustomCode.jszip:3765
              return this._data.getCompressedWorker();  // > CustomCode.jszip:3766
          } else {  // > CustomCode.jszip:3767
              var result = this._decompressWorker();  // > CustomCode.jszip:3768
              if(!this._dataBinary) {  // > CustomCode.jszip:3769
                  result = result.pipe(new utf8.Utf8EncodeWorker());  // > CustomCode.jszip:3770
              }  // > CustomCode.jszip:3771
              return CompressedObject.createWorkerFrom(result, compression, compressionOptions);  // > CustomCode.jszip:3772
          }  // > CustomCode.jszip:3773
      },  // > CustomCode.jszip:3774
      /**  // > CustomCode.jszip:3775
       * Return a worker for the decompressed content.  // > CustomCode.jszip:3776
       * @private  // > CustomCode.jszip:3777
       * @return Worker the worker.  // > CustomCode.jszip:3778
       */  // > CustomCode.jszip:3779
      _decompressWorker : function () {  // > CustomCode.jszip:3780
          if (this._data instanceof CompressedObject) {  // > CustomCode.jszip:3781
              return this._data.getContentWorker();  // > CustomCode.jszip:3782
          } else if (this._data instanceof GenericWorker) {  // > CustomCode.jszip:3783
              return this._data;  // > CustomCode.jszip:3784
          } else {  // > CustomCode.jszip:3785
              return new DataWorker(this._data);  // > CustomCode.jszip:3786
          }  // > CustomCode.jszip:3787
      }  // > CustomCode.jszip:3788
  };  // > CustomCode.jszip:3789
  var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"];  // > CustomCode.jszip:3790
  var removedFn = function () {  // > CustomCode.jszip:3791
      throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");  // > CustomCode.jszip:3792
  };  // > CustomCode.jszip:3793
  for(var i = 0; i < removedMethods.length; i++) {  // > CustomCode.jszip:3794
      ZipObject.prototype[removedMethods[i]] = removedFn;  // > CustomCode.jszip:3795
  }  // > CustomCode.jszip:3796
  module.exports = ZipObject;  // > CustomCode.jszip:3797
  },{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(require,module,exports){  // > CustomCode.jszip:3798
  (function (global){  // > CustomCode.jszip:3799
  'use strict';  // > CustomCode.jszip:3800
  var Mutation = global.MutationObserver || global.WebKitMutationObserver;  // > CustomCode.jszip:3801
  var scheduleDrain;  // > CustomCode.jszip:3802
  {  // > CustomCode.jszip:3803
    if (Mutation) {  // > CustomCode.jszip:3804
      var called = 0;  // > CustomCode.jszip:3805
      var observer = new Mutation(nextTick);  // > CustomCode.jszip:3806
      var element = global.document.createTextNode('');  // > CustomCode.jszip:3807
      observer.observe(element, {  // > CustomCode.jszip:3808
        characterData: true  // > CustomCode.jszip:3809
      });  // > CustomCode.jszip:3810
      scheduleDrain = function () {  // > CustomCode.jszip:3811
        element.data = (called = ++called % 2);  // > CustomCode.jszip:3812
      };  // > CustomCode.jszip:3813
    } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {  // > CustomCode.jszip:3814
      var channel = new global.MessageChannel();  // > CustomCode.jszip:3815
      channel.port1.onmessage = nextTick;  // > CustomCode.jszip:3816
      scheduleDrain = function () {  // > CustomCode.jszip:3817
        channel.port2.postMessage(0);  // > CustomCode.jszip:3818
      };  // > CustomCode.jszip:3819
    } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {  // > CustomCode.jszip:3820
      scheduleDrain = function () {  // > CustomCode.jszip:3821
        // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted  // > CustomCode.jszip:3822
        // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.  // > CustomCode.jszip:3823
        var scriptEl = global.document.createElement('script');  // > CustomCode.jszip:3824
        scriptEl.onreadystatechange = function () {  // > CustomCode.jszip:3825
          nextTick();  // > CustomCode.jszip:3826
          scriptEl.onreadystatechange = null;  // > CustomCode.jszip:3827
          scriptEl.parentNode.removeChild(scriptEl);  // > CustomCode.jszip:3828
          scriptEl = null;  // > CustomCode.jszip:3829
        };  // > CustomCode.jszip:3830
        global.document.documentElement.appendChild(scriptEl);  // > CustomCode.jszip:3831
      };  // > CustomCode.jszip:3832
    } else {  // > CustomCode.jszip:3833
      scheduleDrain = function () {  // > CustomCode.jszip:3834
        setTimeout(nextTick, 0);  // > CustomCode.jszip:3835
      };  // > CustomCode.jszip:3836
    }  // > CustomCode.jszip:3837
  }  // > CustomCode.jszip:3838
  var draining;  // > CustomCode.jszip:3839
  var queue = [];  // > CustomCode.jszip:3840
  //named nextTick for less confusing stack traces  // > CustomCode.jszip:3841
  function nextTick() {  // > CustomCode.jszip:3842
    draining = true;  // > CustomCode.jszip:3843
    var i, oldQueue;  // > CustomCode.jszip:3844
    var len = queue.length;  // > CustomCode.jszip:3845
    while (len) {  // > CustomCode.jszip:3846
      oldQueue = queue;  // > CustomCode.jszip:3847
      queue = [];  // > CustomCode.jszip:3848
      i = -1;  // > CustomCode.jszip:3849
      while (++i < len) {  // > CustomCode.jszip:3850
        oldQueue[i]();  // > CustomCode.jszip:3851
      }  // > CustomCode.jszip:3852
      len = queue.length;  // > CustomCode.jszip:3853
    }  // > CustomCode.jszip:3854
    draining = false;  // > CustomCode.jszip:3855
  }  // > CustomCode.jszip:3856
  module.exports = immediate;  // > CustomCode.jszip:3857
  function immediate(task) {  // > CustomCode.jszip:3858
    if (queue.push(task) === 1 && !draining) {  // > CustomCode.jszip:3859
      scheduleDrain();  // > CustomCode.jszip:3860
    }  // > CustomCode.jszip:3861
  }  // > CustomCode.jszip:3862
  }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})  // > CustomCode.jszip:3863
  },{}],37:[function(require,module,exports){  // > CustomCode.jszip:3864
  'use strict';  // > CustomCode.jszip:3865
  var immediate = require('immediate');  // > CustomCode.jszip:3866
  /* istanbul ignore next */  // > CustomCode.jszip:3867
  function INTERNAL() {}  // > CustomCode.jszip:3868
  var handlers = {};  // > CustomCode.jszip:3869
  var REJECTED = ['REJECTED'];  // > CustomCode.jszip:3870
  var FULFILLED = ['FULFILLED'];  // > CustomCode.jszip:3871
  var PENDING = ['PENDING'];  // > CustomCode.jszip:3872
  module.exports = Promise;  // > CustomCode.jszip:3873
  function Promise(resolver) {  // > CustomCode.jszip:3874
    if (typeof resolver !== 'function') {  // > CustomCode.jszip:3875
      throw new TypeError('resolver must be a function');  // > CustomCode.jszip:3876
    }  // > CustomCode.jszip:3877
    this.state = PENDING;  // > CustomCode.jszip:3878
    this.queue = [];  // > CustomCode.jszip:3879
    this.outcome = void 0;  // > CustomCode.jszip:3880
    if (resolver !== INTERNAL) {  // > CustomCode.jszip:3881
      safelyResolveThenable(this, resolver);  // > CustomCode.jszip:3882
    }  // > CustomCode.jszip:3883
  }  // > CustomCode.jszip:3884
  Promise.prototype["finally"] = function (callback) {  // > CustomCode.jszip:3885
    if (typeof callback !== 'function') {  // > CustomCode.jszip:3886
      return this;  // > CustomCode.jszip:3887
    }  // > CustomCode.jszip:3888
    var p = this.constructor;  // > CustomCode.jszip:3889
    return this.then(resolve, reject);  // > CustomCode.jszip:3890
    function resolve(value) {  // > CustomCode.jszip:3891
      function yes () {  // > CustomCode.jszip:3892
        return value;  // > CustomCode.jszip:3893
      }  // > CustomCode.jszip:3894
      return p.resolve(callback()).then(yes);  // > CustomCode.jszip:3895
    }  // > CustomCode.jszip:3896
    function reject(reason) {  // > CustomCode.jszip:3897
      function no () {  // > CustomCode.jszip:3898
        throw reason;  // > CustomCode.jszip:3899
      }  // > CustomCode.jszip:3900
      return p.resolve(callback()).then(no);  // > CustomCode.jszip:3901
    }  // > CustomCode.jszip:3902
  };  // > CustomCode.jszip:3903
  Promise.prototype["catch"] = function (onRejected) {  // > CustomCode.jszip:3904
    return this.then(null, onRejected);  // > CustomCode.jszip:3905
  };  // > CustomCode.jszip:3906
  Promise.prototype.then = function (onFulfilled, onRejected) {  // > CustomCode.jszip:3907
    if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||  // > CustomCode.jszip:3908
      typeof onRejected !== 'function' && this.state === REJECTED) {  // > CustomCode.jszip:3909
      return this;  // > CustomCode.jszip:3910
    }  // > CustomCode.jszip:3911
    var promise = new this.constructor(INTERNAL);  // > CustomCode.jszip:3912
    if (this.state !== PENDING) {  // > CustomCode.jszip:3913
      var resolver = this.state === FULFILLED ? onFulfilled : onRejected;  // > CustomCode.jszip:3914
      unwrap(promise, resolver, this.outcome);  // > CustomCode.jszip:3915
    } else {  // > CustomCode.jszip:3916
      this.queue.push(new QueueItem(promise, onFulfilled, onRejected));  // > CustomCode.jszip:3917
    }  // > CustomCode.jszip:3918
    return promise;  // > CustomCode.jszip:3919
  };  // > CustomCode.jszip:3920
  function QueueItem(promise, onFulfilled, onRejected) {  // > CustomCode.jszip:3921
    this.promise = promise;  // > CustomCode.jszip:3922
    if (typeof onFulfilled === 'function') {  // > CustomCode.jszip:3923
      this.onFulfilled = onFulfilled;  // > CustomCode.jszip:3924
      this.callFulfilled = this.otherCallFulfilled;  // > CustomCode.jszip:3925
    }  // > CustomCode.jszip:3926
    if (typeof onRejected === 'function') {  // > CustomCode.jszip:3927
      this.onRejected = onRejected;  // > CustomCode.jszip:3928
      this.callRejected = this.otherCallRejected;  // > CustomCode.jszip:3929
    }  // > CustomCode.jszip:3930
  }  // > CustomCode.jszip:3931
  QueueItem.prototype.callFulfilled = function (value) {  // > CustomCode.jszip:3932
    handlers.resolve(this.promise, value);  // > CustomCode.jszip:3933
  };  // > CustomCode.jszip:3934
  QueueItem.prototype.otherCallFulfilled = function (value) {  // > CustomCode.jszip:3935
    unwrap(this.promise, this.onFulfilled, value);  // > CustomCode.jszip:3936
  };  // > CustomCode.jszip:3937
  QueueItem.prototype.callRejected = function (value) {  // > CustomCode.jszip:3938
    handlers.reject(this.promise, value);  // > CustomCode.jszip:3939
  };  // > CustomCode.jszip:3940
  QueueItem.prototype.otherCallRejected = function (value) {  // > CustomCode.jszip:3941
    unwrap(this.promise, this.onRejected, value);  // > CustomCode.jszip:3942
  };  // > CustomCode.jszip:3943
  function unwrap(promise, func, value) {  // > CustomCode.jszip:3944
    immediate(function () {  // > CustomCode.jszip:3945
      var returnValue;  // > CustomCode.jszip:3946
      try {  // > CustomCode.jszip:3947
        returnValue = func(value);  // > CustomCode.jszip:3948
      } catch (e) {  // > CustomCode.jszip:3949
        return handlers.reject(promise, e);  // > CustomCode.jszip:3950
      }  // > CustomCode.jszip:3951
      if (returnValue === promise) {  // > CustomCode.jszip:3952
        handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));  // > CustomCode.jszip:3953
      } else {  // > CustomCode.jszip:3954
        handlers.resolve(promise, returnValue);  // > CustomCode.jszip:3955
      }  // > CustomCode.jszip:3956
    });  // > CustomCode.jszip:3957
  }  // > CustomCode.jszip:3958
  handlers.resolve = function (self, value) {  // > CustomCode.jszip:3959
    var result = tryCatch(getThen, value);  // > CustomCode.jszip:3960
    if (result.status === 'error') {  // > CustomCode.jszip:3961
      return handlers.reject(self, result.value);  // > CustomCode.jszip:3962
    }  // > CustomCode.jszip:3963
    var thenable = result.value;  // > CustomCode.jszip:3964
    if (thenable) {  // > CustomCode.jszip:3965
      safelyResolveThenable(self, thenable);  // > CustomCode.jszip:3966
    } else {  // > CustomCode.jszip:3967
      self.state = FULFILLED;  // > CustomCode.jszip:3968
      self.outcome = value;  // > CustomCode.jszip:3969
      var i = -1;  // > CustomCode.jszip:3970
      var len = self.queue.length;  // > CustomCode.jszip:3971
      while (++i < len) {  // > CustomCode.jszip:3972
        self.queue[i].callFulfilled(value);  // > CustomCode.jszip:3973
      }  // > CustomCode.jszip:3974
    }  // > CustomCode.jszip:3975
    return self;  // > CustomCode.jszip:3976
  };  // > CustomCode.jszip:3977
  handlers.reject = function (self, error) {  // > CustomCode.jszip:3978
    self.state = REJECTED;  // > CustomCode.jszip:3979
    self.outcome = error;  // > CustomCode.jszip:3980
    var i = -1;  // > CustomCode.jszip:3981
    var len = self.queue.length;  // > CustomCode.jszip:3982
    while (++i < len) {  // > CustomCode.jszip:3983
      self.queue[i].callRejected(error);  // > CustomCode.jszip:3984
    }  // > CustomCode.jszip:3985
    return self;  // > CustomCode.jszip:3986
  };  // > CustomCode.jszip:3987
  function getThen(obj) {  // > CustomCode.jszip:3988
    // Make sure we only access the accessor once as required by the spec  // > CustomCode.jszip:3989
    var then = obj && obj.then;  // > CustomCode.jszip:3990
    if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {  // > CustomCode.jszip:3991
      return function appyThen() {  // > CustomCode.jszip:3992
        then.apply(obj, arguments);  // > CustomCode.jszip:3993
      };  // > CustomCode.jszip:3994
    }  // > CustomCode.jszip:3995
  }  // > CustomCode.jszip:3996
  function safelyResolveThenable(self, thenable) {  // > CustomCode.jszip:3997
    // Either fulfill, reject or reject with error  // > CustomCode.jszip:3998
    var called = false;  // > CustomCode.jszip:3999
    function onError(value) {  // > CustomCode.jszip:4000
      if (called) {  // > CustomCode.jszip:4001
        return;  // > CustomCode.jszip:4002
      }  // > CustomCode.jszip:4003
      called = true;  // > CustomCode.jszip:4004
      handlers.reject(self, value);  // > CustomCode.jszip:4005
    }  // > CustomCode.jszip:4006
    function onSuccess(value) {  // > CustomCode.jszip:4007
      if (called) {  // > CustomCode.jszip:4008
        return;  // > CustomCode.jszip:4009
      }  // > CustomCode.jszip:4010
      called = true;  // > CustomCode.jszip:4011
      handlers.resolve(self, value);  // > CustomCode.jszip:4012
    }  // > CustomCode.jszip:4013
    function tryToUnwrap() {  // > CustomCode.jszip:4014
      thenable(onSuccess, onError);  // > CustomCode.jszip:4015
    }  // > CustomCode.jszip:4016
    var result = tryCatch(tryToUnwrap);  // > CustomCode.jszip:4017
    if (result.status === 'error') {  // > CustomCode.jszip:4018
      onError(result.value);  // > CustomCode.jszip:4019
    }  // > CustomCode.jszip:4020
  }  // > CustomCode.jszip:4021
  function tryCatch(func, value) {  // > CustomCode.jszip:4022
    var out = {};  // > CustomCode.jszip:4023
    try {  // > CustomCode.jszip:4024
      out.value = func(value);  // > CustomCode.jszip:4025
      out.status = 'success';  // > CustomCode.jszip:4026
    } catch (e) {  // > CustomCode.jszip:4027
      out.status = 'error';  // > CustomCode.jszip:4028
      out.value = e;  // > CustomCode.jszip:4029
    }  // > CustomCode.jszip:4030
    return out;  // > CustomCode.jszip:4031
  }  // > CustomCode.jszip:4032
  Promise.resolve = resolve;  // > CustomCode.jszip:4033
  function resolve(value) {  // > CustomCode.jszip:4034
    if (value instanceof this) {  // > CustomCode.jszip:4035
      return value;  // > CustomCode.jszip:4036
    }  // > CustomCode.jszip:4037
    return handlers.resolve(new this(INTERNAL), value);  // > CustomCode.jszip:4038
  }  // > CustomCode.jszip:4039
  Promise.reject = reject;  // > CustomCode.jszip:4040
  function reject(reason) {  // > CustomCode.jszip:4041
    var promise = new this(INTERNAL);  // > CustomCode.jszip:4042
    return handlers.reject(promise, reason);  // > CustomCode.jszip:4043
  }  // > CustomCode.jszip:4044
  Promise.all = all;  // > CustomCode.jszip:4045
  function all(iterable) {  // > CustomCode.jszip:4046
    var self = this;  // > CustomCode.jszip:4047
    if (Object.prototype.toString.call(iterable) !== '[object Array]') {  // > CustomCode.jszip:4048
      return this.reject(new TypeError('must be an array'));  // > CustomCode.jszip:4049
    }  // > CustomCode.jszip:4050
    var len = iterable.length;  // > CustomCode.jszip:4051
    var called = false;  // > CustomCode.jszip:4052
    if (!len) {  // > CustomCode.jszip:4053
      return this.resolve([]);  // > CustomCode.jszip:4054
    }  // > CustomCode.jszip:4055
    var values = new Array(len);  // > CustomCode.jszip:4056
    var resolved = 0;  // > CustomCode.jszip:4057
    var i = -1;  // > CustomCode.jszip:4058
    var promise = new this(INTERNAL);  // > CustomCode.jszip:4059
    while (++i < len) {  // > CustomCode.jszip:4060
      allResolver(iterable[i], i);  // > CustomCode.jszip:4061
    }  // > CustomCode.jszip:4062
    return promise;  // > CustomCode.jszip:4063
    function allResolver(value, i) {  // > CustomCode.jszip:4064
      self.resolve(value).then(resolveFromAll, function (error) {  // > CustomCode.jszip:4065
        if (!called) {  // > CustomCode.jszip:4066
          called = true;  // > CustomCode.jszip:4067
          handlers.reject(promise, error);  // > CustomCode.jszip:4068
        }  // > CustomCode.jszip:4069
      });  // > CustomCode.jszip:4070
      function resolveFromAll(outValue) {  // > CustomCode.jszip:4071
        values[i] = outValue;  // > CustomCode.jszip:4072
        if (++resolved === len && !called) {  // > CustomCode.jszip:4073
          called = true;  // > CustomCode.jszip:4074
          handlers.resolve(promise, values);  // > CustomCode.jszip:4075
        }  // > CustomCode.jszip:4076
      }  // > CustomCode.jszip:4077
    }  // > CustomCode.jszip:4078
  }  // > CustomCode.jszip:4079
  Promise.race = race;  // > CustomCode.jszip:4080
  function race(iterable) {  // > CustomCode.jszip:4081
    var self = this;  // > CustomCode.jszip:4082
    if (Object.prototype.toString.call(iterable) !== '[object Array]') {  // > CustomCode.jszip:4083
      return this.reject(new TypeError('must be an array'));  // > CustomCode.jszip:4084
    }  // > CustomCode.jszip:4085
    var len = iterable.length;  // > CustomCode.jszip:4086
    var called = false;  // > CustomCode.jszip:4087
    if (!len) {  // > CustomCode.jszip:4088
      return this.resolve([]);  // > CustomCode.jszip:4089
    }  // > CustomCode.jszip:4090
    var i = -1;  // > CustomCode.jszip:4091
    var promise = new this(INTERNAL);  // > CustomCode.jszip:4092
    while (++i < len) {  // > CustomCode.jszip:4093
      resolver(iterable[i]);  // > CustomCode.jszip:4094
    }  // > CustomCode.jszip:4095
    return promise;  // > CustomCode.jszip:4096
    function resolver(value) {  // > CustomCode.jszip:4097
      self.resolve(value).then(function (response) {  // > CustomCode.jszip:4098
        if (!called) {  // > CustomCode.jszip:4099
          called = true;  // > CustomCode.jszip:4100
          handlers.resolve(promise, response);  // > CustomCode.jszip:4101
        }  // > CustomCode.jszip:4102
      }, function (error) {  // > CustomCode.jszip:4103
        if (!called) {  // > CustomCode.jszip:4104
          called = true;  // > CustomCode.jszip:4105
          handlers.reject(promise, error);  // > CustomCode.jszip:4106
        }  // > CustomCode.jszip:4107
      });  // > CustomCode.jszip:4108
    }  // > CustomCode.jszip:4109
  }  // > CustomCode.jszip:4110
  },{"immediate":36}],38:[function(require,module,exports){  // > CustomCode.jszip:4111
  // Top level file is just a mixin of submodules & constants  // > CustomCode.jszip:4112
  'use strict';  // > CustomCode.jszip:4113
  var assign    = require('./lib/utils/common').assign;  // > CustomCode.jszip:4114
  var deflate   = require('./lib/deflate');  // > CustomCode.jszip:4115
  var inflate   = require('./lib/inflate');  // > CustomCode.jszip:4116
  var constants = require('./lib/zlib/constants');  // > CustomCode.jszip:4117
  var pako = {};  // > CustomCode.jszip:4118
  assign(pako, deflate, inflate, constants);  // > CustomCode.jszip:4119
  module.exports = pako;  // > CustomCode.jszip:4120
  },{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(require,module,exports){  // > CustomCode.jszip:4121
  'use strict';  // > CustomCode.jszip:4122
  var zlib_deflate = require('./zlib/deflate');  // > CustomCode.jszip:4123
  var utils        = require('./utils/common');  // > CustomCode.jszip:4124
  var strings      = require('./utils/strings');  // > CustomCode.jszip:4125
  var msg          = require('./zlib/messages');  // > CustomCode.jszip:4126
  var ZStream      = require('./zlib/zstream');  // > CustomCode.jszip:4127
  var toString = Object.prototype.toString;  // > CustomCode.jszip:4128
  /* Public constants ==========================================================*/  // > CustomCode.jszip:4129
  /* ===========================================================================*/  // > CustomCode.jszip:4130
  var Z_NO_FLUSH      = 0;  // > CustomCode.jszip:4131
  var Z_FINISH        = 4;  // > CustomCode.jszip:4132
  var Z_OK            = 0;  // > CustomCode.jszip:4133
  var Z_STREAM_END    = 1;  // > CustomCode.jszip:4134
  var Z_SYNC_FLUSH    = 2;  // > CustomCode.jszip:4135
  var Z_DEFAULT_COMPRESSION = -1;  // > CustomCode.jszip:4136
  var Z_DEFAULT_STRATEGY    = 0;  // > CustomCode.jszip:4137
  var Z_DEFLATED  = 8;  // > CustomCode.jszip:4138
  /* ===========================================================================*/  // > CustomCode.jszip:4139
  /**  // > CustomCode.jszip:4140
   * class Deflate  // > CustomCode.jszip:4141
   *  // > CustomCode.jszip:4142
   * Generic JS-style wrapper for zlib calls. If you don't need  // > CustomCode.jszip:4143
   * streaming behaviour - use more simple functions: [[deflate]],  // > CustomCode.jszip:4144
   * [[deflateRaw]] and [[gzip]].  // > CustomCode.jszip:4145
   **/  // > CustomCode.jszip:4146
  /* internal  // > CustomCode.jszip:4147
   * Deflate.chunks -> Array  // > CustomCode.jszip:4148
   *  // > CustomCode.jszip:4149
   * Chunks of output data, if [[Deflate#onData]] not overriden.  // > CustomCode.jszip:4150
   **/  // > CustomCode.jszip:4151
  /**  // > CustomCode.jszip:4152
   * Deflate.result -> Uint8Array|Array  // > CustomCode.jszip:4153
   *  // > CustomCode.jszip:4154
   * Compressed result, generated by default [[Deflate#onData]]  // > CustomCode.jszip:4155
   * and [[Deflate#onEnd]] handlers. Filled after you push last chunk  // > CustomCode.jszip:4156
   * (call [[Deflate#push]] with `Z_FINISH` / `true` param)  or if you  // > CustomCode.jszip:4157
   * push a chunk with explicit flush (call [[Deflate#push]] with  // > CustomCode.jszip:4158
   * `Z_SYNC_FLUSH` param).  // > CustomCode.jszip:4159
   **/  // > CustomCode.jszip:4160
  /**  // > CustomCode.jszip:4161
   * Deflate.err -> Number  // > CustomCode.jszip:4162
   *  // > CustomCode.jszip:4163
   * Error code after deflate finished. 0 (Z_OK) on success.  // > CustomCode.jszip:4164
   * You will not need it in real life, because deflate errors  // > CustomCode.jszip:4165
   * are possible only on wrong options or bad `onData` / `onEnd`  // > CustomCode.jszip:4166
   * custom handlers.  // > CustomCode.jszip:4167
   **/  // > CustomCode.jszip:4168
  /**  // > CustomCode.jszip:4169
   * Deflate.msg -> String  // > CustomCode.jszip:4170
   *  // > CustomCode.jszip:4171
   * Error message, if [[Deflate.err]] != 0  // > CustomCode.jszip:4172
   **/  // > CustomCode.jszip:4173
  /**  // > CustomCode.jszip:4174
   * new Deflate(options)  // > CustomCode.jszip:4175
   * - options (Object): zlib deflate options.  // > CustomCode.jszip:4176
   *  // > CustomCode.jszip:4177
   * Creates new deflator instance with specified params. Throws exception  // > CustomCode.jszip:4178
   * on bad params. Supported options:  // > CustomCode.jszip:4179
   *  // > CustomCode.jszip:4180
   * - `level`  // > CustomCode.jszip:4181
   * - `windowBits`  // > CustomCode.jszip:4182
   * - `memLevel`  // > CustomCode.jszip:4183
   * - `strategy`  // > CustomCode.jszip:4184
   * - `dictionary`  // > CustomCode.jszip:4185
   *  // > CustomCode.jszip:4186
   * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)  // > CustomCode.jszip:4187
   * for more information on these.  // > CustomCode.jszip:4188
   *  // > CustomCode.jszip:4189
   * Additional options, for internal needs:  // > CustomCode.jszip:4190
   *  // > CustomCode.jszip:4191
   * - `chunkSize` - size of generated data chunks (16K by default)  // > CustomCode.jszip:4192
   * - `raw` (Boolean) - do raw deflate  // > CustomCode.jszip:4193
   * - `gzip` (Boolean) - create gzip wrapper  // > CustomCode.jszip:4194
   * - `to` (String) - if equal to 'string', then result will be "binary string"  // > CustomCode.jszip:4195
   *    (each char code [0..255])  // > CustomCode.jszip:4196
   * - `header` (Object) - custom header for gzip  // > CustomCode.jszip:4197
   *   - `text` (Boolean) - true if compressed data believed to be text  // > CustomCode.jszip:4198
   *   - `time` (Number) - modification time, unix timestamp  // > CustomCode.jszip:4199
   *   - `os` (Number) - operation system code  // > CustomCode.jszip:4200
   *   - `extra` (Array) - array of bytes with extra data (max 65536)  // > CustomCode.jszip:4201
   *   - `name` (String) - file name (binary string)  // > CustomCode.jszip:4202
   *   - `comment` (String) - comment (binary string)  // > CustomCode.jszip:4203
   *   - `hcrc` (Boolean) - true if header crc should be added  // > CustomCode.jszip:4204
   *  // > CustomCode.jszip:4205
   * ##### Example:  // > CustomCode.jszip:4206
   *  // > CustomCode.jszip:4207
   * ```javascript  // > CustomCode.jszip:4208
   * var pako = require('pako')  // > CustomCode.jszip:4209
   *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])  // > CustomCode.jszip:4210
   *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);  // > CustomCode.jszip:4211
   *  // > CustomCode.jszip:4212
   * var deflate = new pako.Deflate({ level: 3});  // > CustomCode.jszip:4213
   *  // > CustomCode.jszip:4214
   * deflate.push(chunk1, false);  // > CustomCode.jszip:4215
   * deflate.push(chunk2, true);  // true -> last chunk  // > CustomCode.jszip:4216
   *  // > CustomCode.jszip:4217
   * if (deflate.err) { throw new Error(deflate.err); }  // > CustomCode.jszip:4218
   *  // > CustomCode.jszip:4219
   * console.log(deflate.result);  // > CustomCode.jszip:4220
   * ```  // > CustomCode.jszip:4221
   **/  // > CustomCode.jszip:4222
  function Deflate(options) {  // > CustomCode.jszip:4223
    if (!(this instanceof Deflate)) return new Deflate(options);  // > CustomCode.jszip:4224
    this.options = utils.assign({  // > CustomCode.jszip:4225
      level: Z_DEFAULT_COMPRESSION,  // > CustomCode.jszip:4226
      method: Z_DEFLATED,  // > CustomCode.jszip:4227
      chunkSize: 16384,  // > CustomCode.jszip:4228
      windowBits: 15,  // > CustomCode.jszip:4229
      memLevel: 8,  // > CustomCode.jszip:4230
      strategy: Z_DEFAULT_STRATEGY,  // > CustomCode.jszip:4231
      to: ''  // > CustomCode.jszip:4232
    }, options || {});  // > CustomCode.jszip:4233
    var opt = this.options;  // > CustomCode.jszip:4234
    if (opt.raw && (opt.windowBits > 0)) {  // > CustomCode.jszip:4235
      opt.windowBits = -opt.windowBits;  // > CustomCode.jszip:4236
    }  // > CustomCode.jszip:4237
    else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {  // > CustomCode.jszip:4238
      opt.windowBits += 16;  // > CustomCode.jszip:4239
    }  // > CustomCode.jszip:4240
    this.err    = 0;      // error code, if happens (0 = Z_OK)  // > CustomCode.jszip:4241
    this.msg    = '';     // error message  // > CustomCode.jszip:4242
    this.ended  = false;  // used to avoid multiple onEnd() calls  // > CustomCode.jszip:4243
    this.chunks = [];     // chunks of compressed data  // > CustomCode.jszip:4244
    this.strm = new ZStream();  // > CustomCode.jszip:4245
    this.strm.avail_out = 0;  // > CustomCode.jszip:4246
    var status = zlib_deflate.deflateInit2(  // > CustomCode.jszip:4247
      this.strm,  // > CustomCode.jszip:4248
      opt.level,  // > CustomCode.jszip:4249
      opt.method,  // > CustomCode.jszip:4250
      opt.windowBits,  // > CustomCode.jszip:4251
      opt.memLevel,  // > CustomCode.jszip:4252
      opt.strategy  // > CustomCode.jszip:4253
    );  // > CustomCode.jszip:4254
    if (status !== Z_OK) {  // > CustomCode.jszip:4255
      throw new Error(msg[status]);  // > CustomCode.jszip:4256
    }  // > CustomCode.jszip:4257
    if (opt.header) {  // > CustomCode.jszip:4258
      zlib_deflate.deflateSetHeader(this.strm, opt.header);  // > CustomCode.jszip:4259
    }  // > CustomCode.jszip:4260
    if (opt.dictionary) {  // > CustomCode.jszip:4261
      var dict;  // > CustomCode.jszip:4262
      // Convert data if needed  // > CustomCode.jszip:4263
      if (typeof opt.dictionary === 'string') {  // > CustomCode.jszip:4264
        // If we need to compress text, change encoding to utf8.  // > CustomCode.jszip:4265
        dict = strings.string2buf(opt.dictionary);  // > CustomCode.jszip:4266
      } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {  // > CustomCode.jszip:4267
        dict = new Uint8Array(opt.dictionary);  // > CustomCode.jszip:4268
      } else {  // > CustomCode.jszip:4269
        dict = opt.dictionary;  // > CustomCode.jszip:4270
      }  // > CustomCode.jszip:4271
      status = zlib_deflate.deflateSetDictionary(this.strm, dict);  // > CustomCode.jszip:4272
      if (status !== Z_OK) {  // > CustomCode.jszip:4273
        throw new Error(msg[status]);  // > CustomCode.jszip:4274
      }  // > CustomCode.jszip:4275
      this._dict_set = true;  // > CustomCode.jszip:4276
    }  // > CustomCode.jszip:4277
  }  // > CustomCode.jszip:4278
  /**  // > CustomCode.jszip:4279
   * Deflate#push(data[, mode]) -> Boolean  // > CustomCode.jszip:4280
   * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be  // > CustomCode.jszip:4281
   *   converted to utf8 byte sequence.  // > CustomCode.jszip:4282
   * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.  // > CustomCode.jszip:4283
   *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.  // > CustomCode.jszip:4284
   *  // > CustomCode.jszip:4285
   * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with  // > CustomCode.jszip:4286
   * new compressed chunks. Returns `true` on success. The last data block must have  // > CustomCode.jszip:4287
   * mode Z_FINISH (or `true`). That will flush internal pending buffers and call  // > CustomCode.jszip:4288
   * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you  // > CustomCode.jszip:4289
   * can use mode Z_SYNC_FLUSH, keeping the compression context.  // > CustomCode.jszip:4290
   *  // > CustomCode.jszip:4291
   * On fail call [[Deflate#onEnd]] with error code and return false.  // > CustomCode.jszip:4292
   *  // > CustomCode.jszip:4293
   * We strongly recommend to use `Uint8Array` on input for best speed (output  // > CustomCode.jszip:4294
   * array format is detected automatically). Also, don't skip last param and always  // > CustomCode.jszip:4295
   * use the same type in your code (boolean or number). That will improve JS speed.  // > CustomCode.jszip:4296
   *  // > CustomCode.jszip:4297
   * For regular `Array`-s make sure all elements are [0..255].  // > CustomCode.jszip:4298
   *  // > CustomCode.jszip:4299
   * ##### Example  // > CustomCode.jszip:4300
   *  // > CustomCode.jszip:4301
   * ```javascript  // > CustomCode.jszip:4302
   * push(chunk, false); // push one of data chunks  // > CustomCode.jszip:4303
   * ...  // > CustomCode.jszip:4304
   * push(chunk, true);  // push last chunk  // > CustomCode.jszip:4305
   * ```  // > CustomCode.jszip:4306
   **/  // > CustomCode.jszip:4307
  Deflate.prototype.push = function (data, mode) {  // > CustomCode.jszip:4308
    var strm = this.strm;  // > CustomCode.jszip:4309
    var chunkSize = this.options.chunkSize;  // > CustomCode.jszip:4310
    var status, _mode;  // > CustomCode.jszip:4311
    if (this.ended) { return false; }  // > CustomCode.jszip:4312
    _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);  // > CustomCode.jszip:4313
    // Convert data if needed  // > CustomCode.jszip:4314
    if (typeof data === 'string') {  // > CustomCode.jszip:4315
      // If we need to compress text, change encoding to utf8.  // > CustomCode.jszip:4316
      strm.input = strings.string2buf(data);  // > CustomCode.jszip:4317
    } else if (toString.call(data) === '[object ArrayBuffer]') {  // > CustomCode.jszip:4318
      strm.input = new Uint8Array(data);  // > CustomCode.jszip:4319
    } else {  // > CustomCode.jszip:4320
      strm.input = data;  // > CustomCode.jszip:4321
    }  // > CustomCode.jszip:4322
    strm.next_in = 0;  // > CustomCode.jszip:4323
    strm.avail_in = strm.input.length;  // > CustomCode.jszip:4324
    do {  // > CustomCode.jszip:4325
      if (strm.avail_out === 0) {  // > CustomCode.jszip:4326
        strm.output = new utils.Buf8(chunkSize);  // > CustomCode.jszip:4327
        strm.next_out = 0;  // > CustomCode.jszip:4328
        strm.avail_out = chunkSize;  // > CustomCode.jszip:4329
      }  // > CustomCode.jszip:4330
      status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */  // > CustomCode.jszip:4331
      if (status !== Z_STREAM_END && status !== Z_OK) {  // > CustomCode.jszip:4332
        this.onEnd(status);  // > CustomCode.jszip:4333
        this.ended = true;  // > CustomCode.jszip:4334
        return false;  // > CustomCode.jszip:4335
      }  // > CustomCode.jszip:4336
      if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {  // > CustomCode.jszip:4337
        if (this.options.to === 'string') {  // > CustomCode.jszip:4338
          this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));  // > CustomCode.jszip:4339
        } else {  // > CustomCode.jszip:4340
          this.onData(utils.shrinkBuf(strm.output, strm.next_out));  // > CustomCode.jszip:4341
        }  // > CustomCode.jszip:4342
      }  // > CustomCode.jszip:4343
    } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);  // > CustomCode.jszip:4344
    // Finalize on the last chunk.  // > CustomCode.jszip:4345
    if (_mode === Z_FINISH) {  // > CustomCode.jszip:4346
      status = zlib_deflate.deflateEnd(this.strm);  // > CustomCode.jszip:4347
      this.onEnd(status);  // > CustomCode.jszip:4348
      this.ended = true;  // > CustomCode.jszip:4349
      return status === Z_OK;  // > CustomCode.jszip:4350
    }  // > CustomCode.jszip:4351
    // callback interim results if Z_SYNC_FLUSH.  // > CustomCode.jszip:4352
    if (_mode === Z_SYNC_FLUSH) {  // > CustomCode.jszip:4353
      this.onEnd(Z_OK);  // > CustomCode.jszip:4354
      strm.avail_out = 0;  // > CustomCode.jszip:4355
      return true;  // > CustomCode.jszip:4356
    }  // > CustomCode.jszip:4357
    return true;  // > CustomCode.jszip:4358
  };  // > CustomCode.jszip:4359
  /**  // > CustomCode.jszip:4360
   * Deflate#onData(chunk) -> Void  // > CustomCode.jszip:4361
   * - chunk (Uint8Array|Array|String): ouput data. Type of array depends  // > CustomCode.jszip:4362
   *   on js engine support. When string output requested, each chunk  // > CustomCode.jszip:4363
   *   will be string.  // > CustomCode.jszip:4364
   *  // > CustomCode.jszip:4365
   * By default, stores data blocks in `chunks[]` property and glue  // > CustomCode.jszip:4366
   * those in `onEnd`. Override this handler, if you need another behaviour.  // > CustomCode.jszip:4367
   **/  // > CustomCode.jszip:4368
  Deflate.prototype.onData = function (chunk) {  // > CustomCode.jszip:4369
    this.chunks.push(chunk);  // > CustomCode.jszip:4370
  };  // > CustomCode.jszip:4371
  /**  // > CustomCode.jszip:4372
   * Deflate#onEnd(status) -> Void  // > CustomCode.jszip:4373
   * - status (Number): deflate status. 0 (Z_OK) on success,  // > CustomCode.jszip:4374
   *   other if not.  // > CustomCode.jszip:4375
   *  // > CustomCode.jszip:4376
   * Called once after you tell deflate that the input stream is  // > CustomCode.jszip:4377
   * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)  // > CustomCode.jszip:4378
   * or if an error happened. By default - join collected chunks,  // > CustomCode.jszip:4379
   * free memory and fill `results` / `err` properties.  // > CustomCode.jszip:4380
   **/  // > CustomCode.jszip:4381
  Deflate.prototype.onEnd = function (status) {  // > CustomCode.jszip:4382
    // On success - join  // > CustomCode.jszip:4383
    if (status === Z_OK) {  // > CustomCode.jszip:4384
      if (this.options.to === 'string') {  // > CustomCode.jszip:4385
        this.result = this.chunks.join('');  // > CustomCode.jszip:4386
      } else {  // > CustomCode.jszip:4387
        this.result = utils.flattenChunks(this.chunks);  // > CustomCode.jszip:4388
      }  // > CustomCode.jszip:4389
    }  // > CustomCode.jszip:4390
    this.chunks = [];  // > CustomCode.jszip:4391
    this.err = status;  // > CustomCode.jszip:4392
    this.msg = this.strm.msg;  // > CustomCode.jszip:4393
  };  // > CustomCode.jszip:4394
  /**  // > CustomCode.jszip:4395
   * deflate(data[, options]) -> Uint8Array|Array|String  // > CustomCode.jszip:4396
   * - data (Uint8Array|Array|String): input data to compress.  // > CustomCode.jszip:4397
   * - options (Object): zlib deflate options.  // > CustomCode.jszip:4398
   *  // > CustomCode.jszip:4399
   * Compress `data` with deflate algorithm and `options`.  // > CustomCode.jszip:4400
   *  // > CustomCode.jszip:4401
   * Supported options are:  // > CustomCode.jszip:4402
   *  // > CustomCode.jszip:4403
   * - level  // > CustomCode.jszip:4404
   * - windowBits  // > CustomCode.jszip:4405
   * - memLevel  // > CustomCode.jszip:4406
   * - strategy  // > CustomCode.jszip:4407
   * - dictionary  // > CustomCode.jszip:4408
   *  // > CustomCode.jszip:4409
   * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)  // > CustomCode.jszip:4410
   * for more information on these.  // > CustomCode.jszip:4411
   *  // > CustomCode.jszip:4412
   * Sugar (options):  // > CustomCode.jszip:4413
   *  // > CustomCode.jszip:4414
   * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify  // > CustomCode.jszip:4415
   *   negative windowBits implicitly.  // > CustomCode.jszip:4416
   * - `to` (String) - if equal to 'string', then result will be "binary string"  // > CustomCode.jszip:4417
   *    (each char code [0..255])  // > CustomCode.jszip:4418
   *  // > CustomCode.jszip:4419
   * ##### Example:  // > CustomCode.jszip:4420
   *  // > CustomCode.jszip:4421
   * ```javascript  // > CustomCode.jszip:4422
   * var pako = require('pako')  // > CustomCode.jszip:4423
   *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);  // > CustomCode.jszip:4424
   *  // > CustomCode.jszip:4425
   * console.log(pako.deflate(data));  // > CustomCode.jszip:4426
   * ```  // > CustomCode.jszip:4427
   **/  // > CustomCode.jszip:4428
  function deflate(input, options) {  // > CustomCode.jszip:4429
    var deflator = new Deflate(options);  // > CustomCode.jszip:4430
    deflator.push(input, true);  // > CustomCode.jszip:4431
    // That will never happens, if you don't cheat with options :)  // > CustomCode.jszip:4432
    if (deflator.err) { throw deflator.msg || msg[deflator.err]; }  // > CustomCode.jszip:4433
    return deflator.result;  // > CustomCode.jszip:4434
  }  // > CustomCode.jszip:4435
  /**  // > CustomCode.jszip:4436
   * deflateRaw(data[, options]) -> Uint8Array|Array|String  // > CustomCode.jszip:4437
   * - data (Uint8Array|Array|String): input data to compress.  // > CustomCode.jszip:4438
   * - options (Object): zlib deflate options.  // > CustomCode.jszip:4439
   *  // > CustomCode.jszip:4440
   * The same as [[deflate]], but creates raw data, without wrapper  // > CustomCode.jszip:4441
   * (header and adler32 crc).  // > CustomCode.jszip:4442
   **/  // > CustomCode.jszip:4443
  function deflateRaw(input, options) {  // > CustomCode.jszip:4444
    options = options || {};  // > CustomCode.jszip:4445
    options.raw = true;  // > CustomCode.jszip:4446
    return deflate(input, options);  // > CustomCode.jszip:4447
  }  // > CustomCode.jszip:4448
  /**  // > CustomCode.jszip:4449
   * gzip(data[, options]) -> Uint8Array|Array|String  // > CustomCode.jszip:4450
   * - data (Uint8Array|Array|String): input data to compress.  // > CustomCode.jszip:4451
   * - options (Object): zlib deflate options.  // > CustomCode.jszip:4452
   *  // > CustomCode.jszip:4453
   * The same as [[deflate]], but create gzip wrapper instead of  // > CustomCode.jszip:4454
   * deflate one.  // > CustomCode.jszip:4455
   **/  // > CustomCode.jszip:4456
  function gzip(input, options) {  // > CustomCode.jszip:4457
    options = options || {};  // > CustomCode.jszip:4458
    options.gzip = true;  // > CustomCode.jszip:4459
    return deflate(input, options);  // > CustomCode.jszip:4460
  }  // > CustomCode.jszip:4461
  exports.Deflate = Deflate;  // > CustomCode.jszip:4462
  exports.deflate = deflate;  // > CustomCode.jszip:4463
  exports.deflateRaw = deflateRaw;  // > CustomCode.jszip:4464
  exports.gzip = gzip;  // > CustomCode.jszip:4465
  },{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(require,module,exports){  // > CustomCode.jszip:4466
  'use strict';  // > CustomCode.jszip:4467
  var zlib_inflate = require('./zlib/inflate');  // > CustomCode.jszip:4468
  var utils        = require('./utils/common');  // > CustomCode.jszip:4469
  var strings      = require('./utils/strings');  // > CustomCode.jszip:4470
  var c            = require('./zlib/constants');  // > CustomCode.jszip:4471
  var msg          = require('./zlib/messages');  // > CustomCode.jszip:4472
  var ZStream      = require('./zlib/zstream');  // > CustomCode.jszip:4473
  var GZheader     = require('./zlib/gzheader');  // > CustomCode.jszip:4474
  var toString = Object.prototype.toString;  // > CustomCode.jszip:4475
  /**  // > CustomCode.jszip:4476
   * class Inflate  // > CustomCode.jszip:4477
   *  // > CustomCode.jszip:4478
   * Generic JS-style wrapper for zlib calls. If you don't need  // > CustomCode.jszip:4479
   * streaming behaviour - use more simple functions: [[inflate]]  // > CustomCode.jszip:4480
   * and [[inflateRaw]].  // > CustomCode.jszip:4481
   **/  // > CustomCode.jszip:4482
  /* internal  // > CustomCode.jszip:4483
   * inflate.chunks -> Array  // > CustomCode.jszip:4484
   *  // > CustomCode.jszip:4485
   * Chunks of output data, if [[Inflate#onData]] not overriden.  // > CustomCode.jszip:4486
   **/  // > CustomCode.jszip:4487
  /**  // > CustomCode.jszip:4488
   * Inflate.result -> Uint8Array|Array|String  // > CustomCode.jszip:4489
   *  // > CustomCode.jszip:4490
   * Uncompressed result, generated by default [[Inflate#onData]]  // > CustomCode.jszip:4491
   * and [[Inflate#onEnd]] handlers. Filled after you push last chunk  // > CustomCode.jszip:4492
   * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you  // > CustomCode.jszip:4493
   * push a chunk with explicit flush (call [[Inflate#push]] with  // > CustomCode.jszip:4494
   * `Z_SYNC_FLUSH` param).  // > CustomCode.jszip:4495
   **/  // > CustomCode.jszip:4496
  /**  // > CustomCode.jszip:4497
   * Inflate.err -> Number  // > CustomCode.jszip:4498
   *  // > CustomCode.jszip:4499
   * Error code after inflate finished. 0 (Z_OK) on success.  // > CustomCode.jszip:4500
   * Should be checked if broken data possible.  // > CustomCode.jszip:4501
   **/  // > CustomCode.jszip:4502
  /**  // > CustomCode.jszip:4503
   * Inflate.msg -> String  // > CustomCode.jszip:4504
   *  // > CustomCode.jszip:4505
   * Error message, if [[Inflate.err]] != 0  // > CustomCode.jszip:4506
   **/  // > CustomCode.jszip:4507
  /**  // > CustomCode.jszip:4508
   * new Inflate(options)  // > CustomCode.jszip:4509
   * - options (Object): zlib inflate options.  // > CustomCode.jszip:4510
   *  // > CustomCode.jszip:4511
   * Creates new inflator instance with specified params. Throws exception  // > CustomCode.jszip:4512
   * on bad params. Supported options:  // > CustomCode.jszip:4513
   *  // > CustomCode.jszip:4514
   * - `windowBits`  // > CustomCode.jszip:4515
   * - `dictionary`  // > CustomCode.jszip:4516
   *  // > CustomCode.jszip:4517
   * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)  // > CustomCode.jszip:4518
   * for more information on these.  // > CustomCode.jszip:4519
   *  // > CustomCode.jszip:4520
   * Additional options, for internal needs:  // > CustomCode.jszip:4521
   *  // > CustomCode.jszip:4522
   * - `chunkSize` - size of generated data chunks (16K by default)  // > CustomCode.jszip:4523
   * - `raw` (Boolean) - do raw inflate  // > CustomCode.jszip:4524
   * - `to` (String) - if equal to 'string', then result will be converted  // > CustomCode.jszip:4525
   *   from utf8 to utf16 (javascript) string. When string output requested,  // > CustomCode.jszip:4526
   *   chunk length can differ from `chunkSize`, depending on content.  // > CustomCode.jszip:4527
   *  // > CustomCode.jszip:4528
   * By default, when no options set, autodetect deflate/gzip data format via  // > CustomCode.jszip:4529
   * wrapper header.  // > CustomCode.jszip:4530
   *  // > CustomCode.jszip:4531
   * ##### Example:  // > CustomCode.jszip:4532
   *  // > CustomCode.jszip:4533
   * ```javascript  // > CustomCode.jszip:4534
   * var pako = require('pako')  // > CustomCode.jszip:4535
   *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])  // > CustomCode.jszip:4536
   *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);  // > CustomCode.jszip:4537
   *  // > CustomCode.jszip:4538
   * var inflate = new pako.Inflate({ level: 3});  // > CustomCode.jszip:4539
   *  // > CustomCode.jszip:4540
   * inflate.push(chunk1, false);  // > CustomCode.jszip:4541
   * inflate.push(chunk2, true);  // true -> last chunk  // > CustomCode.jszip:4542
   *  // > CustomCode.jszip:4543
   * if (inflate.err) { throw new Error(inflate.err); }  // > CustomCode.jszip:4544
   *  // > CustomCode.jszip:4545
   * console.log(inflate.result);  // > CustomCode.jszip:4546
   * ```  // > CustomCode.jszip:4547
   **/  // > CustomCode.jszip:4548
  function Inflate(options) {  // > CustomCode.jszip:4549
    if (!(this instanceof Inflate)) return new Inflate(options);  // > CustomCode.jszip:4550
    this.options = utils.assign({  // > CustomCode.jszip:4551
      chunkSize: 16384,  // > CustomCode.jszip:4552
      windowBits: 0,  // > CustomCode.jszip:4553
      to: ''  // > CustomCode.jszip:4554
    }, options || {});  // > CustomCode.jszip:4555
    var opt = this.options;  // > CustomCode.jszip:4556
    // Force window size for `raw` data, if not set directly,  // > CustomCode.jszip:4557
    // because we have no header for autodetect.  // > CustomCode.jszip:4558
    if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {  // > CustomCode.jszip:4559
      opt.windowBits = -opt.windowBits;  // > CustomCode.jszip:4560
      if (opt.windowBits === 0) { opt.windowBits = -15; }  // > CustomCode.jszip:4561
    }  // > CustomCode.jszip:4562
    // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate  // > CustomCode.jszip:4563
    if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&  // > CustomCode.jszip:4564
        !(options && options.windowBits)) {  // > CustomCode.jszip:4565
      opt.windowBits += 32;  // > CustomCode.jszip:4566
    }  // > CustomCode.jszip:4567
    // Gzip header has no info about windows size, we can do autodetect only  // > CustomCode.jszip:4568
    // for deflate. So, if window size not set, force it to max when gzip possible  // > CustomCode.jszip:4569
    if ((opt.windowBits > 15) && (opt.windowBits < 48)) {  // > CustomCode.jszip:4570
      // bit 3 (16) -> gzipped data  // > CustomCode.jszip:4571
      // bit 4 (32) -> autodetect gzip/deflate  // > CustomCode.jszip:4572
      if ((opt.windowBits & 15) === 0) {  // > CustomCode.jszip:4573
        opt.windowBits |= 15;  // > CustomCode.jszip:4574
      }  // > CustomCode.jszip:4575
    }  // > CustomCode.jszip:4576
    this.err    = 0;      // error code, if happens (0 = Z_OK)  // > CustomCode.jszip:4577
    this.msg    = '';     // error message  // > CustomCode.jszip:4578
    this.ended  = false;  // used to avoid multiple onEnd() calls  // > CustomCode.jszip:4579
    this.chunks = [];     // chunks of compressed data  // > CustomCode.jszip:4580
    this.strm   = new ZStream();  // > CustomCode.jszip:4581
    this.strm.avail_out = 0;  // > CustomCode.jszip:4582
    var status  = zlib_inflate.inflateInit2(  // > CustomCode.jszip:4583
      this.strm,  // > CustomCode.jszip:4584
      opt.windowBits  // > CustomCode.jszip:4585
    );  // > CustomCode.jszip:4586
    if (status !== c.Z_OK) {  // > CustomCode.jszip:4587
      throw new Error(msg[status]);  // > CustomCode.jszip:4588
    }  // > CustomCode.jszip:4589
    this.header = new GZheader();  // > CustomCode.jszip:4590
    zlib_inflate.inflateGetHeader(this.strm, this.header);  // > CustomCode.jszip:4591
  }  // > CustomCode.jszip:4592
  /**  // > CustomCode.jszip:4593
   * Inflate#push(data[, mode]) -> Boolean  // > CustomCode.jszip:4594
   * - data (Uint8Array|Array|ArrayBuffer|String): input data  // > CustomCode.jszip:4595
   * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.  // > CustomCode.jszip:4596
   *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.  // > CustomCode.jszip:4597
   *  // > CustomCode.jszip:4598
   * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with  // > CustomCode.jszip:4599
   * new output chunks. Returns `true` on success. The last data block must have  // > CustomCode.jszip:4600
   * mode Z_FINISH (or `true`). That will flush internal pending buffers and call  // > CustomCode.jszip:4601
   * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you  // > CustomCode.jszip:4602
   * can use mode Z_SYNC_FLUSH, keeping the decompression context.  // > CustomCode.jszip:4603
   *  // > CustomCode.jszip:4604
   * On fail call [[Inflate#onEnd]] with error code and return false.  // > CustomCode.jszip:4605
   *  // > CustomCode.jszip:4606
   * We strongly recommend to use `Uint8Array` on input for best speed (output  // > CustomCode.jszip:4607
   * format is detected automatically). Also, don't skip last param and always  // > CustomCode.jszip:4608
   * use the same type in your code (boolean or number). That will improve JS speed.  // > CustomCode.jszip:4609
   *  // > CustomCode.jszip:4610
   * For regular `Array`-s make sure all elements are [0..255].  // > CustomCode.jszip:4611
   *  // > CustomCode.jszip:4612
   * ##### Example  // > CustomCode.jszip:4613
   *  // > CustomCode.jszip:4614
   * ```javascript  // > CustomCode.jszip:4615
   * push(chunk, false); // push one of data chunks  // > CustomCode.jszip:4616
   * ...  // > CustomCode.jszip:4617
   * push(chunk, true);  // push last chunk  // > CustomCode.jszip:4618
   * ```  // > CustomCode.jszip:4619
   **/  // > CustomCode.jszip:4620
  Inflate.prototype.push = function (data, mode) {  // > CustomCode.jszip:4621
    var strm = this.strm;  // > CustomCode.jszip:4622
    var chunkSize = this.options.chunkSize;  // > CustomCode.jszip:4623
    var dictionary = this.options.dictionary;  // > CustomCode.jszip:4624
    var status, _mode;  // > CustomCode.jszip:4625
    var next_out_utf8, tail, utf8str;  // > CustomCode.jszip:4626
    var dict;  // > CustomCode.jszip:4627
    // Flag to properly process Z_BUF_ERROR on testing inflate call  // > CustomCode.jszip:4628
    // when we check that all output data was flushed.  // > CustomCode.jszip:4629
    var allowBufError = false;  // > CustomCode.jszip:4630
    if (this.ended) { return false; }  // > CustomCode.jszip:4631
    _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);  // > CustomCode.jszip:4632
    // Convert data if needed  // > CustomCode.jszip:4633
    if (typeof data === 'string') {  // > CustomCode.jszip:4634
      // Only binary strings can be decompressed on practice  // > CustomCode.jszip:4635
      strm.input = strings.binstring2buf(data);  // > CustomCode.jszip:4636
    } else if (toString.call(data) === '[object ArrayBuffer]') {  // > CustomCode.jszip:4637
      strm.input = new Uint8Array(data);  // > CustomCode.jszip:4638
    } else {  // > CustomCode.jszip:4639
      strm.input = data;  // > CustomCode.jszip:4640
    }  // > CustomCode.jszip:4641
    strm.next_in = 0;  // > CustomCode.jszip:4642
    strm.avail_in = strm.input.length;  // > CustomCode.jszip:4643
    do {  // > CustomCode.jszip:4644
      if (strm.avail_out === 0) {  // > CustomCode.jszip:4645
        strm.output = new utils.Buf8(chunkSize);  // > CustomCode.jszip:4646
        strm.next_out = 0;  // > CustomCode.jszip:4647
        strm.avail_out = chunkSize;  // > CustomCode.jszip:4648
      }  // > CustomCode.jszip:4649
      status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */  // > CustomCode.jszip:4650
      if (status === c.Z_NEED_DICT && dictionary) {  // > CustomCode.jszip:4651
        // Convert data if needed  // > CustomCode.jszip:4652
        if (typeof dictionary === 'string') {  // > CustomCode.jszip:4653
          dict = strings.string2buf(dictionary);  // > CustomCode.jszip:4654
        } else if (toString.call(dictionary) === '[object ArrayBuffer]') {  // > CustomCode.jszip:4655
          dict = new Uint8Array(dictionary);  // > CustomCode.jszip:4656
        } else {  // > CustomCode.jszip:4657
          dict = dictionary;  // > CustomCode.jszip:4658
        }  // > CustomCode.jszip:4659
        status = zlib_inflate.inflateSetDictionary(this.strm, dict);  // > CustomCode.jszip:4660
      }  // > CustomCode.jszip:4661
      if (status === c.Z_BUF_ERROR && allowBufError === true) {  // > CustomCode.jszip:4662
        status = c.Z_OK;  // > CustomCode.jszip:4663
        allowBufError = false;  // > CustomCode.jszip:4664
      }  // > CustomCode.jszip:4665
      if (status !== c.Z_STREAM_END && status !== c.Z_OK) {  // > CustomCode.jszip:4666
        this.onEnd(status);  // > CustomCode.jszip:4667
        this.ended = true;  // > CustomCode.jszip:4668
        return false;  // > CustomCode.jszip:4669
      }  // > CustomCode.jszip:4670
      if (strm.next_out) {  // > CustomCode.jszip:4671
        if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {  // > CustomCode.jszip:4672
          if (this.options.to === 'string') {  // > CustomCode.jszip:4673
            next_out_utf8 = strings.utf8border(strm.output, strm.next_out);  // > CustomCode.jszip:4674
            tail = strm.next_out - next_out_utf8;  // > CustomCode.jszip:4675
            utf8str = strings.buf2string(strm.output, next_out_utf8);  // > CustomCode.jszip:4676
            // move tail  // > CustomCode.jszip:4677
            strm.next_out = tail;  // > CustomCode.jszip:4678
            strm.avail_out = chunkSize - tail;  // > CustomCode.jszip:4679
            if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }  // > CustomCode.jszip:4680
            this.onData(utf8str);  // > CustomCode.jszip:4681
          } else {  // > CustomCode.jszip:4682
            this.onData(utils.shrinkBuf(strm.output, strm.next_out));  // > CustomCode.jszip:4683
          }  // > CustomCode.jszip:4684
        }  // > CustomCode.jszip:4685
      }  // > CustomCode.jszip:4686
      // When no more input data, we should check that internal inflate buffers  // > CustomCode.jszip:4687
      // are flushed. The only way to do it when avail_out = 0 - run one more  // > CustomCode.jszip:4688
      // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.  // > CustomCode.jszip:4689
      // Here we set flag to process this error properly.  // > CustomCode.jszip:4690
      //  // > CustomCode.jszip:4691
      // NOTE. Deflate does not return error in this case and does not needs such  // > CustomCode.jszip:4692
      // logic.  // > CustomCode.jszip:4693
      if (strm.avail_in === 0 && strm.avail_out === 0) {  // > CustomCode.jszip:4694
        allowBufError = true;  // > CustomCode.jszip:4695
      }  // > CustomCode.jszip:4696
    } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);  // > CustomCode.jszip:4697
    if (status === c.Z_STREAM_END) {  // > CustomCode.jszip:4698
      _mode = c.Z_FINISH;  // > CustomCode.jszip:4699
    }  // > CustomCode.jszip:4700
    // Finalize on the last chunk.  // > CustomCode.jszip:4701
    if (_mode === c.Z_FINISH) {  // > CustomCode.jszip:4702
      status = zlib_inflate.inflateEnd(this.strm);  // > CustomCode.jszip:4703
      this.onEnd(status);  // > CustomCode.jszip:4704
      this.ended = true;  // > CustomCode.jszip:4705
      return status === c.Z_OK;  // > CustomCode.jszip:4706
    }  // > CustomCode.jszip:4707
    // callback interim results if Z_SYNC_FLUSH.  // > CustomCode.jszip:4708
    if (_mode === c.Z_SYNC_FLUSH) {  // > CustomCode.jszip:4709
      this.onEnd(c.Z_OK);  // > CustomCode.jszip:4710
      strm.avail_out = 0;  // > CustomCode.jszip:4711
      return true;  // > CustomCode.jszip:4712
    }  // > CustomCode.jszip:4713
    return true;  // > CustomCode.jszip:4714
  };  // > CustomCode.jszip:4715
  /**  // > CustomCode.jszip:4716
   * Inflate#onData(chunk) -> Void  // > CustomCode.jszip:4717
   * - chunk (Uint8Array|Array|String): ouput data. Type of array depends  // > CustomCode.jszip:4718
   *   on js engine support. When string output requested, each chunk  // > CustomCode.jszip:4719
   *   will be string.  // > CustomCode.jszip:4720
   *  // > CustomCode.jszip:4721
   * By default, stores data blocks in `chunks[]` property and glue  // > CustomCode.jszip:4722
   * those in `onEnd`. Override this handler, if you need another behaviour.  // > CustomCode.jszip:4723
   **/  // > CustomCode.jszip:4724
  Inflate.prototype.onData = function (chunk) {  // > CustomCode.jszip:4725
    this.chunks.push(chunk);  // > CustomCode.jszip:4726
  };  // > CustomCode.jszip:4727
  /**  // > CustomCode.jszip:4728
   * Inflate#onEnd(status) -> Void  // > CustomCode.jszip:4729
   * - status (Number): inflate status. 0 (Z_OK) on success,  // > CustomCode.jszip:4730
   *   other if not.  // > CustomCode.jszip:4731
   *  // > CustomCode.jszip:4732
   * Called either after you tell inflate that the input stream is  // > CustomCode.jszip:4733
   * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)  // > CustomCode.jszip:4734
   * or if an error happened. By default - join collected chunks,  // > CustomCode.jszip:4735
   * free memory and fill `results` / `err` properties.  // > CustomCode.jszip:4736
   **/  // > CustomCode.jszip:4737
  Inflate.prototype.onEnd = function (status) {  // > CustomCode.jszip:4738
    // On success - join  // > CustomCode.jszip:4739
    if (status === c.Z_OK) {  // > CustomCode.jszip:4740
      if (this.options.to === 'string') {  // > CustomCode.jszip:4741
        // Glue & convert here, until we teach pako to send  // > CustomCode.jszip:4742
        // utf8 alligned strings to onData  // > CustomCode.jszip:4743
        this.result = this.chunks.join('');  // > CustomCode.jszip:4744
      } else {  // > CustomCode.jszip:4745
        this.result = utils.flattenChunks(this.chunks);  // > CustomCode.jszip:4746
      }  // > CustomCode.jszip:4747
    }  // > CustomCode.jszip:4748
    this.chunks = [];  // > CustomCode.jszip:4749
    this.err = status;  // > CustomCode.jszip:4750
    this.msg = this.strm.msg;  // > CustomCode.jszip:4751
  };  // > CustomCode.jszip:4752
  /**  // > CustomCode.jszip:4753
   * inflate(data[, options]) -> Uint8Array|Array|String  // > CustomCode.jszip:4754
   * - data (Uint8Array|Array|String): input data to decompress.  // > CustomCode.jszip:4755
   * - options (Object): zlib inflate options.  // > CustomCode.jszip:4756
   *  // > CustomCode.jszip:4757
   * Decompress `data` with inflate/ungzip and `options`. Autodetect  // > CustomCode.jszip:4758
   * format via wrapper header by default. That's why we don't provide  // > CustomCode.jszip:4759
   * separate `ungzip` method.  // > CustomCode.jszip:4760
   *  // > CustomCode.jszip:4761
   * Supported options are:  // > CustomCode.jszip:4762
   *  // > CustomCode.jszip:4763
   * - windowBits  // > CustomCode.jszip:4764
   *  // > CustomCode.jszip:4765
   * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)  // > CustomCode.jszip:4766
   * for more information.  // > CustomCode.jszip:4767
   *  // > CustomCode.jszip:4768
   * Sugar (options):  // > CustomCode.jszip:4769
   *  // > CustomCode.jszip:4770
   * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify  // > CustomCode.jszip:4771
   *   negative windowBits implicitly.  // > CustomCode.jszip:4772
   * - `to` (String) - if equal to 'string', then result will be converted  // > CustomCode.jszip:4773
   *   from utf8 to utf16 (javascript) string. When string output requested,  // > CustomCode.jszip:4774
   *   chunk length can differ from `chunkSize`, depending on content.  // > CustomCode.jszip:4775
   *  // > CustomCode.jszip:4776
   *  // > CustomCode.jszip:4777
   * ##### Example:  // > CustomCode.jszip:4778
   *  // > CustomCode.jszip:4779
   * ```javascript  // > CustomCode.jszip:4780
   * var pako = require('pako')  // > CustomCode.jszip:4781
   *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])  // > CustomCode.jszip:4782
   *   , output;  // > CustomCode.jszip:4783
   *  // > CustomCode.jszip:4784
   * try {  // > CustomCode.jszip:4785
   *   output = pako.inflate(input);  // > CustomCode.jszip:4786
   * } catch (err)  // > CustomCode.jszip:4787
   *   console.log(err);  // > CustomCode.jszip:4788
   * }  // > CustomCode.jszip:4789
   * ```  // > CustomCode.jszip:4790
   **/  // > CustomCode.jszip:4791
  function inflate(input, options) {  // > CustomCode.jszip:4792
    var inflator = new Inflate(options);  // > CustomCode.jszip:4793
    inflator.push(input, true);  // > CustomCode.jszip:4794
    // That will never happens, if you don't cheat with options :)  // > CustomCode.jszip:4795
    if (inflator.err) { throw inflator.msg || msg[inflator.err]; }  // > CustomCode.jszip:4796
    return inflator.result;  // > CustomCode.jszip:4797
  }  // > CustomCode.jszip:4798
  /**  // > CustomCode.jszip:4799
   * inflateRaw(data[, options]) -> Uint8Array|Array|String  // > CustomCode.jszip:4800
   * - data (Uint8Array|Array|String): input data to decompress.  // > CustomCode.jszip:4801
   * - options (Object): zlib inflate options.  // > CustomCode.jszip:4802
   *  // > CustomCode.jszip:4803
   * The same as [[inflate]], but creates raw data, without wrapper  // > CustomCode.jszip:4804
   * (header and adler32 crc).  // > CustomCode.jszip:4805
   **/  // > CustomCode.jszip:4806
  function inflateRaw(input, options) {  // > CustomCode.jszip:4807
    options = options || {};  // > CustomCode.jszip:4808
    options.raw = true;  // > CustomCode.jszip:4809
    return inflate(input, options);  // > CustomCode.jszip:4810
  }  // > CustomCode.jszip:4811
  /**  // > CustomCode.jszip:4812
   * ungzip(data[, options]) -> Uint8Array|Array|String  // > CustomCode.jszip:4813
   * - data (Uint8Array|Array|String): input data to decompress.  // > CustomCode.jszip:4814
   * - options (Object): zlib inflate options.  // > CustomCode.jszip:4815
   *  // > CustomCode.jszip:4816
   * Just shortcut to [[inflate]], because it autodetects format  // > CustomCode.jszip:4817
   * by header.content. Done for convenience.  // > CustomCode.jszip:4818
   **/  // > CustomCode.jszip:4819
  exports.Inflate = Inflate;  // > CustomCode.jszip:4820
  exports.inflate = inflate;  // > CustomCode.jszip:4821
  exports.inflateRaw = inflateRaw;  // > CustomCode.jszip:4822
  exports.ungzip  = inflate;  // > CustomCode.jszip:4823
  },{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(require,module,exports){  // > CustomCode.jszip:4824
  'use strict';  // > CustomCode.jszip:4825
  var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&  // > CustomCode.jszip:4826
                  (typeof Uint16Array !== 'undefined') &&  // > CustomCode.jszip:4827
                  (typeof Int32Array !== 'undefined');  // > CustomCode.jszip:4828
  exports.assign = function (obj /*from1, from2, from3, ...*/) {  // > CustomCode.jszip:4829
    var sources = Array.prototype.slice.call(arguments, 1);  // > CustomCode.jszip:4830
    while (sources.length) {  // > CustomCode.jszip:4831
      var source = sources.shift();  // > CustomCode.jszip:4832
      if (!source) { continue; }  // > CustomCode.jszip:4833
      if (typeof source !== 'object') {  // > CustomCode.jszip:4834
        throw new TypeError(source + 'must be non-object');  // > CustomCode.jszip:4835
      }  // > CustomCode.jszip:4836
      for (var p in source) {  // > CustomCode.jszip:4837
        if (source.hasOwnProperty(p)) {  // > CustomCode.jszip:4838
          obj[p] = source[p];  // > CustomCode.jszip:4839
        }  // > CustomCode.jszip:4840
      }  // > CustomCode.jszip:4841
    }  // > CustomCode.jszip:4842
    return obj;  // > CustomCode.jszip:4843
  };  // > CustomCode.jszip:4844
  // reduce buffer size, avoiding mem copy  // > CustomCode.jszip:4845
  exports.shrinkBuf = function (buf, size) {  // > CustomCode.jszip:4846
    if (buf.length === size) { return buf; }  // > CustomCode.jszip:4847
    if (buf.subarray) { return buf.subarray(0, size); }  // > CustomCode.jszip:4848
    buf.length = size;  // > CustomCode.jszip:4849
    return buf;  // > CustomCode.jszip:4850
  };  // > CustomCode.jszip:4851
  var fnTyped = {  // > CustomCode.jszip:4852
    arraySet: function (dest, src, src_offs, len, dest_offs) {  // > CustomCode.jszip:4853
      if (src.subarray && dest.subarray) {  // > CustomCode.jszip:4854
        dest.set(src.subarray(src_offs, src_offs + len), dest_offs);  // > CustomCode.jszip:4855
        return;  // > CustomCode.jszip:4856
      }  // > CustomCode.jszip:4857
      // Fallback to ordinary array  // > CustomCode.jszip:4858
      for (var i = 0; i < len; i++) {  // > CustomCode.jszip:4859
        dest[dest_offs + i] = src[src_offs + i];  // > CustomCode.jszip:4860
      }  // > CustomCode.jszip:4861
    },  // > CustomCode.jszip:4862
    // Join array of chunks to single array.  // > CustomCode.jszip:4863
    flattenChunks: function (chunks) {  // > CustomCode.jszip:4864
      var i, l, len, pos, chunk, result;  // > CustomCode.jszip:4865
      // calculate data length  // > CustomCode.jszip:4866
      len = 0;  // > CustomCode.jszip:4867
      for (i = 0, l = chunks.length; i < l; i++) {  // > CustomCode.jszip:4868
        len += chunks[i].length;  // > CustomCode.jszip:4869
      }  // > CustomCode.jszip:4870
      // join chunks  // > CustomCode.jszip:4871
      result = new Uint8Array(len);  // > CustomCode.jszip:4872
      pos = 0;  // > CustomCode.jszip:4873
      for (i = 0, l = chunks.length; i < l; i++) {  // > CustomCode.jszip:4874
        chunk = chunks[i];  // > CustomCode.jszip:4875
        result.set(chunk, pos);  // > CustomCode.jszip:4876
        pos += chunk.length;  // > CustomCode.jszip:4877
      }  // > CustomCode.jszip:4878
      return result;  // > CustomCode.jszip:4879
    }  // > CustomCode.jszip:4880
  };  // > CustomCode.jszip:4881
  var fnUntyped = {  // > CustomCode.jszip:4882
    arraySet: function (dest, src, src_offs, len, dest_offs) {  // > CustomCode.jszip:4883
      for (var i = 0; i < len; i++) {  // > CustomCode.jszip:4884
        dest[dest_offs + i] = src[src_offs + i];  // > CustomCode.jszip:4885
      }  // > CustomCode.jszip:4886
    },  // > CustomCode.jszip:4887
    // Join array of chunks to single array.  // > CustomCode.jszip:4888
    flattenChunks: function (chunks) {  // > CustomCode.jszip:4889
      return [].concat.apply([], chunks);  // > CustomCode.jszip:4890
    }  // > CustomCode.jszip:4891
  };  // > CustomCode.jszip:4892
  // Enable/Disable typed arrays use, for testing  // > CustomCode.jszip:4893
  //  // > CustomCode.jszip:4894
  exports.setTyped = function (on) {  // > CustomCode.jszip:4895
    if (on) {  // > CustomCode.jszip:4896
      exports.Buf8  = Uint8Array;  // > CustomCode.jszip:4897
      exports.Buf16 = Uint16Array;  // > CustomCode.jszip:4898
      exports.Buf32 = Int32Array;  // > CustomCode.jszip:4899
      exports.assign(exports, fnTyped);  // > CustomCode.jszip:4900
    } else {  // > CustomCode.jszip:4901
      exports.Buf8  = Array;  // > CustomCode.jszip:4902
      exports.Buf16 = Array;  // > CustomCode.jszip:4903
      exports.Buf32 = Array;  // > CustomCode.jszip:4904
      exports.assign(exports, fnUntyped);  // > CustomCode.jszip:4905
    }  // > CustomCode.jszip:4906
  };  // > CustomCode.jszip:4907
  exports.setTyped(TYPED_OK);  // > CustomCode.jszip:4908
  },{}],42:[function(require,module,exports){  // > CustomCode.jszip:4909
  // String encode/decode helpers  // > CustomCode.jszip:4910
  'use strict';  // > CustomCode.jszip:4911
  var utils = require('./common');  // > CustomCode.jszip:4912
  // Quick check if we can use fast array to bin string conversion  // > CustomCode.jszip:4913
  //  // > CustomCode.jszip:4914
  // - apply(Array) can fail on Android 2.2  // > CustomCode.jszip:4915
  // - apply(Uint8Array) can fail on iOS 5.1 Safary  // > CustomCode.jszip:4916
  //  // > CustomCode.jszip:4917
  var STR_APPLY_OK = true;  // > CustomCode.jszip:4918
  var STR_APPLY_UIA_OK = true;  // > CustomCode.jszip:4919
  try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }  // > CustomCode.jszip:4920
  try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }  // > CustomCode.jszip:4921
  // Table with utf8 lengths (calculated by first byte of sequence)  // > CustomCode.jszip:4922
  // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,  // > CustomCode.jszip:4923
  // because max possible codepoint is 0x10ffff  // > CustomCode.jszip:4924
  var _utf8len = new utils.Buf8(256);  // > CustomCode.jszip:4925
  for (var q = 0; q < 256; q++) {  // > CustomCode.jszip:4926
    _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);  // > CustomCode.jszip:4927
  }  // > CustomCode.jszip:4928
  _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start  // > CustomCode.jszip:4929
  // convert string to array (typed, when possible)  // > CustomCode.jszip:4930
  exports.string2buf = function (str) {  // > CustomCode.jszip:4931
    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;  // > CustomCode.jszip:4932
    // count binary size  // > CustomCode.jszip:4933
    for (m_pos = 0; m_pos < str_len; m_pos++) {  // > CustomCode.jszip:4934
      c = str.charCodeAt(m_pos);  // > CustomCode.jszip:4935
      if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {  // > CustomCode.jszip:4936
        c2 = str.charCodeAt(m_pos + 1);  // > CustomCode.jszip:4937
        if ((c2 & 0xfc00) === 0xdc00) {  // > CustomCode.jszip:4938
          c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);  // > CustomCode.jszip:4939
          m_pos++;  // > CustomCode.jszip:4940
        }  // > CustomCode.jszip:4941
      }  // > CustomCode.jszip:4942
      buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;  // > CustomCode.jszip:4943
    }  // > CustomCode.jszip:4944
    // allocate buffer  // > CustomCode.jszip:4945
    buf = new utils.Buf8(buf_len);  // > CustomCode.jszip:4946
    // convert  // > CustomCode.jszip:4947
    for (i = 0, m_pos = 0; i < buf_len; m_pos++) {  // > CustomCode.jszip:4948
      c = str.charCodeAt(m_pos);  // > CustomCode.jszip:4949
      if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {  // > CustomCode.jszip:4950
        c2 = str.charCodeAt(m_pos + 1);  // > CustomCode.jszip:4951
        if ((c2 & 0xfc00) === 0xdc00) {  // > CustomCode.jszip:4952
          c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);  // > CustomCode.jszip:4953
          m_pos++;  // > CustomCode.jszip:4954
        }  // > CustomCode.jszip:4955
      }  // > CustomCode.jszip:4956
      if (c < 0x80) {  // > CustomCode.jszip:4957
        /* one byte */  // > CustomCode.jszip:4958
        buf[i++] = c;  // > CustomCode.jszip:4959
      } else if (c < 0x800) {  // > CustomCode.jszip:4960
        /* two bytes */  // > CustomCode.jszip:4961
        buf[i++] = 0xC0 | (c >>> 6);  // > CustomCode.jszip:4962
        buf[i++] = 0x80 | (c & 0x3f);  // > CustomCode.jszip:4963
      } else if (c < 0x10000) {  // > CustomCode.jszip:4964
        /* three bytes */  // > CustomCode.jszip:4965
        buf[i++] = 0xE0 | (c >>> 12);  // > CustomCode.jszip:4966
        buf[i++] = 0x80 | (c >>> 6 & 0x3f);  // > CustomCode.jszip:4967
        buf[i++] = 0x80 | (c & 0x3f);  // > CustomCode.jszip:4968
      } else {  // > CustomCode.jszip:4969
        /* four bytes */  // > CustomCode.jszip:4970
        buf[i++] = 0xf0 | (c >>> 18);  // > CustomCode.jszip:4971
        buf[i++] = 0x80 | (c >>> 12 & 0x3f);  // > CustomCode.jszip:4972
        buf[i++] = 0x80 | (c >>> 6 & 0x3f);  // > CustomCode.jszip:4973
        buf[i++] = 0x80 | (c & 0x3f);  // > CustomCode.jszip:4974
      }  // > CustomCode.jszip:4975
    }  // > CustomCode.jszip:4976
    return buf;  // > CustomCode.jszip:4977
  };  // > CustomCode.jszip:4978
  // Helper (used in 2 places)  // > CustomCode.jszip:4979
  function buf2binstring(buf, len) {  // > CustomCode.jszip:4980
    // use fallback for big arrays to avoid stack overflow  // > CustomCode.jszip:4981
    if (len < 65537) {  // > CustomCode.jszip:4982
      if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {  // > CustomCode.jszip:4983
        return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));  // > CustomCode.jszip:4984
      }  // > CustomCode.jszip:4985
    }  // > CustomCode.jszip:4986
    var result = '';  // > CustomCode.jszip:4987
    for (var i = 0; i < len; i++) {  // > CustomCode.jszip:4988
      result += String.fromCharCode(buf[i]);  // > CustomCode.jszip:4989
    }  // > CustomCode.jszip:4990
    return result;  // > CustomCode.jszip:4991
  }  // > CustomCode.jszip:4992
  // Convert byte array to binary string  // > CustomCode.jszip:4993
  exports.buf2binstring = function (buf) {  // > CustomCode.jszip:4994
    return buf2binstring(buf, buf.length);  // > CustomCode.jszip:4995
  };  // > CustomCode.jszip:4996
  // Convert binary string (typed, when possible)  // > CustomCode.jszip:4997
  exports.binstring2buf = function (str) {  // > CustomCode.jszip:4998
    var buf = new utils.Buf8(str.length);  // > CustomCode.jszip:4999
    for (var i = 0, len = buf.length; i < len; i++) {  // > CustomCode.jszip:5000
      buf[i] = str.charCodeAt(i);  // > CustomCode.jszip:5001
    }  // > CustomCode.jszip:5002
    return buf;  // > CustomCode.jszip:5003
  };  // > CustomCode.jszip:5004
  // convert array to string  // > CustomCode.jszip:5005
  exports.buf2string = function (buf, max) {  // > CustomCode.jszip:5006
    var i, out, c, c_len;  // > CustomCode.jszip:5007
    var len = max || buf.length;  // > CustomCode.jszip:5008
    // Reserve max possible length (2 words per char)  // > CustomCode.jszip:5009
    // NB: by unknown reasons, Array is significantly faster for  // > CustomCode.jszip:5010
    //     String.fromCharCode.apply than Uint16Array.  // > CustomCode.jszip:5011
    var utf16buf = new Array(len * 2);  // > CustomCode.jszip:5012
    for (out = 0, i = 0; i < len;) {  // > CustomCode.jszip:5013
      c = buf[i++];  // > CustomCode.jszip:5014
      // quick process ascii  // > CustomCode.jszip:5015
      if (c < 0x80) { utf16buf[out++] = c; continue; }  // > CustomCode.jszip:5016
      c_len = _utf8len[c];  // > CustomCode.jszip:5017
      // skip 5 & 6 byte codes  // > CustomCode.jszip:5018
      if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }  // > CustomCode.jszip:5019
      // apply mask on first byte  // > CustomCode.jszip:5020
      c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;  // > CustomCode.jszip:5021
      // join the rest  // > CustomCode.jszip:5022
      while (c_len > 1 && i < len) {  // > CustomCode.jszip:5023
        c = (c << 6) | (buf[i++] & 0x3f);  // > CustomCode.jszip:5024
        c_len--;  // > CustomCode.jszip:5025
      }  // > CustomCode.jszip:5026
      // terminated by end of string?  // > CustomCode.jszip:5027
      if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }  // > CustomCode.jszip:5028
      if (c < 0x10000) {  // > CustomCode.jszip:5029
        utf16buf[out++] = c;  // > CustomCode.jszip:5030
      } else {  // > CustomCode.jszip:5031
        c -= 0x10000;  // > CustomCode.jszip:5032
        utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);  // > CustomCode.jszip:5033
        utf16buf[out++] = 0xdc00 | (c & 0x3ff);  // > CustomCode.jszip:5034
      }  // > CustomCode.jszip:5035
    }  // > CustomCode.jszip:5036
    return buf2binstring(utf16buf, out);  // > CustomCode.jszip:5037
  };  // > CustomCode.jszip:5038
  // Calculate max possible position in utf8 buffer,  // > CustomCode.jszip:5039
  // that will not break sequence. If that's not possible  // > CustomCode.jszip:5040
  // - (very small limits) return max size as is.  // > CustomCode.jszip:5041
  //  // > CustomCode.jszip:5042
  // buf[] - utf8 bytes array  // > CustomCode.jszip:5043
  // max   - length limit (mandatory);  // > CustomCode.jszip:5044
  exports.utf8border = function (buf, max) {  // > CustomCode.jszip:5045
    var pos;  // > CustomCode.jszip:5046
    max = max || buf.length;  // > CustomCode.jszip:5047
    if (max > buf.length) { max = buf.length; }  // > CustomCode.jszip:5048
    // go back from last position, until start of sequence found  // > CustomCode.jszip:5049
    pos = max - 1;  // > CustomCode.jszip:5050
    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }  // > CustomCode.jszip:5051
    // Fuckup - very small and broken sequence,  // > CustomCode.jszip:5052
    // return max, because we should return something anyway.  // > CustomCode.jszip:5053
    if (pos < 0) { return max; }  // > CustomCode.jszip:5054
    // If we came to start of buffer - that means vuffer is too small,  // > CustomCode.jszip:5055
    // return max too.  // > CustomCode.jszip:5056
    if (pos === 0) { return max; }  // > CustomCode.jszip:5057
    return (pos + _utf8len[buf[pos]] > max) ? pos : max;  // > CustomCode.jszip:5058
  };  // > CustomCode.jszip:5059
  },{"./common":41}],43:[function(require,module,exports){  // > CustomCode.jszip:5060
  'use strict';  // > CustomCode.jszip:5061
  // Note: adler32 takes 12% for level 0 and 2% for level 6.  // > CustomCode.jszip:5062
  // It doesn't worth to make additional optimizationa as in original.  // > CustomCode.jszip:5063
  // Small size is preferable.  // > CustomCode.jszip:5064
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:5065
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:5066
  //  // > CustomCode.jszip:5067
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:5068
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:5069
  // arising from the use of this software.  // > CustomCode.jszip:5070
  //  // > CustomCode.jszip:5071
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:5072
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:5073
  // freely, subject to the following restrictions:  // > CustomCode.jszip:5074
  //  // > CustomCode.jszip:5075
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:5076
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:5077
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:5078
  //   appreciated but is not required.  // > CustomCode.jszip:5079
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:5080
  //   misrepresented as being the original software.  // > CustomCode.jszip:5081
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:5082
  function adler32(adler, buf, len, pos) {  // > CustomCode.jszip:5083
    var s1 = (adler & 0xffff) |0,  // > CustomCode.jszip:5084
        s2 = ((adler >>> 16) & 0xffff) |0,  // > CustomCode.jszip:5085
        n = 0;  // > CustomCode.jszip:5086
    while (len !== 0) {  // > CustomCode.jszip:5087
      // Set limit ~ twice less than 5552, to keep  // > CustomCode.jszip:5088
      // s2 in 31-bits, because we force signed ints.  // > CustomCode.jszip:5089
      // in other case %= will fail.  // > CustomCode.jszip:5090
      n = len > 2000 ? 2000 : len;  // > CustomCode.jszip:5091
      len -= n;  // > CustomCode.jszip:5092
      do {  // > CustomCode.jszip:5093
        s1 = (s1 + buf[pos++]) |0;  // > CustomCode.jszip:5094
        s2 = (s2 + s1) |0;  // > CustomCode.jszip:5095
      } while (--n);  // > CustomCode.jszip:5096
      s1 %= 65521;  // > CustomCode.jszip:5097
      s2 %= 65521;  // > CustomCode.jszip:5098
    }  // > CustomCode.jszip:5099
    return (s1 | (s2 << 16)) |0;  // > CustomCode.jszip:5100
  }  // > CustomCode.jszip:5101
  module.exports = adler32;  // > CustomCode.jszip:5102
  },{}],44:[function(require,module,exports){  // > CustomCode.jszip:5103
  'use strict';  // > CustomCode.jszip:5104
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:5105
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:5106
  //  // > CustomCode.jszip:5107
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:5108
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:5109
  // arising from the use of this software.  // > CustomCode.jszip:5110
  //  // > CustomCode.jszip:5111
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:5112
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:5113
  // freely, subject to the following restrictions:  // > CustomCode.jszip:5114
  //  // > CustomCode.jszip:5115
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:5116
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:5117
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:5118
  //   appreciated but is not required.  // > CustomCode.jszip:5119
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:5120
  //   misrepresented as being the original software.  // > CustomCode.jszip:5121
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:5122
  module.exports = {  // > CustomCode.jszip:5123
    /* Allowed flush values; see deflate() and inflate() below for details */  // > CustomCode.jszip:5124
    Z_NO_FLUSH:         0,  // > CustomCode.jszip:5125
    Z_PARTIAL_FLUSH:    1,  // > CustomCode.jszip:5126
    Z_SYNC_FLUSH:       2,  // > CustomCode.jszip:5127
    Z_FULL_FLUSH:       3,  // > CustomCode.jszip:5128
    Z_FINISH:           4,  // > CustomCode.jszip:5129
    Z_BLOCK:            5,  // > CustomCode.jszip:5130
    Z_TREES:            6,  // > CustomCode.jszip:5131
    /* Return codes for the compression/decompression functions. Negative values  // > CustomCode.jszip:5132
    * are errors, positive values are used for special but normal events.  // > CustomCode.jszip:5133
    */  // > CustomCode.jszip:5134
    Z_OK:               0,  // > CustomCode.jszip:5135
    Z_STREAM_END:       1,  // > CustomCode.jszip:5136
    Z_NEED_DICT:        2,  // > CustomCode.jszip:5137
    Z_ERRNO:           -1,  // > CustomCode.jszip:5138
    Z_STREAM_ERROR:    -2,  // > CustomCode.jszip:5139
    Z_DATA_ERROR:      -3,  // > CustomCode.jszip:5140
    //Z_MEM_ERROR:     -4,  // > CustomCode.jszip:5141
    Z_BUF_ERROR:       -5,  // > CustomCode.jszip:5142
    //Z_VERSION_ERROR: -6,  // > CustomCode.jszip:5143
    /* compression levels */  // > CustomCode.jszip:5144
    Z_NO_COMPRESSION:         0,  // > CustomCode.jszip:5145
    Z_BEST_SPEED:             1,  // > CustomCode.jszip:5146
    Z_BEST_COMPRESSION:       9,  // > CustomCode.jszip:5147
    Z_DEFAULT_COMPRESSION:   -1,  // > CustomCode.jszip:5148
    Z_FILTERED:               1,  // > CustomCode.jszip:5149
    Z_HUFFMAN_ONLY:           2,  // > CustomCode.jszip:5150
    Z_RLE:                    3,  // > CustomCode.jszip:5151
    Z_FIXED:                  4,  // > CustomCode.jszip:5152
    Z_DEFAULT_STRATEGY:       0,  // > CustomCode.jszip:5153
    /* Possible values of the data_type field (though see inflate()) */  // > CustomCode.jszip:5154
    Z_BINARY:                 0,  // > CustomCode.jszip:5155
    Z_TEXT:                   1,  // > CustomCode.jszip:5156
    //Z_ASCII:                1, // = Z_TEXT (deprecated)  // > CustomCode.jszip:5157
    Z_UNKNOWN:                2,  // > CustomCode.jszip:5158
    /* The deflate compression method */  // > CustomCode.jszip:5159
    Z_DEFLATED:               8  // > CustomCode.jszip:5160
    //Z_NULL:                 null // Use -1 or null inline, depending on var type  // > CustomCode.jszip:5161
  };  // > CustomCode.jszip:5162
  },{}],45:[function(require,module,exports){  // > CustomCode.jszip:5163
  'use strict';  // > CustomCode.jszip:5164
  // Note: we can't get significant speed boost here.  // > CustomCode.jszip:5165
  // So write code to minimize size - no pregenerated tables  // > CustomCode.jszip:5166
  // and array tools dependencies.  // > CustomCode.jszip:5167
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:5168
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:5169
  //  // > CustomCode.jszip:5170
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:5171
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:5172
  // arising from the use of this software.  // > CustomCode.jszip:5173
  //  // > CustomCode.jszip:5174
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:5175
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:5176
  // freely, subject to the following restrictions:  // > CustomCode.jszip:5177
  //  // > CustomCode.jszip:5178
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:5179
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:5180
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:5181
  //   appreciated but is not required.  // > CustomCode.jszip:5182
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:5183
  //   misrepresented as being the original software.  // > CustomCode.jszip:5184
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:5185
  // Use ordinary array, since untyped makes no boost here  // > CustomCode.jszip:5186
  function makeTable() {  // > CustomCode.jszip:5187
    var c, table = [];  // > CustomCode.jszip:5188
    for (var n = 0; n < 256; n++) {  // > CustomCode.jszip:5189
      c = n;  // > CustomCode.jszip:5190
      for (var k = 0; k < 8; k++) {  // > CustomCode.jszip:5191
        c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));  // > CustomCode.jszip:5192
      }  // > CustomCode.jszip:5193
      table[n] = c;  // > CustomCode.jszip:5194
    }  // > CustomCode.jszip:5195
    return table;  // > CustomCode.jszip:5196
  }  // > CustomCode.jszip:5197
  // Create table on load. Just 255 signed longs. Not a problem.  // > CustomCode.jszip:5198
  var crcTable = makeTable();  // > CustomCode.jszip:5199
  function crc32(crc, buf, len, pos) {  // > CustomCode.jszip:5200
    var t = crcTable,  // > CustomCode.jszip:5201
        end = pos + len;  // > CustomCode.jszip:5202
    crc ^= -1;  // > CustomCode.jszip:5203
    for (var i = pos; i < end; i++) {  // > CustomCode.jszip:5204
      crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];  // > CustomCode.jszip:5205
    }  // > CustomCode.jszip:5206
    return (crc ^ (-1)); // >>> 0;  // > CustomCode.jszip:5207
  }  // > CustomCode.jszip:5208
  module.exports = crc32;  // > CustomCode.jszip:5209
  },{}],46:[function(require,module,exports){  // > CustomCode.jszip:5210
  'use strict';  // > CustomCode.jszip:5211
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:5212
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:5213
  //  // > CustomCode.jszip:5214
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:5215
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:5216
  // arising from the use of this software.  // > CustomCode.jszip:5217
  //  // > CustomCode.jszip:5218
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:5219
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:5220
  // freely, subject to the following restrictions:  // > CustomCode.jszip:5221
  //  // > CustomCode.jszip:5222
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:5223
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:5224
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:5225
  //   appreciated but is not required.  // > CustomCode.jszip:5226
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:5227
  //   misrepresented as being the original software.  // > CustomCode.jszip:5228
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:5229
  var utils   = require('../utils/common');  // > CustomCode.jszip:5230
  var trees   = require('./trees');  // > CustomCode.jszip:5231
  var adler32 = require('./adler32');  // > CustomCode.jszip:5232
  var crc32   = require('./crc32');  // > CustomCode.jszip:5233
  var msg     = require('./messages');  // > CustomCode.jszip:5234
  /* Public constants ==========================================================*/  // > CustomCode.jszip:5235
  /* ===========================================================================*/  // > CustomCode.jszip:5236
  /* Allowed flush values; see deflate() and inflate() below for details */  // > CustomCode.jszip:5237
  var Z_NO_FLUSH      = 0;  // > CustomCode.jszip:5238
  var Z_PARTIAL_FLUSH = 1;  // > CustomCode.jszip:5239
  //var Z_SYNC_FLUSH    = 2;  // > CustomCode.jszip:5240
  var Z_FULL_FLUSH    = 3;  // > CustomCode.jszip:5241
  var Z_FINISH        = 4;  // > CustomCode.jszip:5242
  var Z_BLOCK         = 5;  // > CustomCode.jszip:5243
  //var Z_TREES         = 6;  // > CustomCode.jszip:5244
  /* Return codes for the compression/decompression functions. Negative values  // > CustomCode.jszip:5245
   * are errors, positive values are used for special but normal events.  // > CustomCode.jszip:5246
   */  // > CustomCode.jszip:5247
  var Z_OK            = 0;  // > CustomCode.jszip:5248
  var Z_STREAM_END    = 1;  // > CustomCode.jszip:5249
  //var Z_NEED_DICT     = 2;  // > CustomCode.jszip:5250
  //var Z_ERRNO         = -1;  // > CustomCode.jszip:5251
  var Z_STREAM_ERROR  = -2;  // > CustomCode.jszip:5252
  var Z_DATA_ERROR    = -3;  // > CustomCode.jszip:5253
  //var Z_MEM_ERROR     = -4;  // > CustomCode.jszip:5254
  var Z_BUF_ERROR     = -5;  // > CustomCode.jszip:5255
  //var Z_VERSION_ERROR = -6;  // > CustomCode.jszip:5256
  /* compression levels */  // > CustomCode.jszip:5257
  //var Z_NO_COMPRESSION      = 0;  // > CustomCode.jszip:5258
  //var Z_BEST_SPEED          = 1;  // > CustomCode.jszip:5259
  //var Z_BEST_COMPRESSION    = 9;  // > CustomCode.jszip:5260
  var Z_DEFAULT_COMPRESSION = -1;  // > CustomCode.jszip:5261
  var Z_FILTERED            = 1;  // > CustomCode.jszip:5262
  var Z_HUFFMAN_ONLY        = 2;  // > CustomCode.jszip:5263
  var Z_RLE                 = 3;  // > CustomCode.jszip:5264
  var Z_FIXED               = 4;  // > CustomCode.jszip:5265
  var Z_DEFAULT_STRATEGY    = 0;  // > CustomCode.jszip:5266
  /* Possible values of the data_type field (though see inflate()) */  // > CustomCode.jszip:5267
  //var Z_BINARY              = 0;  // > CustomCode.jszip:5268
  //var Z_TEXT                = 1;  // > CustomCode.jszip:5269
  //var Z_ASCII               = 1; // = Z_TEXT  // > CustomCode.jszip:5270
  var Z_UNKNOWN             = 2;  // > CustomCode.jszip:5271
  /* The deflate compression method */  // > CustomCode.jszip:5272
  var Z_DEFLATED  = 8;  // > CustomCode.jszip:5273
  /*============================================================================*/  // > CustomCode.jszip:5274
  var MAX_MEM_LEVEL = 9;  // > CustomCode.jszip:5275
  /* Maximum value for memLevel in deflateInit2 */  // > CustomCode.jszip:5276
  var MAX_WBITS = 15;  // > CustomCode.jszip:5277
  /* 32K LZ77 window */  // > CustomCode.jszip:5278
  var DEF_MEM_LEVEL = 8;  // > CustomCode.jszip:5279
  var LENGTH_CODES  = 29;  // > CustomCode.jszip:5280
  /* number of length codes, not counting the special END_BLOCK code */  // > CustomCode.jszip:5281
  var LITERALS      = 256;  // > CustomCode.jszip:5282
  /* number of literal bytes 0..255 */  // > CustomCode.jszip:5283
  var L_CODES       = LITERALS + 1 + LENGTH_CODES;  // > CustomCode.jszip:5284
  /* number of Literal or Length codes, including the END_BLOCK code */  // > CustomCode.jszip:5285
  var D_CODES       = 30;  // > CustomCode.jszip:5286
  /* number of distance codes */  // > CustomCode.jszip:5287
  var BL_CODES      = 19;  // > CustomCode.jszip:5288
  /* number of codes used to transfer the bit lengths */  // > CustomCode.jszip:5289
  var HEAP_SIZE     = 2 * L_CODES + 1;  // > CustomCode.jszip:5290
  /* maximum heap size */  // > CustomCode.jszip:5291
  var MAX_BITS  = 15;  // > CustomCode.jszip:5292
  /* All codes must not exceed MAX_BITS bits */  // > CustomCode.jszip:5293
  var MIN_MATCH = 3;  // > CustomCode.jszip:5294
  var MAX_MATCH = 258;  // > CustomCode.jszip:5295
  var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);  // > CustomCode.jszip:5296
  var PRESET_DICT = 0x20;  // > CustomCode.jszip:5297
  var INIT_STATE = 42;  // > CustomCode.jszip:5298
  var EXTRA_STATE = 69;  // > CustomCode.jszip:5299
  var NAME_STATE = 73;  // > CustomCode.jszip:5300
  var COMMENT_STATE = 91;  // > CustomCode.jszip:5301
  var HCRC_STATE = 103;  // > CustomCode.jszip:5302
  var BUSY_STATE = 113;  // > CustomCode.jszip:5303
  var FINISH_STATE = 666;  // > CustomCode.jszip:5304
  var BS_NEED_MORE      = 1; /* block not completed, need more input or more output */  // > CustomCode.jszip:5305
  var BS_BLOCK_DONE     = 2; /* block flush performed */  // > CustomCode.jszip:5306
  var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */  // > CustomCode.jszip:5307
  var BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */  // > CustomCode.jszip:5308
  var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.  // > CustomCode.jszip:5309
  function err(strm, errorCode) {  // > CustomCode.jszip:5310
    strm.msg = msg[errorCode];  // > CustomCode.jszip:5311
    return errorCode;  // > CustomCode.jszip:5312
  }  // > CustomCode.jszip:5313
  function rank(f) {  // > CustomCode.jszip:5314
    return ((f) << 1) - ((f) > 4 ? 9 : 0);  // > CustomCode.jszip:5315
  }  // > CustomCode.jszip:5316
  function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }  // > CustomCode.jszip:5317
  /* =========================================================================  // > CustomCode.jszip:5318
   * Flush as much pending output as possible. All deflate() output goes  // > CustomCode.jszip:5319
   * through this function so some applications may wish to modify it  // > CustomCode.jszip:5320
   * to avoid allocating a large strm->output buffer and copying into it.  // > CustomCode.jszip:5321
   * (See also read_buf()).  // > CustomCode.jszip:5322
   */  // > CustomCode.jszip:5323
  function flush_pending(strm) {  // > CustomCode.jszip:5324
    var s = strm.state;  // > CustomCode.jszip:5325
    //_tr_flush_bits(s);  // > CustomCode.jszip:5326
    var len = s.pending;  // > CustomCode.jszip:5327
    if (len > strm.avail_out) {  // > CustomCode.jszip:5328
      len = strm.avail_out;  // > CustomCode.jszip:5329
    }  // > CustomCode.jszip:5330
    if (len === 0) { return; }  // > CustomCode.jszip:5331
    utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);  // > CustomCode.jszip:5332
    strm.next_out += len;  // > CustomCode.jszip:5333
    s.pending_out += len;  // > CustomCode.jszip:5334
    strm.total_out += len;  // > CustomCode.jszip:5335
    strm.avail_out -= len;  // > CustomCode.jszip:5336
    s.pending -= len;  // > CustomCode.jszip:5337
    if (s.pending === 0) {  // > CustomCode.jszip:5338
      s.pending_out = 0;  // > CustomCode.jszip:5339
    }  // > CustomCode.jszip:5340
  }  // > CustomCode.jszip:5341
  function flush_block_only(s, last) {  // > CustomCode.jszip:5342
    trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);  // > CustomCode.jszip:5343
    s.block_start = s.strstart;  // > CustomCode.jszip:5344
    flush_pending(s.strm);  // > CustomCode.jszip:5345
  }  // > CustomCode.jszip:5346
  function put_byte(s, b) {  // > CustomCode.jszip:5347
    s.pending_buf[s.pending++] = b;  // > CustomCode.jszip:5348
  }  // > CustomCode.jszip:5349
  /* =========================================================================  // > CustomCode.jszip:5350
   * Put a short in the pending buffer. The 16-bit value is put in MSB order.  // > CustomCode.jszip:5351
   * IN assertion: the stream state is correct and there is enough room in  // > CustomCode.jszip:5352
   * pending_buf.  // > CustomCode.jszip:5353
   */  // > CustomCode.jszip:5354
  function putShortMSB(s, b) {  // > CustomCode.jszip:5355
  //  put_byte(s, (Byte)(b >> 8));  // > CustomCode.jszip:5356
  //  put_byte(s, (Byte)(b & 0xff));  // > CustomCode.jszip:5357
    s.pending_buf[s.pending++] = (b >>> 8) & 0xff;  // > CustomCode.jszip:5358
    s.pending_buf[s.pending++] = b & 0xff;  // > CustomCode.jszip:5359
  }  // > CustomCode.jszip:5360
  /* ===========================================================================  // > CustomCode.jszip:5361
   * Read a new buffer from the current input stream, update the adler32  // > CustomCode.jszip:5362
   * and total number of bytes read.  All deflate() input goes through  // > CustomCode.jszip:5363
   * this function so some applications may wish to modify it to avoid  // > CustomCode.jszip:5364
   * allocating a large strm->input buffer and copying from it.  // > CustomCode.jszip:5365
   * (See also flush_pending()).  // > CustomCode.jszip:5366
   */  // > CustomCode.jszip:5367
  function read_buf(strm, buf, start, size) {  // > CustomCode.jszip:5368
    var len = strm.avail_in;  // > CustomCode.jszip:5369
    if (len > size) { len = size; }  // > CustomCode.jszip:5370
    if (len === 0) { return 0; }  // > CustomCode.jszip:5371
    strm.avail_in -= len;  // > CustomCode.jszip:5372
    // zmemcpy(buf, strm->next_in, len);  // > CustomCode.jszip:5373
    utils.arraySet(buf, strm.input, strm.next_in, len, start);  // > CustomCode.jszip:5374
    if (strm.state.wrap === 1) {  // > CustomCode.jszip:5375
      strm.adler = adler32(strm.adler, buf, len, start);  // > CustomCode.jszip:5376
    }  // > CustomCode.jszip:5377
    else if (strm.state.wrap === 2) {  // > CustomCode.jszip:5378
      strm.adler = crc32(strm.adler, buf, len, start);  // > CustomCode.jszip:5379
    }  // > CustomCode.jszip:5380
    strm.next_in += len;  // > CustomCode.jszip:5381
    strm.total_in += len;  // > CustomCode.jszip:5382
    return len;  // > CustomCode.jszip:5383
  }  // > CustomCode.jszip:5384
  /* ===========================================================================  // > CustomCode.jszip:5385
   * Set match_start to the longest match starting at the given string and  // > CustomCode.jszip:5386
   * return its length. Matches shorter or equal to prev_length are discarded,  // > CustomCode.jszip:5387
   * in which case the result is equal to prev_length and match_start is  // > CustomCode.jszip:5388
   * garbage.  // > CustomCode.jszip:5389
   * IN assertions: cur_match is the head of the hash chain for the current  // > CustomCode.jszip:5390
   *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1  // > CustomCode.jszip:5391
   * OUT assertion: the match length is not greater than s->lookahead.  // > CustomCode.jszip:5392
   */  // > CustomCode.jszip:5393
  function longest_match(s, cur_match) {  // > CustomCode.jszip:5394
    var chain_length = s.max_chain_length;      /* max hash chain length */  // > CustomCode.jszip:5395
    var scan = s.strstart; /* current string */  // > CustomCode.jszip:5396
    var match;                       /* matched string */  // > CustomCode.jszip:5397
    var len;                           /* length of current match */  // > CustomCode.jszip:5398
    var best_len = s.prev_length;              /* best match length so far */  // > CustomCode.jszip:5399
    var nice_match = s.nice_match;             /* stop if match long enough */  // > CustomCode.jszip:5400
    var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?  // > CustomCode.jszip:5401
        s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;  // > CustomCode.jszip:5402
    var _win = s.window; // shortcut  // > CustomCode.jszip:5403
    var wmask = s.w_mask;  // > CustomCode.jszip:5404
    var prev  = s.prev;  // > CustomCode.jszip:5405
    /* Stop when cur_match becomes <= limit. To simplify the code,  // > CustomCode.jszip:5406
     * we prevent matches with the string of window index 0.  // > CustomCode.jszip:5407
     */  // > CustomCode.jszip:5408
    var strend = s.strstart + MAX_MATCH;  // > CustomCode.jszip:5409
    var scan_end1  = _win[scan + best_len - 1];  // > CustomCode.jszip:5410
    var scan_end   = _win[scan + best_len];  // > CustomCode.jszip:5411
    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.  // > CustomCode.jszip:5412
     * It is easy to get rid of this optimization if necessary.  // > CustomCode.jszip:5413
     */  // > CustomCode.jszip:5414
    // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");  // > CustomCode.jszip:5415
    /* Do not waste too much time if we already have a good match: */  // > CustomCode.jszip:5416
    if (s.prev_length >= s.good_match) {  // > CustomCode.jszip:5417
      chain_length >>= 2;  // > CustomCode.jszip:5418
    }  // > CustomCode.jszip:5419
    /* Do not look for matches beyond the end of the input. This is necessary  // > CustomCode.jszip:5420
     * to make deflate deterministic.  // > CustomCode.jszip:5421
     */  // > CustomCode.jszip:5422
    if (nice_match > s.lookahead) { nice_match = s.lookahead; }  // > CustomCode.jszip:5423
    // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");  // > CustomCode.jszip:5424
    do {  // > CustomCode.jszip:5425
      // Assert(cur_match < s->strstart, "no future");  // > CustomCode.jszip:5426
      match = cur_match;  // > CustomCode.jszip:5427
      /* Skip to next match if the match length cannot increase  // > CustomCode.jszip:5428
       * or if the match length is less than 2.  Note that the checks below  // > CustomCode.jszip:5429
       * for insufficient lookahead only occur occasionally for performance  // > CustomCode.jszip:5430
       * reasons.  Therefore uninitialized memory will be accessed, and  // > CustomCode.jszip:5431
       * conditional jumps will be made that depend on those values.  // > CustomCode.jszip:5432
       * However the length of the match is limited to the lookahead, so  // > CustomCode.jszip:5433
       * the output of deflate is not affected by the uninitialized values.  // > CustomCode.jszip:5434
       */  // > CustomCode.jszip:5435
      if (_win[match + best_len]     !== scan_end  ||  // > CustomCode.jszip:5436
          _win[match + best_len - 1] !== scan_end1 ||  // > CustomCode.jszip:5437
          _win[match]                !== _win[scan] ||  // > CustomCode.jszip:5438
          _win[++match]              !== _win[scan + 1]) {  // > CustomCode.jszip:5439
        continue;  // > CustomCode.jszip:5440
      }  // > CustomCode.jszip:5441
      /* The check at best_len-1 can be removed because it will be made  // > CustomCode.jszip:5442
       * again later. (This heuristic is not always a win.)  // > CustomCode.jszip:5443
       * It is not necessary to compare scan[2] and match[2] since they  // > CustomCode.jszip:5444
       * are always equal when the other bytes match, given that  // > CustomCode.jszip:5445
       * the hash keys are equal and that HASH_BITS >= 8.  // > CustomCode.jszip:5446
       */  // > CustomCode.jszip:5447
      scan += 2;  // > CustomCode.jszip:5448
      match++;  // > CustomCode.jszip:5449
      // Assert(*scan == *match, "match[2]?");  // > CustomCode.jszip:5450
      /* We check for insufficient lookahead only every 8th comparison;  // > CustomCode.jszip:5451
       * the 256th check will be made at strstart+258.  // > CustomCode.jszip:5452
       */  // > CustomCode.jszip:5453
      do {  // > CustomCode.jszip:5454
        /*jshint noempty:false*/  // > CustomCode.jszip:5455
      } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&  // > CustomCode.jszip:5456
               _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&  // > CustomCode.jszip:5457
               _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&  // > CustomCode.jszip:5458
               _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&  // > CustomCode.jszip:5459
               scan < strend);  // > CustomCode.jszip:5460
      // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");  // > CustomCode.jszip:5461
      len = MAX_MATCH - (strend - scan);  // > CustomCode.jszip:5462
      scan = strend - MAX_MATCH;  // > CustomCode.jszip:5463
      if (len > best_len) {  // > CustomCode.jszip:5464
        s.match_start = cur_match;  // > CustomCode.jszip:5465
        best_len = len;  // > CustomCode.jszip:5466
        if (len >= nice_match) {  // > CustomCode.jszip:5467
          break;  // > CustomCode.jszip:5468
        }  // > CustomCode.jszip:5469
        scan_end1  = _win[scan + best_len - 1];  // > CustomCode.jszip:5470
        scan_end   = _win[scan + best_len];  // > CustomCode.jszip:5471
      }  // > CustomCode.jszip:5472
    } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);  // > CustomCode.jszip:5473
    if (best_len <= s.lookahead) {  // > CustomCode.jszip:5474
      return best_len;  // > CustomCode.jszip:5475
    }  // > CustomCode.jszip:5476
    return s.lookahead;  // > CustomCode.jszip:5477
  }  // > CustomCode.jszip:5478
  /* ===========================================================================  // > CustomCode.jszip:5479
   * Fill the window when the lookahead becomes insufficient.  // > CustomCode.jszip:5480
   * Updates strstart and lookahead.  // > CustomCode.jszip:5481
   *  // > CustomCode.jszip:5482
   * IN assertion: lookahead < MIN_LOOKAHEAD  // > CustomCode.jszip:5483
   * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD  // > CustomCode.jszip:5484
   *    At least one byte has been read, or avail_in == 0; reads are  // > CustomCode.jszip:5485
   *    performed for at least two bytes (required for the zip translate_eol  // > CustomCode.jszip:5486
   *    option -- not supported here).  // > CustomCode.jszip:5487
   */  // > CustomCode.jszip:5488
  function fill_window(s) {  // > CustomCode.jszip:5489
    var _w_size = s.w_size;  // > CustomCode.jszip:5490
    var p, n, m, more, str;  // > CustomCode.jszip:5491
    //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");  // > CustomCode.jszip:5492
    do {  // > CustomCode.jszip:5493
      more = s.window_size - s.lookahead - s.strstart;  // > CustomCode.jszip:5494
      // JS ints have 32 bit, block below not needed  // > CustomCode.jszip:5495
      /* Deal with !@#$% 64K limit: */  // > CustomCode.jszip:5496
      //if (sizeof(int) <= 2) {  // > CustomCode.jszip:5497
      //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {  // > CustomCode.jszip:5498
      //        more = wsize;  // > CustomCode.jszip:5499
      //  // > CustomCode.jszip:5500
      //  } else if (more == (unsigned)(-1)) {  // > CustomCode.jszip:5501
      //        /* Very unlikely, but possible on 16 bit machine if  // > CustomCode.jszip:5502
      //         * strstart == 0 && lookahead == 1 (input done a byte at time)  // > CustomCode.jszip:5503
      //         */  // > CustomCode.jszip:5504
      //        more--;  // > CustomCode.jszip:5505
      //    }  // > CustomCode.jszip:5506
      //}  // > CustomCode.jszip:5507
      /* If the window is almost full and there is insufficient lookahead,  // > CustomCode.jszip:5508
       * move the upper half to the lower one to make room in the upper half.  // > CustomCode.jszip:5509
       */  // > CustomCode.jszip:5510
      if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {  // > CustomCode.jszip:5511
        utils.arraySet(s.window, s.window, _w_size, _w_size, 0);  // > CustomCode.jszip:5512
        s.match_start -= _w_size;  // > CustomCode.jszip:5513
        s.strstart -= _w_size;  // > CustomCode.jszip:5514
        /* we now have strstart >= MAX_DIST */  // > CustomCode.jszip:5515
        s.block_start -= _w_size;  // > CustomCode.jszip:5516
        /* Slide the hash table (could be avoided with 32 bit values  // > CustomCode.jszip:5517
         at the expense of memory usage). We slide even when level == 0  // > CustomCode.jszip:5518
         to keep the hash table consistent if we switch back to level > 0  // > CustomCode.jszip:5519
         later. (Using level 0 permanently is not an optimal usage of  // > CustomCode.jszip:5520
         zlib, so we don't care about this pathological case.)  // > CustomCode.jszip:5521
         */  // > CustomCode.jszip:5522
        n = s.hash_size;  // > CustomCode.jszip:5523
        p = n;  // > CustomCode.jszip:5524
        do {  // > CustomCode.jszip:5525
          m = s.head[--p];  // > CustomCode.jszip:5526
          s.head[p] = (m >= _w_size ? m - _w_size : 0);  // > CustomCode.jszip:5527
        } while (--n);  // > CustomCode.jszip:5528
        n = _w_size;  // > CustomCode.jszip:5529
        p = n;  // > CustomCode.jszip:5530
        do {  // > CustomCode.jszip:5531
          m = s.prev[--p];  // > CustomCode.jszip:5532
          s.prev[p] = (m >= _w_size ? m - _w_size : 0);  // > CustomCode.jszip:5533
          /* If n is not on any hash chain, prev[n] is garbage but  // > CustomCode.jszip:5534
           * its value will never be used.  // > CustomCode.jszip:5535
           */  // > CustomCode.jszip:5536
        } while (--n);  // > CustomCode.jszip:5537
        more += _w_size;  // > CustomCode.jszip:5538
      }  // > CustomCode.jszip:5539
      if (s.strm.avail_in === 0) {  // > CustomCode.jszip:5540
        break;  // > CustomCode.jszip:5541
      }  // > CustomCode.jszip:5542
      /* If there was no sliding:  // > CustomCode.jszip:5543
       *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&  // > CustomCode.jszip:5544
       *    more == window_size - lookahead - strstart  // > CustomCode.jszip:5545
       * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)  // > CustomCode.jszip:5546
       * => more >= window_size - 2*WSIZE + 2  // > CustomCode.jszip:5547
       * In the BIG_MEM or MMAP case (not yet supported),  // > CustomCode.jszip:5548
       *   window_size == input_size + MIN_LOOKAHEAD  &&  // > CustomCode.jszip:5549
       *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.  // > CustomCode.jszip:5550
       * Otherwise, window_size == 2*WSIZE so more >= 2.  // > CustomCode.jszip:5551
       * If there was sliding, more >= WSIZE. So in all cases, more >= 2.  // > CustomCode.jszip:5552
       */  // > CustomCode.jszip:5553
      //Assert(more >= 2, "more < 2");  // > CustomCode.jszip:5554
      n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);  // > CustomCode.jszip:5555
      s.lookahead += n;  // > CustomCode.jszip:5556
      /* Initialize the hash value now that we have some input: */  // > CustomCode.jszip:5557
      if (s.lookahead + s.insert >= MIN_MATCH) {  // > CustomCode.jszip:5558
        str = s.strstart - s.insert;  // > CustomCode.jszip:5559
        s.ins_h = s.window[str];  // > CustomCode.jszip:5560
        /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */  // > CustomCode.jszip:5561
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;  // > CustomCode.jszip:5562
  //#if MIN_MATCH != 3  // > CustomCode.jszip:5563
  //        Call update_hash() MIN_MATCH-3 more times  // > CustomCode.jszip:5564
  //#endif  // > CustomCode.jszip:5565
        while (s.insert) {  // > CustomCode.jszip:5566
          /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */  // > CustomCode.jszip:5567
          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;  // > CustomCode.jszip:5568
          s.prev[str & s.w_mask] = s.head[s.ins_h];  // > CustomCode.jszip:5569
          s.head[s.ins_h] = str;  // > CustomCode.jszip:5570
          str++;  // > CustomCode.jszip:5571
          s.insert--;  // > CustomCode.jszip:5572
          if (s.lookahead + s.insert < MIN_MATCH) {  // > CustomCode.jszip:5573
            break;  // > CustomCode.jszip:5574
          }  // > CustomCode.jszip:5575
        }  // > CustomCode.jszip:5576
      }  // > CustomCode.jszip:5577
      /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,  // > CustomCode.jszip:5578
       * but this is not important since only literal bytes will be emitted.  // > CustomCode.jszip:5579
       */  // > CustomCode.jszip:5580
    } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);  // > CustomCode.jszip:5581
    /* If the WIN_INIT bytes after the end of the current data have never been  // > CustomCode.jszip:5582
     * written, then zero those bytes in order to avoid memory check reports of  // > CustomCode.jszip:5583
     * the use of uninitialized (or uninitialised as Julian writes) bytes by  // > CustomCode.jszip:5584
     * the longest match routines.  Update the high water mark for the next  // > CustomCode.jszip:5585
     * time through here.  WIN_INIT is set to MAX_MATCH since the longest match  // > CustomCode.jszip:5586
     * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.  // > CustomCode.jszip:5587
     */  // > CustomCode.jszip:5588
  //  if (s.high_water < s.window_size) {  // > CustomCode.jszip:5589
  //    var curr = s.strstart + s.lookahead;  // > CustomCode.jszip:5590
  //    var init = 0;  // > CustomCode.jszip:5591
  //  // > CustomCode.jszip:5592
  //    if (s.high_water < curr) {  // > CustomCode.jszip:5593
  //      /* Previous high water mark below current data -- zero WIN_INIT  // > CustomCode.jszip:5594
  //       * bytes or up to end of window, whichever is less.  // > CustomCode.jszip:5595
  //       */  // > CustomCode.jszip:5596
  //      init = s.window_size - curr;  // > CustomCode.jszip:5597
  //      if (init > WIN_INIT)  // > CustomCode.jszip:5598
  //        init = WIN_INIT;  // > CustomCode.jszip:5599
  //      zmemzero(s->window + curr, (unsigned)init);  // > CustomCode.jszip:5600
  //      s->high_water = curr + init;  // > CustomCode.jszip:5601
  //    }  // > CustomCode.jszip:5602
  //    else if (s->high_water < (ulg)curr + WIN_INIT) {  // > CustomCode.jszip:5603
  //      /* High water mark at or above current data, but below current data  // > CustomCode.jszip:5604
  //       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up  // > CustomCode.jszip:5605
  //       * to end of window, whichever is less.  // > CustomCode.jszip:5606
  //       */  // > CustomCode.jszip:5607
  //      init = (ulg)curr + WIN_INIT - s->high_water;  // > CustomCode.jszip:5608
  //      if (init > s->window_size - s->high_water)  // > CustomCode.jszip:5609
  //        init = s->window_size - s->high_water;  // > CustomCode.jszip:5610
  //      zmemzero(s->window + s->high_water, (unsigned)init);  // > CustomCode.jszip:5611
  //      s->high_water += init;  // > CustomCode.jszip:5612
  //    }  // > CustomCode.jszip:5613
  //  }  // > CustomCode.jszip:5614
  //  // > CustomCode.jszip:5615
  //  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,  // > CustomCode.jszip:5616
  //    "not enough room for search");  // > CustomCode.jszip:5617
  }  // > CustomCode.jszip:5618
  /* ===========================================================================  // > CustomCode.jszip:5619
   * Copy without compression as much as possible from the input stream, return  // > CustomCode.jszip:5620
   * the current block state.  // > CustomCode.jszip:5621
   * This function does not insert new strings in the dictionary since  // > CustomCode.jszip:5622
   * uncompressible data is probably not useful. This function is used  // > CustomCode.jszip:5623
   * only for the level=0 compression option.  // > CustomCode.jszip:5624
   * NOTE: this function should be optimized to avoid extra copying from  // > CustomCode.jszip:5625
   * window to pending_buf.  // > CustomCode.jszip:5626
   */  // > CustomCode.jszip:5627
  function deflate_stored(s, flush) {  // > CustomCode.jszip:5628
    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited  // > CustomCode.jszip:5629
     * to pending_buf_size, and each stored block has a 5 byte header:  // > CustomCode.jszip:5630
     */  // > CustomCode.jszip:5631
    var max_block_size = 0xffff;  // > CustomCode.jszip:5632
    if (max_block_size > s.pending_buf_size - 5) {  // > CustomCode.jszip:5633
      max_block_size = s.pending_buf_size - 5;  // > CustomCode.jszip:5634
    }  // > CustomCode.jszip:5635
    /* Copy as much as possible from input to output: */  // > CustomCode.jszip:5636
    for (;;) {  // > CustomCode.jszip:5637
      /* Fill the window as much as possible: */  // > CustomCode.jszip:5638
      if (s.lookahead <= 1) {  // > CustomCode.jszip:5639
        //Assert(s->strstart < s->w_size+MAX_DIST(s) ||  // > CustomCode.jszip:5640
        //  s->block_start >= (long)s->w_size, "slide too late");  // > CustomCode.jszip:5641
  //      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||  // > CustomCode.jszip:5642
  //        s.block_start >= s.w_size)) {  // > CustomCode.jszip:5643
  //        throw  new Error("slide too late");  // > CustomCode.jszip:5644
  //      }  // > CustomCode.jszip:5645
        fill_window(s);  // > CustomCode.jszip:5646
        if (s.lookahead === 0 && flush === Z_NO_FLUSH) {  // > CustomCode.jszip:5647
          return BS_NEED_MORE;  // > CustomCode.jszip:5648
        }  // > CustomCode.jszip:5649
        if (s.lookahead === 0) {  // > CustomCode.jszip:5650
          break;  // > CustomCode.jszip:5651
        }  // > CustomCode.jszip:5652
        /* flush the current block */  // > CustomCode.jszip:5653
      }  // > CustomCode.jszip:5654
      //Assert(s->block_start >= 0L, "block gone");  // > CustomCode.jszip:5655
  //    if (s.block_start < 0) throw new Error("block gone");  // > CustomCode.jszip:5656
      s.strstart += s.lookahead;  // > CustomCode.jszip:5657
      s.lookahead = 0;  // > CustomCode.jszip:5658
      /* Emit a stored block if pending_buf will be full: */  // > CustomCode.jszip:5659
      var max_start = s.block_start + max_block_size;  // > CustomCode.jszip:5660
      if (s.strstart === 0 || s.strstart >= max_start) {  // > CustomCode.jszip:5661
        /* strstart == 0 is possible when wraparound on 16-bit machine */  // > CustomCode.jszip:5662
        s.lookahead = s.strstart - max_start;  // > CustomCode.jszip:5663
        s.strstart = max_start;  // > CustomCode.jszip:5664
        /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5665
        flush_block_only(s, false);  // > CustomCode.jszip:5666
        if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5667
          return BS_NEED_MORE;  // > CustomCode.jszip:5668
        }  // > CustomCode.jszip:5669
        /***/  // > CustomCode.jszip:5670
      }  // > CustomCode.jszip:5671
      /* Flush if we may have to slide, otherwise block_start may become  // > CustomCode.jszip:5672
       * negative and the data will be gone:  // > CustomCode.jszip:5673
       */  // > CustomCode.jszip:5674
      if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {  // > CustomCode.jszip:5675
        /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5676
        flush_block_only(s, false);  // > CustomCode.jszip:5677
        if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5678
          return BS_NEED_MORE;  // > CustomCode.jszip:5679
        }  // > CustomCode.jszip:5680
        /***/  // > CustomCode.jszip:5681
      }  // > CustomCode.jszip:5682
    }  // > CustomCode.jszip:5683
    s.insert = 0;  // > CustomCode.jszip:5684
    if (flush === Z_FINISH) {  // > CustomCode.jszip:5685
      /*** FLUSH_BLOCK(s, 1); ***/  // > CustomCode.jszip:5686
      flush_block_only(s, true);  // > CustomCode.jszip:5687
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5688
        return BS_FINISH_STARTED;  // > CustomCode.jszip:5689
      }  // > CustomCode.jszip:5690
      /***/  // > CustomCode.jszip:5691
      return BS_FINISH_DONE;  // > CustomCode.jszip:5692
    }  // > CustomCode.jszip:5693
    if (s.strstart > s.block_start) {  // > CustomCode.jszip:5694
      /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5695
      flush_block_only(s, false);  // > CustomCode.jszip:5696
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5697
        return BS_NEED_MORE;  // > CustomCode.jszip:5698
      }  // > CustomCode.jszip:5699
      /***/  // > CustomCode.jszip:5700
    }  // > CustomCode.jszip:5701
    return BS_NEED_MORE;  // > CustomCode.jszip:5702
  }  // > CustomCode.jszip:5703
  /* ===========================================================================  // > CustomCode.jszip:5704
   * Compress as much as possible from the input stream, return the current  // > CustomCode.jszip:5705
   * block state.  // > CustomCode.jszip:5706
   * This function does not perform lazy evaluation of matches and inserts  // > CustomCode.jszip:5707
   * new strings in the dictionary only for unmatched strings or for short  // > CustomCode.jszip:5708
   * matches. It is used only for the fast compression options.  // > CustomCode.jszip:5709
   */  // > CustomCode.jszip:5710
  function deflate_fast(s, flush) {  // > CustomCode.jszip:5711
    var hash_head;        /* head of the hash chain */  // > CustomCode.jszip:5712
    var bflush;           /* set if current block must be flushed */  // > CustomCode.jszip:5713
    for (;;) {  // > CustomCode.jszip:5714
      /* Make sure that we always have enough lookahead, except  // > CustomCode.jszip:5715
       * at the end of the input file. We need MAX_MATCH bytes  // > CustomCode.jszip:5716
       * for the next match, plus MIN_MATCH bytes to insert the  // > CustomCode.jszip:5717
       * string following the next match.  // > CustomCode.jszip:5718
       */  // > CustomCode.jszip:5719
      if (s.lookahead < MIN_LOOKAHEAD) {  // > CustomCode.jszip:5720
        fill_window(s);  // > CustomCode.jszip:5721
        if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {  // > CustomCode.jszip:5722
          return BS_NEED_MORE;  // > CustomCode.jszip:5723
        }  // > CustomCode.jszip:5724
        if (s.lookahead === 0) {  // > CustomCode.jszip:5725
          break; /* flush the current block */  // > CustomCode.jszip:5726
        }  // > CustomCode.jszip:5727
      }  // > CustomCode.jszip:5728
      /* Insert the string window[strstart .. strstart+2] in the  // > CustomCode.jszip:5729
       * dictionary, and set hash_head to the head of the hash chain:  // > CustomCode.jszip:5730
       */  // > CustomCode.jszip:5731
      hash_head = 0/*NIL*/;  // > CustomCode.jszip:5732
      if (s.lookahead >= MIN_MATCH) {  // > CustomCode.jszip:5733
        /*** INSERT_STRING(s, s.strstart, hash_head); ***/  // > CustomCode.jszip:5734
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;  // > CustomCode.jszip:5735
        hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];  // > CustomCode.jszip:5736
        s.head[s.ins_h] = s.strstart;  // > CustomCode.jszip:5737
        /***/  // > CustomCode.jszip:5738
      }  // > CustomCode.jszip:5739
      /* Find the longest match, discarding those <= prev_length.  // > CustomCode.jszip:5740
       * At this point we have always match_length < MIN_MATCH  // > CustomCode.jszip:5741
       */  // > CustomCode.jszip:5742
      if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {  // > CustomCode.jszip:5743
        /* To simplify the code, we prevent matches with the string  // > CustomCode.jszip:5744
         * of window index 0 (in particular we have to avoid a match  // > CustomCode.jszip:5745
         * of the string with itself at the start of the input file).  // > CustomCode.jszip:5746
         */  // > CustomCode.jszip:5747
        s.match_length = longest_match(s, hash_head);  // > CustomCode.jszip:5748
        /* longest_match() sets match_start */  // > CustomCode.jszip:5749
      }  // > CustomCode.jszip:5750
      if (s.match_length >= MIN_MATCH) {  // > CustomCode.jszip:5751
        // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only  // > CustomCode.jszip:5752
        /*** _tr_tally_dist(s, s.strstart - s.match_start,  // > CustomCode.jszip:5753
                       s.match_length - MIN_MATCH, bflush); ***/  // > CustomCode.jszip:5754
        bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);  // > CustomCode.jszip:5755
        s.lookahead -= s.match_length;  // > CustomCode.jszip:5756
        /* Insert new strings in the hash table only if the match length  // > CustomCode.jszip:5757
         * is not too large. This saves time but degrades compression.  // > CustomCode.jszip:5758
         */  // > CustomCode.jszip:5759
        if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {  // > CustomCode.jszip:5760
          s.match_length--; /* string at strstart already in table */  // > CustomCode.jszip:5761
          do {  // > CustomCode.jszip:5762
            s.strstart++;  // > CustomCode.jszip:5763
            /*** INSERT_STRING(s, s.strstart, hash_head); ***/  // > CustomCode.jszip:5764
            s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;  // > CustomCode.jszip:5765
            hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];  // > CustomCode.jszip:5766
            s.head[s.ins_h] = s.strstart;  // > CustomCode.jszip:5767
            /***/  // > CustomCode.jszip:5768
            /* strstart never exceeds WSIZE-MAX_MATCH, so there are  // > CustomCode.jszip:5769
             * always MIN_MATCH bytes ahead.  // > CustomCode.jszip:5770
             */  // > CustomCode.jszip:5771
          } while (--s.match_length !== 0);  // > CustomCode.jszip:5772
          s.strstart++;  // > CustomCode.jszip:5773
        } else  // > CustomCode.jszip:5774
        {  // > CustomCode.jszip:5775
          s.strstart += s.match_length;  // > CustomCode.jszip:5776
          s.match_length = 0;  // > CustomCode.jszip:5777
          s.ins_h = s.window[s.strstart];  // > CustomCode.jszip:5778
          /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */  // > CustomCode.jszip:5779
          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;  // > CustomCode.jszip:5780
  //#if MIN_MATCH != 3  // > CustomCode.jszip:5781
  //                Call UPDATE_HASH() MIN_MATCH-3 more times  // > CustomCode.jszip:5782
  //#endif  // > CustomCode.jszip:5783
          /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not  // > CustomCode.jszip:5784
           * matter since it will be recomputed at next deflate call.  // > CustomCode.jszip:5785
           */  // > CustomCode.jszip:5786
        }  // > CustomCode.jszip:5787
      } else {  // > CustomCode.jszip:5788
        /* No match, output a literal byte */  // > CustomCode.jszip:5789
        //Tracevv((stderr,"%c", s.window[s.strstart]));  // > CustomCode.jszip:5790
        /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/  // > CustomCode.jszip:5791
        bflush = trees._tr_tally(s, 0, s.window[s.strstart]);  // > CustomCode.jszip:5792
        s.lookahead--;  // > CustomCode.jszip:5793
        s.strstart++;  // > CustomCode.jszip:5794
      }  // > CustomCode.jszip:5795
      if (bflush) {  // > CustomCode.jszip:5796
        /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5797
        flush_block_only(s, false);  // > CustomCode.jszip:5798
        if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5799
          return BS_NEED_MORE;  // > CustomCode.jszip:5800
        }  // > CustomCode.jszip:5801
        /***/  // > CustomCode.jszip:5802
      }  // > CustomCode.jszip:5803
    }  // > CustomCode.jszip:5804
    s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);  // > CustomCode.jszip:5805
    if (flush === Z_FINISH) {  // > CustomCode.jszip:5806
      /*** FLUSH_BLOCK(s, 1); ***/  // > CustomCode.jszip:5807
      flush_block_only(s, true);  // > CustomCode.jszip:5808
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5809
        return BS_FINISH_STARTED;  // > CustomCode.jszip:5810
      }  // > CustomCode.jszip:5811
      /***/  // > CustomCode.jszip:5812
      return BS_FINISH_DONE;  // > CustomCode.jszip:5813
    }  // > CustomCode.jszip:5814
    if (s.last_lit) {  // > CustomCode.jszip:5815
      /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5816
      flush_block_only(s, false);  // > CustomCode.jszip:5817
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5818
        return BS_NEED_MORE;  // > CustomCode.jszip:5819
      }  // > CustomCode.jszip:5820
      /***/  // > CustomCode.jszip:5821
    }  // > CustomCode.jszip:5822
    return BS_BLOCK_DONE;  // > CustomCode.jszip:5823
  }  // > CustomCode.jszip:5824
  /* ===========================================================================  // > CustomCode.jszip:5825
   * Same as above, but achieves better compression. We use a lazy  // > CustomCode.jszip:5826
   * evaluation for matches: a match is finally adopted only if there is  // > CustomCode.jszip:5827
   * no better match at the next window position.  // > CustomCode.jszip:5828
   */  // > CustomCode.jszip:5829
  function deflate_slow(s, flush) {  // > CustomCode.jszip:5830
    var hash_head;          /* head of hash chain */  // > CustomCode.jszip:5831
    var bflush;              /* set if current block must be flushed */  // > CustomCode.jszip:5832
    var max_insert;  // > CustomCode.jszip:5833
    /* Process the input block. */  // > CustomCode.jszip:5834
    for (;;) {  // > CustomCode.jszip:5835
      /* Make sure that we always have enough lookahead, except  // > CustomCode.jszip:5836
       * at the end of the input file. We need MAX_MATCH bytes  // > CustomCode.jszip:5837
       * for the next match, plus MIN_MATCH bytes to insert the  // > CustomCode.jszip:5838
       * string following the next match.  // > CustomCode.jszip:5839
       */  // > CustomCode.jszip:5840
      if (s.lookahead < MIN_LOOKAHEAD) {  // > CustomCode.jszip:5841
        fill_window(s);  // > CustomCode.jszip:5842
        if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {  // > CustomCode.jszip:5843
          return BS_NEED_MORE;  // > CustomCode.jszip:5844
        }  // > CustomCode.jszip:5845
        if (s.lookahead === 0) { break; } /* flush the current block */  // > CustomCode.jszip:5846
      }  // > CustomCode.jszip:5847
      /* Insert the string window[strstart .. strstart+2] in the  // > CustomCode.jszip:5848
       * dictionary, and set hash_head to the head of the hash chain:  // > CustomCode.jszip:5849
       */  // > CustomCode.jszip:5850
      hash_head = 0/*NIL*/;  // > CustomCode.jszip:5851
      if (s.lookahead >= MIN_MATCH) {  // > CustomCode.jszip:5852
        /*** INSERT_STRING(s, s.strstart, hash_head); ***/  // > CustomCode.jszip:5853
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;  // > CustomCode.jszip:5854
        hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];  // > CustomCode.jszip:5855
        s.head[s.ins_h] = s.strstart;  // > CustomCode.jszip:5856
        /***/  // > CustomCode.jszip:5857
      }  // > CustomCode.jszip:5858
      /* Find the longest match, discarding those <= prev_length.  // > CustomCode.jszip:5859
       */  // > CustomCode.jszip:5860
      s.prev_length = s.match_length;  // > CustomCode.jszip:5861
      s.prev_match = s.match_start;  // > CustomCode.jszip:5862
      s.match_length = MIN_MATCH - 1;  // > CustomCode.jszip:5863
      if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&  // > CustomCode.jszip:5864
          s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {  // > CustomCode.jszip:5865
        /* To simplify the code, we prevent matches with the string  // > CustomCode.jszip:5866
         * of window index 0 (in particular we have to avoid a match  // > CustomCode.jszip:5867
         * of the string with itself at the start of the input file).  // > CustomCode.jszip:5868
         */  // > CustomCode.jszip:5869
        s.match_length = longest_match(s, hash_head);  // > CustomCode.jszip:5870
        /* longest_match() sets match_start */  // > CustomCode.jszip:5871
        if (s.match_length <= 5 &&  // > CustomCode.jszip:5872
           (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {  // > CustomCode.jszip:5873
          /* If prev_match is also MIN_MATCH, match_start is garbage  // > CustomCode.jszip:5874
           * but we will ignore the current match anyway.  // > CustomCode.jszip:5875
           */  // > CustomCode.jszip:5876
          s.match_length = MIN_MATCH - 1;  // > CustomCode.jszip:5877
        }  // > CustomCode.jszip:5878
      }  // > CustomCode.jszip:5879
      /* If there was a match at the previous step and the current  // > CustomCode.jszip:5880
       * match is not better, output the previous match:  // > CustomCode.jszip:5881
       */  // > CustomCode.jszip:5882
      if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {  // > CustomCode.jszip:5883
        max_insert = s.strstart + s.lookahead - MIN_MATCH;  // > CustomCode.jszip:5884
        /* Do not insert strings in hash table beyond this. */  // > CustomCode.jszip:5885
        //check_match(s, s.strstart-1, s.prev_match, s.prev_length);  // > CustomCode.jszip:5886
        /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,  // > CustomCode.jszip:5887
                       s.prev_length - MIN_MATCH, bflush);***/  // > CustomCode.jszip:5888
        bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);  // > CustomCode.jszip:5889
        /* Insert in hash table all strings up to the end of the match.  // > CustomCode.jszip:5890
         * strstart-1 and strstart are already inserted. If there is not  // > CustomCode.jszip:5891
         * enough lookahead, the last two strings are not inserted in  // > CustomCode.jszip:5892
         * the hash table.  // > CustomCode.jszip:5893
         */  // > CustomCode.jszip:5894
        s.lookahead -= s.prev_length - 1;  // > CustomCode.jszip:5895
        s.prev_length -= 2;  // > CustomCode.jszip:5896
        do {  // > CustomCode.jszip:5897
          if (++s.strstart <= max_insert) {  // > CustomCode.jszip:5898
            /*** INSERT_STRING(s, s.strstart, hash_head); ***/  // > CustomCode.jszip:5899
            s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;  // > CustomCode.jszip:5900
            hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];  // > CustomCode.jszip:5901
            s.head[s.ins_h] = s.strstart;  // > CustomCode.jszip:5902
            /***/  // > CustomCode.jszip:5903
          }  // > CustomCode.jszip:5904
        } while (--s.prev_length !== 0);  // > CustomCode.jszip:5905
        s.match_available = 0;  // > CustomCode.jszip:5906
        s.match_length = MIN_MATCH - 1;  // > CustomCode.jszip:5907
        s.strstart++;  // > CustomCode.jszip:5908
        if (bflush) {  // > CustomCode.jszip:5909
          /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5910
          flush_block_only(s, false);  // > CustomCode.jszip:5911
          if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5912
            return BS_NEED_MORE;  // > CustomCode.jszip:5913
          }  // > CustomCode.jszip:5914
          /***/  // > CustomCode.jszip:5915
        }  // > CustomCode.jszip:5916
      } else if (s.match_available) {  // > CustomCode.jszip:5917
        /* If there was no match at the previous position, output a  // > CustomCode.jszip:5918
         * single literal. If there was a match but the current match  // > CustomCode.jszip:5919
         * is longer, truncate the previous match to a single literal.  // > CustomCode.jszip:5920
         */  // > CustomCode.jszip:5921
        //Tracevv((stderr,"%c", s->window[s->strstart-1]));  // > CustomCode.jszip:5922
        /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/  // > CustomCode.jszip:5923
        bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);  // > CustomCode.jszip:5924
        if (bflush) {  // > CustomCode.jszip:5925
          /*** FLUSH_BLOCK_ONLY(s, 0) ***/  // > CustomCode.jszip:5926
          flush_block_only(s, false);  // > CustomCode.jszip:5927
          /***/  // > CustomCode.jszip:5928
        }  // > CustomCode.jszip:5929
        s.strstart++;  // > CustomCode.jszip:5930
        s.lookahead--;  // > CustomCode.jszip:5931
        if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5932
          return BS_NEED_MORE;  // > CustomCode.jszip:5933
        }  // > CustomCode.jszip:5934
      } else {  // > CustomCode.jszip:5935
        /* There is no previous match to compare with, wait for  // > CustomCode.jszip:5936
         * the next step to decide.  // > CustomCode.jszip:5937
         */  // > CustomCode.jszip:5938
        s.match_available = 1;  // > CustomCode.jszip:5939
        s.strstart++;  // > CustomCode.jszip:5940
        s.lookahead--;  // > CustomCode.jszip:5941
      }  // > CustomCode.jszip:5942
    }  // > CustomCode.jszip:5943
    //Assert (flush != Z_NO_FLUSH, "no flush?");  // > CustomCode.jszip:5944
    if (s.match_available) {  // > CustomCode.jszip:5945
      //Tracevv((stderr,"%c", s->window[s->strstart-1]));  // > CustomCode.jszip:5946
      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/  // > CustomCode.jszip:5947
      bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);  // > CustomCode.jszip:5948
      s.match_available = 0;  // > CustomCode.jszip:5949
    }  // > CustomCode.jszip:5950
    s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;  // > CustomCode.jszip:5951
    if (flush === Z_FINISH) {  // > CustomCode.jszip:5952
      /*** FLUSH_BLOCK(s, 1); ***/  // > CustomCode.jszip:5953
      flush_block_only(s, true);  // > CustomCode.jszip:5954
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5955
        return BS_FINISH_STARTED;  // > CustomCode.jszip:5956
      }  // > CustomCode.jszip:5957
      /***/  // > CustomCode.jszip:5958
      return BS_FINISH_DONE;  // > CustomCode.jszip:5959
    }  // > CustomCode.jszip:5960
    if (s.last_lit) {  // > CustomCode.jszip:5961
      /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:5962
      flush_block_only(s, false);  // > CustomCode.jszip:5963
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:5964
        return BS_NEED_MORE;  // > CustomCode.jszip:5965
      }  // > CustomCode.jszip:5966
      /***/  // > CustomCode.jszip:5967
    }  // > CustomCode.jszip:5968
    return BS_BLOCK_DONE;  // > CustomCode.jszip:5969
  }  // > CustomCode.jszip:5970
  /* ===========================================================================  // > CustomCode.jszip:5971
   * For Z_RLE, simply look for runs of bytes, generate matches only of distance  // > CustomCode.jszip:5972
   * one.  Do not maintain a hash table.  (It will be regenerated if this run of  // > CustomCode.jszip:5973
   * deflate switches away from Z_RLE.)  // > CustomCode.jszip:5974
   */  // > CustomCode.jszip:5975
  function deflate_rle(s, flush) {  // > CustomCode.jszip:5976
    var bflush;            /* set if current block must be flushed */  // > CustomCode.jszip:5977
    var prev;              /* byte at distance one to match */  // > CustomCode.jszip:5978
    var scan, strend;      /* scan goes up to strend for length of run */  // > CustomCode.jszip:5979
    var _win = s.window;  // > CustomCode.jszip:5980
    for (;;) {  // > CustomCode.jszip:5981
      /* Make sure that we always have enough lookahead, except  // > CustomCode.jszip:5982
       * at the end of the input file. We need MAX_MATCH bytes  // > CustomCode.jszip:5983
       * for the longest run, plus one for the unrolled loop.  // > CustomCode.jszip:5984
       */  // > CustomCode.jszip:5985
      if (s.lookahead <= MAX_MATCH) {  // > CustomCode.jszip:5986
        fill_window(s);  // > CustomCode.jszip:5987
        if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {  // > CustomCode.jszip:5988
          return BS_NEED_MORE;  // > CustomCode.jszip:5989
        }  // > CustomCode.jszip:5990
        if (s.lookahead === 0) { break; } /* flush the current block */  // > CustomCode.jszip:5991
      }  // > CustomCode.jszip:5992
      /* See how many times the previous byte repeats */  // > CustomCode.jszip:5993
      s.match_length = 0;  // > CustomCode.jszip:5994
      if (s.lookahead >= MIN_MATCH && s.strstart > 0) {  // > CustomCode.jszip:5995
        scan = s.strstart - 1;  // > CustomCode.jszip:5996
        prev = _win[scan];  // > CustomCode.jszip:5997
        if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {  // > CustomCode.jszip:5998
          strend = s.strstart + MAX_MATCH;  // > CustomCode.jszip:5999
          do {  // > CustomCode.jszip:6000
            /*jshint noempty:false*/  // > CustomCode.jszip:6001
          } while (prev === _win[++scan] && prev === _win[++scan] &&  // > CustomCode.jszip:6002
                   prev === _win[++scan] && prev === _win[++scan] &&  // > CustomCode.jszip:6003
                   prev === _win[++scan] && prev === _win[++scan] &&  // > CustomCode.jszip:6004
                   prev === _win[++scan] && prev === _win[++scan] &&  // > CustomCode.jszip:6005
                   scan < strend);  // > CustomCode.jszip:6006
          s.match_length = MAX_MATCH - (strend - scan);  // > CustomCode.jszip:6007
          if (s.match_length > s.lookahead) {  // > CustomCode.jszip:6008
            s.match_length = s.lookahead;  // > CustomCode.jszip:6009
          }  // > CustomCode.jszip:6010
        }  // > CustomCode.jszip:6011
        //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");  // > CustomCode.jszip:6012
      }  // > CustomCode.jszip:6013
      /* Emit match if have run of MIN_MATCH or longer, else emit literal */  // > CustomCode.jszip:6014
      if (s.match_length >= MIN_MATCH) {  // > CustomCode.jszip:6015
        //check_match(s, s.strstart, s.strstart - 1, s.match_length);  // > CustomCode.jszip:6016
        /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/  // > CustomCode.jszip:6017
        bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);  // > CustomCode.jszip:6018
        s.lookahead -= s.match_length;  // > CustomCode.jszip:6019
        s.strstart += s.match_length;  // > CustomCode.jszip:6020
        s.match_length = 0;  // > CustomCode.jszip:6021
      } else {  // > CustomCode.jszip:6022
        /* No match, output a literal byte */  // > CustomCode.jszip:6023
        //Tracevv((stderr,"%c", s->window[s->strstart]));  // > CustomCode.jszip:6024
        /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/  // > CustomCode.jszip:6025
        bflush = trees._tr_tally(s, 0, s.window[s.strstart]);  // > CustomCode.jszip:6026
        s.lookahead--;  // > CustomCode.jszip:6027
        s.strstart++;  // > CustomCode.jszip:6028
      }  // > CustomCode.jszip:6029
      if (bflush) {  // > CustomCode.jszip:6030
        /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:6031
        flush_block_only(s, false);  // > CustomCode.jszip:6032
        if (s.strm.avail_out === 0) {  // > CustomCode.jszip:6033
          return BS_NEED_MORE;  // > CustomCode.jszip:6034
        }  // > CustomCode.jszip:6035
        /***/  // > CustomCode.jszip:6036
      }  // > CustomCode.jszip:6037
    }  // > CustomCode.jszip:6038
    s.insert = 0;  // > CustomCode.jszip:6039
    if (flush === Z_FINISH) {  // > CustomCode.jszip:6040
      /*** FLUSH_BLOCK(s, 1); ***/  // > CustomCode.jszip:6041
      flush_block_only(s, true);  // > CustomCode.jszip:6042
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:6043
        return BS_FINISH_STARTED;  // > CustomCode.jszip:6044
      }  // > CustomCode.jszip:6045
      /***/  // > CustomCode.jszip:6046
      return BS_FINISH_DONE;  // > CustomCode.jszip:6047
    }  // > CustomCode.jszip:6048
    if (s.last_lit) {  // > CustomCode.jszip:6049
      /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:6050
      flush_block_only(s, false);  // > CustomCode.jszip:6051
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:6052
        return BS_NEED_MORE;  // > CustomCode.jszip:6053
      }  // > CustomCode.jszip:6054
      /***/  // > CustomCode.jszip:6055
    }  // > CustomCode.jszip:6056
    return BS_BLOCK_DONE;  // > CustomCode.jszip:6057
  }  // > CustomCode.jszip:6058
  /* ===========================================================================  // > CustomCode.jszip:6059
   * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.  // > CustomCode.jszip:6060
   * (It will be regenerated if this run of deflate switches away from Huffman.)  // > CustomCode.jszip:6061
   */  // > CustomCode.jszip:6062
  function deflate_huff(s, flush) {  // > CustomCode.jszip:6063
    var bflush;             /* set if current block must be flushed */  // > CustomCode.jszip:6064
    for (;;) {  // > CustomCode.jszip:6065
      /* Make sure that we have a literal to write. */  // > CustomCode.jszip:6066
      if (s.lookahead === 0) {  // > CustomCode.jszip:6067
        fill_window(s);  // > CustomCode.jszip:6068
        if (s.lookahead === 0) {  // > CustomCode.jszip:6069
          if (flush === Z_NO_FLUSH) {  // > CustomCode.jszip:6070
            return BS_NEED_MORE;  // > CustomCode.jszip:6071
          }  // > CustomCode.jszip:6072
          break;      /* flush the current block */  // > CustomCode.jszip:6073
        }  // > CustomCode.jszip:6074
      }  // > CustomCode.jszip:6075
      /* Output a literal byte */  // > CustomCode.jszip:6076
      s.match_length = 0;  // > CustomCode.jszip:6077
      //Tracevv((stderr,"%c", s->window[s->strstart]));  // > CustomCode.jszip:6078
      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/  // > CustomCode.jszip:6079
      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);  // > CustomCode.jszip:6080
      s.lookahead--;  // > CustomCode.jszip:6081
      s.strstart++;  // > CustomCode.jszip:6082
      if (bflush) {  // > CustomCode.jszip:6083
        /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:6084
        flush_block_only(s, false);  // > CustomCode.jszip:6085
        if (s.strm.avail_out === 0) {  // > CustomCode.jszip:6086
          return BS_NEED_MORE;  // > CustomCode.jszip:6087
        }  // > CustomCode.jszip:6088
        /***/  // > CustomCode.jszip:6089
      }  // > CustomCode.jszip:6090
    }  // > CustomCode.jszip:6091
    s.insert = 0;  // > CustomCode.jszip:6092
    if (flush === Z_FINISH) {  // > CustomCode.jszip:6093
      /*** FLUSH_BLOCK(s, 1); ***/  // > CustomCode.jszip:6094
      flush_block_only(s, true);  // > CustomCode.jszip:6095
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:6096
        return BS_FINISH_STARTED;  // > CustomCode.jszip:6097
      }  // > CustomCode.jszip:6098
      /***/  // > CustomCode.jszip:6099
      return BS_FINISH_DONE;  // > CustomCode.jszip:6100
    }  // > CustomCode.jszip:6101
    if (s.last_lit) {  // > CustomCode.jszip:6102
      /*** FLUSH_BLOCK(s, 0); ***/  // > CustomCode.jszip:6103
      flush_block_only(s, false);  // > CustomCode.jszip:6104
      if (s.strm.avail_out === 0) {  // > CustomCode.jszip:6105
        return BS_NEED_MORE;  // > CustomCode.jszip:6106
      }  // > CustomCode.jszip:6107
      /***/  // > CustomCode.jszip:6108
    }  // > CustomCode.jszip:6109
    return BS_BLOCK_DONE;  // > CustomCode.jszip:6110
  }  // > CustomCode.jszip:6111
  /* Values for max_lazy_match, good_match and max_chain_length, depending on  // > CustomCode.jszip:6112
   * the desired pack level (0..9). The values given below have been tuned to  // > CustomCode.jszip:6113
   * exclude worst case performance for pathological files. Better values may be  // > CustomCode.jszip:6114
   * found for specific files.  // > CustomCode.jszip:6115
   */  // > CustomCode.jszip:6116
  function Config(good_length, max_lazy, nice_length, max_chain, func) {  // > CustomCode.jszip:6117
    this.good_length = good_length;  // > CustomCode.jszip:6118
    this.max_lazy = max_lazy;  // > CustomCode.jszip:6119
    this.nice_length = nice_length;  // > CustomCode.jszip:6120
    this.max_chain = max_chain;  // > CustomCode.jszip:6121
    this.func = func;  // > CustomCode.jszip:6122
  }  // > CustomCode.jszip:6123
  var configuration_table;  // > CustomCode.jszip:6124
  configuration_table = [  // > CustomCode.jszip:6125
    /*      good lazy nice chain */  // > CustomCode.jszip:6126
    new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */  // > CustomCode.jszip:6127
    new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */  // > CustomCode.jszip:6128
    new Config(4, 5, 16, 8, deflate_fast),           /* 2 */  // > CustomCode.jszip:6129
    new Config(4, 6, 32, 32, deflate_fast),          /* 3 */  // > CustomCode.jszip:6130
    new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */  // > CustomCode.jszip:6131
    new Config(8, 16, 32, 32, deflate_slow),         /* 5 */  // > CustomCode.jszip:6132
    new Config(8, 16, 128, 128, deflate_slow),       /* 6 */  // > CustomCode.jszip:6133
    new Config(8, 32, 128, 256, deflate_slow),       /* 7 */  // > CustomCode.jszip:6134
    new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */  // > CustomCode.jszip:6135
    new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */  // > CustomCode.jszip:6136
  ];  // > CustomCode.jszip:6137
  /* ===========================================================================  // > CustomCode.jszip:6138
   * Initialize the "longest match" routines for a new zlib stream  // > CustomCode.jszip:6139
   */  // > CustomCode.jszip:6140
  function lm_init(s) {  // > CustomCode.jszip:6141
    s.window_size = 2 * s.w_size;  // > CustomCode.jszip:6142
    /*** CLEAR_HASH(s); ***/  // > CustomCode.jszip:6143
    zero(s.head); // Fill with NIL (= 0);  // > CustomCode.jszip:6144
    /* Set the default configuration parameters:  // > CustomCode.jszip:6145
     */  // > CustomCode.jszip:6146
    s.max_lazy_match = configuration_table[s.level].max_lazy;  // > CustomCode.jszip:6147
    s.good_match = configuration_table[s.level].good_length;  // > CustomCode.jszip:6148
    s.nice_match = configuration_table[s.level].nice_length;  // > CustomCode.jszip:6149
    s.max_chain_length = configuration_table[s.level].max_chain;  // > CustomCode.jszip:6150
    s.strstart = 0;  // > CustomCode.jszip:6151
    s.block_start = 0;  // > CustomCode.jszip:6152
    s.lookahead = 0;  // > CustomCode.jszip:6153
    s.insert = 0;  // > CustomCode.jszip:6154
    s.match_length = s.prev_length = MIN_MATCH - 1;  // > CustomCode.jszip:6155
    s.match_available = 0;  // > CustomCode.jszip:6156
    s.ins_h = 0;  // > CustomCode.jszip:6157
  }  // > CustomCode.jszip:6158
  function DeflateState() {  // > CustomCode.jszip:6159
    this.strm = null;            /* pointer back to this zlib stream */  // > CustomCode.jszip:6160
    this.status = 0;            /* as the name implies */  // > CustomCode.jszip:6161
    this.pending_buf = null;      /* output still pending */  // > CustomCode.jszip:6162
    this.pending_buf_size = 0;  /* size of pending_buf */  // > CustomCode.jszip:6163
    this.pending_out = 0;       /* next pending byte to output to the stream */  // > CustomCode.jszip:6164
    this.pending = 0;           /* nb of bytes in the pending buffer */  // > CustomCode.jszip:6165
    this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */  // > CustomCode.jszip:6166
    this.gzhead = null;         /* gzip header information to write */  // > CustomCode.jszip:6167
    this.gzindex = 0;           /* where in extra, name, or comment */  // > CustomCode.jszip:6168
    this.method = Z_DEFLATED; /* can only be DEFLATED */  // > CustomCode.jszip:6169
    this.last_flush = -1;   /* value of flush param for previous deflate call */  // > CustomCode.jszip:6170
    this.w_size = 0;  /* LZ77 window size (32K by default) */  // > CustomCode.jszip:6171
    this.w_bits = 0;  /* log2(w_size)  (8..16) */  // > CustomCode.jszip:6172
    this.w_mask = 0;  /* w_size - 1 */  // > CustomCode.jszip:6173
    this.window = null;  // > CustomCode.jszip:6174
    /* Sliding window. Input bytes are read into the second half of the window,  // > CustomCode.jszip:6175
     * and move to the first half later to keep a dictionary of at least wSize  // > CustomCode.jszip:6176
     * bytes. With this organization, matches are limited to a distance of  // > CustomCode.jszip:6177
     * wSize-MAX_MATCH bytes, but this ensures that IO is always  // > CustomCode.jszip:6178
     * performed with a length multiple of the block size.  // > CustomCode.jszip:6179
     */  // > CustomCode.jszip:6180
    this.window_size = 0;  // > CustomCode.jszip:6181
    /* Actual size of window: 2*wSize, except when the user input buffer  // > CustomCode.jszip:6182
     * is directly used as sliding window.  // > CustomCode.jszip:6183
     */  // > CustomCode.jszip:6184
    this.prev = null;  // > CustomCode.jszip:6185
    /* Link to older string with same hash index. To limit the size of this  // > CustomCode.jszip:6186
     * array to 64K, this link is maintained only for the last 32K strings.  // > CustomCode.jszip:6187
     * An index in this array is thus a window index modulo 32K.  // > CustomCode.jszip:6188
     */  // > CustomCode.jszip:6189
    this.head = null;   /* Heads of the hash chains or NIL. */  // > CustomCode.jszip:6190
    this.ins_h = 0;       /* hash index of string to be inserted */  // > CustomCode.jszip:6191
    this.hash_size = 0;   /* number of elements in hash table */  // > CustomCode.jszip:6192
    this.hash_bits = 0;   /* log2(hash_size) */  // > CustomCode.jszip:6193
    this.hash_mask = 0;   /* hash_size-1 */  // > CustomCode.jszip:6194
    this.hash_shift = 0;  // > CustomCode.jszip:6195
    /* Number of bits by which ins_h must be shifted at each input  // > CustomCode.jszip:6196
     * step. It must be such that after MIN_MATCH steps, the oldest  // > CustomCode.jszip:6197
     * byte no longer takes part in the hash key, that is:  // > CustomCode.jszip:6198
     *   hash_shift * MIN_MATCH >= hash_bits  // > CustomCode.jszip:6199
     */  // > CustomCode.jszip:6200
    this.block_start = 0;  // > CustomCode.jszip:6201
    /* Window position at the beginning of the current output block. Gets  // > CustomCode.jszip:6202
     * negative when the window is moved backwards.  // > CustomCode.jszip:6203
     */  // > CustomCode.jszip:6204
    this.match_length = 0;      /* length of best match */  // > CustomCode.jszip:6205
    this.prev_match = 0;        /* previous match */  // > CustomCode.jszip:6206
    this.match_available = 0;   /* set if previous match exists */  // > CustomCode.jszip:6207
    this.strstart = 0;          /* start of string to insert */  // > CustomCode.jszip:6208
    this.match_start = 0;       /* start of matching string */  // > CustomCode.jszip:6209
    this.lookahead = 0;         /* number of valid bytes ahead in window */  // > CustomCode.jszip:6210
    this.prev_length = 0;  // > CustomCode.jszip:6211
    /* Length of the best match at previous step. Matches not greater than this  // > CustomCode.jszip:6212
     * are discarded. This is used in the lazy match evaluation.  // > CustomCode.jszip:6213
     */  // > CustomCode.jszip:6214
    this.max_chain_length = 0;  // > CustomCode.jszip:6215
    /* To speed up deflation, hash chains are never searched beyond this  // > CustomCode.jszip:6216
     * length.  A higher limit improves compression ratio but degrades the  // > CustomCode.jszip:6217
     * speed.  // > CustomCode.jszip:6218
     */  // > CustomCode.jszip:6219
    this.max_lazy_match = 0;  // > CustomCode.jszip:6220
    /* Attempt to find a better match only when the current match is strictly  // > CustomCode.jszip:6221
     * smaller than this value. This mechanism is used only for compression  // > CustomCode.jszip:6222
     * levels >= 4.  // > CustomCode.jszip:6223
     */  // > CustomCode.jszip:6224
    // That's alias to max_lazy_match, don't use directly  // > CustomCode.jszip:6225
    //this.max_insert_length = 0;  // > CustomCode.jszip:6226
    /* Insert new strings in the hash table only if the match length is not  // > CustomCode.jszip:6227
     * greater than this length. This saves time but degrades compression.  // > CustomCode.jszip:6228
     * max_insert_length is used only for compression levels <= 3.  // > CustomCode.jszip:6229
     */  // > CustomCode.jszip:6230
    this.level = 0;     /* compression level (1..9) */  // > CustomCode.jszip:6231
    this.strategy = 0;  /* favor or force Huffman coding*/  // > CustomCode.jszip:6232
    this.good_match = 0;  // > CustomCode.jszip:6233
    /* Use a faster search when the previous match is longer than this */  // > CustomCode.jszip:6234
    this.nice_match = 0; /* Stop searching when current match exceeds this */  // > CustomCode.jszip:6235
                /* used by trees.c: */  // > CustomCode.jszip:6236
    /* Didn't use ct_data typedef below to suppress compiler warning */  // > CustomCode.jszip:6237
    // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */  // > CustomCode.jszip:6238
    // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */  // > CustomCode.jszip:6239
    // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */  // > CustomCode.jszip:6240
    // Use flat array of DOUBLE size, with interleaved fata,  // > CustomCode.jszip:6241
    // because JS does not support effective  // > CustomCode.jszip:6242
    this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);  // > CustomCode.jszip:6243
    this.dyn_dtree  = new utils.Buf16((2 * D_CODES + 1) * 2);  // > CustomCode.jszip:6244
    this.bl_tree    = new utils.Buf16((2 * BL_CODES + 1) * 2);  // > CustomCode.jszip:6245
    zero(this.dyn_ltree);  // > CustomCode.jszip:6246
    zero(this.dyn_dtree);  // > CustomCode.jszip:6247
    zero(this.bl_tree);  // > CustomCode.jszip:6248
    this.l_desc   = null;         /* desc. for literal tree */  // > CustomCode.jszip:6249
    this.d_desc   = null;         /* desc. for distance tree */  // > CustomCode.jszip:6250
    this.bl_desc  = null;         /* desc. for bit length tree */  // > CustomCode.jszip:6251
    //ush bl_count[MAX_BITS+1];  // > CustomCode.jszip:6252
    this.bl_count = new utils.Buf16(MAX_BITS + 1);  // > CustomCode.jszip:6253
    /* number of codes at each bit length for an optimal tree */  // > CustomCode.jszip:6254
    //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */  // > CustomCode.jszip:6255
    this.heap = new utils.Buf16(2 * L_CODES + 1);  /* heap used to build the Huffman trees */  // > CustomCode.jszip:6256
    zero(this.heap);  // > CustomCode.jszip:6257
    this.heap_len = 0;               /* number of elements in the heap */  // > CustomCode.jszip:6258
    this.heap_max = 0;               /* element of largest frequency */  // > CustomCode.jszip:6259
    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.  // > CustomCode.jszip:6260
     * The same heap array is used to build all trees.  // > CustomCode.jszip:6261
     */  // > CustomCode.jszip:6262
    this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];  // > CustomCode.jszip:6263
    zero(this.depth);  // > CustomCode.jszip:6264
    /* Depth of each subtree used as tie breaker for trees of equal frequency  // > CustomCode.jszip:6265
     */  // > CustomCode.jszip:6266
    this.l_buf = 0;          /* buffer index for literals or lengths */  // > CustomCode.jszip:6267
    this.lit_bufsize = 0;  // > CustomCode.jszip:6268
    /* Size of match buffer for literals/lengths.  There are 4 reasons for  // > CustomCode.jszip:6269
     * limiting lit_bufsize to 64K:  // > CustomCode.jszip:6270
     *   - frequencies can be kept in 16 bit counters  // > CustomCode.jszip:6271
     *   - if compression is not successful for the first block, all input  // > CustomCode.jszip:6272
     *     data is still in the window so we can still emit a stored block even  // > CustomCode.jszip:6273
     *     when input comes from standard input.  (This can also be done for  // > CustomCode.jszip:6274
     *     all blocks if lit_bufsize is not greater than 32K.)  // > CustomCode.jszip:6275
     *   - if compression is not successful for a file smaller than 64K, we can  // > CustomCode.jszip:6276
     *     even emit a stored file instead of a stored block (saving 5 bytes).  // > CustomCode.jszip:6277
     *     This is applicable only for zip (not gzip or zlib).  // > CustomCode.jszip:6278
     *   - creating new Huffman trees less frequently may not provide fast  // > CustomCode.jszip:6279
     *     adaptation to changes in the input data statistics. (Take for  // > CustomCode.jszip:6280
     *     example a binary file with poorly compressible code followed by  // > CustomCode.jszip:6281
     *     a highly compressible string table.) Smaller buffer sizes give  // > CustomCode.jszip:6282
     *     fast adaptation but have of course the overhead of transmitting  // > CustomCode.jszip:6283
     *     trees more frequently.  // > CustomCode.jszip:6284
     *   - I can't count above 4  // > CustomCode.jszip:6285
     */  // > CustomCode.jszip:6286
    this.last_lit = 0;      /* running index in l_buf */  // > CustomCode.jszip:6287
    this.d_buf = 0;  // > CustomCode.jszip:6288
    /* Buffer index for distances. To simplify the code, d_buf and l_buf have  // > CustomCode.jszip:6289
     * the same number of elements. To use different lengths, an extra flag  // > CustomCode.jszip:6290
     * array would be necessary.  // > CustomCode.jszip:6291
     */  // > CustomCode.jszip:6292
    this.opt_len = 0;       /* bit length of current block with optimal trees */  // > CustomCode.jszip:6293
    this.static_len = 0;    /* bit length of current block with static trees */  // > CustomCode.jszip:6294
    this.matches = 0;       /* number of string matches in current block */  // > CustomCode.jszip:6295
    this.insert = 0;        /* bytes at end of window left to insert */  // > CustomCode.jszip:6296
    this.bi_buf = 0;  // > CustomCode.jszip:6297
    /* Output buffer. bits are inserted starting at the bottom (least  // > CustomCode.jszip:6298
     * significant bits).  // > CustomCode.jszip:6299
     */  // > CustomCode.jszip:6300
    this.bi_valid = 0;  // > CustomCode.jszip:6301
    /* Number of valid bits in bi_buf.  All bits above the last valid bit  // > CustomCode.jszip:6302
     * are always zero.  // > CustomCode.jszip:6303
     */  // > CustomCode.jszip:6304
    // Used for window memory init. We safely ignore it for JS. That makes  // > CustomCode.jszip:6305
    // sense only for pointers and memory check tools.  // > CustomCode.jszip:6306
    //this.high_water = 0;  // > CustomCode.jszip:6307
    /* High water mark offset in window for initialized bytes -- bytes above  // > CustomCode.jszip:6308
     * this are set to zero in order to avoid memory check warnings when  // > CustomCode.jszip:6309
     * longest match routines access bytes past the input.  This is then  // > CustomCode.jszip:6310
     * updated to the new high water mark.  // > CustomCode.jszip:6311
     */  // > CustomCode.jszip:6312
  }  // > CustomCode.jszip:6313
  function deflateResetKeep(strm) {  // > CustomCode.jszip:6314
    var s;  // > CustomCode.jszip:6315
    if (!strm || !strm.state) {  // > CustomCode.jszip:6316
      return err(strm, Z_STREAM_ERROR);  // > CustomCode.jszip:6317
    }  // > CustomCode.jszip:6318
    strm.total_in = strm.total_out = 0;  // > CustomCode.jszip:6319
    strm.data_type = Z_UNKNOWN;  // > CustomCode.jszip:6320
    s = strm.state;  // > CustomCode.jszip:6321
    s.pending = 0;  // > CustomCode.jszip:6322
    s.pending_out = 0;  // > CustomCode.jszip:6323
    if (s.wrap < 0) {  // > CustomCode.jszip:6324
      s.wrap = -s.wrap;  // > CustomCode.jszip:6325
      /* was made negative by deflate(..., Z_FINISH); */  // > CustomCode.jszip:6326
    }  // > CustomCode.jszip:6327
    s.status = (s.wrap ? INIT_STATE : BUSY_STATE);  // > CustomCode.jszip:6328
    strm.adler = (s.wrap === 2) ?  // > CustomCode.jszip:6329
      0  // crc32(0, Z_NULL, 0)  // > CustomCode.jszip:6330
    :  // > CustomCode.jszip:6331
      1; // adler32(0, Z_NULL, 0)  // > CustomCode.jszip:6332
    s.last_flush = Z_NO_FLUSH;  // > CustomCode.jszip:6333
    trees._tr_init(s);  // > CustomCode.jszip:6334
    return Z_OK;  // > CustomCode.jszip:6335
  }  // > CustomCode.jszip:6336
  function deflateReset(strm) {  // > CustomCode.jszip:6337
    var ret = deflateResetKeep(strm);  // > CustomCode.jszip:6338
    if (ret === Z_OK) {  // > CustomCode.jszip:6339
      lm_init(strm.state);  // > CustomCode.jszip:6340
    }  // > CustomCode.jszip:6341
    return ret;  // > CustomCode.jszip:6342
  }  // > CustomCode.jszip:6343
  function deflateSetHeader(strm, head) {  // > CustomCode.jszip:6344
    if (!strm || !strm.state) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:6345
    if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:6346
    strm.state.gzhead = head;  // > CustomCode.jszip:6347
    return Z_OK;  // > CustomCode.jszip:6348
  }  // > CustomCode.jszip:6349
  function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {  // > CustomCode.jszip:6350
    if (!strm) { // === Z_NULL  // > CustomCode.jszip:6351
      return Z_STREAM_ERROR;  // > CustomCode.jszip:6352
    }  // > CustomCode.jszip:6353
    var wrap = 1;  // > CustomCode.jszip:6354
    if (level === Z_DEFAULT_COMPRESSION) {  // > CustomCode.jszip:6355
      level = 6;  // > CustomCode.jszip:6356
    }  // > CustomCode.jszip:6357
    if (windowBits < 0) { /* suppress zlib wrapper */  // > CustomCode.jszip:6358
      wrap = 0;  // > CustomCode.jszip:6359
      windowBits = -windowBits;  // > CustomCode.jszip:6360
    }  // > CustomCode.jszip:6361
    else if (windowBits > 15) {  // > CustomCode.jszip:6362
      wrap = 2;           /* write gzip wrapper instead */  // > CustomCode.jszip:6363
      windowBits -= 16;  // > CustomCode.jszip:6364
    }  // > CustomCode.jszip:6365
    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||  // > CustomCode.jszip:6366
      windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||  // > CustomCode.jszip:6367
      strategy < 0 || strategy > Z_FIXED) {  // > CustomCode.jszip:6368
      return err(strm, Z_STREAM_ERROR);  // > CustomCode.jszip:6369
    }  // > CustomCode.jszip:6370
    if (windowBits === 8) {  // > CustomCode.jszip:6371
      windowBits = 9;  // > CustomCode.jszip:6372
    }  // > CustomCode.jszip:6373
    /* until 256-byte window bug fixed */  // > CustomCode.jszip:6374
    var s = new DeflateState();  // > CustomCode.jszip:6375
    strm.state = s;  // > CustomCode.jszip:6376
    s.strm = strm;  // > CustomCode.jszip:6377
    s.wrap = wrap;  // > CustomCode.jszip:6378
    s.gzhead = null;  // > CustomCode.jszip:6379
    s.w_bits = windowBits;  // > CustomCode.jszip:6380
    s.w_size = 1 << s.w_bits;  // > CustomCode.jszip:6381
    s.w_mask = s.w_size - 1;  // > CustomCode.jszip:6382
    s.hash_bits = memLevel + 7;  // > CustomCode.jszip:6383
    s.hash_size = 1 << s.hash_bits;  // > CustomCode.jszip:6384
    s.hash_mask = s.hash_size - 1;  // > CustomCode.jszip:6385
    s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);  // > CustomCode.jszip:6386
    s.window = new utils.Buf8(s.w_size * 2);  // > CustomCode.jszip:6387
    s.head = new utils.Buf16(s.hash_size);  // > CustomCode.jszip:6388
    s.prev = new utils.Buf16(s.w_size);  // > CustomCode.jszip:6389
    // Don't need mem init magic for JS.  // > CustomCode.jszip:6390
    //s.high_water = 0;  /* nothing written to s->window yet */  // > CustomCode.jszip:6391
    s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */  // > CustomCode.jszip:6392
    s.pending_buf_size = s.lit_bufsize * 4;  // > CustomCode.jszip:6393
    //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);  // > CustomCode.jszip:6394
    //s->pending_buf = (uchf *) overlay;  // > CustomCode.jszip:6395
    s.pending_buf = new utils.Buf8(s.pending_buf_size);  // > CustomCode.jszip:6396
    // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)  // > CustomCode.jszip:6397
    //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);  // > CustomCode.jszip:6398
    s.d_buf = 1 * s.lit_bufsize;  // > CustomCode.jszip:6399
    //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;  // > CustomCode.jszip:6400
    s.l_buf = (1 + 2) * s.lit_bufsize;  // > CustomCode.jszip:6401
    s.level = level;  // > CustomCode.jszip:6402
    s.strategy = strategy;  // > CustomCode.jszip:6403
    s.method = method;  // > CustomCode.jszip:6404
    return deflateReset(strm);  // > CustomCode.jszip:6405
  }  // > CustomCode.jszip:6406
  function deflateInit(strm, level) {  // > CustomCode.jszip:6407
    return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);  // > CustomCode.jszip:6408
  }  // > CustomCode.jszip:6409
  function deflate(strm, flush) {  // > CustomCode.jszip:6410
    var old_flush, s;  // > CustomCode.jszip:6411
    var beg, val; // for gzip header write only  // > CustomCode.jszip:6412
    if (!strm || !strm.state ||  // > CustomCode.jszip:6413
      flush > Z_BLOCK || flush < 0) {  // > CustomCode.jszip:6414
      return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;  // > CustomCode.jszip:6415
    }  // > CustomCode.jszip:6416
    s = strm.state;  // > CustomCode.jszip:6417
    if (!strm.output ||  // > CustomCode.jszip:6418
        (!strm.input && strm.avail_in !== 0) ||  // > CustomCode.jszip:6419
        (s.status === FINISH_STATE && flush !== Z_FINISH)) {  // > CustomCode.jszip:6420
      return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);  // > CustomCode.jszip:6421
    }  // > CustomCode.jszip:6422
    s.strm = strm; /* just in case */  // > CustomCode.jszip:6423
    old_flush = s.last_flush;  // > CustomCode.jszip:6424
    s.last_flush = flush;  // > CustomCode.jszip:6425
    /* Write the header */  // > CustomCode.jszip:6426
    if (s.status === INIT_STATE) {  // > CustomCode.jszip:6427
      if (s.wrap === 2) { // GZIP header  // > CustomCode.jszip:6428
        strm.adler = 0;  //crc32(0L, Z_NULL, 0);  // > CustomCode.jszip:6429
        put_byte(s, 31);  // > CustomCode.jszip:6430
        put_byte(s, 139);  // > CustomCode.jszip:6431
        put_byte(s, 8);  // > CustomCode.jszip:6432
        if (!s.gzhead) { // s->gzhead == Z_NULL  // > CustomCode.jszip:6433
          put_byte(s, 0);  // > CustomCode.jszip:6434
          put_byte(s, 0);  // > CustomCode.jszip:6435
          put_byte(s, 0);  // > CustomCode.jszip:6436
          put_byte(s, 0);  // > CustomCode.jszip:6437
          put_byte(s, 0);  // > CustomCode.jszip:6438
          put_byte(s, s.level === 9 ? 2 :  // > CustomCode.jszip:6439
                      (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?  // > CustomCode.jszip:6440
                       4 : 0));  // > CustomCode.jszip:6441
          put_byte(s, OS_CODE);  // > CustomCode.jszip:6442
          s.status = BUSY_STATE;  // > CustomCode.jszip:6443
        }  // > CustomCode.jszip:6444
        else {  // > CustomCode.jszip:6445
          put_byte(s, (s.gzhead.text ? 1 : 0) +  // > CustomCode.jszip:6446
                      (s.gzhead.hcrc ? 2 : 0) +  // > CustomCode.jszip:6447
                      (!s.gzhead.extra ? 0 : 4) +  // > CustomCode.jszip:6448
                      (!s.gzhead.name ? 0 : 8) +  // > CustomCode.jszip:6449
                      (!s.gzhead.comment ? 0 : 16)  // > CustomCode.jszip:6450
                  );  // > CustomCode.jszip:6451
          put_byte(s, s.gzhead.time & 0xff);  // > CustomCode.jszip:6452
          put_byte(s, (s.gzhead.time >> 8) & 0xff);  // > CustomCode.jszip:6453
          put_byte(s, (s.gzhead.time >> 16) & 0xff);  // > CustomCode.jszip:6454
          put_byte(s, (s.gzhead.time >> 24) & 0xff);  // > CustomCode.jszip:6455
          put_byte(s, s.level === 9 ? 2 :  // > CustomCode.jszip:6456
                      (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?  // > CustomCode.jszip:6457
                       4 : 0));  // > CustomCode.jszip:6458
          put_byte(s, s.gzhead.os & 0xff);  // > CustomCode.jszip:6459
          if (s.gzhead.extra && s.gzhead.extra.length) {  // > CustomCode.jszip:6460
            put_byte(s, s.gzhead.extra.length & 0xff);  // > CustomCode.jszip:6461
            put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);  // > CustomCode.jszip:6462
          }  // > CustomCode.jszip:6463
          if (s.gzhead.hcrc) {  // > CustomCode.jszip:6464
            strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);  // > CustomCode.jszip:6465
          }  // > CustomCode.jszip:6466
          s.gzindex = 0;  // > CustomCode.jszip:6467
          s.status = EXTRA_STATE;  // > CustomCode.jszip:6468
        }  // > CustomCode.jszip:6469
      }  // > CustomCode.jszip:6470
      else // DEFLATE header  // > CustomCode.jszip:6471
      {  // > CustomCode.jszip:6472
        var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;  // > CustomCode.jszip:6473
        var level_flags = -1;  // > CustomCode.jszip:6474
        if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {  // > CustomCode.jszip:6475
          level_flags = 0;  // > CustomCode.jszip:6476
        } else if (s.level < 6) {  // > CustomCode.jszip:6477
          level_flags = 1;  // > CustomCode.jszip:6478
        } else if (s.level === 6) {  // > CustomCode.jszip:6479
          level_flags = 2;  // > CustomCode.jszip:6480
        } else {  // > CustomCode.jszip:6481
          level_flags = 3;  // > CustomCode.jszip:6482
        }  // > CustomCode.jszip:6483
        header |= (level_flags << 6);  // > CustomCode.jszip:6484
        if (s.strstart !== 0) { header |= PRESET_DICT; }  // > CustomCode.jszip:6485
        header += 31 - (header % 31);  // > CustomCode.jszip:6486
        s.status = BUSY_STATE;  // > CustomCode.jszip:6487
        putShortMSB(s, header);  // > CustomCode.jszip:6488
        /* Save the adler32 of the preset dictionary: */  // > CustomCode.jszip:6489
        if (s.strstart !== 0) {  // > CustomCode.jszip:6490
          putShortMSB(s, strm.adler >>> 16);  // > CustomCode.jszip:6491
          putShortMSB(s, strm.adler & 0xffff);  // > CustomCode.jszip:6492
        }  // > CustomCode.jszip:6493
        strm.adler = 1; // adler32(0L, Z_NULL, 0);  // > CustomCode.jszip:6494
      }  // > CustomCode.jszip:6495
    }  // > CustomCode.jszip:6496
  //#ifdef GZIP  // > CustomCode.jszip:6497
    if (s.status === EXTRA_STATE) {  // > CustomCode.jszip:6498
      if (s.gzhead.extra/* != Z_NULL*/) {  // > CustomCode.jszip:6499
        beg = s.pending;  /* start of bytes to update crc */  // > CustomCode.jszip:6500
        while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {  // > CustomCode.jszip:6501
          if (s.pending === s.pending_buf_size) {  // > CustomCode.jszip:6502
            if (s.gzhead.hcrc && s.pending > beg) {  // > CustomCode.jszip:6503
              strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);  // > CustomCode.jszip:6504
            }  // > CustomCode.jszip:6505
            flush_pending(strm);  // > CustomCode.jszip:6506
            beg = s.pending;  // > CustomCode.jszip:6507
            if (s.pending === s.pending_buf_size) {  // > CustomCode.jszip:6508
              break;  // > CustomCode.jszip:6509
            }  // > CustomCode.jszip:6510
          }  // > CustomCode.jszip:6511
          put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);  // > CustomCode.jszip:6512
          s.gzindex++;  // > CustomCode.jszip:6513
        }  // > CustomCode.jszip:6514
        if (s.gzhead.hcrc && s.pending > beg) {  // > CustomCode.jszip:6515
          strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);  // > CustomCode.jszip:6516
        }  // > CustomCode.jszip:6517
        if (s.gzindex === s.gzhead.extra.length) {  // > CustomCode.jszip:6518
          s.gzindex = 0;  // > CustomCode.jszip:6519
          s.status = NAME_STATE;  // > CustomCode.jszip:6520
        }  // > CustomCode.jszip:6521
      }  // > CustomCode.jszip:6522
      else {  // > CustomCode.jszip:6523
        s.status = NAME_STATE;  // > CustomCode.jszip:6524
      }  // > CustomCode.jszip:6525
    }  // > CustomCode.jszip:6526
    if (s.status === NAME_STATE) {  // > CustomCode.jszip:6527
      if (s.gzhead.name/* != Z_NULL*/) {  // > CustomCode.jszip:6528
        beg = s.pending;  /* start of bytes to update crc */  // > CustomCode.jszip:6529
        //int val;  // > CustomCode.jszip:6530
        do {  // > CustomCode.jszip:6531
          if (s.pending === s.pending_buf_size) {  // > CustomCode.jszip:6532
            if (s.gzhead.hcrc && s.pending > beg) {  // > CustomCode.jszip:6533
              strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);  // > CustomCode.jszip:6534
            }  // > CustomCode.jszip:6535
            flush_pending(strm);  // > CustomCode.jszip:6536
            beg = s.pending;  // > CustomCode.jszip:6537
            if (s.pending === s.pending_buf_size) {  // > CustomCode.jszip:6538
              val = 1;  // > CustomCode.jszip:6539
              break;  // > CustomCode.jszip:6540
            }  // > CustomCode.jszip:6541
          }  // > CustomCode.jszip:6542
          // JS specific: little magic to add zero terminator to end of string  // > CustomCode.jszip:6543
          if (s.gzindex < s.gzhead.name.length) {  // > CustomCode.jszip:6544
            val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;  // > CustomCode.jszip:6545
          } else {  // > CustomCode.jszip:6546
            val = 0;  // > CustomCode.jszip:6547
          }  // > CustomCode.jszip:6548
          put_byte(s, val);  // > CustomCode.jszip:6549
        } while (val !== 0);  // > CustomCode.jszip:6550
        if (s.gzhead.hcrc && s.pending > beg) {  // > CustomCode.jszip:6551
          strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);  // > CustomCode.jszip:6552
        }  // > CustomCode.jszip:6553
        if (val === 0) {  // > CustomCode.jszip:6554
          s.gzindex = 0;  // > CustomCode.jszip:6555
          s.status = COMMENT_STATE;  // > CustomCode.jszip:6556
        }  // > CustomCode.jszip:6557
      }  // > CustomCode.jszip:6558
      else {  // > CustomCode.jszip:6559
        s.status = COMMENT_STATE;  // > CustomCode.jszip:6560
      }  // > CustomCode.jszip:6561
    }  // > CustomCode.jszip:6562
    if (s.status === COMMENT_STATE) {  // > CustomCode.jszip:6563
      if (s.gzhead.comment/* != Z_NULL*/) {  // > CustomCode.jszip:6564
        beg = s.pending;  /* start of bytes to update crc */  // > CustomCode.jszip:6565
        //int val;  // > CustomCode.jszip:6566
        do {  // > CustomCode.jszip:6567
          if (s.pending === s.pending_buf_size) {  // > CustomCode.jszip:6568
            if (s.gzhead.hcrc && s.pending > beg) {  // > CustomCode.jszip:6569
              strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);  // > CustomCode.jszip:6570
            }  // > CustomCode.jszip:6571
            flush_pending(strm);  // > CustomCode.jszip:6572
            beg = s.pending;  // > CustomCode.jszip:6573
            if (s.pending === s.pending_buf_size) {  // > CustomCode.jszip:6574
              val = 1;  // > CustomCode.jszip:6575
              break;  // > CustomCode.jszip:6576
            }  // > CustomCode.jszip:6577
          }  // > CustomCode.jszip:6578
          // JS specific: little magic to add zero terminator to end of string  // > CustomCode.jszip:6579
          if (s.gzindex < s.gzhead.comment.length) {  // > CustomCode.jszip:6580
            val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;  // > CustomCode.jszip:6581
          } else {  // > CustomCode.jszip:6582
            val = 0;  // > CustomCode.jszip:6583
          }  // > CustomCode.jszip:6584
          put_byte(s, val);  // > CustomCode.jszip:6585
        } while (val !== 0);  // > CustomCode.jszip:6586
        if (s.gzhead.hcrc && s.pending > beg) {  // > CustomCode.jszip:6587
          strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);  // > CustomCode.jszip:6588
        }  // > CustomCode.jszip:6589
        if (val === 0) {  // > CustomCode.jszip:6590
          s.status = HCRC_STATE;  // > CustomCode.jszip:6591
        }  // > CustomCode.jszip:6592
      }  // > CustomCode.jszip:6593
      else {  // > CustomCode.jszip:6594
        s.status = HCRC_STATE;  // > CustomCode.jszip:6595
      }  // > CustomCode.jszip:6596
    }  // > CustomCode.jszip:6597
    if (s.status === HCRC_STATE) {  // > CustomCode.jszip:6598
      if (s.gzhead.hcrc) {  // > CustomCode.jszip:6599
        if (s.pending + 2 > s.pending_buf_size) {  // > CustomCode.jszip:6600
          flush_pending(strm);  // > CustomCode.jszip:6601
        }  // > CustomCode.jszip:6602
        if (s.pending + 2 <= s.pending_buf_size) {  // > CustomCode.jszip:6603
          put_byte(s, strm.adler & 0xff);  // > CustomCode.jszip:6604
          put_byte(s, (strm.adler >> 8) & 0xff);  // > CustomCode.jszip:6605
          strm.adler = 0; //crc32(0L, Z_NULL, 0);  // > CustomCode.jszip:6606
          s.status = BUSY_STATE;  // > CustomCode.jszip:6607
        }  // > CustomCode.jszip:6608
      }  // > CustomCode.jszip:6609
      else {  // > CustomCode.jszip:6610
        s.status = BUSY_STATE;  // > CustomCode.jszip:6611
      }  // > CustomCode.jszip:6612
    }  // > CustomCode.jszip:6613
  //#endif  // > CustomCode.jszip:6614
    /* Flush as much pending output as possible */  // > CustomCode.jszip:6615
    if (s.pending !== 0) {  // > CustomCode.jszip:6616
      flush_pending(strm);  // > CustomCode.jszip:6617
      if (strm.avail_out === 0) {  // > CustomCode.jszip:6618
        /* Since avail_out is 0, deflate will be called again with  // > CustomCode.jszip:6619
         * more output space, but possibly with both pending and  // > CustomCode.jszip:6620
         * avail_in equal to zero. There won't be anything to do,  // > CustomCode.jszip:6621
         * but this is not an error situation so make sure we  // > CustomCode.jszip:6622
         * return OK instead of BUF_ERROR at next call of deflate:  // > CustomCode.jszip:6623
         */  // > CustomCode.jszip:6624
        s.last_flush = -1;  // > CustomCode.jszip:6625
        return Z_OK;  // > CustomCode.jszip:6626
      }  // > CustomCode.jszip:6627
      /* Make sure there is something to do and avoid duplicate consecutive  // > CustomCode.jszip:6628
       * flushes. For repeated and useless calls with Z_FINISH, we keep  // > CustomCode.jszip:6629
       * returning Z_STREAM_END instead of Z_BUF_ERROR.  // > CustomCode.jszip:6630
       */  // > CustomCode.jszip:6631
    } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&  // > CustomCode.jszip:6632
      flush !== Z_FINISH) {  // > CustomCode.jszip:6633
      return err(strm, Z_BUF_ERROR);  // > CustomCode.jszip:6634
    }  // > CustomCode.jszip:6635
    /* User must not provide more input after the first FINISH: */  // > CustomCode.jszip:6636
    if (s.status === FINISH_STATE && strm.avail_in !== 0) {  // > CustomCode.jszip:6637
      return err(strm, Z_BUF_ERROR);  // > CustomCode.jszip:6638
    }  // > CustomCode.jszip:6639
    /* Start a new block or continue the current one.  // > CustomCode.jszip:6640
     */  // > CustomCode.jszip:6641
    if (strm.avail_in !== 0 || s.lookahead !== 0 ||  // > CustomCode.jszip:6642
      (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {  // > CustomCode.jszip:6643
      var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :  // > CustomCode.jszip:6644
        (s.strategy === Z_RLE ? deflate_rle(s, flush) :  // > CustomCode.jszip:6645
          configuration_table[s.level].func(s, flush));  // > CustomCode.jszip:6646
      if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {  // > CustomCode.jszip:6647
        s.status = FINISH_STATE;  // > CustomCode.jszip:6648
      }  // > CustomCode.jszip:6649
      if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {  // > CustomCode.jszip:6650
        if (strm.avail_out === 0) {  // > CustomCode.jszip:6651
          s.last_flush = -1;  // > CustomCode.jszip:6652
          /* avoid BUF_ERROR next call, see above */  // > CustomCode.jszip:6653
        }  // > CustomCode.jszip:6654
        return Z_OK;  // > CustomCode.jszip:6655
        /* If flush != Z_NO_FLUSH && avail_out == 0, the next call  // > CustomCode.jszip:6656
         * of deflate should use the same flush parameter to make sure  // > CustomCode.jszip:6657
         * that the flush is complete. So we don't have to output an  // > CustomCode.jszip:6658
         * empty block here, this will be done at next call. This also  // > CustomCode.jszip:6659
         * ensures that for a very small output buffer, we emit at most  // > CustomCode.jszip:6660
         * one empty block.  // > CustomCode.jszip:6661
         */  // > CustomCode.jszip:6662
      }  // > CustomCode.jszip:6663
      if (bstate === BS_BLOCK_DONE) {  // > CustomCode.jszip:6664
        if (flush === Z_PARTIAL_FLUSH) {  // > CustomCode.jszip:6665
          trees._tr_align(s);  // > CustomCode.jszip:6666
        }  // > CustomCode.jszip:6667
        else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */  // > CustomCode.jszip:6668
          trees._tr_stored_block(s, 0, 0, false);  // > CustomCode.jszip:6669
          /* For a full flush, this empty block will be recognized  // > CustomCode.jszip:6670
           * as a special marker by inflate_sync().  // > CustomCode.jszip:6671
           */  // > CustomCode.jszip:6672
          if (flush === Z_FULL_FLUSH) {  // > CustomCode.jszip:6673
            /*** CLEAR_HASH(s); ***/             /* forget history */  // > CustomCode.jszip:6674
            zero(s.head); // Fill with NIL (= 0);  // > CustomCode.jszip:6675
            if (s.lookahead === 0) {  // > CustomCode.jszip:6676
              s.strstart = 0;  // > CustomCode.jszip:6677
              s.block_start = 0;  // > CustomCode.jszip:6678
              s.insert = 0;  // > CustomCode.jszip:6679
            }  // > CustomCode.jszip:6680
          }  // > CustomCode.jszip:6681
        }  // > CustomCode.jszip:6682
        flush_pending(strm);  // > CustomCode.jszip:6683
        if (strm.avail_out === 0) {  // > CustomCode.jszip:6684
          s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */  // > CustomCode.jszip:6685
          return Z_OK;  // > CustomCode.jszip:6686
        }  // > CustomCode.jszip:6687
      }  // > CustomCode.jszip:6688
    }  // > CustomCode.jszip:6689
    //Assert(strm->avail_out > 0, "bug2");  // > CustomCode.jszip:6690
    //if (strm.avail_out <= 0) { throw new Error("bug2");}  // > CustomCode.jszip:6691
    if (flush !== Z_FINISH) { return Z_OK; }  // > CustomCode.jszip:6692
    if (s.wrap <= 0) { return Z_STREAM_END; }  // > CustomCode.jszip:6693
    /* Write the trailer */  // > CustomCode.jszip:6694
    if (s.wrap === 2) {  // > CustomCode.jszip:6695
      put_byte(s, strm.adler & 0xff);  // > CustomCode.jszip:6696
      put_byte(s, (strm.adler >> 8) & 0xff);  // > CustomCode.jszip:6697
      put_byte(s, (strm.adler >> 16) & 0xff);  // > CustomCode.jszip:6698
      put_byte(s, (strm.adler >> 24) & 0xff);  // > CustomCode.jszip:6699
      put_byte(s, strm.total_in & 0xff);  // > CustomCode.jszip:6700
      put_byte(s, (strm.total_in >> 8) & 0xff);  // > CustomCode.jszip:6701
      put_byte(s, (strm.total_in >> 16) & 0xff);  // > CustomCode.jszip:6702
      put_byte(s, (strm.total_in >> 24) & 0xff);  // > CustomCode.jszip:6703
    }  // > CustomCode.jszip:6704
    else  // > CustomCode.jszip:6705
    {  // > CustomCode.jszip:6706
      putShortMSB(s, strm.adler >>> 16);  // > CustomCode.jszip:6707
      putShortMSB(s, strm.adler & 0xffff);  // > CustomCode.jszip:6708
    }  // > CustomCode.jszip:6709
    flush_pending(strm);  // > CustomCode.jszip:6710
    /* If avail_out is zero, the application will call deflate again  // > CustomCode.jszip:6711
     * to flush the rest.  // > CustomCode.jszip:6712
     */  // > CustomCode.jszip:6713
    if (s.wrap > 0) { s.wrap = -s.wrap; }  // > CustomCode.jszip:6714
    /* write the trailer only once! */  // > CustomCode.jszip:6715
    return s.pending !== 0 ? Z_OK : Z_STREAM_END;  // > CustomCode.jszip:6716
  }  // > CustomCode.jszip:6717
  function deflateEnd(strm) {  // > CustomCode.jszip:6718
    var status;  // > CustomCode.jszip:6719
    if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {  // > CustomCode.jszip:6720
      return Z_STREAM_ERROR;  // > CustomCode.jszip:6721
    }  // > CustomCode.jszip:6722
    status = strm.state.status;  // > CustomCode.jszip:6723
    if (status !== INIT_STATE &&  // > CustomCode.jszip:6724
      status !== EXTRA_STATE &&  // > CustomCode.jszip:6725
      status !== NAME_STATE &&  // > CustomCode.jszip:6726
      status !== COMMENT_STATE &&  // > CustomCode.jszip:6727
      status !== HCRC_STATE &&  // > CustomCode.jszip:6728
      status !== BUSY_STATE &&  // > CustomCode.jszip:6729
      status !== FINISH_STATE  // > CustomCode.jszip:6730
    ) {  // > CustomCode.jszip:6731
      return err(strm, Z_STREAM_ERROR);  // > CustomCode.jszip:6732
    }  // > CustomCode.jszip:6733
    strm.state = null;  // > CustomCode.jszip:6734
    return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;  // > CustomCode.jszip:6735
  }  // > CustomCode.jszip:6736
  /* =========================================================================  // > CustomCode.jszip:6737
   * Initializes the compression dictionary from the given byte  // > CustomCode.jszip:6738
   * sequence without producing any compressed output.  // > CustomCode.jszip:6739
   */  // > CustomCode.jszip:6740
  function deflateSetDictionary(strm, dictionary) {  // > CustomCode.jszip:6741
    var dictLength = dictionary.length;  // > CustomCode.jszip:6742
    var s;  // > CustomCode.jszip:6743
    var str, n;  // > CustomCode.jszip:6744
    var wrap;  // > CustomCode.jszip:6745
    var avail;  // > CustomCode.jszip:6746
    var next;  // > CustomCode.jszip:6747
    var input;  // > CustomCode.jszip:6748
    var tmpDict;  // > CustomCode.jszip:6749
    if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {  // > CustomCode.jszip:6750
      return Z_STREAM_ERROR;  // > CustomCode.jszip:6751
    }  // > CustomCode.jszip:6752
    s = strm.state;  // > CustomCode.jszip:6753
    wrap = s.wrap;  // > CustomCode.jszip:6754
    if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {  // > CustomCode.jszip:6755
      return Z_STREAM_ERROR;  // > CustomCode.jszip:6756
    }  // > CustomCode.jszip:6757
    /* when using zlib wrappers, compute Adler-32 for provided dictionary */  // > CustomCode.jszip:6758
    if (wrap === 1) {  // > CustomCode.jszip:6759
      /* adler32(strm->adler, dictionary, dictLength); */  // > CustomCode.jszip:6760
      strm.adler = adler32(strm.adler, dictionary, dictLength, 0);  // > CustomCode.jszip:6761
    }  // > CustomCode.jszip:6762
    s.wrap = 0;   /* avoid computing Adler-32 in read_buf */  // > CustomCode.jszip:6763
    /* if dictionary would fill window, just replace the history */  // > CustomCode.jszip:6764
    if (dictLength >= s.w_size) {  // > CustomCode.jszip:6765
      if (wrap === 0) {            /* already empty otherwise */  // > CustomCode.jszip:6766
        /*** CLEAR_HASH(s); ***/  // > CustomCode.jszip:6767
        zero(s.head); // Fill with NIL (= 0);  // > CustomCode.jszip:6768
        s.strstart = 0;  // > CustomCode.jszip:6769
        s.block_start = 0;  // > CustomCode.jszip:6770
        s.insert = 0;  // > CustomCode.jszip:6771
      }  // > CustomCode.jszip:6772
      /* use the tail */  // > CustomCode.jszip:6773
      // dictionary = dictionary.slice(dictLength - s.w_size);  // > CustomCode.jszip:6774
      tmpDict = new utils.Buf8(s.w_size);  // > CustomCode.jszip:6775
      utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);  // > CustomCode.jszip:6776
      dictionary = tmpDict;  // > CustomCode.jszip:6777
      dictLength = s.w_size;  // > CustomCode.jszip:6778
    }  // > CustomCode.jszip:6779
    /* insert dictionary into window and hash */  // > CustomCode.jszip:6780
    avail = strm.avail_in;  // > CustomCode.jszip:6781
    next = strm.next_in;  // > CustomCode.jszip:6782
    input = strm.input;  // > CustomCode.jszip:6783
    strm.avail_in = dictLength;  // > CustomCode.jszip:6784
    strm.next_in = 0;  // > CustomCode.jszip:6785
    strm.input = dictionary;  // > CustomCode.jszip:6786
    fill_window(s);  // > CustomCode.jszip:6787
    while (s.lookahead >= MIN_MATCH) {  // > CustomCode.jszip:6788
      str = s.strstart;  // > CustomCode.jszip:6789
      n = s.lookahead - (MIN_MATCH - 1);  // > CustomCode.jszip:6790
      do {  // > CustomCode.jszip:6791
        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */  // > CustomCode.jszip:6792
        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;  // > CustomCode.jszip:6793
        s.prev[str & s.w_mask] = s.head[s.ins_h];  // > CustomCode.jszip:6794
        s.head[s.ins_h] = str;  // > CustomCode.jszip:6795
        str++;  // > CustomCode.jszip:6796
      } while (--n);  // > CustomCode.jszip:6797
      s.strstart = str;  // > CustomCode.jszip:6798
      s.lookahead = MIN_MATCH - 1;  // > CustomCode.jszip:6799
      fill_window(s);  // > CustomCode.jszip:6800
    }  // > CustomCode.jszip:6801
    s.strstart += s.lookahead;  // > CustomCode.jszip:6802
    s.block_start = s.strstart;  // > CustomCode.jszip:6803
    s.insert = s.lookahead;  // > CustomCode.jszip:6804
    s.lookahead = 0;  // > CustomCode.jszip:6805
    s.match_length = s.prev_length = MIN_MATCH - 1;  // > CustomCode.jszip:6806
    s.match_available = 0;  // > CustomCode.jszip:6807
    strm.next_in = next;  // > CustomCode.jszip:6808
    strm.input = input;  // > CustomCode.jszip:6809
    strm.avail_in = avail;  // > CustomCode.jszip:6810
    s.wrap = wrap;  // > CustomCode.jszip:6811
    return Z_OK;  // > CustomCode.jszip:6812
  }  // > CustomCode.jszip:6813
  exports.deflateInit = deflateInit;  // > CustomCode.jszip:6814
  exports.deflateInit2 = deflateInit2;  // > CustomCode.jszip:6815
  exports.deflateReset = deflateReset;  // > CustomCode.jszip:6816
  exports.deflateResetKeep = deflateResetKeep;  // > CustomCode.jszip:6817
  exports.deflateSetHeader = deflateSetHeader;  // > CustomCode.jszip:6818
  exports.deflate = deflate;  // > CustomCode.jszip:6819
  exports.deflateEnd = deflateEnd;  // > CustomCode.jszip:6820
  exports.deflateSetDictionary = deflateSetDictionary;  // > CustomCode.jszip:6821
  exports.deflateInfo = 'pako deflate (from Nodeca project)';  // > CustomCode.jszip:6822
  /* Not implemented  // > CustomCode.jszip:6823
  exports.deflateBound = deflateBound;  // > CustomCode.jszip:6824
  exports.deflateCopy = deflateCopy;  // > CustomCode.jszip:6825
  exports.deflateParams = deflateParams;  // > CustomCode.jszip:6826
  exports.deflatePending = deflatePending;  // > CustomCode.jszip:6827
  exports.deflatePrime = deflatePrime;  // > CustomCode.jszip:6828
  exports.deflateTune = deflateTune;  // > CustomCode.jszip:6829
  */  // > CustomCode.jszip:6830
  },{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(require,module,exports){  // > CustomCode.jszip:6831
  'use strict';  // > CustomCode.jszip:6832
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:6833
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:6834
  //  // > CustomCode.jszip:6835
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:6836
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:6837
  // arising from the use of this software.  // > CustomCode.jszip:6838
  //  // > CustomCode.jszip:6839
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:6840
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:6841
  // freely, subject to the following restrictions:  // > CustomCode.jszip:6842
  //  // > CustomCode.jszip:6843
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:6844
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:6845
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:6846
  //   appreciated but is not required.  // > CustomCode.jszip:6847
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:6848
  //   misrepresented as being the original software.  // > CustomCode.jszip:6849
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:6850
  function GZheader() {  // > CustomCode.jszip:6851
    /* true if compressed data believed to be text */  // > CustomCode.jszip:6852
    this.text       = 0;  // > CustomCode.jszip:6853
    /* modification time */  // > CustomCode.jszip:6854
    this.time       = 0;  // > CustomCode.jszip:6855
    /* extra flags (not used when writing a gzip file) */  // > CustomCode.jszip:6856
    this.xflags     = 0;  // > CustomCode.jszip:6857
    /* operating system */  // > CustomCode.jszip:6858
    this.os         = 0;  // > CustomCode.jszip:6859
    /* pointer to extra field or Z_NULL if none */  // > CustomCode.jszip:6860
    this.extra      = null;  // > CustomCode.jszip:6861
    /* extra field length (valid if extra != Z_NULL) */  // > CustomCode.jszip:6862
    this.extra_len  = 0; // Actually, we don't need it in JS,  // > CustomCode.jszip:6863
                         // but leave for few code modifications  // > CustomCode.jszip:6864
    //  // > CustomCode.jszip:6865
    // Setup limits is not necessary because in js we should not preallocate memory  // > CustomCode.jszip:6866
    // for inflate use constant limit in 65536 bytes  // > CustomCode.jszip:6867
    //  // > CustomCode.jszip:6868
    /* space at extra (only when reading header) */  // > CustomCode.jszip:6869
    // this.extra_max  = 0;  // > CustomCode.jszip:6870
    /* pointer to zero-terminated file name or Z_NULL */  // > CustomCode.jszip:6871
    this.name       = '';  // > CustomCode.jszip:6872
    /* space at name (only when reading header) */  // > CustomCode.jszip:6873
    // this.name_max   = 0;  // > CustomCode.jszip:6874
    /* pointer to zero-terminated comment or Z_NULL */  // > CustomCode.jszip:6875
    this.comment    = '';  // > CustomCode.jszip:6876
    /* space at comment (only when reading header) */  // > CustomCode.jszip:6877
    // this.comm_max   = 0;  // > CustomCode.jszip:6878
    /* true if there was or will be a header crc */  // > CustomCode.jszip:6879
    this.hcrc       = 0;  // > CustomCode.jszip:6880
    /* true when done reading gzip header (not used when writing a gzip file) */  // > CustomCode.jszip:6881
    this.done       = false;  // > CustomCode.jszip:6882
  }  // > CustomCode.jszip:6883
  module.exports = GZheader;  // > CustomCode.jszip:6884
  },{}],48:[function(require,module,exports){  // > CustomCode.jszip:6885
  'use strict';  // > CustomCode.jszip:6886
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:6887
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:6888
  //  // > CustomCode.jszip:6889
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:6890
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:6891
  // arising from the use of this software.  // > CustomCode.jszip:6892
  //  // > CustomCode.jszip:6893
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:6894
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:6895
  // freely, subject to the following restrictions:  // > CustomCode.jszip:6896
  //  // > CustomCode.jszip:6897
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:6898
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:6899
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:6900
  //   appreciated but is not required.  // > CustomCode.jszip:6901
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:6902
  //   misrepresented as being the original software.  // > CustomCode.jszip:6903
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:6904
  // See state defs from inflate.js  // > CustomCode.jszip:6905
  var BAD = 30;       /* got a data error -- remain here until reset */  // > CustomCode.jszip:6906
  var TYPE = 12;      /* i: waiting for type bits, including last-flag bit */  // > CustomCode.jszip:6907
  /*  // > CustomCode.jszip:6908
     Decode literal, length, and distance codes and write out the resulting  // > CustomCode.jszip:6909
     literal and match bytes until either not enough input or output is  // > CustomCode.jszip:6910
     available, an end-of-block is encountered, or a data error is encountered.  // > CustomCode.jszip:6911
     When large enough input and output buffers are supplied to inflate(), for  // > CustomCode.jszip:6912
     example, a 16K input buffer and a 64K output buffer, more than 95% of the  // > CustomCode.jszip:6913
     inflate execution time is spent in this routine.  // > CustomCode.jszip:6914
     Entry assumptions:  // > CustomCode.jszip:6915
          state.mode === LEN  // > CustomCode.jszip:6916
          strm.avail_in >= 6  // > CustomCode.jszip:6917
          strm.avail_out >= 258  // > CustomCode.jszip:6918
          start >= strm.avail_out  // > CustomCode.jszip:6919
          state.bits < 8  // > CustomCode.jszip:6920
     On return, state.mode is one of:  // > CustomCode.jszip:6921
          LEN -- ran out of enough output space or enough available input  // > CustomCode.jszip:6922
          TYPE -- reached end of block code, inflate() to interpret next block  // > CustomCode.jszip:6923
          BAD -- error in block data  // > CustomCode.jszip:6924
     Notes:  // > CustomCode.jszip:6925
      - The maximum input bits used by a length/distance pair is 15 bits for the  // > CustomCode.jszip:6926
        length code, 5 bits for the length extra, 15 bits for the distance code,  // > CustomCode.jszip:6927
        and 13 bits for the distance extra.  This totals 48 bits, or six bytes.  // > CustomCode.jszip:6928
        Therefore if strm.avail_in >= 6, then there is enough input to avoid  // > CustomCode.jszip:6929
        checking for available input while decoding.  // > CustomCode.jszip:6930
      - The maximum bytes that a single length/distance pair can output is 258  // > CustomCode.jszip:6931
        bytes, which is the maximum length that can be coded.  inflate_fast()  // > CustomCode.jszip:6932
        requires strm.avail_out >= 258 for each loop to avoid checking for  // > CustomCode.jszip:6933
        output space.  // > CustomCode.jszip:6934
   */  // > CustomCode.jszip:6935
  module.exports = function inflate_fast(strm, start) {  // > CustomCode.jszip:6936
    var state;  // > CustomCode.jszip:6937
    var _in;                    /* local strm.input */  // > CustomCode.jszip:6938
    var last;                   /* have enough input while in < last */  // > CustomCode.jszip:6939
    var _out;                   /* local strm.output */  // > CustomCode.jszip:6940
    var beg;                    /* inflate()'s initial strm.output */  // > CustomCode.jszip:6941
    var end;                    /* while out < end, enough space available */  // > CustomCode.jszip:6942
  //#ifdef INFLATE_STRICT  // > CustomCode.jszip:6943
    var dmax;                   /* maximum distance from zlib header */  // > CustomCode.jszip:6944
  //#endif  // > CustomCode.jszip:6945
    var wsize;                  /* window size or zero if not using window */  // > CustomCode.jszip:6946
    var whave;                  /* valid bytes in the window */  // > CustomCode.jszip:6947
    var wnext;                  /* window write index */  // > CustomCode.jszip:6948
    // Use `s_window` instead `window`, avoid conflict with instrumentation tools  // > CustomCode.jszip:6949
    var s_window;               /* allocated sliding window, if wsize != 0 */  // > CustomCode.jszip:6950
    var hold;                   /* local strm.hold */  // > CustomCode.jszip:6951
    var bits;                   /* local strm.bits */  // > CustomCode.jszip:6952
    var lcode;                  /* local strm.lencode */  // > CustomCode.jszip:6953
    var dcode;                  /* local strm.distcode */  // > CustomCode.jszip:6954
    var lmask;                  /* mask for first level of length codes */  // > CustomCode.jszip:6955
    var dmask;                  /* mask for first level of distance codes */  // > CustomCode.jszip:6956
    var here;                   /* retrieved table entry */  // > CustomCode.jszip:6957
    var op;                     /* code bits, operation, extra bits, or */  // > CustomCode.jszip:6958
                                /*  window position, window bytes to copy */  // > CustomCode.jszip:6959
    var len;                    /* match length, unused bytes */  // > CustomCode.jszip:6960
    var dist;                   /* match distance */  // > CustomCode.jszip:6961
    var from;                   /* where to copy match from */  // > CustomCode.jszip:6962
    var from_source;  // > CustomCode.jszip:6963
    var input, output; // JS specific, because we have no pointers  // > CustomCode.jszip:6964
    /* copy state to local variables */  // > CustomCode.jszip:6965
    state = strm.state;  // > CustomCode.jszip:6966
    //here = state.here;  // > CustomCode.jszip:6967
    _in = strm.next_in;  // > CustomCode.jszip:6968
    input = strm.input;  // > CustomCode.jszip:6969
    last = _in + (strm.avail_in - 5);  // > CustomCode.jszip:6970
    _out = strm.next_out;  // > CustomCode.jszip:6971
    output = strm.output;  // > CustomCode.jszip:6972
    beg = _out - (start - strm.avail_out);  // > CustomCode.jszip:6973
    end = _out + (strm.avail_out - 257);  // > CustomCode.jszip:6974
  //#ifdef INFLATE_STRICT  // > CustomCode.jszip:6975
    dmax = state.dmax;  // > CustomCode.jszip:6976
  //#endif  // > CustomCode.jszip:6977
    wsize = state.wsize;  // > CustomCode.jszip:6978
    whave = state.whave;  // > CustomCode.jszip:6979
    wnext = state.wnext;  // > CustomCode.jszip:6980
    s_window = state.window;  // > CustomCode.jszip:6981
    hold = state.hold;  // > CustomCode.jszip:6982
    bits = state.bits;  // > CustomCode.jszip:6983
    lcode = state.lencode;  // > CustomCode.jszip:6984
    dcode = state.distcode;  // > CustomCode.jszip:6985
    lmask = (1 << state.lenbits) - 1;  // > CustomCode.jszip:6986
    dmask = (1 << state.distbits) - 1;  // > CustomCode.jszip:6987
    /* decode literals and length/distances until end-of-block or not enough  // > CustomCode.jszip:6988
       input data or output space */  // > CustomCode.jszip:6989
    top:  // > CustomCode.jszip:6990
    do {  // > CustomCode.jszip:6991
      if (bits < 15) {  // > CustomCode.jszip:6992
        hold += input[_in++] << bits;  // > CustomCode.jszip:6993
        bits += 8;  // > CustomCode.jszip:6994
        hold += input[_in++] << bits;  // > CustomCode.jszip:6995
        bits += 8;  // > CustomCode.jszip:6996
      }  // > CustomCode.jszip:6997
      here = lcode[hold & lmask];  // > CustomCode.jszip:6998
      dolen:  // > CustomCode.jszip:6999
      for (;;) { // Goto emulation  // > CustomCode.jszip:7000
        op = here >>> 24/*here.bits*/;  // > CustomCode.jszip:7001
        hold >>>= op;  // > CustomCode.jszip:7002
        bits -= op;  // > CustomCode.jszip:7003
        op = (here >>> 16) & 0xff/*here.op*/;  // > CustomCode.jszip:7004
        if (op === 0) {                          /* literal */  // > CustomCode.jszip:7005
          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?  // > CustomCode.jszip:7006
          //        "inflate:         literal '%c'\n" :  // > CustomCode.jszip:7007
          //        "inflate:         literal 0x%02x\n", here.val));  // > CustomCode.jszip:7008
          output[_out++] = here & 0xffff/*here.val*/;  // > CustomCode.jszip:7009
        }  // > CustomCode.jszip:7010
        else if (op & 16) {                     /* length base */  // > CustomCode.jszip:7011
          len = here & 0xffff/*here.val*/;  // > CustomCode.jszip:7012
          op &= 15;                           /* number of extra bits */  // > CustomCode.jszip:7013
          if (op) {  // > CustomCode.jszip:7014
            if (bits < op) {  // > CustomCode.jszip:7015
              hold += input[_in++] << bits;  // > CustomCode.jszip:7016
              bits += 8;  // > CustomCode.jszip:7017
            }  // > CustomCode.jszip:7018
            len += hold & ((1 << op) - 1);  // > CustomCode.jszip:7019
            hold >>>= op;  // > CustomCode.jszip:7020
            bits -= op;  // > CustomCode.jszip:7021
          }  // > CustomCode.jszip:7022
          //Tracevv((stderr, "inflate:         length %u\n", len));  // > CustomCode.jszip:7023
          if (bits < 15) {  // > CustomCode.jszip:7024
            hold += input[_in++] << bits;  // > CustomCode.jszip:7025
            bits += 8;  // > CustomCode.jszip:7026
            hold += input[_in++] << bits;  // > CustomCode.jszip:7027
            bits += 8;  // > CustomCode.jszip:7028
          }  // > CustomCode.jszip:7029
          here = dcode[hold & dmask];  // > CustomCode.jszip:7030
          dodist:  // > CustomCode.jszip:7031
          for (;;) { // goto emulation  // > CustomCode.jszip:7032
            op = here >>> 24/*here.bits*/;  // > CustomCode.jszip:7033
            hold >>>= op;  // > CustomCode.jszip:7034
            bits -= op;  // > CustomCode.jszip:7035
            op = (here >>> 16) & 0xff/*here.op*/;  // > CustomCode.jszip:7036
            if (op & 16) {                      /* distance base */  // > CustomCode.jszip:7037
              dist = here & 0xffff/*here.val*/;  // > CustomCode.jszip:7038
              op &= 15;                       /* number of extra bits */  // > CustomCode.jszip:7039
              if (bits < op) {  // > CustomCode.jszip:7040
                hold += input[_in++] << bits;  // > CustomCode.jszip:7041
                bits += 8;  // > CustomCode.jszip:7042
                if (bits < op) {  // > CustomCode.jszip:7043
                  hold += input[_in++] << bits;  // > CustomCode.jszip:7044
                  bits += 8;  // > CustomCode.jszip:7045
                }  // > CustomCode.jszip:7046
              }  // > CustomCode.jszip:7047
              dist += hold & ((1 << op) - 1);  // > CustomCode.jszip:7048
  //#ifdef INFLATE_STRICT  // > CustomCode.jszip:7049
              if (dist > dmax) {  // > CustomCode.jszip:7050
                strm.msg = 'invalid distance too far back';  // > CustomCode.jszip:7051
                state.mode = BAD;  // > CustomCode.jszip:7052
                break top;  // > CustomCode.jszip:7053
              }  // > CustomCode.jszip:7054
  //#endif  // > CustomCode.jszip:7055
              hold >>>= op;  // > CustomCode.jszip:7056
              bits -= op;  // > CustomCode.jszip:7057
              //Tracevv((stderr, "inflate:         distance %u\n", dist));  // > CustomCode.jszip:7058
              op = _out - beg;                /* max distance in output */  // > CustomCode.jszip:7059
              if (dist > op) {                /* see if copy from window */  // > CustomCode.jszip:7060
                op = dist - op;               /* distance back in window */  // > CustomCode.jszip:7061
                if (op > whave) {  // > CustomCode.jszip:7062
                  if (state.sane) {  // > CustomCode.jszip:7063
                    strm.msg = 'invalid distance too far back';  // > CustomCode.jszip:7064
                    state.mode = BAD;  // > CustomCode.jszip:7065
                    break top;  // > CustomCode.jszip:7066
                  }  // > CustomCode.jszip:7067
  // (!) This block is disabled in zlib defailts,  // > CustomCode.jszip:7068
  // don't enable it for binary compatibility  // > CustomCode.jszip:7069
  //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR  // > CustomCode.jszip:7070
  //                if (len <= op - whave) {  // > CustomCode.jszip:7071
  //                  do {  // > CustomCode.jszip:7072
  //                    output[_out++] = 0;  // > CustomCode.jszip:7073
  //                  } while (--len);  // > CustomCode.jszip:7074
  //                  continue top;  // > CustomCode.jszip:7075
  //                }  // > CustomCode.jszip:7076
  //                len -= op - whave;  // > CustomCode.jszip:7077
  //                do {  // > CustomCode.jszip:7078
  //                  output[_out++] = 0;  // > CustomCode.jszip:7079
  //                } while (--op > whave);  // > CustomCode.jszip:7080
  //                if (op === 0) {  // > CustomCode.jszip:7081
  //                  from = _out - dist;  // > CustomCode.jszip:7082
  //                  do {  // > CustomCode.jszip:7083
  //                    output[_out++] = output[from++];  // > CustomCode.jszip:7084
  //                  } while (--len);  // > CustomCode.jszip:7085
  //                  continue top;  // > CustomCode.jszip:7086
  //                }  // > CustomCode.jszip:7087
  //#endif  // > CustomCode.jszip:7088
                }  // > CustomCode.jszip:7089
                from = 0; // window index  // > CustomCode.jszip:7090
                from_source = s_window;  // > CustomCode.jszip:7091
                if (wnext === 0) {           /* very common case */  // > CustomCode.jszip:7092
                  from += wsize - op;  // > CustomCode.jszip:7093
                  if (op < len) {         /* some from window */  // > CustomCode.jszip:7094
                    len -= op;  // > CustomCode.jszip:7095
                    do {  // > CustomCode.jszip:7096
                      output[_out++] = s_window[from++];  // > CustomCode.jszip:7097
                    } while (--op);  // > CustomCode.jszip:7098
                    from = _out - dist;  /* rest from output */  // > CustomCode.jszip:7099
                    from_source = output;  // > CustomCode.jszip:7100
                  }  // > CustomCode.jszip:7101
                }  // > CustomCode.jszip:7102
                else if (wnext < op) {      /* wrap around window */  // > CustomCode.jszip:7103
                  from += wsize + wnext - op;  // > CustomCode.jszip:7104
                  op -= wnext;  // > CustomCode.jszip:7105
                  if (op < len) {         /* some from end of window */  // > CustomCode.jszip:7106
                    len -= op;  // > CustomCode.jszip:7107
                    do {  // > CustomCode.jszip:7108
                      output[_out++] = s_window[from++];  // > CustomCode.jszip:7109
                    } while (--op);  // > CustomCode.jszip:7110
                    from = 0;  // > CustomCode.jszip:7111
                    if (wnext < len) {  /* some from start of window */  // > CustomCode.jszip:7112
                      op = wnext;  // > CustomCode.jszip:7113
                      len -= op;  // > CustomCode.jszip:7114
                      do {  // > CustomCode.jszip:7115
                        output[_out++] = s_window[from++];  // > CustomCode.jszip:7116
                      } while (--op);  // > CustomCode.jszip:7117
                      from = _out - dist;      /* rest from output */  // > CustomCode.jszip:7118
                      from_source = output;  // > CustomCode.jszip:7119
                    }  // > CustomCode.jszip:7120
                  }  // > CustomCode.jszip:7121
                }  // > CustomCode.jszip:7122
                else {                      /* contiguous in window */  // > CustomCode.jszip:7123
                  from += wnext - op;  // > CustomCode.jszip:7124
                  if (op < len) {         /* some from window */  // > CustomCode.jszip:7125
                    len -= op;  // > CustomCode.jszip:7126
                    do {  // > CustomCode.jszip:7127
                      output[_out++] = s_window[from++];  // > CustomCode.jszip:7128
                    } while (--op);  // > CustomCode.jszip:7129
                    from = _out - dist;  /* rest from output */  // > CustomCode.jszip:7130
                    from_source = output;  // > CustomCode.jszip:7131
                  }  // > CustomCode.jszip:7132
                }  // > CustomCode.jszip:7133
                while (len > 2) {  // > CustomCode.jszip:7134
                  output[_out++] = from_source[from++];  // > CustomCode.jszip:7135
                  output[_out++] = from_source[from++];  // > CustomCode.jszip:7136
                  output[_out++] = from_source[from++];  // > CustomCode.jszip:7137
                  len -= 3;  // > CustomCode.jszip:7138
                }  // > CustomCode.jszip:7139
                if (len) {  // > CustomCode.jszip:7140
                  output[_out++] = from_source[from++];  // > CustomCode.jszip:7141
                  if (len > 1) {  // > CustomCode.jszip:7142
                    output[_out++] = from_source[from++];  // > CustomCode.jszip:7143
                  }  // > CustomCode.jszip:7144
                }  // > CustomCode.jszip:7145
              }  // > CustomCode.jszip:7146
              else {  // > CustomCode.jszip:7147
                from = _out - dist;          /* copy direct from output */  // > CustomCode.jszip:7148
                do {                        /* minimum length is three */  // > CustomCode.jszip:7149
                  output[_out++] = output[from++];  // > CustomCode.jszip:7150
                  output[_out++] = output[from++];  // > CustomCode.jszip:7151
                  output[_out++] = output[from++];  // > CustomCode.jszip:7152
                  len -= 3;  // > CustomCode.jszip:7153
                } while (len > 2);  // > CustomCode.jszip:7154
                if (len) {  // > CustomCode.jszip:7155
                  output[_out++] = output[from++];  // > CustomCode.jszip:7156
                  if (len > 1) {  // > CustomCode.jszip:7157
                    output[_out++] = output[from++];  // > CustomCode.jszip:7158
                  }  // > CustomCode.jszip:7159
                }  // > CustomCode.jszip:7160
              }  // > CustomCode.jszip:7161
            }  // > CustomCode.jszip:7162
            else if ((op & 64) === 0) {          /* 2nd level distance code */  // > CustomCode.jszip:7163
              here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];  // > CustomCode.jszip:7164
              continue dodist;  // > CustomCode.jszip:7165
            }  // > CustomCode.jszip:7166
            else {  // > CustomCode.jszip:7167
              strm.msg = 'invalid distance code';  // > CustomCode.jszip:7168
              state.mode = BAD;  // > CustomCode.jszip:7169
              break top;  // > CustomCode.jszip:7170
            }  // > CustomCode.jszip:7171
            break; // need to emulate goto via "continue"  // > CustomCode.jszip:7172
          }  // > CustomCode.jszip:7173
        }  // > CustomCode.jszip:7174
        else if ((op & 64) === 0) {              /* 2nd level length code */  // > CustomCode.jszip:7175
          here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];  // > CustomCode.jszip:7176
          continue dolen;  // > CustomCode.jszip:7177
        }  // > CustomCode.jszip:7178
        else if (op & 32) {                     /* end-of-block */  // > CustomCode.jszip:7179
          //Tracevv((stderr, "inflate:         end of block\n"));  // > CustomCode.jszip:7180
          state.mode = TYPE;  // > CustomCode.jszip:7181
          break top;  // > CustomCode.jszip:7182
        }  // > CustomCode.jszip:7183
        else {  // > CustomCode.jszip:7184
          strm.msg = 'invalid literal/length code';  // > CustomCode.jszip:7185
          state.mode = BAD;  // > CustomCode.jszip:7186
          break top;  // > CustomCode.jszip:7187
        }  // > CustomCode.jszip:7188
        break; // need to emulate goto via "continue"  // > CustomCode.jszip:7189
      }  // > CustomCode.jszip:7190
    } while (_in < last && _out < end);  // > CustomCode.jszip:7191
    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */  // > CustomCode.jszip:7192
    len = bits >> 3;  // > CustomCode.jszip:7193
    _in -= len;  // > CustomCode.jszip:7194
    bits -= len << 3;  // > CustomCode.jszip:7195
    hold &= (1 << bits) - 1;  // > CustomCode.jszip:7196
    /* update state and return */  // > CustomCode.jszip:7197
    strm.next_in = _in;  // > CustomCode.jszip:7198
    strm.next_out = _out;  // > CustomCode.jszip:7199
    strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));  // > CustomCode.jszip:7200
    strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));  // > CustomCode.jszip:7201
    state.hold = hold;  // > CustomCode.jszip:7202
    state.bits = bits;  // > CustomCode.jszip:7203
    return;  // > CustomCode.jszip:7204
  };  // > CustomCode.jszip:7205
  },{}],49:[function(require,module,exports){  // > CustomCode.jszip:7206
  'use strict';  // > CustomCode.jszip:7207
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:7208
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:7209
  //  // > CustomCode.jszip:7210
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:7211
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:7212
  // arising from the use of this software.  // > CustomCode.jszip:7213
  //  // > CustomCode.jszip:7214
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:7215
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:7216
  // freely, subject to the following restrictions:  // > CustomCode.jszip:7217
  //  // > CustomCode.jszip:7218
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:7219
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:7220
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:7221
  //   appreciated but is not required.  // > CustomCode.jszip:7222
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:7223
  //   misrepresented as being the original software.  // > CustomCode.jszip:7224
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:7225
  var utils         = require('../utils/common');  // > CustomCode.jszip:7226
  var adler32       = require('./adler32');  // > CustomCode.jszip:7227
  var crc32         = require('./crc32');  // > CustomCode.jszip:7228
  var inflate_fast  = require('./inffast');  // > CustomCode.jszip:7229
  var inflate_table = require('./inftrees');  // > CustomCode.jszip:7230
  var CODES = 0;  // > CustomCode.jszip:7231
  var LENS = 1;  // > CustomCode.jszip:7232
  var DISTS = 2;  // > CustomCode.jszip:7233
  /* Public constants ==========================================================*/  // > CustomCode.jszip:7234
  /* ===========================================================================*/  // > CustomCode.jszip:7235
  /* Allowed flush values; see deflate() and inflate() below for details */  // > CustomCode.jszip:7236
  //var Z_NO_FLUSH      = 0;  // > CustomCode.jszip:7237
  //var Z_PARTIAL_FLUSH = 1;  // > CustomCode.jszip:7238
  //var Z_SYNC_FLUSH    = 2;  // > CustomCode.jszip:7239
  //var Z_FULL_FLUSH    = 3;  // > CustomCode.jszip:7240
  var Z_FINISH        = 4;  // > CustomCode.jszip:7241
  var Z_BLOCK         = 5;  // > CustomCode.jszip:7242
  var Z_TREES         = 6;  // > CustomCode.jszip:7243
  /* Return codes for the compression/decompression functions. Negative values  // > CustomCode.jszip:7244
   * are errors, positive values are used for special but normal events.  // > CustomCode.jszip:7245
   */  // > CustomCode.jszip:7246
  var Z_OK            = 0;  // > CustomCode.jszip:7247
  var Z_STREAM_END    = 1;  // > CustomCode.jszip:7248
  var Z_NEED_DICT     = 2;  // > CustomCode.jszip:7249
  //var Z_ERRNO         = -1;  // > CustomCode.jszip:7250
  var Z_STREAM_ERROR  = -2;  // > CustomCode.jszip:7251
  var Z_DATA_ERROR    = -3;  // > CustomCode.jszip:7252
  var Z_MEM_ERROR     = -4;  // > CustomCode.jszip:7253
  var Z_BUF_ERROR     = -5;  // > CustomCode.jszip:7254
  //var Z_VERSION_ERROR = -6;  // > CustomCode.jszip:7255
  /* The deflate compression method */  // > CustomCode.jszip:7256
  var Z_DEFLATED  = 8;  // > CustomCode.jszip:7257
  /* STATES ====================================================================*/  // > CustomCode.jszip:7258
  /* ===========================================================================*/  // > CustomCode.jszip:7259
  var    HEAD = 1;       /* i: waiting for magic header */  // > CustomCode.jszip:7260
  var    FLAGS = 2;      /* i: waiting for method and flags (gzip) */  // > CustomCode.jszip:7261
  var    TIME = 3;       /* i: waiting for modification time (gzip) */  // > CustomCode.jszip:7262
  var    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */  // > CustomCode.jszip:7263
  var    EXLEN = 5;      /* i: waiting for extra length (gzip) */  // > CustomCode.jszip:7264
  var    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */  // > CustomCode.jszip:7265
  var    NAME = 7;       /* i: waiting for end of file name (gzip) */  // > CustomCode.jszip:7266
  var    COMMENT = 8;    /* i: waiting for end of comment (gzip) */  // > CustomCode.jszip:7267
  var    HCRC = 9;       /* i: waiting for header crc (gzip) */  // > CustomCode.jszip:7268
  var    DICTID = 10;    /* i: waiting for dictionary check value */  // > CustomCode.jszip:7269
  var    DICT = 11;      /* waiting for inflateSetDictionary() call */  // > CustomCode.jszip:7270
  var        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */  // > CustomCode.jszip:7271
  var        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */  // > CustomCode.jszip:7272
  var        STORED = 14;    /* i: waiting for stored size (length and complement) */  // > CustomCode.jszip:7273
  var        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */  // > CustomCode.jszip:7274
  var        COPY = 16;      /* i/o: waiting for input or output to copy stored block */  // > CustomCode.jszip:7275
  var        TABLE = 17;     /* i: waiting for dynamic block table lengths */  // > CustomCode.jszip:7276
  var        LENLENS = 18;   /* i: waiting for code length code lengths */  // > CustomCode.jszip:7277
  var        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */  // > CustomCode.jszip:7278
  var            LEN_ = 20;      /* i: same as LEN below, but only first time in */  // > CustomCode.jszip:7279
  var            LEN = 21;       /* i: waiting for length/lit/eob code */  // > CustomCode.jszip:7280
  var            LENEXT = 22;    /* i: waiting for length extra bits */  // > CustomCode.jszip:7281
  var            DIST = 23;      /* i: waiting for distance code */  // > CustomCode.jszip:7282
  var            DISTEXT = 24;   /* i: waiting for distance extra bits */  // > CustomCode.jszip:7283
  var            MATCH = 25;     /* o: waiting for output space to copy string */  // > CustomCode.jszip:7284
  var            LIT = 26;       /* o: waiting for output space to write literal */  // > CustomCode.jszip:7285
  var    CHECK = 27;     /* i: waiting for 32-bit check value */  // > CustomCode.jszip:7286
  var    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */  // > CustomCode.jszip:7287
  var    DONE = 29;      /* finished check, done -- remain here until reset */  // > CustomCode.jszip:7288
  var    BAD = 30;       /* got a data error -- remain here until reset */  // > CustomCode.jszip:7289
  var    MEM = 31;       /* got an inflate() memory error -- remain here until reset */  // > CustomCode.jszip:7290
  var    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */  // > CustomCode.jszip:7291
  /* ===========================================================================*/  // > CustomCode.jszip:7292
  var ENOUGH_LENS = 852;  // > CustomCode.jszip:7293
  var ENOUGH_DISTS = 592;  // > CustomCode.jszip:7294
  //var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);  // > CustomCode.jszip:7295
  var MAX_WBITS = 15;  // > CustomCode.jszip:7296
  /* 32K LZ77 window */  // > CustomCode.jszip:7297
  var DEF_WBITS = MAX_WBITS;  // > CustomCode.jszip:7298
  function zswap32(q) {  // > CustomCode.jszip:7299
    return  (((q >>> 24) & 0xff) +  // > CustomCode.jszip:7300
            ((q >>> 8) & 0xff00) +  // > CustomCode.jszip:7301
            ((q & 0xff00) << 8) +  // > CustomCode.jszip:7302
            ((q & 0xff) << 24));  // > CustomCode.jszip:7303
  }  // > CustomCode.jszip:7304
  function InflateState() {  // > CustomCode.jszip:7305
    this.mode = 0;             /* current inflate mode */  // > CustomCode.jszip:7306
    this.last = false;          /* true if processing last block */  // > CustomCode.jszip:7307
    this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */  // > CustomCode.jszip:7308
    this.havedict = false;      /* true if dictionary provided */  // > CustomCode.jszip:7309
    this.flags = 0;             /* gzip header method and flags (0 if zlib) */  // > CustomCode.jszip:7310
    this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */  // > CustomCode.jszip:7311
    this.check = 0;             /* protected copy of check value */  // > CustomCode.jszip:7312
    this.total = 0;             /* protected copy of output count */  // > CustomCode.jszip:7313
    // TODO: may be {}  // > CustomCode.jszip:7314
    this.head = null;           /* where to save gzip header information */  // > CustomCode.jszip:7315
    /* sliding window */  // > CustomCode.jszip:7316
    this.wbits = 0;             /* log base 2 of requested window size */  // > CustomCode.jszip:7317
    this.wsize = 0;             /* window size or zero if not using window */  // > CustomCode.jszip:7318
    this.whave = 0;             /* valid bytes in the window */  // > CustomCode.jszip:7319
    this.wnext = 0;             /* window write index */  // > CustomCode.jszip:7320
    this.window = null;         /* allocated sliding window, if needed */  // > CustomCode.jszip:7321
    /* bit accumulator */  // > CustomCode.jszip:7322
    this.hold = 0;              /* input bit accumulator */  // > CustomCode.jszip:7323
    this.bits = 0;              /* number of bits in "in" */  // > CustomCode.jszip:7324
    /* for string and stored block copying */  // > CustomCode.jszip:7325
    this.length = 0;            /* literal or length of data to copy */  // > CustomCode.jszip:7326
    this.offset = 0;            /* distance back to copy string from */  // > CustomCode.jszip:7327
    /* for table and code decoding */  // > CustomCode.jszip:7328
    this.extra = 0;             /* extra bits needed */  // > CustomCode.jszip:7329
    /* fixed and dynamic code tables */  // > CustomCode.jszip:7330
    this.lencode = null;          /* starting table for length/literal codes */  // > CustomCode.jszip:7331
    this.distcode = null;         /* starting table for distance codes */  // > CustomCode.jszip:7332
    this.lenbits = 0;           /* index bits for lencode */  // > CustomCode.jszip:7333
    this.distbits = 0;          /* index bits for distcode */  // > CustomCode.jszip:7334
    /* dynamic table building */  // > CustomCode.jszip:7335
    this.ncode = 0;             /* number of code length code lengths */  // > CustomCode.jszip:7336
    this.nlen = 0;              /* number of length code lengths */  // > CustomCode.jszip:7337
    this.ndist = 0;             /* number of distance code lengths */  // > CustomCode.jszip:7338
    this.have = 0;              /* number of code lengths in lens[] */  // > CustomCode.jszip:7339
    this.next = null;              /* next available space in codes[] */  // > CustomCode.jszip:7340
    this.lens = new utils.Buf16(320); /* temporary storage for code lengths */  // > CustomCode.jszip:7341
    this.work = new utils.Buf16(288); /* work area for code table building */  // > CustomCode.jszip:7342
    /*  // > CustomCode.jszip:7343
     because we don't have pointers in js, we use lencode and distcode directly  // > CustomCode.jszip:7344
     as buffers so we don't need codes  // > CustomCode.jszip:7345
    */  // > CustomCode.jszip:7346
    //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */  // > CustomCode.jszip:7347
    this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */  // > CustomCode.jszip:7348
    this.distdyn = null;             /* dynamic table for distance codes (JS specific) */  // > CustomCode.jszip:7349
    this.sane = 0;                   /* if false, allow invalid distance too far */  // > CustomCode.jszip:7350
    this.back = 0;                   /* bits back of last unprocessed length/lit */  // > CustomCode.jszip:7351
    this.was = 0;                    /* initial length of match */  // > CustomCode.jszip:7352
  }  // > CustomCode.jszip:7353
  function inflateResetKeep(strm) {  // > CustomCode.jszip:7354
    var state;  // > CustomCode.jszip:7355
    if (!strm || !strm.state) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:7356
    state = strm.state;  // > CustomCode.jszip:7357
    strm.total_in = strm.total_out = state.total = 0;  // > CustomCode.jszip:7358
    strm.msg = ''; /*Z_NULL*/  // > CustomCode.jszip:7359
    if (state.wrap) {       /* to support ill-conceived Java test suite */  // > CustomCode.jszip:7360
      strm.adler = state.wrap & 1;  // > CustomCode.jszip:7361
    }  // > CustomCode.jszip:7362
    state.mode = HEAD;  // > CustomCode.jszip:7363
    state.last = 0;  // > CustomCode.jszip:7364
    state.havedict = 0;  // > CustomCode.jszip:7365
    state.dmax = 32768;  // > CustomCode.jszip:7366
    state.head = null/*Z_NULL*/;  // > CustomCode.jszip:7367
    state.hold = 0;  // > CustomCode.jszip:7368
    state.bits = 0;  // > CustomCode.jszip:7369
    //state.lencode = state.distcode = state.next = state.codes;  // > CustomCode.jszip:7370
    state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);  // > CustomCode.jszip:7371
    state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);  // > CustomCode.jszip:7372
    state.sane = 1;  // > CustomCode.jszip:7373
    state.back = -1;  // > CustomCode.jszip:7374
    //Tracev((stderr, "inflate: reset\n"));  // > CustomCode.jszip:7375
    return Z_OK;  // > CustomCode.jszip:7376
  }  // > CustomCode.jszip:7377
  function inflateReset(strm) {  // > CustomCode.jszip:7378
    var state;  // > CustomCode.jszip:7379
    if (!strm || !strm.state) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:7380
    state = strm.state;  // > CustomCode.jszip:7381
    state.wsize = 0;  // > CustomCode.jszip:7382
    state.whave = 0;  // > CustomCode.jszip:7383
    state.wnext = 0;  // > CustomCode.jszip:7384
    return inflateResetKeep(strm);  // > CustomCode.jszip:7385
  }  // > CustomCode.jszip:7386
  function inflateReset2(strm, windowBits) {  // > CustomCode.jszip:7387
    var wrap;  // > CustomCode.jszip:7388
    var state;  // > CustomCode.jszip:7389
    /* get the state */  // > CustomCode.jszip:7390
    if (!strm || !strm.state) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:7391
    state = strm.state;  // > CustomCode.jszip:7392
    /* extract wrap request from windowBits parameter */  // > CustomCode.jszip:7393
    if (windowBits < 0) {  // > CustomCode.jszip:7394
      wrap = 0;  // > CustomCode.jszip:7395
      windowBits = -windowBits;  // > CustomCode.jszip:7396
    }  // > CustomCode.jszip:7397
    else {  // > CustomCode.jszip:7398
      wrap = (windowBits >> 4) + 1;  // > CustomCode.jszip:7399
      if (windowBits < 48) {  // > CustomCode.jszip:7400
        windowBits &= 15;  // > CustomCode.jszip:7401
      }  // > CustomCode.jszip:7402
    }  // > CustomCode.jszip:7403
    /* set number of window bits, free window if different */  // > CustomCode.jszip:7404
    if (windowBits && (windowBits < 8 || windowBits > 15)) {  // > CustomCode.jszip:7405
      return Z_STREAM_ERROR;  // > CustomCode.jszip:7406
    }  // > CustomCode.jszip:7407
    if (state.window !== null && state.wbits !== windowBits) {  // > CustomCode.jszip:7408
      state.window = null;  // > CustomCode.jszip:7409
    }  // > CustomCode.jszip:7410
    /* update state and reset the rest of it */  // > CustomCode.jszip:7411
    state.wrap = wrap;  // > CustomCode.jszip:7412
    state.wbits = windowBits;  // > CustomCode.jszip:7413
    return inflateReset(strm);  // > CustomCode.jszip:7414
  }  // > CustomCode.jszip:7415
  function inflateInit2(strm, windowBits) {  // > CustomCode.jszip:7416
    var ret;  // > CustomCode.jszip:7417
    var state;  // > CustomCode.jszip:7418
    if (!strm) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:7419
    //strm.msg = Z_NULL;                 /* in case we return an error */  // > CustomCode.jszip:7420
    state = new InflateState();  // > CustomCode.jszip:7421
    //if (state === Z_NULL) return Z_MEM_ERROR;  // > CustomCode.jszip:7422
    //Tracev((stderr, "inflate: allocated\n"));  // > CustomCode.jszip:7423
    strm.state = state;  // > CustomCode.jszip:7424
    state.window = null/*Z_NULL*/;  // > CustomCode.jszip:7425
    ret = inflateReset2(strm, windowBits);  // > CustomCode.jszip:7426
    if (ret !== Z_OK) {  // > CustomCode.jszip:7427
      strm.state = null/*Z_NULL*/;  // > CustomCode.jszip:7428
    }  // > CustomCode.jszip:7429
    return ret;  // > CustomCode.jszip:7430
  }  // > CustomCode.jszip:7431
  function inflateInit(strm) {  // > CustomCode.jszip:7432
    return inflateInit2(strm, DEF_WBITS);  // > CustomCode.jszip:7433
  }  // > CustomCode.jszip:7434
  /*  // > CustomCode.jszip:7435
   Return state with length and distance decoding tables and index sizes set to  // > CustomCode.jszip:7436
   fixed code decoding.  Normally this returns fixed tables from inffixed.h.  // > CustomCode.jszip:7437
   If BUILDFIXED is defined, then instead this routine builds the tables the  // > CustomCode.jszip:7438
   first time it's called, and returns those tables the first time and  // > CustomCode.jszip:7439
   thereafter.  This reduces the size of the code by about 2K bytes, in  // > CustomCode.jszip:7440
   exchange for a little execution time.  However, BUILDFIXED should not be  // > CustomCode.jszip:7441
   used for threaded applications, since the rewriting of the tables and virgin  // > CustomCode.jszip:7442
   may not be thread-safe.  // > CustomCode.jszip:7443
   */  // > CustomCode.jszip:7444
  var virgin = true;  // > CustomCode.jszip:7445
  var lenfix, distfix; // We have no pointers in JS, so keep tables separate  // > CustomCode.jszip:7446
  function fixedtables(state) {  // > CustomCode.jszip:7447
    /* build fixed huffman tables if first call (may not be thread safe) */  // > CustomCode.jszip:7448
    if (virgin) {  // > CustomCode.jszip:7449
      var sym;  // > CustomCode.jszip:7450
      lenfix = new utils.Buf32(512);  // > CustomCode.jszip:7451
      distfix = new utils.Buf32(32);  // > CustomCode.jszip:7452
      /* literal/length table */  // > CustomCode.jszip:7453
      sym = 0;  // > CustomCode.jszip:7454
      while (sym < 144) { state.lens[sym++] = 8; }  // > CustomCode.jszip:7455
      while (sym < 256) { state.lens[sym++] = 9; }  // > CustomCode.jszip:7456
      while (sym < 280) { state.lens[sym++] = 7; }  // > CustomCode.jszip:7457
      while (sym < 288) { state.lens[sym++] = 8; }  // > CustomCode.jszip:7458
      inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });  // > CustomCode.jszip:7459
      /* distance table */  // > CustomCode.jszip:7460
      sym = 0;  // > CustomCode.jszip:7461
      while (sym < 32) { state.lens[sym++] = 5; }  // > CustomCode.jszip:7462
      inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });  // > CustomCode.jszip:7463
      /* do this just once */  // > CustomCode.jszip:7464
      virgin = false;  // > CustomCode.jszip:7465
    }  // > CustomCode.jszip:7466
    state.lencode = lenfix;  // > CustomCode.jszip:7467
    state.lenbits = 9;  // > CustomCode.jszip:7468
    state.distcode = distfix;  // > CustomCode.jszip:7469
    state.distbits = 5;  // > CustomCode.jszip:7470
  }  // > CustomCode.jszip:7471
  /*  // > CustomCode.jszip:7472
   Update the window with the last wsize (normally 32K) bytes written before  // > CustomCode.jszip:7473
   returning.  If window does not exist yet, create it.  This is only called  // > CustomCode.jszip:7474
   when a window is already in use, or when output has been written during this  // > CustomCode.jszip:7475
   inflate call, but the end of the deflate stream has not been reached yet.  // > CustomCode.jszip:7476
   It is also called to create a window for dictionary data when a dictionary  // > CustomCode.jszip:7477
   is loaded.  // > CustomCode.jszip:7478
   Providing output buffers larger than 32K to inflate() should provide a speed  // > CustomCode.jszip:7479
   advantage, since only the last 32K of output is copied to the sliding window  // > CustomCode.jszip:7480
   upon return from inflate(), and since all distances after the first 32K of  // > CustomCode.jszip:7481
   output will fall in the output data, making match copies simpler and faster.  // > CustomCode.jszip:7482
   The advantage may be dependent on the size of the processor's data caches.  // > CustomCode.jszip:7483
   */  // > CustomCode.jszip:7484
  function updatewindow(strm, src, end, copy) {  // > CustomCode.jszip:7485
    var dist;  // > CustomCode.jszip:7486
    var state = strm.state;  // > CustomCode.jszip:7487
    /* if it hasn't been done already, allocate space for the window */  // > CustomCode.jszip:7488
    if (state.window === null) {  // > CustomCode.jszip:7489
      state.wsize = 1 << state.wbits;  // > CustomCode.jszip:7490
      state.wnext = 0;  // > CustomCode.jszip:7491
      state.whave = 0;  // > CustomCode.jszip:7492
      state.window = new utils.Buf8(state.wsize);  // > CustomCode.jszip:7493
    }  // > CustomCode.jszip:7494
    /* copy state->wsize or less output bytes into the circular window */  // > CustomCode.jszip:7495
    if (copy >= state.wsize) {  // > CustomCode.jszip:7496
      utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);  // > CustomCode.jszip:7497
      state.wnext = 0;  // > CustomCode.jszip:7498
      state.whave = state.wsize;  // > CustomCode.jszip:7499
    }  // > CustomCode.jszip:7500
    else {  // > CustomCode.jszip:7501
      dist = state.wsize - state.wnext;  // > CustomCode.jszip:7502
      if (dist > copy) {  // > CustomCode.jszip:7503
        dist = copy;  // > CustomCode.jszip:7504
      }  // > CustomCode.jszip:7505
      //zmemcpy(state->window + state->wnext, end - copy, dist);  // > CustomCode.jszip:7506
      utils.arraySet(state.window, src, end - copy, dist, state.wnext);  // > CustomCode.jszip:7507
      copy -= dist;  // > CustomCode.jszip:7508
      if (copy) {  // > CustomCode.jszip:7509
        //zmemcpy(state->window, end - copy, copy);  // > CustomCode.jszip:7510
        utils.arraySet(state.window, src, end - copy, copy, 0);  // > CustomCode.jszip:7511
        state.wnext = copy;  // > CustomCode.jszip:7512
        state.whave = state.wsize;  // > CustomCode.jszip:7513
      }  // > CustomCode.jszip:7514
      else {  // > CustomCode.jszip:7515
        state.wnext += dist;  // > CustomCode.jszip:7516
        if (state.wnext === state.wsize) { state.wnext = 0; }  // > CustomCode.jszip:7517
        if (state.whave < state.wsize) { state.whave += dist; }  // > CustomCode.jszip:7518
      }  // > CustomCode.jszip:7519
    }  // > CustomCode.jszip:7520
    return 0;  // > CustomCode.jszip:7521
  }  // > CustomCode.jszip:7522
  function inflate(strm, flush) {  // > CustomCode.jszip:7523
    var state;  // > CustomCode.jszip:7524
    var input, output;          // input/output buffers  // > CustomCode.jszip:7525
    var next;                   /* next input INDEX */  // > CustomCode.jszip:7526
    var put;                    /* next output INDEX */  // > CustomCode.jszip:7527
    var have, left;             /* available input and output */  // > CustomCode.jszip:7528
    var hold;                   /* bit buffer */  // > CustomCode.jszip:7529
    var bits;                   /* bits in bit buffer */  // > CustomCode.jszip:7530
    var _in, _out;              /* save starting available input and output */  // > CustomCode.jszip:7531
    var copy;                   /* number of stored or match bytes to copy */  // > CustomCode.jszip:7532
    var from;                   /* where to copy match bytes from */  // > CustomCode.jszip:7533
    var from_source;  // > CustomCode.jszip:7534
    var here = 0;               /* current decoding table entry */  // > CustomCode.jszip:7535
    var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)  // > CustomCode.jszip:7536
    //var last;                   /* parent table entry */  // > CustomCode.jszip:7537
    var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)  // > CustomCode.jszip:7538
    var len;                    /* length to copy for repeats, bits to drop */  // > CustomCode.jszip:7539
    var ret;                    /* return code */  // > CustomCode.jszip:7540
    var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */  // > CustomCode.jszip:7541
    var opts;  // > CustomCode.jszip:7542
    var n; // temporary var for NEED_BITS  // > CustomCode.jszip:7543
    var order = /* permutation of code lengths */  // > CustomCode.jszip:7544
      [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];  // > CustomCode.jszip:7545
    if (!strm || !strm.state || !strm.output ||  // > CustomCode.jszip:7546
        (!strm.input && strm.avail_in !== 0)) {  // > CustomCode.jszip:7547
      return Z_STREAM_ERROR;  // > CustomCode.jszip:7548
    }  // > CustomCode.jszip:7549
    state = strm.state;  // > CustomCode.jszip:7550
    if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */  // > CustomCode.jszip:7551
    //--- LOAD() ---  // > CustomCode.jszip:7552
    put = strm.next_out;  // > CustomCode.jszip:7553
    output = strm.output;  // > CustomCode.jszip:7554
    left = strm.avail_out;  // > CustomCode.jszip:7555
    next = strm.next_in;  // > CustomCode.jszip:7556
    input = strm.input;  // > CustomCode.jszip:7557
    have = strm.avail_in;  // > CustomCode.jszip:7558
    hold = state.hold;  // > CustomCode.jszip:7559
    bits = state.bits;  // > CustomCode.jszip:7560
    //---  // > CustomCode.jszip:7561
    _in = have;  // > CustomCode.jszip:7562
    _out = left;  // > CustomCode.jszip:7563
    ret = Z_OK;  // > CustomCode.jszip:7564
    inf_leave: // goto emulation  // > CustomCode.jszip:7565
    for (;;) {  // > CustomCode.jszip:7566
      switch (state.mode) {  // > CustomCode.jszip:7567
      case HEAD:  // > CustomCode.jszip:7568
        if (state.wrap === 0) {  // > CustomCode.jszip:7569
          state.mode = TYPEDO;  // > CustomCode.jszip:7570
          break;  // > CustomCode.jszip:7571
        }  // > CustomCode.jszip:7572
        //=== NEEDBITS(16);  // > CustomCode.jszip:7573
        while (bits < 16) {  // > CustomCode.jszip:7574
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7575
          have--;  // > CustomCode.jszip:7576
          hold += input[next++] << bits;  // > CustomCode.jszip:7577
          bits += 8;  // > CustomCode.jszip:7578
        }  // > CustomCode.jszip:7579
        //===//  // > CustomCode.jszip:7580
        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */  // > CustomCode.jszip:7581
          state.check = 0/*crc32(0L, Z_NULL, 0)*/;  // > CustomCode.jszip:7582
          //=== CRC2(state.check, hold);  // > CustomCode.jszip:7583
          hbuf[0] = hold & 0xff;  // > CustomCode.jszip:7584
          hbuf[1] = (hold >>> 8) & 0xff;  // > CustomCode.jszip:7585
          state.check = crc32(state.check, hbuf, 2, 0);  // > CustomCode.jszip:7586
          //===//  // > CustomCode.jszip:7587
          //=== INITBITS();  // > CustomCode.jszip:7588
          hold = 0;  // > CustomCode.jszip:7589
          bits = 0;  // > CustomCode.jszip:7590
          //===//  // > CustomCode.jszip:7591
          state.mode = FLAGS;  // > CustomCode.jszip:7592
          break;  // > CustomCode.jszip:7593
        }  // > CustomCode.jszip:7594
        state.flags = 0;           /* expect zlib header */  // > CustomCode.jszip:7595
        if (state.head) {  // > CustomCode.jszip:7596
          state.head.done = false;  // > CustomCode.jszip:7597
        }  // > CustomCode.jszip:7598
        if (!(state.wrap & 1) ||   /* check if zlib header allowed */  // > CustomCode.jszip:7599
          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {  // > CustomCode.jszip:7600
          strm.msg = 'incorrect header check';  // > CustomCode.jszip:7601
          state.mode = BAD;  // > CustomCode.jszip:7602
          break;  // > CustomCode.jszip:7603
        }  // > CustomCode.jszip:7604
        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {  // > CustomCode.jszip:7605
          strm.msg = 'unknown compression method';  // > CustomCode.jszip:7606
          state.mode = BAD;  // > CustomCode.jszip:7607
          break;  // > CustomCode.jszip:7608
        }  // > CustomCode.jszip:7609
        //--- DROPBITS(4) ---//  // > CustomCode.jszip:7610
        hold >>>= 4;  // > CustomCode.jszip:7611
        bits -= 4;  // > CustomCode.jszip:7612
        //---//  // > CustomCode.jszip:7613
        len = (hold & 0x0f)/*BITS(4)*/ + 8;  // > CustomCode.jszip:7614
        if (state.wbits === 0) {  // > CustomCode.jszip:7615
          state.wbits = len;  // > CustomCode.jszip:7616
        }  // > CustomCode.jszip:7617
        else if (len > state.wbits) {  // > CustomCode.jszip:7618
          strm.msg = 'invalid window size';  // > CustomCode.jszip:7619
          state.mode = BAD;  // > CustomCode.jszip:7620
          break;  // > CustomCode.jszip:7621
        }  // > CustomCode.jszip:7622
        state.dmax = 1 << len;  // > CustomCode.jszip:7623
        //Tracev((stderr, "inflate:   zlib header ok\n"));  // > CustomCode.jszip:7624
        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;  // > CustomCode.jszip:7625
        state.mode = hold & 0x200 ? DICTID : TYPE;  // > CustomCode.jszip:7626
        //=== INITBITS();  // > CustomCode.jszip:7627
        hold = 0;  // > CustomCode.jszip:7628
        bits = 0;  // > CustomCode.jszip:7629
        //===//  // > CustomCode.jszip:7630
        break;  // > CustomCode.jszip:7631
      case FLAGS:  // > CustomCode.jszip:7632
        //=== NEEDBITS(16); */  // > CustomCode.jszip:7633
        while (bits < 16) {  // > CustomCode.jszip:7634
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7635
          have--;  // > CustomCode.jszip:7636
          hold += input[next++] << bits;  // > CustomCode.jszip:7637
          bits += 8;  // > CustomCode.jszip:7638
        }  // > CustomCode.jszip:7639
        //===//  // > CustomCode.jszip:7640
        state.flags = hold;  // > CustomCode.jszip:7641
        if ((state.flags & 0xff) !== Z_DEFLATED) {  // > CustomCode.jszip:7642
          strm.msg = 'unknown compression method';  // > CustomCode.jszip:7643
          state.mode = BAD;  // > CustomCode.jszip:7644
          break;  // > CustomCode.jszip:7645
        }  // > CustomCode.jszip:7646
        if (state.flags & 0xe000) {  // > CustomCode.jszip:7647
          strm.msg = 'unknown header flags set';  // > CustomCode.jszip:7648
          state.mode = BAD;  // > CustomCode.jszip:7649
          break;  // > CustomCode.jszip:7650
        }  // > CustomCode.jszip:7651
        if (state.head) {  // > CustomCode.jszip:7652
          state.head.text = ((hold >> 8) & 1);  // > CustomCode.jszip:7653
        }  // > CustomCode.jszip:7654
        if (state.flags & 0x0200) {  // > CustomCode.jszip:7655
          //=== CRC2(state.check, hold);  // > CustomCode.jszip:7656
          hbuf[0] = hold & 0xff;  // > CustomCode.jszip:7657
          hbuf[1] = (hold >>> 8) & 0xff;  // > CustomCode.jszip:7658
          state.check = crc32(state.check, hbuf, 2, 0);  // > CustomCode.jszip:7659
          //===//  // > CustomCode.jszip:7660
        }  // > CustomCode.jszip:7661
        //=== INITBITS();  // > CustomCode.jszip:7662
        hold = 0;  // > CustomCode.jszip:7663
        bits = 0;  // > CustomCode.jszip:7664
        //===//  // > CustomCode.jszip:7665
        state.mode = TIME;  // > CustomCode.jszip:7666
        /* falls through */  // > CustomCode.jszip:7667
      case TIME:  // > CustomCode.jszip:7668
        //=== NEEDBITS(32); */  // > CustomCode.jszip:7669
        while (bits < 32) {  // > CustomCode.jszip:7670
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7671
          have--;  // > CustomCode.jszip:7672
          hold += input[next++] << bits;  // > CustomCode.jszip:7673
          bits += 8;  // > CustomCode.jszip:7674
        }  // > CustomCode.jszip:7675
        //===//  // > CustomCode.jszip:7676
        if (state.head) {  // > CustomCode.jszip:7677
          state.head.time = hold;  // > CustomCode.jszip:7678
        }  // > CustomCode.jszip:7679
        if (state.flags & 0x0200) {  // > CustomCode.jszip:7680
          //=== CRC4(state.check, hold)  // > CustomCode.jszip:7681
          hbuf[0] = hold & 0xff;  // > CustomCode.jszip:7682
          hbuf[1] = (hold >>> 8) & 0xff;  // > CustomCode.jszip:7683
          hbuf[2] = (hold >>> 16) & 0xff;  // > CustomCode.jszip:7684
          hbuf[3] = (hold >>> 24) & 0xff;  // > CustomCode.jszip:7685
          state.check = crc32(state.check, hbuf, 4, 0);  // > CustomCode.jszip:7686
          //===  // > CustomCode.jszip:7687
        }  // > CustomCode.jszip:7688
        //=== INITBITS();  // > CustomCode.jszip:7689
        hold = 0;  // > CustomCode.jszip:7690
        bits = 0;  // > CustomCode.jszip:7691
        //===//  // > CustomCode.jszip:7692
        state.mode = OS;  // > CustomCode.jszip:7693
        /* falls through */  // > CustomCode.jszip:7694
      case OS:  // > CustomCode.jszip:7695
        //=== NEEDBITS(16); */  // > CustomCode.jszip:7696
        while (bits < 16) {  // > CustomCode.jszip:7697
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7698
          have--;  // > CustomCode.jszip:7699
          hold += input[next++] << bits;  // > CustomCode.jszip:7700
          bits += 8;  // > CustomCode.jszip:7701
        }  // > CustomCode.jszip:7702
        //===//  // > CustomCode.jszip:7703
        if (state.head) {  // > CustomCode.jszip:7704
          state.head.xflags = (hold & 0xff);  // > CustomCode.jszip:7705
          state.head.os = (hold >> 8);  // > CustomCode.jszip:7706
        }  // > CustomCode.jszip:7707
        if (state.flags & 0x0200) {  // > CustomCode.jszip:7708
          //=== CRC2(state.check, hold);  // > CustomCode.jszip:7709
          hbuf[0] = hold & 0xff;  // > CustomCode.jszip:7710
          hbuf[1] = (hold >>> 8) & 0xff;  // > CustomCode.jszip:7711
          state.check = crc32(state.check, hbuf, 2, 0);  // > CustomCode.jszip:7712
          //===//  // > CustomCode.jszip:7713
        }  // > CustomCode.jszip:7714
        //=== INITBITS();  // > CustomCode.jszip:7715
        hold = 0;  // > CustomCode.jszip:7716
        bits = 0;  // > CustomCode.jszip:7717
        //===//  // > CustomCode.jszip:7718
        state.mode = EXLEN;  // > CustomCode.jszip:7719
        /* falls through */  // > CustomCode.jszip:7720
      case EXLEN:  // > CustomCode.jszip:7721
        if (state.flags & 0x0400) {  // > CustomCode.jszip:7722
          //=== NEEDBITS(16); */  // > CustomCode.jszip:7723
          while (bits < 16) {  // > CustomCode.jszip:7724
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7725
            have--;  // > CustomCode.jszip:7726
            hold += input[next++] << bits;  // > CustomCode.jszip:7727
            bits += 8;  // > CustomCode.jszip:7728
          }  // > CustomCode.jszip:7729
          //===//  // > CustomCode.jszip:7730
          state.length = hold;  // > CustomCode.jszip:7731
          if (state.head) {  // > CustomCode.jszip:7732
            state.head.extra_len = hold;  // > CustomCode.jszip:7733
          }  // > CustomCode.jszip:7734
          if (state.flags & 0x0200) {  // > CustomCode.jszip:7735
            //=== CRC2(state.check, hold);  // > CustomCode.jszip:7736
            hbuf[0] = hold & 0xff;  // > CustomCode.jszip:7737
            hbuf[1] = (hold >>> 8) & 0xff;  // > CustomCode.jszip:7738
            state.check = crc32(state.check, hbuf, 2, 0);  // > CustomCode.jszip:7739
            //===//  // > CustomCode.jszip:7740
          }  // > CustomCode.jszip:7741
          //=== INITBITS();  // > CustomCode.jszip:7742
          hold = 0;  // > CustomCode.jszip:7743
          bits = 0;  // > CustomCode.jszip:7744
          //===//  // > CustomCode.jszip:7745
        }  // > CustomCode.jszip:7746
        else if (state.head) {  // > CustomCode.jszip:7747
          state.head.extra = null/*Z_NULL*/;  // > CustomCode.jszip:7748
        }  // > CustomCode.jszip:7749
        state.mode = EXTRA;  // > CustomCode.jszip:7750
        /* falls through */  // > CustomCode.jszip:7751
      case EXTRA:  // > CustomCode.jszip:7752
        if (state.flags & 0x0400) {  // > CustomCode.jszip:7753
          copy = state.length;  // > CustomCode.jszip:7754
          if (copy > have) { copy = have; }  // > CustomCode.jszip:7755
          if (copy) {  // > CustomCode.jszip:7756
            if (state.head) {  // > CustomCode.jszip:7757
              len = state.head.extra_len - state.length;  // > CustomCode.jszip:7758
              if (!state.head.extra) {  // > CustomCode.jszip:7759
                // Use untyped array for more conveniend processing later  // > CustomCode.jszip:7760
                state.head.extra = new Array(state.head.extra_len);  // > CustomCode.jszip:7761
              }  // > CustomCode.jszip:7762
              utils.arraySet(  // > CustomCode.jszip:7763
                state.head.extra,  // > CustomCode.jszip:7764
                input,  // > CustomCode.jszip:7765
                next,  // > CustomCode.jszip:7766
                // extra field is limited to 65536 bytes  // > CustomCode.jszip:7767
                // - no need for additional size check  // > CustomCode.jszip:7768
                copy,  // > CustomCode.jszip:7769
                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/  // > CustomCode.jszip:7770
                len  // > CustomCode.jszip:7771
              );  // > CustomCode.jszip:7772
              //zmemcpy(state.head.extra + len, next,  // > CustomCode.jszip:7773
              //        len + copy > state.head.extra_max ?  // > CustomCode.jszip:7774
              //        state.head.extra_max - len : copy);  // > CustomCode.jszip:7775
            }  // > CustomCode.jszip:7776
            if (state.flags & 0x0200) {  // > CustomCode.jszip:7777
              state.check = crc32(state.check, input, copy, next);  // > CustomCode.jszip:7778
            }  // > CustomCode.jszip:7779
            have -= copy;  // > CustomCode.jszip:7780
            next += copy;  // > CustomCode.jszip:7781
            state.length -= copy;  // > CustomCode.jszip:7782
          }  // > CustomCode.jszip:7783
          if (state.length) { break inf_leave; }  // > CustomCode.jszip:7784
        }  // > CustomCode.jszip:7785
        state.length = 0;  // > CustomCode.jszip:7786
        state.mode = NAME;  // > CustomCode.jszip:7787
        /* falls through */  // > CustomCode.jszip:7788
      case NAME:  // > CustomCode.jszip:7789
        if (state.flags & 0x0800) {  // > CustomCode.jszip:7790
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7791
          copy = 0;  // > CustomCode.jszip:7792
          do {  // > CustomCode.jszip:7793
            // TODO: 2 or 1 bytes?  // > CustomCode.jszip:7794
            len = input[next + copy++];  // > CustomCode.jszip:7795
            /* use constant limit because in js we should not preallocate memory */  // > CustomCode.jszip:7796
            if (state.head && len &&  // > CustomCode.jszip:7797
                (state.length < 65536 /*state.head.name_max*/)) {  // > CustomCode.jszip:7798
              state.head.name += String.fromCharCode(len);  // > CustomCode.jszip:7799
            }  // > CustomCode.jszip:7800
          } while (len && copy < have);  // > CustomCode.jszip:7801
          if (state.flags & 0x0200) {  // > CustomCode.jszip:7802
            state.check = crc32(state.check, input, copy, next);  // > CustomCode.jszip:7803
          }  // > CustomCode.jszip:7804
          have -= copy;  // > CustomCode.jszip:7805
          next += copy;  // > CustomCode.jszip:7806
          if (len) { break inf_leave; }  // > CustomCode.jszip:7807
        }  // > CustomCode.jszip:7808
        else if (state.head) {  // > CustomCode.jszip:7809
          state.head.name = null;  // > CustomCode.jszip:7810
        }  // > CustomCode.jszip:7811
        state.length = 0;  // > CustomCode.jszip:7812
        state.mode = COMMENT;  // > CustomCode.jszip:7813
        /* falls through */  // > CustomCode.jszip:7814
      case COMMENT:  // > CustomCode.jszip:7815
        if (state.flags & 0x1000) {  // > CustomCode.jszip:7816
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7817
          copy = 0;  // > CustomCode.jszip:7818
          do {  // > CustomCode.jszip:7819
            len = input[next + copy++];  // > CustomCode.jszip:7820
            /* use constant limit because in js we should not preallocate memory */  // > CustomCode.jszip:7821
            if (state.head && len &&  // > CustomCode.jszip:7822
                (state.length < 65536 /*state.head.comm_max*/)) {  // > CustomCode.jszip:7823
              state.head.comment += String.fromCharCode(len);  // > CustomCode.jszip:7824
            }  // > CustomCode.jszip:7825
          } while (len && copy < have);  // > CustomCode.jszip:7826
          if (state.flags & 0x0200) {  // > CustomCode.jszip:7827
            state.check = crc32(state.check, input, copy, next);  // > CustomCode.jszip:7828
          }  // > CustomCode.jszip:7829
          have -= copy;  // > CustomCode.jszip:7830
          next += copy;  // > CustomCode.jszip:7831
          if (len) { break inf_leave; }  // > CustomCode.jszip:7832
        }  // > CustomCode.jszip:7833
        else if (state.head) {  // > CustomCode.jszip:7834
          state.head.comment = null;  // > CustomCode.jszip:7835
        }  // > CustomCode.jszip:7836
        state.mode = HCRC;  // > CustomCode.jszip:7837
        /* falls through */  // > CustomCode.jszip:7838
      case HCRC:  // > CustomCode.jszip:7839
        if (state.flags & 0x0200) {  // > CustomCode.jszip:7840
          //=== NEEDBITS(16); */  // > CustomCode.jszip:7841
          while (bits < 16) {  // > CustomCode.jszip:7842
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7843
            have--;  // > CustomCode.jszip:7844
            hold += input[next++] << bits;  // > CustomCode.jszip:7845
            bits += 8;  // > CustomCode.jszip:7846
          }  // > CustomCode.jszip:7847
          //===//  // > CustomCode.jszip:7848
          if (hold !== (state.check & 0xffff)) {  // > CustomCode.jszip:7849
            strm.msg = 'header crc mismatch';  // > CustomCode.jszip:7850
            state.mode = BAD;  // > CustomCode.jszip:7851
            break;  // > CustomCode.jszip:7852
          }  // > CustomCode.jszip:7853
          //=== INITBITS();  // > CustomCode.jszip:7854
          hold = 0;  // > CustomCode.jszip:7855
          bits = 0;  // > CustomCode.jszip:7856
          //===//  // > CustomCode.jszip:7857
        }  // > CustomCode.jszip:7858
        if (state.head) {  // > CustomCode.jszip:7859
          state.head.hcrc = ((state.flags >> 9) & 1);  // > CustomCode.jszip:7860
          state.head.done = true;  // > CustomCode.jszip:7861
        }  // > CustomCode.jszip:7862
        strm.adler = state.check = 0;  // > CustomCode.jszip:7863
        state.mode = TYPE;  // > CustomCode.jszip:7864
        break;  // > CustomCode.jszip:7865
      case DICTID:  // > CustomCode.jszip:7866
        //=== NEEDBITS(32); */  // > CustomCode.jszip:7867
        while (bits < 32) {  // > CustomCode.jszip:7868
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7869
          have--;  // > CustomCode.jszip:7870
          hold += input[next++] << bits;  // > CustomCode.jszip:7871
          bits += 8;  // > CustomCode.jszip:7872
        }  // > CustomCode.jszip:7873
        //===//  // > CustomCode.jszip:7874
        strm.adler = state.check = zswap32(hold);  // > CustomCode.jszip:7875
        //=== INITBITS();  // > CustomCode.jszip:7876
        hold = 0;  // > CustomCode.jszip:7877
        bits = 0;  // > CustomCode.jszip:7878
        //===//  // > CustomCode.jszip:7879
        state.mode = DICT;  // > CustomCode.jszip:7880
        /* falls through */  // > CustomCode.jszip:7881
      case DICT:  // > CustomCode.jszip:7882
        if (state.havedict === 0) {  // > CustomCode.jszip:7883
          //--- RESTORE() ---  // > CustomCode.jszip:7884
          strm.next_out = put;  // > CustomCode.jszip:7885
          strm.avail_out = left;  // > CustomCode.jszip:7886
          strm.next_in = next;  // > CustomCode.jszip:7887
          strm.avail_in = have;  // > CustomCode.jszip:7888
          state.hold = hold;  // > CustomCode.jszip:7889
          state.bits = bits;  // > CustomCode.jszip:7890
          //---  // > CustomCode.jszip:7891
          return Z_NEED_DICT;  // > CustomCode.jszip:7892
        }  // > CustomCode.jszip:7893
        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;  // > CustomCode.jszip:7894
        state.mode = TYPE;  // > CustomCode.jszip:7895
        /* falls through */  // > CustomCode.jszip:7896
      case TYPE:  // > CustomCode.jszip:7897
        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }  // > CustomCode.jszip:7898
        /* falls through */  // > CustomCode.jszip:7899
      case TYPEDO:  // > CustomCode.jszip:7900
        if (state.last) {  // > CustomCode.jszip:7901
          //--- BYTEBITS() ---//  // > CustomCode.jszip:7902
          hold >>>= bits & 7;  // > CustomCode.jszip:7903
          bits -= bits & 7;  // > CustomCode.jszip:7904
          //---//  // > CustomCode.jszip:7905
          state.mode = CHECK;  // > CustomCode.jszip:7906
          break;  // > CustomCode.jszip:7907
        }  // > CustomCode.jszip:7908
        //=== NEEDBITS(3); */  // > CustomCode.jszip:7909
        while (bits < 3) {  // > CustomCode.jszip:7910
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7911
          have--;  // > CustomCode.jszip:7912
          hold += input[next++] << bits;  // > CustomCode.jszip:7913
          bits += 8;  // > CustomCode.jszip:7914
        }  // > CustomCode.jszip:7915
        //===//  // > CustomCode.jszip:7916
        state.last = (hold & 0x01)/*BITS(1)*/;  // > CustomCode.jszip:7917
        //--- DROPBITS(1) ---//  // > CustomCode.jszip:7918
        hold >>>= 1;  // > CustomCode.jszip:7919
        bits -= 1;  // > CustomCode.jszip:7920
        //---//  // > CustomCode.jszip:7921
        switch ((hold & 0x03)/*BITS(2)*/) {  // > CustomCode.jszip:7922
        case 0:                             /* stored block */  // > CustomCode.jszip:7923
          //Tracev((stderr, "inflate:     stored block%s\n",  // > CustomCode.jszip:7924
          //        state.last ? " (last)" : ""));  // > CustomCode.jszip:7925
          state.mode = STORED;  // > CustomCode.jszip:7926
          break;  // > CustomCode.jszip:7927
        case 1:                             /* fixed block */  // > CustomCode.jszip:7928
          fixedtables(state);  // > CustomCode.jszip:7929
          //Tracev((stderr, "inflate:     fixed codes block%s\n",  // > CustomCode.jszip:7930
          //        state.last ? " (last)" : ""));  // > CustomCode.jszip:7931
          state.mode = LEN_;             /* decode codes */  // > CustomCode.jszip:7932
          if (flush === Z_TREES) {  // > CustomCode.jszip:7933
            //--- DROPBITS(2) ---//  // > CustomCode.jszip:7934
            hold >>>= 2;  // > CustomCode.jszip:7935
            bits -= 2;  // > CustomCode.jszip:7936
            //---//  // > CustomCode.jszip:7937
            break inf_leave;  // > CustomCode.jszip:7938
          }  // > CustomCode.jszip:7939
          break;  // > CustomCode.jszip:7940
        case 2:                             /* dynamic block */  // > CustomCode.jszip:7941
          //Tracev((stderr, "inflate:     dynamic codes block%s\n",  // > CustomCode.jszip:7942
          //        state.last ? " (last)" : ""));  // > CustomCode.jszip:7943
          state.mode = TABLE;  // > CustomCode.jszip:7944
          break;  // > CustomCode.jszip:7945
        case 3:  // > CustomCode.jszip:7946
          strm.msg = 'invalid block type';  // > CustomCode.jszip:7947
          state.mode = BAD;  // > CustomCode.jszip:7948
        }  // > CustomCode.jszip:7949
        //--- DROPBITS(2) ---//  // > CustomCode.jszip:7950
        hold >>>= 2;  // > CustomCode.jszip:7951
        bits -= 2;  // > CustomCode.jszip:7952
        //---//  // > CustomCode.jszip:7953
        break;  // > CustomCode.jszip:7954
      case STORED:  // > CustomCode.jszip:7955
        //--- BYTEBITS() ---// /* go to byte boundary */  // > CustomCode.jszip:7956
        hold >>>= bits & 7;  // > CustomCode.jszip:7957
        bits -= bits & 7;  // > CustomCode.jszip:7958
        //---//  // > CustomCode.jszip:7959
        //=== NEEDBITS(32); */  // > CustomCode.jszip:7960
        while (bits < 32) {  // > CustomCode.jszip:7961
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:7962
          have--;  // > CustomCode.jszip:7963
          hold += input[next++] << bits;  // > CustomCode.jszip:7964
          bits += 8;  // > CustomCode.jszip:7965
        }  // > CustomCode.jszip:7966
        //===//  // > CustomCode.jszip:7967
        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {  // > CustomCode.jszip:7968
          strm.msg = 'invalid stored block lengths';  // > CustomCode.jszip:7969
          state.mode = BAD;  // > CustomCode.jszip:7970
          break;  // > CustomCode.jszip:7971
        }  // > CustomCode.jszip:7972
        state.length = hold & 0xffff;  // > CustomCode.jszip:7973
        //Tracev((stderr, "inflate:       stored length %u\n",  // > CustomCode.jszip:7974
        //        state.length));  // > CustomCode.jszip:7975
        //=== INITBITS();  // > CustomCode.jszip:7976
        hold = 0;  // > CustomCode.jszip:7977
        bits = 0;  // > CustomCode.jszip:7978
        //===//  // > CustomCode.jszip:7979
        state.mode = COPY_;  // > CustomCode.jszip:7980
        if (flush === Z_TREES) { break inf_leave; }  // > CustomCode.jszip:7981
        /* falls through */  // > CustomCode.jszip:7982
      case COPY_:  // > CustomCode.jszip:7983
        state.mode = COPY;  // > CustomCode.jszip:7984
        /* falls through */  // > CustomCode.jszip:7985
      case COPY:  // > CustomCode.jszip:7986
        copy = state.length;  // > CustomCode.jszip:7987
        if (copy) {  // > CustomCode.jszip:7988
          if (copy > have) { copy = have; }  // > CustomCode.jszip:7989
          if (copy > left) { copy = left; }  // > CustomCode.jszip:7990
          if (copy === 0) { break inf_leave; }  // > CustomCode.jszip:7991
          //--- zmemcpy(put, next, copy); ---  // > CustomCode.jszip:7992
          utils.arraySet(output, input, next, copy, put);  // > CustomCode.jszip:7993
          //---//  // > CustomCode.jszip:7994
          have -= copy;  // > CustomCode.jszip:7995
          next += copy;  // > CustomCode.jszip:7996
          left -= copy;  // > CustomCode.jszip:7997
          put += copy;  // > CustomCode.jszip:7998
          state.length -= copy;  // > CustomCode.jszip:7999
          break;  // > CustomCode.jszip:8000
        }  // > CustomCode.jszip:8001
        //Tracev((stderr, "inflate:       stored end\n"));  // > CustomCode.jszip:8002
        state.mode = TYPE;  // > CustomCode.jszip:8003
        break;  // > CustomCode.jszip:8004
      case TABLE:  // > CustomCode.jszip:8005
        //=== NEEDBITS(14); */  // > CustomCode.jszip:8006
        while (bits < 14) {  // > CustomCode.jszip:8007
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8008
          have--;  // > CustomCode.jszip:8009
          hold += input[next++] << bits;  // > CustomCode.jszip:8010
          bits += 8;  // > CustomCode.jszip:8011
        }  // > CustomCode.jszip:8012
        //===//  // > CustomCode.jszip:8013
        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;  // > CustomCode.jszip:8014
        //--- DROPBITS(5) ---//  // > CustomCode.jszip:8015
        hold >>>= 5;  // > CustomCode.jszip:8016
        bits -= 5;  // > CustomCode.jszip:8017
        //---//  // > CustomCode.jszip:8018
        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;  // > CustomCode.jszip:8019
        //--- DROPBITS(5) ---//  // > CustomCode.jszip:8020
        hold >>>= 5;  // > CustomCode.jszip:8021
        bits -= 5;  // > CustomCode.jszip:8022
        //---//  // > CustomCode.jszip:8023
        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;  // > CustomCode.jszip:8024
        //--- DROPBITS(4) ---//  // > CustomCode.jszip:8025
        hold >>>= 4;  // > CustomCode.jszip:8026
        bits -= 4;  // > CustomCode.jszip:8027
        //---//  // > CustomCode.jszip:8028
  //#ifndef PKZIP_BUG_WORKAROUND  // > CustomCode.jszip:8029
        if (state.nlen > 286 || state.ndist > 30) {  // > CustomCode.jszip:8030
          strm.msg = 'too many length or distance symbols';  // > CustomCode.jszip:8031
          state.mode = BAD;  // > CustomCode.jszip:8032
          break;  // > CustomCode.jszip:8033
        }  // > CustomCode.jszip:8034
  //#endif  // > CustomCode.jszip:8035
        //Tracev((stderr, "inflate:       table sizes ok\n"));  // > CustomCode.jszip:8036
        state.have = 0;  // > CustomCode.jszip:8037
        state.mode = LENLENS;  // > CustomCode.jszip:8038
        /* falls through */  // > CustomCode.jszip:8039
      case LENLENS:  // > CustomCode.jszip:8040
        while (state.have < state.ncode) {  // > CustomCode.jszip:8041
          //=== NEEDBITS(3);  // > CustomCode.jszip:8042
          while (bits < 3) {  // > CustomCode.jszip:8043
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8044
            have--;  // > CustomCode.jszip:8045
            hold += input[next++] << bits;  // > CustomCode.jszip:8046
            bits += 8;  // > CustomCode.jszip:8047
          }  // > CustomCode.jszip:8048
          //===//  // > CustomCode.jszip:8049
          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);  // > CustomCode.jszip:8050
          //--- DROPBITS(3) ---//  // > CustomCode.jszip:8051
          hold >>>= 3;  // > CustomCode.jszip:8052
          bits -= 3;  // > CustomCode.jszip:8053
          //---//  // > CustomCode.jszip:8054
        }  // > CustomCode.jszip:8055
        while (state.have < 19) {  // > CustomCode.jszip:8056
          state.lens[order[state.have++]] = 0;  // > CustomCode.jszip:8057
        }  // > CustomCode.jszip:8058
        // We have separate tables & no pointers. 2 commented lines below not needed.  // > CustomCode.jszip:8059
        //state.next = state.codes;  // > CustomCode.jszip:8060
        //state.lencode = state.next;  // > CustomCode.jszip:8061
        // Switch to use dynamic table  // > CustomCode.jszip:8062
        state.lencode = state.lendyn;  // > CustomCode.jszip:8063
        state.lenbits = 7;  // > CustomCode.jszip:8064
        opts = { bits: state.lenbits };  // > CustomCode.jszip:8065
        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);  // > CustomCode.jszip:8066
        state.lenbits = opts.bits;  // > CustomCode.jszip:8067
        if (ret) {  // > CustomCode.jszip:8068
          strm.msg = 'invalid code lengths set';  // > CustomCode.jszip:8069
          state.mode = BAD;  // > CustomCode.jszip:8070
          break;  // > CustomCode.jszip:8071
        }  // > CustomCode.jszip:8072
        //Tracev((stderr, "inflate:       code lengths ok\n"));  // > CustomCode.jszip:8073
        state.have = 0;  // > CustomCode.jszip:8074
        state.mode = CODELENS;  // > CustomCode.jszip:8075
        /* falls through */  // > CustomCode.jszip:8076
      case CODELENS:  // > CustomCode.jszip:8077
        while (state.have < state.nlen + state.ndist) {  // > CustomCode.jszip:8078
          for (;;) {  // > CustomCode.jszip:8079
            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/  // > CustomCode.jszip:8080
            here_bits = here >>> 24;  // > CustomCode.jszip:8081
            here_op = (here >>> 16) & 0xff;  // > CustomCode.jszip:8082
            here_val = here & 0xffff;  // > CustomCode.jszip:8083
            if ((here_bits) <= bits) { break; }  // > CustomCode.jszip:8084
            //--- PULLBYTE() ---//  // > CustomCode.jszip:8085
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8086
            have--;  // > CustomCode.jszip:8087
            hold += input[next++] << bits;  // > CustomCode.jszip:8088
            bits += 8;  // > CustomCode.jszip:8089
            //---//  // > CustomCode.jszip:8090
          }  // > CustomCode.jszip:8091
          if (here_val < 16) {  // > CustomCode.jszip:8092
            //--- DROPBITS(here.bits) ---//  // > CustomCode.jszip:8093
            hold >>>= here_bits;  // > CustomCode.jszip:8094
            bits -= here_bits;  // > CustomCode.jszip:8095
            //---//  // > CustomCode.jszip:8096
            state.lens[state.have++] = here_val;  // > CustomCode.jszip:8097
          }  // > CustomCode.jszip:8098
          else {  // > CustomCode.jszip:8099
            if (here_val === 16) {  // > CustomCode.jszip:8100
              //=== NEEDBITS(here.bits + 2);  // > CustomCode.jszip:8101
              n = here_bits + 2;  // > CustomCode.jszip:8102
              while (bits < n) {  // > CustomCode.jszip:8103
                if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8104
                have--;  // > CustomCode.jszip:8105
                hold += input[next++] << bits;  // > CustomCode.jszip:8106
                bits += 8;  // > CustomCode.jszip:8107
              }  // > CustomCode.jszip:8108
              //===//  // > CustomCode.jszip:8109
              //--- DROPBITS(here.bits) ---//  // > CustomCode.jszip:8110
              hold >>>= here_bits;  // > CustomCode.jszip:8111
              bits -= here_bits;  // > CustomCode.jszip:8112
              //---//  // > CustomCode.jszip:8113
              if (state.have === 0) {  // > CustomCode.jszip:8114
                strm.msg = 'invalid bit length repeat';  // > CustomCode.jszip:8115
                state.mode = BAD;  // > CustomCode.jszip:8116
                break;  // > CustomCode.jszip:8117
              }  // > CustomCode.jszip:8118
              len = state.lens[state.have - 1];  // > CustomCode.jszip:8119
              copy = 3 + (hold & 0x03);//BITS(2);  // > CustomCode.jszip:8120
              //--- DROPBITS(2) ---//  // > CustomCode.jszip:8121
              hold >>>= 2;  // > CustomCode.jszip:8122
              bits -= 2;  // > CustomCode.jszip:8123
              //---//  // > CustomCode.jszip:8124
            }  // > CustomCode.jszip:8125
            else if (here_val === 17) {  // > CustomCode.jszip:8126
              //=== NEEDBITS(here.bits + 3);  // > CustomCode.jszip:8127
              n = here_bits + 3;  // > CustomCode.jszip:8128
              while (bits < n) {  // > CustomCode.jszip:8129
                if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8130
                have--;  // > CustomCode.jszip:8131
                hold += input[next++] << bits;  // > CustomCode.jszip:8132
                bits += 8;  // > CustomCode.jszip:8133
              }  // > CustomCode.jszip:8134
              //===//  // > CustomCode.jszip:8135
              //--- DROPBITS(here.bits) ---//  // > CustomCode.jszip:8136
              hold >>>= here_bits;  // > CustomCode.jszip:8137
              bits -= here_bits;  // > CustomCode.jszip:8138
              //---//  // > CustomCode.jszip:8139
              len = 0;  // > CustomCode.jszip:8140
              copy = 3 + (hold & 0x07);//BITS(3);  // > CustomCode.jszip:8141
              //--- DROPBITS(3) ---//  // > CustomCode.jszip:8142
              hold >>>= 3;  // > CustomCode.jszip:8143
              bits -= 3;  // > CustomCode.jszip:8144
              //---//  // > CustomCode.jszip:8145
            }  // > CustomCode.jszip:8146
            else {  // > CustomCode.jszip:8147
              //=== NEEDBITS(here.bits + 7);  // > CustomCode.jszip:8148
              n = here_bits + 7;  // > CustomCode.jszip:8149
              while (bits < n) {  // > CustomCode.jszip:8150
                if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8151
                have--;  // > CustomCode.jszip:8152
                hold += input[next++] << bits;  // > CustomCode.jszip:8153
                bits += 8;  // > CustomCode.jszip:8154
              }  // > CustomCode.jszip:8155
              //===//  // > CustomCode.jszip:8156
              //--- DROPBITS(here.bits) ---//  // > CustomCode.jszip:8157
              hold >>>= here_bits;  // > CustomCode.jszip:8158
              bits -= here_bits;  // > CustomCode.jszip:8159
              //---//  // > CustomCode.jszip:8160
              len = 0;  // > CustomCode.jszip:8161
              copy = 11 + (hold & 0x7f);//BITS(7);  // > CustomCode.jszip:8162
              //--- DROPBITS(7) ---//  // > CustomCode.jszip:8163
              hold >>>= 7;  // > CustomCode.jszip:8164
              bits -= 7;  // > CustomCode.jszip:8165
              //---//  // > CustomCode.jszip:8166
            }  // > CustomCode.jszip:8167
            if (state.have + copy > state.nlen + state.ndist) {  // > CustomCode.jszip:8168
              strm.msg = 'invalid bit length repeat';  // > CustomCode.jszip:8169
              state.mode = BAD;  // > CustomCode.jszip:8170
              break;  // > CustomCode.jszip:8171
            }  // > CustomCode.jszip:8172
            while (copy--) {  // > CustomCode.jszip:8173
              state.lens[state.have++] = len;  // > CustomCode.jszip:8174
            }  // > CustomCode.jszip:8175
          }  // > CustomCode.jszip:8176
        }  // > CustomCode.jszip:8177
        /* handle error breaks in while */  // > CustomCode.jszip:8178
        if (state.mode === BAD) { break; }  // > CustomCode.jszip:8179
        /* check for end-of-block code (better have one) */  // > CustomCode.jszip:8180
        if (state.lens[256] === 0) {  // > CustomCode.jszip:8181
          strm.msg = 'invalid code -- missing end-of-block';  // > CustomCode.jszip:8182
          state.mode = BAD;  // > CustomCode.jszip:8183
          break;  // > CustomCode.jszip:8184
        }  // > CustomCode.jszip:8185
        /* build code tables -- note: do not change the lenbits or distbits  // > CustomCode.jszip:8186
           values here (9 and 6) without reading the comments in inftrees.h  // > CustomCode.jszip:8187
           concerning the ENOUGH constants, which depend on those values */  // > CustomCode.jszip:8188
        state.lenbits = 9;  // > CustomCode.jszip:8189
        opts = { bits: state.lenbits };  // > CustomCode.jszip:8190
        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);  // > CustomCode.jszip:8191
        // We have separate tables & no pointers. 2 commented lines below not needed.  // > CustomCode.jszip:8192
        // state.next_index = opts.table_index;  // > CustomCode.jszip:8193
        state.lenbits = opts.bits;  // > CustomCode.jszip:8194
        // state.lencode = state.next;  // > CustomCode.jszip:8195
        if (ret) {  // > CustomCode.jszip:8196
          strm.msg = 'invalid literal/lengths set';  // > CustomCode.jszip:8197
          state.mode = BAD;  // > CustomCode.jszip:8198
          break;  // > CustomCode.jszip:8199
        }  // > CustomCode.jszip:8200
        state.distbits = 6;  // > CustomCode.jszip:8201
        //state.distcode.copy(state.codes);  // > CustomCode.jszip:8202
        // Switch to use dynamic table  // > CustomCode.jszip:8203
        state.distcode = state.distdyn;  // > CustomCode.jszip:8204
        opts = { bits: state.distbits };  // > CustomCode.jszip:8205
        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);  // > CustomCode.jszip:8206
        // We have separate tables & no pointers. 2 commented lines below not needed.  // > CustomCode.jszip:8207
        // state.next_index = opts.table_index;  // > CustomCode.jszip:8208
        state.distbits = opts.bits;  // > CustomCode.jszip:8209
        // state.distcode = state.next;  // > CustomCode.jszip:8210
        if (ret) {  // > CustomCode.jszip:8211
          strm.msg = 'invalid distances set';  // > CustomCode.jszip:8212
          state.mode = BAD;  // > CustomCode.jszip:8213
          break;  // > CustomCode.jszip:8214
        }  // > CustomCode.jszip:8215
        //Tracev((stderr, 'inflate:       codes ok\n'));  // > CustomCode.jszip:8216
        state.mode = LEN_;  // > CustomCode.jszip:8217
        if (flush === Z_TREES) { break inf_leave; }  // > CustomCode.jszip:8218
        /* falls through */  // > CustomCode.jszip:8219
      case LEN_:  // > CustomCode.jszip:8220
        state.mode = LEN;  // > CustomCode.jszip:8221
        /* falls through */  // > CustomCode.jszip:8222
      case LEN:  // > CustomCode.jszip:8223
        if (have >= 6 && left >= 258) {  // > CustomCode.jszip:8224
          //--- RESTORE() ---  // > CustomCode.jszip:8225
          strm.next_out = put;  // > CustomCode.jszip:8226
          strm.avail_out = left;  // > CustomCode.jszip:8227
          strm.next_in = next;  // > CustomCode.jszip:8228
          strm.avail_in = have;  // > CustomCode.jszip:8229
          state.hold = hold;  // > CustomCode.jszip:8230
          state.bits = bits;  // > CustomCode.jszip:8231
          //---  // > CustomCode.jszip:8232
          inflate_fast(strm, _out);  // > CustomCode.jszip:8233
          //--- LOAD() ---  // > CustomCode.jszip:8234
          put = strm.next_out;  // > CustomCode.jszip:8235
          output = strm.output;  // > CustomCode.jszip:8236
          left = strm.avail_out;  // > CustomCode.jszip:8237
          next = strm.next_in;  // > CustomCode.jszip:8238
          input = strm.input;  // > CustomCode.jszip:8239
          have = strm.avail_in;  // > CustomCode.jszip:8240
          hold = state.hold;  // > CustomCode.jszip:8241
          bits = state.bits;  // > CustomCode.jszip:8242
          //---  // > CustomCode.jszip:8243
          if (state.mode === TYPE) {  // > CustomCode.jszip:8244
            state.back = -1;  // > CustomCode.jszip:8245
          }  // > CustomCode.jszip:8246
          break;  // > CustomCode.jszip:8247
        }  // > CustomCode.jszip:8248
        state.back = 0;  // > CustomCode.jszip:8249
        for (;;) {  // > CustomCode.jszip:8250
          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/  // > CustomCode.jszip:8251
          here_bits = here >>> 24;  // > CustomCode.jszip:8252
          here_op = (here >>> 16) & 0xff;  // > CustomCode.jszip:8253
          here_val = here & 0xffff;  // > CustomCode.jszip:8254
          if (here_bits <= bits) { break; }  // > CustomCode.jszip:8255
          //--- PULLBYTE() ---//  // > CustomCode.jszip:8256
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8257
          have--;  // > CustomCode.jszip:8258
          hold += input[next++] << bits;  // > CustomCode.jszip:8259
          bits += 8;  // > CustomCode.jszip:8260
          //---//  // > CustomCode.jszip:8261
        }  // > CustomCode.jszip:8262
        if (here_op && (here_op & 0xf0) === 0) {  // > CustomCode.jszip:8263
          last_bits = here_bits;  // > CustomCode.jszip:8264
          last_op = here_op;  // > CustomCode.jszip:8265
          last_val = here_val;  // > CustomCode.jszip:8266
          for (;;) {  // > CustomCode.jszip:8267
            here = state.lencode[last_val +  // > CustomCode.jszip:8268
                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];  // > CustomCode.jszip:8269
            here_bits = here >>> 24;  // > CustomCode.jszip:8270
            here_op = (here >>> 16) & 0xff;  // > CustomCode.jszip:8271
            here_val = here & 0xffff;  // > CustomCode.jszip:8272
            if ((last_bits + here_bits) <= bits) { break; }  // > CustomCode.jszip:8273
            //--- PULLBYTE() ---//  // > CustomCode.jszip:8274
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8275
            have--;  // > CustomCode.jszip:8276
            hold += input[next++] << bits;  // > CustomCode.jszip:8277
            bits += 8;  // > CustomCode.jszip:8278
            //---//  // > CustomCode.jszip:8279
          }  // > CustomCode.jszip:8280
          //--- DROPBITS(last.bits) ---//  // > CustomCode.jszip:8281
          hold >>>= last_bits;  // > CustomCode.jszip:8282
          bits -= last_bits;  // > CustomCode.jszip:8283
          //---//  // > CustomCode.jszip:8284
          state.back += last_bits;  // > CustomCode.jszip:8285
        }  // > CustomCode.jszip:8286
        //--- DROPBITS(here.bits) ---//  // > CustomCode.jszip:8287
        hold >>>= here_bits;  // > CustomCode.jszip:8288
        bits -= here_bits;  // > CustomCode.jszip:8289
        //---//  // > CustomCode.jszip:8290
        state.back += here_bits;  // > CustomCode.jszip:8291
        state.length = here_val;  // > CustomCode.jszip:8292
        if (here_op === 0) {  // > CustomCode.jszip:8293
          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?  // > CustomCode.jszip:8294
          //        "inflate:         literal '%c'\n" :  // > CustomCode.jszip:8295
          //        "inflate:         literal 0x%02x\n", here.val));  // > CustomCode.jszip:8296
          state.mode = LIT;  // > CustomCode.jszip:8297
          break;  // > CustomCode.jszip:8298
        }  // > CustomCode.jszip:8299
        if (here_op & 32) {  // > CustomCode.jszip:8300
          //Tracevv((stderr, "inflate:         end of block\n"));  // > CustomCode.jszip:8301
          state.back = -1;  // > CustomCode.jszip:8302
          state.mode = TYPE;  // > CustomCode.jszip:8303
          break;  // > CustomCode.jszip:8304
        }  // > CustomCode.jszip:8305
        if (here_op & 64) {  // > CustomCode.jszip:8306
          strm.msg = 'invalid literal/length code';  // > CustomCode.jszip:8307
          state.mode = BAD;  // > CustomCode.jszip:8308
          break;  // > CustomCode.jszip:8309
        }  // > CustomCode.jszip:8310
        state.extra = here_op & 15;  // > CustomCode.jszip:8311
        state.mode = LENEXT;  // > CustomCode.jszip:8312
        /* falls through */  // > CustomCode.jszip:8313
      case LENEXT:  // > CustomCode.jszip:8314
        if (state.extra) {  // > CustomCode.jszip:8315
          //=== NEEDBITS(state.extra);  // > CustomCode.jszip:8316
          n = state.extra;  // > CustomCode.jszip:8317
          while (bits < n) {  // > CustomCode.jszip:8318
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8319
            have--;  // > CustomCode.jszip:8320
            hold += input[next++] << bits;  // > CustomCode.jszip:8321
            bits += 8;  // > CustomCode.jszip:8322
          }  // > CustomCode.jszip:8323
          //===//  // > CustomCode.jszip:8324
          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;  // > CustomCode.jszip:8325
          //--- DROPBITS(state.extra) ---//  // > CustomCode.jszip:8326
          hold >>>= state.extra;  // > CustomCode.jszip:8327
          bits -= state.extra;  // > CustomCode.jszip:8328
          //---//  // > CustomCode.jszip:8329
          state.back += state.extra;  // > CustomCode.jszip:8330
        }  // > CustomCode.jszip:8331
        //Tracevv((stderr, "inflate:         length %u\n", state.length));  // > CustomCode.jszip:8332
        state.was = state.length;  // > CustomCode.jszip:8333
        state.mode = DIST;  // > CustomCode.jszip:8334
        /* falls through */  // > CustomCode.jszip:8335
      case DIST:  // > CustomCode.jszip:8336
        for (;;) {  // > CustomCode.jszip:8337
          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/  // > CustomCode.jszip:8338
          here_bits = here >>> 24;  // > CustomCode.jszip:8339
          here_op = (here >>> 16) & 0xff;  // > CustomCode.jszip:8340
          here_val = here & 0xffff;  // > CustomCode.jszip:8341
          if ((here_bits) <= bits) { break; }  // > CustomCode.jszip:8342
          //--- PULLBYTE() ---//  // > CustomCode.jszip:8343
          if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8344
          have--;  // > CustomCode.jszip:8345
          hold += input[next++] << bits;  // > CustomCode.jszip:8346
          bits += 8;  // > CustomCode.jszip:8347
          //---//  // > CustomCode.jszip:8348
        }  // > CustomCode.jszip:8349
        if ((here_op & 0xf0) === 0) {  // > CustomCode.jszip:8350
          last_bits = here_bits;  // > CustomCode.jszip:8351
          last_op = here_op;  // > CustomCode.jszip:8352
          last_val = here_val;  // > CustomCode.jszip:8353
          for (;;) {  // > CustomCode.jszip:8354
            here = state.distcode[last_val +  // > CustomCode.jszip:8355
                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];  // > CustomCode.jszip:8356
            here_bits = here >>> 24;  // > CustomCode.jszip:8357
            here_op = (here >>> 16) & 0xff;  // > CustomCode.jszip:8358
            here_val = here & 0xffff;  // > CustomCode.jszip:8359
            if ((last_bits + here_bits) <= bits) { break; }  // > CustomCode.jszip:8360
            //--- PULLBYTE() ---//  // > CustomCode.jszip:8361
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8362
            have--;  // > CustomCode.jszip:8363
            hold += input[next++] << bits;  // > CustomCode.jszip:8364
            bits += 8;  // > CustomCode.jszip:8365
            //---//  // > CustomCode.jszip:8366
          }  // > CustomCode.jszip:8367
          //--- DROPBITS(last.bits) ---//  // > CustomCode.jszip:8368
          hold >>>= last_bits;  // > CustomCode.jszip:8369
          bits -= last_bits;  // > CustomCode.jszip:8370
          //---//  // > CustomCode.jszip:8371
          state.back += last_bits;  // > CustomCode.jszip:8372
        }  // > CustomCode.jszip:8373
        //--- DROPBITS(here.bits) ---//  // > CustomCode.jszip:8374
        hold >>>= here_bits;  // > CustomCode.jszip:8375
        bits -= here_bits;  // > CustomCode.jszip:8376
        //---//  // > CustomCode.jszip:8377
        state.back += here_bits;  // > CustomCode.jszip:8378
        if (here_op & 64) {  // > CustomCode.jszip:8379
          strm.msg = 'invalid distance code';  // > CustomCode.jszip:8380
          state.mode = BAD;  // > CustomCode.jszip:8381
          break;  // > CustomCode.jszip:8382
        }  // > CustomCode.jszip:8383
        state.offset = here_val;  // > CustomCode.jszip:8384
        state.extra = (here_op) & 15;  // > CustomCode.jszip:8385
        state.mode = DISTEXT;  // > CustomCode.jszip:8386
        /* falls through */  // > CustomCode.jszip:8387
      case DISTEXT:  // > CustomCode.jszip:8388
        if (state.extra) {  // > CustomCode.jszip:8389
          //=== NEEDBITS(state.extra);  // > CustomCode.jszip:8390
          n = state.extra;  // > CustomCode.jszip:8391
          while (bits < n) {  // > CustomCode.jszip:8392
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8393
            have--;  // > CustomCode.jszip:8394
            hold += input[next++] << bits;  // > CustomCode.jszip:8395
            bits += 8;  // > CustomCode.jszip:8396
          }  // > CustomCode.jszip:8397
          //===//  // > CustomCode.jszip:8398
          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;  // > CustomCode.jszip:8399
          //--- DROPBITS(state.extra) ---//  // > CustomCode.jszip:8400
          hold >>>= state.extra;  // > CustomCode.jszip:8401
          bits -= state.extra;  // > CustomCode.jszip:8402
          //---//  // > CustomCode.jszip:8403
          state.back += state.extra;  // > CustomCode.jszip:8404
        }  // > CustomCode.jszip:8405
  //#ifdef INFLATE_STRICT  // > CustomCode.jszip:8406
        if (state.offset > state.dmax) {  // > CustomCode.jszip:8407
          strm.msg = 'invalid distance too far back';  // > CustomCode.jszip:8408
          state.mode = BAD;  // > CustomCode.jszip:8409
          break;  // > CustomCode.jszip:8410
        }  // > CustomCode.jszip:8411
  //#endif  // > CustomCode.jszip:8412
        //Tracevv((stderr, "inflate:         distance %u\n", state.offset));  // > CustomCode.jszip:8413
        state.mode = MATCH;  // > CustomCode.jszip:8414
        /* falls through */  // > CustomCode.jszip:8415
      case MATCH:  // > CustomCode.jszip:8416
        if (left === 0) { break inf_leave; }  // > CustomCode.jszip:8417
        copy = _out - left;  // > CustomCode.jszip:8418
        if (state.offset > copy) {         /* copy from window */  // > CustomCode.jszip:8419
          copy = state.offset - copy;  // > CustomCode.jszip:8420
          if (copy > state.whave) {  // > CustomCode.jszip:8421
            if (state.sane) {  // > CustomCode.jszip:8422
              strm.msg = 'invalid distance too far back';  // > CustomCode.jszip:8423
              state.mode = BAD;  // > CustomCode.jszip:8424
              break;  // > CustomCode.jszip:8425
            }  // > CustomCode.jszip:8426
  // (!) This block is disabled in zlib defailts,  // > CustomCode.jszip:8427
  // don't enable it for binary compatibility  // > CustomCode.jszip:8428
  //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR  // > CustomCode.jszip:8429
  //          Trace((stderr, "inflate.c too far\n"));  // > CustomCode.jszip:8430
  //          copy -= state.whave;  // > CustomCode.jszip:8431
  //          if (copy > state.length) { copy = state.length; }  // > CustomCode.jszip:8432
  //          if (copy > left) { copy = left; }  // > CustomCode.jszip:8433
  //          left -= copy;  // > CustomCode.jszip:8434
  //          state.length -= copy;  // > CustomCode.jszip:8435
  //          do {  // > CustomCode.jszip:8436
  //            output[put++] = 0;  // > CustomCode.jszip:8437
  //          } while (--copy);  // > CustomCode.jszip:8438
  //          if (state.length === 0) { state.mode = LEN; }  // > CustomCode.jszip:8439
  //          break;  // > CustomCode.jszip:8440
  //#endif  // > CustomCode.jszip:8441
          }  // > CustomCode.jszip:8442
          if (copy > state.wnext) {  // > CustomCode.jszip:8443
            copy -= state.wnext;  // > CustomCode.jszip:8444
            from = state.wsize - copy;  // > CustomCode.jszip:8445
          }  // > CustomCode.jszip:8446
          else {  // > CustomCode.jszip:8447
            from = state.wnext - copy;  // > CustomCode.jszip:8448
          }  // > CustomCode.jszip:8449
          if (copy > state.length) { copy = state.length; }  // > CustomCode.jszip:8450
          from_source = state.window;  // > CustomCode.jszip:8451
        }  // > CustomCode.jszip:8452
        else {                              /* copy from output */  // > CustomCode.jszip:8453
          from_source = output;  // > CustomCode.jszip:8454
          from = put - state.offset;  // > CustomCode.jszip:8455
          copy = state.length;  // > CustomCode.jszip:8456
        }  // > CustomCode.jszip:8457
        if (copy > left) { copy = left; }  // > CustomCode.jszip:8458
        left -= copy;  // > CustomCode.jszip:8459
        state.length -= copy;  // > CustomCode.jszip:8460
        do {  // > CustomCode.jszip:8461
          output[put++] = from_source[from++];  // > CustomCode.jszip:8462
        } while (--copy);  // > CustomCode.jszip:8463
        if (state.length === 0) { state.mode = LEN; }  // > CustomCode.jszip:8464
        break;  // > CustomCode.jszip:8465
      case LIT:  // > CustomCode.jszip:8466
        if (left === 0) { break inf_leave; }  // > CustomCode.jszip:8467
        output[put++] = state.length;  // > CustomCode.jszip:8468
        left--;  // > CustomCode.jszip:8469
        state.mode = LEN;  // > CustomCode.jszip:8470
        break;  // > CustomCode.jszip:8471
      case CHECK:  // > CustomCode.jszip:8472
        if (state.wrap) {  // > CustomCode.jszip:8473
          //=== NEEDBITS(32);  // > CustomCode.jszip:8474
          while (bits < 32) {  // > CustomCode.jszip:8475
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8476
            have--;  // > CustomCode.jszip:8477
            // Use '|' insdead of '+' to make sure that result is signed  // > CustomCode.jszip:8478
            hold |= input[next++] << bits;  // > CustomCode.jszip:8479
            bits += 8;  // > CustomCode.jszip:8480
          }  // > CustomCode.jszip:8481
          //===//  // > CustomCode.jszip:8482
          _out -= left;  // > CustomCode.jszip:8483
          strm.total_out += _out;  // > CustomCode.jszip:8484
          state.total += _out;  // > CustomCode.jszip:8485
          if (_out) {  // > CustomCode.jszip:8486
            strm.adler = state.check =  // > CustomCode.jszip:8487
                /*UPDATE(state.check, put - _out, _out);*/  // > CustomCode.jszip:8488
                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));  // > CustomCode.jszip:8489
          }  // > CustomCode.jszip:8490
          _out = left;  // > CustomCode.jszip:8491
          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too  // > CustomCode.jszip:8492
          if ((state.flags ? hold : zswap32(hold)) !== state.check) {  // > CustomCode.jszip:8493
            strm.msg = 'incorrect data check';  // > CustomCode.jszip:8494
            state.mode = BAD;  // > CustomCode.jszip:8495
            break;  // > CustomCode.jszip:8496
          }  // > CustomCode.jszip:8497
          //=== INITBITS();  // > CustomCode.jszip:8498
          hold = 0;  // > CustomCode.jszip:8499
          bits = 0;  // > CustomCode.jszip:8500
          //===//  // > CustomCode.jszip:8501
          //Tracev((stderr, "inflate:   check matches trailer\n"));  // > CustomCode.jszip:8502
        }  // > CustomCode.jszip:8503
        state.mode = LENGTH;  // > CustomCode.jszip:8504
        /* falls through */  // > CustomCode.jszip:8505
      case LENGTH:  // > CustomCode.jszip:8506
        if (state.wrap && state.flags) {  // > CustomCode.jszip:8507
          //=== NEEDBITS(32);  // > CustomCode.jszip:8508
          while (bits < 32) {  // > CustomCode.jszip:8509
            if (have === 0) { break inf_leave; }  // > CustomCode.jszip:8510
            have--;  // > CustomCode.jszip:8511
            hold += input[next++] << bits;  // > CustomCode.jszip:8512
            bits += 8;  // > CustomCode.jszip:8513
          }  // > CustomCode.jszip:8514
          //===//  // > CustomCode.jszip:8515
          if (hold !== (state.total & 0xffffffff)) {  // > CustomCode.jszip:8516
            strm.msg = 'incorrect length check';  // > CustomCode.jszip:8517
            state.mode = BAD;  // > CustomCode.jszip:8518
            break;  // > CustomCode.jszip:8519
          }  // > CustomCode.jszip:8520
          //=== INITBITS();  // > CustomCode.jszip:8521
          hold = 0;  // > CustomCode.jszip:8522
          bits = 0;  // > CustomCode.jszip:8523
          //===//  // > CustomCode.jszip:8524
          //Tracev((stderr, "inflate:   length matches trailer\n"));  // > CustomCode.jszip:8525
        }  // > CustomCode.jszip:8526
        state.mode = DONE;  // > CustomCode.jszip:8527
        /* falls through */  // > CustomCode.jszip:8528
      case DONE:  // > CustomCode.jszip:8529
        ret = Z_STREAM_END;  // > CustomCode.jszip:8530
        break inf_leave;  // > CustomCode.jszip:8531
      case BAD:  // > CustomCode.jszip:8532
        ret = Z_DATA_ERROR;  // > CustomCode.jszip:8533
        break inf_leave;  // > CustomCode.jszip:8534
      case MEM:  // > CustomCode.jszip:8535
        return Z_MEM_ERROR;  // > CustomCode.jszip:8536
      case SYNC:  // > CustomCode.jszip:8537
        /* falls through */  // > CustomCode.jszip:8538
      default:  // > CustomCode.jszip:8539
        return Z_STREAM_ERROR;  // > CustomCode.jszip:8540
      }  // > CustomCode.jszip:8541
    }  // > CustomCode.jszip:8542
    // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"  // > CustomCode.jszip:8543
    /*  // > CustomCode.jszip:8544
       Return from inflate(), updating the total counts and the check value.  // > CustomCode.jszip:8545
       If there was no progress during the inflate() call, return a buffer  // > CustomCode.jszip:8546
       error.  Call updatewindow() to create and/or update the window state.  // > CustomCode.jszip:8547
       Note: a memory error from inflate() is non-recoverable.  // > CustomCode.jszip:8548
     */  // > CustomCode.jszip:8549
    //--- RESTORE() ---  // > CustomCode.jszip:8550
    strm.next_out = put;  // > CustomCode.jszip:8551
    strm.avail_out = left;  // > CustomCode.jszip:8552
    strm.next_in = next;  // > CustomCode.jszip:8553
    strm.avail_in = have;  // > CustomCode.jszip:8554
    state.hold = hold;  // > CustomCode.jszip:8555
    state.bits = bits;  // > CustomCode.jszip:8556
    //---  // > CustomCode.jszip:8557
    if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&  // > CustomCode.jszip:8558
                        (state.mode < CHECK || flush !== Z_FINISH))) {  // > CustomCode.jszip:8559
      if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {  // > CustomCode.jszip:8560
        state.mode = MEM;  // > CustomCode.jszip:8561
        return Z_MEM_ERROR;  // > CustomCode.jszip:8562
      }  // > CustomCode.jszip:8563
    }  // > CustomCode.jszip:8564
    _in -= strm.avail_in;  // > CustomCode.jszip:8565
    _out -= strm.avail_out;  // > CustomCode.jszip:8566
    strm.total_in += _in;  // > CustomCode.jszip:8567
    strm.total_out += _out;  // > CustomCode.jszip:8568
    state.total += _out;  // > CustomCode.jszip:8569
    if (state.wrap && _out) {  // > CustomCode.jszip:8570
      strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/  // > CustomCode.jszip:8571
        (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));  // > CustomCode.jszip:8572
    }  // > CustomCode.jszip:8573
    strm.data_type = state.bits + (state.last ? 64 : 0) +  // > CustomCode.jszip:8574
                      (state.mode === TYPE ? 128 : 0) +  // > CustomCode.jszip:8575
                      (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);  // > CustomCode.jszip:8576
    if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {  // > CustomCode.jszip:8577
      ret = Z_BUF_ERROR;  // > CustomCode.jszip:8578
    }  // > CustomCode.jszip:8579
    return ret;  // > CustomCode.jszip:8580
  }  // > CustomCode.jszip:8581
  function inflateEnd(strm) {  // > CustomCode.jszip:8582
    if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {  // > CustomCode.jszip:8583
      return Z_STREAM_ERROR;  // > CustomCode.jszip:8584
    }  // > CustomCode.jszip:8585
    var state = strm.state;  // > CustomCode.jszip:8586
    if (state.window) {  // > CustomCode.jszip:8587
      state.window = null;  // > CustomCode.jszip:8588
    }  // > CustomCode.jszip:8589
    strm.state = null;  // > CustomCode.jszip:8590
    return Z_OK;  // > CustomCode.jszip:8591
  }  // > CustomCode.jszip:8592
  function inflateGetHeader(strm, head) {  // > CustomCode.jszip:8593
    var state;  // > CustomCode.jszip:8594
    /* check state */  // > CustomCode.jszip:8595
    if (!strm || !strm.state) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:8596
    state = strm.state;  // > CustomCode.jszip:8597
    if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:8598
    /* save header structure */  // > CustomCode.jszip:8599
    state.head = head;  // > CustomCode.jszip:8600
    head.done = false;  // > CustomCode.jszip:8601
    return Z_OK;  // > CustomCode.jszip:8602
  }  // > CustomCode.jszip:8603
  function inflateSetDictionary(strm, dictionary) {  // > CustomCode.jszip:8604
    var dictLength = dictionary.length;  // > CustomCode.jszip:8605
    var state;  // > CustomCode.jszip:8606
    var dictid;  // > CustomCode.jszip:8607
    var ret;  // > CustomCode.jszip:8608
    /* check state */  // > CustomCode.jszip:8609
    if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }  // > CustomCode.jszip:8610
    state = strm.state;  // > CustomCode.jszip:8611
    if (state.wrap !== 0 && state.mode !== DICT) {  // > CustomCode.jszip:8612
      return Z_STREAM_ERROR;  // > CustomCode.jszip:8613
    }  // > CustomCode.jszip:8614
    /* check for correct dictionary identifier */  // > CustomCode.jszip:8615
    if (state.mode === DICT) {  // > CustomCode.jszip:8616
      dictid = 1; /* adler32(0, null, 0)*/  // > CustomCode.jszip:8617
      /* dictid = adler32(dictid, dictionary, dictLength); */  // > CustomCode.jszip:8618
      dictid = adler32(dictid, dictionary, dictLength, 0);  // > CustomCode.jszip:8619
      if (dictid !== state.check) {  // > CustomCode.jszip:8620
        return Z_DATA_ERROR;  // > CustomCode.jszip:8621
      }  // > CustomCode.jszip:8622
    }  // > CustomCode.jszip:8623
    /* copy dictionary to window using updatewindow(), which will amend the  // > CustomCode.jszip:8624
     existing dictionary if appropriate */  // > CustomCode.jszip:8625
    ret = updatewindow(strm, dictionary, dictLength, dictLength);  // > CustomCode.jszip:8626
    if (ret) {  // > CustomCode.jszip:8627
      state.mode = MEM;  // > CustomCode.jszip:8628
      return Z_MEM_ERROR;  // > CustomCode.jszip:8629
    }  // > CustomCode.jszip:8630
    state.havedict = 1;  // > CustomCode.jszip:8631
    // Tracev((stderr, "inflate:   dictionary set\n"));  // > CustomCode.jszip:8632
    return Z_OK;  // > CustomCode.jszip:8633
  }  // > CustomCode.jszip:8634
  exports.inflateReset = inflateReset;  // > CustomCode.jszip:8635
  exports.inflateReset2 = inflateReset2;  // > CustomCode.jszip:8636
  exports.inflateResetKeep = inflateResetKeep;  // > CustomCode.jszip:8637
  exports.inflateInit = inflateInit;  // > CustomCode.jszip:8638
  exports.inflateInit2 = inflateInit2;  // > CustomCode.jszip:8639
  exports.inflate = inflate;  // > CustomCode.jszip:8640
  exports.inflateEnd = inflateEnd;  // > CustomCode.jszip:8641
  exports.inflateGetHeader = inflateGetHeader;  // > CustomCode.jszip:8642
  exports.inflateSetDictionary = inflateSetDictionary;  // > CustomCode.jszip:8643
  exports.inflateInfo = 'pako inflate (from Nodeca project)';  // > CustomCode.jszip:8644
  /* Not implemented  // > CustomCode.jszip:8645
  exports.inflateCopy = inflateCopy;  // > CustomCode.jszip:8646
  exports.inflateGetDictionary = inflateGetDictionary;  // > CustomCode.jszip:8647
  exports.inflateMark = inflateMark;  // > CustomCode.jszip:8648
  exports.inflatePrime = inflatePrime;  // > CustomCode.jszip:8649
  exports.inflateSync = inflateSync;  // > CustomCode.jszip:8650
  exports.inflateSyncPoint = inflateSyncPoint;  // > CustomCode.jszip:8651
  exports.inflateUndermine = inflateUndermine;  // > CustomCode.jszip:8652
  */  // > CustomCode.jszip:8653
  },{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(require,module,exports){  // > CustomCode.jszip:8654
  'use strict';  // > CustomCode.jszip:8655
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:8656
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:8657
  //  // > CustomCode.jszip:8658
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:8659
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:8660
  // arising from the use of this software.  // > CustomCode.jszip:8661
  //  // > CustomCode.jszip:8662
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:8663
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:8664
  // freely, subject to the following restrictions:  // > CustomCode.jszip:8665
  //  // > CustomCode.jszip:8666
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:8667
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:8668
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:8669
  //   appreciated but is not required.  // > CustomCode.jszip:8670
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:8671
  //   misrepresented as being the original software.  // > CustomCode.jszip:8672
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:8673
  var utils = require('../utils/common');  // > CustomCode.jszip:8674
  var MAXBITS = 15;  // > CustomCode.jszip:8675
  var ENOUGH_LENS = 852;  // > CustomCode.jszip:8676
  var ENOUGH_DISTS = 592;  // > CustomCode.jszip:8677
  //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);  // > CustomCode.jszip:8678
  var CODES = 0;  // > CustomCode.jszip:8679
  var LENS = 1;  // > CustomCode.jszip:8680
  var DISTS = 2;  // > CustomCode.jszip:8681
  var lbase = [ /* Length codes 257..285 base */  // > CustomCode.jszip:8682
    3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,  // > CustomCode.jszip:8683
    35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0  // > CustomCode.jszip:8684
  ];  // > CustomCode.jszip:8685
  var lext = [ /* Length codes 257..285 extra */  // > CustomCode.jszip:8686
    16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,  // > CustomCode.jszip:8687
    19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78  // > CustomCode.jszip:8688
  ];  // > CustomCode.jszip:8689
  var dbase = [ /* Distance codes 0..29 base */  // > CustomCode.jszip:8690
    1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,  // > CustomCode.jszip:8691
    257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,  // > CustomCode.jszip:8692
    8193, 12289, 16385, 24577, 0, 0  // > CustomCode.jszip:8693
  ];  // > CustomCode.jszip:8694
  var dext = [ /* Distance codes 0..29 extra */  // > CustomCode.jszip:8695
    16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,  // > CustomCode.jszip:8696
    23, 23, 24, 24, 25, 25, 26, 26, 27, 27,  // > CustomCode.jszip:8697
    28, 28, 29, 29, 64, 64  // > CustomCode.jszip:8698
  ];  // > CustomCode.jszip:8699
  module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)  // > CustomCode.jszip:8700
  {  // > CustomCode.jszip:8701
    var bits = opts.bits;  // > CustomCode.jszip:8702
        //here = opts.here; /* table entry for duplication */  // > CustomCode.jszip:8703
    var len = 0;               /* a code's length in bits */  // > CustomCode.jszip:8704
    var sym = 0;               /* index of code symbols */  // > CustomCode.jszip:8705
    var min = 0, max = 0;          /* minimum and maximum code lengths */  // > CustomCode.jszip:8706
    var root = 0;              /* number of index bits for root table */  // > CustomCode.jszip:8707
    var curr = 0;              /* number of index bits for current table */  // > CustomCode.jszip:8708
    var drop = 0;              /* code bits to drop for sub-table */  // > CustomCode.jszip:8709
    var left = 0;                   /* number of prefix codes available */  // > CustomCode.jszip:8710
    var used = 0;              /* code entries in table used */  // > CustomCode.jszip:8711
    var huff = 0;              /* Huffman code */  // > CustomCode.jszip:8712
    var incr;              /* for incrementing code, index */  // > CustomCode.jszip:8713
    var fill;              /* index for replicating entries */  // > CustomCode.jszip:8714
    var low;               /* low bits for current root entry */  // > CustomCode.jszip:8715
    var mask;              /* mask for low root bits */  // > CustomCode.jszip:8716
    var next;             /* next available space in table */  // > CustomCode.jszip:8717
    var base = null;     /* base value table to use */  // > CustomCode.jszip:8718
    var base_index = 0;  // > CustomCode.jszip:8719
  //  var shoextra;    /* extra bits table to use */  // > CustomCode.jszip:8720
    var end;                    /* use base and extra for symbol > end */  // > CustomCode.jszip:8721
    var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */  // > CustomCode.jszip:8722
    var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */  // > CustomCode.jszip:8723
    var extra = null;  // > CustomCode.jszip:8724
    var extra_index = 0;  // > CustomCode.jszip:8725
    var here_bits, here_op, here_val;  // > CustomCode.jszip:8726
    /*  // > CustomCode.jszip:8727
     Process a set of code lengths to create a canonical Huffman code.  The  // > CustomCode.jszip:8728
     code lengths are lens[0..codes-1].  Each length corresponds to the  // > CustomCode.jszip:8729
     symbols 0..codes-1.  The Huffman code is generated by first sorting the  // > CustomCode.jszip:8730
     symbols by length from short to long, and retaining the symbol order  // > CustomCode.jszip:8731
     for codes with equal lengths.  Then the code starts with all zero bits  // > CustomCode.jszip:8732
     for the first code of the shortest length, and the codes are integer  // > CustomCode.jszip:8733
     increments for the same length, and zeros are appended as the length  // > CustomCode.jszip:8734
     increases.  For the deflate format, these bits are stored backwards  // > CustomCode.jszip:8735
     from their more natural integer increment ordering, and so when the  // > CustomCode.jszip:8736
     decoding tables are built in the large loop below, the integer codes  // > CustomCode.jszip:8737
     are incremented backwards.  // > CustomCode.jszip:8738
     This routine assumes, but does not check, that all of the entries in  // > CustomCode.jszip:8739
     lens[] are in the range 0..MAXBITS.  The caller must assure this.  // > CustomCode.jszip:8740
     1..MAXBITS is interpreted as that code length.  zero means that that  // > CustomCode.jszip:8741
     symbol does not occur in this code.  // > CustomCode.jszip:8742
     The codes are sorted by computing a count of codes for each length,  // > CustomCode.jszip:8743
     creating from that a table of starting indices for each length in the  // > CustomCode.jszip:8744
     sorted table, and then entering the symbols in order in the sorted  // > CustomCode.jszip:8745
     table.  The sorted table is work[], with that space being provided by  // > CustomCode.jszip:8746
     the caller.  // > CustomCode.jszip:8747
     The length counts are used for other purposes as well, i.e. finding  // > CustomCode.jszip:8748
     the minimum and maximum length codes, determining if there are any  // > CustomCode.jszip:8749
     codes at all, checking for a valid set of lengths, and looking ahead  // > CustomCode.jszip:8750
     at length counts to determine sub-table sizes when building the  // > CustomCode.jszip:8751
     decoding tables.  // > CustomCode.jszip:8752
     */  // > CustomCode.jszip:8753
    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */  // > CustomCode.jszip:8754
    for (len = 0; len <= MAXBITS; len++) {  // > CustomCode.jszip:8755
      count[len] = 0;  // > CustomCode.jszip:8756
    }  // > CustomCode.jszip:8757
    for (sym = 0; sym < codes; sym++) {  // > CustomCode.jszip:8758
      count[lens[lens_index + sym]]++;  // > CustomCode.jszip:8759
    }  // > CustomCode.jszip:8760
    /* bound code lengths, force root to be within code lengths */  // > CustomCode.jszip:8761
    root = bits;  // > CustomCode.jszip:8762
    for (max = MAXBITS; max >= 1; max--) {  // > CustomCode.jszip:8763
      if (count[max] !== 0) { break; }  // > CustomCode.jszip:8764
    }  // > CustomCode.jszip:8765
    if (root > max) {  // > CustomCode.jszip:8766
      root = max;  // > CustomCode.jszip:8767
    }  // > CustomCode.jszip:8768
    if (max === 0) {                     /* no symbols to code at all */  // > CustomCode.jszip:8769
      //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */  // > CustomCode.jszip:8770
      //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;  // > CustomCode.jszip:8771
      //table.val[opts.table_index++] = 0;   //here.val = (var short)0;  // > CustomCode.jszip:8772
      table[table_index++] = (1 << 24) | (64 << 16) | 0;  // > CustomCode.jszip:8773
      //table.op[opts.table_index] = 64;  // > CustomCode.jszip:8774
      //table.bits[opts.table_index] = 1;  // > CustomCode.jszip:8775
      //table.val[opts.table_index++] = 0;  // > CustomCode.jszip:8776
      table[table_index++] = (1 << 24) | (64 << 16) | 0;  // > CustomCode.jszip:8777
      opts.bits = 1;  // > CustomCode.jszip:8778
      return 0;     /* no symbols, but wait for decoding to report error */  // > CustomCode.jszip:8779
    }  // > CustomCode.jszip:8780
    for (min = 1; min < max; min++) {  // > CustomCode.jszip:8781
      if (count[min] !== 0) { break; }  // > CustomCode.jszip:8782
    }  // > CustomCode.jszip:8783
    if (root < min) {  // > CustomCode.jszip:8784
      root = min;  // > CustomCode.jszip:8785
    }  // > CustomCode.jszip:8786
    /* check for an over-subscribed or incomplete set of lengths */  // > CustomCode.jszip:8787
    left = 1;  // > CustomCode.jszip:8788
    for (len = 1; len <= MAXBITS; len++) {  // > CustomCode.jszip:8789
      left <<= 1;  // > CustomCode.jszip:8790
      left -= count[len];  // > CustomCode.jszip:8791
      if (left < 0) {  // > CustomCode.jszip:8792
        return -1;  // > CustomCode.jszip:8793
      }        /* over-subscribed */  // > CustomCode.jszip:8794
    }  // > CustomCode.jszip:8795
    if (left > 0 && (type === CODES || max !== 1)) {  // > CustomCode.jszip:8796
      return -1;                      /* incomplete set */  // > CustomCode.jszip:8797
    }  // > CustomCode.jszip:8798
    /* generate offsets into symbol table for each length for sorting */  // > CustomCode.jszip:8799
    offs[1] = 0;  // > CustomCode.jszip:8800
    for (len = 1; len < MAXBITS; len++) {  // > CustomCode.jszip:8801
      offs[len + 1] = offs[len] + count[len];  // > CustomCode.jszip:8802
    }  // > CustomCode.jszip:8803
    /* sort symbols by length, by symbol order within each length */  // > CustomCode.jszip:8804
    for (sym = 0; sym < codes; sym++) {  // > CustomCode.jszip:8805
      if (lens[lens_index + sym] !== 0) {  // > CustomCode.jszip:8806
        work[offs[lens[lens_index + sym]]++] = sym;  // > CustomCode.jszip:8807
      }  // > CustomCode.jszip:8808
    }  // > CustomCode.jszip:8809
    /*  // > CustomCode.jszip:8810
     Create and fill in decoding tables.  In this loop, the table being  // > CustomCode.jszip:8811
     filled is at next and has curr index bits.  The code being used is huff  // > CustomCode.jszip:8812
     with length len.  That code is converted to an index by dropping drop  // > CustomCode.jszip:8813
     bits off of the bottom.  For codes where len is less than drop + curr,  // > CustomCode.jszip:8814
     those top drop + curr - len bits are incremented through all values to  // > CustomCode.jszip:8815
     fill the table with replicated entries.  // > CustomCode.jszip:8816
     root is the number of index bits for the root table.  When len exceeds  // > CustomCode.jszip:8817
     root, sub-tables are created pointed to by the root entry with an index  // > CustomCode.jszip:8818
     of the low root bits of huff.  This is saved in low to check for when a  // > CustomCode.jszip:8819
     new sub-table should be started.  drop is zero when the root table is  // > CustomCode.jszip:8820
     being filled, and drop is root when sub-tables are being filled.  // > CustomCode.jszip:8821
     When a new sub-table is needed, it is necessary to look ahead in the  // > CustomCode.jszip:8822
     code lengths to determine what size sub-table is needed.  The length  // > CustomCode.jszip:8823
     counts are used for this, and so count[] is decremented as codes are  // > CustomCode.jszip:8824
     entered in the tables.  // > CustomCode.jszip:8825
     used keeps track of how many table entries have been allocated from the  // > CustomCode.jszip:8826
     provided *table space.  It is checked for LENS and DIST tables against  // > CustomCode.jszip:8827
     the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in  // > CustomCode.jszip:8828
     the initial root table size constants.  See the comments in inftrees.h  // > CustomCode.jszip:8829
     for more information.  // > CustomCode.jszip:8830
     sym increments through all symbols, and the loop terminates when  // > CustomCode.jszip:8831
     all codes of length max, i.e. all codes, have been processed.  This  // > CustomCode.jszip:8832
     routine permits incomplete codes, so another loop after this one fills  // > CustomCode.jszip:8833
     in the rest of the decoding tables with invalid code markers.  // > CustomCode.jszip:8834
     */  // > CustomCode.jszip:8835
    /* set up for code type */  // > CustomCode.jszip:8836
    // poor man optimization - use if-else instead of switch,  // > CustomCode.jszip:8837
    // to avoid deopts in old v8  // > CustomCode.jszip:8838
    if (type === CODES) {  // > CustomCode.jszip:8839
      base = extra = work;    /* dummy value--not used */  // > CustomCode.jszip:8840
      end = 19;  // > CustomCode.jszip:8841
    } else if (type === LENS) {  // > CustomCode.jszip:8842
      base = lbase;  // > CustomCode.jszip:8843
      base_index -= 257;  // > CustomCode.jszip:8844
      extra = lext;  // > CustomCode.jszip:8845
      extra_index -= 257;  // > CustomCode.jszip:8846
      end = 256;  // > CustomCode.jszip:8847
    } else {                    /* DISTS */  // > CustomCode.jszip:8848
      base = dbase;  // > CustomCode.jszip:8849
      extra = dext;  // > CustomCode.jszip:8850
      end = -1;  // > CustomCode.jszip:8851
    }  // > CustomCode.jszip:8852
    /* initialize opts for loop */  // > CustomCode.jszip:8853
    huff = 0;                   /* starting code */  // > CustomCode.jszip:8854
    sym = 0;                    /* starting code symbol */  // > CustomCode.jszip:8855
    len = min;                  /* starting code length */  // > CustomCode.jszip:8856
    next = table_index;              /* current table to fill in */  // > CustomCode.jszip:8857
    curr = root;                /* current table index bits */  // > CustomCode.jszip:8858
    drop = 0;                   /* current bits to drop from code for index */  // > CustomCode.jszip:8859
    low = -1;                   /* trigger new sub-table when len > root */  // > CustomCode.jszip:8860
    used = 1 << root;          /* use root table entries */  // > CustomCode.jszip:8861
    mask = used - 1;            /* mask for comparing low */  // > CustomCode.jszip:8862
    /* check available table space */  // > CustomCode.jszip:8863
    if ((type === LENS && used > ENOUGH_LENS) ||  // > CustomCode.jszip:8864
      (type === DISTS && used > ENOUGH_DISTS)) {  // > CustomCode.jszip:8865
      return 1;  // > CustomCode.jszip:8866
    }  // > CustomCode.jszip:8867
    /* process all codes and make table entries */  // > CustomCode.jszip:8868
    for (;;) {  // > CustomCode.jszip:8869
      /* create table entry */  // > CustomCode.jszip:8870
      here_bits = len - drop;  // > CustomCode.jszip:8871
      if (work[sym] < end) {  // > CustomCode.jszip:8872
        here_op = 0;  // > CustomCode.jszip:8873
        here_val = work[sym];  // > CustomCode.jszip:8874
      }  // > CustomCode.jszip:8875
      else if (work[sym] > end) {  // > CustomCode.jszip:8876
        here_op = extra[extra_index + work[sym]];  // > CustomCode.jszip:8877
        here_val = base[base_index + work[sym]];  // > CustomCode.jszip:8878
      }  // > CustomCode.jszip:8879
      else {  // > CustomCode.jszip:8880
        here_op = 32 + 64;         /* end of block */  // > CustomCode.jszip:8881
        here_val = 0;  // > CustomCode.jszip:8882
      }  // > CustomCode.jszip:8883
      /* replicate for those indices with low len bits equal to huff */  // > CustomCode.jszip:8884
      incr = 1 << (len - drop);  // > CustomCode.jszip:8885
      fill = 1 << curr;  // > CustomCode.jszip:8886
      min = fill;                 /* save offset to next table */  // > CustomCode.jszip:8887
      do {  // > CustomCode.jszip:8888
        fill -= incr;  // > CustomCode.jszip:8889
        table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;  // > CustomCode.jszip:8890
      } while (fill !== 0);  // > CustomCode.jszip:8891
      /* backwards increment the len-bit code huff */  // > CustomCode.jszip:8892
      incr = 1 << (len - 1);  // > CustomCode.jszip:8893
      while (huff & incr) {  // > CustomCode.jszip:8894
        incr >>= 1;  // > CustomCode.jszip:8895
      }  // > CustomCode.jszip:8896
      if (incr !== 0) {  // > CustomCode.jszip:8897
        huff &= incr - 1;  // > CustomCode.jszip:8898
        huff += incr;  // > CustomCode.jszip:8899
      } else {  // > CustomCode.jszip:8900
        huff = 0;  // > CustomCode.jszip:8901
      }  // > CustomCode.jszip:8902
      /* go to next symbol, update count, len */  // > CustomCode.jszip:8903
      sym++;  // > CustomCode.jszip:8904
      if (--count[len] === 0) {  // > CustomCode.jszip:8905
        if (len === max) { break; }  // > CustomCode.jszip:8906
        len = lens[lens_index + work[sym]];  // > CustomCode.jszip:8907
      }  // > CustomCode.jszip:8908
      /* create new sub-table if needed */  // > CustomCode.jszip:8909
      if (len > root && (huff & mask) !== low) {  // > CustomCode.jszip:8910
        /* if first time, transition to sub-tables */  // > CustomCode.jszip:8911
        if (drop === 0) {  // > CustomCode.jszip:8912
          drop = root;  // > CustomCode.jszip:8913
        }  // > CustomCode.jszip:8914
        /* increment past last table */  // > CustomCode.jszip:8915
        next += min;            /* here min is 1 << curr */  // > CustomCode.jszip:8916
        /* determine length of next table */  // > CustomCode.jszip:8917
        curr = len - drop;  // > CustomCode.jszip:8918
        left = 1 << curr;  // > CustomCode.jszip:8919
        while (curr + drop < max) {  // > CustomCode.jszip:8920
          left -= count[curr + drop];  // > CustomCode.jszip:8921
          if (left <= 0) { break; }  // > CustomCode.jszip:8922
          curr++;  // > CustomCode.jszip:8923
          left <<= 1;  // > CustomCode.jszip:8924
        }  // > CustomCode.jszip:8925
        /* check for enough space */  // > CustomCode.jszip:8926
        used += 1 << curr;  // > CustomCode.jszip:8927
        if ((type === LENS && used > ENOUGH_LENS) ||  // > CustomCode.jszip:8928
          (type === DISTS && used > ENOUGH_DISTS)) {  // > CustomCode.jszip:8929
          return 1;  // > CustomCode.jszip:8930
        }  // > CustomCode.jszip:8931
        /* point entry in root table to sub-table */  // > CustomCode.jszip:8932
        low = huff & mask;  // > CustomCode.jszip:8933
        /*table.op[low] = curr;  // > CustomCode.jszip:8934
        table.bits[low] = root;  // > CustomCode.jszip:8935
        table.val[low] = next - opts.table_index;*/  // > CustomCode.jszip:8936
        table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;  // > CustomCode.jszip:8937
      }  // > CustomCode.jszip:8938
    }  // > CustomCode.jszip:8939
    /* fill in remaining table entry if code is incomplete (guaranteed to have  // > CustomCode.jszip:8940
     at most one remaining entry, since if the code is incomplete, the  // > CustomCode.jszip:8941
     maximum code length that was allowed to get this far is one bit) */  // > CustomCode.jszip:8942
    if (huff !== 0) {  // > CustomCode.jszip:8943
      //table.op[next + huff] = 64;            /* invalid code marker */  // > CustomCode.jszip:8944
      //table.bits[next + huff] = len - drop;  // > CustomCode.jszip:8945
      //table.val[next + huff] = 0;  // > CustomCode.jszip:8946
      table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;  // > CustomCode.jszip:8947
    }  // > CustomCode.jszip:8948
    /* set return parameters */  // > CustomCode.jszip:8949
    //opts.table_index += used;  // > CustomCode.jszip:8950
    opts.bits = root;  // > CustomCode.jszip:8951
    return 0;  // > CustomCode.jszip:8952
  };  // > CustomCode.jszip:8953
  },{"../utils/common":41}],51:[function(require,module,exports){  // > CustomCode.jszip:8954
  'use strict';  // > CustomCode.jszip:8955
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:8956
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:8957
  //  // > CustomCode.jszip:8958
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:8959
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:8960
  // arising from the use of this software.  // > CustomCode.jszip:8961
  //  // > CustomCode.jszip:8962
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:8963
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:8964
  // freely, subject to the following restrictions:  // > CustomCode.jszip:8965
  //  // > CustomCode.jszip:8966
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:8967
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:8968
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:8969
  //   appreciated but is not required.  // > CustomCode.jszip:8970
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:8971
  //   misrepresented as being the original software.  // > CustomCode.jszip:8972
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:8973
  module.exports = {  // > CustomCode.jszip:8974
    2:      'need dictionary',     /* Z_NEED_DICT       2  */  // > CustomCode.jszip:8975
    1:      'stream end',          /* Z_STREAM_END      1  */  // > CustomCode.jszip:8976
    0:      '',                    /* Z_OK              0  */  // > CustomCode.jszip:8977
    '-1':   'file error',          /* Z_ERRNO         (-1) */  // > CustomCode.jszip:8978
    '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */  // > CustomCode.jszip:8979
    '-3':   'data error',          /* Z_DATA_ERROR    (-3) */  // > CustomCode.jszip:8980
    '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */  // > CustomCode.jszip:8981
    '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */  // > CustomCode.jszip:8982
    '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */  // > CustomCode.jszip:8983
  };  // > CustomCode.jszip:8984
  },{}],52:[function(require,module,exports){  // > CustomCode.jszip:8985
  'use strict';  // > CustomCode.jszip:8986
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:8987
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:8988
  //  // > CustomCode.jszip:8989
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:8990
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:8991
  // arising from the use of this software.  // > CustomCode.jszip:8992
  //  // > CustomCode.jszip:8993
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:8994
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:8995
  // freely, subject to the following restrictions:  // > CustomCode.jszip:8996
  //  // > CustomCode.jszip:8997
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:8998
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:8999
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:9000
  //   appreciated but is not required.  // > CustomCode.jszip:9001
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:9002
  //   misrepresented as being the original software.  // > CustomCode.jszip:9003
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:9004
  var utils = require('../utils/common');  // > CustomCode.jszip:9005
  /* Public constants ==========================================================*/  // > CustomCode.jszip:9006
  /* ===========================================================================*/  // > CustomCode.jszip:9007
  //var Z_FILTERED          = 1;  // > CustomCode.jszip:9008
  //var Z_HUFFMAN_ONLY      = 2;  // > CustomCode.jszip:9009
  //var Z_RLE               = 3;  // > CustomCode.jszip:9010
  var Z_FIXED               = 4;  // > CustomCode.jszip:9011
  //var Z_DEFAULT_STRATEGY  = 0;  // > CustomCode.jszip:9012
  /* Possible values of the data_type field (though see inflate()) */  // > CustomCode.jszip:9013
  var Z_BINARY              = 0;  // > CustomCode.jszip:9014
  var Z_TEXT                = 1;  // > CustomCode.jszip:9015
  //var Z_ASCII             = 1; // = Z_TEXT  // > CustomCode.jszip:9016
  var Z_UNKNOWN             = 2;  // > CustomCode.jszip:9017
  /*============================================================================*/  // > CustomCode.jszip:9018
  function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }  // > CustomCode.jszip:9019
  // From zutil.h  // > CustomCode.jszip:9020
  var STORED_BLOCK = 0;  // > CustomCode.jszip:9021
  var STATIC_TREES = 1;  // > CustomCode.jszip:9022
  var DYN_TREES    = 2;  // > CustomCode.jszip:9023
  /* The three kinds of block type */  // > CustomCode.jszip:9024
  var MIN_MATCH    = 3;  // > CustomCode.jszip:9025
  var MAX_MATCH    = 258;  // > CustomCode.jszip:9026
  /* The minimum and maximum match lengths */  // > CustomCode.jszip:9027
  // From deflate.h  // > CustomCode.jszip:9028
  /* ===========================================================================  // > CustomCode.jszip:9029
   * Internal compression state.  // > CustomCode.jszip:9030
   */  // > CustomCode.jszip:9031
  var LENGTH_CODES  = 29;  // > CustomCode.jszip:9032
  /* number of length codes, not counting the special END_BLOCK code */  // > CustomCode.jszip:9033
  var LITERALS      = 256;  // > CustomCode.jszip:9034
  /* number of literal bytes 0..255 */  // > CustomCode.jszip:9035
  var L_CODES       = LITERALS + 1 + LENGTH_CODES;  // > CustomCode.jszip:9036
  /* number of Literal or Length codes, including the END_BLOCK code */  // > CustomCode.jszip:9037
  var D_CODES       = 30;  // > CustomCode.jszip:9038
  /* number of distance codes */  // > CustomCode.jszip:9039
  var BL_CODES      = 19;  // > CustomCode.jszip:9040
  /* number of codes used to transfer the bit lengths */  // > CustomCode.jszip:9041
  var HEAP_SIZE     = 2 * L_CODES + 1;  // > CustomCode.jszip:9042
  /* maximum heap size */  // > CustomCode.jszip:9043
  var MAX_BITS      = 15;  // > CustomCode.jszip:9044
  /* All codes must not exceed MAX_BITS bits */  // > CustomCode.jszip:9045
  var Buf_size      = 16;  // > CustomCode.jszip:9046
  /* size of bit buffer in bi_buf */  // > CustomCode.jszip:9047
  /* ===========================================================================  // > CustomCode.jszip:9048
   * Constants  // > CustomCode.jszip:9049
   */  // > CustomCode.jszip:9050
  var MAX_BL_BITS = 7;  // > CustomCode.jszip:9051
  /* Bit length codes must not exceed MAX_BL_BITS bits */  // > CustomCode.jszip:9052
  var END_BLOCK   = 256;  // > CustomCode.jszip:9053
  /* end of block literal code */  // > CustomCode.jszip:9054
  var REP_3_6     = 16;  // > CustomCode.jszip:9055
  /* repeat previous bit length 3-6 times (2 bits of repeat count) */  // > CustomCode.jszip:9056
  var REPZ_3_10   = 17;  // > CustomCode.jszip:9057
  /* repeat a zero length 3-10 times  (3 bits of repeat count) */  // > CustomCode.jszip:9058
  var REPZ_11_138 = 18;  // > CustomCode.jszip:9059
  /* repeat a zero length 11-138 times  (7 bits of repeat count) */  // > CustomCode.jszip:9060
  /* eslint-disable comma-spacing,array-bracket-spacing */  // > CustomCode.jszip:9061
  var extra_lbits =   /* extra bits for each length code */  // > CustomCode.jszip:9062
    [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];  // > CustomCode.jszip:9063
  var extra_dbits =   /* extra bits for each distance code */  // > CustomCode.jszip:9064
    [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];  // > CustomCode.jszip:9065
  var extra_blbits =  /* extra bits for each bit length code */  // > CustomCode.jszip:9066
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];  // > CustomCode.jszip:9067
  var bl_order =  // > CustomCode.jszip:9068
    [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];  // > CustomCode.jszip:9069
  /* eslint-enable comma-spacing,array-bracket-spacing */  // > CustomCode.jszip:9070
  /* The lengths of the bit length codes are sent in order of decreasing  // > CustomCode.jszip:9071
   * probability, to avoid transmitting the lengths for unused bit length codes.  // > CustomCode.jszip:9072
   */  // > CustomCode.jszip:9073
  /* ===========================================================================  // > CustomCode.jszip:9074
   * Local data. These are initialized only once.  // > CustomCode.jszip:9075
   */  // > CustomCode.jszip:9076
  // We pre-fill arrays with 0 to avoid uninitialized gaps  // > CustomCode.jszip:9077
  var DIST_CODE_LEN = 512; /* see definition of array dist_code below */  // > CustomCode.jszip:9078
  // !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1  // > CustomCode.jszip:9079
  var static_ltree  = new Array((L_CODES + 2) * 2);  // > CustomCode.jszip:9080
  zero(static_ltree);  // > CustomCode.jszip:9081
  /* The static literal tree. Since the bit lengths are imposed, there is no  // > CustomCode.jszip:9082
   * need for the L_CODES extra codes used during heap construction. However  // > CustomCode.jszip:9083
   * The codes 286 and 287 are needed to build a canonical tree (see _tr_init  // > CustomCode.jszip:9084
   * below).  // > CustomCode.jszip:9085
   */  // > CustomCode.jszip:9086
  var static_dtree  = new Array(D_CODES * 2);  // > CustomCode.jszip:9087
  zero(static_dtree);  // > CustomCode.jszip:9088
  /* The static distance tree. (Actually a trivial tree since all codes use  // > CustomCode.jszip:9089
   * 5 bits.)  // > CustomCode.jszip:9090
   */  // > CustomCode.jszip:9091
  var _dist_code    = new Array(DIST_CODE_LEN);  // > CustomCode.jszip:9092
  zero(_dist_code);  // > CustomCode.jszip:9093
  /* Distance codes. The first 256 values correspond to the distances  // > CustomCode.jszip:9094
   * 3 .. 258, the last 256 values correspond to the top 8 bits of  // > CustomCode.jszip:9095
   * the 15 bit distances.  // > CustomCode.jszip:9096
   */  // > CustomCode.jszip:9097
  var _length_code  = new Array(MAX_MATCH - MIN_MATCH + 1);  // > CustomCode.jszip:9098
  zero(_length_code);  // > CustomCode.jszip:9099
  /* length code for each normalized match length (0 == MIN_MATCH) */  // > CustomCode.jszip:9100
  var base_length   = new Array(LENGTH_CODES);  // > CustomCode.jszip:9101
  zero(base_length);  // > CustomCode.jszip:9102
  /* First normalized length for each code (0 = MIN_MATCH) */  // > CustomCode.jszip:9103
  var base_dist     = new Array(D_CODES);  // > CustomCode.jszip:9104
  zero(base_dist);  // > CustomCode.jszip:9105
  /* First normalized distance for each code (0 = distance of 1) */  // > CustomCode.jszip:9106
  function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {  // > CustomCode.jszip:9107
    this.static_tree  = static_tree;  /* static tree or NULL */  // > CustomCode.jszip:9108
    this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */  // > CustomCode.jszip:9109
    this.extra_base   = extra_base;   /* base index for extra_bits */  // > CustomCode.jszip:9110
    this.elems        = elems;        /* max number of elements in the tree */  // > CustomCode.jszip:9111
    this.max_length   = max_length;   /* max bit length for the codes */  // > CustomCode.jszip:9112
    // show if `static_tree` has data or dummy - needed for monomorphic objects  // > CustomCode.jszip:9113
    this.has_stree    = static_tree && static_tree.length;  // > CustomCode.jszip:9114
  }  // > CustomCode.jszip:9115
  var static_l_desc;  // > CustomCode.jszip:9116
  var static_d_desc;  // > CustomCode.jszip:9117
  var static_bl_desc;  // > CustomCode.jszip:9118
  function TreeDesc(dyn_tree, stat_desc) {  // > CustomCode.jszip:9119
    this.dyn_tree = dyn_tree;     /* the dynamic tree */  // > CustomCode.jszip:9120
    this.max_code = 0;            /* largest code with non zero frequency */  // > CustomCode.jszip:9121
    this.stat_desc = stat_desc;   /* the corresponding static tree */  // > CustomCode.jszip:9122
  }  // > CustomCode.jszip:9123
  function d_code(dist) {  // > CustomCode.jszip:9124
    return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];  // > CustomCode.jszip:9125
  }  // > CustomCode.jszip:9126
  /* ===========================================================================  // > CustomCode.jszip:9127
   * Output a short LSB first on the stream.  // > CustomCode.jszip:9128
   * IN assertion: there is enough room in pendingBuf.  // > CustomCode.jszip:9129
   */  // > CustomCode.jszip:9130
  function put_short(s, w) {  // > CustomCode.jszip:9131
  //    put_byte(s, (uch)((w) & 0xff));  // > CustomCode.jszip:9132
  //    put_byte(s, (uch)((ush)(w) >> 8));  // > CustomCode.jszip:9133
    s.pending_buf[s.pending++] = (w) & 0xff;  // > CustomCode.jszip:9134
    s.pending_buf[s.pending++] = (w >>> 8) & 0xff;  // > CustomCode.jszip:9135
  }  // > CustomCode.jszip:9136
  /* ===========================================================================  // > CustomCode.jszip:9137
   * Send a value on a given number of bits.  // > CustomCode.jszip:9138
   * IN assertion: length <= 16 and value fits in length bits.  // > CustomCode.jszip:9139
   */  // > CustomCode.jszip:9140
  function send_bits(s, value, length) {  // > CustomCode.jszip:9141
    if (s.bi_valid > (Buf_size - length)) {  // > CustomCode.jszip:9142
      s.bi_buf |= (value << s.bi_valid) & 0xffff;  // > CustomCode.jszip:9143
      put_short(s, s.bi_buf);  // > CustomCode.jszip:9144
      s.bi_buf = value >> (Buf_size - s.bi_valid);  // > CustomCode.jszip:9145
      s.bi_valid += length - Buf_size;  // > CustomCode.jszip:9146
    } else {  // > CustomCode.jszip:9147
      s.bi_buf |= (value << s.bi_valid) & 0xffff;  // > CustomCode.jszip:9148
      s.bi_valid += length;  // > CustomCode.jszip:9149
    }  // > CustomCode.jszip:9150
  }  // > CustomCode.jszip:9151
  function send_code(s, c, tree) {  // > CustomCode.jszip:9152
    send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);  // > CustomCode.jszip:9153
  }  // > CustomCode.jszip:9154
  /* ===========================================================================  // > CustomCode.jszip:9155
   * Reverse the first len bits of a code, using straightforward code (a faster  // > CustomCode.jszip:9156
   * method would use a table)  // > CustomCode.jszip:9157
   * IN assertion: 1 <= len <= 15  // > CustomCode.jszip:9158
   */  // > CustomCode.jszip:9159
  function bi_reverse(code, len) {  // > CustomCode.jszip:9160
    var res = 0;  // > CustomCode.jszip:9161
    do {  // > CustomCode.jszip:9162
      res |= code & 1;  // > CustomCode.jszip:9163
      code >>>= 1;  // > CustomCode.jszip:9164
      res <<= 1;  // > CustomCode.jszip:9165
    } while (--len > 0);  // > CustomCode.jszip:9166
    return res >>> 1;  // > CustomCode.jszip:9167
  }  // > CustomCode.jszip:9168
  /* ===========================================================================  // > CustomCode.jszip:9169
   * Flush the bit buffer, keeping at most 7 bits in it.  // > CustomCode.jszip:9170
   */  // > CustomCode.jszip:9171
  function bi_flush(s) {  // > CustomCode.jszip:9172
    if (s.bi_valid === 16) {  // > CustomCode.jszip:9173
      put_short(s, s.bi_buf);  // > CustomCode.jszip:9174
      s.bi_buf = 0;  // > CustomCode.jszip:9175
      s.bi_valid = 0;  // > CustomCode.jszip:9176
    } else if (s.bi_valid >= 8) {  // > CustomCode.jszip:9177
      s.pending_buf[s.pending++] = s.bi_buf & 0xff;  // > CustomCode.jszip:9178
      s.bi_buf >>= 8;  // > CustomCode.jszip:9179
      s.bi_valid -= 8;  // > CustomCode.jszip:9180
    }  // > CustomCode.jszip:9181
  }  // > CustomCode.jszip:9182
  /* ===========================================================================  // > CustomCode.jszip:9183
   * Compute the optimal bit lengths for a tree and update the total bit length  // > CustomCode.jszip:9184
   * for the current block.  // > CustomCode.jszip:9185
   * IN assertion: the fields freq and dad are set, heap[heap_max] and  // > CustomCode.jszip:9186
   *    above are the tree nodes sorted by increasing frequency.  // > CustomCode.jszip:9187
   * OUT assertions: the field len is set to the optimal bit length, the  // > CustomCode.jszip:9188
   *     array bl_count contains the frequencies for each bit length.  // > CustomCode.jszip:9189
   *     The length opt_len is updated; static_len is also updated if stree is  // > CustomCode.jszip:9190
   *     not null.  // > CustomCode.jszip:9191
   */  // > CustomCode.jszip:9192
  function gen_bitlen(s, desc)  // > CustomCode.jszip:9193
  //    deflate_state *s;  // > CustomCode.jszip:9194
  //    tree_desc *desc;    /* the tree descriptor */  // > CustomCode.jszip:9195
  {  // > CustomCode.jszip:9196
    var tree            = desc.dyn_tree;  // > CustomCode.jszip:9197
    var max_code        = desc.max_code;  // > CustomCode.jszip:9198
    var stree           = desc.stat_desc.static_tree;  // > CustomCode.jszip:9199
    var has_stree       = desc.stat_desc.has_stree;  // > CustomCode.jszip:9200
    var extra           = desc.stat_desc.extra_bits;  // > CustomCode.jszip:9201
    var base            = desc.stat_desc.extra_base;  // > CustomCode.jszip:9202
    var max_length      = desc.stat_desc.max_length;  // > CustomCode.jszip:9203
    var h;              /* heap index */  // > CustomCode.jszip:9204
    var n, m;           /* iterate over the tree elements */  // > CustomCode.jszip:9205
    var bits;           /* bit length */  // > CustomCode.jszip:9206
    var xbits;          /* extra bits */  // > CustomCode.jszip:9207
    var f;              /* frequency */  // > CustomCode.jszip:9208
    var overflow = 0;   /* number of elements with bit length too large */  // > CustomCode.jszip:9209
    for (bits = 0; bits <= MAX_BITS; bits++) {  // > CustomCode.jszip:9210
      s.bl_count[bits] = 0;  // > CustomCode.jszip:9211
    }  // > CustomCode.jszip:9212
    /* In a first pass, compute the optimal bit lengths (which may  // > CustomCode.jszip:9213
     * overflow in the case of the bit length tree).  // > CustomCode.jszip:9214
     */  // > CustomCode.jszip:9215
    tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */  // > CustomCode.jszip:9216
    for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {  // > CustomCode.jszip:9217
      n = s.heap[h];  // > CustomCode.jszip:9218
      bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;  // > CustomCode.jszip:9219
      if (bits > max_length) {  // > CustomCode.jszip:9220
        bits = max_length;  // > CustomCode.jszip:9221
        overflow++;  // > CustomCode.jszip:9222
      }  // > CustomCode.jszip:9223
      tree[n * 2 + 1]/*.Len*/ = bits;  // > CustomCode.jszip:9224
      /* We overwrite tree[n].Dad which is no longer needed */  // > CustomCode.jszip:9225
      if (n > max_code) { continue; } /* not a leaf node */  // > CustomCode.jszip:9226
      s.bl_count[bits]++;  // > CustomCode.jszip:9227
      xbits = 0;  // > CustomCode.jszip:9228
      if (n >= base) {  // > CustomCode.jszip:9229
        xbits = extra[n - base];  // > CustomCode.jszip:9230
      }  // > CustomCode.jszip:9231
      f = tree[n * 2]/*.Freq*/;  // > CustomCode.jszip:9232
      s.opt_len += f * (bits + xbits);  // > CustomCode.jszip:9233
      if (has_stree) {  // > CustomCode.jszip:9234
        s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);  // > CustomCode.jszip:9235
      }  // > CustomCode.jszip:9236
    }  // > CustomCode.jszip:9237
    if (overflow === 0) { return; }  // > CustomCode.jszip:9238
    // Trace((stderr,"\nbit length overflow\n"));  // > CustomCode.jszip:9239
    /* This happens for example on obj2 and pic of the Calgary corpus */  // > CustomCode.jszip:9240
    /* Find the first bit length which could increase: */  // > CustomCode.jszip:9241
    do {  // > CustomCode.jszip:9242
      bits = max_length - 1;  // > CustomCode.jszip:9243
      while (s.bl_count[bits] === 0) { bits--; }  // > CustomCode.jszip:9244
      s.bl_count[bits]--;      /* move one leaf down the tree */  // > CustomCode.jszip:9245
      s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */  // > CustomCode.jszip:9246
      s.bl_count[max_length]--;  // > CustomCode.jszip:9247
      /* The brother of the overflow item also moves one step up,  // > CustomCode.jszip:9248
       * but this does not affect bl_count[max_length]  // > CustomCode.jszip:9249
       */  // > CustomCode.jszip:9250
      overflow -= 2;  // > CustomCode.jszip:9251
    } while (overflow > 0);  // > CustomCode.jszip:9252
    /* Now recompute all bit lengths, scanning in increasing frequency.  // > CustomCode.jszip:9253
     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all  // > CustomCode.jszip:9254
     * lengths instead of fixing only the wrong ones. This idea is taken  // > CustomCode.jszip:9255
     * from 'ar' written by Haruhiko Okumura.)  // > CustomCode.jszip:9256
     */  // > CustomCode.jszip:9257
    for (bits = max_length; bits !== 0; bits--) {  // > CustomCode.jszip:9258
      n = s.bl_count[bits];  // > CustomCode.jszip:9259
      while (n !== 0) {  // > CustomCode.jszip:9260
        m = s.heap[--h];  // > CustomCode.jszip:9261
        if (m > max_code) { continue; }  // > CustomCode.jszip:9262
        if (tree[m * 2 + 1]/*.Len*/ !== bits) {  // > CustomCode.jszip:9263
          // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));  // > CustomCode.jszip:9264
          s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;  // > CustomCode.jszip:9265
          tree[m * 2 + 1]/*.Len*/ = bits;  // > CustomCode.jszip:9266
        }  // > CustomCode.jszip:9267
        n--;  // > CustomCode.jszip:9268
      }  // > CustomCode.jszip:9269
    }  // > CustomCode.jszip:9270
  }  // > CustomCode.jszip:9271
  /* ===========================================================================  // > CustomCode.jszip:9272
   * Generate the codes for a given tree and bit counts (which need not be  // > CustomCode.jszip:9273
   * optimal).  // > CustomCode.jszip:9274
   * IN assertion: the array bl_count contains the bit length statistics for  // > CustomCode.jszip:9275
   * the given tree and the field len is set for all tree elements.  // > CustomCode.jszip:9276
   * OUT assertion: the field code is set for all tree elements of non  // > CustomCode.jszip:9277
   *     zero code length.  // > CustomCode.jszip:9278
   */  // > CustomCode.jszip:9279
  function gen_codes(tree, max_code, bl_count)  // > CustomCode.jszip:9280
  //    ct_data *tree;             /* the tree to decorate */  // > CustomCode.jszip:9281
  //    int max_code;              /* largest code with non zero frequency */  // > CustomCode.jszip:9282
  //    ushf *bl_count;            /* number of codes at each bit length */  // > CustomCode.jszip:9283
  {  // > CustomCode.jszip:9284
    var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */  // > CustomCode.jszip:9285
    var code = 0;              /* running code value */  // > CustomCode.jszip:9286
    var bits;                  /* bit index */  // > CustomCode.jszip:9287
    var n;                     /* code index */  // > CustomCode.jszip:9288
    /* The distribution counts are first used to generate the code values  // > CustomCode.jszip:9289
     * without bit reversal.  // > CustomCode.jszip:9290
     */  // > CustomCode.jszip:9291
    for (bits = 1; bits <= MAX_BITS; bits++) {  // > CustomCode.jszip:9292
      next_code[bits] = code = (code + bl_count[bits - 1]) << 1;  // > CustomCode.jszip:9293
    }  // > CustomCode.jszip:9294
    /* Check that the bit counts in bl_count are consistent. The last code  // > CustomCode.jszip:9295
     * must be all ones.  // > CustomCode.jszip:9296
     */  // > CustomCode.jszip:9297
    //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,  // > CustomCode.jszip:9298
    //        "inconsistent bit counts");  // > CustomCode.jszip:9299
    //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));  // > CustomCode.jszip:9300
    for (n = 0;  n <= max_code; n++) {  // > CustomCode.jszip:9301
      var len = tree[n * 2 + 1]/*.Len*/;  // > CustomCode.jszip:9302
      if (len === 0) { continue; }  // > CustomCode.jszip:9303
      /* Now reverse the bits */  // > CustomCode.jszip:9304
      tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);  // > CustomCode.jszip:9305
      //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",  // > CustomCode.jszip:9306
      //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));  // > CustomCode.jszip:9307
    }  // > CustomCode.jszip:9308
  }  // > CustomCode.jszip:9309
  /* ===========================================================================  // > CustomCode.jszip:9310
   * Initialize the various 'constant' tables.  // > CustomCode.jszip:9311
   */  // > CustomCode.jszip:9312
  function tr_static_init() {  // > CustomCode.jszip:9313
    var n;        /* iterates over tree elements */  // > CustomCode.jszip:9314
    var bits;     /* bit counter */  // > CustomCode.jszip:9315
    var length;   /* length value */  // > CustomCode.jszip:9316
    var code;     /* code value */  // > CustomCode.jszip:9317
    var dist;     /* distance index */  // > CustomCode.jszip:9318
    var bl_count = new Array(MAX_BITS + 1);  // > CustomCode.jszip:9319
    /* number of codes at each bit length for an optimal tree */  // > CustomCode.jszip:9320
    // do check in _tr_init()  // > CustomCode.jszip:9321
    //if (static_init_done) return;  // > CustomCode.jszip:9322
    /* For some embedded targets, global variables are not initialized: */  // > CustomCode.jszip:9323
  /*#ifdef NO_INIT_GLOBAL_POINTERS  // > CustomCode.jszip:9324
    static_l_desc.static_tree = static_ltree;  // > CustomCode.jszip:9325
    static_l_desc.extra_bits = extra_lbits;  // > CustomCode.jszip:9326
    static_d_desc.static_tree = static_dtree;  // > CustomCode.jszip:9327
    static_d_desc.extra_bits = extra_dbits;  // > CustomCode.jszip:9328
    static_bl_desc.extra_bits = extra_blbits;  // > CustomCode.jszip:9329
  #endif*/  // > CustomCode.jszip:9330
    /* Initialize the mapping length (0..255) -> length code (0..28) */  // > CustomCode.jszip:9331
    length = 0;  // > CustomCode.jszip:9332
    for (code = 0; code < LENGTH_CODES - 1; code++) {  // > CustomCode.jszip:9333
      base_length[code] = length;  // > CustomCode.jszip:9334
      for (n = 0; n < (1 << extra_lbits[code]); n++) {  // > CustomCode.jszip:9335
        _length_code[length++] = code;  // > CustomCode.jszip:9336
      }  // > CustomCode.jszip:9337
    }  // > CustomCode.jszip:9338
    //Assert (length == 256, "tr_static_init: length != 256");  // > CustomCode.jszip:9339
    /* Note that the length 255 (match length 258) can be represented  // > CustomCode.jszip:9340
     * in two different ways: code 284 + 5 bits or code 285, so we  // > CustomCode.jszip:9341
     * overwrite length_code[255] to use the best encoding:  // > CustomCode.jszip:9342
     */  // > CustomCode.jszip:9343
    _length_code[length - 1] = code;  // > CustomCode.jszip:9344
    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */  // > CustomCode.jszip:9345
    dist = 0;  // > CustomCode.jszip:9346
    for (code = 0; code < 16; code++) {  // > CustomCode.jszip:9347
      base_dist[code] = dist;  // > CustomCode.jszip:9348
      for (n = 0; n < (1 << extra_dbits[code]); n++) {  // > CustomCode.jszip:9349
        _dist_code[dist++] = code;  // > CustomCode.jszip:9350
      }  // > CustomCode.jszip:9351
    }  // > CustomCode.jszip:9352
    //Assert (dist == 256, "tr_static_init: dist != 256");  // > CustomCode.jszip:9353
    dist >>= 7; /* from now on, all distances are divided by 128 */  // > CustomCode.jszip:9354
    for (; code < D_CODES; code++) {  // > CustomCode.jszip:9355
      base_dist[code] = dist << 7;  // > CustomCode.jszip:9356
      for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {  // > CustomCode.jszip:9357
        _dist_code[256 + dist++] = code;  // > CustomCode.jszip:9358
      }  // > CustomCode.jszip:9359
    }  // > CustomCode.jszip:9360
    //Assert (dist == 256, "tr_static_init: 256+dist != 512");  // > CustomCode.jszip:9361
    /* Construct the codes of the static literal tree */  // > CustomCode.jszip:9362
    for (bits = 0; bits <= MAX_BITS; bits++) {  // > CustomCode.jszip:9363
      bl_count[bits] = 0;  // > CustomCode.jszip:9364
    }  // > CustomCode.jszip:9365
    n = 0;  // > CustomCode.jszip:9366
    while (n <= 143) {  // > CustomCode.jszip:9367
      static_ltree[n * 2 + 1]/*.Len*/ = 8;  // > CustomCode.jszip:9368
      n++;  // > CustomCode.jszip:9369
      bl_count[8]++;  // > CustomCode.jszip:9370
    }  // > CustomCode.jszip:9371
    while (n <= 255) {  // > CustomCode.jszip:9372
      static_ltree[n * 2 + 1]/*.Len*/ = 9;  // > CustomCode.jszip:9373
      n++;  // > CustomCode.jszip:9374
      bl_count[9]++;  // > CustomCode.jszip:9375
    }  // > CustomCode.jszip:9376
    while (n <= 279) {  // > CustomCode.jszip:9377
      static_ltree[n * 2 + 1]/*.Len*/ = 7;  // > CustomCode.jszip:9378
      n++;  // > CustomCode.jszip:9379
      bl_count[7]++;  // > CustomCode.jszip:9380
    }  // > CustomCode.jszip:9381
    while (n <= 287) {  // > CustomCode.jszip:9382
      static_ltree[n * 2 + 1]/*.Len*/ = 8;  // > CustomCode.jszip:9383
      n++;  // > CustomCode.jszip:9384
      bl_count[8]++;  // > CustomCode.jszip:9385
    }  // > CustomCode.jszip:9386
    /* Codes 286 and 287 do not exist, but we must include them in the  // > CustomCode.jszip:9387
     * tree construction to get a canonical Huffman tree (longest code  // > CustomCode.jszip:9388
     * all ones)  // > CustomCode.jszip:9389
     */  // > CustomCode.jszip:9390
    gen_codes(static_ltree, L_CODES + 1, bl_count);  // > CustomCode.jszip:9391
    /* The static distance tree is trivial: */  // > CustomCode.jszip:9392
    for (n = 0; n < D_CODES; n++) {  // > CustomCode.jszip:9393
      static_dtree[n * 2 + 1]/*.Len*/ = 5;  // > CustomCode.jszip:9394
      static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);  // > CustomCode.jszip:9395
    }  // > CustomCode.jszip:9396
    // Now data ready and we can init static trees  // > CustomCode.jszip:9397
    static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);  // > CustomCode.jszip:9398
    static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);  // > CustomCode.jszip:9399
    static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);  // > CustomCode.jszip:9400
    //static_init_done = true;  // > CustomCode.jszip:9401
  }  // > CustomCode.jszip:9402
  /* ===========================================================================  // > CustomCode.jszip:9403
   * Initialize a new block.  // > CustomCode.jszip:9404
   */  // > CustomCode.jszip:9405
  function init_block(s) {  // > CustomCode.jszip:9406
    var n; /* iterates over tree elements */  // > CustomCode.jszip:9407
    /* Initialize the trees. */  // > CustomCode.jszip:9408
    for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }  // > CustomCode.jszip:9409
    for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }  // > CustomCode.jszip:9410
    for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }  // > CustomCode.jszip:9411
    s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;  // > CustomCode.jszip:9412
    s.opt_len = s.static_len = 0;  // > CustomCode.jszip:9413
    s.last_lit = s.matches = 0;  // > CustomCode.jszip:9414
  }  // > CustomCode.jszip:9415
  /* ===========================================================================  // > CustomCode.jszip:9416
   * Flush the bit buffer and align the output on a byte boundary  // > CustomCode.jszip:9417
   */  // > CustomCode.jszip:9418
  function bi_windup(s)  // > CustomCode.jszip:9419
  {  // > CustomCode.jszip:9420
    if (s.bi_valid > 8) {  // > CustomCode.jszip:9421
      put_short(s, s.bi_buf);  // > CustomCode.jszip:9422
    } else if (s.bi_valid > 0) {  // > CustomCode.jszip:9423
      //put_byte(s, (Byte)s->bi_buf);  // > CustomCode.jszip:9424
      s.pending_buf[s.pending++] = s.bi_buf;  // > CustomCode.jszip:9425
    }  // > CustomCode.jszip:9426
    s.bi_buf = 0;  // > CustomCode.jszip:9427
    s.bi_valid = 0;  // > CustomCode.jszip:9428
  }  // > CustomCode.jszip:9429
  /* ===========================================================================  // > CustomCode.jszip:9430
   * Copy a stored block, storing first the length and its  // > CustomCode.jszip:9431
   * one's complement if requested.  // > CustomCode.jszip:9432
   */  // > CustomCode.jszip:9433
  function copy_block(s, buf, len, header)  // > CustomCode.jszip:9434
  //DeflateState *s;  // > CustomCode.jszip:9435
  //charf    *buf;    /* the input data */  // > CustomCode.jszip:9436
  //unsigned len;     /* its length */  // > CustomCode.jszip:9437
  //int      header;  /* true if block header must be written */  // > CustomCode.jszip:9438
  {  // > CustomCode.jszip:9439
    bi_windup(s);        /* align on byte boundary */  // > CustomCode.jszip:9440
    if (header) {  // > CustomCode.jszip:9441
      put_short(s, len);  // > CustomCode.jszip:9442
      put_short(s, ~len);  // > CustomCode.jszip:9443
    }  // > CustomCode.jszip:9444
  //  while (len--) {  // > CustomCode.jszip:9445
  //    put_byte(s, *buf++);  // > CustomCode.jszip:9446
  //  }  // > CustomCode.jszip:9447
    utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);  // > CustomCode.jszip:9448
    s.pending += len;  // > CustomCode.jszip:9449
  }  // > CustomCode.jszip:9450
  /* ===========================================================================  // > CustomCode.jszip:9451
   * Compares to subtrees, using the tree depth as tie breaker when  // > CustomCode.jszip:9452
   * the subtrees have equal frequency. This minimizes the worst case length.  // > CustomCode.jszip:9453
   */  // > CustomCode.jszip:9454
  function smaller(tree, n, m, depth) {  // > CustomCode.jszip:9455
    var _n2 = n * 2;  // > CustomCode.jszip:9456
    var _m2 = m * 2;  // > CustomCode.jszip:9457
    return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||  // > CustomCode.jszip:9458
           (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));  // > CustomCode.jszip:9459
  }  // > CustomCode.jszip:9460
  /* ===========================================================================  // > CustomCode.jszip:9461
   * Restore the heap property by moving down the tree starting at node k,  // > CustomCode.jszip:9462
   * exchanging a node with the smallest of its two sons if necessary, stopping  // > CustomCode.jszip:9463
   * when the heap property is re-established (each father smaller than its  // > CustomCode.jszip:9464
   * two sons).  // > CustomCode.jszip:9465
   */  // > CustomCode.jszip:9466
  function pqdownheap(s, tree, k)  // > CustomCode.jszip:9467
  //    deflate_state *s;  // > CustomCode.jszip:9468
  //    ct_data *tree;  /* the tree to restore */  // > CustomCode.jszip:9469
  //    int k;               /* node to move down */  // > CustomCode.jszip:9470
  {  // > CustomCode.jszip:9471
    var v = s.heap[k];  // > CustomCode.jszip:9472
    var j = k << 1;  /* left son of k */  // > CustomCode.jszip:9473
    while (j <= s.heap_len) {  // > CustomCode.jszip:9474
      /* Set j to the smallest of the two sons: */  // > CustomCode.jszip:9475
      if (j < s.heap_len &&  // > CustomCode.jszip:9476
        smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {  // > CustomCode.jszip:9477
        j++;  // > CustomCode.jszip:9478
      }  // > CustomCode.jszip:9479
      /* Exit if v is smaller than both sons */  // > CustomCode.jszip:9480
      if (smaller(tree, v, s.heap[j], s.depth)) { break; }  // > CustomCode.jszip:9481
      /* Exchange v with the smallest son */  // > CustomCode.jszip:9482
      s.heap[k] = s.heap[j];  // > CustomCode.jszip:9483
      k = j;  // > CustomCode.jszip:9484
      /* And continue down the tree, setting j to the left son of k */  // > CustomCode.jszip:9485
      j <<= 1;  // > CustomCode.jszip:9486
    }  // > CustomCode.jszip:9487
    s.heap[k] = v;  // > CustomCode.jszip:9488
  }  // > CustomCode.jszip:9489
  // inlined manually  // > CustomCode.jszip:9490
  // var SMALLEST = 1;  // > CustomCode.jszip:9491
  /* ===========================================================================  // > CustomCode.jszip:9492
   * Send the block data compressed using the given Huffman trees  // > CustomCode.jszip:9493
   */  // > CustomCode.jszip:9494
  function compress_block(s, ltree, dtree)  // > CustomCode.jszip:9495
  //    deflate_state *s;  // > CustomCode.jszip:9496
  //    const ct_data *ltree; /* literal tree */  // > CustomCode.jszip:9497
  //    const ct_data *dtree; /* distance tree */  // > CustomCode.jszip:9498
  {  // > CustomCode.jszip:9499
    var dist;           /* distance of matched string */  // > CustomCode.jszip:9500
    var lc;             /* match length or unmatched char (if dist == 0) */  // > CustomCode.jszip:9501
    var lx = 0;         /* running index in l_buf */  // > CustomCode.jszip:9502
    var code;           /* the code to send */  // > CustomCode.jszip:9503
    var extra;          /* number of extra bits to send */  // > CustomCode.jszip:9504
    if (s.last_lit !== 0) {  // > CustomCode.jszip:9505
      do {  // > CustomCode.jszip:9506
        dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);  // > CustomCode.jszip:9507
        lc = s.pending_buf[s.l_buf + lx];  // > CustomCode.jszip:9508
        lx++;  // > CustomCode.jszip:9509
        if (dist === 0) {  // > CustomCode.jszip:9510
          send_code(s, lc, ltree); /* send a literal byte */  // > CustomCode.jszip:9511
          //Tracecv(isgraph(lc), (stderr," '%c' ", lc));  // > CustomCode.jszip:9512
        } else {  // > CustomCode.jszip:9513
          /* Here, lc is the match length - MIN_MATCH */  // > CustomCode.jszip:9514
          code = _length_code[lc];  // > CustomCode.jszip:9515
          send_code(s, code + LITERALS + 1, ltree); /* send the length code */  // > CustomCode.jszip:9516
          extra = extra_lbits[code];  // > CustomCode.jszip:9517
          if (extra !== 0) {  // > CustomCode.jszip:9518
            lc -= base_length[code];  // > CustomCode.jszip:9519
            send_bits(s, lc, extra);       /* send the extra length bits */  // > CustomCode.jszip:9520
          }  // > CustomCode.jszip:9521
          dist--; /* dist is now the match distance - 1 */  // > CustomCode.jszip:9522
          code = d_code(dist);  // > CustomCode.jszip:9523
          //Assert (code < D_CODES, "bad d_code");  // > CustomCode.jszip:9524
          send_code(s, code, dtree);       /* send the distance code */  // > CustomCode.jszip:9525
          extra = extra_dbits[code];  // > CustomCode.jszip:9526
          if (extra !== 0) {  // > CustomCode.jszip:9527
            dist -= base_dist[code];  // > CustomCode.jszip:9528
            send_bits(s, dist, extra);   /* send the extra distance bits */  // > CustomCode.jszip:9529
          }  // > CustomCode.jszip:9530
        } /* literal or match pair ? */  // > CustomCode.jszip:9531
        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */  // > CustomCode.jszip:9532
        //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,  // > CustomCode.jszip:9533
        //       "pendingBuf overflow");  // > CustomCode.jszip:9534
      } while (lx < s.last_lit);  // > CustomCode.jszip:9535
    }  // > CustomCode.jszip:9536
    send_code(s, END_BLOCK, ltree);  // > CustomCode.jszip:9537
  }  // > CustomCode.jszip:9538
  /* ===========================================================================  // > CustomCode.jszip:9539
   * Construct one Huffman tree and assigns the code bit strings and lengths.  // > CustomCode.jszip:9540
   * Update the total bit length for the current block.  // > CustomCode.jszip:9541
   * IN assertion: the field freq is set for all tree elements.  // > CustomCode.jszip:9542
   * OUT assertions: the fields len and code are set to the optimal bit length  // > CustomCode.jszip:9543
   *     and corresponding code. The length opt_len is updated; static_len is  // > CustomCode.jszip:9544
   *     also updated if stree is not null. The field max_code is set.  // > CustomCode.jszip:9545
   */  // > CustomCode.jszip:9546
  function build_tree(s, desc)  // > CustomCode.jszip:9547
  //    deflate_state *s;  // > CustomCode.jszip:9548
  //    tree_desc *desc; /* the tree descriptor */  // > CustomCode.jszip:9549
  {  // > CustomCode.jszip:9550
    var tree     = desc.dyn_tree;  // > CustomCode.jszip:9551
    var stree    = desc.stat_desc.static_tree;  // > CustomCode.jszip:9552
    var has_stree = desc.stat_desc.has_stree;  // > CustomCode.jszip:9553
    var elems    = desc.stat_desc.elems;  // > CustomCode.jszip:9554
    var n, m;          /* iterate over heap elements */  // > CustomCode.jszip:9555
    var max_code = -1; /* largest code with non zero frequency */  // > CustomCode.jszip:9556
    var node;          /* new node being created */  // > CustomCode.jszip:9557
    /* Construct the initial heap, with least frequent element in  // > CustomCode.jszip:9558
     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].  // > CustomCode.jszip:9559
     * heap[0] is not used.  // > CustomCode.jszip:9560
     */  // > CustomCode.jszip:9561
    s.heap_len = 0;  // > CustomCode.jszip:9562
    s.heap_max = HEAP_SIZE;  // > CustomCode.jszip:9563
    for (n = 0; n < elems; n++) {  // > CustomCode.jszip:9564
      if (tree[n * 2]/*.Freq*/ !== 0) {  // > CustomCode.jszip:9565
        s.heap[++s.heap_len] = max_code = n;  // > CustomCode.jszip:9566
        s.depth[n] = 0;  // > CustomCode.jszip:9567
      } else {  // > CustomCode.jszip:9568
        tree[n * 2 + 1]/*.Len*/ = 0;  // > CustomCode.jszip:9569
      }  // > CustomCode.jszip:9570
    }  // > CustomCode.jszip:9571
    /* The pkzip format requires that at least one distance code exists,  // > CustomCode.jszip:9572
     * and that at least one bit should be sent even if there is only one  // > CustomCode.jszip:9573
     * possible code. So to avoid special checks later on we force at least  // > CustomCode.jszip:9574
     * two codes of non zero frequency.  // > CustomCode.jszip:9575
     */  // > CustomCode.jszip:9576
    while (s.heap_len < 2) {  // > CustomCode.jszip:9577
      node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);  // > CustomCode.jszip:9578
      tree[node * 2]/*.Freq*/ = 1;  // > CustomCode.jszip:9579
      s.depth[node] = 0;  // > CustomCode.jszip:9580
      s.opt_len--;  // > CustomCode.jszip:9581
      if (has_stree) {  // > CustomCode.jszip:9582
        s.static_len -= stree[node * 2 + 1]/*.Len*/;  // > CustomCode.jszip:9583
      }  // > CustomCode.jszip:9584
      /* node is 0 or 1 so it does not have extra bits */  // > CustomCode.jszip:9585
    }  // > CustomCode.jszip:9586
    desc.max_code = max_code;  // > CustomCode.jszip:9587
    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,  // > CustomCode.jszip:9588
     * establish sub-heaps of increasing lengths:  // > CustomCode.jszip:9589
     */  // > CustomCode.jszip:9590
    for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }  // > CustomCode.jszip:9591
    /* Construct the Huffman tree by repeatedly combining the least two  // > CustomCode.jszip:9592
     * frequent nodes.  // > CustomCode.jszip:9593
     */  // > CustomCode.jszip:9594
    node = elems;              /* next internal node of the tree */  // > CustomCode.jszip:9595
    do {  // > CustomCode.jszip:9596
      //pqremove(s, tree, n);  /* n = node of least frequency */  // > CustomCode.jszip:9597
      /*** pqremove ***/  // > CustomCode.jszip:9598
      n = s.heap[1/*SMALLEST*/];  // > CustomCode.jszip:9599
      s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];  // > CustomCode.jszip:9600
      pqdownheap(s, tree, 1/*SMALLEST*/);  // > CustomCode.jszip:9601
      /***/  // > CustomCode.jszip:9602
      m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */  // > CustomCode.jszip:9603
      s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */  // > CustomCode.jszip:9604
      s.heap[--s.heap_max] = m;  // > CustomCode.jszip:9605
      /* Create a new node father of n and m */  // > CustomCode.jszip:9606
      tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;  // > CustomCode.jszip:9607
      s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;  // > CustomCode.jszip:9608
      tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;  // > CustomCode.jszip:9609
      /* and insert the new node in the heap */  // > CustomCode.jszip:9610
      s.heap[1/*SMALLEST*/] = node++;  // > CustomCode.jszip:9611
      pqdownheap(s, tree, 1/*SMALLEST*/);  // > CustomCode.jszip:9612
    } while (s.heap_len >= 2);  // > CustomCode.jszip:9613
    s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];  // > CustomCode.jszip:9614
    /* At this point, the fields freq and dad are set. We can now  // > CustomCode.jszip:9615
     * generate the bit lengths.  // > CustomCode.jszip:9616
     */  // > CustomCode.jszip:9617
    gen_bitlen(s, desc);  // > CustomCode.jszip:9618
    /* The field len is now set, we can generate the bit codes */  // > CustomCode.jszip:9619
    gen_codes(tree, max_code, s.bl_count);  // > CustomCode.jszip:9620
  }  // > CustomCode.jszip:9621
  /* ===========================================================================  // > CustomCode.jszip:9622
   * Scan a literal or distance tree to determine the frequencies of the codes  // > CustomCode.jszip:9623
   * in the bit length tree.  // > CustomCode.jszip:9624
   */  // > CustomCode.jszip:9625
  function scan_tree(s, tree, max_code)  // > CustomCode.jszip:9626
  //    deflate_state *s;  // > CustomCode.jszip:9627
  //    ct_data *tree;   /* the tree to be scanned */  // > CustomCode.jszip:9628
  //    int max_code;    /* and its largest code of non zero frequency */  // > CustomCode.jszip:9629
  {  // > CustomCode.jszip:9630
    var n;                     /* iterates over all tree elements */  // > CustomCode.jszip:9631
    var prevlen = -1;          /* last emitted length */  // > CustomCode.jszip:9632
    var curlen;                /* length of current code */  // > CustomCode.jszip:9633
    var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */  // > CustomCode.jszip:9634
    var count = 0;             /* repeat count of the current code */  // > CustomCode.jszip:9635
    var max_count = 7;         /* max repeat count */  // > CustomCode.jszip:9636
    var min_count = 4;         /* min repeat count */  // > CustomCode.jszip:9637
    if (nextlen === 0) {  // > CustomCode.jszip:9638
      max_count = 138;  // > CustomCode.jszip:9639
      min_count = 3;  // > CustomCode.jszip:9640
    }  // > CustomCode.jszip:9641
    tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */  // > CustomCode.jszip:9642
    for (n = 0; n <= max_code; n++) {  // > CustomCode.jszip:9643
      curlen = nextlen;  // > CustomCode.jszip:9644
      nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;  // > CustomCode.jszip:9645
      if (++count < max_count && curlen === nextlen) {  // > CustomCode.jszip:9646
        continue;  // > CustomCode.jszip:9647
      } else if (count < min_count) {  // > CustomCode.jszip:9648
        s.bl_tree[curlen * 2]/*.Freq*/ += count;  // > CustomCode.jszip:9649
      } else if (curlen !== 0) {  // > CustomCode.jszip:9650
        if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }  // > CustomCode.jszip:9651
        s.bl_tree[REP_3_6 * 2]/*.Freq*/++;  // > CustomCode.jszip:9652
      } else if (count <= 10) {  // > CustomCode.jszip:9653
        s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;  // > CustomCode.jszip:9654
      } else {  // > CustomCode.jszip:9655
        s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;  // > CustomCode.jszip:9656
      }  // > CustomCode.jszip:9657
      count = 0;  // > CustomCode.jszip:9658
      prevlen = curlen;  // > CustomCode.jszip:9659
      if (nextlen === 0) {  // > CustomCode.jszip:9660
        max_count = 138;  // > CustomCode.jszip:9661
        min_count = 3;  // > CustomCode.jszip:9662
      } else if (curlen === nextlen) {  // > CustomCode.jszip:9663
        max_count = 6;  // > CustomCode.jszip:9664
        min_count = 3;  // > CustomCode.jszip:9665
      } else {  // > CustomCode.jszip:9666
        max_count = 7;  // > CustomCode.jszip:9667
        min_count = 4;  // > CustomCode.jszip:9668
      }  // > CustomCode.jszip:9669
    }  // > CustomCode.jszip:9670
  }  // > CustomCode.jszip:9671
  /* ===========================================================================  // > CustomCode.jszip:9672
   * Send a literal or distance tree in compressed form, using the codes in  // > CustomCode.jszip:9673
   * bl_tree.  // > CustomCode.jszip:9674
   */  // > CustomCode.jszip:9675
  function send_tree(s, tree, max_code)  // > CustomCode.jszip:9676
  //    deflate_state *s;  // > CustomCode.jszip:9677
  //    ct_data *tree; /* the tree to be scanned */  // > CustomCode.jszip:9678
  //    int max_code;       /* and its largest code of non zero frequency */  // > CustomCode.jszip:9679
  {  // > CustomCode.jszip:9680
    var n;                     /* iterates over all tree elements */  // > CustomCode.jszip:9681
    var prevlen = -1;          /* last emitted length */  // > CustomCode.jszip:9682
    var curlen;                /* length of current code */  // > CustomCode.jszip:9683
    var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */  // > CustomCode.jszip:9684
    var count = 0;             /* repeat count of the current code */  // > CustomCode.jszip:9685
    var max_count = 7;         /* max repeat count */  // > CustomCode.jszip:9686
    var min_count = 4;         /* min repeat count */  // > CustomCode.jszip:9687
    /* tree[max_code+1].Len = -1; */  /* guard already set */  // > CustomCode.jszip:9688
    if (nextlen === 0) {  // > CustomCode.jszip:9689
      max_count = 138;  // > CustomCode.jszip:9690
      min_count = 3;  // > CustomCode.jszip:9691
    }  // > CustomCode.jszip:9692
    for (n = 0; n <= max_code; n++) {  // > CustomCode.jszip:9693
      curlen = nextlen;  // > CustomCode.jszip:9694
      nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;  // > CustomCode.jszip:9695
      if (++count < max_count && curlen === nextlen) {  // > CustomCode.jszip:9696
        continue;  // > CustomCode.jszip:9697
      } else if (count < min_count) {  // > CustomCode.jszip:9698
        do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);  // > CustomCode.jszip:9699
      } else if (curlen !== 0) {  // > CustomCode.jszip:9700
        if (curlen !== prevlen) {  // > CustomCode.jszip:9701
          send_code(s, curlen, s.bl_tree);  // > CustomCode.jszip:9702
          count--;  // > CustomCode.jszip:9703
        }  // > CustomCode.jszip:9704
        //Assert(count >= 3 && count <= 6, " 3_6?");  // > CustomCode.jszip:9705
        send_code(s, REP_3_6, s.bl_tree);  // > CustomCode.jszip:9706
        send_bits(s, count - 3, 2);  // > CustomCode.jszip:9707
      } else if (count <= 10) {  // > CustomCode.jszip:9708
        send_code(s, REPZ_3_10, s.bl_tree);  // > CustomCode.jszip:9709
        send_bits(s, count - 3, 3);  // > CustomCode.jszip:9710
      } else {  // > CustomCode.jszip:9711
        send_code(s, REPZ_11_138, s.bl_tree);  // > CustomCode.jszip:9712
        send_bits(s, count - 11, 7);  // > CustomCode.jszip:9713
      }  // > CustomCode.jszip:9714
      count = 0;  // > CustomCode.jszip:9715
      prevlen = curlen;  // > CustomCode.jszip:9716
      if (nextlen === 0) {  // > CustomCode.jszip:9717
        max_count = 138;  // > CustomCode.jszip:9718
        min_count = 3;  // > CustomCode.jszip:9719
      } else if (curlen === nextlen) {  // > CustomCode.jszip:9720
        max_count = 6;  // > CustomCode.jszip:9721
        min_count = 3;  // > CustomCode.jszip:9722
      } else {  // > CustomCode.jszip:9723
        max_count = 7;  // > CustomCode.jszip:9724
        min_count = 4;  // > CustomCode.jszip:9725
      }  // > CustomCode.jszip:9726
    }  // > CustomCode.jszip:9727
  }  // > CustomCode.jszip:9728
  /* ===========================================================================  // > CustomCode.jszip:9729
   * Construct the Huffman tree for the bit lengths and return the index in  // > CustomCode.jszip:9730
   * bl_order of the last bit length code to send.  // > CustomCode.jszip:9731
   */  // > CustomCode.jszip:9732
  function build_bl_tree(s) {  // > CustomCode.jszip:9733
    var max_blindex;  /* index of last bit length code of non zero freq */  // > CustomCode.jszip:9734
    /* Determine the bit length frequencies for literal and distance trees */  // > CustomCode.jszip:9735
    scan_tree(s, s.dyn_ltree, s.l_desc.max_code);  // > CustomCode.jszip:9736
    scan_tree(s, s.dyn_dtree, s.d_desc.max_code);  // > CustomCode.jszip:9737
    /* Build the bit length tree: */  // > CustomCode.jszip:9738
    build_tree(s, s.bl_desc);  // > CustomCode.jszip:9739
    /* opt_len now includes the length of the tree representations, except  // > CustomCode.jszip:9740
     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.  // > CustomCode.jszip:9741
     */  // > CustomCode.jszip:9742
    /* Determine the number of bit length codes to send. The pkzip format  // > CustomCode.jszip:9743
     * requires that at least 4 bit length codes be sent. (appnote.txt says  // > CustomCode.jszip:9744
     * 3 but the actual value used is 4.)  // > CustomCode.jszip:9745
     */  // > CustomCode.jszip:9746
    for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {  // > CustomCode.jszip:9747
      if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {  // > CustomCode.jszip:9748
        break;  // > CustomCode.jszip:9749
      }  // > CustomCode.jszip:9750
    }  // > CustomCode.jszip:9751
    /* Update opt_len to include the bit length tree and counts */  // > CustomCode.jszip:9752
    s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;  // > CustomCode.jszip:9753
    //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",  // > CustomCode.jszip:9754
    //        s->opt_len, s->static_len));  // > CustomCode.jszip:9755
    return max_blindex;  // > CustomCode.jszip:9756
  }  // > CustomCode.jszip:9757
  /* ===========================================================================  // > CustomCode.jszip:9758
   * Send the header for a block using dynamic Huffman trees: the counts, the  // > CustomCode.jszip:9759
   * lengths of the bit length codes, the literal tree and the distance tree.  // > CustomCode.jszip:9760
   * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.  // > CustomCode.jszip:9761
   */  // > CustomCode.jszip:9762
  function send_all_trees(s, lcodes, dcodes, blcodes)  // > CustomCode.jszip:9763
  //    deflate_state *s;  // > CustomCode.jszip:9764
  //    int lcodes, dcodes, blcodes; /* number of codes for each tree */  // > CustomCode.jszip:9765
  {  // > CustomCode.jszip:9766
    var rank;                    /* index in bl_order */  // > CustomCode.jszip:9767
    //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");  // > CustomCode.jszip:9768
    //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,  // > CustomCode.jszip:9769
    //        "too many codes");  // > CustomCode.jszip:9770
    //Tracev((stderr, "\nbl counts: "));  // > CustomCode.jszip:9771
    send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */  // > CustomCode.jszip:9772
    send_bits(s, dcodes - 1,   5);  // > CustomCode.jszip:9773
    send_bits(s, blcodes - 4,  4); /* not -3 as stated in appnote.txt */  // > CustomCode.jszip:9774
    for (rank = 0; rank < blcodes; rank++) {  // > CustomCode.jszip:9775
      //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));  // > CustomCode.jszip:9776
      send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);  // > CustomCode.jszip:9777
    }  // > CustomCode.jszip:9778
    //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));  // > CustomCode.jszip:9779
    send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */  // > CustomCode.jszip:9780
    //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));  // > CustomCode.jszip:9781
    send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */  // > CustomCode.jszip:9782
    //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));  // > CustomCode.jszip:9783
  }  // > CustomCode.jszip:9784
  /* ===========================================================================  // > CustomCode.jszip:9785
   * Check if the data type is TEXT or BINARY, using the following algorithm:  // > CustomCode.jszip:9786
   * - TEXT if the two conditions below are satisfied:  // > CustomCode.jszip:9787
   *    a) There are no non-portable control characters belonging to the  // > CustomCode.jszip:9788
   *       "black list" (0..6, 14..25, 28..31).  // > CustomCode.jszip:9789
   *    b) There is at least one printable character belonging to the  // > CustomCode.jszip:9790
   *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).  // > CustomCode.jszip:9791
   * - BINARY otherwise.  // > CustomCode.jszip:9792
   * - The following partially-portable control characters form a  // > CustomCode.jszip:9793
   *   "gray list" that is ignored in this detection algorithm:  // > CustomCode.jszip:9794
   *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).  // > CustomCode.jszip:9795
   * IN assertion: the fields Freq of dyn_ltree are set.  // > CustomCode.jszip:9796
   */  // > CustomCode.jszip:9797
  function detect_data_type(s) {  // > CustomCode.jszip:9798
    /* black_mask is the bit mask of black-listed bytes  // > CustomCode.jszip:9799
     * set bits 0..6, 14..25, and 28..31  // > CustomCode.jszip:9800
     * 0xf3ffc07f = binary 11110011111111111100000001111111  // > CustomCode.jszip:9801
     */  // > CustomCode.jszip:9802
    var black_mask = 0xf3ffc07f;  // > CustomCode.jszip:9803
    var n;  // > CustomCode.jszip:9804
    /* Check for non-textual ("black-listed") bytes. */  // > CustomCode.jszip:9805
    for (n = 0; n <= 31; n++, black_mask >>>= 1) {  // > CustomCode.jszip:9806
      if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {  // > CustomCode.jszip:9807
        return Z_BINARY;  // > CustomCode.jszip:9808
      }  // > CustomCode.jszip:9809
    }  // > CustomCode.jszip:9810
    /* Check for textual ("white-listed") bytes. */  // > CustomCode.jszip:9811
    if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||  // > CustomCode.jszip:9812
        s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {  // > CustomCode.jszip:9813
      return Z_TEXT;  // > CustomCode.jszip:9814
    }  // > CustomCode.jszip:9815
    for (n = 32; n < LITERALS; n++) {  // > CustomCode.jszip:9816
      if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {  // > CustomCode.jszip:9817
        return Z_TEXT;  // > CustomCode.jszip:9818
      }  // > CustomCode.jszip:9819
    }  // > CustomCode.jszip:9820
    /* There are no "black-listed" or "white-listed" bytes:  // > CustomCode.jszip:9821
     * this stream either is empty or has tolerated ("gray-listed") bytes only.  // > CustomCode.jszip:9822
     */  // > CustomCode.jszip:9823
    return Z_BINARY;  // > CustomCode.jszip:9824
  }  // > CustomCode.jszip:9825
  var static_init_done = false;  // > CustomCode.jszip:9826
  /* ===========================================================================  // > CustomCode.jszip:9827
   * Initialize the tree data structures for a new zlib stream.  // > CustomCode.jszip:9828
   */  // > CustomCode.jszip:9829
  function _tr_init(s)  // > CustomCode.jszip:9830
  {  // > CustomCode.jszip:9831
    if (!static_init_done) {  // > CustomCode.jszip:9832
      tr_static_init();  // > CustomCode.jszip:9833
      static_init_done = true;  // > CustomCode.jszip:9834
    }  // > CustomCode.jszip:9835
    s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);  // > CustomCode.jszip:9836
    s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);  // > CustomCode.jszip:9837
    s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);  // > CustomCode.jszip:9838
    s.bi_buf = 0;  // > CustomCode.jszip:9839
    s.bi_valid = 0;  // > CustomCode.jszip:9840
    /* Initialize the first block of the first file: */  // > CustomCode.jszip:9841
    init_block(s);  // > CustomCode.jszip:9842
  }  // > CustomCode.jszip:9843
  /* ===========================================================================  // > CustomCode.jszip:9844
   * Send a stored block  // > CustomCode.jszip:9845
   */  // > CustomCode.jszip:9846
  function _tr_stored_block(s, buf, stored_len, last)  // > CustomCode.jszip:9847
  //DeflateState *s;  // > CustomCode.jszip:9848
  //charf *buf;       /* input block */  // > CustomCode.jszip:9849
  //ulg stored_len;   /* length of input block */  // > CustomCode.jszip:9850
  //int last;         /* one if this is the last block for a file */  // > CustomCode.jszip:9851
  {  // > CustomCode.jszip:9852
    send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3);    /* send block type */  // > CustomCode.jszip:9853
    copy_block(s, buf, stored_len, true); /* with header */  // > CustomCode.jszip:9854
  }  // > CustomCode.jszip:9855
  /* ===========================================================================  // > CustomCode.jszip:9856
   * Send one empty static block to give enough lookahead for inflate.  // > CustomCode.jszip:9857
   * This takes 10 bits, of which 7 may remain in the bit buffer.  // > CustomCode.jszip:9858
   */  // > CustomCode.jszip:9859
  function _tr_align(s) {  // > CustomCode.jszip:9860
    send_bits(s, STATIC_TREES << 1, 3);  // > CustomCode.jszip:9861
    send_code(s, END_BLOCK, static_ltree);  // > CustomCode.jszip:9862
    bi_flush(s);  // > CustomCode.jszip:9863
  }  // > CustomCode.jszip:9864
  /* ===========================================================================  // > CustomCode.jszip:9865
   * Determine the best encoding for the current block: dynamic trees, static  // > CustomCode.jszip:9866
   * trees or store, and output the encoded block to the zip file.  // > CustomCode.jszip:9867
   */  // > CustomCode.jszip:9868
  function _tr_flush_block(s, buf, stored_len, last)  // > CustomCode.jszip:9869
  //DeflateState *s;  // > CustomCode.jszip:9870
  //charf *buf;       /* input block, or NULL if too old */  // > CustomCode.jszip:9871
  //ulg stored_len;   /* length of input block */  // > CustomCode.jszip:9872
  //int last;         /* one if this is the last block for a file */  // > CustomCode.jszip:9873
  {  // > CustomCode.jszip:9874
    var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */  // > CustomCode.jszip:9875
    var max_blindex = 0;        /* index of last bit length code of non zero freq */  // > CustomCode.jszip:9876
    /* Build the Huffman trees unless a stored block is forced */  // > CustomCode.jszip:9877
    if (s.level > 0) {  // > CustomCode.jszip:9878
      /* Check if the file is binary or text */  // > CustomCode.jszip:9879
      if (s.strm.data_type === Z_UNKNOWN) {  // > CustomCode.jszip:9880
        s.strm.data_type = detect_data_type(s);  // > CustomCode.jszip:9881
      }  // > CustomCode.jszip:9882
      /* Construct the literal and distance trees */  // > CustomCode.jszip:9883
      build_tree(s, s.l_desc);  // > CustomCode.jszip:9884
      // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,  // > CustomCode.jszip:9885
      //        s->static_len));  // > CustomCode.jszip:9886
      build_tree(s, s.d_desc);  // > CustomCode.jszip:9887
      // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,  // > CustomCode.jszip:9888
      //        s->static_len));  // > CustomCode.jszip:9889
      /* At this point, opt_len and static_len are the total bit lengths of  // > CustomCode.jszip:9890
       * the compressed block data, excluding the tree representations.  // > CustomCode.jszip:9891
       */  // > CustomCode.jszip:9892
      /* Build the bit length tree for the above two trees, and get the index  // > CustomCode.jszip:9893
       * in bl_order of the last bit length code to send.  // > CustomCode.jszip:9894
       */  // > CustomCode.jszip:9895
      max_blindex = build_bl_tree(s);  // > CustomCode.jszip:9896
      /* Determine the best encoding. Compute the block lengths in bytes. */  // > CustomCode.jszip:9897
      opt_lenb = (s.opt_len + 3 + 7) >>> 3;  // > CustomCode.jszip:9898
      static_lenb = (s.static_len + 3 + 7) >>> 3;  // > CustomCode.jszip:9899
      // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",  // > CustomCode.jszip:9900
      //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,  // > CustomCode.jszip:9901
      //        s->last_lit));  // > CustomCode.jszip:9902
      if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }  // > CustomCode.jszip:9903
    } else {  // > CustomCode.jszip:9904
      // Assert(buf != (char*)0, "lost buf");  // > CustomCode.jszip:9905
      opt_lenb = static_lenb = stored_len + 5; /* force a stored block */  // > CustomCode.jszip:9906
    }  // > CustomCode.jszip:9907
    if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {  // > CustomCode.jszip:9908
      /* 4: two words for the lengths */  // > CustomCode.jszip:9909
      /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.  // > CustomCode.jszip:9910
       * Otherwise we can't have processed more than WSIZE input bytes since  // > CustomCode.jszip:9911
       * the last block flush, because compression would have been  // > CustomCode.jszip:9912
       * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to  // > CustomCode.jszip:9913
       * transform a block into a stored block.  // > CustomCode.jszip:9914
       */  // > CustomCode.jszip:9915
      _tr_stored_block(s, buf, stored_len, last);  // > CustomCode.jszip:9916
    } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {  // > CustomCode.jszip:9917
      send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);  // > CustomCode.jszip:9918
      compress_block(s, static_ltree, static_dtree);  // > CustomCode.jszip:9919
    } else {  // > CustomCode.jszip:9920
      send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);  // > CustomCode.jszip:9921
      send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);  // > CustomCode.jszip:9922
      compress_block(s, s.dyn_ltree, s.dyn_dtree);  // > CustomCode.jszip:9923
    }  // > CustomCode.jszip:9924
    // Assert (s->compressed_len == s->bits_sent, "bad compressed size");  // > CustomCode.jszip:9925
    /* The above check is made mod 2^32, for files larger than 512 MB  // > CustomCode.jszip:9926
     * and uLong implemented on 32 bits.  // > CustomCode.jszip:9927
     */  // > CustomCode.jszip:9928
    init_block(s);  // > CustomCode.jszip:9929
    if (last) {  // > CustomCode.jszip:9930
      bi_windup(s);  // > CustomCode.jszip:9931
    }  // > CustomCode.jszip:9932
    // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,  // > CustomCode.jszip:9933
    //       s->compressed_len-7*last));  // > CustomCode.jszip:9934
  }  // > CustomCode.jszip:9935
  /* ===========================================================================  // > CustomCode.jszip:9936
   * Save the match info and tally the frequency counts. Return true if  // > CustomCode.jszip:9937
   * the current block must be flushed.  // > CustomCode.jszip:9938
   */  // > CustomCode.jszip:9939
  function _tr_tally(s, dist, lc)  // > CustomCode.jszip:9940
  //    deflate_state *s;  // > CustomCode.jszip:9941
  //    unsigned dist;  /* distance of matched string */  // > CustomCode.jszip:9942
  //    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */  // > CustomCode.jszip:9943
  {  // > CustomCode.jszip:9944
    //var out_length, in_length, dcode;  // > CustomCode.jszip:9945
    s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;  // > CustomCode.jszip:9946
    s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;  // > CustomCode.jszip:9947
    s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;  // > CustomCode.jszip:9948
    s.last_lit++;  // > CustomCode.jszip:9949
    if (dist === 0) {  // > CustomCode.jszip:9950
      /* lc is the unmatched char */  // > CustomCode.jszip:9951
      s.dyn_ltree[lc * 2]/*.Freq*/++;  // > CustomCode.jszip:9952
    } else {  // > CustomCode.jszip:9953
      s.matches++;  // > CustomCode.jszip:9954
      /* Here, lc is the match length - MIN_MATCH */  // > CustomCode.jszip:9955
      dist--;             /* dist = match distance - 1 */  // > CustomCode.jszip:9956
      //Assert((ush)dist < (ush)MAX_DIST(s) &&  // > CustomCode.jszip:9957
      //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&  // > CustomCode.jszip:9958
      //       (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");  // > CustomCode.jszip:9959
      s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;  // > CustomCode.jszip:9960
      s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;  // > CustomCode.jszip:9961
    }  // > CustomCode.jszip:9962
  // (!) This block is disabled in zlib defailts,  // > CustomCode.jszip:9963
  // don't enable it for binary compatibility  // > CustomCode.jszip:9964
  //#ifdef TRUNCATE_BLOCK  // > CustomCode.jszip:9965
  //  /* Try to guess if it is profitable to stop the current block here */  // > CustomCode.jszip:9966
  //  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {  // > CustomCode.jszip:9967
  //    /* Compute an upper bound for the compressed length */  // > CustomCode.jszip:9968
  //    out_length = s.last_lit*8;  // > CustomCode.jszip:9969
  //    in_length = s.strstart - s.block_start;  // > CustomCode.jszip:9970
  //  // > CustomCode.jszip:9971
  //    for (dcode = 0; dcode < D_CODES; dcode++) {  // > CustomCode.jszip:9972
  //      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);  // > CustomCode.jszip:9973
  //    }  // > CustomCode.jszip:9974
  //    out_length >>>= 3;  // > CustomCode.jszip:9975
  //    //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",  // > CustomCode.jszip:9976
  //    //       s->last_lit, in_length, out_length,  // > CustomCode.jszip:9977
  //    //       100L - out_length*100L/in_length));  // > CustomCode.jszip:9978
  //    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {  // > CustomCode.jszip:9979
  //      return true;  // > CustomCode.jszip:9980
  //    }  // > CustomCode.jszip:9981
  //  }  // > CustomCode.jszip:9982
  //#endif  // > CustomCode.jszip:9983
    return (s.last_lit === s.lit_bufsize - 1);  // > CustomCode.jszip:9984
    /* We avoid equality with lit_bufsize because of wraparound at 64K  // > CustomCode.jszip:9985
     * on 16 bit machines and because stored blocks are restricted to  // > CustomCode.jszip:9986
     * 64K-1 bytes.  // > CustomCode.jszip:9987
     */  // > CustomCode.jszip:9988
  }  // > CustomCode.jszip:9989
  exports._tr_init  = _tr_init;  // > CustomCode.jszip:9990
  exports._tr_stored_block = _tr_stored_block;  // > CustomCode.jszip:9991
  exports._tr_flush_block  = _tr_flush_block;  // > CustomCode.jszip:9992
  exports._tr_tally = _tr_tally;  // > CustomCode.jszip:9993
  exports._tr_align = _tr_align;  // > CustomCode.jszip:9994
  },{"../utils/common":41}],53:[function(require,module,exports){  // > CustomCode.jszip:9995
  'use strict';  // > CustomCode.jszip:9996
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler  // > CustomCode.jszip:9997
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin  // > CustomCode.jszip:9998
  //  // > CustomCode.jszip:9999
  // This software is provided 'as-is', without any express or implied  // > CustomCode.jszip:10000
  // warranty. In no event will the authors be held liable for any damages  // > CustomCode.jszip:10001
  // arising from the use of this software.  // > CustomCode.jszip:10002
  //  // > CustomCode.jszip:10003
  // Permission is granted to anyone to use this software for any purpose,  // > CustomCode.jszip:10004
  // including commercial applications, and to alter it and redistribute it  // > CustomCode.jszip:10005
  // freely, subject to the following restrictions:  // > CustomCode.jszip:10006
  //  // > CustomCode.jszip:10007
  // 1. The origin of this software must not be misrepresented; you must not  // > CustomCode.jszip:10008
  //   claim that you wrote the original software. If you use this software  // > CustomCode.jszip:10009
  //   in a product, an acknowledgment in the product documentation would be  // > CustomCode.jszip:10010
  //   appreciated but is not required.  // > CustomCode.jszip:10011
  // 2. Altered source versions must be plainly marked as such, and must not be  // > CustomCode.jszip:10012
  //   misrepresented as being the original software.  // > CustomCode.jszip:10013
  // 3. This notice may not be removed or altered from any source distribution.  // > CustomCode.jszip:10014
  function ZStream() {  // > CustomCode.jszip:10015
    /* next input byte */  // > CustomCode.jszip:10016
    this.input = null; // JS specific, because we have no pointers  // > CustomCode.jszip:10017
    this.next_in = 0;  // > CustomCode.jszip:10018
    /* number of bytes available at input */  // > CustomCode.jszip:10019
    this.avail_in = 0;  // > CustomCode.jszip:10020
    /* total number of input bytes read so far */  // > CustomCode.jszip:10021
    this.total_in = 0;  // > CustomCode.jszip:10022
    /* next output byte should be put there */  // > CustomCode.jszip:10023
    this.output = null; // JS specific, because we have no pointers  // > CustomCode.jszip:10024
    this.next_out = 0;  // > CustomCode.jszip:10025
    /* remaining free space at output */  // > CustomCode.jszip:10026
    this.avail_out = 0;  // > CustomCode.jszip:10027
    /* total number of bytes output so far */  // > CustomCode.jszip:10028
    this.total_out = 0;  // > CustomCode.jszip:10029
    /* last error message, NULL if no error */  // > CustomCode.jszip:10030
    this.msg = ''/*Z_NULL*/;  // > CustomCode.jszip:10031
    /* not visible by applications */  // > CustomCode.jszip:10032
    this.state = null;  // > CustomCode.jszip:10033
    /* best guess about the data type: binary or text */  // > CustomCode.jszip:10034
    this.data_type = 2/*Z_UNKNOWN*/;  // > CustomCode.jszip:10035
    /* adler32 value of the uncompressed data */  // > CustomCode.jszip:10036
    this.adler = 0;  // > CustomCode.jszip:10037
  }  // > CustomCode.jszip:10038
  module.exports = ZStream;  // > CustomCode.jszip:10039
  },{}],54:[function(require,module,exports){  // > CustomCode.jszip:10040
  (function (global){  // > CustomCode.jszip:10041
  (function (global, undefined) {  // > CustomCode.jszip:10042
      "use strict";  // > CustomCode.jszip:10043
      if (global.setImmediate) {  // > CustomCode.jszip:10044
          return;  // > CustomCode.jszip:10045
      }  // > CustomCode.jszip:10046
      var nextHandle = 1; // Spec says greater than zero  // > CustomCode.jszip:10047
      var tasksByHandle = {};  // > CustomCode.jszip:10048
      var currentlyRunningATask = false;  // > CustomCode.jszip:10049
      var doc = global.document;  // > CustomCode.jszip:10050
      var registerImmediate;  // > CustomCode.jszip:10051
      function setImmediate(callback) {  // > CustomCode.jszip:10052
        // Callback can either be a function or a string  // > CustomCode.jszip:10053
        if (typeof callback !== "function") {  // > CustomCode.jszip:10054
          callback = new Function("" + callback);  // > CustomCode.jszip:10055
        }  // > CustomCode.jszip:10056
        // Copy function arguments  // > CustomCode.jszip:10057
        var args = new Array(arguments.length - 1);  // > CustomCode.jszip:10058
        for (var i = 0; i < args.length; i++) {  // > CustomCode.jszip:10059
            args[i] = arguments[i + 1];  // > CustomCode.jszip:10060
        }  // > CustomCode.jszip:10061
        // Store and register the task  // > CustomCode.jszip:10062
        var task = { callback: callback, args: args };  // > CustomCode.jszip:10063
        tasksByHandle[nextHandle] = task;  // > CustomCode.jszip:10064
        registerImmediate(nextHandle);  // > CustomCode.jszip:10065
        return nextHandle++;  // > CustomCode.jszip:10066
      }  // > CustomCode.jszip:10067
      function clearImmediate(handle) {  // > CustomCode.jszip:10068
          delete tasksByHandle[handle];  // > CustomCode.jszip:10069
      }  // > CustomCode.jszip:10070
      function run(task) {  // > CustomCode.jszip:10071
          var callback = task.callback;  // > CustomCode.jszip:10072
          var args = task.args;  // > CustomCode.jszip:10073
          switch (args.length) {  // > CustomCode.jszip:10074
          case 0:  // > CustomCode.jszip:10075
              callback();  // > CustomCode.jszip:10076
              break;  // > CustomCode.jszip:10077
          case 1:  // > CustomCode.jszip:10078
              callback(args[0]);  // > CustomCode.jszip:10079
              break;  // > CustomCode.jszip:10080
          case 2:  // > CustomCode.jszip:10081
              callback(args[0], args[1]);  // > CustomCode.jszip:10082
              break;  // > CustomCode.jszip:10083
          case 3:  // > CustomCode.jszip:10084
              callback(args[0], args[1], args[2]);  // > CustomCode.jszip:10085
              break;  // > CustomCode.jszip:10086
          default:  // > CustomCode.jszip:10087
              callback.apply(undefined, args);  // > CustomCode.jszip:10088
              break;  // > CustomCode.jszip:10089
          }  // > CustomCode.jszip:10090
      }  // > CustomCode.jszip:10091
      function runIfPresent(handle) {  // > CustomCode.jszip:10092
          // From the spec: "Wait until any invocations of this algorithm started before this one have completed."  // > CustomCode.jszip:10093
          // So if we're currently running a task, we'll need to delay this invocation.  // > CustomCode.jszip:10094
          if (currentlyRunningATask) {  // > CustomCode.jszip:10095
              // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a  // > CustomCode.jszip:10096
              // "too much recursion" error.  // > CustomCode.jszip:10097
              setTimeout(runIfPresent, 0, handle);  // > CustomCode.jszip:10098
          } else {  // > CustomCode.jszip:10099
              var task = tasksByHandle[handle];  // > CustomCode.jszip:10100
              if (task) {  // > CustomCode.jszip:10101
                  currentlyRunningATask = true;  // > CustomCode.jszip:10102
                  try {  // > CustomCode.jszip:10103
                      run(task);  // > CustomCode.jszip:10104
                  } finally {  // > CustomCode.jszip:10105
                      clearImmediate(handle);  // > CustomCode.jszip:10106
                      currentlyRunningATask = false;  // > CustomCode.jszip:10107
                  }  // > CustomCode.jszip:10108
              }  // > CustomCode.jszip:10109
          }  // > CustomCode.jszip:10110
      }  // > CustomCode.jszip:10111
      function installNextTickImplementation() {  // > CustomCode.jszip:10112
          registerImmediate = function(handle) {  // > CustomCode.jszip:10113
              process.nextTick(function () { runIfPresent(handle); });  // > CustomCode.jszip:10114
          };  // > CustomCode.jszip:10115
      }  // > CustomCode.jszip:10116
      function canUsePostMessage() {  // > CustomCode.jszip:10117
          // The test against `importScripts` prevents this implementation from being installed inside a web worker,  // > CustomCode.jszip:10118
          // where `global.postMessage` means something completely different and can't be used for this purpose.  // > CustomCode.jszip:10119
          if (global.postMessage && !global.importScripts) {  // > CustomCode.jszip:10120
              var postMessageIsAsynchronous = true;  // > CustomCode.jszip:10121
              var oldOnMessage = global.onmessage;  // > CustomCode.jszip:10122
              global.onmessage = function() {  // > CustomCode.jszip:10123
                  postMessageIsAsynchronous = false;  // > CustomCode.jszip:10124
              };  // > CustomCode.jszip:10125
              global.postMessage("", "*");  // > CustomCode.jszip:10126
              global.onmessage = oldOnMessage;  // > CustomCode.jszip:10127
              return postMessageIsAsynchronous;  // > CustomCode.jszip:10128
          }  // > CustomCode.jszip:10129
      }  // > CustomCode.jszip:10130
      function installPostMessageImplementation() {  // > CustomCode.jszip:10131
          // Installs an event handler on `global` for the `message` event: see  // > CustomCode.jszip:10132
          // * https://developer.mozilla.org/en/DOM/window.postMessage  // > CustomCode.jszip:10133
          // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages  // > CustomCode.jszip:10134
          var messagePrefix = "setImmediate$" + Math.random() + "$";  // > CustomCode.jszip:10135
          var onGlobalMessage = function(event) {  // > CustomCode.jszip:10136
              if (event.source === global &&  // > CustomCode.jszip:10137
                  typeof event.data === "string" &&  // > CustomCode.jszip:10138
                  event.data.indexOf(messagePrefix) === 0) {  // > CustomCode.jszip:10139
                  runIfPresent(+event.data.slice(messagePrefix.length));  // > CustomCode.jszip:10140
              }  // > CustomCode.jszip:10141
          };  // > CustomCode.jszip:10142
          if (global.addEventListener) {  // > CustomCode.jszip:10143
              global.addEventListener("message", onGlobalMessage, false);  // > CustomCode.jszip:10144
          } else {  // > CustomCode.jszip:10145
              global.attachEvent("onmessage", onGlobalMessage);  // > CustomCode.jszip:10146
          }  // > CustomCode.jszip:10147
          registerImmediate = function(handle) {  // > CustomCode.jszip:10148
              global.postMessage(messagePrefix + handle, "*");  // > CustomCode.jszip:10149
          };  // > CustomCode.jszip:10150
      }  // > CustomCode.jszip:10151
      function installMessageChannelImplementation() {  // > CustomCode.jszip:10152
          var channel = new MessageChannel();  // > CustomCode.jszip:10153
          channel.port1.onmessage = function(event) {  // > CustomCode.jszip:10154
              var handle = event.data;  // > CustomCode.jszip:10155
              runIfPresent(handle);  // > CustomCode.jszip:10156
          };  // > CustomCode.jszip:10157
          registerImmediate = function(handle) {  // > CustomCode.jszip:10158
              channel.port2.postMessage(handle);  // > CustomCode.jszip:10159
          };  // > CustomCode.jszip:10160
      }  // > CustomCode.jszip:10161
      function installReadyStateChangeImplementation() {  // > CustomCode.jszip:10162
          var html = doc.documentElement;  // > CustomCode.jszip:10163
          registerImmediate = function(handle) {  // > CustomCode.jszip:10164
              // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted  // > CustomCode.jszip:10165
              // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.  // > CustomCode.jszip:10166
              var script = doc.createElement("script");  // > CustomCode.jszip:10167
              script.onreadystatechange = function () {  // > CustomCode.jszip:10168
                  runIfPresent(handle);  // > CustomCode.jszip:10169
                  script.onreadystatechange = null;  // > CustomCode.jszip:10170
                  html.removeChild(script);  // > CustomCode.jszip:10171
                  script = null;  // > CustomCode.jszip:10172
              };  // > CustomCode.jszip:10173
              html.appendChild(script);  // > CustomCode.jszip:10174
          };  // > CustomCode.jszip:10175
      }  // > CustomCode.jszip:10176
      function installSetTimeoutImplementation() {  // > CustomCode.jszip:10177
          registerImmediate = function(handle) {  // > CustomCode.jszip:10178
              setTimeout(runIfPresent, 0, handle);  // > CustomCode.jszip:10179
          };  // > CustomCode.jszip:10180
      }  // > CustomCode.jszip:10181
      // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.  // > CustomCode.jszip:10182
      var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);  // > CustomCode.jszip:10183
      attachTo = attachTo && attachTo.setTimeout ? attachTo : global;  // > CustomCode.jszip:10184
      // Don't get fooled by e.g. browserify environments.  // > CustomCode.jszip:10185
      if ({}.toString.call(global.process) === "[object process]") {  // > CustomCode.jszip:10186
          // For Node.js before 0.9  // > CustomCode.jszip:10187
          installNextTickImplementation();  // > CustomCode.jszip:10188
      } else if (canUsePostMessage()) {  // > CustomCode.jszip:10189
          // For non-IE10 modern browsers  // > CustomCode.jszip:10190
          installPostMessageImplementation();  // > CustomCode.jszip:10191
      } else if (global.MessageChannel) {  // > CustomCode.jszip:10192
          // For web workers, where supported  // > CustomCode.jszip:10193
          installMessageChannelImplementation();  // > CustomCode.jszip:10194
      } else if (doc && "onreadystatechange" in doc.createElement("script")) {  // > CustomCode.jszip:10195
          // For IE 6–8  // > CustomCode.jszip:10196
          installReadyStateChangeImplementation();  // > CustomCode.jszip:10197
      } else {  // > CustomCode.jszip:10198
          // For older browsers  // > CustomCode.jszip:10199
          installSetTimeoutImplementation();  // > CustomCode.jszip:10200
      }  // > CustomCode.jszip:10201
      attachTo.setImmediate = setImmediate;  // > CustomCode.jszip:10202
      attachTo.clearImmediate = clearImmediate;  // > CustomCode.jszip:10203
  }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));  // > CustomCode.jszip:10204
  }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})  // > CustomCode.jszip:10205
  },{}]},{},[10])(10)  // > CustomCode.jszip:10206
  });  // > CustomCode.jszip:10207

  //written by ryan451  // > CustomCode.import:1
  //copy to custom function of ejss  // > CustomCode.import:2
  //version 2  // > CustomCode.import:3
  /**  // > CustomCode.import:4
   * @async  // > CustomCode.import:5
   * @function attemptLoadGraph  // > CustomCode.import:6
   * @returns {Promise<object>} Promise resolved: an object representing the data that was loaded  // > CustomCode.import:7
   */  // > CustomCode.import:8
  async function attemptLoadGraph() {  // > CustomCode.import:9
    const graphResponse = await fetch("records.json");  // > CustomCode.import:10
    const graphSettings = await graphResponse.json();  // > CustomCode.import:11
    return graphSettings;  // > CustomCode.import:12
  }  // > CustomCode.import:13
  /*  // > CustomCode.import:14
  Use like this:  // > CustomCode.import:15
  attemptLoadGraph().then(function(data) {  // > CustomCode.import:16
    uiVariable1 = data.uiVariable1;  // > CustomCode.import:17
    buttonText = data.buttonText;  // > CustomCode.import:18
    _view.update();  // > CustomCode.import:19
  });  // > CustomCode.import:20
  */  // > CustomCode.import:21

  async function exportGraph(exportObject, filename="export.zip") {  // > CustomCode.export:1
    // Get the zipped export template  // > CustomCode.export:2
    const exportTemplatePath = "export-template.zip";  // > CustomCode.export:3
    const graphFileName = "records.json";  // > CustomCode.export:4
    //const IS_TESTING_EXPORT = true;  // > CustomCode.export:5
    let exportZip;  // > CustomCode.export:6
    //if (IS_TESTING_EXPORT) {  // > CustomCode.export:7
     // exportZip = new JSZip();  // > CustomCode.export:8
    //} else {  // > CustomCode.export:9
      exportZip = await getZipFromPath(exportTemplatePath);  // > CustomCode.export:10
    //}  // > CustomCode.export:11
    exportZip.file(graphFileName, JSON.stringify(exportObject));  // > CustomCode.export:12
    exportZip.generateAsync({type: "blob"}).then(blob => saveAs(blob, filename));  // > CustomCode.export:13
  }  // > CustomCode.export:14
  function onGraphExportComplete() {  // > CustomCode.export:15
    alert("Export complete");  // > CustomCode.export:16
  }  // > CustomCode.export:17
  async function getZipFromPath(path) {  // > CustomCode.export:18
    return await JSZip.loadAsync(await (await fetch(path)).blob());  // > CustomCode.export:19
  }  // > CustomCode.export:20
  function saveBlob(blob, filename) {  // > CustomCode.export:21
    var elem = window.document.createElement("a");  // > CustomCode.export:22
    var objectUrl = window.URL.createObjectURL(blob);  // > CustomCode.export:23
    elem.href = objectUrl;  // > CustomCode.export:24
    elem.download = filename;  // > CustomCode.export:25
    elem.click();  // > CustomCode.export:26
      // > CustomCode.export:27
    // Cleanup allocated objects to avoid memory leaks  // > CustomCode.export:28
    // These objects do not get GCed  // > CustomCode.export:29
    setTimeout(function(elem, objectUrl) {  // > CustomCode.export:30
      elem.remove();  // > CustomCode.export:31
      window.URL.revokeObjectURL(objectUrl);  // > CustomCode.export:32
    }, 1_000, elem, objectUrl);  // > CustomCode.export:33
  }  // > CustomCode.export:34

  _model.addToInitialization(function() {
    if (!__pagesEnabled["initial"]) return;
    // draw X positions of the energy: //  // > Initialization.initial:1
    for (let i=1; i<= iniTotalEnergy.length; i++){  // > Initialization.initial:2
      energyXpos.push(i);  // gives [1,2,3,4,5,6]  // > Initialization.initial:3
      }  // > Initialization.initial:4
    // writing here cuz there's space to read //  // > Initialization.initial:5
    formulaText = "Initial Energy of the System <b>+</b> Energy Transferred Into the System "  // > Initialization.initial:6
    formulaText += "<b>=</b> Energy Transferred Out of the System <b>+</b> Final Energy of the System"  // > Initialization.initial:7
    legendText = "<b><u>Legend</u>:</b>"  // > Initialization.initial:8
    legendText += "\nC - Chemical || "  // > Initialization.initial:9
    legendText += "\nE - Elastic || "  // > Initialization.initial:10
    legendText += "\nG - Gravitational || "  // > Initialization.initial:11
    legendText += "\nI - Internal || "  // > Initialization.initial:12
    legendText += "\nK - Kinetic || "  // > Initialization.initial:13
    legendText += "\nN - Nuclear "  // > Initialization.initial:14
    eTooltip = "Electrically: \nTransfer of energy from the chemical store of a power supply to the kinetic store of a fan motor."  // > Initialization.initial:15
    eTooltip+= "\nE.g. switching on a fan."  // > Initialization.initial:16
    hTooltip = "Heating: \nTransfer of energy from the internal store of a heating element to the internal store of water molecules."  // > Initialization.initial:17
    hTooltip+= "\nE.g. Boiling water in a kettle."  // > Initialization.initial:18
    mTooltip = "Mechanically: \nTransfer of energy from the chemical store of a person to the kinetic store of a trolley."  // > Initialization.initial:19
    mTooltip+= "\nE.g. Pushing a trolley."  // > Initialization.initial:20
    pTooltip = "Propogation of waves: \nTransfer of energy from the chemical store of a power supply to the kinetic store of a fan motor."  // > Initialization.initial:21
    pTooltip+= "\nE.g. Switching on a fan."  // > Initialization.initial:22
  });

  _model.addToInitialization(function() {
    if (!__pagesEnabled["userPlay"]) return;
    var userPlay =  // > Initialization.userPlay:1
    "// Pls ENSURE that the above checks have been gone through before proceeding in this check, especially in the initial & final state.\n"+  // > Initialization.userPlay:2
    "// initial energy variables are ⇒ C, E, G, I, K, N\n"+  // > Initialization.userPlay:3
    "// final energy variables are   ⇒ finalC, finalE, finalG, finalI, finalK, finalN\n"+  // > Initialization.userPlay:4
    "// To edit the following codes, please remove the comments '//' to implement the line of the code.\n"+  // > Initialization.userPlay:5
    "// Edit the following codes (Change magnitude) to get desired conditions:\n\n"+  // > Initialization.userPlay:6
    "//finalC = 0.5 * C\n"+  // > Initialization.userPlay:7
    "//finalE = 2 * E\n"+  // > Initialization.userPlay:8
    "//finalG = 1 * G\n"+  // > Initialization.userPlay:9
    "//finalI = 1 * I\n"+  // > Initialization.userPlay:10
    "//finalK = 1 * K\n"+  // > Initialization.userPlay:11
    "//finalN = 1 * N\n\n"+  // > Initialization.userPlay:12
    "// Final energy variables becomes ⇒ fC, fE, fG, fI, fK, fN\n"+  // > Initialization.userPlay:13
    "// Edit the following INEQUALITY formulas & the operators in the brackets () to get desired conditions: uncomment '//' for required formulas \n\n"+  // > Initialization.userPlay:14
    "//if (fC < C){inequalityCheckLst += true} else{inequalityCheckLst += false}\n"+  // > Initialization.userPlay:15
    "//if (fE <= E){inequalityCheckLst += true} else{inequalityCheckLst += false}\n"+  // > Initialization.userPlay:16
    "//if (fG > G) {inequalityCheckLst += true} else{inequalityCheckLst += false}\n"+  // > Initialization.userPlay:17
    "//if (fI > I) {inequalityCheckLst += true} else{inequalityCheckLst += false}\n"+  // > Initialization.userPlay:18
    "//if (fK >= K){inequalityCheckLst += true} else{inequalityCheckLst += false}\n"+  // > Initialization.userPlay:19
    "//if (fN >= N){inequalityCheckLst += true} else{inequalityCheckLst += false}"  // > Initialization.userPlay:20
    _view.userCode.setValue(userPlay);  // > Initialization.userPlay:21
    // var userPlay = _view.userCode.getValue(); // ⇒ to be included   // > Initialization.userPlay:22
    ///////////////  // > Initialization.userPlay:23
    // REFERENCE //  // > Initialization.userPlay:24
    ///////////////  // > Initialization.userPlay:25
    /*  // > Initialization.userPlay:26
    " M = [ [1,2,3,4], //M matrix is declared globally\n"+  // > Initialization.userPlay:27
    "          [5,6,7,8], \n"+  // > Initialization.userPlay:28
    "          [9,1,2,3],  \n"+  // > Initialization.userPlay:29
    "          [4,5,9,7] ]; \n"+  // > Initialization.userPlay:30
    "function det(M) { \n"+  // > Initialization.userPlay:31
    "    if (M.length==1) { return (M[0][0]);} // handle case M is 1x1 \n"+  // > Initialization.userPlay:32
    "if (M.length==2) { return (M[0][0]*M[1][1])-(M[0][1]*M[1][0]); } // handle case M is 2x2\n"+  // > Initialization.userPlay:33
    "    var answer = 0; \n"+  // > Initialization.userPlay:34
    "    for (var i=0; i< M.length; i++) { answer += Math.pow(-1,i)*M[0][i]*det(deleteRowAndColumn(M,i)); } // handle case M >= 3x3\n"+  // > Initialization.userPlay:35
    "    return answer;\n"+  // > Initialization.userPlay:36
    "}\n"+  // > Initialization.userPlay:37
    "function deleteRowAndColumn(M,index) { \n"+  // > Initialization.userPlay:38
    "    var temp = []; // copy the array first \n"+  // > Initialization.userPlay:39
    "    for (var i=0; i<M.length; i++) {  \n"+  // > Initialization.userPlay:40
    "temp.push(M[i].slice(0));  } \n"+  // > Initialization.userPlay:41
    "    temp.splice(0,1);   // delete the first row  \n"+  // > Initialization.userPlay:42
    "    for (var i=0; i<temp.length; i++) {  \n"+  // > Initialization.userPlay:43
    "       temp[i].splice(index,1); } // delete the column at the index specified \n"+  // > Initialization.userPlay:44
    "    return temp;   \n"+  // > Initialization.userPlay:45
    "} \n"  // > Initialization.userPlay:46
    */  // > Initialization.userPlay:47
  });

  _model.addToInitialization(function() {
    if (!__pagesEnabled["import"]) return;
    if (!editing) {  // > Initialization.import:1
      //if (!newsim) {  // > Initialization.import:2
        attemptLoadGraph().then(function(data) {  // > Initialization.import:3
          //alert( "loading new values")  // > Initialization.import:4
          ////////////////////////////////////////////  // > Initialization.import:5
          // data to be loaded into export & import //  // > Initialization.import:6
          ////////////////////////////////////////////  // > Initialization.import:7
          // Setting: //   // > Initialization.import:8
          systemText2 = data.systemText2;  // > Initialization.import:9
          initialState2 = data.initialState2;  // > Initialization.import:10
          finalState2 = data.finalState2;  // > Initialization.import:11
          remarks2 = data.remarks2;  // > Initialization.import:12
          show2D = data.show2D  // > Initialization.import:13
          show3D = data.show3D  // > Initialization.import:14
          revealRadioButton = data.revealRadioButton  // > Initialization.import:15
            // > Initialization.import:16
            // > Initialization.import:17
          //check 1  // > Initialization.import:18
          displayChemical = data.displayChemical;  // > Initialization.import:19
          displayElastic = data.displayElastic  // > Initialization.import:20
          displayGravitational= data.displayGravitational  // > Initialization.import:21
          displayInternal= data.displayInternal  // > Initialization.import:22
          displayKinetic = data.displayKinetic  // > Initialization.import:23
          displayNuclear = data.displayNuclear  // > Initialization.import:24
            // > Initialization.import:25
            // > Initialization.import:26
          // check2 - ignoring of energy: //  // > Initialization.import:27
          isC = data.isC;  // > Initialization.import:28
          isE = data.isE;  // > Initialization.import:29
          isG = data.isG;  // > Initialization.import:30
          isI = data.isI;  // > Initialization.import:31
          isK = data.isK;  // > Initialization.import:32
          isN = data.isN;  // > Initialization.import:33
          ignoreEnergyLst = data.ignoreEnergyLst;  // > Initialization.import:34
            // > Initialization.import:35
          // check3/4 - Transferable Energy: //  // > Initialization.import:36
          check3a = data.check3a;    // > Initialization.import:37
          check3b = data.check3b;  // > Initialization.import:38
          check4a = data.check4a;  // > Initialization.import:39
          check4b = data.check4b;  // > Initialization.import:40
            // > Initialization.import:41
          check3aEnergy = data.check3aEnergy;  // > Initialization.import:42
          check3bEnergy = data.check3bEnergy;  // > Initialization.import:43
          check4aEnergy = data.check4aEnergy;  // > Initialization.import:44
          check4bEnergy = data.check4bEnergy;  // > Initialization.import:45
            // > Initialization.import:46
          check3aReason = data.check3aReason;  // > Initialization.import:47
          check3bReason = data.check3bReason;  // > Initialization.import:48
          check4aReason = data.check4aReason;  // > Initialization.import:49
          check4bReason = data.check4bReason;  // > Initialization.import:50
            // > Initialization.import:51
          // check5 - avail energy initially: //  // > Initialization.import:52
          iniC = data.iniC;  // > Initialization.import:53
          iniE = data.iniE;  // > Initialization.import:54
          iniG = data.iniG;  // > Initialization.import:55
          iniI = data.iniI;  // > Initialization.import:56
          iniK = data.iniK;  // > Initialization.import:57
          iniN = data.iniN;  // > Initialization.import:58
            // > Initialization.import:59
          // check6 - final state energy: //  // > Initialization.import:60
          finC = data.finC;  // > Initialization.import:61
          finE = data.finE;  // > Initialization.import:62
          finG = data.finG;  // > Initialization.import:63
          finI = data.finI;  // > Initialization.import:64
          finK = data.finK;  // > Initialization.import:65
          finN = data.finN;  // > Initialization.import:66
            // > Initialization.import:67
          // check7 - formula: //  // > Initialization.import:68
          check7a = data.check7a;  // > Initialization.import:69
          finalC = data.finalC;  // > Initialization.import:70
          finalE = data.finalE;  // > Initialization.import:71
          finalG = data.finalG;  // > Initialization.import:72
          finalI = data.finalI;  // > Initialization.import:73
          finalK = data.finalK;  // > Initialization.import:74
          finalN = data.finalN;  // > Initialization.import:75
          passfail = data.passfail;  // > Initialization.import:76
          inequalityCheckLst = data.inequalityCheckLst;  // > Initialization.import:77
          userPlay = data.userPlay;  // > Initialization.import:78
            // > Initialization.import:79
          // ... to be continued if necessary ...  // > Initialization.import:80
            // > Initialization.import:81
          //_view._addInteraction(function(){}  ,"Q1",{"property":"value", "element":"question"}); // use to detect beginning of Q1  // > Initialization.import:82
          //alert( "add interaction")  // > Initialization.import:83
            // > Initialization.import:84
          _update();  // > Initialization.import:85
          //alert( not working if use "_view._update")  // > Initialization.import:86
        } );  // > Initialization.import:87
      }  // > Initialization.import:88
  });

  _model.addToFixedRelations(function() { _isPaused = _model.isPaused(); _isPlaying = _model.isPlaying(); });

  _model.addToFixedRelations(function() {
    if (!__pagesEnabled["scaleWrestrictions_INITIAL"]) return;
    for (let i=0; i< iniTotalEnergy.length; i++){  // > FixedRelations.scaleWrestrictions_INITIAL:1
      // 0 <= Boundary limits <=10 //  // > FixedRelations.scaleWrestrictions_INITIAL:2
      if (iniTotalEnergy[i] >10){  // > FixedRelations.scaleWrestrictions_INITIAL:3
        iniTotalEnergy[i] = 10;  // > FixedRelations.scaleWrestrictions_INITIAL:4
        }  // > FixedRelations.scaleWrestrictions_INITIAL:5
      else if (iniTotalEnergy[i] <0){  // > FixedRelations.scaleWrestrictions_INITIAL:6
        if (i!=2){  // > FixedRelations.scaleWrestrictions_INITIAL:7
          iniTotalEnergy[i] = 0;  // > FixedRelations.scaleWrestrictions_INITIAL:8
          }  // > FixedRelations.scaleWrestrictions_INITIAL:9
        else if (i==2 && iniTotalEnergy[i] < -10) {iniTotalEnergy[i] =-10}  // > FixedRelations.scaleWrestrictions_INITIAL:10
        }  // > FixedRelations.scaleWrestrictions_INITIAL:11
      // update number of pictures w Y position //  // > FixedRelations.scaleWrestrictions_INITIAL:12
      //chemicalY = numberedLst( iniTotalEnergy[i] );  // > FixedRelations.scaleWrestrictions_INITIAL:13
      /*  // > FixedRelations.scaleWrestrictions_INITIAL:14
      for (let j=0; j < Math.round(iniTotalEnergy[i]); j++){  // > FixedRelations.scaleWrestrictions_INITIAL:15
        chemicalY.push(j);  // gives [0,1,2, ... ]  // > FixedRelations.scaleWrestrictions_INITIAL:16
        }  // > FixedRelations.scaleWrestrictions_INITIAL:17
      */  // > FixedRelations.scaleWrestrictions_INITIAL:18
      // Restrict numbers to integers --> Makes dragging difficult --> fixed by moving to OnRelease //  // > FixedRelations.scaleWrestrictions_INITIAL:19
      /*  // > FixedRelations.scaleWrestrictions_INITIAL:20
      iniTotalEnergy[i] =  Math.round(iniTotalEnergy[i]);  // > FixedRelations.scaleWrestrictions_INITIAL:21
      */  // > FixedRelations.scaleWrestrictions_INITIAL:22
        // > FixedRelations.scaleWrestrictions_INITIAL:23
      }  // > FixedRelations.scaleWrestrictions_INITIAL:24
    // Restrict EtransIN at O diagram //  // > FixedRelations.scaleWrestrictions_INITIAL:25
    if (EtransIN < 0){EtransIN = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:26
      else if (EtransIN > 10){EtransIN = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:27
    if (dragEtransIN < 0){dragEtransIN = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:28
      else if (dragEtransIN > 10){dragEtransIN = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:29
    // Restrict EtransIN2 at O diagram //  // > FixedRelations.scaleWrestrictions_INITIAL:30
    if (EtransIN2 < 0){EtransIN2 = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:31
      else if (EtransIN2 > 10){EtransIN2 = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:32
    if (dragEtransIN2 < 0){dragEtransIN2 = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:33
      else if (dragEtransIN2 > 10){dragEtransIN2 = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:34
    // Restrict dragHelpers at L diagram //   // > FixedRelations.scaleWrestrictions_INITIAL:35
    if (dragCY < 0){dragCY = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:36
    else if (dragCY > 10){dragCY = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:37
    if (dragEY < 0){dragEY = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:38
    else if (dragEY > 10){dragEY = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:39
    //if (dragGY < -10){dragGY = -10}    // G can go -ve till -10  // > FixedRelations.scaleWrestrictions_INITIAL:40
    if (dragGY < 0){dragGY = 0}     // > FixedRelations.scaleWrestrictions_INITIAL:41
    else if (dragGY > 10){dragGY = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:42
    if (dragIY < 0){dragIY = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:43
    else if (dragIY > 10){dragIY = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:44
    if (dragKY < 0){dragKY = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:45
    else if (dragKY > 10){dragKY = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:46
    if (dragNY < 0){dragNY = 0}  // > FixedRelations.scaleWrestrictions_INITIAL:47
    else if (dragNY > 10){dragNY = 10}  // > FixedRelations.scaleWrestrictions_INITIAL:48
  });

  _model.addToFixedRelations(function() {
    if (!__pagesEnabled["scaleWrestrictions_FINAL"]) return;
    for (let i=0; i< finTotalEnergy.length; i++){  // > FixedRelations.scaleWrestrictions_FINAL:1
      // 0 <= Boundary limits <=10 //  // > FixedRelations.scaleWrestrictions_FINAL:2
      if (finTotalEnergy[i] >10){  // > FixedRelations.scaleWrestrictions_FINAL:3
        finTotalEnergy[i] = 10;  // > FixedRelations.scaleWrestrictions_FINAL:4
        }  // > FixedRelations.scaleWrestrictions_FINAL:5
      else if (finTotalEnergy[i] <0){  // > FixedRelations.scaleWrestrictions_FINAL:6
        if (i!=2){  // > FixedRelations.scaleWrestrictions_FINAL:7
          finTotalEnergy[i] = 0;  // > FixedRelations.scaleWrestrictions_FINAL:8
          }  // > FixedRelations.scaleWrestrictions_FINAL:9
        else if (i==2 && finTotalEnergy[i] < -10) {finTotalEnergy[i] =-10}  // > FixedRelations.scaleWrestrictions_FINAL:10
        }  // > FixedRelations.scaleWrestrictions_FINAL:11
      }  // > FixedRelations.scaleWrestrictions_FINAL:12
    // Restrict EtransOUT at O diagram //  // > FixedRelations.scaleWrestrictions_FINAL:13
    if (EtransOUT < 0){EtransOUT = 0}  // > FixedRelations.scaleWrestrictions_FINAL:14
      else if (EtransOUT > 10){EtransOUT = 10}  // > FixedRelations.scaleWrestrictions_FINAL:15
    if (dragEtransOUT < 0){dragEtransOUT = 0}  // > FixedRelations.scaleWrestrictions_FINAL:16
      else if (dragEtransOUT > 10){dragEtransOUT = 10}  // > FixedRelations.scaleWrestrictions_FINAL:17
    // Restrict EtransOUT2 at O diagram //  // > FixedRelations.scaleWrestrictions_FINAL:18
    if (EtransOUT2 < 0){EtransOUT2 = 0}  // > FixedRelations.scaleWrestrictions_FINAL:19
      else if (EtransOUT2 > 10){EtransOUT2 = 10}  // > FixedRelations.scaleWrestrictions_FINAL:20
    if (dragEtransOUT2 < 0){dragEtransOUT2 = 0}  // > FixedRelations.scaleWrestrictions_FINAL:21
      else if (dragEtransOUT2 > 10){dragEtransOUT2 = 10}  // > FixedRelations.scaleWrestrictions_FINAL:22
    // Restrict dragHelpers at L diagram //   // > FixedRelations.scaleWrestrictions_FINAL:23
    if (dragC2Y < 0){dragC2Y = 0}  // > FixedRelations.scaleWrestrictions_FINAL:24
    else if (dragC2Y > 10){dragC2Y = 10}  // > FixedRelations.scaleWrestrictions_FINAL:25
    if (dragE2Y < 0){dragE2Y = 0}  // > FixedRelations.scaleWrestrictions_FINAL:26
    else if (dragE2Y > 10){dragE2Y = 10}  // > FixedRelations.scaleWrestrictions_FINAL:27
    //if (dragG2Y < -10){dragG2Y = -10}  // G can go -ve till -10  // > FixedRelations.scaleWrestrictions_FINAL:28
    if (dragG2Y < 0){dragG2Y = 0}   // > FixedRelations.scaleWrestrictions_FINAL:29
    else if (dragG2Y > 10){dragG2Y = 10}  // > FixedRelations.scaleWrestrictions_FINAL:30
    if (dragI2Y < 0){dragI2Y = 0}  // > FixedRelations.scaleWrestrictions_FINAL:31
    else if (dragI2Y > 10){dragI2Y = 10}  // > FixedRelations.scaleWrestrictions_FINAL:32
    if (dragK2Y < 0){dragK2Y = 0}  // > FixedRelations.scaleWrestrictions_FINAL:33
    else if (dragK2Y > 10){dragK2Y = 10}  // > FixedRelations.scaleWrestrictions_FINAL:34
    if (dragN2Y < 0){dragN2Y = 0}  // > FixedRelations.scaleWrestrictions_FINAL:35
    else if (dragN2Y > 10){dragN2Y = 10}  // > FixedRelations.scaleWrestrictions_FINAL:36
  });

  _model.addToFixedRelations(function() {
    if (!__pagesEnabled["answer"]) return;
    C = iniTotalEnergy[0];  // > FixedRelations.answer:1
    E = iniTotalEnergy[1];  // > FixedRelations.answer:2
    G = iniTotalEnergy[2];  // > FixedRelations.answer:3
    I = iniTotalEnergy[3];  // > FixedRelations.answer:4
    K = iniTotalEnergy[4];  // > FixedRelations.answer:5
    N = iniTotalEnergy[5];  // > FixedRelations.answer:6
    fC = finTotalEnergy[0];  // > FixedRelations.answer:7
    fE = finTotalEnergy[1];  // > FixedRelations.answer:8
    fG = finTotalEnergy[2];  // > FixedRelations.answer:9
    fI = finTotalEnergy[3];  // > FixedRelations.answer:10
    fK = finTotalEnergy[4];  // > FixedRelations.answer:11
    fN = finTotalEnergy[5];  // > FixedRelations.answer:12
    answers1 ();  // > FixedRelations.answer:13
    //myOwnCode ()  // > FixedRelations.answer:14
  });

  _model.addToFixedRelations(function() {
    if (!__pagesEnabled["EnableToDebug"]) return;
    ////////////////////////////////////////////////////////  // > FixedRelations.EnableToDebug:1
    // To include Variables on PlottingPanel TR/TLMessage //  // > FixedRelations.EnableToDebug:2
    ////////////////////////////////////////////////////////  // > FixedRelations.EnableToDebug:3
    //debuggg = "";  // > FixedRelations.EnableToDebug:4
    debugggTR = "";  // > FixedRelations.EnableToDebug:5
    debugggTR += "EtransIN= "+EtransIN;  // > FixedRelations.EnableToDebug:6
    debugggTR += "\nEtransIN2= "+EtransIN2;  // > FixedRelations.EnableToDebug:7
    debugggTR += "\nEtransOUT= "+EtransOUT;  // > FixedRelations.EnableToDebug:8
    debugggTR += "\nEtransOUT2= "+EtransOUT2;  // > FixedRelations.EnableToDebug:9
    debugggTR += "\ndragCY= "+dragCY;  // > FixedRelations.EnableToDebug:10
    //debugggTR += "\ncheck3aEnergy= "+check3aEnergy;  // > FixedRelations.EnableToDebug:11
    //debugggTR += "\ncheck3bEnergy= "+check3bEnergy;  // > FixedRelations.EnableToDebug:12
    //debugggTR += "\nupdateTransIN= " + updateTransIN;  // > FixedRelations.EnableToDebug:13
    //debugggTR += "\nupdateTransIN2= " + updateTransIN2;  // > FixedRelations.EnableToDebug:14
    //debugggTR += "\nINenergyY= "+INenergyY;  // > FixedRelations.EnableToDebug:15
    //debugggTR += "\niniEnergiesLst= "+ [iniC, iniE, iniG, iniI, iniK, iniN];  // > FixedRelations.EnableToDebug:16
    //debugggTR += "\niniTotalEnergy= "+iniTotalEnergy;  // > FixedRelations.EnableToDebug:17
    //debugggTR += "\nfinTotalEnergy= "+finTotalEnergy;  // > FixedRelations.EnableToDebug:18
    //debugggTR += "\nfinalC= "+finalC;  // > FixedRelations.EnableToDebug:19
    //debugggTR += "\nfC= "+fC;  // > FixedRelations.EnableToDebug:20
    //debugggTR += "\ndisplayChemical= "+displayChemical;  // > FixedRelations.EnableToDebug:21
    //debugggTR += "\nisG= "+isG;  // > FixedRelations.EnableToDebug:22
    //debugggTR += "\nMath.ceil(Math.random() * 10)= "+ Math.ceil(Math.random() * 10);  // > FixedRelations.EnableToDebug:23
  });

  _model.addToFixedRelations(function() { _isPaused = _model.isPaused(); _isPlaying = _model.isPlaying(); });

    _model._fontResized = function(iBase,iSize,iDelta) {
      _view._fontResized(iBase,iSize,iDelta);
  }; // end of _fontResized

  function _getViews() {
    var _viewsInfo = [];
    var _counter = 0;
    _viewsInfo[_counter++] = { name : "HtmlView Page", width : 800, height : 600 };
    return _viewsInfo;
  } // end of _getViews

  function _selectView(_viewNumber) {
    _view = null;
    _view = new LOLMasterTemplateV7_View(_topFrame,_viewNumber,_libraryPath,_codebasePath);
    var _view_super_reset = _view._reset;
    _view._reset = function() {
      _view_super_reset();
      switch(_viewNumber) {
        case -10 : break; // make Lint happy
        default :
        case 0:
          _view.fullscreen.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'fullscreen'
          _view.answersTOEDIT.linkProperty("Background",  function() { return editBackgroundColor; }, function(_v) { editBackgroundColor = _v; } ); // HtmlView Page linking property 'Background' for element 'answersTOEDIT'
          _view.answersTOEDIT.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'answersTOEDIT'
          _view.answersTOEDIT.linkProperty("Display",  function() { return editing ?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'answersTOEDIT'
          _view.displayChemical.linkProperty("Checked",  function() { return displayChemical; }, function(_v) { displayChemical = _v; } ); // HtmlView Page linking property 'Checked' for element 'displayChemical'
          _view.displayChemical.setAction("OnCheckOff", function(_data,_info) {
  displayChemical = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'displayChemical'
          _view.displayChemical.setAction("OnChange", function(_data,_info) {
  isLastEnergyDisplayed();
  updateVariables();

}); // HtmlView Page setting action 'OnChange' for element 'displayChemical'
          _view.displayChemical.setAction("OnCheckOn", function(_data,_info) {
  displayChemical = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'displayChemical'
          _view.displayElastic.linkProperty("Checked",  function() { return displayElastic; }, function(_v) { displayElastic = _v; } ); // HtmlView Page linking property 'Checked' for element 'displayElastic'
          _view.displayElastic.setAction("OnCheckOff", function(_data,_info) {
  displayElastic = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'displayElastic'
          _view.displayElastic.setAction("OnChange", function(_data,_info) {
  isLastEnergyDisplayed();
  updateVariables();

}); // HtmlView Page setting action 'OnChange' for element 'displayElastic'
          _view.displayElastic.setAction("OnCheckOn", function(_data,_info) {
  displayElastic = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'displayElastic'
          _view.displayGravitational.linkProperty("Checked",  function() { return displayGravitational; }, function(_v) { displayGravitational = _v; } ); // HtmlView Page linking property 'Checked' for element 'displayGravitational'
          _view.displayGravitational.setAction("OnCheckOff", function(_data,_info) {
  displayGravitational = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'displayGravitational'
          _view.displayGravitational.setAction("OnChange", function(_data,_info) {
  isLastEnergyDisplayed();
  updateVariables();

}); // HtmlView Page setting action 'OnChange' for element 'displayGravitational'
          _view.displayGravitational.setAction("OnCheckOn", function(_data,_info) {
  displayGravitational = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'displayGravitational'
          _view.displayInternal.linkProperty("Checked",  function() { return displayInternal; }, function(_v) { displayInternal = _v; } ); // HtmlView Page linking property 'Checked' for element 'displayInternal'
          _view.displayInternal.setAction("OnCheckOff", function(_data,_info) {
  displayInternal = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'displayInternal'
          _view.displayInternal.setAction("OnChange", function(_data,_info) {
  isLastEnergyDisplayed();
  updateVariables();

}); // HtmlView Page setting action 'OnChange' for element 'displayInternal'
          _view.displayInternal.setAction("OnCheckOn", function(_data,_info) {
  displayInternal = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'displayInternal'
          _view.displayKinetic.linkProperty("Checked",  function() { return displayKinetic; }, function(_v) { displayKinetic = _v; } ); // HtmlView Page linking property 'Checked' for element 'displayKinetic'
          _view.displayKinetic.setAction("OnCheckOff", function(_data,_info) {
  displayKinetic = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'displayKinetic'
          _view.displayKinetic.setAction("OnChange", function(_data,_info) {
  isLastEnergyDisplayed();
  updateVariables();

}); // HtmlView Page setting action 'OnChange' for element 'displayKinetic'
          _view.displayKinetic.setAction("OnCheckOn", function(_data,_info) {
  displayKinetic = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'displayKinetic'
          _view.displayNuclear.linkProperty("Checked",  function() { return displayNuclear; }, function(_v) { displayNuclear = _v; } ); // HtmlView Page linking property 'Checked' for element 'displayNuclear'
          _view.displayNuclear.setAction("OnCheckOff", function(_data,_info) {
  displayNuclear = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'displayNuclear'
          _view.displayNuclear.setAction("OnChange", function(_data,_info) {
  isLastEnergyDisplayed();
  updateVariables();

}); // HtmlView Page setting action 'OnChange' for element 'displayNuclear'
          _view.displayNuclear.setAction("OnCheckOn", function(_data,_info) {
  displayNuclear = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'displayNuclear'
          _view.isC.linkProperty("Checked",  function() { return isC; }, function(_v) { isC = _v; } ); // HtmlView Page linking property 'Checked' for element 'isC'
          _view.isC.setAction("OnCheckOff", function(_data,_info) {
  isC = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'isC'
          _view.isC.linkProperty("Disabled",  function() { return physicsonly; }, function(_v) { physicsonly = _v; } ); // HtmlView Page linking property 'Disabled' for element 'isC'
          _view.isC.setAction("OnCheckOn", function(_data,_info) {
  isC = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'isC'
          _view.isC.linkProperty("Display",  function() { return displayChemical? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'isC'
          _view.isE.linkProperty("Checked",  function() { return isE; }, function(_v) { isE = _v; } ); // HtmlView Page linking property 'Checked' for element 'isE'
          _view.isE.setAction("OnCheckOff", function(_data,_info) {
  isE = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'isE'
          _view.isE.linkProperty("Disabled",  function() { return physicsonly; }, function(_v) { physicsonly = _v; } ); // HtmlView Page linking property 'Disabled' for element 'isE'
          _view.isE.setAction("OnCheckOn", function(_data,_info) {
  isE = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'isE'
          _view.isE.linkProperty("Display",  function() { return displayElastic? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'isE'
          _view.isG.linkProperty("Checked",  function() { return isG; }, function(_v) { isG = _v; } ); // HtmlView Page linking property 'Checked' for element 'isG'
          _view.isG.setAction("OnCheckOff", function(_data,_info) {
  isG = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'isG'
          _view.isG.linkProperty("Disabled",  function() { return physicsonly; }, function(_v) { physicsonly = _v; } ); // HtmlView Page linking property 'Disabled' for element 'isG'
          _view.isG.setAction("OnCheckOn", function(_data,_info) {
  isG = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'isG'
          _view.isG.linkProperty("Display",  function() { return displayGravitational? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'isG'
          _view.isI.linkProperty("Checked",  function() { return isI; }, function(_v) { isI = _v; } ); // HtmlView Page linking property 'Checked' for element 'isI'
          _view.isI.setAction("OnCheckOff", function(_data,_info) {
  isI = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'isI'
          _view.isI.linkProperty("Disabled",  function() { return physicsonly; }, function(_v) { physicsonly = _v; } ); // HtmlView Page linking property 'Disabled' for element 'isI'
          _view.isI.setAction("OnCheckOn", function(_data,_info) {
  isI = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'isI'
          _view.isI.linkProperty("Display",  function() { return displayInternal? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'isI'
          _view.isK.linkProperty("Checked",  function() { return isK; }, function(_v) { isK = _v; } ); // HtmlView Page linking property 'Checked' for element 'isK'
          _view.isK.setAction("OnCheckOff", function(_data,_info) {
  isK = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'isK'
          _view.isK.linkProperty("Disabled",  function() { return physicsonly; }, function(_v) { physicsonly = _v; } ); // HtmlView Page linking property 'Disabled' for element 'isK'
          _view.isK.setAction("OnCheckOn", function(_data,_info) {
  isK = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'isK'
          _view.isK.linkProperty("Display",  function() { return displayKinetic? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'isK'
          _view.isN.linkProperty("Checked",  function() { return isN; }, function(_v) { isN = _v; } ); // HtmlView Page linking property 'Checked' for element 'isN'
          _view.isN.setAction("OnCheckOff", function(_data,_info) {
  isN = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'isN'
          _view.isN.linkProperty("Disabled",  function() { return physicsonly; }, function(_v) { physicsonly = _v; } ); // HtmlView Page linking property 'Disabled' for element 'isN'
          _view.isN.setAction("OnCheckOn", function(_data,_info) {
  isN = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'isN'
          _view.isN.linkProperty("Display",  function() { return displayNuclear? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'isN'
          _view.zeroIN.linkProperty("Checked",  function() { return (check3a==false && check3b==false) ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'zeroIN'
          _view.zeroIN.setAction("OnCheckOn", function(_data,_info) {
  check3a = false;
  check3aEnergy = "";
  check3b = false;
  check3bEnergy = "";

}); // HtmlView Page setting action 'OnCheckOn' for element 'zeroIN'
          _view.oneIN.linkProperty("Checked",  function() { return (check3a==true && check3b==false) ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'oneIN'
          _view.oneIN.setAction("OnCheckOn", function(_data,_info) {
  check3a = true;
  check3b = false;
  check3bEnergy = "";

}); // HtmlView Page setting action 'OnCheckOn' for element 'oneIN'
          _view.twoIN.linkProperty("Checked",  function() { return (check3a==true && check3b==true) ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'twoIN'
          _view.twoIN.setAction("OnCheckOn", function(_data,_info) {
  check3a = true;
  check3b = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'twoIN'
          _view.check3a.linkProperty("Display",  function() { return check3a ? "":"none"; } ); // HtmlView Page linking property 'Display' for element 'check3a'
          _view.isPropagationIN.linkProperty("Checked",  function() { return check3aEnergy == "through propagation of waves" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isPropagationIN'
          _view.isPropagationIN.linkProperty("Text",  function() { return PropagationofWaves; }, function(_v) { PropagationofWaves = _v; } ); // HtmlView Page linking property 'Text' for element 'isPropagationIN'
          _view.isPropagationIN.linkProperty("Disabled",  function() { return check3bEnergy=="through propagation of waves" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isPropagationIN'
          _view.isPropagationIN.setAction("OnCheckOn", function(_data,_info) {
  check3aEnergy = "through propagation of waves";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isPropagationIN'
          _view.isMechanicIN.linkProperty("Checked",  function() { return check3aEnergy == "mechanically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isMechanicIN'
          _view.isMechanicIN.linkProperty("Text",  function() { return Mechanically; }, function(_v) { Mechanically = _v; } ); // HtmlView Page linking property 'Text' for element 'isMechanicIN'
          _view.isMechanicIN.linkProperty("Disabled",  function() { return check3bEnergy=="mechanically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isMechanicIN'
          _view.isMechanicIN.setAction("OnCheckOn", function(_data,_info) {
  check3aEnergy = "mechanically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isMechanicIN'
          _view.isHeatingIN.linkProperty("Checked",  function() { return check3aEnergy == "through heating" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isHeatingIN'
          _view.isHeatingIN.linkProperty("Disabled",  function() { return check3bEnergy=="through heating" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isHeatingIN'
          _view.isHeatingIN.setAction("OnCheckOn", function(_data,_info) {
  check3aEnergy = "through heating";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isHeatingIN'
          _view.isElectricIN.linkProperty("Checked",  function() { return check3aEnergy == "electrically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isElectricIN'
          _view.isElectricIN.linkProperty("Text",  function() { return Electrically; }, function(_v) { Electrically = _v; } ); // HtmlView Page linking property 'Text' for element 'isElectricIN'
          _view.isElectricIN.linkProperty("Disabled",  function() { return check3bEnergy=="electrically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isElectricIN'
          _view.isElectricIN.setAction("OnCheckOn", function(_data,_info) {
  check3aEnergy= "electrically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isElectricIN'
          _view.isChemicalIN.linkProperty("Checked",  function() { return check3aEnergy == "chemically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isChemicalIN'
          _view.isChemicalIN.linkProperty("Text",  function() { return physicsonly?"":"Chemically"; } ); // HtmlView Page linking property 'Text' for element 'isChemicalIN'
          _view.isChemicalIN.linkProperty("Disabled",  function() { return check3bEnergy=="chemically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isChemicalIN'
          _view.isChemicalIN.setAction("OnCheckOn", function(_data,_info) {
  check3aEnergy= "chemically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isChemicalIN'
          _view.isChemicalIN.linkProperty("Display",  function() { return physicsonly?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'isChemicalIN'
          _view.check3Areason.linkProperty("Value",  function() { return check3aReason; }, function(_v) { check3aReason = _v; } ); // HtmlView Page linking property 'Value' for element 'check3Areason'
          _view.check3Areason.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'check3Areason'
          _view.check3b.linkProperty("Display",  function() { return check3b ? "":"none"; } ); // HtmlView Page linking property 'Display' for element 'check3b'
          _view.isPropagationIN2.linkProperty("Checked",  function() { return check3bEnergy == "through propagation of waves" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isPropagationIN2'
          _view.isPropagationIN2.linkProperty("Text",  function() { return PropagationofWaves; }, function(_v) { PropagationofWaves = _v; } ); // HtmlView Page linking property 'Text' for element 'isPropagationIN2'
          _view.isPropagationIN2.linkProperty("Disabled",  function() { return check3aEnergy=="through propagation of waves" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isPropagationIN2'
          _view.isPropagationIN2.setAction("OnCheckOn", function(_data,_info) {
  check3bEnergy = "through propagation of waves";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isPropagationIN2'
          _view.isMechanicIN2.linkProperty("Checked",  function() { return check3bEnergy == "mechanically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isMechanicIN2'
          _view.isMechanicIN2.linkProperty("Text",  function() { return Mechanically; }, function(_v) { Mechanically = _v; } ); // HtmlView Page linking property 'Text' for element 'isMechanicIN2'
          _view.isMechanicIN2.linkProperty("Disabled",  function() { return check3aEnergy=="mechanically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isMechanicIN2'
          _view.isMechanicIN2.setAction("OnCheckOn", function(_data,_info) {
  check3bEnergy = "mechanically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isMechanicIN2'
          _view.isHeatingIN2.linkProperty("Checked",  function() { return check3bEnergy == "through heating" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isHeatingIN2'
          _view.isHeatingIN2.linkProperty("Disabled",  function() { return check3aEnergy=="through heating" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isHeatingIN2'
          _view.isHeatingIN2.setAction("OnCheckOn", function(_data,_info) {
  check3bEnergy = "through heating";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isHeatingIN2'
          _view.isElectricIN2.linkProperty("Checked",  function() { return (check3b && check3bEnergy!="electrically") ? false:true; } ); // HtmlView Page linking property 'Checked' for element 'isElectricIN2'
          _view.isElectricIN2.linkProperty("Text",  function() { return Electrically; }, function(_v) { Electrically = _v; } ); // HtmlView Page linking property 'Text' for element 'isElectricIN2'
          _view.isElectricIN2.linkProperty("Disabled",  function() { return check3aEnergy=="electrically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isElectricIN2'
          _view.isElectricIN2.setAction("OnCheckOn", function(_data,_info) {
  check3bEnergy = "electrically"
  //(check3aEnergy=="electrically") ?"true":"false";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isElectricIN2'
          _view.isChemicalIN2.linkProperty("Checked",  function() { return (check3b && check3bEnergy!="chemically") ? false:true; } ); // HtmlView Page linking property 'Checked' for element 'isChemicalIN2'
          _view.isChemicalIN2.linkProperty("Text",  function() { return physicsonly?"":"Chemically"; } ); // HtmlView Page linking property 'Text' for element 'isChemicalIN2'
          _view.isChemicalIN2.linkProperty("Disabled",  function() { return check3aEnergy=="chemically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isChemicalIN2'
          _view.isChemicalIN2.setAction("OnCheckOn", function(_data,_info) {
  check3bEnergy = "chemically"
  //(check3aEnergy=="electrically") ?"true":"false";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isChemicalIN2'
          _view.isChemicalIN2.linkProperty("Display",  function() { return physicsonly?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'isChemicalIN2'
          _view.check3Breason.linkProperty("Value",  function() { return check3bReason; }, function(_v) { check3bReason = _v; } ); // HtmlView Page linking property 'Value' for element 'check3Breason'
          _view.check3Breason.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'check3Breason'
          _view.zeroOUT.linkProperty("Checked",  function() { return (check4a==false && check4b==false) ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'zeroOUT'
          _view.zeroOUT.setAction("OnCheckOn", function(_data,_info) {
  check4a = false;
  check4aEnergy = "";
  check4b = false;
  check4bEnergy = "";

}); // HtmlView Page setting action 'OnCheckOn' for element 'zeroOUT'
          _view.oneOUT.linkProperty("Checked",  function() { return (check4a==true && check4b==false) ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'oneOUT'
          _view.oneOUT.setAction("OnCheckOn", function(_data,_info) {
  check4a = true;
  check4b = false;
  check4bEnergy = "";

}); // HtmlView Page setting action 'OnCheckOn' for element 'oneOUT'
          _view.twoOUT.linkProperty("Checked",  function() { return (check4a==true && check4b==true) ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'twoOUT'
          _view.twoOUT.setAction("OnCheckOn", function(_data,_info) {
  check4a = true;
  check4b = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'twoOUT'
          _view.check4a.linkProperty("Display",  function() { return check4a ? "":"none"; } ); // HtmlView Page linking property 'Display' for element 'check4a'
          _view.isPropagationOUT.linkProperty("Checked",  function() { return check4aEnergy == "through propagation of waves" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isPropagationOUT'
          _view.isPropagationOUT.linkProperty("Text",  function() { return PropagationofWaves; }, function(_v) { PropagationofWaves = _v; } ); // HtmlView Page linking property 'Text' for element 'isPropagationOUT'
          _view.isPropagationOUT.linkProperty("Disabled",  function() { return check4bEnergy=="through propagation of waves" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isPropagationOUT'
          _view.isPropagationOUT.setAction("OnCheckOn", function(_data,_info) {
  check4aEnergy = "through propagation of waves";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isPropagationOUT'
          _view.isMechanicOUT.linkProperty("Checked",  function() { return check4aEnergy == "mechanically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isMechanicOUT'
          _view.isMechanicOUT.linkProperty("Text",  function() { return Mechanically; }, function(_v) { Mechanically = _v; } ); // HtmlView Page linking property 'Text' for element 'isMechanicOUT'
          _view.isMechanicOUT.linkProperty("Disabled",  function() { return check4bEnergy=="mechanically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isMechanicOUT'
          _view.isMechanicOUT.setAction("OnCheckOn", function(_data,_info) {
  check4aEnergy = "mechanically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isMechanicOUT'
          _view.isHeatingOUT.linkProperty("Checked",  function() { return check4aEnergy == "through heating" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isHeatingOUT'
          _view.isHeatingOUT.linkProperty("Disabled",  function() { return check4bEnergy=="through heating" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isHeatingOUT'
          _view.isHeatingOUT.setAction("OnCheckOn", function(_data,_info) {
  check4aEnergy = "through heating";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isHeatingOUT'
          _view.isElectricOUT.linkProperty("Checked",  function() { return check4aEnergy == "electrically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isElectricOUT'
          _view.isElectricOUT.linkProperty("Text",  function() { return Electrically; }, function(_v) { Electrically = _v; } ); // HtmlView Page linking property 'Text' for element 'isElectricOUT'
          _view.isElectricOUT.linkProperty("Disabled",  function() { return check4bEnergy=="electrically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isElectricOUT'
          _view.isElectricOUT.setAction("OnCheckOn", function(_data,_info) {
  check4aEnergy = "electrically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isElectricOUT'
          _view.isChemicalOUT.linkProperty("Checked",  function() { return check4aEnergy == "chemically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isChemicalOUT'
          _view.isChemicalOUT.linkProperty("Text",  function() { return physicsonly?"":"Chemically"; } ); // HtmlView Page linking property 'Text' for element 'isChemicalOUT'
          _view.isChemicalOUT.linkProperty("Disabled",  function() { return check4bEnergy=="chemically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isChemicalOUT'
          _view.isChemicalOUT.setAction("OnCheckOn", function(_data,_info) {
  check4aEnergy = "chemically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isChemicalOUT'
          _view.isChemicalOUT.linkProperty("Display",  function() { return physicsonly?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'isChemicalOUT'
          _view.check4Areason.linkProperty("Value",  function() { return check4aReason; }, function(_v) { check4aReason = _v; } ); // HtmlView Page linking property 'Value' for element 'check4Areason'
          _view.check4Areason.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'check4Areason'
          _view.check4b.linkProperty("Display",  function() { return check4b ? "":"none"; } ); // HtmlView Page linking property 'Display' for element 'check4b'
          _view.isPropagationOUT2.linkProperty("Checked",  function() { return check4bEnergy == "through propagation of waves" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isPropagationOUT2'
          _view.isPropagationOUT2.linkProperty("Text",  function() { return PropagationofWaves; }, function(_v) { PropagationofWaves = _v; } ); // HtmlView Page linking property 'Text' for element 'isPropagationOUT2'
          _view.isPropagationOUT2.linkProperty("Disabled",  function() { return check4aEnergy=="through propagation of waves" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isPropagationOUT2'
          _view.isPropagationOUT2.setAction("OnCheckOn", function(_data,_info) {
  check4bEnergy = "through propagation of waves";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isPropagationOUT2'
          _view.isMechanicOUT2.linkProperty("Checked",  function() { return check4bEnergy == "mechanically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isMechanicOUT2'
          _view.isMechanicOUT2.linkProperty("Text",  function() { return Mechanically; }, function(_v) { Mechanically = _v; } ); // HtmlView Page linking property 'Text' for element 'isMechanicOUT2'
          _view.isMechanicOUT2.linkProperty("Disabled",  function() { return check4aEnergy=="mechanically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isMechanicOUT2'
          _view.isMechanicOUT2.setAction("OnCheckOn", function(_data,_info) {
  check4bEnergy = "mechanically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isMechanicOUT2'
          _view.isHeatingOUT2.linkProperty("Checked",  function() { return check4bEnergy == "through heating" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isHeatingOUT2'
          _view.isHeatingOUT2.linkProperty("Disabled",  function() { return check4aEnergy=="through heating" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isHeatingOUT2'
          _view.isHeatingOUT2.setAction("OnCheckOn", function(_data,_info) {
  check4bEnergy = "through heating";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isHeatingOUT2'
          _view.isElectricOUT2.linkProperty("Checked",  function() { return (check4b && check4bEnergy!="electrically") ? false:true; } ); // HtmlView Page linking property 'Checked' for element 'isElectricOUT2'
          _view.isElectricOUT2.linkProperty("Text",  function() { return Electrically; }, function(_v) { Electrically = _v; } ); // HtmlView Page linking property 'Text' for element 'isElectricOUT2'
          _view.isElectricOUT2.linkProperty("Disabled",  function() { return check4aEnergy=="electrically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isElectricOUT2'
          _view.isElectricOUT2.setAction("OnCheckOn", function(_data,_info) {
  check4bEnergy = "electrically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isElectricOUT2'
          _view.isChemicalOUT2.linkProperty("Checked",  function() { return check4bEnergy == "chemically" ? true:false; } ); // HtmlView Page linking property 'Checked' for element 'isChemicalOUT2'
          _view.isChemicalOUT2.linkProperty("Text",  function() { return physicsonly?"":"Chemically"; } ); // HtmlView Page linking property 'Text' for element 'isChemicalOUT2'
          _view.isChemicalOUT2.linkProperty("Disabled",  function() { return check4aEnergy=="chemically" ?true:false; } ); // HtmlView Page linking property 'Disabled' for element 'isChemicalOUT2'
          _view.isChemicalOUT2.setAction("OnCheckOn", function(_data,_info) {
  check4bEnergy = "chemically";

}); // HtmlView Page setting action 'OnCheckOn' for element 'isChemicalOUT2'
          _view.isChemicalOUT2.linkProperty("Display",  function() { return physicsonly?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'isChemicalOUT2'
          _view.check4Breason.linkProperty("Value",  function() { return check4bReason; }, function(_v) { check4bReason = _v; } ); // HtmlView Page linking property 'Value' for element 'check4Breason'
          _view.iniC.linkProperty("Checked",  function() { return iniC; }, function(_v) { iniC = _v; } ); // HtmlView Page linking property 'Checked' for element 'iniC'
          _view.iniC.setAction("OnCheckOff", function(_data,_info) {
  iniC = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'iniC'
          _view.iniC.setAction("OnCheckOn", function(_data,_info) {
  iniC = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'iniC'
          _view.iniC.linkProperty("Display",  function() { return displayChemical? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'iniC'
          _view.iniE.linkProperty("Checked",  function() { return iniE; }, function(_v) { iniE = _v; } ); // HtmlView Page linking property 'Checked' for element 'iniE'
          _view.iniE.setAction("OnCheckOff", function(_data,_info) {
  iniE = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'iniE'
          _view.iniE.setAction("OnCheckOn", function(_data,_info) {
  iniE = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'iniE'
          _view.iniE.linkProperty("Display",  function() { return displayElastic? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'iniE'
          _view.iniG.linkProperty("Checked",  function() { return iniG; }, function(_v) { iniG = _v; } ); // HtmlView Page linking property 'Checked' for element 'iniG'
          _view.iniG.setAction("OnCheckOff", function(_data,_info) {
  iniG = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'iniG'
          _view.iniG.setAction("OnCheckOn", function(_data,_info) {
  iniG = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'iniG'
          _view.iniG.linkProperty("Display",  function() { return displayGravitational? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'iniG'
          _view.iniI.linkProperty("Checked",  function() { return iniI; }, function(_v) { iniI = _v; } ); // HtmlView Page linking property 'Checked' for element 'iniI'
          _view.iniI.setAction("OnCheckOff", function(_data,_info) {
  iniI = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'iniI'
          _view.iniI.setAction("OnCheckOn", function(_data,_info) {
  iniI = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'iniI'
          _view.iniI.linkProperty("Display",  function() { return displayInternal? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'iniI'
          _view.iniK.linkProperty("Checked",  function() { return iniK; }, function(_v) { iniK = _v; } ); // HtmlView Page linking property 'Checked' for element 'iniK'
          _view.iniK.setAction("OnCheckOff", function(_data,_info) {
  iniK = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'iniK'
          _view.iniK.setAction("OnCheckOn", function(_data,_info) {
  iniK = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'iniK'
          _view.iniK.linkProperty("Display",  function() { return displayKinetic? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'iniK'
          _view.iniN.linkProperty("Checked",  function() { return iniN; }, function(_v) { iniN = _v; } ); // HtmlView Page linking property 'Checked' for element 'iniN'
          _view.iniN.setAction("OnCheckOff", function(_data,_info) {
  iniN = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'iniN'
          _view.iniN.setAction("OnCheckOn", function(_data,_info) {
  iniN = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'iniN'
          _view.iniN.linkProperty("Display",  function() { return displayNuclear? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'iniN'
          _view.finC.linkProperty("Checked",  function() { return finC; }, function(_v) { finC = _v; } ); // HtmlView Page linking property 'Checked' for element 'finC'
          _view.finC.setAction("OnCheckOff", function(_data,_info) {
  finC = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'finC'
          _view.finC.setAction("OnCheckOn", function(_data,_info) {
  finC = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'finC'
          _view.finC.linkProperty("Display",  function() { return displayChemical? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'finC'
          _view.finE.linkProperty("Checked",  function() { return finE; }, function(_v) { finE = _v; } ); // HtmlView Page linking property 'Checked' for element 'finE'
          _view.finE.setAction("OnCheckOff", function(_data,_info) {
  finE = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'finE'
          _view.finE.setAction("OnCheckOn", function(_data,_info) {
  finE = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'finE'
          _view.finE.linkProperty("Display",  function() { return displayElastic? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'finE'
          _view.finG.linkProperty("Checked",  function() { return finG; }, function(_v) { finG = _v; } ); // HtmlView Page linking property 'Checked' for element 'finG'
          _view.finG.setAction("OnCheckOff", function(_data,_info) {
  finG = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'finG'
          _view.finG.setAction("OnCheckOn", function(_data,_info) {
  finG = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'finG'
          _view.finG.linkProperty("Display",  function() { return displayGravitational? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'finG'
          _view.finI.linkProperty("Checked",  function() { return finI; }, function(_v) { finI = _v; } ); // HtmlView Page linking property 'Checked' for element 'finI'
          _view.finI.setAction("OnCheckOff", function(_data,_info) {
  finI = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'finI'
          _view.finI.setAction("OnCheckOn", function(_data,_info) {
  finI = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'finI'
          _view.finI.linkProperty("Display",  function() { return displayInternal? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'finI'
          _view.finK.linkProperty("Checked",  function() { return finK; }, function(_v) { finK = _v; } ); // HtmlView Page linking property 'Checked' for element 'finK'
          _view.finK.setAction("OnCheckOff", function(_data,_info) {
  finK = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'finK'
          _view.finK.setAction("OnCheckOn", function(_data,_info) {
  finK = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'finK'
          _view.finK.linkProperty("Display",  function() { return displayKinetic? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'finK'
          _view.finN.linkProperty("Checked",  function() { return finN; }, function(_v) { finN = _v; } ); // HtmlView Page linking property 'Checked' for element 'finN'
          _view.finN.setAction("OnCheckOff", function(_data,_info) {
  finN = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'finN'
          _view.finN.setAction("OnCheckOn", function(_data,_info) {
  finN = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'finN'
          _view.finN.linkProperty("Display",  function() { return displayNuclear? "inline":"none"; } ); // HtmlView Page linking property 'Display' for element 'finN'
          _view.check7words.setAction("OnClick", function(_data,_info) {
  // (<, >, 2×=, =2×);

}); // HtmlView Page setting action 'OnClick' for element 'check7words'
          _view.No.linkProperty("Checked",  function() { return !check7a; } ); // HtmlView Page linking property 'Checked' for element 'No'
          _view.No.setAction("OnCheckOn", function(_data,_info) {
  check7a = false;

}); // HtmlView Page setting action 'OnCheckOn' for element 'No'
          _view.Yes.linkProperty("Checked",  function() { return check7a; }, function(_v) { check7a = _v; } ); // HtmlView Page linking property 'Checked' for element 'Yes'
          _view.Yes.setAction("OnCheckOn", function(_data,_info) {
  check7a = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'Yes'
          _view.runCodeButton.setAction("OnClick", function(_data,_info) {
  runUserCode("Error in code, please check.\nRefresh the page if you need to restart.");

}); // HtmlView Page setting action 'OnClick' for element 'runCodeButton'
          _view.runCodeButton.linkProperty("Display",  function() { return check7a ?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'runCodeButton'
          _view.check7a.linkProperty("Display",  function() { return check7a ?"":"none"; } ); // HtmlView Page linking property 'Display' for element 'check7a'
          _view.userCode.setAction("OnChange", function(_data,_info) {
  runUserCode("Error in code, please check.");
  ///////////////
  // REFERENCE //
  ///////////////
  /*
  var userPlay = _view.autoplayTextAreaMgeneral.getValue();
   try {
   eval(userPlay);
   //xgeneral=numeric.dot(matrix_invert(Mgeneral),bgeneral);
  det(M);
  }
  catch(error) {
    _tools.showOkCancelDialog("you can define your own variables. There should be an output for the solution I, or that could be some error in code, try again!");
    }
  */;

}); // HtmlView Page setting action 'OnChange' for element 'userCode'
          _view.downloadButton.setAction("OnClick", function(_data,_info) {
  var records = {};
  ////////////////////////////////////////////
  // data to be loaded into export & import //
  ////////////////////////////////////////////
  // Setting: //
  records['systemText2'] = systemText2
  records['initialState2'] = initialState2
  records['finalState2'] = finalState2
  records['remarks2'] = remarks2
  records['show2D']= show2D //lookang
  records['show3D']= show3D //lookang
  records['revealRadioButton'] = revealRadioButton //lookang
  //check 1 fixed by lookang 20240624
  records['displayChemical'] = displayChemical
  records['displayElastic'] = displayElastic
  records['displayGravitational'] = displayGravitational
  records['displayInternal'] = displayInternal
  records['displayKinetic'] = displayKinetic
  records['displayNuclear'] = displayNuclear
  // check2 - ignoring of energy: //
  records['isC'] = isC
  records['isE'] = isE
  records['isG'] = isG
  records['isI'] = isI
  records['isK'] = isK
  records['isN'] = isN
  records['ignoreEnergyLst'] = ignoreEnergyLst
  // check3/4 - Transferable Energy: //
  records['check3a'] = check3a
  records['check3b'] = check3b
  records['check4a'] = check4a
  records['check4b'] = check4b
  records['check3aEnergy'] = check3aEnergy
  records['check3bEnergy'] = check3bEnergy
  records['check4aEnergy'] = check4aEnergy
  records['check4bEnergy'] = check4bEnergy
  records['check3aReason'] = check3aReason
  records['check3bReason'] = check3bReason
  records['check4aReason'] = check4aReason
  records['check4bReason'] = check4bReason
  // check5 - initial state energy: //
  records['iniC'] = iniC
  records['iniE'] = iniE
  records['iniG'] = iniG
  records['iniI'] = iniI
  records['iniK'] = iniK
  records['iniN'] = iniN
  // check6 - final state energy: //
  records['finC'] = finC
  records['finE'] = finE
  records['finG'] = finG
  records['finI'] = finI
  records['finK'] = finK
  records['finN'] = finN
  // check7 - formula: //
  records['check7a'] = check7a
  records['finalC'] = finalC
  records['finalE'] = finalE
  records['finalG'] = finalG
  records['finalI'] = finalI
  records['finalK'] = finalK
  records['finalN'] = finalN
  records['passfail'] = passfail
  records['inequalityCheckLst'] = inequalityCheckLst
  records['userPlay'] = userPlay
  // ... to be continued ...
  exportGraph(records).then(onGraphExportComplete);

}); // HtmlView Page setting action 'OnClick' for element 'downloadButton'
          _view.masterPanel.linkProperty("Width",  function() { return editing ?"65%":"100%"; } ); // HtmlView Page linking property 'Width' for element 'masterPanel'
          _view.setting.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'setting'
          _view.MAster.linkProperty("Display",  function() { return editing?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'MAster'
          _view.showNone.setAction("OnCheckOn", function(_data,_info) {
  show2D = false;
  show3D = false;
  energyColour="rgba(0,200,255,1.0)";

}); // HtmlView Page setting action 'OnCheckOn' for element 'showNone'
          _view.showNone.linkProperty("Display",  function() { return editing?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'showNone'
          _view.show2D.linkProperty("Checked",  function() { return show2D; }, function(_v) { show2D = _v; } ); // HtmlView Page linking property 'Checked' for element 'show2D'
          _view.show2D.setAction("OnCheckOff", function(_data,_info) {
  /*
  show2D = false;
  show3D = true;
  */;

}); // HtmlView Page setting action 'OnCheckOff' for element 'show2D'
          _view.show2D.setAction("OnCheckOn", function(_data,_info) {
  show2D = true;
  show3D = false;
  energyColour="rgba(0,200,255,1.0)";

}); // HtmlView Page setting action 'OnCheckOn' for element 'show2D'
          _view.show2D.linkProperty("Display",  function() { return editing?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'show2D'
          _view.show3D.linkProperty("Checked",  function() { return show3D; }, function(_v) { show3D = _v; } ); // HtmlView Page linking property 'Checked' for element 'show3D'
          _view.show3D.setAction("OnCheckOff", function(_data,_info) {
  /*
  show3D = false;
  show2D = true;
  */;

}); // HtmlView Page setting action 'OnCheckOff' for element 'show3D'
          _view.show3D.setAction("OnCheckOn", function(_data,_info) {
  show3D = true;
  show2D = false;
  //energyColour = "White";
  energyColour="rgba(255,150,0,1.0)";  // orange;

}); // HtmlView Page setting action 'OnCheckOn' for element 'show3D'
          _view.show3D.linkProperty("Display",  function() { return editing?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'show3D'
          _view.title.linkProperty("Text",  function() { return title; }, function(_v) { title = _v; } ); // HtmlView Page linking property 'Text' for element 'title'
          _view.scenarios.linkProperty("Options",  function() { return versions; }, function(_v) { versions = _v; } ); // HtmlView Page linking property 'Options' for element 'scenarios'
          _view.scenarios.setAction("OnChange", function(_data,_info) {
  // versions = ["Blank Version",  "Scenario 1",  "---To Add On---"]
  var opts = _view.scenarios.getProperty("SelectedOptions");  // array of options
  var option = (opts.length > 0)? opts[0]:""; // selected option 
      
  // use option == ""
  if (option=="Blank Version"){
    editing = true;
    }
    
  if (option=="Scenario 1"){
    editing = false;
    }

}); // HtmlView Page setting action 'OnChange' for element 'scenarios'
          _view.showAnswer.setAction("OnCheckOff", function(_data,_info) {
  showAnswer = false;

}); // HtmlView Page setting action 'OnCheckOff' for element 'showAnswer'
          _view.showAnswer.linkProperty("Disabled",  function() { return editing; }, function(_v) { editing = _v; } ); // HtmlView Page linking property 'Disabled' for element 'showAnswer'
          _view.showAnswer.setAction("OnCheckOn", function(_data,_info) {
  showAnswer = true;

}); // HtmlView Page setting action 'OnCheckOn' for element 'showAnswer'
          _view.EditAnswer.setAction("OffClick", function(_data,_info) {
  editing = false;

}); // HtmlView Page setting action 'OffClick' for element 'EditAnswer'
          _view.EditAnswer.linkProperty("State",  function() { return !editing; } ); // HtmlView Page linking property 'State' for element 'EditAnswer'
          _view.EditAnswer.setAction("OnClick", function(_data,_info) {
  editing = true
  alert("Scroll down to see the conditions to get the answers!");

}); // HtmlView Page setting action 'OnClick' for element 'EditAnswer'
          _view.checkBox.linkProperty("Checked",  function() { return revealRadioButton; }, function(_v) { revealRadioButton = _v; } ); // HtmlView Page linking property 'Checked' for element 'checkBox'
          _view.checkBox.linkProperty("Background",  function() { return editBackgroundColor; }, function(_v) { editBackgroundColor = _v; } ); // HtmlView Page linking property 'Background' for element 'checkBox'
          _view.checkBox.linkProperty("Display",  function() { return editing?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'checkBox'
          _view.revealBtn.setAction("OnClick", function(_data,_info) {
  EJSS_INTERFACE.BoxPanel.showOkCancelDialog("⚠️Warning! Your work will be erased and a possible solution will be shown.⚠️Simulation loads longer when there are too many of external conditions applied.⚠️Proceed or Cancel?",
    function()  {// User click OK  
      revealSolution();
      _update();
      },
    function(){  // User click Cancel
      // Nothing happens :)
      });
  //revealSolution();

}); // HtmlView Page setting action 'OnClick' for element 'revealBtn'
          _view.revealBtn.linkProperty("Display",  function() { return revealRadioButton?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'revealBtn'
          _view.hintButton.setAction("OnPress", function(_data,_info) {
  alert("Hint1:\nConsider the principle of conservation of energy.");

}); // HtmlView Page setting action 'OnPress' for element 'hintButton'
          _view.systemBolded.linkProperty("Text",  function() { return systemText; }, function(_v) { systemText = _v; } ); // HtmlView Page linking property 'Text' for element 'systemBolded'
          _view.system2.linkProperty("Text",  function() { return systemText2; }, function(_v) { systemText2 = _v; } ); // HtmlView Page linking property 'Text' for element 'system2'
          _view.system2.linkProperty("Display",  function() { return editing ?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'system2'
          _view.system_textField.linkProperty("Background",  function() { return editBackgroundColor; }, function(_v) { editBackgroundColor = _v; } ); // HtmlView Page linking property 'Background' for element 'system_textField'
          _view.system_textField.linkProperty("Value",  function() { return systemText2; }, function(_v) { systemText2 = _v; } ); // HtmlView Page linking property 'Value' for element 'system_textField'
          _view.system_textField.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'system_textField'
          _view.system_textField.linkProperty("Display",  function() { return editing ?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'system_textField'
          _view.remarks.linkProperty("Text",  function() { return remarks; }, function(_v) { remarks = _v; } ); // HtmlView Page linking property 'Text' for element 'remarks'
          _view.finalState22.linkProperty("Text",  function() { return remarks2; }, function(_v) { remarks2 = _v; } ); // HtmlView Page linking property 'Text' for element 'finalState22'
          _view.finalState22.linkProperty("Display",  function() { return editing ?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'finalState22'
          _view.remarks_textField.linkProperty("Background",  function() { return editBackgroundColor; }, function(_v) { editBackgroundColor = _v; } ); // HtmlView Page linking property 'Background' for element 'remarks_textField'
          _view.remarks_textField.linkProperty("Value",  function() { return remarks2; }, function(_v) { remarks2 = _v; } ); // HtmlView Page linking property 'Value' for element 'remarks_textField'
          _view.remarks_textField.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'remarks_textField'
          _view.remarks_textField.linkProperty("Display",  function() { return editing ?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'remarks_textField'
          _view.initialState.linkProperty("Text",  function() { return initialState; }, function(_v) { initialState = _v; } ); // HtmlView Page linking property 'Text' for element 'initialState'
          _view.initialState2.linkProperty("Text",  function() { return initialState2; }, function(_v) { initialState2 = _v; } ); // HtmlView Page linking property 'Text' for element 'initialState2'
          _view.initialState2.linkProperty("Display",  function() { return editing ?"none":"block"; } ); // HtmlView Page linking property 'Display' for element 'initialState2'
          _view.initialState_textField.linkProperty("Background",  function() { return editBackgroundColor; }, function(_v) { editBackgroundColor = _v; } ); // HtmlView Page linking property 'Background' for element 'initialState_textField'
          _view.initialState_textField.linkProperty("Value",  function() { return initialState2; }, function(_v) { initialState2 = _v; } ); // HtmlView Page linking property 'Value' for element 'initialState_textField'
          _view.initialState_textField.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'initialState_textField'
          _view.initialState_textField.linkProperty("Display",  function() { return editing ?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'initialState_textField'
          _view.finalState.linkProperty("Text",  function() { return finalState; }, function(_v) { finalState = _v; } ); // HtmlView Page linking property 'Text' for element 'finalState'
          _view.finalState2.linkProperty("Text",  function() { return finalState2; }, function(_v) { finalState2 = _v; } ); // HtmlView Page linking property 'Text' for element 'finalState2'
          _view.finalState2.linkProperty("Display",  function() { return editing ?"none":"block"; } ); // HtmlView Page linking property 'Display' for element 'finalState2'
          _view.finalState_textField.linkProperty("Background",  function() { return editBackgroundColor; }, function(_v) { editBackgroundColor = _v; } ); // HtmlView Page linking property 'Background' for element 'finalState_textField'
          _view.finalState_textField.linkProperty("Value",  function() { return finalState2; }, function(_v) { finalState2 = _v; } ); // HtmlView Page linking property 'Value' for element 'finalState_textField'
          _view.finalState_textField.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'finalState_textField'
          _view.finalState_textField.linkProperty("Display",  function() { return editing ?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'finalState_textField'
          _view.IN.linkProperty("Display",  function() { return check3a?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'IN'
          _view.energyTypeIN.linkProperty("Options",  function() { return physicsonly?["- Tin₁ -","Propagation of waves","Mechanically","Heating","Electrically"]:["- Tin₁ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; } ); // HtmlView Page linking property 'Options' for element 'energyTypeIN'
          _view.energyTypeIN.setAction("OnChange", function(_data,_info) {
  var opts = _view.energyTypeIN.getProperty("SelectedOptions");  // array of options
      var option = (opts.length > 0)? opts[0]:""; // selected option 
      
  //transIN == ["- Tin₁ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]
  if (option == "- Tin₁ -"){updateTransIN = 0};
  if (option == "Propagation of waves"){updateTransIN = 1};
  if (option == "Mechanically"){updateTransIN = 2};
  if (option == "Heating"){updateTransIN = 3};
  if (option == "Electrically"){updateTransIN = 4};
  if (option == "Chemically"){updateTransIN = 5};

}); // HtmlView Page setting action 'OnChange' for element 'energyTypeIN'
          _view.energyTypeIN.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'energyTypeIN'
          _view.field.linkProperty("Value",  function() { return EtransIN; }, function(_v) { EtransIN = _v; } ); // HtmlView Page linking property 'Value' for element 'field'
          _view.field.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'field'
          _view.OUT.linkProperty("Display",  function() { return check4a?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'OUT'
          _view.energyTypeOUT.linkProperty("Options",  function() { return physicsonly?["- Tout₁ -","Propagation of waves","Mechanically","Heating","Electrically"]:["- Tout₁ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; } ); // HtmlView Page linking property 'Options' for element 'energyTypeOUT'
          _view.energyTypeOUT.setAction("OnChange", function(_data,_info) {
  var opts = _view.energyTypeOUT.getProperty("SelectedOptions");  // array of options
      var option = (opts.length > 0)? opts[0]:""; // selected option 
      
  //updateTransOUT == ["- Tout₁ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]
  if (option == "- Tout₁ -"){updateTransOUT = 0};
  if (option == "Propagation of waves"){updateTransOUT = 1};
  if (option == "Mechanically"){updateTransOUT = 2};
  if (option == "Heating"){updateTransOUT = 3};
  if (option == "Electrically"){updateTransOUT = 4};
  if (option == "Chemically"){updateTransOUT = 5};

}); // HtmlView Page setting action 'OnChange' for element 'energyTypeOUT'
          _view.energyTypeOUT.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'energyTypeOUT'
          _view.field2.linkProperty("Value",  function() { return EtransOUT; }, function(_v) { EtransOUT = _v; } ); // HtmlView Page linking property 'Value' for element 'field2'
          _view.field2.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'field2'
          _view.IN2.linkProperty("Display",  function() { return check3b?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'IN2'
          _view.energyTypeIN2.linkProperty("Options",  function() { return physicsonly?["- Tin₂ -","Propagation of waves","Mechanically","Heating","Electrically"]:["- Tin₂ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; } ); // HtmlView Page linking property 'Options' for element 'energyTypeIN2'
          _view.energyTypeIN2.setAction("OnChange", function(_data,_info) {
  var opts = _view.energyTypeIN2.getProperty("SelectedOptions");  // array of options
      var option = (opts.length > 0)? opts[0]:""; // selected option 
      
  //transIN2 == ["- Tin₂ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]
  if (option == "- Tin₂ -"){updateTransIN2 = 0};
  if (option == "Propagation of waves"){updateTransIN2 = 1};
  if (option == "Mechanically"){updateTransIN2 = 2};
  if (option == "Heating"){updateTransIN2 = 3};
  if (option == "Electrically"){updateTransIN2 = 4};
  if (option == "Chemically"){updateTransIN2 = 5};

}); // HtmlView Page setting action 'OnChange' for element 'energyTypeIN2'
          _view.energyTypeIN2.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'energyTypeIN2'
          _view.field3.linkProperty("Value",  function() { return EtransIN2; }, function(_v) { EtransIN2 = _v; } ); // HtmlView Page linking property 'Value' for element 'field3'
          _view.field3.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'field3'
          _view.OUT2.linkProperty("Display",  function() { return check4b?"inline-block":"none"; } ); // HtmlView Page linking property 'Display' for element 'OUT2'
          _view.energyTypeOUT2.linkProperty("Options",  function() { return physicsonly?["- Tout₂ -","Propagation of waves","Mechanically","Heating","Electrically"]:["- Tout₂ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]; } ); // HtmlView Page linking property 'Options' for element 'energyTypeOUT2'
          _view.energyTypeOUT2.setAction("OnChange", function(_data,_info) {
  var opts = _view.energyTypeOUT2.getProperty("SelectedOptions");  // array of options
      var option = (opts.length > 0)? opts[0]:""; // selected option 
      
  //updateTransOUT == ["- Tout₂ -","Propagation of waves","Mechanically","Heating","Electrically","Chemically"]
  if (option == "- Tout₂ -"){updateTransOUT2 = 0};
  if (option == "Propagation of waves"){updateTransOUT2 = 1};
  if (option == "Mechanically"){updateTransOUT2 = 2};
  if (option == "Heating"){updateTransOUT2 = 3};
  if (option == "Electrically"){updateTransOUT2 = 4};
  if (option == "Chemically"){updateTransOUT2 = 5};

}); // HtmlView Page setting action 'OnChange' for element 'energyTypeOUT2'
          _view.energyTypeOUT2.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'energyTypeOUT2'
          _view.field22.linkProperty("Value",  function() { return EtransOUT2; }, function(_v) { EtransOUT2 = _v; } ); // HtmlView Page linking property 'Value' for element 'field22'
          _view.field22.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'field22'
          _view.L.linkProperty("TRMessage",  function() { return debugggTR; }, function(_v) { debugggTR = _v; } ); // HtmlView Page linking property 'TRMessage' for element 'L'
          _view.L.linkProperty("TitleYFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleYFont' for element 'L'
          _view.L.linkProperty("TitleXFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleXFont' for element 'L'
          _view.L.linkProperty("TitleFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleFont' for element 'L'
          _view.interactPROMPT.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'interactPROMPT'
          _view.interactPROMPT.linkProperty("LineColor",  function() { return promptLineColour; }, function(_v) { promptLineColour = _v; } ); // HtmlView Page linking property 'LineColor' for element 'interactPROMPT'
          _view.interactPROMPT.linkProperty("Visibility",  function() { return interactPrompt1; }, function(_v) { interactPrompt1 = _v; } ); // HtmlView Page linking property 'Visibility' for element 'interactPROMPT'
          _view.interactPROMPT.linkProperty("SizeY",  function() { return iniTotalEnergy; }, function(_v) { iniTotalEnergy = _v; } ); // HtmlView Page linking property 'SizeY' for element 'interactPROMPT'
          _view.shapeSet.linkProperty("FillColor",  function() { return energyColour; }, function(_v) { energyColour = _v; } ); // HtmlView Page linking property 'FillColor' for element 'shapeSet'
          _view.shapeSet.setAction("OnExit", function(_data,_info) {
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'shapeSet'
          _view.shapeSet.linkProperty("ElementInteracted",  function() { return elementInteracted; }, function(_v) { elementInteracted = _v; } ); // HtmlView Page linking property 'ElementInteracted' for element 'shapeSet'
          _view.shapeSet.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  for (let i=0; i< iniTotalEnergy.length; i++){
    iniTotalEnergy[i] = Math.round(iniTotalEnergy[i]);
    }

}); // HtmlView Page setting action 'OnRelease' for element 'shapeSet'
          _view.shapeSet.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'shapeSet'
          _view.shapeSet.setAction("OnEnter", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt1, elementInteracted);

}); // HtmlView Page setting action 'OnEnter' for element 'shapeSet'
          _view.shapeSet.linkProperty("Visibility",  function() { return [displayChemical, displayElastic, displayGravitational, displayInternal, displayKinetic, displayNuclear]; } ); // HtmlView Page linking property 'Visibility' for element 'shapeSet'
          _view.shapeSet.linkProperty("SizeY",  function() { return iniTotalEnergy; }, function(_v) { iniTotalEnergy = _v; } ); // HtmlView Page linking property 'SizeY' for element 'shapeSet'
          _view.xlabel.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'xlabel'
          _view.xlabel.linkProperty("Text",  function() { return ["C","E","G","I","K","N"]; } ); // HtmlView Page linking property 'Text' for element 'xlabel'
          _view.xlabel.linkProperty("Visibility",  function() { return [displayChemical, displayElastic, displayGravitational, displayInternal, displayKinetic, displayNuclear]; } ); // HtmlView Page linking property 'Visibility' for element 'xlabel'
          _view.amt.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'amt'
          _view.amt.linkProperty("Y",  function() { return iniTotalEnergy; }, function(_v) { iniTotalEnergy = _v; } ); // HtmlView Page linking property 'Y' for element 'amt'
          _view.amt.linkProperty("Text",  function() { return roundTheLst(iniTotalEnergy); }, function(_v) { roundTheLst(iniTotalEnergy) = _v; } ); // HtmlView Page linking property 'Text' for element 'amt'
          _view.amt.linkProperty("Visibility",  function() { return [displayChemical, displayElastic, displayGravitational, displayInternal, displayKinetic, displayNuclear]; } ); // HtmlView Page linking property 'Visibility' for element 'amt'
          _view.dragC.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragC'
          _view.dragC.setAction("OnExit", function(_data,_info) {
  elementInteracted = 0 
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragC'
          _view.dragC.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 0 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt1, elementInteracted);
   //iniTotalEnergy[elementInteracted] = dragCY
    //iniTotalEnergy[elementInteracted] = Math.round(iniTotalEnergy[elementInteracted]);

}); // HtmlView Page setting action 'OnDrag' for element 'dragC'
          _view.dragC.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 0 
    iniTotalEnergy[elementInteracted] = Math.round(dragCY);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragC'
          _view.dragC.linkProperty("X",  function() { return energyXpos[0]; } ); // HtmlView Page linking property 'X' for element 'dragC'
          _view.dragC.linkProperty("Y",  function() { return dragCY; }, function(_v) { dragCY = _v; } ); // HtmlView Page linking property 'Y' for element 'dragC'
          _view.dragC.linkProperty("Visibility",  function() { return displayChemical; }, function(_v) { displayChemical = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragC'
          _view.dragC.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragC'
          _view.dragE.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragE'
          _view.dragE.setAction("OnExit", function(_data,_info) {
  elementInteracted = 1
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragE'
          _view.dragE.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  elementInteracted = 1 
  oneTrueLst(interactPrompt1, elementInteracted);
   //iniTotalEnergy[elementInteracted] = Math.round(dragEY);

}); // HtmlView Page setting action 'OnDrag' for element 'dragE'
          _view.dragE.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 1 
    iniTotalEnergy[elementInteracted] = Math.round(dragEY);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragE'
          _view.dragE.linkProperty("X",  function() { return energyXpos[1]; } ); // HtmlView Page linking property 'X' for element 'dragE'
          _view.dragE.linkProperty("Y",  function() { return dragEY; }, function(_v) { dragEY = _v; } ); // HtmlView Page linking property 'Y' for element 'dragE'
          _view.dragE.linkProperty("Visibility",  function() { return displayElastic; }, function(_v) { displayElastic = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragE'
          _view.dragE.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragE'
          _view.dragG.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragG'
          _view.dragG.setAction("OnExit", function(_data,_info) {
  elementInteracted = 2
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragG'
          _view.dragG.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  elementInteracted = 2 
  oneTrueLst(interactPrompt1, elementInteracted);
   //iniTotalEnergy[elementInteracted] = Math.round(dragGY);

}); // HtmlView Page setting action 'OnDrag' for element 'dragG'
          _view.dragG.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 2
    iniTotalEnergy[elementInteracted] = Math.round(dragGY);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragG'
          _view.dragG.linkProperty("X",  function() { return energyXpos[2]; } ); // HtmlView Page linking property 'X' for element 'dragG'
          _view.dragG.linkProperty("Y",  function() { return dragGY; }, function(_v) { dragGY = _v; } ); // HtmlView Page linking property 'Y' for element 'dragG'
          _view.dragG.linkProperty("Visibility",  function() { return displayGravitational; }, function(_v) { displayGravitational = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragG'
          _view.dragG.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragG'
          _view.dragI.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragI'
          _view.dragI.setAction("OnExit", function(_data,_info) {
  elementInteracted = 3 
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragI'
          _view.dragI.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 3 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt1, elementInteracted);
   //iniTotalEnergy[elementInteracted] = Math.round(dragIY);

}); // HtmlView Page setting action 'OnDrag' for element 'dragI'
          _view.dragI.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 3 
    iniTotalEnergy[elementInteracted] = Math.round(dragIY);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragI'
          _view.dragI.linkProperty("X",  function() { return energyXpos[3]; } ); // HtmlView Page linking property 'X' for element 'dragI'
          _view.dragI.linkProperty("Y",  function() { return dragIY; }, function(_v) { dragIY = _v; } ); // HtmlView Page linking property 'Y' for element 'dragI'
          _view.dragI.linkProperty("Visibility",  function() { return displayInternal; }, function(_v) { displayInternal = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragI'
          _view.dragI.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragI'
          _view.dragK.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragK'
          _view.dragK.setAction("OnExit", function(_data,_info) {
  elementInteracted = 4 
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragK'
          _view.dragK.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 4 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt1, elementInteracted);
   //iniTotalEnergy[elementInteracted] = Math.round(dragKY);

}); // HtmlView Page setting action 'OnDrag' for element 'dragK'
          _view.dragK.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 4 
    iniTotalEnergy[elementInteracted] = Math.round(dragKY);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragK'
          _view.dragK.linkProperty("X",  function() { return energyXpos[4]; } ); // HtmlView Page linking property 'X' for element 'dragK'
          _view.dragK.linkProperty("Y",  function() { return dragKY; }, function(_v) { dragKY = _v; } ); // HtmlView Page linking property 'Y' for element 'dragK'
          _view.dragK.linkProperty("Visibility",  function() { return displayKinetic; }, function(_v) { displayKinetic = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragK'
          _view.dragK.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragK'
          _view.dragN.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragN'
          _view.dragN.setAction("OnExit", function(_data,_info) {
  elementInteracted = 5 
  interactPrompt1[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragN'
          _view.dragN.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 5 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt1, elementInteracted);
   //iniTotalEnergy[elementInteracted] = Math.round(dragNY)
   //iniTotalEnergy[elementInteracted] = Math.round(_info.point[1]);

}); // HtmlView Page setting action 'OnDrag' for element 'dragN'
          _view.dragN.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 5 
    iniTotalEnergy[elementInteracted] = Math.round(dragNY);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragN'
          _view.dragN.linkProperty("X",  function() { return energyXpos[5]; } ); // HtmlView Page linking property 'X' for element 'dragN'
          _view.dragN.linkProperty("Y",  function() { return dragNY; }, function(_v) { dragNY = _v; } ); // HtmlView Page linking property 'Y' for element 'dragN'
          _view.dragN.linkProperty("Visibility",  function() { return displayNuclear; }, function(_v) { displayNuclear = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragN'
          _view.dragN.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragN'
          _view.images.linkProperty("Visibility",  function() { return show2D; }, function(_v) { show2D = _v; } ); // HtmlView Page linking property 'Visibility' for element 'images'
          _view.chemical.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[0]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'chemical'
          _view.chemical.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'chemical'
          _view.chemical.linkProperty("X",  function() { return energyXpos[0]; } ); // HtmlView Page linking property 'X' for element 'chemical'
          _view.chemical.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[0] ); } ); // HtmlView Page linking property 'Y' for element 'chemical'
          _view.chemical.linkProperty("Visibility",  function() { return iniTotalEnergy[0]>0; } ); // HtmlView Page linking property 'Visibility' for element 'chemical'
          _view.chemical.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'chemical'
          _view.elastic.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[1]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'elastic'
          _view.elastic.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'elastic'
          _view.elastic.linkProperty("X",  function() { return energyXpos[1]; } ); // HtmlView Page linking property 'X' for element 'elastic'
          _view.elastic.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[1] ); } ); // HtmlView Page linking property 'Y' for element 'elastic'
          _view.elastic.linkProperty("Visibility",  function() { return iniTotalEnergy[1]>0; } ); // HtmlView Page linking property 'Visibility' for element 'elastic'
          _view.elastic.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'elastic'
          _view.gravity.linkProperty("NumberOfElements",  function() { return Math.abs(Math.round(iniTotalEnergy[2])); } ); // HtmlView Page linking property 'NumberOfElements' for element 'gravity'
          _view.gravity.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'gravity'
          _view.gravity.linkProperty("X",  function() { return energyXpos[2]; } ); // HtmlView Page linking property 'X' for element 'gravity'
          _view.gravity.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[2] ); } ); // HtmlView Page linking property 'Y' for element 'gravity'
          _view.gravity.linkProperty("Visibility",  function() { return Math.abs(iniTotalEnergy[2])>0; } ); // HtmlView Page linking property 'Visibility' for element 'gravity'
          _view.gravity.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'gravity'
          _view.internal.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[3]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'internal'
          _view.internal.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'internal'
          _view.internal.linkProperty("X",  function() { return energyXpos[3]; } ); // HtmlView Page linking property 'X' for element 'internal'
          _view.internal.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[3] ); } ); // HtmlView Page linking property 'Y' for element 'internal'
          _view.internal.linkProperty("Visibility",  function() { return iniTotalEnergy[3]>0; } ); // HtmlView Page linking property 'Visibility' for element 'internal'
          _view.internal.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'internal'
          _view.kinetic.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[4]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'kinetic'
          _view.kinetic.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'kinetic'
          _view.kinetic.linkProperty("X",  function() { return energyXpos[4]; } ); // HtmlView Page linking property 'X' for element 'kinetic'
          _view.kinetic.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[4] ); } ); // HtmlView Page linking property 'Y' for element 'kinetic'
          _view.kinetic.linkProperty("Visibility",  function() { return iniTotalEnergy[4]>0; } ); // HtmlView Page linking property 'Visibility' for element 'kinetic'
          _view.kinetic.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'kinetic'
          _view.nuclear.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[5]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'nuclear'
          _view.nuclear.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'nuclear'
          _view.nuclear.linkProperty("X",  function() { return energyXpos[5]; } ); // HtmlView Page linking property 'X' for element 'nuclear'
          _view.nuclear.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[5] ); } ); // HtmlView Page linking property 'Y' for element 'nuclear'
          _view.nuclear.linkProperty("Visibility",  function() { return iniTotalEnergy[5]>0; } ); // HtmlView Page linking property 'Visibility' for element 'nuclear'
          _view.nuclear.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'nuclear'
          _view.images3D.linkProperty("Visibility",  function() { return show3D; }, function(_v) { show3D = _v; } ); // HtmlView Page linking property 'Visibility' for element 'images3D'
          _view.chemical3.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[0]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'chemical3'
          _view.chemical3.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'chemical3'
          _view.chemical3.linkProperty("X",  function() { return energyXpos[0]; } ); // HtmlView Page linking property 'X' for element 'chemical3'
          _view.chemical3.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[0] ); } ); // HtmlView Page linking property 'Y' for element 'chemical3'
          _view.chemical3.linkProperty("Visibility",  function() { return iniTotalEnergy[0]>0; } ); // HtmlView Page linking property 'Visibility' for element 'chemical3'
          _view.chemical3.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'chemical3'
          _view.elastic3.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[1]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'elastic3'
          _view.elastic3.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'elastic3'
          _view.elastic3.linkProperty("X",  function() { return energyXpos[1]; } ); // HtmlView Page linking property 'X' for element 'elastic3'
          _view.elastic3.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[1] ); } ); // HtmlView Page linking property 'Y' for element 'elastic3'
          _view.elastic3.linkProperty("Visibility",  function() { return iniTotalEnergy[1]>0; } ); // HtmlView Page linking property 'Visibility' for element 'elastic3'
          _view.elastic3.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'elastic3'
          _view.gravity3.linkProperty("NumberOfElements",  function() { return Math.abs(Math.round(iniTotalEnergy[2])); } ); // HtmlView Page linking property 'NumberOfElements' for element 'gravity3'
          _view.gravity3.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'gravity3'
          _view.gravity3.linkProperty("X",  function() { return energyXpos[2]; } ); // HtmlView Page linking property 'X' for element 'gravity3'
          _view.gravity3.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[2] ); } ); // HtmlView Page linking property 'Y' for element 'gravity3'
          _view.gravity3.linkProperty("Visibility",  function() { return Math.abs(iniTotalEnergy[2])>0; } ); // HtmlView Page linking property 'Visibility' for element 'gravity3'
          _view.gravity3.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'gravity3'
          _view.internal3.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[3]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'internal3'
          _view.internal3.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'internal3'
          _view.internal3.linkProperty("X",  function() { return energyXpos[3]; } ); // HtmlView Page linking property 'X' for element 'internal3'
          _view.internal3.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[3] ); } ); // HtmlView Page linking property 'Y' for element 'internal3'
          _view.internal3.linkProperty("Visibility",  function() { return iniTotalEnergy[3]>0; } ); // HtmlView Page linking property 'Visibility' for element 'internal3'
          _view.internal3.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'internal3'
          _view.kinetic3.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[4]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'kinetic3'
          _view.kinetic3.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'kinetic3'
          _view.kinetic3.linkProperty("X",  function() { return energyXpos[4]; } ); // HtmlView Page linking property 'X' for element 'kinetic3'
          _view.kinetic3.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[4] ); } ); // HtmlView Page linking property 'Y' for element 'kinetic3'
          _view.kinetic3.linkProperty("Visibility",  function() { return iniTotalEnergy[4]>0; } ); // HtmlView Page linking property 'Visibility' for element 'kinetic3'
          _view.kinetic3.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'kinetic3'
          _view.nuclear3.linkProperty("NumberOfElements",  function() { return Math.round(iniTotalEnergy[5]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'nuclear3'
          _view.nuclear3.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'nuclear3'
          _view.nuclear3.linkProperty("X",  function() { return energyXpos[5]; } ); // HtmlView Page linking property 'X' for element 'nuclear3'
          _view.nuclear3.linkProperty("Y",  function() { return numberedLst( iniTotalEnergy[5] ); } ); // HtmlView Page linking property 'Y' for element 'nuclear3'
          _view.nuclear3.linkProperty("Visibility",  function() { return iniTotalEnergy[5]>0; } ); // HtmlView Page linking property 'Visibility' for element 'nuclear3'
          _view.nuclear3.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'nuclear3'
          _view.O.linkProperty("TitleX",  function() { return hint; }, function(_v) { hint = _v; } ); // HtmlView Page linking property 'TitleX' for element 'O'
          _view.O.linkProperty("TitleFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleFont' for element 'O'
          _view.textObject.linkProperty("Text",  function() { return systemText2; }, function(_v) { systemText2 = _v; } ); // HtmlView Page linking property 'Text' for element 'textObject'
          _view.arrowIN.linkProperty("SizeX",  function() { return -arrowLength; } ); // HtmlView Page linking property 'SizeX' for element 'arrowIN'
          _view.arrowIN.linkProperty("Rotate",  function() { return Math.atan2(energyInArrowY, energyInArrowX); } ); // HtmlView Page linking property 'Rotate' for element 'arrowIN'
          _view.arrowIN.linkProperty("X",  function() { return energyInArrowX; }, function(_v) { energyInArrowX = _v; } ); // HtmlView Page linking property 'X' for element 'arrowIN'
          _view.arrowIN.linkProperty("Y",  function() { return energyInArrowY; }, function(_v) { energyInArrowY = _v; } ); // HtmlView Page linking property 'Y' for element 'arrowIN'
          _view.arrowIN.linkProperty("Visibility",  function() { return check3a; }, function(_v) { check3a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'arrowIN'
          _view.arrowIN.setAction("OnDrag", function(_data,_info) {
  // Calculate the magnitude of the vector
  var magnitude = Math.sqrt(energyInArrowX * energyInArrowX + energyInArrowY * energyInArrowY);
  var angle = Math.atan2(energyInArrowY, energyInArrowX)
  var minDistance = 3;
  var maxDistance = 9;
  var radius = 2.5
  energyInArrowX = radius * Math.cos(angle);
  energyInArrowY = radius * Math.sin(angle);
  // update the image positions
  radius += 2;
  INimgX = radius * Math.cos(angle);
  INimgY = radius * Math.sin(angle);
    
     /*
     // If magnitude exceeds maxDistance, scale down the vector
      if (magnitude > maxDistance) {
          var scaleFactor = maxDistance / magnitude;
          energyInArrowX *= scaleFactor;
          energyInArrowY *= scaleFactor;
      }
      else if (magnitude < minDistance) {
          var scaleFactor = maxDistance / magnitude;
          energyInArrowX *= scaleFactor;
          energyInArrowY *= scaleFactor;
      }
  */;

}); // HtmlView Page setting action 'OnDrag' for element 'arrowIN'
          _view.arrowIN2.linkProperty("SizeX",  function() { return -arrowLength; } ); // HtmlView Page linking property 'SizeX' for element 'arrowIN2'
          _view.arrowIN2.linkProperty("Rotate",  function() { return Math.atan2(energyIn2ArrowY, energyIn2ArrowX); } ); // HtmlView Page linking property 'Rotate' for element 'arrowIN2'
          _view.arrowIN2.linkProperty("X",  function() { return energyIn2ArrowX; }, function(_v) { energyIn2ArrowX = _v; } ); // HtmlView Page linking property 'X' for element 'arrowIN2'
          _view.arrowIN2.linkProperty("Y",  function() { return energyIn2ArrowY; }, function(_v) { energyIn2ArrowY = _v; } ); // HtmlView Page linking property 'Y' for element 'arrowIN2'
          _view.arrowIN2.linkProperty("Visibility",  function() { return check3b; }, function(_v) { check3b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'arrowIN2'
          _view.arrowIN2.setAction("OnDrag", function(_data,_info) {
  // Calculate the magnitude of the vector
  var magnitude = Math.sqrt(energyIn2ArrowX * energyIn2ArrowX + energyIn2ArrowY * energyIn2ArrowY);
  var angle = Math.atan2(energyIn2ArrowY, energyIn2ArrowX)
  var minDistance = 3;
  var maxDistance = 9;
  var radius = 2.5
  energyIn2ArrowX = radius * Math.cos(angle);
  energyIn2ArrowY = radius * Math.sin(angle);
  // update the image positions
  radius += 2;
  IN2imgX = radius * Math.cos(angle);
  IN2imgY = radius * Math.sin(angle);

}); // HtmlView Page setting action 'OnDrag' for element 'arrowIN2'
          _view.arrowOUT.linkProperty("SizeX",  function() { return arrowLength; }, function(_v) { arrowLength = _v; } ); // HtmlView Page linking property 'SizeX' for element 'arrowOUT'
          _view.arrowOUT.linkProperty("Rotate",  function() { return Math.atan2(energyOutArrowY, energyOutArrowX); } ); // HtmlView Page linking property 'Rotate' for element 'arrowOUT'
          _view.arrowOUT.linkProperty("X",  function() { return energyOutArrowX; }, function(_v) { energyOutArrowX = _v; } ); // HtmlView Page linking property 'X' for element 'arrowOUT'
          _view.arrowOUT.linkProperty("Y",  function() { return energyOutArrowY; }, function(_v) { energyOutArrowY = _v; } ); // HtmlView Page linking property 'Y' for element 'arrowOUT'
          _view.arrowOUT.linkProperty("Visibility",  function() { return check4a; }, function(_v) { check4a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'arrowOUT'
          _view.arrowOUT.setAction("OnDrag", function(_data,_info) {
  // Calculate the magnitude of the vector
  var magnitude = Math.sqrt(energyOutArrowX * energyOutArrowX + energyOutArrowY * energyOutArrowY);
  var angle = Math.atan2(energyOutArrowY, energyOutArrowX)
  var minDistance = 3;
  var maxDistance = 9;
  var radius = 2.5
  energyOutArrowX = radius * Math.cos(angle);
  energyOutArrowY = radius * Math.sin(angle);
  // Update the image positions
  radius += 2;
  OUTimgX = radius * Math.cos(angle);
  OUTimgY = radius * Math.sin(angle);

}); // HtmlView Page setting action 'OnDrag' for element 'arrowOUT'
          _view.arrowOUT2.linkProperty("SizeX",  function() { return arrowLength; }, function(_v) { arrowLength = _v; } ); // HtmlView Page linking property 'SizeX' for element 'arrowOUT2'
          _view.arrowOUT2.linkProperty("Rotate",  function() { return Math.atan2(energyOut2ArrowY, energyOut2ArrowX); } ); // HtmlView Page linking property 'Rotate' for element 'arrowOUT2'
          _view.arrowOUT2.linkProperty("X",  function() { return energyOut2ArrowX; }, function(_v) { energyOut2ArrowX = _v; } ); // HtmlView Page linking property 'X' for element 'arrowOUT2'
          _view.arrowOUT2.linkProperty("Y",  function() { return energyOut2ArrowY; }, function(_v) { energyOut2ArrowY = _v; } ); // HtmlView Page linking property 'Y' for element 'arrowOUT2'
          _view.arrowOUT2.linkProperty("Visibility",  function() { return check4b; }, function(_v) { check4b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'arrowOUT2'
          _view.arrowOUT2.setAction("OnDrag", function(_data,_info) {
  // Calculate the magnitude of the vector
  var magnitude = Math.sqrt(energyOut2ArrowX * energyOut2ArrowX + energyOut2ArrowY * energyOut2ArrowY);
  var angle = Math.atan2(energyOut2ArrowY, energyOut2ArrowX)
  var minDistance = 3;
  var maxDistance = 9;
  var radius = 2.5
  energyOut2ArrowX = radius * Math.cos(angle);
  energyOut2ArrowY = radius * Math.sin(angle);
  // Update the image positions
  radius += 2;
  OUT2imgX = radius * Math.cos(angle);
  OUT2imgY = radius * Math.sin(angle);

}); // HtmlView Page setting action 'OnDrag' for element 'arrowOUT2'
          _view.imageIN.linkProperty("SizeX",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'imageIN'
          _view.imageIN.linkProperty("X",  function() { return INimgX; }, function(_v) { INimgX = _v; } ); // HtmlView Page linking property 'X' for element 'imageIN'
          _view.imageIN.linkProperty("ImageUrl",  function() { return imgIN[updateTransIN]; }, function(_v) { imgIN[updateTransIN] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'imageIN'
          _view.imageIN.linkProperty("Y",  function() { return INimgY; }, function(_v) { INimgY = _v; } ); // HtmlView Page linking property 'Y' for element 'imageIN'
          _view.imageIN.linkProperty("Visibility",  function() { return check3a; }, function(_v) { check3a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'imageIN'
          _view.imageIN.linkProperty("SizeY",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'imageIN'
          _view.interactPrompt.linkProperty("SizeX",  function() { return energyWidth+0.1; } ); // HtmlView Page linking property 'SizeX' for element 'interactPrompt'
          _view.interactPrompt.linkProperty("LineColor",  function() { return promptLineColour; }, function(_v) { promptLineColour = _v; } ); // HtmlView Page linking property 'LineColor' for element 'interactPrompt'
          _view.interactPrompt.linkProperty("X",  function() { return INenergyX; }, function(_v) { INenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'interactPrompt'
          _view.interactPrompt.linkProperty("Y",  function() { return INenergyY; }, function(_v) { INenergyY = _v; } ); // HtmlView Page linking property 'Y' for element 'interactPrompt'
          _view.interactPrompt.linkProperty("Visibility",  function() { return INinteract; }, function(_v) { INinteract = _v; } ); // HtmlView Page linking property 'Visibility' for element 'interactPrompt'
          _view.interactPrompt.linkProperty("SizeY",  function() { return EtransIN+0.1; } ); // HtmlView Page linking property 'SizeY' for element 'interactPrompt'
          _view.energyIN2.linkProperty("FillColor",  function() { return energyColour; }, function(_v) { energyColour = _v; } ); // HtmlView Page linking property 'FillColor' for element 'energyIN2'
          _view.energyIN2.setAction("OnExit", function(_data,_info) {
  INinteract = false;

}); // HtmlView Page setting action 'OnExit' for element 'energyIN2'
          _view.energyIN2.setAction("OnDrag", function(_data,_info) {
  // Restrict numbers to integers //
  //EtransIN = Math.round(EtransIN);
  //EtransIN = Math.round(EtransIN);

}); // HtmlView Page setting action 'OnDrag' for element 'energyIN2'
          _view.energyIN2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //EtransIN = Math.round(EtransIN);
  EtransIN = Math.round(EtransIN);

}); // HtmlView Page setting action 'OnRelease' for element 'energyIN2'
          _view.energyIN2.linkProperty("SizeX",  function() { return energyWidth; }, function(_v) { energyWidth = _v; } ); // HtmlView Page linking property 'SizeX' for element 'energyIN2'
          _view.energyIN2.linkProperty("X",  function() { return INenergyX; }, function(_v) { INenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'energyIN2'
          _view.energyIN2.setAction("OnEnter", function(_data,_info) {
  INinteract = true;

}); // HtmlView Page setting action 'OnEnter' for element 'energyIN2'
          _view.energyIN2.linkProperty("Y",  function() { return INenergyY; }, function(_v) { INenergyY = _v; } ); // HtmlView Page linking property 'Y' for element 'energyIN2'
          _view.energyIN2.setAction("OnPress", function(_data,_info) {
  INinteract = true;

}); // HtmlView Page setting action 'OnPress' for element 'energyIN2'
          _view.energyIN2.linkProperty("SizeY",  function() { return EtransIN; }, function(_v) { EtransIN = _v; } ); // HtmlView Page linking property 'SizeY' for element 'energyIN2'
          _view.transIN_text.linkProperty("X",  function() { return INtextX; }, function(_v) { INtextX = _v; } ); // HtmlView Page linking property 'X' for element 'transIN_text'
          _view.transIN_text.linkProperty("Y",  function() { return INtextY; }, function(_v) { INtextY = _v; } ); // HtmlView Page linking property 'Y' for element 'transIN_text'
          _view.transIN_text.linkProperty("Visibility",  function() { return check3a; }, function(_v) { check3a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'transIN_text'
          _view.iconINamt.linkProperty("NumberOfElements",  function() { return Math.round(EtransIN); } ); // HtmlView Page linking property 'NumberOfElements' for element 'iconINamt'
          _view.iconINamt.linkProperty("SizeX",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'iconINamt'
          _view.iconINamt.linkProperty("X",  function() { return INenergyX; }, function(_v) { INenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'iconINamt'
          _view.iconINamt.linkProperty("ImageUrl",  function() { return imgIN[updateTransIN]; }, function(_v) { imgIN[updateTransIN] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'iconINamt'
          _view.iconINamt.linkProperty("Y",  function() { return numberedLstFromX(EtransIN,INenergyY); } ); // HtmlView Page linking property 'Y' for element 'iconINamt'
          _view.iconINamt.linkProperty("Visibility",  function() { return EtransIN>0; } ); // HtmlView Page linking property 'Visibility' for element 'iconINamt'
          _view.iconINamt.linkProperty("SizeY",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'iconINamt'
          _view.amtIN.linkProperty("X",  function() { return INenergyX; }, function(_v) { INenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'amtIN'
          _view.amtIN.linkProperty("Y",  function() { return INenergyY+EtransIN+0.2; } ); // HtmlView Page linking property 'Y' for element 'amtIN'
          _view.amtIN.linkProperty("Text",  function() { return Math.round(EtransIN); }, function(_v) { Math.round(EtransIN) = _v; } ); // HtmlView Page linking property 'Text' for element 'amtIN'
          _view.amtIN.linkProperty("Visibility",  function() { return check3a; }, function(_v) { check3a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'amtIN'
          _view.drag3Helper.linkProperty("Y",  function() { return INenergyY; }, function(_v) { INenergyY = _v; } ); // HtmlView Page linking property 'Y' for element 'drag3Helper'
          _view.dragTin1.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragTin1'
          _view.dragTin1.setAction("OnExit", function(_data,_info) {
  INinteract = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragTin1'
          _view.dragTin1.setAction("OnDrag", function(_data,_info) {
  INinteract = true;

}); // HtmlView Page setting action 'OnDrag' for element 'dragTin1'
          _view.dragTin1.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
    //EtransIN = Math.round(EtransIN);    // → restrict movements in Ipad Pro :(
    //EtransIN = Math.round(_info.point[1]);
  EtransIN = Math.round(dragEtransIN);
  INinteract = false;

}); // HtmlView Page setting action 'OnRelease' for element 'dragTin1'
          _view.dragTin1.linkProperty("X",  function() { return INenergyX; }, function(_v) { INenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'dragTin1'
          _view.dragTin1.setAction("OnEnter", function(_data,_info) {
  INinteract = true;

}); // HtmlView Page setting action 'OnEnter' for element 'dragTin1'
          _view.dragTin1.linkProperty("Y",  function() { return dragEtransIN; }, function(_v) { dragEtransIN = _v; } ); // HtmlView Page linking property 'Y' for element 'dragTin1'
          _view.dragTin1.linkProperty("Visibility",  function() { return check3a; }, function(_v) { check3a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragTin1'
          _view.dragTin1.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragTin1'
          _view.drag4Helper.linkProperty("Y",  function() { return IN2energyY; }, function(_v) { IN2energyY = _v; } ); // HtmlView Page linking property 'Y' for element 'drag4Helper'
          _view.dragTin2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragTin2'
          _view.dragTin2.setAction("OnExit", function(_data,_info) {
  IN2interact = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragTin2'
          _view.dragTin2.setAction("OnDrag", function(_data,_info) {
  IN2interact = true;

}); // HtmlView Page setting action 'OnDrag' for element 'dragTin2'
          _view.dragTin2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
    //EtransIN2 = Math.round(EtransIN2);  // → restrict movements in Ipad Pro
  EtransIN2 = Math.round(dragEtransIN2); 
  IN2interact = false;

}); // HtmlView Page setting action 'OnRelease' for element 'dragTin2'
          _view.dragTin2.linkProperty("X",  function() { return IN2energyX; }, function(_v) { IN2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'dragTin2'
          _view.dragTin2.setAction("OnEnter", function(_data,_info) {
  IN2interact = true;

}); // HtmlView Page setting action 'OnEnter' for element 'dragTin2'
          _view.dragTin2.linkProperty("Y",  function() { return dragEtransIN2; }, function(_v) { dragEtransIN2 = _v; } ); // HtmlView Page linking property 'Y' for element 'dragTin2'
          _view.dragTin2.linkProperty("Visibility",  function() { return check3b; }, function(_v) { check3b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragTin2'
          _view.dragTin2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragTin2'
          _view.imageIN2.linkProperty("SizeX",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'imageIN2'
          _view.imageIN2.linkProperty("X",  function() { return IN2imgX; }, function(_v) { IN2imgX = _v; } ); // HtmlView Page linking property 'X' for element 'imageIN2'
          _view.imageIN2.linkProperty("ImageUrl",  function() { return imgIN2[updateTransIN2]; }, function(_v) { imgIN2[updateTransIN2] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'imageIN2'
          _view.imageIN2.linkProperty("Y",  function() { return IN2imgY; }, function(_v) { IN2imgY = _v; } ); // HtmlView Page linking property 'Y' for element 'imageIN2'
          _view.imageIN2.linkProperty("Visibility",  function() { return check3b; }, function(_v) { check3b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'imageIN2'
          _view.imageIN2.linkProperty("SizeY",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'imageIN2'
          _view.interactPrompt3.linkProperty("SizeX",  function() { return energyWidth+0.1; } ); // HtmlView Page linking property 'SizeX' for element 'interactPrompt3'
          _view.interactPrompt3.linkProperty("LineColor",  function() { return promptLineColour; }, function(_v) { promptLineColour = _v; } ); // HtmlView Page linking property 'LineColor' for element 'interactPrompt3'
          _view.interactPrompt3.linkProperty("X",  function() { return IN2energyX; }, function(_v) { IN2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'interactPrompt3'
          _view.interactPrompt3.linkProperty("Y",  function() { return IN2energyY; }, function(_v) { IN2energyY = _v; } ); // HtmlView Page linking property 'Y' for element 'interactPrompt3'
          _view.interactPrompt3.linkProperty("Visibility",  function() { return IN2interact; }, function(_v) { IN2interact = _v; } ); // HtmlView Page linking property 'Visibility' for element 'interactPrompt3'
          _view.interactPrompt3.linkProperty("SizeY",  function() { return EtransIN2+0.1; } ); // HtmlView Page linking property 'SizeY' for element 'interactPrompt3'
          _view.energyIN22.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  EtransIN2 = Math.round(EtransIN2);

}); // HtmlView Page setting action 'OnRelease' for element 'energyIN22'
          _view.energyIN22.linkProperty("FillColor",  function() { return energyColour; }, function(_v) { energyColour = _v; } ); // HtmlView Page linking property 'FillColor' for element 'energyIN22'
          _view.energyIN22.setAction("OnExit", function(_data,_info) {
  IN2interact = false;

}); // HtmlView Page setting action 'OnExit' for element 'energyIN22'
          _view.energyIN22.linkProperty("SizeX",  function() { return energyWidth; }, function(_v) { energyWidth = _v; } ); // HtmlView Page linking property 'SizeX' for element 'energyIN22'
          _view.energyIN22.linkProperty("X",  function() { return IN2energyX; }, function(_v) { IN2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'energyIN22'
          _view.energyIN22.setAction("OnEnter", function(_data,_info) {
  IN2interact = true;

}); // HtmlView Page setting action 'OnEnter' for element 'energyIN22'
          _view.energyIN22.linkProperty("Y",  function() { return IN2energyY; }, function(_v) { IN2energyY = _v; } ); // HtmlView Page linking property 'Y' for element 'energyIN22'
          _view.energyIN22.linkProperty("SizeY",  function() { return EtransIN2; }, function(_v) { EtransIN2 = _v; } ); // HtmlView Page linking property 'SizeY' for element 'energyIN22'
          _view.transIN_text2.linkProperty("X",  function() { return IN2textX; }, function(_v) { IN2textX = _v; } ); // HtmlView Page linking property 'X' for element 'transIN_text2'
          _view.transIN_text2.linkProperty("Y",  function() { return IN2textY; }, function(_v) { IN2textY = _v; } ); // HtmlView Page linking property 'Y' for element 'transIN_text2'
          _view.transIN_text2.linkProperty("Visibility",  function() { return check3b; }, function(_v) { check3b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'transIN_text2'
          _view.iconINamt2.linkProperty("NumberOfElements",  function() { return Math.round(EtransIN2); } ); // HtmlView Page linking property 'NumberOfElements' for element 'iconINamt2'
          _view.iconINamt2.linkProperty("SizeX",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'iconINamt2'
          _view.iconINamt2.linkProperty("X",  function() { return IN2energyX; }, function(_v) { IN2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'iconINamt2'
          _view.iconINamt2.linkProperty("ImageUrl",  function() { return imgIN2[updateTransIN2]; }, function(_v) { imgIN2[updateTransIN2] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'iconINamt2'
          _view.iconINamt2.linkProperty("Y",  function() { return numberedLstFromX(EtransIN2,IN2energyY); } ); // HtmlView Page linking property 'Y' for element 'iconINamt2'
          _view.iconINamt2.linkProperty("Visibility",  function() { return EtransIN2>0; } ); // HtmlView Page linking property 'Visibility' for element 'iconINamt2'
          _view.iconINamt2.linkProperty("SizeY",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'iconINamt2'
          _view.amtIN2.linkProperty("X",  function() { return IN2energyX; }, function(_v) { IN2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'amtIN2'
          _view.amtIN2.linkProperty("Y",  function() { return IN2energyY+EtransIN2+0.2; } ); // HtmlView Page linking property 'Y' for element 'amtIN2'
          _view.amtIN2.linkProperty("Text",  function() { return Math.round(EtransIN2); }, function(_v) { Math.round(EtransIN2) = _v; } ); // HtmlView Page linking property 'Text' for element 'amtIN2'
          _view.amtIN2.linkProperty("Visibility",  function() { return check3b; }, function(_v) { check3b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'amtIN2'
          _view.imageOUT.linkProperty("SizeX",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'imageOUT'
          _view.imageOUT.linkProperty("X",  function() { return OUTimgX; }, function(_v) { OUTimgX = _v; } ); // HtmlView Page linking property 'X' for element 'imageOUT'
          _view.imageOUT.linkProperty("ImageUrl",  function() { return imgOUT[updateTransOUT]; }, function(_v) { imgOUT[updateTransOUT] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'imageOUT'
          _view.imageOUT.linkProperty("Y",  function() { return OUTimgY; }, function(_v) { OUTimgY = _v; } ); // HtmlView Page linking property 'Y' for element 'imageOUT'
          _view.imageOUT.linkProperty("Visibility",  function() { return check4a; }, function(_v) { check4a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'imageOUT'
          _view.imageOUT.linkProperty("SizeY",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'imageOUT'
          _view.interactPrompt2.linkProperty("SizeX",  function() { return energyWidth+0.1; } ); // HtmlView Page linking property 'SizeX' for element 'interactPrompt2'
          _view.interactPrompt2.linkProperty("LineColor",  function() { return promptLineColour; }, function(_v) { promptLineColour = _v; } ); // HtmlView Page linking property 'LineColor' for element 'interactPrompt2'
          _view.interactPrompt2.linkProperty("X",  function() { return OUTenergyX; }, function(_v) { OUTenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'interactPrompt2'
          _view.interactPrompt2.linkProperty("Y",  function() { return OUTenergyY; }, function(_v) { OUTenergyY = _v; } ); // HtmlView Page linking property 'Y' for element 'interactPrompt2'
          _view.interactPrompt2.linkProperty("Visibility",  function() { return OUTinteract; }, function(_v) { OUTinteract = _v; } ); // HtmlView Page linking property 'Visibility' for element 'interactPrompt2'
          _view.interactPrompt2.linkProperty("SizeY",  function() { return EtransOUT+0.1; } ); // HtmlView Page linking property 'SizeY' for element 'interactPrompt2'
          _view.energyOUT2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  EtransOUT = Math.round(EtransOUT);

}); // HtmlView Page setting action 'OnRelease' for element 'energyOUT2'
          _view.energyOUT2.linkProperty("FillColor",  function() { return energyColour; }, function(_v) { energyColour = _v; } ); // HtmlView Page linking property 'FillColor' for element 'energyOUT2'
          _view.energyOUT2.setAction("OnExit", function(_data,_info) {
  OUTinteract = false;

}); // HtmlView Page setting action 'OnExit' for element 'energyOUT2'
          _view.energyOUT2.linkProperty("SizeX",  function() { return energyWidth; }, function(_v) { energyWidth = _v; } ); // HtmlView Page linking property 'SizeX' for element 'energyOUT2'
          _view.energyOUT2.linkProperty("X",  function() { return OUTenergyX; }, function(_v) { OUTenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'energyOUT2'
          _view.energyOUT2.setAction("OnEnter", function(_data,_info) {
  OUTinteract = true;

}); // HtmlView Page setting action 'OnEnter' for element 'energyOUT2'
          _view.energyOUT2.linkProperty("Y",  function() { return OUTenergyY; }, function(_v) { OUTenergyY = _v; } ); // HtmlView Page linking property 'Y' for element 'energyOUT2'
          _view.energyOUT2.linkProperty("SizeY",  function() { return EtransOUT; }, function(_v) { EtransOUT = _v; } ); // HtmlView Page linking property 'SizeY' for element 'energyOUT2'
          _view.out_text.linkProperty("X",  function() { return OUTtextX; }, function(_v) { OUTtextX = _v; } ); // HtmlView Page linking property 'X' for element 'out_text'
          _view.out_text.linkProperty("Y",  function() { return OUTtextY; }, function(_v) { OUTtextY = _v; } ); // HtmlView Page linking property 'Y' for element 'out_text'
          _view.out_text.linkProperty("Visibility",  function() { return check4a; }, function(_v) { check4a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'out_text'
          _view.amtOUT.linkProperty("X",  function() { return OUTenergyX; }, function(_v) { OUTenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'amtOUT'
          _view.amtOUT.linkProperty("Y",  function() { return OUTenergyY + EtransOUT+0.2; } ); // HtmlView Page linking property 'Y' for element 'amtOUT'
          _view.amtOUT.linkProperty("Text",  function() { return Math.round(EtransOUT); }, function(_v) { Math.round(EtransOUT) = _v; } ); // HtmlView Page linking property 'Text' for element 'amtOUT'
          _view.amtOUT.linkProperty("Visibility",  function() { return check4a; }, function(_v) { check4a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'amtOUT'
          _view.iconOUTamt.linkProperty("NumberOfElements",  function() { return Math.round(EtransOUT); } ); // HtmlView Page linking property 'NumberOfElements' for element 'iconOUTamt'
          _view.iconOUTamt.linkProperty("SizeX",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'iconOUTamt'
          _view.iconOUTamt.linkProperty("X",  function() { return OUTenergyX; }, function(_v) { OUTenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'iconOUTamt'
          _view.iconOUTamt.linkProperty("ImageUrl",  function() { return imgOUT[updateTransOUT]; }, function(_v) { imgOUT[updateTransOUT] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'iconOUTamt'
          _view.iconOUTamt.linkProperty("Y",  function() { return numberedLstFromX(EtransOUT,OUTenergyY); } ); // HtmlView Page linking property 'Y' for element 'iconOUTamt'
          _view.iconOUTamt.linkProperty("Visibility",  function() { return EtransOUT>0; } ); // HtmlView Page linking property 'Visibility' for element 'iconOUTamt'
          _view.iconOUTamt.linkProperty("SizeY",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'iconOUTamt'
          _view.drag5Helper.linkProperty("Y",  function() { return OUTenergyY; }, function(_v) { OUTenergyY = _v; } ); // HtmlView Page linking property 'Y' for element 'drag5Helper'
          _view.dragTout1.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragTout1'
          _view.dragTout1.setAction("OnExit", function(_data,_info) {
  OUTinteract = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragTout1'
          _view.dragTout1.setAction("OnDrag", function(_data,_info) {
  OUTinteract = true;

}); // HtmlView Page setting action 'OnDrag' for element 'dragTout1'
          _view.dragTout1.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
    //EtransOUT = Math.round(EtransOUT);  // → restrict movements in Ipad Pro
    
  EtransOUT = Math.round(dragEtransOUT);
  OUTinteract = false;

}); // HtmlView Page setting action 'OnRelease' for element 'dragTout1'
          _view.dragTout1.linkProperty("X",  function() { return OUTenergyX; }, function(_v) { OUTenergyX = _v; } ); // HtmlView Page linking property 'X' for element 'dragTout1'
          _view.dragTout1.setAction("OnEnter", function(_data,_info) {
  OUTinteract = true;

}); // HtmlView Page setting action 'OnEnter' for element 'dragTout1'
          _view.dragTout1.linkProperty("Y",  function() { return dragEtransOUT; }, function(_v) { dragEtransOUT = _v; } ); // HtmlView Page linking property 'Y' for element 'dragTout1'
          _view.dragTout1.linkProperty("Visibility",  function() { return check4a; }, function(_v) { check4a = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragTout1'
          _view.dragTout1.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragTout1'
          _view.imageOUT2.linkProperty("SizeX",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'imageOUT2'
          _view.imageOUT2.linkProperty("X",  function() { return OUT2imgX; }, function(_v) { OUT2imgX = _v; } ); // HtmlView Page linking property 'X' for element 'imageOUT2'
          _view.imageOUT2.linkProperty("ImageUrl",  function() { return imgOUT2[updateTransOUT2]; }, function(_v) { imgOUT2[updateTransOUT2] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'imageOUT2'
          _view.imageOUT2.linkProperty("Y",  function() { return OUT2imgY; }, function(_v) { OUT2imgY = _v; } ); // HtmlView Page linking property 'Y' for element 'imageOUT2'
          _view.imageOUT2.linkProperty("Visibility",  function() { return check4b; }, function(_v) { check4b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'imageOUT2'
          _view.imageOUT2.linkProperty("SizeY",  function() { return imgSIZE; }, function(_v) { imgSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'imageOUT2'
          _view.interactPrompt22.linkProperty("SizeX",  function() { return energyWidth+0.1; } ); // HtmlView Page linking property 'SizeX' for element 'interactPrompt22'
          _view.interactPrompt22.linkProperty("LineColor",  function() { return promptLineColour; }, function(_v) { promptLineColour = _v; } ); // HtmlView Page linking property 'LineColor' for element 'interactPrompt22'
          _view.interactPrompt22.linkProperty("X",  function() { return OUT2energyX; }, function(_v) { OUT2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'interactPrompt22'
          _view.interactPrompt22.linkProperty("Y",  function() { return OUT2energyY; }, function(_v) { OUT2energyY = _v; } ); // HtmlView Page linking property 'Y' for element 'interactPrompt22'
          _view.interactPrompt22.linkProperty("Visibility",  function() { return OUT2interact; }, function(_v) { OUT2interact = _v; } ); // HtmlView Page linking property 'Visibility' for element 'interactPrompt22'
          _view.interactPrompt22.linkProperty("SizeY",  function() { return EtransOUT2 + 0.1; } ); // HtmlView Page linking property 'SizeY' for element 'interactPrompt22'
          _view.energyOUT22.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  EtransOUT2 = Math.round(EtransOUT2);
  //EtransOUT2 = Math.round(_info.point[0]);

}); // HtmlView Page setting action 'OnRelease' for element 'energyOUT22'
          _view.energyOUT22.linkProperty("FillColor",  function() { return energyColour; }, function(_v) { energyColour = _v; } ); // HtmlView Page linking property 'FillColor' for element 'energyOUT22'
          _view.energyOUT22.setAction("OnExit", function(_data,_info) {
  OUT2interact = false;

}); // HtmlView Page setting action 'OnExit' for element 'energyOUT22'
          _view.energyOUT22.linkProperty("SizeX",  function() { return energyWidth; }, function(_v) { energyWidth = _v; } ); // HtmlView Page linking property 'SizeX' for element 'energyOUT22'
          _view.energyOUT22.linkProperty("X",  function() { return OUT2energyX; }, function(_v) { OUT2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'energyOUT22'
          _view.energyOUT22.setAction("OnEnter", function(_data,_info) {
  OUT2interact = true;

}); // HtmlView Page setting action 'OnEnter' for element 'energyOUT22'
          _view.energyOUT22.linkProperty("Y",  function() { return OUT2energyY; }, function(_v) { OUT2energyY = _v; } ); // HtmlView Page linking property 'Y' for element 'energyOUT22'
          _view.energyOUT22.linkProperty("SizeY",  function() { return EtransOUT2; }, function(_v) { EtransOUT2 = _v; } ); // HtmlView Page linking property 'SizeY' for element 'energyOUT22'
          _view.out_text2.linkProperty("X",  function() { return OUT2textX; }, function(_v) { OUT2textX = _v; } ); // HtmlView Page linking property 'X' for element 'out_text2'
          _view.out_text2.linkProperty("Y",  function() { return OUT2textY; }, function(_v) { OUT2textY = _v; } ); // HtmlView Page linking property 'Y' for element 'out_text2'
          _view.out_text2.linkProperty("Visibility",  function() { return check4b; }, function(_v) { check4b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'out_text2'
          _view.amtOUT2.linkProperty("X",  function() { return OUT2energyX; }, function(_v) { OUT2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'amtOUT2'
          _view.amtOUT2.linkProperty("Y",  function() { return OUT2energyY + EtransOUT2+0.2; } ); // HtmlView Page linking property 'Y' for element 'amtOUT2'
          _view.amtOUT2.linkProperty("Text",  function() { return Math.round(EtransOUT2); }, function(_v) { Math.round(EtransOUT2) = _v; } ); // HtmlView Page linking property 'Text' for element 'amtOUT2'
          _view.amtOUT2.linkProperty("Visibility",  function() { return check4b; }, function(_v) { check4b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'amtOUT2'
          _view.iconOUTamt2.linkProperty("NumberOfElements",  function() { return Math.round(EtransOUT2); } ); // HtmlView Page linking property 'NumberOfElements' for element 'iconOUTamt2'
          _view.iconOUTamt2.linkProperty("SizeX",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeX' for element 'iconOUTamt2'
          _view.iconOUTamt2.linkProperty("X",  function() { return OUT2energyX; }, function(_v) { OUT2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'iconOUTamt2'
          _view.iconOUTamt2.linkProperty("ImageUrl",  function() { return imgOUT2[updateTransOUT2]; }, function(_v) { imgOUT2[updateTransOUT2] = _v; } ); // HtmlView Page linking property 'ImageUrl' for element 'iconOUTamt2'
          _view.iconOUTamt2.linkProperty("Y",  function() { return numberedLstFromX(EtransOUT2,OUT2energyY); } ); // HtmlView Page linking property 'Y' for element 'iconOUTamt2'
          _view.iconOUTamt2.linkProperty("Visibility",  function() { return EtransOUT2>0; } ); // HtmlView Page linking property 'Visibility' for element 'iconOUTamt2'
          _view.iconOUTamt2.linkProperty("SizeY",  function() { return imgIconSIZE; }, function(_v) { imgIconSIZE = _v; } ); // HtmlView Page linking property 'SizeY' for element 'iconOUTamt2'
          _view.drag6Helper.linkProperty("Y",  function() { return OUT2energyY; }, function(_v) { OUT2energyY = _v; } ); // HtmlView Page linking property 'Y' for element 'drag6Helper'
          _view.dragTout2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragTout2'
          _view.dragTout2.setAction("OnExit", function(_data,_info) {
  OUT2interact = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragTout2'
          _view.dragTout2.setAction("OnDrag", function(_data,_info) {
  OUT2interact = true;

}); // HtmlView Page setting action 'OnDrag' for element 'dragTout2'
          _view.dragTout2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
    //EtransOUT2 = Math.round(EtransOUT2);  // → restrict movements in Ipad Pro
    EtransOUT2 = Math.round(dragEtransOUT2);
    OUT2interact = false;

}); // HtmlView Page setting action 'OnRelease' for element 'dragTout2'
          _view.dragTout2.linkProperty("X",  function() { return OUT2energyX; }, function(_v) { OUT2energyX = _v; } ); // HtmlView Page linking property 'X' for element 'dragTout2'
          _view.dragTout2.setAction("OnEnter", function(_data,_info) {
  OUT2interact = true;

}); // HtmlView Page setting action 'OnEnter' for element 'dragTout2'
          _view.dragTout2.linkProperty("Y",  function() { return dragEtransOUT2; }, function(_v) { dragEtransOUT2 = _v; } ); // HtmlView Page linking property 'Y' for element 'dragTout2'
          _view.dragTout2.linkProperty("Visibility",  function() { return check4b; }, function(_v) { check4b = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragTout2'
          _view.dragTout2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragTout2'
          _view.answer.linkProperty("FillColor",  function() { return answerColour[updateAnswer]; }, function(_v) { answerColour[updateAnswer] = _v; } ); // HtmlView Page linking property 'FillColor' for element 'answer'
          _view.answer.linkProperty("Y",  function() { return answerY; }, function(_v) { answerY = _v; } ); // HtmlView Page linking property 'Y' for element 'answer'
          _view.answer.linkProperty("Text",  function() { return answer[updateAnswer]; }, function(_v) { answer[updateAnswer] = _v; } ); // HtmlView Page linking property 'Text' for element 'answer'
          _view.answer.linkProperty("Visibility",  function() { return showAnswer; }, function(_v) { showAnswer = _v; } ); // HtmlView Page linking property 'Visibility' for element 'answer'
          _view.answerHint.linkProperty("Y",  function() { return hintY; }, function(_v) { hintY = _v; } ); // HtmlView Page linking property 'Y' for element 'answerHint'
          _view.answerHint.linkProperty("Text",  function() { return hint; }, function(_v) { hint = _v; } ); // HtmlView Page linking property 'Text' for element 'answerHint'
          _view.L2.linkProperty("TitleYFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleYFont' for element 'L2'
          _view.L2.linkProperty("TitleXFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleXFont' for element 'L2'
          _view.L2.linkProperty("TitleFont",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'TitleFont' for element 'L2'
          _view.interactPROMPT2.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'interactPROMPT2'
          _view.interactPROMPT2.linkProperty("LineColor",  function() { return promptLineColour; }, function(_v) { promptLineColour = _v; } ); // HtmlView Page linking property 'LineColor' for element 'interactPROMPT2'
          _view.interactPROMPT2.linkProperty("Visibility",  function() { return interactPrompt2; }, function(_v) { interactPrompt2 = _v; } ); // HtmlView Page linking property 'Visibility' for element 'interactPROMPT2'
          _view.interactPROMPT2.linkProperty("SizeY",  function() { return finTotalEnergy; }, function(_v) { finTotalEnergy = _v; } ); // HtmlView Page linking property 'SizeY' for element 'interactPROMPT2'
          _view.shapeSet2.linkProperty("FillColor",  function() { return energyColour; }, function(_v) { energyColour = _v; } ); // HtmlView Page linking property 'FillColor' for element 'shapeSet2'
          _view.shapeSet2.setAction("OnExit", function(_data,_info) {
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'shapeSet2'
          _view.shapeSet2.linkProperty("ElementInteracted",  function() { return elementInteracted; }, function(_v) { elementInteracted = _v; } ); // HtmlView Page linking property 'ElementInteracted' for element 'shapeSet2'
          _view.shapeSet2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  for (let i=0; i< finTotalEnergy.length; i++){
    finTotalEnergy[i] = Math.round(finTotalEnergy[i]);
    }

}); // HtmlView Page setting action 'OnRelease' for element 'shapeSet2'
          _view.shapeSet2.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'shapeSet2'
          _view.shapeSet2.setAction("OnEnter", function(_data,_info) {
  //interactPrompt = true;
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt2, elementInteracted);

}); // HtmlView Page setting action 'OnEnter' for element 'shapeSet2'
          _view.shapeSet2.linkProperty("Visibility",  function() { return [displayChemical, displayElastic, displayGravitational, displayInternal, displayKinetic, displayNuclear]; } ); // HtmlView Page linking property 'Visibility' for element 'shapeSet2'
          _view.shapeSet2.linkProperty("SizeY",  function() { return finTotalEnergy; }, function(_v) { finTotalEnergy = _v; } ); // HtmlView Page linking property 'SizeY' for element 'shapeSet2'
          _view.xlabel2.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'xlabel2'
          _view.xlabel2.linkProperty("Text",  function() { return ["C","E","G","I","K","N"]; } ); // HtmlView Page linking property 'Text' for element 'xlabel2'
          _view.xlabel2.linkProperty("Visibility",  function() { return [displayChemical, displayElastic, displayGravitational, displayInternal, displayKinetic, displayNuclear]; } ); // HtmlView Page linking property 'Visibility' for element 'xlabel2'
          _view.amt2.linkProperty("X",  function() { return energyXpos; }, function(_v) { energyXpos = _v; } ); // HtmlView Page linking property 'X' for element 'amt2'
          _view.amt2.linkProperty("Y",  function() { return finTotalEnergy; }, function(_v) { finTotalEnergy = _v; } ); // HtmlView Page linking property 'Y' for element 'amt2'
          _view.amt2.linkProperty("Text",  function() { return roundTheLst(finTotalEnergy); }, function(_v) { roundTheLst(finTotalEnergy) = _v; } ); // HtmlView Page linking property 'Text' for element 'amt2'
          _view.amt2.linkProperty("Visibility",  function() { return [displayChemical, displayElastic, displayGravitational, displayInternal, displayKinetic, displayNuclear]; } ); // HtmlView Page linking property 'Visibility' for element 'amt2'
          _view.images2D.linkProperty("Visibility",  function() { return show2D; }, function(_v) { show2D = _v; } ); // HtmlView Page linking property 'Visibility' for element 'images2D'
          _view.chemical2.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[0]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'chemical2'
          _view.chemical2.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'chemical2'
          _view.chemical2.linkProperty("X",  function() { return energyXpos[0]; } ); // HtmlView Page linking property 'X' for element 'chemical2'
          _view.chemical2.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[0] ); } ); // HtmlView Page linking property 'Y' for element 'chemical2'
          _view.chemical2.linkProperty("Visibility",  function() { return finTotalEnergy[0]>0; } ); // HtmlView Page linking property 'Visibility' for element 'chemical2'
          _view.chemical2.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'chemical2'
          _view.elastic2.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[1]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'elastic2'
          _view.elastic2.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'elastic2'
          _view.elastic2.linkProperty("X",  function() { return energyXpos[1]; } ); // HtmlView Page linking property 'X' for element 'elastic2'
          _view.elastic2.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[1] ); } ); // HtmlView Page linking property 'Y' for element 'elastic2'
          _view.elastic2.linkProperty("Visibility",  function() { return finTotalEnergy[1]>0; } ); // HtmlView Page linking property 'Visibility' for element 'elastic2'
          _view.elastic2.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'elastic2'
          _view.gravity2.linkProperty("NumberOfElements",  function() { return Math.abs(Math.round(finTotalEnergy[2])); } ); // HtmlView Page linking property 'NumberOfElements' for element 'gravity2'
          _view.gravity2.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'gravity2'
          _view.gravity2.linkProperty("X",  function() { return energyXpos[2]; } ); // HtmlView Page linking property 'X' for element 'gravity2'
          _view.gravity2.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[2] ); } ); // HtmlView Page linking property 'Y' for element 'gravity2'
          _view.gravity2.linkProperty("Visibility",  function() { return Math.abs(finTotalEnergy[2])>0; } ); // HtmlView Page linking property 'Visibility' for element 'gravity2'
          _view.gravity2.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'gravity2'
          _view.internal2.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[3]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'internal2'
          _view.internal2.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'internal2'
          _view.internal2.linkProperty("X",  function() { return energyXpos[3]; } ); // HtmlView Page linking property 'X' for element 'internal2'
          _view.internal2.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[3] ); } ); // HtmlView Page linking property 'Y' for element 'internal2'
          _view.internal2.linkProperty("Visibility",  function() { return finTotalEnergy[3]>0; } ); // HtmlView Page linking property 'Visibility' for element 'internal2'
          _view.internal2.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'internal2'
          _view.kinetic2.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[4]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'kinetic2'
          _view.kinetic2.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'kinetic2'
          _view.kinetic2.linkProperty("X",  function() { return energyXpos[4]; } ); // HtmlView Page linking property 'X' for element 'kinetic2'
          _view.kinetic2.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[4] ); } ); // HtmlView Page linking property 'Y' for element 'kinetic2'
          _view.kinetic2.linkProperty("Visibility",  function() { return finTotalEnergy[4]>0; } ); // HtmlView Page linking property 'Visibility' for element 'kinetic2'
          _view.kinetic2.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'kinetic2'
          _view.nuclear2.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[5]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'nuclear2'
          _view.nuclear2.linkProperty("SizeX",  function() { return size2DX; }, function(_v) { size2DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'nuclear2'
          _view.nuclear2.linkProperty("X",  function() { return energyXpos[5]; } ); // HtmlView Page linking property 'X' for element 'nuclear2'
          _view.nuclear2.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[5] ); } ); // HtmlView Page linking property 'Y' for element 'nuclear2'
          _view.nuclear2.linkProperty("Visibility",  function() { return finTotalEnergy[5]>0; } ); // HtmlView Page linking property 'Visibility' for element 'nuclear2'
          _view.nuclear2.linkProperty("SizeY",  function() { return size2DY; }, function(_v) { size2DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'nuclear2'
          _view.images3D2.linkProperty("Visibility",  function() { return show3D; }, function(_v) { show3D = _v; } ); // HtmlView Page linking property 'Visibility' for element 'images3D2'
          _view.chemical22.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[0]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'chemical22'
          _view.chemical22.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'chemical22'
          _view.chemical22.linkProperty("X",  function() { return energyXpos[0]; } ); // HtmlView Page linking property 'X' for element 'chemical22'
          _view.chemical22.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[0] ); } ); // HtmlView Page linking property 'Y' for element 'chemical22'
          _view.chemical22.linkProperty("Visibility",  function() { return finTotalEnergy[0]>0; } ); // HtmlView Page linking property 'Visibility' for element 'chemical22'
          _view.chemical22.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'chemical22'
          _view.elastic22.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[1]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'elastic22'
          _view.elastic22.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'elastic22'
          _view.elastic22.linkProperty("X",  function() { return energyXpos[1]; } ); // HtmlView Page linking property 'X' for element 'elastic22'
          _view.elastic22.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[1] ); } ); // HtmlView Page linking property 'Y' for element 'elastic22'
          _view.elastic22.linkProperty("Visibility",  function() { return finTotalEnergy[1]>0; } ); // HtmlView Page linking property 'Visibility' for element 'elastic22'
          _view.elastic22.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'elastic22'
          _view.gravity22.linkProperty("NumberOfElements",  function() { return Math.abs(Math.round(finTotalEnergy[2])); } ); // HtmlView Page linking property 'NumberOfElements' for element 'gravity22'
          _view.gravity22.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'gravity22'
          _view.gravity22.linkProperty("X",  function() { return energyXpos[2]; } ); // HtmlView Page linking property 'X' for element 'gravity22'
          _view.gravity22.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[2] ); } ); // HtmlView Page linking property 'Y' for element 'gravity22'
          _view.gravity22.linkProperty("Visibility",  function() { return Math.abs(finTotalEnergy[2])>0; } ); // HtmlView Page linking property 'Visibility' for element 'gravity22'
          _view.gravity22.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'gravity22'
          _view.internal22.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[3]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'internal22'
          _view.internal22.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'internal22'
          _view.internal22.linkProperty("X",  function() { return energyXpos[3]; } ); // HtmlView Page linking property 'X' for element 'internal22'
          _view.internal22.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[3] ); } ); // HtmlView Page linking property 'Y' for element 'internal22'
          _view.internal22.linkProperty("Visibility",  function() { return finTotalEnergy[3]>0; } ); // HtmlView Page linking property 'Visibility' for element 'internal22'
          _view.internal22.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'internal22'
          _view.kinetic22.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[4]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'kinetic22'
          _view.kinetic22.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'kinetic22'
          _view.kinetic22.linkProperty("X",  function() { return energyXpos[4]; } ); // HtmlView Page linking property 'X' for element 'kinetic22'
          _view.kinetic22.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[4] ); } ); // HtmlView Page linking property 'Y' for element 'kinetic22'
          _view.kinetic22.linkProperty("Visibility",  function() { return finTotalEnergy[4]>0; } ); // HtmlView Page linking property 'Visibility' for element 'kinetic22'
          _view.kinetic22.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'kinetic22'
          _view.nuclear22.linkProperty("NumberOfElements",  function() { return Math.round(finTotalEnergy[5]); } ); // HtmlView Page linking property 'NumberOfElements' for element 'nuclear22'
          _view.nuclear22.linkProperty("SizeX",  function() { return size3DX; }, function(_v) { size3DX = _v; } ); // HtmlView Page linking property 'SizeX' for element 'nuclear22'
          _view.nuclear22.linkProperty("X",  function() { return energyXpos[5]; } ); // HtmlView Page linking property 'X' for element 'nuclear22'
          _view.nuclear22.linkProperty("Y",  function() { return numberedLst( finTotalEnergy[5] ); } ); // HtmlView Page linking property 'Y' for element 'nuclear22'
          _view.nuclear22.linkProperty("Visibility",  function() { return finTotalEnergy[5]>0; } ); // HtmlView Page linking property 'Visibility' for element 'nuclear22'
          _view.nuclear22.linkProperty("SizeY",  function() { return size3DY; }, function(_v) { size3DY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'nuclear22'
          _view.dragC2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragC2'
          _view.dragC2.setAction("OnExit", function(_data,_info) {
  elementInteracted = 0 
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragC2'
          _view.dragC2.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 0 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt2, elementInteracted);
  // finTotalEnergy[elementInteracted] = Math.round(dragC2Y);

}); // HtmlView Page setting action 'OnDrag' for element 'dragC2'
          _view.dragC2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 0 
    finTotalEnergy[elementInteracted] = Math.round(dragC2Y);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragC2'
          _view.dragC2.linkProperty("X",  function() { return energyXpos[0]; } ); // HtmlView Page linking property 'X' for element 'dragC2'
          _view.dragC2.linkProperty("Y",  function() { return dragC2Y; }, function(_v) { dragC2Y = _v; } ); // HtmlView Page linking property 'Y' for element 'dragC2'
          _view.dragC2.linkProperty("Visibility",  function() { return displayChemical; }, function(_v) { displayChemical = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragC2'
          _view.dragC2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragC2'
          _view.dragE2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragE2'
          _view.dragE2.setAction("OnExit", function(_data,_info) {
  elementInteracted = 1
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragE2'
          _view.dragE2.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  elementInteracted = 1 
  oneTrueLst(interactPrompt2, elementInteracted);
   //finTotalEnergy[elementInteracted] = Math.round(dragE2Y);

}); // HtmlView Page setting action 'OnDrag' for element 'dragE2'
          _view.dragE2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 1 
    finTotalEnergy[elementInteracted] = Math.round(dragE2Y);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragE2'
          _view.dragE2.linkProperty("X",  function() { return energyXpos[1]; } ); // HtmlView Page linking property 'X' for element 'dragE2'
          _view.dragE2.linkProperty("Y",  function() { return dragE2Y; }, function(_v) { dragE2Y = _v; } ); // HtmlView Page linking property 'Y' for element 'dragE2'
          _view.dragE2.linkProperty("Visibility",  function() { return displayElastic; }, function(_v) { displayElastic = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragE2'
          _view.dragE2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragE2'
          _view.dragG2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragG2'
          _view.dragG2.setAction("OnExit", function(_data,_info) {
  elementInteracted = 2
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragG2'
          _view.dragG2.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  elementInteracted = 2 
  oneTrueLst(interactPrompt2, elementInteracted);
  // finTotalEnergy[elementInteracted] = Math.round(dragG2Y);

}); // HtmlView Page setting action 'OnDrag' for element 'dragG2'
          _view.dragG2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 2
    finTotalEnergy[elementInteracted] = Math.round(dragG2Y);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragG2'
          _view.dragG2.linkProperty("X",  function() { return energyXpos[2]; } ); // HtmlView Page linking property 'X' for element 'dragG2'
          _view.dragG2.linkProperty("Y",  function() { return dragG2Y; }, function(_v) { dragG2Y = _v; } ); // HtmlView Page linking property 'Y' for element 'dragG2'
          _view.dragG2.linkProperty("Visibility",  function() { return displayGravitational; }, function(_v) { displayGravitational = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragG2'
          _view.dragG2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragG2'
          _view.dragI2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragI2'
          _view.dragI2.setAction("OnExit", function(_data,_info) {
  elementInteracted = 3 
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragI2'
          _view.dragI2.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 3 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt2, elementInteracted);
   //finTotalEnergy[elementInteracted] = Math.round(dragI2Y);

}); // HtmlView Page setting action 'OnDrag' for element 'dragI2'
          _view.dragI2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 3 
    finTotalEnergy[elementInteracted] = Math.round(dragI2Y);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragI2'
          _view.dragI2.linkProperty("X",  function() { return energyXpos[3]; } ); // HtmlView Page linking property 'X' for element 'dragI2'
          _view.dragI2.linkProperty("Y",  function() { return dragI2Y; }, function(_v) { dragI2Y = _v; } ); // HtmlView Page linking property 'Y' for element 'dragI2'
          _view.dragI2.linkProperty("Visibility",  function() { return displayInternal; }, function(_v) { displayInternal = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragI2'
          _view.dragI2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragI2'
          _view.dragK2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragK2'
          _view.dragK2.setAction("OnExit", function(_data,_info) {
  elementInteracted = 4 
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragK2'
          _view.dragK2.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 4 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt2, elementInteracted);
  // finTotalEnergy[elementInteracted] = Math.round(dragK2Y);

}); // HtmlView Page setting action 'OnDrag' for element 'dragK2'
          _view.dragK2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 4 
    finTotalEnergy[elementInteracted] = Math.round(dragK2Y);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragK2'
          _view.dragK2.linkProperty("X",  function() { return energyXpos[4]; } ); // HtmlView Page linking property 'X' for element 'dragK2'
          _view.dragK2.linkProperty("Y",  function() { return dragK2Y; }, function(_v) { dragK2Y = _v; } ); // HtmlView Page linking property 'Y' for element 'dragK2'
          _view.dragK2.linkProperty("Visibility",  function() { return displayKinetic; }, function(_v) { displayKinetic = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragK2'
          _view.dragK2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragK2'
          _view.dragN2.linkProperty("FillColor",  function() { return fillColorforDrag; }, function(_v) { fillColorforDrag = _v; } ); // HtmlView Page linking property 'FillColor' for element 'dragN2'
          _view.dragN2.setAction("OnExit", function(_data,_info) {
  elementInteracted = 5 
  interactPrompt2[elementInteracted] = false;

}); // HtmlView Page setting action 'OnExit' for element 'dragN2'
          _view.dragN2.setAction("OnDrag", function(_data,_info) {
  //interactPrompt[elementInteracted]= true;
  elementInteracted = 5 
  // Fixed bug on element remaining true when moved to another part of the same ShapeSet: //
  oneTrueLst(interactPrompt2, elementInteracted);
  // finTotalEnergy[elementInteracted] = Math.round(dragN2Y);

}); // HtmlView Page setting action 'OnDrag' for element 'dragN2'
          _view.dragN2.setAction("OnRelease", function(_data,_info) {
  // Restrict numbers to integers //
  //for (let i=0; i< iniTotalEnergy.length; i++){
    elementInteracted = 5 
    finTotalEnergy[elementInteracted] = Math.round(dragN2Y);
    //}

}); // HtmlView Page setting action 'OnRelease' for element 'dragN2'
          _view.dragN2.linkProperty("X",  function() { return energyXpos[5]; } ); // HtmlView Page linking property 'X' for element 'dragN2'
          _view.dragN2.linkProperty("Y",  function() { return dragN2Y; }, function(_v) { dragN2Y = _v; } ); // HtmlView Page linking property 'Y' for element 'dragN2'
          _view.dragN2.linkProperty("Visibility",  function() { return displayNuclear; }, function(_v) { displayNuclear = _v; } ); // HtmlView Page linking property 'Visibility' for element 'dragN2'
          _view.dragN2.linkProperty("SizeY",  function() { return dragSizeY; }, function(_v) { dragSizeY = _v; } ); // HtmlView Page linking property 'SizeY' for element 'dragN2'
          _view.descriptions.linkProperty("Font",  function() { return font; }, function(_v) { font = _v; } ); // HtmlView Page linking property 'Font' for element 'descriptions'
          _view.formula.linkProperty("CSS",  function() { return {   "display": "inline-block",   "padding": "10px", }; } ); // HtmlView Page linking property 'CSS' for element 'formula'
          _view.formulaText.linkProperty("Text",  function() { return formulaText; }, function(_v) { formulaText = _v; } ); // HtmlView Page linking property 'Text' for element 'formulaText'
          _view.legendText.linkProperty("Text",  function() { return legendText; }, function(_v) { legendText = _v; } ); // HtmlView Page linking property 'Text' for element 'legendText'
          _view.label.linkProperty("Width",  function() { return physicsonly?"15%":"10%"; } ); // HtmlView Page linking property 'Width' for element 'label'
          _view.waves.linkProperty("Width",  function() { return physicsonly?"25%":"20%"; } ); // HtmlView Page linking property 'Width' for element 'waves'
          _view.waves.linkProperty("Tooltip",  function() { return pTooltip; }, function(_v) { pTooltip = _v; } ); // HtmlView Page linking property 'Tooltip' for element 'waves'
          _view.mechanic.linkProperty("Width",  function() { return physicsonly?"20%":"15%"; } ); // HtmlView Page linking property 'Width' for element 'mechanic'
          _view.mechanic.linkProperty("Tooltip",  function() { return mTooltip; }, function(_v) { mTooltip = _v; } ); // HtmlView Page linking property 'Tooltip' for element 'mechanic'
          _view.fire.linkProperty("Width",  function() { return physicsonly?"20%":"15%"; } ); // HtmlView Page linking property 'Width' for element 'fire'
          _view.fire.linkProperty("Tooltip",  function() { return hTooltip; }, function(_v) { hTooltip = _v; } ); // HtmlView Page linking property 'Tooltip' for element 'fire'
          _view.electric.linkProperty("Width",  function() { return physicsonly?"20%":"15%"; } ); // HtmlView Page linking property 'Width' for element 'electric'
          _view.electric.linkProperty("Tooltip",  function() { return eTooltip; }, function(_v) { eTooltip = _v; } ); // HtmlView Page linking property 'Tooltip' for element 'electric'
          _view.chemically.linkProperty("Display",  function() { return physicsonly?"none":"inline-block"; } ); // HtmlView Page linking property 'Display' for element 'chemically'
          break;
      } // end of switch
    }; // end of new reset

    _model.setView(_view);
    _model.reset();
    _view._enableEPub();
  } // end of _selectView

  _model.setAutoplay(false);
  _model.setFPS(20);
  _model.setStepsPerDisplay(1);
  _selectView(_model._autoSelectView(_getViews())); // this includes _model.reset()
  return _model;
}
function LOLMasterTemplateV7_View (_topFrame,_viewNumber,_libraryPath,_codebasePath) {
  var _view;
  switch(_viewNumber) {
    case -10 : break; // make Lint happy
    default :
    case 0: _view = LOLMasterTemplateV7_View_0 (_topFrame); break;
  } // end of switch

  if (_codebasePath) _view._setResourcePath(_codebasePath);

  if (_libraryPath) _view._setLibraryPath(_libraryPath);


  return _view;
} // end of main function

function LOLMasterTemplateV7_View_0 (_topFrame) {
  var _view = EJSS_CORE.createView(_topFrame);

  _view._reset = function() {
    _view._clearAll();
    _view._addElement(EJSS_INTERFACE.panel,"fullscreen", _view._topFrame) // EJsS HtmlView.HtmlView Page: declaration of element 'fullscreen'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'fullscreen'
      .setProperty("Display","inlne-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'fullscreen'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"answersTOEDIT", _view.fullscreen) // EJsS HtmlView.HtmlView Page: declaration of element 'answersTOEDIT'
      .setProperty("Width","25%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'answersTOEDIT'
      .setProperty("CSS",{   "padding": "5px", "vertical-align": "top" }) // EJsS HtmlView.HtmlView Page: setting property 'CSS' for element 'answersTOEDIT'
      .setProperty("Tooltip","change all the text in Grey color on the Master Template and click Download the Simulation") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'answersTOEDIT'
      .setProperty("BorderColor","Black") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'answersTOEDIT'
      .setProperty("Html","<p><b> Checks </b> </p>") // EJsS HtmlView.HtmlView Page: setting property 'Html' for element 'answersTOEDIT'
      .setProperty("BorderWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'answersTOEDIT'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check1", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check1'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check1words", _view.check1) // EJsS HtmlView.HtmlView Page: declaration of element 'check1words'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'check1words'
      .setProperty("Tooltip","Hide Unnecessary Energy Stores:  Identify any energy forms that are not relevant or do not contribute significantly to the understanding of the context. Ensure these irrelevant energy forms or stores are not displayed to avoid confusion or clutter.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check1words'
      .setProperty("Text","Check 1) What energy stores to show? Hide unnecessary stores") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check1words'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"panel22", _view.check1) // EJsS HtmlView.HtmlView Page: declaration of element 'panel22'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"displayChemical", _view.panel22) // EJsS HtmlView.HtmlView Page: declaration of element 'displayChemical'
      .setProperty("Text","C") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'displayChemical'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"displayElastic", _view.panel22) // EJsS HtmlView.HtmlView Page: declaration of element 'displayElastic'
      .setProperty("Text","E") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'displayElastic'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"displayGravitational", _view.panel22) // EJsS HtmlView.HtmlView Page: declaration of element 'displayGravitational'
      .setProperty("Text","G") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'displayGravitational'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"displayInternal", _view.panel22) // EJsS HtmlView.HtmlView Page: declaration of element 'displayInternal'
      .setProperty("Text","I") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'displayInternal'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"displayKinetic", _view.panel22) // EJsS HtmlView.HtmlView Page: declaration of element 'displayKinetic'
      .setProperty("Text","K") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'displayKinetic'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"displayNuclear", _view.panel22) // EJsS HtmlView.HtmlView Page: declaration of element 'displayNuclear'
      .setProperty("Text","N") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'displayNuclear'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check2", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check2'
      .setProperty("Tooltip","Some energy may be ignored in check 5 and 6 as it does not affect the system.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check2'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check2words", _view.check2) // EJsS HtmlView.HtmlView Page: declaration of element 'check2words'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'check2words'
      .setProperty("Tooltip","Identify which forms of energy can be non-zero, such as gravitational potential energy (GPE)") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check2words'
      .setProperty("Text","Check 2) What energy can be non-zero, like GPE?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check2words'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"panel2", _view.check2) // EJsS HtmlView.HtmlView Page: declaration of element 'panel2'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"isC", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'isC'
      .setProperty("Text","C") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isC'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"isE", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'isE'
      .setProperty("Text","E") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isE'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"isG", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'isG'
      .setProperty("Text","G") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isG'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"isI", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'isI'
      .setProperty("Text","I") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isI'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"isK", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'isK'
      .setProperty("Text","K") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isK'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"isN", _view.panel2) // EJsS HtmlView.HtmlView Page: declaration of element 'isN'
      .setProperty("Text","N") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isN'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check3", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check3'
      .setProperty("Background","rgba(222,222,222,1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'check3'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3words", _view.check3) // EJsS HtmlView.HtmlView Page: declaration of element 'check3words'
      .setProperty("Tooltip","Determine how many types of energy are being transferred in.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check3words'
      .setProperty("Text","Check 3) How many type(s) of energy is/are transferred IN?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3words'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"zeroIN", _view.check3) // EJsS HtmlView.HtmlView Page: declaration of element 'zeroIN'
      .setProperty("Text","0") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'zeroIN'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"oneIN", _view.check3) // EJsS HtmlView.HtmlView Page: declaration of element 'oneIN'
      .setProperty("Text","1") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'oneIN'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"twoIN", _view.check3) // EJsS HtmlView.HtmlView Page: declaration of element 'twoIN'
      .setProperty("Text","2") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'twoIN'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check3a", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check3a'
      .setProperty("Background","rgba(222,222,222,1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'check3a'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3Awords", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Awords'
      .setProperty("Tooltip","Identify which types of energy are being transferred in") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check3Awords'
      .setProperty("Text","Check 3a) What type of energy is transferred in?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3Awords'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isPropagationIN", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'isPropagationIN'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isMechanicIN", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'isMechanicIN'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isHeatingIN", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'isHeatingIN'
      .setProperty("Text","Heating") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isHeatingIN'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isElectricIN", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'isElectricIN'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isChemicalIN", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'isChemicalIN'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3Areaonss", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Areaonss'
      .setProperty("Text",", due to ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3Areaonss'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"check3Areason", _view.check3a) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Areason'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'check3Areason'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'check3Areason'
      .setProperty("Tooltip","Reasoning for type of energy being transfered.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check3Areason'
      .setProperty("Display","inline") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'check3Areason'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check3b", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check3b'
      .setProperty("Background","rgba(222,222,222,1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'check3b'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3Bwords", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Bwords'
      .setProperty("Text","Check 3b) What type of energy is transferred in?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3Bwords'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isPropagationIN2", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'isPropagationIN2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isMechanicIN2", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'isMechanicIN2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isHeatingIN2", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'isHeatingIN2'
      .setProperty("Text","Heating") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isHeatingIN2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isElectricIN2", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'isElectricIN2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isChemicalIN2", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'isChemicalIN2'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3Areaonss2", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Areaonss2'
      .setProperty("Text",", due to ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3Areaonss2'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"check3Breason", _view.check3b) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Breason'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'check3Breason'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'check3Breason'
      .setProperty("Tooltip","Reasoning for type of energy being transfered.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check3Breason'
      .setProperty("Display","inline") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'check3Breason'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check4", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check4'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check4words", _view.check4) // EJsS HtmlView.HtmlView Page: declaration of element 'check4words'
      .setProperty("Tooltip","Determine how many types of energy are being transferred out") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check4words'
      .setProperty("Text","Check 4) How many type(s) of energy is/are transferred OUT?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check4words'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"zeroOUT", _view.check4) // EJsS HtmlView.HtmlView Page: declaration of element 'zeroOUT'
      .setProperty("Text","0") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'zeroOUT'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"oneOUT", _view.check4) // EJsS HtmlView.HtmlView Page: declaration of element 'oneOUT'
      .setProperty("Text","1") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'oneOUT'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"twoOUT", _view.check4) // EJsS HtmlView.HtmlView Page: declaration of element 'twoOUT'
      .setProperty("Text","2") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'twoOUT'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check4a", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check4a'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check4Awords", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'check4Awords'
      .setProperty("Text","Check 4a) What type of energy is transferred out?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check4Awords'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isPropagationOUT", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'isPropagationOUT'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isMechanicOUT", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'isMechanicOUT'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isHeatingOUT", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'isHeatingOUT'
      .setProperty("Text","Heating") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isHeatingOUT'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isElectricOUT", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'isElectricOUT'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isChemicalOUT", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'isChemicalOUT'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3Areaonss3", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Areaonss3'
      .setProperty("Text",", due to ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3Areaonss3'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"check4Areason", _view.check4a) // EJsS HtmlView.HtmlView Page: declaration of element 'check4Areason'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'check4Areason'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'check4Areason'
      .setProperty("Tooltip","Reasoning for type of energy being transfered.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check4Areason'
      .setProperty("Display","inline") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'check4Areason'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check4b", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check4b'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check4Bwords", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'check4Bwords'
      .setProperty("Text","Check 4b) What type of energy is transferred out?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check4Bwords'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isPropagationOUT2", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'isPropagationOUT2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isMechanicOUT2", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'isMechanicOUT2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isHeatingOUT2", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'isHeatingOUT2'
      .setProperty("Text","Heating") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'isHeatingOUT2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isElectricOUT2", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'isElectricOUT2'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"isChemicalOUT2", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'isChemicalOUT2'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check3Areaonss32", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'check3Areaonss32'
      .setProperty("Text",", due to ") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check3Areaonss32'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"check4Breason", _view.check4b) // EJsS HtmlView.HtmlView Page: declaration of element 'check4Breason'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'check4Breason'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'check4Breason'
      .setProperty("Tooltip","Reasoning for type of energy being transfered.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check4Breason'
      .setProperty("Display","inline") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'check4Breason'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check5", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check5'
      .setProperty("Background","rgba(222,222,222,1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'check5'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check2words2", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'check2words2'
      .setProperty("Tooltip","Identify the types of energy present in the initial state.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'check2words2'
      .setProperty("Text","Check 5) What energy(ies) is/are present, ie.>0 in the INITIAL state?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check2words2'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"iniC", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'iniC'
      .setProperty("Text","C") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'iniC'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"iniE", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'iniE'
      .setProperty("Text","E") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'iniE'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"iniG", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'iniG'
      .setProperty("Text","G") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'iniG'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"iniI", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'iniI'
      .setProperty("Text","I") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'iniI'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"iniK", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'iniK'
      .setProperty("Text","K") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'iniK'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"iniN", _view.check5) // EJsS HtmlView.HtmlView Page: declaration of element 'iniN'
      .setProperty("Text","N") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'iniN'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check6", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check6'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check2words22", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'check2words22'
      .setProperty("Text","Check 6) What energy(ies) is/are present, ie>0 in the FINAL state?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check2words22'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"finC", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'finC'
      .setProperty("Text","C") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'finC'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"finE", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'finE'
      .setProperty("Text","E") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'finE'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"finG", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'finG'
      .setProperty("Text","G") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'finG'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"finI", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'finI'
      .setProperty("Text","I") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'finI'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"finK", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'finK'
      .setProperty("Text","K") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'finK'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"finN", _view.check6) // EJsS HtmlView.HtmlView Page: declaration of element 'finN'
      .setProperty("Text","N") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'finN'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check7_conditions", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'check7_conditions'
      .setProperty("Background","rgba(222,222,222,1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'check7_conditions'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"check7words", _view.check7_conditions) // EJsS HtmlView.HtmlView Page: declaration of element 'check7words'
      .setProperty("Text","Check 7) Code other conditions?") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'check7words'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"No", _view.check7_conditions) // EJsS HtmlView.HtmlView Page: declaration of element 'No'
      .setProperty("Text","No") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'No'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"Yes", _view.check7_conditions) // EJsS HtmlView.HtmlView Page: declaration of element 'Yes'
      .setProperty("Text","Yes") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'Yes'
      ;

    _view._addElement(EJSS_INTERFACE.button,"runCodeButton", _view.check7_conditions) // EJsS HtmlView.HtmlView Page: declaration of element 'runCodeButton'
      .setProperty("Tooltip","Please check your code.") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'runCodeButton'
      .setProperty("TextAlign","center") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'runCodeButton'
      .setProperty("Foreground","rgba(0,192,192,1)") // EJsS HtmlView.HtmlView Page: setting property 'Foreground' for element 'runCodeButton'
      .setProperty("Text","✓ Apply Code") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'runCodeButton'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"check7a", _view.check7_conditions) // EJsS HtmlView.HtmlView Page: declaration of element 'check7a'
      ;

    _view._addElement(EJSS_INTERFACE.textArea,"userCode", _view.check7a) // EJsS HtmlView.HtmlView Page: declaration of element 'userCode'
      .setProperty("Height","30vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'userCode'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'userCode'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"download", _view.answersTOEDIT) // EJsS HtmlView.HtmlView Page: declaration of element 'download'
      ;

    _view._addElement(EJSS_INTERFACE.button,"downloadButton", _view.download) // EJsS HtmlView.HtmlView Page: declaration of element 'downloadButton'
      .setProperty("Tooltip","only works on server") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'downloadButton'
      .setProperty("Text","⌊↧⌋ Download the simulation") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'downloadButton'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"masterPanel", _view.fullscreen) // EJsS HtmlView.HtmlView Page: declaration of element 'masterPanel'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'masterPanel'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"setting", _view.masterPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'setting'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'setting'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"Titlepanel2", _view.setting) // EJsS HtmlView.HtmlView Page: declaration of element 'Titlepanel2'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'Titlepanel2'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"MAster", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'MAster'
      .setProperty("Text","Master Template for all LOL diagrams") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'MAster'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"showNone", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'showNone'
      .setProperty("Checked",false) // EJsS HtmlView.HtmlView Page: setting property 'Checked' for element 'showNone'
      .setProperty("Background","Pink") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'showNone'
      .setProperty("Text","Show Bar") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'showNone'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"show2D", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'show2D'
      .setProperty("Background","Pink") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'show2D'
      .setProperty("Text","Show Squares") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'show2D'
      ;

    _view._addElement(EJSS_INTERFACE.radioButton,"show3D", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'show3D'
      .setProperty("Background","Pink") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'show3D'
      .setProperty("Text","Show Cubes") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'show3D'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"title", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'title'
      .setProperty("Width","50%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'title'
      .setProperty("Display","none") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'title'
      ;

    _view._addElement(EJSS_INTERFACE.comboBox,"scenarios", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'scenarios'
      .setProperty("Display","none") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'scenarios'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"showAnswer", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'showAnswer'
      .setProperty("Checked",true) // EJsS HtmlView.HtmlView Page: setting property 'Checked' for element 'showAnswer'
      .setProperty("Background","Pink") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'showAnswer'
      .setProperty("Text","Show Answer") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'showAnswer'
      .setProperty("Display","none") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'showAnswer'
      ;

    _view._addElement(EJSS_INTERFACE.twoStateButton,"EditAnswer", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'EditAnswer'
      .setProperty("TextOn","✎ Edit Answer Key") // EJsS HtmlView.HtmlView Page: setting property 'TextOn' for element 'EditAnswer'
      .setProperty("TextOff","✓ Save Edits") // EJsS HtmlView.HtmlView Page: setting property 'TextOff' for element 'EditAnswer'
      .setProperty("Display","none") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'EditAnswer'
      ;

    _view._addElement(EJSS_INTERFACE.checkBox,"checkBox", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'checkBox'
      ;

    _view._addElement(EJSS_INTERFACE.button,"revealBtn", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'revealBtn'
      .setProperty("Tooltip","Reveal a possible solution") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'revealBtn'
      .setProperty("Text","Reveal 📖") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'revealBtn'
      ;

    _view._addElement(EJSS_INTERFACE.button,"hintButton", _view.Titlepanel2) // EJsS HtmlView.HtmlView Page: declaration of element 'hintButton'
      .setProperty("Background","Pink") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'hintButton'
      .setProperty("Text","Hint 🔍") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'hintButton'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"systemWords", _view.setting) // EJsS HtmlView.HtmlView Page: declaration of element 'systemWords'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'systemWords'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'systemWords'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"system_panel", _view.systemWords) // EJsS HtmlView.HtmlView Page: declaration of element 'system_panel'
      .setProperty("Width","45%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'system_panel'
      .setProperty("CSS",{"float": "left"}) // EJsS HtmlView.HtmlView Page: setting property 'CSS' for element 'system_panel'
      .setProperty("BorderColor","rgba(225,0,0,0.5)") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'system_panel'
      .setProperty("BorderWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'system_panel'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'system_panel'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"systemBolded", _view.system_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'systemBolded'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'systemBolded'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'systemBolded'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"system2", _view.system_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'system2'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'system2'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"system_textField", _view.system_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'system_textField'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'system_textField'
      .setProperty("Width","70%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'system_textField'
      .setProperty("Tooltip","System") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'system_textField'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"remarks_panel", _view.systemWords) // EJsS HtmlView.HtmlView Page: declaration of element 'remarks_panel'
      .setProperty("Width","45%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'remarks_panel'
      .setProperty("CSS",{"float": "left"}) // EJsS HtmlView.HtmlView Page: setting property 'CSS' for element 'remarks_panel'
      .setProperty("BorderColor","rgba(225,0,0,0.5)") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'remarks_panel'
      .setProperty("BorderWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'remarks_panel'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'remarks_panel'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"remarks", _view.remarks_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'remarks'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'remarks'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'remarks'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"finalState22", _view.remarks_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'finalState22'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'finalState22'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"remarks_textField", _view.remarks_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'remarks_textField'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'remarks_textField'
      .setProperty("Width","70%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'remarks_textField'
      .setProperty("Tooltip","Remarks") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'remarks_textField'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"stateWords", _view.setting) // EJsS HtmlView.HtmlView Page: declaration of element 'stateWords'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'stateWords'
      .setProperty("Display","block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'stateWords'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"initialState_panel", _view.stateWords) // EJsS HtmlView.HtmlView Page: declaration of element 'initialState_panel'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'initialState_panel'
      .setProperty("BorderColor","rgba(225,0,0,0.5)") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'initialState_panel'
      .setProperty("BorderWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'initialState_panel'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'initialState_panel'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"initialState", _view.initialState_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'initialState'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'initialState'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'initialState'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"initialState2", _view.initialState_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'initialState2'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'initialState2'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"initialState_textField", _view.initialState_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'initialState_textField'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'initialState_textField'
      .setProperty("Width","80%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'initialState_textField'
      .setProperty("Tooltip","Initial State") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'initialState_textField'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"finalState_panel", _view.stateWords) // EJsS HtmlView.HtmlView Page: declaration of element 'finalState_panel'
      .setProperty("Width","90%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'finalState_panel'
      .setProperty("BorderColor","rgba(225,0,0,0.5)") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'finalState_panel'
      .setProperty("BorderWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'finalState_panel'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'finalState_panel'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"finalState", _view.finalState_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'finalState'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'finalState'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'finalState'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"finalState2", _view.finalState_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'finalState2'
      .setProperty("TextAlign","left") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'finalState2'
      ;

    _view._addElement(EJSS_INTERFACE.textField,"finalState_textField", _view.finalState_panel) // EJsS HtmlView.HtmlView Page: declaration of element 'finalState_textField'
      .setProperty("Height","2vh") // EJsS HtmlView.HtmlView Page: setting property 'Height' for element 'finalState_textField'
      .setProperty("Width","80%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'finalState_textField'
      .setProperty("Tooltip","Final State") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'finalState_textField'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"energyTransferONE", _view.setting) // EJsS HtmlView.HtmlView Page: declaration of element 'energyTransferONE'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'energyTransferONE'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'energyTransferONE'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"IN", _view.energyTransferONE) // EJsS HtmlView.HtmlView Page: declaration of element 'IN'
      .setProperty("Background","rgba(0,150,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'IN'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"energyIN", _view.IN) // EJsS HtmlView.HtmlView Page: declaration of element 'energyIN'
      .setProperty("Text","<b>Energy Transfer In: </b>") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'energyIN'
      ;

    _view._addElement(EJSS_INTERFACE.comboBox,"energyTypeIN", _view.IN) // EJsS HtmlView.HtmlView Page: declaration of element 'energyTypeIN'
      ;

    _view._addElement(EJSS_INTERFACE.numberField,"field", _view.IN) // EJsS HtmlView.HtmlView Page: declaration of element 'field'
      .setProperty("Width","3vw") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'field'
      .setProperty("Format","1") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'field'
      .setProperty("Tooltip","EtransIN") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'field'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"OUT", _view.energyTransferONE) // EJsS HtmlView.HtmlView Page: declaration of element 'OUT'
      .setProperty("Background","rgba(0,150,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'OUT'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"energyOUT", _view.OUT) // EJsS HtmlView.HtmlView Page: declaration of element 'energyOUT'
      .setProperty("TextAlign","right") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'energyOUT'
      .setProperty("Text","<b>Energy Transfer Out: </b>") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'energyOUT'
      ;

    _view._addElement(EJSS_INTERFACE.comboBox,"energyTypeOUT", _view.OUT) // EJsS HtmlView.HtmlView Page: declaration of element 'energyTypeOUT'
      ;

    _view._addElement(EJSS_INTERFACE.numberField,"field2", _view.OUT) // EJsS HtmlView.HtmlView Page: declaration of element 'field2'
      .setProperty("Width","3vw") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'field2'
      .setProperty("Format","1") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'field2'
      .setProperty("Tooltip","EtransOUT") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'field2'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"energyTransferTWO", _view.setting) // EJsS HtmlView.HtmlView Page: declaration of element 'energyTransferTWO'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'energyTransferTWO'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'energyTransferTWO'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"IN2", _view.energyTransferTWO) // EJsS HtmlView.HtmlView Page: declaration of element 'IN2'
      .setProperty("Background","rgba(0,255,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'IN2'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"energyIN3", _view.IN2) // EJsS HtmlView.HtmlView Page: declaration of element 'energyIN3'
      .setProperty("Text","<b>Energy Transfer In: </b>") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'energyIN3'
      ;

    _view._addElement(EJSS_INTERFACE.comboBox,"energyTypeIN2", _view.IN2) // EJsS HtmlView.HtmlView Page: declaration of element 'energyTypeIN2'
      ;

    _view._addElement(EJSS_INTERFACE.numberField,"field3", _view.IN2) // EJsS HtmlView.HtmlView Page: declaration of element 'field3'
      .setProperty("Width","3vw") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'field3'
      .setProperty("Format","1") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'field3'
      .setProperty("Tooltip","EtransIN2") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'field3'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"OUT2", _view.energyTransferTWO) // EJsS HtmlView.HtmlView Page: declaration of element 'OUT2'
      .setProperty("Background","rgba(0,255,255,1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'OUT2'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"energyOUT3", _view.OUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'energyOUT3'
      .setProperty("TextAlign","right") // EJsS HtmlView.HtmlView Page: setting property 'TextAlign' for element 'energyOUT3'
      .setProperty("Text","<b>Energy Transfer Out: </b>") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'energyOUT3'
      ;

    _view._addElement(EJSS_INTERFACE.comboBox,"energyTypeOUT2", _view.OUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'energyTypeOUT2'
      ;

    _view._addElement(EJSS_INTERFACE.numberField,"field22", _view.OUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'field22'
      .setProperty("Width","3vw") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'field22'
      .setProperty("Format","1") // EJsS HtmlView.HtmlView Page: setting property 'Format' for element 'field22'
      .setProperty("Tooltip","EtransOUT2") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'field22'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"panel", _view.masterPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'panel'
      ;

    _view._addElement(EJSS_DRAWING2D.plottingPanel,"L", _view.panel) // EJsS HtmlView.HtmlView Page: declaration of element 'L'
      .setProperty("Width","33%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'L'
      .setProperty("ShowAreaRectangle",false) // EJsS HtmlView.HtmlView Page: setting property 'ShowAreaRectangle' for element 'L'
      .setProperty("Gutters",[50,50,0,50]) // EJsS HtmlView.HtmlView Page: setting property 'Gutters' for element 'L'
      .setProperty("YScalePrecision",0) // EJsS HtmlView.HtmlView Page: setting property 'YScalePrecision' for element 'L'
      .setProperty("XFixedTick",0) // EJsS HtmlView.HtmlView Page: setting property 'XFixedTick' for element 'L'
      .setProperty("AxisXShow",false) // EJsS HtmlView.HtmlView Page: setting property 'AxisXShow' for element 'L'
      .setProperty("YFixedTick",0) // EJsS HtmlView.HtmlView Page: setting property 'YFixedTick' for element 'L'
      .setProperty("AxisYLineWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'AxisYLineWidth' for element 'L'
      .setProperty("XTickStep",1) // EJsS HtmlView.HtmlView Page: setting property 'XTickStep' for element 'L'
      .setProperty("YTickStep",1) // EJsS HtmlView.HtmlView Page: setting property 'YTickStep' for element 'L'
      .setProperty("XAutoTicks",false) // EJsS HtmlView.HtmlView Page: setting property 'XAutoTicks' for element 'L'
      .setProperty("Title","Initial Amount of Energy of the System") // EJsS HtmlView.HtmlView Page: setting property 'Title' for element 'L'
      .setProperty("Enabled",true) // EJsS HtmlView.HtmlView Page: setting property 'Enabled' for element 'L'
      .setProperty("MaximumY",11) // EJsS HtmlView.HtmlView Page: setting property 'MaximumY' for element 'L'
      .setProperty("MaximumX",7) // EJsS HtmlView.HtmlView Page: setting property 'MaximumX' for element 'L'
      .setProperty("YAutoTicks",false) // EJsS HtmlView.HtmlView Page: setting property 'YAutoTicks' for element 'L'
      .setProperty("MinimumX",0) // EJsS HtmlView.HtmlView Page: setting property 'MinimumX' for element 'L'
      .setProperty("MinimumY",-2) // EJsS HtmlView.HtmlView Page: setting property 'MinimumY' for element 'L'
      .setProperty("TitleY","Energy / Units") // EJsS HtmlView.HtmlView Page: setting property 'TitleY' for element 'L'
      .setProperty("TitleX","Energy") // EJsS HtmlView.HtmlView Page: setting property 'TitleX' for element 'L'
      .setProperty("AutoScaleY",true) // EJsS HtmlView.HtmlView Page: setting property 'AutoScaleY' for element 'L'
      ;

    _view._addElement(EJSS_DRAWING2D.arrow,"xAxis", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'xAxis'
      .setProperty("SizeX",6.5) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'xAxis'
      .setProperty("X",0) // EJsS HtmlView.HtmlView Page: setting property 'X' for element 'xAxis'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'xAxis'
      .setProperty("SizeY",0) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'xAxis'
      .setProperty("LineWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'xAxis'
      ;

    _view._addElement(EJSS_DRAWING2D.shapeSet,"interactPROMPT", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'interactPROMPT'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'interactPROMPT'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'interactPROMPT'
      .setProperty("SizeX",1) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'interactPROMPT'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'interactPROMPT'
      .setProperty("ShapeType","ROUND_RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'interactPROMPT'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'interactPROMPT'
      .setProperty("LineWidth",10) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'interactPROMPT'
      ;

    _view._addElement(EJSS_DRAWING2D.shapeSet,"shapeSet", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'shapeSet'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'shapeSet'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'shapeSet'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'shapeSet'
      .setProperty("Sensitivity",30) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'shapeSet'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'shapeSet'
      .setProperty("EnabledSize","ENABLED_NONE") // EJsS HtmlView.HtmlView Page: setting property 'EnabledSize' for element 'shapeSet'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'shapeSet'
      .setProperty("LineWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'shapeSet'
      ;

    _view._addElement(EJSS_DRAWING2D.textSet,"xlabel", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'xlabel'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'xlabel'
      .setProperty("Y",-0.5) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'xlabel'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"offsety", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'offsety'
      .setProperty("Y",0.2) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'offsety'
      ;

    _view._addElement(EJSS_DRAWING2D.textSet,"amt", _view.offsety) // EJsS HtmlView.HtmlView Page: declaration of element 'amt'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'amt'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'amt'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"dragHelper", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'dragHelper'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragC", _view.dragHelper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragC'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragC'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragC'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragC'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragC'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragC'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragE", _view.dragHelper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragE'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragE'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragE'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragE'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragE'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragE'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragG", _view.dragHelper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragG'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragG'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragG'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragG'
      .setProperty("LineColor","Red") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'dragG'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragG'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragG'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragI", _view.dragHelper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragI'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragI'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragI'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragI'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragI'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragI'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragK", _view.dragHelper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragK'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragK'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragK'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragK'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragK'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragK'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragN", _view.dragHelper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragN'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragN'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragN'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragN'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragN'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragN'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"images", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'images'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"chemical", _view.images) // EJsS HtmlView.HtmlView Page: declaration of element 'chemical'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'chemical'
      .setProperty("ImageUrl","./Settings/chemical.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'chemical'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"elastic", _view.images) // EJsS HtmlView.HtmlView Page: declaration of element 'elastic'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'elastic'
      .setProperty("ImageUrl","./Settings/elestic.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'elastic'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"gravity", _view.images) // EJsS HtmlView.HtmlView Page: declaration of element 'gravity'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'gravity'
      .setProperty("ImageUrl","./Settings/gravity.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'gravity'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"internal", _view.images) // EJsS HtmlView.HtmlView Page: declaration of element 'internal'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'internal'
      .setProperty("ImageUrl","./Settings/internal.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'internal'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"kinetic", _view.images) // EJsS HtmlView.HtmlView Page: declaration of element 'kinetic'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'kinetic'
      .setProperty("ImageUrl","./Settings/kinetic.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'kinetic'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"nuclear", _view.images) // EJsS HtmlView.HtmlView Page: declaration of element 'nuclear'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'nuclear'
      .setProperty("ImageUrl","./Settings/nuclear.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'nuclear'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"images3D", _view.L) // EJsS HtmlView.HtmlView Page: declaration of element 'images3D'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"chemical3", _view.images3D) // EJsS HtmlView.HtmlView Page: declaration of element 'chemical3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'chemical3'
      .setProperty("ImageUrl","./Settings/chemical3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'chemical3'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"elastic3", _view.images3D) // EJsS HtmlView.HtmlView Page: declaration of element 'elastic3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'elastic3'
      .setProperty("ImageUrl","./Settings/elestic3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'elastic3'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"gravity3", _view.images3D) // EJsS HtmlView.HtmlView Page: declaration of element 'gravity3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'gravity3'
      .setProperty("ImageUrl","./Settings/gravity3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'gravity3'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"internal3", _view.images3D) // EJsS HtmlView.HtmlView Page: declaration of element 'internal3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'internal3'
      .setProperty("ImageUrl","./Settings/internal3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'internal3'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"kinetic3", _view.images3D) // EJsS HtmlView.HtmlView Page: declaration of element 'kinetic3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'kinetic3'
      .setProperty("ImageUrl","./Settings/kinetic3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'kinetic3'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"nuclear3", _view.images3D) // EJsS HtmlView.HtmlView Page: declaration of element 'nuclear3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'nuclear3'
      .setProperty("ImageUrl","./Settings/nuclear3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'nuclear3'
      ;

    _view._addElement(EJSS_DRAWING2D.plottingPanel,"O", _view.panel) // EJsS HtmlView.HtmlView Page: declaration of element 'O'
      .setProperty("Width","33%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'O'
      .setProperty("Gutters",[0,50,0,50]) // EJsS HtmlView.HtmlView Page: setting property 'Gutters' for element 'O'
      .setProperty("ShowAreaRectangle",false) // EJsS HtmlView.HtmlView Page: setting property 'ShowAreaRectangle' for element 'O'
      .setProperty("YScalePrecision",0) // EJsS HtmlView.HtmlView Page: setting property 'YScalePrecision' for element 'O'
      .setProperty("XFixedTick",-6) // EJsS HtmlView.HtmlView Page: setting property 'XFixedTick' for element 'O'
      .setProperty("Title","System") // EJsS HtmlView.HtmlView Page: setting property 'Title' for element 'O'
      .setProperty("Enabled",true) // EJsS HtmlView.HtmlView Page: setting property 'Enabled' for element 'O'
      .setProperty("AxisXShow",false) // EJsS HtmlView.HtmlView Page: setting property 'AxisXShow' for element 'O'
      .setProperty("MaximumY",6) // EJsS HtmlView.HtmlView Page: setting property 'MaximumY' for element 'O'
      .setProperty("MaximumX",6) // EJsS HtmlView.HtmlView Page: setting property 'MaximumX' for element 'O'
      .setProperty("YFixedTick",-6) // EJsS HtmlView.HtmlView Page: setting property 'YFixedTick' for element 'O'
      .setProperty("YAutoTicks",false) // EJsS HtmlView.HtmlView Page: setting property 'YAutoTicks' for element 'O'
      .setProperty("MinimumX",-6) // EJsS HtmlView.HtmlView Page: setting property 'MinimumX' for element 'O'
      .setProperty("MinimumY",-6) // EJsS HtmlView.HtmlView Page: setting property 'MinimumY' for element 'O'
      .setProperty("XTickStep",12) // EJsS HtmlView.HtmlView Page: setting property 'XTickStep' for element 'O'
      .setProperty("AxisYShow",false) // EJsS HtmlView.HtmlView Page: setting property 'AxisYShow' for element 'O'
      .setProperty("YTickStep",12) // EJsS HtmlView.HtmlView Page: setting property 'YTickStep' for element 'O'
      .setProperty("XAutoTicks",false) // EJsS HtmlView.HtmlView Page: setting property 'XAutoTicks' for element 'O'
      .setProperty("XScalePrecision",0) // EJsS HtmlView.HtmlView Page: setting property 'XScalePrecision' for element 'O'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"Closed_System", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'Closed_System'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'Closed_System'
      .setProperty("SizeX",4) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'Closed_System'
      .setProperty("ShapeType","ELLIPSE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'Closed_System'
      .setProperty("LineColor","Black") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'Closed_System'
      .setProperty("X",0) // EJsS HtmlView.HtmlView Page: setting property 'X' for element 'Closed_System'
      .setProperty("Attributes",{ "stroke-dasharray":"8 8 8 8" }) // EJsS HtmlView.HtmlView Page: setting property 'Attributes' for element 'Closed_System'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'Closed_System'
      .setProperty("SizeY",4) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'Closed_System'
      .setProperty("LineWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'Closed_System'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"textObject", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'textObject'
      .setProperty("X",0) // EJsS HtmlView.HtmlView Page: setting property 'X' for element 'textObject'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'textObject'
      ;

    _view._addElement(EJSS_DRAWING2D.arrow,"arrowIN", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'arrowIN'
      .setProperty("Sensitivity",50) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'arrowIN'
      .setProperty("LineColor","rgba(0,150,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'arrowIN'
      .setProperty("SizeY",0) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'arrowIN'
      .setProperty("LineWidth",5) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'arrowIN'
      .setProperty("EnabledPosition","ENABLED_ANY") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'arrowIN'
      .setProperty("Offset","CENTERED") // EJsS HtmlView.HtmlView Page: setting property 'Offset' for element 'arrowIN'
      ;

    _view._addElement(EJSS_DRAWING2D.arrow,"arrowIN2", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'arrowIN2'
      .setProperty("Sensitivity",50) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'arrowIN2'
      .setProperty("LineColor","rgba(0,255,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'arrowIN2'
      .setProperty("SizeY",0) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'arrowIN2'
      .setProperty("LineWidth",5) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'arrowIN2'
      .setProperty("EnabledPosition","ENABLED_ANY") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'arrowIN2'
      .setProperty("Offset","CENTERED") // EJsS HtmlView.HtmlView Page: setting property 'Offset' for element 'arrowIN2'
      ;

    _view._addElement(EJSS_DRAWING2D.arrow,"arrowOUT", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'arrowOUT'
      .setProperty("Sensitivity",50) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'arrowOUT'
      .setProperty("LineColor","rgba(0,150,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'arrowOUT'
      .setProperty("SizeY",0) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'arrowOUT'
      .setProperty("LineWidth",5) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'arrowOUT'
      .setProperty("EnabledPosition","ENABLED_ANY") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'arrowOUT'
      .setProperty("Offset","CENTERED") // EJsS HtmlView.HtmlView Page: setting property 'Offset' for element 'arrowOUT'
      ;

    _view._addElement(EJSS_DRAWING2D.arrow,"arrowOUT2", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'arrowOUT2'
      .setProperty("Sensitivity",50) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'arrowOUT2'
      .setProperty("LineColor","rgba(0,255,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'arrowOUT2'
      .setProperty("SizeY",0) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'arrowOUT2'
      .setProperty("LineWidth",5) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'arrowOUT2'
      .setProperty("EnabledPosition","ENABLED_ANY") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'arrowOUT2'
      .setProperty("Offset","CENTERED") // EJsS HtmlView.HtmlView Page: setting property 'Offset' for element 'arrowOUT2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"groupIN", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'groupIN'
      .setProperty("Y",0.9) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'groupIN'
      ;

    _view._addElement(EJSS_DRAWING2D.image,"imageIN", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'imageIN'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"interactPrompt", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'interactPrompt'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'interactPrompt'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'interactPrompt'
      .setProperty("ShapeType","ROUND_RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'interactPrompt'
      .setProperty("LineWidth",10) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'interactPrompt'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"energyIN2", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'energyIN2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'energyIN2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'energyIN2'
      .setProperty("EnabledSize","ENABLED_NONE") // EJsS HtmlView.HtmlView Page: setting property 'EnabledSize' for element 'energyIN2'
      .setProperty("LineWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'energyIN2'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"transIN_text", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'transIN_text'
      .setProperty("FillColor","rgba(0,150,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'transIN_text'
      .setProperty("RelativePosition","NORTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'transIN_text'
      .setProperty("Text","Tin₁") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'transIN_text'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"iconINamt", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'iconINamt'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'iconINamt'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"amtIN", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'amtIN'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'amtIN'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"drag3Helper", _view.groupIN) // EJsS HtmlView.HtmlView Page: declaration of element 'drag3Helper'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragTin1", _view.drag3Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragTin1'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragTin1'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragTin1'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragTin1'
      .setProperty("LineColor","Pink") // EJsS HtmlView.HtmlView Page: setting property 'LineColor' for element 'dragTin1'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragTin1'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragTin1'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"groupIN2", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'groupIN2'
      .setProperty("Y",0.9) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'groupIN2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"drag4Helper", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'drag4Helper'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragTin2", _view.drag4Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragTin2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragTin2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragTin2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragTin2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragTin2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragTin2'
      ;

    _view._addElement(EJSS_DRAWING2D.image,"imageIN2", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'imageIN2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"interactPrompt3", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'interactPrompt3'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'interactPrompt3'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'interactPrompt3'
      .setProperty("ShapeType","ROUND_RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'interactPrompt3'
      .setProperty("LineWidth",10) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'interactPrompt3'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"energyIN22", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'energyIN22'
      .setProperty("EnabledSize","ENABLED_NONE") // EJsS HtmlView.HtmlView Page: setting property 'EnabledSize' for element 'energyIN22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'energyIN22'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'energyIN22'
      .setProperty("LineWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'energyIN22'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"transIN_text2", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'transIN_text2'
      .setProperty("FillColor","rgba(0,200,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'transIN_text2'
      .setProperty("RelativePosition","NORTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'transIN_text2'
      .setProperty("Text","Tin₂") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'transIN_text2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"iconINamt2", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'iconINamt2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'iconINamt2'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"amtIN2", _view.groupIN2) // EJsS HtmlView.HtmlView Page: declaration of element 'amtIN2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'amtIN2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"groupOUT", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'groupOUT'
      .setProperty("Y",0.9) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'groupOUT'
      ;

    _view._addElement(EJSS_DRAWING2D.image,"imageOUT", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'imageOUT'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"interactPrompt2", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'interactPrompt2'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'interactPrompt2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'interactPrompt2'
      .setProperty("ShapeType","ROUND_RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'interactPrompt2'
      .setProperty("LineWidth",10) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'interactPrompt2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"energyOUT2", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'energyOUT2'
      .setProperty("EnabledSize","ENABLED_NONE") // EJsS HtmlView.HtmlView Page: setting property 'EnabledSize' for element 'energyOUT2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'energyOUT2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'energyOUT2'
      .setProperty("LineWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'energyOUT2'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"out_text", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'out_text'
      .setProperty("FillColor","rgba(0,150,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'out_text'
      .setProperty("RelativePosition","NORTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'out_text'
      .setProperty("Text","Tout₁") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'out_text'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"amtOUT", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'amtOUT'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'amtOUT'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"iconOUTamt", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'iconOUTamt'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'iconOUTamt'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"drag5Helper", _view.groupOUT) // EJsS HtmlView.HtmlView Page: declaration of element 'drag5Helper'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragTout1", _view.drag5Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragTout1'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragTout1'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragTout1'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragTout1'
      .setProperty("DrawLines",0) // EJsS HtmlView.HtmlView Page: setting property 'DrawLines' for element 'dragTout1'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragTout1'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"groupOUT2", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'groupOUT2'
      .setProperty("Y",0.9) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'groupOUT2'
      ;

    _view._addElement(EJSS_DRAWING2D.image,"imageOUT2", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'imageOUT2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"interactPrompt22", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'interactPrompt22'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'interactPrompt22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'interactPrompt22'
      .setProperty("ShapeType","ROUND_RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'interactPrompt22'
      .setProperty("LineWidth",10) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'interactPrompt22'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"energyOUT22", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'energyOUT22'
      .setProperty("EnabledSize","ENABLED_NONE") // EJsS HtmlView.HtmlView Page: setting property 'EnabledSize' for element 'energyOUT22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'energyOUT22'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'energyOUT22'
      .setProperty("LineWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'energyOUT22'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"out_text2", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'out_text2'
      .setProperty("FillColor","rgba(0,200,255,1.0)") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'out_text2'
      .setProperty("RelativePosition","NORTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'out_text2'
      .setProperty("Text","Tout₂") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'out_text2'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"amtOUT2", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'amtOUT2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'amtOUT2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"iconOUTamt2", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'iconOUTamt2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'iconOUTamt2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"drag6Helper", _view.groupOUT2) // EJsS HtmlView.HtmlView Page: declaration of element 'drag6Helper'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragTout2", _view.drag6Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragTout2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragTout2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragTout2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragTout2'
      .setProperty("DrawLines",0) // EJsS HtmlView.HtmlView Page: setting property 'DrawLines' for element 'dragTout2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragTout2'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"answer", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'answer'
      ;

    _view._addElement(EJSS_DRAWING2D.text,"answerHint", _view.O) // EJsS HtmlView.HtmlView Page: declaration of element 'answerHint'
      .setProperty("OutlineColor","DarkGray") // EJsS HtmlView.HtmlView Page: setting property 'OutlineColor' for element 'answerHint'
      .setProperty("Visibility",false) // EJsS HtmlView.HtmlView Page: setting property 'Visibility' for element 'answerHint'
      .setProperty("Font","normal normal 13px Georgia, serif") // EJsS HtmlView.HtmlView Page: setting property 'Font' for element 'answerHint'
      ;

    _view._addElement(EJSS_DRAWING2D.plottingPanel,"L2", _view.panel) // EJsS HtmlView.HtmlView Page: declaration of element 'L2'
      .setProperty("Width","33%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'L2'
      .setProperty("ShowAreaRectangle",false) // EJsS HtmlView.HtmlView Page: setting property 'ShowAreaRectangle' for element 'L2'
      .setProperty("Gutters",[50,50,0,50]) // EJsS HtmlView.HtmlView Page: setting property 'Gutters' for element 'L2'
      .setProperty("ShowCoordinates",false) // EJsS HtmlView.HtmlView Page: setting property 'ShowCoordinates' for element 'L2'
      .setProperty("YScalePrecision",0) // EJsS HtmlView.HtmlView Page: setting property 'YScalePrecision' for element 'L2'
      .setProperty("Title","Final Amount of Energy of the System") // EJsS HtmlView.HtmlView Page: setting property 'Title' for element 'L2'
      .setProperty("Enabled",true) // EJsS HtmlView.HtmlView Page: setting property 'Enabled' for element 'L2'
      .setProperty("AxisXShow",false) // EJsS HtmlView.HtmlView Page: setting property 'AxisXShow' for element 'L2'
      .setProperty("MaximumY",11) // EJsS HtmlView.HtmlView Page: setting property 'MaximumY' for element 'L2'
      .setProperty("MaximumX",7) // EJsS HtmlView.HtmlView Page: setting property 'MaximumX' for element 'L2'
      .setProperty("YFixedTick",0) // EJsS HtmlView.HtmlView Page: setting property 'YFixedTick' for element 'L2'
      .setProperty("AxisYLineWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'AxisYLineWidth' for element 'L2'
      .setProperty("YAutoTicks",false) // EJsS HtmlView.HtmlView Page: setting property 'YAutoTicks' for element 'L2'
      .setProperty("MinimumX",0) // EJsS HtmlView.HtmlView Page: setting property 'MinimumX' for element 'L2'
      .setProperty("MinimumY",-2) // EJsS HtmlView.HtmlView Page: setting property 'MinimumY' for element 'L2'
      .setProperty("TitleY","Energy / Units") // EJsS HtmlView.HtmlView Page: setting property 'TitleY' for element 'L2'
      .setProperty("YTickStep",1) // EJsS HtmlView.HtmlView Page: setting property 'YTickStep' for element 'L2'
      .setProperty("TitleX","Energy") // EJsS HtmlView.HtmlView Page: setting property 'TitleX' for element 'L2'
      .setProperty("AutoScaleY",true) // EJsS HtmlView.HtmlView Page: setting property 'AutoScaleY' for element 'L2'
      ;

    _view._addElement(EJSS_DRAWING2D.arrow,"xAxis2", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'xAxis2'
      .setProperty("SizeX",6.5) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'xAxis2'
      .setProperty("X",0) // EJsS HtmlView.HtmlView Page: setting property 'X' for element 'xAxis2'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'xAxis2'
      .setProperty("SizeY",0) // EJsS HtmlView.HtmlView Page: setting property 'SizeY' for element 'xAxis2'
      .setProperty("LineWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'xAxis2'
      ;

    _view._addElement(EJSS_DRAWING2D.shapeSet,"interactPROMPT2", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'interactPROMPT2'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'interactPROMPT2'
      .setProperty("FillColor","White") // EJsS HtmlView.HtmlView Page: setting property 'FillColor' for element 'interactPROMPT2'
      .setProperty("SizeX",1) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'interactPROMPT2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'interactPROMPT2'
      .setProperty("ShapeType","ROUND_RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'interactPROMPT2'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'interactPROMPT2'
      .setProperty("LineWidth",10) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'interactPROMPT2'
      ;

    _view._addElement(EJSS_DRAWING2D.shapeSet,"shapeSet2", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'shapeSet2'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'shapeSet2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'shapeSet2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'shapeSet2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'shapeSet2'
      .setProperty("EnabledSize","ENABLED_NO_MOVE") // EJsS HtmlView.HtmlView Page: setting property 'EnabledSize' for element 'shapeSet2'
      .setProperty("Y",0) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'shapeSet2'
      .setProperty("LineWidth",1) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'shapeSet2'
      ;

    _view._addElement(EJSS_DRAWING2D.textSet,"xlabel2", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'xlabel2'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'xlabel2'
      .setProperty("Y",-0.5) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'xlabel2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"offsety2", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'offsety2'
      .setProperty("Y",0.2) // EJsS HtmlView.HtmlView Page: setting property 'Y' for element 'offsety2'
      ;

    _view._addElement(EJSS_DRAWING2D.textSet,"amt2", _view.offsety2) // EJsS HtmlView.HtmlView Page: declaration of element 'amt2'
      .setProperty("NumberOfElements",6) // EJsS HtmlView.HtmlView Page: setting property 'NumberOfElements' for element 'amt2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'amt2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"images2D", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'images2D'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"chemical2", _view.images2D) // EJsS HtmlView.HtmlView Page: declaration of element 'chemical2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'chemical2'
      .setProperty("ImageUrl","./Settings/chemical.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'chemical2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"elastic2", _view.images2D) // EJsS HtmlView.HtmlView Page: declaration of element 'elastic2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'elastic2'
      .setProperty("ImageUrl","./Settings/elestic.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'elastic2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"gravity2", _view.images2D) // EJsS HtmlView.HtmlView Page: declaration of element 'gravity2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'gravity2'
      .setProperty("ImageUrl","./Settings/gravity.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'gravity2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"internal2", _view.images2D) // EJsS HtmlView.HtmlView Page: declaration of element 'internal2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'internal2'
      .setProperty("ImageUrl","./Settings/internal.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'internal2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"kinetic2", _view.images2D) // EJsS HtmlView.HtmlView Page: declaration of element 'kinetic2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'kinetic2'
      .setProperty("ImageUrl","./Settings/kinetic.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'kinetic2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"nuclear2", _view.images2D) // EJsS HtmlView.HtmlView Page: declaration of element 'nuclear2'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'nuclear2'
      .setProperty("ImageUrl","./Settings/nuclear.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'nuclear2'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"images3D2", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'images3D2'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"chemical22", _view.images3D2) // EJsS HtmlView.HtmlView Page: declaration of element 'chemical22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'chemical22'
      .setProperty("ImageUrl","./Settings/chemical3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'chemical22'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"elastic22", _view.images3D2) // EJsS HtmlView.HtmlView Page: declaration of element 'elastic22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'elastic22'
      .setProperty("ImageUrl","./Settings/elestic3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'elastic22'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"gravity22", _view.images3D2) // EJsS HtmlView.HtmlView Page: declaration of element 'gravity22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'gravity22'
      .setProperty("ImageUrl","./Settings/gravity3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'gravity22'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"internal22", _view.images3D2) // EJsS HtmlView.HtmlView Page: declaration of element 'internal22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'internal22'
      .setProperty("ImageUrl","./Settings/internal3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'internal22'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"kinetic22", _view.images3D2) // EJsS HtmlView.HtmlView Page: declaration of element 'kinetic22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'kinetic22'
      .setProperty("ImageUrl","./Settings/kinetic3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'kinetic22'
      ;

    _view._addElement(EJSS_DRAWING2D.imageSet,"nuclear22", _view.images3D2) // EJsS HtmlView.HtmlView Page: declaration of element 'nuclear22'
      .setProperty("RelativePosition","SOUTH") // EJsS HtmlView.HtmlView Page: setting property 'RelativePosition' for element 'nuclear22'
      .setProperty("ImageUrl","./Settings/nuclear3D.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'nuclear22'
      ;

    _view._addElement(EJSS_DRAWING2D.group,"drag2Helper", _view.L2) // EJsS HtmlView.HtmlView Page: declaration of element 'drag2Helper'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragC2", _view.drag2Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragC2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragC2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragC2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragC2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragC2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragC2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragE2", _view.drag2Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragE2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragE2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragE2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragE2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragE2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragE2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragG2", _view.drag2Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragG2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragG2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragG2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragG2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragG2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragG2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragI2", _view.drag2Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragI2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragI2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragI2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragI2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragI2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragI2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragK2", _view.drag2Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragK2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragK2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragK2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragK2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragK2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragK2'
      ;

    _view._addElement(EJSS_DRAWING2D.shape,"dragN2", _view.drag2Helper) // EJsS HtmlView.HtmlView Page: declaration of element 'dragN2'
      .setProperty("ShapeType","RECTANGLE") // EJsS HtmlView.HtmlView Page: setting property 'ShapeType' for element 'dragN2'
      .setProperty("Sensitivity",0) // EJsS HtmlView.HtmlView Page: setting property 'Sensitivity' for element 'dragN2'
      .setProperty("SizeX",0.8) // EJsS HtmlView.HtmlView Page: setting property 'SizeX' for element 'dragN2'
      .setProperty("LineWidth",0) // EJsS HtmlView.HtmlView Page: setting property 'LineWidth' for element 'dragN2'
      .setProperty("EnabledPosition","ENABLED_Y") // EJsS HtmlView.HtmlView Page: setting property 'EnabledPosition' for element 'dragN2'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"descriptions", _view.masterPanel) // EJsS HtmlView.HtmlView Page: declaration of element 'descriptions'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"formula", _view.descriptions) // EJsS HtmlView.HtmlView Page: declaration of element 'formula'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'formula'
      .setProperty("Background","Pink") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'formula'
      .setProperty("BorderColor","Black") // EJsS HtmlView.HtmlView Page: setting property 'BorderColor' for element 'formula'
      .setProperty("BorderWidth",2) // EJsS HtmlView.HtmlView Page: setting property 'BorderWidth' for element 'formula'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'formula'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"formulaText", _view.formula) // EJsS HtmlView.HtmlView Page: declaration of element 'formulaText'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"legend", _view.descriptions) // EJsS HtmlView.HtmlView Page: declaration of element 'legend'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'legend'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"legendText", _view.legend) // EJsS HtmlView.HtmlView Page: declaration of element 'legendText'
      .setProperty("Background","rgba(255,200,0,0.5)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'legendText'
      ;

    _view._addElement(EJSS_INTERFACE.panel,"transfer", _view.legend) // EJsS HtmlView.HtmlView Page: declaration of element 'transfer'
      .setProperty("Width","100%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'transfer'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"label", _view.transfer) // EJsS HtmlView.HtmlView Page: declaration of element 'label'
      .setProperty("Text","<b><u>Legend for Transfers</u>:</b>") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'label'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"waves", _view.transfer) // EJsS HtmlView.HtmlView Page: declaration of element 'waves'
      .setProperty("Background","rgba(0,0,255,0.1)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'waves'
      .setProperty("ImageUrl","./Settings/Propagation of waves.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'waves'
      .setProperty("Text","Propagation of waves") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'waves'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'waves'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"mechanic", _view.transfer) // EJsS HtmlView.HtmlView Page: declaration of element 'mechanic'
      .setProperty("Background","rgba(0,0,255,0.2)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'mechanic'
      .setProperty("ImageUrl","./Settings/Mechanically.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'mechanic'
      .setProperty("Text","Mechanically") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'mechanic'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'mechanic'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"fire", _view.transfer) // EJsS HtmlView.HtmlView Page: declaration of element 'fire'
      .setProperty("Background","rgba(0,0,255,0.3)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'fire'
      .setProperty("ImageUrl","./Settings/Heating.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'fire'
      .setProperty("Text","Heating") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'fire'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'fire'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"electric", _view.transfer) // EJsS HtmlView.HtmlView Page: declaration of element 'electric'
      .setProperty("Background","rgba(0,0,255,0.4)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'electric'
      .setProperty("ImageUrl","./Settings/Electrically.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'electric'
      .setProperty("Text","Electrically") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'electric'
      .setProperty("Display","inline-block") // EJsS HtmlView.HtmlView Page: setting property 'Display' for element 'electric'
      ;

    _view._addElement(EJSS_INTERFACE.imageAndTextButton,"chemically", _view.transfer) // EJsS HtmlView.HtmlView Page: declaration of element 'chemically'
      .setProperty("Width","15%") // EJsS HtmlView.HtmlView Page: setting property 'Width' for element 'chemically'
      .setProperty("Background","rgba(0,0,255,0.4)") // EJsS HtmlView.HtmlView Page: setting property 'Background' for element 'chemically'
      .setProperty("Tooltip","Chemically") // EJsS HtmlView.HtmlView Page: setting property 'Tooltip' for element 'chemically'
      .setProperty("ImageUrl","./Settings/Chemically.png") // EJsS HtmlView.HtmlView Page: setting property 'ImageUrl' for element 'chemically'
      .setProperty("Text","Chemically") // EJsS HtmlView.HtmlView Page: setting property 'Text' for element 'chemically'
      ;

  };

  return _view;
}



      var _model;
      var _scorm;
      window.addEventListener('load',
        function () { 
          _model =  new LOLMasterTemplateV7("_topFrame","_ejs_library/",null);
          if (typeof _isApp !== "undefined" && _isApp) _model.setRunAlways(true);
          TextResizeDetector.TARGET_ELEMENT_ID = '_topFrame';
          TextResizeDetector.USER_INIT_FUNC = function () {
            var iBase = TextResizeDetector.addEventListener(function(e,args) {
              _model._fontResized(args[0].iBase,args[0].iSize,args[0].iDelta);
              },null);
            _model._fontResized(iBase);
          };
          _model.onload();
        }, false);
