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;;;;;;;;;AChmCY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,gBAAgB,mBAAO,CAAC,oCAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC/FY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB;;;;;;;;;;;;ACRP;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,2CAAa;AACtC,iBAAiB,mBAAO,CAAC,2CAAa;AACtC;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACVF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,mBAAmB;AACvC,YAAY,mBAAO,CAAC,sCAAK;AACzB,iBAAiB,mBAAO,CAAC,qCAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,qCAAqC,YAAY,EAAE,YAAY,OAAO,YAAY,EAAE,YAAY,OAAO,YAAY;AACnH,mCAAmC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;AACjF;AACA,yCAAyC,aAAa,GAAG,YAAY,GAAG,UAAU;AAClF,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oBAAoB,uDAAuD;AAC3E;AACA;AACA;AACA;AACA,uBAAuB;AACvB,wBAAwB;AACxB;AACA;AACA;AACA,oCAAoC,UAAU;AAC9C;AACA;AACA;AACA;AACA,6CAA6C,iBAAiB;AAC9D,gDAAgD,QAAQ;AACxD,eAAe,SAAS,mCAAmC;AAC3D;AACA;AACA,cAAc,wCAAwC;AACtD;AACA,iBAAiB,8BAA8B;AAC/C;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;;ACtFJ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,gBAAgB,mBAAO,CAAC,oCAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC/FY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,yCAAe;AACxC,WAAW,mBAAO,CAAC,+BAAU;AAC7B,eAAe,mBAAO,CAAC,qCAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AChBF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,GAAG,iBAAiB;AAC7C,iBAAiB;AACjB,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,YAAY,oBAAoB;AAChC,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,UAAU,oBAAoB;AAC9B,UAAU,qBAAqB;AAC/B,UAAU,oBAAoB;AAC9B,UAAU,qBAAqB;AAC/B,UAAU,qBAAqB;AAC/B,WAAW,sBAAsB;AACjC,WAAW,uBAAuB;AAClC,UAAU,sBAAsB;AAChC,WAAW;AACX,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;;;;;;;;;;;ACtCZ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;;;;;;;;;;;ACdF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,kBAAkB,mBAAO,CAAC,yCAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;AC5GY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,8BAA8B,GAAG,8BAA8B;AAC/D,gBAAgB,mBAAO,CAAC,qDAAqB;AAC7C,oBAAoB,mBAAO,CAAC,+CAAkB;AAC9C,oBAAoB,mBAAO,CAAC,6DAAyB;AACrD,iBAAiB,mBAAO,CAAC,2CAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA,gCAAgC,sCAAsC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;;;;;;;;;;;;ACrNjB;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe;AACf,eAAe;AACf;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACPY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;ACTY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb;AACA,gBAAgB,mBAAO,CAAC,yCAAU;AAClC,gBAAgB,mBAAO,CAAC,wDAAwB;AAChD,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C,yBAAyB,mBAAO,CAAC,gEAAkB;AACnD,qBAAqB,mBAAO,CAAC,kEAA6B;AAC1D,4BAA4B,mBAAO,CAAC,kFAA2B;AAC/D,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD,2BAA2B,mBAAO,CAAC,oEAAoB;AACvD,sBAAsB,mBAAO,CAAC,sEAAqB;AACnD,8BAA8B,mBAAO,CAAC,sFAA6B;AACnE,0BAA0B,mBAAO,CAAC,8EAAyB;AAC3D,gCAAgC,mBAAO,CAAC,0FAA+B;AACvE,iCAAiC,mBAAO,CAAC,gFAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,IAAI;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,IAAI;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe,8BAA8B,eAAe;AAC3F;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,IAAI;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe,8BAA8B,eAAe;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,IAAI;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2BAA2B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,IAAI;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;;;;;;;;;;;AC9QA;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA,eAAe,MAAM;AACrB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;;;;;;;;;;;AC7DN;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C,4BAA4B,mBAAO,CAAC,kFAA2B;AAC/D,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;;;;;;;;;;;ACrIX;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,sBAAsB;AACtB,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;;;;;;;;;;;;AC3BT;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B;AAC3B,2BAA2B,mBAAO,CAAC,oEAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;;;;;;;;;;;ACnBd;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,qBAAqB,mBAAO,CAAC,qEAAgC;AAC7D,8BAA8B,mBAAO,CAAC,gFAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;;;;;;;;;;;ACrFV;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;;;;;;;;;;;;ACvBb;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;ACjBL;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,sBAAsB,mBAAO,CAAC,gEAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;;;;;;;;;;;;ACXZ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;;;;;;;;;;;AC5BR;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,uBAAuB;AACvB,kBAAkB,mBAAO,CAAC,4CAAkB;AAC5C,oBAAoB,mBAAO,CAAC,yDAAW;AACvC,iBAAiB,mBAAO,CAAC,6CAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;;;;;;;;;;;ACzCV;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;;AC7CJ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;;AC/BJ;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA,YAAY;;;;;;;;;;;;ACfC;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB,GAAG,aAAa;AACrC,eAAe,mBAAO,CAAC,uCAAQ;AAC/B,oBAAoB,mBAAO,CAAC,iDAAa;AACzC,gBAAgB,mBAAO,CAAC,yCAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;;;;;;;;;;;ACjCR;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;;;;;;;;;;AC7BD;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;;;;;;;;;;;;;;;;;UCtCb;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEhDA;UACA;UACA;UACA;UACA","sources":["webpack://ivprogCore/webpack/universalModuleDefinition","webpack://ivprogCore/./i18n/error.csv","webpack://ivprogCore/./i18n/message.csv","webpack://ivprogCore/./i18n/ui.csv","webpack://ivprogCore/./js/assessment/ivprogAssessment.js","webpack://ivprogCore/./js/assessment/output_matching/assessment_result.js","webpack://ivprogCore/./js/assessment/output_matching/output_matching.js","webpack://ivprogCore/./js/assessment/output_matching/output_result.js","webpack://ivprogCore/./js/ast/commands/arrayAssign.js","webpack://ivprogCore/./js/ast/commands/arrayDeclaration.js","webpack://ivprogCore/./js/ast/commands/assign.js","webpack://ivprogCore/./js/ast/commands/break.js","webpack://ivprogCore/./js/ast/commands/case.js","webpack://ivprogCore/./js/ast/commands/command.js","webpack://ivprogCore/./js/ast/commands/commandBlock.js","webpack://ivprogCore/./js/ast/commands/declaration.js","webpack://ivprogCore/./js/ast/commands/for.js","webpack://ivprogCore/./js/ast/commands/formalParameter.js","webpack://ivprogCore/./js/ast/commands/function.js","webpack://ivprogCore/./js/ast/commands/ifThenElse.js","webpack://ivprogCore/./js/ast/commands/index.js","webpack://ivprogCore/./js/ast/commands/repeatUntil.js","webpack://ivprogCore/./js/ast/commands/return.js","webpack://ivprogCore/./js/ast/commands/switch.js","webpack://ivprogCore/./js/ast/commands/sysCall.js","webpack://ivprogCore/./js/ast/commands/while.js","webpack://ivprogCore/./js/ast/error/syntaxError.js","webpack://ivprogCore/./js/ast/error/syntaxErrorFactory.js","webpack://ivprogCore/./js/ast/expressions/arrayAccess.js","webpack://ivprogCore/./js/ast/expressions/arrayLiteral.js","webpack://ivprogCore/./js/ast/expressions/boolLiteral.js","webpack://ivprogCore/./js/ast/expressions/charLiteral.js","webpack://ivprogCore/./js/ast/expressions/expression.js","webpack://ivprogCore/./js/ast/expressions/functionCall.js","webpack://ivprogCore/./js/ast/expressions/index.js","webpack://ivprogCore/./js/ast/expressions/infixApp.js","webpack://ivprogCore/./js/ast/expressions/intLiteral.js","webpack://ivprogCore/./js/ast/expressions/literal.js","webpack://ivprogCore/./js/ast/expressions/realLiteral.js","webpack://ivprogCore/./js/ast/expressions/stringLiteral.js","webpack://ivprogCore/./js/ast/expressions/unaryApp.js","webpack://ivprogCore/./js/ast/expressions/variableLiteral.js","webpack://ivprogCore/./js/ast/ivprogParser.js","webpack://ivprogCore/./js/ast/sourceInfo.js","webpack://ivprogCore/./js/io/domConsole.js","webpack://ivprogCore/./js/io/input.js","webpack://ivprogCore/./js/io/output.js","webpack://ivprogCore/./js/main.js","webpack://ivprogCore/./js/processor/definedFunctions.js","webpack://ivprogCore/./js/processor/error/processorErrorFactory.js","webpack://ivprogCore/./js/processor/error/runtimeError.js","webpack://ivprogCore/./js/processor/error/semanticError.js","webpack://ivprogCore/./js/processor/ivprogProcessor.js","webpack://ivprogCore/./js/processor/lib/arrays.js","webpack://ivprogCore/./js/processor/lib/io.js","webpack://ivprogCore/./js/processor/lib/lang.js","webpack://ivprogCore/./js/processor/lib/math.js","webpack://ivprogCore/./js/processor/lib/strings.js","webpack://ivprogCore/./js/processor/semantic/semanticAnalyser.js","webpack://ivprogCore/./js/runner.js","webpack://ivprogCore/./js/services/i18nHelper.js","webpack://ivprogCore/./js/services/localizedStringsService.js","webpack://ivprogCore/./js/services/userLog.js","webpack://ivprogCore/./js/typeSystem/parsers.js","webpack://ivprogCore/./js/util/auto_gen_output.js","webpack://ivprogCore/./js/util/codeParser.js","webpack://ivprogCore/./js/util/dataProcess.js","webpack://ivprogCore/./js/util/editorMode2.js","webpack://ivprogCore/./js/util/iassignHelpers.js","webpack://ivprogCore/./js/util/inputTest.js","webpack://ivprogCore/./js/util/input_assessment.js","webpack://ivprogCore/./js/util/outputTest.js","webpack://ivprogCore/./js/util/parseFromVisual.js","webpack://ivprogCore/./js/util/string_diff.js","webpack://ivprogCore/./js/util/testConsole.js","webpack://ivprogCore/./js/util/utils.js","webpack://ivprogCore/./js/visualUI/algorithm.js","webpack://ivprogCore/./js/visualUI/code_generator.js","webpack://ivprogCore/./js/visualUI/commands.js","webpack://ivprogCore/./js/visualUI/commands/attribution.js","webpack://ivprogCore/./js/visualUI/commands/break.js","webpack://ivprogCore/./js/visualUI/commands/comment.js","webpack://ivprogCore/./js/visualUI/commands/conditional_expression.js","webpack://ivprogCore/./js/visualUI/commands/contextualized_menu.js","webpack://ivprogCore/./js/visualUI/commands/dowhiletrue.js","webpack://ivprogCore/./js/visualUI/commands/functioncall.js","webpack://ivprogCore/./js/visualUI/commands/generic_expression.js","webpack://ivprogCore/./js/visualUI/commands/iftrue.js","webpack://ivprogCore/./js/visualUI/commands/reader.js","webpack://ivprogCore/./js/visualUI/commands/repeatNtimes.js","webpack://ivprogCore/./js/visualUI/commands/return.js","webpack://ivprogCore/./js/visualUI/commands/switch.js","webpack://ivprogCore/./js/visualUI/commands/variable_value_menu.js","webpack://ivprogCore/./js/visualUI/commands/whiletrue.js","webpack://ivprogCore/./js/visualUI/commands/writer.js","webpack://ivprogCore/./js/visualUI/functions.js","webpack://ivprogCore/./js/visualUI/globals.js","webpack://ivprogCore/./js/visualUI/ivprog_elements.js","webpack://ivprogCore/./js/visualUI/text_editor.js","webpack://ivprogCore/./js/visualUI/types.js","webpack://ivprogCore/./js/visualUI/utils.js","webpack://ivprogCore/./js/visualUI/variables.js","webpack://ivprogCore/./grammar/en/ivprog.ts","webpack://ivprogCore/./grammar/helper.ts","webpack://ivprogCore/./grammar/index.ts","webpack://ivprogCore/./grammar/lexer.ts","webpack://ivprogCore/./grammar/pt/ivprog.ts","webpack://ivprogCore/./i18n/index.ts","webpack://ivprogCore/./js/ast/operators.ts","webpack://ivprogCore/./js/memory/address.ts","webpack://ivprogCore/./js/memory/location.ts","webpack://ivprogCore/./js/processor/compatibilityTable.ts","webpack://ivprogCore/./js/processor/context.ts","webpack://ivprogCore/./js/processor/modes.ts","webpack://ivprogCore/./js/processor/store/store.ts","webpack://ivprogCore/./js/processor/store/storeObject.ts","webpack://ivprogCore/./js/processor/store/storeObjectArray.ts","webpack://ivprogCore/./js/processor/store/storeObjectRef.ts","webpack://ivprogCore/./js/processor/store/store_object_array_ref.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value_ref.ts","webpack://ivprogCore/./js/processor/store/value/store_value.ts","webpack://ivprogCore/./js/processor/store/value/store_value_address.ts","webpack://ivprogCore/./js/processor/store/value/store_value_ref.ts","webpack://ivprogCore/./js/services/languageService.ts","webpack://ivprogCore/./js/typeSystem/array_type.ts","webpack://ivprogCore/./js/typeSystem/multiType.ts","webpack://ivprogCore/./js/typeSystem/type.ts","webpack://ivprogCore/./js/typeSystem/types.ts","webpack://ivprogCore/./js/util/config.ts","webpack://ivprogCore/./js/util/maybe.ts","webpack://ivprogCore/webpack/bootstrap","webpack://ivprogCore/webpack/runtime/chunk loaded","webpack://ivprogCore/webpack/runtime/compat get default export","webpack://ivprogCore/webpack/runtime/define property getters","webpack://ivprogCore/webpack/runtime/hasOwnProperty shorthand","webpack://ivprogCore/webpack/runtime/make namespace object","webpack://ivprogCore/webpack/runtime/jsonp chunk loading","webpack://ivprogCore/webpack/before-startup","webpack://ivprogCore/webpack/startup","webpack://ivprogCore/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ivprogCore\"] = factory();\n\telse\n\t\troot[\"ivprogCore\"] = factory();\n})(self, function() {\nreturn ","module.exports = {\"pt\":{\"token_missing_one\":\"Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3\",\"token_missing_two\":\"Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4\",\"eos_missing\":\"Falta uma nova linha ou ; na linha: $0, coluna: $1\",\"invalid_type\":\"$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3\",\"invalid_array_dimension\":\"A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.\",\"invalid_array_size\":\"O tamnho do vetor/matriz excede o máximo de 2 na linha $0\",\"extra_lines\":\"Nenhum texto é permitido após '}' em 'programa {...}'\",\"invalid_main_return\":\"A função $0 declarada na linha $2 deve retornar $1.\",\"invalid_var_declaration\":\"Erro na linha $0: variáveis só podem ser declaradas no corpo principal da função e nas primeiras linhas, antes de qualquer comando.\",\"invalid_break_command\":\"Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'\",\"invalid_terminal\":\"Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.\",\"const_not_init\":\"Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada\",\"id_missing\":\"Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2\",\"invalid_id_format\":\"$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.\",\"main_missing\":\"A função principal não foi encontrada\",\"invalid_global_var\":\"Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE\",\"not_implemented\":\"Erro interno crítico: A função definida pelo sistema $0 não foi implementada.\",\"function_missing\":\"A função $0 não foi encontrada\",\"function_missing_full\":\"A função $0 na linha: $1, coluna: $2 não foi encontrada\",\"invalid_parameters_size_full\":\"Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.\",\"invalid_parameters_size\":\"A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2\",\"invalid_ref_full\":\"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.\",\"invalid_ref\":\"A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.\",\"invalid_parameter_type_full\":\"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.\",\"invalid_parameter_type\":\"A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.\",\"unknown_command_full\":\"Erro interno crítico: comando desconhecido encontrado na linha $0\",\"unknown_command\":\"Erro interno crítico: comando desconhecido encontrado!\",\"loop_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição $2 do laço de repetição deve ser do tipo lógico\",\"loop_condition_type\":\"A condição $0 do laço de repetição deve ser do tipo lógico\",\"endless_loop_full\":\"Possível laço infinito detectado no seu código. Verifique a linha $0\",\"endless_loop\":\"Possível laço infinito detectado no seu código.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição $2 do comando se...senao deve ser do tipo lógico\",\"if_condition_type\":\"A condição $0 do comando se...senao deve ser do tipo lógico\",\"invalid_return_type_full\":\"Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.\",\"invalid_return_type\":\"A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.\",\"invalid_void_return_full\":\"Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2\",\"invalid_void_return\":\"A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1\",\"unexpected_break_command_full\":\"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0\",\"unexpected_break_command\":\"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso\",\"invalid_dimension\":\"As dimensões de um vetor/matriz devem ser do tipo inteiro\",\"void_in_expression_full\":\"Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio\",\"void_in_expression\":\"A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio\",\"invalid_array_access_full\":\"Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido\",\"invalid_array_access\":\"Identificador $0 não se refere a um vetor/matriz válido\",\"invalid_matrix_access_full\":\"Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida\",\"invalid_matrix_access\":\"Identificador $0 não se refere a uma matriz válida\",\"matrix_column_outbounds_full\":\"Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas\",\"matrix_column_outbounds\":\"Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas\",\"matrix_line_outbounds_full\":\"Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas\",\"matrix_line_outbounds\":\"Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas\",\"vector_line_outbounds_full\":\"Erro na linha $0: O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.\",\"vector_line_outbounds\":\"O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.\",\"vector_not_matrix_full\":\"Erro na linha $0: $1 não é uma matriz\",\"vector_not_matrix\":\"$0 não é uma matriz\",\"invalid_infix_op_full\":\"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado aos tipos $3 e $4\",\"invalid_infix_op\":\"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado aos tipos $2 e $3\",\"invalid_unary_op_full\":\"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado ao tipo $3\",\"invalid_unary_op\":\"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado ao tipo $2\",\"unknown_op\":\"Erro interno crítico: Operação $0 desconhecida\",\"duplicate_function\":\"A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.\",\"duplicate_variable\":\"A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.\",\"main_parameters\":\"A função inicio não pode ter parâmetros.\",\"symbol_not_found_full\":\"A variável $0 na linha: $1, coluna: $2 não foi declarada\",\"symbol_not_found\":\"A variável $0 não foi declarada\",\"array_dimension_not_int_full\":\"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser do tipo inteiro.\",\"array_dimension_not_int\":\"As dimensões de um arranjo (vetor ou matriz) devem ser do tipo inteiro.\",\"array_dimension_not_positive_full\":\"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser valores positivos.\",\"array_dimension_not_positive\":\"As dimensões de um arranjo (vetor ou matriz) devem ser valores positivos.\",\"incompatible_types_full\":\"Era esperado um $0 mas a expressão $1 na linha $2 resulta em $3.\",\"incompatible_types\":\"Era esperado um $0 mas a expressão $1 resulta em $2.\",\"incompatible_types_array_full\":\"A expressão $0 na linha $2 é incompatível com o tipo $1.\",\"incompatible_types_array\":\"A expressão $0 é incompatível com o tipo $1.\",\"invalid_case_type_full\":\"O caso $0 na linha $1 é incompatível com o tipo $2.\",\"invalid_case_type\":\"O caso $0 é incompatível com o tipo $1.\",\"function_no_return\":\"A função $0 não possui um comando de devolução acessível. Toda função deve ter ao menos um comando 'devolva' no seu corpo principal.\",\"invalid_array_literal_type_full\":\"Erro na linha $0: a expressão $1 não resulta em um tipo compatível.\",\"invalid_array_literal_type\":\"A expressão $0 não resulta em um tipo compatível.\",\"invalid_array_literal_line_full\":\"Erro na linha $0: esperava-se $1 linhas mas encontrou $2.\",\"invalid_array_literal_line\":\"Esperava-se $0 linhas mas encontrou $1.\",\"invalid_array_literal_column_full\":\"Erro na linha $0: esperava-se $1 colunas mas encontrou $2.\",\"invalid_array_literal_column\":\"Esperava-se $0 colunas mas encontrou $1.\",\"exceeded_input_request\":\"A quantidade de leituras requisitadas execedeu a quantidade de entradas disponíveis.\",\"test_case_few_reads\":\"Caso de teste $0 falhou: ainda restam entradas!\",\"test_case_failed\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Caso de teste $0 não executou com sucesso.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Caso de teste $0 falhou</span>: $1\",\"test_case_exception\":\"Ocorreu uma exceção no caso de teste $0: $1\",\"invalid_type_conversion\":\"O valor $0 não pode ser convertido para o tipo $1\",\"invalid_read_type\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo da variável <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo aceito pela variável <span class='ivprog-error-varname'>$3</span> que é um $4.\",\"inform_valid_identifier\":\"Informe um nome válido! O nome não pode ser uma palavra reservadas e deve começar com letras ou _ e conter apenas letras, números e _.\",\"inform_valid_global_duplicated\":\"Já existe uma variável global com o nome <span class='ivprog-error-varname'>$0</span>, você precisa de nomes distintos.\",\"inform_valid_variable_duplicated\":\"Já existe uma variável com o nome <span class='ivprog-error-varname'>$0</span> na função <span class='ivprog-error-varname'>$1</span>, você precisa de nomes distintos.\",\"inform_valid_function_duplicated\":\"Já existe uma função com o nome <span class='ivprog-error-varname'>$0</span>, você precisa de nomes distintos.\",\"inform_valid_param_duplicated\":\"Já existe um parâmetro com o nome <span class='ivprog-error-varname'>$0</span> na função <span class='ivprog-error-varname'>$1</span>, você precisa de nomes distintos.\",\"invalid_character\":\"O caractere $0 na linha $1 não pode ser utilizado neste contexto.\",\"invalid_syntax\":\"O iVProg não reconhece o texto $0 na linha $1. Certifique-se que não há erro de digitação ou caractere inválido.\",\"annonymous_array_literal\":\"Erro na linha $0: a notação de vetor/matriz só permitida durante a inicialização de uma variável desse tipo. Ex: inteiro vec[3] ← {1,2,3}.\",\"invalid_matrix_literal_line\":\"A expressão $0 na linha $1 não possui um número de elementos igual a linha anterior. Todas as linhas de uma matriz devem ter a mesma quantidade de elementos.\",\"cannot_infer_matrix_line\":\"Não é possível inferir o número de linhas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_matrix_column\":\"Não é possível inferir o número de colunas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_vector_size\":\"Não é possível inferir o número de elementos do vetor $0 na linha $1. É necessário que ele seja inicializado ou que o valor seja informado de forma explícita\",\"matrix_to_vector_literal_attr\":\"Erro na linha $0: A expressão $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_literal_attr\":\"Erro na linha $0: A expressão $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_const_ref_full\":\"A variável $0 fornecida como parâmetro para a função $1 na linha $2 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_ref\":\"A variável $0 fornecida como parâmetro para a função $1 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_assignment_full\":\"Erro na linha $0: $1 é uma constante e portanto não pode ter seu valor alterado\",\"invalid_const_assignment\":\"$0 é uma constante e portanto não pode ter seu valor alterado\",\"array_init_not_literal\":\"Erro na linha $0: Vetor/Matriz só pode ser inicializado por literal. Ex: real vetor[] <- {1,2,3}\",\"array_exceeds_2d\":\"Erro na linha $0: O número máximo de dimensões que um arranjo pode ter é 2. Elemento de 3 ou mais dimensões encontrado!\",\"invalid_matrix_id_dimension\":\"Erro na linha $0: Você deve definir todas as dimensões da matriz quando uma delas é definida por uma variável! Ex: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Erro na linha $0: Não se pode inicializar um vetor que teve seu tamanho declarado utilizando uma variável! Utilize uma atribuição de vetores ou use um laço de repetição.\",\"invalid_matrix_init\":\"Erro na linha $0: Não se pode inicializar uma matrix que teve ao menos uma das suas dimensões declaradas utilizando uma variável! Utilize uma atribuição de matrizes ou use um laço de repetição.\",\"invalid_vector_assignment_full\":\"Erro na linha $0: Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $1 comporta $2 e $3 comporta $4!\",\"invalid_vector_assignment\":\"Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $0 comporta $1 e $2 comporta $3!\",\"invalid_matrix_assignment_full\":\"Erro na linha $0: Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $1 tem $2 linhas e $3 colunas, enquanto $4 possui $5 linhas e $6 colunas!\",\"invalid_matrix_assignment\":\"Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $0 tem $1 linhas e $2 colunas, enquanto $3 possui $4 linhas e $5 colunas!\",\"matrix_to_vector_attr\":\"Erro na linha $0: $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_attr\":\"Erro na linha $0: $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_matrix_index_assign_full\":\"Erro na linha $0: A posição $1 da matriz $2 aceita apenas vetores de tamanho $3, mas $4 tem tamanho $5\",\"invalid_matrix_index_assign\":\"A linha $0 da matriz $1 aceita apenas vetores de tamanho $2, mas $3 tem tamanho $4\",\"invalid_number_elements_vector\":\"Esperava-se por $0 elementos na linha $1 mas a expressão $2 possui $3 elementos.\",\"invalid_number_lines_matrix\":\"Esperava-se por uma matriz com $0 linhas na linha $1 mas a expressão $2 possui $3 linhas\",\"divsion_by_zero_full\":\"Erro na linha $0: A expressão $1 resulta em uma divisão por 0.\",\"divsion_by_zero\":\"A expressão $0 resulta em uma divisão por 0.\",\"undefined_tanget_value\":\"Erro na linha $0: A tangente de $1° não é indefinida.\",\"negative_log_value\":\"Erro na linha $0: Não se pode calcular o log de um valor negativo.\",\"invalid_string_index\":\"Erro na linha $0 durante a execução da função $1: $2 é um índice inválido para a cadeia de texto $3. Os valores válidos vão de 0 à $4\",\"negative_sqrt_value\":\"Erro na linha $0: Não é permitido calcular a raiz quadrada de um número negativo.\",\"exceeded_recursive_calls\":\"Erro na execução da linha $0: Número de chamadas recursivas execedeu o limite máximo definido!\",\"invalid_for_variable\":\"Erro na linha $0: A variavel $1 utilizada no comando repita_para deve ser do tipo inteiro.\",\"invalid_for_from\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'de' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_to\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'para' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_pass\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'passo' do comando repita_para deve ser do tipo inteiro.\",\"exceed_max_instructions\":\"Número de instruções excedeu o limite definido. Certifique-se que seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"},\"en\":{\"token_missing_one\":\"Syntax error: Expected $0 but found $1 at line:$2, column:$3\",\"token_missing_two\":\"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4\",\"eos_missing\":\"A new line or a ‘;’ is missing at line: $0, column: $1\",\"invalid_type\":\"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3\",\"invalid_array_dimension\":\"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.\",\"invalid_array_size\":\"The array at line $0 exceeds the maximum size of 2.\",\"extra_lines\":\"No text is allowed after '}' in 'program { … }'\",\"invalid_main_return\":\"The function $0 declared at line $2 must return $1.\",\"invalid_var_declaration\":\"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.\",\"invalid_break_command\":\"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.\",\"invalid_terminal\":\"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.\",\"const_not_init\":\"Error at line: $0, column: $1. A variable declared as const must be initialized.\",\"id_missing\":\"Expected an identifier but found $0 at line: $1, column: $2.\",\"invalid_id_format\":\"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.\",\"main_missing\":\"The main function was not found. You need to declare a function of return type void named main.\",\"invalid_global_var\":\"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.\",\"not_implemented\":\"Critial internal error: The system defined function $0 was not found.\",\"function_missing\":\"The function $0 was not found.\",\"function_missing_full\":\"The function $0 at line: $1, column: $2 was not found.\",\"invalid_parameters_size_full\":\"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.\",\"invalid_parameters_size\":\"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.\",\"invalid_ref_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_ref\":\"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_parameter_type_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.\",\"invalid_parameter_type\":\"The expression $0 provided as a parameter to the function $1 is not of the expected type.\",\"unknown_command_full\":\"Internal error: an unknown command found at line $0.\",\"unknown_command\":\"Internal error: an unknown command found.\",\"loop_condition_type_full\":\"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).\",\"loop_condition_type\":\"The condition $0 of the loop must be of type bool (true or false).\",\"endless_loop_full\":\"Possible infinite loop detected in your code. Check line $0.\",\"endless_loop\":\"Possible infinite loop detected in your code.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).\",\"if_condition_type\":\"The condition $0 in the if … else command must result in a bool (true or false).\",\"invalid_return_type_full\":\"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.\",\"invalid_return_type\":\"The expression doest not result in a type compatible with the function $0. Expected type: $1.\",\"invalid_void_return_full\":\"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2\",\"invalid_void_return\":\"The function $0 cannot return an empty expression, use an expression that results in a $1\",\"unexpected_break_command_full\":\"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.\",\"unexpected_break_command\":\"Critical error: a break command was found outside a valid context: loop or switch … case structure.\",\"invalid_dimension\":\"Array (vector or matrix) dimensions must be of type int.\",\"void_in_expression_full\":\"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.\",\"void_in_expression\":\"The function $0 cannot be used inside an expression since its return type is void.\",\"invalid_array_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.\",\"invalid_array_access\":\"Identifier $0 does not identify a valid vector or matrix.\",\"invalid_matrix_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.\",\"invalid_matrix_access\":\"Identifier $0 does not identify a valid matrix.\",\"matrix_column_outbounds_full\":\"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.\",\"matrix_column_outbounds\":\"The number of columns $0 is invalid for the matrix $1 which has $2 columns.\",\"matrix_line_outbounds_full\":\"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.\",\"matrix_line_outbounds\":\"The number of lines $0 is invalid for matrix $1 which has $2 lines.\",\"vector_line_outbounds_full\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_line_outbounds\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_not_matrix_full\":\"Error at line $0: $1 is not a matrix.\",\"vector_not_matrix\":\"$0 is not a matrix.\",\"invalid_infix_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.\",\"invalid_infix_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.\",\"invalid_unary_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.\",\"invalid_unary_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.\",\"unknown_op\":\"Critical error: Unknown operator $0.\",\"duplicate_function\":\"The function $0 at line: $1, column: $2 has already been declared.\",\"duplicate_variable\":\"The variable $0 at line: $1, column: $2 has already been declared.\",\"main_parameters\":\"The main function cannot have parameters.\",\"symbol_not_found_full\":\"The variable $0 at line: $1, column: $2 has not been declared.\",\"symbol_not_found\":\"The variable $0 has not been declared.\",\"array_dimension_not_int_full\":\"The array (vector or matrix) dimensions at line $0 must be of type int.\",\"array_dimension_not_int\":\"An array (vector or matrix) dimensions must be of type int.\",\"array_dimension_not_positive_full\":\"The array (vector or matrix) dimensions at line $0 must be positive.\",\"array_dimension_not_positive\":\"An array (vector or matrix) dimensions must be positive.\",\"incompatible_types_full\":\"It expected $0 but the expression $1 at line $2 results in $3.\",\"incompatible_types\":\"It expected $0 but the expression $1 results in $2.\",\"incompatible_types_array_full\":\"The expression $0 at line $2 is not compatible with type $1.\",\"incompatible_types_array\":\"The expression $0 is not compatible with type $1.\",\"invalid_case_type_full\":\"The case expression $0 at line $1 is not compatible with type $2.\",\"invalid_case_type\":\"The case expression $0 is not compatible with type $1.\",\"function_no_return\":\"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.\",\"invalid_array_literal_type_full\":\"Error at line $0: the expression $1 does not result in a compatible type.\",\"invalid_array_literal_type\":\"The expression $0 does not result in a compatible type.\",\"invalid_array_literal_line_full\":\"Error at line $0: it expected $1 lines but found $2.\",\"invalid_array_literal_line\":\"It expected $0 lines but found $1.\",\"invalid_array_literal_column_full\":\"Error at line $0: it expected $1 column but found $2.\",\"invalid_array_literal_column\":\"It expected $0 column but found $1.\",\"exceeded_input_request\":\"The amount of reads requested exceeded the amount of inputs available.\",\"test_case_few_reads\":\"Teste case $0 failed: there are available inputs remaining.\",\"test_case_failed\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Test case $0 did not executed successfully.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Test case $0 failed</span>: $1\",\"test_case_exception\":\"An exception has ocurred during the execution of test case $0: $1\",\"invalid_type_conversion\":\"The value $0 cannot be converted to type $1.\",\"invalid_read_type\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type of the variable <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable <span class='ivprog-error-varname'>$3</span> of type $4.\",\"inform_valid_identifier\":\"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.\",\"inform_valid_global_duplicated\":\"A global variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named <span class='ivprog-error-varname'>$0</span> already exists in function <span class='ivprog-error-varname'>$1</span>, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"invalid_syntax\":\"iVProg does not recognize the text $0 at line $1. Check for typos or invalid character.\",\"annonymous_array_literal\":\"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.\",\"invalid_matrix_literal_line\":\"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.\",\"cannot_infer_matrix_line\":\"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.\",\"cannot_infer_matrix_column\":\"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.\",\"cannot_infer_vector_size\":\"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.\",\"matrix_to_vector_literal_attr\":\"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_literal_attr\":\"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_const_ref_full\":\"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_ref\":\"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_assignment_full\":\"Error at line $0: $1 is a constant e therefore cannot have its value changed.\",\"invalid_const_assignment\":\"$0 is a constant e therefore cannot have its value changed.\",\"array_init_not_literal\":\"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}\",\"array_exceeds_2d\":\"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.\",\"invalid_matrix_id_dimension\":\"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.\",\"invalid_matrix_init\":\"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.\",\"invalid_vector_assignment_full\":\"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!\",\"invalid_vector_assignment\":\"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!\",\"invalid_matrix_assignment_full\":\"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!\",\"invalid_matrix_assignment\":\"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!\",\"matrix_to_vector_attr\":\"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_attr\":\"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_matrix_index_assign_full\":\"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.\",\"invalid_matrix_index_assign\":\"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.\",\"invalid_number_elements_vector\":\"It expected $0 elements at line $1 but the expression $2 has $3 elements.\",\"invalid_number_lines_matrix\":\"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.\",\"divsion_by_zero_full\":\"Error at line $0: The expression $1 resuts in a division by zero.\",\"divsion_by_zero\":\"The expression $0 resuts in a division by zero.\",\"undefined_tanget_value\":\"Error at line $0: The tangent of $1° is undefined.\",\"negative_log_value\":\"Error at line $0: You cannot calculate the logarithm of a negative value.\",\"invalid_string_index\":\"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.\",\"negative_sqrt_value\":\"Error at line $0: It is not allowd to calculate the square root of a negative number.\",\"exceeded_recursive_calls\":\"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.\",\"invalid_for_variable\":\"Error at line $0: The variable $1 used in the repeat_for command must be of type int.\",\"invalid_for_from\":\"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.\",\"invalid_for_to\":\"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.\",\"invalid_for_pass\":\"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.\",\"exceed_max_instructions\":\"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls.\"},\"es\":{\"token_missing_one\":\"Syntax error: Expected $0 but found $1 at line:$2, column:$3\",\"token_missing_two\":\"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4\",\"eos_missing\":\"A new line or a ‘;’ is missing at line: $0, column: $1\",\"invalid_type\":\"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3\",\"invalid_array_dimension\":\"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.\",\"invalid_array_size\":\"The array at line $0 exceeds the maximum size of 2.\",\"extra_lines\":\"No text is allowed after '}' in 'program { … }'\",\"invalid_main_return\":\"The function $0 declared at line $2 must return $1.\",\"invalid_var_declaration\":\"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.\",\"invalid_break_command\":\"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.\",\"invalid_terminal\":\"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.\",\"const_not_init\":\"Error at line: $0, column: $1. A variable declared as const must be initialized.\",\"id_missing\":\"Expected an identifier but found $0 at line: $1, column: $2.\",\"invalid_id_format\":\"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.\",\"main_missing\":\"The main function was not found. You need to declare a function of return type void named main.\",\"invalid_global_var\":\"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.\",\"not_implemented\":\"Critial internal error: The system defined function $0 was not found.\",\"function_missing\":\"The function $0 was not found.\",\"function_missing_full\":\"The function $0 at line: $1, column: $2 was not found.\",\"invalid_parameters_size_full\":\"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.\",\"invalid_parameters_size\":\"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.\",\"invalid_ref_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_ref\":\"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_parameter_type_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.\",\"invalid_parameter_type\":\"The expression $0 provided as a parameter to the function $1 is not of the expected type.\",\"unknown_command_full\":\"Internal error: an unknown command found at line $0.\",\"unknown_command\":\"Internal error: an unknown command found.\",\"loop_condition_type_full\":\"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).\",\"loop_condition_type\":\"The condition $0 of the loop must be of type bool (true or false).\",\"endless_loop_full\":\"Possible infinite loop detected in your code. Check line $0.\",\"endless_loop\":\"Possible infinite loop detected in your code.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).\",\"if_condition_type\":\"The condition $0 in the if … else command must result in a bool (true or false).\",\"invalid_return_type_full\":\"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.\",\"invalid_return_type\":\"The expression doest not result in a type compatible with the function $0. Expected type: $1.\",\"invalid_void_return_full\":\"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2\",\"invalid_void_return\":\"The function $0 cannot return an empty expression, use an expression that results in a $1\",\"unexpected_break_command_full\":\"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.\",\"unexpected_break_command\":\"Critical error: a break command was found outside a valid context: loop or switch … case structure.\",\"invalid_dimension\":\"Array (vector or matrix) dimensions must be of type int.\",\"void_in_expression_full\":\"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.\",\"void_in_expression\":\"The function $0 cannot be used inside an expression since its return type is void.\",\"invalid_array_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.\",\"invalid_array_access\":\"Identifier $0 does not identify a valid vector or matrix.\",\"invalid_matrix_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.\",\"invalid_matrix_access\":\"Identifier $0 does not identify a valid matrix.\",\"matrix_column_outbounds_full\":\"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.\",\"matrix_column_outbounds\":\"The number of columns $0 is invalid for the matrix $1 which has $2 columns.\",\"matrix_line_outbounds_full\":\"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.\",\"matrix_line_outbounds\":\"The number of lines $0 is invalid for matrix $1 which has $2 lines.\",\"vector_line_outbounds_full\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_line_outbounds\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_not_matrix_full\":\"Error at line $0: $1 is not a matrix.\",\"vector_not_matrix\":\"$0 is not a matrix.\",\"invalid_infix_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.\",\"invalid_infix_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.\",\"invalid_unary_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.\",\"invalid_unary_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.\",\"unknown_op\":\"Critical error: Unknown operator $0.\",\"duplicate_function\":\"The function $0 at line: $1, column: $2 has already been declared.\",\"duplicate_variable\":\"The variable $0 at line: $1, column: $2 has already been declared.\",\"main_parameters\":\"The main function cannot have parameters.\",\"symbol_not_found_full\":\"The variable $0 at line: $1, column: $2 has not been declared.\",\"symbol_not_found\":\"The variable $0 has not been declared.\",\"array_dimension_not_int_full\":\"The array (vector or matrix) dimensions at line $0 must be of type int.\",\"array_dimension_not_int\":\"An array (vector or matrix) dimensions must be of type int.\",\"array_dimension_not_positive_full\":\"The array (vector or matrix) dimensions at line $0 must be positive.\",\"array_dimension_not_positive\":\"An array (vector or matrix) dimensions must be positive.\",\"incompatible_types_full\":\"It expected $0 but the expression $1 at line $2 results in $3.\",\"incompatible_types\":\"It expected $0 but the expression $1 results in $2.\",\"incompatible_types_array_full\":\"The expression $0 at line $2 is not compatible with type $1.\",\"incompatible_types_array\":\"The expression $0 is not compatible with type $1.\",\"invalid_case_type_full\":\"The case expression $0 at line $1 is not compatible with type $2.\",\"invalid_case_type\":\"The case expression $0 is not compatible with type $1.\",\"function_no_return\":\"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.\",\"invalid_array_literal_type_full\":\"Error at line $0: the expression $1 does not result in a compatible type.\",\"invalid_array_literal_type\":\"The expression $0 does not result in a compatible type.\",\"invalid_array_literal_line_full\":\"Error at line $0: it expected $1 lines but found $2.\",\"invalid_array_literal_line\":\"It expected $0 lines but found $1.\",\"invalid_array_literal_column_full\":\"Error at line $0: it expected $1 column but found $2.\",\"invalid_array_literal_column\":\"It expected $0 column but found $1.\",\"exceeded_input_request\":\"The amount of reads requested exceeded the amount of inputs available.\",\"test_case_few_reads\":\"Teste case $0 failed: there are available inputs remaining.\",\"test_case_failed\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Test case $0 did not executed successfully.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Test case $0 failed</span>: $1\",\"test_case_exception\":\"An exception has ocurred during the execution of test case $0: $1\",\"invalid_type_conversion\":\"The value $0 cannot be converted to type $1.\",\"invalid_read_type\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type of the variable <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable <span class='ivprog-error-varname'>$3</span> of type $4.\",\"inform_valid_identifier\":\"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.\",\"inform_valid_global_duplicated\":\"A global variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named <span class='ivprog-error-varname'>$0</span> already exists in function <span class='ivprog-error-varname'>$1</span>, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"invalid_syntax\":\"iVProg does not recognize the text $0 at line $1. Check for typos or invalid character.\",\"annonymous_array_literal\":\"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.\",\"invalid_matrix_literal_line\":\"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.\",\"cannot_infer_matrix_line\":\"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.\",\"cannot_infer_matrix_column\":\"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.\",\"cannot_infer_vector_size\":\"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.\",\"matrix_to_vector_literal_attr\":\"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_literal_attr\":\"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_const_ref_full\":\"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_ref\":\"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_assignment_full\":\"Error at line $0: $1 is a constant e therefore cannot have its value changed.\",\"invalid_const_assignment\":\"$0 is a constant e therefore cannot have its value changed.\",\"array_init_not_literal\":\"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}\",\"array_exceeds_2d\":\"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.\",\"invalid_matrix_id_dimension\":\"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.\",\"invalid_matrix_init\":\"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.\",\"invalid_vector_assignment_full\":\"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!\",\"invalid_vector_assignment\":\"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!\",\"invalid_matrix_assignment_full\":\"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!\",\"invalid_matrix_assignment\":\"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!\",\"matrix_to_vector_attr\":\"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_attr\":\"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_matrix_index_assign_full\":\"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.\",\"invalid_matrix_index_assign\":\"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.\",\"invalid_number_elements_vector\":\"It expected $0 elements at line $1 but the expression $2 has $3 elements.\",\"invalid_number_lines_matrix\":\"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.\",\"divsion_by_zero_full\":\"Error at line $0: The expression $1 resuts in a division by zero.\",\"divsion_by_zero\":\"The expression $0 resuts in a division by zero.\",\"undefined_tanget_value\":\"Error at line $0: The tangent of $1° is undefined.\",\"negative_log_value\":\"Error at line $0: You cannot calculate the logarithm of a negative value.\",\"invalid_string_index\":\"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.\",\"negative_sqrt_value\":\"Error at line $0: It is not allowd to calculate the square root of a negative number.\",\"exceeded_recursive_calls\":\"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.\",\"invalid_for_variable\":\"Error at line $0: The variable $1 used in the repeat_for command must be of type int.\",\"invalid_for_from\":\"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.\",\"invalid_for_to\":\"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.\",\"invalid_for_pass\":\"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.\",\"exceed_max_instructions\":\"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls.\"}}","module.exports = {\"pt\":{\"test_case_success\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Caso de teste $0</span>: OK</div>\",\"test_case_duration\":\"Levou $0ms\",\"test_suite_grade\":\"A sua solução alcançou $0% da nota.\",\"awaiting_input_message\":\"O seu programa está em execução e aguardando uma entrada! Digite algo e pressione ENTER...\",\"assessment-empty-expected-tooltip\":\"A saída gerada foi além do esperado\",\"assessment-empty-generated-tooltip\":\"O programa não gerou saídas suficientes\",\"testcase_autogen_unused_input\":\"A solução submetida não lê todas entradas disponíveis no caso de teste 1\",\"testcase_autogen_empty\":\"Sua solução não gerou qualquer saída para o caso de teste $0.\",\"success_execution\":\"Execução do programa finalizada!\",\"aborted_execution\":\"A execução do programa foi interrompida!\",\"unexpected_execution_error\":\"Erro inesperado durante a execução do programa.\"},\"en\":{\"test_case_success\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Test case $0</span>: OK</div>\",\"test_case_duration\":\"Took $0ms\",\"test_suite_grade\":\"Your solution scored $0% of the grade.\",\"awaiting_input_message\":\"Your program is running and awaiting for an input. Type something and press ENTER…\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"The program did not generate enough outputs\",\"testcase_autogen_unused_input\":\"The submitted solution does not read all inputs available in the test case $0\",\"testcase_autogen_empty\":\"Your solution did not generate any output for test case $0.\",\"success_execution\":\"Program execution finished!\",\"aborted_execution\":\"Program execution was aborted!\",\"unexpected_execution_error\":\"Unexpected error during program execution.\"},\"es\":{\"test_case_success\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Test case $0</span>: OK</div>\",\"test_case_duration\":\"Tardó $0ms\",\"test_suite_grade\":\"Su solución obtuvo $0% de la calificación.\",\"awaiting_input_message\":\"Su programa se está ejecutando y esperando una entrada. Escriba algo y presione ENTER ...\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"El programa no generó suficientes resultados.\",\"testcase_autogen_unused_input\":\"La solución presentada no lee todas las entradas disponibles en el caso de prueba 1\",\"testcase_autogen_empty\":\"Su solución no generó ningún resultado para el caso de prueba de $ 0.\",\"success_execution\":\"¡Ejecución del programa terminada!\",\"aborted_execution\":\"¡La ejecución del programa fue abortada!\",\"unexpected_execution_error\":\"Error inesperado durante la ejecución del programa.\"}}","module.exports = {\"pt\":{\"function\":\"funcao\",\"btn_clear\":\"Limpar\",\"btn_function\":\"Função\",\"btn_arithmetic_plus\":\"Adição\",\"btn_arithmetic_minus\":\"Subtração\",\"btn_arithmetic_multiplication\":\"Multiplicação\",\"btn_arithmetic_division\":\"Divisão\",\"btn_arithmetic_module\":\"Módulo\",\"btn_break\":\"Pare\",\"btn_case\":\"Caso\",\"btn_add_var\":\"Adicionar variável\",\"btn_drag_and_drop_function\":\"Mover função\",\"btn_delete_function\":\"Excluir função\",\"expression_invalid\":\"Expressão inválida. Verifique a sintáxe antes de continuar.\",\"expression_undelcared_variable\":\"Variáveis não declaradas:\",\"expression_undeclared_function\":\"Funções não definidas:\",\"start\":\"inicio\",\"type_void\":\"vazio\",\"type_integer\":\"inteiro\",\"logic_operator_and\":\"E\",\"logic_operator_or\":\"OU\",\"logic_operator_not\":\"nao\",\"type_real\":\"real\",\"program\":\"programa\",\"type_text\":\"cadeia\",\"textvar_default_value\":\"texto\",\"type_boolean\":\"logico\",\"logic_value_true\":\"verdadeiro\",\"logic_value_false\":\"falso\",\"variable\":\"Variável\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variavel\",\"new_global\":\"global\",\"new_function\":\"nova_funcao\",\"matrix\":\"matriz\",\"vector\":\"vetor\",\"text_lock_expression\":\"Bloquear expressão\",\"text_unlock_expression\":\"Desbloquear expressão\",\"text_edit_expression\":\"Editar expressão manualmente\",\"text_edit_expression_confirm\":\"Confirmar edição\",\"text_edit_expression_cancel\":\"Cancelar edição\",\"text_add_function\":\"Adicionar uma nova função ao programa\",\"text_move_command\":\"Mover comando\",\"text_add_parameters\":\"Adicionar um novo parâmetro\",\"text_parameter_reference\":\"Definir parâmetro como passagem por referência\",\"text_parameter_copy\":\"Definir parâmetro como passagem por cópia\",\"text_comment_start\":\"Comentário inicial da função...\",\"text_comment_main\":\"Esta é a função principal...\",\"text_read_var\":\"Entrada/Leitura de dados\",\"text_write_var\":\"Saída/Escrita de dados\",\"text_command_read\":\"leia\",\"text_command_write\":\"escreva\",\"text_return\":\"devolva\",\"text_btn_return\":\"Devolver\",\"text_comment\":\"Comentário\",\"string_join_or\":\"ou\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vetor de $0\",\"text_attribution\":\"Atribuição\",\"text_if\":\"se\",\"text_break\":\"pare\",\"text_else\":\"senao\",\"text_for\":\"repita_para\",\"text_code_while\":\"repita_enquanto\",\"text_code_do\":\"repita\",\"text_code_do_until\":\"ate_que\",\"text_command_do\":\"repita\",\"text_command_while\":\"repita enquanto\",\"text_command_do_until\":\"até que\",\"text_code_switch\":\"escolha\",\"text_code_case\":\"caso\",\"text_config_programming\":\"Programação\",\"text_config_programming_both\":\"Visual e textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritméticos\",\"text_iftrue\":\"Se condição senão\",\"text_message_error_activity_file\":\"Aconteceu um erro ao processar a atividade. <br> Recarregue a página para tentar novamente.\",\"text_message_error_upload_file\":\"Não foi possível carregar o arquivo.<br>Verifique o conteúdo do arquivo e tente novamente.\",\"text_message_error_upload_close\":\"Fechar\",\"text_message_error_activity_reload\":\"Recarregar\",\"text_repeatNtimes\":\"Repita N vezes\",\"text_receives\":\"recebe\",\"text_whiletrue\":\"Enquanto verdadeiro\",\"text_dowhiletrue\":\"Repita até que verdadeiro\",\"text_switch\":\"Escolha\",\"text_functioncall\":\"Chamada de função\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Parênteses\",\"text_change\":\"Alterar\",\"text_teacher_algorithm\":\"Algoritmo\",\"text_teacher_algorithm_include\":\"Incluir o algoritmo abaixo no exercício\",\"text_teacher_test_case\":\"Casos de teste\",\"text_teacher_config\":\"Configurações\",\"text_teacher_data_types\":\"Tipos de dados\",\"text_teacher_commands\":\"Comandos\",\"text_teacher_functions\":\"Funções\",\"text_teacher_create_functions\":\"Criar novas funções\",\"text_teacher_create_movement_functions\":\"Movimentar funções\",\"text_teacher_test_case_input\":\"Entrada\",\"text_teacher_test_case_output\":\"Saída\",\"text_teacher_test_case_actions\":\"Ações\",\"text_teacher_test_case_add\":\"Adicionar caso de teste\",\"text_header_ivprog_functions\":\"Funções do iVProg\",\"text_menu_functions_math\":\"Matemática\",\"text_menu_functions_text\":\"Texto\",\"text_menu_functions_array\":\"Arranjo\",\"text_menu_functions_conversion\":\"Conversão\",\"text_no_variable\":\"Nenhuma variável declarada\",\"text_no_variable_instruction\":\"Antes de utilizar uma variável, é necessário criá-la\",\"text_ivprog_description\":\"Programação Visual interativa na Internet\",\"tooltip_visual\":\"Programação visual\",\"tooltip_textual\":\"Programação textual\",\"tooltip_upload\":\"Upload de código fonte\",\"tooltip_download\":\"Download do código fonte\",\"tooltip_undo\":\"Desfazer\",\"tooltip_redo\":\"Refazer\",\"tooltip_run\":\"Executar o programa\",\"tooltip_evaluate\":\"Avaliar o programa\",\"tooltip_help\":\"Ajuda\",\"tooltip_add_global\":\"Adicionar variável global\",\"tooltip_hide_function\":\"Ocultar os elementos da função\",\"var_menu_select_var\":\"Selecione uma variável\",\"var_menu_select_all\":\"Selecione\",\"var_menu_select_function\":\"Selecione uma função\",\"expression_menu_select\":\"Construir uma expressão lógica\",\"inform_valid_content\":\"Informe o conteúdo!\",\"inform_valid_expression\":\"Construa uma expressão lógica!\",\"tooltip_terminal_clear\":\"Limpa o terminal removendo todos os textos já escritos e os pendentes.\",\"tooltip_terminal_show\":\"Exibe o terminal caso esteja escondido\",\"tooltip_terminal_hide\":\"Esconde o terminal caso não esteja escondido\",\"tooltip_menu_read\":\"Comando para receber dados pelo teclado\",\"tooltip_menu_write\":\"Comando para apresentar conteúdo ao usuário\",\"tooltip_menu_comments\":\"Bloco para comentários internos do programador\",\"tooltip_menu_attribution\":\"Comando para atribuir uma expressão a uma variável\",\"tooltip_menu_call_function\":\"Comando para realizar a chamada de uma função\",\"tooltip_menu_if_else\":\"Estrutura para que os comandos só sejam executados de acordo com as condições estabelecidas\",\"tooltip_menu_repeat_n_times\":\"Estrutura para executar um bloco de comandos repetidamente\",\"tooltip_menu_repeat_whiletrue\":\"Estrutura para repetir um bloco de comandos enquanto a condição for verdadeira\",\"tooltip_menu_repeat_dowhiletrue\":\"Estrutura que executa um bloco e o repete enquanto a condição for verdadeira\",\"tooltip_menu_repeat_switch\":\"Estrutura de escolha do bloco a ser executado\",\"tooltip_menu_repeat_return\":\"Comando para devolver o resultado e finalizar a função\",\"tooltip_move_var\":\"Mover variável\",\"tooltip_remove_var\":\"Excluir variável\",\"text_ivprog_version\":\"Versão\",\"text_teacher_filter\":\"Filtro\",\"text_teacher_filter_active\":\"Ativado\",\"text_teacher_filter_help\":\"Ao ativar o filtro, as modificações do iVProg estarão bloqueadas.\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duração\",\"assessment-detail-grade-label\":\"Nota\",\"assessment-detail-input-label\":\"Entradas\",\"assessment-detail-output-label\":\"Saídas\",\"assessment-detail-expected-label\":\"Esperava\",\"assessment-detail-generated-label\":\"Gerou\",\"assessment-detail-result-label\":\"Resultado\",\"assessment-detail-title\":\"Caso de Teste $0\",\"text_teacher_generate_outputs\":\"Gerar saídas\",\"text_teacher_generate_outputs_algorithm\":\"Antes de gerar as saídas, elabore um algoritmo!\",\"text_code_for_from\":\"de\",\"text_code_for_to\":\"ate\",\"text_code_for_pass\":\"passo\",\"text_for_from\":\"de\",\"text_for_to\":\"até\",\"text_for_pass\":\"passo\",\"text_relational_expression\":\"Relacionais\",\"write_command_newline_on\":\"Quebra de linha ativada\",\"write_command_newline_off\":\" Quebra de linha desativada\",\"write_seprator_menu_text\":\"Espaço\",\"initial_program_code\":\"programa {\\\\n\\\\n\\\\t\\\\tfuncao vazio inicio () {\\\\n\\\\t\\\\t\\\\t// Inicie seu codigo aqui!\\\\n\\\\t\\\\t}\\\\n}\",\"type_char\":\"caractere\",\"charvar_default_value\":\"A\",\"write_seprator_menu_tooltip\":\"Separador para imprimir mais valores/variáveis\"},\"en\":{\"function\":\"function\",\"btn_clear\":\"Clean\",\"btn_function\":\"Function\",\"btn_arithmetic_plus\":\"Addition\",\"btn_arithmetic_minus\":\"Subtraction\",\"btn_arithmetic_multiplication\":\"Multiplication\",\"btn_arithmetic_division\":\"Division\",\"btn_arithmetic_module\":\"Remainder\",\"btn_break\":\"break\",\"btn_case\":\"Case\",\"btn_add_var\":\"Add a variable\",\"btn_drag_and_drop_function\":\"Move function\",\"btn_delete_function\":\"Delete function\",\"expression_invalid\":\"Invalid expression. Check the syntax before proceeding.\",\"expression_undelcared_variable\":\"Undeclared variables:\",\"expression_undeclared_function\":\"Undefined functions:\",\"start\":\"main\",\"type_void\":\"void\",\"type_integer\":\"int\",\"logic_operator_and\":\"AND\",\"logic_operator_or\":\"OR\",\"logic_operator_not\":\"not\",\"type_real\":\"real\",\"program\":\"program\",\"type_text\":\"string\",\"textvar_default_value\":\"text\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Command\",\"new_parameter\":\"parameter\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"new_function\",\"matrix\":\"matrix\",\"vector\":\"vector\",\"text_lock_expression\":\"Block expression\",\"text_unlock_expression\":\"Unlock expression\",\"text_edit_expression\":\"Edit expression manually\",\"text_edit_expression_confirm\":\"Confirm edition\",\"text_edit_expression_cancel\":\"Cancel edition\",\"text_add_function\":\"Add a new function to the program\",\"text_move_command\":\"Move command\",\"text_add_parameters\":\"Add a new parameter\",\"text_parameter_reference\":\"Define parameter passed by reference\",\"text_parameter_copy\":\"Define parameter passed by copy\",\"text_comment_start\":\"Function initial comment\",\"text_comment_main\":\"This is the main funcion\",\"text_read_var\":\"Input/Read data\",\"text_write_var\":\"Output/Write data\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Return\",\"text_comment\":\"Comment\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matrix of $0\",\"vector_info_string\":\"vector of $0\",\"text_attribution\":\"Assignment\",\"text_if\":\"if\",\"text_break\":\"break\",\"text_else\":\"else\",\"text_for\":\"repeat_for\",\"text_code_while\":\"repeat_while\",\"text_code_do\":\"repeat\",\"text_code_do_until\":\"until\",\"text_command_do\":\"repeat\",\"text_command_while\":\"repeat while\",\"text_command_do_until\":\"until\",\"text_code_switch\":\"switch\",\"text_code_case\":\"case\",\"text_config_programming\":\"Programming\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Logic\",\"text_arithmetic_expression\":\"Arithmetics\",\"text_iftrue\":\"If condition else\",\"text_message_error_activity_file\":\"There was an error processing the activity.<br> Reload the page to try again.\",\"text_message_error_upload_file\":\"It was not possible upload the file.<br>Verify the file's content and try again.\",\"text_message_error_upload_close\":\"Close\",\"text_message_error_activity_reload\":\"Reload\",\"text_repeatNtimes\":\"Repeat N times\",\"text_receives\":\"receives\",\"text_whiletrue\":\"While true\",\"text_dowhiletrue\":\"Repeat until true\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Function call\",\"text_value\":\"Value\",\"text_operator\":\"Operator\",\"text_parentheses\":\"Parentheses\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Include the algorithm below in the activity\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configurations\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Functions\",\"text_teacher_create_functions\":\"Create new functions\",\"text_teacher_create_movement_functions\":\"Move functions\",\"text_teacher_test_case_input\":\"Input\",\"text_teacher_test_case_output\":\"Output\",\"text_teacher_test_case_actions\":\"Actions\",\"text_teacher_test_case_add\":\"Add test case\",\"text_header_ivprog_functions\":\"iVProg Functions\",\"text_menu_functions_math\":\"Math\",\"text_menu_functions_text\":\"Text\",\"text_menu_functions_array\":\"Array\",\"text_menu_functions_conversion\":\"Conversion\",\"text_no_variable\":\"No variable declared\",\"text_no_variable_instruction\":\"Before using a variable, you need to create it\",\"text_ivprog_description\":\"Interactive and Visual Programming on the Internet\",\"tooltip_visual\":\"Visual programming\",\"tooltip_textual\":\"Textual programming\",\"tooltip_upload\":\"Upload source code\",\"tooltip_download\":\"Download source code\",\"tooltip_undo\":\"Undo\",\"tooltip_redo\":\"Redo\",\"tooltip_run\":\"Run the program\",\"tooltip_evaluate\":\"Evaluate the program\",\"tooltip_help\":\"Help\",\"tooltip_add_global\":\"Add a global variable\",\"tooltip_hide_function\":\"Hide function elements\",\"var_menu_select_var\":\"Select a variable\",\"var_menu_select_all\":\"Select\",\"var_menu_select_function\":\"Select a function\",\"expression_menu_select\":\"Construct a logic expression\",\"inform_valid_content\":\"Provide some data\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Clears the terminal by removing all wrriten and pending text.\",\"tooltip_terminal_show\":\"Shows the terminal if it is hidden\",\"tooltip_terminal_hide\":\"Hides the terminal if it is not on display\",\"tooltip_menu_read\":\"Command to input data from keyboard\",\"tooltip_menu_write\":\"Command to present content to user\",\"tooltip_menu_comments\":\"Block to comments from developer\",\"tooltip_menu_attribution\":\"Command to assign an expression to a variable\",\"tooltip_menu_call_function\":\"Command to execute a function call\",\"tooltip_menu_if_else\":\"Structure in which command only run when the conditions are satisfied\",\"tooltip_menu_repeat_n_times\":\"Structure to execute a block of commands repeatedly\",\"tooltip_menu_repeat_whiletrue\":\"Structure to execute a block repeatdly while condition is true\",\"tooltip_menu_repeat_dowhiletrue\":\"Structure that executes a block and repeat while the condition is true\",\"tooltip_menu_repeat_switch\":\"Structure that choices the block to be executed\",\"tooltip_menu_repeat_return\":\"Command to return the result and finish the function\",\"tooltip_move_var\":\"Move variable\",\"tooltip_remove_var\":\"Delete variable\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"By activating the filter modifications in iVProg will be blocked\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duration\",\"assessment-detail-grade-label\":\"Grade\",\"assessment-detail-input-label\":\"Inputs\",\"assessment-detail-output-label\":\"Outputs\",\"assessment-detail-expected-label\":\"Expected\",\"assessment-detail-generated-label\":\"Generated\",\"assessment-detail-result-label\":\"Result\",\"assessment-detail-title\":\"Test Case $0\",\"text_teacher_generate_outputs\":\"Generate outputs\",\"text_teacher_generate_outputs_algorithm\":\"Before generating the outputs you need to create an algorithm\",\"text_code_for_from\":\"from\",\"text_code_for_to\":\"to\",\"text_code_for_pass\":\"pass\",\"text_for_from\":\"from\",\"text_for_to\":\"to\",\"text_for_pass\":\"pass\",\"text_relational_expression\":\"Relational\",\"write_command_newline_on\":\" Line break is on\",\"write_command_newline_off\":\" Line break is off\",\"write_seprator_menu_text\":\"Spacer\",\"initial_program_code\":\"program {\\\\n\\\\n\\\\t\\\\tfunction void main () {\\\\n\\\\t\\\\t\\\\t// Start your code here!\\\\n\\\\t\\\\t}\\\\n}\",\"type_char\":\"char\",\"charvar_default_value\":\"A\",\"write_seprator_menu_tooltip\":\"Separator used to print more values/variables\"},\"es\":{\"function\":\"function\",\"btn_clear\":\"Limpiar\",\"btn_function\":\"Funcíon\",\"btn_arithmetic_plus\":\"Adición\",\"btn_arithmetic_minus\":\"Sustracción\",\"btn_arithmetic_multiplication\":\"Multiplicación\",\"btn_arithmetic_division\":\"División\",\"btn_arithmetic_module\":\"Resto\",\"btn_break\":\"break\",\"btn_case\":\"Caso\",\"btn_add_var\":\"Add a variable\",\"btn_drag_and_drop_function\":\"Mover función \",\"btn_delete_function\":\"Borrar función \",\"expression_invalid\":\"Expresión no válida. Verifique la sintaxis antes de continuar.\",\"expression_undelcared_variable\":\"Variables no declaradas:\",\"expression_undeclared_function\":\"Funcíon no declaradas:\",\"start\":\"main\",\"type_void\":\"void\",\"type_integer\":\"int\",\"logic_operator_and\":\"AND\",\"logic_operator_or\":\"OR\",\"logic_operator_not\":\"not\",\"type_real\":\"real\",\"program\":\"program\",\"type_text\":\"string\",\"textvar_default_value\":\"texto\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"nueva_función\",\"matrix\":\"matriz\",\"vector\":\"vector\",\"text_lock_expression\":\"Expresión de bloque \",\"text_unlock_expression\":\"Desbloquear expresión \",\"text_edit_expression\":\"Editar expresión manualmente \",\"text_edit_expression_confirm\":\"Confirmar edición\",\"text_edit_expression_cancel\":\"Cancelar edición\",\"text_add_function\":\"Agregar una nueva función al programa\",\"text_move_command\":\"Mover comando\",\"text_add_parameters\":\"Agregar un nuevo parámetro\",\"text_parameter_reference\":\"Define parameter passed by reference\",\"text_parameter_copy\":\"Define parameter passed by copy\",\"text_comment_start\":\"Comentario inicial de la función\",\"text_comment_main\":\"Esta es la función principal\",\"text_read_var\":\"Entrada/Lectura de dados\",\"text_write_var\":\"Salida/Escribir datos\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Devolución\",\"text_comment\":\"Comentario\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vector de $0\",\"text_attribution\":\"Asignación\",\"text_if\":\"if\",\"text_break\":\"break\",\"text_else\":\"else\",\"text_for\":\"repeat_for\",\"text_code_while\":\"repeat_while\",\"text_code_do\":\"repeat\",\"text_code_do_until\":\"until\",\"text_command_do\":\"repeat\",\"text_command_while\":\"repeat while\",\"text_command_do_until\":\"until\",\"text_code_switch\":\"switch\",\"text_code_case\":\"case\",\"text_config_programming\":\"Programación\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritmética\",\"text_iftrue\":\"Si condicion sino\",\"text_message_error_activity_file\":\"Se produjo un error al procesar la actividad.<br> Recargar la página para volver a intentarlo.\",\"text_message_error_upload_file\":\"text_message_error_upload_file\",\"text_message_error_upload_close\":\"Close\",\"text_message_error_activity_reload\":\"Recargar\",\"text_repeatNtimes\":\"Repetir N veces\",\"text_receives\":\"receives\",\"text_whiletrue\":\"Mientras verdad\",\"text_dowhiletrue\":\"Repita hasta verdad\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Llamada de función\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Paréntesis\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Incluir el algoritmo en la actividad.\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configuraciones\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Funciones\",\"text_teacher_create_functions\":\"Create new functions\",\"text_teacher_create_movement_functions\":\"Move functions\",\"text_teacher_test_case_input\":\"Input\",\"text_teacher_test_case_output\":\"Output\",\"text_teacher_test_case_actions\":\"Actions\",\"text_teacher_test_case_add\":\"Add test case\",\"text_header_ivprog_functions\":\"iVProg Functions\",\"text_menu_functions_math\":\"Math\",\"text_menu_functions_text\":\"Text\",\"text_menu_functions_array\":\"Array\",\"text_menu_functions_conversion\":\"Conversion\",\"text_no_variable\":\"No variable declared\",\"text_no_variable_instruction\":\"Antes de usar una variable, debe crearla\",\"text_ivprog_description\":\"Interactive and Visual Programming on the Internet\",\"tooltip_visual\":\"Visual programming\",\"tooltip_textual\":\"Textual programming\",\"tooltip_upload\":\"Upload source code\",\"tooltip_download\":\"Download source code\",\"tooltip_undo\":\"Undo\",\"tooltip_redo\":\"Redo\",\"tooltip_run\":\"Run the program\",\"tooltip_evaluate\":\"Evaluate the program\",\"tooltip_help\":\"Help\",\"tooltip_add_global\":\"Add a global variable\",\"tooltip_hide_function\":\"Hide function elements\",\"var_menu_select_var\":\"Select a variable\",\"var_menu_select_all\":\"Select\",\"var_menu_select_function\":\"Select a function\",\"expression_menu_select\":\"Construct a logic expression\",\"inform_valid_content\":\"Proporcionar algunos datos\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Borra el terminal eliminando todo el texto escrito y pendiente.\",\"tooltip_terminal_show\":\"Muestra el terminal si está oculto.\",\"tooltip_terminal_hide\":\"Oculta el terminal si no está en exhibición\",\"tooltip_menu_read\":\"Command to input data from keyboard\",\"tooltip_menu_write\":\"Command to present content to user\",\"tooltip_menu_comments\":\"Block to comments from developer\",\"tooltip_menu_attribution\":\"Command to assign an expression to a variable\",\"tooltip_menu_call_function\":\"Command to execute a function call\",\"tooltip_menu_if_else\":\"Structure in which command only run when the conditions are satisfied\",\"tooltip_menu_repeat_n_times\":\"Structure to execute a block of commands repeatedly\",\"tooltip_menu_repeat_whiletrue\":\"Structure to execute a block repeatdly while condition is true\",\"tooltip_menu_repeat_dowhiletrue\":\"Structure that executes a block and repeat while the condition is true\",\"tooltip_menu_repeat_switch\":\"Structure that choices the block to be executed\",\"tooltip_menu_repeat_return\":\"Command to return the result and finish the function\",\"tooltip_move_var\":\"Move variable\",\"tooltip_remove_var\":\"Delete variable\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"Al activar el filtro, las modificaciones en iVProg serán bloqueadas\",\"text_join_assessment_outputs\":\" ;\",\"assessment-detail-time-label\":\"Duration\",\"assessment-detail-grade-label\":\"Grade\",\"assessment-detail-input-label\":\"Inputs\",\"assessment-detail-output-label\":\"Outputs\",\"assessment-detail-expected-label\":\"Expected\",\"assessment-detail-generated-label\":\"Generated\",\"assessment-detail-result-label\":\"Result\",\"assessment-detail-title\":\"Test Case $0\",\"text_teacher_generate_outputs\":\"Generate outputs\",\"text_teacher_generate_outputs_algorithm\":\"Antes de generar las salidas necesita crear un algoritmo\",\"text_code_for_from\":\"from\",\"text_code_for_to\":\"to\",\"text_code_for_pass\":\"pass\",\"text_for_from\":\"from\",\"text_for_to\":\"to\",\"text_for_pass\":\"pass\",\"text_relational_expression\":\"Relational\",\"write_command_newline_on\":\"El salto de línea está activado\",\"write_command_newline_off\":\"El salto de línea está desactivado\",\"write_seprator_menu_text\":\"Spacer\",\"initial_program_code\":\"program {\\\\n\\\\n\\\\t\\\\tfunction void main () {\\\\n\\\\t\\\\t\\\\t// Start your code here!\\\\n\\\\t\\\\t}\\\\n}\",\"type_char\":\"char\",\"charvar_default_value\":\"A\",\"write_seprator_menu_tooltip\":\"Separator used to print more values/variables\"}}","import line_i18n from 'line-i18n'\nimport { IVProgProcessor } from \"./../processor/ivprogProcessor\";\nimport { DOMConsole} from \"./../io/domConsole\";\nimport * as LocalizedStringsService from \"../services/localizedStringsService\";\nimport { OutputMatching } from './output_matching/output_matching';\nimport { Config } from '../util/config';\n\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nconst StringTypes = line_i18n.StringTypes;\n\nconst AssessmentConfig = {\n max_instruction_count: 350250,\n suspend_threshold: 200\n}\n\nexport class IVProgAssessment {\n\n constructor (ast_code, testCases, domConsole) {\n this.ast_code = ast_code;\n this.testCases = testCases;\n this.domConsole = domConsole;\n this.old_config = JSON.parse(JSON.stringify(Config));\n Config.setConfig(AssessmentConfig);\n }\n\n runTest () {\n try {\n // loop test cases and show messages through domconsole\n const partialTests = this.testCases.map( (t, name) => {\n return new OutputMatching(new IVProgProcessor(this.ast_code), t.input, t.output, name);\n });\n const testResult = partialTests.map(om => om.eval());\n return Promise.all(testResult).then(results => {\n let grade = 0;\n for(let i = 0; i < results.length; i += 1) {\n const result = results[i];\n grade += result.grade;\n if(result.grade == 1) {\n this.writeToConsole(DOMConsole.INFO, StringTypes.MESSAGE,'test_case_success',\n result.name + 1, result.generateOutput());\n } else if (result.status == 1) {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed_exception',\n result.name + 1, result.error_msg, result.generateOutput());\n } else {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed',\n result.name + 1, result.generateOutput());\n }\n }\n grade /= results.length;\n const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n return grade;\n });\n // return testResult.then(function (total) {\n // const grade = total / this.testCases.length;\n // const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n // this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n // return Promise.resolve(grade)\n // }).catch(err => {\n // this.domConsole.err(\"Erro inesperado durante o cálculo da nota.\");// try and show error messages through domconsole\n // this.domConsole.err(err.message);\n // return Promise.resolve(0);\n // });\n } catch (error) {\n this.showErrorMessage(DOMConsole.ERR, StringTypes.MESSAGE, \"unexpected_execution_error\");\n this.domConsole.err(error.message);\n return Promise.resolve(0);\n } finally {\n Config.setConfig(this.old_config);\n }\n }\n\n showErrorMessage (errorID, ...args) {\n this.domConsole.err(LocalizedStrings.getError(errorID, args));\n }\n\n showInfoMessage (msgID, ...args) {\n this.domConsole.info(LocalizedStrings.getMessage(msgID, args));\n }\n\n writeToConsole (channel, msgType, msgID, ...args) {\n let msg = LocalizedStrings.getString(msgID, msgType);\n msg = LocalizedStrings.processString(msg, args);\n this.domConsole.writeRawHTML(msg, channel);\n }\n}\n","import StringDiff from \"./../../util/string_diff\";\nimport { LocalizedStrings } from './../../services/localizedStringsService'\n\nexport class OutputAssessmentResult {\n\n static get PAGE_TEMPLATE () {\n return `<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='content-type' content='text/html; charset=UTF-8'>\n <link rel='stylesheet' href='css/ivprog-assessment.css' type='text/css'/>\n </head>\n <body>\n :assessment-result:\n </body>\n </html>`;\n }\n\n static get DETAIL_TEMPLATE () {\n return `<div class='details-body'>\n <div class='details-header'>\n <h2>:test-name:</h2>\n <p>:time-label:: <span>:time:ms</span></p>\n <p>:grade-label:: <span>:grade:%</span></p>\n </div>\n <div>\n <h3>:input-label:</h3>\n <ul>\n <li>:input-list:</li>\n </ul>\n </div>\n <div>\n <h3>:output-label:</h3>\n :output-result:\n </div>\n </div>`;\n }\n\n static get OUPUT_TABLE_TEMPLATE () {\n return `<div class='detaisl-div-table'>\n <table class='assessment-output-table'>\n <tr>\n <th>:expected-label:</th>\n <th>:generated-label:</th>\n <th>:result-label:</th>\n </tr>\n :results:\n </table>\n </div>`;\n }\n\n static get OUTPUT_TEMPLATE () {\n return `<tr><td class=':class-expected:'>$0</td>\n <td class=':class-generated:'>$1</td>\n <td class=':class-result:'>$2</td></tr>`;\n }\n\n static get EMPTY_OUTPUT_TEMPLATE () {\n return `<div class='assessment-popup'><img class='assessment-empty-output' src='img/empty.svg'>\n <span class='assessment-popuptext'>$0</span></div>`;\n }\n\n static get FAILED_TEMPLATE () {\n return `<p class='assessment-failed-execution'><span class='assessment-failed-case'>✗</span>$0</p>`;\n }\n\n static get INPUT_INFO_TEMPLATE () {\n return `<span class='$0'>$1</span>`;\n }\n\n // Status code - it is not grade related!\n // 0 - Succesful execution\n // 1 - failed execution\n constructor (name, status, inputs, result, store, time, error_msg = '') {\n this.name = name;\n this.status = status;\n this.inputs = inputs;\n this.results = result;\n this.store = store;\n this.time = time;\n this.error_msg = error_msg;\n }\n\n get grade () {\n if(this.results == null) {\n return 0;\n }\n return this.results.reduce((prev, val) => prev + val.grade, 0) / this.results.length;\n }\n\n prepareResults () {\n let template = OutputAssessmentResult.DETAIL_TEMPLATE;\n const grade = (this.grade * 100).toFixed(2);\n const time = this.time || \"-\";\n template = template.replace(':test-name:', LocalizedStrings.getUI('assessment-detail-title', [this.name + 1]));\n template = template.replace(':time-label:', LocalizedStrings.getUI('assessment-detail-time-label'));\n template = template.replace(':time:', time);\n template = template.replace(':grade-label:', LocalizedStrings.getUI('assessment-detail-grade-label'));\n template = template.replace(':grade:', grade);\n const input_spans = this.prepareInputList(this.inputs);\n template = template.replace(':input-label:', LocalizedStrings.getUI('assessment-detail-input-label'));\n template = template.replace(':input-list:', input_spans);\n template = template.replace(':output-label:', LocalizedStrings.getUI('assessment-detail-output-label'));\n if(this.status == 0) {\n const output_rows = this.results.map(result => {\n if(result.type == \"string\") {\n return this.formatString(result);\n } else if (result.type == \"number\") {\n return this.formatNumber(result);\n } else {\n return this.formatBool(result);\n }\n }, this);\n template = template.replace(':output-result:', this.prepareOutputTable(output_rows));\n } else {\n let failed_text = OutputAssessmentResult.FAILED_TEMPLATE;\n failed_text = failed_text.replace(\"$0\", this.error_msg);\n template = template.replace(\":output-result:\", failed_text);\n }\n return template;\n }\n\n prepareInputList (input_list) {\n const list = input_list.map(input => {\n let template = OutputAssessmentResult.INPUT_INFO_TEMPLATE;\n template = template.replace(\"$1\", input.value);\n if(input.read) {\n template = template.replace(\"$0\", \"assessment-input-read\");\n } else {\n template = template.replace(\"$0\", \"assessment-input-unread\");\n }\n return template;\n }, this);\n return list.join(LocalizedStrings.getUI('text_join_assessment_outputs'));\n }\n\n prepareOutputTable (output_rows) {\n let template = OutputAssessmentResult.OUPUT_TABLE_TEMPLATE;\n template = template.replace(':expected-label:', LocalizedStrings.getUI('assessment-detail-expected-label'));\n template = template.replace(':generated-label:', LocalizedStrings.getUI('assessment-detail-generated-label'));\n template = template.replace(':result-label:', LocalizedStrings.getUI('assessment-detail-result-label'));\n template = template.replace(':results:', output_rows.join(''));\n return template;\n }\n\n generateOutput () {\n const assessment_result = this.prepareResults();\n let page = OutputAssessmentResult.PAGE_TEMPLATE;\n page = page.replace(':assessment-result:', assessment_result);\n page = page.replace(/(\\r|\\n|\\t)/gm,'').replace(/> *</g, '><');\n return page;\n }\n\n formatNumber (result) {\n const result_class = result.grade == 1 ? 'assessment-number-result' : 'assessment-number-result-failed';\n let template = this.formatOutput('assessment-number-expected',\n 'assessment-number-generated', result_class, result);\n return template\n }\n\n formatBool (result) {\n const result_class = result.grade == 1 ? 'assessment-bool-result' : 'assessment-bool-result-failed';\n let template = this.formatOutput('assessment-bool-expected',\n 'assessment-bool-generated', result_class, result);\n return template\n }\n\n formatOutput (expected_class, generated_class, result_class, result) {\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n template = template.replace(\":class-result:\", result_class);\n let expected_tmpl = result.expected;\n let generated_tmpl = result.generated;\n if(expected_tmpl == null) {\n expected_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n } else if(generated_tmpl == null) {\n generated_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n }\n template = template.replace(\"$0\", expected_tmpl);\n template = template.replace(\"$1\", generated_tmpl);\n const final_result = result.grade == 1 ? \"✓\" : \"✗\"\n template = template.replace(\"$2\", final_result);\n return template\n }\n\n formatString (result) {\n const expected_class = 'assessment-string-expected';\n const generated_class = 'assessment-string-generated';\n //const result_class = 'assessment-string-result';\n\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n //template = template.replace(\":class-result:\", result_class);\n\n const g_string = result.generated || \"\";\n const e_string = result.expected || \"\";\n // console.log(\"generated: \", g_string,\"expected: \", e_string);\n let g_string_tmpl = g_string;\n let e_string_tmpl = e_string;\n if(result.generated == null) {\n g_string_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n } else if (result.expected == null) {\n e_string_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n }\n template = template.replace(\"$0\", e_string_tmpl);\n template = template.replace(\"$1\", g_string_tmpl);\n if(result.grade == 1) {\n template = template.replace(\"$2\", \"✓\");\n template = template.replace(\":class-result:\", 'assessment-string-result');\n } else {\n const diff = StringDiff(g_string, e_string);\n // console.log(diff);\n const diff_vec = diff.map(part => this.getDiffStringStyle(part[1], part[0]), this);\n const diff_string = diff_vec.reduce((prev, actual) => prev + actual, \"\");\n template = template.replace(\"$2\", \"<span class='assessment-failed-case'>✗</span>\" + diff_string);\n template = template.replace(\":class-result:\", \"assessment-string-diff\");\n }\n return template;\n }\n\n getDiffStringStyle (text, action) {\n const template = \"<span class='$0'>$1</span>\"\n // Fix missing whitespace when its a single element\n text = text.replace(/\\s/g,\" \");\n switch(action) {\n case StringDiff.INSERT:\n return template.replace(\"$0\", \"stringdiff-insert\").replace(\"$1\", text);\n case StringDiff.DELETE:\n return template.replace(\"$0\", \"stringdiff-delete\").replace(\"$1\", text);\n case StringDiff.EQUAL:\n return template.replace(\"$0\", \"stringdiff-equal\").replace(\"$1\", text);\n }\n }\n}\n","import { Decimal } from 'decimal.js';\nimport { InputAssessment } from \"../../util/input_assessment\";\nimport { OutputTest } from \"../../util/outputTest\";\nimport { Config } from \"../../util/config\";\nimport { levenshteinDistance } from \"../../util/utils\";\nimport { OutputAssessmentResult } from './assessment_result';\nimport * as TypeParser from \"./../../typeSystem/parsers\";\nimport * as LocalizedStringsService from \"../../services/localizedStringsService\";\nimport * as OutputResult from \"./output_result\";\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport class OutputMatching {\n\n static get NUM_REGEX () {\n return /^[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)$/;\n }\n\n static get NUM_IN_STRING_REGEX () {\n return /[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)/g;\n }\n\n static get BOOLEAN_REGEX () {\n const str = `^(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})$`;\n return new RegExp(str);\n }\n\n static get BOOLEAN_IN_STRING_REGEX () {\n const str = `(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})`;\n return new RegExp(str, 'g');\n }\n\n constructor (program, input_list, expected_output, test_name) {\n this.program = program;\n this.name = test_name;\n this.input_list = input_list;\n this.expected_output = expected_output;\n }\n\n eval () {\n const refThis = this;\n const input = new InputAssessment(this.input_list);\n const gen_output = new OutputTest();\n this.program.registerInput(input);\n this.program.registerOutput(gen_output);\n const start_time = Date.now();\n return this.program.interpretAST().then( sto => {\n const final_time = Date.now() - start_time;\n if(input.isInputAvailable()) {\n return new OutputAssessmentResult(this.name, 1, input.input_list,\n null, sto, final_time, refThis.getErrorMessage('test_case_few_reads', this.name+1))\n }\n const result = gen_output.list.map((g_out, i) => {\n if(i >= this.expected_output.length) {\n return new OutputResult.OutputMatchResult(null, g_out, 0, this.getPotentialOutputType(g_out));\n }\n return this.outputMatch(g_out, this.expected_output[i]);\n }, this);\n if(this.expected_output.length > gen_output.list.length) {\n console.log(\"Saída insuficientes!\",this.expected_output.length,gen_output.list.length);\n for(let i = gen_output.list.length; i < this.expected_output.length; ++i) {\n const e_out = this.expected_output[i];\n result.push(new OutputResult.OutputMatchResult(e_out, null, 0, this.getPotentialOutputType(e_out)));\n }\n } else if (this.expected_output.length == 0 && this.expected_output.length == gen_output.list.length) {\n // no output expected....\n result.push(new OutputResult.OutputMatchResult(\"\", \"\", 1, \"string\"));\n }\n return new OutputAssessmentResult(this.name, 0, input.input_list, result, sto, final_time);\n }).catch(error => {\n return new OutputAssessmentResult(this.name, 1, input.input_list, null, null,\n null, refThis.getErrorMessage('test_case_exception', this.name + 1, error.message))\n });\n }\n\n getPotentialOutputType (output) {\n if(OutputMatching.NUM_REGEX.test(output)) {\n return \"number\";\n } else if (OutputMatching.BOOLEAN_REGEX.test(output)) {\n return \"bool\";\n } else {\n return \"string\";\n }\n }\n\n outputMatch (g_output, e_output) {\n if(OutputMatching.NUM_REGEX.test(e_output)) {\n if(!OutputMatching.NUM_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output);\n }\n const g_num = new Decimal(g_output);\n const e_num = new Decimal(e_output);\n return this.checkNumbers(g_num, e_num);\n } else if (OutputMatching.BOOLEAN_REGEX.test(e_output)) {\n if (!OutputMatching.BOOLEAN_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output)\n }\n const g_bool = TypeParser.toBool(g_output);\n const e_bool = TypeParser.toBool(e_output);\n return this.checkBoolean(g_bool, e_bool);\n } else {\n return this.checkStrings(g_output, e_output);\n }\n }\n\n checkNumbers (g_num, e_num) {\n const decimalPlaces = Math.min(e_num.dp(), Config.decimalPlaces);\n g_num = new Decimal(g_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n e_num = new Decimal(e_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n const result = g_num.eq(e_num);\n const grade = result ? 1 : 0;\n return OutputResult.createNumberResult(e_num.toNumber(), g_num.toNumber(), grade);\n }\n\n checkBoolean (g_bool, e_bool) {\n const grade = g_bool == e_bool ? 1 : 0;\n const g_bool_text = TypeParser.convertBoolToString(g_bool);\n const e_bool_text = TypeParser.convertBoolToString(e_bool);\n return OutputResult.createBoolResult(e_bool_text, g_bool_text, grade);\n }\n\n checkStrings (g_output, e_ouput) {\n const assessmentList = []\n let e_output_clean = e_ouput.trim();\n let g_output_clean = g_output.trim();\n if (OutputMatching.NUM_IN_STRING_REGEX.test(e_ouput)) {\n const expected_numbers = e_ouput.match(OutputMatching.NUM_IN_STRING_REGEX);\n const generated_numbers = g_output.match(OutputMatching.NUM_IN_STRING_REGEX) || [];\n const result = generated_numbers.map((val, i) => {\n if(i >= expected_numbers.length) {\n return OutputResult.createNumberResult(null, val, 0);\n }\n const g_val = new Decimal(val)\n const e_val = new Decimal(expected_numbers[i]);\n return this.checkNumbers(g_val, e_val);\n }, this);\n if(expected_numbers.length > generated_numbers.length) {\n for(let i = generated_numbers.length; i < expected_numbers.length; ++i) {\n result.push(OutputResult.createNumberResult(expected_numbers[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '');\n g_output_clean = g_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '');\n const numberGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(numberGrade);\n }\n if(OutputMatching.BOOLEAN_IN_STRING_REGEX.test(e_ouput)) {\n const expected_bools = e_ouput.match(OutputMatching.BOOLEAN_IN_STRING_REGEX);\n const generated_bools = g_output.match(OutputMatching.BOOLEAN_IN_STRING_REGEX) || [];\n const result = generated_bools.map((val, i) => {\n if(i >= expected_bools.length) {\n return OutputResult.createBoolResult(null, val, 0);\n }\n const g_bool = TypeParser.toBool(val);\n const e_bool = TypeParser.toBool(expected_bools[i]);\n return this.checkBoolean(g_bool, e_bool );\n }, this);\n if(expected_bools.length > generated_bools.length) {\n for(let i = generated_bools.length; i < expected_bools.length; ++i) {\n result.push(OutputResult.createBoolResult(expected_bools[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '');\n g_output_clean = g_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '');\n const boolGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(boolGrade);\n }\n const dist = levenshteinDistance(g_output_clean, e_output_clean);\n let gradeDiff = Math.max(0, e_output_clean.length - dist)/e_output_clean.length;\n gradeDiff = Number.isNaN(gradeDiff) ? 0 : gradeDiff;\n const assessment_size = assessmentList.length + 1;\n const gradeAcc = assessmentList.reduce((prev, val) => prev + val/assessment_size, 0);\n const finalGrade = 1 * (gradeDiff/assessment_size + gradeAcc);\n return OutputResult.createStringResult(e_ouput, g_output, finalGrade);\n }\n\n getErrorMessage (errorID, ...args) {\n return LocalizedStrings.getError(errorID, args);\n }\n}\n\n","\nexport function createNumberResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"number\");\n}\n\nexport function createBoolResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"bool\");\n}\n\nexport function createStringResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"string\");\n}\n\nexport class OutputMatchResult {\n\n constructor (expected, generated, grade, type) {\n this.expected = expected;\n this.generated = generated;\n this.grade = grade;\n this.type = type;\n }\n}","import { Assign } from './assign';\n\nexport class ArrayIndexAssign extends Assign {\n\n constructor (id, lineExpression, columnExpression, expression) {\n super(id, expression);\n this.line = lineExpression;\n this.column = columnExpression;\n }\n}\n","import { Declaration } from './declaration';\n\nexport class ArrayDeclaration extends Declaration {\n\n constructor (id, type, lines, columns, initial, isConst) {\n super(id, type, initial, isConst);\n this.lines = lines;\n this.columns = columns;\n }\n\n get isVector () {\n return this.columns == null;\n }\n}","import { Command } from './command';\n\nexport class Assign extends Command {\n \n constructor (id, expression) {\n super();\n this.id = id;\n this.expression = expression;\n }\n}","import { Command } from './command';\n\nexport class Break extends Command {\n\n constructor () {\n super();\n }\n}\n","import { Command } from './command';\n\nexport class Case extends Command {\n\n constructor (expression) {\n super();\n this.expression = expression;\n /**\n * @type {Command[]}\n */\n this.commands = [];\n }\n\n /**\n * \n * @param {Command[]} commands \n */\n setCommands (commands) {\n this.commands = commands;\n }\n\n get isDefault () {\n return this.expression === null;\n }\n}","export class Command {\n\n constructor () {\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n this._sourceInfo = sourceInfo;\n }\n\n get sourceInfo () {\n return this._sourceInfo;\n }\n}\n","export class CommandBlock {\n\t\n\tconstructor(variables, commands) {\n\t\tthis.variables = variables;\n\t\tthis.commands = commands;\n\t\tthis._sourceInfo = null;\n\t}\n\n\tset sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Command } from './command';\n\nexport class Declaration extends Command {\n \n constructor (id, type, initial, isConst) {\n super();\n this.id = id;\n this.type = type;\n this.initial = initial;\n this.isConst = isConst;\n }\n}\n","import { Command } from './command';\n\nexport class For extends Command {\n\n constructor (for_id, for_from, for_to, for_pass, commandBlock) {\n super();\n this.for_id = for_id;\n this.for_from = for_from;\n this.for_to = for_to;\n this.for_pass = for_pass;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n}","export class FormalParameter {\n\n constructor (type, id, byRef = false, variadic = false) {\n this.type = type;\n this.id = id;\n this.byRef = byRef;\n this.variadic = variadic;\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Types } from './../../typeSystem/types';\n\nexport class Function {\n\n /**\n * \n * @param {string} name \n * @param {import('./../../typeSystem/itype').IType} returnType \n * @param {import('./formalParameter').FormalParameter[]} formalParameters \n * @param {import('./commandBlock').CommandBlock} commandBlock \n */\n constructor(name, returnType, formalParameters, commandBlock) {\n this.name = name;\n this.returnType = returnType;\n this.formalParameters = formalParameters;\n this.commandBlock = commandBlock;\n this._sourceInfo = null;\n }\n\n get isMain () {\n return this.name === null && this.returnType.isCompatible(Types.VOID);\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get variablesDeclarations () {\n return this.commandBlock.variables;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n }\n \n hasVariadic () {\n return this.formalParameters.some( p => p.variadic);\n }\n}","import { Command } from './command';\n\nexport class IfThenElse extends Command {\n\n constructor (condition, ifTrue, ifFalse) {\n super();\n this.condition = condition;\n this.ifTrue = ifTrue;\n this.ifFalse = ifFalse;\n }\n}","import { Break } from './break';\nimport { Return } from './return';\nimport { Assign } from './assign';\nimport { ArrayIndexAssign } from './arrayAssign';\nimport { Declaration } from './declaration';\nimport { ArrayDeclaration } from './arrayDeclaration';\nimport { While } from './while';\nimport { For } from './for';\nimport { Function } from './function';\nimport { IfThenElse } from './ifThenElse';\nimport { CommandBlock } from './commandBlock';\nimport { RepeatUntil } from './repeatUntil';\nimport { Switch } from './switch';\nimport { Case } from './case';\nimport { SysCall } from './sysCall';\nimport { FormalParameter } from './formalParameter';\nimport { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing\n\nexport {\n Break,\n Return,\n Assign,\n ArrayIndexAssign,\n Declaration,\n ArrayDeclaration,\n While,\n For,\n Function,\n IfThenElse,\n CommandBlock,\n RepeatUntil,\n Switch,\n Case,\n SysCall,\n FormalParameter,\n FunctionCall\n};","import { While } from './while';\n\nexport class RepeatUntil extends While {\n\n constructor(condition, commandBlock) {\n super(condition, commandBlock);\n }\n\n get testFirst () {\n return false;\n }\n \n}","import { Command } from './command';\n\nexport class Return extends Command {\n\n constructor(expression) {\n super();\n this.expression = expression;\n }\n \n}","import { Command } from './command';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from '../expressions/expression';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Case } from '.';\n\nexport class Switch extends Command {\n \n /**\n * \n * @param {Expression} expression \n * @param {Case[]} cases \n */\n constructor (expression, cases) {\n super();\n this.expression = expression;\n this.cases = cases;\n }\n}","/**\n * This class represents all the language defined functions.\n * The language processor uses the id provided here to properly execute the desired function.\n * The function is actually implemented inside the language processor.\n * All the functions can be found at: js/processor/definedFunctions.js\n */\nexport class SysCall {\n\n constructor (langFunc) {\n this.langFunc = langFunc;\n }\n}","import { Command } from './command';\n\nexport class While extends Command {\n\n constructor (expression, commandBlock) {\n super();\n this.expression = expression;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get testFirst () {\n \treturn true;\n }\n}","export class SyntaxError extends Error {\n constructor (msg, id) {\n super(msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, SyntaxError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\n}\n","import * as LocalizedStringsService from \"./../../services/localizedStringsService\";\nimport { SyntaxError } from \"./syntaxError\";\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createError (message_id, context = []) {\n return new SyntaxError(\n LocalizedStrings.getError(message_id, context),\n message_id\n );\n}\n\nexport const SyntaxErrorFactory = Object.freeze({\n extra_lines: () => new SyntaxError(LocalizedStrings.getError(\"extra_lines\")),\n token_missing_one: (expected, token) => {\n const context = [expected, token.text, token.line, token.col];\n const error = createError(\"token_missing_one\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n token_missing_list: (expectedList, token) => {\n const line = expectedList.join(LocalizedStrings.getOR());\n const error = SyntaxErrorFactory.token_missing_one(line, token);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n id_missing: (token) => {\n const context = [token.text, token.line, token.col];\n const error = createError(\"id_missing\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n eos_missing: (token) => {\n const context = [token.line, token.col];\n const error = createError(\"eos_missing\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_array_dimension: (typeName, token) => {\n const context = [token.line, token.col, typeName];\n const error = createError(\"invalid_array_dimension\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_array_size: (token) => {\n const context = [token.line];\n const error = createError(\"invalid_array_size\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_main_return: (name, typeName, token) => {\n const context = [name, typeName, token.line];\n const error = createError(\"invalid_main_return\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_var_declaration: (token) => {\n const context = [token.line];\n const error = createError(\"invalid_var_declaration\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_break_command: (cmdName, token) => {\n const context = [token.line, cmdName];\n const error = createError(\"invalid_break_command\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_terminal: (token) => {\n const context = [token.text, token.line, token.col];\n const error = createError(\"invalid_terminal\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_type: (list, token) => {\n const line = list.join(LocalizedStrings.getOR());\n const context = [token.text, token.line, token.col, line];\n const error = createError(\"invalid_type\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n const_not_init: (token) => {\n const context = [token.line, token.col];\n const error = createError(\"const_not_init\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_id_format: (token) => {\n const context = [token.text, token.line, token.col];\n const error = createError(\"invalid_id_format\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n duplicate_function: (token) => {\n const context = [token.text, token.line, token.col];\n const error = createError(\"duplicate_function\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n main_parameters: () => {\n return createError(\"main_parameters\");\n },\n duplicate_variable: (token) => {\n const context = [token.text, token.line, token.col];\n const error = createError(\"duplicate_variable\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_character: (text, line, column) => {\n const context = [text, line];\n const error = createError(\"invalid_character\", context);\n error.context = { line: line, column: column };\n return error;\n },\n annonymous_array_literal: (token) => {\n const context = [token.line];\n const error = createError(\"annonymous_array_literal\", context);\n error.context = { line: token.line, column: token.col};\n return error;\n },\n invalid_matrix_literal_line: (exp, sourceInfo) => {\n const context = [exp, sourceInfo.line];\n const error = createError(\"invalid_matrix_literal_line\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_matrix_line: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_matrix_line\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_matrix_column: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_matrix_column\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_vector_size: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_vector_size\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n matrix_to_vector_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n const error = createError(\"matrix_to_vector_literal_attr\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n vector_to_matrix_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n const error = createError(\"vector_to_matrix_literal_attr\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n array_init_not_literal: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"array_init_not_literal\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n array_exceeds_2d: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"array_exceeds_2d\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_matrix_id_dimension: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_matrix_id_dimension\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_vector_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_vector_init\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_matrix_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_matrix_init\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_syntax: (text, line, column) => {\n const context = [text, line];\n const error = createError(\"invalid_syntax\", context);\n error.context = { line: line, column: column };\n return error;\n }\n});\n","import { Expression } from './expression';\n\nexport class ArrayAccess extends Expression {\n\t\n\tconstructor (id, line, column) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.line = line;\n\t\tthis.column = column;\n\t}\n\n\ttoString () {\n\t\tconst strLine = this.line.toString();\n\t\tlet strColumn = null;\n\t\tif(this.column) {\n\t\t\tstrColumn = this.column.toString();\n\t\t}\n\t\tlet text = null;\n\t\tif(strColumn) {\n\t\t\ttext = `${this.id}[${strLine}][${strColumn}]`;\n\t\t} else {\n\t\t\ttext = `${this.id}[${strLine}]`;\n\t\t}\n\t\tif(this.parenthesis ){\n\t\t\treturn `(${text})`\n\t\t} else {\n\t\t\treturn text;\n\t\t}\n\t}\n}","import { Literal } from './literal';\n\nexport class ArrayLiteral extends Literal {\n \n /**\n * \n * @param {import('../../typeSystem/itype').IType} type \n * @param {import('./expression').Expression[]} value \n */\n constructor(type, value) {\n super(type);\n this.value = value;\n }\n\n get subtype () {\n const element = this.value[0];\n if (element instanceof ArrayLiteral) {\n return element.value[0].type;\n } else {\n return element.type;\n }\n }\n\n get lines () {\n return this.value.length;\n }\n\n get columns () {\n const element = this.value[0];\n if (!(element instanceof ArrayLiteral)){\n return null;\n } else {\n return element.value.length;\n }\n }\n\n get isVector () {\n return this.columns === null;\n }\n\n get isValid () {\n return this.validateSize() && this.validateType();\n }\n\n validateType () {\n const valid = true;\n // const subtype = this.subtype;\n // if(this.columns !== null) {\n // const len = this.lines;\n // const len2 = this.columns;\n // for (let i = len - 1; i >= 0 && valid; --i) {\n // for (let j = len2 - 1; j >= 0 && valid; --j) {\n // if(!this.value[i].value[j].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // } else {\n // const len = this.lines;\n // for (var i = len - 1; i >= 0 && valid; i--) {\n // if(!this.value[i].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // Cannot validate type since no information on variables literals are available\n return valid;\n }\n\n validateSize () {\n const valid = true;\n // if(this.columns !== null) {\n // const equalityTest = this.value.map(v => v.value.length)\n // .reduce((old, next) => {\n // console.log(next);\n // if (old == null) {\n // return next;\n // } else if (old === next) {\n // return old\n // } else {\n // return -1;\n // }\n // }, null);\n // valid = equalityTest !== -1;\n // }\n // check is now made inside IVProgParser.parseVectorList(...)\n return valid;\n }\n\n toString () {\n const strList = this.value.map(arrayLiteral => arrayLiteral.toString());\n const text = \"{\" + strList.join(',') + \"}\";\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}\n","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertBoolToString } from \"./../../typeSystem/parsers\";\n\nexport class BoolLiteral extends Literal {\n \n constructor(value) {\n super(Types.BOOLEAN);\n this.value = value;\n }\n\n toString () {\n const text = convertBoolToString(this.value);\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class CharLiteral extends Literal {\n \n constructor(value) {\n super(Types.CHAR);\n this.value = value;\n }\n\n toString () {\n const text = `'${this.value}'`;\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","export class Expression {\n\n constructor () {\n\t\tthis._sourceInfo = null;\n\t\tthis._parenthesis = false;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n\n\tset parenthesis (flag) {\n\t\tthis._parenthesis = flag;\n\t}\n\n\tget parenthesis () {\n\t\treturn this._parenthesis;\n\t}\n}","import { Expression } from './expression';\nimport { LanguageDefinedFunction } from '../../processor/definedFunctions';\n\nexport class FunctionCall extends Expression {\n\n\t/**\n\t * \n\t * @param {string} id \n\t * @param {Expression[]} actualParameters \n\t */\n\tconstructor (id, actualParameters) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.actualParameters = actualParameters;\n\t}\n\n\tget isMainCall () {\n\t\treturn this.id === null;\n\t}\n\n\tget parametersSize () {\n\t\treturn this.actualParameters.length;\n\t}\n\n\ttoString () {\n\t\tlet name = null;\n\t\tif(this.isMainCall) {\n\t\t\tname = LanguageDefinedFunction.getMainFunctionName();\n\t\t} else {\n\t\t\tname = LanguageDefinedFunction.getLocalName(this.id);\n\t\t}\n\t\tlet params = null;\n\t\tif(this.actualParameters.length == 0) {\n\t\t\tparams = \"()\";\n\t\t} else {\n\t\t\tconst strParams = this.actualParameters.map(v => v.toString());\n\t\t\tparams = \"(\" + strParams.join(\",\") + \")\";\n\t\t}\n\t\tif(this.parenthesis) {\n\t\t\treturn `(${name + params})`;\n\t\t} else {\n\t\t\treturn name + params;\n\t\t}\n\t}\n}","import { ArrayAccess } from './arrayAccess';\nimport { FunctionCall } from './functionCall';\nimport { IntLiteral } from './intLiteral';\nimport { RealLiteral } from './realLiteral';\nimport { BoolLiteral } from './boolLiteral';\nimport { CharLiteral } from './charLiteral'\nimport { StringLiteral } from './stringLiteral';\nimport { ArrayLiteral } from './arrayLiteral';\nimport { VariableLiteral } from './variableLiteral';\nimport { InfixApp } from './infixApp';\nimport { UnaryApp } from './unaryApp';\n\nexport {\n\tArrayAccess,\n\tFunctionCall,\n IntLiteral,\n RealLiteral,\n BoolLiteral,\n CharLiteral,\n StringLiteral,\n ArrayLiteral,\n VariableLiteral,\n InfixApp,\n UnaryApp\n};","import { Expression } from './expression';\n\nexport class InfixApp extends Expression {\n\n constructor(op, left, right) {\n super();\n this.op = op;\n this.left = left;\n this.right = right;\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n const r = this.right.toString();\n if(this.parenthesis) {\n return `(${l + op + r})`;\n } else {\n return l + op + r;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class IntLiteral extends Literal {\n \n constructor(value) {\n super(Types.INTEGER);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Expression } from './expression';\n\nexport class Literal extends Expression {\n \n constructor (type) {\n super();\n this.type = type;\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class RealLiteral extends Literal {\n \n constructor(value) {\n super(Types.REAL);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if (this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class StringLiteral extends Literal {\n \n constructor(value) {\n super(Types.STRING);\n this.value = value;\n }\n\n toString() {\n const text = '\"' + this.value + '\"';\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import {InfixApp} from './infixApp';\n\nexport class UnaryApp extends InfixApp {\n \n constructor (op, left) {\n super(op, left, null);\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n if(this.parenthesis) {\n return `(${op + l})`;\n } else {\n return op + l;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class VariableLiteral extends Literal {\n \n constructor(id) {\n super(Types.UNDEFINED);\n this.id = id;\n }\n\n toString () {\n if(this.parenthesis) {\n return `(${this.id})`;\n } else {\n return this.id;\n }\n }\n}","import * as Expressions from \"./expressions\";\nimport * as Commands from \"./commands\";\nimport * as Parsers from \"../typeSystem/parsers\";\nimport { Types } from \"../typeSystem/types\";\nimport { ArrayType } from \"../typeSystem/array_type\";\nimport { SourceInfo } from \"./sourceInfo\";\nimport { convertFromString } from \"./operators\";\nimport { SyntaxErrorFactory } from \"./error/syntaxErrorFactory\";\nimport { LanguageDefinedFunction } from \"../processor/definedFunctions\";\nimport { LanguageService } from \"../services/languageService\";\n\nexport class IVProgParser {\n static createParser (input, fill = true) {\n const lexer = LanguageService.getCurrentLexer();\n const parser = new IVProgParser(input, lexer);\n if (fill) {\n parser.fill();\n }\n return parser;\n }\n\n // <BEGIN scope consts>\n static get BASE () {\n return 0;\n }\n static get FUNCTION () {\n return 1;\n }\n static get COMMAND () {\n return 2;\n }\n static get BREAKABLE () {\n return 4;\n }\n // </ END scope consts>\n //\n static get EOF_TOKEN () {\n return {\n text: null,\n line: -1,\n col: -1,\n value: null,\n offset: -1,\n lineBreaks: false,\n type: \"EOF\",\n };\n }\n\n /**\n * @param {string} input\n * @param {IVProgLexer} ivprogLexer\n **/\n constructor (input, ivprogLexer) {\n this.ivprogLexer = ivprogLexer;\n this.inputStream = input;\n this.lexer = ivprogLexer.lexer;\n this.tokenStream = [];\n this.pos = 0;\n this.ruleNames = ivprogLexer.getRules();\n this.variableTypes = Object.entries(this.ivprogLexer.getTypeKeys()).map(\n ([key, _]) => key\n );\n this.functionTypes = this.variableTypes.concat(this.ruleNames.RK_VOID);\n\n this.parsingArrayDimension = 0;\n this.scope = [];\n this.langFuncs = this.ivprogLexer.getLangFuncs();\n this.definedFuncsNameList = [];\n this.definedVariablesStack = [];\n }\n\n fill (stream = null) {\n if (stream) {\n this.tokenStream = stream;\n return;\n }\n this.tokenStream = Array.from(this.lexer.reset(this.inputStream));\n this.tokenStream = this.tokenStream.filter((token) => {\n // Throws an exception in case of invalid syntax\n if (token.type === this.ruleNames.ERROR) {\n let text = token.text;\n const line = token.line;\n const column = token.col;\n throw SyntaxErrorFactory.invalid_syntax(text, line, column);\n }\n // remove all whitespaces token and comments\n return (\n token.type !== this.ruleNames.WHITESPACE &&\n token.type !== this.ruleNames.COMMENTS\n );\n });\n }\n\n parseTree () {\n return this.parseProgram();\n }\n\n /**\n * @param {number} index\n * @return {moo.Token}\n * */\n getToken (index = this.pos) {\n // if(index === null)\n // index = this.pos;\n if (index >= this.tokenStream.length) {\n return IVProgParser.EOF_TOKEN;\n }\n return this.tokenStream[index];\n }\n\n insideScope (scope) {\n if (this.scope.length <= 0) {\n return IVProgParser.BASE === scope;\n } else {\n return this.scope[this.scope.length - 1] === scope;\n }\n }\n\n pushScope (scope) {\n this.scope.push(scope);\n }\n\n pushVariableStack () {\n this.definedVariablesStack.push([]);\n }\n\n popScope () {\n return this.scope.pop();\n }\n\n popVariableStack () {\n return this.definedVariablesStack.pop();\n }\n\n getCurrentVariableStack () {\n return this.definedVariablesStack[this.definedVariablesStack.length - 1];\n }\n\n isEOF () {\n return this.getToken(this.pos).type === IVProgParser.EOF_TOKEN.type;\n }\n\n parseProgram () {\n this.consumeNewLines();\n const token = this.getToken();\n let globalVars = [];\n let functions = [];\n\n if (this.ruleNames.RK_PROGRAM === token.type) {\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.pushVariableStack();\n for (;;) {\n this.consumeNewLines();\n const token = this.getToken();\n if (\n token.type === this.ruleNames.RK_CONST ||\n this.isVariableType(token)\n ) {\n globalVars = globalVars.concat(this.parseGlobalVariables());\n } else if (token.type === this.ruleNames.RK_FUNCTION) {\n this.pushVariableStack();\n functions = functions.concat(this.parseFunction());\n this.popVariableStack();\n } else {\n break;\n }\n }\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n if (!this.isEOF()) {\n console.log(this.getToken());\n throw SyntaxErrorFactory.extra_lines();\n }\n this.popVariableStack();\n return { global: globalVars, functions: functions };\n } else {\n throw SyntaxErrorFactory.token_missing_one(\n this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_PROGRAM],\n token\n );\n }\n }\n\n checkOpenCurly (attempt = false) {\n const token = this.getToken();\n if (this.ruleNames.OPEN_CURLY !== token.type) {\n if (!attempt) throw SyntaxErrorFactory.token_missing_one(\"{\", token);\n else return false;\n }\n return true;\n }\n\n checkCloseCurly (attempt = false) {\n const token = this.getToken();\n if (this.ruleNames.CLOSE_CURLY !== token.type) {\n if (!attempt) throw SyntaxErrorFactory.token_missing_one(\"}\", token);\n else return false;\n }\n return true;\n }\n\n /* It checks if the current token at position pos is a ']'.\n * As a check function it doesn't increment pos.\n *\n * @params bool:attempt, indicates that the token is optional. Defaults: false\n *\n * @returns true if the attempt is true and current token is '[',\n * false is attempt is true and current token is not '['\n **/\n checkOpenBrace (attempt = false) {\n const token = this.getToken();\n if (this.ruleNames.OPEN_BRACE !== token.type) {\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(\"[\", token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseBrace (attempt = false) {\n const token = this.getToken();\n if (this.ruleNames.CLOSE_BRACE !== token.type) {\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(\"]\", token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkOpenParenthesis (attempt = false) {\n const token = this.getToken();\n if (this.ruleNames.OPEN_PARENTHESIS !== token.type) {\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(\"(\", token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseParenthesis (attempt = false) {\n const token = this.getToken();\n if (this.ruleNames.CLOSE_PARENTHESIS !== token.type) {\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(\")\", token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkEOS (attempt = false) {\n const eosToken = this.getToken();\n if (eosToken.type !== this.ruleNames.EOS) {\n if (!attempt) throw SyntaxErrorFactory.eos_missing(eosToken);\n else return false;\n }\n return true;\n }\n\n checkFunctionDuplicate (functionID, funcIDToken) {\n const id = functionID === null ? \"$main\" : functionID;\n const index = this.definedFuncsNameList.indexOf(id);\n if (index !== -1) {\n throw SyntaxErrorFactory.duplicate_function(funcIDToken);\n }\n this.definedFuncsNameList.push(id);\n }\n checkVariableDuplicate (variableID, sourceInfo) {\n const index = this.getCurrentVariableStack().indexOf(variableID);\n if (index !== -1) {\n throw SyntaxErrorFactory.duplicate_variable(sourceInfo);\n }\n this.getCurrentVariableStack().push(variableID);\n }\n\n consumeForSemiColon () {\n const eosToken = this.getToken();\n if (eosToken.type === this.ruleNames.EOS && eosToken.text.match(\"^;$\")) {\n this.pos++;\n return;\n }\n throw SyntaxErrorFactory.token_missing_one(\";\", eosToken);\n }\n\n parseGlobalVariables () {\n const decl = this.parseMaybeConst();\n this.checkEOS();\n this.pos++;\n return decl;\n }\n\n /*\n * Checks if the next token is PR_CONST. It's only available\n * at global variables declaration level\n * @returns Declararion(const, type, id, initVal?)\n **/\n parseMaybeConst () {\n const constToken = this.getToken();\n if (constToken.type === this.ruleNames.RK_CONST) {\n this.pos++;\n const typeString = this.parseType();\n return this.parseDeclaration(typeString, true);\n } else if (this.isVariableType(constToken)) {\n const typeString = this.parseType();\n return this.parseDeclaration(typeString);\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_CONST]].concat(\n this.getTypeArray()\n ),\n constToken\n );\n }\n }\n\n /**\n * Parses a declarion of the form: type --- id --- (= --- EAnd)?\n * @return {Commands.Declartion[]} a list of Declararion(const, type, id, initVal?)\n **/\n parseDeclaration (typeString, isConst = false) {\n let initial = null;\n let dim1 = null;\n let dim2 = null;\n let dimensions = 0;\n const sourceInfo = SourceInfo.createSourceInfo(this.getToken());\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, sourceInfo);\n // Check for array or vector\n // ID[int/IDi?][int/IDj?]\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n this.consumeNewLines();\n dim1 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1;\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n this.consumeNewLines();\n dim2 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1;\n }\n return this.parseArrayDeclaration(\n typeString,\n isConst,\n idString,\n sourceInfo,\n dimensions,\n dim1,\n dim2\n );\n } else {\n const assignmentToken = this.getToken();\n if (isConst && assignmentToken.type !== this.ruleNames.ASSIGNMENT) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if (assignmentToken.type === this.ruleNames.ASSIGNMENT) {\n this.pos++;\n initial = this.parseExpressionOR();\n }\n const declaration = new Commands.Declaration(\n idString,\n typeString,\n initial,\n isConst\n );\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if (commaToken.type === this.ruleNames.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration].concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration];\n }\n }\n }\n\n parseArrayDeclaration (\n typeString,\n isConst,\n idString,\n sourceInfo,\n dimensions,\n dim1,\n dim2\n ) {\n const assignmentToken = this.getToken();\n let n_lines = dim1;\n let n_columns = dim2;\n let initial = null;\n let dim_is_id = false;\n if (\n dim1 instanceof Expressions.VariableLiteral ||\n dim2 instanceof Expressions.VariableLiteral\n ) {\n dim_is_id = true;\n if (dimensions > 1 && (dim1 == null || dim2 == null)) {\n throw SyntaxErrorFactory.invalid_matrix_id_dimension(\n SourceInfo.createSourceInfo(assignmentToken)\n );\n }\n }\n if (isConst && assignmentToken.type !== this.ruleNames.ASSIGNMENT) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if (assignmentToken.type === this.ruleNames.ASSIGNMENT) {\n if (dim_is_id) {\n if (dimensions == 1) {\n throw SyntaxErrorFactory.invalid_vector_init(\n SourceInfo.createSourceInfo(assignmentToken)\n );\n } else {\n throw SyntaxErrorFactory.invalid_matrix_init(\n SourceInfo.createSourceInfo(assignmentToken)\n );\n }\n }\n this.pos += 1;\n initial = this.parseArrayLiteral(typeString);\n }\n if (initial == null && dim1 == null) {\n if (dimensions > 1) {\n throw SyntaxErrorFactory.cannot_infer_matrix_line(idString, sourceInfo);\n }\n throw SyntaxErrorFactory.cannot_infer_vector_size(idString, sourceInfo);\n }\n if (dimensions > 1) {\n if (initial == null && dim2 == null) {\n throw SyntaxErrorFactory.cannot_infer_matrix_column(\n idString,\n sourceInfo\n );\n }\n }\n\n if (dimensions === 1 && initial != null && !initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.matrix_to_vector_literal_attr(\n idString,\n expString,\n initial.sourceInfo\n );\n } else if (dimensions > 1 && initial != null && initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.vector_to_matrix_literal_attr(\n idString,\n expString,\n initial.sourceInfo\n );\n }\n\n if (dim1 == null) {\n n_lines = new Expressions.IntLiteral(Parsers.toInt(initial.lines));\n n_lines.sourceInfo = sourceInfo;\n }\n\n if (dimensions > 1) {\n if (dim2 == null) {\n n_columns = new Expressions.IntLiteral(Parsers.toInt(initial.columns));\n n_columns.sourceInfo = sourceInfo;\n }\n }\n const declaration = new Commands.ArrayDeclaration(\n idString,\n new ArrayType(typeString, dimensions),\n n_lines,\n n_columns,\n initial,\n isConst\n );\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if (commaToken.type === this.ruleNames.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration].concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration];\n }\n }\n\n consumeNewLines () {\n let token = this.getToken();\n while (\n token &&\n token.type === this.ruleNames.EOS &&\n token.text.match(\"^[\\r\\n]+$\")\n ) {\n this.pos++;\n token = this.getToken();\n }\n }\n\n isVariableType (token) {\n return this.variableTypes.find((v) => v === token.type);\n }\n\n /**\n * Reads the next token of the stream to check if it is a Integer or an ID.\n * @returns Integer | ID\n **/\n parseArrayDimension () {\n const dimToken = this.getToken();\n if (dimToken.type === this.ruleNames.INTEGER) {\n //parse as int literal\n this.pos++;\n return this.getIntLiteral(dimToken);\n } else if (dimToken.type === this.ruleNames.ID) {\n //parse as variable\n this.pos++;\n return this.parseVariable(dimToken);\n } else if (dimToken.type === this.ruleNames.CLOSE_BRACE) {\n return null;\n } else {\n throw SyntaxErrorFactory.invalid_array_dimension(\n this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_INTEGER],\n dimToken\n );\n }\n }\n\n /**\n * Returns an object {type: 'int', value: value}.\n * It checks for binary and hexadecimal integers.\n * @param {moo.Token} token\n * @return {Object} object with fields type and value\n **/\n getIntLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.IntLiteral(Parsers.toInt(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getRealLiteral (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.RealLiteral(Parsers.toReal(token.text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getStringLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.StringLiteral(Parsers.toString(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getCharLiteral (token) {\n const text = token.text;\n const exp = new Expressions.CharLiteral(Parsers.toChar(text));\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n getBoolLiteral (token) {\n const val = Parsers.toBool(token.text);\n const exp = new Expressions.BoolLiteral(val);\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n parseArrayLiteral (typeString) {\n const openCurly = this.checkOpenCurly(true);\n if (!openCurly) {\n const invalid_token = this.getToken();\n throw SyntaxErrorFactory.array_init_not_literal(\n SourceInfo.createSourceInfo(invalid_token)\n );\n }\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(\n SourceInfo.createSourceInfo(beginArray)\n );\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n let data = null;\n const maybeCurlyOpen = this.checkOpenCurly(true);\n if (maybeCurlyOpen) {\n // This is potentially a list of vectors\n data = this.parseVectorList(typeString);\n } else {\n data = this.parseExpressionList();\n }\n this.consumeNewLines();\n this.checkCloseCurly();\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(\n beginArray,\n endArray\n );\n let dataDim = 1;\n if (data[0] instanceof Expressions.ArrayLiteral) {\n dataDim += 1;\n } else if (data.length == 1) {\n console.log(\"Talvez uma variável seja uma melhor opção\");\n }\n const type = new ArrayType(typeString, dataDim);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /**\n * Returns a list of ArrayLiterals. Helper function for parsing matrices\n */\n parseVectorList (typeString) {\n const list = [];\n let lastSize = null;\n for (;;) {\n this.checkOpenCurly();\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(\n SourceInfo.createSourceInfo(beginArray)\n );\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n const data = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseCurly();\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(\n beginArray,\n endArray\n );\n if (lastSize == null) {\n lastSize = data.length;\n } else if (lastSize !== data.length) {\n const expString = this.inputStream.substring(\n beginArray.offset,\n endArray.offset + endArray.text.length\n );\n throw SyntaxErrorFactory.invalid_matrix_literal_line(\n expString,\n sourceInfo\n );\n }\n const type = new ArrayType(typeString, 1);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n list.push(exp);\n const commaToken = this.getToken();\n if (commaToken.type !== this.ruleNames.COMMA) {\n break;\n }\n this.pos += 1;\n this.consumeNewLines();\n }\n if (list.length == 1) {\n console.log(\"Talvez um vetor seja uma melhor opção\");\n }\n return list;\n }\n\n /*\n * Returns an object {type: 'variable', value: value}.\n * @returns object with fields type and value\n **/\n parseVariable (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.VariableLiteral(token.text);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /*\n * Returns an object representing a function. It has\n * four attributes: returnType, id, formalParams and block.\n * The block object has two attributes: declarations and commands\n **/\n parseFunction () {\n this.pushScope(IVProgParser.FUNCTION);\n let formalParams = [];\n const token = this.getToken();\n if (token.type !== this.ruleNames.RK_FUNCTION) {\n //throw SyntaxError.createError(this.lexer.literalNames[this.lexerClass.PR_FUNCAO], token);\n return null;\n }\n this.pos++;\n const funType = this.parseType();\n let dimensions = 0;\n if (this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n if (this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n }\n }\n const funcIDToken = this.getToken();\n const functionID = this.parseID();\n this.checkFunctionDuplicate(functionID, funcIDToken);\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n if (!this.checkCloseParenthesis(true)) {\n formalParams = this.parseFormalParameters(); // formal parameters\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n } else {\n this.pos++;\n }\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n let returnType = funType;\n if (dimensions > 0) {\n returnType = new ArrayType(funType, dimensions);\n }\n const func = new Commands.Function(\n functionID,\n returnType,\n formalParams,\n commandsBlock\n );\n if (functionID === null && !func.isMain) {\n throw SyntaxErrorFactory.invalid_main_return(\n LanguageDefinedFunction.getMainFunctionName(),\n this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_VOID],\n token.line\n );\n } else if (func.isMain && formalParams.length !== 0) {\n throw SyntaxErrorFactory.main_parameters();\n }\n this.popScope();\n func.sourceInfo = SourceInfo.createSourceInfo(funcIDToken);\n return func;\n }\n\n /*\n * Parse the formal parameters of a function.\n * @returns a list of objects with the following attributes: type, id and dimensions.\n **/\n parseFormalParameters () {\n const list = [];\n for (;;) {\n let dimensions = 0;\n let reference = false;\n const typeString = this.parseType();\n let maybeIDToken = this.getToken();\n if (maybeIDToken.type === this.ruleNames.RK_REFERENCE) {\n reference = true;\n this.pos += 1;\n maybeIDToken = this.getToken();\n }\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, maybeIDToken);\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n }\n }\n let type = null;\n if (dimensions > 0) {\n type = new ArrayType(typeString, dimensions);\n } else {\n type = typeString;\n }\n const parameter = new Commands.FormalParameter(type, idString, reference);\n parameter.sourceInfo = SourceInfo.createSourceInfo(maybeIDToken);\n list.push(parameter);\n const commaToken = this.getToken();\n if (commaToken.type !== this.ruleNames.COMMA) break;\n this.pos++;\n this.consumeNewLines();\n }\n return list;\n }\n\n parseID () {\n const token = this.getToken();\n if (token.type !== this.ruleNames.ID) {\n throw SyntaxErrorFactory.id_missing(token);\n }\n this.pos++;\n if (this.insideScope(IVProgParser.FUNCTION)) {\n if (token.text === LanguageDefinedFunction.getMainFunctionName()) {\n return null;\n }\n }\n return token.text;\n }\n\n /**\n * @return {string}\n **/\n parseMaybeLibID () {\n const token = this.getToken();\n if (token.type !== this.ruleNames.ID) {\n throw SyntaxErrorFactory.id_missing(token);\n }\n const maybeDOT = this.getToken(this.pos + 1);\n if (maybeDOT.type === this.ruleNames.DOT) {\n this.pos += 2;\n const anotherID = this.getToken();\n if (anotherID.type !== this.ruleNames.ID) {\n throw SyntaxErrorFactory.id_missing(anotherID);\n }\n this.pos++;\n return `${token.text}.${anotherID.text}`;\n }\n this.pos++;\n return token.text;\n }\n\n parseType () {\n const token = this.getToken();\n if (\n token.type === this.ruleNames.ID &&\n this.insideScope(IVProgParser.FUNCTION)\n ) {\n return Types.VOID;\n } else if (\n token.type === this.ruleNames.RK_VOID &&\n this.insideScope(IVProgParser.FUNCTION)\n ) {\n this.pos++;\n return Types.VOID;\n } else if (this.isVariableType(token)) {\n this.pos++;\n switch (token.type) {\n case this.ruleNames.RK_INTEGER:\n return Types.INTEGER;\n case this.ruleNames.RK_BOOLEAN:\n return Types.BOOLEAN;\n case this.ruleNames.RK_REAL:\n return Types.REAL;\n case this.ruleNames.RK_STRING:\n return Types.STRING;\n case this.ruleNames.RK_CHARACTER:\n return Types.CHAR;\n default:\n break;\n }\n }\n\n throw SyntaxErrorFactory.invalid_type(this.getTypeArray(), token);\n }\n\n parseCommandBlock (optionalCurly = false) {\n let variablesDecl = [];\n const commands = [];\n let hasOpen = false;\n if (this.checkOpenCurly(optionalCurly)) {\n this.pos++;\n hasOpen = true;\n }\n this.consumeNewLines();\n let parsedCommand = false;\n for (;;) {\n const cmd = this.parseCommand();\n if (cmd === null) break;\n if (cmd !== -1) {\n if (cmd instanceof Array) {\n if (parsedCommand) {\n const lastToken = this.getToken(this.pos - 1);\n throw SyntaxErrorFactory.invalid_var_declaration(lastToken);\n }\n variablesDecl = variablesDecl.concat(cmd);\n } else {\n parsedCommand = true;\n commands.push(cmd);\n }\n }\n }\n this.consumeNewLines();\n if (hasOpen) {\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n }\n return new Commands.CommandBlock(variablesDecl, commands);\n }\n\n parseCommand () {\n const token = this.getToken();\n if (this.isVariableType(token)) {\n if (!this.insideScope(IVProgParser.FUNCTION)) {\n throw SyntaxErrorFactory.invalid_var_declaration(token);\n }\n this.pushScope(IVProgParser.BASE);\n const varType = this.parseType();\n this.popScope();\n const cmd = this.parseDeclaration(varType);\n this.checkEOS();\n this.pos++;\n return cmd;\n } else if (token.type === this.ruleNames.ID) {\n return this.parseIDCommand();\n } else if (token.type === this.ruleNames.DOT) {\n // TODO Check if this is relevant since DOT is a replacement for antlr4 LIB_ID :=> ID . ID\n throw SyntaxErrorFactory.invalid_syntax(\n token.text,\n token.line,\n token.col\n );\n } else if (token.type === this.ruleNames.RK_RETURN) {\n return this.parseReturn();\n } else if (\n token.type === this.ruleNames.RK_WHILE ||\n token.type === this.ruleNames.RK_WHILE_ALT\n ) {\n return this.parseWhile();\n } else if (\n token.type === this.ruleNames.RK_FOR ||\n token.type === this.ruleNames.RK_FOR_ALT\n ) {\n return this.parseFor();\n } else if (token.type === this.ruleNames.RK_BREAK) {\n if (!this.insideScope(IVProgParser.BREAKABLE)) {\n throw SyntaxErrorFactory.invalid_break_command(\n this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_BREAK],\n token\n );\n }\n return this.parseBreak();\n } else if (token.type === this.ruleNames.RK_SWITCH) {\n return this.parseSwitchCase();\n } else if (token.type === this.ruleNames.RK_DO) {\n return this.parseRepeatUntil();\n } else if (token.type === this.ruleNames.RK_IF) {\n return this.parseIfThenElse();\n } else if (this.checkEOS(true)) {\n this.pos++;\n return -1;\n } else {\n return null;\n }\n }\n\n parseSwitchCase () {\n const token = this.getToken();\n this.pushScope(IVProgParser.BREAKABLE);\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.consumeNewLines();\n const casesList = this.parseCases();\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n\n this.popScope();\n const command = new Commands.Switch(exp, casesList);\n command.sourceInfo = SourceInfo.createSourceInfo(token);\n return command;\n }\n\n parseRepeatUntil () {\n const token = this.getToken();\n this.pos++;\n this.consumeNewLines();\n this.pushScope(IVProgParser.BREAKABLE);\n const commandsBlock = this.parseCommandBlock();\n this.consumeNewLines(); //Maybe not...\n const whileToken = this.getToken();\n if (whileToken.type !== this.ruleNames.RK_DO_UNTIL) {\n throw SyntaxErrorFactory.token_missing_one(\n this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_DO_UNTIL],\n whileToken\n );\n }\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const condition = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.checkEOS();\n this.popScope();\n const command = new Commands.RepeatUntil(condition, commandsBlock);\n command.sourceInfo = SourceInfo.createSourceInfo(token);\n return command;\n }\n\n parseIfThenElse () {\n if (this.insideScope(IVProgParser.BREAKABLE)) {\n this.pushScope(IVProgParser.BREAKABLE);\n } else {\n this.pushScope(IVProgParser.COMMAND);\n }\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n\n const maybeElse = this.getToken();\n if (maybeElse.type === this.ruleNames.RK_ELSE) {\n this.pos++;\n this.consumeNewLines();\n const maybeIf = this.getToken();\n let elseBlock = null;\n if (this.checkOpenCurly(true)) {\n elseBlock = this.parseCommandBlock();\n } else if (maybeIf.type === this.ruleNames.RK_IF) {\n elseBlock = this.parseIfThenElse();\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_IF], \"{\"],\n maybeIf\n );\n }\n this.popScope();\n const cmd = new Commands.IfThenElse(\n logicalExpression,\n cmdBlocks,\n elseBlock\n );\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n this.popScope();\n\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, null);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseFor () {\n this.pushScope(IVProgParser.BREAKABLE);\n const for_token = this.getToken();\n this.pos += 1;\n // parse ID\n const id_token = this.getToken();\n const id = this.parseID();\n const for_id = new Expressions.VariableLiteral(id);\n for_id.sourceInfo = SourceInfo.createSourceInfo(id_token);\n // END parse ID\n const for_from = this.parseForParameters(this.ruleNames.RK_FOR_FROM);\n const for_to = this.parseForParameters(this.ruleNames.RK_FOR_TO);\n const maybePass = this.parseForParameters(this.ruleNames.RK_FOR_PASS);\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.For(\n for_id,\n for_from,\n for_to,\n maybePass,\n commandsBlock\n );\n cmd.sourceInfo = SourceInfo.createSourceInfo(for_token);\n return cmd;\n }\n\n parseWhile () {\n this.pushScope(IVProgParser.BREAKABLE);\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.While(logicalExpression, cmdBlocks);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseBreak () {\n const token = this.getToken();\n this.pos++;\n this.checkEOS();\n this.pos++;\n const command = new Commands.Break();\n command.sourceInfo = SourceInfo.createSourceInfo(token);\n return command;\n }\n\n parseReturn () {\n const token = this.getToken();\n this.pos++;\n let exp = null;\n if (!this.checkEOS(true)) {\n exp = this.parseExpressionOR();\n this.checkEOS();\n }\n this.pos++;\n const returnCommand = new Commands.Return(exp);\n returnCommand.sourceInfo = SourceInfo.createSourceInfo(token);\n return returnCommand;\n }\n\n parseIDCommand () {\n const refToken = this.getToken();\n const id = this.parseMaybeLibID();\n const isID = id.indexOf(\".\") === -1;\n if (this.checkOpenBrace(true)) {\n this.pos++;\n let lineExpression = null;\n let columnExpression = null;\n this.consumeNewLines();\n lineExpression = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n if (this.checkOpenBrace(true)) {\n this.pos++;\n this.consumeNewLines();\n columnExpression = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n }\n const assignmentToken = this.getToken();\n if (assignmentToken.type !== this.ruleNames.ASSIGNMENT) {\n // TODO BETTER MESSAGE\n throw SyntaxErrorFactory.token_missing_one(\"<-\", assignmentToken);\n }\n this.pos++;\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.ArrayIndexAssign(\n id,\n lineExpression,\n columnExpression,\n exp\n );\n cmd.sourceInfo = SourceInfo.createSourceInfo(assignmentToken);\n return cmd;\n }\n const assignmentOrParenthesis = this.getToken();\n if (isID && assignmentOrParenthesis.type === this.ruleNames.ASSIGNMENT) {\n this.pos++;\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.Assign(id, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(assignmentOrParenthesis);\n return cmd;\n } else if (\n assignmentOrParenthesis.type === this.ruleNames.OPEN_PARENTHESIS\n ) {\n const funcCall = this.parseFunctionCallCommand(id);\n this.checkEOS();\n this.pos++;\n return funcCall;\n } else if (isID) {\n throw SyntaxErrorFactory.token_missing_list(\n [\"<-\", \"(\"],\n assignmentOrParenthesis\n );\n } else {\n throw SyntaxErrorFactory.invalid_id_format(refToken);\n }\n }\n\n parseForParameters (keyword_code) {\n if (keyword_code === this.ruleNames.RK_FOR_PASS) {\n if (this.checkOpenCurly(true)) {\n return null;\n }\n }\n const from_token = this.getToken();\n if (from_token.type !== keyword_code) {\n // TODO better error message\n const keyword = this.ivprogLexer.getReservedKeys()[keyword_code];\n throw new Error(\n \"Error de sintaxe no comando repita_para: esperava-se \" +\n keyword +\n \" mas encontrou \" +\n from_token.text\n );\n }\n this.pos += 1;\n let int_or_id = this.getToken();\n let is_unary_op = false;\n let op = null;\n if (int_or_id.type === this.ruleNames.SUM_OP) {\n is_unary_op = true;\n op = int_or_id.text;\n this.pos += 1;\n int_or_id = this.getToken();\n }\n let for_from = null;\n if (int_or_id.type === this.ruleNames.ID) {\n for_from = new Expressions.VariableLiteral(this.parseID());\n for_from.sourceInfo = SourceInfo.createSourceInfo(int_or_id);\n } else if (int_or_id.type === this.ruleNames.INTEGER) {\n this.pos += 1;\n for_from = this.getIntLiteral(int_or_id);\n }\n if (for_from == null) {\n // TODO better error message\n const keyword = this.ivprogLexer.getReservedKeys()[keyword_code];\n throw new Error(\n \"Error de sintaxe no comando repeita_para: \" +\n int_or_id.text +\n \" não é compativel com o esperado para o paramentro \" +\n keyword +\n \". O valor deve ser um inteiro ou variável.\"\n );\n }\n if (is_unary_op) {\n for_from = new Expressions.UnaryApp(convertFromString(op), for_from);\n }\n return for_from;\n }\n\n parseCases () {\n const token = this.getToken();\n if (token.type !== this.ruleNames.RK_CASE) {\n throw SyntaxErrorFactory.token_missing_one(\n this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_CASE],\n token\n );\n }\n this.pos++;\n const nextToken = this.getToken();\n if (nextToken.type === this.ruleNames.RK_DEFAULT) {\n this.pos++;\n const colonToken = this.getToken();\n if (colonToken.type !== this.ruleNames.COLON) {\n throw SyntaxErrorFactory.token_missing_one(\":\", colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const defaultCase = new Commands.Case(null);\n defaultCase.sourceInfo = SourceInfo.createSourceInfo(token);\n defaultCase.setCommands(block.commands);\n return [defaultCase];\n } else {\n const exp = this.parseExpressionOR();\n const colonToken = this.getToken();\n if (colonToken.type !== this.ruleNames.COLON) {\n throw SyntaxErrorFactory.token_missing_one(\":\", colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const aCase = new Commands.Case(exp);\n aCase.sourceInfo = SourceInfo.createSourceInfo(token);\n aCase.setCommands(block.commands);\n const caseToken = this.getToken();\n if (caseToken.type === this.ruleNames.RK_CASE) {\n return [aCase].concat(this.parseCases());\n } else {\n return [aCase];\n }\n }\n }\n\n /*\n * Parses an Expression following the structure:\n *\n * EOR => EAnd ( 'or' EOR)? #expression and\n *\n * EAnd => ENot ('and' EAnd)? #expression or\n *\n * ENot => 'not'? ER #expression not\n *\n * ER => E ((>=, <=, ==, >, <) ER)? #expression relational\n *\n * E => factor ((+, -) E)? #expression\n *\n * factor=> term ((*, /, %) factor)?\n *\n * term => literal || arrayAccess || FuncCall || ID || '('EOR')'\n **/\n parseExpressionOR () {\n let exp1 = this.parseExpressionAND();\n while (this.getToken().type === this.ruleNames.OR_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const or = convertFromString(\"or\");\n this.consumeNewLines();\n const exp2 = this.parseExpressionAND();\n const finalExp = new Expressions.InfixApp(or, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpressionAND () {\n let exp1 = this.parseExpressionNot();\n while (this.getToken().type === this.ruleNames.AND_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const and = convertFromString(\"and\");\n this.consumeNewLines();\n const exp2 = this.parseExpressionNot();\n const finalExp = new Expressions.InfixApp(and, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpressionNot () {\n const maybeNotToken = this.getToken();\n if (maybeNotToken.type === this.ruleNames.NOT_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const not = convertFromString(\"not\");\n const exp1 = this.parseExpressionRel();\n const finalExp = new Expressions.UnaryApp(not, exp1);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n return finalExp;\n } else {\n return this.parseExpressionRel();\n }\n }\n\n parseExpressionRel () {\n let exp1 = this.parseExpression();\n while (this.getToken().type === this.ruleNames.RELATIONAL_OPERATOR) {\n const relToken = this.getToken();\n this.pos++;\n const rel = convertFromString(relToken.text);\n const exp2 = this.parseExpression();\n const finalExp = new Expressions.InfixApp(rel, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(relToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpression () {\n let factor = this.parseFactor();\n while (this.getToken().type === this.ruleNames.SUM_OP) {\n const sumOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(sumOpToken.text);\n const factor2 = this.parseFactor();\n const finalExp = new Expressions.InfixApp(op, factor, factor2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(sumOpToken);\n factor = finalExp;\n }\n return factor;\n }\n\n parseFactor () {\n let term = this.parseTerm();\n while (this.getToken().type === this.ruleNames.MULTI_OP) {\n const multOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(multOpToken.text);\n const term2 = this.parseTerm();\n const finalExp = new Expressions.InfixApp(op, term, term2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(multOpToken);\n term = finalExp;\n }\n return term;\n }\n\n parseTerm () {\n const token = this.getToken();\n let sourceInfo = null;\n let exp = null;\n switch (token.type) {\n case this.ruleNames.SUM_OP:\n this.pos++;\n sourceInfo = SourceInfo.createSourceInfo(token);\n exp = new Expressions.UnaryApp(\n convertFromString(token.text),\n this.parseTerm()\n );\n exp.sourceInfo = sourceInfo;\n return exp;\n case this.ruleNames.INTEGER:\n this.pos++;\n return this.getIntLiteral(token);\n case this.ruleNames.REAL:\n this.pos++;\n return this.getRealLiteral(token);\n case this.ruleNames.STRING:\n this.pos++;\n return this.getStringLiteral(token);\n case this.ruleNames.CHARACTER:\n this.pos++;\n return this.getCharLiteral(token);\n case this.ruleNames.RK_TRUE:\n case this.ruleNames.RK_FALSE:\n this.pos++;\n return this.getBoolLiteral(token);\n case this.ruleNames.OPEN_CURLY:\n // No more annonymous array\n // return this.parseArrayLiteral();\n throw SyntaxErrorFactory.annonymous_array_literal(token);\n case this.ruleNames.ID:\n return this.parseIDTerm();\n case this.ruleNames.OPEN_PARENTHESIS:\n return this.parseParenthesisExp();\n default:\n throw SyntaxErrorFactory.invalid_terminal(token);\n }\n }\n\n parseIDTerm () {\n const tokenA = this.getToken();\n const id = this.parseMaybeLibID();\n const isID = id.indexOf(\".\") === -1;\n if (isID && this.checkOpenBrace(true)) {\n let tokenB = null;\n this.pos++;\n const firstIndex = this.parseExpression();\n let secondIndex = null;\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n if (this.checkOpenBrace(true)) {\n this.pos++;\n secondIndex = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n }\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n const exp = new Expressions.ArrayAccess(id, firstIndex, secondIndex);\n exp.sourceInfo = sourceInfo;\n return exp;\n } else if (this.checkOpenParenthesis(true)) {\n return this.parseFunctionCallExpression(id);\n } else if (isID) {\n const sourceInfo = SourceInfo.createSourceInfo(tokenA);\n const exp = new Expressions.VariableLiteral(id);\n exp.sourceInfo = sourceInfo;\n return exp;\n } else {\n throw SyntaxErrorFactory.invalid_id_format(tokenA);\n }\n }\n\n getFunctionName (id) {\n const name = LanguageDefinedFunction.getInternalName(id);\n if (name === null) {\n if (id === LanguageDefinedFunction.getMainFunctionName()) {\n return null;\n }\n return id;\n } else {\n return name;\n }\n }\n\n parseFunctionCallExpression (id) {\n const stepBack = id.indexOf(\".\") === -1 ? 1 : 3;\n const tokenA = this.getToken(this.pos - stepBack);\n const actualParameters = this.parseActualParameters();\n const tokenB = this.getToken(this.pos - 1);\n const funcName = this.getFunctionName(id);\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n const cmd = new Expressions.FunctionCall(funcName, actualParameters);\n cmd.sourceInfo = sourceInfo;\n return cmd;\n }\n\n parseFunctionCallCommand (id) {\n return this.parseFunctionCallExpression(id);\n }\n\n parseParenthesisExp () {\n this.checkOpenParenthesis();\n const tokenA = this.getToken();\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n const tokenB = this.getToken();\n this.pos += 1;\n exp.sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n exp.parenthesis = true;\n return exp;\n }\n\n parseActualParameters () {\n this.checkOpenParenthesis();\n this.pos++;\n if (this.checkCloseParenthesis(true)) {\n this.pos++;\n return [];\n }\n this.consumeNewLines();\n const list = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n return list;\n }\n\n parseExpressionList () {\n const list = [];\n for (;;) {\n const exp = this.parseExpressionOR();\n list.push(exp);\n const maybeToken = this.getToken();\n if (maybeToken.type !== this.ruleNames.COMMA) {\n break;\n } else {\n this.pos++;\n this.consumeNewLines();\n }\n }\n return list;\n }\n\n getTypeArray () {\n const types = this.insideScope(IVProgParser.FUNCTION)\n ? this.functionTypes\n : this.variableTypes;\n return types.map((x) => this.lexer.literalNames[x]);\n }\n}\n","export class SourceInfo {\n\n /**\n * @param {moo.Token} token\n *\n * @return {SourceInfo}\n * **/\n static createSourceInfo (token) {\n return new SourceInfo(token.line, token.col, token.text, token.text.length);\n }\n\n /**\n * @param {moo.Token} tokenA\n * @param {moo.Token} tokenB\n *\n * @return {SourceInfo}\n * **/\n static createSourceInfoFromList (tokenA, tokenB) {\n const line = tokenA.line;\n const column = tokenA.col;\n // adapted from https://github.com/UNIVALI-LITE/Portugol-Studio/blob/master/core/src/main/java/br/univali/portugol/nucleo/analise/sintatica/Portugol.g\n // No idea why...\n const size = tokenB.offset + 1 - tokenA.offset\n return new SourceInfo(line, column, \"\", size);\n }\n\n /**\n * @param {number} line\n * @param {number} column\n * @param {string} text\n * @param {number} size\n * **/\n constructor (line, column, text, size) {\n this.line = line;\n this.column = column;\n this.text = text;\n this.size = size;\n }\n\n}\n","import { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as Utils from \"./../util/utils\";\nimport { Config } from \"./../util/config\";\n\nexport class DOMConsole {\n static get BASH_TEMPLATE () {\n return `\n <div class=\"bash-title\">\n <i id=\"ivprog-console-clearbtn\" class=\"icon eraser\" style=\"float:left;padding-left: 5px\"></i>\n <span>Terminal</span>\n <i id=\"ivprog-console-showbtn\" class=\"icon window maximize outline\" style=\"float:right\"></i>\n <i id=\"ivprog-console-hidebtn\" class=\"icon window minimize outline\" style=\"float:right\"></i>\n </div>\n <div id='ivprog-term' class=\"bash-body\"></div>`;\n }\n\n static get INPUT_CARET_TEMPLATE () {\n return `\n <div id=\"cmd\">\n <span></span>\n <div id=\"cursor\"></div>\n </div>`;\n }\n\n static get USER () {\n return 0;\n }\n\n static get INFO () {\n return 1;\n }\n\n static get ERR () {\n return 2;\n }\n\n static get INPUT () {\n return 3;\n }\n\n constructor (elementID, disableMarginTop = false) {\n this.disableMarginTop = disableMarginTop;\n this.input = null;\n this.cursorInterval = null;\n this.idleInterval = null;\n this.inputDiv = null;\n this.inputCMD = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.needInput = false;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.termDiv = null;\n this.anyKey = false;\n let actualID = elementID;\n if (elementID[0] === \"#\") {\n actualID = elementID.substring(1);\n }\n this.parent = document.getElementById(actualID);\n this.setup();\n this.inputListeners = [];\n this.hideInput();\n this.pending_writes = [];\n this.last_clear = -1;\n }\n\n setup () {\n this._setupDom();\n this._setupEvents();\n }\n\n _setupEvents () {\n this.input.addEventListener(\"keydown\", this.registerInput.bind(this));\n this.clearBtn.addEventListener(\"click\", this.clearBtnClick.bind(this));\n this.hideBtn.addEventListener(\"click\", this.hideBtnClick.bind(this));\n this.showBtn.addEventListener(\"click\", this.showBtnClick.bind(this));\n }\n\n registerInput (event) {\n if (!this.needInput) {\n return;\n }\n const keyCode = event.which;\n if (keyCode === 13 || this.anyKey) {\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n let text = this.input.value;\n text = text.replace(\"[\\n\\r]+\", \"\");\n this.notifyListeners(text);\n this._appendUserInput(text);\n this.input.value = \"\";\n this.inputSpan.innerHTML = \"\";\n this.currentLine = null;\n }\n }\n\n _setupDom () {\n const bashNode = document.createElement(\"div\");\n bashNode.classList.add(\"bash\");\n bashNode.innerHTML = DOMConsole.BASH_TEMPLATE;\n this.termDiv = bashNode.querySelector(\"#ivprog-term\");\n this.termDiv.classList.add(\"ivprog-term-div\");\n this.inputDiv = document.createElement(\"div\");\n this.inputDiv.id = \"ivprog-terminal-inputdiv\";\n this.inputDiv.innerHTML = DOMConsole.INPUT_CARET_TEMPLATE;\n this.input = document.createElement(\"input\");\n this.input.setAttribute(\"name\", \"command\");\n this.input.setAttribute(\"value\", \"\");\n this.input.setAttribute(\"type\", \"text\");\n this.input.setAttribute(\"autocomplete\", \"off\");\n this.inputDiv.append(this.input);\n this.termDiv.append(this.inputDiv);\n bashNode.append(this.termDiv);\n this.parent.append(bashNode);\n this.inputCMD = this.inputDiv.querySelector(\"#cmd\");\n this.cursorRef = this.inputCMD.querySelector(\"#cursor\");\n this.inputSpan = this.inputCMD.querySelector(\"span\");\n this.clearBtn = bashNode.querySelector(\"#ivprog-console-clearbtn\");\n this.hideBtn = bashNode.querySelector(\"#ivprog-console-hidebtn\");\n this.showBtn = bashNode.querySelector(\"#ivprog-console-showbtn\");\n this._setupCursor();\n //Jquery tooltips....\n window\n .$(this.clearBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_clear\") });\n window\n .$(this.showBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_show\") });\n window\n .$(this.hideBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_hide\") });\n }\n\n _setupCursor () {\n this.inputCMD.addEventListener(\"click\", this.blinkCaretAndFocus.bind(this));\n //this.inputCMD.click();\n\n this.input.addEventListener(\"keyup\", this.updateSpanText.bind(this));\n this.input.addEventListener(\"blur\", this.stopBlinkCaret.bind(this));\n }\n\n blinkCaretAndFocus () {\n if (this.cursorInterval != null) {\n return;\n }\n this.input.focus();\n this.cursorInterval = window.setInterval(() => {\n if (this.cursorRef.style.visibility === \"visible\") {\n this.cursorRef.style.visibility = \"hidden\";\n } else {\n this.cursorRef.style.visibility = \"visible\";\n }\n }, 500);\n }\n\n updateSpanText () {\n this.inputSpan.innerHTML = this.input.value;\n if (this.idleInterval != null) window.clearInterval(this.idleInterval);\n this.scheduleNotify();\n }\n\n stopBlinkCaret () {\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n this.cursorRef.style.visibility = \"visible\";\n }\n\n notifyListeners (text) {\n this.inputListeners.forEach((resolve) => resolve(text));\n this.inputListeners.splice(0, this.inputListeners.length);\n this.hideInput();\n this.anyKey = false;\n }\n\n writeRawHTML (text, channel) {\n this._appendTextLn(text, channel, false);\n }\n\n write (text, newLine = false) {\n this._appendText(text, DOMConsole.USER, newLine);\n }\n\n info (text) {\n this._appendTextLn(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendTextLn(text, DOMConsole.ERR);\n }\n\n async _appendText (text, type, newLine = false) {\n // console.debug(\"Caling appendText\");\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(3);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n\n if (this.currentLine == null) {\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement(\"div\");\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = textDiv;\n }\n this.currentLine.innerHTML += this.getOutputText(text);\n if (newLine) {\n // console.debug(\"append newline\");\n this.currentLine = null;\n }\n this.scrollTerm();\n }\n\n async _appendTextLn (text, type, filter = true) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(3);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement(\"div\");\n textDiv.classList.add(divClass);\n if (filter) textDiv.innerHTML = this.getOutputText(text);\n else textDiv.innerHTML = `<span>${text}</span>`;\n if (this.currentLine != null && this.currentLine.innerHTML.length === 0) {\n this.termDiv.removeChild(this.currentLine);\n }\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = null;\n this.scrollTerm();\n }\n\n async _appendUserInput (text) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(3);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(DOMConsole.INPUT);\n const textDiv = document.createElement(\"div\");\n textDiv.innerHTML = this.getUserInputText(text);\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = null;\n this.scrollTerm();\n }\n\n getOutputText (text) {\n text = text.replace(/\\s/g, \" \");\n return `<span>${text}</span>`;\n }\n\n getUserInputText (text) {\n if (text.trim().length == 0) {\n text = \" \";\n }\n return `<i class=\"icon keyboard outline\" style=\"float:left\"></i><span>${text}</span>`;\n }\n\n scrollTerm () {\n //scrollIt(this.inputDiv.previousSibling,200);\n this.termDiv.scrollTop = this.termDiv.scrollHeight;\n }\n\n focus () {\n this.termDiv.style.display = \"block\";\n // Is in draggable mode?\n if (!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"-160px\";\n }\n if (this.needInput) {\n this.showInput();\n this.scheduleNotify();\n }\n if (!Utils.isElementInViewport(this.termDiv))\n this.termDiv.scrollIntoView(false);\n this.scrollTerm();\n }\n\n hide () {\n if (this.needInput) {\n clearInterval(this.idleInterval);\n this.hideInput();\n this.needInput = true;\n }\n // Is in draggable mode?\n if (!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"0\";\n }\n this.termDiv.style.display = \"none\";\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.INPUT:\n return \"ivprog-term-userInput\";\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n dispose () {\n this.input.removeEventListener(\"keyup\", this.updateSpanText.bind(this));\n this.input.removeEventListener(\"blur\", this.stopBlinkCaret.bind(this));\n this.input.removeEventListener(\"keydown\", this.registerInput.bind(this));\n this.inputCMD.removeEventListener(\n \"click\",\n this.blinkCaretAndFocus.bind(this)\n );\n this.clearBtn.removeEventListener(\"click\", this.clearBtnClick.bind(this));\n this.hideBtn.removeEventListener(\"click\", this.hideBtnClick.bind(this));\n this.showBtn.removeEventListener(\"click\", this.showBtnClick.bind(this));\n this.input = null;\n this.inputCMD = null;\n this.inputDiv = null;\n this.termDiv = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.currentLine = null;\n const cNode = this.parent.cloneNode(false);\n this.parent.parentNode.replaceChild(cNode, this.parent);\n if (this.cursorInterval != null) {\n clearInterval(this.cursorInterval);\n }\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n }\n }\n\n showInput () {\n this.needInput = true;\n this.inputDiv.style.display = \"block\";\n this.inputCMD.click();\n //this.inputCMD.scrollIntoView();\n this.scrollTerm();\n }\n\n hideInput () {\n this.needInput = false;\n this.inputDiv.style.display = \" none\";\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n }\n\n requestInput (anyKey = false) {\n const promise = new Promise((resolve, _) => {\n this.inputListeners.push(resolve);\n this.anyKey = anyKey;\n if (this.idleInterval == null) this.scheduleNotify();\n this.showInput();\n });\n return promise;\n }\n\n sendOutput (text) {\n //console.debug(text);\n let output = \"\" + text;\n if (output.indexOf(\"\\n\") !== -1) {\n //console.debug(\"newline\");\n const outputList = output.split(\"\\n\");\n let i = 0;\n for (; i < outputList.length - 1; i += 1) {\n //console.debug(\"newline write\");\n let t = outputList[i];\n t = t.replace(/\\t/g, \"  \");\n t = t.replace(/\\s/g, \" \");\n if (t.length !== 0) {\n this.write(t);\n }\n this.write(\"\", true);\n }\n let t = outputList[i];\n t = t.replace(/\\t/g, \"  \");\n t = t.replace(/\\s/g, \" \");\n if (t.length != 0) this.write(t);\n } else {\n // console.debug(\"no newline\");\n output = output.replace(/\\t/g, \"  \");\n output = output.replace(/\\s/g, \" \");\n if (output.length != 0) this.write(output);\n }\n }\n\n clearPendingWrites () {\n this.last_clear = Date.now();\n }\n\n clear () {\n this.clearPendingWrites();\n while (this.inputDiv.parentElement.childNodes.length > 1) {\n this.inputDiv.parentElement.removeChild(\n this.inputDiv.parentElement.firstChild\n );\n }\n this.input.value = \"\";\n this.inputSpan.innerHTML = \"\";\n this.currentLine = null;\n }\n\n clearBtnClick () {\n this.clear();\n }\n\n showBtnClick () {\n this.focus();\n }\n\n hideBtnClick () {\n this.hide();\n }\n\n notifyIdle () {\n this.info(LocalizedStrings.getMessage(\"awaiting_input_message\"));\n this.inputCMD.click();\n }\n\n scheduleNotify () {\n this.idleInterval = window.setInterval(\n this.notifyIdle.bind(this),\n Config.idle_input_interval\n );\n }\n\n cancelPendingInputRequests () {\n this.inputListeners.forEach((resolve) => resolve(\"\"));\n this.inputListeners.splice(0, this.inputListeners.length);\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n this.input.value = \"\";\n this.inputSpan.innerHTML = \"\";\n this.currentLine = null;\n this.hideInput();\n this.anyKey = false;\n }\n}\n","export class Input {\n\n requestInput () {\n throw new Error(\"Must be implemented\");\n }\n\n cancelPendingInputRequests () {\n throw new Error(\"Must be implemented\");\n }\n}","export class Output {\n\n sendOutput (text) {\n throw new Error(\"Must be implemented\");\n }\n}","import { runner } from \"./runner\";\nimport {\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n} from \"./visualUI/functions\";\nimport * as LocalizedStringsService from \"./services/localizedStringsService\";\nimport { i18nHelper } from \"./services/i18nHelper\";\nimport {\n ActionTypes,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n} from \"./services/userLog\";\nimport {\n prepareActivityToStudentHelper,\n prepareActivityToStudentHelperJSON,\n autoEval,\n setPreviousAlgorithm\n} from \"./util/iassignHelpers\";\nimport { openAssessmentDetail, levenshteinDistance } from \"./util/utils\";\nimport { Config } from \"./util/config\";\nimport { processData } from \"./util/dataProcess\";\nimport { parseExpression, parseCode } from \"./util/parseFromVisual\";\nimport * as CodeEditorAll from \"./visualUI/text_editor\";\nimport { autoGenerateTestCaseOutput } from \"./util/auto_gen_output\";\nimport { generate } from \"./visualUI/code_generator\";\n\nconst CodeEditor = {\n initTextEditor: CodeEditorAll.initTextEditor,\n setCode: CodeEditorAll.setCode,\n getCode: CodeEditorAll.getCode,\n updateEditor: CodeEditorAll.updateEditor,\n disable: CodeEditorAll.disable,\n};\n\nconst Settings = {\n programming: [],\n functions: [],\n datatypes: [],\n commands: [],\n filter: []\n}\n\nconst i18n = i18nHelper.i18n;\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport {\n runner,\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n autoEval,\n prepareActivityToStudentHelper,\n prepareActivityToStudentHelperJSON,\n LocalizedStrings,\n i18n,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n ActionTypes,\n CodeEditor,\n openAssessmentDetail,\n autoGenerateTestCaseOutput,\n Config,\n parseExpression,\n parseCode,\n generate as generateCode,\n levenshteinDistance,\n processData,\n Settings,\n setPreviousAlgorithm\n};\n","import { LanguageService } from '../services/languageService';\nimport {createInputFun, createOutputFun} from './lib/io';\nimport {createLengthFun, createLowercaseFun,\n createrCharAtFun, createSubstringFun,\n createUppercaseFun} from './lib/strings';\nimport {createMatrixColumnsFun, createMatrixLinesFun,\n createNumElementsFun} from './lib/arrays';\nimport {createCastBoolFun, createCastIntFun,\n createCastRealFun, createCastStringFun,\n createIsBoolFun, createIsIntFun,\n createIsRealFun, createCastCharFun} from './lib/lang';\nimport {createAbsFun, createCosFun,\n createInvertFun, createLogFun,\n createMaxFun, createMinFun,\n createNegateFun, createPowFun,\n createSinFun, createSqrtFun,\n createTanFun, createRandFun} from './lib/math';\n\nfunction valueToKey (value, object) {\n for (const key in object) {\n if(Object.prototype.hasOwnProperty.call(object, key)){\n if (object[key] === value) {\n return key;\n }\n }\n }\n return null;\n}\n\nfunction concatObjects (...objs) {\n const result = {};\n for (let i = 0; i < objs.length; i++) {\n const obj = objs[i];\n for(const key in obj) {\n if(Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n }\n return result;\n}\n\nconst libsObject = {\n $mathLib: {\n $sin: createSinFun(),\n $cos: createCosFun(),\n $tan: createTanFun(),\n $sqrt: createSqrtFun(),\n $pow: createPowFun(),\n $log: createLogFun(),\n $abs: createAbsFun(),\n $negate: createNegateFun(),\n $invert: createInvertFun(),\n $max: createMaxFun(),\n $min: createMinFun(),\n $rand: createRandFun()\n },\n $ioLib: {\n $read: createInputFun(),\n $write: createOutputFun()\n },\n $strLib: {\n $substring: createSubstringFun(),\n $length: createLengthFun(),\n $uppercase: createUppercaseFun(),\n $lowercase: createLowercaseFun(),\n $charAt: createrCharAtFun(),\n },\n $arrayLib: {\n $numElements: createNumElementsFun(),\n $matrixLines: createMatrixLinesFun(),\n $matrixColumns: createMatrixColumnsFun()\n },\n $langLib: {\n $isReal: createIsRealFun(),\n $isInt: createIsIntFun(),\n $isBool: createIsBoolFun(),\n $castReal: createCastRealFun(),\n $castInt: createCastIntFun(),\n $castBool: createCastBoolFun(),\n $castString: createCastStringFun(),\n $castChar: createCastCharFun()\n }\n}\n\nconst funcsObject = concatObjects(libsObject.$ioLib, libsObject.$langLib,\n libsObject.$strLib, libsObject.$arrayLib);\n\nexport const LanguageDefinedFunction = Object.freeze({\n getMainFunctionName: () => LanguageService.getCurrentLangFuncs().main_function,\n getInternalName: (localName) => {\n if (localName.indexOf(\".\") !== -1) {\n const names = localName.split(\".\");\n const lib = valueToKey(names[0], LanguageService.getCurrentLangLibs());\n const internalName = valueToKey(names[1], LanguageService.getCurrentLangFuncs());\n if (lib === null || internalName === null) {\n return null;\n }\n return lib + \".\" + internalName;\n }\n const funcName = valueToKey(localName, LanguageService.getCurrentLangFuncs());\n if(funcName !== null) {\n if(funcsObject[funcName]) {\n return funcName;\n }\n }\n return null;\n },\n getFunction: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = names[0];\n const funName = names[1];\n return libsObject[libName][funName];\n }\n return funcsObject[internalName];\n },\n getLocalName: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = LanguageService.getCurrentLangLibs()[names[0]];\n const funName = LanguageService.getCurrentLangFuncs()[names[1]];\n return `${libName}.${funName}`;\n } else if (LanguageService.getCurrentLangFuncs()[internalName]) {\n return LanguageService.getCurrentLangFuncs()[internalName];\n } else { \n return internalName\n }\n }\n});","import { RuntimeError } from \"./runtimeError\";\nimport { SemanticError } from \"./semanticError\";\nimport * as LocalizedStringsService from \"./../../services/localizedStringsService\";\nimport { LanguageDefinedFunction } from \"../definedFunctions\";\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createRuntimeError (i18n_id, context = []) {\n return new RuntimeError(LocalizedStrings.getError(i18n_id, context), i18n_id);\n}\n\nfunction createSemanticError (i18n_id, context = []) {\n return new SemanticError(\n LocalizedStrings.getError(i18n_id, context),\n i18n_id\n );\n}\n\nexport const ProcessorErrorFactory = Object.freeze({\n symbol_not_found_full: (id, sourceInfo) => {\n if (sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n const error = createSemanticError(\"symbol_not_found_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.symbol_not_found(id);\n }\n },\n symbol_not_found: (id) => {\n const context = [id];\n return createSemanticError(\"symbol_not_found\", context);\n },\n function_missing_full: (id, sourceInfo) => {\n if (sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n const error = createSemanticError(\"function_missing_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.function_missing(id);\n }\n },\n function_missing: (id) => {\n const context = [id];\n return createSemanticError(\"function_missing\", context);\n },\n main_missing: () => {\n return createSemanticError(\"main_missing\");\n },\n array_dimension_not_int_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createSemanticError(\n \"array_dimension_not_int_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.array_dimension_not_int();\n }\n },\n array_dimension_not_int: () => {\n return createSemanticError(\"array_dimension_not_int\");\n },\n unknown_command_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createRuntimeError(\"unknown_command_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.unknown_command();\n }\n },\n unknown_command: () => {\n return createRuntimeError(\"unknown_command\");\n },\n incompatible_types_full: (\n left_type,\n left_dim,\n right_type,\n right_dim,\n exp,\n source_info\n ) => {\n if (source_info) {\n const context = [\n LocalizedStrings.translateType(left_type, left_dim),\n exp,\n source_info.line,\n LocalizedStrings.translateType(right_type, right_dim),\n ];\n const error = createSemanticError(\"incompatible_types_full\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.incompatible_types(\n left_type,\n left_dim,\n right_type,\n right_dim,\n exp\n );\n }\n },\n incompatible_types: (left_type, left_dim, right_type, right_dim, exp) => {\n const context = [\n LocalizedStrings.translateType(left_type, left_dim),\n exp,\n LocalizedStrings.translateType(right_type, right_dim),\n ];\n return createSemanticError(\"incompatible_types\", context);\n },\n incompatible_types_array_full: (exp, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LocalizedStrings.translateType(type, dim),\n sourceInfo.line,\n sourceInfo.column,\n ];\n const error = createSemanticError(\n \"incompatible_types_array_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.incompatible_types_array(exp, type, dim);\n }\n },\n incompatible_types_array: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"incompatible_types_array\", context);\n },\n loop_condition_type_full: (exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n const error = createSemanticError(\"loop_condition_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.loop_condition_type(exp);\n }\n },\n loop_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"loop_condition_type\", context);\n },\n /**\n * @deprecated 01/10/2019\n */\n endless_loop_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createSemanticError(\"endless_loop_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.endless_loop();\n }\n },\n endless_loop: () => {\n return createSemanticError(\"endless_loop\");\n },\n if_condition_type_full: (exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n const error = createSemanticError(\"if_condition_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.if_condition_type(exp);\n }\n },\n if_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"if_condition_type\", context);\n },\n invalid_global_var: () => {\n return createRuntimeError(\"invalid_global_var\");\n },\n not_implemented: (id) => {\n const context = [id];\n return createRuntimeError(\"not_implemented\", context);\n },\n invalid_case_type_full: (exp, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LocalizedStrings.translateType(type, dim),\n sourceInfo.line,\n sourceInfo.column,\n ];\n const error = createSemanticError(\"invalid_case_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_case_type(exp, type, dim);\n }\n },\n invalid_case_type: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_case_type\", context);\n },\n void_in_expression_full: (id, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, id];\n const error = createSemanticError(\"void_in_expression_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.void_in_expression(id);\n }\n },\n void_in_expression: (id) => {\n const context = [id];\n return createSemanticError(\"void_in_expression\", context);\n },\n invalid_array_access_full: (id, sourceInfo) => {\n if (sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n const error = createSemanticError(\"invalid_array_access_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_array_access(id);\n }\n },\n invalid_array_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_array_access\", context);\n },\n invalid_matrix_access_full: (id, sourceInfo) => {\n if (sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n const error = createSemanticError(\"invalid_matrix_access_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_access(id);\n }\n },\n invalid_matrix_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_matrix_access\", context);\n },\n matrix_column_outbounds_full: (id, value, columns, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, value, id, columns];\n const error = createRuntimeError(\"matrix_column_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.matrix_column_outbounds(id, value, columns);\n }\n },\n matrix_column_outbounds: (id, value, columns) => {\n const context = [value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds\", context);\n },\n matrix_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n const error = createRuntimeError(\"matrix_line_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.matrix_line_outbounds(id, value, lines);\n }\n },\n matrix_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds\", context);\n },\n vector_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n const error = createRuntimeError(\"vector_line_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.vector_line_outbounds(id, value, lines);\n }\n },\n vector_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"vector_line_outbounds\", context);\n },\n vector_not_matrix_full: (id, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, id];\n const error = createRuntimeError(\"vector_not_matrix_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.vector_not_matrix(id);\n }\n },\n vector_not_matrix: (id) => {\n const context = [id];\n return createRuntimeError(\"vector_not_matrix\", context);\n },\n function_no_return: (id) => {\n const context = [id];\n return createSemanticError(\"function_no_return\", context);\n },\n invalid_void_return_full: (id, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n sourceInfo.line,\n id,\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createSemanticError(\"invalid_void_return_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_void_return(id, type, dim);\n }\n },\n invalid_void_return: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n },\n invalid_return_type_full: (id, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n sourceInfo.line,\n id,\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createSemanticError(\"invalid_return_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_return_type(id, type, dim);\n }\n },\n invalid_return_type: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type\", context);\n },\n invalid_parameters_size_full: (id, expected, actual, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, id, expected, actual];\n const error = createSemanticError(\n \"invalid_parameters_size_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_parameters_size(\n id,\n expected,\n actual\n );\n }\n },\n invalid_parameters_size: (id, expected, actual) => {\n const context = [id, expected, actual];\n return createSemanticError(\"invalid_parameters_size\", context);\n },\n invalid_parameter_type_full: (fun_name, exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LanguageDefinedFunction.getLocalName(fun_name),\n sourceInfo.line,\n ];\n const error = createSemanticError(\"invalid_parameter_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_parameter_type(fun_name, exp);\n }\n },\n invalid_parameter_type: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n },\n invalid_ref_full: (id, exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [exp, id, sourceInfo.line];\n const error = createSemanticError(\"invalid_ref_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_ref(id, exp);\n }\n },\n invalid_ref: (id, exp) => {\n const context = [exp, id];\n return createSemanticError(\"invalid_ref\", context);\n },\n unexpected_break_command_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createRuntimeError(\n \"unexpected_break_command_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.unexpected_break_command();\n }\n },\n unexpected_break_command: () => {\n return createRuntimeError(\"unexpected_break_command\");\n },\n invalid_array_literal_type_full: (exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, exp];\n const error = createRuntimeError(\n \"invalid_array_literal_type_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(exp);\n }\n },\n invalid_array_literal_type: (exp) => {\n const context = [exp];\n return createRuntimeError(\"invalid_array_literal_type\", context);\n },\n invalid_array_literal_line_full: (expected, actual, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n const error = createRuntimeError(\n \"invalid_array_literal_line_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(expected, actual);\n }\n },\n invalid_array_literal_line: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_line\", context);\n },\n invalid_array_literal_column_full: (expected, actual, sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n const error = createRuntimeError(\n \"invalid_array_literal_column_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_array_literal_column(\n expected,\n actual\n );\n }\n },\n invalid_array_literal_column: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_column\", context);\n },\n invalid_unary_op_full: (expString, opName, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n sourceInfo.line,\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createRuntimeError(\"invalid_unary_op_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_unary_op(opName, type, dim);\n }\n },\n invalid_unary_op: (expString, opName, type, dim) => {\n const context = [\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(type, dim),\n ];\n return createRuntimeError(\"invalid_unary_op\", context);\n },\n invalid_infix_op_full: (\n expString,\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight,\n sourceInfo\n ) => {\n if (sourceInfo) {\n const context = [\n sourceInfo.line,\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(typeLeft, dimLeft),\n LocalizedStrings.translateType(typeRight, dimRight),\n ];\n const error = createRuntimeError(\"invalid_infix_op_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_infix_op(\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight\n );\n }\n },\n invalid_infix_op: (\n expString,\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight\n ) => {\n const context = [\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(typeLeft, dimLeft),\n LocalizedStrings.translateType(typeRight, dimRight),\n ];\n return createRuntimeError(\"invalid_infix_op\", context);\n },\n array_dimension_not_positive_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createSemanticError(\n \"array_dimension_not_positive_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.array_dimension_not_positive();\n }\n },\n array_dimension_not_positive: () => {\n return createSemanticError(\"array_dimension_not_positive\");\n },\n invalid_type_conversion: (value, type, dim) => {\n const context = [value, LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_type_conversion\", context);\n },\n invalid_read_type: (exp, type, dim, name, source_info) => {\n const context = [\n source_info.line,\n exp,\n LocalizedStrings.translateType(type, dim),\n name,\n ];\n const error = createRuntimeError(\"invalid_read_type\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_read_type_array: (\n exp,\n typePos,\n dimPos,\n name,\n typeArray,\n dimArray,\n sourceInfo\n ) => {\n const context = [\n sourceInfo.line,\n exp,\n LocalizedStrings.translateType(typePos, dimPos),\n name,\n LocalizedStrings.translateType(typeArray, dimArray),\n ];\n const error = createRuntimeError(\"invalid_read_type_array\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_const_ref_full: (fun_name, exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LanguageDefinedFunction.getLocalName(fun_name),\n sourceInfo.line,\n ];\n const error = createSemanticError(\"invalid_const_ref_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_const_ref(fun_name, exp);\n }\n },\n invalid_const_ref: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n const error = createSemanticError(\"invalid_const_ref\", context);\n return error;\n },\n invalid_const_assignment_full: (var_id, source_info) => {\n if (source_info) {\n const context = [source_info.line, var_id];\n const error = createSemanticError(\n \"invalid_const_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_const_assignment(var_id);\n }\n },\n invalid_const_assignment: (var_id) => {\n const context = [var_id];\n return createSemanticError(\"invalid_const_assignment\", context);\n },\n invalid_vector_assignment_full: (\n left_id,\n left_size,\n right_id,\n right_size,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n left_id,\n left_size,\n right_id,\n right_size,\n ];\n const error = createRuntimeError(\n \"invalid_vector_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_vector_assignment(\n left_id,\n left_size,\n right_id,\n right_size\n );\n }\n },\n invalid_vector_assignment: (left_id, left_size, right_id, right_size) => {\n const context = [left_id, left_size, right_id, right_size];\n return createRuntimeError(\"invalid_vector_assignment\", context);\n },\n invalid_matrix_assignment_full: (\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n ];\n const error = createRuntimeError(\n \"invalid_matrix_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_assignment(\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column\n );\n }\n },\n invalid_matrix_assignment: (\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column\n ) => {\n const context = [\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n ];\n return createRuntimeError(\"invalid_matrix_assignment\", context);\n },\n matrix_to_vector_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n const error = createSemanticError(\"matrix_to_vector_attr\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n vector_to_matrix_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n const error = createSemanticError(\"vector_to_matrix_attr\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_matrix_index_assign_full: (\n mat_id,\n mat_line,\n mat_size,\n exp,\n exp_size,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n mat_line,\n mat_id,\n mat_size,\n exp,\n exp_size,\n ];\n const error = createRuntimeError(\n \"invalid_matrix_index_assign_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_index_assign(\n mat_id,\n mat_line,\n mat_size,\n exp,\n exp_size\n );\n }\n },\n invalid_matrix_index_assign: (mat_id, mat_line, mat_size, exp, exp_size) => {\n const context = [mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign\", context);\n },\n invalid_number_elements_vector: (\n expected_num,\n exp,\n actual_num,\n source_info\n ) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n const error = createRuntimeError(\"invalid_number_elements_vector\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_number_lines_matrix: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n const error = createRuntimeError(\"invalid_number_lines_matrix\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n divsion_by_zero_full: (exp, source_info) => {\n if (source_info) {\n const context = [source_info.line, exp];\n const error = createRuntimeError(\"divsion_by_zero_full\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.divsion_by_zero(exp);\n }\n },\n divsion_by_zero: (exp) => {\n const context = [exp];\n return createRuntimeError(\"divsion_by_zero\", context);\n },\n undefined_tanget_value: (value, source_info) => {\n const context = [source_info.line, value];\n const error = createRuntimeError(\"undefined_tanget_value\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n negative_log_value: (source_info) => {\n const error = createRuntimeError(\"negative_log_value\", [source_info.line]);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_string_index: (index, str, source_info) => {\n const local_fun_name = LanguageDefinedFunction.getLocalName(\"$charAt\");\n const context = [\n source_info.line,\n local_fun_name,\n index,\n str,\n str.length - 1,\n ];\n const error = createRuntimeError(\"invalid_string_index\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n negative_sqrt_value: (source_info) => {\n const error = createRuntimeError(\"negative_sqrt_value\", [source_info.line]);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n /**\n * @deprecated 01/10/2019\n */\n exceeded_recursive_calls: (source_info) => {\n const context = [source_info.line];\n const error = createRuntimeError(\"exceeded_recursive_calls\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_variable: (id, source_info) => {\n const context = [source_info.line, id];\n const error = createSemanticError(\"invalid_for_variable\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_from: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_from\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_to: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_to\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_pass: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_pass\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n exceed_max_instructions: () => {\n return createRuntimeError(\"exceed_max_instructions\");\n },\n});\n\n","export class RuntimeError extends Error {\n constructor (msg, id) {\n super(msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, RuntimeError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\n}\n","export class SemanticError extends Error {\n constructor (msg, id) {\n super(msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, SemanticError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\n}\n","import { Store } from \"./store/store\";\nimport { Modes } from \"./modes\";\nimport { Context } from \"./context\";\nimport { Types } from \"./../typeSystem/types\";\nimport { Operators } from \"./../ast/operators\";\nimport { LanguageDefinedFunction } from \"./definedFunctions\";\nimport {\n resultTypeAfterInfixOp,\n resultTypeAfterUnaryOp,\n} from \"./compatibilityTable\";\nimport * as Commands from \"./../ast/commands/\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Command } from \"./../ast/commands/command\";\nimport * as Expressions from \"./../ast/expressions/\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from \"./../ast/expressions/expression\";\nimport * as Utils from \"./../util/utils\";\nimport { ArrayType } from \"./../typeSystem/array_type\";\nimport { convertToString, toInt } from \"../typeSystem/parsers\";\nimport { Config } from \"../util/config\";\nimport { ProcessorErrorFactory } from \"./error/processorErrorFactory\";\nimport { RuntimeError } from \"./error/runtimeError\";\nimport { Location } from \"../memory/location\";\nimport { StoreValue } from \"./store/value/store_value\";\nimport { StoreValueRef } from \"./store/value/store_value_ref\";\nimport { ArrayStoreValue } from \"./store/value/array_store_value\";\nimport { ArrayStoreValueRef } from \"./store/value/array_store_value_ref\";\nimport { StoreValueAddress } from \"./store/value/store_value_address\";\nimport { LocalizedStrings } from \"../services/localizedStringsService\";\n\nexport class IVProgProcessor {\n static get MAIN_INTERNAL_ID () {\n return \"$main\";\n }\n\n constructor (ast) {\n this.ast = ast;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.input = null;\n this.forceKill = false;\n this.output = null;\n this.mode = Modes.RUN;\n /**\n * Stores the sourceInfo of every function call, command or expression\n */\n this.function_call_stack = [];\n this.instruction_count = 0;\n this.function_call_count = 0;\n }\n\n registerInput (input) {\n if (this.input !== null) this.input = null;\n this.input = input;\n }\n\n registerOutput (output) {\n if (this.output !== null) this.output = null;\n this.output = output;\n }\n\n checkContext (context) {\n return this.context[this.context.length - 1] === context;\n }\n\n ignoreSwitchCases (store) {\n if (store.mode === Modes.RETURN) {\n return true;\n } else if (store.mode === Modes.BREAK) {\n return true;\n } else {\n return false;\n }\n }\n\n prepareState () {\n if (this.stores !== null) {\n for (let i = 0; i < this.stores.length; i++) {\n delete this.stores[i];\n }\n this.stores = null;\n }\n if (this.globalStore !== null) this.globalStore = null;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.instruction_count = 0;\n this.mode = Modes.RUN;\n }\n\n async interpretAST () {\n this.prepareState();\n Location.clear();\n await this.initGlobal();\n const mainFunc = this.findMainFunction();\n if (mainFunc === null) {\n throw ProcessorErrorFactory.main_missing();\n }\n return this.runFunction(mainFunc, [], this.globalStore);\n }\n\n async initGlobal () {\n if (!this.checkContext(Context.BASE)) {\n return ProcessorErrorFactory.invalid_global_var();\n }\n return this.executeCommands(this.globalStore, this.ast.global);\n }\n\n findMainFunction () {\n return this.ast.functions.find((v) => v.isMain);\n }\n\n findFunction (name) {\n if (name.match(/^\\$.+$/)) {\n if (name === IVProgProcessor.MAIN_INTERNAL_ID) {\n return this.findMainFunction();\n }\n const fun = LanguageDefinedFunction.getFunction(name);\n if (!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find((v) => v.name === name);\n if (!val) {\n throw ProcessorErrorFactory.function_missing(name);\n }\n return val;\n }\n }\n\n async runFunction (func, actualParameters, store) {\n const funcName = func.isMain ? IVProgProcessor.MAIN_INTERNAL_ID : func.name;\n const funcStore = new Store(funcName);\n funcStore.extendStore(this.globalStore);\n await this.associateParameters(\n func.formalParameters,\n actualParameters,\n store,\n funcStore\n );\n this.context.push(Context.FUNCTION);\n this.stores.push(funcStore);\n const stoWithVars = await this.executeCommands(\n funcStore,\n func.variablesDeclarations\n );\n const finalSto = await this.executeCommands(stoWithVars, func.commands);\n this.stores.pop();\n this.context.pop();\n return finalSto;\n }\n\n /**\n *\n * @param {import('./../ast/commands/formalParameter').FormalParameter[]} formal_params\n * @param {Expression[]} effective_params\n * @param {Store} caller_store\n * @param {Store} callee_store\n */\n async associateParameters (\n formal_params,\n effective_params,\n caller_store,\n callee_store\n ) {\n const funcName =\n callee_store.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : callee_store.name;\n\n const hasVariadic = formal_params.some((p) => p.variadic);\n\n if (\n (formal_params.length != effective_params.length && !hasVariadic) ||\n formal_params.length > effective_params.length\n ) {\n throw ProcessorErrorFactory.invalid_parameters_size(\n funcName,\n formal_params.length,\n effective_params.length\n );\n }\n for (\n let i = 0, j = 0;\n i < formal_params.length && j < effective_params.length;\n i += 1, j += 1\n ) {\n const formalParameter = formal_params[i];\n if (formalParameter.variadic) {\n [j, callee_store] = await this.associateVariadicParameter(\n funcName,\n formalParameter,\n j,\n effective_params,\n caller_store,\n callee_store\n );\n } else {\n const actualParam = effective_params[i];\n callee_store = await this.associateParameter(\n funcName,\n formalParameter,\n actualParam,\n caller_store,\n callee_store\n );\n }\n }\n return callee_store;\n }\n\n /**\n *\n * @param {string} funcName\n * @param {import('./../ast/commands/formalParameter').FormalParameter} formalParameter\n * @param {number} index\n * @param {Expression[]} effective_params\n * @param {Store} caller_store\n * @param {Store} callee_store\n */\n async associateVariadicParameter (\n funcName,\n formalParameter,\n index,\n effective_params,\n caller_store,\n callee_store\n ) {\n let i;\n let count = 1;\n for (i = index; i < effective_params.length; i += 1) {\n const actualParam = effective_params[i];\n callee_store = await this.associateParameter(\n funcName,\n formalParameter,\n actualParam,\n caller_store,\n callee_store,\n count\n );\n count += 1;\n }\n const variadicCount = new StoreValue(Types.INTEGER, count, undefined, true);\n callee_store.insertStore(`${formalParameter.id}.0`, variadicCount);\n return [i - 1, callee_store];\n }\n\n /**\n *\n * @param {string} funcName\n * @param {import('./../ast/commands/formalParameter').FormalParameter} formalParameter\n * @param {Expression} actualParameter\n * @param {Store} callerStore\n * @param {Store} calleeStore\n * @param {number} variadicCount The number of the current value being assigned to the variadic parameter, default 0\n */\n async associateParameter (\n funcName,\n formalParameter,\n actualParameter,\n callerStore,\n calleeStore,\n variadicCount = 0\n ) {\n const actualValue = await this.evaluateExpression(\n callerStore,\n actualParameter\n );\n\n let shouldTypeCast = false;\n\n if (!formalParameter.type.isCompatible(actualValue.type)) {\n if (\n Config.enable_type_casting &&\n !formalParameter.byRef &&\n Store.canImplicitTypeCast(formalParameter.type, actualValue.type)\n ) {\n shouldTypeCast = true;\n } else {\n throw ProcessorErrorFactory.invalid_parameter_type(\n funcName,\n actualParameter.toString()\n );\n }\n }\n\n if (formalParameter.byRef && !actualValue.inStore()) {\n throw ProcessorErrorFactory.invalid_ref(\n funcName,\n actualParameter.toString()\n );\n }\n\n if (formalParameter.byRef) {\n const realObj = callerStore.getStoreObject(actualValue.id);\n let ref = null;\n if (actualValue instanceof ArrayStoreValue) {\n // it's a vector or matrix...\n const values = actualValue.get();\n const array_type = actualValue.type;\n const addresses = values.map((v) =>\n realObj.getLocAddressOf(v.line, v.column)\n );\n const columns = actualValue.isVector() ? 0 : actualValue.columns;\n ref = new ArrayStoreValueRef(\n array_type,\n values,\n addresses,\n actualValue.lines,\n columns,\n realObj.id\n );\n } else {\n if (actualValue instanceof StoreValueAddress) {\n const line = actualValue.line;\n const column = actualValue.column;\n ref = new StoreValueRef(\n actualValue.type,\n actualValue.get(),\n realObj.getLocAddressOf(line, column),\n realObj.id\n );\n ref.setReferenceDimension(realObj.type.dimensions);\n } else {\n ref = new StoreValueRef(\n actualValue.type,\n actualValue.get(),\n realObj.locAddress,\n realObj.id\n );\n }\n }\n let varID = formalParameter.id;\n if (formalParameter.variadic) varID = `${varID}.${variadicCount}`;\n calleeStore.insertStore(varID, ref);\n } else {\n let realValue = actualValue;\n if (shouldTypeCast) {\n realValue = Store.doImplicitCasting(formalParameter.type, realValue);\n }\n let varID = formalParameter.id;\n if (formalParameter.variadic) varID = `${varID}.${variadicCount}`;\n calleeStore.insertStore(varID, realValue);\n }\n return calleeStore;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Command[]} cmds\n *\n * @returns {Promise<Store>}\n */\n async executeCommands (store, cmds) {\n // helper to partially apply a function, in this case executeCommand\n let sto = store;\n for (let i = 0; i < cmds.length; i += 1) {\n sto = await this.executeCommand(sto, cmds[i]);\n }\n return sto;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Command} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeCommand (store, cmd) {\n this.instruction_count += 1;\n if (this.instruction_count % Config.suspend_threshold == 0) {\n //every Config.suspend_threshold instruction should briefly delay its execution in order to allow the browser to process other things\n await Utils.sleep(3);\n }\n\n // Checks if it must interrupt the execution for some reason\n if (this.instruction_count >= Config.max_instruction_count) {\n throw ProcessorErrorFactory.exceed_max_instructions();\n } else if (this.forceKill) {\n throw \"FORCED_KILL!\";\n } else if (store.mode === Modes.PAUSE) {\n return this.executeCommand(store, cmd);\n } else if (store.mode === Modes.RETURN) {\n return store;\n } else if (\n this.checkContext(Context.BREAKABLE) &&\n store.mode === Modes.BREAK\n ) {\n return store;\n } else if (this.mode === Modes.ABORT) {\n throw LocalizedStrings.getMessage(\"aborted_execution\");\n }\n\n if (cmd instanceof Commands.Declaration) {\n return this.executeDeclaration(store, cmd);\n } else if (cmd instanceof Commands.ArrayIndexAssign) {\n return this.executeArrayIndexAssign(store, cmd);\n } else if (cmd instanceof Commands.Assign) {\n return this.executeAssign(store, cmd);\n } else if (cmd instanceof Commands.Break) {\n return this.executeBreak(store, cmd);\n } else if (cmd instanceof Commands.Return) {\n return this.executeReturn(store, cmd);\n } else if (cmd instanceof Commands.IfThenElse) {\n return this.executeIfThenElse(store, cmd);\n } else if (cmd instanceof Commands.RepeatUntil) {\n return this.executeRepeatUntil(store, cmd);\n } else if (cmd instanceof Commands.While) {\n return this.executeWhile(store, cmd);\n } else if (cmd instanceof Commands.For) {\n return this.executeFor(store, cmd);\n } else if (cmd instanceof Commands.Switch) {\n return this.executeSwitch(store, cmd);\n } else if (cmd instanceof Expressions.FunctionCall) {\n return this.executeFunctionCall(store, cmd);\n } else if (cmd instanceof Commands.SysCall) {\n return this.executeSysCall(store, cmd);\n } else {\n throw ProcessorErrorFactory.unknown_command(cmd.sourceInfo);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.SysCall} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeSysCall (store, cmd) {\n const func = cmd.langFunc.bind(this);\n return func(store, cmd);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.FunctionCall} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeFunctionCall (store, cmd) {\n let func = null;\n if (cmd.isMainCall) {\n func = this.findMainFunction();\n } else {\n func = this.findFunction(cmd.id);\n }\n this.function_call_stack.push(cmd.sourceInfo);\n const sto = await this.runFunction(func, cmd.actualParameters, store);\n sto.destroy();\n if (\n !Types.VOID.isCompatible(func.returnType) &&\n sto.mode !== Modes.RETURN\n ) {\n const funcName =\n func.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : func.name;\n throw ProcessorErrorFactory.function_no_return(funcName);\n } else {\n this.function_call_stack.pop();\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Switch} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeSwitch (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const switchCases = cmd.cases;\n let lastStore = store;\n let lastCaseCheckResult = false;\n for (\n let i = 0;\n i < switchCases.length && !this.ignoreSwitchCases(lastStore);\n i += 1\n ) {\n const switchCase = switchCases[i];\n if (lastCaseCheckResult || switchCase.isDefault) {\n lastStore = await this.executeCommands(lastStore, switchCase.commands);\n } else {\n const equalityInfixApp = new Expressions.InfixApp(\n Operators.EQ,\n cmd.expression,\n switchCase.expression\n );\n equalityInfixApp.sourceInfo = switchCase.sourceInfo;\n const result = await this.evaluateExpression(\n lastStore,\n equalityInfixApp\n );\n if (result.get()) {\n lastStore = await this.executeCommands(\n lastStore,\n switchCase.commands\n );\n }\n lastCaseCheckResult = result.get();\n }\n }\n this.context.pop();\n if (lastStore.mode === Modes.BREAK) {\n lastStore.mode = Modes.RUN;\n }\n return lastStore;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.For} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeFor (store, cmd) {\n //BEGIN for -> while rewrite\n const initCmd = new Commands.Assign(cmd.for_id.id, cmd.for_from);\n initCmd.sourceInfo = cmd.sourceInfo;\n // Assume for is iterating forward and that pass is not missing\n let passValue = cmd.for_pass;\n let condition = new Expressions.InfixApp(\n Operators.LT,\n cmd.for_id,\n cmd.for_to\n );\n\n if (cmd.for_pass == null) {\n passValue = new Expressions.IntLiteral(toInt(1));\n const checkEndGTBegin = await this.evaluateExpression(\n store,\n new Expressions.InfixApp(Operators.GE, cmd.for_to, cmd.for_from)\n );\n if (!checkEndGTBegin.get()) {\n passValue = new Expressions.IntLiteral(toInt(-1));\n condition = new Expressions.InfixApp(\n Operators.GT,\n cmd.for_id,\n cmd.for_to\n );\n }\n } else {\n const isForward = await this.evaluateExpression(\n store,\n new Expressions.InfixApp(\n Operators.GE,\n cmd.for_pass,\n new Expressions.IntLiteral(toInt(0))\n )\n );\n if (!isForward.get()) {\n condition = new Expressions.InfixApp(\n Operators.GT,\n cmd.for_id,\n cmd.for_to\n );\n }\n }\n\n condition.sourceInfo = cmd.sourceInfo;\n const increment = new Commands.Assign(\n cmd.for_id.id,\n new Expressions.InfixApp(Operators.ADD, cmd.for_id, passValue)\n );\n increment.sourceInfo = cmd.sourceInfo;\n const whileBlock = new Commands.CommandBlock(\n [],\n cmd.commands.concat(increment)\n );\n const forAsWhile = new Commands.While(condition, whileBlock);\n forAsWhile.sourceInfo = cmd.sourceInfo;\n //END for -> while rewrite\n const newCmdList = [initCmd, forAsWhile];\n return this.executeCommands(store, newCmdList);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.RepeatUntil} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeRepeatUntil (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const sto = await this.executeCommands(store, cmd.commands);\n if (sto.mode === Modes.BREAK) {\n this.context.pop();\n sto.mode = Modes.RUN;\n return sto;\n }\n const checkCondition = await this.evaluateExpression(sto, cmd.expression);\n if (!checkCondition.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(cmd.sourceInfo);\n }\n this.context.pop();\n if (checkCondition.get()) {\n return sto;\n } else {\n return this.executeCommand(sto, cmd);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.While} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeWhile (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const checkCondition = await this.evaluateExpression(store, cmd.expression);\n if (!checkCondition.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(\n cmd.expression.toString(),\n cmd.sourceInfo\n );\n }\n if (checkCondition.get()) {\n const sto = await this.executeCommands(store, cmd.commands);\n this.context.pop();\n if (sto.mode === Modes.BREAK) {\n sto.mode = Modes.RUN;\n return sto;\n }\n return this.executeCommand(sto, cmd);\n } else {\n this.context.pop();\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.IfThenElse} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeIfThenElse (store, cmd) {\n const isTrue = await this.evaluateExpression(store, cmd.condition);\n if (!isTrue.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(\n cmd.condition.toString(),\n cmd.sourceInfo\n );\n }\n if (isTrue.get()) {\n return this.executeCommands(store, cmd.ifTrue.commands);\n } else if (cmd.ifFalse !== null) {\n if (cmd.ifFalse instanceof Commands.IfThenElse) {\n return this.executeCommand(store, cmd.ifFalse);\n } else {\n return this.executeCommands(store, cmd.ifFalse.commands);\n }\n } else {\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Return} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeReturn (store, cmd) {\n const funcName =\n store.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : store.name;\n // console.log(funcName, store.name === IVProgProcessor.MAIN_INTERNAL_ID);\n const func = this.findFunction(store.name);\n const funcType = func.returnType;\n const value = await this.evaluateExpression(store, cmd.expression);\n if (value === null && funcType.isCompatible(Types.VOID)) {\n store.mode = Modes.RETURN;\n return store;\n }\n\n let real_value = value;\n if (value === null || !funcType.isCompatible(value.type)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(funcType, value.type)\n ) {\n const stringInfo = funcType.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n }\n real_value = Store.doImplicitCasting(funcType, value);\n }\n\n store.insertStore(\"$\", real_value);\n store.mode = Modes.RETURN;\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Break} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeBreak (store, cmd) {\n if (this.checkContext(Context.BREAKABLE)) {\n store.mode = Modes.BREAK;\n return store;\n } else {\n throw ProcessorErrorFactory.unexpected_break_command_full(cmd.sourceInfo);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Assign} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeAssign (store, cmd) {\n const inStore = store.applyStore(cmd.id);\n if (inStore.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const value = await this.evaluateExpression(store, cmd.expression);\n let realValue = value;\n if (!inStore.type.isCompatible(realValue.type)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(inStore.type, value.type)\n ) {\n realValue = Store.doImplicitCasting(inStore.type, realValue);\n } else {\n const stringInfo = inStore.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n }\n\n if (inStore instanceof ArrayStoreValue) {\n const columns = realValue.columns == null ? 0 : realValue.columns;\n if (inStore.lines !== realValue.lines || inStore.columns !== columns) {\n const exp = cmd.expression.toString();\n if (inStore.isVector()) {\n throw ProcessorErrorFactory.invalid_vector_assignment_full(\n cmd.id,\n inStore.lines,\n exp,\n realValue.lines,\n cmd.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.invalid_matrix_assignment_full(\n cmd.id,\n inStore.lines,\n inStore.columns,\n exp,\n realValue.lines,\n realValue.columns,\n cmd.sourceInfo\n );\n }\n }\n }\n\n store.updateStore(cmd.id, realValue);\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.ArrayIndexAssign} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeArrayIndexAssign (store, cmd) {\n const mustBeArray = store.applyStore(cmd.id);\n let used_dims = 0;\n if (mustBeArray.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (!(mustBeArray.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const lineSV = await this.evaluateExpression(store, cmd.line);\n if (!Types.INTEGER.isCompatible(lineSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n used_dims += 1;\n const line = lineSV.get().toNumber();\n const columnSV = await this.evaluateExpression(store, cmd.column);\n let column = null;\n if (columnSV != null) {\n if (!Types.INTEGER.isCompatible(columnSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n column = columnSV.get().toNumber();\n used_dims += 1;\n }\n const value = await this.evaluateExpression(store, cmd.expression);\n let actualValue = value;\n if (line >= mustBeArray.lines) {\n if (mustBeArray.isVector) {\n throw ProcessorErrorFactory.vector_line_outbounds_full(\n cmd.id,\n line,\n mustBeArray.lines,\n cmd.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.matrix_line_outbounds_full(\n cmd.id,\n line,\n mustBeArray.lines,\n cmd.sourceInfo\n );\n }\n } else if (line < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n if (column != null && mustBeArray.columns === 0) {\n throw ProcessorErrorFactory.vector_not_matrix_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (column != null) {\n if (column >= mustBeArray.columns) {\n throw ProcessorErrorFactory.matrix_column_outbounds_full(\n cmd.id,\n column,\n mustBeArray.columns,\n cmd.sourceInfo\n );\n } else if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n }\n\n if (!mustBeArray.type.canAccept(value.type, used_dims)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(mustBeArray.type.innerType, value.type)\n ) {\n const type = mustBeArray.type.innerType;\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n actualValue = Store.doImplicitCasting(mustBeArray.type.innerType, value);\n }\n\n const current_value = mustBeArray.getAt(line, column);\n if (current_value instanceof ArrayStoreValue) {\n if (\n current_value.lines !== actualValue.lines ||\n current_value.columns !== actualValue.columns\n ) {\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.invalid_matrix_index_assign_full(\n cmd.id,\n line,\n current_value.lines,\n exp,\n actualValue.lines,\n cmd.sourceInfo\n );\n }\n }\n\n return store.updateStoreArray(cmd.id, actualValue, line, column);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Declaration} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeDeclaration (store, cmd) {\n if (cmd instanceof Commands.ArrayDeclaration) {\n return this.executeArrayDeclaration(store, cmd);\n } else {\n let temp = new StoreValue(cmd.type, null, null, cmd.isConst);\n if (cmd.initial !== null) {\n const value = await this.evaluateExpression(store, cmd.initial);\n let realValue = value;\n if (!value.type.isCompatible(cmd.type)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(cmd.type, value.type)\n ) {\n realValue = Store.doImplicitCasting(cmd.type, realValue);\n } else {\n const stringInfo = value.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n }\n temp = new StoreValue(cmd.type, realValue.get(), null, cmd.isConst);\n }\n store.insertStore(cmd.id, temp);\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.ArrayDeclaration} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeArrayDeclaration (store, cmd) {\n const linesSV = await this.evaluateExpression(store, cmd.lines);\n if (!Types.INTEGER.isCompatible(linesSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n const line = linesSV.get().toNumber();\n const columnsSV = await this.evaluateExpression(store, cmd.columns);\n let column = null;\n if (columnsSV !== null) {\n if (!Types.INTEGER.isCompatible(columnsSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n column = columnsSV.get().toNumber();\n if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n }\n let temp = new ArrayStoreValue(\n cmd.type,\n [],\n line,\n column,\n null,\n cmd.isConst\n );\n if (cmd.initial !== null) {\n // array can only be initialized by a literal....\n const valueList = await this.evaluateArrayLiteral(\n store,\n cmd.initial,\n cmd.type,\n line,\n column\n );\n temp = new ArrayStoreValue(\n cmd.type,\n valueList,\n line,\n column,\n null,\n cmd.isConst\n );\n }\n store.insertStore(cmd.id, temp);\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expression} exp\n *\n * @returns {Promise<import('./store/value/istore_value').IStoreValue>}\n */\n async evaluateExpression (store, exp) {\n this.instruction_count += 1;\n if (this.instruction_count % Config.suspend_threshold == 0) {\n //every Config.suspend_threshold instruction should briefly delay its execution in order to allow the browser to process other things\n await Utils.sleep(3);\n }\n if (this.mode === Modes.ABORT) {\n throw LocalizedStrings.getMessage(\"aborted_execution\");\n }\n if (this.instruction_count >= Config.max_instruction_count) {\n throw new Error(\n \"Número de instruções excedeu o limite definido. Verifique se seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"\n );\n }\n if (exp instanceof Expressions.UnaryApp) {\n return this.evaluateUnaryApp(store, exp);\n } else if (exp instanceof Expressions.InfixApp) {\n return this.evaluateInfixApp(store, exp);\n } else if (exp instanceof Expressions.ArrayAccess) {\n return this.evaluateArrayAccess(store, exp);\n } else if (exp instanceof Expressions.VariableLiteral) {\n return this.evaluateVariableLiteral(store, exp);\n } else if (exp instanceof Expressions.IntLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.RealLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.BoolLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.StringLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.CharLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.ArrayLiteral) {\n throw new Error(\n \"Internal Error: The system should not eval an array literal.\"\n );\n } else if (exp instanceof Expressions.FunctionCall) {\n return this.evaluateFunctionCall(store, exp);\n }\n return null;\n }\n\n async evaluateFunctionCall (store, exp) {\n if (exp.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(\n LanguageDefinedFunction.getMainFunctionName(),\n exp.sourceInfo\n );\n }\n const func = this.findFunction(exp.id);\n if (Types.VOID.isCompatible(func.returnType)) {\n throw ProcessorErrorFactory.void_in_expression_full(\n exp.id,\n exp.sourceInfo\n );\n }\n if (this.function_call_stack.length >= Config.max_call_stack) {\n throw ProcessorErrorFactory.exceeded_recursive_calls(exp.sourceInfo);\n }\n this.function_call_stack.push(exp.sourceInfo);\n const sto = await this.runFunction(func, exp.actualParameters, store);\n if (sto.mode !== Modes.RETURN) {\n throw new Error(\n \"!!!Internal error: the function that was called did not have a return command or did not set the store mode properly -> \" +\n exp.id\n );\n }\n const val = sto.applyStore(\"$\");\n sto.destroy();\n this.function_call_stack.pop();\n return val;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exp\n * @param {ArrayType} type\n *\n * @returns {Promise<StoreValue[]>}\n */\n async evaluateArrayLiteral (store, exp, type, lines, columns) {\n if (!exp.isVector) {\n if (columns == null) {\n throw new Error(\n \"This should never happen: Vector cannot be initialized by a matrix\"\n );\n }\n const storeValueMatrix = await this.evaluateMatrix(\n store,\n exp,\n type,\n lines,\n columns\n );\n return storeValueMatrix.reduce((prev, next) => prev.concat(next), []);\n } else {\n if (columns != null) {\n throw new Error(\n \"This should never happen: Matrix cannot be initialized by a vector\"\n );\n }\n return this.evaluateVector(store, exp, type, lines);\n }\n }\n\n /**\n * Evalautes a list of literals and expression composing the vector\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exps\n * @param {ArrayType} type\n * @param {number} n_elements\n *\n * @returns {Promise<StoreValue[]>} store object list\n */\n async evaluateVector (store, exps, type, n_elements) {\n const values = exps.value;\n if (n_elements !== values.length) {\n throw ProcessorErrorFactory.invalid_number_elements_vector(\n n_elements,\n exps.toString(),\n values.length,\n exps.sourceInfo\n );\n }\n const actualValues = await Promise.all(\n values.map((exp) => this.evaluateExpression(store, exp))\n );\n return actualValues.map((v, index) => {\n if (!type.canAccept(v.type, 1)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type.innerType, v.type)\n ) {\n // const stringInfo = v.type.stringInfo();\n // const info = stringInfo[0];\n const exp_str = values[index].toString();\n // TODO - fix error message\n throw ProcessorErrorFactory.invalid_array_literal_type_full(\n exp_str,\n values[index].sourceInfo\n );\n }\n const newValue = Store.doImplicitCasting(type.innerType, v);\n return newValue;\n }\n return v;\n });\n }\n\n /**\n * Evaluates a list of array literals composing the matrix\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exps\n * @param {ArrayType} type\n *\n * @returns {Promise<StoreValue[][]>}\n */\n async evaluateMatrix (store, exps, type, lines, columns) {\n const values = exps.value;\n if (values.length !== lines) {\n throw ProcessorErrorFactory.invalid_number_lines_matrix(\n lines,\n exps.toString(),\n values.length,\n exps.sourceInfo\n );\n }\n const vectors = values.map((vector) => {\n const vec_type = new ArrayType(type.innerType, 1);\n return this.evaluateVector(store, vector, vec_type, columns);\n });\n return await Promise.all(vectors);\n }\n\n /**\n *\n * @param {Store} _\n * @param {import('../ast/expressions/literal').Literal} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateLiteral (_, exp) {\n return new StoreValue(exp.type, exp.value);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.VariableLiteral} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateVariableLiteral (store, exp) {\n const val = store.applyStore(exp.id);\n return val;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.ArrayAccess} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateArrayAccess (store, exp) {\n const mustBeArray = store.getStoreObject(exp.id);\n if (!(mustBeArray.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n exp.id,\n exp.sourceInfo\n );\n }\n const lineSV = await this.evaluateExpression(store, exp.line);\n if (!Types.INTEGER.isCompatible(lineSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(exp.sourceInfo);\n }\n const line = lineSV.get().toNumber();\n const columnSV = await this.evaluateExpression(store, exp.column);\n let column = null;\n if (columnSV !== null) {\n if (!Types.INTEGER.isCompatible(columnSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n exp.sourceInfo\n );\n }\n column = columnSV.get().toNumber();\n }\n if (line >= mustBeArray.lines) {\n if (mustBeArray.isVector) {\n throw ProcessorErrorFactory.vector_line_outbounds_full(\n exp.id,\n line,\n mustBeArray.lines,\n exp.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.matrix_line_outbounds_full(\n exp.id,\n line,\n mustBeArray.lines,\n exp.sourceInfo\n );\n }\n } else if (line < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n exp.sourceInfo\n );\n }\n if (column !== null && mustBeArray.columns === 0) {\n throw ProcessorErrorFactory.vector_not_matrix_full(\n exp.id,\n exp.sourceInfo\n );\n }\n if (column !== null) {\n if (column >= mustBeArray.columns) {\n throw ProcessorErrorFactory.matrix_column_outbounds_full(\n exp.id,\n column,\n mustBeArray.columns,\n exp.sourceInfo\n );\n } else if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n exp.sourceInfo\n );\n }\n }\n const result = mustBeArray.getAt(line, column);\n const type = mustBeArray.type.innerType;\n if (Array.isArray(result)) {\n const values = result.map((val, col) => {\n return new StoreValueAddress(\n type,\n val,\n line,\n col,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n });\n return new ArrayStoreValue(\n new ArrayType(type, 1),\n values,\n mustBeArray.columns,\n null,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n } else {\n return new StoreValueAddress(\n type,\n result,\n line,\n column,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.UnaryApp} unaryApp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateUnaryApp (store, unaryApp) {\n const left = await this.evaluateExpression(store, unaryApp.left);\n const resultType = resultTypeAfterUnaryOp(unaryApp.op, left.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n const stringInfo = left.type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_unary_op_full(\n unaryApp.op,\n info.type,\n info.dim,\n unaryApp.sourceInfo\n );\n }\n switch (unaryApp.op.ord) {\n case Operators.ADD.ord:\n return new StoreValue(resultType, left.get());\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().negated());\n case Operators.NOT.ord:\n return new StoreValue(resultType, !left.get());\n default:\n throw new RuntimeError(\"!!!Critical Invalid UnaryApp \" + unaryApp.op);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.InfixApp} infixApp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateInfixApp (store, infixApp) {\n const left = await this.evaluateExpression(store, infixApp.left);\n const right = await this.evaluateExpression(store, infixApp.right);\n let shouldImplicitCast = false;\n let resultType = resultTypeAfterInfixOp(infixApp.op, left.type, right.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(left.type, right.type)\n ) {\n shouldImplicitCast = true;\n } else {\n const stringInfoLeft = left.type.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = right.type.stringInfo();\n const infoRight = stringInfoRight[0];\n throw ProcessorErrorFactory.invalid_infix_op_full(\n infixApp.op,\n infoLeft.type,\n infoLeft.dim,\n infoRight.type,\n infoRight.dim,\n infixApp.sourceInfo\n );\n }\n }\n let result = null;\n switch (infixApp.op.ord) {\n case Operators.ADD.ord: {\n if (Types.STRING.isCompatible(left.type)) {\n const rightStr = convertToString(right.get(), right.type);\n return new StoreValue(resultType, left.get() + rightStr);\n } else if (Types.STRING.isCompatible(right.type)) {\n const leftStr = convertToString(left.get(), left.type);\n return new StoreValue(resultType, leftStr + right.get());\n } else if (Types.CHAR.isCompatible(left.type)) {\n const strLeft = convertToString(left.get(), left.type);\n const strRight = convertToString(right.get(), right.type);\n return new StoreValue(resultType, strLeft + strRight);\n } else {\n return new StoreValue(resultType, left.get().plus(right.get()));\n }\n }\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().minus(right.get()));\n case Operators.MULT.ord: {\n result = left.get().times(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.DIV.ord: {\n if (right.get() == 0) {\n throw ProcessorErrorFactory.divsion_by_zero_full(\n infixApp.toString(),\n infixApp.sourceInfo\n );\n }\n if (Types.INTEGER.isCompatible(resultType))\n result = left.get().divToInt(right.get());\n else result = left.get().div(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.MOD.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (shouldImplicitCast) {\n resultType = Types.INTEGER;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.modulo(rightValue);\n return new StoreValue(resultType, result);\n }\n case Operators.GT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length > rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) > rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.GE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length >= rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) >= rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length < rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) < rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length <= rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) <= rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.EQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (\n Types.INTEGER.isCompatible(left.type) ||\n Types.REAL.isCompatible(left.type)\n ) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.eq(rightValue);\n } else {\n result = leftValue === rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.NEQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (\n Types.INTEGER.isCompatible(left.type) ||\n Types.REAL.isCompatible(left.type)\n ) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = !leftValue.eq(rightValue);\n } else {\n result = leftValue !== rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.AND.ord:\n return new StoreValue(resultType, left.get() && right.get());\n case Operators.OR.ord:\n return new StoreValue(resultType, left.get() || right.get());\n default:\n throw new RuntimeError(\"!!!Critical Invalid InfixApp \" + infixApp.op);\n }\n }\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * num_elements\n * matrix_lines\n * matrix_columns\n */\n\nexport function createNumElementsFun () {\n const numElementsFun = async (sto, _) => {\n const vector = sto.applyStore(\"vector\");\n const temp = new StoreValue(Types.INTEGER, toInt(vector.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(numElementsFun)]);\n const func = new Commands.Function('$numElements', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 1), 'vector', false)],\n block);\n return func;\n }\n\nexport function createMatrixLinesFun () {\n const matrixLinesFun = async (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixLinesFun)]);\n const func = new Commands.Function('$matrixLines', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n\nexport function createMatrixColumnsFun () {\n const matrixColumnsFun = async (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.columns));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixColumnsFun)]);\n const func = new Commands.Function('$matrixColumns', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n ","import * as Commands from \"./../../ast/commands\";\nimport { Modes } from \"../modes\";\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { Types } from \"./../../typeSystem/types\";\nimport { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { StoreValue } from \"../store/value/store_value\";\n\nexport function createOutputFun () {\n const writeFunction = async function (store, _) {\n const totalSV = store.applyStore(\"p1.0\");\n const total = totalSV.get();\n for (let i = 1; i < total; i += 1) {\n const val = store.applyStore(`p1.${i}`);\n this.output.sendOutput(Parsers.convertToString(val.get(), val.type));\n }\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(writeFunction)]\n );\n const func = new Commands.Function(\n \"$write\",\n Types.VOID,\n [new Commands.FormalParameter(Types.ALL, \"p1\", false, true)],\n block\n );\n return func;\n}\n\nexport function createInputFun () {\n const readFunction = async function (store, _) {\n const text = await this.input.requestInput();\n const typeToConvert = store.applyStore(\"p1\").type;\n let type = null;\n let result = null;\n try {\n if (typeToConvert.isCompatible(Types.INTEGER)) {\n result = Parsers.toInt(text.trim()).trunc();\n type = Types.INTEGER;\n } else if (typeToConvert.isCompatible(Types.REAL)) {\n result = Parsers.toReal(text.trim());\n type = Types.REAL;\n } else if (typeToConvert.isCompatible(Types.BOOLEAN)) {\n result = Parsers.toBool(text.trim());\n type = Types.BOOLEAN;\n } else if (typeToConvert.isCompatible(Types.STRING)) {\n result = Parsers.toString(text);\n type = Types.STRING;\n } else if (typeToConvert.isCompatible(Types.CHAR)) {\n result = Parsers.toChar(text);\n type = Types.CHAR;\n } else {\n throw new Error(\"!!!!Critical error: Unknown type in readFunction!!!!\");\n }\n } catch (_) {\n if (this.mode == Modes.ABORT) {\n store.mode = Modes.RETURN;\n return store;\n }\n const stringInfo = typeToConvert.stringInfo()[0];\n const realObject = store.getStoreObject(\"p1\");\n if (realObject.getReferenceDimension() > 0) {\n const arrayInfo = realObject.type.stringInfo()[0];\n const dim = realObject.getReferenceDimension();\n throw ProcessorErrorFactory.invalid_read_type_array(\n text,\n stringInfo.type,\n stringInfo.dim,\n realObject.getRefObj(),\n arrayInfo.type,\n dim,\n this.function_call_stack.pop()\n );\n }\n throw ProcessorErrorFactory.invalid_read_type(\n text,\n stringInfo.type,\n stringInfo.dim,\n realObject.getRefObj(),\n this.function_call_stack.pop()\n );\n }\n const stoValue = new StoreValue(type, result);\n store.updateStore(\"p1\", stoValue);\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(readFunction)]\n );\n const func = new Commands.Function(\n \"$read\",\n Types.VOID,\n [new Commands.FormalParameter(Types.ALL, \"p1\", true)],\n block\n );\n return func;\n}\n","import * as Commands from \"./../../ast/commands\";\nimport { Types } from \"./../../typeSystem/types\";\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { IVProgParser } from \"../../ast/ivprogParser\";\nimport { RealLiteral, IntLiteral, BoolLiteral } from \"../../ast/expressions\";\nimport { Modes } from \"../modes\";\nimport { MultiType } from \"../../typeSystem/multiType\";\nimport { ProcessorErrorFactory } from \"../error/processorErrorFactory\";\nimport { StoreValue } from \"../store/value/store_value\";\n\n/**\n *\n * is_real\n * is_int\n * is_bool\n * cast_real\n * cast_int\n * cast_bool\n * cast_string\n * cast_char\n */\n\nexport function createIsRealFun () {\n const isRealFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof RealLiteral) {\n result = true;\n }\n } catch (error) {\n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(isRealFun)]\n );\n const func = new Commands.Function(\n \"$isReal\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\n return func;\n}\n\nexport function createIsIntFun () {\n const isIntFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof IntLiteral) {\n result = true;\n }\n } catch {\n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isIntFun)]);\n const func = new Commands.Function(\n \"$isInt\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\n return func;\n}\n\nexport function createIsBoolFun () {\n const isBoolFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n result = true;\n }\n } catch (error) {\n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(isBoolFun)]\n );\n const func = new Commands.Function(\n \"$isBool\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\n return func;\n}\n\nexport function createCastRealFun () {\n const castRealFun = async (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.INTEGER.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.REAL, Parsers.toReal(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof RealLiteral) {\n const temp = new StoreValue(\n Types.REAL,\n Parsers.toReal(result.value)\n );\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) {\n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.REAL.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(\n value,\n typeInfo.type,\n typeInfo.dim\n );\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castRealFun)]\n );\n const func = new Commands.Function(\n \"$castReal\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.STRING]),\n \"val\",\n false\n ),\n ],\n block\n );\n return func;\n}\n\nexport function createCastIntFun () {\n const castIntFun = async (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.REAL.ord: {\n value = value.toNumber();\n const temp = new StoreValue(\n Types.INTEGER,\n Parsers.toInt(Math.floor(value))\n );\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.CHAR.ord: {\n const temp = new StoreValue(\n Types.INTEGER,\n Parsers.toInt(value.charCodeAt(0))\n );\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof IntLiteral) {\n const temp = new StoreValue(\n Types.INTEGER,\n Parsers.toInt(result.value)\n );\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) {\n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.INTEGER.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(\n value,\n typeInfo.type,\n typeInfo.dim\n );\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castIntFun)]\n );\n const func = new Commands.Function(\n \"$castInt\",\n Types.INTEGER,\n [\n new Commands.FormalParameter(\n new MultiType([Types.REAL, Types.STRING, Types.CHAR]),\n \"val\",\n false\n ),\n ],\n block\n );\n return func;\n}\n\nexport function createCastBoolFun () {\n const castBoolFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const value = str.get();\n const parser = IVProgParser.createParser(value);\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n const temp = new StoreValue(Types.BOOLEAN, val.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) {\n // ignore\n }\n const typeStringInfoArray = Types.BOOLEAN.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(\n value,\n typeInfo.type,\n typeInfo.dim\n );\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castBoolFun)]\n );\n const func = new Commands.Function(\n \"$castBool\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\n return func;\n}\n\nexport function createCastStringFun () {\n const castStringFun = async function (store, _) {\n const val = store.applyStore(\"str\");\n const result = Parsers.convertToString(val.get(), val.type);\n const temp = new StoreValue(Types.STRING, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castStringFun)]\n );\n const func = new Commands.Function(\n \"$castString\",\n Types.STRING,\n [new Commands.FormalParameter(Types.ALL, \"str\", false)],\n block\n );\n return func;\n}\n\nexport function createCastCharFun () {\n const castCharFun = (store, _) => {\n const valSV = store.applyStore(\"charCode\");\n // Force the int value to the range [0, 255]\n const value = valSV.get().toNumber() & 0xff;\n const result = String.fromCharCode(value);\n const temp = new StoreValue(Types.CHAR, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castCharFun)]\n );\n const func = new Commands.Function(\n \"$castChar\",\n Types.CHAR,\n [new Commands.FormalParameter(Types.INTEGER, \"charCode\", false)],\n block\n );\n return func;\n}\n\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { Decimal } from 'decimal.js';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/**\n * sin\n * cos\n * tan\n * sqrt\n * pow\n * log\n * abs\n * negate\n * invert\n * max\n * min\n */\n\nfunction convertToRadians(degrees) {\n return degrees.times(Decimal.acos(-1)).div(180);\n}\n\nexport function createSinFun () {\n const sinFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if(angle.eq(90)) {\n result = new Decimal(1);\n } else if (angle.eq(180)) {\n result = new Decimal(0);\n } else if (angle.eq(270)) {\n result = new Decimal(-1);\n } else {\n result = Decimal.sin(convertToRadians(angle));\n }\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sinFun)]);\n const func = new Commands.Function(\n \"$sin\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createCosFun () {\n const cosFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if (angle.eq(90)) {\n result = new Decimal(0);\n } else if (angle.eq(180)) {\n result = new Decimal(-1);\n } else if (angle.eq(270)) {\n result = new Decimal(0);\n }\n result = Decimal.cos(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(cosFun)]);\n const func = new Commands.Function(\n \"$cos\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createTanFun () {\n const tanFun = async function (sto, _) {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n if(angle.eq(90) || angle.eq(270)) {\n throw ProcessorErrorFactory.undefined_tanget_value(x.get().toNumber(),\n this.function_call_stack.pop());\n }\n const result = Decimal.tan(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(tanFun)]);\n const func = new Commands.Function(\n \"$tan\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createSqrtFun () {\n const sqrtFun = async function (sto, _) {\n const x = sto.applyStore('x');\n if(x.get().isNeg()) {\n return Promise.reject(ProcessorErrorFactory.negative_sqrt_value(this.function_call_stack.pop()));\n }\n const result = x.get().sqrt();\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sqrtFun)]);\n const func = new Commands.Function(\n \"$sqrt\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createPowFun () {\n const powFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const y = sto.applyStore('y');\n const result = x.get().pow(y.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(powFun)]);\n const func = new Commands.Function(\n \"$pow\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n ),\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"y\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createLogFun () {\n const logFun = async function (sto, _) {\n const x = sto.applyStore('x');\n if (x.get().isNegative()) {\n return Promise.reject(\n ProcessorErrorFactory.negative_log_value(this.function_call_stack.pop())\n );\n }\n const result = Decimal.log10(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(logFun)]);\n const func = new Commands.Function(\n \"$log\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createAbsFun () {\n const absFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().abs();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(absFun)]);\n const func = new Commands.Function(\n \"$abs\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createNegateFun () {\n const negateFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().negated();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(negateFun)]\n );\n const func = new Commands.Function(\n \"$negate\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createInvertFun() {\n const invertFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = Parsers.toReal(1).dividedBy(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(invertFun)]\n );\n const func = new Commands.Function(\n \"$invert\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createMaxFun () {\n const maxFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.max(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const paramType = new ArrayType(\n new MultiType([Types.INTEGER, Types.REAL]),\n 1\n );\n const block = new Commands.CommandBlock([], [new Commands.SysCall(maxFun)]);\n const func = new Commands.Function(\n \"$max\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, \"x\", false)],\n block\n );\n return func;\n}\n\nexport function createMinFun () {\n const minFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.min(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const paramType = new ArrayType(\n new MultiType([Types.INTEGER, Types.REAL]),\n 1\n );\n const block = new Commands.CommandBlock([], [new Commands.SysCall(minFun)]);\n const func = new Commands.Function(\n \"$min\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, \"x\", false)],\n block\n );\n return func;\n}\n\nlet seed = Date.now();\nexport function createRandFun() {\n const a = 16807;\n const m = 2147483647;\n const c = 12345;\n const randFun = async (sto, _) => {\n seed = (a * seed + c) % m;\n const val = seed / (m - 1);\n const temp = new StoreValue(Types.REAL, new Decimal(val));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const block = new Commands.CommandBlock([], [new Commands.SysCall(randFun)]);\n const func = new Commands.Function(\"$rand\", Types.REAL, [], block);\n return func;\n}\n\nexport function createSetSeedFun() {\n const setSeedFun = async (sto, _) => {\n const value = sto.applyStore(\"x\");\n seed = value.get().toNumber();\n sto.mode = Modes.RETURN;\n return sto;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(setSeedFun)]\n );\n const func = new Commands.Function(\n \"$setSeed\",\n Types.VOID,\n [new Commands.FormalParameter(Types.INTEGER, \"x\", false)],\n block\n );\n return func;\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/*\n* substring\n* length\n* uppercase\n* lowercase\n* charAt\n**/\n\nexport function createSubstringFun () {\n const substringFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const start = sto.applyStore(\"start\");\n const end = sto.applyStore(\"end\");\n const result = str.get().substring(start.get(), end.get());\n const temp = new StoreValue(Types.STRING, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(substringFun)]);\n const func = new Commands.Function('$substring', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'start', false),\n new Commands.FormalParameter(Types.INTEGER, 'end', false)],\n block);\n return func;\n}\n\nexport function createLengthFun () {\n const lengthFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.INTEGER, toInt(str.value.length));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lengthFun)]);\n const func = new Commands.Function('$length', Types.INTEGER,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createUppercaseFun () {\n const uppercaseFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toUpperCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(uppercaseFun)]);\n const func = new Commands.Function('$uppercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createLowercaseFun () {\n const lowercaseFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toLowerCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lowercaseFun)]);\n const func = new Commands.Function('$lowercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createrCharAtFun () {\n const charAtFun = async function (sto, _) {\n const str = sto.applyStore(\"str\");\n const idx = sto.applyStore(\"index\");\n if (idx.get().toNumber() < 0 || idx.get().toNumber() >= str.get().length) {\n throw ProcessorErrorFactory.invalid_string_index(idx.get().toNumber(), str.get(),\n this.function_call_stack.pop());\n }\n const temp = new StoreValue(Types.CHAR, str.get().charAt(idx.get().toNumber()));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(charAtFun)]);\n const func = new Commands.Function('$charAt', Types.CHAR,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'index', false)],\n block);\n return func;\n}\n","import { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { LanguageDefinedFunction } from \"./../definedFunctions\";\nimport {\n ArrayDeclaration,\n While,\n For,\n Switch,\n Assign,\n Break,\n IfThenElse,\n Return,\n ArrayIndexAssign,\n} from \"../../ast/commands\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from \"./../../ast/expressions/expression\";\nimport {\n InfixApp,\n UnaryApp,\n FunctionCall,\n IntLiteral,\n RealLiteral,\n StringLiteral,\n BoolLiteral,\n VariableLiteral,\n ArrayAccess,\n CharLiteral,\n} from \"../../ast/expressions\";\nimport { Literal } from \"../../ast/expressions/literal\";\nimport {\n resultTypeAfterInfixOp,\n resultTypeAfterUnaryOp,\n} from \"../compatibilityTable\";\nimport { Types } from \"../../typeSystem/types\";\nimport { ArrayType } from \"../../typeSystem/array_type\";\nimport { MultiType } from \"../../typeSystem/multiType\";\nimport { Config } from \"../../util/config\";\nimport { Store } from \"../store/store\";\nimport { IVProgParser } from \"../../ast/ivprogParser\";\n\nexport class SemanticAnalyser {\n static analyseFromSource (stringCode) {\n const parser = IVProgParser.createParser(stringCode);\n const semantic = new SemanticAnalyser(parser.parseTree());\n return semantic.analyseTree();\n }\n\n constructor (ast) {\n this.ast = ast;\n this.symbolMap = null;\n this.currentFunction = null;\n }\n\n pushMap () {\n if (this.symbolMap === null) {\n this.symbolMap = { map: {}, next: null };\n } else {\n const n = { map: {}, next: this.symbolMap };\n this.symbolMap = n;\n }\n }\n\n popMap () {\n if (this.symbolMap !== null) {\n this.symbolMap = this.symbolMap.next;\n }\n }\n\n insertSymbol (id, typeInfo) {\n this.symbolMap.map[id] = typeInfo;\n }\n\n findSymbol (id, symbol_map) {\n if (!symbol_map.map[id]) {\n if (symbol_map.next) {\n return this.findSymbol(id, symbol_map.next);\n }\n return null;\n } else {\n return symbol_map.map[id];\n }\n }\n\n getMainFunction () {\n return this.ast.functions.find((v) => v.isMain);\n }\n\n findFunction (name) {\n if (name.match(/^\\$.+$/)) {\n const fun = LanguageDefinedFunction.getFunction(name);\n if (!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find((v) => v.name === name);\n if (!val) {\n return null;\n }\n return val;\n }\n }\n\n analyseTree () {\n const globalVars = this.ast.global;\n this.pushMap();\n this.assertDeclarations(globalVars);\n const functions = this.ast.functions;\n const mainFunc = functions.filter((f) => f.name === null);\n if (mainFunc.length <= 0) {\n throw ProcessorErrorFactory.main_missing();\n }\n for (let i = 0; i < functions.length; i++) {\n const fun = functions[i];\n this.assertFunction(fun);\n }\n return this.ast;\n }\n\n assertDeclarations (list) {\n for (let i = 0; i < list.length; i++) {\n this.assertDeclaration(list[i]);\n }\n }\n\n assertDeclaration (declaration) {\n if (declaration instanceof ArrayDeclaration) {\n this.assertArrayDeclaration(declaration);\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n lines: declaration.lines,\n columns: declaration.columns,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n } else {\n if (declaration.initial === null) {\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n return;\n }\n const resultType = this.evaluateExpressionType(declaration.initial);\n if (resultType instanceof MultiType) {\n if (!resultType.isCompatible(declaration.type)) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n result_info.type,\n result_info.dim,\n exp.toString(),\n declaration.sourceInfo\n );\n }\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n } else if (\n (!declaration.type.isCompatible(resultType) &&\n !Config.enable_type_casting) ||\n (!declaration.type.isCompatible(resultType) &&\n Config.enable_type_casting &&\n !Store.canImplicitTypeCast(declaration.type, resultType))\n ) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n result_info.type,\n result_info.dim,\n exp.toString(),\n declaration.sourceInfo\n );\n } else {\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n }\n }\n }\n\n assertArrayDeclaration (declaration) {\n if (declaration.initial === null) {\n const lineType = this.evaluateExpressionType(declaration.lines);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n declaration.sourceInfo\n );\n }\n if (declaration.columns !== null) {\n const columnType = this.evaluateExpressionType(declaration.columns);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n declaration.sourceInfo\n );\n }\n }\n } else {\n this.evaluateArrayLiteral(declaration);\n }\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n lines: declaration.lines,\n columns: declaration.columns,\n type: declaration.type,\n });\n return;\n }\n\n evaluateExpressionType (expression) {\n // TODO: Throw operator error in case type == UNDEFINED\n if (expression instanceof UnaryApp) {\n const op = expression.op;\n const resultType = this.evaluateExpressionType(expression.left);\n const finalResult = resultTypeAfterUnaryOp(op, resultType);\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfo = resultType.stringInfo();\n const info = stringInfo[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_unary_op_full(\n expString,\n op,\n info.type,\n info.dim,\n expression.sourceInfo\n );\n }\n return finalResult;\n } else if (expression instanceof InfixApp) {\n const op = expression.op;\n const resultTypeLeft = this.evaluateExpressionType(expression.left);\n const resultTypeRight = this.evaluateExpressionType(expression.right);\n const finalResult = resultTypeAfterInfixOp(\n op,\n resultTypeLeft,\n resultTypeRight\n );\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfoLeft = resultTypeLeft.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = resultTypeRight.stringInfo();\n const infoRight = stringInfoRight[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_infix_op_full(\n expString,\n op,\n infoLeft.type,\n infoLeft.dim,\n infoRight.type,\n infoRight.dim,\n expression.sourceInfo\n );\n }\n return finalResult;\n } else if (expression instanceof Literal) {\n return this.evaluateLiteralType(expression);\n } else if (expression instanceof FunctionCall) {\n if (expression.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(\n LanguageDefinedFunction.getMainFunctionName(),\n expression.sourceInfo\n );\n }\n const fun = this.findFunction(expression.id);\n if (fun === null) {\n throw ProcessorErrorFactory.function_missing_full(\n expression.id,\n expression.sourceInfo\n );\n }\n if (fun.returnType.isCompatible(Types.VOID)) {\n throw ProcessorErrorFactory.void_in_expression_full(\n expression.id,\n expression.sourceInfo\n );\n }\n this.assertParameters(fun, expression.actualParameters);\n return fun.returnType;\n } else if (expression instanceof ArrayAccess) {\n const arrayTypeInfo = this.findSymbol(expression.id, this.symbolMap);\n if (arrayTypeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n expression.id,\n expression.sourceInfo\n );\n }\n if (!(arrayTypeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n expression.id,\n expression.sourceInfo\n );\n }\n const lineType = this.evaluateExpressionType(expression.line);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n expression.sourceInfo\n );\n }\n if (expression.column !== null) {\n if (arrayTypeInfo.columns === null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(\n expression.id,\n expression.sourceInfo\n );\n }\n const columnType = this.evaluateExpressionType(expression.column);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n expression.sourceInfo\n );\n }\n }\n const arrType = arrayTypeInfo.type;\n if (expression.column !== null) {\n // indexing matrix\n return arrType.innerType;\n } else {\n if (arrayTypeInfo.columns === null) {\n return arrType.innerType;\n }\n return new ArrayType(arrType.innerType, 1);\n }\n }\n }\n\n evaluateLiteralType (literal) {\n if (literal instanceof IntLiteral) {\n return literal.type;\n } else if (literal instanceof RealLiteral) {\n return literal.type;\n } else if (literal instanceof StringLiteral) {\n return literal.type;\n } else if (literal instanceof BoolLiteral) {\n return literal.type;\n } else if (literal instanceof CharLiteral) {\n return literal.type;\n } else if (literal instanceof VariableLiteral) {\n const typeInfo = this.findSymbol(literal.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n literal.id,\n literal.sourceInfo\n );\n }\n if (typeInfo.type instanceof ArrayType) {\n return typeInfo.type;\n }\n return typeInfo.type;\n } else {\n // console.warn(\"Evaluating type only for an array literal...\");\n let last = null;\n if (literal.value.length === 1) {\n last = this.evaluateExpressionType(literal.value[0]);\n } else {\n for (let i = 0; i < literal.value.length; i++) {\n const e = this.evaluateExpressionType(literal.value[i]);\n if (last === null) {\n last = e;\n } else if (!last.isCompatible(e)) {\n const strInfo = last.stringInfo();\n const info = strInfo[0];\n const strExp = literal.toString();\n throw ProcessorErrorFactory.incompatible_types_array_full(\n strExp,\n info.type,\n info.dim,\n literal.sourceInfo\n );\n }\n }\n }\n if (last instanceof ArrayType) {\n return new ArrayType(last.innerType, last.dimensions + 1);\n }\n return new ArrayType(last, 1);\n }\n }\n\n evaluateArrayLiteral (arrayDeclaration) {\n const type = arrayDeclaration.type;\n const literal = arrayDeclaration.initial;\n // console.log(arrayDeclaration);\n if (arrayDeclaration.isVector) {\n this.evaluateVectorLiteralType(literal, type);\n } else {\n // TODO matrix type check\n for (let i = 0; i < literal.lines; ++i) {\n const line_literal = literal.value[i];\n this.evaluateVectorLiteralType(\n line_literal,\n new ArrayType(type.innerType, 1)\n );\n }\n }\n return true;\n }\n\n assertFunction (fun) {\n this.pushMap();\n this.currentFunction = fun;\n fun.formalParameters.forEach((formalParam) => {\n if (formalParam.type instanceof ArrayType) {\n if (formalParam.type.dimensions > 1) {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n lines: -1,\n columns: -1,\n type: formalParam.type,\n });\n } else {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n lines: -1,\n columns: null,\n type: formalParam.type,\n });\n }\n } else {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n type: formalParam.type,\n });\n }\n });\n this.assertDeclarations(fun.variablesDeclarations);\n const optional = fun.returnType.isCompatible(Types.VOID);\n const valid = this.assertReturn(fun, optional);\n if (!valid) {\n throw ProcessorErrorFactory.function_no_return(fun.name);\n }\n this.popMap();\n }\n\n assertReturn (fun, optional) {\n return fun.commands.reduce(\n (last, next) => this.checkCommand(fun.returnType, next, optional) || last,\n optional\n );\n }\n\n checkCommand (type, cmd, optional) {\n if (cmd instanceof While) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(\n cmd.expression.toString(),\n cmd.sourceInfo\n );\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof For) {\n const var_type = this.evaluateExpressionType(cmd.for_id);\n if (!var_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_variable(\n cmd.for_id,\n cmd.sourceInfo\n );\n }\n const from_type = this.evaluateExpressionType(cmd.for_from);\n if (!from_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_from(\n cmd.for_from,\n cmd.sourceInfo\n );\n }\n const to_type = this.evaluateExpressionType(cmd.for_to);\n if (!to_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_to(cmd.for_to, cmd.sourceInfo);\n }\n if (cmd.for_pass != null) {\n const pass_type = this.evaluateExpressionType(cmd.for_pass);\n if (!pass_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_pass(\n cmd.for_pass,\n cmd.sourceInfo\n );\n }\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof Switch) {\n const sType = this.evaluateExpressionType(cmd.expression);\n let result = optional;\n let hasDefault = false;\n for (let i = 0; i < cmd.cases.length; i++) {\n const aCase = cmd.cases[i];\n if (aCase.expression !== null) {\n const caseType = this.evaluateExpressionType(aCase.expression);\n if (!sType.isCompatible(caseType)) {\n const strInfo = sType.stringInfo();\n const info = strInfo[0];\n const strExp = aCase.expression.toString();\n throw ProcessorErrorFactory.invalid_case_type_full(\n strExp,\n info.type,\n info.dim,\n aCase.sourceInfo\n );\n }\n } else {\n hasDefault = true;\n }\n result = result && this.checkCommands(type, aCase.commands, result);\n }\n return result && hasDefault;\n } else if (cmd instanceof ArrayIndexAssign) {\n // TODO - rework!!!!!\n let used_dims = 0;\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (!(typeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const exp = cmd.expression;\n const lineExp = cmd.line;\n const lineType = this.evaluateExpressionType(lineExp);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n used_dims += 1;\n const columnExp = cmd.column;\n if (typeInfo.columns === null && columnExp !== null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n } else if (columnExp !== null) {\n const columnType = this.evaluateExpressionType(columnExp);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n used_dims += 1;\n }\n // exp a single value exp or an array access\n const exp_type = this.evaluateExpressionType(exp);\n const access_type = typeInfo.type;\n\n let compatible = false;\n let type = access_type;\n if (exp_type instanceof MultiType) {\n if (access_type.dimensions - used_dims == 0) {\n type = access_type.innerType;\n } else {\n type = new ArrayType(\n access_type.innerType,\n Math.max(0, access_type.dimensions - used_dims)\n );\n }\n compatible = exp_type.isCompatible(type);\n } else {\n compatible = access_type.canAccept(exp_type, used_dims);\n }\n if (!compatible) {\n if (0 === access_type.dimensions - used_dims) {\n type = access_type.innerType; // enable a valid attempt to cast real <--> integer\n }\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type, exp_type)\n ) {\n const access_type_string_info = access_type.stringInfo();\n const access_type_info = access_type_string_info[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n access_type_info.type,\n access_type_info.dim - used_dims,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n return optional;\n } else if (cmd instanceof Assign) {\n // TODO - rework since there is no literal array assignment\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const exp = cmd.expression;\n const exp_type = this.evaluateExpressionType(exp);\n if (exp_type instanceof ArrayType) {\n if (!(typeInfo.type instanceof ArrayType)) {\n // TODO better error message\n throw new Error(\"Cannot assign an array to a non-array variable \");\n }\n // Both are arrays...\n // if both don't have same dimensions and type, cannot perform assignment\n if (!exp_type.isCompatible(typeInfo.type)) {\n if (\n exp_type.dimensions === typeInfo.type.dimensions &&\n !exp_type.innerType.isCompatible(typeInfo.type.innerType)\n ) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(\n typeInfo.type.innerType,\n exp_type.innerType\n )\n ) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n } else {\n switch (exp_type.dimensions) {\n case 1: {\n throw ProcessorErrorFactory.vector_to_matrix_attr(\n cmd.id,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n case 2: {\n throw ProcessorErrorFactory.matrix_to_vector_attr(\n cmd.id,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n }\n }\n } else if (!exp_type.isCompatible(typeInfo.type)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(typeInfo.type, exp_type)\n ) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n return optional;\n } else if (cmd instanceof Break) {\n return optional;\n } else if (cmd instanceof IfThenElse) {\n const resultType = this.evaluateExpressionType(cmd.condition);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(\n cmd.condition.toString(),\n cmd.sourceInfo\n );\n }\n if (cmd.ifFalse instanceof IfThenElse) {\n return (\n this.checkCommands(type, cmd.ifTrue.commands, optional) &&\n this.checkCommand(type, cmd.ifFalse, optional)\n );\n } else if (cmd.ifFalse != null) {\n return (\n this.checkCommands(type, cmd.ifTrue.commands, optional) &&\n this.checkCommands(type, cmd.ifFalse.commands, optional)\n );\n } else {\n return this.checkCommands(type, cmd.ifTrue.commands, optional);\n }\n } else if (cmd instanceof FunctionCall) {\n let fun = null;\n if (cmd.isMainCall) {\n fun = this.getMainFunction();\n } else {\n fun = this.findFunction(cmd.id);\n }\n if (fun === null) {\n throw ProcessorErrorFactory.function_missing_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n this.assertParameters(fun, cmd.actualParameters);\n return optional;\n } else if (cmd instanceof Return) {\n const funcName = this.currentFunction.isMain\n ? LanguageDefinedFunction.getMainFunctionName()\n : this.currentFunction.name;\n if (cmd.expression === null && !type.isCompatible(Types.VOID)) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_void_return_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n } else if (cmd.expression !== null) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!type.isCompatible(resultType)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type, resultType)\n ) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n }\n }\n return true;\n } else {\n return true;\n }\n }\n }\n\n checkCommands (type, cmds, optional) {\n return cmds.reduce(\n (last, next) => this.checkCommand(type, next, optional) || last,\n optional\n );\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {Expression[]} actualParametersList\n */\n assertParameters (fun, actualParametersList) {\n const parameterList = fun.formalParameters;\n if (\n parameterList.length > actualParametersList.length ||\n (parameterList.length !== actualParametersList.length &&\n !fun.hasVariadic())\n ) {\n throw ProcessorErrorFactory.invalid_parameters_size_full(\n fun.name,\n actualParametersList.length,\n fun.formalParameters.length,\n null\n );\n }\n\n for (\n let i = 0, j = 0;\n i < parameterList.length && j < actualParametersList.length;\n i += 1, j += 1\n ) {\n const formalParam = parameterList[i];\n if (formalParam.variadic && i + 1 !== parameterList.length) {\n throw \"A function variadic parameter must be its last parameter!\";\n }\n if (formalParam.variadic) {\n j = this.assertVariadicParameter(\n fun,\n formalParam,\n j,\n actualParametersList\n );\n } else {\n const param = actualParametersList[j];\n this.assertParameter(fun, formalParam, param);\n }\n }\n }\n\n evaluateVectorLiteralType (literal, type) {\n // console.log(literal);\n for (let i = 0; i < literal.value.length; i += 1) {\n const exp = literal.value[i];\n const expType = this.evaluateExpressionType(exp);\n let compatible = false;\n if (expType instanceof MultiType) {\n compatible = expType.isCompatible(type.innerType);\n } else {\n compatible = type.canAccept(expType, 1);\n }\n if (!compatible) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type.innerType, expType)\n ) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = expType.stringInfo();\n const result_info = result_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n 0,\n result_info.type,\n result_info.dim,\n exp.toString(),\n literal.sourceInfo\n );\n }\n }\n }\n return type;\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {import('./../../ast/commands/formalParameter').FormalParameter} formalParam\n * @param {number} index\n * @param {Expression[]} actualParametersList\n */\n assertVariadicParameter (fun, formalParam, index, actualParametersList) {\n let i;\n for (i = index; i < actualParametersList.length; i += 1) {\n this.assertParameter(fun, formalParam, actualParametersList[i]);\n }\n return i - 1;\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {import('./../../ast/commands/formalParameter').FormalParameter} formalParam\n * @param {Expression} actualParameter\n */\n assertParameter (fun, formalParam, actualParameter) {\n // const id = formalParam.id;\n if (formalParam.byRef) {\n if (actualParameter instanceof VariableLiteral) {\n const variable = this.findSymbol(actualParameter.id, this.symbolMap);\n if (variable.isConst) {\n throw ProcessorErrorFactory.invalid_const_ref_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n } else if (\n !(\n actualParameter instanceof VariableLiteral ||\n actualParameter instanceof ArrayAccess\n )\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n const resultType = this.evaluateExpressionType(actualParameter);\n if (\n resultType instanceof MultiType &&\n formalParam.type instanceof MultiType\n ) {\n let shared = 0;\n for (let j = 0; j < resultType.types.length; ++j) {\n const element = resultType.types[j];\n if (formalParam.type.types.indexOf(element) !== -1) {\n shared += 1;\n }\n }\n if (shared <= 0) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (\n (!resultType.isCompatible(Types.INTEGER) &&\n !resultType.isCompatible(Types.REAL)) ||\n formalParam.type.isCompatible(Types.INTEGER) ||\n formalParam.type.isCompatible(Types.REAL)\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n } else if (resultType instanceof MultiType) {\n if (!resultType.isCompatible(formalParam.type)) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (\n (!resultType.isCompatible(Types.INTEGER) &&\n !resultType.isCompatible(Types.REAL)) ||\n formalParam.type.isCompatible(Types.INTEGER) ||\n formalParam.type.isCompatible(Types.REAL)\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n } else if (!formalParam.type.isCompatible(resultType)) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (!Store.canImplicitTypeCast(formalParam.type, resultType)) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n }\n}\n","import { IVProgParser } from './ast/ivprogParser';\nimport { IVProgProcessor } from './processor/ivprogProcessor';\nimport {DOMConsole} from './io/domConsole';\nimport { SemanticAnalyser } from './processor/semantic/semanticAnalyser';\nimport { Location } from \"./memory/location\";\n\nexport function runner () {\n\n\n// const lexer = new ivprogLexer(new InputStream(input));\n// const stream = new CommonTokenStream(lexer);\n// stream.fill();\n// let i = 1;\n// let token = null;\n// while ((token = stream.LT(i)).type !== ivprogLexer.EOF && token.type !== ivprogLexer.WHITESPACE) {\n// console.log(`${token.type}-${token.text}`);\n// console.log('\\n')\n// i++;\n// }\n// const anaSin = new IVProgParser(input, ivprogLexer);\nconst editor = new window.JsonEditor('#json-renderer', {});\nconst domConsole = new DOMConsole(\"#console\", true);\ndomConsole.hide();\n// proc.interpretAST().then( sto => {\n// console.log(sto.applyStore('a'));\n// }).catch(e => console.log(e));\ntry {\n window.$('#btn').click( () => {\n const input = window.$('#input').val();\n const analiser = IVProgParser.createParser(input);\n try {\n analiser.fill();\n //console.debug(analiser.tokenStream)\n const data = analiser.parseTree();\n const semAna = new SemanticAnalyser(data);\n const proc = new IVProgProcessor(semAna.analyseTree());\n proc.registerInput(domConsole);\n domConsole.clear();\n proc.registerOutput(domConsole);\n proc.interpretAST().then(sto => {\n console.log(sto);\n editor.load(sto.store);\n console.log(Location.size());\n }).catch( e => {\n alert(e);\n console.log(e);\n console.log(Location.size());\n });\n } catch (error) {\n alert(error);\n console.log(error);\n console.log(Location.size());\n }\n\n });\n} catch(a) {\n console.log(a);\n}\n}\n","import line_i18n from \"line-i18n\";\nimport { LocalizedStrings } from \"./localizedStringsService\";\n\nconst StringTypes = line_i18n.StringTypes;\n\nexport const i18nHelper = Object.freeze({\n i18n: (identifier) => {\n var opts = identifier.split(':');\n var type = opts[0].toLowerCase();\n var id = opts[1];\n if (StringTypes.ERROR === type) {\n return LocalizedStrings.getError(id);\n } else if (StringTypes.MESSAGE === type) {\n return LocalizedStrings.getMessage(id); \n } else if (StringTypes.UI === type) {\n return LocalizedStrings.getUI(id);\n } else {\n console.warn(\"A string has been passed to the i18n helper function that was not in the form type:id -> \" + identifier);\n return LocalizedStrings.getString(identifier, type);\n }\n }\n});","import line_i18n from \"line-i18n\";\nimport { LanguageService } from \"./languageService\";\nimport { LanguageDefinedFunction } from \"./../processor/definedFunctions\";\nimport Langs from \"./../../i18n\";\nimport { Operators } from \"./../ast/operators\";\n\nclass IVProgLocalizedStrings extends line_i18n.LocalizedStrings {\n constructor (langService, langsJsons, shouldListenToChange = false) {\n super(langService, langsJsons, shouldListenToChange);\n }\n\n translateType (type, dim) {\n const type_string = this.getUI(`type_${type}`);\n switch (dim) {\n case 0:\n return type_string;\n default:\n if (dim > 1) return this.getUI(\"matrix_info_string\", [type_string]);\n else return this.getUI(\"vector_info_string\", [type_string]);\n }\n }\n\n translateOp (op) {\n switch (op.ord) {\n case Operators.AND.ord:\n case Operators.OR.ord:\n case Operators.NOT.ord:\n return this.getUI(`logic_operator_${op.value}`);\n default:\n return op.value;\n }\n }\n\n translateInternalFunction (name, category = null) {\n if (category == null) {\n return LanguageDefinedFunction.getLocalName(name);\n } else {\n return LanguageDefinedFunction.getLocalName(`${category}.${name}`);\n }\n }\n}\n\nexport const LocalizedStrings = Object.freeze(\n new IVProgLocalizedStrings(LanguageService, Langs, true)\n);\n\nlet _instance = null;\n\nexport function getInstance () {\n if (_instance == null) {\n _instance = new IVProgLocalizedStrings(LanguageService, Langs);\n }\n return _instance;\n}\n","let clicks = [];\nlet inRebuildMode = false;\n\nexport const ActionTypes = Object.freeze({\n // registerUserEvent payload:\n // (function_name, insert action)\n INSERT_FUNCTION:\"INSERT_FUNCTION\",\n // (function_name, remove action)\n REMOVE_FUNCTION:\"REMOVE_FUNCTION\",\n // (var_name,insert action, type, dim)\n INSERT_GLOBAL_VAR:\"INSERT_GLOBAL_VAR\",\n // (var name, remove action)\n REMOVE_GLOBAL_VAR:\"REMOVE_GLOBAL_VAR\",\n // (old function name, rename action, new function name)\n RENAME_FUNCTION:\"RENAME_FUNCTION\",\n // (old var name, rename action. new var name)\n RENAME_GLOBAL_VAR:\"RENAME_GLOBAL_VAR\",\n // (var name, set const action)\n SET_GLOBAL_CONST:\"SET_GLOBAL_CONST\",\n // (function name, change return action, type, dim)\n CHANGE_FUNCTION_RETURN:\"CHANGE_FUNCTION_RETURN\",\n // (var name, change type action, type, dim, rows?, columns?)\n CHANGE_GLOBAL_TYPE:\"CHANGE_GLOBAL_TYPE\",\n // (var name, change value action, value)\n CHANGE_GLOBAL_VALUE:\"CHANGE_GLOBAL_VALUE\",\n // (function name, insert param action, param varname, type, dim)\n INSERT_FUNCTION_PARAM:\"INSERT_FUNCTION_PARAM\",\n // (function name, remove param action, param varname)\n REMOVE_FUNCTION_PARAM:\"REMOVE_FUNCTION_PARAM\",\n // (function name, change param type action, type, dim)\n CHANGE_PARAM_TYPE:\"CHANGE_PARAM_TYPE\",\n // (function name, rename param action, old param name, new param name)\n RENAME_FUNCTION_PARAM:\"RENAME_FUNCTION_PARAM\",\n // (function name, insert var action, var name, type, dim)\n INSERT_FUNCTION_VAR:\"INSERT_FUCNTION_VAR\",\n // (function name, remove var action, var name)\n REMOVE_FUNCTION_VAR:\"REMOVE_FUNCTION_VAR\",\n // (function name, rename var action, old var name, new var name)\n RENAME_FUNCTION_VAR:\"RENAME_FUNCTION_VAR\",\n // (function name, change var type action, var name, type, dim, rows?, columns?)\n CHANGE_VAR_TYPE:\"CHANGE_VAR_TYPE\",\n // (function name, change var value action, var name, value)\n CHANGE_VAR_VALUE:\"CHANGE_VAR_VALUE\",\n // (function name, insert command action, command, path)\n INSERT_COMMAND:\"INSERT_COMMAND\",\n // (function name, remove command action, path)\n REMOVE_COMMAND:\"REMOVE_COMMAND\",\n // (function name, change command exp action, path, exp)\n CHANGE_COMMAND_EXP:\"CHANGE_COMMAND_EXP\",\n // (function name, change attrib exp action, path, exp)\n CHANGE_ATTRIB_EXP:\"CHANGE_ATTRIB_EXP\",\n // (function name, change attrib var action, path, var name, row_exp?, column_exp?)\n CHANGE_ATTRIB_VAR:\"CHANGE_ATTRIB_VAR\",\n // (function name, move command action, old path, new path)\n MOVE_COMMAND:\"MOVE_COMMAND\",\n // (function name, enter change name action, var name)\n ENTER_CHANGE_VAR_NAME:'ENTER_CHANGE_VAR_NAME',\n // (function name, enter change value action, var name)\n ENTER_CHANGE_VAR_VALUE:'ENTER_CHANGE_VAR_VALUE',\n // (var name, enter change name action)\n ENTER_CHANGE_GLOBAL_NAME:'ENTER_CHANGE_GLOBAL_NAME',\n // (var name, enter change value action)\n ENTER_CHANGE_GLOBAL_VALUE:'ENTER_CHANGE_GLOBAL_VALUE',\n // (function name, enter change name action, param name)\n ENTER_CHANGE_PARAM_NAME:'ENTER_CHANGE_PARAM_NAME',\n});\n\nexport function registerClick (x, y, details) {\n if (inRebuildMode) {\n return;\n }\n clicks.push([x, y, Date.now(), details]);\n}\n\nexport function registerUserEvent (command, action, ...params) {\n registerEvent('user_event', command, action, params);\n}\n\nexport function registerSystemEvent (command, action, ...params) {\n registerEvent('system_event', command, action, params);\n}\n\nfunction registerEvent (tag, command, action, params) {\n if (inRebuildMode) {\n return;\n }\n const event = {context: command, action: action, params:params};\n clicks.push([tag, Date.now(), event]);\n}\n\nexport function getLogs () {\n return clicks;\n}\n\nexport function setRebuildMode (flag) {\n inRebuildMode = flag;\n}\n\nexport function getLogsAsString () {\n return JSON.stringify(clicks);\n}\n\nexport function parseLogs (logData) {\n clicks = JSON.parse(logData);\n}\n","import { LanguageService } from \"../services/languageService\";\nimport { Types } from \"./types\";\nimport Decimal from \"decimal.js\";\nimport { Config } from \"../util/config\";\n\nexport function toInt (str) {\n return new Decimal(str);\n}\n\nexport function toString (str) {\n let value = str.replace(/^\"/, \"\");\n value = value.replace(/\"$/, \"\");\n value = value.replace(/\\\\b/g, \"\\b\");\n value = value.replace(/\\\\t/g, \"\\t\");\n value = value.replace(/\\\\n/g, \"\\n\");\n value = value.replace(/\\\\r/g, \"\\r\");\n value = value.replace(/\\\\\"/g, '\"');\n value = value.replace(/\\\\'/g, \"'\");\n value = value.replace(/\\\\\\\\/g, \"\\\\\");\n return value;\n}\n\nexport function toChar (str) {\n //console.debug(str, str.length);\n let value = str.replace(/^'/, \"\");\n value = value.replace(/'$/, \"\");\n value = value.replace(/\\\\b/g, \"\\b\");\n value = value.replace(/\\\\t/g, \"\\t\");\n value = value.replace(/\\\\n/g, \"\\n\");\n value = value.replace(/\\\\r/g, \"\\r\");\n value = value.replace(/\\\\\"/g, '\"');\n value = value.replace(/\\\\'/g, \"'\");\n value = value[0];\n return value;\n}\n\nexport function toReal (value) {\n return new Decimal(value);\n}\n\nexport function toBool (str) {\n const val = str;\n const lexer = LanguageService.getCurrentLexer();\n if (lexer.getReservedKeys()[lexer.getRules().RK_TRUE] === val) {\n return true;\n } else if (lexer.getReservedKeys()[lexer.getRules().RK_FALSE] === val) {\n return false;\n } else {\n // TODO: better error message\n throw new Error(str + \"not a valid boolean\");\n }\n}\n\nexport function convertBoolToString (bool) {\n const lexer = LanguageService.getCurrentLexer();\n let result = null;\n if (bool) {\n result = lexer.getReservedKeys()[lexer.getRules().RK_TRUE];\n } else {\n result = lexer.getReservedKeys()[lexer.getRules().RK_FALSE];\n }\n //console.debug(result)\n return result.replace(/'/g, \"\");\n}\n\nexport function convertToString (value, type) {\n switch (type.ord) {\n case Types.INTEGER.ord:\n return value.toString();\n case Types.REAL.ord: {\n if (value.dp() <= 0) {\n return value.toFixed(1);\n } else {\n return value.toFixed(Config.decimalPlaces);\n }\n }\n case Types.BOOLEAN.ord:\n return convertBoolToString(value);\n default:\n return value;\n }\n}\n\n","import {SemanticAnalyser} from './../processor/semantic/semanticAnalyser';\nimport {IVProgProcessor} from './../processor/ivprogProcessor';\nimport { InputTest } from './inputTest';\nimport { OutputTest } from './outputTest';\nimport { LocalizedStrings } from './../services/localizedStringsService'\n\nexport function autoGenerateTestCaseOutput (program_text, testCases) {\n let copyTestCases = testCases.map((test) => Object.assign({}, test));\n try {\n const program = SemanticAnalyser.analyseFromSource(program_text);\n const resultList = testCases.map((test, id) => {\n const input = new InputTest(test.input);\n const output = new OutputTest();\n const exec = new IVProgProcessor(program);\n exec.registerInput(input);\n exec.registerOutput(output);\n return exec.interpretAST().then(_ => {\n return {id: id, program: exec};\n });\n });\n return Promise.all(resultList).then(result_final => {\n for(let i = 0; i < result_final.length; ++i) {\n const result = result_final[i];\n const output = result.program.output.list;\n const input = result.program.input;\n if(input.index != input.inputList.length) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_unused_input\", [result.id+1]));\n return Promise.resolve(false);\n }\n if(output.length == 0) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_empty\", [result.id+1]));\n }\n copyTestCases[result.id].output = output;\n }\n window.outputGenerated(copyTestCases);\n return Promise.resolve(true);\n });\n }catch (error) {\n return Promise.reject(error)\n }\n}","\nimport * as Models from '../visualUI/ivprog_elements';\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as VariableValueMenuManagement from '../visualUI/commands/variable_value_menu';\nimport * as CodeParser from '../visualUI/commands/generic_expression';\n\nfunction parseBoolean (var_value, dimensions) {\n if (dimensions == 0)\n return var_value == LocalizedStrings.getUI(\"logic_value_true\");\n if (dimensions == 1) {\n var final_array = [];\n var_value.forEach(function(el){\n final_array.push(el == LocalizedStrings.getUI(\"logic_value_true\"));\n });\n return final_array;\n }\n if (dimensions == 2) {\n var final_array = [];\n var_value.forEach(function(row){\n var temp = [];\n row.forEach(function(el){\n temp.push(el == LocalizedStrings.getUI(\"logic_value_true\"));\n });\n final_array.push(temp);\n });\n return final_array;\n }\n}\n\nfunction parseGlobal (global_obj) {\n\n var new_global = new Models.Variable(\n global_obj.type, \n global_obj.name, \n global_obj.value);\n \n new_global.is_constant = global_obj.is_const;\n new_global.columns = global_obj.columns;\n new_global.dimensions = global_obj.dimension;\n new_global.rows = global_obj.rows;\n\n if (global_obj.type == \"boolean\")\n new_global.value = parseBoolean(global_obj.value, global_obj.dimension);\n\t\n\twindow.program_obj.addGlobal(new_global);\n}\n\nfunction parseParameter (parameter_obj) {\n\n const new_parameter = new Models.Variable(\n parameter_obj.type,\n parameter_obj.name,\n null,\n parameter_obj.dimension,\n parameter_obj.is_const,\n parameter_obj.rows,\n parameter_obj.columns,\n parameter_obj.reference\n );\n\n new_parameter.value = parameter_obj.value;\n\n if (parameter_obj.type == \"boolean\" && parameter_obj.value)\n new_parameter.value = parseBoolean(parameter_obj.value, parameter_obj.dimension);\n\n return new_parameter;\n}\n\nfunction parseFunction (function_obj) {\n\n const new_function = new Models.Function(\n function_obj.name, \n function_obj.return_type, \n function_obj.return_dimensions, \n [], \n false, \n false, \n []);\n \n if (!new_function.name) {\n new_function.name = LocalizedStrings.getUI(\"start\");\n new_function.is_main = true;\n }\n\n if (function_obj.parameters_list) {\n function_obj.parameters_list.forEach(function(el){\n new_function.parameters_list.push(parseParameter(el));\n });\n }\n\n if (function_obj.variables_list) {\n function_obj.variables_list.forEach(function(el){\n new_function.variables_list.push(parseParameter(el));\n });\n }\n\n window.program_obj.addFunction(new_function);\n \n}\n\nexport function parserCodeVisual (code_obj = null) {\n\n window.conteudo = code_obj\n\n // Globals:\n window.program_obj.globals = [];\n code_obj.globals.forEach(parseGlobal);\n\n // Functions:\n window.program_obj.functions = [];\n code_obj.functions.forEach(parseFunction);\n\n // Commands: \n window.program_obj.functions.forEach(function(preparedFunction) {\n code_obj.functions.forEach(function(rawFunction) {\n if ((preparedFunction.name == rawFunction.name) \n || \n (!rawFunction.name && preparedFunction.name == LocalizedStrings.getUI(\"start\"))) {\n preparedFunction.commands = parseCommands(rawFunction.commands, preparedFunction);\n }\n })\n });\n\n}\n\nfunction parseCommands (commands_block, function_obj) {\n\n if (Array.isArray(commands_block)) {\n var temp = [];\n commands_block.forEach(function(command) {\n temp.push(parseCommands(command, function_obj));\n });\n return temp;\n }\n else {\n switch (commands_block.type) {\n case Models.COMMAND_TYPES.reader:\n return parseReader(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.return:\n return parseReturn(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.writer:\n return parseWriter(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.break:\n return parseBreak(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.comment:\n return parseComment(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.attribution:\n return parseAttribution(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.functioncall:\n return parseFunctionCall(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.iftrue:\n return parseIfTrue(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.repeatNtimes:\n return parseRepeatNTimes(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.whiletrue:\n return parseWhileTrue(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.dowhiletrue:\n return parseDoWhileTrue(commands_block, function_obj);\n\n case Models.COMMAND_TYPES.switch:\n return parseSwitch(commands_block, function_obj);\n }\n return null;\n }\n \n}\n\nfunction parseReader (command, function_obj) {\n var temp = CodeParser.expressionParserCodeVisual(command.variable, function_obj);\n\n if (Array.isArray(temp) && temp[0])\n temp = temp[0];\n\n return new Models.Reader(\n temp\n );\n}\n\nfunction parseReturn (command, function_obj) {\n\n var temp = CodeParser.expressionParserCodeVisual(command.expression, function_obj);\n\n return new Models.Return(\n temp\n );\n\n}\n\nfunction parseWriter (command, function_obj) {\n\n var temp = CodeParser.expressionParserCodeVisual(command.content[0], function_obj);\n\n return new Models.Writer(\n temp,\n command.newLine\n );\n}\n\nfunction parseBreak (command, function_obj) {\n return new Models.Break();\n}\n\nfunction parseAttribution (command, function_obj) {\n\n var variable = CodeParser.expressionParserCodeVisual(command.variable, function_obj);\n var expression = CodeParser.expressionParserCodeVisual(command.expression, function_obj);\n\n if (Array.isArray(variable)) \n variable = variable[0];\n\n return new Models.Attribution(\n variable,\n expression\n );\n}\n\nfunction parseComment (command, function_obj) {\n // TODO\n return new Models.Comment(\n null\n );\n}\n\nfunction parseFunctionCall (command, function_obj) {\n\n var parameters = [];\n if (command.parameters_list) {\n command.parameters_list.forEach(function(el) {\n var temp = CodeParser.expressionParserCodeVisual(el, function_obj);\n if (temp.content === 0) temp.content = \"0\";\n parameters.push(temp[0]);\n });\n }\n\n var function_called = CodeParser.searchFunction(command.name);\n\n var temp = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_function, null, null, null, false);\n temp.function_called = function_called;\n temp.parameters_list = parameters;\n \n return new Models.FunctionCall(\n temp, \n null\n );\n}\n\nfunction parseIfTrue(command, function_obj) {\n\n var expression = CodeParser.expressionParserCodeVisual(command.expression, function_obj);\n var ifTrueBlock = parseCommands(command.ifTrue, function_obj);\n var ifFalseBlock = parseCommands(command.ifFalse, function_obj);\n\n return new Models.IfTrue(expression, ifTrueBlock, ifFalseBlock);\n\n}\n\nfunction parseRepeatNTimes(command, function_obj) {\n\n var var_attribution = CodeParser.expressionParserCodeVisual(command.var_attribution, function_obj);\n var_attribution = var_attribution[0];\n\n var expression1 = CodeParser.expressionParserCodeVisual(command.var_initial, function_obj);\n expression1 = expression1[0];\n\n var expression2 = CodeParser.expressionParserCodeVisual(command.condition, function_obj);\n\n if (expression2[0].item == 'minus') {\n expression2 = expression2[1];\n expression2.content *= -1;\n } else\n expression2 = expression2[0];\n\n var var_step = CodeParser.expressionParserCodeVisual(command.step_expression, function_obj);\n\n var commands_block = parseCommands(command.commands, function_obj);\n\n var operator = command.step_expression[0].value == '+' \n ? Models.ARITHMETIC_TYPES.plus\n : Models.ARITHMETIC_TYPES.minus;\n\n var expression3 = new Models.ExpressionElement(\n Models.EXPRESSION_ELEMENTS.exp_op_exp, \n [ \n null,\n operator, \n var_step[1]\n ]);\n\n return new Models.RepeatNTimes(\n var_attribution,\n new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false),\n expression1,\n expression2,\n expression3, \n commands_block);\n\n}\n\nfunction parseWhileTrue (command, function_obj) {\n\n var expression = CodeParser.expressionParserCodeVisual(command.expression, function_obj);\n var commands = parseCommands(command.commands, function_obj);\n\n return new Models.WhileTrue(\n expression, \n commands\n );\n}\n\nfunction parseDoWhileTrue (command, function_obj) {\n \n var expression = CodeParser.expressionParserCodeVisual(command.expression, function_obj);\n var commands = parseCommands(command.commands, function_obj);\n\n return new Models.DoWhileTrue(\n expression, \n commands\n );\n}\n\nfunction parseSwitch (command, function_obj) {\n\n var expression = CodeParser.expressionParserCodeVisual(command.expression, function_obj);\n\n var sc = [];\n if (command.cases) {\n command.cases.forEach(function(case_el) {\n\n var temp_exp = CodeParser.expressionParserCodeVisual(case_el.expression, function_obj);\n var temp_commands = parseCommands(case_el.commands, function_obj);\n var temp_case = new Models.SwitchCase(temp_exp[0], temp_commands);\n\n sc.push(temp_case);\n })\n }\n\n\treturn new Models.Switch(\n expression[0], \n sc\n );\n}\n","export function processData () {\n const folderInput = document.querySelector(\"#folder\");\n const header = [\n \"submissionid\",\n \"file\",\n \"filesize\",\n \"timestamp\",\n \"humandate\",\n \"grade\",\n \"userid\",\n \"exerciseid\",\n ];\n\n function generateSubCode (algorithmInIlm) {\n window.program_obj.functions = JSON.parse(algorithmInIlm).functions;\n window.program_obj.globals = JSON.parse(algorithmInIlm).globals;\n return window.ivprogCore.generateCode();\n }\n\n function prepareData (map, submission) {\n if (!submission) {\n return map;\n }\n const exercID = submission[\"exerciseid\"];\n const studentID = submission[\"userid\"];\n let exercMap = null;\n if (map.has(exercID)) {\n exercMap = map.get(exercID);\n } else {\n exercMap = new Map();\n map.set(exercID, exercMap);\n }\n if (exercMap.has(studentID)) {\n exercMap.get(studentID).push(submission);\n } else {\n exercMap.set(studentID, [submission]);\n }\n return map;\n }\n\n folderInput.addEventListener(\"change\", async () => {\n const files = Array.from(folderInput.files);\n const idx = files.find((f) => f.name == \"index.csv\");\n const folderName = idx.webkitRelativePath.replace(idx.name, \"\");\n //console.debug(idx);\n //console.debug(folderName);\n const data = await idx.text();\n //console.debug(data);\n const csvEntries = data\n .split(\"\\n\")\n .slice(1)\n .filter((line) => line.length > 0)\n .map((line) => line.split(\",\"))\n .map((vec) => {\n const obj = {};\n vec.forEach((val, i) => (obj[header[i]] = val));\n return obj;\n });\n //console.debug(csvEntries);\n const blockExercMap = csvEntries.reduce(prepareData, new Map());\n //console.log(Array.from(blockExercMatrix.entries()));\n const getFilePath = async function (submission) {\n const path = `${folderName}${submission[\"file\"]}`;\n const file = files.find((f) => f.webkitRelativePath == path);\n const text = await file.text();\n return text;\n };\n const matrix = {};\n let counter = 0;\n blockExercMap.forEach((studentsMap, exercID) => {\n const column = [];\n studentsMap.forEach(async (submissions, studentID) => {\n submissions = submissions.sort((a, b) => {\n return parseInt(a[\"timestamp\"]) - parseInt(b[\"timestamp\"]);\n });\n counter++;\n submissions.forEach(async (submission, index, array) => {\n counter++;\n const student = {};\n student[\"grade\"] = Math.max(0, parseFloat(submission[\"grade\"]));\n student[\"timestamp\"] = parseInt(submission[\"timestamp\"]);\n student[\"student_id\"] = studentID;\n student[\"TES\"] = 0;\n student[\"DES\"] = 0;\n student[\"D/T\"] = 0;\n let previousCode = \"\";\n if (index > 0) {\n student[\"TES\"] =\n parseInt(submission[\"timestamp\"]) -\n parseInt(array[index - 1][\"timestamp\"]);\n const previousFile = await getFilePath(array[index - 1]);\n const previous = window.ivprogCore\n .prepareActivityToStudentHelper(previousFile)\n .getOrElse(1);\n if (previous == 1) {\n console.error(\n `A submission from ${studentID} to ${exercID} is invalid`\n );\n return;\n }\n previousCode = generateSubCode(previous.algorithmInIlm);\n }\n const currentFile = await getFilePath(submission);\n const current = window.ivprogCore\n .prepareActivityToStudentHelper(currentFile)\n .getOrElse(2);\n if (current == 2) {\n console.error(\n `A submission from ${studentID} to ${exercID} is invalid`\n );\n return;\n }\n const currentCode = generateSubCode(current.algorithmInIlm);\n if (previousCode === \"\") {\n const logs = JSON.parse(currentFile.split(\"::logs::\")[1]);\n const event = logs[0];\n if (event == null) {\n // empty submission\n student[\"TES\"] = 0;\n } else if (event.length === 4) {\n student[\"TES\"] =\n parseInt(submission[\"timestamp\"]) -\n Math.floor(parseInt(event[2]) / 1000);\n } else {\n student[\"TES\"] =\n parseInt(submission[\"timestamp\"]) -\n Math.floor(parseInt(event[1]) / 1000);\n }\n }\n student[\"DES\"] = window.ivprogCore.levenshteinDistance(\n previousCode,\n currentCode\n );\n const ratio =\n student[\"TES\"] === 0 ? 0 : student[\"DES\"] / student[\"TES\"];\n student[\"D/T\"] = isNaN(ratio) ? 0 : ratio;\n column.push(student);\n counter--;\n });\n counter--;\n });\n matrix[exercID] = column;\n });\n function download (file, text) {\n //creating an invisible element\n const element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", file);\n element.innerHTML = file;\n element.classList.add(\"ui\", \"primary\", \"button\");\n\n // Above code is equivalent to\n // <a href=\"path of file\" download=\"file name\">\n\n document.querySelector(\"#downloads\").appendChild(element);\n }\n function getExercHeader (id) {\n const props = [\"TES\", \"DES\", \"grade\", \"D/T\", \"timestamp\"];\n return props.reduce((acc, prop) => acc + `${id}_${prop},`, \"\");\n }\n const id = setInterval(() => {\n if (counter == 0) {\n clearInterval(id);\n for (const exercID in matrix) {\n let csv = \"\";\n let firstLine = \"student_id,\";\n firstLine += getExercHeader(exercID);\n for (const submission of matrix[exercID]) {\n csv += `${submission[\"student_id\"]},`;\n csv += `${submission[\"TES\"]},`;\n csv += `${submission[\"DES\"]},`;\n csv += `${submission[\"grade\"]},`;\n csv += `${submission[\"D/T\"]},`;\n csv += `${submission[\"timestamp\"]}`;\n csv += \"\\n\";\n }\n download(`${exercID}.csv`, `${firstLine}\\n${csv}`);\n }\n }\n }, 1000);\n });\n}\n","import { getCodeEditorModeConfig } from \"./utils\";\n\n/**\n * Source: https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/clike/clike.js\n * @author arijn Haverbeke and others\n * @author Lucas de Souza\n * @param {CodeMirror} CodeMirror \n */\nexport function CodeEditorMode (CodeMirror) {\n \"use strict\";\n\n function Context(indented, column, type, info, align, prev) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.info = info;\n this.align = align;\n this.prev = prev;\n }\n\n function pushContext(state, col, type, info) {\n let indent = state.indented;\n if (state.context && state.context.type == \"statement\" && type != \"statement\")\n indent = state.context.indented;\n return state.context = new Context(indent, col, type, info, null, state.context);\n }\n \n function popContext(state) {\n const t = state.context.type;\n if (t == \")\" || t == \"]\" || t == \"}\")\n state.indented = state.context.indented;\n return state.context = state.context.prev;\n }\n\n function typeBefore(stream, state, pos) {\n if (state.prevToken == \"variable\" || state.prevToken == \"type\") return true;\n if (/\\S(?:[^- ]>|[*\\]])\\s*$|\\*$/.test(stream.string.slice(0, pos))) return true;\n if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;\n }\n\n function isTopScope(context) {\n for (; ;) {\n if (!context || context.type == \"top\") return true;\n if (context.type == \"}\" && context.prev.info != \"namespace\") return false;\n context = context.prev;\n }\n }\n\n function contains(words, word) {\n if (typeof words === \"function\") {\n return words(word);\n } else {\n return Object.propertyIsEnumerable.call(words, word);\n }\n }\n\n function tokenComment(stream, state) {\n let maybeEnd = false, ch;\n while ((ch = stream.next())) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return \"comment\";\n }\n\n CodeMirror.defineMode(\"ivprog\", function (config, parserConfig) {\n const indentUnit = config.indentUnit,\n statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n dontAlignCalls = parserConfig.dontAlignCalls,\n keywords = parserConfig.keywords || {},\n switchKeyword = parserConfig.switchKeyword,\n caseKeyword = parserConfig.caseKeyword,\n defaultKeyword = parserConfig.defaultKeyword,\n caseRegex = new RegExp(`^\\\\s*(?:${caseKeyword} .*?:|${defaultKeyword}:|\\\\{\\\\}?|\\\\})$`),////,\n types = parserConfig.types || {},\n builtin = parserConfig.builtin || {},\n blockKeywords = parserConfig.blockKeywords || {},\n defKeywords = parserConfig.defKeywords || {},\n atoms = parserConfig.atoms || {},\n hooks = parserConfig.hooks || {},\n multiLineStrings = parserConfig.multiLineStrings,\n indentStatements = false,\n namespaceSeparator = null,\n isPunctuationChar = /[[\\]{}(),;:\\n]/,\n numberStart = /[\\d.]/,\n number = /^(?:0x[a-f\\d]+|0b[01]+|(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?)$/i,\n isOperatorChar = /[+\\-*%=<>!/&]/,\n isIdentifierChar = /[a-zA-Z0-9_]/,\n // An optional function that takes a {string} token and returns true if it\n // should be treated as a builtin.\n isReservedIdentifier = parserConfig.isReservedIdentifier || false;\n\n let curPunc, isDefKeyword;\n let tokenString = function () { /*SKIP*/};\n function tokenBase(stream, state) {\n const ch = stream.next();\n if (hooks[ch]) {\n const result = hooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == '\"') {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n if (isPunctuationChar.test(ch)) {\n curPunc = ch;\n return null;\n }\n if (numberStart.test(ch)) {\n stream.backUp(1)\n if (stream.match(number)) return \"number\"\n stream.next()\n }\n if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return \"comment\";\n }\n }\n if (isOperatorChar.test(ch)) {\n while (!stream.match(/^\\/[/*]/, false) && stream.eat(isOperatorChar)) { /* SKIP */}\n return \"operator\";\n }\n stream.eatWhile(isIdentifierChar);\n if (namespaceSeparator) while (stream.match(namespaceSeparator))\n stream.eatWhile(isIdentifierChar);\n\n const cur = stream.current();\n if (contains(keywords, cur)) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n if (contains(defKeywords, cur)) isDefKeyword = true;\n return \"keyword\";\n }\n if (contains(types, cur)) return \"type\";\n if (contains(builtin, cur)\n || (isReservedIdentifier && isReservedIdentifier(cur))) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n return \"builtin\";\n }\n if (contains(atoms, cur)) return \"atom\";\n return \"variable\";\n }\n\n tokenString = function (quote) {\n return function (stream, state) {\n let escaped = false, next, end = false;\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) { end = true; break; }\n escaped = !escaped && next == \"\\\\\";\n }\n if (end || !(escaped || multiLineStrings))\n state.tokenize = null;\n return \"string\";\n };\n }\n\n function maybeEOL(stream, state) {\n if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))\n state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)\n }\n\n // Interface\n\n return {\n startState: function (basecolumn) {\n return {\n tokenize: null,\n context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", null, false),\n indented: 0,\n startOfLine: true,\n prevToken: null\n };\n },\n\n token: function (stream, state) {\n let ctx = state.context;\n if (stream.sol()) {\n if (ctx.align == null) ctx.align = false;\n state.indented = stream.indentation();\n state.startOfLine = true;\n }\n if (stream.eatSpace()) { maybeEOL(stream, state); return null; }\n curPunc = isDefKeyword = null;\n let style = (state.tokenize || tokenBase)(stream, state);\n if (style == \"comment\" || style == \"meta\") return style;\n if (ctx.align == null) ctx.align = true;\n\n if (curPunc == \";\" || curPunc == \":\" || (curPunc == \",\" && stream.match(/^\\s*(?:\\/\\/.*)?$/, false)))\n while (state.context.type == \"statement\") popContext(state);\n else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n else if (curPunc == \"}\") {\n while (ctx.type == \"statement\") ctx = popContext(state);\n if (ctx.type == \"}\") ctx = popContext(state);\n while (ctx.type == \"statement\") ctx = popContext(state);\n }\n else if (curPunc == ctx.type) popContext(state);\n else if (indentStatements &&\n (((ctx.type == \"}\" || ctx.type == \"top\") && curPunc != \";\") ||\n (ctx.type == \"statement\" && curPunc == \"newstatement\"))) {\n pushContext(state, stream.column(), \"statement\", stream.current());\n }\n\n if (style == \"variable\" &&\n ((state.prevToken == \"def\" ||\n (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&\n isTopScope(state.context) && stream.match(/^\\s*\\(/, false)))))\n style = \"def\";\n\n if (hooks.token) {\n const result = hooks.token(stream, state, style);\n if (result !== undefined) style = result;\n }\n\n if (style == \"def\" && parserConfig.styleDefs === false) style = \"variable\";\n\n state.startOfLine = false;\n state.prevToken = isDefKeyword ? \"def\" : style || curPunc;\n maybeEOL(stream, state);\n return style;\n },\n\n indent: function (state, textAfter) {\n if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;\n let ctx = state.context;\n const firstChar = textAfter && textAfter.charAt(0)\n const closing = firstChar == ctx.type;\n if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n if (parserConfig.dontIndentStatements)\n while (ctx.type == \"statement\" && parserConfig.dontIndentStatements.test(ctx.info))\n ctx = ctx.prev\n if (hooks.indent) {\n const hook = hooks.indent(state, ctx, textAfter, indentUnit);\n if (typeof hook == \"number\") return hook\n }\n const switchBlock = ctx.prev && ctx.prev.info == switchKeyword;\n if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {\n while (ctx.type != \"top\" && ctx.type != \"}\") ctx = ctx.prev\n return ctx.indented\n }\n if (ctx.type == \"statement\")\n return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n if (ctx.align && (!dontAlignCalls || ctx.type != \")\"))\n return ctx.column + (closing ? 0 : 1);\n if (ctx.type == \")\" && !closing)\n return ctx.indented + statementIndentUnit;\n const caseTestRegex = new RegExp(`^(?:${caseKeyword}|${defaultKeyword})\\b`)\n return ctx.indented + (closing ? 0 : indentUnit) +\n (!closing && switchBlock && !caseTestRegex.test(textAfter) ? indentUnit : 0);\n },\n\n electricInput: caseRegex,\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: \"//\",\n fold: \"brace\"\n };\n });\n\n function words(str) {\n const obj = {}, words = str.split(\" \");\n for (let i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n \n const codeConfig = getCodeEditorModeConfig();\n\n const ivprogKeywords = codeConfig.keywords.join(\" \");\n\n const basicTypes = words(codeConfig.types.join(\" \"));\n\n function ivprogTypes(identifier) {\n return contains(basicTypes, identifier);\n }\n\n const ivprogBlockKeywords = codeConfig.blocks.join(\" \");\n const ivprogDefKeywords = \"funcao const\";\n\n function def(mimes, mode) {\n if (typeof mimes == \"string\") mimes = [mimes];\n const words = [];\n function add(obj) {\n if (obj) {\n for (const prop in obj) if (Object.hasOwnProperty.call(obj, prop)) {\n words.push(prop);\n }\n }\n }\n add(mode.keywords);\n add(mode.types);\n add(mode.builtin);\n add(mode.atoms);\n if (words.length) {\n mode.helperType = mimes[0];\n CodeMirror.registerHelper(\"hintWords\", mimes[0], words);\n }\n\n for (let i = 0; i < mimes.length; ++i)\n CodeMirror.defineMIME(mimes[i], mode);\n }\n \n def([\"text/x-ivprog\"], {\n name: \"ivprog\",\n keywords: words(ivprogKeywords),\n types: ivprogTypes,\n blockKeywords: words(ivprogBlockKeywords),\n defKeywords: words(ivprogDefKeywords),\n typeFirstDefinitions: true,\n atoms: words(codeConfig.atoms.join(\" \")),\n switchKeyword: codeConfig.switchString,\n caseKeyword: codeConfig.case_default[0],\n defaultKeyword: codeConfig.case_default[1],\n modeProps: { fold: [\"brace\"] }\n });\n\n}\n","import { setTestCases, getTestCases } from \"../visualUI/functions\";\nimport { generate } from \"../visualUI/code_generator\";\nimport { IVProgAssessment } from \"../assessment/ivprogAssessment\";\nimport { TestConsole } from \"./testConsole\";\nimport { parseLogs } from \"./../services/userLog\";\nimport { SemanticAnalyser } from \"../processor/semantic/semanticAnalyser\";\nimport { Maybe } from \"./maybe\";\nimport { parserCodeVisual } from \"./codeParser\";\n\nfunction parseActivityData (data, ignore_logs=false) {\n let algorithm_in_ilm = null;\n if (data.split(\"\\n::algorithm::\")[1]) {\n algorithm_in_ilm = data.split(\"\\n::algorithm::\")[1].split(\"\\n::logs::\")[0];\n const logs = data.split(\"\\n::algorithm::\")[1].split(\"\\n::logs::\")[1];\n if (logs != null && ignore_logs == false) {\n parseLogs(logs);\n }\n }\n let content;\n try {\n content = JSON.parse(data.split(\"\\n::algorithm::\")[0]);\n content[\"algorithm_in_ilm\"] = algorithm_in_ilm;\n } catch (e) {\n console.error(e);\n return Maybe.none();\n }\n return Maybe.some(content);\n}\n\nfunction configAuxiliar (obj_config) {\n\n return new Map(\n Object\n .keys(obj_config)\n .map(\n key => [key, obj_config[key]]\n )\n )\n}\n \nfunction setActivityConfig (config_json) {\n\n ivprogCore.Config.activity_commands = configAuxiliar(config_json.commands);\n ivprogCore.Config.activity_functions = configAuxiliar(config_json.functions);\n ivprogCore.Config.activity_datatypes = configAuxiliar(config_json.datatypes);\n ivprogCore.Config.activity_filter = configAuxiliar(config_json.filter);\n ivprogCore.Config.activity_programming_type = configAuxiliar(config_json.programming);\n\n}\n\nexport function setPreviousAlgorithm (code) {\n \n var code_obj = null;\n try {\n code_obj = ivprogCore.parseCode(code)\n parserCodeVisual(code_obj)\n }\n catch(e) {\n showInvalidData()\n console.log(e)\n return\n }\n}\n\nexport function prepareActivityToStudentHelperJSON (ilm_cont) {\n \n setTestCases(ilm_cont.test_cases)\n\n setActivityConfig(ilm_cont.settings)\n\n if (ilm_cont.code)\n setPreviousAlgorithm(ilm_cont.code)\n else \n if (ilm_cont.algorithm)\n setPreviousAlgorithm(ilm_cont.algorithm)\n\n}\n\nexport function prepareActivityToStudentHelper (ilm_cont, ignore_logs=false) {\n const maybe_content = parseActivityData(ilm_cont, ignore_logs);\n return maybe_content.map((content) => {\n const testCases = content.testcases;\n setTestCases(testCases);\n\n let prog_type = null;\n if (content.settings_programming_type) {\n prog_type = content.settings_programming_type[0].value;\n } else {\n prog_type = \"visual\";\n }\n\n return {\n settingsProgrammingType: prog_type,\n settingsDataTypes: content.settings_data_types,\n settingsCommands: content.settings_commands,\n settingsFunctions: content.settings_functions,\n algorithmInIlm: content.algorithm_in_ilm,\n settingsFilter: content.settings_filter,\n };\n });\n}\n\nfunction compareArray (a, b) {\n for (let i = 0; i < a.length; ++i) {\n const elementA = a[i];\n const elementB = b[i];\n if (elementA != elementB) {\n return false;\n }\n }\n return true;\n}\n\nfunction compareTestcases (original, student) {\n if (original.length != student.length) {\n return false;\n }\n for (let i = 0; i < original.length; ++i) {\n const elementO = original[i];\n const elementS = student[i];\n if (!compareArray(elementO.input, elementS.input)) {\n return false;\n }\n if (!compareArray(elementO.output, elementS.output)) {\n return false;\n }\n }\n return true;\n}\n\nexport function autoEval (originalData, callback) {\n const code = generate();\n //console.debug(code);\n const original = parseActivityData(originalData).getOrElse(undefined);\n if (original == null) {\n alert(\"iAssign did not provide the original activity data!\");\n return callback(null);\n }\n if (code == null) {\n return callback(-1); // @FeedbackConvention Casos de teste vazios\n } else {\n if (!compareTestcases(original.testcases, getTestCases())) {\n return callback(-2); // @FeedbackConvention Casos de teste alterados pelo aluno\n }\n try {\n const ast_code = SemanticAnalyser.analyseFromSource(code);\n const con = new TestConsole([]);\n const autoAssessment = new IVProgAssessment(\n ast_code,\n original.testcases,\n con\n );\n autoAssessment\n .runTest()\n .then((grade) => callback(grade))\n .catch((err) => {\n console.log(err);\n callback(-5); // @FeedbackConvention Falha na execução\n });\n } catch (e) {\n console.error(e);\n callback(-5);\n }\n }\n}\n","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputTest extends Input {\n\n constructor (inputList) {\n super();\n this.index = 0;\n this.inputList = inputList;\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.inputList.length) { \n resolve(this.inputList[this.index]);\n this.index++;\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n}","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputAssessment extends Input {\n\n constructor (input_list) {\n super();\n this.index = 0;\n this.input_list = input_list.map((val) => {\n return {\"value\": val, \"read\": false};\n });\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.input_list.length) {\n const input = this.input_list[this.index];\n input.read = true;\n this.index += 1;\n resolve(input.value);\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n\n isInputAvailable () {\n return this.index < this.input_list.length;\n }\n}","import { Output } from \"./../io/output\";\n\nexport class OutputTest extends Output {\n constructor () {\n super();\n this.list = [];\n this.currentLine = null;\n }\n\n write (text, newLine = false) {\n if (this.currentLine == null) {\n this.currentLine = this.list.push(\"\") - 1;\n }\n\n this.list[this.currentLine] += text;\n if (newLine) {\n this.currentLine = null;\n }\n }\n\n sendOutput (text) {\n const output = \"\" + text;\n if (output.indexOf(\"\\n\") !== -1) {\n const outputList = output.split(\"\\n\");\n const last = outputList.pop();\n outputList.forEach((t) => {\n //t = t.replace(/\\t/g, '  ');\n //t = t.replace(/\\s/g, \" \");\n if (t.length == 0) this.currentLine = null;\n else this.write(t, true);\n });\n //last = last.replace(/\\t/g, '  ');\n //last = last.replace(/\\s/g, \" \");\n if (last.length != 0) this.write(last);\n } else {\n //output = output.replace(/\\t/g, '  ');\n //output = output.replace(/\\s/g, \" \");\n this.write(output);\n }\n }\n}\n","import { IVProgParser } from \"../ast/ivprogParser\";\nimport * as Expressions from \"../ast/expressions\";\nimport { Types } from \"../typeSystem/types\";\nimport { convertBoolToString } from \"../typeSystem/parsers\";\nimport * as Commands from \"../ast/commands\";\nimport { ArrayType } from \"../typeSystem/array_type\";\nimport { Literal } from \"../ast/expressions/literal\";\n\nconst TYPES = {\n VARIABLE: \"var\",\n CONST: \"const\",\n FUNCTION: \"function\",\n RELATIONAL: \"relational\",\n LOGIC: \"logic\",\n ARITHMETIC: \"arithmetic\",\n};\n\nfunction translateOp (type, op) {\n switch (type) {\n case TYPES.ARITHMETIC:\n return op.value;\n case TYPES.RELATIONAL:\n return op.value;\n case TYPES.LOGIC: {\n if (op.ord === 11) {\n return \"and\";\n } else if (op.ord === 12) {\n return \"or\";\n } else {\n return \"not\";\n }\n }\n }\n}\n\nfunction getOpType (op) {\n switch (op.ord) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n return TYPES.ARITHMETIC;\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n return TYPES.RELATIONAL;\n default:\n return TYPES.LOGIC;\n }\n}\n\n/**\n * @param {Commands.Case} switchCase\n * */\nfunction switchCaseWalker (switchCase) {\n const commands = switchCase.commands.map(commandWalker);\n const expression = switchCase.isDefault\n ? null\n : expressionWalker(switchCase.expression);\n return {\n type: \"switchcase\",\n line: switchCase.sourceInfo.line,\n expression,\n commands,\n };\n}\n\n/**\n * @param {Commands.Switch} switchCommand\n * */\nfunction switchWalker (switchCommand) {\n const expression = expressionWalker(switchCommand.expression);\n const cases = switchCommand.cases.map(switchCaseWalker);\n return {\n type: \"switch\",\n expression,\n cases,\n };\n}\n\n/**\n * @param {Commands.Return} returnCommand\n * */\nfunction returnWalker (returnCommand) {\n const expression = expressionWalker(returnCommand.expression);\n return {\n type: \"return\",\n expression,\n };\n}\n\nfunction breakWalker (_) {\n return { type: \"break\" };\n}\n\n/**\n * @param {Commands.For} forLoop\n * */\nfunction forWalker (forLoop) {\n const var_attribution = expressionWalker(forLoop.for_id);\n const var_initial = expressionWalker(forLoop.for_from);\n const condition = expressionWalker(forLoop.for_to);\n const step_expression = forLoop.for_pass\n ? expressionWalker(forLoop.for_pass)\n : [];\n const commands = forLoop.commands.map(commandWalker);\n return {\n type: \"repeatNtimes\",\n var_attribution,\n var_initial,\n condition,\n step_expression,\n commands,\n };\n}\n\n/**\n * @param {Commands.While} whileLoop\n * */\nfunction whileWalker (whileLoop) {\n const expression = expressionWalker(whileLoop.expression);\n const commands = whileLoop.commands.map(commandWalker);\n let type = whileLoop.testFirst ? \"whiletrue\" : \"dowhiletrue\";\n return {\n type,\n expression,\n commands,\n };\n}\n\n/**\n * @param {Commands.IfThenElse} ifthenelse\n * */\nfunction ifThenElseWalker (ifthenelse) {\n //ifthenelse.\n const expression = expressionWalker(ifthenelse.condition);\n const ifTrue = ifthenelse.ifTrue.commands.map(commandWalker);\n let ifFalse = [];\n if (ifthenelse.ifFalse) {\n if (ifthenelse.ifFalse instanceof Commands.CommandBlock) {\n ifFalse = ifthenelse.ifFalse.commands.map(commandWalker);\n } else {\n ifFalse = [ifThenElseWalker(ifthenelse.ifFalse)];\n }\n }\n return {\n type: \"iftrue\",\n expression,\n ifTrue,\n ifFalse,\n };\n}\n\n/**\n * @param {Commands.Assign} assingment\n * */\nfunction assignmentWalker (assingment) {\n let variable = null;\n if (assingment instanceof Commands.ArrayIndexAssign) {\n const line = expressionWalker(assingment.line);\n let arrayClass = \"vector\";\n let column = null;\n if (assingment.column) {\n arrayClass = \"matrix\";\n column = expressionWalker(assingment.column);\n }\n variable = [\n {\n instance: \"expression\",\n type: TYPES.VARIABLE,\n class: arrayClass,\n column: column,\n line: line,\n value: assingment.id,\n },\n ];\n } else {\n variable = [\n { instance: \"expression\", type: TYPES.VARIABLE, value: assingment.id },\n ];\n }\n const expression = expressionWalker(assingment.expression);\n return {\n type: \"attribution\",\n variable,\n expression,\n };\n}\n\n/**\n * @param {Command} command\n * */\nfunction commandWalker (command) {\n let parsedCommand = null;\n if (command instanceof Commands.FunctionCall) {\n parsedCommand = functionCallWalker(command);\n } else if (command instanceof Commands.Assign) {\n parsedCommand = assignmentWalker(command);\n } else if (command instanceof Commands.IfThenElse) {\n parsedCommand = ifThenElseWalker(command);\n } else if (command instanceof Commands.While) {\n parsedCommand = whileWalker(command);\n } else if (command instanceof Commands.Break) {\n parsedCommand = breakWalker(command);\n } else if (command instanceof Commands.Return) {\n parsedCommand = returnWalker(command);\n } else if (command instanceof Commands.Switch) {\n parsedCommand = switchWalker(command);\n } else if (command instanceof Commands.For) {\n parsedCommand = forWalker(command);\n } else {\n throw new Error(\"not implemented\");\n }\n parsedCommand.line = command.sourceInfo.line;\n return parsedCommand;\n}\n\n/**\n * @param {Commands.FunctionCall} functionCall\n * */\nfunction functionCallWalker (functionCall) {\n let name = functionCall.id;\n if (name.indexOf(\".\") !== -1) {\n name = name.split(\".\")[1];\n }\n const parameters = functionCall.actualParameters.map(expressionWalker);\n if (name === \"$write\") {\n const lastInput = parameters[parameters.length - 1][0];\n // if lastInput is an object with value === '\\n', newLine is true\n const newLine = lastInput.value && lastInput.value.match(/^\\n$/) !== null;\n const content = newLine\n ? parameters.slice(0, parameters.length - 1)\n : parameters;\n return {\n type: \"writer\",\n newLine,\n content,\n };\n }\n if (name === \"$read\") {\n return {\n type: \"reader\",\n variable: parameters[0],\n };\n }\n return {\n type: \"functioncall\",\n parameters_list: parameters,\n name: functionCall.id,\n };\n}\n/**\n * @param {Commands.Function} func\n * */\nfunction functionWalker (func) {\n const funcDeclaration = {\n name: func.name,\n line: func.sourceInfo.line,\n return_type: \"\",\n return_dimensions: 0,\n parameters_list: [],\n variables_list: [],\n commands: [],\n };\n if (func.returnType instanceof ArrayType) {\n funcDeclaration.return_type = func.returnType.innerType.value;\n funcDeclaration.return_dimensions = func.returnType.dimensions;\n } else {\n funcDeclaration.return_type = func.returnType.value;\n }\n funcDeclaration.parameters_list = func.formalParameters.map(\n functionParameterWalker\n );\n funcDeclaration.variables_list = func.variablesDeclarations.map(\n variableDeclarationWalker\n );\n funcDeclaration.commands = func.commands.map(commandWalker);\n return funcDeclaration;\n}\n\n/**\n * @param {Commands.FormalParameter} formalParameter\n * */\nfunction functionParameterWalker (formalParameter) {\n const variable = {\n name: formalParameter.id,\n line: formalParameter.sourceInfo.line,\n type: \"\",\n rows: 0,\n columns: 0,\n dimension: 0,\n value: 0,\n is_const: false,\n reference: formalParameter.byRef,\n };\n if (formalParameter.type instanceof ArrayType) {\n variable.type = formalParameter.type.innerType.value;\n variable.dimension = formalParameter.type.dimensions;\n } else {\n variable.type = formalParameter.type.value;\n }\n return variable;\n}\n\n/**\n * @param {Commands.Declaration} command\n * @param {boolean} global\n * */\nfunction variableDeclarationWalker (command, global = false) {\n const variable = {\n name: command.id,\n line: command.sourceInfo.line,\n type: \"\",\n rows: 0,\n columns: 0,\n dimension: 0,\n value: 0,\n is_const: false,\n };\n variable.is_const = global && command.isConst;\n if (command instanceof Commands.ArrayDeclaration) {\n // array\n const lines = expressionWalker(command.lines).pop();\n variable.type = command.type.innerType.value;\n if (command.isVector) {\n variable.columns = lines.value;\n variable.dimension = 1;\n const values = command.initial.value.map((exp) =>\n variableInitialWalker(exp)\n );\n variable.value = values;\n } else {\n const columns = expressionWalker(command.columns).pop();\n variable.dimension = 2;\n variable.rows = lines.value;\n variable.columns = columns.value;\n const values = command.initial.value.map((rows) =>\n rows.value.map((exp) => variableInitialWalker(exp))\n );\n variable.value = values;\n }\n } else {\n // atomic\n variable.type = command.type.value;\n variable.value = variableInitialWalker(command.initial);\n }\n return variable;\n}\n\n/**\n * @param {any} expression\n * */\nfunction variableInitialWalker (expression) {\n if (expression instanceof Expressions.UnaryApp) {\n const left = variableInitialWalker(expression.left);\n const opType = getOpType(expression.op);\n if (opType !== TYPES.ARITHMETIC) {\n throw new Error(\n \"invalid variable initial value: \" + expression.toString()\n );\n }\n return `${expression.op.value}${left}`;\n } else if (expression instanceof Expressions.BoolLiteral) {\n const value = expression.value;\n return convertBoolToString(value);\n } else if (expression instanceof Literal) {\n let value = expression.value;\n if (expression.value.toNumber) {\n if (\n Types.REAL.isCompatible(expression.type) &&\n expression.value.decimalPlaces() == 0\n ) {\n value = expression.value.toFixed(2);\n } else {\n value = expression.value.toNumber();\n }\n }\n return value;\n }\n throw new Error(\"invalid variable initial value: \" + expression.toString());\n}\n\n/**\n *\n * @return {[]}\n **/\nfunction expressionWalker (expression) {\n let result;\n if (expression instanceof Expressions.VariableLiteral) {\n result = [\n { instance: \"expression\", type: TYPES.VARIABLE, value: expression.id },\n ];\n } else if (expression instanceof Expressions.FunctionCall) {\n const funcObj = {\n instance: \"expression\",\n type: TYPES.FUNCTION,\n value: expression.id,\n };\n const paramsList = expression.actualParameters.map((e) =>\n expressionWalker(e)\n );\n //const params = Array.prototype.concat.apply([], paramsList);\n funcObj.params = paramsList;\n result = [funcObj];\n } else if (expression instanceof Expressions.UnaryApp) {\n console.log(expression);\n const left = expressionWalker(expression.left);\n const opType = getOpType(expression.op);\n const opValue = translateOp(opType, expression.op);\n result = [{ instance: \"operator\", type: opType, value: opValue }, ...left];\n } else if (expression instanceof Expressions.InfixApp) {\n const left = expressionWalker(expression.left);\n const right = expressionWalker(expression.right);\n const opType = getOpType(expression.op);\n const opValue = translateOp(opType, expression.op);\n result = [\n ...left,\n { instance: \"operator\", type: opType, value: opValue },\n ...right,\n ];\n } else if (expression instanceof Expressions.ArrayAccess) {\n const line = expressionWalker(expression.line);\n let arrayClass = \"vector\";\n let column = null;\n if (expression.column) {\n arrayClass = \"matrix\";\n column = expressionWalker(expression.column);\n }\n result = [\n {\n instance: \"expression\",\n type: TYPES.VARIABLE,\n class: arrayClass,\n column: column,\n line: line,\n value: expression.id,\n },\n ];\n } else if (expression instanceof Expressions.BoolLiteral) {\n const value = expression.value;\n result = [\n {\n instance: \"expression\",\n class: \"simple\",\n type: TYPES.CONST,\n value: convertBoolToString(value),\n },\n ];\n } else {\n let value = expression.value;\n if (expression.value.toNumber) {\n if (\n Types.REAL.isCompatible(expression.type) &&\n expression.value.decimalPlaces() == 0\n ) {\n value = expression.value.toFixed(2);\n } else {\n value = expression.value.toNumber();\n }\n }\n result = [\n {\n instance: \"expression\",\n class: \"simple\",\n type: TYPES.CONST,\n value: value,\n },\n ];\n }\n if (expression.parenthesis) return [\"(\", ...result, \")\"];\n else return result;\n}\n\nexport function parseExpression (text) {\n const parser = IVProgParser.createParser(text);\n const expressionAST = parser.parseExpressionOR();\n return expressionWalker(expressionAST);\n}\n\n/**\n * @param {string} text\n * */\nexport function parseCode (text) {\n const parser = IVProgParser.createParser(text, false);\n const codeLinesMap = new Map();\n const tokens = Array.from(parser.lexer.reset(text));\n const tokenStream = [];\n for (const token of tokens) {\n if (token.type === parser.ruleNames.ERROR) {\n return null;\n }\n if (token.type === parser.ruleNames.COMMENTS) {\n for (let i = 0; i <= token.lineBreaks; i++) {\n if (codeLinesMap.has(i + token.line))\n codeLinesMap.get(i + token.line).push(token);\n else codeLinesMap.set(i + token.line, [token]);\n }\n continue;\n }\n if (token.type !== parser.ruleNames.WHITESPACE) {\n tokenStream.push(token);\n }\n }\n parser.fill(tokenStream);\n try {\n const program = parser.parseTree();\n const globals = program.global.map((decl) =>\n variableDeclarationWalker(decl, true)\n );\n const functions = program.functions.map(functionWalker);\n return { globals, functions };\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n","/**\n * Author: @jhchen - https://github.com/jhchen\n * Modified by: @lucascalion - 23/07/2019\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nconst DIFF_DELETE = -1;\nconst DIFF_INSERT = 1;\nconst DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n const editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n let commonlength = diff_commonPrefix(text1, text2);\n const commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n const commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n const diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n return diffs;\n}\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n let diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n const i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)]\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n const text1_length = text1.length;\n const text2_length = text2.length;\n const max_d = Math.ceil((text1_length + text2_length) / 2);\n const v_offset = max_d;\n const v_length = 2 * max_d;\n const v1 = new Array(v_length);\n const v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n const delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n const front = (delta % 2 !== 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n let k1start = 0;\n let k1end = 0;\n let k2start = 0;\n let k2end = 0;\n for (let d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (let k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n const k1_offset = v_offset + k1;\n let x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n let y1 = x1 - k1;\n while (\n x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n const k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n const x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detfrontected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (let k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n const k2_offset = v_offset + k2;\n let x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n let y2 = x2 - k2;\n while (\n x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n const k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n const x1 = v1[k1_offset];\n const y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n}\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n const text1a = text1.substring(0, x);\n const text2a = text2.substring(0, y);\n const text1b = text1.substring(x);\n const text2b = text2.substring(y);\n\n // Compute both diffs serially.\n const diffs = diff_main(text1a, text2a);\n const diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.<string>} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.<string>} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n const seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n let j = -1;\n let best_common = '';\n let best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n const prefixLength = diff_commonPrefix(\n longtext.substring(i), shorttext.substring(j));\n const suffixLength = diff_commonSuffix(\n longtext.substring(0, i), shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(\n j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n const hm1 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n const hm2 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 2));\n let hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n let text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n const mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.\n let pointer = 0;\n let count_delete = 0;\n let count_insert = 0;\n let text_delete = '';\n let text_insert = '';\n let commonlength;\n let previous_equality;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {\n const stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(0, -1);\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n const stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, [DIFF_EQUAL, text_insert.substring(0, commonlength)]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length - commonlength);\n text_delete = text_delete.substring(0, text_delete.length - commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n const n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete], [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n let changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xD800 && charCode <= 0xDBFF;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xDC00 && charCode <= 0xDFFF;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n const ret = [];\n for (let i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after]\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n const oldRange = typeof cursor_pos === 'number' ?\n { index: cursor_pos, length: 0 } : cursor_pos.oldRange;\n const newRange = typeof cursor_pos === 'number' ?\n null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n const oldLength = oldText.length;\n const newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n const oldCursor = oldRange.index;\n const oldBefore = oldText.slice(0, oldCursor);\n const oldAfter = oldText.slice(oldCursor);\n const maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n const newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n const newBefore = newText.slice(0, newCursor);\n const newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n const prefixLength = Math.min(oldCursor, newCursor);\n const oldPrefix = oldBefore.slice(0, prefixLength);\n const newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n const oldMiddle = oldBefore.slice(prefixLength);\n const newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n const cursor = oldCursor;\n const newBefore = newText.slice(0, cursor);\n const newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n const suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n const oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n const newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n const oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n const newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n const oldPrefix = oldText.slice(0, oldRange.index);\n const oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n const prefixLength = oldPrefix.length;\n const suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n const newPrefix = newText.slice(0, prefixLength);\n const newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n const oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n const newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nexport default diff;\n","import { DOMConsole } from \"../io/domConsole\";\nimport { getInstance } from \"../services/localizedStringsService\";\n\nconst LocalizedStrings = getInstance();\n\nexport class TestConsole {\n\n\n constructor (inputList) {\n this.index = 0;\n this.inputList = inputList;\n this.list = [];\n this.currentLine = null;\n }\n\n writeRawHTML (text) {\n this._appendTextLn(text);\n }\n write (text, newLine = false) {\n this._appendText(text, DOMConsole.USER, newLine);\n }\n\n info (text) {\n this._appendTextLn(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendTextLn(text, DOMConsole.ERR);\n }\n\n _appendText (text, _type, newLine = false) {\n if (this.currentLine == null) {\n this.currentLine = this.list.push('') - 1;\n }\n\n this.list[this.currentLine] += text;\n if (newLine) {\n this.currentLine = null;\n }\n }\n\n _appendTextLn (text) {\n this.list.push(text);\n this.currentLine = null;\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.inputList.length) {\n resolve(this.inputList[this.index]);\n this.index++;\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n\n sendOutput (text) {\n let output = '' + text;\n if (output.indexOf('\\n') !== -1) {\n const outputList = output.split('\\n');\n let last = outputList.pop();\n outputList.forEach( t => {\n t = t.replace(/\\t/g, '  ');\n t = t.replace(/\\s/g, \" \");\n if (t.length == 0)\n this.currentLine = null;\n else\n this.write(t, true);\n });\n last = last.replace(/\\t/g, '  ');\n last = last.replace(/\\s/g, \" \");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, '  ');\n output = output.replace(/\\s/g, \" \");\n this.write(output);\n }\n }\n}\n","import { LanguageService } from \"./../services/languageService\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport { Operators } from \"./../ast/operators\";\n\n/**\n * source: https://pawelgrzybek.com/page-scroll-in-vanilla-javascript/\n *\n */\nexport function scrollIt (\n destination,\n duration = 200,\n easing = \"linear\",\n callback = null\n) {\n const easings = {\n linear (t) {\n return t;\n },\n easeInQuad (t) {\n return t * t;\n },\n easeOutQuad (t) {\n return t * (2 - t);\n },\n easeInOutQuad (t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n easeInCubic (t) {\n return t * t * t;\n },\n easeOutCubic (t) {\n return --t * t * t + 1;\n },\n easeInOutCubic (t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n easeInQuart (t) {\n return t * t * t * t;\n },\n easeOutQuart (t) {\n return 1 - --t * t * t * t;\n },\n easeInOutQuart (t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n },\n easeInQuint (t) {\n return t * t * t * t * t;\n },\n easeOutQuint (t) {\n return 1 + --t * t * t * t * t;\n },\n easeInOutQuint (t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\n },\n };\n\n const start = window.pageYOffset;\n const startTime =\n \"now\" in window.performance ? performance.now() : new Date().getTime();\n\n const documentHeight = Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.clientHeight,\n document.documentElement.scrollHeight,\n document.documentElement.offsetHeight\n );\n const windowHeight =\n window.innerHeight ||\n document.documentElement.clientHeight ||\n document.getElementsByTagName(\"body\")[0].clientHeight;\n const destinationOffset =\n typeof destination === \"number\" ? destination : destination.offsetTop;\n const destinationOffsetToScroll = Math.round(\n documentHeight - destinationOffset < windowHeight\n ? documentHeight - windowHeight\n : destinationOffset\n );\n\n if (\"requestAnimationFrame\" in window === false) {\n window.scroll(0, destinationOffsetToScroll);\n if (callback) {\n callback();\n }\n return;\n }\n\n function scroll () {\n const now =\n \"now\" in window.performance ? performance.now() : new Date().getTime();\n const time = Math.min(1, (now - startTime) / duration);\n const timeFunction = easings[easing](time);\n window.scroll(\n 0,\n Math.ceil(timeFunction * (destinationOffsetToScroll - start) + start)\n );\n\n if (window.pageYOffset === destinationOffsetToScroll) {\n if (callback) {\n callback();\n }\n return;\n }\n\n requestAnimationFrame(scroll);\n }\n\n scroll();\n}\n\n/**\n *\n * source: https://stackoverflow.com/a/16270434\n */\nexport function isElementInViewport (el) {\n const rect = el.getBoundingClientRect();\n\n return (\n rect.bottom > 0 &&\n rect.right > 0 &&\n rect.left < (window.innerWidth || document.documentElement.clientWidth) &&\n rect.top < (window.innerHeight || document.documentElement.clientHeight)\n );\n}\n\nlet cacheMainList = null;\nlet cacheOp = null;\n\nfunction fillCache () {\n if (cacheMainList == null) {\n cacheMainList = [];\n const mainList = [\n \"RK_PROGRAM\",\n \"RK_REAL\",\n \"RK_VOID\",\n \"RK_BOOLEAN\",\n \"RK_STRING\",\n \"RK_INTEGER\",\n \"RK_CHARACTER\",\n \"RK_SWITCH\",\n \"RK_CASE\",\n \"RK_DEFAULT\",\n \"RK_CONST\",\n \"RK_FUNCTION\",\n \"RK_RETURN\",\n \"RK_FOR\",\n \"RK_BREAK\",\n \"RK_DO\",\n \"RK_WHILE\",\n \"RK_IF\",\n \"RK_ELSE\",\n \"RK_FALSE\",\n \"RK_TRUE\",\n ];\n const lexer = LanguageService.getCurrentLexer();\n const names = lexer.getReservedKeys();\n for (let key = 0; key < mainList.length; ++key) {\n const word = mainList[key];\n const keyword = names[word];\n cacheMainList.push(keyword);\n }\n }\n if (cacheOp == null) {\n cacheOp = [];\n const logicOpList = [\n Operators.AND.value,\n Operators.OR.value,\n Operators.NOT.value,\n ];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n cacheOp.push(LocalizedStrings.getUI(lOp));\n }\n }\n}\n\nexport function isKeyword (text) {\n fillCache();\n for (let key = 0; key < cacheMainList.length; ++key) {\n const keyword = cacheMainList[key];\n if (keyword == text) {\n return true;\n }\n }\n // not in main list, check op\n for (let op = 0; op < cacheOp.length; op++) {\n const lOp = cacheOp[op];\n if (lOp == text) {\n return true;\n }\n }\n return false;\n}\n\nexport function isValidIdentifier (identifier_str) {\n const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n if (!validRegex) {\n return false;\n }\n return !isKeyword(identifier_str);\n}\n\nexport function getCodeEditorModeConfig () {\n const blockList = [\n \"RK_SWITCH\",\n \"RK_PROGRAM\",\n \"RK_CASE\",\n \"RK_DEFAULT\",\n \"RK_FOR\",\n \"RK_FOR_ALT\",\n \"RK_FUNCTION\",\n \"RK_DO\",\n \"RK_WHILE\",\n \"RK_WHILE_ALT\",\n \"RK_IF\",\n \"RK_ELSE\",\n ];\n const keywordsList = [\n \"RK_CONST\",\n \"RK_RETURN\",\n \"RK_BREAK\",\n \"RK_FOR_FROM\",\n \"RK_FOR_TO\",\n \"RK_FOR_PASS\",\n \"RK_DO_UNTIL\",\n ];\n const typeList = [\n \"RK_REAL\",\n \"RK_VOID\",\n \"RK_BOOLEAN\",\n \"RK_STRING\",\n \"RK_INTEGER\",\n \"RK_CHARACTER\",\n ];\n const atomList = [\"RK_FALSE\", \"RK_TRUE\"];\n\n const case_default = [];\n const blocks = [];\n const keywords = [];\n const types = [];\n const atoms = [];\n let switchString = \"\";\n\n cacheMainList = [];\n const lexer = LanguageService.getCurrentLexer();\n const names = lexer.getReservedKeys();\n //console.debug(names);\n blockList.forEach((v) => {\n const keyword = names[v];\n const value = keyword;\n cacheMainList.push(value);\n keywords.push(value);\n blocks.push(value);\n if (v == \"RK_SWITCH\") {\n switchString = value;\n } else if (v == \"RK_CASE\" || v == \"RK_DEFAULT\") {\n case_default.push(value);\n }\n });\n keywordsList.forEach((v) => {\n const keyword = names[v];\n const value = keyword;\n cacheMainList.push(value);\n keywords.push(value);\n });\n typeList.forEach((v) => {\n const keyword = names[v];\n const value = keyword;\n cacheMainList.push(value);\n types.push(value);\n });\n atomList.forEach((v) => {\n const keyword = names[v];\n const value = keyword;\n cacheMainList.push(value);\n atoms.push(value);\n });\n\n cacheOp = [];\n const logicOpList = [\"NOT_OPERATOR\", \"OR_OPERATOR\", \"AND_OPERATOR\"];\n\n logicOpList.forEach((v) => {\n const keyword = names[v];\n const value = keyword;\n cacheOp.push(value);\n keywords.push(value);\n });\n cacheMainList.push(lexer.getLangFuncs().main_function);\n return {\n case_default: case_default,\n atoms: atoms,\n keywords: keywords,\n switchString: switchString,\n types: types,\n blocks: blocks,\n };\n}\n\n/**\n * Source: https://gist.github.com/andrei-m/982927\n * @param {string} a\n * @param {string} b\n */\nexport function levenshteinDistance (a, b) {\n if (a.length == 0) return b.length;\n if (b.length == 0) return a.length;\n\n const matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charCodeAt(i - 1) == a.charCodeAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(\n matrix[i - 1][j - 1] + 1, // substitution\n Math.min(\n matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1\n )\n ); // deletion\n }\n }\n }\n return matrix[b.length][a.length];\n}\n\nlet win = null;\nexport function openAssessmentDetail (event) {\n event.preventDefault();\n const page_code = event.currentTarget.dataset.page;\n if (win != null) {\n win.close();\n }\n win = window.open(\"\", \"DetailWindow\", \"width=550,height=600\");\n win.document.open();\n win.document.write(page_code);\n win.document.close();\n}\n\nexport function range (size, startAt = 0) {\n return [...Array(size).keys()].map((i) => i + startAt);\n}\n\n/**\n *\n * @param {number} ms\n */\nexport async function sleep (ms) {\n return new Promise((res, _) => setTimeout(res, ms));\n}\n","import * as GlobalsManagement from './globals';\nimport * as FunctionsManagement from './functions';\n\nwindow.block_render = false;\n\nexport function renderAlgorithm () {\n\tif (window.block_render) {\n\t\treturn;\n\t}\n\tif (window.draging) {\n\t\treturn;\n\t}\n\twindow.block_render = true;\n\n \t$('.all_functions').children().off();\n\t$('.all_functions').empty();\n\n\t$('.list_globals').children().off();\n\t$('.list_globals').empty();\t\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\tFunctionsManagement.renderFunction(window.program_obj.functions[i]);\n\t}\n\n\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\tGlobalsManagement.renderGlobal(window.program_obj.globals[i]);\n\t}\t\n\n\tsetTimeout(function(){ window.block_render = false; }, 100);\n\n\tif (settingsFilter && settingsFilter[0]) {\n blockAllEditingOptions();\n\t\t} \n\t\n\t$('.command_drag').popup({\n content : LocalizedStrings.getUI(\"text_move_command\"),\n delay: {\n show: 1000,\n hide: 0\n }\n });\n\t\t\n}","/* eslint-disable @typescript-eslint/no-use-before-define */\n/* globals $*/\nimport { Types } from \"./types\";\nimport * as Models from \"./ivprog_elements\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as Utils from \"./utils\";\n\nexport function generate () {\n $(\".ivprog_visual_panel\")\n .find(\".error_icon\")\n .remove();\n\n let code = LocalizedStrings.getUI(\"program\") + \" { \";\n\n code += globalsCode();\n\n code += \"\\n\";\n\n let has_error = false;\n\n for (let i = 0; i < window.program_obj.functions.length; i++) {\n const n_code = functionsCode(window.program_obj.functions[i]);\n if (n_code == null) {\n has_error = true;\n }\n code += n_code;\n code += \"\\n\";\n }\n\n code += \"\\n}\";\n\n if (has_error) {\n return null;\n } else {\n return code;\n }\n}\n\nfunction functionsCode (function_obj) {\n let ret = \"\\n\\t\" + LocalizedStrings.getUI(\"function\") + \" \";\n\n const has_error = false;\n\n switch (function_obj.return_type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\");\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\");\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\");\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\");\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\");\n break;\n case Types.VOID:\n ret += LocalizedStrings.getUI(\"type_void\");\n break;\n }\n ret += \" \";\n\n if (function_obj.return_dimensions == 1) {\n ret += \"[] \";\n } else if (function_obj.return_dimensions == 2) {\n ret += \"[][] \";\n }\n if (function_obj.is_main) {\n ret += LocalizedStrings.getUI(\"start\");\n } else {\n ret += function_obj.name;\n }\n ret += \" ( \";\n for (let j = 0; j < function_obj.parameters_list.length; j++) {\n ret += parametersCode(function_obj.parameters_list[j]);\n if (j + 1 < function_obj.parameters_list.length) {\n ret += \", \";\n }\n }\n\n ret += \" ) {\";\n\n for (let j = 0; j < function_obj.variables_list.length; j++) {\n ret += variablesCode(function_obj.variables_list[j]);\n }\n\n for (let j = 0; j < function_obj.commands.length; j++) {\n //try {\n ret += commandsCode(function_obj.commands[j]);\n /*} catch (err) {\n\n has_error = true;\n\n console.error(err.message);\n\n var todos = $('body').find('.command_container');\n\n for (var i = 0; i < todos.length; i++) {\n if ($(todos[i]).data('command') == function_obj.commands[j]) {\n $( todos[i] ).prepend( ' <i class=\"ui icon red exclamation triangle error_icon\"></i> ' );\n break;\n }\n }\n\n }*/\n }\n\n ret += \"\\n\\t}\";\n\n if (has_error) {\n return null;\n } else {\n return ret;\n }\n}\n\nfunction commandsCode (command_obj, indentation = 2) {\n switch (command_obj.type) {\n case Models.COMMAND_TYPES.break:\n return breaksCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.comment:\n return commentsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.reader:\n return readersCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.writer:\n return writersCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.functioncall:\n return functioncallsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.attribution:\n return attributionsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.whiletrue:\n return whiletruesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.dowhiletrue:\n return doWhilesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.iftrue:\n return iftruesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.repeatNtimes:\n return repeatNtimesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.switch:\n return switchsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.return:\n return returnsCode(command_obj, indentation);\n }\n}\n\nfunction returnsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_return\");\n\n if (command_obj.variable_value_menu) {\n try {\n ret += \" \" + elementExpressionCode(command_obj.variable_value_menu);\n //ret += ' ' + variableValueMenuCode(command_obj.variable_value_menu, true);\n } catch (err) {\n //Empty block\n }\n }\n\n return ret;\n}\n\nfunction breaksCode (_command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_break\");\n\n return ret;\n}\n\nfunction switchsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_switch\") + \" ( \";\n\n ret += variableValueMenuCode(command_obj.variable);\n\n ret += \" ) { \";\n\n if (command_obj.cases) {\n for (let i = 0; i < command_obj.cases.length; i++) {\n ret += switchcasesCode(command_obj.cases[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n ret += \"} \";\n\n return ret;\n}\n\nfunction switchcasesCode (switchcase, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_case\") + \" \";\n ret += variableValueMenuCode(switchcase.variable_value_menu);\n ret += \" :\";\n\n if (switchcase.commands_block) {\n for (let i = 0; i < switchcase.commands_block.length; i++) {\n ret += commandsCode(switchcase.commands_block[i], indentation + 1);\n }\n }\n\n return ret;\n}\n\nexport function repeatNtimesHeader (command_obj) {\n let ret = \"\";\n if (command_obj.var_attribution) {\n ret += '<span class=\"repeatN_text_par_1\">';\n ret += variableValueMenuCode(command_obj.var_attribution);\n ret += '</span>';\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_from\")} `;\n ret += '<span class=\"repeatN_text_par_2\">';\n ret += variableValueMenuCode(command_obj.expression1);\n ret += '</span>';\n }\n\n if (command_obj.expression2) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_to\")} `;\n ret += '<span class=\"repeatN_text_par_3\">';\n ret += variableValueMenuCode(command_obj.expression2);\n ret += '</span>';\n }\n\n if (command_obj.expression3) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_pass\")} `;\n ret += '<span class=\"repeatN_text_par_4\">';\n switch (command_obj.expression3.itens[1]) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" +\";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" -\";\n break;\n }\n ret += variableValueMenuCode(command_obj.expression3.itens[2]);\n ret += '</span>';\n }\n return ret;\n}\n\nfunction repeatNtimesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_for\") + \" \";\n\n if (command_obj.var_attribution) {\n ret += variableValueMenuCode(command_obj.var_attribution);\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_from\")} `;\n ret += variableValueMenuCode(command_obj.expression1);\n }\n\n if (command_obj.expression2) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_to\")} `;\n ret += variableValueMenuCode(command_obj.expression2);\n }\n\n if (command_obj.expression3) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_pass\")} `;\n switch (command_obj.expression3.itens[1]) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" +\";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" -\";\n break;\n }\n ret += variableValueMenuCode(command_obj.expression3.itens[2]);\n }\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n return ret;\n}\n\nfunction iftruesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_if\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n } else {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"} \" + LocalizedStrings.getUI(\"text_else\") + \" {\";\n\n if (command_obj.commands_else) {\n for (let i = 0; i < command_obj.commands_else.length; i++) {\n ret += commandsCode(command_obj.commands_else[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n\n return ret;\n}\n\nfunction doWhilesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_do\") + \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"} \" + LocalizedStrings.getUI(\"text_code_do_until\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n\n if (command_obj.expression) {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n return ret;\n}\n\nfunction whiletruesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_while\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n if (command_obj.expression) {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n\n return ret;\n}\n\nfunction logicExpressionCode (expression) {\n let ret = \" ( \";\n\n if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.first_operand);\n } else if (\n expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.first_operand);\n } else {\n ret += variableValueMenuCode(expression.first_operand);\n }\n\n if (expression.operator) {\n switch (expression.operator) {\n case Models.LOGIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n case Models.LOGIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n case Models.LOGIC_COMPARISON.and:\n ret += \" && \";\n break;\n case Models.LOGIC_COMPARISON.or:\n ret += \" || \";\n break;\n }\n\n if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.second_operand);\n } else if (\n expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.second_operand);\n } else {\n ret += variableValueMenuCode(expression.second_operand);\n }\n }\n\n ret += \" ) \";\n\n return ret;\n}\n\nfunction arithmeticExpressionCode (expression) {\n let ret = \" ( \";\n\n if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.first_operand);\n } else if (\n expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.first_operand);\n } else {\n ret += variableValueMenuCode(expression.first_operand);\n }\n\n switch (expression.operator) {\n case Models.ARITHMETIC_COMPARISON.greater_than:\n ret += \" > \";\n break;\n case Models.ARITHMETIC_COMPARISON.less_than:\n ret += \" < \";\n break;\n case Models.ARITHMETIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n case Models.ARITHMETIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n ret += \" >= \";\n break;\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n ret += \" <= \";\n break;\n }\n\n if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.second_operand);\n } else if (\n expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.second_operand);\n } else {\n ret += variableValueMenuCode(expression.second_operand);\n }\n\n ret += \" ) \";\n\n return ret;\n}\n\nfunction attributionsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += variableValueMenuCode(command_obj.variable) + \" <- \";\n\n /*for (var i = 0; i < command_obj.expression.length; i++) {\n ret += elementExpressionCode(command_obj.expression[i]);\n }*/\n ret += elementExpressionCode(command_obj.expression);\n\n return ret;\n}\n\nexport function elementExpressionCode (expression_obj) {\n let ret = \"\";\n\n for (let i = 0; i < expression_obj.length; i++) {\n if (expression_obj[i].type) {\n ret += variableValueMenuCode(expression_obj[i]);\n } else if (expression_obj[i].type_op) {\n switch (expression_obj[i].item) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" + \";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" - \";\n break;\n case Models.ARITHMETIC_TYPES.multiplication:\n ret += \" * \";\n break;\n case Models.ARITHMETIC_TYPES.division:\n ret += \" / \";\n break;\n case Models.ARITHMETIC_TYPES.module:\n ret += \" % \";\n break;\n\n case Models.LOGIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n\n case Models.LOGIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n\n case Models.LOGIC_COMPARISON.and:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_and\") + \" \";\n break;\n\n case Models.LOGIC_COMPARISON.or:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_or\") + \" \";\n break;\n\n case Models.LOGIC_COMPARISON.not:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_not\") + \" \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.greater_than:\n ret += \" > \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.less_than:\n ret += \" < \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n ret += \" >= \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n ret += \" <= \";\n break;\n case Models.EXPRESSION_TYPES.write_sep:\n ret += ', \" \", ';\n break;\n }\n } else {\n ret += \" \" + expression_obj[i] + \" \";\n }\n }\n\n return ret;\n}\n\nfunction functioncallsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += variableValueMenuCode(command_obj.function_called);\n\n return ret;\n}\n\nfunction readersCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_command_read\") + \" ( \";\n\n ret += variableValueMenuCode(command_obj.variable_value_menu);\n\n ret += \" ) \";\n return ret;\n}\n\nexport function variableValueMenuCode (variable_obj, is_return = false) {\n let ret = \"\";\n try {\n if (variable_obj.function_called) {\n if (variable_obj.function_called.name) {\n ret += variable_obj.function_called.name + \" ( \";\n } else {\n ret +=\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) + \" ( \";\n }\n\n if (variable_obj.parameters_list) {\n for (let i = 0; i < variable_obj.parameters_list.length; i++) {\n ret += variableValueMenuCode(variable_obj.parameters_list[i]);\n if (i + 1 < variable_obj.parameters_list.length) {\n ret += \", \";\n }\n }\n }\n\n ret += \" )\";\n } else if (variable_obj.content.type) {\n ret += variable_obj.content.name;\n\n if (\n variable_obj.content.dimensions == 1 &&\n variable_obj.dimensions != 1\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.column) + \" ] \";\n }\n\n if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2 && \n variable_obj.reference_dimensions == 1\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.row) + \" ] \";\n } else if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.row) + \" ] \";\n ret += \" [ \" + variableValueMenuCode(variable_obj.column) + \" ] \";\n }\n } else {\n const content = String(variable_obj.content);\n if (isNaN(content)) {\n // console.debug(\"Content length: \", content.length);\n // console.debug(\"Char code at 0\", content.charCodeAt(0));\n const isBackslash = content.charCodeAt(0) === 92;\n if (content.length === 1 || (content.length === 2 && isBackslash)) {\n ret += `'${content}'`;\n } else {\n ret += '\"' + variable_obj.content + '\"';\n }\n } else if (content.length == 0) {\n ret += '\"\"';\n } else if (content.trim().length == 0) {\n ret += '\"' + content + '\"';\n } else {\n ret += variable_obj.content;\n }\n }\n } catch (err) {\n if (!is_return) {\n Utils.renderErrorMessage(\n variable_obj.dom_object,\n LocalizedStrings.getUI(\"inform_valid_content\")\n );\n throw err;\n }\n }\n\n return ret;\n}\n\nfunction writersCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_command_write\") + \" ( \";\n\n /*for (var i = 0; i < command_obj.content.length; i++) {\n ret += variableValueMenuCode(command_obj.content[i]);\n\n if ((i + 1) < command_obj.content.length) {\n ret += ' + ';\n }\n }*/\n\n ret += elementExpressionCode(command_obj.content);\n if (command_obj.newline) {\n ret += ', \"\\\\n\"';\n }\n\n ret += \" ) \";\n return ret;\n}\n\nfunction commentsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"// \";\n\n ret += command_obj.comment_text.content;\n return ret;\n}\n\nfunction parametersCode (parameter_obj) {\n let ret = \"\";\n switch (parameter_obj.type) {\n case Types.INTEGER:\n ret += \" \" + LocalizedStrings.getUI(\"type_integer\") + \" \";\n break;\n case Types.REAL:\n ret += \" \" + LocalizedStrings.getUI(\"type_real\") + \" \";\n break;\n case Types.TEXT:\n ret += \" \" + LocalizedStrings.getUI(\"type_text\") + \" \";\n break;\n case Types.BOOLEAN:\n ret += \" \" + LocalizedStrings.getUI(\"type_boolean\") + \" \";\n break;\n case Types.CHAR:\n ret += \" \" + LocalizedStrings.getUI(\"type_char\") + \" \";\n break;\n }\n if (parameter_obj.reference)\n ret += \"&\";\n\n ret += parameter_obj.name + \"\";\n\n if (parameter_obj.dimensions == 1) {\n ret += \" []\";\n } else if (parameter_obj.dimensions == 2) {\n ret += \" [][]\";\n }\n return ret;\n}\n\nfunction variablesCode (variable_obj) {\n let ret = \"\";\n\n const temp = variable_obj;\n\n ret += \"\\n\\t\\t\";\n\n if (temp.is_constant) {\n ret += \"const \";\n }\n switch (temp.type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\") + \" \";\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\") + \" \";\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\") + \" \";\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\") + \" \";\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\") + \" \";\n break;\n }\n ret += temp.name + \" \";\n\n if (temp.dimensions == 1) {\n ret += \"[\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j];\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += parseFloat(temp.value[j]).toFixed(2);\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += '\"' + temp.value[j] + '\"';\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n if (temp.value[j]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += \"'\" + temp.value[j] + \"'\";\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else if (temp.dimensions == 2) {\n ret += \"[\" + temp.rows + \"][\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k];\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += parseFloat(temp.value[j][k]).toFixed(2);\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += '\"' + temp.value[j][k] + '\"';\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n if (temp.value[j][k]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += \"'\" + temp.value[j][k] + \"'\";\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else {\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- \" + temp.value;\n break;\n case Types.REAL:\n ret += \"<- \" + parseFloat(temp.value).toFixed(2);\n break;\n case Types.TEXT:\n ret += '<- \"' + temp.value + '\"';\n break;\n case Types.BOOLEAN:\n ret += \"<- \";\n if (temp.value) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n break;\n case Types.CHAR:\n ret += \"<- '\" + temp.value + \"'\";\n break;\n }\n }\n\n return ret;\n}\n\nfunction globalsCode () {\n let ret = \"\";\n\n if (window.program_obj.globals) {\n for (let i = 0; i < window.program_obj.globals.length; i++) {\n const temp = window.program_obj.globals[i];\n\n ret += \"\\n\\t\";\n\n if (temp.is_constant) {\n ret += \"const \";\n }\n switch (temp.type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\");\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\");\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\");\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\");\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\");\n break;\n }\n ret += \" \" + temp.name + \" \";\n\n if (temp.dimensions == 1) {\n ret += \"[\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j];\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += parseFloat(temp.value[j]).toFixed(2);\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += '\"' + temp.value[j] + '\"';\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n if (temp.value[j]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += \"'\" + temp.value[j] + \"'\";\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else if (temp.dimensions == 2) {\n ret += \"[\" + temp.rows + \"][\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k];\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += parseFloat(temp.value[j][k]).toFixed(2);\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += '\"' + temp.value[j][k] + '\"';\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n if (temp.value[j][k]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += \"'\" + temp.value[j][k] + \"'\";\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else {\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- \" + temp.value;\n break;\n case Types.REAL:\n ret += \"<- \" + parseFloat(temp.value).toFixed(2);\n break;\n case Types.TEXT:\n ret += '<- \"' + temp.value + '\"';\n break;\n case Types.BOOLEAN:\n ret += \"<- \";\n if (temp.value) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n break;\n case Types.CHAR:\n ret += \"<- '\" + temp.value + \"'\";\n break;\n }\n }\n }\n }\n\n return ret;\n}\n","import * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as CommentsManagement from './commands/comment';\nimport * as ReadersManagement from './commands/reader';\nimport * as WritersManagement from './commands/writer';\nimport * as AttributionsManagement from './commands/attribution';\nimport * as IftruesManagement from './commands/iftrue';\nimport * as RepeatNtimesManagement from './commands/repeatNtimes';\nimport * as WhiletruesManagement from './commands/whiletrue';\nimport * as DowhiletruesManagement from './commands/dowhiletrue';\nimport * as SwitchesManagement from './commands/switch';\nimport * as FunctioncallsManagement from './commands/functioncall';\nimport * as VariableValueMenuManagement from './commands/variable_value_menu';\nimport * as BreaksManagement from './commands/break';\nimport * as ReturnsManagement from './commands/return';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\n\n// let has_element_created_draged = false;\n// let which_element_is_draged = null;\n\nexport function removeCommand (command, function_obj, dom_obj) {\n\n\tregisterUserEvent(function_obj.name, ActionTypes.REMOVE_COMMAND, command.type, '/', 0);\n\n\tif (function_obj.commands.indexOf(command) > -1) {\n\t\tfunction_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\t// Utilize dois parantNode, pois o primeiro é o div de comandos\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').commands_block.indexOf(command) > -1) {\n\t\t\tdom_obj.parent().parent().data('command').commands_block.splice\n\t\t\t(dom_obj.parent().parent().data('command').commands_block.indexOf(command), 1);\n\t\t\treturn true;\n\t\t}\t\n\t} catch (err) {}\n\t\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').type == Models.COMMAND_TYPES.iftrue) {\n\t\t\tif (dom_obj.parent().parent().data('command').commands_else.indexOf(command) > -1) {\n\t\t\t\tdom_obj.parent().parent().data('command').commands_else.splice\n\t\t\t\t(dom_obj.parent().parent().data('command').commands_else.indexOf(command), 1);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} catch (err) {}\n\n\tif (dom_obj.parent().data('switchcase')) {\n\t\tdom_obj.parent().data('switchcase').commands_block.splice(dom_obj.parent().data('switchcase').commands_block.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nwindow.function_container_active = null;\n\nexport function createFloatingCommand (function_obj, function_container, command_type, mouse_event) {\n\n\tvar floatingObject;\n\n\tswitch (command_type) {\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tfloatingObject = BreaksManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tfloatingObject = CommentsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tfloatingObject = ReadersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tfloatingObject = WritersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tfloatingObject = AttributionsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tfloatingObject = IftruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tfloatingObject = RepeatNtimesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tfloatingObject = WhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tfloatingObject = DowhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tfloatingObject = SwitchesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tfloatingObject = FunctioncallsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tfloatingObject = ReturnsManagement.createFloatingCommand();\n\t\t\tbreak;\n\t}\n\n\tfloatingObject.draggable().appendTo(\"body\");\n\n\t$('body').mouseup(function(evt) {\n\t manageCommand(function_obj, function_container, evt, command_type);\n\t $('body').off('mouseup');\n\t $('body').off('mouseover');\n\t});\n\n\tif (!function_container.hasClass('function_div') || function_container.length < 1) {\n\t\twindow.mouse_event = mouse_event;\n\t\tfunction_container = $(mouse_event.originalEvent.srcElement.closest('.function_div'));\n\t}\n\n\tfunction_container_active = function_container;\n\n\tfunction_container.find('.commands_list_div').on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\tfunction_container.find('.commands_list_div').find(\"*\").on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\n\tfunction_container.on('mouseout', function(event) {\n\t\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\t\tif (el.closest('.commands_list_div').length < 1) {\n\t\t\twindow.ghostDiv.remove();\n\t\t}\n\t});\n\t\n\tfloatingObject.css(\"position\", \"absolute\");\n\tmouse_event.type = \"mousedown.draggable\";\n\tmouse_event.target = floatingObject[0];\n\tfloatingObject.css(\"left\", mouse_event.pageX - window.divx);\n\tfloatingObject.css(\"top\", mouse_event.pageY);\n\tfloatingObject.trigger(mouse_event);\n}\n\nwindow.divx = 100;\nwindow.ghostDiv = $('<div class=\"ghost_div\">');\nwindow.active_container = null;\n\nfunction addGhostToEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.command_container');\n\n\tif (container.hasClass('switch')) {\n\t\tcontainer = $(evt.target).closest('.case_div');\t\t\n\t}\n\n\tif (!container.hasClass('dowhiletrue') && !container.hasClass('iftrue') && !container.hasClass('repeatNtimes') \n\t\t\t\t&& !container.hasClass('case_div') && !container.hasClass('whiletrue')) {\n\t\taddGhostToNotEmptyBlock(element, evt);\n\t\treturn;\n\t}\n\n\tif (window.active_container != null) {\n\t\tif (window.active_container.is(container)) {\n\t\t\t//console.log('é o mesmo, não mudou!');\n\t\t} else {\n\t\t\tif (container.length < 1) {\n\t\t\t\tcontainer = element.closest('.commands_list_div');\n\t\t\t\tif (window.active_container.is(container)) {\n\t\t\t\t\t//console.log('é o mesmo command list');\n\t\t\t\t} else {\n\t\t\t\t\t//console.log('mudou para um command list');\n\t\t\t\t\twindow.active_container = container;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//console.log('mudou para um outro container?');\n\t\t\t}\n\t\t}\n\t}\n\n\twindow.active_container = container;\n\tif (container.hasClass('iftrue')) {\n\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t$(containerIf).append(window.ghostDiv);\n\t\t} else {\n\t\t\t$(containerElse).append(window.ghostDiv);\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tcontainer.find('.case_commands_block').append(window.ghostDiv);\n\t} else {\n\t\tcontainer.find('.block_commands').append(window.ghostDiv);\n\t}\n\t\n}\n\nfunction addGhostToNotEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.dowhiletrue, .iftrue, .repeatNtimes, .case_div, .whiletrue');\n\n\t//console.log(\"\\n\\nNOT EMPTY: \", container);\n\n\t//if (window.active_container != null) {\n\t\t\n\t\t\n\t//}\n\n\tif (container.length < 1) {\n\t\tcontainer = element.closest('.commands_list_div');\n\t\twindow.active_container = container;\n\t\taddGhostToFunctionArea(element, evt);\n\t} else {\n\t\t//console.log('mudou para um outro container?');\n\t}\n\n\twindow.active_container = container;\n\n\t// quem está mais próximo? // Essa regra se aplica somente quando o over está sobre um comando\n\tvar allfilhos;\n\tif (container.hasClass('iftrue')) {\n\t\t\n\t\tif ($(evt.target).closest('.data_block_if').length > 0) {\n\t\t\tallfilhos = container.find('.commands_if').children('.command_container');\n\t\t} else if ($(evt.target).closest('.data_block_else').length > 0) {\n\t\t\tallfilhos = container.find('.commands_else').children('.command_container');\n\t\t} else {\n\n\t\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t\tallfilhos = $(containerIf).children('.command_container');\n\t\t\t} else {\n\t\t\t\tallfilhos = $(containerElse).children('.command_container');\n\t\t\t}\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tallfilhos = container.children('.case_commands_block').children('.command_container');\n\t} else if (container.hasClass('commands_list_div')) {\n\t\tallfilhos = container.children('.command_container');\n\t} else {\n\t\tallfilhos = container.children('.block_commands').children('.command_container');\n\t}\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n}\n\nfunction addGhostToFunctionArea (undermouse, evt) {\n\t$('.ghost_div').remove();\n\tvar allfilhos = undermouse.closest('.commands_list_div').children('.command_container');\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n}\n\nfunction addGhostDiv (evt) {\n\n\tvar undermouse = $(evt.target);\n\n\tif (undermouse.hasClass('ghost_div')) {\n\t\treturn;\n\t} else if (undermouse.hasClass('commands_list_div')) {\n\t\taddGhostToFunctionArea(undermouse, evt);\n\t\treturn;\n\t} else if (undermouse.hasClass('block_commands')) {\n\t\tif (undermouse.find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else if (undermouse.hasClass('case_div')) {\n\t\tif (undermouse.find('.case_commands_block').find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else {\n\t\t\n\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t\n\t} \n}\n\nfunction borderMouseDragCommand (function_obj, function_container, evt) {\n\n\tfunction_container.find('.over_command_drag').each(function( index ) {\n\t\t$(this).removeClass('over_command_drag');\n\t});\n\n\tvar prev = null;\n\n\tfunction_container.find('.commands_list_div').each(function( index ) { \n\t\tprev = $(this);\n\t\tif (prev) {\n\t\t\tvar objLeft = prev.offset().left;\n\t var objTop = prev.offset().top;\n\t var objRight = objLeft + prev.width();\n\t var objBottom = objTop + prev.height();\n\t if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n\t \tprev.addClass(\"over_command_drag\"); \n\t }\n\t }\n\t});\n\n\tfunction_container.find('.command_container').each(function( index ) { \n\t\tvar obj = $(this);\n\t\tvar objLeft = obj.offset().left;\n var objTop = obj.offset().top;\n var objRight = objLeft + obj.width();\n var objBottom = objTop + obj.height();\n if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n \tif (prev) {\n \t\tprev.removeClass('over_command_drag');\n \t}\n \tobj.addClass(\"over_command_drag\"); \n \treturn;\n }\n\t});\n}\n\n// before_after_inside: 1 -> before, 2 -> after, 3 -> inside\nexport function renderCommand (command, element_reference, before_after_inside, function_obj) {\n\tvar createdElement;\n\tswitch (command.type) {\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tcreatedElement = CommentsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tcreatedElement = BreaksManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tcreatedElement = ReadersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tcreatedElement = WritersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tcreatedElement = AttributionsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tcreatedElement = FunctioncallsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tcreatedElement = IftruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tcreatedElement = RepeatNtimesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tcreatedElement = WhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tcreatedElement = DowhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tcreatedElement = SwitchesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tcreatedElement = ReturnsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\t}\n\tswitch (before_after_inside) {\n\t\tcase 1:\n\t\t\tcreatedElement.insertBefore(element_reference);\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tcreatedElement.insertAfter(element_reference);\n\t\t\tbreak;\n\n\t\tcase 3: \n\t\t\telement_reference.append(createdElement);\n\t\t\tbreak;\n\t}\n\n}\n\nexport function genericCreateCommand (command_type) {\n\n\tswitch (command_type) {\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\treturn new Models.Break();\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\treturn new Models.Comment(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_value, LocalizedStrings.getUI('text_comment'), null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\treturn new Models.Reader(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\treturn new Models.Writer([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\treturn new Models.Attribution(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t[]);\n \n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\treturn new Models.FunctionCall(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_function, null, null, null, false), null);\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\treturn new Models.IfTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n//(var_attribution, var_incrementation, expression1, expression2, expression3, commands_block)\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\treturn new Models.RepeatNTimes(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false),\n\t\t\t\t\t\t\t\t\t\t null, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), null, null);\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\treturn new Models.WhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\treturn new Models.DoWhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\n\t\t\tvar sc = [new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true))];\n\n\t\t\treturn new Models.Switch(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true), sc);\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\treturn new Models.Return([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\t}\n}\n\nfunction dragTrash (event) {\n\n\t$('.ghost_div').remove();\n\n\tvar trash = $('<i class=\"ui icon trash alternate outline\"></i>');\n\t$('body').append(trash);\n\ttrash.css('position', 'absolute');\n\ttrash.css('top', event.clientY);\n\ttrash.css('left', event.clientX - 20);\n\ttrash.css('font-size', '3em');\n\ttrash.css('display', 'none');\n\n\tfunction_container_active.find('.commands_list_div').off('mousemove');\n\tfunction_container_active.find('.commands_list_div').find(\"*\").off('mousemove');\n\n\ttrash.fadeIn( 200, function() {\n\t\ttrash.fadeOut( 200, function() {\n\t\t\ttrash.remove();\n\t\t} );\n });\n}\n\nfunction findSingleElement (searching, query) {\n\n\tif (!searching || !query) {\n\t\treturn '';\n\t}\n\n\tif (searching.type == Models.COMMAND_TYPES.repeatNtimes || \n\t\tsearching.type == Models.COMMAND_TYPES.whiletrue ||\n\t\tsearching.type == Models.COMMAND_TYPES.dowhiletrue) {\n\n\t\tif (searching.commands_block) {\n\t\t\treturn '' + searching.commands_block.indexOf(query);\n\t\t} else {\n\t\t\treturn '0';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tif (searching.commands_block == null) {\n\t\t\tsearching.commands_block = [];\n\t\t}\n\t\tif (searching.commands_else == null) {\n\t\t\tsearching.commands_else = [];\n\t\t}\n\n\t\tif (searching.commands_block.indexOf(query) >= 0) {\n\t\t\treturn 'if[' + searching.commands_block.indexOf(query) + ']';\n\t\t} else {\n\t\t\treturn 'else[' + searching.commands_else.indexOf(query) + ']';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.switch) {\n\n\t\tfor (var i = 0; i < searching.cases.length; i++) {\n\t\t\tif (searching.cases[i].commands_block.indexOf(query) >= 0) {\n\t\t\t\treturn 'case[' + searching.cases[i].commands_block.indexOf(query) + ']';\n\t\t\t}\n\t\t}\n\n\t}\n\n}\n\nfunction findPathRecursive (starter_index, hierarquia_bottom_up, function_obj, index_command = -1, actual = null) {\n\tvar full_path = '';\n\t\n\tfor (var i = 0; i <= hierarquia_bottom_up.length; i ++) {\n\t\tfull_path += findSingleElement(hierarquia_bottom_up[i], hierarquia_bottom_up[i + 1]) + '-';\n\t}\n\n\treturn full_path;\n}\n\nfunction manageCommand (function_obj, function_container, event, command_type) {\n\n\t$( \".created_element\" ).each(function( index ) { \n\t\t$(this).remove();\n\t});\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tif (el.hasClass('ghost_div')) {\n\t\tif (el.closest('.command_container').length < 1) {\n\t\t\t\n\t\t\tel.closest('.commands_list_div').css('height', el.closest('.commands_list_div').css('height') + 30);\n\t\t\t\n\t\t\t//$('.ghost_div').remove();\n\n\t\t\tel = el.closest('.commands_list_div');\n\t\t}\n\t}\n\n\t// Primeiro verificar se ele soltou no espaço da função correta:\n\tvar hier = el.parentsUntil(\".all_functions\");\n\tvar esta_correto = false;\n\tvar esta_na_div_correta = false;\n\tif (el.hasClass(\"commands_list_div\")) {\n\t\testa_na_div_correta = true;\n\t} \n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (temp.hasClass(\"commands_list_div\")) {\n\t\t\testa_na_div_correta = true;\n\t\t} \n\t\tif (temp.data('fun') == function_obj) {\n\t\t\testa_correto = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!esta_correto) {\n\t\t// has_element_created_draged = false;\n\t\t// which_element_is_draged = null;\n\t\tdragTrash(event);\n\t\treturn;\n\t} else {\n\t\tif (!esta_na_div_correta) {\n\t\t\t// has_element_created_draged = false;\n\t\t\t// which_element_is_draged = null;\n\t\t\tdragTrash(event);\n\t\t\treturn;\n\t\t}\n\t}\n\tvar hierarquia_bottom_up = null;\n\t// Agora é descobrir qual o escopo para adicionar o comando:\n\t// Se o elemento clicado possuir o atributo \"fun\", então, é direto na div dos comandos:\n\tif (typeof el.data('fun') !== 'undefined') {\n\n\t\t// Se a lista de comandos estiver vazia, então é o primeiro.\n\t\t// Portanto, ele deve soltar o elemento obrigatoriamente no objeto vazio\n\t\tif ((el.data('fun').commands == null) || (el.data('fun').commands.length == 0)) {\n\t\t\t\t// pode adicionar \n\t\t\t\tel.data('fun').commands = [];\n\n\t\t\t\tvar new_cmd = genericCreateCommand(command_type);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', 0);\n\n\t\t\t\tel.data('fun').commands.push(new_cmd);\n\n\t\t\t\trenderCommand(new_cmd, $(function_container).find('.commands_list_div'), 3, function_obj);\n\t\t\t\n\t\t} else { // Entra nesse else, caso já existam outros comandos no bloco:\n\n\t\t\tfindNearbyCommandToAddInFunctionScope(el, event, $(function_container).find('.commands_list_div'), function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\t// descobrir em qual comando ele soltou: \n\t\tvar hier_find = el.parentsUntil(\".commands_list_div\");\n\t\thierarquia_bottom_up = [];\n\t\tif (typeof el.data('command') !== 'undefined') {\n\t\t\thierarquia_bottom_up.push(el.data('command'));\n\t\t}\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\thierarquia_bottom_up.push($(hier_find[i]).data('command'));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Se for do tipo break, verificar se está no contexto correto: \n\t\t// Caso não esteja no contexto, apenas retorna sem dar continuidade:\n\t\tvar is_correct_context = false;\n\t\tif (command_type == Models.COMMAND_TYPES.break) {\n\t\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\t\tif ((hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.repeatNtimes)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.whiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.dowhiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.switch)) {\n\n\t\t\t\t\tis_correct_context = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!is_correct_context) {\n\t\t\t\tconsole.error(\"Context not allowed to insert BREAK COMMAND!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// se a hierarquia possuir apenas um elemento, então está na raiz dos comandos: \n\t\tif (hierarquia_bottom_up.length == 1) {\n\t\t\tvar sub_elemento = false;\n\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\tfindBeforeOrAfterCommandToAdd(hier_find[i], event, function_obj, command_type);\n\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!sub_elemento) {\n\t\t\t\tfindBeforeOrAfterCommandToAdd(el[0], event, function_obj, command_type);\n\t\t\t}\n\t\t} else {\n\t\t\t// caso exista mais de um elemento na hierarquia:\n\t\t\tif (typeof $(el).data('command') !== 'undefined') {\n\t\t\t\tinsertCommandInBlockHierar(el[0], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t} else {\n\t\t\t\tvar sub_elemento = false;\n\t\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\t\tinsertCommandInBlockHierar(hier_find[i], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\t// has_element_created_draged = false;\n\t// which_element_is_draged = null;\n\n\tif (hierarquia_bottom_up) {\n\t\tvar i = hierarquia_bottom_up.length - 1;\n\t\tvar starter_index = window.program_obj.functions[window.program_obj.functions.indexOf(function_obj)].commands.indexOf(hierarquia_bottom_up[i]);\n\t\tvar all_str_path = starter_index + '-' + findPathRecursive(starter_index, hierarquia_bottom_up, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' , all_str_path);\n\t}\n\n\trenderAlgorithm();\n}\n\nfunction insertCommandInBlockHierar (el, event, function_obj, command_type, hier_dom, hier_obj) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\t\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.switch) ) {\n\n\t\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' + el_jq.data('command').type, 0);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindNearbyCommandToAddInBlockScope(el, event, el, function_obj, command_type, command_parent);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// QUANDO FOR BLOCO DO TIPO IF OU SWITCH/CASE:\n\t\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\t// entra neste bloco, se soltou o comando sobre outro comando dentro de um subbloco:\n\t\tfindBeforeOrAfterCommandToAddInsertBlock(el, event, function_obj, command_type);\n\t}\n}\n\nfunction findNearbyCommandToAddInBlockScope (el, event, node_list_commands, function_obj, command_type, command_parent) {\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tcommand_parent.commands_block.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAddInsertBlock (el, event, function_obj, command_type) {\n\n\tvar el_jq = $(el);\n\tvar command_parent = $(el.parentNode.parentNode).data('command');\n\tvar command_target = el_jq.data('command');\n\tvar temp_parent = $(el.parentNode.parentNode);\n\n\tvar is_in_else = false;\n\n\tif (!command_parent) {\n\t\tcommand_parent = el_jq.data('command');\n\t\ttemp_parent = el_jq;\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t}\n\t\t\tif (typeof temp.data('command') != 'undefined') {\n\t\t\t\tcommand_parent = temp.data('command');\n\t\t\t\ttemp_parent = temp;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tvar hier = el_jq.parentsUntil(\".command_container\");\n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\tis_in_else = true;\n\t\t}\n\t}\n\n\tif (command_parent == command_target) {\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ((command_parent.type != Models.COMMAND_TYPES.iftrue) && (command_parent.type != Models.COMMAND_TYPES.switch)) {\n\t\tvar hier = temp_parent.parentsUntil(\".all_cases_div\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('switchcase') !== 'undefined') {\n\t\t\t\tcommand_parent = temp.data('switchcase');\n\t\t\t\tis_in_else = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t} else {\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t}\n\n\t\t\n\n\t} else {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\n\t\t} else {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\t}\n\n\t\t\n\t}\n}\n\nfunction insertCommandInBlock (el, event, function_obj, command_type) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\tcommand_parent.commands_block = [];\n\n\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t} else { // Se já tem algum comando no bloco:\n\t\t\tfindInBlockCorrectPlace(el, event, function_obj, command_type);\n\t\t}\n\n\t} else if (el_jq.data('command').type == Models.COMMAND_TYPES.iftrue) {\n\n\t\t// no if ou no else?\n\t\tvar correct_div = $(document.elementFromPoint(event.pageX, event.pageY));\n\t\tvar is_in_if = true;\n\t\tif (correct_div.data('if')) {\n\t\t\tis_in_if = true;\n\t\t} else if (correct_div.data('else')) {\n\t\t\tis_in_if = false;\n\t\t} else {\n\t\t\tvar hier = correct_div.parentsUntil(\".command_container\");\n\t\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\t\tvar temp = $(hier[i]);\n\t\t\t\tif (typeof temp.data('if') !== 'undefined') {\n\t\t\t\t\tis_in_if = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\t\tis_in_if = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (is_in_if) {\n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_if'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_if'), event, function_obj, command_type);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_else'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_else'), event, function_obj, command_type, true);\n\t\t\t}\n\n\t\t}\n\n\t} else { // é do tipo switch\n\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t}\n}\n\nfunction addCommandToSwitchCase (event, function_obj, command_type) {\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tvar which_case = el.data('switchcase');\n\tvar case_div = el;\n\t\n\tif (!which_case) {\n\t\tvar hier_find = el.parentsUntil(\".all_cases_div\");\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('switchcase') !== 'undefined') {\n\t\t\t\twhich_case = $(hier_find[i]).data('switchcase');\n\t\t\t\tcase_div = $(hier_find[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (which_case.commands_block == null || which_case.commands_block.length < 1) {\n\t\twhich_case.commands_block = [];\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\twhich_case.commands_block.push(recentComand);\n\t\trenderCommand(recentComand, case_div.find('.case_commands_block'), 3, function_obj);\n\t} else {\n\t\tfindInBlockCorrectPlaceInSwitchCase(which_case, case_div, event, function_obj, command_type);\n\t}\n\n}\n\n\n\n\nfunction findInBlockCorrectPlaceInSwitchCase (which_case, case_div, event, function_obj, command_type) {\n\n\tvar all_sub = case_div.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\twhich_case.commands_block.push(recentComand);\n\n\t\trenderCommand(recentComand, $(case_div.find('.case_commands_block')[0]), 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = which_case.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t which_case.commands_block.splice(index, 0, recentComand);\n\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t}\n\t}\n}\n\nfunction findInBlockCorrectPlace (el, event, function_obj, command_type, is_in_else = false) {\n\tvar el_jq = $(el);\n\tvar all_sub = el_jq.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\n\t\t} else {\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, $(el_jq.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\n\t\t\tvar index = command_parent.commands_else.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t} else {\n\t\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t}\n\t\t\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAdd (el, event, function_obj, command_type) {\n\tswitch ($(el).data('command').type) {\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tinsertCommandInBlock(el, event, function_obj, command_type);\n\t\t\treturn;\n\t}\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\n\t} else {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice((index + 1), 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n\nfunction findNearbyCommandToAddInFunctionScope (el, event, node_list_commands, function_obj, command_type) {\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tfunction_obj.commands.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', function_obj.commands.length - 1);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as ExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\nimport { renderAlgorithm } from '../algorithm';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui attribution created_element\"> <i class=\"ui icon small arrow left\"></i> <span> x <— 1 + 1 </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui attribution command_container\"><i class=\"ui icon small arrow left command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_attributed\"></div> <span class=\"text_attr_receives span_command_spec\">'+LocalizedStrings.getUI('text_receives')+'</span> '\n\t\t + '<div class=\"expression_elements\"></div> <span class=\"textual_expression\"></span> <i class=\"ui icon i cursor button_write_expression\"></i> <i class=\"ui icon unlock button_alternate_expression\"></i> </div>');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.var_attributed'), function_obj);\n\n\tif (!command.expression || command.expression.length < 1) {\n\t\tvar exp = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\tcommand.expression.push(exp);\n\t}\n\n\taddHandlers(command, function_obj, el);\n\n\tExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.expression);\n\n\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.expression_elements')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\n\treturn el;\n\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, selectedItem, expression_element) {\n\t\n\tvar index_to_move = expression_element.itens.indexOf(ref_object);\n\n\tswitch (selectedItem.data('exp')) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [expression_element.itens[index_to_move],\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\texpression_element.itens[index_to_move] ]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [expression_element.itens[index_to_move]]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\t}\n\n\trenderExpressionElements(command, function_obj, dom_object);\n\n}\n\nfunction renderExpressionElements (command, function_obj, el) {\n\tvar expression_div = el.find('.expression_elements');\n\tvar command_container;\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tcommand_container = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\texpression_div = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (command_container) {\n\t\texpression_div = command_container.find('.expression_elements');\n\t}\n\n\texpression_div.text('');\n\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tvar temp = $('<div class=\"expression_element\"></div>');\n\t\ttemp.data('ref_element', command.expression[i]);\n\t\ttemp.data('ref_index', i);\n\n\t\texpression_div.append(temp);\n\n\t\trenderElement(command, function_obj, temp, command.expression[i]);\n\t}\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar context_menu = '<div class=\"ui dropdown\"><div class=\"text\">';\n\n\tswitch (expression_element.itens[index_op]) {\n\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\tcontext_menu += '+';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\tcontext_menu += '-';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\tcontext_menu += '*';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\tcontext_menu += '/';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\tcontext_menu += '%';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.none:\n\t\t\tcontext_menu += '...';\n\t\t\tbreak;\n\t}\n\t\n\tcontext_menu += '</div><div class=\"menu\">';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.plus+'\">+</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.minus+'\">-</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.multiplication+'\">*</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.division+'\">/</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.module+'\">%</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.none+'\" data-text=\"...\">Nenhum</div>';\n\tcontext_menu += '</div></div>';\n\n\tcontext_menu = $(context_menu);\n\n\ttemp_op.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t expression_element.itens[index_op] = value;\n }\n\t});\n\n}\n\nfunction renderMenuAddExpression (command, function_obj, el, dom_append_menu, expression_append_new_expression) {\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tel = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom_append_menu.hasClass(\"expression_elements\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\tdom_append_menu = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar context_menu = '<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"ui icon arrow alternate circle right outline\"></i><div class=\"menu\">';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n\tcontext_menu += '</div></div>';\n\n\tcontext_menu = $(context_menu);\n\n\tdom_append_menu.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t switch (value) {\n\t \tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t \tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\trenderExpressionElements(command, function_obj, el);\n }\n\t});\n\n}\n\nfunction renderElement (command, function_obj, el, expression_element) {\n\n\tswitch (expression_element.type_exp) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar temp_op = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp_1 = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp_2 = $('<div class=\"component_element\"></div>');\n\n\t\t\tel.append(temp_exp_1);\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp_2);\n\t\t\t\n\t\t\tif (expression_element.itens[0].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[0], temp_exp_1, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_1, expression_element.itens[0]);\n\t\t\t}\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 1);\n\n\t\t\tif (expression_element.itens[2].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[2], temp_exp_2, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_2, expression_element.itens[2]);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar temp_op = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp = $('<div class=\"component_element\"></div>');\n\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp);\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 0);\n\n\t\t\tif (expression_element.itens[1].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[1], temp_exp, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[1]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar temp_par_1 = $('<div class=\"component_element\"> ( </div>');\n\t\t\tvar temp_exp = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_par_2 = $('<div class=\"component_element\"> ) </div>');\n\n\t\t\tel.append(temp_par_1);\n\t\t\tel.append(temp_exp);\n\n\t\t\tfor (var j = 0; j < expression_element.itens.length; j++) {\n\t\t\t\tif (expression_element.itens[j].type) {\n\t\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[j], temp_exp, function_obj, 2, expression_element);\n\t\t\t\t} else {\n\t\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t//renderMenuAddExpression(command, function_obj, el, el, expression_element.itens);\n\n\t\t\tel.append(temp_par_2);\n\n\t\t\tbreak;\n\t}\n\n}\n\n\nfunction renderExpression (command, function_obj, el) {\n\n\tvar expression_div = el.find('.expression_elements');\n\texpression_div.text('');\n\n\tvar menu_add_item = $('<div class=\"menu_add_item\"></div>');\n\tmenu_add_item.data('index_add', 0);\n\n\texpression_div.append(menu_add_item);\n\t\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tif (command.expression[i].type) {\n\n\t\t\tvar temp = $('<div class=\"expression_element\"></div>');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t\tVariableValueMenu.renderMenu(command, command.expression[i], temp, function_obj);\n\n\t\t} else if (command.expression[i] == \"(\" || command.expression[i] == \")\") {\n\n\t\t\tvar temp = $('<div class=\"expression_element\">'+command.expression[i]+'</div>');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t} else {\n\n\t\t\tvar temp = '<div class=\"expression_element\">';\n\n\t\t\tswitch(command.expression[i]) {\n\t\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\t\ttemp += '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\t\ttemp += '-';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\t\t\ttemp += '*';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\t\t\ttemp += '/';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\t\t\ttemp += '%';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttemp += '</div>';\n\t\t\ttemp = $(temp);\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t}\n\t\t\n\t\tvar menu_add_item_seq = $('<div class=\"menu_add_item\"></div>');\n\t\tvar index_temp = (i + 1);\n\t\tmenu_add_item_seq.data('index_add', index_temp);\n\t\texpression_div.append(menu_add_item_seq);\n\n\t}\n\n\taddMenuItens(command, function_obj, el);\n\n}\n\nfunction addMenuItens (command, function_obj, expression_div) {\n\tvar divs_expression = expression_div.find('.menu_add_item');\n\n\tfor (var i = 0; i < divs_expression.length; i++) {\n\n\t\tvar temp = $(divs_expression[i]).data('index_add');\n\n\t\tvar context_menu = '<div class=\"ui dropdown context_menu_clear\"><i class=\"ui icon plus square outline\"></i><div class=\"menu\">';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"value\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_value')+'</div>';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"operator\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_operator')+'</div>';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"parentheses\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_parentheses')+'</div>';\n\t\tcontext_menu += '</div></div>';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\t$(divs_expression[i]).append(context_menu);\n\n\t\tcontext_menu.dropdown({\n\t on: 'hover',\n\t onChange: function(value, text, $selectedItem) {\n \t\tswitch ($selectedItem.data('option')) {\n \t\t\tcase \"value\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"operator\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, Models.ARITHMETIC_TYPES.plus);\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"parentheses\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, \"(\");\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 2, 0, \")\");\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t }\n \t}\n\t });\n\n\t}\n}\n\n\nfunction addHandlers (command, function_obj, attribution_dom) {\n\n\tattribution_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(attribution_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = attribution_dom.find('.expression_elements');\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = attribution_dom.find('.textual_expression');\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tconsole.log('focosout event!');\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = ExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = ExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t$(attribution_dom.find('.textual_expression')[0]).toggle();\n\t\n\tattribution_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(attribution_dom.find('.expression_elements')[0]).toggle();\n\t\t\t\t$(attribution_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(attribution_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t\tif (command.lockexpression) {\n\t\t\t\tattribution_dom.find('.lock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tattribution_dom.find('.unlock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\n\tattribution_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, attribution_dom)) {\n\t\t\tattribution_dom.fadeOut(400, function() {\n\t\t\t\tattribution_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tattribution_dom.find('.button_refresh_attribution').on('click', function() {\n\t\trenderExpressionElements(command, function_obj, attribution_dom);\n\t});\n}\n\nexport function renderMenuOperations (command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected) {\n\n\t/*console.log(\"recebido o seguinte DOM: \");\n\tconsole.log(dom_object);\n\n\tif (dom_object.hasClass('var_attributed')) {\n\t\treturn;\n\t} else {\n\t\tvar hier = dom_object.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass('var_attributed') || $(hier[i]).hasClass('parameters_function_called')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t}\n\n\tdom_object.find('.context_menu_clear').remove();\n\n\n\tvar menu_operations = '<div class=\"ui dropdown menu_operations\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\n\tfor (var tm in Models.ARITHMETIC_TYPES) {\n\n\t\tmenu_operations += '<div class=\"item\" data-option=\"'+tm+'\">'+LocalizedStrings.getUI('btn_arithmetic_' + tm)+'</div>';\n }\n menu_operations += '<div class=\"item\" data-option=\"clear\">'+LocalizedStrings.getUI('btn_clear')+'</div>';\n\t\n menu_operations += '</div></div>';\n\n menu_operations = $(menu_operations);\n\n dom_object.append(menu_operations);\n\n menu_operations.dropdown({\n \tonChange: function(value, text, $selectedItem) {\n \t\tswitch ($($selectedItem).data('option')) {\n \t\t\tcase \"clear\":\n\t \t\t\t$(dom_object).text('');\n\t\t \t \tVariableValueMenu.renderMenu(command, ref_object, dom_object, function_obj);\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tcreateExpressionAround(command, ref_object, dom_object, function_obj);\n \t\t\t\tmenu_operations.find('.text').text('');\n \t\t}\n }\n });*/\n}\n\nfunction createExpressionAround (command, ref_object, dom_object, function_obj) {\n\t$('<span> ( </span>').insertBefore(dom_object);\n\t$('<span> ) </span>').insertAfter(dom_object);\n\n\tVariableValueMenu.renderMenu(command, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), dom_object, function_obj);\n}\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui comment created_element\"> <i class=\"ui icon small pause\"></i> <span> '+LocalizedStrings.getUI('text_break')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui comment command_container\"> <i class=\"ui icon small pause\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span>'+LocalizedStrings.getUI('text_break')+'</span> </div>');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, break_dom) {\n\n\tbreak_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, break_dom)) {\n\t\t\tbreak_dom.fadeOut(400, function() {\n\t\t\t\tbreak_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui comment created_element\"> <i class=\"ui icon small quote left\"></i> <span class=\"span_comment_text\" \"> '+LocalizedStrings.getUI('text_comment')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui comment command_container\"> <i class=\"ui icon small quote left command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_value_menu_div\"></div> <div class=\"div_comment_text\">'+'</div> </div>');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\trenderTextComment(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction renderTextComment (command, function_obj, el) {\n\tVariableValueMenu.renderMenu(command, command.comment_text, el.find('.var_value_menu_div'), function_obj, 20);\n}\n\nfunction addHandlers (command, function_obj, comment_dom) {\n\n\tcomment_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, comment_dom)) {\n\t\t\tcomment_dom.fadeOut(400, function() {\n\t\t\t\tcomment_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenuManagement from './variable_value_menu';\n\n\nexport function renderExpression (command, expression, function_obj, initial_el_to_render) {\n\n\texpression.dom_object = initial_el_to_render;\n\n\tif (expression.expression == null || expression.expression.length < 1) {\n\n\t\trenderStartMenu(command, expression, function_obj, initial_el_to_render);\n\n\t} else {\n\t\t\n\t\tvar main_div = $('<div class=\"expression_elements\"></div>');\n\n\t\tswitch (expression.expression.type) {\n\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\trenderLogicExpression(command, expression, expression.expression, function_obj, main_div, initial_el_to_render);\n\t\t\t\tbreak;\n\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\trenderArithmeticExpression(command, expression, expression.expression, function_obj, main_div);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tinitial_el_to_render.append(main_div);\t\n\t\tvar restartMenu = $('<div class=\"ui restart_expression\"><i class=\"ui icon undo\"></i></div>');\n\t\tinitial_el_to_render.append(restartMenu);\t\n\t\trestartMenu.on('click', function(e){\n\t \texpression.expression = null;\n\t \tinitial_el_to_render.empty();\n\t \trenderExpression(command, expression, function_obj, initial_el_to_render);\n\t \t});\n\t}\n}\n\nfunction renderArithmeticOperator (command, all_expression, expression_arithmetic, arithmetic_operator, function_obj, element_to_append) {\n\n\tvar menu_operator = $('<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"dropdown icon\"></i></div>');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '>',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than)\n\t },\n\t {\n\t name : '<',\n\t value : Models.ARITHMETIC_COMPARISON.less_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than)\n\t },\n\t {\n\t name : '==',\n\t value : Models.ARITHMETIC_COMPARISON.equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.ARITHMETIC_COMPARISON.not_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '>=',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to)\n\t },\n\t {\n\t name : '<=',\n\t value : Models.ARITHMETIC_COMPARISON.less_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than_or_equals_to)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_arithmetic.operator = value;\n\t }\n\t })\n\t;\n\n\telement_to_append.append(menu_operator);\n}\n\nfunction renderLogicOperator (command, all_expression, expression_logic, logic_operator, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar menu_operator = $('<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"dropdown icon\"></i></div>');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '==',\n\t value : Models.LOGIC_COMPARISON.equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.LOGIC_COMPARISON.not_equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '&&',\n\t value : Models.LOGIC_COMPARISON.and,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.and)\n\t },\n\t {\n\t name : '||',\n\t value : Models.LOGIC_COMPARISON.or,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.or)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \tif ($selectedItem) {\n\t\t \texpression_logic.operator = value;\n\t\t \tif (expression_logic.second_operand == null) {\n\t\t \t\texpression_logic.second_operand = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t \t\tinitial_el_to_render.empty();\n\t\t \t\trenderExpression(command, all_expression, function_obj, initial_el_to_render);\n\t\t \t}\n\t \t}\n\t }\n\t });\n\n\telement_to_append.append(menu_operator);\n\n}\n\n\nfunction renderLogicExpression (command, all_expression, expression_logic, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar exp_el_par_1 = $(' <span class=\"span_command_spec\"> </span> ');\n\tvar exp_el_expr_el_1 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_operand = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_el_2 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_par_2 = $(' <span class=\"span_command_spec\"> </span> ');\n\n\tif (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\n\trenderLogicOperator(command, all_expression, expression_logic, expression_logic.operator, function_obj, exp_el_expr_operand, initial_el_to_render);\n\n\telement_to_append.append(exp_el_expr_operand);\n\n\tif (expression_logic.second_operand) {\n\t\tif (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\t\trenderLogicExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else if (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\t\trenderArithmeticExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else {\n\t\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.second_operand, exp_el_expr_el_2, function_obj);\n\t\t}\n\n\t\telement_to_append.append(exp_el_expr_el_2);\n\t}\n\n\telement_to_append.append(exp_el_par_2);\n\n}\n\nfunction renderArithmeticExpression (command, all_expression, expression_arithmetic, function_obj, element_to_append) {\n\n\tvar exp_el_par_1 = $(' <span class=\"span_command_spec\"> </span> ');\n\tvar exp_el_expr_el_1 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_operand = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_el_2 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_par_2 = $(' <span class=\"span_command_spec\"> </span> ');\n\n\n\tif (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\tif (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else if (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.second_operand, exp_el_expr_el_2, function_obj);\n\t}\n\n\trenderArithmeticOperator(command, all_expression, expression_arithmetic, expression_arithmetic.operator, function_obj, exp_el_expr_operand);\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\telement_to_append.append(exp_el_expr_operand);\n\telement_to_append.append(exp_el_expr_el_2);\n\telement_to_append.append(exp_el_par_2);\n}\n\nfunction renderStartMenu (command, expression, function_obj, initial_el_to_render) {\n\tvar start_menu = '';\n\tstart_menu += '<div class=\"ui dropdown menu_start_rendered\"><div class=\"text\"><i>'+LocalizedStrings.getUI('expression_menu_select')+'</i></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\tstart_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_TYPES.exp_logic+'\">'+LocalizedStrings.getUI('text_logic_expression')+' (EL == EL and EL)</div>';\n\tstart_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_TYPES.exp_arithmetic+'\">'+LocalizedStrings.getUI('text_arithmetic_expression')+' (EA < EA)</div>';\n\tstart_menu += '</div></div>';\n\tstart_menu = $(start_menu);\n\n\tstart_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tswitch ($selectedItem.data('exp')) {\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.LogicExpression(false, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tinitial_el_to_render.html('');\n\n\t\t\trenderExpression(command, expression, function_obj, initial_el_to_render);\n \t},\n \tselectOnKeydown: false\n\t});\n\n\tinitial_el_to_render.append(' <span class=\"span_command_spec\"> </span> ');\n\t\n\tinitial_el_to_render.append(start_menu);\n\n\tinitial_el_to_render.append(' <span class=\"span_command_spec\"> </span> ');\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as SwitchManagement from './switch';\n\nexport function renderMenu (command, dom_where_render, function_obj, dom_command) {\n\n\tvar menu_div = '<div class=\"ui dropdown menu_commands pause\" ><button><i class=\"icon code\"></i></button> <div class=\"menu\"> ';\n\n\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.break+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_break')+' </a>';\n\n\t} else {\n\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.break+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_break')+' </a>';\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.switchcase+'\"><i class=\"plus icon\"></i> '+LocalizedStrings.getUI('btn_case')+' </a>';\n\n\t}\n\n\tmenu_div += '</div></div>';\n\n\tmenu_div = $(menu_div);\n \t\n\tdom_where_render.append(menu_div);\n\n\taddHandlers(command, dom_where_render, function_obj, dom_command);\n\n\tif (command.collapsed) {\n\t\tdom_command.children('.ui.block_commands').toggle();\n\t}\n}\n\nfunction addHandlers (command, dom_where_render, function_obj, dom_command) {\n\n\tdom_where_render.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\t\n\tdom_where_render.find('.menu_commands a').on('click', function(evt){\n\n\t\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\t\t\tif (command.commands_block == null || command.commands_block.length == 0) {\n\n\t\t\t command.commands_block = [];\n\n\t\t\t var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n\t\t\t command.commands_block.push(new_cmd);\n\n\t\t\t CommandsManagement.renderCommand(new_cmd, dom_command.find('.block_commands'), 3, function_obj);\n\n\t\t\t } else {\n\t\t\t CommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t }\n\n\t\t} else {\n\n\t\t\tswitch ($(this).data('command')) {\n\t\t\t\tcase Models.COMMAND_TYPES.break:\n\t\t\t\t\tCommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.COMMAND_TYPES.switchcase:\n\t\t\t\t\taddCaseToSwitch(command, dom_where_render, function_obj, dom_command);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t});\n}\n\nfunction addCaseToSwitch (command, dom_where_render, function_obj, dom_command) {\n\t\n\tif ((command.cases == null)) {\n\t\tcommand.cases = [];\n\t}\n\t\n\tvar sc = new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\n\tcommand.cases.push(sc);\n\n\tSwitchManagement.renderCase(sc, command, function_obj, dom_command.find('.all_cases_div'));\n\n}\n\n\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui dowhiletrue created_element\"> <i class=\"ui icon small sync\"></i> <span> '+ LocalizedStrings.getUI('text_command_do') +' <br> ' + LocalizedStrings.getUI('text_command_do_until') +'(x < 10) </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui dowhiletrue command_container\"> <i class=\"ui icon small sync command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_do') + ' </span>';\n\tret += '<div class=\"ui block_commands\" data-subblock=\"\" data-idcommand=\"\">';\n\tret += '</div>';\n\tret += ' <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_do_until') + ' </span> <span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"textual_expression\"></span> <span class=\"span_command_spec\"> ) </span>';\n\tret += ' <i class=\"ui icon i cursor button_write_expression\" style=\"display: inline !important;\"></i> <i class=\"ui icon unlock button_alternate_expression\" style=\"margin-left: 1rem !important;\"></i> <div class=\"ui context_menu\"></div> ';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tif (command.expression) {\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[el.find('.conditional_expression').length - 1]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[el.find('.textual_expression').length - 1]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[el.find('.textual_expression').length - 1]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[el.find('.button_alternate_expression').length - 1]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, dowhiletrue_dom) {\n\n\tdowhiletrue_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(dowhiletrue_dom.find('.button_write_expression')[dowhiletrue_dom.find('.button_write_expression').length - 1]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(dowhiletrue_dom.find('.conditional_expression')[dowhiletrue_dom.find('.conditional_expression').length - 1]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\tdowhiletrue_dom.find('.minimize_block_button').on('click', function(evt){\n\t\tdowhiletrue_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(dowhiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\tdowhiletrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(dowhiletrue_dom.find('.conditional_expression')[dowhiletrue_dom.find('.conditional_expression').length - 1]).toggle();\n\t\t\t\t$(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]).text(text);\n\t\t\t\t$(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]).toggle();\n\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\tdowhiletrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tdowhiletrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tdowhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, dowhiletrue_dom)) {\n\t\t\tdowhiletrue_dom.fadeOut(400, function() {\n\t\t\t\tdowhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui functioncall created_element\"> <i class=\"hand point right icon\"></i> <span> funcao() </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui functioncall command_container\"> <i class=\"hand point right icon command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_value_menu_div\"></div> </div>');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.function_called, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, functioncall_dom) {\n\n\tfunctioncall_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, functioncall_dom)) {\n\t\t\tfunctioncall_dom.fadeOut(400, function() {\n\t\t\t\tfunctioncall_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import { Types } from \"../types\";\nimport * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as VariableValueMenuManagement from \"./variable_value_menu\";\nimport { registerUserEvent, ActionTypes } from \"../../services/userLog\";\nimport WatchJS from \"melanke-watchjs\";\nimport * as Utils from '../utils';\n\nwindow.timer = false;\n\nexport function renderExpression (\n command,\n function_obj,\n div_to_render,\n expression_array\n) {\n div_to_render.empty();\n\n WatchJS.unwatch(command, \"expression\");\n WatchJS.watch(\n command,\n \"expression\",\n function () {\n if (window.timer) return;\n const m = div_to_render\n .find(\".single_element_expression\")\n .not(\".mouse_distance\")\n .not(\".add_parentheses\");\n let s = \"\";\n m.each(function (e) {\n if ($(this).hasClass(\"parentheses_in_expression\")) {\n s += $(this).text() + \" \";\n } else {\n s += $(this)\n .find(\".text\")\n .text();\n\n s += $(this)\n .find(\".var_name\")\n .text();\n\n s += $(this)\n .find(\".parameters_function_called\")\n .text();\n\n s += $(this)\n .find(\".value_rendered\")\n .text();\n\n s += \" \";\n }\n });\n if (s) {\n window.timer = true;\n } else {\n return;\n }\n registerUserEvent(\n function_obj.name,\n ActionTypes.CHANGE_COMMAND_EXP,\n command.type,\n \"/\",\n s\n );\n setTimeout(function () {\n window.timer = false;\n }, 200);\n },\n 20,\n true\n );\n\n if (command.type === Models.COMMAND_TYPES.attribution) {\n WatchJS.unwatch(command.variable);\n WatchJS.watch(\n command.variable,\n function () {\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n },\n 0\n );\n\n if (command.variable.content) {\n const types_included = [];\n\n if (\n command.variable.content.type == Types.INTEGER ||\n command.variable.content.type == Types.REAL\n ) {\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else if (command.variable.content.type == Types.BOOLEAN) {\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else if (command.variable.content.type == Types.TEXT) {\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else {\n //console.log(\"NÃO RECONHECI! VEJA: \", command.variable.content.type);\n }\n\n renderElements(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n } else {\n div_to_render.text(\n LocalizedStrings.getUI(\"var_menu_select_var\").toLowerCase()\n );\n }\n } else {\n const types_included = [];\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n if (command.type === Models.COMMAND_TYPES.writer)\n types_included.push(Models.EXPRESSION_TYPES.write_sep);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n renderElements(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n }\n\n div_to_render.children(\".mouse_distance\").addClass(\"mouse_distance_hidden\");\n div_to_render.children(\".higher_element\").on(\"mousemove\", function (evt) {\n if (!window.open_or_close) {\n $(this).css(\"position\", \"relative\", \"!important\");\n $(this)\n .children(\".mouse_distance\")\n .css(\"opacity\", \"1\");\n }\n });\n div_to_render.children(\".higher_element\").on(\"mouseout\", function (evt) {\n if (!window.open_or_close) {\n $(this).css(\"position\", \"absolute\", \"!important\");\n $(this)\n .children(\".mouse_distance\")\n .css(\"opacity\", \"0\");\n }\n });\n const lixeira = $('<div class=\"lixeira\" draggable=\"true\"></div>');\n\n div_to_render\n .find(\".single_element_expression\")\n .on(\"mousedown\", function (evt) {\n window.posX = evt.clientX;\n window.posY = evt.clientY;\n });\n\n Sortable.create(div_to_render[0], {\n animation: 100,\n ghostClass: \"ghost\",\n group: {\n name: \"shared\",\n put: false, // Do not allow items to be put into this list\n },\n draggable: \".single_element_expression\",\n sort: false,\n filter: \".not_allowed\",\n\n onStart: function () {\n $(\"body\").append(lixeira);\n lixeira.css(\"display\", \"block\");\n lixeira.css(\"top\", window.posY + 70, \"!important\");\n lixeira.css(\"left\", window.posX - 20, \"!important\");\n },\n onMove: function () {\n lixeira.addClass(\"color_test\");\n },\n onEnd: function () {\n lixeira.remove();\n div_to_render.find(\".ghost\").removeClass(\"ghost\");\n },\n });\n new Sortable(lixeira[0], {\n group: \"shared\",\n animation: 150,\n onAdd: function (evt) {\n lixeira.css(\"display\", \"none\");\n lixeira.find(\".single_element_expression\").remove();\n lixeira.css(\"background-color\", \"\");\n lixeira.remove();\n removeElement(evt, expression_array);\n renderExpression(command, function_obj, div_to_render, expression_array);\n },\n });\n}\n\nfunction removeElement (event, expression_array) {\n const indice = $(event.item).data(\"index\");\n const first = expression_array[0];\n if (expression_array[indice].type) {\n // if is alone in expression:\n if (expression_array.length == 1) {\n //function_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n expression_array.splice(0, 1);\n } else if (expression_array.length > 1) {\n if (indice > 0 && expression_array[indice - 1].type_op) {\n if (\n indice < expression_array.length &&\n expression_array[indice - 2] == \"(\" &&\n expression_array[indice + 1].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n }\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n if (\n indice - 2 < expression_array.length &&\n expression_array[indice - 2] == \"(\" &&\n expression_array[indice - 1] == \")\"\n ) {\n expression_array.splice(indice - 1, 1);\n expression_array.splice(indice - 2, 1);\n if (\n indice - 3 >= 0 &&\n indice - 3 < expression_array.length &&\n expression_array[indice - 3].type_op\n ) {\n expression_array.splice(indice - 3, 1);\n }\n }\n } else if (\n indice < expression_array.length - 1 &&\n expression_array[indice + 1].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n } else if (\n indice < expression_array.length - 1 &&\n indice > 0 &&\n expression_array[indice - 1] == \"(\" &&\n expression_array[indice + 1] == \")\"\n ) {\n if (indice > 1 && expression_array[indice - 2].type_op) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n expression_array.splice(indice - 2, 1);\n } else if (\n indice < expression_array.length - 2 &&\n expression_array[indice + 2].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n } else {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n }\n }\n }\n } else if (expression_array[indice].type_op) {\n // iVProg doesn't support operator remove\n } else {\n let opening = -1;\n let closing = -1;\n\n if (expression_array[indice] == \"(\") {\n opening = indice;\n for (var i = indice + 1; i < expression_array.length; i++) {\n if (expression_array[i] == \")\") {\n closing = i;\n break;\n }\n }\n } else {\n closing = indice;\n for (var i = indice - 1; i >= 0; i--) {\n if (expression_array[i] == \"(\") {\n opening = i;\n break;\n }\n }\n }\n\n if (expression_array[opening + 1].type_op) {\n expression_array.splice(closing, 1);\n expression_array.splice(opening + 1, 1);\n expression_array.splice(opening, 1);\n } else {\n expression_array.splice(closing, 1);\n expression_array.splice(opening, 1);\n }\n }\n // if expression is empty, add a new var value:\n if (expression_array.length == 0) {\n expression_array.push(\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n if (first != expression_array[0] && expression_array[0].type_op) {\n expression_array.splice(0, 1);\n }\n}\n\nfunction renderElements (\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n) {\n /*if (expression_array.length > 0) {\n\t\tif (!expression_array[0].type_op) {\n\t\t\trenderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n\t\t}\n\t}*/\n\n let i = 0;\n for (i = 0; i < expression_array.length; i++) {\n if (expression_array[i].type == \"var_value\") {\n const div_temp = $(\n '<div class=\"single_element_expression\" data-index=\"' + i + '\"></div>'\n );\n if (i == 0) {\n if (expression_array.length > 0 && !expression_array[0].type_op) {\n //renderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n }\n }\n VariableValueMenuManagement.renderMenu(\n command,\n expression_array[i],\n div_temp,\n function_obj\n );\n div_to_render.append(div_temp);\n } else if (expression_array[i] == \"(\" || expression_array[i] == \")\") {\n if (expression_array[i] == \")\") {\n renderFinalAddElements(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i\n );\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n } else if (\n expression_array[i] == \"(\" &&\n !expression_array[i + 1].type_op\n ) {\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n renderStartAddOperator(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i + 1\n );\n } else {\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n }\n } else {\n if (i == 0) {\n } else if (expression_array[i - 1] == \"(\") {\n }\n renderOperatorMenu(\n command,\n function_obj,\n div_to_render,\n expression_array[i],\n types_included,\n i,\n expression_array\n );\n }\n }\n\n renderFinalAddElements(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i,\n true\n );\n\n renderAddParenthesis(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n}\n\nwindow.parentheses_activate = false;\nwindow.open_or_close = null;\nfunction renderAddParenthesis (\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n) {\n const addParentheses = $(\n '<div class=\"single_element_expression add_parentheses not_allowed\"><img style=\"width: 15px; position: relative; top: 3px; left: 1px; height: 15px;\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAEjCAYAAAA48U27AAAasXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZtZkhw5km3/sYpeAkYFsByMIm8Hvfw+Fx4kg6zM7HolHaykOz3MzWA63EFh5c5//7/r/osfK8m7XGqzbub5yT33OHjT/Ofn8xp8fn+/n/Pjd+H3z11MX28jr4nX9PmFna/jB5+XX1+o+evz+fvnrq7Pm9i+TvT1C078fpKurPf7a5FfJ0rx83n4+rfrX18Y9u12vv6L6+u0Xyf/89+5EoxdOF+KLp4Ukv/8/blSYhWpp8Grvb9L1CeJ9+n9HVL71/g5/Wutvw7gz3d/xM//WFn6FQ73iezXAfZHnL4+D+WPz9PPy8TfVhTizyvH7yuyEZr//vMtfvfudu/53N3I5giXfd3Uj1t57zhwEs70vmb8qfxXeF/fn86f5odfZG1zq9P5yT96iMT6hhx2GOGG815XWCwxxxMrrzGumN5nLdXY43pJyfoTbqyO/OzUyNUic4mP48+1hHfdrutxscaVd+DIGDhZ4Bu//XF/fvCf/vntRPeqDkLw7RMnyoJ1RZUsy1Dm9DdHkZBwv2JaXnyD+7z4P3+U2EQGywtz4waHn59TzBJ+1VZ6eU6+OA7N/tMvoe6vExAirl1YTEhkwFtIJVjwNcYaAnFs5Gew8phynGQgFFfiZpUxp2Qkp0Vdm+/U8I6NJX4+Bl5IRKFpKqmhgUhWziUb/dYooeFKKrmUYqWWVnoZlixbMbNqwqlRU821VKu1ttrraKnlVpq12lrrbfTYEzBWXLdee+u9j8FFRx6ca3D84IMZZ5p5lmmzzjb7HIvyWXmVZauutvoaO+60gQC3bdfddt/jhEMpnXzKsVNPO/2MS63ddPMt12697fY7fmYtfLXtb1n7M3P/nLXwlbX4EqXj6q+s8XGtP04RBCdFOSNjMQcyXpU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S/Pso/3rlCimWX5RB3TOC0vgn4gRRSsA/wR1LImGbETE/IXNAIHwbWSSEFf2lrF+kZ2bh2RynTyWLLCQUKGjhFl1J/hWFqNeAdUshUs/bZpcdIGdNYz8aNuRYziPY56kVN7ZPOuVlSyDTmnFu8Yf1z+0q5TqUxPQF6brwxx/mXLQVO0ReA90ghBfNo8aVR2sSF4Js+K2i21HPttddKmSQCS3o9cJUUUvAB59ygFDITc86dBrTszR+paU1PGJ2ga9askXKt5APUXxuX0hTgC1LIbGv0JFuu1TE6Xt/IyAjXX389p59+upRVFzhFH3POnQNcLAUjvdE591Xv/a1S0GzhPcDLpFAnqw3pPYLaA/Cd7+RamlbNJdTfkpbal13A3RXdyjm3Ey36CF+76gG44447uPfee6Vsyxi92+ed1B/wTmkJ9sqIZnwKsGfkFL14HfSyyy5rlGs53vtfkuclOJ93zk2TQt3OObeQPGfZu8qLBf3BD37A6tW5lqZV80ngESkUaTfgQ1LI8FeA3YWl7MWCrlu3ju9+97uNsi3He7/Ge7+b994l/t+Q9P+l23nvX7/15zb3pUfZ5xZpi6dZLr/8cs4666yQp06M2Ubf5r5vbOwbuV7KaerftPl3Uqad/DepALQulhENnAAAAABJRU5ErkJggg==\"></div>'\n );\n div_to_render.append(addParentheses);\n addParentheses.popup({\n content: \"Adicionar parênteses\",\n delay: {\n show: 750,\n hide: 0,\n },\n });\n\n addParentheses.on(\"click\", function (mouse_event) {\n // verificar se já está ativado\n if (window.parentheses_activate) {\n return;\n }\n\n div_to_render.find(\".usepointer\").off(\"click\");\n\n window.parentheses_activate = true;\n\n window.open_or_close = \"open\";\n\n div_to_render.find(\".dropdown\").addClass(\"disabled\");\n\n div_to_render.find(\".ghost_element\").addClass(\"temp_class\");\n div_to_render.find(\".ghost_element\").removeClass(\"ghost_element\");\n\n const floatingObject = $('<div class=\"floating_parenthesis\"> ( </div>');\n floatingObject.draggable().appendTo(\"body\");\n floatingObject.css(\"position\", \"absolute\");\n mouse_event.type = \"mousedown.draggable\";\n mouse_event.target = floatingObject[0];\n floatingObject.css(\"left\", mouse_event.pageX + 10);\n floatingObject.css(\"top\", mouse_event.pageY + 10);\n floatingObject.trigger(mouse_event);\n\n div_to_render.on(\"mousemove\", function (evt) {\n let actual_target = null;\n if ($(evt.target).hasClass(\"single_element_expression\")) {\n actual_target = $(evt.target);\n } else {\n actual_target = $(evt.target).closest(\".single_element_expression\");\n }\n\n if (\n $(evt.target).hasClass(\"temp_class\") ||\n actual_target.length < 1 ||\n actual_target.hasClass(\"add_parentheses\") ||\n actual_target.hasClass(\"rendered_parentheses\") ||\n $(evt.target).hasClass(\"expression_elements\")\n ) {\n return;\n }\n renderGhostParentheses(\n actual_target,\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n });\n\n div_to_render.on(\"mouseleave\", function () {\n /*window.open_parentheses.remove();\n\t\t\twindow.close_parentheses.remove();*/\n });\n\n let floating;\n\n $(\"body\").on(\"mouseup\", function (evt) {\n if (window.open_or_close == \"open\") {\n window.open_or_close = \"close\";\n\n floatingObject.remove();\n\n var comando_que_esta = $(evt.target).closest(\".command_container\");\n var comando_certo = div_to_render.closest(\".command_container\");\n if (!comando_que_esta.is(comando_certo)) {\n window.parentheses_activate = false;\n div_to_render.find(\".temp_class\").addClass(\"ghost_element\");\n div_to_render.find(\".temp_class\").removeClass(\"temp_class\");\n div_to_render.off(\"mousemove\");\n div_to_render.off(\"mouseleave\");\n $(\"body\").off(\"mouseup\");\n window.open_parentheses.remove();\n window.close_parentheses.remove();\n window.inserir_open = -1;\n window.inserir_close = -1;\n window.open_or_close = null;\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n\n return;\n }\n\n window.open_parentheses.addClass(\"parentheses_fixed\");\n\n floating = $('<div class=\"floating_parenthesis\"> ) </div>');\n floating.draggable().appendTo(\"body\");\n floating.css(\"position\", \"absolute\");\n floating.css(\"left\", evt.pageX + 10);\n floating.css(\"top\", evt.pageY + 10);\n\n $(\"body\").on(\"mousemove\", function (evts) {\n floating.css(\"left\", evts.pageX + 10);\n floating.css(\"top\", evts.pageY + 10);\n });\n } else {\n floating.remove();\n\n window.open_parentheses.removeClass(\"parentheses_fixed\");\n\n div_to_render.off(\"mousemove\");\n div_to_render.off(\"mouseleave\");\n $(\"body\").off(\"mouseup\");\n\n setTimeout(function () {\n window.parentheses_activate = false;\n }, 50);\n\n var comando_que_esta = $(evt.target).closest(\".command_container\");\n var comando_certo = div_to_render.closest(\".command_container\");\n let is_correct = false;\n if (comando_que_esta.is(comando_certo)) {\n is_correct = true;\n }\n\n if (is_correct) {\n expression_array.splice(window.inserir_open, 0, \"(\");\n expression_array.splice(window.inserir_close, 0, \")\");\n }\n\n window.inserir_open = -1;\n window.inserir_close = -1;\n window.open_or_close = null;\n\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n }\n });\n });\n}\n\nwindow.open_parentheses = $('<div class=\"parentheses_ghost\">(</div>');\nwindow.close_parentheses = $('<div class=\"parentheses_ghost\">)</div>');\nwindow.inserir_open = -1;\nwindow.inserir_close = -1;\nfunction renderGhostParentheses (\n actual_target,\n command,\n function_obj,\n div_to_render,\n expression_array\n) {\n /*window.open_parentheses.remove();\n\twindow.close_parentheses.remove();*/\n\n const index_in_array = actual_target.data(\"index\");\n\n if (\n expression_array[index_in_array] == \"(\" ||\n expression_array[index_in_array] == \")\"\n ) {\n return;\n }\n\n if (window.open_or_close == \"close\") {\n if (index_in_array < window.inserir_open) {\n return;\n }\n }\n\n // Tratando a situação quando é na primeira posição:\n\n if (index_in_array == 0) {\n if (expression_array[index_in_array].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n\n /*if (expression_array.length == 1) {\n\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\twindow.close_parentheses.insertAfter(actual_target);\n\t\t\t\t\twindow.inserir_close = index_in_array + 2;\n\t\t\t\t}*/\n\n //} else {\n var count_opened = 0;\n var count_closed = 0;\n for (var i = 0; i < expression_array.length; i++) {\n if (expression_array[i] == \"(\") {\n count_opened++;\n }\n if (expression_array[i] == \")\") {\n count_closed++;\n }\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n } else {\n if (expression_array[i].type == \"var_value\") {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n }\n }\n }\n }\n //}\n } else if (expression_array[index_in_array].type_op) {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n\n var count_opened = 0;\n var count_closed = 0;\n for (var i = 1; i < expression_array.length; i++) {\n // $('.slide-link[data-slide=\"0\"]')\n if (expression_array[i] == \"(\") {\n count_opened++;\n }\n if (expression_array[i] == \")\") {\n count_closed++;\n }\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (expression_array[i].type == \"var_value\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n\n break;\n } else {\n if (expression_array[i].type == \"var_value\") {\n if (expression_array[i].type == \"var_value\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n }\n }\n }\n }\n }\n return;\n }\n\n // Tratando quando não é no índice 0:\n if (expression_array[index_in_array].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(actual_target);\n window.inserir_close = index_in_array + 2;\n }\n return;\n }\n\n if (expression_array[index_in_array].type_op) {\n // buscar para a esquerda primeiro:\n if (expression_array[index_in_array - 1] == \"(\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n } else if (expression_array[index_in_array - 1] == \")\") {\n // buscar a abertura\n var count_opened = 0;\n var count_closed = 0;\n for (var j = index_in_array - 1; j >= 0; j--) {\n if (expression_array[j] == \"(\") {\n count_opened++;\n }\n if (expression_array[j] == \")\") {\n count_closed++;\n }\n\n if (count_opened != count_closed) {\n } else {\n if (count_closed > 0) {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + j + '\"]'\n )\n );\n window.inserir_open = j;\n }\n break;\n }\n }\n }\n } else if (expression_array[index_in_array - 1].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(\n div_to_render.find(\n '.single_element_expression[data-index=\"' +\n (index_in_array - 1) +\n '\"]'\n )\n );\n window.inserir_open = index_in_array - 1;\n }\n }\n\n // buscar para a direita agora:\n if (expression_array[index_in_array + 1] == \"(\") {\n // buscar o fechamento:\n\n var count_opened = 0;\n var count_closed = 0;\n for (var j = index_in_array + 1; j < expression_array.length; j++) {\n if (expression_array[j] == \"(\") {\n count_opened++;\n }\n if (expression_array[j] == \")\") {\n count_closed++;\n }\n\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + j + '\"]'\n )\n );\n window.inserir_close = j + 2;\n }\n break;\n }\n }\n }\n } else if (expression_array[index_in_array + 1].type == \"var_value\") {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' +\n (index_in_array + 1) +\n '\"]'\n )\n );\n window.inserir_close = index_in_array + 3;\n }\n }\n }\n}\n\nfunction renderParenthesis (\n div_to_render,\n expression_content,\n command,\n function_obj,\n position,\n expression_array\n) {\n const ghost_parenthesis = $(\n '<div class=\"single_element_expression parentheses_in_expression\" data-index=\"' +\n position +\n '\">' +\n expression_content +\n \"</div>\"\n );\n div_to_render.append(ghost_parenthesis);\n}\n\nfunction renderStartAddOperator (\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n position\n) {\n let menu_final =\n '<div class=\"ui dropdown disabled usepointer\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n const div_temp = $(\n '<div class=\"single_element_expression ghost_element mouse_distance\"></div>'\n );\n div_temp.append(menu_final);\n const div_higher = $('<div class=\"higher_element\"></div>');\n div_higher.append(div_temp);\n div_to_render.append(div_higher);\n menu_final.dropdown(\"set selected\", Models.ARITHMETIC_TYPES.minus);\n\n div_temp.on(\"click\", function () {\n if (!window.open_or_close) {\n const sera = position;\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic,\n Models.ARITHMETIC_TYPES.minus\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0\n ) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic,\n Models.LOGIC_COMPARISON.equals_to\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0\n ) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional,\n Models.ARITHMETIC_COMPARISON.greater_than\n )\n );\n }\n\n renderExpression(command, function_obj, div_to_render, expression_array);\n }\n });\n}\n\nfunction renderFinalAddElements (\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n position,\n is_last = false\n) {\n let menu_final =\n '<div class=\"ui dropdown disabled usepointer\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n const div_temp = $('<div class=\"simple_add mouse_distance\"></div>');\n const div_higher = $('<div class=\"higher_element\"></div>');\n\n const button = $(\n '<button class=\"ui button green add_expression\"><i class=\"plus circle inverted icon\"></i></button>'\n );\n div_temp.append(button);\n\n if (!is_last) {\n div_higher.append(div_temp);\n div_to_render.append(div_higher);\n //div_temp.append(menu_final);\n div_temp.css(\"opacity\", \"0\", \"!important\");\n } else {\n div_temp.removeClass(\"mouse_distance\");\n div_temp.css(\"opacity\", \"1\", \"!important\");\n //div_temp.append(menu_final);\n div_to_render.append(div_temp);\n }\n\n menu_final.dropdown(\"set selected\", Models.ARITHMETIC_TYPES.plus);\n\n div_temp.on(\"click\", function () {\n const sera = position;\n\n if (expression_array[sera] == \")\" && expression_array[sera - 1] == \"(\") {\n expression_array.splice(\n sera,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n renderExpression(command, function_obj, div_to_render, expression_array);\n return;\n }\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic,\n Models.ARITHMETIC_TYPES.plus\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n } else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic,\n Models.LOGIC_COMPARISON.equals_to\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0\n ) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional,\n Models.ARITHMETIC_COMPARISON.greater_than\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n\n renderExpression(command, function_obj, div_to_render, expression_array);\n });\n}\n\nfunction renderOperatorMenu (\n command,\n function_obj,\n div_to_render,\n expression_element,\n types_included,\n position,\n expression_array\n) {\n let menu_final =\n '<div class=\"ui dropdown\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.write_sep) >= 0) {\n menu_final += getSeparator();\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n menu_final.find(\".ivprog-write-sep\").popup({\n content: LocalizedStrings.getUI(\"write_seprator_menu_tooltip\"),\n delay: {\n show: 500,\n hide: 0,\n },\n });\n\n const div_temp = $(\n '<div class=\"single_element_expression not_allowed\" data-index=\"' +\n position +\n '\"></div>'\n );\n div_temp.append(menu_final);\n div_to_render.append(div_temp);\n menu_final.dropdown({\n onChange: function (_value, _text, $selectedItem) {\n expression_element.item = $selectedItem.data(\"value\");\n expression_element.type_op = $selectedItem.data(\"type\");\n },\n });\n\n menu_final.dropdown(\"set selected\", expression_element.item);\n}\n\nfunction getArithmeticOperators () {\n let arithmetic_operators;\n arithmetic_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.plus +\n '\">+</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.minus +\n '\">-</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.multiplication +\n '\">*</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.division +\n '\">/</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.module +\n '\">%</div>';\n return arithmetic_operators;\n}\n\nfunction getLogicOperators () {\n let logic_operators;\n logic_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.equals_to +\n '\">==</div>';\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.not_equals_to +\n '\">!=</div>';\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.and +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_and\") +\n \"</div>\";\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.or +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_or\") +\n \"</div>\";\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.not +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_not\") +\n \"</div>\";\n return logic_operators;\n}\n\nfunction getRelationalOperators () {\n let relational_operators;\n relational_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.greater_than +\n '\">></div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.less_than +\n '\"><</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.equals_to +\n '\">==</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.not_equals_to +\n '\">!=</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to +\n '\">>=</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.less_than_or_equals_to +\n '\"><=</div>';\n return relational_operators;\n}\n\nfunction getSeparator () {\n return `<div class=\"item ivprog-write-sep\" data-type=\"${\n Models.EXPRESSION_TYPES.write_sep\n }\" data-value=\"${Models.EXPRESSION_TYPES.write_sep}\">${LocalizedStrings.getUI(\n \"write_seprator_menu_text\"\n )}</div>`;\n}\n\nfunction getVariable (function_obj, search) {\n if (search == \")\" || search == \"(\") {\n return search;\n }\n\n if (search.instance == \"operator\") {\n var obj;\n switch (search.value) {\n case '+':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.plus); \n break;\n case '-':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.minus); \n break;\n case '*':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.multiplication); \n break;\n case '/':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.division); \n break;\n case '%':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.module); \n break;\n case '>':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.greater_than); \n break;\n case '<':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.less_than); \n break;\n case '>=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to); \n break;\n case '<=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.less_than_or_equals_to); \n break;\n case '==':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.equals_to); \n break;\n case '!=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.not_equals_to); \n break;\n case 'and':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.and); \n break;\n case 'or':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.or); \n break;\n case 'not':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.not); \n break;\n }\n return obj;\n }\n\n if (search.instance == \"expression\" \n && search.type == \"const\") {\n if (search.value === true) {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n LocalizedStrings.getUI('logic_value_true'),\n null,\n null,\n true\n );\n return obj;\n }\n if (search.value === false) {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n LocalizedStrings.getUI('logic_value_false'),\n null,\n null,\n true\n );\n return obj;\n }\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n search.value,\n null,\n null,\n true\n );\n return obj;\n }\n\n var variavel = null;\n if (search.instance == \"expression\"\n && search.type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == search.value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas gloais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == search.value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n \n // 3. Procurar na lista de parâmetros: \n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == search.value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && !search.line) {\n\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n null,\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && search.class == \"vector\") {\n \n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n getVariable(function_obj, search.line[0]),\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && search.class == \"matrix\") {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n getVariable(function_obj, search.line[0]),\n getVariable(function_obj, search.column[0]),\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"function\") {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n null,\n true\n );\n // Procurar a função para referência:\n for (var i = 0; i < program_obj.functions.length; i++) {\n if (program_obj.functions[i].name == search.value) {\n obj.function_called = program_obj.functions[i];\n }\n }\n\n // Se ainda não foi encontrada, procurar na biblioteca do iVProg:\n if (!obj.function_called) {\n for (var i = 0; i < window.system_functions.length; i++) {\n if (search.value.split(\".\")[1] && search.value.split(\".\")[1] \n == window.system_functions[i].identifier) {\n obj.function_called = window.system_functions[i];\n } else if (search.value == window.system_functions[i].identifier) {\n obj.function_called = window.system_functions[i];\n }\n }\n }\n\n obj.parameters_list = [];\n\n for (var i = 0; i < search.params.length; i++) {\n obj.parameters_list.push(getVariable(function_obj,search.params[i][0]));\n }\n return obj;\n }\n}\n\nexport function expressionParserToVisual (text, function_obj, input_field) {\n\n if (text.trim().length == 0) {\n return [new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )];\n }\n\n var var_not_found = [];\n var fun_not_found = [];\n var parsed;\n try {\n parsed = ivprogCore.parseExpression(text);\n } catch (ex) {\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_invalid'));\n }\n if (!parsed) return null;\n\n for (var i = 0; i < parsed.length; i++) {\n var variavel = null;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == parsed[i].value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas globais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == parsed[i].value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n\n // 3. Procurar a variável nos parâmetros:\n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == parsed[i].value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n \n if (!variavel)\n var_not_found.push(parsed[i].value);\n }\n\n var funcao;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"function\") {\n \n // Procurar a função para referência:\n for (var j = 0; j < program_obj.functions.length; j++) {\n if (program_obj.functions[j].name == parsed[i].value) {\n funcao = program_obj.functions[j];\n }\n }\n\n // Se ainda não encontrou, procurar na biblioteca do iVProg:\n if (!funcao) {\n for (var j = 0; j < window.system_functions.length; j++) {\n if (parsed[i].value.split(\".\")[1] && parsed[i].value.split(\".\")[1] \n == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n } else if (parsed[i].value == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n }\n }\n }\n\n if (!funcao) {\n fun_not_found.push(parsed[i].value);\n }\n }\n}\n\n if (fun_not_found.length > 0) {\n let uniqueWords = [...new Set(fun_not_found)];\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undeclared_function') + \" \" + uniqueWords.join(\", \"));\n return null;\n }\n\n if (var_not_found.length > 0) {\n let uniqueWords = [...new Set(var_not_found)];\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undelcared_variable') + \" \" + uniqueWords.join(\", \"));\n return null;\n }\n\n var exp_obj = [];\n for (var i = 0; i < parsed.length; i++) {\n exp_obj.push(getVariable(function_obj, parsed[i]));\n }\n\n return exp_obj;\n}\n\nexport function searchFunction (function_name) {\n\n for (var j = 0; j < program_obj.functions.length; j++) {\n if (program_obj.functions[j].name == function_name) {\n return program_obj.functions[j];\n }\n }\n\n // Se ainda não encontrou, procurar na biblioteca do iVProg:\n for (var j = 0; j < window.system_functions.length; j++) {\n if (function_name.split(\".\")[1] && function_name.split(\".\")[1] \n == window.system_functions[j].identifier) {\n return window.system_functions[j];\n } else if (function_name == window.system_functions[j].identifier) {\n return window.system_functions[j];\n }\n }\n\n}\n\n\nexport function expressionParserCodeVisual (parsed, function_obj) {\n\n if (!parsed) return null;\n\n var var_not_found = [];\n var fun_not_found = [];\n\n for (var i = 0; i < parsed.length; i++) {\n var variavel = null;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == parsed[i].value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas globais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == parsed[i].value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n\n // 3. Procurar a variável nos parâmetros:\n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == parsed[i].value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n \n if (!variavel)\n var_not_found.push(parsed[i].value);\n }\n\n var funcao;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"function\") {\n \n // Procurar a função para referência:\n for (var j = 0; j < program_obj.functions.length; j++) {\n if (program_obj.functions[j].name == parsed[i].value) {\n funcao = program_obj.functions[j];\n }\n }\n\n // Se ainda não encontrou, procurar na biblioteca do iVProg:\n if (!funcao) {\n for (var j = 0; j < window.system_functions.length; j++) {\n if (parsed[i].value.split(\".\")[1] && parsed[i].value.split(\".\")[1] \n == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n } else if (parsed[i].value == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n }\n }\n }\n\n if (!funcao) {\n fun_not_found.push(parsed[i].value);\n }\n }\n}\n\n var exp_obj = [];\n for (var i = 0; i < parsed.length; i++) {\n exp_obj.push(getVariable(function_obj, parsed[i]));\n }\n\n \n\n return exp_obj;\n}\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui iftrue created_element\"> <i class=\"ui icon small random\"></i> <span> if (x < 1) { } </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui iftrue command_container\"><div class=\"ui data_block_if\" data-if=\"true\"> <i class=\"ui icon small random command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button>';\n\tret += '<span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_if') + '</span>';\n\tret += ' <span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"textual_expression\"></span> <span class=\"span_command_spec\"> ) </span> ';\n\tret += ' <i class=\"ui icon i cursor button_write_expression\" style=\"margin-right: 1rem !important;\"></i> ';\n\tret += '<i class=\"ui icon unlock button_alternate_expression\"></i>';\n\tret += '<span> </span> ';\n\tret += '<div class=\"ui block_commands commands_if conditional_comands_block\" data-if=\"true\">';\n \tret += '</div></div>';\n\tret += '<div class=\"ui data_block_else\" data-else=\"true\"> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_else') + ' </span>';\n\tret += '<div class=\"ui block_commands commands_else conditional_comands_block\" data-else=\"true\">';\n\tret += '</div>';\n\tret += '<span></span></div>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\tel.find('.data_block_if').data('command', command);\n\tel.find('.data_block_else').data('command', command);\n\tel.find('.commands_if').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.commands_if')[0]), 3, function_obj);\n\t\t}\n\t}\n\tif (command.commands_else) {\n\t\tfor (var j = 0; j < command.commands_else.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_else[j], $(el.find('.commands_else')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tif (command.collapsed) {\n\t\tel.children('.data_block_else').toggle();\n\t\t$(el.find('.block_commands')[0]).toggle();\n\t}\n\n\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, iftrue_dom) {\n\n\tiftrue_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(iftrue_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(iftrue_dom.find('.conditional_expression')[0]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(iftrue_dom.find('.textual_expression')[0]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t$(iftrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\tiftrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(iftrue_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(iftrue_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(iftrue_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\tiftrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tiftrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tiftrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, iftrue_dom)) {\n\t\t\tiftrue_dom.fadeOut(400, function() {\n\t\t\t\tiftrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tiftrue_dom.find('.minimize_block_button').on('click', function() {\n\t\tiftrue_dom.children('.data_block_else').toggle();\n\t\t$(iftrue_dom.find('.block_commands')[0]).toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui reader created_element\"> <i class=\"ui icon small download\"></i> <span> '+LocalizedStrings.getUI('text_command_read')+' var </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = '<div class=\"ui reader command_container\"> <i class=\"ui icon small download command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span class=\"span_command_spec\">'+LocalizedStrings.getUI('text_command_read')+' ( </span> <div class=\"var_value_menu_div\"></div> <span class=\"close_parentheses span_command_spec\">)</span> </div>';\n\t\n\tel = $(el);\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable_value_menu, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, reader_dom) {\n\treader_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, reader_dom)) {\n\t\t\treader_dom.fadeOut(400, function() {\n\t\t\t\treader_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui repeatNtimes created_element\"> <i class=\"ui icon small sync\"></i> <span> repita_para i de 0 ate 10 passo 1 <br> </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tlet ret = `<div class=\"ui repeatNtimes command_container\"> \n\t\t<i class=\"ui icon small sync command_drag\"></i>\n\t\t<i class=\"ui icon times red button_remove_command\"></i>\n\t\t<button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button>\n\t\t<span class=\"span_command_spec\"> ${LocalizedStrings.getUI('text_for')}\n\t\t</span> <div class=\"ui attribution_expression\">\n\t\t<div class=\"ui variable_attribution\"></div>\n\t\t<span class=\"text_receives span_command_spec\" style=\"margin-left: 10px;margin-right: 20px;\"></span>\n\t\t<div class=\"ui var_value_expression div_expression_st\"></div>\n\t\t</div>\n\t\t<span class=\"span_command_spec separator_character\" style=\"margin-left: 25px; margin-right: 15px;\">\n\t\t${LocalizedStrings.getUI(\"text_for_to\")} </span>\n\t\t<div class=\"conditional_expression\"></div> <div class=\"pass_button\"></div> \n\t\t<div class=\"ui incrementation_field\"><span class=\"text_inc_receives span_command_spec\"></span>\n\t\t<div class=\"ui first_operand\"></div><div class=\"ui operator\"></div>\n\t\t<div class=\"ui second_operand\"></div></div> <span class=\"span_command_spec\"> </span>\n\t\t<span class=\"textual_expression\"></span> <i class=\"ui icon unlock button_alternate_expression\"></i>\n\t\t<div class=\"ui context_menu\"></div>`;\n\tret += '<div class=\"ui block_commands\">';\n\tret += '</div>';\n\tret += '<span> </span>';\n\tret += '</div>';\n\t\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.var_attribution, el.find('.variable_attribution'), function_obj);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression2, function_obj, el.find('.conditional_expression'));\n\n\tVariableValueMenu.renderMenu(command, command.expression2, el.find('.conditional_expression'), function_obj);\t\n\t//GenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression2);\n\n\t//VariableValueMenu.renderMenu(command, command.var_incrementation, el.find('.incrementation_variable'), function_obj);\t\n\t//angle double right\n\tif (!command.expression1) {\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\t}\n\n\tel.find('.text_receives').text(LocalizedStrings.getUI(\"text_for_from\"));\n\tVariableValueMenu.renderMenu(command, command.expression1, el.find('.var_value_expression'), function_obj);\n\n\tif (!command.expression3) {\n\t\tel.find('.pass_button').html('<button class=\"ui\">' + LocalizedStrings.getUI(\"text_for_pass\") + '<i class=\"ui icon angle double right\"></i></button>');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\t\t/*var exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;*/\n\t} else {\n\t\tel.find('.pass_button').html('<button class=\"ui\">' + LocalizedStrings.getUI(\"text_for_pass\") + '<i class=\"ui icon angle double left\"></i></button>');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\n\t\trenderOperator(command, function_obj, el.find('.operator'), command.expression3, 1);\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], el.find('.second_operand'), function_obj);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tif (command.lockexpression) {\n\t\ttry {\n\t\t\tvar text = CodeGenerator.repeatNtimesHeader(command);\n\t\t\tif (text) {\n\t\t\t\t$(el.find('.textual_expression')[0]).html(text);\n\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\n\t\t\t\t$(el.find('.attribution_expression')[0]).toggle();\n\t\t\t\t$(el.find('.span_command_spec.separator_character')[0]).toggle();\n\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(el.find('.pass_button')[0]).toggle();\n\t\t\t\t$(el.find('.incrementation_field')[0]).toggle();\n\n\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tcommand.lockexpression = false;\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\nfunction togglePasso (command) {\n\tif (!command.expression3) {\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;\n\t} else {\n\t\tcommand.expression3 = null;\n\t}\n\trenderAlgorithm();\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\tif (!command.expression3) {\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[command.var_attribution,\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\t\tcommand.expression3 = exp;\n\t\t\tcommand.var_incrementation = command.var_attribution;\n\n\t\t\tvar cond_exp = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tcommand.var_attribution, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\n\t\t\tcommand.expression2.expression = cond_exp;\n\t\t}\n\n\t\tdom_object.parent().find('.text_receives').text('de');\n\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\n\t\tdom_object.parent().find('.var_value_expression').empty();\n\t\t\n\t\tVariableValueMenu.renderMenu(command, command.expression1, dom_object.parent().find('.var_value_expression'), function_obj);\n\n\t\trenderAlgorithm();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\tdom_object.parent().find('.text_inc_receives').text('de');\n\t\t\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[0], dom_object.parent().find('.first_operand'), function_obj);\n\n\t\trenderOperator(command, function_obj, dom_object.parent().find('.operator'), command.expression3, 1);\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], dom_object.parent().find('.second_operand'), function_obj);\t\t\n\n\t}\n\n}\n\nexport function manageClearExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\t$(dom_object).parent().find('.text_receives').text('');\n\t\tcommand.expression1 = null;\n\t\t$(dom_object).parent().find('.var_value_expression').empty();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\t$(dom_object).parent().find('.text_inc_receives').text('');\n\t\tcommand.expression3 = null;\n\t\t$(dom_object).parent().find('.first_operand').empty();\n\t\t$(dom_object).parent().find('.operator').empty();\n\t\t$(dom_object).parent().find('.second_operand').empty();\n\t}\n}\n\nfunction addHandlers (command, function_obj, repeatNtimes_dom) {\n\n\trepeatNtimes_dom.find('.minimize_block_button').on('click', function(evt){\n\t\trepeatNtimes_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(repeatNtimes_dom.find('.textual_expression')[0]).toggle();\n\t\n\trepeatNtimes_dom.find('.button_alternate_expression').on('click', function() {\n\t\tvar text = CodeGenerator.repeatNtimesHeader(command);\n\t\tif (text) {\n\t\t\t$(repeatNtimes_dom.find('.textual_expression')[0]).html(text);\n\t\t\t$(repeatNtimes_dom.find('.textual_expression')[0]).toggle();\n\n\t\t\t$(repeatNtimes_dom.find('.attribution_expression')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.span_command_spec.separator_character')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.pass_button')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.incrementation_field')[0]).toggle();\n\n\t\t\t$(repeatNtimes_dom.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\n\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\trepeatNtimes_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\trepeatNtimes_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\trepeatNtimes_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, repeatNtimes_dom)) {\n\t\t\trepeatNtimes_dom.fadeOut(400, function() {\n\t\t\t\trepeatNtimes_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar menu_operator = $('<div class=\"ui dropdown\"><div class=\"text\"></div></div>');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '+',\n\t value : Models.ARITHMETIC_TYPES.plus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.plus)\n\t },\n\t {\n\t name : '-',\n\t value : Models.ARITHMETIC_TYPES.minus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.minus)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_element.itens[index_op] = value;\n\t }\n\t });\n\ttemp_op.append(menu_operator);\n}","import { Types } from '../types';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as Models from '../ivprog_elements';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui return created_element\"> <i class=\"ui icon small reply\"></i> <span> '+LocalizedStrings.getUI('text_return')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui return command_container\"> <i class=\"ui icon small reply command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span class=\"span_command_spec\"> '+LocalizedStrings.getUI('text_return')+' </span> <div class=\"expression_elements\"></div><span class=\"textual_expression\" style=\"display: none; margin-left: 1rem;\"></span></div>');\n\tel.data('command', command);\n\n\tif (function_obj.return_type != Types.VOID) {\n\t\tif (!command.variable_value_menu) {\n\t\t\tcommand.variable_value_menu = [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)];\n\t\t}\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.variable_value_menu);\n\t\tel.append($('<i class=\"ui icon unlock button_alternate_expression\" style=\"margin-left: 1rem;\"></i>'));\n\n\t\tif (command.lockexpression) {\n\t\t\tif (command.variable_value_menu) {\n\t\t\t\ttry {\n\t\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.variable_value_menu);\n\t\t\t\t\tif (text) {\n\t\t\t\t\t\t$(el.find('.expression_elements')[0]).toggle();\n\t\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcommand.lockexpression = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tel.find('.expression_elements').remove();\n\t\tcommand.variable_value_menu = null;\n\t}\n\t\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, return_dom) {\n\n\treturn_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.variable_value_menu) {\n var text = CodeGenerator.elementExpressionCode(command.variable_value_menu);\n\t\t\tif (text) {\n\t\t\t\t$(return_dom.find('.expression_elements')[0]).toggle();\n\t\t\t\t$(return_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(return_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, return_dom)) {\n\t\t\treturn_dom.fadeOut(400, function() {\n\t\t\t\treturn_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui switch created_element\"> <i class=\"ui icon small random\"></i> <span> '+LocalizedStrings.getUI('text_code_switch')+' ( x ) { <br> '+LocalizedStrings.getUI('text_code_case')+' 1: <br> '+LocalizedStrings.getUI('text_code_case')+' 2: <br> } </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui switch command_container\"> <i class=\"ui icon small random command_drag\" ></i> <i class=\"ui icon times red button_remove_command\"></i> <span> '+LocalizedStrings.getUI('text_code_switch')+' ( <div class=\"ui variable_to_switch\"></div> ) <div class=\"ui context_menu\"></div> <div class=\"ui all_cases_div\"></div></span>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.variable_to_switch'), function_obj);\n\n\tif (command.cases) {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\trenderCase(command.cases[i], command, function_obj, el.find('.all_cases_div'));\n\t\t}\n\t}\n\n\treturn el;\n}\n\nexport function renderCase (switchcase, command, function_obj, el) {\n\n\tvar casediv = $('<div class=\"ui case_div\"><i class=\"ui icon times red button_remove_command\"></i><span>'+LocalizedStrings.getUI('text_code_case')+'</span> <div class=\"ui variable_case\"></div>: <div class=\"case_commands_block\"></div></div>');\n\n\tVariableValueMenu.renderMenu(command, switchcase.variable_value_menu, casediv.find('.variable_case'), function_obj);\n\n\tcasediv.data('switchcase', switchcase);\n\tcasediv.find('.case_commands_block').data('switchcase', switchcase);\n\n\tel.append(casediv);\n\n\tif (switchcase.commands_block) {\n\t\tfor (var j = 0; j < switchcase.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(switchcase.commands_block[j], $(casediv.find('.case_commands_block')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tcasediv.find('.button_remove_command').on('click', function() {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\tif (switchcase == command.cases[i]) {\n\t\t\t\tdelete command.cases[i];\n\t\t\t\tcommand.cases.splice(i, 1);\n\t\t\t\tcasediv.remove();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n}\n\nfunction addHandlers (command, function_obj, switch_dom) {\n\n\tswitch_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, switch_dom)) {\n\t\t\tswitch_dom.fadeOut(400, function() {\n\t\t\t\tswitch_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as AttribuitionsManagement from \"./attribution\";\nimport * as RepeatNTimesManagement from \"./repeatNtimes\";\n\nexport const VAR_OR_VALUE_TYPES = Object.freeze({\n only_variable: 1,\n only_value: 2,\n only_function: 3,\n variable_and_function: 4,\n variable_and_value_opt: 5,\n value_and_function: 6,\n all: 7,\n});\n\nexport function renderMenu (\n command,\n ref_object,\n dom_object,\n function_obj,\n size_field = 2,\n expression_element\n) {\n\n // Verificar se o objeto atual trata-se de uma chamada de função e conferir se possui a quantidade correta de parâmetros\n // Caso não possua, tem que adicionar as variáveis que servirão de parâmetros:\n if (ref_object.function_called) {\n if (ref_object.function_called.parameters_list) {\n while (\n ref_object.function_called.parameters_list.length !=\n ref_object.parameters_list.length\n ) {\n if (\n ref_object.parameters_list.length >\n ref_object.function_called.parameters_list.length\n ) {\n ref_object.parameters_list.pop();\n } else {\n ref_object.parameters_list.push(\n new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n }\n }\n }\n\n // Verificar agora, quando trata-se de chamada de função, se a passagem de parâmetro é\n // por referência ou por cópia:\n var index_references = [];\n if (ref_object.function_called) {\n if (ref_object.function_called.parameters_list) {\n for (var i = 0; i < ref_object.function_called.parameters_list.length; i++) {\n if (ref_object.function_called.parameters_list[i].reference) {\n index_references.push(i)\n ref_object.parameters_list[i].reference = true\n ref_object.parameters_list[i].variable_and_value = VAR_OR_VALUE_TYPES.only_variable;\n if (ref_object.parameters_list[i].column)\n ref_object.parameters_list[i].column.reference_parent = true\n if (ref_object.parameters_list[i].row)\n ref_object.parameters_list[i].row.reference_parent = true\n }\n else {\n ref_object.parameters_list[i].reference = false;\n ref_object.parameters_list[i].variable_and_value = VAR_OR_VALUE_TYPES.all;\n if (ref_object.parameters_list[i].column)\n ref_object.parameters_list[i].column.reference_parent = false\n if (ref_object.parameters_list[i].row)\n ref_object.parameters_list[i].row.reference_parent = false\n }\n\n ref_object.parameters_list[i].reference_dimensions = ref_object.function_called.parameters_list[i].dimensions\n } \n }\n }\n\n let menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_variable) {\n menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu menu_only_vars\">';\n menu_var_or_value += \"</div>\";\n }\n\n if (\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function ||\n ref_object.variable_and_value ==\n VAR_OR_VALUE_TYPES.variable_and_value_opt ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"variable\");\n menu_var_or_value += '<div class=\"menu menu_only_vars\">';\n menu_var_or_value += \"</div></div>\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value =\n '<input type=\"text\" class=\"width-dynamic\" size=\"' +\n size_field +\n '\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" />';\n }\n\n if (\n ref_object.variable_and_value ==\n VAR_OR_VALUE_TYPES.variable_and_value_opt ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_value +\n '\">' +\n LocalizedStrings.getUI(\"text_value\") +\n \"</div>\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_function) {\n menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu menu_only_functions\">';\n menu_var_or_value += \"</div>\";\n }\n\n if (\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_function +\n '\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"btn_function\");\n menu_var_or_value += '<div class=\"menu menu_only_functions\">';\n menu_var_or_value += \"</div></div>\";\n\n /* if (command.type == Models.COMMAND_TYPES.attribution) {\n menu_var_or_value += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n menu_var_or_value += '<div class=\"menu\">';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n menu_var_or_value += '</div></div>';\n }*/\n }\n\n menu_var_or_value += \"</div></div>\";\n\n menu_var_or_value = $(menu_var_or_value);\n\n menu_var_or_value.find('.width-dynamic').on('input', function() {\n var input_field = $(this);\n var inputWidth = input_field.textWidth()+10;\n inputWidth = inputWidth<50?50:inputWidth;\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n dom_object.append(menu_var_or_value);\n\n ref_object.dom_object = menu_var_or_value;\n\n addHandlers(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n\n addVariablesToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n addFunctionsToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n addIVProgFunctionsToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n if (ref_object.content || ref_object.function_called) {\n if (ref_object.content) {\n // Verificar se a variável ainda existe:\n const variable_fun = isVarInProgram(ref_object.content, function_obj);\n if (variable_fun) {\n ref_object.content = variable_fun;\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n } else {\n if (ref_object.content && ref_object.content.type) {\n ref_object.content = null;\n appendSelectText(ref_object, menu_var_or_value);\n } else {\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n }\n }\n } else if (ref_object.function_called) {\n // Verificar se a função ainda existe:\n const ret_function = isFunctionInProgram(ref_object.function_called);\n if (ret_function) {\n ref_object.function_called = ret_function;\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n } else {\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n appendSelectText(ref_object, menu_var_or_value);\n }\n }\n } else {\n appendSelectText(ref_object, menu_var_or_value);\n }\n}\n\nfunction appendSelectText (ref_object, menu_var_or_value) {\n // if (ref_object.reference_parent) {\n // menu_var_or_value\n // .find(\".text\")\n // .append(\"<i>Opcional</i>\");\n // return;\n // }\n switch (ref_object.variable_and_value) {\n case VAR_OR_VALUE_TYPES.only_variable:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_var\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.all:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.variable_and_function:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.only_function:\n menu_var_or_value\n .find(\".text\")\n .append(\n \"<i>\" + LocalizedStrings.getUI(\"var_menu_select_function\") + \"</i>\"\n );\n break;\n }\n}\n\nfunction isFunctionInProgram (function_called_obj) {\n if (function_called_obj.name) {\n if (window.program_obj.functions) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i] == function_called_obj) {\n return window.program_obj.functions[i];\n }\n }\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_called_obj.name) {\n return window.program_obj.functions[i];\n }\n }\n }\n } else if (function_called_obj.identifier) {\n for (var i = 0; i < window.system_functions.length; i++) {\n if (\n window.system_functions[i].identifier == function_called_obj.identifier\n ) {\n return window.system_functions[i];\n }\n }\n }\n\n return null;\n}\n\nfunction isVarInProgram (var_obj, function_obj) {\n // Verify in locals:\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i] == var_obj) {\n return function_obj.variables_list[i];\n }\n }\n }\n // Verify in parameters:\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i] == var_obj) {\n return function_obj.parameters_list[i];\n }\n }\n }\n // Verify in globals:\n if (window.program_obj.globals) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i] == var_obj) {\n return window.program_obj.globals[i];\n }\n }\n }\n\n // If not found, verify if the reference was lost\n if (var_obj) {\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i].name == var_obj.name) {\n return function_obj.variables_list[i];\n }\n }\n }\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i].name == var_obj.name) {\n return function_obj.parameters_list[i];\n }\n }\n }\n if (window.program_obj.globals) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == var_obj.name) {\n return window.program_obj.globals[i];\n }\n }\n }\n }\n\n return null;\n}\n\nfunction renderPreviousContent (\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n) {\n if (ref_object.function_called) {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else if (ref_object.content.type) {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n }\n}\n\nfunction variableValueMenuCode (\n command,\n variable_obj,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n) {\n if (variable_obj.content || variable_obj.function_called) {\n // Verificar se a variável ainda existe:\n const var_fun = isVarInProgram(variable_obj.content, function_obj);\n\n if (var_fun) {\n variable_obj.content = var_fun;\n } else {\n if (variable_obj.content && variable_obj.content.type) {\n variable_obj.content = null;\n appendSelectText(variable_obj, menu_var_or_value);\n }\n }\n } else {\n appendSelectText(variable_obj, menu_var_or_value);\n }\n\n if (variable_obj.content == null && variable_obj.function_called == null) {\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n return;\n }\n\n const ret = \"\";\n if (variable_obj.function_called) {\n if (\n variable_obj.function_called.parameters_list == null ||\n variable_obj.function_called.length == 0\n ) {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (variable_obj.function_called.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n variable_obj.function_called.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n } else {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (variable_obj.function_called.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n variable_obj.function_called.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n parameters_menu +=\n '<div class=\"render_style_param parameter_' + j + '\"></div>';\n if (j + 1 != variable_obj.function_called.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n renderMenu(\n command,\n variable_obj.parameters_list[j],\n parameters_menu.find(\".parameter_\" + j),\n function_obj,\n 2,\n expression_element\n );\n }\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(parameters_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n } else if (variable_obj.content.type) {\n let variable_render = \"\";\n\n if (variable_obj.content.dimensions == 1 && variable_obj.dimensions != 1) {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n if (variable_obj.reference_dimensions >= 1)\n variable_render += '';\n else\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n if (!variable_obj.column) {\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n if (variable_obj.reference)\n temp.reference_parent = true\n variable_obj.column = temp;\n }\n\n variableValueMenuCode(\n command,\n variable_obj.column,\n $(variable_render.find(\".column_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2\n ) {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n \n variable_render +=\n ' <span>[ </span> <div class=\"row_container\"></div> <span> ]</span>';\n\n if (variable_obj.reference_dimensions == 0)\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ] </span>';\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n if (!variable_obj.column) {\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (variable_obj.reference)\n temp.reference_parent = true\n\n variable_obj.column = temp\n }\n if (!variable_obj.row) {\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (variable_obj.reference)\n temp.reference_parent = true\n\n variable_obj.row = temp\n }\n\n variableValueMenuCode(\n command,\n variable_obj.row,\n $(variable_render.find(\".row_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n\n if (variable_obj.reference_dimensions == 1) {\n variable_obj.column = null\n } else {\n variableValueMenuCode(\n command,\n variable_obj.column,\n $(variable_render.find(\".column_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n }\n } else {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n console.log('dom_object6');\n console.log(dom_object);\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n } else {\n let variable_render;\n\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">';\n\n if (isNaN(variable_obj.content)) {\n variable_render += variable_obj.content.split(\" \").join(\" \");\n } else {\n variable_render += variable_obj.content;\n }\n\n variable_render += \"</span>\";\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n if (variable_obj.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n context_menu.insertAfter(variable_render);\n }\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".context_menu_clear\").remove();\n dom_object.find(\".width-dynamic-minus\").remove();\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n variable_render.on(\"click\", function (e) {\n variable_render.remove();\n variable_render.empty();\n variable_render.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n }\n}\n\nfunction addIVProgFunctionsToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_functions\");\n sub_menu.append(\n '<div class=\"divider\"></div><div class=\"header\">' +\n LocalizedStrings.getUI(\"text_header_ivprog_functions\") +\n \"</div>\"\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_math\") +\n '<div class=\"menu menu_math_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_text\") +\n '<div class=\"menu menu_text_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_array\") +\n '<div class=\"menu menu_arrangement_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_conversion\") +\n '<div class=\"menu menu_conversion_functions\"></div></div>'\n );\n\n // Insert Math functions:\n for (let i = 0; i < window.system_functions.length; i++) {\n const t = $('<div class=\"item\"></div>');\n t.data(\"function_reference\", window.system_functions[i]);\n t.data(\"option\", VAR_OR_VALUE_TYPES.only_function);\n t.text(\n LocalizedStrings.translateInternalFunction(\n window.system_functions[i].identifier\n )\n );\n\n switch (window.system_functions[i].category) {\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.math:\n sub_menu.find(\".menu_math_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.text:\n sub_menu.find(\".menu_text_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement:\n sub_menu.find(\".menu_arrangement_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion:\n sub_menu.find(\".menu_conversion_functions\").append(t);\n break;\n }\n }\n}\n\nfunction addFunctionsToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_functions\");\n sub_menu.text(\"\");\n\n for (let i = 0; i < window.program_obj.functions.length; i++) {\n const temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_function +\n '\">' +\n window.program_obj.functions[i].name +\n \" </div>\"\n );\n temp.data(\"function_reference\", window.program_obj.functions[i]);\n sub_menu.append(temp);\n }\n}\n\nfunction addVariablesToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_vars\");\n sub_menu.text(\"\");\n let is_there = false;\n\n if (window.program_obj.globals) {\n if (ref_object.include_constant) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n window.program_obj.globals[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", window.program_obj.globals[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n } else {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (!window.program_obj.globals[i].is_constant) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n window.program_obj.globals[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", window.program_obj.globals[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n }\n }\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n function_obj.parameters_list[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", function_obj.parameters_list[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n function_obj.variables_list[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", function_obj.variables_list[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n if (!is_there) {\n sub_menu.append(\n $(\n '<div class=\"header\">' +\n LocalizedStrings.getUI(\"text_no_variable\") +\n \"</div>\"\n )\n );\n sub_menu.append(\n $(\n '<div class=\"item disabled\">' +\n LocalizedStrings.getUI(\"text_no_variable_instruction\") +\n \"</div>\"\n )\n );\n }\n}\n\nfunction addHandlers (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n) {\n if (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value.dropdown({\n onChange: function (value, text, $selectedItem) {\n dom_object.find(\".var_name\").remove();\n switch ($selectedItem.data(\"option\")) {\n case VAR_OR_VALUE_TYPES.only_function:\n openInputToFunction(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $($selectedItem).data(\"function_reference\"),\n expression_element\n );\n break;\n\n case VAR_OR_VALUE_TYPES.only_value:\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n break;\n\n case VAR_OR_VALUE_TYPES.only_variable:\n openInputToVariable(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $($selectedItem).data(\"variable_reference\"),\n expression_element\n );\n break;\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n\n if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n RepeatNTimesManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n\n dom_object\n .find(\".width-dynamic\")\n .on(\"input\", function () {\n const inputWidth = $(this).textWidth() + 10;\n $(this).focus();\n\n const tmpStr = $(this).val();\n $(this).val(\"\");\n $(this).val(tmpStr);\n\n $(this).css({\n width: inputWidth,\n });\n })\n .trigger(\"input\");\n\n if (command.type == Models.COMMAND_TYPES.comment) {\n dom_object.parent().on(\"click\", function (e) {\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".value_rendered\").empty();\n dom_object.find(\".value_rendered\").remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n }\n}\n\nfunction openInputToFunction (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n function_selected,\n expression_element\n) {\n ref_object.function_called = function_selected;\n ref_object.parameters_list = [];\n\n if (\n function_selected.parameters_list != null &&\n function_selected.parameters_list.length > 0\n ) {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n if (function_selected.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n function_selected.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \"</i> <span> ( </span>\";\n }\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n parameters_menu +=\n '<div class=\"render_style_param parameter_' + j + '\"></div>';\n if (j + 1 != function_selected.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n var temp;\n if (function_selected.parameters_list[j].dimensions > 0) {\n temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.variable_and_function,\n null,\n null,\n null,\n true,\n function_selected.parameters_list[j].dimensions\n );\n } else {\n temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n\n if (function_selected.parameters_list[j].reference == true) {\n temp.reference = true;\n temp.variable_and_value = VAR_OR_VALUE_TYPES.only_variable;\n } else {\n temp.reference = false;\n temp.variable_and_value = VAR_OR_VALUE_TYPES.all;\n }\n temp.reference_dimensions = function_selected.parameters_list[j].dimensions\n \n ref_object.parameters_list.push(temp);\n renderMenu(\n command,\n temp,\n parameters_menu.find(\".parameter_\" + j),\n function_obj,\n 2,\n expression_element\n );\n }\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n } else {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (function_selected.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n function_selected.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n }*/\n}\n\nfunction openInputToVariable (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n variable_selected,\n expression_element\n) {\n ref_object.content = variable_selected;\n\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n let variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_selected.name +\n \"</span>\";\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n \n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n variable_render +=\n ' <span>[ </span> <div class=\"row_container\"></div> <span> ]</span> ';\n \n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n \n }\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n if (ref_object.reference)\n temp.reference_parent = true\n\n ref_object.column = temp\n\n renderMenu(\n command,\n ref_object.column,\n variable_render.find(\".column_container\"),\n function_obj,\n 2,\n expression_element\n );\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (ref_object.reference)\n temp.reference_parent = true\n\n ref_object.row = temp\n\n renderMenu(\n command,\n ref_object.row,\n variable_render.find(\".row_container\"),\n function_obj,\n 2,\n expression_element\n );\n\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (ref_object.reference)\n temp.reference_parent = true\n\n ref_object.column = temp\n \n renderMenu(\n command,\n ref_object.column,\n variable_render.find(\".column_container\"),\n function_obj,\n 2,\n expression_element\n );\n }\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n console.log(\"dom_object 10: \");\n console.log(dom_object);\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".variable_rendered\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n\n if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n RepeatNTimesManagement.manageClearExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected);\n }*/\n}\n\nfunction openInputToValue (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n) {\n if (ref_object.content == null) {\n ref_object.content = \"\";\n }\n\n menu_var_or_value.find(\".text\").text(\" \");\n const field = $(\n '<input type=\"text\" size=\"2\" class=\"width-dynamic-minus\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" />'\n );\n field.insertBefore(dom_object.find(\".menu_var_or_value_dom\"));\n\n\n field.on('input', function() {\n var input_field = $(this);\n var inputWidth = input_field.textWidth()+10;\n inputWidth = inputWidth<50?50:inputWidth;\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n const rendered = $('<div class=\"value_rendered\"></div>');\n rendered.insertBefore(field);\n\n field.focus();\n field.val(ref_object.content);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n if (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n context_menu.insertAfter(field);\n }\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".context_menu_clear\").remove();\n dom_object.find(\".width-dynamic-minus\").remove();\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n dom_object.find(\".width-dynamic-minus\").focusout(function () {\n /*if (\n $(this)\n .val()\n .trim()\n ) {\n ref_object.content = $(this)\n .val()\n .trim();\n }*/\n ref_object.content = $(this)\n .val();\n\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.split(\" \").join(\" \"));\n } else {\n rendered.text(ref_object.content);\n }\n $(this).remove();\n });\n\n dom_object.find(\".width-dynamic-minus\").on(\"keydown\", function (e) {\n const code = e.keyCode || e.which;\n if (code == 13) {\n /*if (\n $(this)\n .val()\n .trim()\n ) {\n ref_object.content = $(this)\n .val()\n .trim();\n }*/\n ref_object.content = $(this)\n .val();\n\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.split(\" \").join(\" \"));\n } else {\n rendered.text(ref_object.content);\n }\n\n $(this).remove();\n }\n if (code == 27) {\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.split(\" \").join(\" \"));\n } else {\n rendered.text(ref_object.content);\n }\n\n $(this).remove();\n }\n });\n\n if (command.type == Models.COMMAND_TYPES.comment) {\n /*rendered.parent().on('click', function(e) {\n rendered.parent().off();\n console.log(\"TTT14\");\n rendered.remove();\n rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n });*/\n }\n\n rendered.on(\"click\", function (e) {\n rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n }*/\n}\n\n$.fn.textWidth = function (text, font) {\n if (!$.fn.textWidth.fakeEl)\n $.fn.textWidth.fakeEl = $(\"<span>\")\n .hide()\n .appendTo(document.body);\n\n $.fn.textWidth.fakeEl\n .text(text || this.val() || this.text() || this.attr(\"placeholder\"))\n .css(\"font\", font || this.css(\"font\"));\n\n return $.fn.textWidth.fakeEl.width();\n};\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui whiletrue created_element\"> <i class=\"ui icon small sync\"></i> <span> ' + LocalizedStrings.getUI('text_command_while') + ' ( x < 10 ) <br> </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui whiletrue command_container\"> <i class=\"ui icon small sync command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i><button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_while') + ' </span>';\n\tret += '<span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"textual_expression\"></span> <span class=\"span_command_spec\"> ) </span>';\n\tret += ' </span>';\n\tret += ' <i class=\"ui icon i cursor button_write_expression\" style=\"margin-right: 1rem !important;\"></i> <i class=\"ui icon unlock button_alternate_expression\"></i> <div class=\"ui context_menu\"></div>';\n\tret += '<div class=\"ui block_commands\">';\n\tret += '</div>';\n\tret += '<span> </span>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, whiletrue_dom) {\n\n\twhiletrue_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(whiletrue_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(whiletrue_dom.find('.conditional_expression')[0]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(whiletrue_dom.find('.textual_expression')[0]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tconsole.log('focosout event!');\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\twhiletrue_dom.find('.minimize_block_button').on('click', function(evt){\n\t\twhiletrue_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(whiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\twhiletrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(whiletrue_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(whiletrue_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(whiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\twhiletrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\twhiletrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\twhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, whiletrue_dom)) {\n\t\t\twhiletrue_dom.fadeOut(400, function() {\n\t\t\t\twhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as VariableValueMenu from \"./variable_value_menu\";\nimport * as VariableValueMenuManagement from \"./variable_value_menu\";\nimport * as CommandsManagement from \"../commands\";\nimport * as GenericExpressionManagement from \"./generic_expression\";\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n return $(\n '<div class=\"ui writer created_element\"> <i class=\"ui icon small upload\"></i> <span> ' +\n LocalizedStrings.getUI(\"text_command_write\") +\n \" var </span></div>\"\n );\n}\n\nexport function renderCommand (command, function_obj) {\n const ret = `<div class=\"ui writer command_container\">\n <i class=\"ui icon small upload command_drag\"></i>\n <i class=\"ui icon times red button_remove_command\"></i>\n <span class=\"span_command_spec\">${LocalizedStrings.getUI(\n \"text_command_write\"\n )}\n ( </span><div class=\"all_elements_write\"></div> <span class=\"textual_expression\"></span>\n <span class=\"close_parentheses span_command_spec\">)</span>\n <img data-state=\"${command.newline ? \"on\" : \"false\"}\" src=\"${\n command.newline ? \"img/new_line.svg\" : \"img/no_new_line.svg\"\n }\" class=\"ivprog_newline_btn\"/> \n <i class=\"ui icon i cursor button_write_expression\" style=\"margin-left: 3rem !important; margin-right: -1.1rem !important;\"></i> \n <i class=\"ui icon unlock button_alternate_expression\"></i>\n </div>`;\n const el = $(ret);\n el.data(\"command\", command);\n\n //renderExpression (command, function_obj, div_to_render, expression_array)\n\n GenericExpressionManagement.renderExpression(\n command,\n function_obj,\n el.find(\".all_elements_write\"),\n command.content\n );\n\n \n addHandlers(command, function_obj, el);\n\n if (command.content && command.lockexpression) {\n try {\n var text = CodeGenerator.elementExpressionCode(command.content);\n if (text) {\n $(el.find('.all_elements_write')[0]).toggle();\n $(el.find('.textual_expression')[0]).text(text);\n $(el.find('.textual_expression')[0]).toggle();\n $(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n }\n } catch (e) {\n command.lockexpression = false;\n }\n }\n\n el.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n });\n el.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n return el;\n}\n\nfunction addHandlersManager (\n command,\n _function_obj,\n _writer_dom,\n item_div,\n content_element\n) {\n item_div.find(\".times\").on(\"click\", function () {\n for (let i = 0; i < command.content.length; i++) {\n if (command.content[i] == content_element) {\n delete command.content[i];\n command.content.splice(i, 1);\n\n item_div.children().off();\n item_div.off();\n item_div.fadeOut();\n\n if (command.content.length > 0) {\n item_div.next(\".icon_add_item_to_writer\").fadeOut();\n }\n break;\n }\n }\n });\n}\n\nfunction addHandlers (command, function_obj, writer_dom) {\n\n $(writer_dom.find('.textual_expression')[0]).toggle();\n\n writer_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(writer_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = writer_dom.find('.all_elements_write');\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = writer_dom.find('.textual_expression');\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.content) {\n\t\t\tif (command.content.length == 1 && command.content[0].content == null && !command.content[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.content);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('<i class=\"ui icon check circle expression-edit-confirm\"></i>');\n\t\tvar cancel_button = $('<i class=\"ui icon undo expression-edit-cancel\"></i>');\n\t\tvar input = $('<input type=\"text\" spellcheck=\"false\" autocomplete=\"off\" class=\"input-expression-field\" >');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.content = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.content = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t\n\twriter_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.content) {\n var text = CodeGenerator.elementExpressionCode(command.content);\n\t\t\tif (text) {\n\t\t\t\t$(writer_dom.find('.all_elements_write')[0]).toggle();\n\t\t\t\t$(writer_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(writer_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n }\n \n if (command.lockexpression) {\n\t\t\t\twriter_dom.find('.lock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\twriter_dom.find('.unlock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\n writer_dom.find(\".button_remove_command\").on(\"click\", function () {\n if (CommandsManagement.removeCommand(command, function_obj, writer_dom)) {\n writer_dom.fadeOut(400, function () {\n writer_dom.remove();\n });\n }\n });\n\n Sortable.create(writer_dom.find(\".all_elements_write\")[0], {\n handle: \".ellipsis\",\n animation: 100,\n ghostClass: \"ghost\",\n group: \"writer_\" + Math.floor(Math.random() * 10000000),\n draggable: \".div_parent_handler\",\n onEnd: function (evt) {\n command.content.splice(\n evt.newIndex,\n 0,\n command.content.splice(evt.oldIndex, 1)[0]\n );\n\n writer_dom.empty();\n writer_dom.replaceWith(renderCommand(command, function_obj));\n },\n });\n // Attach event handles for the newline button\n const newlineBtn = writer_dom.find(\".ivprog_newline_btn\");\n newlineBtn.on(\"click\", function () {\n const state = this.dataset.state;\n if (state === \"on\") {\n this.dataset.state = \"off\";\n command.newline = false;\n this.setAttribute(\"src\", \"img/no_new_line.svg\");\n } else {\n this.dataset.state = \"on\";\n command.newline = true;\n this.setAttribute(\"src\", \"img/new_line.svg\");\n }\n writer_dom.data(\"command\", command);\n setPopup(newlineBtn, command.newline);\n });\n // Attach jquery popup\n setPopup(newlineBtn, command.newline);\n}\n\nfunction setPopup (element, state) {\n if (element.popup(\"exists\")) {\n element.popup(\"destroy\");\n }\n const content = state\n ? LocalizedStrings.getUI(\"write_command_newline_on\")\n : LocalizedStrings.getUI(\"write_command_newline_off\");\n element.popup({\n content: content,\n delay: {\n show: 750,\n hide: 0,\n },\n });\n}\n\nfunction _addHandlerIconAdd (\n dom_object,\n command,\n function_obj,\n insert_after = false,\n after_which = null\n) {\n const icon_add_item = $(\n '<i class=\"ui icon plus square outline icon_add_item_to_writer\"></i> '\n );\n if (!insert_after) {\n dom_object.append(icon_add_item);\n } else {\n icon_add_item.insertAfter(after_which);\n }\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '<div class=\"div_parent_handler\" style=\"display:none;\"></div>'\n );\n const new_div_item = $('<div class=\"var_value_menu_div\"></div>');\n div_parent_with_handler.append(\n $('<i class=\"ui icon ellipsis vertical inverted handler\"></i>')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('<i class=\"white inverted icon times handler\"></i>')\n );\n div_parent_with_handler.insertAfter(icon_add_item);\n\n const new_related_menu = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n VariableValueMenu.renderMenu(\n command,\n new_related_menu,\n new_div_item,\n function_obj\n );\n\n addHandlerIconAdd(\n dom_object,\n command,\n function_obj,\n true,\n div_parent_with_handler\n );\n\n addHandlersManager(\n command,\n function_obj,\n dom_object,\n div_parent_with_handler,\n new_related_menu\n );\n let pos = 1;\n dom_object.find(\".icon_add_item_to_writer\").each(function () {\n if ($(this).get(0) === icon_add_item.get(0)) {\n command.content.splice(pos, 0, new_related_menu);\n } else {\n pos++;\n }\n });\n if (command.content.length == 1) {\n icon_add_item.remove();\n }\n div_parent_with_handler.fadeIn();\n });\n}\n\nexport function addContent (\n command,\n _ref_object,\n dom_object,\n _menu_var_or_value,\n function_obj,\n _ref_object_content\n) {\n if (dom_object.hasClass(\"var_value_menu_div\")) {\n const icon_add_item = $(\n '<i class=\"ui icon plus square outline icon_add_item_to_writer\"></i> '\n );\n icon_add_item.insertAfter(dom_object);\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '<div class=\"div_parent_handler\"></div>'\n );\n div_parent_with_handler.append(\n $('<i class=\"ui icon ellipsis vertical inverted handler\"></i>')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('<i class=\"white inverted icon times handler\"></i>')\n );\n\n div_parent_with_handler.insertAfter(icon_add_item);\n const new_related_menu = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n VariableValueMenu.renderMenu(\n command,\n new_related_menu,\n new_div_item,\n function_obj\n );\n\n addHandlersManager(\n command,\n function_obj,\n dom_object,\n div_parent_with_handler,\n new_related_menu\n );\n\n command.content.push(new_related_menu);\n\n if (command.content.length == 1) {\n icon_add_item.remove();\n }\n });\n }\n}\n","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as GlobalsManagement from './globals';\nimport * as VariablesManagement from './variables';\nimport * as CommandsManagement from './commands';\nimport * as CodeManagement from './code_generator';\nimport * as VariableValueMenu from './commands/variable_value_menu';\nimport { DOMConsole } from './../io/domConsole';\nimport { IVProgProcessor } from './../processor/ivprogProcessor';\nimport WatchJS from 'melanke-watchjs';\nimport { SemanticAnalyser } from '../processor/semantic/semanticAnalyser';\nimport { IVProgAssessment } from '../assessment/ivprogAssessment';\nimport * as AlgorithmManagement from './algorithm';\nimport * as Utils from './utils';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\nimport VersionInfo from './../../.ima_version.json';\nimport * as TextEditor from \"./text_editor\";\nimport { isValidIdentifier } from \"./../util/utils\";\nimport { Modes } from '../processor/modes';\n\nvar counter_new_functions = 0;\nvar counter_new_parameters = 0;\nvar ivprog_version = VersionInfo.version;\n\nconst globalChangeListeners = [];\nconst functionsChangeListeners = [];\nlet proc = null;\nlet domConsole = null;\nlet _testCases = [];\nlet isRunning = false;\nwindow.studentGrade = null;\nwindow.LocalizedStrings = LocalizedStrings;\nconst program = new Models.Program();\n\nwindow.system_functions = [];\n// Adding math functions:\nwindow.system_functions.push(new Models.SystemFunction('$sin', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$cos', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$tan', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$sqrt', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$pow', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$log', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$abs', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$negate', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$invert', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$max', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$min', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$rand', Types.REAL, 0, [],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\n// Adding text functions:\nwindow.system_functions.push(new Models.SystemFunction('$substring', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$length', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$uppercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$lowercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$charAt', Types.CHAR, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\n// Adding arrangement functions:\nwindow.system_functions.push(new Models.SystemFunction('$numElements', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 1)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixLines', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixColumns', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\n// Adding conversion functions:\nwindow.system_functions.push(new Models.SystemFunction('$isReal', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isInt', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castReal', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castInt', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castString', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castChar', Types.CHAR, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\n\nconsole.log(' ___ ___ ________ \\n / / / / / ____/ \\n / / / / / / \\n / / / / ______ ___ / /__ \\n / / / / / \\\\ / / / ___/ \\n / /______ / / / /\\\\ \\\\/ / / / \\n / / / / / / \\\\ / / /____ \\n/__________/ /___/ /___/ \\\\___/ /________/ \\n\\n Laboratório de Informática na Educação\\n http://line.ime.usp.br');\n\nconst mainFunction = new Models.Function(LocalizedStrings.getUI(\"start\"), Types.VOID, 0, [], true, false);\nmainFunction.function_comment = new Models.Comment(LocalizedStrings.getUI('text_comment_main'));\nprogram.addFunction(mainFunction);\n\nwindow.program_obj = program;\n\nwindow.generator = CodeManagement.generate;\nwindow.runCodeAssessment = runCodeAssessment;\nwindow.renderAlgorithm = AlgorithmManagement.renderAlgorithm;\nwindow.insertContext = false;\nwindow.watchW = WatchJS;\n\nWatchJS.watch(window.program_obj.globals, function(){\n if (window.insertContext) {\n setTimeout(function() {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }\n}, 1);\n\nWatchJS.watch(window.program_obj.functions, function(){\n if (window.insertContext) {\n setTimeout(function(){\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }\n}, 1);\n\nfunction addFunctionHandler () {\n\n if (window.program_obj.functions) {\n\t\tvar in_use = false;\n\t\tdo {\n\t\t\tin_use = false;\n\t\t\t\n\t\t\tvar temp_name = LocalizedStrings.getUI('new_function') + '_' + counter_new_functions;\n\n\t\t\twindow.program_obj.functions.forEach(function(el) {\n\t\t\t\tif (temp_name == el.name) {\n\t\t\t\t\tin_use = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (in_use)\n counter_new_functions++;\n\n\t\t} while (in_use);\n\t}\n\n\tconst new_function = new Models.Function(LocalizedStrings.getUI(\"new_function\") + \"_\" + counter_new_functions, Types.VOID, 0, [], false, false, [], new Models.Comment(LocalizedStrings.getUI('text_comment_start')));\n\tprogram.addFunction(new_function);\n\n\tcounter_new_functions ++;\n\n window.insertContext = true;\n registerUserEvent(new_function.name, ActionTypes.INSERT_FUNCTION);\n\n // var newe = renderFunction(new_function);\n renderFunction(new_function);\n /*newe.css('display', 'none');\n newe.fadeIn();*/\n}\n\nfunction addParameter (function_obj, function_container/*, is_from_click = false*/) {\n if (function_obj.parameters_list == null) {\n function_obj.parameters_list = [];\n }\n\n if (function_obj.parameters_list) {\n\t\tvar in_use = false;\n\t\tdo {\n\t\t\tin_use = false;\n\t\t\t\n\t\t\tvar temp_name = LocalizedStrings.getUI('new_parameter') + '_' + counter_new_parameters;\n\n\t\t\tfunction_obj.parameters_list.forEach(function(el) {\n\t\t\t\tif (temp_name == el.name) {\n\t\t\t\t\tin_use = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (in_use)\n counter_new_parameters++;\n\n\t\t} while (in_use);\n\t}\n\n const new_parameter = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI(\"new_parameter\") + \"_\" + counter_new_parameters);\n function_obj.parameters_list.push(new_parameter);\n counter_new_parameters ++;\n registerUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_PARAM, new_parameter.name, Types.INTEGER, 0);\n //var newe = renderParameter(function_obj, new_parameter, function_container);\n renderParameter(function_obj, new_parameter, function_container);\n // if (is_from_click) {\n // newe.css('display', 'none');\n // newe.fadeIn();\n // }\n}\n\nfunction updateReturnType (function_obj, new_type, new_dimensions = 0) {\n registerUserEvent(function_obj.name, ActionTypes.CHANGE_FUNCTION_RETURN, new_type, new_dimensions);\n function_obj.return_type = new_type;\n function_obj.return_dimensions = new_dimensions;\n}\n\nfunction removeFunction (function_obj) {\n var index = program.functions.indexOf(function_obj);\n if (index > -1) {\n registerUserEvent(function_obj.name, ActionTypes.REMOVE_FUNCTION);\n program.functions.splice(index, 1);\n }\n}\n\nfunction minimizeFunction (function_obj) {\n function_obj.is_hidden = !function_obj.is_hidden;\n}\n\nfunction addHandlers (function_obj, function_container) {\n\n function_container.find('.ui.dropdown.function_return').dropdown({\n onChange: function(value, text, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateReturnType(function_obj, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n } else {\n updateReturnType(function_obj, Types[$selectedItem.data('type')]);\n }\n },\n selectOnKeydown: false\n });\n\n function_container.find( \".name_function_updated\" ).on('click', function(e){\n enableNameFunctionUpdate(function_obj, function_container);\n });\n\n function_container.find( \".add_parameter_button\" ).on('click', function(e){\n window.insertContext = true;\n addParameter(function_obj, function_container, true);\n });\n\n function_container.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\n function_container.find('.menu_commands a').on('click', function(evt){\n if (function_obj.commands == null || function_obj.commands.length == 0) {\n function_obj.commands = [];\n var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n function_obj.commands.push(new_cmd);\n\n CommandsManagement.renderCommand(new_cmd, function_container.find('.commands_list_div'), 3, function_obj);\n registerUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, $(this).data('command'), '/', 0);\n } else {\n CommandsManagement.createFloatingCommand(function_obj, function_container, $(this).data('command'), evt);\n }\n\n });\n\n function_container.find('.add_var_button_function').on('click', function(e){\n window.insertContext = true;\n VariablesManagement.addVariable(function_obj, function_container, true);\n });\n\n function_container.find('.remove_function_button').on('click', function(e){\n removeFunction(function_obj);\n function_container.fadeOut();\n });\n\n function_container.find('.minimize_function_button').on('click', function(e){\n minimizeFunction(function_obj);\n if (function_obj.is_hidden) {\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n function_container.find(\".function_area\").slideToggle();\n } else {\n function_container.find(\".function_area\").slideToggle(function(){\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n });\n }\n \n });\n}\n\n// Essa função imprime o tipo de retorno da função e cria o menu do tipo 'select' para alteração\nfunction renderFunctionReturn (function_obj, function_element) {\n\n var ret = '<div class=\"ui dropdown function_return\">';\n \n if (function_obj.return_dimensions == 1) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI(\"vector\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] </div>';\n } else if (function_obj.return_dimensions == 2) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI(\"matrix\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] [ ] </div>';\n } else {\n ret += '<div class=\"text\">'+LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"menu\">';\n\n for (var tm in Types) {\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions < 1 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"item ' + (function_obj.return_dimensions == 1 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n\n ret += '<div class=\"item ' + (function_obj.return_dimensions == 2 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n ret += '</div></div>';\n\n ret = $(ret);\n \n function_element.find('.function_return').append(ret);\n}\n\nvar cont = 0;\n\nexport function renderFunction (function_obj) {\n \n var appender = '<div class=\"ui secondary segment function_div list-group-item function_cont_'+cont+'\">';\n\n if (function_obj.function_comment) {\n //appender += renderComment(function_obj.function_comment, sequence, true, -1);\n }\n \n appender += '<span class=\"glyphicon glyphicon-move move_function\" aria-hidden=\"true\"><i class=\"icon sort alternate vertical\"></i></span>';\n\n appender += (function_obj.is_main ? '<div class=\"div_start_minimize_v\"> </div>' : '<button class=\"ui icon button large remove_function_button\"><i class=\"red icon times\"></i></button>')\n + '<button class=\"ui icon button tiny minimize_function_button\"><i class=\"icon window minimize\"></i></button>';\n\n appender += '<div class=\"function_signature_div\">'+LocalizedStrings.getUI(\"function\")+' ';\n\n if (function_obj.is_main) {\n appender += '<div class=\"function_name_div\"> ' + LocalizedStrings.getUI('type_void') + ' <span class=\"span_name_function\" >'+function_obj.name+'</span> </div> '\n + ' <span class=\"parethesis_function\">( </span> <div class=\"ui large labels parameters_list\">';\n } else {\n appender += '<div class=\"ui function_return\"></div>';\n\n appender += '<div class=\"function_name_div function_name_div_updated\"><span class=\"span_name_function name_function_updated\">'+function_obj.name+'</span> </div> ' \n + ' <span class=\"parethesis_function\"> ( </span> <i class=\"ui icon plus square outline add_parameter_button\"></i> <div class=\"ui large labels parameters_list container_parameters_list\">';\n }\n \n appender += '</div> <span class=\"parethesis_function\"> ) </span> </div>'\n + (function_obj.is_hidden ? ' <div class=\"function_area\" style=\"display: none;\"> ' : ' <div class=\"function_area\"> ');\n\n appender += '<div class=\"ui add_var_context add_var_button_function\" style=\"float: left;\"> <div class=\"ui icon button purple\"> ';\n\n appender += '<i class=\"icons\"><i class=\"icon superscript\" style=\"margin-top: -2px;margin-bottom: 2px;margin-left: 1px;margin-right: 1px;\"></i><i class=\"corner add icon inverted\" style=\"font-size: 9px;padding-top: 6px;padding-left: 9px;\"></i></i>';\n\n appender += '</div></div>';\n\n appender += '<div class=\"ui top attached segment variables_list_div\"></div>';\n\n appender += '<div class=\"ui bottom attached segment commands_list_div commands_cont_'+cont+'\">'\n + '<div class=\"ui rail\" style=\"width: 35px; margin-left: -36px;\"><div class=\"ui sticky sticky_cont_'+cont+'\" style=\"top: 50px !important;\">';\n\n\n appender += '<div class=\"ui icon button dropdown menu_commands orange\" > '\n + '<i class=\"icons\"><i class=\"icon code\" style=\"margin-top: -1px;margin-bottom: 1px;margin-right: 0px;\"></i><i class=\"corner add icon inverted\" style=\"font-size: 9px;padding-top: 6px;padding-left: 9px;\"></i></i>'\n + '<div class=\"menu\"> ';\n appender += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.reader+'\"><i class=\"download icon\"></i> ' +LocalizedStrings.getUI('text_read_var')+ '</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.writer+'\"><i class=\"upload icon\"></i> '+LocalizedStrings.getUI('text_write_var')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.comment+'\"><i class=\"quote left icon\"></i> '+LocalizedStrings.getUI('text_comment')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.attribution+'\"><i class=\"arrow left icon\"></i> '+LocalizedStrings.getUI('text_attribution')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.functioncall+'\"><i class=\"hand point right icon\"></i> '+LocalizedStrings.getUI('text_functioncall')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.iftrue+'\" ><i class=\"random icon\"></i> '+LocalizedStrings.getUI('text_iftrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.repeatNtimes+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_repeatNtimes')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.whiletrue+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_whiletrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.dowhiletrue+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_dowhiletrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.switch+'\"><i class=\"list icon\"></i> '+LocalizedStrings.getUI('text_switch')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.return+'\"><i class=\"reply icon\"></i> '+LocalizedStrings.getUI('text_btn_return')+'</a>'\n + '</div></div>';\n\n\n appender += '</div></div>'\n +'</div>';\n\n appender += '</div></div>';\n\n appender = $(appender);\n\n $('.all_functions').append(appender);\n\n appender.data('fun', function_obj);\n appender.find('.commands_list_div').data('fun', function_obj);\n\n renderFunctionReturn(function_obj, appender);\n\n addHandlers(function_obj, appender);\n\n // Rendering parameters: \n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n renderParameter(function_obj, function_obj.parameters_list[j], appender);\n }\n\n // Rendering variables:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n VariablesManagement.renderVariable(appender, function_obj.variables_list[j], function_obj);\n }\n // Rendering commands:\n for (var j = 0; j < function_obj.commands.length; j++) {\n CommandsManagement.renderCommand(function_obj.commands[j], $(appender.find('.commands_list_div')[0]), 3, function_obj);\n }\n\n appender.find('.minimize_function_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_hide_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('.move_function').popup({\n content : LocalizedStrings.getUI(\"btn_drag_and_drop_function\"),\n delay: {\n show: 1000,\n hide: 0\n }\n });\n\n appender.find('.remove_function_button').popup({\n content : LocalizedStrings.getUI(\"btn_delete_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n \n appender.find('.add_var_button_function').popup({\n content : LocalizedStrings.getUI(\"btn_add_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"attribution\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_attribution\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"functioncall\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_call_function\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"iftrue\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_if_else\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"comment\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_comments\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"reader\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_read\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"writer\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_write\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"repeatNtimes\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_n_times\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"whiletrue\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_whiletrue\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"dowhiletrue\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_dowhiletrue\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"switch\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_switch\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"return\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_return\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n var function_index = program.functions.indexOf(function_obj);\n\n Sortable.create(appender.find(\".variables_list_div\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'local_vars_drag_' + function_index,\n onEnd: function (evt) {\n updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n\n addSortableHandler(appender.find(\".commands_list_div\")[0], function_index);\n\n if (!function_obj.is_main) {\n Sortable.create(appender.find(\".container_parameters_list\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'parameters_drag_' + program.functions.indexOf(function_obj),\n onEnd: function (evt) {\n updateSequenceParameters(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n }\n\n if (function_obj.commands.length > 0) {\n var teste = '.ui.sticky.sticky_cont_'+cont;\n $(teste).sticky({\n context: '.ui.bottom.attached.segment.commands_list_div.commands_cont_'+cont,\n scrollContext: '.ivprog_visual_panel',\n observeChanges: true,\n offset: 40,\n onStick: function (evt) {\n $(teste).css('top', '20px', 'important');\n }, \n onBottom: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onUnstick: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onReposition: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onScroll: function (evt) {\n $(teste).css('top', '20px', 'important');\n if (!isVisible($(teste), $(teste).parent())) {\n $(teste).removeClass('fixed');\n }\n },\n onTop: function (evt) {\n $(teste).css('top', '20px', 'important');\n }\n });\n }\n \n cont ++;\n\n appender.find('.add_parameter_button').popup({\n content : LocalizedStrings.getUI(\"text_add_parameters\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n return appender;\n}\n\nfunction isVisible (element, container) {\n\n var elementTop = $(element).offset().top,\n elementHeight = $(element).height(),\n containerTop = $(container).offset().top,\n containerHeight = $(container).height() - 30;\n\n return ((((elementTop - containerTop) + elementHeight) > 0)\n && ((elementTop - containerTop) < containerHeight));\n}\n\n\nwindow.evento_drag;\n\nfunction updateProgramObjDrag () {\n const nodes = Array.prototype.slice.call( $('.all_functions').children() );\n let function_index;\n var start_index;\n let function_obj;\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function (index) {\n const ref = $(this);\n if (ref.hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n start_index = index;\n function_obj = ref;\n }\n });\n\n const path_target = [];\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function () {\n if ($(this).hasClass('command_container')) {\n path_target.push(this);\n }\n });\n if (path_target.length == 0) {\n //console.log('soltou na raiz, na posição: ' + evento_drag.newIndex + ' mas ainda não sei de onde saiu ');\n } else {\n //console.log('soltou dentro de algum bloco, sequência vem logo abaixo (de baixo pra cima): ');\n //console.log(path_target);\n }\n\n var index_each = [];\n var path_relative = [];\n for (var i = path_target.length - 1; i >= 0; i --) {\n if (i == (path_target.length - 1)) { // está na raiz\n var indice_na_raiz = function_obj.find('.command_container').index(path_target[i]);\n } else {\n if ($(path_target[i + 1]).hasClass('iftrue')) {\n if ($(path_target[i]).parent().hasClass('commands_if')) {\n path_relative.push('if');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n } else {\n path_relative.push('else');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n }\n } else if ($(path_target[i + 1]).hasClass('dowhiletrue')) {\n path_relative.push('dowhiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('repeatNtimes')) {\n path_relative.push('repeatNtimes');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('whiletrue')) {\n path_relative.push('whiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('switch')) {\n path_relative.push('switch');\n //index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n }\n }\n }\n // var index_in_block = -1;\n const is_in_else = $(evento_drag.item).parent().hasClass('commands_else');\n\n // index_in_block = $(evento_drag.item).parent().find('.command_container').index(evento_drag.item);\n\n const is_in_case_switch = $(evento_drag.item).parent().hasClass('case_commands_block');\n \n // encontrar o elemento na árvore:\n\n var command_start_point = window.program_obj.functions[function_index].commands[indice_na_raiz];\n var block_to_insert = command_start_point;\n for (var i = 0; i < index_each.length; i++) {\n if (path_relative[i] == \"else\") {\n block_to_insert = block_to_insert.commands_else[index_each[i]];\n } else if (path_relative[i] == \"switch\") {\n\n } else {\n block_to_insert = block_to_insert.commands_block[index_each[i]]\n }\n }\n\n //console.log('command_start_point', command_start_point);\n //console.log('block_to_insert', block_to_insert);\n\n // agora tem que alocar o comando na árvore, mas considerar as quatro situações:\n // (1) se está em um else ou (2) se está em switch ou (3) será um caso padrão ou (4) se será na raiz.\n \n if (path_target.length == 0) { // soltou na raiz:\n window.program_obj.functions[function_index].commands.splice(evento_drag.newIndex - 1, 0, command_in_drag);\n } else if (is_in_else) {\n if (block_to_insert.commands_else) {\n block_to_insert.commands_else.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_else = [];\n block_to_insert.commands_else.push(command_in_drag);\n }\n } else if (is_in_case_switch) {\n\n } else {\n // verificar se tem alguma coisa no bloco:\n if (block_to_insert.commands_block) {\n block_to_insert.commands_block.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_block = [];\n block_to_insert.commands_block.push(command_in_drag);\n }\n }\n\n window.draging = false;\n renderAlgorithm();\n \n\n}\n\nfunction prepareDragHandler (evt) {\n window.draging = true;\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n command_in_drag = $(evt.item).data(\"command\");\n\n //console.log('$(evt.item).parent(): ');\n //console.log($(evt.item).parent());\n\n // descobrir qual das quatro situações:\n if ($(evt.item).parent().hasClass('commands_list_div')) { // está na raiz:\n if (function_obj.commands.indexOf(command_in_drag) > -1) {\n function_obj.commands.splice(function_obj.commands.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('commands_else')) { // está no else:\n if ($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_else.splice($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('case_commands_block')) { // está em um switch:\n\n } else { // caso padrão:\n if ($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_block.splice($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag), 1);\n }\n }\n\n}\n\nvar command_in_drag;\n\nfunction addSortableHandler (element, id_function) {\n \n var n_group = 'commands_drag_' + id_function;\n Sortable.create(element, {\n handle: '.command_drag',\n ghostClass: 'ghost',\n animation: 300,\n group: {name: n_group},\n onEnd: function (evt) {\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n registerUserEvent(function_obj.name, ActionTypes.MOVE_COMMAND, $(evt.item).data('command').type, '/', 'from: ' + evt.oldIndex + ' to: ' + evt.newIndex);\n //updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n var itemEl = evt.item; // dragged HTMLElement\n evt.to; // target list\n evt.from; // previous list\n evt.oldIndex; // element's old index within old parent\n evt.newIndex; // element's new index within new parent\n //console.log('::EVT::');\n //console.log(evt);\n\n window.evento_drag = evt;\n\n try {\n updateProgramObjDrag();\n } catch (e) {\n console.error(e);\n window.draging = false;\n }\n },\n onStart: function (evt) {\n //console.log(\"START::EVT::\");\n //console.log(evt);\n //console.log(\"\\n\\ncommand_in_drag\");\n try {\n prepareDragHandler(evt);\n } catch (e) {\n window.draging = false;\n }\n }\n });\n element = $(element);\n element.find(\".iftrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n addSortableHandler($(this).find(\".block_commands\")[1], id_function);\n });\n\n element.find(\".repeatNtimes\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".dowhiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".whiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".switch\").each(function( index ) {\n\n $(this).find(\".case_div\").each(function( index ) {\n addSortableHandler($(this).find(\".case_commands_block\")[0], id_function);\n });\n\n }); \n}\n\nexport function initVisualUI () {\n // MUST USE CONST, LET, OR VAR !!!!!!\n // const mainDiv = $('#visual-main-div');\n // fill mainDiv with functions and globals...\n // renderAlgorithm()...\n domConsole = new DOMConsole(\"ivprog-term-div\");\n domConsole.hide();\n $(document.getElementById(\"ivprog-term-div\")).draggable()\n $('.add_function_button').on('click', () => {\n addFunctionHandler();\n }).popup({\n content : LocalizedStrings.getUI(\"text_add_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n $('.add_global_button').on('click', () => {\n window.insertContext = true;\n GlobalsManagement.addGlobal(program, true);\n });\n\n $('#run_button').on('click', function () {\n showStopButton();\n runCode();\n });\n\n $('#download_file_button').on('click', function () {\n downloadFile();\n });\n\n $('#upload_file_button').on('click', function () {\n $('#ivph_file').click().off('change').change(uploadFile);\n });\n\n $('#stop_button').on('click', function () {\n showRunButton();\n stopExecution();\n });\n\n $('.visual_coding_button').on('click', () => {\n toggleVisualCoding();\n });\n\n $('.textual_coding_button').on('click', () => {\n toggleTextualCoding();\n });\n\n $('.assessment').on('click', () => {\n is_iassign = true;\n runCodeAssessment();\n });\n\n $('.div_toggle_console').on('click', () => {\n toggleConsole();\n });\n $('.expand_button').on('click', () => {\n full_screen();\n });\n $('.help_button').on('click', () => {\n window.open('https://www.usp.br/line/ivprog/', '_blank');\n });\n $('.main_title h2').prop('title', LocalizedStrings.getUI('text_ivprog_description'));\n\n var time_show = 750;\n $('.visual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_visual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.textual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_textual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.upload_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_upload\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.download_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_download\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.undo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_undo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.redo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_redo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.run_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_run\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.assessment_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_evaluate\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.help_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_help\") + ' - ' + LocalizedStrings.getUI(\"text_ivprog_version\") + ' ' + ivprog_version,\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.add_global_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_add_global\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.div_toggle_console').popup({\n content : LocalizedStrings.getUI(\"tooltip_console\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n\n Sortable.create(listWithHandle, {\n handle: '.glyphicon-move',\n animation: 100,\n ghostClass: 'ghost',\n group: 'functions_divs_drag',\n onEnd: function (evt) {\n updateSequenceFunction(evt.oldIndex, evt.newIndex);\n }\n });\n\n var listGlobalsHandle = document.getElementById(\"listGlobalsHandle\");\n Sortable.create(listGlobalsHandle, {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'globals_divs_drag',\n onEnd: function (evt) {\n updateSequenceGlobals(evt.oldIndex, evt.newIndex);\n }\n });\n\n}\n\nexport function setTestCases (testCases) {\n _testCases = testCases;\n}\n\nexport function getTestCases () {\n // Deep clone of test cases to avoid unauthorized modification\n // TODO: It may be not possible to use this once custom test are fully implemented \n return JSON.parse(JSON.stringify(_testCases));\n}\n\nvar is_iassign = false;\n\nfunction updateSequenceParameters (oldIndex, newIndex, function_obj) {\n function_obj.parameters_list.splice(newIndex, 0, function_obj.parameters_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceLocals (oldIndex, newIndex, function_obj) {\n function_obj.variables_list.splice(newIndex, 0, function_obj.variables_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceGlobals (oldIndex, newIndex) {\n program_obj.globals.splice(newIndex, 0, program_obj.globals.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceFunction (oldIndex, newIndex) {\n program_obj.functions.splice(newIndex, 0, program_obj.functions.splice(oldIndex, 1)[0]);\n}\n\nfunction runCodeAssessment () {\n if (isRunning) {\n // cannot run assessment or it's already running\n return -1;\n }\n \n let strCode = null;\n\n is_iassign = false;\n\n window.studentGrade = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n // No code, so no assessment\n return -1;\n }\n\n toggleConsole(true);\n\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n isRunning = true;\n const runner = new IVProgAssessment(data, _testCases, domConsole);\n runner.runTest().then(grade => {\n if (!is_iassign) {\n parent.getEvaluationCallback(grade);\n } else {\n is_iassign = false;\n }\n isRunning = false;\n }).catch( err => {\n console.log(err);\n isRunning = false;\n });\n } catch (error) {\n isRunning = false;\n domConsole.err(error.message);\n console.log(error);\n if (!is_iassign) {\n parent.getEvaluationCallback(0);\n } else {\n is_iassign = false;\n }\n }\n return 0;\n}\n\nfunction runCode () {\n if (isRunning) {\n return;\n }\n let strCode = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n return;\n }\n \n toggleConsole(true);\n\n // if(domConsole == null)\n // domConsole = new DOMConsole(\"#ivprog-term\");\n //$(\"#ivprog-term\").slideDown(500);\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n proc = new IVProgProcessor(data);\n proc.registerInput(domConsole);\n proc.registerOutput(domConsole);\n $(\"#ivprog-term\").addClass('ivprog-term-active');\n isRunning = true;\n proc.interpretAST().then( _ => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(proc.mode === Modes.ABORT) {\n domConsole.info(LocalizedStrings.getMessage(\"aborted_execution\")); \n } else {\n domConsole.info(LocalizedStrings.getMessage(\"success_execution\"));\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }).catch(err => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(err instanceof Error) {\n domConsole.err(err.message);\n } else {\n domConsole.err(err);\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }) \n } catch (error) {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n isRunning = false;\n proc = null;\n showRunButton();\n domConsole.err(error.message);\n console.log(error);\n return true;\n }\n return false;\n },100);\n }\n \n}\n\nfunction toggleConsole (is_running) {\n\n if (is_running) {\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n if(domConsole != null)\n domConsole.focus();\n //$('#ivprog-term').css('margin-top', '-170px');\n return;\n } else {\n domConsole.hide();\n return;\n }\n\n if ($('#ivprog-term').css('min-height') == '160px') {\n // esconder\n $('.ivprog-term-div').css('display', 'none');\n $('#ivprog-term').css('min-height', '0');\n //$('#ivprog-term').css('margin-top', '-30px');\n //$('#ivprog-term').css('padding', '5px');\n } else {\n // mostrar\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n //$('#ivprog-term').css('margin-top', '-170px');\n }\n}\n\n// function waitToCloseConsole () {\n// domConsole.info(\"Aperte qualquer tecla para fechar...\");\n// const p = new Promise((resolve, _) => {\n// domConsole.requestInput(resolve, true);\n// });\n// p.then( _ => {\n// domConsole.dispose();\n// domConsole = null;\n// $(\"#ivprog-term\").hide();\n// })\n// }\n\nfunction toggleTextualCoding () {\n let code = null;\n if (settingsProgrammingTypes != \"textual\") {\n code = CodeManagement.generate();\n if (code == null) {\n return;\n }\n }\n\n\n $('.ivprog_visual_panel').css('display', 'none');\n $('.ivprog_textual_panel').css('display', 'block');\n $('.ivprog_textual_panel').removeClass('loading');\n TextEditor.updateEditor();\n if (code != null)\n TextEditor.setCode(code);\n //$('.ivprog_textual_code').text(code);\n\n $('.visual_coding_button').removeClass('active');\n $('.textual_coding_button').addClass('active');\n}\n\nfunction toggleVisualCoding () {\n $('.ivprog_textual_panel').addClass('loading');\n $('.ivprog_textual_panel').css('display', 'none');\n $('.ivprog_visual_panel').css('display', 'block');\n\n $('.textual_coding_button').removeClass('active');\n $('.visual_coding_button').addClass('active');\n}\n\nfunction removeParameter (function_obj, parameter_obj, parameter_container) {\n registerUserEvent(parameter_obj.name, ActionTypes.REMOVE_FUNCTION_PARAM, function_obj.name);\n var index = function_obj.parameters_list.indexOf(parameter_obj);\n if (index > -1) {\n window.insertContext = true;\n function_obj.parameters_list.splice(index, 1);\n }\n $(parameter_container).fadeOut();\n}\n\nfunction updateParameterType (parameter_obj, new_type, function_name, new_dimensions = 0) {\n registerUserEvent(parameter_obj.name, ActionTypes.CHANGE_PARAM_TYPE, function_name, new_type, new_dimensions);\n parameter_obj.type = new_type;\n parameter_obj.dimensions = new_dimensions;\n\n if (new_dimensions > 0) {\n parameter_obj.rows = new_dimensions;\n parameter_obj.columns = 2;\n }\n\n}\n\nfunction renderParameter (function_obj, parameter_obj, function_container) {\n let ret = \"\";\n\n ret += '<div class=\"ui label function_name_parameter pink\"><i class=\"ui icon ellipsis vertical inverted\"></i>';\n\n if (parameter_obj.reference)\n ret += '<input type=\"checkbox\" checked class=\"by_reference\">';\n else \n ret += '<input type=\"checkbox\" class=\"by_copy\">';\n\n ret += '<div class=\"ui dropdown parameter_type\">';\n\n if (parameter_obj.dimensions > 0) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`);\n if (parameter_obj.dimensions == 1) {\n ret += ' [ ] ';\n } else {\n ret += ' [ ] [ ] ';\n }\n ret += '</div>';\n } else {\n ret += '<div class=\"text\">'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"menu\">';\n\n \n for (const tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"item ' + (parameter_obj.dimensions == 1 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n\n ret += '<div class=\"item ' + (parameter_obj.dimensions == 2 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n ret += '</div></div>';\n\n ret += '<div class=\"parameter_div_edit\"><span class=\"span_name_parameter label_enable_name_parameter\">'+parameter_obj.name+'</span></div> ';\n\n ret += ' <i class=\"yellow inverted icon times remove_parameter\"></i></div>';\n\n ret = $(ret);\n \n function_container.find('.container_parameters_list').append(ret);\n\n ret.find('.remove_parameter').on('click', function(e){\n removeParameter(function_obj, parameter_obj, ret);\n });\n \n ret.find('.ui.dropdown.parameter_type').dropdown({\n onChange: function(_, __, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n } else {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name);\n }\n },\n selectOnKeydown: false\n });\n\n ret.find('.parameter_div_edit').on('click', function(e){\n registerUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_PARAM_NAME, parameter_obj.name);\n enableNameParameterUpdate(parameter_obj, ret, function_obj);\n });\n\n ret.find('input:checkbox').change(function() {\n parameter_obj.reference = this.checked\n AlgorithmManagement.renderAlgorithm();\n });\n\n ret.find('.by_reference').popup({\n content : LocalizedStrings.getUI(\"text_parameter_reference\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n ret.find('.by_copy').popup({\n content : LocalizedStrings.getUI(\"text_parameter_copy\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n return ret;\n}\n\nfunction updateParameterName (parameter_var, new_name, parameter_obj_dom, function_obj) {\n \n if (parameter_var.name == new_name) {\n return;\n }\n\n if (isValidIdentifier(new_name)) {\n if (variableNameAlreadyExists(new_name, function_obj)) {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_param_duplicated', [new_name, function_obj.name]));\n } else {\n registerUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_PARAM, parameter_var.name, new_name);\n parameter_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction updateFunctionName (function_var, new_name, function_obj_dom) {\n \n if (function_var.name == new_name) {\n return;\n }\n \n if (isValidIdentifier(new_name)) {\n if (functionNameAlreadyExists(new_name)) {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_function_duplicated', [new_name]));\n } else {\n registerUserEvent(function_var.name, ActionTypes.RENAME_FUNCTION, new_name);\n function_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction functionNameAlreadyExists (function_name) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_name) {\n return true;\n }\n }\n return false;\n}\n\nvar opened_name_parameter = false;\nvar opened_input_parameter = null;\nfunction enableNameParameterUpdate (parameter_obj, parent_node, function_obj) {\n if (opened_name_parameter) {\n opened_input_parameter.focus();\n return;\n }\n opened_name_parameter = true;\n parent_node = $(parent_node);\n\n var input_field;\n\n parent_node.find('.span_name_parameter').text('');\n input_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+parameter_obj.name+\"' />\" );\n input_field.insertBefore(parent_node.find('.span_name_parameter'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input_parameter = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n\n }\n if(code == 27) {\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n }\n });\n input_field.select();\n}\n\nvar opened_name_function = false;\nvar opened_input = null;\nvar previousPadding = null;\nfunction enableNameFunctionUpdate (function_obj, parent_node) {\n if (opened_name_function) {\n opened_input.focus();\n return;\n }\n parent_node = $(parent_node);\n parent_node.find('.span_name_function').text('');\n var input_field;\n if (!previousPadding) {\n previousPadding = parent_node.find('.span_name_function').css('padding-left');\n }\n parent_node.find('.span_name_function').css('padding-left', '0');\n parent_node.find('.span_name_function').css('padding-right', '0');\n \n input_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+function_obj.name+\"' />\" );\n input_field.insertBefore(parent_node.find('.span_name_function'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n if(code == 27) {\n\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n });\n input_field.select();\n \n}\n\nexport function addFunctionChangeListener (callback) {\n functionsChangeListeners.push(callback);\n return functionsChangeListeners.length - 1;\n}\n\nexport function addGlobalChangeListener (callback) {\n globalChangeListeners.push(callback);\n return globalChangeListeners.length - 1;\n}\n\nexport function removeGlobalListener (index) {\n globalChangeListeners.splice(index, 1);\n}\n\nexport function removeFunctionListener (index) {\n functionsChangeListeners.splice(index);\n}\n\nfunction scheduleCall (callback, time) {\n const scheduled_call = () => {\n const id = setInterval(() => {\n if(callback()) {\n clearInterval(id);\n }\n }, time)\n }\n scheduled_call();\n}\n\nfunction showRunButton () {\n document.getElementById('run_button').style.display = 'inline';\n document.getElementById('stop_button').style.display = 'none';\n}\n\nfunction showStopButton () {\n document.getElementById('run_button').style.display = 'none';\n document.getElementById('stop_button').style.display = 'inline';\n}\n\nfunction stopExecution () {\n domConsole.clearPendingWrites();\n domConsole.cancelPendingInputRequests();\n if(!isRunning) {\n return;\n }\n proc.mode = Modes.ABORT;\n}\n\nfunction downloadFile() {\n \n var contentToSend = '{}\\n::algorithm::';\n\n contentToSend = generator();\n\n var date = new Date(); \n var temp = date.toISOString().split('T')[0] + \"_\" + date.toTimeString().split(' ')[0].replaceAll(':', '-');\n var blob = new Blob([contentToSend],\n { type: \"text/plain;charset=utf-8\" });\n \n saveAs(blob, \"ivprog-exported_\" + temp + \".ivph\");\n}\n\nfunction uploadFile (evt) {\n var oFReader = new FileReader();\n oFReader.readAsText(document.getElementById(\"ivph_file\").files[0]);\n oFReader.onload = function (oFREvent) {\n var txt = oFREvent.target.result;\n\n try {\n\n if (txt.indexOf(\"::algorithm::\") >= 0) {\n prepareActivityToStudent(txt, true);\n }\n else {\n ivprogCore.setPreviousAlgorithm(txt);\n window.renderAlgorithm();\n }\n\n }\n catch (e) {\n console.log(e)\n }\n };\n }","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\nimport { isValidIdentifier } from \"./../util/utils\";\nvar counter_new_globals = 0;\n\nexport function addGlobal (program, is_from_click = false) {\n\n\t// Verify if the next global name is in use:\n\tif (program.globals) {\n\t\tvar in_use = false;\n\t\tdo {\n\t\t\tin_use = false;\n\t\t\t\n\t\t\tvar temp_name = LocalizedStrings.getUI('new_global') + '_' + counter_new_globals;\n\n\t\t\tprogram.globals.forEach(function(el) {\n\t\t\t\tif (temp_name == el.name) {\n\t\t\t\t\tin_use = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (in_use)\n\t\t\t\tcounter_new_globals++;\n\n\t\t} while (in_use);\n\t}\n\n\tvar new_global = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_global') + '_' + counter_new_globals, 0);\n\tcounter_new_globals ++;\n\n\tprogram.addGlobal(new_global);\n\n\tregisterUserEvent(new_global.name, ActionTypes.INSERT_GLOBAL_VAR);\n\tvar newe = renderGlobal(new_global);\n\n\tif (is_from_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n\n}\n\nfunction toggleConstant (global_var) {\n\tglobal_var.is_constant = !global_var.is_constant;\n\tregisterUserEvent(global_var.name, ActionTypes.SET_GLOBAL_CONST);\n}\n\nfunction updateName (global_var, new_name, global_obj_dom) {\n\n\tif (global_var.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (globalNameAlreadyExists(new_name)) {\n\t\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_global_duplicated'));\n\t\t} else {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.RENAME_GLOBAL_VAR, new_name);\n\t\t\tglobal_var.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_identifier'));\n\t}\n}\n\nfunction globalNameAlreadyExists (global_name) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == global_name) {\n return true;\n }\n }\n return false;\n}\n\nfunction updateType (global_var, new_type, new_dimensions = 0) {\n\tglobal_var.type = new_type;\n\tglobal_var.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tglobal_var.rows = new_dimensions;\n\t\tglobal_var.columns = 2;\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_VAR_TYPE, new_type,\n\t\tnew_dimensions, global_var.rows, global_var.columns);\n\tupdateInitialValues(global_var);\n}\n\nfunction removeGlobal (global_var, global_container) {\n\tvar index = window.program_obj.globals.indexOf(global_var);\n\tif (index > -1) {\n\t\twindow.insertContext = true;\n\t window.program_obj.globals.splice(index, 1);\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.REMOVE_GLOBAL_VAR);\n\tglobal_container.children().off();\n\tglobal_container.off();\n\tglobal_container.fadeOut();\n}\n\nfunction updateInitialValues (global_var) {\n\tif (global_var.type == Types.INTEGER) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0, 0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.REAL) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0.0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0.0, 0.0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = true;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [true, true];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 'A';\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = ['A', 'A'];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [['A', 'A'], ['A', 'A']];\n\t\t}\n\t}\n\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.name,\n\t\tglobal_var.value);\n}\n\nfunction alternateBooleanGlobalValue (global_var, value_container) {\n\tglobal_var.value = !global_var.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value}`));\n}\n\nfunction alternateBooleanGlobalVectorValue (global_var, index, value_container) {\n\tglobal_var.value[index] = !global_var.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[index]}`));\n}\n\nfunction removeGlobalColumnVector (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addGlobalColumnVector (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tglobal_var.value.push(0);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tglobal_var.value.push(0.0);\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tglobal_var.value.push(true);\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('charvar_default_value'));\n\t}\n}\n\nfunction removeColumnGlobalMatrix (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\n\tfor (var i = 0; i < global_var.rows; i++) {\n\t\tglobal_var.value[i].splice(global_var.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnGlobalMatrix (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0);\n\t\t}\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0.0);\n\t\t}\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(true);\n\t\t}\n\t}\n\tif (global_var.type == Types.CHAR) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t}\n}\n\nfunction removeLineGlobalMatrix (global_var) {\n\tif (global_var.rows == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.rows --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addLineGlobalMatrix (global_var) {\n\tglobal_var.rows ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n}\n\nfunction alternateBooleanGlobalMatrixValue (global_var, row, index, value_container) {\n\tglobal_var.value[row][index] = !global_var.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[row][index]}`));\n}\n\nfunction renderValues (global_var, global_container) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\n\tif (global_var.dimensions == 0) {\n\t\tif (global_var.type == Types.REAL) {\n\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+parseFloat(global_var.value).toFixed(1)+'</span> </div> ';\n\t\t} else {\n\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable boolean_simple_type\">'+LocalizedStrings.getUI(`logic_value_${global_var.value}`)+'</span> </div> ';\n\t\t\t} else {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+global_var.value+'</span> </div> ';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '<table class=\"tabela_var\">';\n\n\t\tif (global_var.dimensions == 1) {\n\t\t\tret += '<tr>';\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+parseFloat(global_var.value[k]).toFixed(1)+'</span></td>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_vector_var\" data-index=\"'+k+'\">'+LocalizedStrings.getUI(`logic_value_${global_var.value[k]}`)+'</span></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+global_var.value[k]+'</span>'+'</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '</tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_vector_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_vector_column\"></i></div>';\n\t\t}\n\n\t\tif (global_var.dimensions == 2) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+parseFloat(global_var.value[l][k]).toFixed(1)+'</span>'+'</td>';\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tif (global_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+LocalizedStrings.getUI(`logic_value_${global_var.value[l][k]}`)+'</span></td>';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+global_var.value[l][k]+'</span></td>';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.rows == 0) {\n\t\t\t\tret += '<tr><td></td></tr>';\n\t\t\t}\n\t\t\tret += '<tr><td colspan=\"'+global_var.columns+'\" class=\"tr_manage_lines\"><i class=\"ui icon minus square outline remove_global_matrix_line\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_line\"></i></td></tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_matrix_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_column\"></i></div>';\n\t\t}\n\t\t\n\t}\n\n\tglobal_container.find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\tret.find('.span_value_variable').data('associatedOject', global_var);\n\n\tret.find( \".boolean_simple_type\" ).on('click', function(e){\n\t\talternateBooleanGlobalValue(global_var, this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalValueUpdate(global_var, this.parentNode);\n\t});\n\n\tret.find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalVectorValue(global_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".vector_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalVectorValueUpdate(global_var, $(this).data('index'), this.parentNode);\n\t});\n\tret.find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveGlobalColumnVector(global_var);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddGlobalColumnVector(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalMatrixValue(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalMatrixValueUpdate(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t});\n\tglobal_container.find( \".div_valor_var\" ).append(ret);\n\n\n\tupdateColumnsAndRowsText(global_container, global_var);\n\n}\n\nfunction addHandlers (global_container) {\n\tvar global_var = global_container.data('associatedOject'); \n\t// Manage constant option:\n\tglobal_container.find( \".alternate_constant\" ).on('click', function(e){\n\t\ttoggleConstant(global_var);\n\n\t\t$( this ).removeClass( \"on off\" );\n\t\tif (global_var.is_constant) {\n\t\t\t$( this ).addClass( \"on\" );\n\t\t} else {\n\t\t\t$( this ).addClass( \"off\" );\n\t\t}\n\t});\n\n\t// Manage global name: \n\tglobal_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_NAME);\n\t\tenableNameUpdate(global_container);\n\t});\n\n\t// Menu to change type:\n\tglobal_container.find('.ui.dropdown.global_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')]);\n\t \t}\n\n\t \trenderValues(global_var, global_container);\n\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove global: \n\tglobal_container.find( \".remove_global\" ).on('click', function(e){\n\t\tremoveGlobal(global_var, global_container);\n\t});\n\n\tglobal_container.find( \".ellipsis\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_move_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n\tglobal_container.find( \".remove_global\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_remove_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n}\n\nfunction updateColumnsAndRowsText (global_container, global_var) {\n\tvar prev = global_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] [ ' + global_var.rows + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n}\n\nexport function renderGlobal (global_var) {\n\n\tvar element = '<div class=\"ui label global_container pink\"><i class=\"ui icon ellipsis vertical inverted\"></i><div class=\"global_const\">const: ';\n\n\telement += '<i class=\"ui icon toggle '+(global_var.is_constant?\"on\":\"off\")+' alternate_constant\"></i></div>';\n \t\n \telement += '<div class=\"ui dropdown global_type\">';\n\n \tif (global_var.dimensions == 1) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('vector')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ <span class=\"dimensions_0\"></span> ] ';\n \t\telement += '</div>';\n \t} else if (global_var.dimensions == 2) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('matrix')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ <span class=\"dimensions_0\"></span> ] [ <span class=\"dimensions_1\"></span> ] ';\n \t\telement += '</div>';\n \t} else {\n \t\telement += '<div class=\"text\">' + LocalizedStrings.getUI(`type_${global_var.type.toLowerCase()}`) + '</div>';\n \t}\n\telement += '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n\t}\n\n\n\telement += '<div class=\"item ' + (global_var.dimensions == 1 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n\n\telement += '<div class=\"item ' + (global_var.dimensions == 2 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n element += '</div></div> <div class=\"editing_name_var\"> <span class=\"span_name_variable enable_edit_name_parameter\">'+global_var.name+'</span> </div> <span class=\"character_equals\"> <— </span> ';\n\n\telement += '<div class=\"ui div_valor_var\">'+global_var.value+'</div>'; \n\n\telement += ' <i class=\"yellow inverted icon times remove_global\"></i></div>';\n\n\tvar complete_element = $(element);\n\n\tcomplete_element.data('associatedOject', global_var);\n\n\t$('.list_globals').append(complete_element);\n\n\taddHandlers(complete_element);\n\n\trenderValues(global_var, complete_element);\n\n\tif (global_var.dimensions == 1) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t}\n\tif (global_var.dimensions == 2) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t\tcomplete_element.find('.dimensions_1').text(global_var.rows);\n\t}\n\n\treturn complete_element;\n}\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableGlobalMatrixValueUpdate (global_var, row, index, parent_node) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ parseFloat(global_var.value[row][index]).toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[row][index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[row][index]).toFixed(1));\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[row][index]).toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[row][index]).toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[row][index]).toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableGlobalValueUpdate (global_var, parent_node) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ parseFloat(global_var.value).toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t\tvar inputWidth = input_field.textWidth()+10;\n\t\topened_input_value_global_ar = input_field;\n\t\tinput_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t\tinput_field.css({\n\t\t\t\twidth: inputWidth\n\t\t})\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value).toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t} else if (global_var.type == Types.CHAR) {\n\t\t\t\t\tglobal_var.value = input_field.val().charAt(0);\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value).toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = true;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value).toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else if (global_var.type == Types.CHAR) {\n\t\t\t\t\t\tglobal_var.value = input_field.val().charAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value).toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value).toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (global_container) {\n\n\tvar global_var = global_container.data('associatedOject'); \n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tglobal_container.find('.span_name_variable').text('');\n\tvar input_name = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+global_var.name+\"' />\" );\n\tinput_name.insertBefore(global_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t opened_input_global.focus();\n\n\t opened_input_global.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t} else {\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim()) {\n\t\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t} else {\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableGlobalVectorValueUpdate (global_var, index, parent_node) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ parseFloat(global_var.value[index]).toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[index]).toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[index]).toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[index]).toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[index]).toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(parseFloat(global_var.value[index]).toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\n$.fn.textWidth = function(text, font) {\n \n if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('<span>').hide().appendTo(document.body);\n \n $.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css('font', font || this.css('font'));\n \n return $.fn.textWidth.fakeEl.width();\n};","import { Types } from \"./types\";\nimport WatchJS from \"melanke-watchjs\";\nimport * as AlgorithmManagement from \"./algorithm\";\n\nexport const COMMAND_TYPES = Object.freeze({\n function: \"function\",\n comment: \"comment\",\n reader: \"reader\",\n writer: \"writer\",\n attribution: \"attribution\",\n iftrue: \"iftrue\",\n repeatNtimes: \"repeatNtimes\",\n whiletrue: \"whiletrue\",\n dowhiletrue: \"dowhiletrue\",\n switch: \"switch\",\n switchcase: \"switchcase\",\n functioncall: \"functioncall\",\n break: \"break\",\n return: \"return\",\n});\n\nexport const ARITHMETIC_TYPES = Object.freeze({\n plus: \"plus\",\n minus: \"minus\",\n multiplication: \"multiplication\",\n division: \"division\",\n module: \"module\",\n none: \"none\",\n});\n\nexport const EXPRESSION_ELEMENTS = Object.freeze({\n exp_op_exp: \"exp_op_exp\",\n op_exp: \"op_exp\",\n par_exp_par: \"par_exp_par\",\n start_point: \"start_point\",\n});\n\nexport const EXPRESSION_TYPES = Object.freeze({\n exp_conditional: \"exp_conditional\",\n exp_logic: \"exp_logic\",\n exp_arithmetic: \"exp_arithmetic\",\n write_sep: \"write_separator\",\n});\n\nexport const ARITHMETIC_COMPARISON = Object.freeze({\n greater_than: \"greater_than\",\n less_than: \"less_than\",\n equals_to: \"equals_to\",\n not_equals_to: \"not_equals_to\",\n greater_than_or_equals_to: \"greater_than_or_equals_to\",\n less_than_or_equals_to: \"less_than_or_equals_to\",\n});\n\nexport const LOGIC_COMPARISON = Object.freeze({\n equals_to: \"equals_to\",\n not_equals_to: \"not_equals_to\",\n and: \"and\",\n or: \"or\",\n not: \"not\",\n});\n\nexport const SYSTEM_FUNCTIONS_CATEGORIES = Object.freeze({\n math: \"$mathLib\",\n text: \"$strLib\",\n arrangement: \"$arrayLib\",\n conversion: \"$langLib\",\n});\n\nexport class Variable {\n constructor (\n type,\n name,\n value,\n dimensions = 0,\n is_constant = false,\n rows = 0,\n columns = 0,\n reference = false\n ) {\n this.type = type;\n this.name = name;\n this.value = value;\n this.dimensions = dimensions;\n this.is_constant = is_constant;\n this.rows = rows;\n this.columns = columns;\n this.reference = reference;\n }\n}\n\nexport class Function {\n constructor (\n name,\n return_type = Types.VOID,\n return_dimensions = 0,\n parameters_list = [],\n is_main = false,\n is_hidden = false,\n variables_list = [],\n function_comment = null,\n commands = []\n ) {\n this.type = COMMAND_TYPES.function;\n this.name = name;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.is_main = is_main;\n this.is_hidden = is_hidden;\n this.variables_list = variables_list;\n this.function_comment = function_comment;\n this.commands = commands;\n }\n}\n\nexport class SystemFunction {\n constructor (\n identifier,\n return_type,\n return_dimensions,\n parameters_list,\n function_comment = null,\n category\n ) {\n this.type = COMMAND_TYPES.function;\n this.identifier = identifier;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.function_comment = function_comment;\n this.category = category;\n }\n}\n\nexport class Comment {\n constructor (comment_text) {\n this.type = COMMAND_TYPES.comment;\n this.comment_text = comment_text;\n }\n}\n\nexport class Break {\n constructor () {\n this.type = COMMAND_TYPES.break;\n }\n}\n\nexport class Reader {\n constructor (variable_value_menu = new VariableValueMenu()) {\n this.type = COMMAND_TYPES.reader;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class Writer {\n constructor (content, newline = true) {\n this.type = COMMAND_TYPES.writer;\n this.content = content;\n this.newline = newline;\n }\n}\n\nexport class Attribution {\n constructor (variable, expression = []) {\n this.type = COMMAND_TYPES.attribution;\n this.variable = variable;\n this.expression = expression;\n }\n}\n\nexport class ExpressionOperator {\n constructor (type_op, item) {\n this.type_op = type_op; // Logic, Arithmetic OR Relational\n this.item = item;\n }\n}\n\nexport class ExpressionElement {\n constructor (type_exp, itens = []) {\n this.type_exp = type_exp;\n this.itens = itens;\n }\n}\n\nexport class ConditionalExpression {\n constructor (expression) {\n this.type = EXPRESSION_TYPES.exp_conditional;\n this.expression = expression;\n }\n}\n\nexport class LogicExpression {\n constructor (has_neg, first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_logic;\n this.has_neg = has_neg;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class ArithmeticExpression {\n constructor (first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_arithmetic;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class IfTrue {\n constructor (expression, commands_block, commands_else) {\n this.type = COMMAND_TYPES.iftrue;\n this.expression = expression;\n this.commands_block = commands_block;\n this.commands_else = commands_else;\n }\n}\n\nexport class RepeatNTimes {\n constructor (\n var_attribution,\n var_incrementation,\n expression1,\n expression2,\n expression3,\n commands_block\n ) {\n this.type = COMMAND_TYPES.repeatNtimes;\n this.var_attribution = var_attribution;\n this.var_incrementation = var_incrementation;\n this.expression1 = expression1;\n this.expression2 = expression2;\n this.expression3 = expression3;\n this.commands_block = commands_block;\n }\n}\n\nexport class WhileTrue {\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.whiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class DoWhileTrue {\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.dowhiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class Switch {\n constructor (variable, cases = []) {\n this.type = COMMAND_TYPES.switch;\n this.variable = variable;\n this.cases = cases;\n }\n}\n\nexport class Return {\n constructor (variable_value_menu) {\n this.type = COMMAND_TYPES.return;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class SwitchCase {\n constructor (variable_value_menu, commands_block = []) {\n this.type = COMMAND_TYPES.switchcase;\n this.variable_value_menu = variable_value_menu;\n this.commands_block = commands_block;\n }\n}\n\nexport class FunctionCall {\n constructor (function_called, parameters_list) {\n this.type = COMMAND_TYPES.functioncall;\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class VariableValueMenu {\n constructor (\n variable_and_value = 7,\n content = null,\n row = null,\n column = null,\n include_constant = true,\n dimensions = 0\n ) {\n this.type = \"var_value\";\n this.variable_and_value = variable_and_value;\n this.content = content;\n this.row = row;\n this.column = column;\n this.include_constant = include_constant;\n this.dimensions = dimensions;\n }\n}\n\nexport class FunctionCallMenu {\n constructor (function_called = null, parameters_list = []) {\n this.type = \"function_call\";\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class Program {\n constructor () {\n this.functions = [];\n this.globals = [];\n }\n\n addFunction (function_to_add) {\n WatchJS.watch(\n function_to_add.parameters_list,\n function () {\n if (window.insertContext) {\n setTimeout(function () {\n AlgorithmManagement.renderAlgorithm();\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n },\n 1\n );\n\n WatchJS.watch(\n function_to_add.variables_list,\n function () {\n if (window.insertContext) {\n setTimeout(function () {\n AlgorithmManagement.renderAlgorithm();\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n },\n 1\n );\n\n this.functions.push(function_to_add);\n }\n\n addVariable (function_to_receive, variable) {\n if (this.functions[function_to_receive].variable === null) {\n this.functions[function_to_receive].variables_list = [];\n }\n this.functions[function_to_receive].variables_list.push(variable);\n }\n\n addGlobal (variable) {\n this.globals.push(variable);\n }\n}\n","import * as CodeMirror from \"codemirror\";\nimport \"codemirror/addon/edit/closebrackets\";\nimport \"codemirror/addon/edit/matchbrackets\";\n// import \"codemirror/addon/hint/show-hint\";\n// import \"codemirror/addon/hint/anyword-hint\";\nimport \"codemirror/addon/selection/active-line\";\nimport { CodeEditorMode } from \"./../util/editorMode2\"\nCodeEditorMode(CodeMirror);\n\nlet codeEditor = null;\n\nexport function initTextEditor (element) {\n let id = element;\n if (element[0] == '#') {\n id = element.substring(1);\n }\n codeEditor = CodeMirror.fromTextArea(document.getElementById(id), {\n theme: \"ttcn\",\n value: \"\",\n mode: \"text/x-ivprog\",\n indentUnit: 4,\n lineNumbers: true,\n matchBrackets: true,\n autoCloseBrackets: true,\n fixedGutter: true,\n styleActiveLine: true,\n readOnly: true\n });\n}\n\nexport function disable (flag) {\n codeEditor.setOption(\"readOnly\", flag);\n updateEditor();\n}\n\nexport function updateEditor () {\n codeEditor.refresh();\n}\n\nexport function setCode (code) {\n codeEditor.setValue(code);\n}\n\nexport function getCode () {\n return codeEditor.getValue();\n}\n","export const Types = Object.freeze({\n INTEGER: \"integer\",\n REAL: \"real\",\n TEXT: \"text\",\n CHAR: 'char',\n BOOLEAN: \"boolean\",\n VOID: \"void\"\n});","\nexport function renderErrorMessage (dom_obj_target, message_text) {\n\n\tdom_obj_target.popup({\n\t\thtml : '<i class=\"ui icon inverted exclamation triangle yellow\"></i>' + message_text,\n\t\ttransition : \"fade up\",\n\t\ton : 'click',\n \t\tclosable : true,\n \t\tmovePopup : true,\n \t\tboundary : window,\n \t\tpreserve : false,\n \t\ttarget : false,\n\t\tclassName : {\n\t\t popup : 'ui popup invalid-identifier'\n\t\t},\n\t\tonHidden : function($module) {\n\t\t\tdom_obj_target.popup('destroy');\n\t\t}\n\n\t}).popup('toggle');\n\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\nimport { isValidIdentifier } from \"./../util/utils\";\n\nvar counter_new_variables = 0;\t\n\nexport function addVariable (function_obj, function_container, is_in_click = false) {\n\n\t// Verify if the next variable name is in use:\n\tif (function_obj.variables_list) {\n\t\tvar in_use = false;\n\t\tdo {\n\t\t\tin_use = false;\n\t\t\t\n\t\t\tvar temp_name = LocalizedStrings.getUI('new_variable') + '_' + counter_new_variables;\n\n\t\t\tfunction_obj.variables_list.forEach(function(el) {\n\t\t\t\tif (temp_name == el.name) {\n\t\t\t\t\tin_use = true;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (in_use)\n\t\t\t\tcounter_new_variables++;\n\n\t\t} while (in_use);\n\t}\n\n\tvar new_var = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_variable') + '_' + counter_new_variables, 0);\n\tif (function_obj.variables_list == null) {\n\t\tfunction_obj.variables_list = [];\n\t}\n\tfunction_obj.variables_list.push(new_var);\n\n\tcounter_new_variables ++;\n\n\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_VAR, new_var.name, Types.INTEGER, 0);\n\tvar newe = renderVariable(function_container, new_var, function_obj);\n\n\tif (is_in_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n}\n\nfunction updateName (variable_obj, new_name, variable_obj_dom, function_obj) {\n\n\tif (variable_obj.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (variableNameAlreadyExists(new_name, function_obj)) {\n\t\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_variable_duplicated', [new_name, function_obj.name]));\n\t\t} else {\n\t\t\tregisterUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_VAR, variable_obj.name, new_name);\n\t\t\tvariable_obj.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_identifier'));\n\t}\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tif (function_obj.parameters_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tif (function_obj.variables_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nfunction removeVariable (variable_obj, variable_container, function_name) {\n\tvar function_associated = variable_container.data('associatedFunction');\n\tregisterUserEvent(function_name, ActionTypes.REMOVE_FUNCTION_VAR, variable_obj.name);\n\n\tvar index = function_associated.variables_list.indexOf(variable_obj);\n\tif (index > -1) {\n\t window.insertContext = true;\n\t delete function_associated.variables_list[index];\n\t function_associated.variables_list.splice(index, 1);\n\t}\n\tvariable_container.children().off();\n\tvariable_container.off();\n\tvariable_container.fadeOut();\n}\n\nfunction updateType (variable_obj, new_type, function_name, new_dimensions = 0) {\n\tvariable_obj.type = new_type;\t\t\n\tvariable_obj.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tvariable_obj.rows = new_dimensions;\n\t\tvariable_obj.columns = 2;\n\t}\n\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, variable_obj.name,\n\t\tnew_type, new_dimensions, variable_obj.rows, variable_obj.columns);\n\n\tupdateInitialValues(variable_obj, function_name);\n}\n\nfunction addHandlers (variable_obj, variable_container, function_obj) {\n\n\t// Manage variable name: \n\tvariable_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_VAR_NAME, variable_obj.name);\n\t\tenableNameUpdate(variable_obj, variable_container, function_obj);\n\t});\n\n\t// Menu to change type:\n\tvariable_container.find('.ui.dropdown.variable_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name);\n\t \t}\n\n\t \trenderValues(variable_obj, variable_container, function_obj.name);\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove variable: \n\tvariable_container.find( \".remove_variable\" ).on('click', function(e){\n\t\tremoveVariable(variable_obj, variable_container, function_obj.name);\n\t});\n\n\tvariable_container.find( \".ellipsis\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_move_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n\tvariable_container.find( \".remove_variable\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_remove_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n}\n\nexport function renderVariable (function_container, new_var, function_obj) {\n\n\tvar element = '<div class=\"ui label variable_container pink\"><i class=\"ui icon ellipsis vertical inverted\"></i>';\n\n\telement += '<div class=\"ui dropdown variable_type\">';\n\n \tif (new_var.dimensions == 1) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('vector') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] </div>';\n \t} else if (new_var.dimensions == 2) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('matrix') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] [ ] </div>';\n \t} else {\n \t\telement += '<div class=\"text\">' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`) + '</div>';\n \t}\n\telement += '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n\t}\n\n\n\telement += '<div class=\"item ' + (new_var.dimensions == 1 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n\n\telement += '<div class=\"item ' + (new_var.dimensions == 2 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n element += '</div></div> ';\n\n element += '<div class=\"editing_name_var\"><span class=\"span_name_variable enable_edit_name_variable\">'+new_var.name+'</span> </div>';\n\n\telement += ' <span class=\"character_equals\"> <— </span> <div class=\"ui div_valor_var\">'+new_var.value+'</div>'; \n\n\telement += ' <i class=\"yellow inverted icon times remove_variable\"></i></div>';\n\n\telement = $(element);\n\n\telement.data('associatedFunction', function_obj);\n\n\tfunction_container.find('.variables_list_div').append(element);\n\n\taddHandlers(new_var, element, function_obj);\n\n\trenderValues(new_var, element, function_obj.name);\n\n\treturn element;\n}\n\nfunction updateColumnsAndRowsText (variable_container, variable_var) {\n\tvar prev = variable_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] [ ' + variable_var.rows + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n}\n\nfunction renderValues (new_var, variable_container, function_name) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\t\t\n\tif (new_var.dimensions == 0) {\n\t\tif (new_var.type == Types.REAL) {\n\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+new_var.value.toFixed(1)+'</span> </div> ';\n\t\t} else {\n\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable boolean_simple_type\">'+LocalizedStrings.getUI(`logic_value_${new_var.value}`)+'</span> </div> ';\n\t\t\t} else {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+new_var.value+'</span> </div> ';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '<table class=\"tabela_var\">';\n\n\t\tif (new_var.dimensions == 1) {\n\t\t\tret += '<tr>';\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+new_var.value[k].toFixed(1)+'</span></td>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_vector_var\" data-index=\"'+k+'\">'+LocalizedStrings.getUI(`logic_value_${new_var.value[k]}`)+'</span></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+new_var.value[k]+'</span>'+'</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '</tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_vector_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_vector_column\"></i></div>';\n\t\t}\n\n\t\tif (new_var.dimensions == 2) {\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+new_var.value[l][k].toFixed(1)+'</span>'+'</td>';\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tif (new_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+LocalizedStrings.getUI(`logic_value_${new_var.value[l][k]}`)+'</span></td>';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+new_var.value[l][k]+'</span></td>';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (new_var.rows == 0) {\n\t\t\t\tret += '<tr><td></td></tr>';\n\t\t\t}\n\t\t\tret += '<tr><td colspan=\"'+new_var.columns+'\" class=\"tr_manage_lines\"><i class=\"ui icon minus square outline remove_global_matrix_line\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_line\"></i></td></tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_matrix_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_column\"></i></div>';\n\t\t}\n\t\t\n\t}\n\n\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\t$(ret).find('.span_value_variable').\t\tdata('associatedOject', new_var);\n\n\t$( ret ).find( \".boolean_simple_type\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name, new_var.value);\n\t\talternateBooleanValue(new_var, this.parentNode);\n\t});\n\t$( ret ).find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableValueUpdate(new_var, this.parentNode, function_name);\n\t});\n\n\t$( ret ).find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanVectorValue(new_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".vector_var\" ).on('click', function(e){\n\t\tenableVectorValueUpdate(new_var, $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( ret ).find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanMatrixValue(new_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableMatrixValueUpdate(new_var, $(this).data('row'), $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( variable_container ).find( \".div_valor_var\" ).append(ret);\n\n\tupdateColumnsAndRowsText(variable_container, new_var);\n\n}\n\nfunction alternateBooleanMatrixValue (var_obj, row, index, value_container) {\n\tvar_obj.value[row][index] = !var_obj.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[row][index]}`));\n}\n\nfunction addLineMatrix (var_obj) {\n\tvar_obj.rows ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.CHAR) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n}\n\nfunction removeLineMatrix (var_obj) {\n\tif (var_obj.rows == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.rows --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction addColumnMatrix (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0.0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(true);\n\t\t}\n\t}\n\tif (var_obj.type == Types.CHAR) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t}\n}\n\nfunction removeColumnMatrix (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\n\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\tvar_obj.value[i].splice(var_obj.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnVector (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar_obj.value.push(0);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar_obj.value.push(0.0);\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar_obj.value.push(true);\n\t}\n\tif (var_obj.type == Types.CHAR) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('charvar_default_value'));\n\t}\n}\n\nfunction removeColumnVector (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction alternateBooleanValue (var_obj, value_container) {\n\tvar_obj.value = !var_obj.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value}`));\n}\n\nfunction alternateBooleanVectorValue (var_obj, index, value_container) {\n\tvar_obj.value[index] = !var_obj.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[index]}`));\n}\n\nfunction updateInitialValues (variable_obj, function_name) {\n\tif (variable_obj.type == Types.INTEGER) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0, 0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.REAL) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0.0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0.0, 0.0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.TEXT) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.BOOLEAN) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = true;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [true, true];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.CHAR) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 'A';\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = ['A', 'A'];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [['A', 'A'], ['A', 'A']];\n\t\t}\n\t}\n\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, variable_obj.name, variable_obj.value);\n}\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableVectorValueUpdate (var_obj, index, parent_node, function_name) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableValueUpdate (var_obj, parent_node, function_name) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tvar input_field;\n\n\tparent_node.find('.span_value_variable').text('');\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value.toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_global_ar = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tlet changed = false;\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else{\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (variable_obj, variable_container, function_obj) {\n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tvariable_container.find('.span_name_variable').text('');\n\n\tvar input_name;\n\n\tinput_name = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+variable_obj.name+\"' />\" );\n\tinput_name.insertBefore(variable_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t input_name.focus();\t\t\t\t\t\n\n\t var tmpStr = input_name.val();\n\t\tinput_name.val('');\n\t\tinput_name.val(tmpStr);\n\n\t input_name.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t} else {\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim().length > 0) {\n\t\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t} else {\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableMatrixValueUpdate (var_obj, row, index, parent_node, function_name) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[row][index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[row][index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\t\t\t\t\t\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enLexer = void 0;\nconst lexer_1 = require(\"../lexer\");\n// i18n lexer strings for the language.\nconst types = {\n // types\n RK_REAL: \"real\",\n RK_INTEGER: \"int\",\n RK_BOOLEAN: \"bool\",\n RK_CHARACTER: \"char\",\n RK_STRING: \"string\",\n};\nconst commands = {\n // RK_VOID is not formally part of Types since it doesn't have a valid value/instance\n RK_VOID: \"vazio\",\n // commands\n RK_PROGRAM: \"program\",\n RK_SWITCH: \"switch\",\n RK_CASE: \"case\",\n RK_DEFAULT: \"otherwise\",\n RK_CONST: \"const\",\n RK_FUNCTION: \"function\",\n RK_RETURN: \"return\",\n RK_FOR: \"for\",\n RK_FOR_ALT: \"repeat_for\",\n RK_FOR_FROM: \"from\",\n RK_FOR_TO: \"to\",\n RK_FOR_PASS: \"pass\",\n RK_BREAK: \"break\",\n RK_DO: \"repeat\",\n RK_DO_UNTIL: \"until\",\n RK_WHILE: \"while\",\n RK_WHILE_ALT: \"repeat_while\",\n RK_IF: \"if\",\n RK_ELSE: \"else\",\n RK_REFERENCE: \"&\",\n};\nconst boolVal = {\n RK_FALSE: \"false\",\n RK_TRUE: \"true\",\n};\nconst logicOp = {\n RK_LOGICAL_NOT: \"not\",\n RK_LOGICAL_AND: \"AND\",\n RK_LOGICAL_OR: \"OR\",\n};\nconst langLibs = {\n $mathLib: \"Mathematics\",\n $ioLib: \"IO\",\n $strLib: \"Text\",\n $arrayLib: \"Array\",\n $langLib: \"Conversion\",\n};\nconst langFuncs = {\n main_function: \"main\",\n $read: \"read\",\n $write: \"write\",\n $numElements: \"total_of_elements\",\n $matrixLines: \"total_of_lines\",\n $matrixColumns: \"total_of_columns\",\n $substring: \"substring\",\n $length: \"length\",\n $uppercase: \"uppercase\",\n $lowercase: \"lowercase\",\n $charAt: \"char_at\",\n $isReal: \"is_real\",\n $isInt: \"is_integer\",\n $isBool: \"is_logic\",\n $castReal: \"to_real\",\n $castInt: \"to_integer\",\n $castBool: \"to_logic\",\n $castString: \"to_string\",\n $castChar: \"to_char\",\n $sin: \"sin\",\n $cos: \"cos\",\n $tan: \"tan\",\n $sqrt: \"sqrt\",\n $pow: \"pow\",\n $log: \"log\",\n $abs: \"abs\",\n $negate: \"negate\",\n $invert: \"invert\",\n $max: \"maximum\",\n $min: \"minimum\",\n $rand: \"random\",\n};\n// END i18n lexer strings\nexports.enLexer = lexer_1.makeLexer({\n commands,\n boolVal,\n logicOp,\n types,\n langLibs,\n langFuncs,\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.combineRegex = void 0;\nfunction combineRegex(strings, ...pieces) {\n return new RegExp(strings.raw\n .map((r, i) => r + (pieces[i] === undefined ? \"\" : \"(?:\" + pieces[i].source + \")\"))\n .join(\"\"));\n}\nexports.combineRegex = combineRegex;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ivprog_1 = require(\"./pt/ivprog\");\nconst ivprog_2 = require(\"./en/ivprog\");\n/*import * as ES from \"./es/ivprog.g4\";\nimport ESFuncs from \"./es/langFunctions\";\nimport ESLibs from \"./es/langLibs\";*/\nconst lexers = {};\nlexers[\"pt\"] = ivprog_1.ptLexer;\nlexers[\"en\"] = ivprog_2.enLexer;\nexports.default = lexers;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeLexer = exports.IVProgLexer = void 0;\nconst moo = require(\"moo\");\nconst helper_1 = require(\"./helper\");\nclass IVProgLexer {\n constructor(RKs, lexer, rules, i18nLexer) {\n this.RKs = RKs;\n this.lexer = lexer;\n this.rules = rules;\n this.i18nLexer = i18nLexer;\n }\n getReservedKeys() {\n return this.RKs;\n }\n getRules() {\n return this.rules;\n }\n getTypeKeys() {\n return this.i18nLexer.types;\n }\n getLangLibs() {\n return this.i18nLexer.langLibs;\n }\n getLangFuncs() {\n return this.i18nLexer.langFuncs;\n }\n}\nexports.IVProgLexer = IVProgLexer;\n// General Regex Rules\nconst ID = \"[a-zA-Z_][a-zA-Z0-9_]*\";\nconst HEX_DIGIT = \"[0-9a-fA-F]\";\nconst OCTAL_DIGIT = \"[0-7]\";\nconst ESC_OCTAL = RegExp(`\\\\\\\\[0-3]${OCTAL_DIGIT}${OCTAL_DIGIT}|\\\\\\\\${OCTAL_DIGIT}${OCTAL_DIGIT}|\\\\\\\\${OCTAL_DIGIT}`);\nconst ESC_UNICODE = RegExp(`\\\\\\\\u${HEX_DIGIT}${HEX_DIGIT}${HEX_DIGIT}${HEX_DIGIT}`);\nconst ESC_SEQ_BASE = /\\\\[b,t,n,f,r,\",',\\\\]|/;\nconst ESC_SEQ = helper_1.combineRegex `${ESC_SEQ_BASE}|${ESC_UNICODE}|${ESC_OCTAL}`;\nconst STRING_CHARACTER = helper_1.combineRegex `${ESC_SEQ}|[^\"\\\\\\\\]`;\nfunction makeLexer(lexer) {\n const RKs = {};\n const rules = {};\n Object.entries(lexer.types).forEach(([key, value]) => {\n RKs[key] = value;\n rules[key] = key;\n });\n Object.entries(lexer.boolVal).forEach(([key, value]) => {\n RKs[key] = value;\n rules[key] = key;\n });\n Object.entries(lexer.commands).forEach(([key, value]) => {\n RKs[key] = value;\n rules[key] = key;\n });\n RKs[\"AND_OPERATOR\"] = lexer.logicOp.RK_LOGICAL_AND;\n RKs[\"OR_OPERATOR\"] = lexer.logicOp.RK_LOGICAL_OR;\n RKs[\"NOT_OPERATOR\"] = lexer.logicOp.RK_LOGICAL_NOT;\n const RESERVED_KEYS = moo.keywords(RKs);\n const lexerRules = {\n COMMENTS: { match: /\\/\\/[^$]*?$|\\/\\*[^$]*?\\*\\//, lineBreaks: true },\n OPEN_BRACE: /\\[/,\n CLOSE_BRACE: /\\]/,\n OPEN_PARENTHESIS: /\\(/,\n CLOSE_PARENTHESIS: /\\)/,\n OPEN_CURLY: /\\{/,\n CLOSE_CURLY: /\\}/,\n COMMA: /,/,\n ASSIGNMENT: /<-|←/,\n REAL: /[0-9]+\\.[0-9]*[eE][+-]?[0-9]+|[0-9]+\\.[0-9]+/,\n INTEGER: RegExp(`(?:0x|0X)${HEX_DIGIT}+|(?:0b|0B)[0-1]+|[0-9]+`),\n SUM_OP: /[+-]/,\n MULTI_OP: /[*/%]/,\n RELATIONAL_OPERATOR: />=|==|<=|>|<|!=/,\n COLON: /:/,\n STRING: helper_1.combineRegex `\"(?:${STRING_CHARACTER})*?\"`,\n CHARACTER: helper_1.combineRegex `'(?:${ESC_SEQ}|[^'\\\\\\\\])'`,\n EOS: { match: /;\\r?\\n?|[\\r\\n]+/, lineBreaks: true },\n WHITESPACE: /(?: |\\t)+/,\n RK_REFERENCE: RegExp(lexer.commands.RK_REFERENCE),\n ID: { match: RegExp(ID), type: RESERVED_KEYS },\n DOT: /\\./,\n ERROR: { match: /[\\$?`]/, error: true },\n };\n Object.entries(lexerRules).forEach(([key, _]) => (rules[key] = key));\n const moolexer = moo.compile(lexerRules);\n return new IVProgLexer(RKs, moolexer, rules, lexer);\n}\nexports.makeLexer = makeLexer;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ptLexer = void 0;\nconst lexer_1 = require(\"../lexer\");\n// i18n lexer strings for the language.\nconst types = {\n // types\n RK_REAL: \"real\",\n RK_INTEGER: \"inteiro\",\n RK_BOOLEAN: \"logico\",\n RK_CHARACTER: \"caractere\",\n RK_STRING: \"cadeia\",\n};\nconst commands = {\n // RK_VOID is not formally part of Types since it doesn't have a valid value/instance\n RK_VOID: \"vazio\",\n // commands\n RK_PROGRAM: \"programa\",\n RK_SWITCH: \"escolha\",\n RK_CASE: \"caso\",\n RK_DEFAULT: \"contrario\",\n RK_CONST: \"const\",\n RK_FUNCTION: \"funcao\",\n RK_RETURN: \"devolva\",\n RK_FOR: \"para\",\n RK_FOR_ALT: \"repita_para\",\n RK_FOR_FROM: \"de\",\n RK_FOR_TO: \"ate\",\n RK_FOR_PASS: \"passo\",\n RK_BREAK: \"pare\",\n RK_DO: \"repita\",\n RK_DO_UNTIL: \"ate_que\",\n RK_WHILE: \"enquanto\",\n RK_WHILE_ALT: \"repita_enquanto\",\n RK_IF: \"se\",\n RK_ELSE: \"senao\",\n RK_REFERENCE: \"&\",\n};\nconst boolVal = {\n RK_FALSE: \"falso\",\n RK_TRUE: \"verdadeiro\",\n};\nconst logicOp = {\n RK_LOGICAL_NOT: \"nao\",\n RK_LOGICAL_AND: \"E\",\n RK_LOGICAL_OR: \"OU\",\n};\nconst langLibs = {\n $mathLib: \"Matematica\",\n $ioLib: \"ES\",\n $strLib: \"Texto\",\n $arrayLib: \"Arranjo\",\n $langLib: \"Conversao\",\n};\nconst langFuncs = {\n main_function: \"inicio\",\n $read: \"leia\",\n $write: \"escreva\",\n $numElements: \"total_de_elementos\",\n $matrixLines: \"total_de_linhas\",\n $matrixColumns: \"total_de_colunas\",\n $substring: \"subcadeia\",\n $length: \"comprimento\",\n $uppercase: \"caixa_alta\",\n $lowercase: \"caixa_baixa\",\n $charAt: \"caractere_na_posicao\",\n $isReal: \"e_real\",\n $isInt: \"e_inteiro\",\n $isBool: \"e_logico\",\n $castReal: \"como_real\",\n $castInt: \"como_inteiro\",\n $castBool: \"como_logico\",\n $castString: \"como_cadeia\",\n $castChar: \"como_caractere\",\n $sin: \"seno\",\n $cos: \"cosseno\",\n $tan: \"tangente\",\n $sqrt: \"raiz_quadrada\",\n $pow: \"potencia\",\n $log: \"logaritmo\",\n $abs: \"modulo\",\n $negate: \"trocar_sinal\",\n $invert: \"inverter_valor\",\n $max: \"maximo\",\n $min: \"minimo\",\n $rand: \"numero_aleatorio\",\n};\n// END i18n lexer strings\nexports.ptLexer = lexer_1.makeLexer({\n commands,\n boolVal,\n logicOp,\n types,\n langLibs,\n langFuncs,\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Messages = require(\"./message.csv\");\nconst UI = require(\"./ui.csv\");\nconst Errors = require(\"./error.csv\");\nconst MessagesObj = Messages;\nconst UIObj = UI;\nconst ErrorsObj = Errors;\nconst i18n_data = {};\nfor (const key in UIObj) {\n const data = {};\n data['error'] = ErrorsObj[key];\n data['message'] = MessagesObj[key];\n data['ui'] = UIObj[key];\n i18n_data[key] = data;\n}\nexports.default = i18n_data;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertFromString = exports.Operators = void 0;\nexports.Operators = Object.freeze({\n ADD: { ord: 0, value: \"+\" },\n SUB: { ord: 1, value: \"-\" },\n MULT: { ord: 2, value: '*' },\n DIV: { ord: 3, value: '/' },\n MOD: { ord: 4, value: '%' },\n GT: { ord: 5, value: '>' },\n GE: { ord: 6, value: '>=' },\n LT: { ord: 7, value: '<' },\n LE: { ord: 8, value: '<=' },\n EQ: { ord: 9, value: '==' },\n NEQ: { ord: 10, value: '!=' },\n AND: { ord: 11, value: 'and' },\n OR: { ord: 12, value: 'or' },\n NOT: { ord: 13, value: 'not' }\n});\nfunction convertFromString(op) {\n switch (op) {\n case '+': return exports.Operators.ADD;\n case '-': return exports.Operators.SUB;\n case '*': return exports.Operators.MULT;\n case '/': return exports.Operators.DIV;\n case '%': return exports.Operators.MOD;\n case '>': return exports.Operators.GT;\n case '>=': return exports.Operators.GE;\n case '<': return exports.Operators.LT;\n case '<=': return exports.Operators.LE;\n case '==': return exports.Operators.EQ;\n case '!=': return exports.Operators.NEQ;\n case 'and': return exports.Operators.AND;\n case 'or': return exports.Operators.OR;\n case 'not': return exports.Operators.NOT;\n }\n return null;\n}\nexports.convertFromString = convertFromString;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Address = void 0;\nclass Address {\n /**\n *\n * @param {Number} id the address id\n * @param {never} value the value stored at this address\n */\n constructor(id, value) {\n this.id = id;\n this.value = value;\n }\n}\nexports.Address = Address;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Location = void 0;\nconst address_1 = require(\"./address\");\nclass LocationHolder {\n constructor() {\n this.data = [];\n this.address_id = 0;\n }\n /**\n *\n * @param {never} value the value to be allocated\n * @returns {number} - the address id\n */\n allocate(value) {\n const id = this.address_id;\n // console.log(\"Allocation address \"+ id);\n const address = new address_1.Address(id, value);\n this.data.push(address);\n this.address_id += 1;\n return id;\n }\n /**\n *\n * @param {number} id\n */\n deallocate(id) {\n const index = this.findIndex(id);\n // console.log(\"Deallocation address \"+ id);\n if (index !== -1) {\n this.data.splice(index, 1);\n return true;\n }\n return false;\n }\n /**\n *\n * @param {number} id\n * @returns {Address} the address identified by id\n */\n find(id) {\n let beg = 0;\n let end = this.data.length;\n // console.log(\"Finding address \"+id);\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return address;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return undefined;\n }\n getAddressAt(pos) {\n return this.data[pos];\n }\n /**\n *\n * @param {number} id address id\n * @returns {number} the index of the address identified by id\n */\n findIndex(id) {\n let beg = 0;\n let end = this.data.length;\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return med;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return -1;\n }\n updateAddress(id, value) {\n const index = this.findIndex(id);\n if (index === -1) {\n throw new Error(\"Invalid address...\" + id);\n }\n this.data[index].value = value;\n }\n clear() {\n for (let i = 0; i < this.data.length; i += 1) {\n delete this.data[i];\n }\n this.data = [];\n this.address_id = 0;\n }\n}\nconst inner_ref = new LocationHolder();\nexports.Location = Object.freeze({\n allocate: inner_ref.allocate.bind(inner_ref),\n deallocate: inner_ref.deallocate.bind(inner_ref),\n find: inner_ref.find.bind(inner_ref),\n updateAddress: inner_ref.updateAddress.bind(inner_ref),\n clear: inner_ref.clear.bind(inner_ref),\n size: () => inner_ref.data.length\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resultTypeAfterUnaryOp = exports.resultTypeAfterInfixOp = void 0;\nconst types_1 = require(\"../typeSystem/types\");\nconst operators_1 = require(\"../ast/operators\");\nconst multiType_1 = require(\"../typeSystem/multiType\");\nconst config_1 = require(\"../util/config\");\nfunction buildInfixAddTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n table[types_1.Types.INTEGER.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.INTEGER.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.REAL.ord][types_1.Types.INTEGER.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.INTEGER.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.REAL.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.CHAR.ord] = types_1.Types.STRING;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.STRING;\n table[types_1.Types.CHAR.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n return table;\n}\nfunction buildInfixMultiDivSubTable() {\n const table = [[], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n table[types_1.Types.INTEGER.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.INTEGER.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n return table;\n}\nfunction buildInfixEqualityInequalityTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.BOOLEAN.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixRelationalTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixAndOrTable() {\n const table = [[], [], [], []];\n table[types_1.Types.BOOLEAN.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixModTable() {\n const table = [[]];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n return table;\n}\nfunction buildUnarySumSubList() {\n const list = [];\n list[types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n list[types_1.Types.REAL.ord] = types_1.Types.REAL;\n return list;\n}\nfunction buildUnaryNegList() {\n const list = [];\n list[types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n return list;\n}\nfunction buildInfixCompatibilityTable() {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(operators_1.Operators.ADD, buildInfixAddTable());\n compatibilityMap.set(operators_1.Operators.SUB, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.MULT, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.DIV, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.EQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(operators_1.Operators.NEQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(operators_1.Operators.GE, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.GT, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.LE, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.LT, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.OR, buildInfixAndOrTable());\n compatibilityMap.set(operators_1.Operators.AND, buildInfixAndOrTable());\n compatibilityMap.set(operators_1.Operators.MOD, buildInfixModTable());\n return compatibilityMap;\n}\nfunction buildUnaryCompatibilityTable() {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(operators_1.Operators.ADD, buildUnarySumSubList());\n compatibilityMap.set(operators_1.Operators.SUB, buildUnarySumSubList());\n compatibilityMap.set(operators_1.Operators.NOT, buildUnaryNegList());\n return compatibilityMap;\n}\nconst infixMap = buildInfixCompatibilityTable();\nconst unaryMap = buildUnaryCompatibilityTable();\nfunction resultTypeAfterInfixOp(operator, leftExpressionType, rightExpressionType) {\n try {\n if (leftExpressionType instanceof multiType_1.MultiType && rightExpressionType instanceof multiType_1.MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const typeA = leftExpressionType.types[i];\n for (let j = 0; j < rightExpressionType.types.length; ++i) {\n const typeB = rightExpressionType.types[j];\n newMulti.push(resultTypeAfterInfixOp(operator, typeA, typeB));\n }\n }\n newMulti = newMulti.filter(x => !x.isCompatible(types_1.Types.UNDEFINED));\n if (newMulti.length <= 0) {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return new multiType_1.MultiType([types_1.Types.INTEGER, types_1.Types.REAL]);\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n else {\n return new multiType_1.MultiType(newMulti);\n }\n }\n else if (leftExpressionType instanceof multiType_1.MultiType) {\n if (leftExpressionType.isCompatible(rightExpressionType)) {\n return resultTypeAfterInfixOp(operator, rightExpressionType, rightExpressionType);\n }\n else {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return rightExpressionType;\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n }\n else if (rightExpressionType instanceof multiType_1.MultiType) {\n if (rightExpressionType.isCompatible(leftExpressionType)) {\n return resultTypeAfterInfixOp(operator, leftExpressionType, leftExpressionType);\n }\n else {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return leftExpressionType;\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n }\n const resultTable = infixMap.get(operator) || [];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const resultType = resultTable[leftExpressionType.ord][rightExpressionType.ord];\n if (resultType === null || resultType === undefined) {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n if (operator === operators_1.Operators.MOD) {\n return types_1.Types.INTEGER;\n }\n else if (operator.ord >= 5 && operator.ord <= 10) {\n return types_1.Types.BOOLEAN;\n }\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n return resultType;\n }\n catch (e) {\n if (e instanceof TypeError) {\n return types_1.Types.UNDEFINED;\n }\n else {\n throw e;\n }\n }\n}\nexports.resultTypeAfterInfixOp = resultTypeAfterInfixOp;\nfunction resultTypeAfterUnaryOp(operator, leftExpressionType) {\n try {\n if (leftExpressionType instanceof multiType_1.MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const type = leftExpressionType.types[i];\n newMulti.push(resultTypeAfterUnaryOp(operator, type));\n }\n newMulti = newMulti.filter(x => !x.isCompatible(types_1.Types.UNDEFINED));\n if (newMulti.length <= 0) {\n return types_1.Types.UNDEFINED;\n }\n return new multiType_1.MultiType(newMulti);\n }\n const resultTable = unaryMap.get(operator) || [];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const resultType = resultTable[leftExpressionType.ord];\n if (resultType == null) {\n return types_1.Types.UNDEFINED;\n }\n return resultType;\n }\n catch (e) {\n if (e instanceof TypeError) {\n return types_1.Types.UNDEFINED;\n }\n else {\n throw e;\n }\n }\n}\nexports.resultTypeAfterUnaryOp = resultTypeAfterUnaryOp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nexports.Context = Object.freeze({\n BASE: Symbol('context:base'),\n BREAKABLE: Symbol('context:breakable'),\n FUNCTION: Symbol('context:function')\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Modes = void 0;\nexports.Modes = Object.freeze({\n RETURN: Symbol('mode:return'),\n BREAK: Symbol('mode:break'),\n PAUSE: Symbol('mode:pause'),\n RUN: Symbol('mode:run'),\n ABORT: Symbol('mode:abort')\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Store = void 0;\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nconst modes_1 = require(\"../modes\");\nconst types_1 = require(\"../../typeSystem/types\");\nconst storeObject_1 = require(\"./storeObject\");\nconst storeObjectRef_1 = require(\"./storeObjectRef\");\nconst array_type_1 = require(\"../../typeSystem/array_type\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nconst store_value_1 = require(\"./value/store_value\");\nconst store_value_address_1 = require(\"./value/store_value_address\");\nconst store_value_ref_1 = require(\"./value/store_value_ref\");\nconst array_store_value_ref_1 = require(\"./value/array_store_value_ref\");\nconst store_object_array_ref_1 = require(\"./store_object_array_ref\");\nclass Store {\n constructor(name) {\n this.name = name;\n this.store = new Map();\n this.mode = modes_1.Modes.RUN;\n }\n static canImplicitTypeCast(castType, sourceType) {\n if (castType.isCompatible(types_1.Types.INTEGER) || castType.isCompatible(types_1.Types.REAL)) {\n if (sourceType.isCompatible(types_1.Types.INTEGER) || sourceType.isCompatible(types_1.Types.REAL)) {\n return true;\n }\n }\n return false;\n }\n static doImplicitCasting(castType, stoObj) {\n if (!Store.canImplicitTypeCast(castType, stoObj.type)) {\n throw new Error(\"!!!Critical error: attempted to type cast invalid types\");\n }\n if (castType.isCompatible(types_1.Types.INTEGER)) {\n return new store_value_1.StoreValue(types_1.Types.INTEGER, stoObj.get().trunc());\n }\n else {\n return new store_value_1.StoreValue(types_1.Types.REAL, stoObj.get());\n }\n }\n extendStore(nextStore) {\n this.nextStore = nextStore;\n }\n applyStore(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.applyStore(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n const val = this.store.get(id);\n let result = null;\n if (val.type instanceof array_type_1.ArrayType) {\n const array = val;\n const array_type = array.type;\n let l = 0, c = 0;\n const values = array.value.map(v => {\n if (array.isVector) {\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l++, undefined, array.id, array.readOnly);\n }\n else {\n if (c >= array.columns) {\n c = 0;\n l += 1;\n }\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l, c++, array.id, array.readOnly);\n }\n });\n result = new array_store_value_1.ArrayStoreValue(array_type, values, array.lines, array.columns, val.id, val.readOnly);\n }\n else {\n result = new store_value_1.StoreValue(val.type, val.value, val.id, val.readOnly);\n }\n return result;\n }\n updateStore(id, stoValue) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStore(id, stoValue);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n const array_value = stoValue;\n if (oldObj.isCompatible(array_value)) {\n if (oldObj.isVector) {\n array_value.get().forEach((val, index) => {\n oldObj.setAt(val, index, undefined);\n });\n }\n else {\n let line = 0;\n let column = 0;\n array_value.get().forEach((val) => {\n oldObj.setAt(val, line, column);\n column += 1;\n if (column >= oldObj.columns) {\n line += 1;\n column = 0;\n }\n });\n }\n return this;\n }\n }\n else if (oldObj.isCompatible(stoValue)) {\n const loc_address = oldObj.locAddress;\n location_1.Location.updateAddress(loc_address, stoValue.get());\n return this;\n }\n const oldType = oldObj.type;\n const stoType = stoValue.type;\n // TODO: better error message\n throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n }\n }\n /**\n * Method used to update regions of an array (vector or matrix). The should only be used when update an specific\n * possition since it will only update the required addresses.\n * @param {string} id the variable id to be updated\n * @param {IStoreValue} sto_value the value to be used in the update process\n * @param {number} line the line address of the vector/matrix\n * @param {number} column the matrix column, which can be undefined\n */\n updateStoreArray(id, sto_value, line, column) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStoreArray(id, sto_value, line, column);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n if (sto_value instanceof array_store_value_1.ArrayStoreValue) {\n // this must be a vector or matrix line update\n const actual_values = sto_value.get();\n if (oldObj.isVector && sto_value.isVector()) {\n for (let i = 0; i < sto_value.lines; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, i, undefined);\n }\n }\n else if (!oldObj.isVector && column == null && sto_value.isVector()) {\n for (let i = 0; i < oldObj.columns; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, line, i);\n }\n }\n else {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n }\n else {\n if (!oldObj.isVector && column == null) {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n oldObj.setAt(sto_value, line, column);\n }\n }\n else {\n throw new Error(\"Cannot update a non-array variable using updateStoreArray\");\n }\n // const oldType = oldObj.type;\n // const stoType = sto_value.type;\n // // TODO: better error message\n // throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n return this;\n }\n }\n /**\n * Inserts a new variable into the Store. This method should be used when declaring a new variable,\n * including the special return variable $.\n * @param id variable id\n * @param stoValue the value to be used as the initial value of id\n */\n insertStore(id, stoValue) {\n if (this.store.has(id)) {\n // TODO: better error message\n throw new Error(`${id} is already defined`);\n }\n // TODO check for array....\n let newObj;\n if (stoValue instanceof store_value_ref_1.StoreValueRef) {\n newObj = new storeObjectRef_1.StoreObjectRef(stoValue);\n }\n else if (stoValue instanceof array_store_value_ref_1.ArrayStoreValueRef) {\n newObj = new store_object_array_ref_1.StoreObjectArrayRef(stoValue, stoValue.lines, stoValue.columns);\n }\n else if (stoValue instanceof array_store_value_1.ArrayStoreValue) {\n const columns = stoValue.isVector() ? 0 : stoValue.columns;\n const addresses = [];\n const all_values = stoValue.get();\n if (all_values.length > 0) {\n for (let i = 0; i < stoValue.get().length; i += 1) {\n const val = all_values[i].get();\n addresses.push(location_1.Location.allocate(val));\n }\n }\n else {\n let total = stoValue.lines;\n total = stoValue.isVector() ? total : total * columns;\n for (let i = 0; i < total; i += 1) {\n addresses.push(location_1.Location.allocate(null));\n }\n }\n newObj = new storeObjectArray_1.StoreObjectArray(stoValue.type, stoValue.lines, columns, addresses, stoValue.isConst);\n }\n else {\n const loc_address = location_1.Location.allocate(stoValue.get());\n newObj = new storeObject_1.StoreObject(stoValue.type, loc_address, stoValue.isConst);\n }\n newObj.setID(id);\n this.store.set(id, newObj);\n return this;\n }\n /**\n * Helper function similar to applyStore. But it returns the actual object in the store be it ref or not\n * applyStore will return the refferenced object if the object in the store is a ref\n */\n getStoreObject(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.getStoreObject(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n return this.store.get(id);\n }\n destroy() {\n this.store.forEach(sto => sto.destroy(), this);\n }\n isDefined(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.isDefined(id);\n }\n else {\n return false;\n }\n }\n return true;\n }\n}\nexports.Store = Store;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObject = void 0;\nconst location_1 = require(\"../../memory/location\");\nclass StoreObject {\n /**\n *\n * @param {Type} type\n * @param {Number} loc_address\n * @param {Boolean} readOnly\n */\n constructor(type, loc_address, readOnly = false) {\n this._loc_address = loc_address;\n this._type = type;\n this._readOnly = readOnly;\n this._id = undefined;\n }\n setID(id) {\n this._id = id;\n }\n get id() {\n return this._id;\n }\n get inStore() {\n return this.id !== null;\n }\n get type() {\n return this._type;\n }\n /**\n * Returns the actual value stored at the loccation address present in this object.\n * The returned value is compatible with @prop{StoreObject.type}\n */\n get value() {\n const address = location_1.Location.find(this._loc_address);\n if (address != null) {\n return address.value;\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n get number() {\n throw new Error(\"DOT NOT USE THIS PROPERTY!\");\n }\n get readOnly() {\n return this._readOnly;\n }\n set readOnly(value) {\n this._readOnly = value;\n }\n isCompatible(another) {\n return this.type.isCompatible(another.type);\n }\n destroy() {\n return location_1.Location.deallocate(this._loc_address);\n }\n get locAddress() {\n return this._loc_address;\n }\n}\nexports.StoreObject = StoreObject;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectArray = void 0;\nconst storeObject_1 = require(\"./storeObject\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nclass StoreObjectArray extends storeObject_1.StoreObject {\n constructor(type, _lines, _columns, loc_addresses, readOnly = false) {\n super(type, -1, readOnly);\n this._lines = _lines;\n this._columns = _columns;\n this.loc_addresses = loc_addresses;\n }\n get lines() {\n return this._lines;\n }\n get columns() {\n return this._columns;\n }\n isCompatible(another) {\n if (another instanceof array_store_value_1.ArrayStoreValue) {\n const cols = another.columns == null ? 0 : another.columns;\n if (this.lines === another.lines && this.columns === cols) {\n return super.isCompatible(another);\n }\n }\n return false;\n }\n get isVector() {\n return this.type.dimensions === 1;\n }\n /**@override\n * Returns the list of values stored by this array.\n * All returned values are compatible with @prop{StoreObject.type}\n */\n get value() {\n const values = [];\n for (let i = 0; i < this.addresses.length; i += 1) {\n const address = location_1.Location.find(this.addresses[i]);\n if (address != null) {\n values.push(address.value);\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n return values;\n }\n destroy() {\n let bool = true;\n for (let i = 0; i < this.addresses.length; i += 1) {\n bool = bool && location_1.Location.deallocate(this.addresses[i]);\n }\n return bool;\n }\n /**\n * @override\n *\n * Returns the address that contains a list of all addresses of the values present in the array\n */\n get locAddress() {\n throw new Error(\"!!!Internal Error: Cannot invoke locAddress on StoreObjectArray\");\n }\n get addresses() {\n return this.loc_addresses;\n }\n getAt(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n const address = location_1.Location.find(this.addresses[index]);\n values.push(address.value);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n const address = location_1.Location.find(this.addresses[index]);\n return address.value;\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n throw new Error(\"!!!Internal Error: Attempting to insert a line into matrix \" + this.id);\n }\n const pos = this.getIndexOf(line, column);\n location_1.Location.updateAddress(this.addresses[pos], value.get());\n }\n getIndexOf(line, column) {\n return line * this.columns + column;\n }\n getLocAddressOf(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n values.push(this.addresses[index]);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n return this.addresses[index];\n }\n}\nexports.StoreObjectArray = StoreObjectArray;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectRef = void 0;\nconst storeObject_1 = require(\"./storeObject\");\nclass StoreObjectRef extends storeObject_1.StoreObject {\n /**\n *\n * @param {StoreObject} stoValue\n */\n constructor(stoValue) {\n super(stoValue.type, stoValue.getRefAddress(), false);\n this.refObj = stoValue.id;\n this.reference_dimension = stoValue.getReferenceDimension();\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n getReferenceDimension() {\n return this.reference_dimension;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectRef = StoreObjectRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectArrayRef = void 0;\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nclass StoreObjectArrayRef extends storeObjectArray_1.StoreObjectArray {\n constructor(stoValue, lines, columns) {\n super(stoValue.type, lines, columns, stoValue.getAddresses(), false);\n this.refObj = stoValue.id;\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectArrayRef = StoreObjectArrayRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayStoreValue = void 0;\nconst array_type_1 = require(\"../../../typeSystem/array_type\");\nconst store_value_address_1 = require(\"./store_value_address\");\nclass ArrayStoreValue {\n constructor(type, values, lines, columns, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.values = values;\n this.lines = lines;\n this.columns = columns;\n }\n get() {\n return this.values;\n }\n /**\n * @deprecated\n * Potential not necessary since array access is occuring directly in the StoreObject\n * @param line\n * @param column\n */\n getAt(line, column) {\n console.log(\"Column \", column);\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = line * this.lines + col;\n values.push(this.values[index]);\n }\n const array_type = this.type;\n const vector_type = new array_type_1.ArrayType(array_type.innerType, array_type.dimensions - 1);\n return new ArrayStoreValue(vector_type, values, this.columns, 0, this.id, this.isConst);\n }\n const index = line * this.lines + column;\n console.log(\"Get at: \", index);\n return this.values[index];\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n let actual_line = line;\n let actual_column = column;\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n actual_column = actual_line;\n actual_line = 0;\n }\n else if (column == null) {\n if (!(value instanceof ArrayStoreValue)) {\n throw new Error(\"Attempting to insert a single value as a line of matrix \" + this.id);\n }\n const actual_values = value.get();\n for (let i = 0; i < this.columns; i += 1) {\n const pos = actual_line * this.columns + i;\n const val = actual_values[i];\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, val.get(), actual_line, i, this.id, this.isConst);\n }\n }\n const columns = this.columns == null ? 0 : this.columns;\n const pos = actual_line * columns + actual_column;\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, value.get(), line, column, this.id, this.isConst);\n }\n inStore() {\n return this.id != null;\n }\n isVector() {\n return this.type.dimensions == 1;\n }\n}\nexports.ArrayStoreValue = ArrayStoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayStoreValueRef = void 0;\nclass ArrayStoreValueRef {\n constructor(type, values, addresses, lines, columns, id) {\n this.type = type;\n this.values = values;\n this.addresses = addresses;\n this.lines = lines;\n this.columns = columns;\n this.id = id;\n this.isConst = false;\n }\n get() {\n return this.values;\n }\n getAddresses() {\n return this.addresses;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.ArrayStoreValueRef = ArrayStoreValueRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValue = void 0;\nclass StoreValue {\n constructor(type, value, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.value = value;\n }\n get() {\n return this.value;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.StoreValue = StoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValueAddress = void 0;\nconst store_value_1 = require(\"./store_value\");\nclass StoreValueAddress extends store_value_1.StoreValue {\n constructor(type, value, line, column, id, isConst = false) {\n super(type, value, id, isConst);\n this.line = line;\n this.column = column;\n }\n}\nexports.StoreValueAddress = StoreValueAddress;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValueRef = void 0;\nclass StoreValueRef {\n constructor(type, value, loc_address, id) {\n this.type = type;\n this.value = value;\n this.loc_address = loc_address;\n this.id = id;\n this.isConst = false;\n this.reference_dimesion = 0;\n }\n get() {\n return this.value;\n }\n getRefAddress() {\n return this.loc_address;\n }\n inStore() {\n return this.id != null;\n }\n getReferenceDimension() {\n return this.reference_dimesion;\n }\n setReferenceDimension(dimension) {\n this.reference_dimesion = dimension;\n }\n}\nexports.StoreValueRef = StoreValueRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LanguageService = void 0;\nconst grammar_1 = require(\"./../../grammar/\");\nconst line_i18n_1 = require(\"line-i18n\");\nconst config_1 = require(\"./../util/config\");\nclass LanguageServiceExtended extends line_i18n_1.default.LanguageServiceNoLS {\n constructor() {\n super(typeof iLMparameters === \"undefined\"\n ? config_1.Config.default_lang\n : iLMparameters.lang);\n }\n getDefaultLang() {\n return \"en\";\n }\n getCurrentLexer() {\n const langLexer = grammar_1.default[this.getLang()];\n if (langLexer === null || langLexer === undefined) {\n return grammar_1.default[this.getDefaultLang()];\n }\n else {\n return langLexer;\n }\n }\n getCurrentLangFuncs() {\n const langInfo = grammar_1.default[this.getLang()];\n if (langInfo === null || langInfo === undefined) {\n return grammar_1.default[this.getDefaultLang()].getLangFuncs();\n }\n else {\n return langInfo.getLangFuncs();\n }\n }\n getCurrentLangLibs() {\n const langInfo = grammar_1.default[this.getLang()];\n if (langInfo === null || langInfo === undefined) {\n return grammar_1.default[this.getDefaultLang()].getLangLibs();\n }\n return langInfo.getLangLibs();\n }\n}\nexports.LanguageService = new LanguageServiceExtended();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayType = void 0;\nclass ArrayType {\n constructor(type, dimensions) {\n this.dimensions = dimensions;\n this.innerType = type;\n }\n get isVector() {\n return this.dimensions == 1;\n }\n isCompatible(another) {\n if (another instanceof ArrayType) {\n if (this.dimensions !== another.dimensions) {\n return false;\n }\n return this.innerType.isCompatible(another.innerType);\n }\n return false;\n }\n stringInfo() {\n const list = this.innerType.stringInfo();\n list.forEach(v => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const tmp = v;\n tmp.dim = this.dimensions;\n });\n return list;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n canAccept(another, used_dims) {\n const free_dims = this.dimensions - used_dims;\n if (another instanceof ArrayType) {\n return free_dims == another.dimensions && this.innerType.isCompatible(another.innerType);\n }\n else {\n return free_dims == 0 && this.innerType.isCompatible(another);\n }\n }\n}\nexports.ArrayType = ArrayType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultiType = void 0;\nclass MultiType {\n constructor(types) {\n this.types = types;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n stringInfo() {\n let list = [];\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n list = list.concat(t.stringInfo());\n }\n return list;\n }\n isCompatible(another) {\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n if (another.isCompatible(t)) {\n return true;\n }\n }\n return false;\n }\n}\nexports.MultiType = MultiType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Type = void 0;\nclass Type {\n constructor(value, ord) {\n this.value = value;\n this.ord = ord;\n }\n stringInfo() {\n return [{ type: this.value, dim: 0 }];\n }\n isCompatible(another) {\n return this.value === another.value && this.ord === another.ord;\n }\n}\nexports.Type = Type;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromOrdToType = exports.Types = void 0;\nconst type_1 = require(\"./type\");\nconst multiType_1 = require(\"./multiType\");\nconst maybe_1 = require(\"../util/maybe\");\nconst INTEGER = new type_1.Type(\"integer\", 0);\nconst REAL = new type_1.Type(\"real\", 1);\nconst STRING = new type_1.Type(\"text\", 2);\nconst BOOLEAN = new type_1.Type(\"boolean\", 3);\nconst CHAR = new type_1.Type(\"char\", 4);\nconst VOID = new type_1.Type(\"void\", 5);\nconst UNDEFINED = new type_1.Type(\"undefined\", 6);\nconst ALL = new multiType_1.MultiType([INTEGER, REAL, STRING, CHAR, BOOLEAN]);\nexports.Types = Object.freeze({\n INTEGER: INTEGER,\n REAL: REAL,\n STRING: STRING,\n CHAR: CHAR,\n BOOLEAN: BOOLEAN,\n VOID: VOID,\n UNDEFINED: UNDEFINED,\n ALL: ALL\n});\nfunction fromOrdToType(ord) {\n const typeMap = exports.Types;\n for (const t in typeMap) {\n if (typeMap[t].ord && typeMap[t].ord === ord) {\n return maybe_1.Maybe.some(typeMap[t]);\n }\n }\n return maybe_1.Maybe.none();\n}\nexports.fromOrdToType = fromOrdToType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Config = void 0;\nclass ConfigObject {\n constructor() {\n this.decimalPlaces = 8;\n this.intConvertRoundMode = 2;\n this.default_lang = \"pt\";\n this.enable_type_casting = true;\n this.idle_input_interval = 5000;\n this.suspend_threshold = 1000;\n // this.max_instruction_count = 350250; - automated evaluation limit\n this.max_instruction_count = Number.MAX_SAFE_INTEGER;\n this.activity_programming_type = new Map();\n this.activity_functions = new Map();\n this.activity_datatypes = new Map();\n this.activity_commands = new Map();\n this.activity_filter = new Map();\n }\n setConfig(opts) {\n const otherConfig = opts;\n for (const key in otherConfig) {\n if (Object.prototype.hasOwnProperty.call(this, key)) {\n this[key] = otherConfig[key];\n }\n }\n }\n}\nconst config = new ConfigObject();\nexports.Config = config;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Maybe = void 0;\n/**\n*\n* Maybe Monad\n* @Source: https://codewithstyle.info/advanced-functional-programming-in-typescript-maybe-monad/\n* @Modified by: @lucascalion - 28/08/2019\n*\n**/\nclass Maybe {\n constructor(value) {\n this.value = value;\n }\n static some(value) {\n if (!value) {\n throw Error(\"Provided value must not be empty\");\n }\n return new Maybe(value);\n }\n static none() {\n return new Maybe(null);\n }\n static fromValue(value) {\n return value ? Maybe.some(value) : Maybe.none();\n }\n getOrElse(defaultValue) {\n return this.value === null ? defaultValue : this.value;\n }\n map(f) {\n if (this.value === null) {\n return Maybe.none();\n }\n else {\n return Maybe.fromValue(f(this.value));\n }\n }\n}\nexports.Maybe = Maybe;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"main\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkivprogCore\"] = self[\"webpackChunkivprogCore\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_babel_runtime_helpers_asyncToGenerator_js-node_modules_babel_runtime_hel-72ab78\"], () => (__webpack_require__(\"./js/main.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["line_i18n","IVProgProcessor","DOMConsole","LocalizedStringsService","OutputMatching","Config","LocalizedStrings","getInstance","StringTypes","AssessmentConfig","max_instruction_count","suspend_threshold","IVProgAssessment","ast_code","testCases","domConsole","old_config","JSON","parse","stringify","setConfig","partialTests","map","t","name","input","output","testResult","om","eval","Promise","all","then","results","grade","i","length","result","writeToConsole","INFO","MESSAGE","generateOutput","status","ERR","ERROR","error_msg","channel","toFixed","error","showErrorMessage","err","message","resolve","errorID","args","getError","msgID","info","getMessage","msgType","msg","getString","processString","writeRawHTML","StringDiff","OutputAssessmentResult","inputs","store","time","template","DETAIL_TEMPLATE","replace","getUI","input_spans","prepareInputList","output_rows","type","formatString","formatNumber","formatBool","prepareOutputTable","failed_text","FAILED_TEMPLATE","input_list","list","INPUT_INFO_TEMPLATE","value","read","join","OUPUT_TABLE_TEMPLATE","assessment_result","prepareResults","page","PAGE_TEMPLATE","result_class","formatOutput","expected_class","generated_class","OUTPUT_TEMPLATE","expected_tmpl","expected","generated_tmpl","generated","EMPTY_OUTPUT_TEMPLATE","final_result","g_string","e_string","g_string_tmpl","e_string_tmpl","diff","diff_vec","part","getDiffStringStyle","diff_string","reduce","prev","actual","text","action","INSERT","DELETE","EQUAL","val","Decimal","InputAssessment","OutputTest","levenshteinDistance","TypeParser","OutputResult","str","RegExp","program","expected_output","test_name","refThis","gen_output","registerInput","registerOutput","start_time","Date","now","interpretAST","sto","final_time","isInputAvailable","getErrorMessage","g_out","OutputMatchResult","getPotentialOutputType","outputMatch","console","log","e_out","push","NUM_REGEX","test","BOOLEAN_REGEX","g_output","e_output","checkStrings","g_num","e_num","checkNumbers","g_bool","toBool","e_bool","checkBoolean","decimalPlaces","Math","min","dp","ROUND_FLOOR","eq","createNumberResult","toNumber","g_bool_text","convertBoolToString","e_bool_text","createBoolResult","e_ouput","assessmentList","e_output_clean","trim","g_output_clean","NUM_IN_STRING_REGEX","expected_numbers","match","generated_numbers","g_val","e_val","numberGrade","r","BOOLEAN_IN_STRING_REGEX","expected_bools","generated_bools","boolGrade","dist","gradeDiff","max","Number","isNaN","assessment_size","gradeAcc","finalGrade","createStringResult","Assign","ArrayIndexAssign","id","lineExpression","columnExpression","expression","line","column","Declaration","ArrayDeclaration","lines","columns","initial","isConst","Command","Break","Case","commands","_sourceInfo","sourceInfo","CommandBlock","variables","For","for_id","for_from","for_to","for_pass","commandBlock","FormalParameter","byRef","variadic","Types","Function","returnType","formalParameters","some","p","isCompatible","VOID","IfThenElse","condition","ifTrue","ifFalse","Return","While","RepeatUntil","Switch","SysCall","FunctionCall","Expression","cases","langFunc","SyntaxError","_context","Error","captureStackTrace","contextObj","createError","message_id","context","SyntaxErrorFactory","Object","freeze","extra_lines","token_missing_one","token","col","token_missing_list","expectedList","getOR","id_missing","eos_missing","invalid_array_dimension","typeName","invalid_array_size","invalid_main_return","invalid_var_declaration","invalid_break_command","cmdName","invalid_terminal","invalid_type","const_not_init","invalid_id_format","duplicate_function","main_parameters","duplicate_variable","invalid_character","annonymous_array_literal","invalid_matrix_literal_line","exp","cannot_infer_matrix_line","cannot_infer_matrix_column","cannot_infer_vector_size","matrix_to_vector_literal_attr","vector_to_matrix_literal_attr","array_init_not_literal","array_exceeds_2d","invalid_matrix_id_dimension","invalid_vector_init","invalid_matrix_init","invalid_syntax","ArrayAccess","strLine","toString","strColumn","parenthesis","Literal","ArrayLiteral","valid","strList","arrayLiteral","element","validateSize","validateType","BoolLiteral","BOOLEAN","CharLiteral","CHAR","_parenthesis","flag","LanguageDefinedFunction","actualParameters","isMainCall","getMainFunctionName","getLocalName","params","strParams","v","IntLiteral","RealLiteral","StringLiteral","VariableLiteral","InfixApp","UnaryApp","op","left","right","l","convertToString","INTEGER","REAL","STRING","UNDEFINED","Expressions","Commands","Parsers","ArrayType","SourceInfo","convertFromString","LanguageService","IVProgParser","fill","lexer","getCurrentLexer","parser","offset","lineBreaks","ivprogLexer","inputStream","tokenStream","pos","ruleNames","getRules","variableTypes","entries","getTypeKeys","key","_","functionTypes","concat","RK_VOID","parsingArrayDimension","scope","langFuncs","getLangFuncs","definedFuncsNameList","definedVariablesStack","stream","Array","from","reset","filter","WHITESPACE","COMMENTS","parseProgram","index","EOF_TOKEN","BASE","pop","getToken","consumeNewLines","globalVars","functions","RK_PROGRAM","checkOpenCurly","pushVariableStack","RK_CONST","isVariableType","parseGlobalVariables","RK_FUNCTION","parseFunction","popVariableStack","checkCloseCurly","isEOF","global","getReservedKeys","attempt","OPEN_CURLY","CLOSE_CURLY","OPEN_BRACE","CLOSE_BRACE","OPEN_PARENTHESIS","CLOSE_PARENTHESIS","eosToken","EOS","functionID","funcIDToken","indexOf","variableID","getCurrentVariableStack","decl","parseMaybeConst","checkEOS","constToken","typeString","parseType","parseDeclaration","getTypeArray","dim1","dim2","dimensions","createSourceInfo","idString","parseID","checkVariableDuplicate","checkOpenBrace","parseArrayDimension","checkCloseBrace","parseArrayDeclaration","assignmentToken","ASSIGNMENT","parseExpressionOR","declaration","commaToken","COMMA","n_lines","n_columns","dim_is_id","parseArrayLiteral","isVector","expString","toInt","find","dimToken","getIntLiteral","ID","parseVariable","RK_INTEGER","toReal","toChar","openCurly","invalid_token","beginArray","data","maybeCurlyOpen","parseVectorList","parseExpressionList","endArray","createSourceInfoFromList","dataDim","lastSize","substring","pushScope","FUNCTION","formalParams","funType","checkFunctionDuplicate","checkOpenParenthesis","checkCloseParenthesis","parseFormalParameters","commandsBlock","parseCommandBlock","func","isMain","popScope","reference","maybeIDToken","RK_REFERENCE","parameter","insideScope","maybeDOT","DOT","anotherID","RK_BOOLEAN","RK_REAL","RK_STRING","RK_CHARACTER","optionalCurly","variablesDecl","hasOpen","parsedCommand","cmd","parseCommand","lastToken","varType","parseIDCommand","RK_RETURN","parseReturn","RK_WHILE","RK_WHILE_ALT","parseWhile","RK_FOR","RK_FOR_ALT","parseFor","RK_BREAK","BREAKABLE","parseBreak","RK_SWITCH","parseSwitchCase","RK_DO","parseRepeatUntil","RK_IF","parseIfThenElse","casesList","parseCases","command","whileToken","RK_DO_UNTIL","COMMAND","logicalExpression","cmdBlocks","maybeElse","RK_ELSE","maybeIf","elseBlock","for_token","id_token","parseForParameters","RK_FOR_FROM","RK_FOR_TO","maybePass","RK_FOR_PASS","returnCommand","refToken","parseMaybeLibID","isID","parseExpression","assignmentOrParenthesis","funcCall","parseFunctionCallCommand","keyword_code","from_token","keyword","int_or_id","is_unary_op","SUM_OP","RK_CASE","nextToken","RK_DEFAULT","colonToken","COLON","block","defaultCase","setCommands","aCase","caseToken","exp1","parseExpressionAND","OR_OPERATOR","opToken","or","exp2","finalExp","parseExpressionNot","AND_OPERATOR","and","maybeNotToken","NOT_OPERATOR","not","parseExpressionRel","RELATIONAL_OPERATOR","relToken","rel","factor","parseFactor","sumOpToken","factor2","term","parseTerm","MULTI_OP","multOpToken","term2","getRealLiteral","getStringLiteral","CHARACTER","getCharLiteral","RK_TRUE","RK_FALSE","getBoolLiteral","parseIDTerm","parseParenthesisExp","tokenA","tokenB","firstIndex","secondIndex","parseFunctionCallExpression","getInternalName","stepBack","parseActualParameters","funcName","getFunctionName","maybeToken","types","x","literalNames","size","Utils","elementID","disableMarginTop","cursorInterval","idleInterval","inputDiv","inputCMD","inputSpan","cursorRef","needInput","clearBtn","hideBtn","showBtn","termDiv","anyKey","actualID","parent","document","getElementById","setup","inputListeners","hideInput","pending_writes","last_clear","_setupDom","_setupEvents","addEventListener","bind","clearBtnClick","hideBtnClick","showBtnClick","event","keyCode","which","clearInterval","notifyListeners","_appendUserInput","innerHTML","currentLine","bashNode","createElement","classList","add","BASH_TEMPLATE","querySelector","INPUT_CARET_TEMPLATE","setAttribute","append","_setupCursor","window","$","popup","content","blinkCaretAndFocus","updateSpanText","stopBlinkCaret","focus","setInterval","style","visibility","scheduleNotify","forEach","splice","_appendTextLn","newLine","_appendText","USER","write_time","sleep","divClass","getClassForType","textDiv","insertBefore","getOutputText","scrollTerm","removeChild","INPUT","getUserInputText","scrollTop","scrollHeight","display","top","marginTop","showInput","isElementInViewport","scrollIntoView","removeEventListener","cNode","cloneNode","parentNode","replaceChild","click","promise","outputList","split","write","clearPendingWrites","parentElement","childNodes","firstChild","clear","hide","notifyIdle","idle_input_interval","Input","Output","runner","initVisualUI","addFunctionChangeListener","addGlobalChangeListener","removeFunctionListener","removeGlobalListener","getTestCases","i18nHelper","ActionTypes","getLogs","getLogsAsString","registerClick","registerUserEvent","parseLogs","prepareActivityToStudentHelper","prepareActivityToStudentHelperJSON","autoEval","setPreviousAlgorithm","openAssessmentDetail","processData","parseCode","CodeEditorAll","autoGenerateTestCaseOutput","generate","CodeEditor","initTextEditor","setCode","getCode","updateEditor","disable","Settings","programming","datatypes","i18n","generateCode","createInputFun","createOutputFun","createLengthFun","createLowercaseFun","createrCharAtFun","createSubstringFun","createUppercaseFun","createMatrixColumnsFun","createMatrixLinesFun","createNumElementsFun","createCastBoolFun","createCastIntFun","createCastRealFun","createCastStringFun","createIsBoolFun","createIsIntFun","createIsRealFun","createCastCharFun","createAbsFun","createCosFun","createInvertFun","createLogFun","createMaxFun","createMinFun","createNegateFun","createPowFun","createSinFun","createSqrtFun","createTanFun","createRandFun","valueToKey","object","prototype","hasOwnProperty","call","concatObjects","obj","libsObject","$mathLib","$sin","$cos","$tan","$sqrt","$pow","$log","$abs","$negate","$invert","$max","$min","$rand","$ioLib","$read","$write","$strLib","$substring","$length","$uppercase","$lowercase","$charAt","$arrayLib","$numElements","$matrixLines","$matrixColumns","$langLib","$isReal","$isInt","$isBool","$castReal","$castInt","$castBool","$castString","$castChar","funcsObject","getCurrentLangFuncs","main_function","localName","names","lib","getCurrentLangLibs","internalName","getFunction","libName","funName","RuntimeError","SemanticError","createRuntimeError","i18n_id","createSemanticError","ProcessorErrorFactory","symbol_not_found_full","symbol_not_found","function_missing_full","function_missing","main_missing","array_dimension_not_int_full","array_dimension_not_int","unknown_command_full","unknown_command","incompatible_types_full","left_type","left_dim","right_type","right_dim","source_info","translateType","incompatible_types","incompatible_types_array_full","dim","incompatible_types_array","loop_condition_type_full","loop_condition_type","endless_loop_full","endless_loop","if_condition_type_full","if_condition_type","invalid_global_var","not_implemented","invalid_case_type_full","invalid_case_type","void_in_expression_full","void_in_expression","invalid_array_access_full","invalid_array_access","invalid_matrix_access_full","invalid_matrix_access","matrix_column_outbounds_full","matrix_column_outbounds","matrix_line_outbounds_full","matrix_line_outbounds","vector_line_outbounds_full","vector_line_outbounds","vector_not_matrix_full","vector_not_matrix","function_no_return","invalid_void_return_full","invalid_void_return","invalid_return_type_full","invalid_return_type","invalid_parameters_size_full","invalid_parameters_size","invalid_parameter_type_full","fun_name","invalid_parameter_type","invalid_ref_full","invalid_ref","unexpected_break_command_full","unexpected_break_command","invalid_array_literal_type_full","invalid_array_literal_type","invalid_array_literal_line_full","invalid_array_literal_line","invalid_array_literal_column_full","invalid_array_literal_column","invalid_unary_op_full","opName","translateOp","invalid_unary_op","invalid_infix_op_full","typeLeft","dimLeft","typeRight","dimRight","invalid_infix_op","array_dimension_not_positive_full","array_dimension_not_positive","invalid_type_conversion","invalid_read_type","invalid_read_type_array","typePos","dimPos","typeArray","dimArray","invalid_const_ref_full","invalid_const_ref","invalid_const_assignment_full","var_id","invalid_const_assignment","invalid_vector_assignment_full","left_id","left_size","right_id","right_size","invalid_vector_assignment","invalid_matrix_assignment_full","left_line","left_column","right_line","right_column","invalid_matrix_assignment","matrix_to_vector_attr","vector_to_matrix_attr","invalid_matrix_index_assign_full","mat_id","mat_line","mat_size","exp_size","invalid_matrix_index_assign","invalid_number_elements_vector","expected_num","actual_num","invalid_number_lines_matrix","divsion_by_zero_full","divsion_by_zero","undefined_tanget_value","negative_log_value","invalid_string_index","local_fun_name","negative_sqrt_value","exceeded_recursive_calls","invalid_for_variable","invalid_for_from","invalid_for_to","invalid_for_pass","exceed_max_instructions","Store","Modes","Context","Operators","resultTypeAfterInfixOp","resultTypeAfterUnaryOp","Location","StoreValue","StoreValueRef","ArrayStoreValue","ArrayStoreValueRef","StoreValueAddress","ast","globalStore","stores","forceKill","mode","RUN","function_call_stack","instruction_count","function_call_count","RETURN","BREAK","prepareState","initGlobal","mainFunc","findMainFunction","runFunction","checkContext","executeCommands","MAIN_INTERNAL_ID","fun","funcStore","extendStore","associateParameters","variablesDeclarations","stoWithVars","finalSto","formal_params","effective_params","caller_store","callee_store","hasVariadic","j","formalParameter","associateVariadicParameter","actualParam","associateParameter","count","variadicCount","undefined","insertStore","actualParameter","callerStore","calleeStore","evaluateExpression","actualValue","shouldTypeCast","enable_type_casting","canImplicitTypeCast","inStore","realObj","getStoreObject","ref","values","get","array_type","addresses","getLocAddressOf","setReferenceDimension","locAddress","varID","realValue","doImplicitCasting","cmds","executeCommand","PAUSE","ABORT","executeDeclaration","executeArrayIndexAssign","executeAssign","executeBreak","executeReturn","executeIfThenElse","executeRepeatUntil","executeWhile","executeFor","executeSwitch","executeFunctionCall","executeSysCall","findFunction","destroy","switchCases","lastStore","lastCaseCheckResult","ignoreSwitchCases","switchCase","isDefault","equalityInfixApp","EQ","initCmd","passValue","LT","GE","checkEndGTBegin","GT","isForward","increment","ADD","whileBlock","forAsWhile","newCmdList","checkCondition","isTrue","funcType","real_value","stringInfo","applyStore","exp_type_string_info","exp_type_info","updateStore","mustBeArray","used_dims","lineSV","columnSV","canAccept","innerType","current_value","getAt","updateStoreArray","executeArrayDeclaration","temp","linesSV","columnsSV","evaluateArrayLiteral","valueList","evaluateUnaryApp","evaluateInfixApp","evaluateArrayAccess","evaluateVariableLiteral","evaluateLiteral","evaluateFunctionCall","max_call_stack","evaluateMatrix","storeValueMatrix","next","evaluateVector","exps","n_elements","actualValues","exp_str","newValue","vectors","vector","vec_type","isArray","readOnly","unaryApp","resultType","ord","SUB","NOT","negated","infixApp","shouldImplicitCast","stringInfoLeft","infoLeft","stringInfoRight","infoRight","MULT","DIV","MOD","LE","NEQ","AND","OR","rightStr","leftStr","strLeft","strRight","plus","minus","times","divToInt","div","leftValue","rightValue","trunc","modulo","charCodeAt","gt","gte","lt","lte","numElementsFun","ALL","matrixLinesFun","matrix","matrixColumnsFun","writeFunction","totalSV","total","sendOutput","readFunction","requestInput","typeToConvert","realObject","getReferenceDimension","arrayInfo","getRefObj","stoValue","MultiType","isRealFun","createParser","isIntFun","isBoolFun","castRealFun","typeStringInfoArray","typeInfo","castIntFun","floor","castBoolFun","castStringFun","castCharFun","valSV","String","fromCharCode","convertToRadians","degrees","acos","sinFun","angle","mod","sin","cosFun","cos","tanFun","tan","sqrtFun","isNeg","reject","sqrt","powFun","y","pow","logFun","isNegative","log10","absFun","abs","negateFun","invertFun","dividedBy","maxFun","numbers","sto_addrs","paramType","minFun","seed","a","m","c","randFun","createSetSeedFun","setSeedFun","substringFun","start","end","lengthFun","uppercaseFun","toUpperCase","lowercaseFun","toLowerCase","charAtFun","idx","charAt","SemanticAnalyser","stringCode","semantic","parseTree","analyseTree","symbolMap","currentFunction","n","symbol_map","findSymbol","pushMap","assertDeclarations","f","assertFunction","assertDeclaration","assertArrayDeclaration","insertSymbol","evaluateExpressionType","result_string_info","result_info","lineType","columnType","finalResult","resultTypeLeft","resultTypeRight","evaluateLiteralType","assertParameters","arrayTypeInfo","arrType","literal","last","e","strInfo","strExp","arrayDeclaration","evaluateVectorLiteralType","line_literal","formalParam","optional","assertReturn","popMap","checkCommand","checkCommands","var_type","from_type","to_type","pass_type","sType","hasDefault","caseType","lineExp","columnExp","exp_type","access_type","compatible","access_type_string_info","access_type_info","getMainFunction","actualParametersList","parameterList","assertVariadicParameter","param","assertParameter","expType","variable","shared","editor","JsonEditor","analiser","semAna","proc","load","alert","identifier","opts","UI","warn","Langs","IVProgLocalizedStrings","langService","langsJsons","shouldListenToChange","type_string","category","_instance","clicks","inRebuildMode","INSERT_FUNCTION","REMOVE_FUNCTION","INSERT_GLOBAL_VAR","REMOVE_GLOBAL_VAR","RENAME_FUNCTION","RENAME_GLOBAL_VAR","SET_GLOBAL_CONST","CHANGE_FUNCTION_RETURN","CHANGE_GLOBAL_TYPE","CHANGE_GLOBAL_VALUE","INSERT_FUNCTION_PARAM","REMOVE_FUNCTION_PARAM","CHANGE_PARAM_TYPE","RENAME_FUNCTION_PARAM","INSERT_FUNCTION_VAR","REMOVE_FUNCTION_VAR","RENAME_FUNCTION_VAR","CHANGE_VAR_TYPE","CHANGE_VAR_VALUE","INSERT_COMMAND","REMOVE_COMMAND","CHANGE_COMMAND_EXP","CHANGE_ATTRIB_EXP","CHANGE_ATTRIB_VAR","MOVE_COMMAND","ENTER_CHANGE_VAR_NAME","ENTER_CHANGE_VAR_VALUE","ENTER_CHANGE_GLOBAL_NAME","ENTER_CHANGE_GLOBAL_VALUE","ENTER_CHANGE_PARAM_NAME","details","registerEvent","registerSystemEvent","tag","setRebuildMode","logData","bool","InputTest","program_text","copyTestCases","assign","analyseFromSource","resultList","exec","result_final","inputList","showAlert","outputGenerated","Models","VariableValueMenuManagement","CodeParser","parseBoolean","var_value","final_array","el","row","parseGlobal","global_obj","new_global","Variable","is_constant","is_const","dimension","rows","program_obj","addGlobal","parseParameter","parameter_obj","new_parameter","function_obj","new_function","return_type","return_dimensions","is_main","parameters_list","variables_list","addFunction","parserCodeVisual","code_obj","conteudo","globals","preparedFunction","rawFunction","parseCommands","commands_block","COMMAND_TYPES","reader","parseReader","writer","parseWriter","comment","parseComment","attribution","parseAttribution","functioncall","parseFunctionCall","iftrue","parseIfTrue","repeatNtimes","parseRepeatNTimes","whiletrue","parseWhileTrue","dowhiletrue","parseDoWhileTrue","parseSwitch","expressionParserCodeVisual","Reader","Writer","Attribution","Comment","parameters","function_called","searchFunction","VariableValueMenu","VAR_OR_VALUE_TYPES","only_function","ifTrueBlock","ifFalseBlock","IfTrue","var_attribution","expression1","var_initial","expression2","item","var_step","step_expression","operator","ARITHMETIC_TYPES","expression3","ExpressionElement","EXPRESSION_ELEMENTS","exp_op_exp","RepeatNTimes","only_variable","WhileTrue","DoWhileTrue","sc","case_el","temp_exp","temp_commands","temp_case","SwitchCase","folderInput","header","generateSubCode","algorithmInIlm","ivprogCore","prepareData","submission","exercID","studentID","exercMap","has","Map","set","download","getExercHeader","props","acc","prop","file","encodeURIComponent","appendChild","files","folderName","webkitRelativePath","csvEntries","slice","vec","blockExercMap","getFilePath","path","counter","studentsMap","submissions","sort","b","parseInt","array","student","parseFloat","previousCode","previousFile","previous","getOrElse","currentFile","current","currentCode","logs","ratio","csv","firstLine","getCodeEditorModeConfig","CodeEditorMode","CodeMirror","indented","align","pushContext","state","indent","popContext","typeBefore","prevToken","string","typeAtEndOfLine","indentation","isTopScope","contains","words","word","propertyIsEnumerable","tokenComment","maybeEnd","ch","tokenize","defineMode","config","parserConfig","indentUnit","statementIndentUnit","dontAlignCalls","keywords","switchKeyword","caseKeyword","defaultKeyword","caseRegex","builtin","blockKeywords","defKeywords","atoms","hooks","multiLineStrings","indentStatements","namespaceSeparator","isPunctuationChar","numberStart","number","isOperatorChar","isIdentifierChar","isReservedIdentifier","curPunc","isDefKeyword","tokenString","tokenBase","backUp","eat","skipToEnd","eatWhile","cur","quote","escaped","maybeEOL","typeFirstDefinitions","eol","startState","basecolumn","startOfLine","ctx","sol","eatSpace","styleDefs","textAfter","Pass","firstChar","closing","dontIndentStatements","hook","switchBlock","allmanIndentation","caseTestRegex","electricInput","blockCommentStart","blockCommentEnd","blockCommentContinue","lineComment","fold","codeConfig","ivprogKeywords","basicTypes","ivprogTypes","ivprogBlockKeywords","blocks","ivprogDefKeywords","def","mimes","helperType","registerHelper","defineMIME","switchString","case_default","modeProps","setTestCases","TestConsole","Maybe","parseActivityData","ignore_logs","algorithm_in_ilm","none","configAuxiliar","obj_config","keys","setActivityConfig","config_json","activity_commands","activity_functions","activity_datatypes","activity_filter","activity_programming_type","code","showInvalidData","ilm_cont","test_cases","settings","algorithm","maybe_content","testcases","prog_type","settings_programming_type","settingsProgrammingType","settingsDataTypes","settings_data_types","settingsCommands","settings_commands","settingsFunctions","settings_functions","settingsFilter","settings_filter","compareArray","elementA","elementB","compareTestcases","original","elementO","elementS","originalData","callback","con","autoAssessment","runTest","TYPES","VARIABLE","CONST","RELATIONAL","LOGIC","ARITHMETIC","getOpType","switchCaseWalker","commandWalker","expressionWalker","switchWalker","switchCommand","returnWalker","breakWalker","forWalker","forLoop","whileWalker","whileLoop","testFirst","ifThenElseWalker","ifthenelse","assignmentWalker","assingment","arrayClass","instance","functionCallWalker","functionCall","lastInput","functionWalker","funcDeclaration","functionParameterWalker","variableDeclarationWalker","variableInitialWalker","opType","funcObj","paramsList","opValue","expressionAST","codeLinesMap","tokens","DIFF_DELETE","DIFF_INSERT","DIFF_EQUAL","diff_main","text1","text2","cursor_pos","_fix_unicode","editdiff","find_cursor_edit_diff","commonlength","diff_commonPrefix","commonprefix","diff_commonSuffix","commonsuffix","diffs","diff_compute_","unshift","diff_cleanupMerge","longtext","shorttext","hm","diff_halfMatch_","text1_a","text1_b","text2_a","text2_b","mid_common","diffs_a","diffs_b","diff_bisect_","text1_length","text2_length","max_d","ceil","v_offset","v_length","v1","v2","delta","front","k1start","k1end","k2start","k2end","d","k1","k1_offset","x1","y1","k2_offset","x2","diff_bisectSplit_","k2","y2","text1a","text2a","text1b","text2b","diffsb","pointermin","pointermax","pointermid","pointerstart","is_surrogate_pair_start","pointerend","is_surrogate_pair_end","diff_halfMatchI_","best_common","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","prefixLength","suffixLength","hm1","hm2","fix_unicode","pointer","count_delete","count_insert","text_delete","text_insert","previous_equality","ends_with_pair_start","stray","k","starts_with_pair_end","changes","charCode","remove_empty_tuples","tuples","ret","make_edit_splice","before","oldMiddle","newMiddle","after","oldText","newText","oldRange","newRange","oldLength","newLength","oldCursor","oldBefore","oldAfter","maybeNewCursor","editBefore","newCursor","newBefore","newAfter","oldPrefix","newPrefix","editAfter","cursor","oldSuffix","newSuffix","replaceRange","_type","scrollIt","destination","duration","easing","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","pageYOffset","startTime","performance","getTime","documentHeight","body","offsetHeight","documentElement","clientHeight","windowHeight","innerHeight","getElementsByTagName","destinationOffset","offsetTop","destinationOffsetToScroll","round","scroll","timeFunction","requestAnimationFrame","rect","getBoundingClientRect","bottom","innerWidth","clientWidth","cacheMainList","cacheOp","fillCache","mainList","logicOpList","lOp","isKeyword","isValidIdentifier","identifier_str","validRegex","blockList","keywordsList","typeList","atomList","win","preventDefault","page_code","currentTarget","dataset","close","open","range","startAt","ms","res","setTimeout","GlobalsManagement","FunctionsManagement","block_render","renderAlgorithm","draging","children","off","empty","renderFunction","renderGlobal","blockAllEditingOptions","delay","show","remove","globalsCode","has_error","n_code","functionsCode","TEXT","parametersCode","variablesCode","commandsCode","command_obj","breaksCode","commentsCode","readersCode","writersCode","functioncallsCode","attributionsCode","whiletruesCode","doWhilesCode","iftruesCode","repeatNtimesCode","switchsCode","returnsCode","variable_value_menu","elementExpressionCode","_command_obj","variableValueMenuCode","switchcasesCode","switchcase","repeatNtimesHeader","itens","renderErrorMessage","dom_object","commands_else","logicExpressionCode","first_operand","EXPRESSION_TYPES","exp_logic","exp_arithmetic","arithmeticExpressionCode","LOGIC_COMPARISON","equals_to","not_equals_to","second_operand","ARITHMETIC_COMPARISON","greater_than","less_than","greater_than_or_equals_to","less_than_or_equals_to","expression_obj","type_op","multiplication","division","module","write_sep","variable_obj","is_return","translateInternalFunction","reference_dimensions","isBackslash","newline","comment_text","CommentsManagement","ReadersManagement","WritersManagement","AttributionsManagement","IftruesManagement","RepeatNtimesManagement","WhiletruesManagement","DowhiletruesManagement","SwitchesManagement","FunctioncallsManagement","BreaksManagement","ReturnsManagement","removeCommand","dom_obj","function_container_active","createFloatingCommand","function_container","command_type","mouse_event","floatingObject","draggable","appendTo","mouseup","evt","manageCommand","hasClass","originalEvent","srcElement","closest","on","addGhostDiv","elementFromPoint","clientX","clientY","ghostDiv","css","target","pageX","divx","pageY","trigger","active_container","addGhostToEmptyBlock","container","addGhostToNotEmptyBlock","is","containerIf","containerElse","topIfDistance","bottomIfDistance","height","topElseDistance","bottomElseDistance","addGhostToFunctionArea","allfilhos","topDistances","bottomDistances","topD","botD","menorTop","apply","indiceTop","menorBot","indiceBot","insertAfter","undermouse","borderMouseDragCommand","each","removeClass","objLeft","objTop","objRight","width","objBottom","addClass","renderCommand","element_reference","before_after_inside","createdElement","genericCreateCommand","only_value","variable_and_function","dragTrash","trash","fadeIn","fadeOut","findSingleElement","searching","query","findPathRecursive","starter_index","hierarquia_bottom_up","index_command","full_path","hier","parentsUntil","esta_correto","esta_na_div_correta","new_cmd","findNearbyCommandToAddInFunctionScope","hier_find","is_correct_context","sub_elemento","findBeforeOrAfterCommandToAdd","insertCommandInBlockHierar","all_str_path","hier_dom","hier_obj","el_jq","command_parent","recentComand","findNearbyCommandToAddInBlockScope","addCommandToSwitchCase","findBeforeOrAfterCommandToAddInsertBlock","node_list_commands","all_sub","menor_distancia","elemento_menor_distancia","antes","t_bot","t_top","borda_inferior","command_target","temp_parent","is_in_else","d_top","d_bot","findInBlockCorrectPlace","insertCommandInBlock","correct_div","is_in_if","which_case","case_div","findInBlockCorrectPlaceInSwitchCase","CommandsManagement","ExpressionManagement","CodeGenerator","renderMenu","addHandlers","renderExpression","lockexpression","toggle","toggleClass","manageExpressionElements","ref_object","menu_var_or_value","selectedItem","expression_element","index_to_move","op_exp","par_exp_par","renderExpressionElements","expression_div","command_container","renderElement","renderOperator","temp_op","index_op","context_menu","dropdown","onChange","$selectedItem","renderMenuAddExpression","dom_append_menu","expression_append_new_expression","type_exp","temp_exp_1","temp_exp_2","temp_par_1","temp_par_2","menu_add_item","menu_add_item_seq","index_temp","addMenuItens","divs_expression","attribution_dom","expressionEdition","inputExpression","afterWhichElement","lockButton","editButton","ex","ok_button","cancel_button","focusout","keyup","parsed","expressionParserToVisual","mousedown","len","setSelectionRange","renderMenuOperations","variable_selected","createExpressionAround","break_dom","renderTextComment","comment_dom","initial_el_to_render","renderStartMenu","main_div","renderLogicExpression","renderArithmeticExpression","restartMenu","renderArithmeticOperator","all_expression","expression_arithmetic","arithmetic_operator","element_to_append","menu_operator","selected","renderLogicOperator","expression_logic","logic_operator","exp_el_par_1","exp_el_expr_el_1","exp_el_expr_operand","exp_el_expr_el_2","exp_el_par_2","start_menu","LogicExpression","ArithmeticExpression","html","selectOnKeydown","SwitchManagement","dom_where_render","dom_command","menu_div","collapsed","addCaseToSwitch","renderCase","ConditionalExpressionManagement","ContextualizedMenu","GenericExpressionManagement","dowhiletrue_dom","functioncall_dom","WatchJS","timer","div_to_render","expression_array","unwatch","watch","s","types_included","exp_conditional","renderElements","open_or_close","lixeira","posX","posY","Sortable","create","animation","ghostClass","group","put","onStart","onMove","onEnd","onAdd","removeElement","indice","first","opening","div_temp","renderFinalAddElements","renderParenthesis","renderStartAddOperator","renderOperatorMenu","renderAddParenthesis","parentheses_activate","addParentheses","actual_target","renderGhostParentheses","floating","comando_que_esta","comando_certo","open_parentheses","close_parentheses","inserir_open","inserir_close","evts","is_correct","index_in_array","count_opened","count_closed","expression_content","position","ghost_parenthesis","menu_final","getArithmeticOperators","getLogicOperators","getRelationalOperators","div_higher","sera","ExpressionOperator","is_last","button","getSeparator","_value","_text","arithmetic_operators","logic_operators","relational_operators","getVariable","search","variavel","system_functions","input_field","var_not_found","fun_not_found","funcao","uniqueWords","Set","exp_obj","function_name","iftrue_dom","reader_dom","togglePasso","var_incrementation","cond_exp","manageClearExpressionElements","repeatNtimes_dom","return_dom","casediv","switch_dom","AttribuitionsManagement","RepeatNTimesManagement","variable_and_value_opt","value_and_function","size_field","index_references","variable_and_value","reference_parent","inputWidth","textWidth","addVariablesToMenu","addFunctionsToMenu","addIVProgFunctionsToMenu","variable_fun","isVarInProgram","renderPreviousContent","appendSelectText","ret_function","isFunctionInProgram","function_called_obj","var_obj","var_fun","parameters_menu","variable_render","openInputToValue","sub_menu","SYSTEM_FUNCTIONS_CATEGORIES","math","arrangement","conversion","is_there","include_constant","openInputToFunction","openInputToVariable","tmpStr","function_selected","field","rendered","fn","font","fakeEl","attr","whiletrue_dom","addHandlersManager","_function_obj","_writer_dom","item_div","content_element","writer_dom","handle","random","newIndex","oldIndex","replaceWith","newlineBtn","setPopup","_addHandlerIconAdd","insert_after","after_which","icon_add_item","_event","div_parent_with_handler","new_div_item","new_related_menu","addHandlerIconAdd","addContent","_ref_object","_menu_var_or_value","_ref_object_content","VariablesManagement","CodeManagement","AlgorithmManagement","VersionInfo","TextEditor","counter_new_functions","counter_new_parameters","ivprog_version","version","globalChangeListeners","functionsChangeListeners","_testCases","isRunning","studentGrade","Program","SystemFunction","mainFunction","function_comment","generator","runCodeAssessment","insertContext","watchW","addFunctionHandler","in_use","temp_name","addParameter","renderParameter","updateReturnType","new_type","new_dimensions","removeFunction","minimizeFunction","is_hidden","enableNameFunctionUpdate","addVariable","slideToggle","renderFunctionReturn","function_element","tm","cont","appender","renderVariable","function_index","updateSequenceLocals","addSortableHandler","updateSequenceParameters","teste","sticky","scrollContext","observeChanges","onStick","onBottom","onUnstick","onReposition","onScroll","isVisible","onTop","elementTop","elementHeight","containerTop","containerHeight","evento_drag","updateProgramObjDrag","nodes","start_index","path_target","index_each","path_relative","indice_na_raiz","is_in_case_switch","command_start_point","block_to_insert","command_in_drag","prepareDragHandler","id_function","n_group","itemEl","to","showStopButton","runCode","downloadFile","change","uploadFile","showRunButton","stopExecution","toggleVisualCoding","toggleTextualCoding","is_iassign","toggleConsole","full_screen","time_show","listWithHandle","updateSequenceFunction","listGlobalsHandle","updateSequenceGlobals","strCode","settingsProgrammingTypes","getEvaluationCallback","scheduleCall","is_running","removeParameter","parameter_container","updateParameterType","__","enableNameParameterUpdate","checked","updateParameterName","parameter_var","new_name","parameter_obj_dom","variableNameAlreadyExists","name_var","updateFunctionName","function_var","function_obj_dom","functionNameAlreadyExists","opened_name_parameter","opened_input_parameter","parent_node","select","opened_name_function","opened_input","previousPadding","scheduled_call","cancelPendingInputRequests","contentToSend","date","toISOString","toTimeString","replaceAll","blob","Blob","saveAs","oFReader","FileReader","readAsText","onload","oFREvent","txt","prepareActivityToStudent","counter_new_globals","is_from_click","newe","toggleConstant","global_var","updateName","global_obj_dom","globalNameAlreadyExists","global_name","updateType","updateInitialValues","removeGlobal","global_container","alternateBooleanGlobalValue","value_container","alternateBooleanGlobalVectorValue","removeGlobalColumnVector","addGlobalColumnVector","removeColumnGlobalMatrix","addColumnGlobalMatrix","removeLineGlobalMatrix","addLineGlobalMatrix","n_l","alternateBooleanGlobalMatrixValue","renderValues","enableGlobalValueUpdate","enableGlobalVectorValueUpdate","enableGlobalMatrixValueUpdate","updateColumnsAndRowsText","enableNameUpdate","ff","complete_element","opened_name_value_matrix_global_v","opened_input_value_matrix_global_v","opened_name_value_global_var","opened_input_value_global_ar","changed","opened_name_global","opened_input_global","input_name","opened_name_value_vector_global_","opened_input_value_vector_global_","start_point","ConditionalExpression","has_neg","FunctionCallMenu","function_to_add","function_to_receive","codeEditor","fromTextArea","theme","lineNumbers","matchBrackets","autoCloseBrackets","fixedGutter","styleActiveLine","setOption","refresh","setValue","getValue","dom_obj_target","message_text","transition","closable","movePopup","boundary","preserve","className","onHidden","$module","counter_new_variables","is_in_click","new_var","variable_obj_dom","removeVariable","variable_container","function_associated","variable_var","alternateBooleanValue","enableValueUpdate","alternateBooleanVectorValue","enableVectorValueUpdate","removeColumnVector","addColumnVector","removeColumnMatrix","addColumnMatrix","removeLineMatrix","addLineMatrix","alternateBooleanMatrixValue","enableMatrixValueUpdate"],"sourceRoot":""}
|